6 ms·
Ruby 2.0.0-rc2 is released
- richardjordan 14y agoRuby rescued me from a life of non-programming. I'm happy to see 2.0 inching closer. I graduated Physics in 1995 and my programming experience had been hobbyist on my Apple II at home as a kid or on my Physics course projects, in simple languages. All my friends went into tech in some way or other mostly programming. I looked at C but after a little poking it scared the heck out of me and, intimidated I gave up and did slmethjng else. Only when I had to did I come back to trying programming 15 years later and discovering Ruby I learned that I could, and that I can. I've loved it ever since.
- eduardordm 14y agoLanguages like ruby and python democratize programming. Learning programming with C is like having a 25 years old mother of 2 as your first girlfriend.
- VeejayRampay 14y agoOR it is having a mature and charming 35 year-old with lots of experience as your first girlfriend/boyfriend. The gap is huge at first but with the growing relationship you learn about all the intricate details of being with someone on a daily basis, which can make all subsequent relationships much easier to handle. C is rough, it's roots, but it doesn't distort the programmer in any way and teaches very sane principles as much as the innards of the machine, which is always a plus for all further endeavours. Just my two cents.
- wuest 14y agoI couldn't have said it better. C provides a wonderful set of glasses through which other languages make excellent sense.
- chrismarlow9 14y agoWriting C code on an older machine kind of taught me that programming is mostly about just one thing: Managing memory in the most efficient way. Writing PHP or Ruby code spoils you. You completely forget that memory even exists, until you need to do something heavy. It's a good lesson to learn if you want to move beyond just basic web dev personal project stuff. But if all you need is to automate some calculations or store an email list in a db I wouldn't bother.
- ufo 14y agoThis sounds a lot like Stockholm Syndrome :P
- chrismarlow9 14y agoNot too sure about this. With the explosion of ajax websites and mobile apps the burden has been put on the client. This means less memory. It's very odd because as far as mobile is concerned, history is repeating itself. You have local apps running code. You can't assume those people running the app have as much memory as you. To build the best working app, run it on a smartphone with horrible specs. If it runs clean there, it will run clean most anywhere. On the ajax website side it's the same thing. You're pushing the code execution off on the user. You have to be crafty about not assuming anything about the client. A recent example I encountered was a "suggest as you type" feature for a website. If you try to lookup suggestions everytime a user types a letter in a search it will fail horribly on machines that are even slightly old. However on newer machines it works like a champ. So should we just not worry about those older machines? Even the recent local sql db stuff (Web SQL DB) for HTML5 is an attempt to solve memory efficiency with current trends of pushing code execution to the client. Desktops (and most smartphones) now can handle large amounts of data, but the older models of ram storage via javascript arrays etc are not the way to maximize this. The local SQL storage stuff solves this issue by using the ROM. Really this could have been done from the start (and was with cookies on some level), but necessity is the mother of invention. No dev has a "love" of being trapped by constraints, but learns to utilize those constraints in the best way possible so when better things come along they can go above and beyond. A real world example would be someone who learns to efficiently use memory can push off audio/video/image editing processes to the client side, while someone who relies on an abundant amount of memory could only push off maybe a few statistic calculations to the client side. If you're looking for a business benefit to this: Pushing code execution off on the client without interrupting the user experience saves money on servers when dealing with scalability. Cut the processing in half by putting 50% of processing off on the client side and you cut your server cost in half.
- ritchiea 14y agoI think one of the issues is how different languages are taught. My first experience with Java was in an awful CS AP class in high school that was an unrewarding grind and I eventually dropped it. My next experience was in an intro CS course at liberal arts school and the assignments were largely start with an empty screen of code and write some interesting computations from scratch. What I suppose I didn't realize at the time is that those classes weren't designed to teach me to build things with code, which is what I really wanted to do. I don't even want to be overly critical of the college level course because the academic CS stuff really helped me frame some of my thinking about code in the type of real world applications I build now. We also touched on some Haskell, automata theory, circuits, turing machines and assembly in that class. Still it left me feeling like building programs people use was impossible. When I first started writing a rails app in ruby it was an "aha!" moment about how people actually get things done. Most people learning ruby learn it in the context of trying to build something others will use.
- richardjordan 14y agoIf I fat thumbed a down vote on my iPhone i apologize as I was trying to upvote you as I think you expressed this very well. I could get going with Ruby quickly and achieve a result fast which made me happy and want to do more.
- eduardordm 14y agoI have to use C because the hardware I use at my company requires it for a number of reasons (performance is not one of them). C was my first language and it is responsible for a very substantial part of my income. But I find the establishment of C and intel arch the reason you still have to use a keyboard chip to enable 32/64 bit mode in a computer: https://github.com/eduardordm/sisop/blob/master/sisop.asm https://github.com/eduardordm/sisop/blob/master/sisop.asm (see line 110) C can be low level, but it is mainly a high level language and it will 'distort' programmers just as any other language. Just because it doesn't have simple features it doesn't mean it is closer to the hardware. C teaches you how to destroy memory, not manage. malloc+free are most harmful functions of the history of computers. (and I don't think I'm exaggerating) You can actually evaluate how awful a C programmer is by counting the number of mallocs/frees he uses. Oh, I don't like C, by the way. (but I'm really grateful for knowing how to solve problems using this handicapped tool)
- tedunangst 14y agoThe A20 gate is more like switching from 20 bit mode to 32 bit mode. It predates 64 bits by a long time.
- eduardordm 14y agoKind of my point, you still need to enable it, even though it doesn't actually exists.
- richardjordan 14y agoHa! So true. I am currently teaching my 8yo programming, or rather in the process of building a set of teaching tools for her - right now things are very early stage, and she's busy playing VIM Adventures to familiarize herself to the keyboard and keystrokes. I'm trying to decide between Ruby and Python, which has the highly recommended Snake Wrangling For Kids going for it.
- rdrake 14y agoIf you do decide to do some Python: http://docs.python.org/2/library/turtle.html http://docs.python.org/2/library/turtle.html
- steveklabnik 14y agoThere's KidsRuby and Hackety Hack on the Ruby side.
- richardjordan 14y agoCurrently been going through HacketyHack with her... she just made a star appear on the screen :-)
- steveklabnik 14y ago<3 There are some small issues with Hackety, including one bug in a tutorial. We're working hard on fixing our big upstream dependency before being able to do another release, but please let me know what you think.
- technomancy 14y agoScratch is another option, much simpler than a ruby-based tool (it's fully visual) but dramatically more accessible. My 5 year old can't get enough of it; tonight we covered the Cartesian plane. Kids will probably outgrow it after a couple years since it has no means of abstraction, but it's superb at grabbing their attention.
- nnq 14y agoOpinionated advice: go full Python or Javascript! Being exposed to first class functions and higher order functions, without needing to wrap your head around OOP or even simple things like code blocks gives you a clear and "functional ready mind": after Python you can jump into Javascript or just as well into Haskell. From Ruby you have a little "baby wall" to climb when you go out of it to the larger world.
- jrabone 14y agoLearning programming with Ruby is like sex with your 14 year old GF. Neither of you know what to do but it's SO EXCITING! Then you find out she's pregnant and you'll be supporting her for the next 18 years.
- taligent 14y agoTo continue the analogy. She will also not work half the time and be messy beyond belief.
- mitchty 14y agoAs a guy, i'm finding these analogies to be... poorly chosen and highly offensive to the extreme. Do we really need to analogize programming languages this way? You may not like Ruby or Python as first languages but I first learnt qbasic. Do I miss it, somedays yeah, but learning one is just like learning real languages. We can learn more than one. They aren't mutually exclusive. That and can we move beyond high school analogies like this? It is getting tiring and I'm sure to outside observers it isn't helping a curious woman's impression of our corner of humanity.
- richardjordan 14y agoYeah sorta got ugly in a hurry there
- justinwr 14y agoWell, that escalated quickly.
- tutuca 14y agoYeah, unlike ruby... That only shows that the analogy doesn't fit.
- sergiotapia 14y agoRuby pulled me out of C# hell and allowed me to see other open source stacks and for that I love it. I'm so happy now that I can work with a clean language with a small difficulty curve. I look like a wizard to management! I'm not working on projects with millions of daily users, just simple CRUD enterprisey apps, and Ruby and Rails are my Virgil, guiding me through programming hell. :P
- wglb 14y agoCurious what were the worst pain points of C# for you?
- jabagonuts 14y agoI have to be careful about tendonitis flare ups in my wrist from my musician days. That makes languages like Java and C# literally more painful than languages like ruby that require less typing.
- jrabone 14y agoWhy is control-space so difficult? Christ, Eclipse auto completes so much you can just bounce on control-space all day. "m" ctrl-space "sysout" ctrl-space... It's so easy.
- mr_luc 14y agoI'll volunteer a few more: Amazing ecosystem + package manager. The problems you get to work on tend to be less soul-crushing.
- wglb 14y agoI do lots of typing, day and night, and have had near-crippling pain. I did two things that seriously helped. First, I mapped keys at the OS level that reduced awkward movements, the most obvious of which is changing the caps lock to control. The other major thing is acquiring a kinesis keyboard. After several weeks of using it, the pain gradually subsided, and now I have none. The other thing i did in conjunction with this keyboard was to remap some of the keys unusually, like putting the escape key close to where my thumb could hit it. There should be enough keyboard choices and key control to make the choice of language on criteria other than wrist or finger pain.
- zopticity 14y agoWhy do we have a post about the release candidate? Is this to raise awareness for the release or something. It doesn't seem to make sense to post about all version. If we did this, Chrome browser would be nuts considering how many versions it goes through!
- taf2 14y agosure... but ruby is on a yearly release cycle and i don't know about you but this does get me pretty excited. brings out the fan boy in me ;-) also it gives me heads up that hey new release of ruby coming out soon, maybe i should go test the gems i maintain and make sure they're going to be compatible. RC2 is pretty close to p0
- jewel 14y agoIt seems like it'd be possible to automate gem testing for this scenario. Take the 1000 most popular gems, run the tests that come with the gem in 1.9.3. Run the tests again with the RC and see if any that succeed with the stable version fail with the RC.
- steveklabnik 14y agoMany Rubyists use Travis to do CI with their gems, and have ruby-head testing, often with allow-failures set. Here's one of mine: https://travis-ci.org/drapergem/draper https://travis-ci.org/drapergem/draper
- rrouse 14y agoIn theory that would work, but the effort to get all the dependencies working for each gem could be overwhelming.
- hartator 14y agoI guess maybe because a release candidate of Ruby might be the "final" Ruby 2.0.0 and it can make gem mainteners want to check their code compatibility. Web developers have difficulties keeping their website up to date with all browser, so it can be overkill to try to keep up with release candidate of every browser.
- whalesalad 14y agoI cannot wait for this to become part of the rbenv install list. Looking forward to giving it a spin, particularly due to the require enhancements. They should improve rails boot time significantly.
- bithive123 14y agoUpdate your ruby-build plugin, it's there.
- nfm 14y agoCan't wait to see refinements start getting used in libraries. I guess it'll be some time until people start requiring Ruby 2.0, but there are some seriously excellent new features in the works. See https://speakerdeck.com/a_matsuda/ruby-2-dot-0-on-rails https://speakerdeck.com/a_matsuda/ruby-2-dot-0-on-rails for a good overview.
- steveklabnik 14y agoNote that refinements are an 'experimental' feature only for Ruby 2.0, and many library authors don't want to use refinements. So I wouldn't expect to see a very big uptake in their adoption.
- nfm 14y agoI don't know a lot about this, apart from the fact that the implementation is a bit contentious. Can you elaborate on some of the opposition to refinements?
- steveklabnik 14y agoFrom the rspec maintainer: http://www.ruby-forum.com/topic/4408519 http://www.ruby-forum.com/topic/4408519 Brian Ford, one of the heads of Rubinius, has also been very outspoken about refinements, though I can't remember a specific link at this time.
- trustfundbaby 14y agoDon't wait to try this out, I've been using this in production and it really flies ... I'm getting results in simple tests right around 60-70% which is right in line with this guy https://gist.github.com/soffes/4478454 https://gist.github.com/soffes/4478454. Can't really measure performance boost in production though, since I can't afford to get newrelic just yet
- argarg 14y agonewrelic ruby agent is unusable on ruby 2.0 yet anyway. It breaks the whole app. Pretty much everything else works for me though!
- zura 14y agoAnyone here using Ruby for non-web stuff?
- Argorak 14y agoYes, a lot. Chef, puppet and vagrant mostly, but also for a lot of command line script.
- crazydiamond 14y agoYes, command line and ncurses (rbcurse / highline, ffi-ncurses).