4 ms·
Why is there so much interest in reinventing the wheel around here? Many if not most of the examples would be best served by writing a flexible C/C++ library i
by apathy 19y ago
Why is there so much interest in reinventing the wheel around here? Many if not most of the examples would be best served by writing a flexible C/C++ library implementation and SWIGging or otherwise hooking them into (Ruby,Lisp,Perl,...)
For example, libSVM already exists as such an implementation. Using LAPACK or something like that for NNMF and writing an easy-to-use hook for Ruby would make more sense than doing it in Ruby. I just don't get the urge to rewrite code in another language without fundamentally improving the situation (obviously 'improvement' is subjective, but I mean here 'make it go faster').
Are there really a ton of sites that are so heavily invested in Ruby that they fail to see its shortcomings in this respect? (As in, it's slow for many types of operations... that's why most scientific libraries are written in C++ or Fortran and then interfaced to a more flexible language or languages) NumPy exists, for example, because Python sucks at manipulating matrices.
I guess I've been an academic for too long at this point, but it seems a little sad to do this unless someone is paying you for the tedium. YMMV.
- pius 19y agoI'm assuming he's doing it primarily for educational purposes. Even if he weren't, there's nothing wrong with porting libraries to Ruby. There's always an impedance mismatch when you SWIG or otherwise FFI a library into a native application. Besides, let's be honest -- Python ain't that much faster than Ruby, especially with Rubinius et al on the horizon.
- apathy 19y agois there a Ruby version of NumPy?
- nonrecursive 19y agoPerhaps, like me, he has no idea what the following are or mean: * SWIGging * libSVM * LAPACK * NNMF
- apathy 19y agoyou'll understand most of them if you read the book. Swig is just a wrapper generator, LAPACK is a fast linear algebra library. If you read the book you will start to see how these can come in handy. Plus python is trivial to understand. Why not work through some of the more modern examples before dismissing it? There's a big ML shop in mountain view that uses Python a lot. Can't seem to think of the name right now but ...
- eVizitei 19y agoPeople, when they write technical articles, commonly want to author the examples in the language they're most familiar with at the moment. If I'd been working primarily in Python for the last 6 months, I'd tend to write any coding examples in Python because it would allow me to focus on the article's content rather spending a couple hours refreshing myself in C to make sure I didn't make any embarrassing mistakes that might shoot through my credibility when read by somebody who spent the last 6 months writing C or C++. There's nothing wrong with it. In fact, I usually think of it as an opportunity to rehone my skills on the langage in the examples (or take a look at the language for the first time in some examples).