tonyg changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://gather.town/app/wH1EDG3McffLjrs0/racket-users -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with (Dr)Racket. Remember to wait around for an answer!
FreeFull has quit [*.net *.split]
ttree has quit [*.net *.split]
xgqt has quit [*.net *.split]
notzmv has quit [*.net *.split]
terrorjack has quit [*.net *.split]
tonyg has quit [*.net *.split]
Lulu has quit [*.net *.split]
disruptek has quit [*.net *.split]
ckie has quit [*.net *.split]
Vaelatern has quit [*.net *.split]
FreeFull has joined #racket
tonyg has joined #racket
Lulu has joined #racket
morte_ has quit [Remote host closed the connection]
Vaelatern has joined #racket
xgqt has joined #racket
terrorjack has joined #racket
FreeFull has quit []
ckie has joined #racket
disruptek has joined #racket
morte_ has joined #racket
morte_ has quit [Remote host closed the connection]
ec has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 255 seconds]
ec has quit [Write error: Broken pipe]
lowak has quit [Write error: Broken pipe]
ec has joined #racket
lowak has joined #racket
ec has quit [Remote host closed the connection]
monkey_ has quit [Ping timeout: 248 seconds]
ec has joined #racket
williewillus has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
jao has quit [Ping timeout: 260 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 244 seconds]
notzmv has joined #racket
vtbsub has quit [Quit: Leaving]
ec has quit [Ping timeout: 268 seconds]
williewillus has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
ur5us has quit [Ping timeout: 244 seconds]
ttree has joined #racket
ur5us has joined #racket
ttree has quit [Ping timeout: 255 seconds]
szkl has quit [Quit: Connection closed for inactivity]
ur5us has quit [Ping timeout: 255 seconds]
codingquark has quit [Quit: No Ping reply in 180 seconds.]
codingquark has joined #racket
codingquark has quit [Ping timeout: 240 seconds]
codingquark has joined #racket
vtbsub has joined #racket
<vtbsub> Reading the doc, I learned that you can call `map` with more than one array as the arguments.
<vtbsub> for example, (map + '(1 2 3) '(10 20 30) '(100 200 300)) produce: '(111 222 333)
<vtbsub> s/array/list
<vtbsub> If I have list of list, e.g. (define foo '((1 2 3) (10 20 30) (100 200 300)))
<vtbsub> and wanna splice foo into the rest of the arguments of (map + ...<here>...)
<vtbsub> what would be the correct way of doing it?
<vtbsub> I tried to do: (eval `(map + ,@foo))
<vtbsub> but it seems that the quasiquote expands them as: (map + (1 2 3) (10 20 30) (100 200 300))
<vtbsub> which would be error since (1 2 3) etc. would be treated as function application, right?
<vtbsub> instead of list of numbers
szkl has joined #racket
badkins has joined #racket
nuance has joined #racket
nuance has left #racket [WeeChat 3.3]
nuance has joined #racket
codingquark has quit [Ping timeout: 255 seconds]
codingquark has joined #racket
<samth> vtbsub: you want to use `apply`
<samth> rudybot: eval (apply map `((1 2 3) (4 5 6)))
<rudybot> samth: your sandbox is ready
<rudybot> samth: error: map: contract violation <NEWLINE> expected: procedure? <NEWLINE> given: '(1 2 3)
<rudybot> samth: ; Value: '(5 7 9)
<samth> rudybot: eval (apply map + `((1 2 3) (4 5 6)))
ttree has joined #racket
tonyg has quit [Ping timeout: 248 seconds]
tonyg has joined #racket
jao has joined #racket
notzmv has quit [Ping timeout: 268 seconds]
FreeFull has joined #racket
badkins has quit [Remote host closed the connection]
nuance has quit [Ping timeout: 268 seconds]
badkins has joined #racket
nuance has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
notzmv has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 244 seconds]
kenran has joined #racket
tfb has joined #racket
tfb has quit [Quit: died]
ec has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
kenran has quit [Quit: WeeChat info:version]
badkins has joined #racket
badkins has quit [Ping timeout: 255 seconds]
ur5us has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
<nuance> Hi, all. This isn't terrifically urgent, but I'm curious if anyone could give me some pointers on generating modules via macro expansion. As a minimal example, consider (define-syntax-rule (make-module nm body ...) (module nm racket body ...)). When used in something like (module+ main "Here's a random string" (make-module test-module (displayln "Made test-module") (define test 'test) (provide
<nuance> test)), I'm told that module is only allowed at the top level (Racket 7.9). I've experimented with this in a few ways, including an attempt with syntax-parse with an eval in a local namespace. This seems to work, but dynamic-require cannot find the module in the "." or ".." submodules, and I'm unpersuaded that it's actually doing the right thing.
<nuance> I'll be AFK, but curious if there are some examples or ideas to set me on the right path.
<vtbsub> samth, oh, didn't know that you can do that using apply, thanks, I learned something new
theruran has quit [Quit: Connection closed for inactivity]
monkey_ has joined #racket
ec has quit [Remote host closed the connection]
mange has joined #racket
FreeFull has quit [Ping timeout: 268 seconds]
codaraxis has joined #racket
theruran has joined #racket