Live data from Hacker News

Racket v5.3.2

blog.racket-lang.org

1–10 of 44 posts

Re: Racket v5.3.2

#2
Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

Re: Racket v5.3.2

#3
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

HN uses Arc which is based on MzScheme/Racket, IIRC.

Re: Racket v5.3.2

#4
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

Well, I haven't used it in production, but I used it for a research project last semester. It was actually pretty good, and there are definitely some very nice features. The standard library was pretty good except it missed some functional features I wanted like immutable vectors (or even just functional operations on mutable vectors).

The language is extremely flexible, and you can take advantage of this to write some really elegant and maintainable code. It's one of the more productive languages I've used--of the languages I've used extensively, it's better than JavaScript, Java or Python.

So I liked it quite a bit over all. However, it doesn't quite clear the threshold where I would use the language voluntarily. I thought it had lackluster support for functional programming, especially from what is supposed to be a functional language. This was evident in the library (e.g. the lack of immutable vectors and the like) and also in the way certain pretty fundamental structures (like ports) worked.

Also, for a dynamically typed language, I thought it had too many different types. It was too easy to get mixed up between bytestrings and strings, for example. It was also not obvious when you should use or expect nil vs #f. That said, the features for creating your own types (mostly structs) were very good--I found they were very lightweight but still flexible enough to be useful.

I am actually a big fan of the syntax. Not just the s-expressions (although, with paredit, they are pretty awesome) but also the reader macros. That said, I'm also rather partial to infix operators, which are obviously not present.

So over all, it's a great language. However, I would still choose Haskell or OCaml over it for virtually any project. The main exception would be projects very heavy on metaprogramming, where Racket really shines.

Re: Racket v5.3.2

#5
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

> Who's using this in production?

Here are two examples that have been presented at CUFP. The Starfire Optical Range[1, 2] uses it in production, I think as part of the control software for their telescopes. Naughty Dog, a major video game developer, uses it for scripting their games[3, 4].

[1]: http://en.wikipedia.org/wiki/Starfire_Optical_Range [2]: http://cufp.org/archive/2006/abstracts.html#RichardCleis [3]: http://cufp.org/videos/functional-mzscheme-dsls-game-develop... [4]: http://www.slideshare.net/naughty_dog/statebased-scripting-i...

Re: Racket v5.3.2

#6
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

HN uses Arc which is based on MzScheme/Racket, IIRC.

Does it work with later versions of MzScheme or Racket?

Re: Racket v5.3.2

#7
post #4
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

Well, I haven't used it in production , but I used it for a research project last semester. It was actually pretty good, and there are definitely some very nice features. The standard library was pretty good except it missed some functional features I wanted like immutable vectors (or even just functional operations on mutable vectors). The language is extremely flexible, and you can take advantage of this to write s…

However, I would still choose Haskell or OCaml over it for virtually any project

This might be off-topic, but I've been thinking about learning one of these two. Can you give me any advice on which to learn first (or which to use for what)?

Re: Racket v5.3.2

#8
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

I use it to run Arc, which I use as my go-to general-purpose programming language. I use it to do math, Project Euler problems (not exactly the same thing), sometimes to control the computer [I sometimes run programs that click the mouse for me, and used to make it type as well], to generate repetitive code[1] for usually experimental purposes, and occasionally to make complicated projects like a sudoku solver, or a thing that reads and writes WAV files.

Racket is pretty good, is pretty fast. It can add the integers from 1 to 100 million in 407 milliseconds on my machine. If you need incredibly speedy numerical code, it is still possible to load machine code, perhaps from a C dynamic library, and run it. My main objection is that it doesn't have real-time garbage collection. We'll see about that.

[1] Don't get excited, I haven't written a compiler or a working assembler (yet). I mean things like this:

  (pbcopy:tostring:on x '(rax rbx rcx rdx rdi rsi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15)
    (prn "        " "mov [rel teh_end + " (* index 8) "], " x))
  --> clipboard now contains the following:
        mov [rel teh_end + 0], rax
        mov [rel teh_end + 8], rbx
        mov [rel teh_end + 16], rcx
        mov [rel teh_end + 24], rdx
        [...]

Re: Racket v5.3.2

#9
post #4
post #2

Am I the only one who forgets Racket? Everytime I visit the site and browse through the documentation, I find myself wondering why I'm not using the language. Years ago I used Chicken Scheme but this seems more robust and the standard library is adequate. Who's using this in production? What's your experience?

Well, I haven't used it in production , but I used it for a research project last semester. It was actually pretty good, and there are definitely some very nice features. The standard library was pretty good except it missed some functional features I wanted like immutable vectors (or even just functional operations on mutable vectors). The language is extremely flexible, and you can take advantage of this to write s…

Racket now has all manner of purely functional data structures (Okasaki and Bagwell) available as a library on Planet:

http://planet.plt-scheme.org/package-source/krhari/pfds.plt/...

Re: Racket v5.3.2

#10
post #6

Earlier quoted context omitted.

HN uses Arc which is based on MzScheme/Racket, IIRC.

Does it work with later versions of MzScheme or Racket?

Yes. The main problem with MzScheme v4.0 and higher, and with Racket, is that cons cells were made immutable by default. This was hacked around in Arc 3.1:

http://ycombinator.com/arc/arc3.1.tar

The fix is not quite perfect; occasionally it may cause problems. (Bwahaha.) Do consult the following page, which has a link to a description of a proper fix:

https://sites.google.com/site/arclanguagewiki/arc-3_1/known-...

Post reply on HN