6 ms·
Where does Ruby go from here?
- danso 12y agoI would love Ruby to become the goto "glue" language between different platforms and applications. I confess to not being more than a layperson in Perl, even though Ruby is heavily inspired by it...could Ruby ever replace Perl as the "Swiss-army chainsaw of scripting"? Or are their technical hurdles (such as performance) that would keep Ruby from being that kind of status quo?
- elliotec 12y agoThats what I use it for.
- Igglyboo 12y agoDo you have any experience with Python? IMHO I think python fits that niche better than ruby or perl.
- humanrebar 12y agoRuby is generally more concise and easier to write though probably harder to maintain. For example, when shelling out, ruby lets you do it many ways, including the familiar backtick syntax. In python, you shell out with popen -- you need to contruct argument lists, wire up stdout and stderr, etc. Python's way might actually be better (more explicit, less ambiguity, easier to handle errors) but often you might just want something that's simple and readable. For the record, there are nicer python APIs and safer ruby APIs. These are just general comments on the different ecosystems.
- rch 12y agoTry the python 'sh' module (https://github.com/amoffat/sh https://github.com/amoffat/sh). For example: from sh import git print git('version')
- rboling91 12y agoI think that both Python and Ruby can serve this purpose well, but both the block and method_missing functionality in Ruby can result in highly flexible and concise APIs. Correct me if I'm wrong, but I don't think there's a precise analog in Python to the Proc/Block syntax found in Ruby, maybe with the exception of lambdas. Furthermore, delegation using method_missing can result in APIs/libraries being very concise and readable.
- btown 12y agoIn Python, since functions can be defined anywhere, and decorators can execute arbitrary code (including registering and running the functions they decorate) and be passed variables from the scope they're used, you can make some pretty powerful DSLs. And method_missing delegation can largely be replaced by defining classes at runtime, especially now that people are getting used to passing hashes as arguments (in fact, Rails seems to be slowly deprecating find_by_foo_and_bar in favor of where(foo: _, bar: _)?).
- wtetzner 12y agoCan you give reasons?
- Igglyboo 12y agoPython is installed by default on most linux distros, from my experience it is rare if ruby is pre-installed. Python in my opinion is easier to write, and reading it is usually like reading plain english. Python has a much larger community/ecosystem than ruby outside of web frameworks (rails kills django in popularity).
- valarauca1 12y agoPerl, Ruby, Python all have the necessary toolkit to fitful this roll. And all run within the same ballpark of speed. Honestly most of these scripting languages (or even perl in most of these cases) is doing the same thing a shell script can do. Just Perl made string manipulation a lot easier then the standard shell. Also Perl got there first, which is slightly important.
- kcorbitt 12y agoI think Ruby already serves this use case well. When I have to do file munging or sysadmin tasks that are a bit too complex for bash, Ruby always seems to have an elegant and readable way of getting done what I want to do. It's a combination of the syntax, standard library and ecosystem, and it does a great job.
- ufmace 12y agoI'm already using Ruby for this. It's great for making little scripts and utilities to automate things and glue things together. Being able to interface with just about anything without much boilerplate while also having all of the tools of a high-end language make it really nice. Performance may not be as great - I don't know how it compares to Perl - but it's rarely an issue for these sorts of tasks. You could be 10x slower and still not notice the difference.
- scottefein12 12y agoChef. Tungsten Replicator-a powerful infrastructure orchestration tool-is all Ruby.
- veesahni 12y agoRuby replaced Perl as my swiss-army chainsaw a long time ago.
- ayrx 12y agoThe advantage that Python or Perl has over Ruby is that they are included by default with most major Linux distros. I don't think (I may be wrong) that Ruby is. This might hurt adoption somewhat.
- oinksoft 12y agoSome Linux distributions are not including Perl now.
- elektronjunge 12y agoRuby is included in most major distros.
- scoot 12y agoOne of the (many) great features of the Amiga was ARexx. Most non-trial productivity applications had an ARexx port (API), allowing workflows to be scripted, tasks to be automated, and functionality to be extended. True preemptive multitasking probably also helped. AppleScript doesn't come close, and on Windows sketchup is the only app I know of with anything similar, which happens to be Ruby. But you can't create great workflows in an ecosystem of 1, and I expect that ship has long since sailed.
- eik3_de 12y ago> But we have technology needs that aren’t going to always be well served by Ruby What are some examples? I'll start with heavy number crunching (Go/C) and browser-based apps (JS)
- gphil 12y agoConcurrency (Clojure, Erlang)
- MoOmer 12y agoNot MRI, but JRuby + http://akka.io/ http://akka.io/ There are also some great gems like Celluloid to help. That said, it's not the same as built-in concurrency.
- scottefein12 12y agoIf you need a lightening fast API, anecdotal evidence suggests you just can't get it down to the speeds you see with Go. Rack/Ruby just isn't going to cut it.
- programminggeek 12y agoYou can get close if you don't use Rails. Seriously, Cuba + JRuby + Torquebox 4 is fast, nearly as fast as Go. http://madebymarket.com/blog/dev/ruby-web-benchmark-report.html http://madebymarket.com/blog/dev/ruby-web-benchmark-report.h...
- jshen 12y agoI'm sorry, a hello world benchmark is meaningless.
- MrBra 12y agoFor concurrency-testing-alone it might be not. If it works good at it, then it's a good indication that the concurrency model implemented in the language is not flawed and if there is a problem, then it might be somewhere else in the language. So that benchmark it's still valuable information in the sense that tells you that that particular language running on that particular runtime its not intrinsically bad at concurrency. In this particular case (JRuby) moreover, the language gets its concurrency layer thanks to Java, so I'd go really easy with that, unless you really want to say that Java is bad at concurrency or that this is not known and thus a "Hello World" example would not show it. Which are both wrongly proven statements. Nonetheless I must admit though that some of those combinations of runtime/server/frameworks are admittedly unstable to replicate or to work with in a real scenario.
- tmorton 12y agoI think this is a great idea. The ruby community is a wonderful thing, and part of that is reflected in the technology. However, the original Agile Manifesto was powerful because it made tradeoffs. "We value X over Y", even when Y is a valuable thing. For this HDD thing to take off, it has to make the similar tradeoffs explicit. For example: We value readable code over runtime performance. We value open-source frameworks and libraries over developing for popular ecosystems. We value inclusiveness, diversity, and respect over pure meritocracy. We value teaching, learning, and improving our craft over short-term productivity. We value creating wealth over capturing wealth.
- scottefein12 12y agoI think that's a great idea-want to start us off with a pull request? :)
- tmorton 12y agoDone! https://github.com/scottefein/the-happiness-manifesto/pull/7 https://github.com/scottefein/the-happiness-manifesto/pull/7
- muchabi 12y agoThere's a strange, delightful joy in finding that I agree with every statement here and in the original post/repo
- angersock 12y agoThat's a really nice feel-good list, but it also doesn't make a lot of sense in several cases: "We value open-source frameworks and libraries over developing for popular ecosystems." Most popular ecosystems nowadays are all open-source frameworks and libraries? Unless you're talking about Windows or Mac OSX, I guess? "We value inclusiveness, diversity, and respect over pure meritocracy." These are not mutually exclusive goals--even if they are, I'd rather have really good code, even if written by a racist or sexist, than bad code (period). Again, I'm not sure we have to make that choice. "We value creating wealth over capturing wealth." What does this even mean? This is a programming language, ffs. Your statement makes sense in, say, the heyday of APL or Smalltalk or some other very vendor-specific language, but that's not quite the case today. Are you talking about not doing data-mining to monetize your fellow man? About not creating yet-another analytics or ad platform? What then, exactly, are you driving at? "We value teaching, learning, and improving our craft over short-term productivity." Again, not mutually exclusive. Also, part of learning and improving your craft is knowing when a quick hack is the right answer instead of a full solution.
- JonnieCache 12y agoI don't want to leave ruby, but at the end of the day, it's slow. Jruby is pretty decent, but the clunkiness of the JVM takes the fun out of it. Maybe it's just the lack of a corporation pouring billions into it like google did with V8, but I suspect that ruby can never be fast, due to ObjectSpace and the like. That awesome/insane object model we all like so much is just impossible to optimise. All the other weird shit ruby can do doesn't help. http://blog.headius.com/2012/10/so-you-want-to-optimize-ruby.html http://blog.headius.com/2012/10/so-you-want-to-optimize-ruby... Still, for stuff that doesn't need to be fast, ruby is still a joy to use, and always will be. The enumerable API feels so fluid, it's only really surpassed by languages like clojure in my experience. As you might be able to guess, I'm looking forward very much to swift becoming a general purpose language. If apple are all funny about it and try and neuter the ecosystem for some reason, I will be a sad panda.
- scottefein12 12y agoRuby is a lot faster than it use to be. But it's a matter of Ruby being complimented by other languages for their best attributes.
- JonnieCache 12y agoOh it's definitely faster than it used to be. It used to be really slow. But object instantiation is ultimately still very expensive, and in a language whose design encourages the creation of huge numbers of objects, that's a problem.
- Pxtl 12y agoNow I'm starting to wonder if it would be possible to adapt V8 directly to use other dynamically-typed scripting language, like the Parrot project was intended to do. A language parser at the front, V8 in the middle, and the language's standard library in the back. Node.js demonstrated the power of V8 with an alternate stdlib, perhaps an alternate language in front is possible too? Then again, probably V8 is at the very least heavily entangled with Javascript's type-system.
- 12y ago
- jtbigwoo 12y agoIf you're writing a manifesto, you should be able to test future decisions by running them past the criteria in the manifesto. The first four statements are great in that regard, but the next six are a little fuzzy. It might help if the manifesto is clearer on what you don't value. Mission and vision statements are often meaningless because you can stretch a positive statement to include almost anything. The Agile Manifesto is great because it uses contrast to clarify what it values most. In some of the statements, the contrast seems to be implicit and that's fine. ("I value an environment conducive to all levels of experience." I assume that means we don't want an environment for only beginners or only experts.) Other statements, though, are harder to figure out. ("I value software development as a craft." Does HDD cater to "craftsmen" as opposed to hobbyists? Or is this in opposition to "professionals"? Or are we talking about relationships and apprenticeship?) I think this concept has a ton of potential. Can't wait to see where it goes next. EDIT: It appears tmorton was thinking the same things and used far fewer words to say it.
- scottefein12 12y agoReally good points-Definitely will add some contrasts to help clarify. Feel free to submit a pull request with your ideas!
- nchuhoai 12y agoI think the single best thing that Ruby can do in terms of making me even happier is to make concurrent programming easier. I love Ruby and the Parallel gem (https://github.com/grosser/parallel https://github.com/grosser/parallel) makes certain stuff easier, but I feel like every month or so I spend hours just trying to figure out the proper way on how to parallelize
- kyllo 12y agoHave you looked at the Julia language? http://julialang.org/ http://julialang.org/ It has semantics very similar to Ruby or Python, but it has strong built-in language-level support for parallel computing: http://docs.julialang.org/en/latest/manual/parallel-computing/ http://docs.julialang.org/en/latest/manual/parallel-computin...
- Chris_Newton 12y agoNo doubt promoting happiness in the development community is a worthy goal, but there is a lot of variety in what makes different software developers happy, and inevitably their priorities will sometimes conflict. For example, the principle that a programming language should be optimised for the programmer and not the computer seems reasonable. However, what if a programmer works on projects where performance matters, and we haven’t figured out how to implement certain language features in an efficient way yet? It may be true that under some conditions saving a programmer time is more valuable than shaving a few seconds off at run-time, but there are many situations where this is not the case. More subtly, programming languages that are easy to parse, that represent their source code in a well-structured way, and that have clean semantics are friendly to tool developers. I imagine many programmers are happier with a language that has good refactoring, debugging, profiling and testing tools available, and which plays nicely with their favourite editor, diff and version control systems, and code review tools. Again, there might be a trade-off between adding a new language feature, which in itself might be useful for the programmer, and keeping the language simpler or more cleanly structured, which might encourage effective automation and tooling.
- scottefein12 12y agoIt's a community at the end of the day, and having conflict like that is actually good. We should have people with different use cases and problem sets sitting in the same room sharing ideas. That's how we can improve as developers.
- Chris_Newton 12y agoNo argument there from me. I’m just not sure it’s possible to have a single manifesto you can promote in that environment, because the goal of the manifesto is essentially to represent a consensus that can’t exist. What you wind up with is the least common denominator, but the most interesting and useful discussions are usually in precisely the areas where there are reasonable differences of opinion or priorities and therefore significant decisions to be made.
- programminggeek 12y agoI wish "I value performance and user experience" was on there. I'm not sure how happy you should be as a self centered developer with no empathy for the people using your software. Sometimes software can and should be ugly if it makes for a better end product.
- scottefein12 12y agoFull free to submit a pull request. The idea is to make sure the tools and practices make it so a developer is happy writing good, performant code with a good user experience. If the code is ugly and hard, people won't do it.
- EpicEng 12y ago"Make a pull request" is an awful suggestion and, honestly, a cop out. Most of don't have time to tune a programming language or framework, we'll just use a better tool and move on. Slow but pretty code is a brain dead goal.
- scottefein12 12y agoGithub Issue #2: What do we do after we value something? https://github.com/scottefein/the-happiness-manifesto/issues/2 https://github.com/scottefein/the-happiness-manifesto/issues... Lend your two cents in the comments...
- dustinupdyke 12y agoI like the sentiment of this manifesto. But I don't like that it starts with a machine and code focus. Shouldn't people be first?
- scottefein12 12y agoIt's about taking our main tool as developers and making sure it works for us.
- bam365 12y agoThe Happiness Manifesto? Happiness-driven developers? Enough, already. This is an interesting time for computer programming and computer science in general. We're witnessing the coming of age of a very important profession. We owe it to ourselves to advance this profession by developing a body of knowledge based on scientific, mathematical, and engineering principles, as well as empirical observation of what has worked and what hasn't. What we don't need is cultural manifestos and middle-management buzzwords.
- scottefein12 12y agoWe're talking about a community where some of the brightest minds already don't come from a traditional background. Several well-known Rubyists have degrees in Theatre and Music. The community is where all the value is-that's where the innovation is coming from. People build products, so culture is essential.
- carterehsmith 12y agoAs for the Theatre and Music... we can see the results... and the results are: Ruby is going from 1% people using it to 0.1%. The people that actually have to make things work have left Ruby.
- GFK_of_xmaspast 12y agoHas there been a time in the last 50 years that your paragraph wouldn't have been just as appropriate? Why is today, September 4th 2014, special?
- bam365 12y agoNo, there really hasn't. And it's a little embarrassing. Lawyers, doctors, carpenters, electricians, engineers, etc. don't feel the need to produce countless rhetorical manifestos. I'm not sure why our profession (or craft, or whatever you want to call it) has to come with so much cultural baggage, especially when there are so many real problems left to be solved.
- gioele 12y agoAll I need from Ruby is an extension that allows sections of programs to be completely static typed thanks to explicit type hints. Not for the speed, just for the ability to catch errors at compile time.
- MichaelGG 12y ago>- I value respect and tolerance to all in my community What does that even mean? If a Time Cube guy shows up, does it mean I'm just supposed to politely ignore/shadowban him? Does it mean I can't use "master-slave" replication? I think what that line is supposed to mean is "I value not being needlessly abrasive to people" and "I value ignoring unrelated-to-my-project aspects of people". That is, even if you have some belief or participate in an activity that I find abhorrent, if it's not relevant to the project we're working on, I value avoiding talking about such things so we can focus on the project.