tag:blogger.com,1999:blog-6555947.post4379818990428879610..comments2024-03-14T01:32:43.610-06:00Comments on The Geomblog: Good prototyping softwareSuresh Venkatasubramanianhttp://www.blogger.com/profile/15898357513326041822noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-6555947.post-79439179332751475572010-03-25T10:06:24.952-06:002010-03-25T10:06:24.952-06:00Do you really *need* a language that has a compile...Do you really *need* a language that has a compiler? Why not create your own notation and then "hand" compile it to whatever existing languages work best?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-91021316589286564502010-02-17T20:18:34.820-07:002010-02-17T20:18:34.820-07:00I think I'll probably go with python, and mayb...I think I'll probably go with python, and maybe use SAGE as and when I need it.Suresh Venkatasubramanianhttps://www.blogger.com/profile/15898357513326041822noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-78612076283597878942010-02-17T20:12:40.475-07:002010-02-17T20:12:40.475-07:00Suresh,
I would be curious to know your final dec...Suresh,<br /><br />I would be curious to know your final decision.Preyashttps://www.blogger.com/profile/06417189186070263991noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-50473443731454710372010-02-12T15:02:40.442-07:002010-02-12T15:02:40.442-07:00Perl Data Language is another good option. And CP...<a href="http://en.wikipedia.org/wiki/Perl_Data_Language" rel="nofollow">Perl Data Language </a> is another good option. And <a href="http://search.cpan.org/" rel="nofollow">CPAN</a> is second to none in providing an "extensive package base". <br />Perl is also faster than Python for many things, though in reality it might not matter - in such number-crunching applications they both are mostly glue layers over the C libraries that handle the actual math.Sundarhttps://www.blogger.com/profile/00415039983973239001noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-87521407951046014522010-02-09T14:24:29.831-07:002010-02-09T14:24:29.831-07:00+1 for C#; you can use your code from any .NET lan...+1 for C#; you can use your code from any .NET language and you can use any libraries written in other .NET languages (includes C++, C#, Python, Ruby, F#, VB, ...).<br /><br />The managed runtime is a good compromise: much faster than interpreted languages like Python but only slightly slower (20%'ish) then optimized C/C++. Having a managed runtime will give you a productivity boost over C++ ...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-45520982999771698222010-02-09T10:47:51.986-07:002010-02-09T10:47:51.986-07:00You might also want to consider C# and LINQ. The l...You might also want to consider C# and LINQ. The latter makes programming on large amounts of data very flexible and easy, and is the code is often closer to the way you think about the algorithm. As an added bonus, you should eventually be able to run things on a cluster in the cloud with little modification.<br />(Full Disclosure: I work at Microsoft)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-80460299050983998912010-02-09T08:38:31.230-07:002010-02-09T08:38:31.230-07:00Thanks, hsy, for linking to Sage. It does seem in...Thanks, hsy, for linking to Sage. It does seem interesting, although Mathematica sure has it beat in interface. (I have never seen uglier "pretty printing" in my life.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-9319817923007235852010-02-09T06:04:53.887-07:002010-02-09T06:04:53.887-07:00OCAML. Fast, portable, functional. Can be both com...OCAML. Fast, portable, functional. Can be both compiled and interpreted. Very fast for prototyping.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-47411829805404328982010-02-09T04:21:55.833-07:002010-02-09T04:21:55.833-07:00Java (the JVM) will certainly outperform Python on...Java (the JVM) will certainly outperform Python on just about any task. Use a decent language on top of the JVM, such as Scala or Clojure, and you have a good combination. There is a stats/ML package for Clojure called Incanter which might be a good place to start.<br /><br />I think you really should learn a functional language. It is so much closer to the problem domain, and will give you a new way of thinking about programming.<br /><br />Finally, I do all my work in PLT Scheme, but I do have to reinvent some wheels.Noelhttps://www.blogger.com/profile/09666551093622614632noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-12632028179416947722010-02-08T21:14:07.588-07:002010-02-08T21:14:07.588-07:00I'll echo the support for Python. Performance ...I'll echo the support for Python. Performance is its biggest weakness, but for me the lower programming time makes it worth it (which leaves a lot more time for algorithm improvements compared to, say, C++).<br /><br />One approach could be to explore the problem with Python, and once you know how to solve it, re-write for speed in C/C++ (either completely or piecemeal -- Python plays nicely with C).<br /><br />However, since Google and many others are Python enthusiasts, there are several major efforts underway to improve performance. Unladen Swallow could eventually increase performance by an order of magnitude (it's probably a year or two from being practical -- but it might end up being directly built into Python 3.0.Jonathanhttps://www.blogger.com/profile/18281967177874276204noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-73910737291729631092010-02-08T20:24:35.698-07:002010-02-08T20:24:35.698-07:00These are all great comments and make me think ver...These are all great comments and make me think very carefully about what exactly I want to do with my code. I like the idea of learning a language that gives me a completely different angle to attack a problem. Don't know whether a functional language is the answer though.Suresh Venkatasubramanianhttps://www.blogger.com/profile/15898357513326041822noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-23801058988683603012010-02-08T19:34:18.157-07:002010-02-08T19:34:18.157-07:00As someone who has worked with both Java and C++ f...As someone who has worked with both Java and C++ for several years, you're not dead wrong about Java. <i>For the things you want,</i> Java is an inferior performer. That said, it's not as bad as you're making it out. But is it worth you learning? Probably not, especially since its place in the world is changing.<br /><br />As for other languages, I'm not sure why python would offer such an edge for the stuff you're looking to do. You're already comfortable with C++ to the point where you can prototype stuff easily. What does python really give you? There are native libs that do the same things as python libs (in fact many of the latter are really just wrappers around the former). But I speak as a person who has not bothered to learn python, so really this is just my outlook on it.<br /><br />My personal opinion is that if you're going to teach yourself a new language you may as well learn one that gives you a different way of looking at problems. Maybe a functional language? I've heard good things about Scala.Anonymoushttps://www.blogger.com/profile/15624261037800893086noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-41221172858500014142010-02-08T19:30:29.116-07:002010-02-08T19:30:29.116-07:00Why do you care about speed (of execution) or port...Why do you care about speed (of execution) or portability for a prototype? Isn't the purpose of a prototype to explore the problem domain (quickly), so that you can figure it out and move on? You write a prototype not really to solve a problem, but rather to understand it. <br /><br />Perhaps if you want to solve only one problem, you could do it faster in C++ than Python or some other more problem specific language, due of a lack of working knowledge of the appriopriate tools. However I doubt that would be true of say, 5 problems. Surely you are smart enough and working on hard enough problems that becoming familiar with nice languages like Python dwarfs the effort of actually solving the problems you are trying to solve. Compare yourself vs a hypothetical forked copy of yourself that bite the bullet and developed an effective workflow with tools more appropriate than C++, and the fork will surely be better off in the long run.<br /><br />Sure, there are circumstances in which C++ is the right tool from the start. If your problems are so big that they can be easily dealt with in C++, but not in an inefficient language and you can't learn from a toy subset of the problem. Or maybe you just flat aren't writing a prototype (be honest, if you plan on keeping it around, it's not a prototype).<br /><br />Rob (who makes his living writing mostly C++ code, but occasionally has the joys of getting paid to write Python)rrenaudhttps://www.blogger.com/profile/00268587839942674447noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-27017025563844393432010-02-08T17:31:29.847-07:002010-02-08T17:31:29.847-07:00suresh: doesn't your most recent comment contr...suresh: doesn't your most recent comment contradict the title of the post?<br /><br />i guess it depends what you're doing, but as much as i'd rather not, i vote for matlab (if it's mostly numerical -- data structures are a PITA) or python. if you're worried about python speed, you can import psycho.halhttps://www.blogger.com/profile/02162908373916390369noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-18768298934619187922010-02-08T16:50:42.484-07:002010-02-08T16:50:42.484-07:00siva: that's my worry too. that I'd need t...siva: that's my worry too. that I'd need to do something at scale and would have to reimplement everything in C++Suresh Venkatasubramanianhttps://www.blogger.com/profile/15898357513326041822noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-35768793942527015292010-02-08T16:49:11.528-07:002010-02-08T16:49:11.528-07:00Python, R, Gnuplot.
I'm itching write a short ...Python, R, Gnuplot.<br />I'm itching write a short monograph along the lines of "Unleash your inner Freakonomist with Python and Gnuplot" :-)<br /><br />However Python does struggle with its memory mgmt - e.g., a 1 million node graph with avg degree 50 is a piece of cake to work with in C++ (assuming you have 3GB of memory) - but could be a nightmare to play with in Python.D. Sivakumarhttps://www.blogger.com/profile/05750992965116762335noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-10653130366113046392010-02-08T16:35:37.366-07:002010-02-08T16:35:37.366-07:00I use Mathematica and Fortran. For an open source ...I use Mathematica and Fortran. For an open source and portable version, scilab would be my first try. Despite of Numpy/Scipy inclusion, python is not on the top of my list because speed matters A LOT for my job. I have some experience with matlab, but since Mathematica came first in my computing life, I tend to live with it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-57906101056064170332010-02-08T16:34:58.248-07:002010-02-08T16:34:58.248-07:00I like the idea of clustering music ;)I like the idea of clustering music ;)Suresh Venkatasubramanianhttps://www.blogger.com/profile/15898357513326041822noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-59170994407916083612010-02-08T16:33:47.725-07:002010-02-08T16:33:47.725-07:00I agree: Python has an amazing collection of mathe...I agree: Python has an amazing collection of mathematical libraries and, since it is interpreted, it is very easy to experiment with changes and with different inputs. It works on any platform and it is very easy to learn, to the point that even I have learned it. <br /><br />Being a general-purpose language rather than a system specialized for math, means that there are libraries to do the most unlikely thing. I believe there are libraries to decompress music in mp3 format, so when you experiment with your clustering algorithms, you could try clustering songs :)Lucahttps://www.blogger.com/profile/17835412240486594185noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-59432383660090743832010-02-08T16:18:28.536-07:002010-02-08T16:18:28.536-07:00I suggest looking into Sage http://www.sagemath.or...I suggest looking into Sage http://www.sagemath.org<br /><br />It fit's your description because,<br /><br />1. it is based on Python, where the code is quite intuitive, widely used, enforces good code style by design and strong supported.<br /><br />2. I/O: Besides Python's basics, there are many modules for various tasks. From reading different file formats, writing data to network ports, websites, images, binary format, etc. <br /><br />3. For numerics and I/O don't forget about Numpy/Scipy (which is part of Sage) ... That's usually the first thing you might wanna check out when coming from MATLAB.<br /><br />4. Speed. Python is an interpreted highly dynamic language. It's not possible to make it high speed easily because of this. But that's not the whole story. Sage uses a two layer approach, where (if possible) all time critical code is either written in C and interfaced to Python, or written in Cython. Cython is a Python like language, but a compiler generates C code that is an Pyton module and that C code gets compiled as usual. Using that approach, you get the full speed of C for all operations that are time critical while you still code in a familiar language. http://www.sagemath.org/tour-benchmarks.html<br /><br />5. Documentation: Check out the various chapters here: http://www.sagemath.org/doc/Harald Schillyhttps://www.blogger.com/profile/13103857943334302170noreply@blogger.com