<rain1>
I read this blog about hygenic quasquotation thats makes syntactic closures
<rain1>
and I was wondering how that compares to scope sets?
<rain1>
is it a valid/correct approach to hygiene and does it have some limits that scope sets doesn't?
ubLIX has joined #racket
eli has quit [Ping timeout: 252 seconds]
jrslepak has quit [Ping timeout: 252 seconds]
gabot has quit [Ping timeout: 272 seconds]
badkins_ has joined #racket
badkins has quit [Ping timeout: 246 seconds]
<rntz>
rain1: hi! I wrote that blog post (... almost ten years ago now)
<rain1>
hey :D
<rntz>
I don't remember all the details, but it definitely has some limitations that Racket's hygiene system doesn't
<rain1>
im a fan of your work
<rntz>
in particular, with my approach, as I remember (it's been a while), there's no good way to destructure or pattern-match on the code you're given as an argument
groovy2shoes has quit [Quit: moritura te salutat]
<rntz>
rain1: thanks!
<rntz>
because the code you're given as an argument is wrapped in this opaque "syntactic closure" structure, so you can't ask "Does it look like (some-sybmol x ...) or like (some-other-symbol y ...)" without peeling off that closure, at which point you've lost the context that you needed to enforce hygiene
<rain1>
i see
<rain1>
Would it be possible to implement analogues of free/bound-identifier=?
<rntz>
I don't know. I don't _really_ understand free/bound-identifier=?
pierpal has quit [Quit: Poof]
pierpal has joined #racket
<rntz>
I also don't understand scope sets well enough to compare how my approach & scope sets work "under the hood"
<rntz>
I _do_ think you could in theory get around the limitation about destructuring your arguments by doing something like what racket does with syntax-e.
<rain1>
so I think the key thing I can take from this is that for a macro system we need a good set of tools for destructing as well as building up syntax objects
<rntz>
yeah, I think that's right. certainly if you want "sophisticated" macros that can take arguments with interesting structure.
groovy2shoes has joined #racket
joebobjoe has joined #racket
ng0 has joined #racket
tennix has quit [Ping timeout: 268 seconds]
tennix has joined #racket
vraid has quit [Quit: Leaving]
joebobjoe has quit [Ping timeout: 268 seconds]
rnmhdn has joined #racket
sauvin has quit [Remote host closed the connection]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
joebobjoe has joined #racket
<lexi-lambda>
rntz: free-identifier=? just means that both identifiers are bound to the same thing (even through `rename-in`s and rename transformers). Put another way, it computes whether or not both identifiers share the same binding site.
<lexi-lambda>
bound-identifier=? is much less useful—it computes whether or not the two identifiers would bind each other, so if you have two identifiers x and y, then #`(let ([#,x 1]) #,y) and #`(let ([#,y 1]) #,x) would both produce 1.
DGASAU has quit [Ping timeout: 272 seconds]
<lexi-lambda>
bound-identifier=? is mostly used to detect “duplicate identifier” errors in binding forms, so you can signal an error on things like (lambda (x x) x) or (let ([x 1] [x 2]) x).
orivej has quit [Ping timeout: 268 seconds]
<lexi-lambda>
I’m not sure that the names are very good ones, but I think free-identifier=? is named as such because it detects binding if the identifiers are free in their enclosing expression (though I think this is a little confusing because they are not really free, they are bound, and it isn’t clear what they are supposedly free with respect to).
<jcowan>
say rather, "as if they were free"
zakora has joined #racket
joebobjoe has quit [Quit: leaving]
<zakora>
Just getting started with racket, downloaded the standard 7.1 linux version. In the racket REPL, when I use ",doc add1" (or any other function) it launches Chrome. My default browser is Firefox. Any idea how to open doc in Firefox?
DGASAU has joined #racket
<zakora>
I am using Gnome, in the preferences panel the default application for web sites is set to Firefox
<zakora>
One odd thing that might cause this: I didn't install firefox with the system package manager, but downloaded the .tar.gz and run it from ~/.local/bin/
pierpal has quit [Ping timeout: 252 seconds]
pierpal has joined #racket
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
pierpal has quit [Ping timeout: 250 seconds]
buyfn has joined #racket
<lexi-lambda>
jcowan: If they really were free, they would be unbound, and free-identifier=? wouldn’t mean anything (it would just be the same as comparing the identifiers symbolically).
<lexi-lambda>
zakora: According to http://docs.racket-lang.org/net/sendurl.html#%28def._%28%28lib._net%2Fsendurl..rkt%29._external-browser%29%29, on Unix, the browser launched will look at the 'external-browser preference.
<lavaflow>
I expect (sqldb) to resolve in functions called by that search-frame created by (new-search-frame) to be the sqlite connection created by (connect ...)
<lavaflow>
but when I run it, the actual result is null (which is the default value of that parameter)
<lavaflow>
parameters should go across module boundaries, right? so is there anything special going on with dynamic scope and racket/gui?
<lavaflow>
my parameter is defined thusly in headspace-sql.rkt which is where it's also used (but not where it's set): (define sqldb (make-parameter null))
<lavaflow>
this is the first line that errors out, also from headspace-sql.rkt: (define (prepared sql) (hash-ref! prepared-sql-cache sql (thunk (prepare (sqldb) sql))))
<lavaflow>
hmm, could this be because of the thunk? is (sqldb) getting called there when the module is first initialized, not when that function is first run?
davidl has quit [Ping timeout: 245 seconds]
rand__ has quit [Ping timeout: 268 seconds]
<lavaflow>
no that doesn't seem to be it
mzan has quit [Read error: Connection reset by peer]
<lavaflow>
yeah I'm stumped. it sure seems like when I create a new frame% it gets a brand new dynamic scope, resetting parameters to their default values.