8 ms·
SciRuby
- jcarden 15y agoWow. This is very much needed. That being said, to what end are they going for ?
- pdenya 15y agoI think this was posted in response to this article (http://news.ycombinator.com/item?id=3179370 http://news.ycombinator.com/item?id=3179370) rather than because of some recent update.
- lrfunk 15y ago> This is very much needed. Why? (just curious) SciPy is mature, popular, and has already been heavily peer-reviewed. Then there are R an Matlab and ... What does SciRuby bring to the table that makes it stand out from the rest?
- jergason 15y agoSome labs do lots of work in Ruby. It would be nice to stick with Ruby for analysis of your data as well. Kindof like the cas for server-side JavaScript: less friction between code in the server and browser.
- jtprince 15y agoin addition to jergason's response, sciruby allows/facilitates: 1. better chaining of commands 2. blocks and enumerators 3. integration with rails and other web services 4. a dynamic community see http://www.floss4science.com/interview-sciruby-team/ http://www.floss4science.com/interview-sciruby-team/
- tel 15y agoI'm really glad they're implementing Protovis instead of trying to copy Matlab's plotting facilities like Matplotlib. Matlab plotting is pretty terrible.
- wladimir 15y agomatplotlib is very flexible and has a wide array of plot types. It's great for quickly making plots of some data in Python. But IMO the output is not really nice to look at, it takes a lot of customization to make the plots publication-quality, and it feels kind if clunky for making interactive plots (however, some animation support was added recently, I haven't looked at that in deail yet). The screenshots of protovis/d3 look very promising, I'll have a look at it. The last time I needed a JS charting library I went with Highcharts, as it had somewhat better support for the run-of-the-mill chart types I was using in my project.
- tel 15y agoMatplotlib is ok for a first plot during exploratory analysis, but is a far, far cry from the facilities available in R through base graphics, grid graphics, trellis graphics, or ggplot2. Protovis/d3 take a different approach, also focused on a similar Grammar of Graphics like ggplot but primarily concerned about the tooling, instead of the application. Tooling level libraries are nice because they tend to be flexible enough for high data ink ratios, unlike highcharts, which turns me away with every example.
- pwang 15y agoYour choice of terms is very interesting! I would say that Protovis and d3 do not take a Grammar of Graphics approach per se; rather, they tackle mostly just the lowest level of the grammar, namely aesthetic composition and some transforms. ggplot is very nice for the kinds of datasets that people use R for, but it's only one part of the story. For large dataset and interactive visualization in Python, take a look at Chaco: http://code.enthought.com/chaco http://code.enthought.com/chaco
- 15y ago
- djacobs 15y agoI'm glad to see this project is coming back. I'm in the middle of writing a Stats library for Ruby[0]. Maybe we can join forces? [0] https://github.com/davejacobs/stats https://github.com/davejacobs/stats
- jtprince 15y agoI scanned your project and it looks great. This is one of the major things we are trying to accomplish with SciRuby - simplified access to things like GSL for basic/essential science and stats. Seems like you and Claudio Bustos should get together (Claudio is working on distribution[0] and is very involved in sciruby). We should join forces. [0] https://github.com/clbustos/distribution https://github.com/clbustos/distribution
- djacobs 15y agoI'll be in touch this week. This could be exciting. More than anything, I think this will give statistics a home on the Web and will give a new face to statistics for non-engineers. Maybe we can do for statistics what Rails did for Web development.
- epistasis 15y agoI hope they don't set up SciPy as the project to emulate and improve upon. Deep knowledge of R, Fortran, and Matlab would better inform this project of what scientists need. SciPy is great, but it's clearly best for programmers that have a slight scientific bent and can't stomach learning the existing scientific tools (which are admittedly a bit difficult to combine with modern software engineering). There are some great ideas in SciPy, but a broader set of influences is essential to making a great scientific toolkit.
- deleted 15y ago[deleted]
- jergason 15y agoPlenty of real science happens in SciPy. http://scholar.google.com/scholar?cites=2086009121748039507&as_sdt=5,45&sciodt=0,45&hl=en http://scholar.google.com/scholar?cites=2086009121748039507&... is the list of papers on Google Scholar that cite the SciPy website. Biology, machine learning, physics, and more.
- pwang 15y agoMatlab and Fortran are influences for Scipy; in fact, there is Fortran code inside Scipy. I'd love to hear more details about the deficiencies, or how it might be more influenced by those. I agree that the ideas of statistical processing in R are absent from Numpy, but Pandas is attempting to remedy that.
- rprospero 15y agoI'm a physicist by trade and every colleague I've introduced to SciPy vastly prefers it to Fortran, R, and Matlab. What do you find missing in SciPy?
- d0mine 15y ago> can't stomach learning the existing scientific tools [I assume you mean R, Fortran, Matlab] The sum of anecdotes is not data, but It might be the opposite: people who know the pain to work with this tools move to Python for complex projects if they can.
- catch23 15y agohopefully they make the DSL similar to matlab. Having worked in matlab & numpy, I can definitely say that having numpy's syntax semi-close to matlab helped a lot when we do ports. It (porting) happens more often than you'd think.
- jwallaceparker 15y agoThis is terrific. This is newsworthy. Hope it gets legs.
- willpearse 15y agoGreat idea and something that will definitely be highly used (I'm downloading it now!), but I really would be cautious attempting to provide what R provides, 'but better'. R's power comes from the fact that hundreds of scientists have written packages for it when they have a new method - you won't be able to get that overnight. Also, R has strong links with other languages like C. Finally, while I agree that sometimes R's syntax can be slightly obfusicated, I don't really think the examples on their site are fair... You can 'plot(y~x)' guys :p
- sunkencity 15y agoLooks good. I'm a big fan of narray to get decent performance for array operations, interesting to see how the rewrite of that will perform. Narray is pretty damn close to realtime compared to native ruby implementations.
- pwang 15y agorealtime what? Realtime like C? Realtime like ATLAS or MKL?
- sunkencity 15y agorealtime like it's fast fortran matrix stuff. compared to slow-as-molasses ruby native Array#mean (which has to be implemented in ruby).
- georgeg 15y agoThis is absolutely needed. Glad that the project is come back to life. Big up to the developers.
- freyrs3 15y agoInteresting stuff, but given the sheer brainmass that SciPy has attracted its going to be hard to draw users away from that crowd. I think the only appeal of this project, at least for the time being, is labs that are already entrenched in Ruby.
- hogu 15y agoThis is a sincere question, if you're doing science, why would you want to use ruby over python?
- briteside 15y agoMy answer to this question is transparency. At my company Brighter Planet we write all of our scientific/methodological code in Ruby so that people with basic technical skill can understand what's going on. The ability to create expressive DSLs is really crucial.
- pwang 15y agoThat's very interesting. What sorts of DSLs are you creating, or can you say?
- noahnoahnoah 15y agoI have a similar answer - I'm a data analyst at a company full of rubyists. I can (and do) use R for most of my analyses, but there's a cost in transparency -- I can't realistically ask someone to review my R code when they don't know the language, and the bus factor is high if anything I write in R is at all important. That's why I'm trying to use Ruby where possible, even at the cost of a small productivity hit. The benefits of others being able to read my code far outweigh the few extra minutes it takes for me to do something (and in many cases, the sheer brevity of Ruby as a language means it's faster, simply because it's less typing). I'd love to see SciRuby become a more useful project, and I'd love to contribute. Unfortunately, they don't make it especially easy to get involved -- the mailing list points people to the roadmap, but it's not at the level of detail where someone could jump in (and the component gems don't seem much better), so it's a bit hard to know where help would actually be useful.
- mohawkjohn 15y agoNoah -- I'd love to get your thoughts on how to make it easier to include people in our project. Would you be willing to send me an email? john dot woods at marcottelab dot org.
- gphil 15y agoI noticed this is licensed as GPLv3 as opposed to a BSD license for SciPy. Isn't this going to be a huge barrier to adoption, or am I missing something?
- mohawkjohn 15y agoCould you go into more detail? Since we haven't released yet, we might still switch. But I haven't heard a lot of compelling reasons for doing BSD instead.
- gphil 15y agoSure. My understanding is that you can't include GPL'd code in a project that is not itself licensed under the GPL. This may be an oversimplification, since you could potentially use the tools without actually including them in a project, but this is sort of a legal gray area that I don't fully understand (e.g. what constitutes inclusion of GPL'd code in a project?)
- mohawkjohn 15y agoSo this is one problem with using an MIT license for SciRuby. Our distribution gem -- well, technically, Claudio's distribution gem, but used by SciRuby -- has some Ruby code in it derived from C code in the GNU Scientific Library. Being a GNU library, GSL is licensed under the GPL. Interestingly, the GSL-derived code is only utilized if the user does not have libgsl installed. And my understanding is that code which uses libgsl is not technically a derivative work, and therefore not required to be GPL'd itself. I suppose one possibility is to abstract the GPL'd code into yet another gem (distribution-gsl?), which is itself licensed under the GPL.
- knowtheory 15y agoAs a matter of course, MIT and BSD licenses are non-threatening to businesses and organizations who do not necessarily have software as their primary focus. Non-software shops who may be interested in using a piece of software may balk at using GPL3'd software because they don't know what the legal ramifications are of failing to comply, or the knowledge/wherewithal/processes to do release the software that they're using. Talking to people about BSD/MIT is really easy: "You can do whatever you want with it as long as you retain the license and copyright". At the risk of getting into a FOSS license debate, i'd like to think that FOSS contributors do it out of a motivation other than license restriction (and hell a lot of people still rip libs off, even when they are GPL'd!).
- bugsbunnyak 15y agoWhy? The two technical justifications (objects all the way, and enumeration) in the FLOSS interview [0] are both arguable and not nearly convincing enough to justify further fragmentation of the open-source science ecosystem. If I want cleaner semantics, s/python/ruby is at best moving sideways - for the sake of a few keystrokes? Ruby is slower both in the interpreter itself and in the lack of f2py,Cython,Numexpr,PyCUDA,weave (even Theano sometimes). If I need a real change, I'll use Ocaml or Clojure, and gain speed from the change. It seems like a waste to discard (or attempt to replicate) the 10s-100s of person years represented by SciPy and the ecosystem including f2py, Cython, MayaVi, IPython (not just a REPL), Pandas, Chaco, PyCUDA/OpenCL, and SAGE - to name a few. Are there any other, better reasons to want to build an ecosystem from scratch? [0] http://www.floss4science.com/interview-sciruby-team/ http://www.floss4science.com/interview-sciruby-team/
- jtprince 15y agoThe same arguments could have been used when scipy was starting up: * Why did folks build scipy when there was PDL? Just to avoid a few sigils? * Why build scipy when R had been released just before? * Why didn't they just support matlab/octave? (scipy and matlab are so close in syntax anyway) * If syntactical differences are not enough to justify a new scientific library, why not just stick to Fortran, or C/C++? One can argue that an enormous amount of time has been wasted on writing python wrappers. For what? Just to save a few keystrokes? However, most would agree that the world is a much better place now that scipy and related tools are in it. Some arguments: * Ruby is expressive and flexible in ways that python is not. For example, Rubyvis is flexible enough (or similar enough to javascript at least) to essentially accept protovis (javascript) code directly. I don't think python can do this. * Ruby uses blocks/enumerators instead of 'for' loops. How much programming involves enumeration of one kind or another? * len(array) vs. array.length Coding is not just getting the computer to do what you want, it is also how you think about it and the form that it takes. 'len(array)' vs. 'array.length' may not matter to most, but it matters to some of us. The great news is that we can still use scipy when we need to. I'm betting there is room for both projects, especially considering how small sciruby is at the moment. Ocaml and clojure are great, but have a steeper learning curve; getting non-programming scientists to contribute is far easier in a language like ruby or python. A beginning-programmer scientist who wants to start writing code to solve problems currently has to 1) code in python or 2) learn ruby and python/scipy or matlab or R in order to do some scientific computing. SciRuby means (eventually) that for most things, novices only have to learn ruby. It is hard to overstate the importance to new programmers of being able to use just one language (at least to start with). If you like python over ruby, this is easy. If you like ruby over python, it gets old piping all your data over to a python script to use the basic features of scipy.
- timwang 15y agopython's concurrent programming is not that good. how is the situation in ruby?
- zhemao 15y agoIt's the same. The Ruby 1.9.x (YARV) interpreter uses a GIL as well, although like Python, there's a way for C extensions to release the GIL.
- piccadilly 15y agoGod forbid you use existing mature tools appropriate to your task.
- jtprince 15y agoAnd while we're at it, may he forbid the co-existence of emacs, vim, and textmate; java, C++, C#; javascript and dart; KDE, gnome, enlightenment, fluxbox, fvwm, icewm, metacity, compiz, wmii, monad; ubuntu, debian, gentoo, redhat, and arch; bash, csh, and zsh ... nothing good ever comes out of approaching a problem from a new angle.
- mohawkjohn 15y agoThis made my day.