Live data from Hacker News

Racket 7.3

download.racket-lang.org

21–30 of 58 posts

Re: Racket 7.3

#22
post #20
post #16

Earlier quoted context omitted.

LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt. http://www.lambdanative.org/

LambdaNative is a wrapper and abstraction over Gambit Scheme. It does not support multi-core threading.

Well, that was my best shot :(. I'm sorry I don't have an answer then.

You were asking for threads, and gambit has lightweight threads, so I assumed there was a way to use them via ln. Multi-core threading is a different story though.

Re: Racket 7.3

#23
post #22
post #20

Earlier quoted context omitted.

LambdaNative is a wrapper and abstraction over Gambit Scheme. It does not support multi-core threading.

Well, that was my best shot :(. I'm sorry I don't have an answer then. You were asking for threads, and gambit has lightweight threads, so I assumed there was a way to use them via ln. Multi-core threading is a different story though.

Yes, it's a bit of a pity that great functional languages like Scheme and even the veteran common LISP are loosing out to modern languages like Kotlin because of lack of support in these critical, functional areas. Especially when REPL based development is so amazingly productive.

Re: Racket 7.3

#24
post #14

I really wish there was a standard Scheme that compiled to native for all desktop and mobile OS'es and also supported multi-threading. Does anyone know about one ?

Racket does tick some of those boxes:

* it has support for OS-level threads via places[0]

* it can produce binary distributions via `raco distribute`[1] by packing together the interpreter and your compiled code into a single executable

* while the current implementation is based on a bytecode-compiler and VM, I believe the Chez implementation actually compiles to native code (although the whole process is transparent to the user)

* it is possible to run Racket on ARM devices, in fact there was a recent thread[2] about that on the mailing list

I realize this isn't 100% what you're looking for, but Racket does come with many nice features. Alternatively, you might also want to take a look at CHICKEN Scheme[3].

[0]: https://docs.racket-lang.org/guide/parallelism.html#%28part....

[1]: https://docs.racket-lang.org/raco/exe-dist.html

[2]: https://groups.google.com/forum/#!topic/racket-users/YEajWJe...

[3]: https://call-cc.org/

Re: Racket 7.3

#25
post #2

And yet I'm still too stupid to understand the macro system. Oh well. I also didn't know there was a Chez version. Racket already has a native AOT compiler, right? What would the advantage be to run on Chez, faster or smaller compiled code?

> And yet I'm still too stupid to understand the macro system. Oh well.

This talk[0] by Robby Findler helped me a ton when I was first learning about macros in Racket. I've found that the best way to learn, though, is by doing: when you find a use case for a macro, figure out how to do that particular thing and, slowly but surely, things will start to click.

[0]: https://www.youtube.com/watch?v=hFlIl0Zo234

Re: Racket 7.3

#26
post #21

Is typed racket still very slow? I'm interested in hearing how Racket's gradual typing works.

It depends upon what you mean by slow. Typed Racket code compiles more slowly than normal Racket code, but should run about as fast or faster (for a small set of specifically-typed code[0]).

[0]: https://docs.racket-lang.org/ts-guide/optimization.html

Re: Racket 7.3

#27
post #21

Is typed racket still very slow? I'm interested in hearing how Racket's gradual typing works.

Typed racket isn't slow (as far as scripting languages go). Maybe you're thinking of Racket's "contract" system?

AFAIK typed racket does type-checking during compilation (via raco); the resulting code is no slower than normal Racket, although I'm not sure if it's faster either.

The contract system is different; it works on normal, untyped Racket code and performs checks at runtime; similar to using Python decorators to check the input and output of a function. This slows things down, so it's recommended to only check things at module boundaries. For example:

    #lang racket
    (require racket/contract)
    (require racket/match)
    (provide factorial)

    (define/contract (factorial n)
      (-> exact-nonnegative-integer?
          exact-nonnegative-integer?)
      (fact n))

    (define (fact n)
      (match n
        [0 1]
        [_ (* n (fact (- n 1)))]))
This module exposes the `factorial` function, which checks (at runtime) whether its argument and return value are non-negative integers (i.e. 0, 1, 2, ...). The actual calculation is done by the `fact` function, which is private and doesn't do any checks. If we don't separate the checks from the calculation, we would end up running the checks on every recursive call, which would slow things down a lot.

As far as I'm aware, Racket's gradual typing is done by contracts at the interface between typed and untyped code. Hence it's not that typed racket is slow, it's that passing untyped values into typed functions can be slow, if we want accurate blame information for errors.

Re: Racket 7.3

#28
post #18
post #12

I am really excited by Racket. Unlike most minimalist LISP languages with a community of individual hackers who each have their own macros and packages, this one is battery included while still being the most flexible with the #lang header. Seriously, it comes with awesome data structures (actuelly more than Python). The only thing that prevents me from using it as much as Python or C++ is the lack of tools for major…

Do Naughty Dog still use Racket? Anyone from there able to give some insight into what tools/dev environment they use there?

No they don't. AFAIK they moved away from Racket. I once contacted them for potential open positions I could list on racketjobs.com (I'm the creator).

Re: Racket 7.3

#29
post #23
post #22

Earlier quoted context omitted.

Well, that was my best shot :(. I'm sorry I don't have an answer then. You were asking for threads, and gambit has lightweight threads, so I assumed there was a way to use them via ln. Multi-core threading is a different story though.

Yes, it's a bit of a pity that great functional languages like Scheme and even the veteran common LISP are loosing out to modern languages like Kotlin because of lack of support in these critical, functional areas. Especially when REPL based development is so amazingly productive.

Indeed I miss CL's "live coding" every day since.

Re: Racket 7.3

#30
post #28
post #18

Earlier quoted context omitted.

Do Naughty Dog still use Racket? Anyone from there able to give some insight into what tools/dev environment they use there?

No they don't. AFAIK they moved away from Racket. I once contacted them for potential open positions I could list on racketjobs.com (I'm the creator).

Is the site down? I'm getting an empty page in Firefox currently.
Post reply on HN