samth changed the topic of #racket to: Racket v7.4 has been released: https://blog.racket-lang.org/2019/08/racket-v7-4.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
libertyprime has joined #racket
mzan has quit [Quit: Leaving]
travishinkelman has quit [Quit: travishinkelman]
libertyprime has quit [Remote host closed the connection]
pera has joined #racket
<AMDphreak> I might not need to bug him.
<AMDphreak> Where can I report errors and give general feedback on the Racket Introduction tutorial
acarrico has quit [Ping timeout: 268 seconds]
<erkin> On the mailing lists.
Codaraxis has quit [Read error: Connection reset by peer]
AMDphreak_ has joined #racket
AMDphreak has quit [Ping timeout: 265 seconds]
AMDphreak_ is now known as AMDphreak
Sgeo__ has quit [Read error: Connection reset by peer]
Sgeo__ has joined #racket
pera has quit [Quit: leaving]
Sgeo__ has quit [Read error: Connection reset by peer]
Sgeo__ has joined #racket
ma__ has joined #racket
ma__ has quit [Client Quit]
analogue has joined #racket
Fare has joined #racket
Fare has quit [Remote host closed the connection]
libertyprime has joined #racket
libertyprime has joined #racket
Fare has joined #racket
Codaraxis has joined #racket
analogue has quit [Quit: Leaving]
libertyprime has quit [Quit: Lost terminal]
jao has quit [Ping timeout: 240 seconds]
<bremner> AMDphreak: alternatively, there's probably a github repo. The trick would be finding the right one
<AMDphreak> @bremner thanks for heads up
Nomenclatura has joined #racket
Nomenclatura has quit [Quit: q]
fanta1 has joined #racket
AMDphreak has quit [Remote host closed the connection]
libertyprime has joined #racket
orivej has quit [Ping timeout: 250 seconds]
libertyprime has quit [Quit: leaving]
endformationage has quit [Quit: WeeChat 2.6]
orivej has joined #racket
<jcowan> bremner: Even though alists are O(n) and hash tables are O(1), hash tables have a bigger constant factor, and at some point they cross over. In addition, a-lists are persistent, hash tables are mutable.
orivej has quit [Ping timeout: 240 seconds]
dddddd has quit [Remote host closed the connection]
<winny> there are also immutable variants
orivej has joined #racket
fanta1 has quit [Quit: fanta1]
orivej has quit [Ping timeout: 268 seconds]
teardown is now known as someone
someone is now known as teardown
orivej has joined #racket
Trieste has quit [Ping timeout: 265 seconds]
Trieste has joined #racket
mzan has joined #racket
evhan has quit [Quit: De IRC non curat rex...]
evhan has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
Sgeo__ has quit [Read error: Connection reset by peer]
Sgeo__ has joined #racket
Fernando-Basso has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
ng0 has joined #racket
Fernando-Basso has quit [Remote host closed the connection]
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
evhan has quit [Quit: De IRC non curat rex...]
evhan has joined #racket
snako has joined #racket
dmiles has quit [Ping timeout: 265 seconds]
logicmoo has joined #racket
Fare has quit [Ping timeout: 268 seconds]
iyzsong has joined #racket
libertyprime has joined #racket
jao has joined #racket
pinicarus has joined #racket
<pinicarus> Hi everyone
<pinicarus> any idea how to annotate the lex variable in https://pastebin.com/VTQiEZ4B ?
<pinicarus> I tried (: lex (-> Input-Port Any)) but TR requires type annotation for `lexer-body` which is buried deep in `lexer` definition (and not provided by `parser-tools/lex`)
<pinicarus> more generally, how would you annotate an expression based on macro expansion from other modules?
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #racket
<bremner> jcowan: It's a fair point, although personally I think one probably needs to benchmark a given runtime on a given application before relying on that performance advantage. That's true for the alleged expected O(1) performance of hash tables as well.
orivej has quit [Ping timeout: 276 seconds]
libertyprime has quit [Quit: leaving]
<erkin> Has anyone benchmarked immutable vs mutable hashtables?
<bremner> I'd expect the immutable ones to be slower, but maybe that again depends on the workload
<bremner> the docs mention O(log(max key)) performance, I guess there is some binary trie or something like that hidden in there?
mzan has quit [Ping timeout: 240 seconds]
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
BitPuffin has quit [Read error: Connection reset by peer]
MrAxilus has quit [Read error: Connection reset by peer]
olavx200 has quit [Read error: Connection reset by peer]
moldybits has quit [Quit: WeeChat 2.4]
dddddd has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
jao has quit [Remote host closed the connection]
vraid has joined #racket
mzan has joined #racket
jao has joined #racket
endformationage has joined #racket
<jcowan> bremner: Sure. However, the persistent/transient distinction is still important. In writing an interpreter once, I decided to store all the lexically visible variables in an improper alist, with a hash table holding all the global variables in the tail.
iyzsong has quit [Ping timeout: 276 seconds]
<jcowan> I then wrote a version of assoc that searched the alist, but instead of bombing out when it reached the end and the end wasn't (), assumed it was a hashtable and searched it. Since there are generally a *lot* more globals than locals visible at any time, it gave me almost O(1) performance while allowing me to push new pairs on the alist at will and then just restoring the a-list pointer when exiting the scope.
Fare has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
travishinkelman has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
vraid has quit [Quit: Leaving]
johnjay has joined #racket
pera has joined #racket
vraid has joined #racket
FreeFull has joined #racket
urbanslug has joined #racket
urbanslug has quit [Read error: Connection reset by peer]
P1RATEZ has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
<bremner> jcowan: right, I think it would work the same way with racket immutable hash tables
<jcowan> Right, yes.
acarrico has joined #racket
Fare has quit [Ping timeout: 264 seconds]
orivej has joined #racket
<samth> bremner: erkin: immutables hashes are implemented with a hash array mapped trie, which has cost log_64(N) for most operations
<samth> pinicarus: unfortunately it's not always easy to use something like `lexer` in Typed Racket, since it expands to a complex macro
<erkin> Ah, I see.
Fare has joined #racket
sauvin has quit [Ping timeout: 240 seconds]
sagax has quit [Ping timeout: 240 seconds]
moldybits has joined #racket
ym has quit [Quit: Leaving]
Fare has quit [Ping timeout: 250 seconds]
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #racket
acarrico has quit [Remote host closed the connection]
hackeryarn has joined #racket
hackeryarn has quit [Quit: Quit]
hackeryarn has joined #racket
<pinicarus> samth: clearly it's not :)
oofoe has joined #racket
<pinicarus> so far I circumvented the issue by using lexer in a non-typed submodule and then using `require/typed` to make have an expected type
<pinicarus> (+it)
<samth> pinicarus: that's probably what I'd do
<oofoe> Hi! Does anybody here know anything about building Racket executables on Macs?
kapitanfind-us has joined #racket
travishinkelman has quit [Quit: travishinkelman]
<kapitanfind-us> Hi folks! I am playing with my first racket package but I have a problem
<kapitanfind-us> if I connect to a REPL and execute anything in `module+`, it will trigger
<kapitanfind-us> module+: allowed only in a module body
<kapitanfind-us> maybe I am making a newbie mistake
<samth> kapitanfind-us: you indeed can't use `module+` at the repl
ArthurStrong has joined #racket
<ArthurStrong> Hi all. I want to convert a date to string. How to do this in Racket? In C I would use "%04d/%02d/%02d"
<ArthurStrong> It seems, Racket's format is imcompatible with Common Lisp's?
travishinkelman has joined #racket
<ArthurStrong> Should I use a pack of three statements like: (~r 3 #:min-width 2 #:pad-string "0")
<ArthurStrong> ?
<samth> ArthurStrong: yes, that's what I'd do
<ArthurStrong> samth: OK, thanks
<kapitanfind-us> (I use run-geiser in Emac)
Codaraxis has quit [Ping timeout: 268 seconds]
<kapitanfind-us> *Emacs
pinicarus has quit [Read error: Connection reset by peer]
<oofoe> Small rephrase... When building a Racket executable on Macs, can anyone say how to package external resources (image files, etc.) within the .dmg that the Racket compiler creates? Thanks!
<samth> oofoe: see define-runtime-path
<samth> kapitanfind-us: I think geiser is running things outside a module
<samth> I might suggest trying racket-mode
<kapitanfind-us> oh i see, maybe I need ",enter" then
<kapitanfind-us> yes well `,enter (file "./main.rkt")` does something
<oofoe> Thanks @samth, will try!
moldybits has quit [Quit: WeeChat 2.4]
pinicarus has joined #racket
<ArthurStrong> You know, Emacs has an option like "execute area" or so. Is it possible in DrRacket to execute selected region?
kapitanfind-us has quit [Remote host closed the connection]
pinicarus has quit [Quit: Leaving]
hackeryarn has quit [Quit: Quit]
hackeryarn has joined #racket
sagax has joined #racket
bthesorceror has joined #racket
travishinkelman has quit [Quit: travishinkelman]
travishinkelman has joined #racket
hackeryarn has quit [Ping timeout: 246 seconds]
travishinkelman has quit [Quit: travishinkelman]
evdubs has quit [Quit: Leaving]
Trieste has quit [Ping timeout: 268 seconds]
Trieste has joined #racket
evdubs has joined #racket
Codaraxis has joined #racket
orivej has quit [Ping timeout: 268 seconds]
Fernando-Basso has joined #racket
<oofoe> @samth, that totally did the trick! Thanks again!
travishinkelman has joined #racket
mzan has quit [Quit: Leaving]
AMDphreak has joined #racket
<ArthurStrong> How to execute list of statements? Like PROGN in LISP?
BitPuffin has joined #racket
<ArthurStrong> Oh, it's "begin"
<winny> if you get any funny errors about a "define" in a "begin", you can replace "begin" with "let ()"
efm has joined #racket
<ArthurStrong> winny: thanks
BitPuffin has quit [Ping timeout: 264 seconds]
BitPuffin has joined #racket
Fare has joined #racket
MrAxilus has joined #racket
olavx200 has joined #racket
orivej has joined #racket
Fare has quit [Ping timeout: 252 seconds]
AMDphreak has quit [Ping timeout: 252 seconds]
keep_learning has quit [Ping timeout: 268 seconds]
AMDphreak has joined #racket
P1RATEZ has quit []
FreeFull has quit []
evdubs has quit [Quit: Leaving]
evdubs has joined #racket
evhan has quit [Quit: De IRC non curat rex...]