phanthero
2020-11-3 11:15:58

How would you describe Racket to someone who say, only knows functional programming in Haskell? The common functional programmer has probably heard of Lisp, so is it okay to say that Scheme is a dialect of Lisp, and Racket is an implementation of Scheme with other things added?

Edit: I have no programming experience in Haskell, Lisp, or Scheme so this is what I would say


spdegabrielle
2020-11-3 11:34:10

I’m no expert so wait for some others to provide feedback (Europeans are at work and Americans are still asleep) : Refer them to https://racket-lang.org\|https://racket-lang.org maybe mention ‘_Racket supports higher-order software contracts and safe gradual typing. Programmers can easily deploy these tools to harden their software_.’ (Paraphrased from racket site link above)- I mention that specifically because safety is (rightly) large in functional programmers minds and types and contracts are powerful tools to support safety. Maybe mention IDE & strong Emacs support. And that it is cross platform(linux/unix/macOS/windows). Oh - and it is compiled - many assume it is interpreted because it is from the lisp/scheme traditions. I’m missing a lot so do wait for more feedback for a better pitch to a programmer used to Haskell . Cc @lexi.lambda


phanthero
2020-11-3 11:43:55

Thanks! I thought it was interpreted too since you have that REPL, but I guess that’s because of the JIT compiler?

To clarify: Gradual typing is where you have the ability to specify (define (fun x: int) (...)) types of things in Racket, right? I’ve always used it as dynamically typed so not sure of the specific syntax in this case. And higher level software contracts is talking about passing actual functions into other functions right?


greg
2020-11-3 13:02:34

Another aspect: If someone has ever needed/wanted to use Template Haskell for anything non-trivial, and been very frustrated? They will probably find Racket macros easier.

Well, after they get comfortable with s-expressions. And well, easier in simpler “macro by example” cases. Possibly harder or mysterious, initially, in other ways. :shrug:

I suppose the point is, in Racket it’s a foundational feature. As opposed to something that feels (to me) soft of bolted-on in Haskell.


greg
2020-11-3 13:03:13

I think that’s one key difference, but I’m not sure it’s great “pitch” material. I don’t know how many Haskell programmers try, or even think to try, Template Haskell.


greg
2020-11-3 13:04:39

Or maybe it’s great “pitch” material? If a new lang doesn’t nudge you to try things you’ve never thought to do, and/or in new ways you’ve never considered, then what’s the point?


greg
2020-11-3 13:05:12

Just not sure it’s “pitch” material like “your 10X programmers will become 20X”. coughs


phanthero
2020-11-3 13:09:17

@greg are you talking about DSLs? This person is implementing DSLs in Haskell, so I was wondering how to tell them if there are better features for implementing DSLs in Racket. Never used Haskell so dunno what Template Haskell is. Is it similar to macros? It’s just something I need to do today and have no time to actually explore Haskell, otherwise I would look into it more.


spdegabrielle
2020-11-3 13:10:43

> Thanks! I thought it was interpreted too since you have that REPL, but I guess that’s because of the JIT compiler There are actually two compilers; • Racket BC has the JIT • Racket CS uses a nanopass compiler to go to native code


dmitryhertz
2020-11-3 13:14:39

Hello everyone! What is going on with https://download.racket-lang.org/releases/7.9/catalog/ ? I cannot install packages via raco.


greg
2020-11-3 13:14:56

> Europeans are at work and Americans are still asleep There are various ways to interpret this; in every way, I hope this changes soon. :grimacing:


dmitryhertz
2020-11-3 13:14:57

> ((uncaught-exception-handler) (*(+(*)(*(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*))))(+(*)(*)(*)(*)))) uncaught exception: 404



soegaard2
2020-11-3 13:17:02

Neither 7.8 nor 7.9 is on the list.


spdegabrielle
2020-11-3 13:22:58

@phanthero > > To clarify: Gradual typing is where you have the ability to specify (define (fun x: int) (…)) types of things in Racket, right? I’ve always used it as dynamically typed so not sure of the specific syntax in this case. And higher level software contracts is talking about passing actual functions into other functions right? > I think a better characterisation is that the type checking happens at compile time(like Haskell), but the contract checking happens at run time. Gradual typing allows you to mix typed (checked) with untyped code.

(I might be oversimplifying - wait for the USA racketeers who know this far better than I to wake if you can)


mflatt
2020-11-3 13:28:16

There’s no file at just https://download.racket-lang.org/releases/7.9/catalog/, but there’s not supposed to be. Package operations use paths like https://download.racket-lang.org/releases/7.9/catalog/pkg/scribble-lib


mflatt
2020-11-3 13:29:12

I’ll have to investigate why https://download.racket-lang.org/releases/ isn’t updating, but the missing 7.8 and 7.9 on that synthesized page do not reflect missing catalogs.


mflatt
2020-11-3 13:40:04

It looks like the update ofhttps://download.racket-lang.org/releases/ got lost in the recent web-site overhaul, and I’ll restore it.


spdegabrielle
2020-11-3 13:42:24

@phanthero

> @greg are you talking about DSLs? Yes but also as a way to extend racket itself in ways you can’t easily do with functions, or having to write a separate preprocessor

> This person is implementing DSLs in Haskell, so I was wondering how to tell them if there are better features for implementing DSLs in Racket I think so but I’m not familiar with Haskell at all

Racket does have things like https://docs.racket-lang.org/turnstile/index.html\|Turnstile to help Racket programmers create typed languages. But that is just one thing - there are lots of others.

> ever used Haskell so dunno what Template Haskell is. Is it similar to macros? > Sorry not sure.


greg
2020-11-3 14:52:38

I’m looking at racket/trace and trying to understand if it’s still a collection in the racket/racket repo out of necessity? Or was it simply overlooked or not deemed worth the bother of moving it to be a main distribution package in its own repo?


samth
2020-11-3 14:55:56

I think there isn’t a real reason, and I either didn’t think about it or decided it was too small to bother with.


greg
2020-11-3 14:58:48

I guess I’m wondering because I was thinking of submitting a PR for a small enhancement. And it might be neat if people using an older Racket could still raco pkg install the newer version, to get the enhancement.


greg
2020-11-3 14:59:16

Or maybe instead I should just make my own independent little package.


samth
2020-11-3 14:59:58

I think at this point it would be a bunch of work to change — we’d have to have another smaller version of “base”, and set that up in 7.10, etc


samth
2020-11-3 15:00:16

I don’t think I’d want to make those changes just for racket/trace.


greg
2020-11-3 15:00:31

10–4. I’ll just make a little package.


greg
2020-11-3 15:00:36

Of my own.


samth
2020-11-3 15:00:48

I did at one point try to figure out how to move much of racket (as opposed to racket/base) out of “base”, but I was unsucessful.


greg
2020-11-3 15:01:27

The enhancement is a new parameter that says whether the name argument to the current-print-trace-{args results} handlers is, as now, a plain symbol, or (newly) a syntax object for the identifier.

That way, the location information is available.

So a tool or user could jump to the location.


greg
2020-11-3 15:03:00

I feel like sometimes the warm bowl of porridge for “debugging” is tracing. Also sometimes it’s handy to trace to a logger for e.g. a server. And doing something like (require (rename-in racket/trace [trace-define define])) is an easy way to “turn that on” for a module, as well as doing it individually.


greg
2020-11-3 15:03:24

I just felt like it’s a shame to see (foo 1 2 3) in the trace, and not be able to jump to that specific “foo” easily.


greg
2020-11-3 17:13:00

Oh ha there is a racket/trace repo for the trace package providing the calltrace collection. :smile:


spdegabrielle
2020-11-3 17:59:44

capfredf
2020-11-3 18:25:55

I didn’t know you spoke Chinese.


sorawee
2020-11-3 20:57:15

I want to buy a new laptop in the next year, and am considering the to-be-released Macbook, which has the new Apple Silicon CPU. Will Racket be compatible with this new CPU when it’s released? Cuz if not, I might as well buy the current model now.


samth
2020-11-3 20:58:08

Racket has an aarch64 backend now for both CS and BC


sorawee
2020-11-3 20:58:31

ah, cool! thanks


samth
2020-11-3 20:58:33

As to how well it will work immediately on the actual OS, I expect there will be some bugs


mflatt
2020-11-3 21:01:27

Clarification on BC: no JIT for AArch64.


notjack
2020-11-3 21:40:37

let me know how it goes, I was planning on my next laptop being a macbook too


spdegabrielle
2020-11-4 01:42:39

Sadly I don’t - I copied the announcement from the author.- I should learn.


plragde
2020-11-4 02:01:12

There will be bugs in the actual OS also. It’s generally risky to buy the first iteration of a redesign. When I heard about the switch, I bought the current, last Intel version. (Though I am typing this on a 2015, getting the last few days out of it.)


bryanalves
2020-11-4 02:48:38

@bryanalves has joined the channel