Re: Why Ruby?
On 21/12/2010 20:46, Steven Schveighoffer wrote: On Tue, 21 Dec 2010 14:50:21 -0500, Bruno Medeiros brunodomedeiros+spam@com.gmail wrote: In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Those aren't bugs, they are the artistic qualities of my program! It's a statement on the political bias against bugs, I mean most people kill bugs without a second thought! ;) -Steve I'm not sure if my meaning was fully understood thete, but I wasn't implying it was a programmer tried to masquerade problems in code by saying it is artistic or something. Rather it was a not-so-thinly veiled reference (and critique) of Paul Graham's painter hacker/programmer archetype. -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
On 21/12/2010 20:55, retard wrote: My experiences in several language communities have shown that programmers easily resort to emotional, completely irrational arguments. It's best to avoid these kind of arguments as much as possible. Passionate people seem to favor this juxtapositioning. http://www.penny-arcade.com/comic/2004/3/19/ Penny Arcade is about games, but I'd say that theory applies to just about any internet community, including programmers. Especially in the FOSS world. -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
http://www.penny-arcade.com/comic/2004/3/19/ Penny Arcade is about games, but I'd say that theory applies to just about any internet community, including programmers. Especially in the FOSS world. I have seen that and similar pictures many times, but never fully understand what they are trying to say. 1. Anonymity is bad? (My answer: if anonymity is using nicks instead of names, certainly no) 2. We all are nothing but total fuckwads (whatever that means)? (My answer: possibly yes) 3. What the hell anonymity actually mean in internet anyways? (My answer: i am not sure) For example, i am using a nick (instead of a random name, which might be as well forged), because i hate seeing my name everywhere, good or bad.
Re: Why Ruby?
I agree with you. We should ask a woman how she felt about that.
Re: Why Ruby?
Nick Sabalausky wrote: Sounds a bit Zen Buddhist or maybe Taoist to me. Gravity - it's the law.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 19/12/10 4:41 PM, Caligo wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Some game developers do that. The vast majority do not. I don't think it's fair to insult developers in general based on the actions of a few. You might as well say there's no honor in software development because some people write viruses and other malware.
Re: Why Ruby?
On 11/12/2010 01:26, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. Whoa. Over the last 5 years or so, with surge in popularity of dynamic languages like Ruby, Python, etc., I've seen several arguments put forth in favor of dynamic typing, and gradually I've always found there was a /subtle/ parallel with the arguments and reasons put forth for libertarian/anti-authoritarian/anti-corporate ideologies. After seeing this talk, I guess it's not so subtle after all... ~_~' Let me offer my thoughts on this. I don't think his argument is fundamentally rational. And I don't just mean wrong or illogical, I mean /irrational/: it is driven by an emotional bias of something not related to programmer productivity, which is what the discussion should be about. And I think his opinion is somewhat generally representative of many dynamic language proponents. What I think is happening is this: These people, if and when they program on languages with static typing, they get annoyed by some (or all) of the aspects of static typing. That's normal so far, but now the problem is that while some of this annoyance may be driven from a genuine questioning of whether static typing is worth it or not (in usefulness and productivity), the rest of the annoyance is instead driven by an external emotional factor: if the language doesn't let you do something that it could easily let you do, then it is perceived as a restriction of your freedoms. The programmer makes an emotional connection to personal issues unrelated to the field of programming. Another variant of this emotional response in this situation, and probably a much more common one, is not about political ideology, but rather the programmer perceives the language restriction to be part of a corporate culture that says that programmers are not smart enough to be fully trusted, and they need to be controlled to make sure they don't do stupid things. In other words the language thinks your are a dumb monkey who needs to be kept in line. Java is the poster child for this mentality, not only due to the language itself which is perceived to be simplistic, but also due to Java's strong association to the corporate and enterprise world. In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Unfortunately this emotional response is often not fully conscious, or at least, it is not clearly expressed to others by the underlying programmer. And once this happens, _everything is lost from the beginning, in terms of trying to have a sensible debate._ Because from now on, these programmers will use half-baked arguments to try to justify their preference of dynamic languages. The arguments will be half-baked because they will try to argue in the area of effectiveness (programmer productivity), yet the main reason they like/dislike the language is the attitude of the language creators and/or community. (Interestingly enough, an incredibly similar cognitive-dissonance driven fallacy happens in discussions of actual political ideologies) (Note, I'm not saying this is the case with all programmers, or even most, of the proponents of dynamic typing. In particular, nor I am saying it's the case with Ary :p ) BTW, for a while I was quite okay with this talk, because the author seemed to make clear what the liked about Ruby was the underlying attitude. He mentioned the language design goal of making the programmer happy. He mentioned all those quirks of the community like the 'second' property, the 42 one, the cheerleaders at the convention, etc.. But then he made those comments about how static typing is there in Java and other languages because it is thought programmers are too stupid to be able to handle things otherwise (don't remember his exact words), or even worse, the comment/point about how many programmers in the audience made a bug because of not specifying a type... And from that point it was easy to go downhill, and indeed the talk did. Although I am happy for him making that explicit parallel with political ideology, it illustrates my point very well, even if not all Ruby developers would agree with him 100%. Note that all of what I said above is a comment about the nature of the discussion of static vs. typing. I didn't make an actual argument for or against static typing (in case you were thinking this was the intention). I won't do that now, I'll just say that, not only I am a long-time proponent of static typing, in the last few years
Re: Why Ruby?
On 18/12/2010 05:54, Caligo wrote: IMO there is no honor in game development as it contributes nothing to society. You don't think entertainment contributes to society? -- Bruno Medeiros - Software Engineer
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 19/12/2010 14:21, Ary Borenszweig wrote: Seeing the enemy being literally eaten by hundreds of upgraded zerglings has no comparison. :-) I'm more of a Protoss guy myself... Reaver drop FTW! (I'll need to re-evaluate things with Starcraft II) BTW, its funny to try to make some parallels between the races and languages: Protoss == Java. Very powerful, teleports ready made structures from other dimensions (= all the libraries, middleware, app stack that is readily available). But still needs some setup (pylons). And very expensive in resources (slow), and very dependent on energy (GC-activity / having enough free memory). Humans == C++: also quite powerful, but dirty, smelly, crude, oily, smoke filled, patchy. Breaks often and needs constant repairs (SCV repairs, otherwise blows up in flames). Non elegant. Can mount a good defense/offense anywhere on the map (siege tanks, bunker forward build attacks). But not as agile. Ruby == Zerg. Utter chaos. Units can evolve into other units (dynamic typing). Very good for rushes and early game attacks (= rapid application deploying, kekekeke Rails Rush, gg). Very fast, very agile (=agile). Nydus Canals = Monkey Patching (likes to break abstractions). -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
On 13/12/2010 20:25, Paolo Invernizzi wrote: Also with bugs (the most hated is the *freeze* one), I'm still using Descent every single day, to code in D in the company where I work. By far it is the most productive and incredible D IDE (sorry Bruno, I *relly* hope that DDT will catch up!). I'm hoping for that as well! -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
On 11/12/2010 13:53, Ary Borenszweig wrote: I guess what I liked about it (and Ruby) is that I see everything is very consistent and nice to my eyes. I never squeeze my brian to understand a piece of code, nor I had to deal with __some__strange variable names, or even __keywords. Code is read many more times than it is written and so it is of huge important that code is as readable as possible. Of course this is a subjective matter, but I don't understand why some people think __traits or __gshared are ok. So what if those are compiler extensions or whatever? I don't want to stop thinking about those details of a programming language when I'm dealing with another problem. When I read Ruby code I feel like I'm reading an English textbook (better, a poem :-P), while why I read other languages I feel I'm reading... well, a programming language. And my head is so much better at reading text than reading machine code. Then, other things in D like properties for which you do ++ don't work or such corner cases doesn't happen in Ruby. It's consistent. Once Ruby defines something, it does it well, not just half through it. I see what with mean with consistency, and I agree with that. Especially in regards to criticism of D, yeah, there is a lot of stuff I think that could be simplified, removed, made consistent, cleaned, generalized, etc.. But I would never trade those downsides for a language with dynamic typing, not even close! And this regardless of whether the language is systems programmings (like D), or not (like Java). -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
On 13/12/2010 15:49, Andrei Alexandrescu wrote: On 12/13/10 9:11 AM, Jeff Nowakowski wrote: On 12/13/2010 09:08 AM, Ary Borenszweig wrote: Yes I am :-) Since you were the Descent author, I wonder how you feel about Ruby's lack of static typing. In the video, the speaker bashes type safety as having your balls fondled at the airport, that is, security theater that doesn't accomplish much. By the way, I couldn't stop cringing at the distasteful, male-centric sexual jokes that the talk is peppered with. Wonder if there was any woman in the audience, and how she might have felt. And this is not a ghetto rant - it's the keynote of a major Ruby conference! (And I'm definitely not a prude.) Am I alone in thinking that this is not what our metier should evolve into? Besides, the argument in favor of dynamic typing is one of the most disingenuous around. C is a language for consenting adults that gives you that kind of freedom. If we took the speaker's arguments to their logical conclusion, Ruby would be a language for people who don't care about correctness, despise efficiency, and have contempt for modularity. Ah, hold on a second. I agree the talk was rude and unprofessional (not that it was meant to be either), but I disagree it was sexist or offensive to women. Looking at the comment in question, having your balls fondled at the airport, it's simply something that you cannot convey with anywhere the same meaning in a gender-neutral way (having your gonads fondled at the airports?... having your genitals fondled at the airport?... having your crotch fondled at the airport?...) For better or worse, balls has become a metaphor for braveness, boldness, power, recklessness, (or a combination therefore), and has even been applied to women some times (does she have the balls to do that?). -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
Bruno Medeiros brunodomedeiros+s...@com.gmail wrote in message news:ier0hh$us...@digitalmars.com... On 11/12/2010 01:26, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. Whoa. Over the last 5 years or so, with surge in popularity of dynamic languages like Ruby, Python, etc., I've seen several arguments put forth in favor of dynamic typing, and gradually I've always found there was a /subtle/ parallel with the arguments and reasons put forth for libertarian/anti-authoritarian/anti-corporate ideologies. After seeing this talk, I guess it's not so subtle after all... ~_~' Let me offer my thoughts on this. I don't think his argument is fundamentally rational. And I don't just mean wrong or illogical, I mean /irrational/: it is driven by an emotional bias of something not related to programmer productivity, which is what the discussion should be about. And I think his opinion is somewhat generally representative of many dynamic language proponents. What I think is happening is this: These people, if and when they program on languages with static typing, they get annoyed by some (or all) of the aspects of static typing. That's normal so far, but now the problem is that while some of this annoyance may be driven from a genuine questioning of whether static typing is worth it or not (in usefulness and productivity), the rest of the annoyance is instead driven by an external emotional factor: if the language doesn't let you do something that it could easily let you do, then it is perceived as a restriction of your freedoms. The programmer makes an emotional connection to personal issues unrelated to the field of programming. Another variant of this emotional response in this situation, and probably a much more common one, is not about political ideology, but rather the programmer perceives the language restriction to be part of a corporate culture that says that programmers are not smart enough to be fully trusted, and they need to be controlled to make sure they don't do stupid things. In other words the language thinks your are a dumb monkey who needs to be kept in line. Java is the poster child for this mentality, not only due to the language itself which is perceived to be simplistic, but also due to Java's strong association to the corporate and enterprise world. In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Unfortunately this emotional response is often not fully conscious, or at least, it is not clearly expressed to others by the underlying programmer. And once this happens, _everything is lost from the beginning, in terms of trying to have a sensible debate._ Because from now on, these programmers will use half-baked arguments to try to justify their preference of dynamic languages. The arguments will be half-baked because they will try to argue in the area of effectiveness (programmer productivity), yet the main reason they like/dislike the language is the attitude of the language creators and/or community. (Interestingly enough, an incredibly similar cognitive-dissonance driven fallacy happens in discussions of actual political ideologies) (Note, I'm not saying this is the case with all programmers, or even most, of the proponents of dynamic typing. In particular, nor I am saying it's the case with Ary :p ) BTW, for a while I was quite okay with this talk, because the author seemed to make clear what the liked about Ruby was the underlying attitude. He mentioned the language design goal of making the programmer happy. He mentioned all those quirks of the community like the 'second' property, the 42 one, the cheerleaders at the convention, etc.. But then he made those comments about how static typing is there in Java and other languages because it is thought programmers are too stupid to be able to handle things otherwise (don't remember his exact words), or even worse, the comment/point about how many programmers in the audience made a bug because of not specifying a type... And from that point it was easy to go downhill, and indeed the talk did. Although I am happy for him making that explicit parallel with political ideology, it illustrates my point very well, even if not all Ruby developers would agree with him 100%. Note that all of what I said above is a comment about the nature of the discussion of static vs. typing. I didn't make an actual argument for or against static typing (in case
Re: Why Ruby?
On Tue, 21 Dec 2010 14:50:21 -0500, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Those aren't bugs, they are the artistic qualities of my program! It's a statement on the political bias against bugs, I mean most people kill bugs without a second thought! ;) -Steve
Re: Why Ruby?
Tue, 21 Dec 2010 19:50:21 +, Bruno Medeiros wrote: On 11/12/2010 01:26, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. Whoa. Over the last 5 years or so, with surge in popularity of dynamic languages like Ruby, Python, etc., I've seen several arguments put forth in favor of dynamic typing, and gradually I've always found there was a /subtle/ parallel with the arguments and reasons put forth for libertarian/anti-authoritarian/anti-corporate ideologies. After seeing this talk, I guess it's not so subtle after all... ~_~' Let me offer my thoughts on this. I don't think his argument is fundamentally rational. And I don't just mean wrong or illogical, I mean /irrational/: it is driven by an emotional bias of something not related to programmer productivity, which is what the discussion should be about. And I think his opinion is somewhat generally representative of many dynamic language proponents. What I think is happening is this: These people, if and when they program on languages with static typing, they get annoyed by some (or all) of the aspects of static typing. That's normal so far, but now the problem is that while some of this annoyance may be driven from a genuine questioning of whether static typing is worth it or not (in usefulness and productivity), the rest of the annoyance is instead driven by an external emotional factor: if the language doesn't let you do something that it could easily let you do, then it is perceived as a restriction of your freedoms. The programmer makes an emotional connection to personal issues unrelated to the field of programming. Another variant of this emotional response in this situation, and probably a much more common one, is not about political ideology, but rather the programmer perceives the language restriction to be part of a corporate culture that says that programmers are not smart enough to be fully trusted, and they need to be controlled to make sure they don't do stupid things. In other words the language thinks your are a dumb monkey who needs to be kept in line. Java is the poster child for this mentality, not only due to the language itself which is perceived to be simplistic, but also due to Java's strong association to the corporate and enterprise world. In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Unfortunately this emotional response is often not fully conscious, or at least, it is not clearly expressed to others by the underlying programmer. And once this happens, _everything is lost from the beginning, in terms of trying to have a sensible debate._ Because from now on, these programmers will use half-baked arguments to try to justify their preference of dynamic languages. The arguments will be half-baked because they will try to argue in the area of effectiveness (programmer productivity), yet the main reason they like/dislike the language is the attitude of the language creators and/or community. (Interestingly enough, an incredibly similar cognitive-dissonance driven fallacy happens in discussions of actual political ideologies) (Note, I'm not saying this is the case with all programmers, or even most, of the proponents of dynamic typing. In particular, nor I am saying it's the case with Ary :p ) BTW, for a while I was quite okay with this talk, because the author seemed to make clear what the liked about Ruby was the underlying attitude. He mentioned the language design goal of making the programmer happy. He mentioned all those quirks of the community like the 'second' property, the 42 one, the cheerleaders at the convention, etc.. But then he made those comments about how static typing is there in Java and other languages because it is thought programmers are too stupid to be able to handle things otherwise (don't remember his exact words), or even worse, the comment/point about how many programmers in the audience made a bug because of not specifying a type... And from that point it was easy to go downhill, and indeed the talk did. Although I am happy for him making that explicit parallel with political ideology, it illustrates my point very well, even if not all Ruby developers would agree with him 100%. Note that all of what I said above is a comment about the nature of the discussion of static vs. typing. I didn't make an actual argument for or against static typing (in case you were thinking this was the intention). I won't do that now, I'll just say that, not only
Re: Why Ruby?
retard wrote: Book: You must always do A and should also prefer choices like B. Me: why? Book: Just do it, don't think. A novice follows the rules because he is told to. A master follows the rules because he understands them. A guru breaks the rules because the rules don't always apply.
Re: Why Ruby?
On 21/12/2010 21:24, Andrei Alexandrescu wrote: On 12/21/10 2:38 PM, Bruno Medeiros wrote: On 13/12/2010 15:49, Andrei Alexandrescu wrote: On 12/13/10 9:11 AM, Jeff Nowakowski wrote: On 12/13/2010 09:08 AM, Ary Borenszweig wrote: Yes I am :-) Since you were the Descent author, I wonder how you feel about Ruby's lack of static typing. In the video, the speaker bashes type safety as having your balls fondled at the airport, that is, security theater that doesn't accomplish much. By the way, I couldn't stop cringing at the distasteful, male-centric sexual jokes that the talk is peppered with. Wonder if there was any woman in the audience, and how she might have felt. And this is not a ghetto rant - it's the keynote of a major Ruby conference! (And I'm definitely not a prude.) Am I alone in thinking that this is not what our metier should evolve into? Besides, the argument in favor of dynamic typing is one of the most disingenuous around. C is a language for consenting adults that gives you that kind of freedom. If we took the speaker's arguments to their logical conclusion, Ruby would be a language for people who don't care about correctness, despise efficiency, and have contempt for modularity. Ah, hold on a second. I agree the talk was rude and unprofessional (not that it was meant to be either), but I disagree it was sexist or offensive to women. Looking at the comment in question, having your balls fondled at the airport, it's simply something that you cannot convey with anywhere the same meaning in a gender-neutral way (having your gonads fondled at the airports?... having your genitals fondled at the airport?... having your crotch fondled at the airport?...) You presuppose there's a need to stick with the original metaphor. There are many good metaphors to use, and there are a lot of good jokes around the porn scanners. For better or worse, balls has become a metaphor for braveness, boldness, power, recklessness, (or a combination therefore), and has even been applied to women some times (does she have the balls to do that?). There are a lot of actually good jokes around that topic. I think this one, for example, is not gross at all: when describing the shortcomings of iterators, I mentioned you have to have a pair to do anything. I delivered that with a straight face and it was really interesting to see the audience slowly getting the doublespeak and starting to laugh with various latencies. I am subjective but I think that one is firmly on the opposite side of a thin line than the fondled balls joke. Andrei I forgot part of my argument actually: Just as the balls metaphor has that meaning, conversely, being grabbed by the balls means kinda the opposite: being subjugated, dominated, restrained, kept-under-control, emasculated, etc.. So I think the having your balls fondled at the airport is a direct allusion to that metaphor, which goes in line with the talk's general theme of anti-authoritarianism. So yes, I am presupposing there's a need to stick with the original metaphor. (in order to convey the subjugation meaning/allusion.) -- Bruno Medeiros - Software Engineer
Re: Why Ruby?
On Tuesday, December 21, 2010 13:37:55 Walter Bright wrote: retard wrote: Book: You must always do A and should also prefer choices like B. Me: why? Book: Just do it, don't think. A novice follows the rules because he is told to. A master follows the rules because he understands them. A guru breaks the rules because the rules don't always apply. So, is that a (possibly paraphrased) quote or just highly quotable? - Jonathan M Davis
Re: Why Ruby?
On 12/21/10 4:02 PM, Bruno Medeiros wrote: On 21/12/2010 21:24, Andrei Alexandrescu wrote: On 12/21/10 2:38 PM, Bruno Medeiros wrote: On 13/12/2010 15:49, Andrei Alexandrescu wrote: On 12/13/10 9:11 AM, Jeff Nowakowski wrote: On 12/13/2010 09:08 AM, Ary Borenszweig wrote: Yes I am :-) Since you were the Descent author, I wonder how you feel about Ruby's lack of static typing. In the video, the speaker bashes type safety as having your balls fondled at the airport, that is, security theater that doesn't accomplish much. By the way, I couldn't stop cringing at the distasteful, male-centric sexual jokes that the talk is peppered with. Wonder if there was any woman in the audience, and how she might have felt. And this is not a ghetto rant - it's the keynote of a major Ruby conference! (And I'm definitely not a prude.) Am I alone in thinking that this is not what our metier should evolve into? Besides, the argument in favor of dynamic typing is one of the most disingenuous around. C is a language for consenting adults that gives you that kind of freedom. If we took the speaker's arguments to their logical conclusion, Ruby would be a language for people who don't care about correctness, despise efficiency, and have contempt for modularity. Ah, hold on a second. I agree the talk was rude and unprofessional (not that it was meant to be either), but I disagree it was sexist or offensive to women. Looking at the comment in question, having your balls fondled at the airport, it's simply something that you cannot convey with anywhere the same meaning in a gender-neutral way (having your gonads fondled at the airports?... having your genitals fondled at the airport?... having your crotch fondled at the airport?...) You presuppose there's a need to stick with the original metaphor. There are many good metaphors to use, and there are a lot of good jokes around the porn scanners. For better or worse, balls has become a metaphor for braveness, boldness, power, recklessness, (or a combination therefore), and has even been applied to women some times (does she have the balls to do that?). There are a lot of actually good jokes around that topic. I think this one, for example, is not gross at all: when describing the shortcomings of iterators, I mentioned you have to have a pair to do anything. I delivered that with a straight face and it was really interesting to see the audience slowly getting the doublespeak and starting to laugh with various latencies. I am subjective but I think that one is firmly on the opposite side of a thin line than the fondled balls joke. Andrei I forgot part of my argument actually: Just as the balls metaphor has that meaning, conversely, being grabbed by the balls means kinda the opposite: being subjugated, dominated, restrained, kept-under-control, emasculated, etc.. So I think the having your balls fondled at the airport is a direct allusion to that metaphor, which goes in line with the talk's general theme of anti-authoritarianism. So yes, I am presupposing there's a need to stick with the original metaphor. (in order to convey the subjugation meaning/allusion.) I'd almost agree had the word fondled been absent :o). Andrei
Re: Why Ruby?
Jonathan M Davis wrote: On Tuesday, December 21, 2010 13:37:55 Walter Bright wrote: retard wrote: Book: You must always do A and should also prefer choices like B. Me: why? Book: Just do it, don't think. A novice follows the rules because he is told to. A master follows the rules because he understands them. A guru breaks the rules because the rules don't always apply. So, is that a (possibly paraphrased) quote or just highly quotable? I heard it a very long time ago, and I do not know where it originated, or even if it wasn't just coined by my friends.
Re: Why Ruby?
2010/12/21 Walter Bright newshou...@digitalmars.com: Jonathan M Davis wrote: On Tuesday, December 21, 2010 13:37:55 Walter Bright wrote: A novice follows the rules because he is told to. A master follows the rules because he understands them. A guru breaks the rules because the rules don't always apply. So, is that a (possibly paraphrased) quote or just highly quotable? I heard it a very long time ago, and I do not know where it originated, or even if it wasn't just coined by my friends. I think it stems from a traditional Japanese model of learning, known as the Shu-Ha-Ri. As usual, Wikipedia gives a good overview. http://en.wikipedia.org/wiki/Shuhari
Re: Why Ruby?
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:ier8i4$1db...@digitalmars.com... On 12/21/10 4:02 PM, Bruno Medeiros wrote: On 21/12/2010 21:24, Andrei Alexandrescu wrote: On 12/21/10 2:38 PM, Bruno Medeiros wrote: On 13/12/2010 15:49, Andrei Alexandrescu wrote: On 12/13/10 9:11 AM, Jeff Nowakowski wrote: On 12/13/2010 09:08 AM, Ary Borenszweig wrote: Yes I am :-) Since you were the Descent author, I wonder how you feel about Ruby's lack of static typing. In the video, the speaker bashes type safety as having your balls fondled at the airport, that is, security theater that doesn't accomplish much. By the way, I couldn't stop cringing at the distasteful, male-centric sexual jokes that the talk is peppered with. Wonder if there was any woman in the audience, and how she might have felt. And this is not a ghetto rant - it's the keynote of a major Ruby conference! (And I'm definitely not a prude.) Am I alone in thinking that this is not what our metier should evolve into? Besides, the argument in favor of dynamic typing is one of the most disingenuous around. C is a language for consenting adults that gives you that kind of freedom. If we took the speaker's arguments to their logical conclusion, Ruby would be a language for people who don't care about correctness, despise efficiency, and have contempt for modularity. Ah, hold on a second. I agree the talk was rude and unprofessional (not that it was meant to be either), but I disagree it was sexist or offensive to women. Looking at the comment in question, having your balls fondled at the airport, it's simply something that you cannot convey with anywhere the same meaning in a gender-neutral way (having your gonads fondled at the airports?... having your genitals fondled at the airport?... having your crotch fondled at the airport?...) You presuppose there's a need to stick with the original metaphor. There are many good metaphors to use, and there are a lot of good jokes around the porn scanners. For better or worse, balls has become a metaphor for braveness, boldness, power, recklessness, (or a combination therefore), and has even been applied to women some times (does she have the balls to do that?). There are a lot of actually good jokes around that topic. I think this one, for example, is not gross at all: when describing the shortcomings of iterators, I mentioned you have to have a pair to do anything. I delivered that with a straight face and it was really interesting to see the audience slowly getting the doublespeak and starting to laugh with various latencies. I am subjective but I think that one is firmly on the opposite side of a thin line than the fondled balls joke. Andrei I forgot part of my argument actually: Just as the balls metaphor has that meaning, conversely, being grabbed by the balls means kinda the opposite: being subjugated, dominated, restrained, kept-under-control, emasculated, etc.. So I think the having your balls fondled at the airport is a direct allusion to that metaphor, which goes in line with the talk's general theme of anti-authoritarianism. So yes, I am presupposing there's a need to stick with the original metaphor. (in order to convey the subjugation meaning/allusion.) I'd almost agree had the word fondled been absent :o). This is what makes me question the existence of anti-female sexism in the joke: Replace the word balls with either breasts or any slang (or non-slang) term for female genitalia. Maybe replace the speaker with a woman, too, I don't care, either way. Or keep the word balls and make the speaker a woman. Any combination, whatever. Would that make it offensive to men? Maybe I'm just really weird as far as men go, but I honestly can't see how it would be. I certainly wouldn't take offense to it, no matter how you arranged the male/female-ness. But I can certainly imagine people that would still wave an offensive to women banner. So unless I just have a really bad grasp of human behavior (and knowing me, I very well might), what we have is a situation where references to any gender-specific body part is offensive to...women and only women. Which triggers the Reductio ad absurdum flag in my mind.
Re: Why Ruby?
Walter Bright newshou...@digitalmars.com wrote in message news:ier98d$1ec...@digitalmars.com... Jonathan M Davis wrote: On Tuesday, December 21, 2010 13:37:55 Walter Bright wrote: retard wrote: Book: You must always do A and should also prefer choices like B. Me: why? Book: Just do it, don't think. A novice follows the rules because he is told to. A master follows the rules because he understands them. A guru breaks the rules because the rules don't always apply. So, is that a (possibly paraphrased) quote or just highly quotable? I heard it a very long time ago, and I do not know where it originated, or even if it wasn't just coined by my friends. Sounds a bit Zen Buddhist or maybe Taoist to me.
Re: Why Ruby?
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vn2zzvlceav...@steve-laptop... On Tue, 21 Dec 2010 14:50:21 -0500, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: In a less extreme view, it is not about controlling stupidity, but controlling creativity (a view popular amongst artist/painter programmers). So here the programmers are not dumb, but still they need to be kept in line with rules, constraints, specifications, strict APIs, etc.. You can't do anything too strange or out of the ordinary, and the language is a reflection of that, especially with regards to restrictions on dynamic typing (and other dynamic stuff like runtime class modification). Those aren't bugs, they are the artistic qualities of my program! It's a statement on the political bias against bugs, I mean most people kill bugs without a second thought! Or even worse, they try to fix bugs...just like people will fix their pets, or how tyrants will fix their opposition or their scapegoats. Save the bugs! Thay have just as much a right to exist as any compiler or audio codec! Ok, I'm done now :)
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/20/2010 08:43 AM, Walter Bright wrote: bearophile wrote: Many games are like drugs. Not for me. I get bored with games. You don't get bored with drugs. You didn't play StarCraft when you were a teenager.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/19/2010 09:48 PM, Nick Sabalausky wrote: Assuming you meant that as a sarcastic counter-example: There may be ways in which they make life suck less, but *overall*, they're generally considered to make life suck *more*. So the make life suck less rule still holds. Although, if you meant it seriously then nevermind: The whole drug-legalization issue is one of the few debates I actively avoid :) I have no clear opinion about games, though I do believe they carry some similarity with drugs in the way they make a person neglect stuff important for his survival in the reality he was born into.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Caligo Wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. The fact is all humans build their own reality - yes - because they're not fond of the raw nature. What you try to say is actually Hey, they live different lives! HATEHATEHATE!!!
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/20/10 04:25, Max Samukha wrote: On 12/19/2010 09:48 PM, Nick Sabalausky wrote: Assuming you meant that as a sarcastic counter-example: There may be ways in which they make life suck less, but *overall*, they're generally considered to make life suck *more*. So the make life suck less rule still holds. Although, if you meant it seriously then nevermind: The whole drug-legalization issue is one of the few debates I actively avoid :) I have no clear opinion about games, though I do believe they carry some similarity with drugs in the way they make a person neglect stuff important for his survival in the reality he was born into. That's a (sadly common) problem with people, though; not with games. The same can be validly stated for television (which I usually avoid, anyhow), sports, over-reliance on restaurants (a personal pet peeve), and checking the D newsgroups... oh shi- -- Chris N-S
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/19/10 14:00, Nick Sabalausky wrote: Caligo iteronve...@gmail.com wrote in message news:mailman.30.1292776925.4748.digitalmar...@puremagic.com... You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. The old games as drugs argument. First of all, anyone who's a slave to psychological tricks is an idiot anyway. Casinos use many psychological tricks to induce addiction and yet most people are perfectly able to control themselves. Secondly, if you see movies, music, comics and novels as the same dishonorable escapism, then I'll grant that your reasoning is at least logically sound, even though you're in an extremely tiny minority on that viewpoint. If not, however, then you're whole argument crumbles into a giant pile of blatant bullshit, and clearly far too much of an imbicile to even continue discussing this with. If it helps any, I'm not one of those baby boomers. I'm actually in my early twenties. So if you are going to insult me at least do it properly. Fine, but that does make you the exception. You sound way too angry and unhappy. I just have no tolerance for such obvious lies and idiocy. Instead of playing video games, you should definitely pick up Ruby if you haven't already. I hear it's designed to make programmers happy. I realize you mean that in jest, but I actually have been using Ruby (Rake) as the build system for a big web project. It gets the job done, but I'm not exactly impressed with it. Take a look at Thor sometime. It's a replacement for Rake, and for some jobs can be better. Rails/3.x is apparently adopting it (or has adopted it... I haven't made the jump to 3 yet). https://github.com/wycats/thor -- Chris N-S
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Nick Sabalausky Wrote: Yea, and another thing is the matter of art in general: If you're an ultra-utilitarian like Christopher seems to be (and even most programmers aren't ultra-utilitarian), then art can be seen as lacking significant contribution to society. I think, the effect of art is quite tangible, so I see no reason to not call it utilitarian.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Christopher Nicholson-Sauls Wrote: That's a (sadly common) problem with people, though; not with games. The same can be validly stated for television (which I usually avoid, anyhow), sports, over-reliance on restaurants (a personal pet peeve), and checking the D newsgroups... oh shi- I hope Walter won't spend 6 hours per day checking the D newsgroups... :3
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/19/10 14:52, Nick Sabalausky wrote: Daniel Gibson metalcae...@gmail.com wrote in message news:mailman.37.1292790264.4748.digitalmar...@puremagic.com... On Sun, Dec 19, 2010 at 5:41 PM, Caligo iteronve...@gmail.com wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. This is bullshit. Of course there are games with that goal (WoW, ...), but this doesn't make game development in general unhonorable. There are many games that are not like this, for example most single player only games.. you play them until the end or until you can't get any further and that's it.. maybe you play them again in the future, but it's not like a constant addiction. (I'm not saying that multi player games are generally more dangerous or anything, single player games are just an example everybody should be able to comprehend) There are also game developers who openly label games like WoW unethical, e.g. http://en.wikipedia.org/wiki/Jonathan_Blow Interesting. I don't think I would go so far as to claim that WoW was unethical...just uninteresting ;) But that's just me. This is at least one thing the videogame world does that I do consider unethical: Proprietary/Closed platforms. But that's not just a videogame thing, of course. I consider proprietary/closed platforms in general to be unethical. (Oh crap, I think I can feel myself turning into Stallman!) (On the upside, that means you get to grow an epic beard.)
Re: Why Ruby?
On 19.12.2010 14:22, Alex_Dovhal wrote: Stephan Sollerstephan.sol...@helionweb.de wrote: I don't think that the syntax improvement of chaining is worth such an effort. It adds tons of complexity for only a very limited gain. I'm not sure if I could write such self-parsed code without thinking about that pipeline. I think I don't fully understand what you mean by syntax improvement for chaining. This my code is almost possible to run but needs some time and work (to get round CTFE limitations, enhance parser). But syntax parser behind it is rather primitive, if to use external tools one can make much better syntax parsers with much less efford. I read your post in the context of method chaining with templates like filter! and map!. Looks like I missed the point. :) I think your idea is pretty impressive. Maybe useful for some high-level stuff like mathematical formulas.
Re: Why Ruby?
Stephan Soller stephan.sol...@helionweb.de wrote I read your post in the context of method chaining with templates like filter! and map!. Looks like I missed the point. :) I think your idea is pretty impressive. Maybe useful for some high-level stuff like mathematical formulas. Yes, I borrowed the idea and syntax (changed a little) from Maxima CAS (computer algebra system - system for symbolically manipulating algerbraic formulaes) - there they have functions like makelist(i*i, i, 1, 10), sum(i*i, i, 1, 10), prod... etc. which appealed me so much. That expression in Maxima is converted to LISP and then calculated and send back to CAS. Here string is parsed to AST and then form new string to be mixed in D code.
Re: Why Ruby?
On 2010-12-19 22:02, Michel Fortin wrote: On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said: I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. I also want to add that the code bloat in the D/Objective-C bridge was more because the bridge needed to create two stubs for each method in all Cocoa classes, and those stubs contained code to translate exceptions from one model to the other. Using templates and mixins made the creation of those stubs easy, but I don't think another method of generating these stubs would have faired better. I was thinking about having the tool that creates the bindings generating all the necessary code inline and skip all the templates, just to see if there would be a difference in the speed of the compilation and the size of the generated binaries. So the bloat came from the approach (generating stubs for everything) much more than the implementation choice (templates). The new approach is to avoid having to generate stubs by exposing directly the Objective-C objects rather than wrappers around them. Less wrapping, less bloat. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-20 12:50:47 -0500, Jacob Carlborg d...@me.com said: On 2010-12-19 22:02, Michel Fortin wrote: On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said: I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. I also want to add that the code bloat in the D/Objective-C bridge was more because the bridge needed to create two stubs for each method in all Cocoa classes, and those stubs contained code to translate exceptions from one model to the other. Using templates and mixins made the creation of those stubs easy, but I don't think another method of generating these stubs would have faired better. I was thinking about having the tool that creates the bindings generating all the necessary code inline and skip all the templates, just to see if there would be a difference in the speed of the compilation and the size of the generated binaries. That'd certainly make an interesting comparison. -- Michel Fortin michel.for...@michelf.com http://michelf.com/
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Max Samukha spam...@d-coding.com wrote in message news:ien42a$26q...@digitalmars.com... On 12/20/2010 08:43 AM, Walter Bright wrote: bearophile wrote: Many games are like drugs. Not for me. I get bored with games. You don't get bored with drugs. You didn't play StarCraft when you were a teenager. I always got bored pretty quickly with RTSes. Pikmin's the only RTS that's held my attention for long, and it's very non-standard as far as RTSes go. I've always been more 2D platformer, 1990's single-player FPS, shmup, puzzle (not so much falling block though), action RPG, and adventure.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Christopher Nicholson-Sauls ibisbase...@gmail.com wrote in message news:ienfgr$2st...@digitalmars.com... On 12/19/10 14:52, Nick Sabalausky wrote: Interesting. I don't think I would go so far as to claim that WoW was unethical...just uninteresting ;) But that's just me. This is at least one thing the videogame world does that I do consider unethical: Proprietary/Closed platforms. But that's not just a videogame thing, of course. I consider proprietary/closed platforms in general to be unethical. (Oh crap, I think I can feel myself turning into Stallman!) (On the upside, that means you get to grow an epic beard.) Heh, I actually do have a beard. Although it's not quite Stallman-level.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/18/10 14:12, Nick Sabalausky wrote: Nick Sabalausky a...@a.a wrote in message news:iej46p$42...@digitalmars.com... Caligo iteronve...@gmail.com wrote in message news:mailman.5.1292651710.4588.digitalmar...@puremagic.com... IMO there is no honor in game development as it contributes nothing to society. I've rarely played any, I gotta jump on this as being a giant load of pretentious bullshit. First of all, there's the patently obvious how in the world would you know? considering the I've rarely played any. But more importantly, games make life suck less - I can't even imagine any more significant contribution to society than that. Even all of the endeavors generally considered to be the biggest contributions to society are *only* significant contributions *because* that's exactly what they do: they make life suck less, and are therefore well-regarded. Seriously, what up with all those presumptuous assholes out there (mostly baby boomer dinos and their even more anachronistic parents, interestingly enough) who have barely ever touched a videogame and yet figure they actually have reason to believe such absurd pretentious crap? Fuck, they all remind me of that pompous Roger Ebert douchebag. (Speaking of ways to benefit society, when's he finally gonna keel over? Isn't it about time by now? And speaking of contributions to society what the fuck's he ever done? Collect a salary just to spout off opinions? Fucking useless wanker.) Since it apparently isn't obvious to some people: things don't have to be dull to qualify as a significant a contribution. There's also the classic example: a game was instrumental in the development of UNIX. http://en.wikipedia.org/wiki/Space_Travel_(video_game) This wasn't arbitrary either; it was something Thompson wanted to do, and he needed a better OS to do it in... so his toy got new polish. Some of this polish became things we now take for granted and hardly know how to live without (like a hierarchial filesystem). Do I mean to say that without the game there would be no UNIX? No; but I do mean to say that games have *always* been a valuable tool for finding the limits of systems, and for inspiring innovative ways to expand those limits. The same research and development that provided pixel shaders to game developers, also provided them to medical imaging developers. The same that provided CPU technologies such as SSE to enable more complex simulations in games, also provide for more complex simulations in supercomputers. And many of these sort of technologies were original conceived just to make games more awesome. Amazing. So no, games in and of themselves don't contribute anything -- if you don't count fun, and honestly, I do count it -- but they have been a driving force behind a lot of innovation. /rant -- Chris N-S
Re: Why Ruby?
On 12/19/10 01:29, spir wrote: On Sat, 18 Dec 2010 18:13:50 -0800 Walter Bright newshou...@digitalmars.com wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. Short, but wrong. I mean conceptually. In-code string representation of code is wrong. I cannot explain why, but something in me refuses that. Seems I'm not the only one. Maybe it's my history with embedded languages with eval() or eval-like functions, like the BASIC one you referenced... or maybe it's because my D brain likens this usage to the very thing that's going on behind the scenes (string mixin), and which has proven to be a very handy feature... I'm not sure what might be the reason, but: I find it suits me fine. I'm not boasting or anything like that; I'm just pointing out that the issues no doubt stem, at least in part, from a difference in individual programmers' experience. I'm used to making valuable use of things like eval() -- which you evidently dislike, and not for invalid reasons. Ultimately, though, I think this whole matter of D lambdas boils down to just plain not liking the use of strings as anything other than self-contained text data snips. One of those weird languages I'm used to had two different kinds of string literal... and the second one was actually a list of explicit character codes, as integers. You'd be surprised the uses one would find for this thing -- such as easily writing escape code sequences. My point? Different language, different environment. When the new environment is drastically different from what we're used to, even if only in a few aspects, we shy from it. At any rate, there's always the MiniD syntax to inspire those who must seek another way. This: func(\a, b - a * b) ...is rewritten as: func(function(a, b) { return a*b; }) Obviously the backslash would be a potential problem. --Chris N-S
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Christopher Nicholson-Sauls: So no, games in and of themselves don't contribute anything -- if you don't count fun, and honestly, I do count it -- but they have been a driving force behind a lot of innovation. Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) Bye, bearophile
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/19/10 04:19, bearophile wrote: Christopher Nicholson-Sauls: So no, games in and of themselves don't contribute anything -- if you don't count fun, and honestly, I do count it -- but they have been a driving force behind a lot of innovation. Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) Bye, bearophile Touché. ;) But I said 'game' not 'cult.' :D -- Chris N-S
Re: Why Ruby?
Walter Bright newshou...@digitalmars.com wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? No. But often, you want to call a function in a lambda, in which case the string version croaks. Also, it is not always possible to pass the lambda by template alias parameter, in which case the string version is right out the window. As for functions taking a delegate, the {=@+@;} syntax will not work with overloading or template functions (nor will the other syntaxen that elides types). It could also be that functions taking delegates are or should be rare, and thus not worth optimizing for. -- Simen
Re: Why Ruby?
Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); The bikesheding of the syntax does not address this concern at all.
Re: Why Ruby?
Sun, 19 Dec 2010 06:08:15 -0500, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); The bikesheding of the syntax does not address this concern at all. Two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort) - symbol visibility problems because of wrong scoping
Re: Why Ruby?
Sat, 18 Dec 2010 16:01:37 -0800, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab In case you didn't see, two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort in the sorting example) - symbol visibility problems because of wrong scoping
Re: Why Ruby?
Sun, 19 Dec 2010 01:24:43 +, JRM wrote: On Sat, 18 Dec 2010 16:01:37 -0800, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? I agree that those aren't really much better. This entire discussion seems a little odd to me. People are trying to find a way to more easily write lambda's, focusing in particular on single expression lambda's. Have you got any idea what a 'lambda' actually is? It originates from the lambda calculus. In lambda calculus the lambda abstraction is something that takes a single argument and returns an *expression*. You can argue that this is less general than D's delegates, but the fact is that many such functions such as sort, filter, map, reduce, ... return an expression. Of course the explicit return generates additional syntactic bloat. In order to support lazy, D already allows an expression to be implicitly converted to a delegate returning either void or the type of the expression. This covers the case of lambda's taking no arguments, and happens to be shorter than any of the proposed syntaxes. Sorry, don't remember how this works in D if you actually call the function with a delegate that isn't taking any arguments, but if the lazy generates another thunk, this doesn't work consistently. I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. So in your opinion D's function literals should only be improved if you can somehow outwit existing languages, otherwise it just sounds like a stupid idea?
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On 12/18/2010 10:03 PM, Nick Sabalausky wrote: Caligoiteronve...@gmail.com wrote in message news:mailman.5.1292651710.4588.digitalmar...@puremagic.com... IMO there is no honor in game development as it contributes nothing to society. I've rarely played any, I gotta jump on this as being a giant load of pretentous bullshit. First of all, there's the patently obvious how in the world would you know? considering the I've rarely played any. But more importantly, games make life suck less - I can't even imagine any more significant contribution to society than that. Even all of the endevors generally considered to be the biggest contributions to society are *only* significant contributions *because* that's exactly what they do: they make life suck less, and are therefore well-regarded. I hear you! People please legalize drugs. They make my life suck so much less. Seriously, what up with all those presumptuous assholes out there (mostly baby boomer dinos and their even more anachronistic parents, interestingly enough) who have barely ever touched a videogame and yet figure they actually have reason to believe such absurd pretentous crap? Fuck, they all remind me of that pompous Roger Ebert douchebag. (Speaking of ways to benefit society, when's he finally gonna keel over? Isn't it about time by now? And speaking of contributions to society what the fuck's he ever done? Collect a salary just to spout off opinions? Fucking useless wanker.) Countless hours of my life have gone to waste while I've been killing zergs and protos. Still, my life sucks so much less because of that gorgeous feeling the unpunished killing gives me. The only thing I keep regretting (at the rare moments when I am not high) is I could have created something useful instead. Maybe, yet another programming language, in which more cool games could have been written.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On Sun, 19 Dec 2010 05:19:50 -0500 bearophile bearophileh...@lycos.com wrote: Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) rather The Battle for Wesnoth ;-) Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.com
Re: Why Ruby?
Stephan Soller stephan.sol...@helionweb.de wrote: I don't think that the syntax improvement of chaining is worth such an effort. It adds tons of complexity for only a very limited gain. I'm not sure if I could write such self-parsed code without thinking about that pipeline. I think I don't fully understand what you mean by syntax improvement for chaining. This my code is almost possible to run but needs some time and work (to get round CTFE limitations, enhance parser). But syntax parser behind it is rather primitive, if to use external tools one can make much better syntax parsers with much less efford.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Seeing the enemy being literally eaten by hundreds of upgraded zerglings has no comparison. :-)
Re: Why Ruby?
On 12/19/10 5:01 AM, Simen kjaeraas wrote: Walter Bright newshou...@digitalmars.com wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? No. But often, you want to call a function in a lambda, in which case the string version croaks. I'm not sure about the often part. For me, string lambdas do often suffice. When it doesn't, I use a lambda. D's syntax for lambdas is not syntactically heavy at all: (a, b) { return a + b; } The proposed alternative gravitates around (a, b) - { a + b } So this discussion concerns a niche between short lambdas that can be expressed as strings and lambdas for which the actual word return is too much to type. In fact we're looking at the difference between return + ; and - . Four characters. If the new syntax would be executed to perfection, to what extent would that improve your use of D? To what extent would it make the language more powerful? To what extent does it allow to do things you otherwise wouldn't be able to? Equally importantly, where is this four-characters saver on the radar compared to fixing const's issues, discussing tail const, completing and then improving 64-bit support, fixing important bugs, or even adding the lambda lowering that was discussed earlier in this thread to be promptly forgotten? Also, it is not always possible to pass the lambda by template alias parameter, in which case the string version is right out the window. unaryFunc!a + b As for functions taking a delegate, the {=@+@;} syntax will not work with overloading or template functions (nor will the other syntaxen that elides types). It could also be that functions taking delegates are or should be rare, and thus not worth optimizing for. I have no idea what {=@+@;} does - it looks like a wrong paste from an early dialect of Perl to me. I have difficulty picturing someone who finds a+b or q{a+b} ugly but some other syntaxes discussed here palatable. Andrei
Re: Why Ruby?
On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. Please use the notion of syntactic hygiene correctly. Andrei
Re: Why Ruby?
On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); That does work. What doesn't work is calling nonmember functions looked up in the context of the caller. Andrei
Re: Why Ruby?
On 12/19/10 6:26 AM, retard wrote: Sat, 18 Dec 2010 16:01:37 -0800, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab In case you didn't see, two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort in the sorting example) This can be solved by using a canonicalizer before passing to unaryFun. I considered doing that, but delayed implementing it to when this would actually become a problem. - symbol visibility problems because of wrong scoping Scoping is not wrong, it's just different :o). I agree that that can be an issue - in which case you take the enormous hit of writing (a, b) { stmts }, of which the proposals passionately discussed within save a grand total of around four characters. Again: to what extent does this help on becoming able to do what you want to do in D, and where is implementing this ranked in comparison to the other work items? Andrei
Re: Why Ruby?
On 2010-12-18 21:48, Simen kjaeraas wrote: bearophile bearophileh...@lycos.com wrote: Jacob Carlborg: 1 D: foo(writeln(3)); // lazy argument 1 Scala: foo(_ * _) 2 C#: foo(x = x * x); 3 Scala: foo((x) = x * x) 4 Python: foo(lambda x: x * x) 5 Ruby: foo { |bar| x * x } 5 Ruby: foo do |x| x * x end 6 D: foo((int x) { return x * x; }); 7 C++1x: foo([](int x){ return x * x; }); 7 Apple's (Objective)-C(++) block extension: foo(^(int x){ return x * x; }); 8 JavaScript: foo(function(x){ return x * x }) 9 PHP: foo(function ($x) use($fooBar) { return $x * $x; }); // use is used for explicitly telling what variables should be available when the scope is gone. (In D there are template lambdas too). This topic was discussed some in past. I like a syntax similar to: foo({x,y = x * y}) foo({int x, int y = x * y}) I really like this. The curly braces clearly show it to be a new scope, and the syntax is concise and understandable. I don't like it, it's not enough improvement. Compared to this suggestion I think the current syntax is good enough. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-18 22:50, retard wrote: Sat, 18 Dec 2010 19:09:24 +0100, Jacob Carlborg wrote: As Nick writes here the Scala/C#-style syntax is one suggestion. There are also several other syntaxes available, one just have to look at other languages to get ideas. Here's a list of the syntax used by a couple of different language, some languages are list more than once because they support more than one syntax. I've listed the languages in order from, what I think, the least verbose to the most verbose lambda/delegate syntax (the number in front of the languages is the level of verbose, if two languages are at the same level I think they are equally verbose). 1 D: foo(writeln(3)); // lazy argument That's not really equivalent to lambdas. It would be unfair to not mention Scala which also supports lazy arguments. It depends on how you see it. It passes in a piece of code that can be executed in foo. And when you see if like this I think the Scala syntax I mention below is the basically the same. (BTW, I mentioned it was lazy argument and not a delegate). 1 Scala: foo(_ * _) This isn't the same. _ * _ is equivalent to (a, b) = a * b I know that, but as far as I know I cannot do the same with D's lazy arguments. 1 Scala: foo(x = x * x) 2 C#: foo(x = x * x); 3 Scala: foo((x) = x * x) foo(x = x * x) also works in this case 4 Python: foo(lambda x: x * x) 5 Ruby: foo { |bar| x * x } Maybe you meant foo { |x| x * x } 5 Ruby: foo do |x| x * x end 6 D: foo((int x) { return x * x; }); 7 C++1x: foo([](int x){ return x * x; }); 7 Apple's (Objective)-C(++) block extension: foo(^(int x){ return x * x; }); 8 JavaScript: foo(function(x){ return x * x }) 9 PHP: foo(function ($x) use($fooBar) { return $x * $x; }); // use is used for explicitly telling what variables should be available when the scope is gone. Note that I have not listed any functional languages here because I've never used one. For example: Lambda calculus: λx.x*x Haskell: \x - x * x As you can see, most of the verbosity comes from the fact that lambdas in D and C++ contain statements, not a single expression. It's like if-then- else vs ternary ?: -- In languages like Scala these are the same built-in feature. Yeah. -- /Jacob Carlborg
Re: Why Ruby?
Imagine you don't have to write semicolons in D. If you have 1000 lines of code you save 1000 keystrokes and characters to read. If you have about 50 delegates in your code you save 200 characters. I don't think this is more important than the other problems you mention, but adding bits of characters here and there ends up saving a lot.
Re: Why Ruby?
On 2010-12-18 23:41, Walter Bright wrote: Jacob Carlborg wrote: foo(x, y = x * y); The problem with all these is what is the difference between: { x * y } { x * y; } == note the ; { return x * y; } I would say there is no difference. The delegeate would be inferred to have the same type as the function requires. Take this for example, foo is declared like this: void foo (int delegate (int x, int y) dg); And called like this: foo(x, y = x * y); Then the delegate would be inferred to be: int delegate (int, int) If you add a semicolon or a return in the lambda body it would be inferred to the same type. The C++ lambda group had the same discussions. It may not seem like much when the code is trivial, but when it gets more complex, having 2 or 3 different syntaxes for function bodies seems like a confusing disaster in the making. The point is to only use the syntax when the code is trivial, like in the above example. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-19 03:13, Walter Bright wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. Apparently it has several flaws as other have mentioned in this thread. -- /Jacob Carlborg
Re: Why Ruby?
On 12/19/10 9:49 AM, Ary Borenszweig wrote: Imagine you don't have to write semicolons in D. If you have 1000 lines of code you save 1000 keystrokes and characters to read. If you have about 50 delegates in your code you save 200 characters. The way you measure to assess whether this is material is in proportion to the rest of the code. Semicolons are quite frequent, but 200 characters in 1000 lines may be as infrequent as 0.2%. I don't think this is more important than the other problems you mention, but adding bits of characters here and there ends up saving a lot. I agree in principle, but not in this case. Andrei
Re: Why Ruby?
On 2010-12-19 01:01, Nick Sabalausky wrote: Walter Brightnewshou...@digitalmars.com wrote in message news:iejejo$pf...@digitalmars.com... Nick Sabalausky wrote: Any problem with the other Scala/C#-style one?: (x, y) = x * y // Lowered to: (x, y) { return x * y; } (Maybe that was rejected before due the the weird float operators that are now being ditched?) The problem with the (x,y) parameter lists, where x and y are the parameters, is that it is ambiguous with the existing syntax of (x,y) where x and y are types and the parameters are omitted. For example: void foo(int); But we already have: (x, y) { return x * y; } So either there aren't any problems with it after all, or D's existing delegate syntax is already broken. To be clear, with what I'm trying to suggest, the *only* thing that would be different from the current delegate literal syntax is that part *after* the parameter list. Ie: PARAM_LIST_HERE { return x * y; } // -- PARAM_LIST_HERE = x * y Or if there's a problem with =, then -, or --, or ::, or :, or whatever. I'm not suggesting the param list be different in any way fromhow t is now. (Although proposals from other people might differ.) ^^ Exactly. I would also like to have type inference for the parameter list, do we have that already in D2? -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-19 01:01, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? No, that syntax is not better. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-19 16:14, Andrei Alexandrescu wrote: On 12/19/10 5:01 AM, Simen kjaeraas wrote: Walter Bright newshou...@digitalmars.com wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? No. But often, you want to call a function in a lambda, in which case the string version croaks. I'm not sure about the often part. For me, string lambdas do often suffice. When it doesn't, I use a lambda. D's syntax for lambdas is not syntactically heavy at all: (a, b) { return a + b; } The proposed alternative gravitates around (a, b) - { a + b } I never proposed that exact syntax, I don't think anyone else did either. I think just one person mentioned -. This is the syntax I've proposed: foo(3 * 4); // lazy argument/delegate foo(a = a * 3); foo(a, b = a * b); // or if not possible: foo((a, b) = a * b); So this discussion concerns a niche between short lambdas that can be expressed as strings and lambdas for which the actual word return is too much to type. In fact we're looking at the difference between return + ; and - . Four characters. No, you also added the {} characters. If the new syntax would be executed to perfection, to what extent would that improve your use of D? To what extent would it make the language more powerful? To what extent does it allow to do things you otherwise wouldn't be able to? Nothing, but there are a lot of things you can say the same about. I've also got the impression that you are pushing for a more functional approach of coding and for that a short, good and working lambda syntax is necessary. Equally importantly, where is this four-characters saver on the radar compared to fixing const's issues, discussing tail const, completing and then improving 64-bit support, fixing important bugs, or even adding the lambda lowering that was discussed earlier in this thread to be promptly forgotten? If this isn't a very quick implementation this would low on the priority list. I would like to have the lambda lowering as well :) Also, it is not always possible to pass the lambda by template alias parameter, in which case the string version is right out the window. unaryFunc!a + b As for functions taking a delegate, the {=@+@;} syntax will not work with overloading or template functions (nor will the other syntaxen that elides types). It could also be that functions taking delegates are or should be rare, and thus not worth optimizing for. I have no idea what {=@+@;} does - it looks like a wrong paste from an early dialect of Perl to me. I have difficulty picturing someone who finds a+b or q{a+b} ugly but some other syntaxes discussed here palatable. Andrei That syntax is just ugly. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-19 16:23, Andrei Alexandrescu wrote: On 12/19/10 6:26 AM, retard wrote: Sat, 18 Dec 2010 16:01:37 -0800, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab In case you didn't see, two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort in the sorting example) This can be solved by using a canonicalizer before passing to unaryFun. I considered doing that, but delayed implementing it to when this would actually become a problem. I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. - symbol visibility problems because of wrong scoping Scoping is not wrong, it's just different :o). I agree that that can be an issue - in which case you take the enormous hit of writing (a, b) { stmts }, of which the proposals passionately discussed within save a grand total of around four characters. I don't know why but you added the {} characters. Again: to what extent does this help on becoming able to do what you want to do in D, and where is implementing this ranked in comparison to the other work items? Andrei -- /Jacob Carlborg
Re: Game development is worthless? WTF? (Was: Why Ruby?)
bearophile Wrote: Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) He does however write games sometimes: http://www.classicempire.com/
Re: Game development is worthless? WTF? (Was: Why Ruby?)
You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. If it helps any, I'm not one of those baby boomers. I'm actually in my early twenties. So if you are going to insult me at least do it properly. You sound way too angry and unhappy. Instead of playing video games, you should definitely pick up Ruby if you haven't already. I hear it's designed to make programmers happy. On Sat, Dec 18, 2010 at 2:03 PM, Nick Sabalausky a...@a.a wrote: Caligo iteronve...@gmail.com wrote in message news:mailman.5.1292651710.4588.digitalmar...@puremagic.com... IMO there is no honor in game development as it contributes nothing to society. I've rarely played any, I gotta jump on this as being a giant load of pretentous bullshit. First of all, there's the patently obvious how in the world would you know? considering the I've rarely played any. But more importantly, games make life suck less - I can't even imagine any more significant contribution to society than that. Even all of the endevors generally considered to be the biggest contributions to society are *only* significant contributions *because* that's exactly what they do: they make life suck less, and are therefore well-regarded. Seriously, what up with all those presumptuous assholes out there (mostly baby boomer dinos and their even more anachronistic parents, interestingly enough) who have barely ever touched a videogame and yet figure they actually have reason to believe such absurd pretentous crap? Fuck, they all remind me of that pompous Roger Ebert douchebag. (Speaking of ways to benefit society, when's he finally gonna keel over? Isn't it about time by now? And speaking of contributions to society what the fuck's he ever done? Collect a salary just to spout off opinions? Fucking useless wanker.)
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Patrick Down wrote: bearophile Wrote: Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) He does however write games sometimes: http://www.classicempire.com/ I've never played WoW, but I have played Empire, and let me tell you, it wastes a lot more than 6 hours a day! I've been hesitant to play another round after last time, when I spent almost a full week just conquering the world. Got way behind on my work. I personally like the DOS version best. It reminds me so much of some of my early games. Same beautiful graphics and easy controls.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Caligo: Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. Many games are like drugs. That's very bad. But people need to play too, and there are instructive games too, for example games that develop your intuition about how dynamic systems work (SimCity and its followers), there are some smart games too. This is a game, but it's not so terrible for the mind of people, it's not a bad drug: http://armorgames.com/play/2205/light-bot Bye, bearophile
Re: Why Ruby?
On 12/19/10 11:21 AM, foobar wrote: Andrei Alexandrescu Wrote: On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); That does work. What doesn't work is calling nonmember functions looked up in the context of the caller. Andrei Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } is beautiful and clear. Besides, that return is bizarre - did you mean return from the comparison or the caller? Ruby chose the latter, which I think is very sensible, but in that case you have a more difficult time returning locally. Of course, inventing new syntax is always available :o). regarding hygiene - the term was correct. No. Andrei
Re: Why Ruby?
On 12/19/10, foobar f...@bar.com wrote: This feature promotes a code smell. snip what happens in the following snippet? int a = 5; sort!a b(whatever); You've accurately described your snippet in advance. *That* is a code smell. You should never use single-variable names in your code in the first place.
Re: Why Ruby?
I meant single-letter variable names there. On 12/19/10, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 12/19/10, foobar f...@bar.com wrote: This feature promotes a code smell. snip what happens in the following snippet? int a = 5; sort!a b(whatever); You've accurately described your snippet in advance. *That* is a code smell. You should never use single-variable names in your code in the first place.
Re: Why Ruby?
On 12/19/2010 02:28 PM, Andrei Alexandrescu wrote: On 12/19/10 11:21 AM, foobar wrote: Andrei Alexandrescu Wrote: On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); That does work. What doesn't work is calling nonmember functions looked up in the context of the caller. Andrei Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } is beautiful and clear. Besides, that return is bizarre - did you mean return from the comparison or the caller? Ruby chose the latter, which I think is very sensible, but in that case you have a more difficult time returning locally. Not at all. The last executed statement is what gets returned. And that doesn't only apply to blocks, but to normal functions: def foo 1 end Of course, inventing new syntax is always available :o). regarding hygiene - the term was correct. No. Andrei
Re: Why Ruby?
Andrei Alexandrescu Wrote: Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. I reserve the right to dislike it even if it was 20 characters. The fact that it's a useful hack doesn't make it smell less. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } I wasn't referring to the above which still deals with the syntactic issue. I'm talking about making: sort!a b(whatever); and sort(whatever, (a, b) { return ab; }); have the same performance. Thus obviating the need for the first form. the best form IMO would be of course: whatever.sort((a, b) { return ab; }); This touches another topic - the universal function call feature.
Re: Why Ruby?
foobar wrote: ... I wasn't referring to the above which still deals with the syntactic issue. I'm talking about making: sort!a b(whatever); and sort(whatever, (a, b) { return ab; }); have the same performance. Thus obviating the need for the first form. the best form IMO would be of course: whatever.sort((a, b) { return ab; }); Would be nice, but: - is it even possible (performance-wise)? - can you enforce this performance constraint? There is a big difference between inlining a lexical closure and creating a full one on the heap. - with template alias parameters, its easy to compose more complex types at compile time, you will lose this ability.
Re: Why Ruby?
On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said: On 2010-12-19 16:23, Andrei Alexandrescu wrote: On 12/19/10 6:26 AM, retard wrote: In case you didn't see, two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort in the sorting example) This can be solved by using a canonicalizer before passing to unaryFun. I considered doing that, but delayed implementing it to when this would actually become a problem. I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. Has anyone checked which of delegates or strings cause more template bloat? I'd suspect using strings will result in less bloat because the same string will often be reused (making the compiler reuse the same template instance) whereas the compiler will likely use the mangled name of the delegate when instantiating the template... and no two delegate literals have the same mangled name. -- Michel Fortin michel.for...@michelf.com http://michelf.com/
Re: Why Ruby?
On 12/19/10 11:31 AM, Ary Borenszweig wrote: On 12/19/2010 02:28 PM, Andrei Alexandrescu wrote: On 12/19/10 11:21 AM, foobar wrote: Andrei Alexandrescu Wrote: On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); That does work. What doesn't work is calling nonmember functions looked up in the context of the caller. Andrei Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } is beautiful and clear. Besides, that return is bizarre - did you mean return from the comparison or the caller? Ruby chose the latter, which I think is very sensible, but in that case you have a more difficult time returning locally. Not at all. The last executed statement is what gets returned. And that doesn't only apply to blocks, but to normal functions: def foo 1 end That would work if and only if it were designed into the language from day one - now it's too late. I encourage you to work out through various cases (if/else, switch, loops, returning void vs. a value) to see this will have considerable difficulties in D. Andrei
Re: Why Ruby?
On 12/19/10 11:54 AM, foobar wrote: Andrei Alexandrescu Wrote: Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. I reserve the right to dislike it even if it was 20 characters. The fact that it's a useful hack doesn't make it smell less. It doesn't smell. You believe it does only because you mistakenly believe it's not hygienic. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } I wasn't referring to the above which still deals with the syntactic issue. I'm talking about making: sort!ab(whatever); and sort(whatever, (a, b) { return ab; }); have the same performance. Thus obviating the need for the first form. I explained how this is much more difficult than it might seem at first sight. Andrei
Re: Why Ruby?
retard r...@tard.com.invalid wrote in message news:iejab1$2t...@digitalmars.com... As you can see, most of the verbosity comes from the fact that lambdas in D and C++ contain statements, not a single expression. It's like if-then- else vs ternary ?: -- In languages like Scala these are the same built-in feature. FWIW, I've always found if() else and other such constructs to be a bit verbose to use inside an expression. So I've always liked ?: (But I can certainly see the advantages of being able to use statements as expressions.)
Re: Why Ruby?
Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message news:mailman.17.1292722525.4748.digitalmar...@puremagic.com... imo, those @'s (or monkeys, as we like to call them) are a sore pain in the eye. And what if you need to do some simple arithmetic with the numbered arguments? someFunc!(@1+1@2)(x); Might be a silly example, but code like this could exist and will be confusing. I had always liked the idea of something like @1,@2,etc or _1,_2,etc, but I think this is a completely convincing counter-argument.
Re: Why Ruby?
Jacob Carlborg d...@me.com wrote in message news:iel9p5$1go...@digitalmars.com... On 2010-12-19 01:01, Nick Sabalausky wrote: Walter Brightnewshou...@digitalmars.com wrote in message news:iejejo$pf...@digitalmars.com... Nick Sabalausky wrote: Any problem with the other Scala/C#-style one?: (x, y) = x * y // Lowered to: (x, y) { return x * y; } (Maybe that was rejected before due the the weird float operators that are now being ditched?) The problem with the (x,y) parameter lists, where x and y are the parameters, is that it is ambiguous with the existing syntax of (x,y) where x and y are types and the parameters are omitted. For example: void foo(int); But we already have: (x, y) { return x * y; } So either there aren't any problems with it after all, or D's existing delegate syntax is already broken. To be clear, with what I'm trying to suggest, the *only* thing that would be different from the current delegate literal syntax is that part *after* the parameter list. Ie: PARAM_LIST_HERE { return x * y; } // -- PARAM_LIST_HERE = x * y Or if there's a problem with =, then -, or --, or ::, or :, or whatever. I'm not suggesting the param list be different in any way fromhow t is now. (Although proposals from other people might differ.) ^^ Exactly. I would also like to have type inference for the parameter list, do we have that already in D2? I know you can use auto. I had thought you could also omit the type in a delegate literal's param list, but Walter's response above makes me think I might be mistaken. Even if so, as I was trying to say above, if delegate literals are indeed required to be (auto x, auto y) { return x * y; }, then I would be perfectly happy with lambdas that were the same: (auto x, auto y) = x * y I do think that's still far easier to read than the full delegate literal syntax.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Max Samukha spam...@d-coding.com wrote in message news:iekuac$qr...@digitalmars.com... On 12/18/2010 10:03 PM, Nick Sabalausky wrote: Caligoiteronve...@gmail.com wrote in message news:mailman.5.1292651710.4588.digitalmar...@puremagic.com... IMO there is no honor in game development as it contributes nothing to society. I've rarely played any, I gotta jump on this as being a giant load of pretentous bullshit. First of all, there's the patently obvious how in the world would you know? considering the I've rarely played any. But more importantly, games make life suck less - I can't even imagine any more significant contribution to society than that. Even all of the endevors generally considered to be the biggest contributions to society are *only* significant contributions *because* that's exactly what they do: they make life suck less, and are therefore well-regarded. I hear you! People please legalize drugs. They make my life suck so much less. Assuming you meant that as a sarcastic counter-example: There may be ways in which they make life suck less, but *overall*, they're generally considered to make life suck *more*. So the make life suck less rule still holds. Although, if you meant it seriously then nevermind: The whole drug-legalization issue is one of the few debates I actively avoid :)
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Caligo iteronve...@gmail.com wrote in message news:mailman.30.1292776925.4748.digitalmar...@puremagic.com... You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. The old games as drugs argument. First of all, anyone who's a slave to psychological tricks is an idiot anyway. Casinos use many psychological tricks to induce addiction and yet most people are perfectly able to control themselves. Secondly, if you see movies, music, comics and novels as the same dishonorable escapism, then I'll grant that your reasoning is at least logically sound, even though you're in an extremely tiny minority on that viewpoint. If not, however, then you're whole argument crumbles into a giant pile of blatant bullshit, and clearly far too much of an imbicile to even continue discussing this with. If it helps any, I'm not one of those baby boomers. I'm actually in my early twenties. So if you are going to insult me at least do it properly. Fine, but that does make you the exception. You sound way too angry and unhappy. I just have no tolerance for such obvious lies and idiocy. Instead of playing video games, you should definitely pick up Ruby if you haven't already. I hear it's designed to make programmers happy. I realize you mean that in jest, but I actually have been using Ruby (Rake) as the build system for a big web project. It gets the job done, but I'm not exactly impressed with it.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Christopher Nicholson-Sauls ibisbase...@gmail.com wrote in message news:iekles$79...@digitalmars.com... On 12/18/10 14:12, Nick Sabalausky wrote: Nick Sabalausky a...@a.a wrote in message news:iej46p$42...@digitalmars.com... Caligo iteronve...@gmail.com wrote in message news:mailman.5.1292651710.4588.digitalmar...@puremagic.com... IMO there is no honor in game development as it contributes nothing to society. I've rarely played any, I gotta jump on this as being a giant load of pretentious bullshit. First of all, there's the patently obvious how in the world would you know? considering the I've rarely played any. But more importantly, games make life suck less - I can't even imagine any more significant contribution to society than that. Even all of the endeavors generally considered to be the biggest contributions to society are *only* significant contributions *because* that's exactly what they do: they make life suck less, and are therefore well-regarded. Seriously, what up with all those presumptuous assholes out there (mostly baby boomer dinos and their even more anachronistic parents, interestingly enough) who have barely ever touched a videogame and yet figure they actually have reason to believe such absurd pretentious crap? Fuck, they all remind me of that pompous Roger Ebert douchebag. (Speaking of ways to benefit society, when's he finally gonna keel over? Isn't it about time by now? And speaking of contributions to society what the fuck's he ever done? Collect a salary just to spout off opinions? Fucking useless wanker.) Since it apparently isn't obvious to some people: things don't have to be dull to qualify as a significant a contribution. There's also the classic example: a game was instrumental in the development of UNIX. http://en.wikipedia.org/wiki/Space_Travel_(video_game) This wasn't arbitrary either; it was something Thompson wanted to do, and he needed a better OS to do it in... so his toy got new polish. Some of this polish became things we now take for granted and hardly know how to live without (like a hierarchial filesystem). Do I mean to say that without the game there would be no UNIX? No; but I do mean to say that games have *always* been a valuable tool for finding the limits of systems, and for inspiring innovative ways to expand those limits. The same research and development that provided pixel shaders to game developers, also provided them to medical imaging developers. The same that provided CPU technologies such as SSE to enable more complex simulations in games, also provide for more complex simulations in supercomputers. And many of these sort of technologies were original conceived just to make games more awesome. Amazing. So no, games in and of themselves don't contribute anything -- if you don't count fun, and honestly, I do count it -- but they have been a driving force behind a lot of innovation. Yea, and another thing is the matter of art in general: If you're an ultra-utilitarian like Christopher seems to be (and even most programmers aren't ultra-utilitarian), then art can be seen as lacking significant contribution to society. But if you do believe in the value of art and still cherry-pick videogames as dishonorable or lacking significant contribution, then you're just simply being a dumbfuck and an elitist (like Roger Ebert).
Re: Why Ruby?
On 12/19/2010 03:45 PM, Andrei Alexandrescu wrote: On 12/19/10 11:31 AM, Ary Borenszweig wrote: On 12/19/2010 02:28 PM, Andrei Alexandrescu wrote: On 12/19/10 11:21 AM, foobar wrote: Andrei Alexandrescu Wrote: On 12/19/10 5:08 AM, foobar wrote: Walter Bright Wrote: JRM wrote: you could write: sort!(@1@2)(x); [...] I think this idea (or something similar) is worth consideration. It is simply a small extension to an already existing feature that would give D a terser syntax for lambda's than most of the other languages we've been discussing. but: sort!(ab)(x); is just as short! And it already works. I think that the issue here is not about syntax as much as it is about semantics: As others said, this is equivalent to dynamic language's eval() or to D's string mixin and the this raises the question of hygiene which sadly has no good solution in D. The main concern is this: In what context are the symbols 'a' and 'b' evaluated? At the moment they cannot be correctly evaluated at the caller context and do not allow: sort!(a.foo() b.bar())(whatever); That does work. What doesn't work is calling nonmember functions looked up in the context of the caller. Andrei Either way, I personally don't care that much for another syntax for delegates. I personally just want to see this ugly hack removed from the standard library and discouraged. This feature promotes a code smell. And for what, as you said yourself, to save 4 characters? a b vs. (a, b) { return a b; } Savings: 17 characters. D should be consistent with only ONE delegate syntax. This is why Ruby reads like poetry to its followers and c++ is like carving letters in stone. Also, Ruby is well slower than C++ and other languages. It's easy to design a beautiful language if that's the primary concern. It's difficult to design a language when you want to keep in harmony a larger list of desiderata. I much prefer that the lowering you mentioned to be implemented so that performance wise this UGLY hack will have no benefits. The lowering will unfortunately solve little. I don't see how sort!a b(array); is horrible but sort(a, b; array) { return a b; } is beautiful and clear. Besides, that return is bizarre - did you mean return from the comparison or the caller? Ruby chose the latter, which I think is very sensible, but in that case you have a more difficult time returning locally. Not at all. The last executed statement is what gets returned. And that doesn't only apply to blocks, but to normal functions: def foo 1 end That would work if and only if it were designed into the language from day one - now it's too late. I encourage you to work out through various cases (if/else, switch, loops, returning void vs. a value) to see this will have considerable difficulties in D. Andrei I was just pointing out that it works that way in Ruby, not that it should be implemented in D.
Re: Why Ruby?
On 2010-12-19 20:33, Nick Sabalausky wrote: retardr...@tard.com.invalid wrote in message news:iejab1$2t...@digitalmars.com... As you can see, most of the verbosity comes from the fact that lambdas in D and C++ contain statements, not a single expression. It's like if-then- else vs ternary ?: -- In languages like Scala these are the same built-in feature. FWIW, I've always found if() else and other such constructs to be a bit verbose to use inside an expression. So I've always liked ?: (But I can certainly see the advantages of being able to use statements as expressions.) There are other places where they can be useful, like initializing variables: auto y = if (x == 3) 4; else 5; In this simple case the ternary operator would of course be better to use. -- /Jacob Carlborg
Re: Why Ruby?
On 2010-12-19 19:29, Michel Fortin wrote: On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said: On 2010-12-19 16:23, Andrei Alexandrescu wrote: On 12/19/10 6:26 AM, retard wrote: In case you didn't see, two additional problems were also listed earlier in this thread: - template bloat (different strings generate new instances of the sort in the sorting example) This can be solved by using a canonicalizer before passing to unaryFun. I considered doing that, but delayed implementing it to when this would actually become a problem. I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. Has anyone checked which of delegates or strings cause more template bloat? I'd suspect using strings will result in less bloat because the same string will often be reused (making the compiler reuse the same template instance) whereas the compiler will likely use the mangled name of the delegate when instantiating the template... and no two delegate literals have the same mangled name. That would only be the case if the function takes the delegate as a template parameter? -- /Jacob Carlborg
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Adam D. Ruppe wrote: Patrick Down wrote: bearophile Wrote: Yet I hope Walter will not waste 6 hours every day *playing* World of warcraft :-) He does however write games sometimes: http://www.classicempire.com/ I've never played WoW, but I have played Empire, and let me tell you, it wastes a lot more than 6 hours a day! Yes, Empire has been blamed for many students flunking out of university, and at least one divorce!
Re: Game development is worthless? WTF? (Was: Why Ruby?)
On Sun, Dec 19, 2010 at 5:41 PM, Caligo iteronve...@gmail.com wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. This is bullshit. Of course there are games with that goal (WoW, ...), but this doesn't make game development in general unhonorable. There are many games that are not like this, for example most single player only games.. you play them until the end or until you can't get any further and that's it.. maybe you play them again in the future, but it's not like a constant addiction. (I'm not saying that multi player games are generally more dangerous or anything, single player games are just an example everybody should be able to comprehend) There are also game developers who openly label games like WoW unethical, e.g. http://en.wikipedia.org/wiki/Jonathan_Blow
Re: Why Ruby?
Ary Borenszweig wrote: Imagine you don't have to write semicolons in D. If you have 1000 lines of code you save 1000 keystrokes and characters to read. If you have about 50 delegates in your code you save 200 characters. I don't think this is more important than the other problems you mention, but adding bits of characters here and there ends up saving a lot. Saving keystrokes is, in my not so humble opinion, a totally bogus metric with which to judge a programming language. What matters, in anything other than a language designed for one-liners, is how the code looks on the page. For example, we don't just nail photo prints to the wall. We present them with a matte, then mount in a complementary frame. Cooking is a lot about the presentation of the food, not just the taste. I think that source code is a lot about the presentation of it. It should look good. The way it looks should be an aid to understanding what it does. Correct code should look right, wrong code should look wrong. (I've had many experience programmers tell me they can just scan a page of code and the bugs stand out because they just look wrong. They don't have to actually understand the code to find the bugs. A language that enhances this effect is a better language than one that does not.) For example, it's hard to format code with goto's so it looks right. It's a lot easier with structured constructs. There is value in brevity - extra syntactical noise can distract from what the code is doing. But it can also positively frame and present code. That's what should be the criteria.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Daniel Gibson metalcae...@gmail.com wrote in message news:mailman.37.1292790264.4748.digitalmar...@puremagic.com... On Sun, Dec 19, 2010 at 5:41 PM, Caligo iteronve...@gmail.com wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. This is bullshit. Of course there are games with that goal (WoW, ...), but this doesn't make game development in general unhonorable. There are many games that are not like this, for example most single player only games.. you play them until the end or until you can't get any further and that's it.. maybe you play them again in the future, but it's not like a constant addiction. (I'm not saying that multi player games are generally more dangerous or anything, single player games are just an example everybody should be able to comprehend) There are also game developers who openly label games like WoW unethical, e.g. http://en.wikipedia.org/wiki/Jonathan_Blow Interesting. I don't think I would go so far as to claim that WoW was unethical...just uninteresting ;) But that's just me. This is at least one thing the videogame world does that I do consider unethical: Proprietary/Closed platforms. But that's not just a videogame thing, of course. I consider proprietary/closed platforms in general to be unethical. (Oh crap, I think I can feel myself turning into Stallman!)
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Nick Sabalausky a...@a.a wrote in message news:ielrdu$2p8...@digitalmars.com... Daniel Gibson metalcae...@gmail.com wrote in message news:mailman.37.1292790264.4748.digitalmar...@puremagic.com... On Sun, Dec 19, 2010 at 5:41 PM, Caligo iteronve...@gmail.com wrote: You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. This is bullshit. Of course there are games with that goal (WoW, ...), but this doesn't make game development in general unhonorable. There are many games that are not like this, for example most single player only games.. you play them until the end or until you can't get any further and that's it.. maybe you play them again in the future, but it's not like a constant addiction. (I'm not saying that multi player games are generally more dangerous or anything, single player games are just an example everybody should be able to comprehend) There are also game developers who openly label games like WoW unethical, e.g. http://en.wikipedia.org/wiki/Jonathan_Blow Interesting. I don't think I would go so far as to claim that WoW was unethical...just uninteresting ;) But that's just me. This is at least one thing the videogame world does that I do consider unethical: Proprietary/Closed platforms. But that's not just a videogame thing, of course. I consider proprietary/closed platforms in general to be unethical. (Oh crap, I think I can feel myself turning into Stallman!) s/This is at least one/There is at least one/
Re: Why Ruby?
On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said: I can clearly see that you haven't used an Objective-C/D bridge. The reason (or at least one of the reasons) for which Michel Fortin (as well as I) gave up the Objective-C/D bridge and started to modify DMD is template bloat. I'm not saying that using template strings as lambdas is going to bloat your executable/library as much as the bridge does but I always think twice before adding a template to my code. I also want to add that the code bloat in the D/Objective-C bridge was more because the bridge needed to create two stubs for each method in all Cocoa classes, and those stubs contained code to translate exceptions from one model to the other. Using templates and mixins made the creation of those stubs easy, but I don't think another method of generating these stubs would have faired better. So the bloat came from the approach (generating stubs for everything) much more than the implementation choice (templates). The new approach is to avoid having to generate stubs by exposing directly the Objective-C objects rather than wrappers around them. Less wrapping, less bloat. -- Michel Fortin michel.for...@michelf.com http://michelf.com/
Re: Why Ruby?
On 2010-12-19 15:17:50 -0500, Jacob Carlborg d...@me.com said: On 2010-12-19 19:29, Michel Fortin wrote: Has anyone checked which of delegates or strings cause more template bloat? I'd suspect using strings will result in less bloat because the same string will often be reused (making the compiler reuse the same template instance) whereas the compiler will likely use the mangled name of the delegate when instantiating the template... and no two delegate literals have the same mangled name. That would only be the case if the function takes the delegate as a template parameter? Indeed. Passing a delegate as a function argument won't create a new instance of that function. This is also why it runs slower: the function doesn't know which delegate is called until runtime. If the function is short, it could be inlined, which would in turn allow the delegate to be inlined and run faster. But if you somehow could force the compiler to inline 'sort' all the time it's likely the code bloat will be even worse. -- Michel Fortin michel.for...@michelf.com http://michelf.com/
Re: Game development is worthless? WTF? (Was: Why Ruby?)
You are absolutely right; life sucks for many people, and that's why some of them choose to play video games. It gives them a chance to escape reality, and game companies exploit this to make money. Game companies use all kinds of psychology in their games to keep you playing as long as possible. That is why to me there is no honor in game development. Also, I never said it's worthless; they make tons of money, and that's almost always at the expense of people like you. You are right saying games suck, since the new generation games are not games, they are just garbage simulators. But you should understand, for this kind of things there is always good and a bad practice. Popularity favors bad practices better than good. Can you say movies suck? or music in general? This is exactly same. You guys gave an example to a very bad practice, a corporation, by definition(?) nothing but profit. Now i am going to tell you about a good practice. Outcast - Probably most of you never heard of it. For me, it had everything that define a game.
Re: Game development is worthless? WTF? (Was: Why Ruby?)
Games as worthless as movies and music or any kind of art. -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Re: Why Ruby?
On Sun, 19 Dec 2010 17:51:34 +0200, Jacob Carlborg d...@me.com wrote: On 2010-12-19 01:01, Walter Bright wrote: Simen kjaeraas wrote: The problem of D's lambda syntax is it is optimized for longer functions. Usually, the delegates I write are one line long. I cannot see that this syntax collides with anything at the moment, but feel free to enlighten me: { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } If size and simplicity of typing are critical, are those really better than: ab ? No, that syntax is not better. Ignoring technical limitations: ab is to me, looks million times better than these 4 or other absurd syntaxes proposed on this thread. { = 4; } { a = 2*a; } { a, b = ab; } { = @ + @; } // turns into { a, b = a + b; } You might call this a hack, fine! -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Re: Why Ruby?
what happens in the following snippet? int a = 5; sort!a b(whatever); int a = 5; writeln(oh that a? this is what happens!); -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Re: Why Ruby?
int[] a = [ 1, 2, 3 ]; string[] b = [ a, b, c ]; sort!(a[0] b[0])(zip(a, b)); or int[] a = [ 1, 2, 3 ]; string[] b = [ a, b, c ]; sort!(@[0] @[0])(zip(a, b)); -- auto var = sequence!(a[1] + n-1 + a[0])(1, 2); or auto var = sequence!(@1[1] + n-1 + @1[0])(1, 2);
Re: Why Ruby?
On Mon, 20 Dec 2010 01:18:20 +0200, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: int[] a = [ 1, 2, 3 ]; string[] b = [ a, b, c ]; sort!(a[0] b[0])(zip(a, b)); or int[] a = [ 1, 2, 3 ]; string[] b = [ a, b, c ]; sort!(@[0] @[0])(zip(a, b)); -- auto var = sequence!(a[1] + n-1 + a[0])(1, 2); or auto var = sequence!(@1[1] + n-1 + @1[0])(1, 2); That syntax can't even differ a b from b a, and @ is ugly to be used frequently. On the other hand strings open many doors probably limited by only our imagination. And it is there in the language spec, enabled by tiny template feature, passing strings as arguments. -- Using Opera's revolutionary email client: http://www.opera.com/mail/