On 2010-11-15, at 14:34 , Pablo Duboue wrote: > On Mon, Nov 15, 2010 at 12:32 PM, Henry Olders <[email protected]> wrote: >> Why erlang? It's a functional programming language, and it provides for >> concurrency. >> >> More specifically, I've developed a neural network based nearest neighbour >> classifier, which I had programmed in MacForth initially, then reprogrammed >> in python when MacForth support stopped. Unfortunately, the python >> implementation is considerably slower than the forth; in addition, I need to >> add some functionality to the program which will require refactoring a >> significant portion of the code. I am seriously considering doing this >> reprogramming in another language, thus looking at functional programming >> languages. Haskell is not intuitive for me, erlang much more so. Also, since >> a number of the processes in my neural network can operate concurrently, I >> like the idea of writing it in a language which will give a speed boost on >> multicore machines. >> >> I'm looking for people to exchange ideas with! > > Have you tried scala [1]? > > I like the ideas behind Erlang but dynamically typed languages make me uneasy. > > If you want to exchange ideas, stop by at the open house at Foulab [2] > tomorrow 8PM and we can talk a little bit. NN in Forth sound very > nice. Have you considering moving it completely to hardware using a > FPGA? > > (Also, you can find me on Freenode on ##foulab, I'm DrDub.) > > Best regards, > > Pablo > > [1] http://www.scala-lang.org/ > [2] http://foulab.org/
I've avoided statically typed languages because my programming style works best with a very fast turnaround like you get with an interpreter. I do believe in strong typing, though, as with python. But I can also live with untyped languages - thus my use of forth and, many years ago, assembler. When I looked at Haskell, I was impressed with user-defined types as a way to avoid bugs; much nicer, I think, than classes. Erlang apparently allows types, including user-defined types, to be specified for functions (both arguments and results), and there is a tool that does type-checking, but I haven't gotten that far yet. I've also stayed away from languages, like C and its variants or Java, that require all sorts of extra text and declarations to get anything done. Time-wasters, in my opinion. After my very positive experiences with list comprehensions in python, one of the the first things I look for in a language is how easy it is to program them (and of course test them in an interpreter). In python, a list comprehension to extract even numbers from a list of integers L looks like this: [x for x in L if x%2==0] ; (ie 24 characters). In Erlang: [X||X<-L,X rem 2==0]. (21 characters). Both of these can be run directly in the python interpreter or the Erlang shell, respectively. I understand that scala has a sequence comprehension, but I suspect it will take more characters to implement and to test than in python or erlang. Henry
_______________________________________________ mlug mailing list [email protected] https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
