
Who is running the racket script effort? (mentioned by Matthias on town hall)

RacketScript : https://github.com/vishesh/racketscript I believe Stephen Chang was the advisor of Vishesh, but I can be misremembering.

thanks!

Chatted with Stephen Chang briefly on Gather at rcon. When the “linklet” change happened in Racket, that broke some things in RacketScript, so RacketScript is a bit out of sync w/ Racket presently.

FWIW I have a compiler for top-level forms. Instead of making my own compiler for modules, I decided to wait for linklets. I made a few, small experiments with linklets, but didn’t get far.
The input language: https://github.com/soegaard/urlang/blob/master/compiler-rjs/compiler.rkt#L280
The runtime (i.e. primitives implemented in JavaScript): https://github.com/soegaard/urlang/blob/master/compiler-rjs/runtime.rkt
The TODO list, which shows where I ran out of steam … :slightly_smiling_face: https://github.com/soegaard/urlang/blob/master/compiler-rjs/compiler.rkt#L5

^@stchang

FYI I have just create a new “htdp” tag on Stackoverflow: https://stackoverflow.com/questions/tagged/htdp Feel free to improve the tag description.

For users of Linux distros, apart from Nix; how are the racket BC/CS now bundled? Is it just a single one or are there multiple binaries etc?

I use the downloads and not the packaged versions myself.

Good question. My guess is that Linux distributions will just switch to CS when that’s the default.

@samth Apologies the CS variant isn’t building on Nix atm and I need to debug the build script so will take some time to check.

@cpaulbond has joined the channel

This ought to be written down somewhere more permanent than slack history

I would guess that Debian- and RHEL-based distributions will switch over at their next major release after CS becomes the default. With Arch-based ones, there’s probably already a Racket CS package on AUR (not necessarily completely up-to-date, though). Not sure about other distros.

Where can I replay today’s RacketCon events? I can’t find anything pertinent on the YouTube channel. Thanks.

That makes sense - if there are any Nix users; I’m trying to get the current build script working. Below is what I have so far but there’s still a build error while building Chez, before I started doing something else.
racketChez = with pkgs;
racket.overrideAttrs(oldAttrs: rec {
patchPhase = ''
sed -i -n 's//bin/cp/cp/g' src/ChezScheme/workarea
sed -i -n 's//bin/ln/ln/g' src/ChezScheme/workarea
'';
buildPhase = ''make cs '';
buildInputs = oldAttrs.buildInputs ++ [ libuuid ];
configureFlags = oldAttrs.configureFlags ++ [ "--enable-cs" ];
});


Actually looks like some of the talks have been broken out into separate videos already:


It’s weird, on Chrome (upstairs), I see only Day 1 stuff, but in the basement on my big TV I was seeing Day 2 stuff too.

Now I don’t see Day 2 (2020). My guess is it will appear later. I hope not too long from now.

@junjunchia has joined the channel

Hi! I’m new to Racket macros, and I’m having trouble understanding what is happening in the program below. Could anyone tell me why it fails to terminate? Thank you! #lang racket
(require (for-syntax racket/base syntax/parse))
(define-syntax (f stx)
(syntax-parse stx
[(_ lst)
#'(begin
(if #f
(f (syntax->datum #'lst))
(display "else")))]))
(f '(1 2 3))

To me, it looks like the macro is recursive in such a way that it will keep expanding into itself, without a way to stop the expansion.

Thanks! But the behavior is counter-intuitive, since the condition part of if
is #f.
How does the non-termination happen?

The if
will be evaluated at run time, after macro expansion.

#lang racket
(require (for-syntax racket/base syntax/parse))
(define-syntax (f stx)
(syntax-parse stx
[(_ lst)
(begin
(if #f
#'(f (syntax->datum #'lst))
#'(display "else")))]))
(f '(1 2 3))

The version I posted will work how you would expect it to.

In my version, the if
is evaluated during macro expansion, and will produce a piece of syntax.

by the way, perhaps we should change the metadata for the channel on YouTube, if possible. “Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.” seems a bit, uh, generic