digitalmars.D - What can you "new"
- Steve Teale (11/11) Mar 22 2009 void str()
- bearophile (11/12) Mar 22 2009 I suggest you to post such questions to the "learn" newsgroup.
- Denis Koroskin (10/22) Mar 22 2009 Hmm.. Not a common case, but looks like a bug. Or a clever design decisi...
- BCS (13/30) Mar 22 2009 but works (or not) as you said
- Unknown W. Brackets (13/29) Mar 22 2009 The new construct allocates memory. You can "new" anything that
- Steven Schveighoffer (6/10) Mar 23 2009 Also can be:
- Unknown W. Brackets (3/20) Mar 24 2009 Yes, well, the question was about new not about arrays...
- Derek Parnell (37/52) Mar 22 2009 I believe that the message is wrong, or at least misleading. The 'dynami...
- Denis Koroskin (2/53) Mar 22 2009 I wouldn't recommend using that to anyone. That's a *dirty* hack!
- Derek Parnell (6/7) Mar 22 2009 That goes without saying ;-) TO BE AVOIDED AT ALL COSTS.
- Andrei Alexandrescu (7/66) Mar 22 2009 I think the question is very legit. char[] is a type like any other
- Don (2/3) Mar 23 2009 Care to elaborate?
- Andrei Alexandrescu (7/11) Mar 23 2009 I just did in the PS :o). New is not uniform: you can't use it easily to...
- Georg Wrede (2/14) Mar 23 2009 Have I missed a discussion on what to have instead of new?
- Andrei Alexandrescu (6/21) Mar 23 2009 Nothing.
- Sean Kelly (3/23) Mar 23 2009 So it's back to malloc when we want to dynamically allocate a struct,
- Andrei Alexandrescu (7/28) Mar 23 2009 To dynamically allocate a struct, the stdlib should provide a function
- Christopher Wright (2/23) Mar 23 2009 auto a = MyStruct*(); ?
- Jarrett Billingsley (3/7) Mar 23 2009 Struct on stack vs. heap?
- Andrei Alexandrescu (3/13) Mar 23 2009 Allocating a struct on heap should invoke a function a la create!(T).
- Sean Kelly (2/14) Mar 23 2009 Hm... so I guess we'd need support for placement construction?
- Andrei Alexandrescu (4/18) Mar 23 2009 Yah, that (together with explicit destruction) should be in the language...
- Steve Teale (2/22) Mar 24 2009 A bag of worms it would appear!
- Andrei Alexandrescu (3/27) Mar 24 2009 Well yah but you can use them to catch big fish.
- Cristian Vlasceanu (4/33) Mar 24 2009 Do custom-allocated objects live on the GC-ed heap?
- Andrei Alexandrescu (4/35) Mar 24 2009 Not necessarily, e.g. you can malloc some memory and then create an
- Cristian Vlasceanu (19/23) Mar 25 2009 I was afraid that may be the case, and it is perhaps not a good idea.
- Daniel Keep (12/27) Mar 25 2009 It's funny, but I was recently doing some game prototyping and needed a
- bearophile (5/6) Mar 25 2009 Some of similar stuff may be fit to be added to Phobos too :-)
- Daniel Keep (18/26) Mar 25 2009 Well, the only ones I ever found a use for were block and free list
- Don (4/35) Mar 25 2009 Given those studies which show that dlmalloc out-performs all custom
- Denis Koroskin (4/38) Mar 25 2009 Having a custom memory pool is usually a good idea. At work, our game en...
- Sean Kelly (7/15) Mar 25 2009 Have you looked into HOARD? It uses per-process pools, but it's roughly...
- Sean Kelly (6/12) Mar 25 2009 I think this is unavoidable if D wants to be a "real" systems language,
- Cristian Vlasceanu (14/26) Mar 25 2009 Hm... how should I put it nicely... wait, I guess I can't: if you guys t...
- Unknown W. Brackets (14/45) Mar 26 2009 D is better as a language, imho. You never know when Apple will scrap
- Georg Wrede (30/41) Mar 26 2009 On larger systems (PC size and up), the window for a new operating
- Sean Kelly (5/9) Mar 26 2009 With D2 you can drop in a different allocator to be used by the runtime
- grauzone (6/16) Mar 26 2009 You forgot the array literals (which almost look like harmless,
- Denis Koroskin (2/19) Mar 26 2009 Tango is designed in a way to avoid any hidden allocations.
- Sean Kelly (6/23) Mar 26 2009 The array literals should really be fixed :-p But you're right--I
- Sean Kelly (28/42) Mar 26 2009 Then I may as well just walk away from D now because this is the only
- Nick Sabalausky (19/23) Mar 26 2009 Ok, that argument is just plain silly. Of course we have a systems probl...
- Jarrett Billingsley (2/6) Mar 26 2009 *cough*www.xomb.org*cough*
- grauzone (2/10) Mar 26 2009 Your point? Yes, we know that D can be used to write hobby kernels.
- Jarrett Billingsley (2/15) Mar 26 2009 No need to be hostile about it. I was just letting Nick know.
- grauzone (4/18) Mar 26 2009 It will never "shake up the current OS market", though. Also, I think
- Nick Sabalausky (25/46) Mar 26 2009 Choice of language can certainly make a big difference in a product, OS ...
- grauzone (26/39) Mar 26 2009 I'm not saying that the programming language is not relevant at all.
- Walter Bright (11/14) Mar 27 2009 It's like if you gave the Spartan Leonidas a Henry repeating rifle - he
- Andrei Alexandrescu (7/17) Mar 27 2009 Sometimes I run these crazy calculations: how much modern firepower
- Daniel Keep (10/26) Mar 27 2009 You mean the battle of Helm's Deep? I think you'd need more than one
- BCS (6/28) Mar 27 2009 My current martial speculation involves David Weber's Honor Harrington s...
- Christopher Wright (10/33) Mar 28 2009 What bomb? There was no bomb at Helm's Deep.
- Andrei Alexandrescu (8/45) Mar 28 2009 Well I'm not sure we're talking about the same battle. The one I talk
- Christopher Wright (7/18) Mar 28 2009 In the book, the defenders were doing extremely well, but no matter how
- Andrei Alexandrescu (16/42) Mar 28 2009 The thing is, there is this narrow ravine leading to the castle. A
- Sean Kelly (4/10) Mar 28 2009 Things can get pretty weird in fantasy settings though. Trolls could
- Steve Teale (3/23) Mar 27 2009 I see that my most popular thread has now evolved into something complet...
- Walter Bright (2/5) Mar 27 2009 Another battle won by superior technology (longbows).
- Andrei Alexandrescu (6/12) Mar 28 2009 Well that was more like simple-minded tactics on the part of the
- Steve Teale (4/18) Mar 28 2009 To answer you and Walter at the same time, A) longbows were pretty primi...
- Walter Bright (7/27) Mar 27 2009 You don't have to look far back to see many examples of superior
- BCS (3/11) Mar 27 2009 I havn't readit but Harry Turtledove's book also runs that idea around:
- Don (8/38) Mar 27 2009 Curiously though, the Persian composite longbow was deadlier than the
- Walter Bright (6/12) Mar 28 2009 During the Civil War, Henry repeating rifles appeared. With breech
- Paul D. Anderson (2/16) Mar 28 2009 The Civil War -- military technology was advanced enough to cause devast...
- Steve Teale (2/16) Mar 28 2009 Walter, I think you understate the arrow. Often they had barbs, and they...
- Walter Bright (6/9) Mar 28 2009 Perhaps I do. I am no expert on either guns or archery, not even close.
- Don (11/22) Mar 28 2009 As I understand it, the Persian composite longbow was technologically
- Sean Kelly (7/12) Mar 28 2009 The Winchester repeating rifle was definitely a game-changer, but that
- Andrei Alexandrescu (19/32) Mar 28 2009 Oh, I forgot to emphasize one detail: when thinking of the minimal
- BCS (4/10) Mar 28 2009 IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.5...
- Christopher Wright (6/18) Mar 28 2009 Yeah, you'd really want a Vulcan or something in that range. (Made by
- Andrei Alexandrescu (12/24) Mar 28 2009 Not enough penetration to do in an Orc? I haven't read the book, but the...
- Sean Kelly (33/57) Mar 28 2009 Orcs were mutated Elves, basically, and their skin certainly wasn't
- Andrei Alexandrescu (11/38) Mar 28 2009 Yah, they said 1m should be ok and 2m should be perfect. What they
- BCS (6/17) Mar 28 2009 Oh it would penetrate the first orc just fine, but meat is a lot of wate...
- Simen Kjaeraas (3/13) Mar 29 2009 At least in the movie, the orcs only had front-facing armor, as they
- BCS (4/15) Mar 29 2009 that actually was a problem, the orcs were all AI driven CGI and for a w...
- Walter Bright (2/5) Mar 29 2009 Skynet 1.0 has some bugs!
- Daniel Keep (4/12) Mar 29 2009 to this:
- Sean Kelly (7/13) Mar 28 2009 MythBusters did an episode where they chopped down a mesquite tree with
- Steve Teale (2/13) Mar 28 2009 Longer range of course. It's more comfortable farther away from the enem...
- Derek Parnell (8/10) Mar 28 2009 Another in a similar vein is John Birmingham's "Weapons of Choice" trilo...
- Joel C. Salomon (4/11) Mar 29 2009 Then, of course, there’s Arthur C. Clarke’s “Superiority”, that ...
- Walter Bright (13/18) Mar 28 2009 Sometimes I think what if I were dropped naked back in time 20,000 years...
- Christopher Wright (20/35) Mar 28 2009 Writing allows you to keep solutions to problems that only come about
- Tomas Lindquist Olsen (2/38) Mar 28 2009 Are we playing some newsgroup based version of Civilization now?
- Paul D. Anderson (2/41) Mar 28 2009 Alan Lightman wrote a short story, "A Modern Day Yankee in a Connecticut...
- BCS (6/29) Mar 28 2009 Ag. Up to a little over 100 years ago >90% of man was needed to feed us ...
- Andrei Alexandrescu (10/33) Mar 28 2009 Gosh, that runs through my mind a lot! (Also, I tend to ask myself a lot...
- Walter Bright (5/12) Mar 28 2009 But humans had fire 20,000 years ago! I think fire goes back a lot
- Andrei Alexandrescu (8/23) Mar 28 2009 Not for transporting the hunt.
- Walter Bright (8/15) Mar 28 2009 Consider making a wheel (and corresponding cart) with nothing but stone
- Andrei Alexandrescu (4/22) Mar 28 2009 Yah, all the more argument to extend the time traveler an invitation to
- Sean Kelly (12/16) Mar 28 2009 The Maya wrote on treated Birch Bark, which apparently worked great
- Walter Bright (12/30) Mar 28 2009 It's the "treating" that's the problem. Do you know how to treat animal
- Sean Kelly (19/39) Mar 28 2009 I know that hide can be tanned using urine, which I suppose is why
- Don (4/33) Mar 28 2009 (EG, Goliath had an iron spear, in the middle of the bronze age).
- BCS (4/16) Mar 28 2009 After the tip get in the animal, it breaks off, grinds up and does more ...
- Sean Kelly (2/6) Mar 29 2009 Ah, I was wondering if that might be the case. Thanks for the explanati...
- Walter Bright (7/18) Mar 29 2009 Since stone arrowheads, and improvements in them, spread rapidly around
- BCS (6/9) Mar 28 2009 the story I want to puzzle out is that a group of a few thousand people ...
- Daniel Keep (14/27) Mar 29 2009 You mean a ruggedised Kindle 2 a.k.a. the Hitchhiker's Guide to the
- BCS (9/46) Mar 29 2009 I'd argue that working out the food supply is a prerqueset to keeping so...
- Walter Bright (12/18) Mar 29 2009 Most of them would promptly die. The reference will be missing all kinds...
- Christopher Wright (7/27) Mar 29 2009 Foxfire, not Firefox. There are about twelve volumes, each roughly as
- Walter Bright (4/10) Mar 29 2009 You didn't miss anything.
- Andrei Alexandrescu (3/15) Mar 29 2009 Obvious hint to start a donation campaign for a new plasma ignored.
- Sean Kelly (9/21) Mar 29 2009 The problem I ran into is that the audio is mixed with the music about
- Walter Bright (3/11) Mar 29 2009 I've been having increasing problems understanding TV dialog, too. It
- BCS (3/17) Mar 29 2009 I'm 25, don't like loud music and run movies with subtitles. It's kinda ...
- Georg Wrede (19/31) Mar 29 2009 It's a conspiracy. You need to turn the volume up to understand, and
- Jarrett Billingsley (3/9) Mar 29 2009 It's not just there :P some commercials are, no kidding, about twice
- Christopher Wright (7/28) Mar 29 2009 It was quite annoying, but I found a solution: don't watch broadcast
- BCS (3/6) Mar 29 2009 hulu.com grand total of about 2 minutes of non show tops. I don't even o...
- Daniel Keep (3/12) Mar 29 2009 Only a valid point if you happen to live in the US.
- Daniel Keep (29/49) Mar 29 2009 I have this long list of "what I'd do if I was made Prime Minister."
- Georg Wrede (11/41) Mar 29 2009 Oh yes!! Today, I'm having a hard time telling my kids not to lie, while...
- Andrei Alexandrescu (5/10) Mar 29 2009 I'd be happy with removing the stupidest ones for now. I hate the Geico
- Gide Nwawudu (5/16) Mar 29 2009 Apparently the sound mixing is causing older audiences difficulties.
- Daniel Keep (8/20) Mar 29 2009 Don't forget that all their camera operators apparently suffer from
- Andrei Alexandrescu (4/6) Mar 29 2009 Damn! Thanks for the spoiler, I wanted to watch that! On second thought,...
- Sean Kelly (2/8) Mar 29 2009 It's well worth it, assuming you like space opera.
- Georg Wrede (2/11) Mar 29 2009 That's the first series I'd consider buying a box set.
- Walter Bright (2/3) Mar 29 2009 Waste of money & time. Buy "Band of Brothers" instead.
- Daniel Keep (7/11) Mar 29 2009 I actually just broke my "don't buy media" rule and grabbed the Monty
- Walter Bright (3/9) Mar 29 2009 Sorry, it's been over a week now, so I assumed everyone who cared about
- BCS (6/28) Mar 29 2009 No it does contain that knowledge. Assume, it has the totally recorded k...
- Walter Bright (9/13) Mar 29 2009 That's *recorded* knowledge. A lot of knowledge never gets recorded. For...
- Walter Bright (5/5) Mar 29 2009 Remember that old Bill Cosby routine where he plays Moses and God is
- BCS (2/10) Mar 29 2009 http://en.wikipedia.org/wiki/Qbit
- Georg Wrede (65/71) Mar 29 2009 Let's say, instead of just birthday suits and an encyclopedia, they'd
- Andrei Alexandrescu (21/108) Mar 29 2009 Sorry for the long quote, I quoted this in full because I liked it this
- Georg Wrede (11/28) Mar 29 2009 Cool!
- Joel C. Salomon (6/12) Mar 29 2009 Jerry Pournelle defines a Dark Age as a time when not only is the
- Jarrett Billingsley (14/25) Mar 29 2009 Indeed. The European Dark Ages were dominated by views that humans
- Max Samukha (21/47) Mar 30 2009 The problem with capabilities of humanity is that humans are mortal.
- Jarrett Billingsley (13/18) Mar 30 2009 If science can't give you a proof of His (and an afterlife's)
- Jarrett Billingsley (8/11) Mar 30 2009 I meant to reply to this part too.
- Joel C. Salomon (5/9) Mar 30 2009 I believe that bit of doctrine about predestination is Calvinist, not
- Walter Bright (10/14) Mar 29 2009 I remember one of those idiot "In Search Of..." type shows in the 70's
- Ellery Newcomer (3/20) Mar 29 2009 I've not heard about that, any good links on the subject?
- Walter Bright (3/18) Mar 29 2009 The same principle should work.
- Ellery Newcomer (4/26) Mar 29 2009 Probably. But I bet they squished quite a few peasants transporting
- Georg Wrede (2/29) Mar 30 2009 Let's just say 20 tons.
- Christopher Wright (2/32) Mar 30 2009 *My* peasants go up to 20,000!
- Georg Wrede (17/19) Mar 29 2009 Hi-tech export restrictions are a good start. Forbidding teaching Darwin...
- Rioshin an'Harthen (14/20) Mar 29 2009 I seem to remember reading from science mags that the ancient Greeks wer...
- Daniel Keep (14/39) Mar 29 2009 It seems the major purpose of religion is to retard the progress of
- BCS (11/15) Mar 29 2009 I'm a cristian, but even so I'll *almost* go with you there. it's not in...
- Walter Bright (9/14) Mar 29 2009 This is hardly limited to religious beliefs. It happens with political
- BCS (5/16) Mar 29 2009 I think the answers is to always be willing to entertain /rational/ deba...
- Walter Bright (5/9) Mar 29 2009 But that's not the way people work. People have a vested interest in
- Georg Wrede (2/13) Mar 30 2009 D bashing by the C++ crowd.
-
Walter Bright
(2/10)
Mar 30 2009
The thought crossed my mind
. - BCS (6/20) Mar 30 2009 When that happens, you have an problem (and that was what I was assertin...
- Daniel Keep (3/20) Mar 29 2009 All I said was that piece of fish was good enough for Jehovah...
- Sean Kelly (9/26) Mar 29 2009 There was another Slashdot article a while back about conspiracy
- Christopher Wright (4/18) Mar 30 2009 I'm waiting to see him publish on the subject. Until then, it's only a
- Jarrett Billingsley (8/11) Mar 29 2009 Please, let's separate the ideas of "general consensus" and "assuming
- BCS (6/21) Mar 30 2009 In my context, faith is referring to a belief in a theological world vie...
- Walter Bright (17/32) Mar 29 2009 To amplify your point a bit with a real life example, during WW2 a B-29
- BCS (11/11) Mar 29 2009 Hello Georg,
- Georg Wrede (31/45) Mar 29 2009 Well, for example, when the Allied ganged up against Hitler, there were
- BCS (9/26) Mar 29 2009 My poit is that most people (might even have been all bedfor that job) t...
- Sean Kelly (3/15) Mar 29 2009 I'd bet it takes longer. Even with incredible knowledge, they'd have to...
- Walter Bright (2/4) Mar 29 2009 Huh, 99% of the people will be full time engaged just in food production...
- Sean Kelly (10/15) Mar 29 2009 If the people were dropped on another planet, there's not even any
- Andrei Alexandrescu (3/8) Mar 29 2009 Well at some point it was said that a McDuff device provides food.
- Walter Bright (5/13) Mar 29 2009 McDuff is right. Trying to get enough food to eat has been the bane of
- Daniel Keep (6/21) Mar 29 2009 Aye... except, of course, for all the people starving to death.
- Christopher Wright (15/29) Mar 28 2009 If they are nomadic, wheels allow an individual to carry much more
- Sean Kelly (4/26) Mar 28 2009 I don't buy it. Most foods would spoil too quickly for this to matter,
- Andrei Alexandrescu (3/30) Mar 28 2009 When did you tame the mule??? :o)
- Sean Kelly (3/35) Mar 28 2009 Hey, you'd need one to pull the wagon anyway :-) I'm just ditching the
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (20/53) Mar 29 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Georg Wrede (2/54) Mar 29 2009
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (16/24) Mar 29 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Sean Kelly (4/10) Mar 29 2009 I always mix up "mule" and "donkey." I suppose I should have done a web...
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (17/28) Mar 29 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Christopher Wright (6/9) Mar 28 2009 It depends on whether you'd domesticated some sort of pack animal first....
- Sean Kelly (7/11) Mar 29 2009 Grain lasts for a reasonable time, but that requires agriculture to
- Steve Teale (2/14) Mar 29 2009 My dogs have ticks!
- dsimcha (8/20) Mar 28 2009 One that noone seems to mention, not only on this NG but in general, is ...
- Paul D. Anderson (3/24) Mar 28 2009 That may be a reasonable argument from a modern standpoint, but for much...
- Steve Teale (2/23) Mar 28 2009 But how the hell would you have delivered that. First of all you have to...
- Yigal Chripun (8/30) Mar 28 2009 Condoms were first invented in ancient Egypt 3 Milena or so ago. they
- Nick Sabalausky (11/18) Mar 28 2009 That's a huge overgeneralization. Maybe some school systems do that, but...
- Ellery Newcomer (4/30) Mar 28 2009 There actually was an herb that apparently provided effective birth
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (16/34) Mar 28 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Walter Bright (2/4) Mar 28 2009 Natch!
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (33/38) Mar 29 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Steve Teale (2/22) Mar 28 2009 Subject military_history = new Topic();
- Don (6/18) Mar 26 2009 You're equating "systems language" with "language intended for writing a...
- Andrei Alexandrescu (6/26) Mar 26 2009 I'm surprised at how many people misunderstand the "systems language" or...
- Steven Schveighoffer (6/31) Mar 26 2009 wikipedia to the rescue!
- Walter Bright (6/18) Mar 26 2009 Although D has gc support, it is possible (and rather easy) to write
- Cristian Vlasceanu (5/7) Mar 29 2009 This is not what I am arguing.
- Steve Teale (2/20) Mar 23 2009 So how do you interpret the error message?
- Unknown W. Brackets (17/40) Mar 24 2009 Steve,
- Steve Teale (2/53) Mar 24 2009
- Andrei Alexandrescu (6/34) Mar 24 2009 I don't mean to ruin anyone's holiday in Tanzania but zero is a crappy
- Unknown W. Brackets (4/45) Mar 24 2009 No, I agree. I think for the sake of templating, improving the error
- Steve Teale (2/74) Mar 23 2009
- BCS (2/4) Mar 23 2009 Where?
- bearophile (5/10) Mar 23 2009 Maybe by me at the beginning, but I didn't mean to sound harsh.
- downs (7/7) Mar 23 2009 struct Temp(T) {
void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?
Mar 22 2009
Steve Teale:What am I missing here, isn't char[] a dynamic array?I suggest you to post such questions to the "learn" newsgroup. D dynamic arrays aren't objects, they are C-like structs that contain a just length and a pointer (no capacity). The "new" for them is needed only to allocate the memory they point to. So to define an empty dynamic array of chars: char[] ca; In D1 you can also just: string s1; To allocate a non empty array of chars of specified len: auto ca = new char[some_len]; Tale a look at the D docs, where such things are explained. Bye, bearophile
Mar 22 2009
On Sun, 22 Mar 2009 21:31:07 +0300, Steve Teale <steve.teale britseyeview.com> wrote:void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?Hmm.. Not a common case, but looks like a bug. Or a clever design decision :P Certainly, you can create an int using new: int* i = new int; Why can't you create 'char[]'? T create(T) { return new T; } int* i = create!(int); // fine char[]* c = create!(char[]); // error
Mar 22 2009
Hello Denis,Hmm.. Not a common case, but looks like a bug. Or a clever design decision :P Certainly, you can create an int using new: int* i = new int; Why can't you create 'char[]'? T create(T) { return new T; } int* i = create!(int); // fine char[]* c = create!(char[]); // errorthat should be:T* create(T)() { return new T; }but works (or not) as you said OTOH this works: T* create(T)() { T[] ret = new T[1]; return &ret[0]; } void main() { int* i = create!(int); // fine char[]* c = create!(char[]); // error }
Mar 22 2009
The new construct allocates memory. You can "new" anything that requires a set amount of memory. This is equivalent to what you want: auto s = new char[0]; Which creates a new dynamic array with no length (yet.) You can resize it later. Remember, that is not the same as saying: char[0] s; Which creates a static array. This cannot be resized. For the sake of people used to other languages (where arrays are objects), it is possible "new type_t[]" could be considered the same as "new type_t[0]", but that is an RFE not a bug. -[Unknown] Steve Teale wrote:void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?
Mar 22 2009
On Sun, 22 Mar 2009 18:43:58 -0400, Unknown W. Brackets <unknown simplemachines.org> wrote:The new construct allocates memory. You can "new" anything that requires a set amount of memory. This is equivalent to what you want: auto s = new char[0];Also can be: char[] s; Which creates a new array of 0 length also. -Steve
Mar 23 2009
Yes, well, the question was about new not about arrays... -[Unknown] Steven Schveighoffer wrote:On Sun, 22 Mar 2009 18:43:58 -0400, Unknown W. Brackets <unknown simplemachines.org> wrote:The new construct allocates memory. You can "new" anything that requires a set amount of memory. This is equivalent to what you want: auto s = new char[0];Also can be: char[] s; Which creates a new array of 0 length also. -Steve
Mar 24 2009
On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote:void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?I believe that the message is wrong, or at least misleading. The 'dynamic' here does not mean variable-length arrays but not 'static' - as in ... address is not known at compile time. The 'new' is supposed to create something on the heap and return a pointer/reference to it. Thus structs, fix-length arrays, and class objects are obvious candidates for that. Variable-length arrays are always created on the heap anyway, so to ask for a 'new char[]' is asking for the 8-byte pseudo-struct for the array to be created on the heap (which would not be initialized to anything) and return a pointer to it. This would give you one more level of indirection that you're probably not expecting. The normal way to create an empty (new, as in never been used yet) char[] is simply ... void str() { char[] s; } But you knew (no pun intended) that already. What you were actually asking for is more like ... struct dynary { size_t len; void *data; } void str() { auto s = cast(char[]*)(new dynary); } void main() { str(); } -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Mar 22 2009
On Mon, 23 Mar 2009 03:28:09 +0300, Derek Parnell <derek psych.ward> wrote:On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote:I wouldn't recommend using that to anyone. That's a *dirty* hack!void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?I believe that the message is wrong, or at least misleading. The 'dynamic' here does not mean variable-length arrays but not 'static' - as in ... address is not known at compile time. The 'new' is supposed to create something on the heap and return a pointer/reference to it. Thus structs, fix-length arrays, and class objects are obvious candidates for that. Variable-length arrays are always created on the heap anyway, so to ask for a 'new char[]' is asking for the 8-byte pseudo-struct for the array to be created on the heap (which would not be initialized to anything) and return a pointer to it. This would give you one more level of indirection that you're probably not expecting. The normal way to create an empty (new, as in never been used yet) char[] is simply ... void str() { char[] s; } But you knew (no pun intended) that already. What you were actually asking for is more like ... struct dynary { size_t len; void *data; } void str() { auto s = cast(char[]*)(new dynary); } void main() { str(); }
Mar 22 2009
On Mon, 23 Mar 2009 03:30:22 +0300, Denis Koroskin wrote:I wouldn't recommend using that to anyone. That's a *dirty* hack!That goes without saying ;-) TO BE AVOIDED AT ALL COSTS. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Mar 22 2009
Derek Parnell wrote:On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote:I think the question is very legit. char[] is a type like any other type. What if I want to create a pointer to an array? new is a really bad construct. I'm very unhappy that D inherited it. Andrei P.S. The way you create a pointer to an array is: auto weird = (new char[][1]).ptr;void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?I believe that the message is wrong, or at least misleading. The 'dynamic' here does not mean variable-length arrays but not 'static' - as in ... address is not known at compile time. The 'new' is supposed to create something on the heap and return a pointer/reference to it. Thus structs, fix-length arrays, and class objects are obvious candidates for that. Variable-length arrays are always created on the heap anyway, so to ask for a 'new char[]' is asking for the 8-byte pseudo-struct for the array to be created on the heap (which would not be initialized to anything) and return a pointer to it. This would give you one more level of indirection that you're probably not expecting. The normal way to create an empty (new, as in never been used yet) char[] is simply ... void str() { char[] s; } But you knew (no pun intended) that already. What you were actually asking for is more like ... struct dynary { size_t len; void *data; } void str() { auto s = cast(char[]*)(new dynary); } void main() { str(); }
Mar 22 2009
Andrei Alexandrescu wrote:new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
Don wrote:Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function. Andreinew is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
Andrei Alexandrescu wrote:Don wrote:Have I missed a discussion on what to have instead of new?Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function.new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
Georg Wrede wrote:Andrei Alexandrescu wrote:Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame. AndreiDon wrote:Have I missed a discussion on what to have instead of new?Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function.new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleGeorg Wrede wrote:So it's back to malloc when we want to dynamically allocate a struct, or does calling the ctor this way always perform dynamic allocation?Andrei Alexandrescu wrote:Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Don wrote:Have I missed a discussion on what to have instead of new?Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function.new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
Sean Kelly wrote:== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleTo dynamically allocate a struct, the stdlib should provide a function e.g. create!T or allocate!T. struct S { int x; } auto s = S(42); // stack auto ps = allocate!S(42); AndreiGeorg Wrede wrote:So it's back to malloc when we want to dynamically allocate a struct, or does calling the ctor this way always perform dynamic allocation?Andrei Alexandrescu wrote:Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Don wrote:Have I missed a discussion on what to have instead of new?Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function.new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
Sean Kelly wrote:== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleauto a = MyStruct*(); ?Georg Wrede wrote:So it's back to malloc when we want to dynamically allocate a struct, or does calling the ctor this way always perform dynamic allocation?Andrei Alexandrescu wrote:Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Don wrote:Have I missed a discussion on what to have instead of new?Andrei Alexandrescu wrote:I just did in the PS :o). New is not uniform: you can't use it easily to allocate a pointer to a dynamic array, or even a fixed-size array. Why? Because new is syntactically ill-conceived. It also allocates two keywords for no good reason. new should disappear and delete should be an unsafe function.new is a really bad construct. I'm very unhappy that D inherited it.Care to elaborate?
Mar 23 2009
On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 23 2009
Jarrett Billingsley wrote:On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T). AndreiNothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 23 2009
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 23 2009
Sean Kelly wrote:== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleYah, that (together with explicit destruction) should be in the language anyway to support custom allocation and such. AndreiJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 23 2009
Andrei Alexandrescu Wrote:Sean Kelly wrote:A bag of worms it would appear!== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleYah, that (together with explicit destruction) should be in the language anyway to support custom allocation and such. AndreiJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 24 2009
Steve Teale wrote:Andrei Alexandrescu Wrote:Well yah but you can use them to catch big fish. AndreiSean Kelly wrote:A bag of worms it would appear!== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleYah, that (together with explicit destruction) should be in the language anyway to support custom allocation and such. AndreiJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 24 2009
Andrei Alexandrescu Wrote:Steve Teale wrote:Do custom-allocated objects live on the GC-ed heap? Cheers, CristiAndrei Alexandrescu Wrote:Well yah but you can use them to catch big fish. AndreiSean Kelly wrote:A bag of worms it would appear!== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleYah, that (together with explicit destruction) should be in the language anyway to support custom allocation and such. AndreiJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 24 2009
Cristian Vlasceanu wrote:Andrei Alexandrescu Wrote:Not necessarily, e.g. you can malloc some memory and then create an object there. AndreiSteve Teale wrote:Do custom-allocated objects live on the GC-ed heap?Andrei Alexandrescu Wrote:Well yah but you can use them to catch big fish. AndreiSean Kelly wrote:A bag of worms it would appear!== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articleYah, that (together with explicit destruction) should be in the language anyway to support custom allocation and such. AndreiJarrett Billingsley wrote:Hm... so I guess we'd need support for placement construction?On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Allocating a struct on heap should invoke a function a la create!(T).Nothing. auto a = T(args); should create a T, whether T is a class, array, struct, what have you. This "new" business is lame, lame, lame.Struct on stack vs. heap?
Mar 24 2009
I was afraid that may be the case, and it is perhaps not a good idea. Early Managed C++ users found it difficult to deal with pointers to both managed and un-managed objects without being able to tell (just by a quick glance at the code) which is which -- the language subsequently changed, now ^ means managed pointer,and * means unmanaged. Managed C++ is a mess IMHO, because it tries to counsel into a happy marriage the GC paradigm with the old control-over-each-and-every-bit school (you can still get projects done in managed C++, but not before you bump into all the legacy boxes in the garage). I find custom allocators being less useful than they used to -- the GC-managed heap plus a "tls" storage class should be sufficient for most needs. D 2.0 should abandon the hope of being THE ULTIMATE language and content itself with being a good-enough, better than others, language. Otherwise it will either succumb into the schizophrenic fate of managed C++, or it will perpetually be a moving target, alienating its users. This is why D .net does not support any of this custom allocator nonsense. My two Global-Currency / 100 CristiDo custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
Cristian Vlasceanu wrote:It's funny, but I was recently doing some game prototyping and needed a very fast, garbage-free way of allocating lots of small, short-lived objects. I thought "Ha! I have a block allocator mixin for just this purpose!" So now I have to create an array of pre-allocated objects, and have a protocol for assigning and returning them. Plus, I have to have a unique pool for each subclass since I can't use casts to override the type system. Urgh. -- DanielI was afraid that may be the case, and it is perhaps not a good idea. ... This is why D .net does not support any of this custom allocator nonsense. My two Global-Currency / 100 CristiDo custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
Daniel Keep:I thought "Ha! I have a block allocator mixin for just this purpose!"Some of similar stuff may be fit to be added to Phobos too :-) (Because the std lib is supposed to partially help use the powers of a language). Bye, bearophile
Mar 25 2009
bearophile wrote:Daniel Keep:Well, the only ones I ever found a use for were block and free list allocators. Although I suppose any of the following would be "nice to have"s: * Block allocator: pre-allocate space for N instances of a class (optionally with a specified amount of extra space for subclasses). Optional growing of the heap. * Free list allocator: allocate on heap, but save collected instances for re-use. * Malloc allocator: wrap malloc/free. This is REALLY dangerous until we get the ability to tell whether a class was deterministically destroyed (via delete or scoped destruction) or non-deterministically (GC'ed). Oh how I've wanted this over the years... * Function allocation: new takes a pair of functions: a custom malloc/free pair. * Placement: new takes a pointer and optionally a free function. I can't think of any other general allocators aside from those. -- DanielI thought "Ha! I have a block allocator mixin for just this purpose!"Some of similar stuff may be fit to be added to Phobos too :-) (Because the std lib is supposed to partially help use the powers of a language). Bye, bearophile
Mar 25 2009
Cristian Vlasceanu wrote:Given those studies which show that dlmalloc out-performs all custom allocators except in some limited cases, aren't we better just limiting custom allocators to those special cases?I was afraid that may be the case, and it is perhaps not a good idea. Early Managed C++ users found it difficult to deal with pointers to both managed and un-managed objects without being able to tell (just by a quick glance at the code) which is which -- the language subsequently changed, now ^ means managed pointer,and * means unmanaged. Managed C++ is a mess IMHO, because it tries to counsel into a happy marriage the GC paradigm with the old control-over-each-and-every-bit school (you can still get projects done in managed C++, but not before you bump into all the legacy boxes in the garage). I find custom allocators being less useful than they used to -- the GC-managed heap plus a "tls" storage class should be sufficient for most needs. D 2.0 should abandon the hope of being THE ULTIMATE language and content itself with being a good-enough, better than others, language. Otherwise it will either succumb into the schizophrenic fate of managed C++, or it will perpetually be a moving target, alienating its users. This is why D .net does not support any of this custom allocator nonsense. My two Global-Currency / 100 CristiDo custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
On Wed, 25 M9ar 2009 11:55:14 +0300, Cristian Vlasceanu <cristian zerobugs.org> wrote:Having a custom memory pool is usually a good idea. At work, our game engine is split into a few separate sub-systems (particle system, physics, animations etc). Since most of them are completely independent (we keep track on their dependencies and trying to cut them as much as possible), it makes sense to have custom memory pools for each of them. More over, if object references don't escape that pool we could have a custom per-pool garbage collector! For example, I am responsible for a sound system in our company. In the system I designed, all the allocations made inside sound system are done through a custom memory pool (so that our sound designer don't go mad and uses all of the memory available for SFXs :)). Although it can't be statically proven (in C++), none of the object references escape that pool ever. That's because all the communication is done via a value type called SoundSource, which is struct wrapper around an "int id;". This ensures that all the object references are kept internal to that pool and thus an independent garbage collector is possible for this pool.I was afraid that may be the case, and it is perhaps not a good idea. Early Managed C++ users found it difficult to deal with pointers to both managed and un-managed objects without being able to tell (just by a quick glance at the code) which is which -- the language subsequently changed, now ^ means managed pointer,and * means unmanaged. Managed C++ is a mess IMHO, because it tries to counsel into a happy marriage the GC paradigm with the old control-over-each-and-every-bit school (you can still get projects done in managed C++, but not before you bump into all the legacy boxes in the garage). I find custom allocators being less useful than they used to -- the GC-managed heap plus a "tls" storage class should be sufficient for most needs. D 2.0 should abandon the hope of being THE ULTIMATE language and content itself with being a good-enough, better than others, language. Otherwise it will either succumb into the schizophrenic fate of managed C++, or it will perpetually be a moving target, alienating its users. This is why D .net does not support any of this custom allocator nonsense. My two Global-Currency / 100 CristiDo custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
Denis Koroskin wrote:Having a custom memory pool is usually a good idea. At work, our game engine is split into a few separate sub-systems (particle system, physics, animations etc). Since most of them are completely independent (we keep track on their dependencies and trying to cut them as much as possible), it makes sense to have custom memory pools for each of them.Have you looked into HOARD? It uses per-process pools, but it's roughly the same concept. Still, for games I can see it being useful to ration the memory a subsystem has available via a fixed-size pool.More over, if object references don't escape that pool we could have a custom per-pool garbage collector!We should be able to have the same for D, though a general solution would be reliant on the type system to determine which pool to allocate from.
Mar 25 2009
Cristian Vlasceanu wrote:I think this is unavoidable if D wants to be a "real" systems language, because shared memory use is pretty common in such apps. D has this now with custom new/delete methods, but if these are eliminated then there would have to be some kind of substitute. They certainly wouldn't be commonly used, but this has to at least be possible.I was afraid that may be the case, and it is perhaps not a good idea.Do custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform). Here go another two pessos. "Sean Kelly" <sean invisibleduck.org> wrote in message news:gqdfse$1l38$1 digitalmars.com...Cristian Vlasceanu wrote:I think this is unavoidable if D wants to be a "real" systems language, because shared memory use is pretty common in such apps. D has this now with custom new/delete methods, but if these are eliminated then there would have to be some kind of substitute. They certainly wouldn't be commonly used, but this has to at least be possible.I was afraid that may be the case, and it is perhaps not a good idea.Do custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 25 2009
D is better as a language, imho. You never know when Apple will scrap Mac OS X and do a new operating system. Who knows, maybe iPhone OS 5.0 will be written in D? It's extremely improbable, but it's not impossible. Allocators have many uses. When integrating (as with a plugin) into other software, you may want/need to use their allocator - e.g. writing a Firefox NSPlugin. Certainly not something I want to lock myself out of using D for. Embedded devices are definitely an interesting realm as well, and it's definitely preferable to have one language and one compiler to have to deal with in such situations. Assembly is a definite option, but custom allocators are a cleaner way to do the same thing - otherwise I'd just be using mov, div, inc, stosb, and the like, no? -[Unknown] Cristian Vlasceanu wrote:Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform). Here go another two pessos. "Sean Kelly" <sean invisibleduck.org> wrote in message news:gqdfse$1l38$1 digitalmars.com...Cristian Vlasceanu wrote:I think this is unavoidable if D wants to be a "real" systems language, because shared memory use is pretty common in such apps. D has this now with custom new/delete methods, but if these are eliminated then there would have to be some kind of substitute. They certainly wouldn't be commonly used, but this has to at least be possible.I was afraid that may be the case, and it is perhaps not a good idea.Do custom-allocated objects live on the GC-ed heap?Not necessarily, e.g. you can malloc some memory and then create an object there.
Mar 26 2009
Cristian Vlasceanu wrote:Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts!However much I'd like to disagree, I can't.Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).On larger systems (PC size and up), the window for a new operating system has closed. Windows has a majority of the market (and to top it all, System-7 is the first decent version in years!), and Linux/Unix take care of the rest. One would have to invent a truly compelling story to justify even thinking of creating a new system. I can't imagine developing for an embedded platform in D. First, D doesn't work in 16 bit systems. (Yes, it can be said that in time all systems will be 32 bit, but that will take years. New 16 bit processors are developed as we speak, and, many embedded systems simply don't need 32 bits.) Even on a 32 bit system, one would like to have complete control, and that does mean programming without GC. To do Systems Work on an embedded system, I'd like to see a D subset, without GC, and which would essentially be like C with classes. I've even toyed with the idea of having a D1toC translator for the job. But, I agree, D makes an excellent Application language. Imagine OpenOffice was written in D!!! I'd say those guys would already be a lot further had they ported it to D a few years ago. (Of course, only now D1 is stable enough to even consider it, but you know what I mean.) D does combine the upsides of several other languages, and makes it truly a joy to use. (As far as the language itself is concerned, ignoring other things here, like libraries, and such, of course.) Programming in a language that lets you focus on the task instead of the language, simply makes the applications less buggy, and of higher quality. This is almost too obvious to say. And you have more time for features, too. If we'd collectively recognize that D is an App language, then maybe this would sharpen our understanding of what we need to do.
Mar 26 2009
Georg Wrede wrote:To do Systems Work on an embedded system, I'd like to see a D subset, without GC, and which would essentially be like C with classes. I've even toyed with the idea of having a D1toC translator for the job.With D2 you can drop in a different allocator to be used by the runtime -- there's an example implementation that simply calls malloc/free, for example. You'll leak memory if you perform string concatenation or use the AA, but otherwise everything works fine.
Mar 26 2009
Sean Kelly wrote:Georg Wrede wrote:You forgot the array literals (which almost look like harmless, non-allocating array initializers), and the full closure delegates, where the compiler will randomly choose to allocate or not to allocate memory ("randomly" from the programmer's point of view). And of course most library functions.To do Systems Work on an embedded system, I'd like to see a D subset, without GC, and which would essentially be like C with classes. I've even toyed with the idea of having a D1toC translator for the job.With D2 you can drop in a different allocator to be used by the runtime -- there's an example implementation that simply calls malloc/free, for example. You'll leak memory if you perform string concatenation or use the AA, but otherwise everything works fine.
Mar 26 2009
On Thu, 26 Mar 2009 18:20:02 +0300, grauzone <none example.net> wrote:Sean Kelly wrote:Tango is designed in a way to avoid any hidden allocations.Georg Wrede wrote:You forgot the array literals (which almost look like harmless, non-allocating array initializers), and the full closure delegates, where the compiler will randomly choose to allocate or not to allocate memory ("randomly" from the programmer's point of view). And of course most library functions.To do Systems Work on an embedded system, I'd like to see a D subset, without GC, and which would essentially be like C with classes. I've even toyed with the idea of having a D1toC translator for the job.With D2 you can drop in a different allocator to be used by the runtime -- there's an example implementation that simply calls malloc/free, for example. You'll leak memory if you perform string concatenation or use the AA, but otherwise everything works fine.
Mar 26 2009
grauzone wrote:Sean Kelly wrote:The array literals should really be fixed :-p But you're right--I forgot about closures. Library functions... that's at least something easily addressable by the user. In all fairness, I agree that it isn't terribly practical to forego a GC in D, but it is possible for a sufficiently motivated user.Georg Wrede wrote:You forgot the array literals (which almost look like harmless, non-allocating array initializers), and the full closure delegates, where the compiler will randomly choose to allocate or not to allocate memory ("randomly" from the programmer's point of view). And of course most library functions.To do Systems Work on an embedded system, I'd like to see a D subset, without GC, and which would essentially be like C with classes. I've even toyed with the idea of having a D1toC translator for the job.With D2 you can drop in a different allocator to be used by the runtime -- there's an example implementation that simply calls malloc/free, for example. You'll leak memory if you perform string concatenation or use the AA, but otherwise everything works fine.
Mar 26 2009
Cristian Vlasceanu wrote:Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts!Then I may as well just walk away from D now because this is the only reason I'm using it.Because 1) GC magic and deterministic system level behavior are not exactly good friendsmalloc is non-deterministic as well, but C/C++ have that. And in instances where determinism is necessary, why not simply avoid dynamic allocation? Sure, things get a bit weird when language features have to be avoided (string concatenation, etc), but at least these are easy to grep for, thanks to Walter providing distinct syntax for this stuff.and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter).C/C++ have historically been the only feasible languages for much of the work I do. It's possible that I could write the higher layers of some apps in a language like Erlang (I did used to work for a Telco, after all), but C/C++ would still have been necessary for the underpinnings. The thing is, after having spent a decent amount of time with C/C++ I began to have problems with certain design issues in those languages. Sure, they /can/ do what I need, and they're certainly prevalent which is a huge perk, but the cost of maintenance with both languages is unreasonably high, certain types of bugs are difficult to avoid, etc. So far I've found D to answer many of my issues with C/C++ very well without sacrificing the features I need from these languages: direct system access, unsafe memory manipulation, inline assembler, etc. I'm still using C/C++ at work today, but I would love for D to become sufficiently mature that I could argue for its use instead.It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).There are a lot of application languages out there, most of which have terrific toolset support--something D lacks tremendously. Why would I multiprogramming support may be an answer to this question, but that's not a selling point /today/.Here go another two pessos.And another two as well. :-)
Mar 26 2009
"Cristian Vlasceanu" <cristian zerobugs.org> wrote in message news:gqf7r3$20of$1 digitalmars.com...Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE.Ok, that argument is just plain silly. Of course we have a systems problem to solve: Many of us have plenty of reason to write system software (embedded, gaming devices, VM's, drivers, hell, even kernel modules), but we're absolutely fed up with C/C++. Granted, D definitely still needs some improvements in the systems-programming area, but never in a million years will any of those other languages even remotely approach the level of feasibility for systems programming that D already has right now. So what are us systems-programmers supposed to do, just stick with that antiquated POS C/C++ for the rest of existence? Or come up with something better (D) that we can eventually migrate to? Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good. (And don't knock my farts 'till you've tried them! ;) )
Mar 26 2009
On Thu, Mar 26, 2009 at 1:33 PM, Nick Sabalausky <a a.a> wrote:Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good.*cough*www.xomb.org*cough*
Mar 26 2009
Jarrett Billingsley wrote:On Thu, Mar 26, 2009 at 1:33 PM, Nick Sabalausky <a a.a> wrote:Your point? Yes, we know that D can be used to write hobby kernels.Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good.*cough*www.xomb.org*cough*
Mar 26 2009
On Thu, Mar 26, 2009 at 2:49 PM, grauzone <none example.net> wrote:Jarrett Billingsley wrote:No need to be hostile about it. I was just letting Nick know.On Thu, Mar 26, 2009 at 1:33 PM, Nick Sabalausky <a a.a> wrote:Your point? Yes, we know that D can be used to write hobby kernels.Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good.*cough*www.xomb.org*cough*
Mar 26 2009
Jarrett Billingsley wrote:On Thu, Mar 26, 2009 at 2:49 PM, grauzone <none example.net> wrote:It will never "shake up the current OS market", though. Also, I think the programming language is not really relevant for how good an OS is. Linux is doing fine with C. This too should probably go rather towards Nick.Jarrett Billingsley wrote:No need to be hostile about it. I was just letting Nick know.On Thu, Mar 26, 2009 at 1:33 PM, Nick Sabalausky <a a.a> wrote:Your point? Yes, we know that D can be used to write hobby kernels.Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good.*cough*www.xomb.org*cough*
Mar 26 2009
"grauzone" <none example.net> wrote in message news:gqh4su$2cbo$1 digitalmars.com...Jarrett Billingsley wrote:Choice of language can certainly make a big difference in a product, OS or otherwise. For instance, (purely hypothetical example that conveniently ignores timeframe and overhead involved in porting to a different language) reliable, released sooner (probably would have been "Win97" as originally intended), and required more memory and processing power to run. If OSX had been written in pure asm, it would have been leaner, faster, buggier, released later, and probably wouldn't have been ported to x86. If early versions of the PalmOS kernel were written Python, the old PalmPilots probably would have been painfuly slow. Doesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D. Also, I should emphasize that I never said D would or wouldn't "shake up the OS market", just that the potential was there, whether it be *if* a new OS was built ground-up in D or *if* an existing one was ported. My main point was just that D could certainly improve the overall development process of whatever OS used it, allowing things to advance faster, be more reliable, etc., and thus potentially give it a real leg up. If all the carpenters are building houses with wooden hammers, and Joe Shmoe comes along with his metal hammer, well, he may succeed or he may fail, but he would certainly have that extra advantage, and thus have at least the potential to "shake things up".On Thu, Mar 26, 2009 at 2:49 PM, grauzone <none example.net> wrote:It will never "shake up the current OS market", though. Also, I think the programming language is not really relevant for how good an OS is. Linux is doing fine with C. This too should probably go rather towards Nick.Jarrett Billingsley wrote:No need to be hostile about it. I was just letting Nick know.On Thu, Mar 26, 2009 at 1:33 PM, Nick Sabalausky <a a.a> wrote:Your point? Yes, we know that D can be used to write hobby kernels.Besides, I'd think an OS written in D would certainly have the potential to really shake up the current OS market. Not because people would say "Oh, wow, it's written in D", of course, but because the developers would have a far easier time making it, well, good.*cough*www.xomb.org*cough*
Mar 26 2009
Doesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.I'm not saying that the programming language is not relevant at all. Rather, other issues outweigh the choice of the programming language by far. Just take driver support as an example. That's actually what is discouraging most people from using Linux over Window. You can't do anything with an OS that makes parts of your hardware as useful as a brick. I'd only say that there are some "key" features of a language, that actually matter for something like a kernel. For example, as you said, a kernel written in assembler is very hard to port to another architecture. And you wouldn't write a kernel in Visual Basic (although But D is as good as C/C++ in this regard. when it comes to real life issues, D is probably even a bit worse, because of tool-chain issues. Would your D-OS ever run on, say, PowerPC?Also, I should emphasize that I never said D would or wouldn't "shake up the OS market", just that the potential was there, whether it be *if* a new OS was built ground-up in D or *if* an existing one was ported. My main point was just that D could certainly improve the overall development process of whatever OS used it, allowing things to advance faster, be more reliable, etc., and thus potentially give it a real leg up.Maybe. Note that the Linux developers refused to use C++, although the C++ advocates came up with similar arguments. Sure, the languages provide some nice features, which make life easier. But again, what would D help when writing device drivers? Or when figuring out a good locking hierarchy? It doesn't matter that much, you have to deal with much larger problems.If all the carpenters are building houses with wooden hammers, and Joe Shmoe comes along with his metal hammer, well, he may succeed or he may fail, but he would certainly have that extra advantage, and thus have at least the potential to "shake things up".That's a bad comparison, because it's very simple to switch a hammer. Also, the metal hammer would be nicer to use than the wooden one, but it'd split in two parts if you strained it too much. Even if you're careful. Some would build complicated, abstract works of art, using a new method called "nail mixin". They'd need at least a dozen hammers until the artwork is finished. The result would blow up in an explosion from time to time for unknown reasons.
Mar 26 2009
Nick Sabalausky wrote:Doesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals. I've done enough code in enough languages to know that all though you can (with enough effort) make anything work in any language, there is a vast difference in the effort involved. D cuts down on that effort, substantially, when compared to other languages. As for what is a systems programming language, I regard a SPL as one that gives convenient direct access to the hardware.
Mar 27 2009
Walter Bright wrote:Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiDoesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 27 2009
Andrei Alexandrescu wrote:Walter Bright wrote:You mean the battle of Helm's Deep? I think you'd need more than one machine gun. If the wall had held and the orcs had been forced to come up the front ramp, then it might have been enough... but the bomb Saruman gave them took out the wall meaning that you'd have two streams of Orcs coming at you. I reckon a machine gun covering the main entrance and perhaps some razorwire and flamethrowers inside the wall from the breech. That'll learn 'em. -- Daniel... It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). Andrei
Mar 27 2009
Hello Daniel,Andrei Alexandrescu wrote:My current martial speculation involves David Weber's Honor Harrington series. Frankly either Weber is a paragon of literary restraint or he sucks as a military planner. I can't read his stuff for more than a few hours without spotting stuff that the characters should be doing. That said; the man Can Tell A Good Story!Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiYou mean the battle of Helm's Deep? I think you'd need more than one machine gun. If the wall had held and the orcs had been forced to come up the front ramp, then it might have been enough... but the bomb Saruman gave them took out the wall meaning that you'd have two streams of Orcs coming at you. I reckon a machine gun covering the main entrance and perhaps some razorwire and flamethrowers inside the wall from the breech. That'll learn 'em. -- Daniel
Mar 27 2009
Daniel Keep wrote:Andrei Alexandrescu wrote:What bomb? There was no bomb at Helm's Deep. The orcs assaulted the main gate and the walls, and eventually they crawled in through a drainage pipe as well. It's strongly implied that they had to go underwater for a significant way, which is why that route was not at all defended or watched. Once that entrance was discovered, the defending forces blocked it off with boulders. This blocked off the orcs, but it also dammed the flow, so after that they were fighting in a pond. I seem to recall a bomb in the movie, but that was pointless frippery.Walter Bright wrote:You mean the battle of Helm's Deep? I think you'd need more than one machine gun. If the wall had held and the orcs had been forced to come up the front ramp, then it might have been enough... but the bomb Saruman gave them took out the wall meaning that you'd have two streams of Orcs coming at you.... It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). Andrei
Mar 28 2009
Christopher Wright wrote:Daniel Keep wrote:Well I'm not sure we're talking about the same battle. The one I talk about takes place during the night; at the end, as the sun rises, Gandalf rides down the ravine with reinforcements and saves the situation. The bomb created a large breach in the wall and was a turning point in the battle. Without it, I don't think the assailants could have made much progress. AndreiAndrei Alexandrescu wrote:What bomb? There was no bomb at Helm's Deep. The orcs assaulted the main gate and the walls, and eventually they crawled in through a drainage pipe as well. It's strongly implied that they had to go underwater for a significant way, which is why that route was not at all defended or watched. Once that entrance was discovered, the defending forces blocked it off with boulders. This blocked off the orcs, but it also dammed the flow, so after that they were fighting in a pond. I seem to recall a bomb in the movie, but that was pointless frippery.Walter Bright wrote:You mean the battle of Helm's Deep? I think you'd need more than one machine gun. If the wall had held and the orcs had been forced to come up the front ramp, then it might have been enough... but the bomb Saruman gave them took out the wall meaning that you'd have two streams of Orcs coming at you.... It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). Andrei
Mar 28 2009
Andrei Alexandrescu wrote:Christopher Wright wrote:Same battle.What bomb? There was no bomb at Helm's Deep. I seem to recall a bomb in the movie, but that was pointless frippery.Well I'm not sure we're talking about the same battle. The one I talk about takes place during the night; at the end, as the sun rises, Gandalf rides down the ravine with reinforcements and saves the situation.The bomb created a large breach in the wall and was a turning point in the battle. Without it, I don't think the assailants could have made much progress.In the book, the defenders were doing extremely well, but no matter how well they did, the end result was guaranteed. The orcs going through a culvert is a mark of their ingenuity and ardor. Replacing it with a crude bomb was a disservice to the orcs -- and by extension, to their enemies.
Mar 28 2009
Daniel Keep wrote:Andrei Alexandrescu wrote:The thing is, there is this narrow ravine leading to the castle. A well-aimed machine gun would have wreaked havoc at the assailants before any of them would have reached the wall. Indeed, I think none of them would have actually gotten to the wall, including the bomb itself.Walter Bright wrote:You mean the battle of Helm's Deep? I think you'd need more than one machine gun. If the wall had held and the orcs had been forced to come up the front ramp, then it might have been enough... but the bomb Saruman gave them took out the wall meaning that you'd have two streams of Orcs coming at you.... It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiI reckon a machine gun covering the main entrance and perhaps some razorwire and flamethrowers inside the wall from the breech. That'll learn 'em.Oh, yah - I thought barbwire would have been an incredibly effective passive defense. After assailant troops advance through the ravine and go over multiple layers of barbwire, machine gun starts mowing them down. Under fire, the barbwire makes it virtually impossible to either advance or retreat. This exact scenario happened in WWI, e.g. Somme. The Germans were very organized logistically and had planted plenty of barbwire. When the British did the human wave shtick, all Germans had to do was to let them advance a little before opening fire. 57000+ casualties in one day alone... Andrei
Mar 28 2009
Andrei Alexandrescu wrote:Oh, yah - I thought barbwire would have been an incredibly effective passive defense. After assailant troops advance through the ravine and go over multiple layers of barbwire, machine gun starts mowing them down. Under fire, the barbwire makes it virtually impossible to either advance or retreat.Things can get pretty weird in fantasy settings though. Trolls could roll through barbed wire like it wasn't even there, even though they're technically infantry units.
Mar 28 2009
Andrei Alexandrescu Wrote:Walter Bright wrote:I see that my most popular thread has now evolved into something completely different. I should think that 20 men with decent automatic rifles would have been enough for Agincourt. That way more gentlemen could have laid abed in England and not felt so guilty.Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiDoesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 27 2009
Steve Teale wrote:I should think that 20 men with decent automatic rifles would have been enough for Agincourt. That way more gentlemen could have laid abed in England and not felt so guilty.Another battle won by superior technology (longbows).
Mar 27 2009
Walter Bright wrote:Steve Teale wrote:Well that was more like simple-minded tactics on the part of the assailant. Longbowmen can and have been beaten by cavalry; just a little tactics is needed. What the French essentially tried was "let's just run through as fast as we can". :o) AndreiI should think that 20 men with decent automatic rifles would have been enough for Agincourt. That way more gentlemen could have laid abed in England and not felt so guilty.Another battle won by superior technology (longbows).
Mar 28 2009
Andrei Alexandrescu Wrote:Walter Bright wrote:To answer you and Walter at the same time, A) longbows were pretty primitive compared to the bows in Asia, so not superior technology, but used by a crew who were professional and quite bold. B) Tactics require an examination of the ground, which the French clearly didn't do, since they advanced into a funnel and got themselves into a traffic jam where they were easy meat for the arrows. I love military history. All the mistakes we can make now, programming and otherwise, have been made before somewhere on a field of battle.Steve Teale wrote:Well that was more like simple-minded tactics on the part of the assailant. Longbowmen can and have been beaten by cavalry; just a little tactics is needed. What the French essentially tried was "let's just run through as fast as we can". :o) AndreiI should think that 20 men with decent automatic rifles would have been enough for Agincourt. That way more gentlemen could have laid abed in England and not felt so guilty.Another battle won by superior technology (longbows).
Mar 28 2009
Andrei Alexandrescu wrote:Walter Bright wrote:You don't have to look far back to see many examples of superior technology burying a far more powerful foe. For example, there are several cases where a handful of stringbag airplanes sank capital battleships. Stirling's "Island in the Sea of Time" is about bringing modern weapons to bronze-age battlefields.Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiDoesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 27 2009
Hello Walter,You don't have to look far back to see many examples of superior technology burying a far more powerful foe. For example, there are several cases where a handful of stringbag airplanes sank capital battleships. Stirling's "Island in the Sea of Time" is about bringing modern weapons to bronze-age battlefields.I havn't readit but Harry Turtledove's book also runs that idea around: http://en.wikipedia.org/wiki/The_Guns_of_the_South
Mar 27 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Curiously though, the Persian composite longbow was deadlier than the rifles used in the Napoleonic wars, so you really have to go up to WWI before you have a clearly superior technology in terms of raw power. The fundamental disadvantage being that it was so difficult to become a proficient longbowman, whereas you can train someone to be dangerous with a rifle in a few weeks. (Kind of like asm vs VB, I reckon).Walter Bright wrote:You don't have to look far back to see many examples of superior technology burying a far more powerful foe. For example, there are several cases where a handful of stringbag airplanes sank capital battleships. Stirling's "Island in the Sea of Time" is about bringing modern weapons to bronze-age battlefields.Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiDoesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 27 2009
Don wrote:Curiously though, the Persian composite longbow was deadlier than the rifles used in the Napoleonic wars, so you really have to go up to WWI before you have a clearly superior technology in terms of raw power. The fundamental disadvantage being that it was so difficult to become a proficient longbowman, whereas you can train someone to be dangerous with a rifle in a few weeks.During the Civil War, Henry repeating rifles appeared. With breech loading rounds and a high rate of fire, it would be hard to believe that any longbow would be superior. Bullet wounds in the Civil War were also severe as they were high impact. An arrow just penetrates, but a big slug is devastating.
Mar 28 2009
Walter Bright Wrote:Don wrote:The Civil War -- military technology was advanced enough to cause devastating wounds, and medical technology was just far enough along to keep you alive until you died of sepsis.Curiously though, the Persian composite longbow was deadlier than the rifles used in the Napoleonic wars, so you really have to go up to WWI before you have a clearly superior technology in terms of raw power. The fundamental disadvantage being that it was so difficult to become a proficient longbowman, whereas you can train someone to be dangerous with a rifle in a few weeks.During the Civil War, Henry repeating rifles appeared. With breech loading rounds and a high rate of fire, it would be hard to believe that any longbow would be superior. Bullet wounds in the Civil War were also severe as they were high impact. An arrow just penetrates, but a big slug is devastating.
Mar 28 2009
Walter Bright Wrote:Don wrote:Walter, I think you understate the arrow. Often they had barbs, and they were not as well sterilized as a bullet that had been propelled by hot gas, so getting them out and surviving was non-trivial. Also the main killer outside artillery was the Minie ball, which was pretty basic technology.Curiously though, the Persian composite longbow was deadlier than the rifles used in the Napoleonic wars, so you really have to go up to WWI before you have a clearly superior technology in terms of raw power. The fundamental disadvantage being that it was so difficult to become a proficient longbowman, whereas you can train someone to be dangerous with a rifle in a few weeks.During the Civil War, Henry repeating rifles appeared. With breech loading rounds and a high rate of fire, it would be hard to believe that any longbow would be superior. Bullet wounds in the Civil War were also severe as they were high impact. An arrow just penetrates, but a big slug is devastating.
Mar 28 2009
Steve Teale wrote:Walter, I think you understate the arrow. Often they had barbs, and they were not as well sterilized as a bullet that had been propelled by hot gas, so getting them out and surviving was non-trivial.Perhaps I do. I am no expert on either guns or archery, not even close. But I can point out that in practically every case, expert archers were eager to replace them with guns, any guns, even primitive muzzle-loaders. In battles of guns vs archers, the guns nearly always won even when heavily outnumbered.
Mar 28 2009
Walter Bright wrote:Steve Teale wrote:As I understand it, the Persian composite longbow was technologically superior to later bows, eg, the English longbow. (I was told that by a professor who was an expert on ancient technology, but it could nevertheless be incorrect). It was cited as one of those examples (like the Roman's use of concrete) which was a technology which was lost and wasn't matched again until relatively modern times. With the Persian longbow, experts were quick enough to fire 6 arrows before the first hit the ground. I don't think firearms reached a similar firing rate for a long time (for what that's worth -- I'd think I'd rather be hit by several arrows than by one cannonball <g>).Walter, I think you understate the arrow. Often they had barbs, and they were not as well sterilized as a bullet that had been propelled by hot gas, so getting them out and surviving was non-trivial.Perhaps I do. I am no expert on either guns or archery, not even close. But I can point out that in practically every case, expert archers were eager to replace them with guns, any guns, even primitive muzzle-loaders. In battles of guns vs archers, the guns nearly always won even when heavily outnumbered.
Mar 28 2009
Don wrote:With the Persian longbow, experts were quick enough to fire 6 arrows before the first hit the ground. I don't think firearms reached a similar firing rate for a long time (for what that's worth -- I'd think I'd rather be hit by several arrows than by one cannonball <g>).The Winchester repeating rifle was definitely a game-changer, but that was relatively recent (~1875, I believe). Before repeaters, the only thing that guns really seemed to have going for them was penetration power and a comparative lack of skill for use compared to the longbow. I've seen demos of skilled marksmen with old repeaters that were simply astounding as far as rate of fire and accuracy are concerned.
Mar 28 2009
Sean Kelly wrote:Don wrote:Oh, I forgot to emphasize one detail: when thinking of the minimal amount of firepower, *effective* rate must be taken into account. That's why I mentioned the Vickers - it had such an effective cooling mechanism, it could essentially be fired relentlessly for a long time. And then it had interchangeable barrels that could be swapped pronto! That works great with the human wave (well, orcs wave) attack in the LoTR movie. Today's machine guns need pauses in between series so as to cool the barrel. That's not a problem if there's plenty of them machine guns AND if the enemy is not attacking openly. So paradoxically I tend to believe that a couple of Vickers would have been doing better with the Orcs than many of today's machine guns. One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them. But then M134 requires electricity... so heck, Vickers rules :o). AndreiWith the Persian longbow, experts were quick enough to fire 6 arrows before the first hit the ground. I don't think firearms reached a similar firing rate for a long time (for what that's worth -- I'd think I'd rather be hit by several arrows than by one cannonball <g>).The Winchester repeating rifle was definitely a game-changer, but that was relatively recent (~1875, I believe). Before repeaters, the only thing that guns really seemed to have going for them was penetration power and a comparative lack of skill for use compared to the longbow. I've seen demos of skilled marksmen with old repeaters that were simply astounding as far as rate of fire and accuracy are concerned.
Mar 28 2009
Hello Andrei,One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.
Mar 28 2009
BCS wrote:Hello Andrei,Yeah, you'd really want a Vulcan or something in that range. (Made by General Electric!) The Riders of Rohan would have to ride their bikes pretty hard to generate the necessary electricity. (For reference, a human can generate something like 0.125 horsepower, and similar weapons require on the order of 15hp.)One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.
Mar 28 2009
BCS wrote:Hello Andrei,Not enough penetration to do in an Orc? I haven't read the book, but the movie suggested Orcs were rather penetrable by the arrows and swords of the humans. BTW, machine guns do have some impressive penetration. I had to learn the numbers while I was in the military by forgot them. My basic recollection is that the numbers rendered pretty much all improvised cover (wood, brick, thin steel sheet) useless. In a demonstration, a skilled shooter emptied an AKM clip into a car from 25m. It looked very bad afterwards; the trick was that he knew how to sweep such that many bullets hit the car at an angle. AndreiOne that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.
Mar 28 2009
Andrei Alexandrescu wrote:BCS wrote:Orcs were mutated Elves, basically, and their skin certainly wasn't tougher than, say, Pig skin. A machine gun would make short work of an Orc. By the way, "Goblins" in The Hobbit were actually the same as Orcs in the later books. I don't know why the terms changed, but perhaps it's regional. Some of them also rode Wargs (giant intelligent wolves), which means they had some semblance of cavalry :-) I *think* that made it into the movies at some point, but it was kind of a footnote.Hello Andrei,Not enough penetration to do in an Orc? I haven't read the book, but the movie suggested Orcs were rather penetrable by the arrows and swords of the humans.One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.BTW, machine guns do have some impressive penetration. I had to learn the numbers while I was in the military by forgot them. My basic recollection is that the numbers rendered pretty much all improvised cover (wood, brick, thin steel sheet) useless. In a demonstration, a skilled shooter emptied an AKM clip into a car from 25m. It looked very bad afterwards; the trick was that he knew how to sweep such that many bullets hit the car at an angle.I've seen a couple shows on bullet penetration through material, and the results were pretty interesting. MythBusters tested the "dive under water to avoid bullets" myth and discovered that the bullets from modern, high-velocity weapons fragmented before penetrating more than a few feet into the water (partially because bullets are designed to fragment in the body, thus doing more damage), confirming that as a viable escape tactic. Older weapons like Muskets had much better penetration, both from the slower velocity and the round, solid ammunition, but still no more than perhaps seven feet. Another show was more "scientific" and tested bullet penetration through wood, stone, walls, and jugs of water. Military weapons went through the wood and such like it wasn't even there, and even did quite well against stone. The wall test was interesting because they spaced their simulated walls a few feet apart, and the bullets would only penetrate two or three walls before disappearing. What would happen is that they'd begin to tumble upon hitting the first wall, and the direction change would be so severe from hitting successive walls at different angles that they'd leave the test area completely. The warning there was that if you fire a weapon in a house the bullet could quite easily go through a wall or two downstairs, change direction and come up through the floor upstairs, potentially hitting an unexpected target. And as with MythBusters, nothing penetrated more than a few jugs of water before coming to a halt. It was far and away the best barrier they could find for high-velocity weapons.
Mar 28 2009
Sean Kelly wrote:I've seen a couple shows on bullet penetration through material, and the results were pretty interesting. MythBusters tested the "dive under water to avoid bullets" myth and discovered that the bullets from modern, high-velocity weapons fragmented before penetrating more than a few feet into the water (partially because bullets are designed to fragment in the body, thus doing more damage), confirming that as a viable escape tactic. Older weapons like Muskets had much better penetration, both from the slower velocity and the round, solid ammunition, but still no more than perhaps seven feet.Yah, they said 1m should be ok and 2m should be perfect. What they failed to mention was how the heck you'll ever get back up with 25kg worth of equipment on you :o).Another show was more "scientific" and tested bullet penetration through wood, stone, walls, and jugs of water. Military weapons went through the wood and such like it wasn't even there, and even did quite well against stone. The wall test was interesting because they spaced their simulated walls a few feet apart, and the bullets would only penetrate two or three walls before disappearing. What would happen is that they'd begin to tumble upon hitting the first wall, and the direction change would be so severe from hitting successive walls at different angles that they'd leave the test area completely. The warning there was that if you fire a weapon in a house the bullet could quite easily go through a wall or two downstairs, change direction and come up through the floor upstairs, potentially hitting an unexpected target. And as with MythBusters, nothing penetrated more than a few jugs of water before coming to a halt. It was far and away the best barrier they could find for high-velocity weapons.No surprise. The physics of bullets is still poorly understood. I haven't seen the shows you mention, but another Mythbusters busted the conspiracy theory about JFK being shot from the opposite direction than the official version. People saw the head bobbing "the wrong way". The Mythbusters folks shot a pumpkin mounted like a head and, surprise - it bobbed in the direction the bullet came from! Andrei
Mar 28 2009
Hello Andrei,BCS wrote:Oh it would penetrate the first orc just fine, but meat is a lot of water and does a dandy job of stopping bullets. I know a guy who retrieved a 30-06 round (same bullet as the 7.62 but with a slightly bigger charge behind it) from a deer after a classic side shoot so a deer is thick enough to stop a bullet and I aspect that an orc is thinker.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.Not enough penetration to do in an Orc? I haven't read the book, but the movie suggested Orcs were rather penetrable by the arrows and swords of the humans.
Mar 28 2009
On Sun, 29 Mar 2009 00:54:48 +0100, BCS <none anon.com> wrote:Hello Andrei,At least in the movie, the orcs only had front-facing armor, as they weren't expected to run away from the battlefield.One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.
Mar 29 2009
Hello Simen,On Sun, 29 Mar 2009 00:54:48 +0100, BCS <none anon.com> wrote:that actually was a problem, the orcs were all AI driven CGI and for a while they had an issue if orcs running away from where they were supposed to get slaughtered.IIRC the 7.62 NATO doesn't have that much penetration (more than the 5.56), enough to do in an Orc, but I don't think it would get the next in line, particularly if the Orc in question has armor on his back.At least in the movie, the orcs only had front-facing armor, as they weren't expected to run away from the battlefield.
Mar 29 2009
BCS wrote:that actually was a problem, the orcs were all AI driven CGI and for a while they had an issue if orcs running away from where they were supposed to get slaughtered.Skynet 1.0 has some bugs!
Mar 29 2009
Walter Bright wrote:BCS wrote:Yeah; in 2.0, they changedthat actually was a problem, the orcs were all AI driven CGI and for a while they had an issue if orcs running away from where they were supposed to get slaughtered.Skynet 1.0 has some bugs!bool runningAway = false;to this:invariant bool runningAway = false;-- Daniel
Mar 29 2009
Andrei Alexandrescu wrote:One that I do think would be more lethal is the mounted Gatling M134 (that Terminator made famous), see http://en.wikipedia.org/wiki/Minigun. That fires up to 6000 rounds/minute which is pretty crazy. I think a salvo of that would have made a trench through the Orcs, the same bullet killing or maiming several of them.MythBusters did an episode where they chopped down a mesquite tree with a minigun to verify the Predator myth. Very impressive. I also briefly wondered why the defenders didn't use anything like Pitch... other than deference to the Ents :-) But one underlying theme in LotR is that only the bad guys use advanced technology. The good guys were more clinging to the old ways.
Mar 28 2009
Walter Bright Wrote:Steve Teale wrote:Longer range of course. It's more comfortable farther away from the enemy, and if he has bows, you can start killing him before he starts killing you. But it must have been a close run thing with the earlier guns. Archers could fire quite quickly. But I think field artillery was the real change in the way battles were fought.Walter, I think you understate the arrow. Often they had barbs, and they were not as well sterilized as a bullet that had been propelled by hot gas, so getting them out and surviving was non-trivial.Perhaps I do. I am no expert on either guns or archery, not even close. But I can point out that in practically every case, expert archers were eager to replace them with guns, any guns, even primitive muzzle-loaders. In battles of guns vs archers, the guns nearly always won even when heavily outnumbered.
Mar 28 2009
On Fri, 27 Mar 2009 22:10:44 -0700, Walter Bright wrote:Stirling's "Island in the Sea of Time" is about bringing modern weapons to bronze-age battlefields.Another in a similar vein is John Birmingham's "Weapons of Choice" trilogy in which some naval vessels from our near future find themselves back in the Pacific war of 1942. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Mar 28 2009
Walter Bright wrote:You don't have to look far back to see many examples of superior technology burying a far more powerful foe. For example, there are several cases where a handful of stringbag airplanes sank capital battleships. Stirling's "Island in the Sea of Time" is about bringing modern weapons to bronze-age battlefields.Then, of course, there’s Arthur C. Clarke’s “Superiority”, that turns this trope on its head. —Joel Salomon
Mar 29 2009
Andrei Alexandrescu wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internet
Mar 28 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Writing allows you to keep solutions to problems that only come about rarely. Disseminating these is very time-consuming, though; copying a manuscript by hand takes months. But 20,000 years? I think basic sanitation comes first. It also doesn't take very long. Once you have writing, though, it becomes *much* easier to approach things scientifically, especially with a bit of arithmetic. So that might be more worthwhile, since they can arrive at sanitation eventually anyway, and sooner if they have writing. Of course, in any case, you need to get around two obstacles: the language barrier and your ignorance of whatever you're trying to teach. I know less about agriculture, probably, than any stone age farmer. I don't know anywhere near enough about ironworking or mining to be able to offer any meaningful advice. But most people know enough about writing to create a writing system for another culture, if they just sit down and consider the problem for a few hours. So in your case, I dare say the only technology that you listed that you could deliver is writing. Even a metallurgist might have significant trouble providing ironworking to a culture without the typical modern tools of that trade.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress.
Mar 28 2009
On Sat, Mar 28, 2009 at 2:22 PM, Christopher Wright <dhasenan gmail.com> wrote:Walter Bright wrote:Are we playing some newsgroup based version of Civilization now?Andrei Alexandrescu wrote:Writing allows you to keep solutions to problems that only come about rarely. Disseminating these is very time-consuming, though; copying a manuscript by hand takes months. But 20,000 years? I think basic sanitation comes first. It also doesn't take very long. Once you have writing, though, it becomes *much* easier to approach things scientifically, especially with a bit of arithmetic. So that might be more worthwhile, since they can arrive at sanitation eventually anyway, and sooner if they have writing. Of course, in any case, you need to get around two obstacles: the language barrier and your ignorance of whatever you're trying to teach. I know less about agriculture, probably, than any stone age farmer. I don't know anywhere near enough about ironworking or mining to be able to offer any meaningful advice. But most people know enough about writing to create a writing system for another culture, if they just sit down and consider the problem for a few hours. So in your case, I dare say the only technology that you listed that you could deliver is writing. Even a metallurgist might have significant trouble providing ironworking to a culture without the typical modern tools of that trade.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress.
Mar 28 2009
Christopher Wright Wrote:Walter Bright wrote:Alan Lightman wrote a short story, "A Modern Day Yankee in a Connecticut Court", describing the difficulty of bringing modern technology into the past. The protagonist couldn't convince the citizens of 19th century Hartford that his technology even existed, much less how to make it work. (The expert in the court was Thomas Edison.) He could name things -- "television", "air conditioning", "TNT", etc., but that was about it.Andrei Alexandrescu wrote:Writing allows you to keep solutions to problems that only come about rarely. Disseminating these is very time-consuming, though; copying a manuscript by hand takes months. But 20,000 years? I think basic sanitation comes first. It also doesn't take very long. Once you have writing, though, it becomes *much* easier to approach things scientifically, especially with a bit of arithmetic. So that might be more worthwhile, since they can arrive at sanitation eventually anyway, and sooner if they have writing. Of course, in any case, you need to get around two obstacles: the language barrier and your ignorance of whatever you're trying to teach. I know less about agriculture, probably, than any stone age farmer. I don't know anywhere near enough about ironworking or mining to be able to offer any meaningful advice. But most people know enough about writing to create a writing system for another culture, if they just sit down and consider the problem for a few hours. So in your case, I dare say the only technology that you listed that you could deliver is writing. Even a metallurgist might have significant trouble providing ironworking to a culture without the typical modern tools of that trade.Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress.
Mar 28 2009
Hello Walter,Andrei Alexandrescu wrote:Ag. Up to a little over 100 years ago >90% of man was needed to feed us all. Everything else (including swinging that balance) was done by the <10% left over. If you could swing it just a little bit then you'd get large returns now. OTOH at the rate we are going, you might also speed up Judgment Day (the skynet or inconvenient truth version).Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspectwriting. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internet
Mar 28 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Gosh, that runs through my mind a lot! (Also, I tend to ask myself a lot - what if I were dropped some 100-200 years *from* now?)Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Sometimes I think what if I were dropped naked back in time 20,000 years ago?Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetMy list: - wheel - fire - smelting metals - writing - arithmetic Andrei
Mar 28 2009
Andrei Alexandrescu wrote:My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 28 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Well in my fantasies time is a parameter...My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago!I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?Not for transporting the hunt. By and large, such mental exercises are indeed showing how dependent everything in modern life is on infrastructure. Our major achievements (electricity, automobiles, computers) cannot be fathomed absent a major infrastructure. Andrei
Mar 28 2009
Andrei Alexandrescu wrote:Walter Bright wrote:Consider making a wheel (and corresponding cart) with nothing but stone tools to work with, and your materials are rope, leather, and wood. No fasteners. A workable cart with wheel would be very heavy. I think it would be fairly useless without a road and oxen to pull it.Wouldn't the wheel be useless to a hunter-gatherer tribe?Not for transporting the hunt.By and large, such mental exercises are indeed showing how dependent everything in modern life is on infrastructure. Our major achievements (electricity, automobiles, computers) cannot be fathomed absent a major infrastructure.Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".
Mar 28 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Yah, all the more argument to extend the time traveler an invitation to dinner. In Hamlet's words, not where he eats, but where he is eaten. AndreiWalter Bright wrote:Consider making a wheel (and corresponding cart) with nothing but stone tools to work with, and your materials are rope, leather, and wood. No fasteners. A workable cart with wheel would be very heavy. I think it would be fairly useless without a road and oxen to pull it.Wouldn't the wheel be useless to a hunter-gatherer tribe?Not for transporting the hunt.By and large, such mental exercises are indeed showing how dependent everything in modern life is on infrastructure. Our major achievements (electricity, automobiles, computers) cannot be fathomed absent a major infrastructure.Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".
Mar 28 2009
Walter Bright wrote:Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".The Maya wrote on treated Birch Bark, which apparently worked great until Spanish Missionaries burned all their libraries :-) Sumerians used fired clay tablets for writing, and treated animal hides were pretty popular until relatively recently (Vellum, for instance). Vegetable dyes would make decent ink, if needed. The bigger problem with writing is the difficulty in transporting the books or whatever, assuming a hunter-gatherer culture. Until agriculture, I can't writing being used much outside of "graffiti" on cave walls, trees, etc. From your date of 20,000 BC, I believe you predate agriculture by at least a few thousand years (I recall hearing speculation about Human settlements in the teens somewhere).
Mar 28 2009
Sean Kelly wrote:Walter Bright wrote:It's the "treating" that's the problem. Do you know how to treat animal hides? I sure don't! I saw the process once on TV and it looked rather involved.Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".The Maya wrote on treated Birch Bark, which apparently worked great until Spanish Missionaries burned all their libraries :-) Sumerians used fired clay tablets for writing, and treated animal hides were pretty popular until relatively recently (Vellum, for instance). Vegetable dyes would make decent ink, if needed.The bigger problem with writing is the difficulty in transporting the books or whatever, assuming a hunter-gatherer culture. Until agriculture, I can't writing being used much outside of "graffiti" on cave walls, trees, etc. From your date of 20,000 BC, I believe you predate agriculture by at least a few thousand years (I recall hearing speculation about Human settlements in the teens somewhere).You're right that a settlement is probably a precursor to viable writing. Even smelting iron has a lot of problems. It may take a lot of trial and error to get it to work, time you may not have :-) before they spit and roasted you for dinner! Could you even recognize iron ore? But all you really need to produce is a serviceable hatchet, because a few of those will give your tribe a distinct advantage. This would all make for a great scifi story!
Mar 28 2009
Walter Bright wrote:Sean Kelly wrote:I know that hide can be tanned using urine, which I suppose is why tanneries were reputed to smell so horrible. It would have to be scraped clean without wrecking it as well, perhaps with a Clam shell? Either way, charcoal on cave walls would definitely be easier :-)Walter Bright wrote:It's the "treating" that's the problem. Do you know how to treat animal hides? I sure don't! I saw the process once on TV and it looked rather involved.Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".The Maya wrote on treated Birch Bark, which apparently worked great until Spanish Missionaries burned all their libraries :-) Sumerians used fired clay tablets for writing, and treated animal hides were pretty popular until relatively recently (Vellum, for instance). Vegetable dyes would make decent ink, if needed.Could you even recognize iron ore?Or dig it up? Some of the earliest chapters in the Bible mention Iron so I imagine the knowledge has been around for some time, but definitely not before agriculture.But all you really need to produce is a serviceable hatchet, because a few of those will give your tribe a distinct advantage.In another MythBusters episode they were asked to try and figure out whether there was any practical benefit to arrows with flint tips vs. simply being sharpened, and their results were surprisingly ambiguous. The flint tipped arrows seemed to penetrate slightly better, but this didn't seem offset by the greatly increased labor to make them. Clearly, stone-tipped weapons were preferred over normal ones if archaeological evidence is any indication, but I'd really like to know why. Stone tools makes complete sense (and therefore hatchets as well), but why add a stone tip to something ostensibly disposable like an arrow unless it provides a substantial benefit in terms of the likelihood that a kill will be successful?
Mar 28 2009
Sean Kelly wrote:Walter Bright wrote:(EG, Goliath had an iron spear, in the middle of the bronze age). Most of the early iron came from pure-iron meteorites -- they knew about iron, but finding it was pure luck.Sean Kelly wrote:I know that hide can be tanned using urine, which I suppose is why tanneries were reputed to smell so horrible. It would have to be scraped clean without wrecking it as well, perhaps with a Clam shell? Either way, charcoal on cave walls would definitely be easier :-)Walter Bright wrote:It's the "treating" that's the problem. Do you know how to treat animal hides? I sure don't! I saw the process once on TV and it looked rather involved.Even writing has its problems. What are you going to write on? Bark? Animal hides? How are you going to make paper? Ink? A hunter-gatherer tribe may find it not worth the effort, and so the writing will not "take".The Maya wrote on treated Birch Bark, which apparently worked great until Spanish Missionaries burned all their libraries :-) Sumerians used fired clay tablets for writing, and treated animal hides were pretty popular until relatively recently (Vellum, for instance). Vegetable dyes would make decent ink, if needed.Could you even recognize iron ore?Or dig it up? Some of the earliest chapters in the Bible mention Iron so I imagine the knowledge has been around for some time, but definitely not before agriculture.
Mar 28 2009
Hello Sean,In another MythBusters episode they were asked to try and figure out whether there was any practical benefit to arrows with flint tips vs. simply being sharpened, and their results were surprisingly ambiguous. The flint tipped arrows seemed to penetrate slightly better, but this didn't seem offset by the greatly increased labor to make them. Clearly, stone-tipped weapons were preferred over normal ones if archaeological evidence is any indication, but I'd really like to know why. Stone tools makes complete sense (and therefore hatchets as well), but why add a stone tip to something ostensibly disposable like an arrow unless it provides a substantial benefit in terms of the likelihood that a kill will be successful?After the tip get in the animal, it breaks off, grinds up and does more damage as the animal runs away. Even modern razor edged arrows kill by bleeding the animal out.
Mar 28 2009
BCS wrote:After the tip get in the animal, it breaks off, grinds up and does more damage as the animal runs away. Even modern razor edged arrows kill by bleeding the animal out.Ah, I was wondering if that might be the case. Thanks for the explanation!
Mar 29 2009
Sean Kelly wrote:In another MythBusters episode they were asked to try and figure out whether there was any practical benefit to arrows with flint tips vs. simply being sharpened, and their results were surprisingly ambiguous. The flint tipped arrows seemed to penetrate slightly better, but this didn't seem offset by the greatly increased labor to make them. Clearly, stone-tipped weapons were preferred over normal ones if archaeological evidence is any indication, but I'd really like to know why. Stone tools makes complete sense (and therefore hatchets as well), but why add a stone tip to something ostensibly disposable like an arrow unless it provides a substantial benefit in terms of the likelihood that a kill will be successful?Since stone arrowheads, and improvements in them, spread rapidly around the world, the people clearly thought they were substantially better. We often think of cavemen as idiots, but they weren't. They were ignorant of what we know, but they surely had intricate knowledge of their environment and how to survive. There's something that mythbusters was missing.
Mar 29 2009
Hello Walter,This would all make for a great scifi story!the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.
Mar 28 2009
BCS wrote:Hello Walter,You mean a ruggedised Kindle 2 a.k.a. the Hitchhiker's Guide to the Galaxy version 0.1?This would all make for a great scifi story!the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference,really good geological mapsHere's hoping Google Earth has that planet, then. :Pand their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Without a supply of food, not long, I'd imagine. Assuming your list of materials is complete, they'd have to figure out what's edible, then hunt and gather their food for at least as long as it takes them to figure out what they can grow, and then grow it. Then there's the question of whether these people are skilled, or just a few thousand random people off the street. Not to mention that to get into space they'd need a hell of a lot of things. Even with written knowledge of how to do it, I don't imagine it would be an easy thing to do. -- Daniel
Mar 29 2009
Hello Daniel,BCS wrote:That to, but I was thinking of minral maps for finding ore.Hello Walter,You mean a ruggedised Kindle 2 a.k.a. the Hitchhiker's Guide to the Galaxy version 0.1?This would all make for a great scifi story!the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference,really good geological mapsHere's hoping Google Earth has that planet, then. :PI'd argue that working out the food supply is a prerqueset to keeping society togetherand their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Without a supply of food, not long, I'd imagine. Assuming your list of materials is complete, they'd have to figure out what's edible, then hunt and gather their food for at least as long as it takes them to figure out what they can grow, and then grow it.Then there's the question of whether these people are skilled, or just a few thousand random people off the street.Most of the work would be skilled labor and when know how to teach that fairly well. For the rest it wouldn't take much luck for a sampling of 5000 people to to include several doctors, engineers, some framers, a few scientists and some programmers. Besides, it a story, I can make my own luck.Not to mention that to get into space they'd need a hell of a lot of things. Even with written knowledge of how to do it, I don't imagine it would be an easy thing to do.If it were easy, it wouldn't make a good story.-- Daniel
Mar 29 2009
BCS wrote:the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Most of them would promptly die. The reference will be missing all kinds of woodcraft that is necessary to survive, but nobody found worthwhile to record. (The Firefox series of books is an attempt to record those old techniques before they were lost forever.) Most of the instructions in the encyclopedia will be useless, because they'll require non-existent precursor technology. How to build those precursors probably will not be recorded. Then the people will have to have a very fast attitude adjustment, and many will die in that process. Take a look at the sad history of Jamestown. The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.
Mar 29 2009
Walter Bright wrote:BCS wrote:Foxfire, not Firefox. There are about twelve volumes, each roughly as long as a Wheel of Time novel.the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Most of them would promptly die. The reference will be missing all kinds of woodcraft that is necessary to survive, but nobody found worthwhile to record. (The Firefox series of books is an attempt to record those old techniques before they were lost forever.)Most of the instructions in the encyclopedia will be useless, because they'll require non-existent precursor technology. How to build those precursors probably will not be recorded.Assuming that the encyclopedia is not lacking in that regard, building the prerequisite technologies could take quite some time.Then the people will have to have a very fast attitude adjustment, and many will die in that process. Take a look at the sad history of Jamestown. The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Thanks for ruining it for me! (Actually, thanks. I was never going to watch it anyway.)
Mar 29 2009
Christopher Wright wrote:Walter Bright wrote:You didn't miss anything. I've only watched a handful of episodes. I found it to be so "dark", literally, that I had a hard time seeing what was going on on my TV screen.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Thanks for ruining it for me! (Actually, thanks. I was never going to watch it anyway.)
Mar 29 2009
Walter Bright wrote:Christopher Wright wrote:Obvious hint to start a donation campaign for a new plasma ignored. AndreiWalter Bright wrote:You didn't miss anything. I've only watched a handful of episodes. I found it to be so "dark", literally, that I had a hard time seeing what was going on on my TV screen.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Thanks for ruining it for me! (Actually, thanks. I was never going to watch it anyway.)
Mar 29 2009
Walter Bright wrote:Christopher Wright wrote:The problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.Walter Bright wrote:You didn't miss anything. I've only watched a handful of episodes. I found it to be so "dark", literally, that I had a hard time seeing what was going on on my TV screen.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Thanks for ruining it for me! (Actually, thanks. I was never going to watch it anyway.)
Mar 29 2009
Sean Kelly wrote:The problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.I've been having increasing problems understanding TV dialog, too. It sounds like they're mumbling their lines.
Mar 29 2009
Hello Walter,Sean Kelly wrote:I'm 25, don't like loud music and run movies with subtitles. It's kinda funny how the audio doesn't always track the text.The problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.I've been having increasing problems understanding TV dialog, too. It sounds like they're mumbling their lines.
Mar 29 2009
Walter Bright wrote:Sean Kelly wrote:It's a conspiracy. You need to turn the volume up to understand, and meanwhile the entire house hears the bangs and shots, and everybody has to come and see. Same with commercials (at least around here) they got the nice idea to send commercials a lot louder than the program, so everybody in the building (including your freaking neighbors) has to trespassing. Check out any movie from the fifties, and all of a sudden you aren't old anymore: you can actually hear what they say. Without burning the amp or your nerves! I've actually thought of buying a 5.1 sound system, for the sole purpose of turning everything else down, except the dialog speaker. (The one on top of the TV.) But I've been too lazy to go to a store and test if it actually would work. Does anybody know? programming, but now they've got rid of it, so when I watch a movie, I literally have to have the remote in my hand so I can be ready to cut the volume before everybody wakes up. Technology advances indeed.The problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.I've been having increasing problems understanding TV dialog, too. It sounds like they're mumbling their lines.
Mar 29 2009
On Sun, Mar 29, 2009 at 4:01 PM, Georg Wrede <georg.wrede iki.fi> wrote:It's a conspiracy. You need to turn the volume up to understand, and meanwhile the entire house hears the bangs and shots, and everybody has to come and see. Same with commercials (at least around here) they got the nice idea to send commercials a lot louder than the program, so everybody in the building (including your freaking neighbors) has to hear what detergent toIt's not just there :P some commercials are, no kidding, about twice as loud as the program.
Mar 29 2009
Georg Wrede wrote:Walter Bright wrote:It was quite annoying, but I found a solution: don't watch broadcast television. There are friendly people on the internet who have already removed the commercials for me. That said, the only television I regularly watch is Korean starcraft (with fan-made English commentary, usually), and nobody's going to sue me for that.Sean Kelly wrote:It's a conspiracy. You need to turn the volume up to understand, and meanwhile the entire house hears the bangs and shots, and everybody has to come and see. Same with commercials (at least around here) they got the nice idea to send commercials a lot louder than the program, so everybody in the building (including your freaking neighbors) has to trespassing.The problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.I've been having increasing problems understanding TV dialog, too. It sounds like they're mumbling their lines.
Mar 29 2009
Hello Christopher,It was quite annoying, but I found a solution: don't watch broadcast television. There are friendly people on the internet who have already removed the commercials for me.hulu.com grand total of about 2 minutes of non show tops. I don't even own a TV.
Mar 29 2009
BCS wrote:Hello Christopher,Only a valid point if you happen to live in the US. -- DanielIt was quite annoying, but I found a solution: don't watch broadcast television. There are friendly people on the internet who have already removed the commercials for me.hulu.com grand total of about 2 minutes of non show tops. I don't even own a TV.
Mar 29 2009
Georg Wrede wrote:... It's a conspiracy. You need to turn the volume up to understand, and meanwhile the entire house hears the bangs and shots, and everybody has to come and see. Same with commercials (at least around here) they got the nice idea to send commercials a lot louder than the program, so everybody in the building (including your freaking neighbors) has to trespassing.I have this long list of "what I'd do if I was made Prime Minister." One of the entries relates to outlawing advertising firms and anything other than plain text ads with maybe a voice at a sensible volume over the top. (Rivers does this, bless 'em, and I always make a point of paying attention to their ads if I happen to see one.) Then, to really bugger 'em up, I'd make it law that if there's anything in an ad that you can't support with concrete evidence, you get hanged. Enough of this "five out of six fluffy ducks love our toilet paper best" or "Australia's favourite" or any of the other bullshit they use. Let's see how eager they are to make stuff up when it's their neck on the line... They can keep the cannes ad awards, though; if only as a hobby.Check out any movie from the fifties, and all of a sudden you aren't old anymore: you can actually hear what they say. Without burning the amp or your nerves!Probably because it was when they still gave a rats about quality and not annoying the crap out of the viewer. I guess this is all endemic of the media industry these days. I mean, I got so furious with all the bullshit going on that I just completely stopped buying/renting movies and music.I've actually thought of buying a 5.1 sound system, for the sole purpose of turning everything else down, except the dialog speaker. (The one on top of the TV.) But I've been too lazy to go to a store and test if it actually would work. Does anybody know?See, I just turn on subtitles. I guess I got used to them from watching Anime with Japanese language and English subs, so it really doesn't bother me.programming, but now they've got rid of it, so when I watch a movie, I literally have to have the remote in my hand so I can be ready to cut the volume before everybody wakes up. Technology advances indeed.I have a great solution to this: I don't watch TV. The only exception I make on any vaguely regular basis is to turn it on to watch TopGear (when someone reminds me, since I have an atrocious memory for this.) Sometimes, I wonder how far above my own the general public's tolerance for being treated like cattle is. Just how far do the media and TV companies have to push people before society at large turns around and hacks their hands off with a blunt spoon... -- Daniel
Mar 29 2009
Daniel Keep wrote: Then, to really bugger 'em up, I'd make it law that if there's anythingin an ad that you can't support with concrete evidence, you get hanged. Enough of this "five out of six fluffy ducks love our toilet paper best" or "Australia's favourite" or any of the other bullshit they use. Let's see how eager they are to make stuff up when it's their neck on the line...Oh yes!! Today, I'm having a hard time telling my kids not to lie, while all the TV ads do is blatant lying.They can keep the cannes ad awards, though; if only as a hobby.Well, I learnt all my English from watching and listening while reading local subtitles. I'd hate to turn off the volume.Check out any movie from the fifties, and all of a sudden you aren't old anymore: you can actually hear what they say. Without burning the amp or your nerves!Probably because it was when they still gave a rats about quality and not annoying the crap out of the viewer. I guess this is all endemic of the media industry these days. I mean, I got so furious with all the bullshit going on that I just completely stopped buying/renting movies and music.I've actually thought of buying a 5.1 sound system, for the sole purpose of turning everything else down, except the dialog speaker. (The one on top of the TV.) But I've been too lazy to go to a store and test if it actually would work. Does anybody know?See, I just turn on subtitles. I guess I got used to them from watching Anime with Japanese language and English subs, so it really doesn't bother me.Sometimes, I wonder how far above my own the general public's tolerance for being treated like cattle is. Just how far do the media and TV companies have to push people before society at large turns around and hacks their hands off with a blunt spoon...Well, if folks download movies and music, the industry sure makes them have less of a bad conscience. And soon more people will do it, just to get even with the industry. Most of my TV watching is either recordings, or time-shift, where I can skip commercials even when I watch "live".
Mar 29 2009
Daniel Keep wrote:I have this long list of "what I'd do if I was made Prime Minister." One of the entries relates to outlawing advertising firms and anything other than plain text ads with maybe a voice at a sensible volume over the top. (Rivers does this, bless 'em, and I always make a point of paying attention to their ads if I happen to see one.)I'd be happy with removing the stupidest ones for now. I hate the Geico ads with the idiotic wad of cash. Apparently they decided the gecko and the cavemen were too subtle for the public. Andrei
Mar 29 2009
On Sun, 29 Mar 2009 12:17:33 -0700, Walter Bright <newshound1 digitalmars.com> wrote:Sean Kelly wrote:Apparently the sound mixing is causing older audiences difficulties. http://www.guardian.co.uk/film/filmblog/2009/mar/02/john-cleese-film GideThe problem I ran into is that the audio is mixed with the music about the same volume as the voices, and it almost seems like they applied so effects to the voice audio to make it sound more like they were talking in a big metal room. In any case, I always had trouble hearing dialog clearly in that show, and often messed with the audio settings on my TV to boost that frequency range in hopes of hearing it better. That's what I get for not wearing ear plugs all those years I spent at loud concerts, I suppose.I've been having increasing problems understanding TV dialog, too. It sounds like they're mumbling their lines.
Mar 29 2009
Walter Bright wrote:Christopher Wright wrote:Don't forget that all their camera operators apparently suffer from extreme Parkinson's disease! The one cool thing I ever saw of BG was a clip online where they drop the Galactica through a planet's atmosphere to get their fighters deployed faster, then do a faster-than-light jump split seconds before they hit the ground. Very cool. -- DanielWalter Bright wrote:You didn't miss anything. I've only watched a handful of episodes. I found it to be so "dark", literally, that I had a hard time seeing what was going on on my TV screen.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Thanks for ruining it for me! (Actually, thanks. I was never going to watch it anyway.)
Mar 29 2009
Walter Bright wrote:The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Damn! Thanks for the spoiler, I wanted to watch that! On second thought, maybe I don't :o). Andrei
Mar 29 2009
Andrei Alexandrescu wrote:Walter Bright wrote:It's well worth it, assuming you like space opera.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Damn! Thanks for the spoiler, I wanted to watch that! On second thought, maybe I don't :o).
Mar 29 2009
Sean Kelly wrote:Andrei Alexandrescu wrote:That's the first series I'd consider buying a box set.Walter Bright wrote:It's well worth it, assuming you like space opera.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Damn! Thanks for the spoiler, I wanted to watch that! On second thought, maybe I don't :o).
Mar 29 2009
Georg Wrede wrote:That's the first series I'd consider buying a box set.Waste of money & time. Buy "Band of Brothers" instead.
Mar 29 2009
Walter Bright wrote:Georg Wrede wrote:I actually just broke my "don't buy media" rule and grabbed the Monty Python Boxset. All the movies and the full Flying Circus. Something like 27 hours of Python; the Flying Circus runs for 22 hours alone! Now, if only they'd release all the albums and books on a pair of DVDs... -- DanielThat's the first series I'd consider buying a box set.Waste of money & time. Buy "Band of Brothers" instead.
Mar 29 2009
Andrei Alexandrescu wrote:Walter Bright wrote:Sorry, it's been over a week now, so I assumed everyone who cared about it had already seen it.The Battlestar Galactica finale where they just sent all their tech into the sun and went native is a romantic delusion.Damn! Thanks for the spoiler, I wanted to watch that! On second thought, maybe I don't :o).
Mar 29 2009
Hello Walter,BCS wrote:No it does contain that knowledge. Assume, it has the totally recorded knowledge of earth, wikipidia + googel books + gotenberg + dusty tomes in the back of some monetary. The point is what if knowledge is not a limiting factor?the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Most of them would promptly die. The reference will be missing all kinds of woodcraft that is necessary to survive, but nobody found worthwhile to record. (The Firefox series of books is an attempt to record those old techniques before they were lost forever.)Most of the instructions in the encyclopedia will be useless, because they'll require non-existent precursor technology. How to build those precursors probably will not be recorded. Then the people will have to have a very fast attitude adjustment, and many will die in that process. Take a look at the sad history of Jamestown.What goods a story without some risk of life and limb? That and a social aspect.
Mar 29 2009
BCS wrote:No it does contain that knowledge. Assume, it has the totally recorded knowledge of earth, wikipidia + googel books + gotenberg + dusty tomes in the back of some monetary. The point is what if knowledge is not a limiting factor?That's *recorded* knowledge. A lot of knowledge never gets recorded. For example, many people have tried to recreate medieval trebuchets. All they've got is a couple of crappy drawings, and so they had to guess and invent to fill in a lot of blanks. Damascus steel is a famous example. Anyone who has tried to recreate medieval or ancient technology from recorded documents has found that an awful lot of fairly crucial information was left out.
Mar 29 2009
Remember that old Bill Cosby routine where he plays Moses and God is giving him instructions on how to build the ark? The design was all given in terms of cubits. And the end of the long, involved explanation, Moses (Cosby) says: "What's a cubit?"
Mar 29 2009
Hello Walter,Remember that old Bill Cosby routine where he plays Moses and God is giving him instructions on how to build the ark? The design was all given in terms of cubits. And the end of the long, involved explanation, Moses (Cosby) says: "What's a cubit?"http://en.wikipedia.org/wiki/Qbit
Mar 29 2009
BCS wrote:the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Let's say, instead of just birthday suits and an encyclopedia, they'd have a magic box that just doles out any hand tool you can think of wishing you had. Oh, and another box that feeds them all. A third that keeps them clothed, and a fourth to tend to their medical issues. And, they'd be no ordinary rednecks, but all of them belonging to Mensa. But let's say they aren't NASA engineers, just otherwise smart. They'd have to start with some serious reading. They'd have to spend years figuring out the design of the ship, write the computer programs for avionics, fuel control, etc. Then they'd have to design the computers to run them on. And the computer programs to design the microchips. Then they'd have to design a chip factory to make the CPUs and other chips needed. Another factory to make fuel. A couple of mines, too, to get titanium and aluminium alloys, and a few plastics factories to make all the plastic parts. They'd need to either develop synthetic rubber or find rubber trees, or find a substitute, to make hydraulic tubing. They'd need some serious expeditions to find what they need, in great enough quantities. Before all of this, they'd need to find out how to create factories that make bricks for the other factory buildings, build a power plant big enough to run the factories, chemical processes for fuel and stuff, mills and forges. They'd need a few hundred Jeeps just to get around the planet in search of raw materials, and they'd need to build factories for oil well drills, piping, and truck factories for transport of all kinds of crap and raw materials. Oh, and they'd need to not be jealous, adulterous, envious, self-promoting, greedy, bossy, dishonest, delinquent, criminal, etc. and not treat others with disrespect. Or else half their progress will go to all that. (What's -50% compounded annually over, say, 20 years? Get it?) Motorola dominated the world of wireless communications, and was a big chip maker, only ten years ago. Ever wonder what happened? (Yesterday I saw a rerun of Bad Boys. That movie is so true to life in that anytime something is going down, people just start yelling at each other, instead of focusing on the emergency at hand.) And let's say /all/ the circumstances otherwise are perfect (like no earth quakes, no storms, floods, or even thunder). How many parts are there in a rocket? Not to mention a StarTrek kind of spaceship? In the 1970' I was a camera salesman. I saw an exploded view of the Canon FTb (a regular SLR camera). They boasted it had one thousand parts. Say it takes a thousand cameras to build a rocket. That's a million parts. How many rockets would they have to build just for testing various things, and getting it right? Any author in whose book even one of them gets up in space before 500 years, is an idiot, and should be sent back to college. Math, physics, chemistry, at least. Their number one problem is, they're too few compared to the task. Developing things to make things to make things[...], and having the knowledge is fine, but you have to be so many that it actually gets done before doomsday. Hell, if it was that easy to build a rocket, then the guys in Afghanistan and Nigeria would have been a few times to the Moon already. People really underestimate things. "Yeah, this guy I know wrote this OS kernel, and today even mainframes run Linux." If you count the man-hours Linus and thousands of others have done, combined, guess what. Say they'd been a hundred instead. Today Linux is almost 20 years, so we're talking two hundred years, right? You know, if the entire mankind decided to stop fighting, and wanted to build the Enterprise now (forget warp drive), I'd say it would take way more than a generation. Hell, merely sending 2 guys to Mars seems too much. How long does it currently take the world's most powerful nation, from decision to deployment, to make a jet fighter? And these guys already have the factories, infrastructure, CAD programs, expertise, experience, clout, etc.
Mar 29 2009
Georg Wrede wrote:BCS wrote:Sorry for the long quote, I quoted this in full because I liked it this much. It's the best post I've read in a long time. One thing I'd like to emphasize is that building complex technology is hard for a small core of people because it's hard to get specialized in multiple things at once. Think of how long it takes to become expert in any serious domain... I'm not sure most of us could get up-to-speed in more than a couple major technologies fast enough to also use them creatively. We benefit of many generations who worked before us and created technology. Even before the exponential elbow of recent times, there was plenty of technology that we afforded to take for granted. Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary. When I'll see loss of technology happening, I'll now we're in big trouble. I hope it won't happen in my lifetime, or ever. Andreithe story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.Let's say, instead of just birthday suits and an encyclopedia, they'd have a magic box that just doles out any hand tool you can think of wishing you had. Oh, and another box that feeds them all. A third that keeps them clothed, and a fourth to tend to their medical issues. And, they'd be no ordinary rednecks, but all of them belonging to Mensa. But let's say they aren't NASA engineers, just otherwise smart. They'd have to start with some serious reading. They'd have to spend years figuring out the design of the ship, write the computer programs for avionics, fuel control, etc. Then they'd have to design the computers to run them on. And the computer programs to design the microchips. Then they'd have to design a chip factory to make the CPUs and other chips needed. Another factory to make fuel. A couple of mines, too, to get titanium and aluminium alloys, and a few plastics factories to make all the plastic parts. They'd need to either develop synthetic rubber or find rubber trees, or find a substitute, to make hydraulic tubing. They'd need some serious expeditions to find what they need, in great enough quantities. Before all of this, they'd need to find out how to create factories that make bricks for the other factory buildings, build a power plant big enough to run the factories, chemical processes for fuel and stuff, mills and forges. They'd need a few hundred Jeeps just to get around the planet in search of raw materials, and they'd need to build factories for oil well drills, piping, and truck factories for transport of all kinds of crap and raw materials. Oh, and they'd need to not be jealous, adulterous, envious, self-promoting, greedy, bossy, dishonest, delinquent, criminal, etc. and not treat others with disrespect. Or else half their progress will go to all that. (What's -50% compounded annually over, say, 20 years? Get it?) Motorola dominated the world of wireless communications, and was a big chip maker, only ten years ago. Ever wonder what happened? (Yesterday I saw a rerun of Bad Boys. That movie is so true to life in that anytime something is going down, people just start yelling at each other, instead of focusing on the emergency at hand.) And let's say /all/ the circumstances otherwise are perfect (like no earth quakes, no storms, floods, or even thunder). How many parts are there in a rocket? Not to mention a StarTrek kind of spaceship? In the 1970' I was a camera salesman. I saw an exploded view of the Canon FTb (a regular SLR camera). They boasted it had one thousand parts. Say it takes a thousand cameras to build a rocket. That's a million parts. How many rockets would they have to build just for testing various things, and getting it right? Any author in whose book even one of them gets up in space before 500 years, is an idiot, and should be sent back to college. Math, physics, chemistry, at least. Their number one problem is, they're too few compared to the task. Developing things to make things to make things[...], and having the knowledge is fine, but you have to be so many that it actually gets done before doomsday. Hell, if it was that easy to build a rocket, then the guys in Afghanistan and Nigeria would have been a few times to the Moon already. People really underestimate things. "Yeah, this guy I know wrote this OS kernel, and today even mainframes run Linux." If you count the man-hours Linus and thousands of others have done, combined, guess what. Say they'd been a hundred instead. Today Linux is almost 20 years, so we're talking two hundred years, right? You know, if the entire mankind decided to stop fighting, and wanted to build the Enterprise now (forget warp drive), I'd say it would take way more than a generation. Hell, merely sending 2 guys to Mars seems too much. How long does it currently take the world's most powerful nation, from decision to deployment, to make a jet fighter? And these guys already have the factories, infrastructure, CAD programs, expertise, experience, clout, etc.
Mar 29 2009
Andrei Alexandrescu wrote:Georg Wrede wrote:....Cool!How long does it currently take the world's most powerful nation, from decision to deployment, to make a jet fighter? And these guys already have the factories, infrastructure, CAD programs, expertise, experience, clout, etc.Sorry for the long quote, I quoted this in full because I liked it this much. It's the best post I've read in a long time.One thing I'd like to emphasize is that building complex technology is hard for a small core of people because it's hard to get specialized in multiple things at once. Think of how long it takes to become expert in any serious domain... I'm not sure most of us could get up-to-speed in more than a couple major technologies fast enough to also use them creatively.For the society, this is the problem with longevity. Exteding peoples' lives should really extend their productive years, which means keeping the brain young and "spongy", sucking info and applying it effortlessly. Just adding retirement years is a burden no nation can soon afford to even try.We benefit of many generations who worked before us and created technology. Even before the exponential elbow of recent times, there was plenty of technology that we afforded to take for granted.Yes. It takes much thinking to even begin to appreciate how much we've got from earlier generations. It's all too easy to say that there was nothing we need before the telegraph and the steam engine.
Mar 29 2009
Andrei Alexandrescu wrote:Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary.Jerry Pournelle defines a Dark Age as a time when not only is the knowledge of how to do things forgotten, but even that these things are possible. Usually folks’d ascribe some large construction (like the pyramids, the walls of Crete, &c.) to magic or the gods or some such. —Joel Salomon
Mar 29 2009
On Sun, Mar 29, 2009 at 5:57 PM, Joel C. Salomon <joelcsalomon gmail.com> w= rote:Andrei Alexandrescu wrote:Indeed. The European Dark Ages were dominated by views that humans were inherently flawed; that everyone was born a sinner; that you were predestined to go to either heaven or hell and there was nothing you could do to change that. There was pretty much a complete loss of faith in the capabilities of humanity itself. It wasn't until the renaissance that humanistic thought made a return and caused politics, science, and technology to simply explode in development. Heck, even most of the work of the ancient Greeks and Romans was lost, either unavailable to the public at large due to a lack of printing technology and literacy, or simply disregarded as heresy. Some incredible writings had the ink stripped off the pages and were reused in copying the Bible or other liturgical works. Incredible.Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary.Jerry Pournelle defines a Dark Age as a time when not only is the knowledge of how to do things forgotten, but even that these things are possible. =A0Usually folks=92d ascribe some large construction (like the pyramids, the walls of Crete, &c.) to magic or the gods or some such.
Mar 29 2009
On Sun, 29 Mar 2009 18:27:56 -0400, Jarrett Billingsley <jarrett.billingsley gmail.com> wrote:On Sun, Mar 29, 2009 at 5:57 PM, Joel C. Salomon <joelcsalomon gmail.com> wrote:The problem with capabilities of humanity is that humans are mortal. At least their bodies are. This is the evidence of a fatal flaw in humanity that is hard for me to deny. You may do your worst at convincing yourself that it's other people who will die, not you, because you don't believe in your death, or don't want to die, or drink little beer and jog regularly, or are hoping that they will find the gene of aging and remove it from you, whatever. But the scientific evidence (your dying relatives, the current looks of Arnold Schwarzenegger, your aging reflection in the mirror in the bathroom, etc) suggests that the odds of your death are very high. When you are no longer young and cool, you are starting to loose your faith in technology, progress, renaissances in this world, because it's becoming more and more clear that you are going to leave this world some day (no matter how hard Dayle Carnegie's writings try to persuade you not to worry and get busy - Dayle Carnegie's dead). What will be next? I dunno. It seems like science, technology and rationalism can't give me an answer to this fundumental question. Science even can't give a proof of God's non-existance. How can I trust it when it comes to more important things? :)Andrei Alexandrescu wrote:Indeed. The European Dark Ages were dominated by views that humans were inherently flawed; that everyone was born a sinner; that you were predestined to go to either heaven or hell and there was nothing you could do to change that. There was pretty much a complete loss of faith in the capabilities of humanity itself.Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary.Jerry Pournelle defines a Dark Age as a time when not only is the knowledge of how to do things forgotten, but even that these things are possible. Usually folks’d ascribe some large construction (like the pyramids, the walls of Crete, &c.) to magic or the gods or some such.It wasn't until the renaissance that humanistic thought made a return and caused politics, science, and technology to simply explode in development. Heck, even most of the work of the ancient Greeks and Romans was lost, either unavailable to the public at large due to a lack of printing technology and literacy, or simply disregarded as heresy. Some incredible writings had the ink stripped off the pages and were reused in copying the Bible or other liturgical works. Incredible.
Mar 30 2009
On Mon, Mar 30, 2009 at 4:51 AM, Max Samukha <samukha voliacable.com.removethis> wrote:What will be next? I dunno. It seems like science, technology and rationalism can't give me an answer to this fundumental question. Science even can't give a proof of God's non-existance. How can I trust it when it comes to more important things? :)If science can't give you a proof of His (and an afterlife's) nonexistence, why do you assume the opposite? Because it's comforting? Personally I don't care about the answer to this question. There is no evidence for or against the existence of an afterlife. Therefore there is no reason to dread or anticipate death. It's just there. I'm more than happy to be alive now, and always try my hardest to make the most out of each day. And if there's an afterlife? Cool, sure. There are at least some religions in the world that say I'll go to the good one, no matter what I believe. ;)
Mar 30 2009
On Mon, Mar 30, 2009 at 4:51 AM, Max Samukha <samukha voliacable.com.removethis> wrote:The problem with capabilities of humanity is that humans are mortal. At least their bodies are. This is the evidence of a fatal flaw in humanity that is hard for me to deny.I meant to reply to this part too. We also have the abilities to teach and learn. So even if some brilliant engineer, artist, scientist etc. passes away, there will always be someone who tries to pick up the slack. Individuals are more than flesh. Beneath the flesh are ideas, Mr. Samukha, and ideas are bulletproof ;)
Mar 30 2009
Jarrett Billingsley wrote:Indeed. The European Dark Ages were dominated by views that humans were inherently flawed; that everyone was born a sinner; that you were predestined to go to either heaven or hell and there was nothing you could do to change that.I believe that bit of doctrine about predestination is Calvinist, not Roman Catholic, and so would not have been common in the Second (i.e., the European) Dark Age. —Joel Salomon
Mar 30 2009
Joel C. Salomon wrote:Jerry Pournelle defines a Dark Age as a time when not only is the knowledge of how to do things forgotten, but even that these things are possible. Usually folks’d ascribe some large construction (like the pyramids, the walls of Crete, &c.) to magic or the gods or some such.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.
Mar 29 2009
Walter Bright wrote:Joel C. Salomon wrote:I've not heard about that, any good links on the subject? Some of the rocks at Sacsayhuaman were pretty dang huge, though.Jerry Pournelle defines a Dark Age as a time when not only is the knowledge of how to do things forgotten, but even that these things are possible. Usually folks’d ascribe some large construction (like the pyramids, the walls of Crete, &c.) to magic or the gods or some such.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.
Mar 29 2009
Ellery Newcomer wrote:Walter Bright wrote:Sorry, saw it on TV long ago.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.I've not heard about that, any good links on the subject?Some of the rocks at Sacsayhuaman were pretty dang huge, though.The same principle should work.
Mar 29 2009
Walter Bright wrote:Ellery Newcomer wrote:Probably. But I bet they squished quite a few peasants transporting them. Off the top of my head, it seems the largest of the stones was said to weigh around 20 000 tons.Walter Bright wrote:Sorry, saw it on TV long ago.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.I've not heard about that, any good links on the subject?Some of the rocks at Sacsayhuaman were pretty dang huge, though.The same principle should work.
Mar 29 2009
Ellery Newcomer wrote:Walter Bright wrote:Let's just say 20 tons.Ellery Newcomer wrote:Probably. But I bet they squished quite a few peasants transporting them. Off the top of my head, it seems the largest of the stones was said to weigh around 20 000 tons.Walter Bright wrote:Sorry, saw it on TV long ago.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.I've not heard about that, any good links on the subject?Some of the rocks at Sacsayhuaman were pretty dang huge, though.The same principle should work.
Mar 30 2009
Georg Wrede wrote:Ellery Newcomer wrote:*My* peasants go up to 20,000!Walter Bright wrote:Let's just say 20 tons.Ellery Newcomer wrote:Probably. But I bet they squished quite a few peasants transporting them. Off the top of my head, it seems the largest of the stones was said to weigh around 20 000 tons.Walter Bright wrote:Sorry, saw it on TV long ago.I remember one of those idiot "In Search Of..." type shows in the 70's saying that the fit of stones in South America was so tight you couldn't put a knife blade between them. Therefore, the stone walls must have been made by aliens. Never mind why would aliens with such advanced tech would build a crooked lumpy stone wall like that anyway. But a few years later, some archeologist demonstrated how to make such a fit by banging a couple stones together. Took him 30 minutes per surface. No aliens or even tools were required.I've not heard about that, any good links on the subject?Some of the rocks at Sacsayhuaman were pretty dang huge, though.The same principle should work.
Mar 30 2009
Andrei Alexandrescu wrote:When I'll see loss of technology happening, I'll now we're in big trouble. I hope it won't happen in my lifetime, or ever.Hi-tech export restrictions are a good start. Forbidding teaching Darwin in schools. Forbidden encryption software. Forbidden stem cell research. It's here. There are better examples, but this is not a Politically Incorrect Forum... Although it seems to be getting a lot better now, with the change in power. And nobody can guarantee that the EU and US will outlast us. The USSR didn't. And simply nobody believed it would disappear within our lifetime. (One day I stood in the cafe at the top of the WTC, looking at the sunset. I still remember thinking "I'll be long gone in 50 years, but this building will probably be here for a thousand years." http://en.wikipedia.org/wiki/File:Manhattan_from_helicopter_edit1.jpg) Once the big change comes, you can bet your last cent that those who take over will have a whole new idea of what is good an bad for you. (Technology-wise, the demise of the USSR or East Germany was no loss, but that was an exception compared to the US or the EU.) I really hope nothing will happen while my kids are around.
Mar 29 2009
Andrei Alexandrescu wrote:Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary.I seem to remember reading from science mags that the ancient Greeks were close to building, if they hadn't already succeeded to, mechanical calculators. I also remember reading about some kind of batteries, but can't remember which ancient civilization it was that had discovered them. Scientists are only now managing to piece out pre-Dark Ages technology and how advanced it really was. Now, if only the ancient times had continued to develop scientifically... who knows where we'd be now? It's not hard to imagine the computer being invented around 500 AD or so, if the current theories of ancient times hold up. For some reason, the scientific development seems to have halted and even taken steps back in areas christianity spread to in ancient times, and only in the last about half a millenia has technological progress resumed.
Mar 29 2009
Rioshin an'Harthen wrote:Andrei Alexandrescu wrote:It seems the major purpose of religion is to retard the progress of science [1]. Just look at the "intelligent design" movement. Or hell, Scientology. Every time I can begin to hope that humanity has reached the point where everyone is free to believe whatever they choose without being set upon by people who believe differently, some group of insane gits comes along and just has to spoil it. Disclaimer: I'm an atheist who believes everyone should be free to believe whatever they like. -- Daniel [1] Which is a diplomatic way of saying "to keep people stupid and gullible." No offence to any religious people on the NG; it's not individuals I have problems with, it's *institutionalised* belief.Speaking of which (damn ranting and subject changing!) I think the Medieval Ages were a stain on our history. I read somewhere how at the beginning of that dark time there was actual *loss* of technology: they had these aquaducts and pumps and mechanisms and whatnot from the Romans and didn't know how to repair them anymore, so they just let them go decrepit. Very scary.I seem to remember reading from science mags that the ancient Greeks were close to building, if they hadn't already succeeded to, mechanical calculators. I also remember reading about some kind of batteries, but can't remember which ancient civilization it was that had discovered them. Scientists are only now managing to piece out pre-Dark Ages technology and how advanced it really was. Now, if only the ancient times had continued to develop scientifically... who knows where we'd be now? It's not hard to imagine the computer being invented around 500 AD or so, if the current theories of ancient times hold up. For some reason, the scientific development seems to have halted and even taken steps back in areas christianity spread to in ancient times, and only in the last about half a millenia has technological progress resumed.
Mar 29 2009
Hello Daniel,[1] Which is a diplomatic way of saying "to keep people stupid and gullible." No offence to any religious people on the NG; it's not individuals I have problems with, it's *institutionalised* belief.I'm a cristian, but even so I'll *almost* go with you there. it's not institutionalised belief that is the problem but where faiths systems get the *power to force* people to beleave and not to question. And it's not just in theology that I find this a problem; take a look at the (not unbiased) documetery Expelled (http://www.expelledthemovie.com), people are getting ostrosized for questionig the party line on evolution. Some of these people aren't even getting past "maybe" without getting shot down. Faith done right is the greatest power for good man will ever see. Faith done wrong is the greatest power for evil that can ever be.
Mar 29 2009
BCS wrote:And it's not just in theology that I find this a problem; take a look at the (not unbiased) documetery Expelled (http://www.expelledthemovie.com), people are getting ostrosized for questionig the party line on evolution. Some of these people aren't even getting past "maybe" without getting shot down.This is hardly limited to religious beliefs. It happens with political correctness, too. Look at the recent slashdot article where Dyson dares to question global warming: http://news.slashdot.org/article.pl?sid=09/03/28/1558225 My own theory is that the shriller a person cries to suppress "wrong" beliefs, the more that person fears their own beliefs might be the ones that are wrong. Or perhaps everyone just enjoys a public stoning now and then :-(
Mar 29 2009
Hello Walter,This is hardly limited to religious beliefs. It happens with political correctness, too. Look at the recent slashdot article where Dyson dares to question global warming: http://news.slashdot.org/article.pl?sid=09/03/28/1558225 My own theory is that the shriller a person cries to suppress "wrong" beliefs, the more that person fears their own beliefs might be the ones that are wrong. Or perhaps everyone just enjoys a public stoning now and then :-(I think the answers is to always be willing to entertain /rational/ debate on anything. The thought being that truth will always stand up to reason, so unless you *want* to believe something false, you have nothing to fear in reason
Mar 29 2009
BCS wrote:I think the answers is to always be willing to entertain /rational/ debate on anything. The thought being that truth will always stand up to reason, so unless you *want* to believe something false, you have nothing to fear in reasonBut that's not the way people work. People have a vested interest in their beliefs. If you built your life around X being true, and someone drops by with evidence that X is false, what's your reaction going to be? Stone the guy.
Mar 29 2009
Walter Bright wrote:BCS wrote:D bashing by the C++ crowd.I think the answers is to always be willing to entertain /rational/ debate on anything. The thought being that truth will always stand up to reason, so unless you *want* to believe something false, you have nothing to fear in reasonBut that's not the way people work. People have a vested interest in their beliefs. If you built your life around X being true, and someone drops by with evidence that X is false, what's your reaction going to be? Stone the guy.
Mar 30 2009
Georg Wrede wrote:Walter Bright wrote:The thought crossed my mind <g>.But that's not the way people work. People have a vested interest in their beliefs. If you built your life around X being true, and someone drops by with evidence that X is false, what's your reaction going to be? Stone the guy.D bashing by the C++ crowd.
Mar 30 2009
Hello Walter,BCS wrote:Rigorous debate, I hope.I think the answers is to always be willing to entertain /rational/ debate on anything. The thought being that truth will always stand up to reason, so unless you *want* to believe something false, you have nothing to fear in reasonBut that's not the way people work. People have a vested interest in their beliefs. If you built your life around X being true, and someone drops by with evidence that X is false, what's your reaction going to be?Stone the guy.When that happens, you have an problem (and that was what I was asserting) OTOH when someone shows up and starts saying your whole society is bogus *and can't support his clams* I'm just fine with getting rid of them (preferably leaving them the option of changing there mind at some later date).
Mar 30 2009
Walter Bright wrote:BCS wrote:All I said was that piece of fish was good enough for Jehovah... -- DanielAnd it's not just in theology that I find this a problem; take a look at the (not unbiased) documetery Expelled (http://www.expelledthemovie.com), people are getting ostrosized for questionig the party line on evolution. Some of these people aren't even getting past "maybe" without getting shot down.This is hardly limited to religious beliefs. It happens with political correctness, too. Look at the recent slashdot article where Dyson dares to question global warming: http://news.slashdot.org/article.pl?sid=09/03/28/1558225 My own theory is that the shriller a person cries to suppress "wrong" beliefs, the more that person fears their own beliefs might be the ones that are wrong. Or perhaps everyone just enjoys a public stoning now and then :-(
Mar 29 2009
Walter Bright wrote:BCS wrote:There was another Slashdot article a while back about conspiracy theories. The crux of the issue was that if evidence is presented that contradicts the conspiracy theory, this actually serves to strengthen a person's belief in the conspiracy theory. This was all based on some scientific study investigating the psychology behind such things. It seems reasonable that the same psychological motivator that encourages people's conviction in their unreasonable conspiracy theories should work for other ostensibly unreasonable beliefs as well.And it's not just in theology that I find this a problem; take a look at the (not unbiased) documetery Expelled (http://www.expelledthemovie.com), people are getting ostrosized for questionig the party line on evolution. Some of these people aren't even getting past "maybe" without getting shot down.This is hardly limited to religious beliefs. It happens with political correctness, too. Look at the recent slashdot article where Dyson dares to question global warming: http://news.slashdot.org/article.pl?sid=09/03/28/1558225 My own theory is that the shriller a person cries to suppress "wrong" beliefs, the more that person fears their own beliefs might be the ones that are wrong. Or perhaps everyone just enjoys a public stoning now and then :-(
Mar 29 2009
Walter Bright wrote:BCS wrote:I'm waiting to see him publish on the subject. Until then, it's only a matter of his personal opinion, and not sufficient for debate.And it's not just in theology that I find this a problem; take a look at the (not unbiased) documetery Expelled (http://www.expelledthemovie.com), people are getting ostrosized for questionig the party line on evolution. Some of these people aren't even getting past "maybe" without getting shot down.This is hardly limited to religious beliefs. It happens with political correctness, too. Look at the recent slashdot article where Dyson dares to question global warming: http://news.slashdot.org/article.pl?sid=09/03/28/1558225My own theory is that the shriller a person cries to suppress "wrong" beliefs, the more that person fears their own beliefs might be the ones that are wrong.Also the more assiduously one tries to convert others to their belief.
Mar 30 2009
On Sun, Mar 29, 2009 at 11:04 PM, BCS <none anon.com> wrote:I'm a cristianJesus Crist! ;)Faith done right is the greatest power for good man will ever see. Faith done wrong is the greatest power for evil that can ever be.Please, let's separate the ideas of "general consensus" and "assuming the truth of propositions without any logical arguments for them." You could replace "faith" in your statement with pretty much any other system of forming a consensus and still end up with a true statement. Faith is definitely not the only detriment to progress, but it is by no means the only means to it.
Mar 29 2009
Hello Jarrett,On Sun, Mar 29, 2009 at 11:04 PM, BCS <none anon.com> wrote:In my context, faith is referring to a belief in a theological world view* without proof**. I guess I should have used "Faith" rather than "faith". *not including provable wrong world views. **Note that I hold all theological world view (including whichever one is correct) to be not provable.I'm a cristianJesus Crist! ;)Faith done right is the greatest power for good man will ever see. Faith done wrong is the greatest power for evil that can ever be.Please, let's separate the ideas of "general consensus" and "assuming the truth of propositions without any logical arguments for them." You could replace "faith" in your statement with pretty much any other system of forming a consensus and still end up with a true statement. Faith is definitely not the only detriment to progress, but it is by no means the only means to it.
Mar 30 2009
Georg Wrede wrote:Any author in whose book even one of them gets up in space before 500 years, is an idiot, and should be sent back to college. Math, physics, chemistry, at least.To amplify your point a bit with a real life example, during WW2 a B-29 landed in the USSR, intact. It was decades ahead of Soviet aerospace tech at the time. Stalin had to essentially redirect his entire aerospace industry to simply copy it. A propeller driven, 4 engine bomber. I saw a documentary on this, it took maybe 10 years and 10,000 engineers who had to recreate every part on it. It was a monumental task. They had all the information needed, but no infrastructure to make the parts.People really underestimate things. "Yeah, this guy I know wrote this OS kernel, and today even mainframes run Linux." If you count the man-hours Linus and thousands of others have done, combined, guess what. Say they'd been a hundred instead. Today Linux is almost 20 years, so we're talking two hundred years, right?People sometimes remark about how many thousands of programming languages are invented, and how few ever get anywhere. Part of the reason is that 99.99% of the work is not inventing it, it's debugging it, tuning it, deploying it, writing manuals, smoothing out all the rough edges, etc. That's what defeats all those language projects, the creators quit on them.You know, if the entire mankind decided to stop fighting, and wanted to build the Enterprise now (forget warp drive), I'd say it would take way more than a generation. Hell, merely sending 2 guys to Mars seems too much. How long does it currently take the world's most powerful nation, from decision to deployment, to make a jet fighter? And these guys already have the factories, infrastructure, CAD programs, expertise, experience, clout, etc.You're right. You'll need *millions* of people to create a starship, even starting with blueprints.
Mar 29 2009
Hello Georg, [...] I'll grant it's a hard job, but look at WW-II, throw in some large ugly unifying force and Stuff Gets Done! Heck, look at 1900-2009. I'd say that most of the tech that existed in 1900 could be built from the ground up in under 50 years if the people didn't needed to do any R&D and are motivated enough. As for some hard numbers, I recall a NOVA show where a construction planner was asked to set up a time line for the pyramids using period tech. The time line was under 3 years (2.5 IIRC). With the best assumptions you can reasonably expect to get I think the timeline would surprise most everyone.
Mar 29 2009
BCS wrote:Hello Georg, [...] I'll grant it's a hard job, but look at WW-II, throw in some large ugly unifying force and Stuff Gets Done!Well, for example, when the Allied ganged up against Hitler, there were more than a hundred million people /focused/ on one single thing: to get him out before he gets us. /Nothing/ else had priority. Even housewives did the best they could to help, including nursing each others kids so the others could go to work making bombs. So, _one_hundred_million_ really determined people, a few years, and they made some simple airplanes and war boats, some explosives, and guns. (OK, I'm putting this down a little... They also trained some guys to walk across France with assault rifles. :-) ) But the whole point is, they were a lot more than a couple of thousand, they had the infrastructure all in place, a ready society, and a common enemy! And it *still* took a couple of years to get up to D-day.Heck, look at 1900-2009. I'd say that most of the tech that existed in 1900 could be built from the ground up in under 50 years if the people didn't needed to do any R&D and are motivated enough.Reread my post. It's easier for the whole world than for a couple of thousand guys. There's simply too much to do. And, like Andrei said, too much expertise needed [for the nontrivial things] to have time to learn it all by that number of guys.As for some hard numbers, I recall a NOVA show where a construction planner was asked to set up a time line for the pyramids using period tech. The time line was under 3 years (2.5 IIRC).Say 2000 men and 3 years. But stacking stones is a bit easier than doing rocket science, right? Building rockets is not just stacking iron, most of it is the rocket science, and that takes reading, thinking, and asking each other. A lot. And even if they had full blueprints, there's an awful lot of parts to make, and a crapload of fuel to make. And the fuel factory, with or without blueprints. Just to get a measure, write on a piece of paper how many hours you would need to write a Monopoly (the board game) server that servers 10000 players, on a PC. One honest and careful estimate, according to your own programming skills. Then, do that many hours of work on it, and see how many percent of the work you got done in that time. (If that's too big a project, then do a TicTacToe server.) I don't want the answer. It's for yourself.
Mar 29 2009
Hello Georg,My poit is that most people (might even have been all bedfor that job) thought more in terms of 10-40 years.As for some hard numbers, I recall a NOVA show where a construction planner was asked to set up a time line for the pyramids using period tech. The time line was under 3 years (2.5 IIRC).Say 2000 men and 3 years. But stacking stones is a bit easier than doing rocket science, right? Building rockets is not just stacking iron, most of it is the rocket science, and that takes reading, thinking, and asking each other. A lot.Just to get a measure, write on a piece of paper how many hours you would need to write a Monopoly (the board game) server that servers 10000 players, on a PC. One honest and careful estimate, according to your own programming skills. Then, do that many hours of work on it, and see how many percent of the work you got done in that time. (If that's too big a project, then do a TicTacToe server.)If you are questioning the reliability of the numbers, keep in mind the guy who ran out that timeline did the same thing for multi-million dollar projects as his day job. If he got that kind of numbers wrong, it could cost millions in real money.I don't want the answer. It's for yourself.inf.
Mar 29 2009
BCS wrote:Hello Walter,I'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.This would all make for a great scifi story!the story I want to puzzle out is that a group of a few thousand people get dropped on a planet with an indestructible encyclopedic reference, really good geological maps and their birthday suits. I've wondered how long it would take to get into back into space. If they can keep society together, I'd bet it would be under 100 years, it might even be under a generation.
Mar 29 2009
Sean Kelly wrote:I'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.Huh, 99% of the people will be full time engaged just in food production.
Mar 29 2009
Walter Bright wrote:Sean Kelly wrote:If the people were dropped on another planet, there's not even any guarantee that it would have the same mineral resources. And food, forget it. People would have to experiment with local plants and animals to find out what was edible, could be domesticated, had medicinal use, etc. There's a lot of really basic knowledge that we take for granted because our ancestors spent thousands of years experimenting and dying to find this stuff out. A Hitchhiker's Guide to the Galaxy would be about the only truly useful text in such a scenario.I'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.Huh, 99% of the people will be full time engaged just in food production.
Mar 29 2009
Walter Bright wrote:Sean Kelly wrote:Well at some point it was said that a McDuff device provides food. AndreiI'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.Huh, 99% of the people will be full time engaged just in food production.
Mar 29 2009
Andrei Alexandrescu wrote:Walter Bright wrote:McDuff is right. Trying to get enough food to eat has been the bane of human existence for essentially our entire existence. The current obesity epidemic is a startling anomaly. Even now, I hear the siren call of the poptarts from the kitchen!Sean Kelly wrote:Well at some point it was said that a McDuff device provides food.I'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.Huh, 99% of the people will be full time engaged just in food production.
Mar 29 2009
Walter Bright wrote:Andrei Alexandrescu wrote:Aye... except, of course, for all the people starving to death. I get the sneaking suspicion that it's less a problem of too much food and more of too much of the food in too few places. We seemingly have the same problem with money, too. :P -- DanielWalter Bright wrote:McDuff is right. Trying to get enough food to eat has been the bane of human existence for essentially our entire existence. The current obesity epidemic is a startling anomaly.Sean Kelly wrote:Well at some point it was said that a McDuff device provides food.I'd bet it takes longer. Even with incredible knowledge, they'd have to build the technology from scratch, starting with improvised tools.Huh, 99% of the people will be full time engaged just in food production.
Mar 29 2009
Walter Bright wrote:Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move. This does require a lightweight wheel, but you might be able to make do with wicker on fair terrain with light loads, or with bent wood. In a sedentary society, it's much more efficient to move things using a wheelbarrow than by hand. It means that your gatherers can stay out longer, it doesn't take so many hunters to bring back an animal, fewer people are needed to fetch wood to build or burn... For a lot of tasks, it doesn't matter. For some, it's a small optimization. For a few, it's huge.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 28 2009
Christopher Wright wrote:Walter Bright wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 28 2009
Sean Kelly wrote:Christopher Wright wrote:When did you tame the mule??? :o) AndreiWalter Bright wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 28 2009
Andrei Alexandrescu wrote:Sean Kelly wrote:Hey, you'd need one to pull the wagon anyway :-) I'm just ditching the slow, easily breakable heavy thing.Christopher Wright wrote:When did you tame the mule??? :o)Walter Bright wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 28 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrei Alexandrescu wrote:Sean Kelly wrote:AFAIK, it's more a question of "when did you *breed* the mule?" ;) Mules are the result of breeding a horse with a donkey (one way or the other although using a male donkey and a female horse has more chance of success) and they are exceedingly rare in nature. So what you actually need to do is first to tame the horse and the donkey, *then* you can breed them to get a mule. Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknPHeoACgkQd0kWM4JG3k+37ACcCLEl7sLLm5xpUUdMnwllMG6m UMoAoITlDrp6PvHWh0FAEbmsvFhv+DOk =hIRx -----END PGP SIGNATURE-----Christopher Wright wrote:When did you tame the mule??? :o)Walter Bright wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?
Mar 29 2009
Jrme M. Berger wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrei Alexandrescu wrote:You'd need an elevated donkey... or shorten the mare's legs.Sean Kelly wrote:AFAIK, it's more a question of "when did you *breed* the mule?" ;) Mules are the result of breeding a horse with a donkey (one way or the other although using a male donkey and a female horse has more chance of success) and they are exceedingly rare in nature.Christopher Wright wrote:When did you tame the mule??? :o)Walter Bright wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.Andrei Alexandrescu wrote:If they are nomadic, wheels allow an individual to carry much more equipment. This allows them to store up surplus food more easily and safely. This in turn safeguards them from famine and allows for excess food to diversify roles in the community to a greater degree. Additionally, it means that the writing equipment that you supplied gets used, and the texts don't get tossed as soon as they move.My list: - wheel - fire - smelting metals - writing - arithmeticBut humans had fire 20,000 years ago! I think fire goes back a lot longer than that. I also suspect that simple arithmetic is innate, although a numbering system is not (see Mayan and Roman number systems). Wouldn't the wheel be useless to a hunter-gatherer tribe?So what you actually need to do is first to tame the horse and the donkey, *then* you can breed them to get a mule. Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknPHeoACgkQd0kWM4JG3k+37ACcCLEl7sLLm5xpUUdMnwllMG6m UMoAoITlDrp6PvHWh0FAEbmsvFhv+DOk =hIRx -----END PGP SIGNATURE-----
Mar 29 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Georg Wrede wrote:Jrme M. Berger wrote: AFAIK, it's more a question of "when did you *breed* the mule?" ;) Mules are the result of breeding a horse with a donkey (one way or the other although using a male donkey and a female horse has more chance of success) and they are exceedingly rare in nature.http://en.wikipedia.org/wiki/Mule first sentence: "A mule is the offspring of a male donkey and a female horse." Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknPtskACgkQd0kWM4JG3k+JaQCfY4qHqPyhEKDXAw8JBdCn30aD kF0An1P2GN8ZkCYNTlkSOL2MOL1919Nc =x5L4 -----END PGP SIGNATURE-----You'd need an elevated donkey... or shorten the mare's legs.
Mar 29 2009
Jrme M. Berger wrote:I always mix up "mule" and "donkey." I suppose I should have done a web search to make sure I had it right. That, or gone with my first inclination and said Zedonk!When did you tame the mule??? :o)AFAIK, it's more a question of "when did you *breed* the mule?" ;) Mules are the result of breeding a horse with a donkey (one way or the other although using a male donkey and a female horse has more chance of success) and they are exceedingly rare in nature.
Mar 29 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sean Kelly wrote:Jrme M. Berger wrote:Well, mules are a much better choice than donkeys for carrying things: stronger, with more endurance, more docile and less aggressive... Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknPt00ACgkQd0kWM4JG3k8tJACeN3qkM5qPFKRP69o80k0F5gh7 6iEAn2iU5OgcjQKbhV7WDaF+9+41hlr4 =sJBa -----END PGP SIGNATURE-----I always mix up "mule" and "donkey." I suppose I should have done a web search to make sure I had it right. That, or gone with my first inclination and said Zedonk!When did you tame the mule??? :o)AFAIK, it's more a question of "when did you *breed* the mule?" ;) Mules are the result of breeding a horse with a donkey (one way or the other although using a male donkey and a female horse has more chance of success) and they are exceedingly rare in nature.
Mar 29 2009
Sean Kelly wrote:I don't buy it. Most foods would spoil too quickly for this to matter, the wagons would be slow, wheels would need repair, etc. If I were in a nomadic tribe I wouldn't do more than pile stuff on the back of a Mule.It depends on whether you'd domesticated some sort of pack animal first. I'm talking about hand carts. As for spoiling...well, trial and error would get you to some reasonable system for storing food within a few hundred years, without much food loss. If you're willing to lose more food, you can get there sooner.
Mar 28 2009
Christopher Wright wrote:As for spoiling...well, trial and error would get you to some reasonable system for storing food within a few hundred years, without much food loss. If you're willing to lose more food, you can get there sooner.Grain lasts for a reasonable time, but that requires agriculture to produce. I guess they could dig tubers. But I think there's a reason even modern hunter-gatherer societies don't use wagons, even in ostensibly flat regions like Africa. If nothing else, hand carts would dramatically increase the calorie expenditure for travel, which means they'd need more food than otherwise.
Mar 29 2009
Sean Kelly Wrote:Christopher Wright wrote:My dogs have ticks!As for spoiling...well, trial and error would get you to some reasonable system for storing food within a few hundred years, without much food loss. If you're willing to lose more food, you can get there sooner.Grain lasts for a reasonable time, but that requires agriculture to produce. I guess they could dig tubers. But I think there's a reason even modern hunter-gatherer societies don't use wagons, even in ostensibly flat regions like Africa. If nothing else, hand carts would dramatically increase the calorie expenditure for travel, which means they'd need more food than otherwise.
Mar 29 2009
== Quote from Walter Bright (newshound1 digitalmars.com)'s articleSometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetOne that noone seems to mention, not only on this NG but in general, is birth control. I think a pretty good argument can be made that a major reason for recent social advances is that, by only having 2-4 children per set of parents instead of 10-20, parents are able to invest much more in each child than they otherwise would be. The end result is a much more educated society and one with enough surplus resources to look beyond its mere collective survival to actually improving its state of knowledge, comfort, etc.
Mar 28 2009
dsimcha Wrote:== Quote from Walter Bright (newshound1 digitalmars.com)'s articleThat may be a reasonable argument from a modern standpoint, but for much of human history infant and childhood mortality was so high that the number of children born was much higher than the number that reached adulthood. Oversimplifying, of course, but it was necessary to have a lot of children to have a reasonable expectation that there would be enough adults to provide for the family.Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetOne that noone seems to mention, not only on this NG but in general, is birth control. I think a pretty good argument can be made that a major reason for recent social advances is that, by only having 2-4 children per set of parents instead of 10-20, parents are able to invest much more in each child than they otherwise would be. The end result is a much more educated society and one with enough surplus resources to look beyond its mere collective survival to actually improving its state of knowledge, comfort, etc.
Mar 28 2009
dsimcha Wrote:== Quote from Walter Bright (newshound1 digitalmars.com)'s articleBut how the hell would you have delivered that. First of all you have to deliver chemistry and latex!Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetOne that noone seems to mention, not only on this NG but in general, is birth control. I think a pretty good argument can be made that a major reason for recent social advances is that, by only having 2-4 children per set of parents instead of 10-20, parents are able to invest much more in each child than they otherwise would be. The end result is a much more educated society and one with enough surplus resources to look beyond its mere collective survival to actually improving its state of knowledge, comfort, etc.
Mar 28 2009
On 28/03/2009 22:12, Steve Teale wrote:dsimcha Wrote:Condoms were first invented in ancient Egypt 3 Milena or so ago. they were made out of lamb intestines and were very efficient. Of course, the modern extra thin optionally flavored condoms need more advanced technology than lamb intestines... Isn't it funny that this age old method of birth control known to work in ancient times is considered today by the US school system as inefficient and wrong. They teach instead abstinence as a better method...== Quote from Walter Bright (newshound1 digitalmars.com)'s articleBut how the hell would you have delivered that. First of all you have to deliver chemistry and latex!Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetOne that noone seems to mention, not only on this NG but in general, is birth control. I think a pretty good argument can be made that a major reason for recent social advances is that, by only having 2-4 children per set of parents instead of 10-20, parents are able to invest much more in each child than they otherwise would be. The end result is a much more educated society and one with enough surplus resources to look beyond its mere collective survival to actually improving its state of knowledge, comfort, etc.
Mar 28 2009
"Yigal Chripun" <yigal100 gmail.com> wrote in message news:gqm0p8$1dtd$1 digitalmars.com...Condoms were first invented in ancient Egypt 3 Milena or so ago. they were made out of lamb intestines and were very efficient. Of course, the modern extra thin optionally flavored condoms need more advanced technology than lamb intestines... Isn't it funny that this age old method of birth control known to work in ancient times is considered today by the US school system as inefficient and wrong. They teach instead abstinence as a better method...That's a huge overgeneralization. Maybe some school systems do that, but I know for a fact there are ones that don't. The high school I went to taught about all of the major non-abstinence methods and the only ones they discouraged were were ones that really are known to be vastly less effective (like "pulling out" or the rhythm (time of month) method). They did point out that abstinence is *more effective* at preventing pregnancies than pills, condoms, etc., but that's a blatantly obvious fact anyway and they certainly didn't discourage the use of pills/condoms/etc or teach them to be wrong.
Mar 28 2009
Steve Teale wrote:dsimcha Wrote:There actually was an herb that apparently provided effective birth control in ages past. It eventually went extinct due to overharvesting. http://www.damninteresting.com/?p=851== Quote from Walter Bright (newshound1 digitalmars.com)'s articleBut how the hell would you have delivered that. First of all you have to deliver chemistry and latex!Sometimes I think what if I were dropped naked back in time 20,000 years ago? Assuming I didn't get promptly cooked for dinner, what technology could I deliver that would have the most impact? I can't decide between iron, agriculture, or writing. I suspect writing. Every time humans got better at communicating, there was a huge increase in the rate of progress. speech writing printing telegraph telephone internetOne that noone seems to mention, not only on this NG but in general, is birth control. I think a pretty good argument can be made that a major reason for recent social advances is that, by only having 2-4 children per set of parents instead of 10-20, parents are able to invest much more in each child than they otherwise would be. The end result is a much more educated society and one with enough surplus resources to look beyond its mere collective survival to actually improving its state of knowledge, comfort, etc.
Mar 28 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrei Alexandrescu wrote:Walter Bright wrote:Since we're on the subject, I suppose you all have read the 1632 series by Eric Flint and others. Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknN718ACgkQd0kWM4JG3k9FwACfcac1Ksy7taWzPw4m+mAlY4n4 tlkAnR6wd7ODysCUByOnZsLIApTl34KJ =wHu8 -----END PGP SIGNATURE-----Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants).Doesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 28 2009
Jrme M. Berger wrote:Since we're on the subject, I suppose you all have read the 1632 series by Eric Flint and others.Natch!
Mar 28 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Walter Bright wrote:Jrme M. Berger wrote:In the "1632" novel, a small American town gets transported to middle Europe in the middle of the 30 years war when small skirmishes, let alone full blown battles, routinely killed several times the population of the town. The story is all about how they survive. Despite their vastly superior weapons and knowledge, it's not so easy. Sure they can kick the cr*p out of any army they engage, at least so long as their ammo lasts, but they are *vastly* outnumbered and military might won't feed them or prevent them from being outflanked. Moreover, most of their technical knowledge proves to be either too theoretical to use directly or to need some tools or resources that they can't make out of what's available to them now. In addition to fiction, the rest of the series includes several very interesting technical essays about the problems involved in bringing technical advances to the 17th century: what can be done immediately out of the available industrial base and how does that industrial base need to be improved for other technological advances. A must read if you are interested in this kind of things (which from the discussion here, you seem to be). Jerome - -- mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknPIjMACgkQd0kWM4JG3k8cWQCfQUNvHchyYiIp4b+K9ZTFp0Yh GzsAniFkw1/bUoZ+k38YRXVpMvXsYxGX =Nmpq -----END PGP SIGNATURE-----Since we're on the subject, I suppose you all have read the 1632 series by Eric Flint and others.Natch!
Mar 29 2009
Andrei Alexandrescu Wrote:Walter Bright wrote:Subject military_history = new Topic();Nick Sabalausky wrote:Sometimes I run these crazy calculations: how much modern firepower would be just enough to turn the odds in a classic battle? At Thermopilae, I think two Vickers with enough ammo would have been just about enough. Also at the Lord of the Rings 2 night castle defense, one machine gun would have sufficed (better protection and fewer assailants). AndreiDoesn't matter what you're making, OS or not, the choice of language *certainly* carries repercussions throughout a project. Sure Linux is doing fine with C. So what? It could probably be doing a lot better with D.It's like if you gave the Spartan Leonidas a Henry repeating rifle - he still would have lost at Thermopylae. But there is little doubt that one Henry repeating rifle is worth a hundred spear-chucking wicker-armored immortals.
Mar 28 2009
Cristian Vlasceanu wrote:Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).You're equating "systems language" with "language intended for writing a complete operating system". That's not what's intended. AFAIK there are no operating systems written solely in C++. Probably, D being a "systems language" actually means "D is competing with C++".
Mar 26 2009
Don wrote:Cristian Vlasceanu wrote:I'm surprised at how many people misunderstand the "systems language" or "systems-level programming" terms. Only a couple of months ago, a good friend whom I thought would know a lot better, mentioned that he thought a "systems-level language" is one that can be used to build large systems. AndreiHm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).You're equating "systems language" with "language intended for writing a complete operating system". That's not what's intended. AFAIK there are no operating systems written solely in C++. Probably, D being a "systems language" actually means "D is competing with C++".
Mar 26 2009
On Thu, 26 Mar 2009 16:33:09 -0400, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:Don wrote:wikipedia to the rescue! http://en.wikipedia.org/wiki/System_programming_language http://en.wikipedia.org/wiki/System_software -SteveCristian Vlasceanu wrote:I'm surprised at how many people misunderstand the "systems language" or "systems-level programming" terms. Only a couple of months ago, a good friend whom I thought would know a lot better, mentioned that he thought a "systems-level language" is one that can be used to build large systems.Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).You're equating "systems language" with "language intended for writing a complete operating system". That's not what's intended. AFAIK there are no operating systems written solely in C++. Probably, D being a "systems language" actually means "D is competing with C++".
Mar 26 2009
Cristian Vlasceanu wrote:Hm... how should I put it nicely... wait, I guess I can't: if you guys think D is a systems language, you are smelling your own farts! Because 1) GC magic and deterministic system level behavior are not exactly good friends, and 2) YOU DO NOT HAVE A SYSTEMS PROBLEM TO SOLVE. C was invented to write an OS in a portable fashion. Now that's a systems language. Unless you are designing the next uber OS, D is a solution in search of a problem, ergo not a systems language (sorry Walter). It is a great application language though, and if people really need custom allocation schemes, then they can write that part in C/C++ or even assembler (and I guess you can provide a custom run-time too, if you really DO HAVE a systems problem to address -- like developing for an embedded platform).Although D has gc support, it is possible (and rather easy) to write programs that do not rely at all on the gc. My port of Empire from C to D does exactly that. It is quite possible and practical to write an OS in D, and it has been done.
Mar 26 2009
It is quite possible and practical to write an OS in D, and it has been done.This is not what I am arguing. What I dislike is allowing both GC and non-GC allocation styles mixed within the same program. The D + GC runtime support is for user apps; D + non-GC is a SPL When I say "D is not a SPL" I mean the default D + GC configuration.
Mar 29 2009
bearophile Wrote:Steve Teale:So how do you interpret the error message?What am I missing here, isn't char[] a dynamic array?I suggest you to post such questions to the "learn" newsgroup. D dynamic arrays aren't objects, they are C-like structs that contain a just length and a pointer (no capacity). The "new" for them is needed only to allocate the memory they point to. So to define an empty dynamic array of chars: char[] ca; In D1 you can also just: string s1; To allocate a non empty array of chars of specified len: auto ca = new char[some_len]; Tale a look at the D docs, where such things are explained. Bye, bearophile
Mar 23 2009
Steve, It's not exactly prose, but the error message is correct. It says: "Error: new can only create structs, dynamic arrays or class objects, not char[]'s." So: 1. You didn't try to allocate space for a struct (e.g. new struct_t.) 2. You didn't try to allocate space for a dynamic array (new char[5].) 3. You didn't try to allocate space for a class object (new Class.) From your code, it's obvious what you were meaning to do, so I would agree that changing this would be good. Options I see are: 1. Improve the error message, e.g.: "Error: new can only create structs, sized dynamic arrays, or class objects; char[] cannot be created." 2. Change the compiler to react as if you used new char[0]. 3. Special case the error message, e.g.: "Error: new can only create dynamic arrays with an initial length, use 0 for empty." -[Unknown] Steve Teale wrote:bearophile Wrote:Steve Teale:So how do you interpret the error message?What am I missing here, isn't char[] a dynamic array?I suggest you to post such questions to the "learn" newsgroup. D dynamic arrays aren't objects, they are C-like structs that contain a just length and a pointer (no capacity). The "new" for them is needed only to allocate the memory they point to. So to define an empty dynamic array of chars: char[] ca; In D1 you can also just: string s1; To allocate a non empty array of chars of specified len: auto ca = new char[some_len]; Tale a look at the D docs, where such things are explained. Bye, bearophile
Mar 24 2009
Unknown W. Brackets Wrote:Steve, It's not exactly prose, but the error message is correct. It says: "Error: new can only create structs, dynamic arrays or class objects, not char[]'s." So: 1. You didn't try to allocate space for a struct (e.g. new struct_t.) 2. You didn't try to allocate space for a dynamic array (new char[5].) 3. You didn't try to allocate space for a class object (new Class.) From your code, it's obvious what you were meaning to do, so I would agree that changing this would be good. Options I see are: 1. Improve the error message, e.g.: "Error: new can only create structs, sized dynamic arrays, or class objects; char[] cannot be created." 2. Change the compiler to react as if you used new char[0]. 3. Special case the error message, e.g.: "Error: new can only create dynamic arrays with an initial length, use 0 for empty."Best answer yet! You win a free holiday in Tanzania (as long as you pay to get there). Yes it would be great if the error message gave you clue about specifying the size. Then, all the magic is removed, and you know just where you are. But even then, zero would be quite a good default!-[Unknown] Steve Teale wrote:bearophile Wrote:Steve Teale:So how do you interpret the error message?What am I missing here, isn't char[] a dynamic array?I suggest you to post such questions to the "learn" newsgroup. D dynamic arrays aren't objects, they are C-like structs that contain a just length and a pointer (no capacity). The "new" for them is needed only to allocate the memory they point to. So to define an empty dynamic array of chars: char[] ca; In D1 you can also just: string s1; To allocate a non empty array of chars of specified len: auto ca = new char[some_len]; Tale a look at the D docs, where such things are explained. Bye, bearophile
Mar 24 2009
Steve Teale wrote:Unknown W. Brackets Wrote:I don't mean to ruin anyone's holiday in Tanzania but zero is a crappy default. When I say new char[] it's not like I'm really hoping for a shortcut for new char[0]. It's more likely new char[] is really originating as new T where T = char[]. AndreiSteve, It's not exactly prose, but the error message is correct. It says: "Error: new can only create structs, dynamic arrays or class objects, not char[]'s." So: 1. You didn't try to allocate space for a struct (e.g. new struct_t.) 2. You didn't try to allocate space for a dynamic array (new char[5].) 3. You didn't try to allocate space for a class object (new Class.) From your code, it's obvious what you were meaning to do, so I would agree that changing this would be good. Options I see are: 1. Improve the error message, e.g.: "Error: new can only create structs, sized dynamic arrays, or class objects; char[] cannot be created." 2. Change the compiler to react as if you used new char[0]. 3. Special case the error message, e.g.: "Error: new can only create dynamic arrays with an initial length, use 0 for empty."Best answer yet! You win a free holiday in Tanzania (as long as you pay to get there). Yes it would be great if the error message gave you clue about specifying the size. Then, all the magic is removed, and you know just where you are. But even then, zero would be quite a good default!
Mar 24 2009
No, I agree. I think for the sake of templating, improving the error -[Unknown] Andrei Alexandrescu wrote:Steve Teale wrote:Unknown W. Brackets Wrote:I don't mean to ruin anyone's holiday in Tanzania but zero is a crappy default. When I say new char[] it's not like I'm really hoping for a shortcut for new char[0]. It's more likely new char[] is really originating as new T where T = char[]. AndreiSteve, It's not exactly prose, but the error message is correct. It says: "Error: new can only create structs, dynamic arrays or class objects, not char[]'s." So: 1. You didn't try to allocate space for a struct (e.g. new struct_t.) 2. You didn't try to allocate space for a dynamic array (new char[5].) 3. You didn't try to allocate space for a class object (new Class.) From your code, it's obvious what you were meaning to do, so I would agree that changing this would be good. Options I see are: 1. Improve the error message, e.g.: "Error: new can only create structs, sized dynamic arrays, or class objects; char[] cannot be created." 2. Change the compiler to react as if you used new char[0]. 3. Special case the error message, e.g.: "Error: new can only create dynamic arrays with an initial length, use 0 for empty."Best answer yet! You win a free holiday in Tanzania (as long as you pay to get there). Yes it would be great if the error message gave you clue about specifying the size. Then, all the magic is removed, and you know just where you are. But even then, zero would be quite a good default!
Mar 24 2009
Andrei Alexandrescu Wrote:Derek Parnell wrote:Well, thanks for that, I already got flamed for asking a beginner question! As you say, the function of new is fuzzy, and the error message is misleading.On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote:I think the question is very legit. char[] is a type like any other type. What if I want to create a pointer to an array?void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?I believe that the message is wrong, or at least misleading. The 'dynamic' here does not mean variable-length arrays but not 'static' - as in ... address is not known at compile time. The 'new' is supposed to create something on the heap and return a pointer/reference to it. Thus structs, fix-length arrays, and class objects are obvious candidates for that. Variable-length arrays are always created on the heap anyway, so to ask for a 'new char[]' is asking for the 8-byte pseudo-struct for the array to be created on the heap (which would not be initialized to anything) and return a pointer to it. This would give you one more level of indirection that you're probably not expecting. The normal way to create an empty (new, as in never been used yet) char[] is simply ... void str() { char[] s; } But you knew (no pun intended) that already. What you were actually asking for is more like ... struct dynary { size_t len; void *data; } void str() { auto s = cast(char[]*)(new dynary); } void main() { str(); }new is a really bad construct. I'm very unhappy that D inherited it. Andrei P.S. The way you create a pointer to an array is: auto weird = (new char[][1]).ptr;
Mar 23 2009
Reply to Steve,Well, thanks for that, I already got flamed for asking a beginner question!Where?
Mar 23 2009
BCS:Steve:Maybe by me at the beginning, but I didn't mean to sound harsh. (And I was partially wrong anyway, not seeing still the purpose of allocating a dynamic array struct on the heap). Bye, bearophileWell, thanks for that, I already got flamed for asking a beginner question!Where?
Mar 23 2009
struct Temp(T) { T t; } T* allocate(T)() { auto wrap = new Temp!(T); return &wrap.t; }
Mar 23 2009