by throwaway7645 · 9y ago · 0 comments
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
Racket is according to my unscientific benchmarks, unless the problem lends itself well to an imperative style, in the same ballpark as, but still slower than, C# on mono.
Edit: pypy on the other hand is, if the project euler forums are a good source, on par with racket.
But with Racket you've got high-level, comparable-to-Python abstraction combined with way better performance today, and even better performance tomorrow. Plus as a bonus, the typed story is good.
EDIT: In summary, even if performance wasn't your objective, you're still punching well above comparably high-level languages like Python.
Racket's abstraction is indeed high level but in no way comparable to Python. Racket's homoiconicity and syntactic abstraction put it leagues above Python in that regards.
Seriously considering Typed Racket at this point. I like Python, but lately I've been bumping up against the limitations of its type system. (There's only so much you can say about a type in Python.)
No, it cannot currently. It makes boot files which still need to be launched with scheme / petite.
The build + library/module system with chez is also pretty unusable. If you want to write scheme for a system where you deploy an entire OS, it's not too much to work around. If you're trying to write a 1-off binary, you should go with chicken.
I actually have a full demonstration of using Chez to build a full "Unix application" that works 'just as you would expect'. Comes with complete Chez support: profile-guided rebuilds, coverage support, C extensions, some basic test stuff, a custom C boot kernel, and utility for portable .tar.gz builds. It even correctly copies out the boot files for a reidstributable build.
I could have extended this to "unpack the boot file out of my own elf executable" for a truly reusable binary but that seemed overkill. Also, if you keep the boot files, it then becomes possible to still drop into a Chez prompt and load your boot file from there for early debugging, which can be convenient and I didn't want to spend more time on that.
But, uhhhh, you're right if you want a one off binary, Chicken or something is way better. I spent like a week working on that skeleton so I could start working on my application itself. And my Makefile to support all this is extremely intense. But it works pretty well now and is very reusable and generic.
I'll get around to releasing it now I suppose!
I think scheme is woefully underrated as something that can be used for "real work", especially with something like chez. You can find my email or other contact info through my bio, I'm dead serious!
* Well-written, comprehensive language and package documentation
* Tooling
* Included libraries (example: I didn't expect racket to have libraries for imap... but it's there, in the standard package)
A nice development would be same-process parallelism. Afaik, at the moment you can have concurrent "threads" within the same process, but you need to spawn multiple racket vm processes to get parallelism (this is done "under the hood" by the racket vm, they call this things "Places").
The racket team wrote a bit about it here: http://racket-lang.org/new-name.html
Racket is faster than CPython, but that isn't anywhere near the top of my list of reasons to use Racket instead of Python. When speed is a priority, Rust and MLton (Standard ML) are both much faster than Racket. But:
(0) Racket is much more malleable than either Rust or SML. Rather than bash your head trying to model your problem domain in the existing language, you can redefine the language until it's the ideal tool for your problem domain.
(1) Unlike other languages that also advertise malleability (Common Lisp, Smalltalk, etc.), Racket is malleable in principled ways, so you can define abstractions without figuratively stomping on abstractions defined by other people (which you might also be interested in using).
Just like the Common Lisp Object System Meta-object protocol, readtables, symbol packages, ...
Just a FYI for those following along at home, racket comes with built-in support for bundling programs as executables - but as I understand it those are really archives with a vm and (byte?)code.
I recently tried on Windows, and a "hello world" graphical app was a ~11mb - not bad IMNHO - but bigger than the equivalent Lazarus / free pascal app.
https://www.reddit.com/r/scheme/comments/2bu321/not_that_i_d...
Shouldn't be too far off from gcc/glibc really.