<d3mon>
I'm following the tutorial for the module `brag` (https://docs.racket-lang.org/brag/). A quick summary is that it generates a parser for you, which can then be used to generate syntax objects from strings of source code
<d3mon>
The tutorial recommends using syntax-parse to pattern-match things in the syntax objects and perform actions on that basis to make an interpreter
<d3mon>
I don't think I need all the features of syntax-parse, at least not at this stage because I'm trying to produce a prototype language
<d3mon>
(basically a small working example)
<d3mon>
Can anyone suggest another way I can interpret the syntax objects to produce output? This is my first time using Racket so I might be missing something obvious
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
eli_oat has joined #racket
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
sxn has quit [Quit: sxn]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
random-jellyfish has joined #racket
monkey_ has joined #racket
FreeFull has joined #racket
monkey_ has quit [Remote host closed the connection]
<dzoe>
d3mon: I strongly suggest you use syntax-parse, I use syntax-case wherever I can (it's faster and in some cases the difference can be kinda big), but syntax-parse allows you MUCH better control with respect to various types of ellipsis-head patterns at seemingly non-head positions within a pattern.
ec_ has joined #racket
<dzoe>
Consider a pattern like this: (name pre ... (v0 ...) (v1 ...) (v2 ...) (v3 ...) post ...))
<dzoe>
With syntax-case that was virtually impossible to parse correctly the way I wanted it, with syntax-parse THIS (above) is the pattern that parses it without a hiccup.
ec has quit [Ping timeout: 255 seconds]
badkins has joined #racket
Origin has quit [Read error: Connection reset by peer]
Origin has joined #racket
Origin has quit [Read error: Connection reset by peer]
badkins has quit [Ping timeout: 252 seconds]
louis77 has quit [Remote host closed the connection]
badkins has joined #racket
edrx has joined #racket
<edrx>
hi all! anyone here understands the elisp function `geiser' well?
<edrx>
but simply running (save-window-excursion (geiser 'racket)) doesn't work as expected... it returns early, and the window setting is only changed after the save-window-excursion returns, and ignoring the save-window-excursion...
<edrx>
is there a way to write a function (my-geiser-wait) that only returns after the connection is established and the windows are set? how do I write it? would this work?