Probably not so popular on the other side of the atlantic, but here in Britain, every october is conker season, where we attach horse chessnuts (invariably hardened by baking, soaking in vinegar, hand cream, galvanisation, you name it) to string, then smash them into an opponent's conker (or your own elbow if you miss) until one shatters into many pieces. If you drop it, you have to try to pick it up while your opponent repeatedly stamps on it. Joy and safety goggles all round!
In my last place, I was mugged on my own street. I was burgled. There was a guy a floor above me. A schitzphrenic who wasn't taking his meds, who was throwing rubbish out of his windows, and beer bottles at passers by. I would like to live in a place where people respect others the way I respect them.
You're in America! I'm in London, where property prices are ridiculous. I'm spending £1100/month to rent a place that would cost me 240000 quid to buy. I CAN'T move out of the city, because that's where my jobs are. I'm happy for you. you've got your fucking house and you like to gloat from your "trickle-down" economy (the other word for that is "feudalism".. it's not good for economics). You're either rich enough to live in orange county, stupid enough to live in an area where your life is in danger, or dumb enough to waste your time on slashdot whilst you evidently made it. Congratulations motherfucker. I WORK for a living.
yes, I'm a victim of the requirement to have somewhere to live when I retire. I had this requirement as a juvenile, and I still have it now as an adult.
Trickle-down economics was the primary cause of the irish famine. When you have an entire population of tenants utterly dependent on their landlords, all it takes is a couple of years of crop failure and you get to see what happens when the landlords themselves run out of money - everyone starves. The other word for it is "fuedalism".
Too right. I'm writing a cross-platform app, and switch between visual studio on windows and eclipse on linux. Visual studio has an advanced mode, and I very rarely turn it on. 99% of what I click on is there in beginner mode. Advanced mode is full of features I don't understand or care about. Eclipse just has menu, after menu, after menu, after.. HOW DO I CREATE A FUCKING WORKING SET?!!?!? (half an hour later..) oh, there it is.
I found embracing change makes me a less angry computer user. Hell, I am one of those rare people who likes gnome 3 and always hated the taskbar anyway. I'm managing fine without one!
You could probably get a good idea of how many of them are contractors and how many are permanent by how shit their system is:-) The contractors go "that'll do.. completed my objectives.. I'll just fill in my timesheet". The permanent guys have to put up with their shit for years! (I'm now about to get flamed by the 10% of contractors who take pride in their work. I guess if you're replying to this message in disgust, you're probably one of those 10% and good on you! You've been tarred with a dirty brush)
Well, the smileys should suggest I had no malice or intent on bickering:-) I think we've established that you know more about ruby and I know more about python. I didn't ignore your points, I just didn't prefer their recommendations. I'm a bit of a language nerd (I would happily write our 64k demos in D if only for the fact that 'hello world' in D is 128k, so a VERY odd use of C++ and a bit of assembler it is then..), so I remember the first announcement on slashdot years ago that some japanese guy had come up with a new scripting language, and thought "ooh, new language!" and clicked. It went on to say how putting an @ in front of member variables is better than "self." (you don't have to call it 'self' btw). So some characters are different, but semantically, the prefix does the same thing, BUT, making '@' or 'self' a variable you accept as an implied parameter makes member functions of the same type as global functions and can be passed around as such. C++ can't do this. You can't pass a member function from a class to something that doesn't know about that class and just call it, which means if you want to use threads, you have to resort to good old C and void*
I have been using ruby probably as little as possible, but learning what counts becase I've been using puppet for about 3 years. I need to add extensions to it. I would say I understand the basics of using it as a scripting language, but I wouldn't attempt anything hard-core in it, and my way of learning is a bit of a barrier to learning it.
I learnt python in 2001 after turning up to work with a massive hangover and struggling with \${$(wait, have we dereferenced enough yet?}\perl#, and thinking "there MUST be better than this". 3 hours of company time wasting, I swore never to program in perl ever again. Actually, I still use it for when I would use sed/awk if perl didn't exist, which is what it did very well at and was a breath of fresh air at the time. Alas, adding "bless" to create classes, and writing a 400 page "man perloo" man page on how to make it look a bit like OO was so alien and WRONG to me at a time when it was winning "open source project of the year" and people were saying how great it was. I actually got BANNED from coding in python at that job, because my luddite boss thought perl was brilliant. 3 years later he was invited to leave for not being creative enough:-)
What I like about python is the fascist devotion to correctness they have. Ruby is more like "anything goes if it's great". Python is more like "it's not going in if I can find one single edge-case where it might be a tiny problem". That's how it, as a language as old as perl, has survived so long and is expanding so well. They spent THREE YEARS arguing on the development list about how to implement the ternary operator and what syntax to use. Eventually, nobody could come up with something exact enough, so they said "just use 'if'". You can write "x += 1", but not "x++". Why make TWO things to learn, when adding 1 is the same as adding 2?. It's only got about 30 keywords.
Anyway enough about python. I also code in D, OCaML, haskell (went off OCaML when haskell got more 'useable' with REAL libraries, like opengl and directX), REBOL, and when drunk, SDL basic:-D
As for the demos and picking up tips - you'll get some very good answers back from pouet.net - and about 1000 flames from wankers, some of whom probably answered about an hour prior with a really good answer.. it's almost a running joke now that you have to act like a cunt on pouet.
YES... the linux version is 71k.. much as I hate to say it, MSVC makes smaller binaries than GCC. Also, if you're on windows, your virus checker might kick up a stink.. the packer we used.. "kkrunchy" by a group called fairlight, something which is very good at compressing about 200k of code down to les
Caught one guy with pants round ankles watching porn at Assembly. If you're just there to play games and not do anything creative, then yeah, you're a nerd.
In short, fuck big LAN parties. They have none of the charm of the small group gaming sessions
Which don't have the charm of demoparties, which Dreamhack once was. Gamers pretty much took over The Gathering, which had a great history of being a 'scene event. Once they'd become disinterested enough to get alcohol banned and refuse to kill audio/lights when what few demos there were got shown (TG even moved the demo stuff into a separate room so they could keep counterstrike crap on the main screen), it was a sad day for hackers.
I'm not sure how you missed the point there. Being able to extend objects almost universally is something I think most people would consider a very nice feature. How you can argue that having some universal external function (which you'd have to add overrides for for new types) is better? I guess if you hate having class methods perform functions on their own objects you'd have a point... but then I'd assume you hate languages like C++ and Java as well?
I believe YOU missed the point:-) The actual method which performs the function is __len__. It does exactly what the ruby foo.length does, but with the added advantage that you don't HAVE to make it - one will be implied for you where possible, saving you some work. The convenience function len(x) simply returns x.__len__(), and is intelligent enough to use the builtin where you haven't made one, so it's actually defining a consistent predicate for creating a length method. It is a global function so it doesn't clash with member namespace. You don't have to write overrides at all, which is the whole point. Most ruby classes don't automatically have a length member function and thus there is no defined way to get the length of a type. Python will attempt to make one for you and the cleanest way to call it is via len(), which forces people to make their length member function __len__. I have no problem with C++ at all.
Then use the ones you know, and when they don't work out for you or you think you can do it cleaner with a different one look it up.
Or just use a list comprehension. Learn once, use everywhere.
"B_IsThisValid(thing)" than "thing.valid?" ?
neither. thing.valid. If it couldn't be evaluated as boolean, I wouldn't have used it in a boolean context in the first place. I would've got an error. Python is very strict about booleans, in fact the opposite of "everything is an object". You can only evaluate an if statement with a boolean expression, so the famous C fail of "if (x=y)" instead of "if (x==y)" doesn't happen.
I have a feeling you just didn't grasp some of the core paradigms.
So not a very good teaching language then;-)
I come from a very low level ASM/C/C++ background in things like embedded devices
I came from games. ASM/C/C++. I hold 2 scene.org awards for coding 64k demos. I mostly use ruby for hacking puppet modules these days.
Consistent object model: list.length vs. len(list)
Consistent with what? if we're going to be pedantic here, it's list.__len__(). The len() function calls the internal property where available (ie. you specifically wrote one). A special data type doesn't need to actually implement __len__ to do something sane with len. Or rather, it's to make special data types (eg. fast C arrays) consistent with normal ones. It's __len__ rather than 'length' because you may want to define the real word argument as something else without losing consistency. Auto methods which have a built in language are all named like that. For consistency.
Enumeration is just another method of objects that are enumerable. list.each {|item|.... }
Or list.each_item, or list.try_convert, or all of the other built in lambda functions, all of which can be replaced with a list comprehension, which can do a lot more without learning more than one syntactic concept.
simple.
ugly, and leaves you reading the reference guide for the array class every time you're trying to find the method you're after because there's way too many.
Method calls that return a boolean should have a question mark
Why? Do methods that return an into have a big letter I? Do string methods have an S? What about methods that return a metaclass? That's not consistent. It's syntactic litter.
Everything returns an object including if/else statements.
If/else is flow control, not a function. Only objects which can meaningfully be applied to an lvalue context return an object in python. Not sure what crazy indentation you would use to embed an if/else statement into somewhere you would use that whilst trying to keep it readable. That's simply not useful. By adding the whopping extra word "return" within a block, you can make it clear that you're returning a value, and more importantly, which value, rather than the implied one which just happens to be the result of the last statement
and open classes make it easy to do
Open classes (or "duck typing", or "monkey patching" as it's also affectionately known) make it easy to modify a perfectly well documented class by changing its functionality, then wondering why upgrading a library broke it. You can actually do this in python just as easily, but the difference is that while ruby programmers think it's the best thing EVAR, hop over to an equivalent python list and you can find plenty of essays about why it's nothing more than something that should be used if you really can't use proper inheritance and the 3 extra lines you would have to type to make it clear to the reader that you're doing it.
Doing things in less characters isn't as good as doing things more quickly. I certainly spend more time thinking than typing.
As someone who uses both, I probably wouldn't choose Ruby for the following reasons:
Lambda functions versus list comprehensions. Ruby has about 60 of the things attached to arrays. Python just has if/for/in and the same set of clauses found elsewhere in the language. Or to put it another way, far less keywords (ok, member functions aren't really keywords, but..).
Speed. Ruby has its uses, unless performance starts to become an issue, where you'll find yourself having to use something else
The indent thing. Here comes the flame war! Alas, the original intention for this is to force people to indent properly. Something which beginners fail to do.
Easier to extend with C. Via things like weave
Very clear syntax. The whole "there should be at least one obvious way to do it" motto is a good one. The sometimes optional but not always ? operator after function calls in ruby... why? Either make it obligatory, or get rid of it. The do |var| syntax is a bit misleading as well.
and their "help me choose" pages are rarely representative of the actual choices, anyway
A graphics solution designed for advanced photo and video editing, graphic design and financial modeling: A high-end graphics solution A graphics solution designed for presentations, spreadsheets and rich media: A mid-range graphics solution A graphics solution designed for basic Internet, email, word processing and light graphics applications: Integrated Graphics
I have no idea what they mean by "financial modelling" (which they spelt wrong), but I can only imagine they mean "you're a trader and need 4 screens full of stock tickers". Not that I'm that worried about trader being ripped off by a couple of hundred quid, but then..
Why the hell do you need anything other than integrated graphics for presentations, spreadsheets, and rich media? What kind of spreadsheet are you writing where you need mid-range 4*anistropic filtering, and 16* anti-aliasing? More to the point, what spreadsheet software even DOES that? Presentations.. if you want to get laughed out of the theatre, go ahead and embed that massive 3D animation (I'm not sure you can do that in powerpoint, either). And "rich media"? You mean watching a fucking DVD? Intel GMA has the basic tools for coding mpeg decompression, so it's bullshit.
No, if you're ONLY going to use email, and probably turn it on once a week, basically you suck, get the integrated graphics. I might argue that word processing, with its enormous fonts and alignment processing might need more of a graphics chip than a spreadsheet, but probably not much.
Antarctic glacial records date back 600000 years and is bloody accurate. This defence is equivalent to looking at video evidence of a murder and saying "yeah, but you weren't actually -there-". It's on the tape. you lose.
funny you should say that. At one place I worked, they only paid us if we got called out. So we wrote a perl script called "cha-ching.pl" which created a fault then fixed it. We got paid.
Probably not so popular on the other side of the atlantic, but here in Britain, every october is conker season, where we attach horse chessnuts (invariably hardened by baking, soaking in vinegar, hand cream, galvanisation, you name it) to string, then smash them into an opponent's conker (or your own elbow if you miss) until one shatters into many pieces. If you drop it, you have to try to pick it up while your opponent repeatedly stamps on it. Joy and safety goggles all round!
In my last place, I was mugged on my own street. I was burgled. There was a guy a floor above me. A schitzphrenic who wasn't taking his meds, who was throwing rubbish out of his windows, and beer bottles at passers by. I would like to live in a place where people respect others the way I respect them.
You're in America! I'm in London, where property prices are ridiculous. I'm spending £1100/month to rent a place that would cost me 240000 quid to buy. I CAN'T move out of the city, because that's where my jobs are. I'm happy for you. you've got your fucking house and you like to gloat from your "trickle-down" economy (the other word for that is "feudalism".. it's not good for economics). You're either rich enough to live in orange county, stupid enough to live in an area where your life is in danger, or dumb enough to waste your time on slashdot whilst you evidently made it. Congratulations motherfucker. I WORK for a living.
here in europe, what you call "liberals", we call "normal people".
yes, I'm a victim of the requirement to have somewhere to live when I retire. I had this requirement as a juvenile, and I still have it now as an adult.
Trickle-down economics was the primary cause of the irish famine. When you have an entire population of tenants utterly dependent on their landlords, all it takes is a couple of years of crop failure and you get to see what happens when the landlords themselves run out of money - everyone starves. The other word for it is "fuedalism".
Too right. I'm writing a cross-platform app, and switch between visual studio on windows and eclipse on linux. Visual studio has an advanced mode, and I very rarely turn it on. 99% of what I click on is there in beginner mode. Advanced mode is full of features I don't understand or care about. Eclipse just has menu, after menu, after menu, after.. HOW DO I CREATE A FUCKING WORKING SET?!!?!? (half an hour later..) oh, there it is.
I found embracing change makes me a less angry computer user. Hell, I am one of those rare people who likes gnome 3 and always hated the taskbar anyway. I'm managing fine without one!
Automatically insert data from an SQL database, usually.
Fox isn't state media.
You could probably get a good idea of how many of them are contractors and how many are permanent by how shit their system is :-) The contractors go "that'll do.. completed my objectives.. I'll just fill in my timesheet". The permanent guys have to put up with their shit for years! (I'm now about to get flamed by the 10% of contractors who take pride in their work. I guess if you're replying to this message in disgust, you're probably one of those 10% and good on you! You've been tarred with a dirty brush)
FOR ONCE, could you fanboys just appreciate some technology without finding some way to draw attention to your religion?
Well, the smileys should suggest I had no malice or intent on bickering :-) I think we've established that you know more about ruby and I know more about python. I didn't ignore your points, I just didn't prefer their recommendations. I'm a bit of a language nerd (I would happily write our 64k demos in D if only for the fact that 'hello world' in D is 128k, so a VERY odd use of C++ and a bit of assembler it is then..), so I remember the first announcement on slashdot years ago that some japanese guy had come up with a new scripting language, and thought "ooh, new language!" and clicked. It went on to say how putting an @ in front of member variables is better than "self." (you don't have to call it 'self' btw). So some characters are different, but semantically, the prefix does the same thing, BUT, making '@' or 'self' a variable you accept as an implied parameter makes member functions of the same type as global functions and can be passed around as such. C++ can't do this. You can't pass a member function from a class to something that doesn't know about that class and just call it, which means if you want to use threads, you have to resort to good old C and void*
I have been using ruby probably as little as possible, but learning what counts becase I've been using puppet for about 3 years. I need to add extensions to it. I would say I understand the basics of using it as a scripting language, but I wouldn't attempt anything hard-core in it, and my way of learning is a bit of a barrier to learning it.
I learnt python in 2001 after turning up to work with a massive hangover and struggling with \${$(wait, have we dereferenced enough yet?}\perl#, and thinking "there MUST be better than this". 3 hours of company time wasting, I swore never to program in perl ever again. Actually, I still use it for when I would use sed/awk if perl didn't exist, which is what it did very well at and was a breath of fresh air at the time. Alas, adding "bless" to create classes, and writing a 400 page "man perloo" man page on how to make it look a bit like OO was so alien and WRONG to me at a time when it was winning "open source project of the year" and people were saying how great it was. I actually got BANNED from coding in python at that job, because my luddite boss thought perl was brilliant. 3 years later he was invited to leave for not being creative enough :-)
What I like about python is the fascist devotion to correctness they have. Ruby is more like "anything goes if it's great". Python is more like "it's not going in if I can find one single edge-case where it might be a tiny problem". That's how it, as a language as old as perl, has survived so long and is expanding so well. They spent THREE YEARS arguing on the development list about how to implement the ternary operator and what syntax to use. Eventually, nobody could come up with something exact enough, so they said "just use 'if'". You can write "x += 1", but not "x++". Why make TWO things to learn, when adding 1 is the same as adding 2?. It's only got about 30 keywords.
Anyway enough about python. I also code in D, OCaML, haskell (went off OCaML when haskell got more 'useable' with REAL libraries, like opengl and directX), REBOL, and when drunk, SDL basic :-D
As for the demos and picking up tips - you'll get some very good answers back from pouet.net - and about 1000 flames from wankers, some of whom probably answered about an hour prior with a really good answer.. it's almost a running joke now that you have to act like a cunt on pouet.
Here's our last effort:
http://pouet.net/prod.php?which=53833
YES... the linux version is 71k.. much as I hate to say it, MSVC makes smaller binaries than GCC. Also, if you're on windows, your virus checker might kick up a stink.. the packer we used.. "kkrunchy" by a group called fairlight, something which is very good at compressing about 200k of code down to les
You don't need to count clock cycles. You just bind some code to the horizontal blank interrupt. Doesn't waste any cpu at all :-)
Caught one guy with pants round ankles watching porn at Assembly. If you're just there to play games and not do anything creative, then yeah, you're a nerd.
Which don't have the charm of demoparties, which Dreamhack once was. Gamers pretty much took over The Gathering, which had a great history of being a 'scene event. Once they'd become disinterested enough to get alcohol banned and refuse to kill audio/lights when what few demos there were got shown (TG even moved the demo stuff into a separate room so they could keep counterstrike crap on the main screen), it was a sad day for hackers.
you (and pretty much all christians) were almost right...
http://en.wikipedia.org/wiki/Papyrus_115
I believe YOU missed the point :-) The actual method which performs the function is __len__. It does exactly what the ruby foo.length does, but with the added advantage that you don't HAVE to make it - one will be implied for you where possible, saving you some work. The convenience function len(x) simply returns x.__len__(), and is intelligent enough to use the builtin where you haven't made one, so it's actually defining a consistent predicate for creating a length method. It is a global function so it doesn't clash with member namespace. You don't have to write overrides at all, which is the whole point. Most ruby classes don't automatically have a length member function and thus there is no defined way to get the length of a type. Python will attempt to make one for you and the cleanest way to call it is via len(), which forces people to make their length member function __len__. I have no problem with C++ at all.
Or just use a list comprehension. Learn once, use everywhere.
neither. thing.valid. If it couldn't be evaluated as boolean, I wouldn't have used it in a boolean context in the first place. I would've got an error. Python is very strict about booleans, in fact the opposite of "everything is an object". You can only evaluate an if statement with a boolean expression, so the famous C fail of "if (x=y)" instead of "if (x==y)" doesn't happen.
So not a very good teaching language then ;-)
I came from games. ASM/C/C++. I hold 2 scene.org awards for coding 64k demos. I mostly use ruby for hacking puppet modules these days.
Consistent with what? if we're going to be pedantic here, it's list.__len__(). The len() function calls the internal property where available (ie. you specifically wrote one). A special data type doesn't need to actually implement __len__ to do something sane with len. Or rather, it's to make special data types (eg. fast C arrays) consistent with normal ones. It's __len__ rather than 'length' because you may want to define the real word argument as something else without losing consistency. Auto methods which have a built in language are all named like that. For consistency.
Or list.each_item, or list.try_convert, or all of the other built in lambda functions, all of which can be replaced with a list comprehension, which can do a lot more without learning more than one syntactic concept.
ugly, and leaves you reading the reference guide for the array class every time you're trying to find the method you're after because there's way too many.
Why? Do methods that return an into have a big letter I? Do string methods have an S? What about methods that return a metaclass? That's not consistent. It's syntactic litter.
If/else is flow control, not a function. Only objects which can meaningfully be applied to an lvalue context return an object in python. Not sure what crazy indentation you would use to embed an if/else statement into somewhere you would use that whilst trying to keep it readable. That's simply not useful. By adding the whopping extra word "return" within a block, you can make it clear that you're returning a value, and more importantly, which value, rather than the implied one which just happens to be the result of the last statement
Open classes (or "duck typing", or "monkey patching" as it's also affectionately known) make it easy to modify a perfectly well documented class by changing its functionality, then wondering why upgrading a library broke it. You can actually do this in python just as easily, but the difference is that while ruby programmers think it's the best thing EVAR, hop over to an equivalent python list and you can find plenty of essays about why it's nothing more than something that should be used if you really can't use proper inheritance and the 3 extra lines you would have to type to make it clear to the reader that you're doing it.
Doing things in less characters isn't as good as doing things more quickly. I certainly spend more time thinking than typing.
As someone who uses both, I probably wouldn't choose Ruby for the following reasons:
Lambda functions versus list comprehensions. Ruby has about 60 of the things attached to arrays. Python just has if/for/in and the same set of clauses found elsewhere in the language. Or to put it another way, far less keywords (ok, member functions aren't really keywords, but..).
Speed. Ruby has its uses, unless performance starts to become an issue, where you'll find yourself having to use something else
The indent thing. Here comes the flame war! Alas, the original intention for this is to force people to indent properly. Something which beginners fail to do.
Easier to extend with C. Via things like weave
Very clear syntax. The whole "there should be at least one obvious way to do it" motto is a good one. The sometimes optional but not always ? operator after function calls in ruby... why? Either make it obligatory, or get rid of it. The do |var| syntax is a bit misleading as well.
Which is false. And bigoted.
I have no idea what they mean by "financial modelling" (which they spelt wrong), but I can only imagine they mean "you're a trader and need 4 screens full of stock tickers". Not that I'm that worried about trader being ripped off by a couple of hundred quid, but then..
Why the hell do you need anything other than integrated graphics for presentations, spreadsheets, and rich media? What kind of spreadsheet are you writing where you need mid-range 4*anistropic filtering, and 16* anti-aliasing? More to the point, what spreadsheet software even DOES that? Presentations.. if you want to get laughed out of the theatre, go ahead and embed that massive 3D animation (I'm not sure you can do that in powerpoint, either). And "rich media"? You mean watching a fucking DVD? Intel GMA has the basic tools for coding mpeg decompression, so it's bullshit.
No, if you're ONLY going to use email, and probably turn it on once a week, basically you suck, get the integrated graphics. I might argue that word processing, with its enormous fonts and alignment processing might need more of a graphics chip than a spreadsheet, but probably not much.
Antarctic glacial records date back 600000 years and is bloody accurate. This defence is equivalent to looking at video evidence of a murder and saying "yeah, but you weren't actually -there-". It's on the tape. you lose.
I did once wonder - if they removed IE, how would you download netscape?
Well, there's that old saying - the day microsoft make something that doesn't suck, it'll be a vacuum cleaner.
funny you should say that. At one place I worked, they only paid us if we got called out. So we wrote a perl script called "cha-ching.pl" which created a fault then fixed it. We got paid.