samth changed the topic of #racket to: Racket v7.6 has been released: https://blog.racket-lang.org/2020/02/racket-v7-6.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fernando-Basso has quit [Quit: Leaving]
ziyourenxiang has joined #racket
snailboat has joined #racket
FreeFull has quit []
juanfra_ has joined #racket
efm has quit [Ping timeout: 255 seconds]
dddddd has quit [Read error: Connection reset by peer]
efm has joined #racket
orivej has quit [Ping timeout: 260 seconds]
caltelt has joined #racket
panico has quit [Remote host closed the connection]
horatiohb has quit [Ping timeout: 258 seconds]
panico has joined #racket
k_sze has quit [Quit: ZNC 1.7.5 - https://znc.in]
k_sze has joined #racket
k_sze has quit [Client Quit]
k_sze has joined #racket
sagax has quit [Remote host closed the connection]
orivej has joined #racket
caltelt has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 265 seconds]
C79 has joined #racket
C79 has left #racket [#racket]
kritixilithos has joined #racket
orivej has joined #racket
narimiran has joined #racket
kritixilithos has quit [Ping timeout: 240 seconds]
kritixilithos has joined #racket
fridim has quit [Ping timeout: 252 seconds]
fridim has joined #racket
panico has quit [Remote host closed the connection]
YuGiOhJCJ has joined #racket
orivej has quit [Ping timeout: 240 seconds]
iyzsong has joined #racket
vraid has joined #racket
Fernando-Basso has joined #racket
orivej has joined #racket
ZombieChicken has quit [Quit: WeeChat 2.7.1]
orivej has quit [Ping timeout: 240 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
orivej has joined #racket
sagax has joined #racket
orivej has quit [Ping timeout: 240 seconds]
ZombieChicken has joined #racket
narimiran has quit [Ping timeout: 240 seconds]
iyzsong has quit [Ping timeout: 240 seconds]
alinsoar has joined #racket
alinsoar has quit [Remote host closed the connection]
ArthurStrong has joined #racket
alinsoar has joined #racket
<alinsoar> Hi, I try to define a macro using define-syntax and syntax-case and I do not know how to print the expanded code, after the syntax expansion finishes.
kritixilithos has quit [Ping timeout: 240 seconds]
alinsoar has quit [Remote host closed the connection]
alinsoar has joined #racket
nullcone has quit [Quit: Connection closed for inactivity]
kritixilithos has joined #racket
kritixilithos has quit [Ping timeout: 240 seconds]
<greghendershott> alinsoar: Recommend using Macro Stepper in Dr Racket or similar feature in Racket Mode.
<greghendershott> The "hiding" feature will help you focus on your macro, not fully-expanded Racket forms which can feel overwhelming like "assembly language"
<greghendershott> Or you can do something like (syntax->datum (expand some-example-use-of-your-macro))
kritixilithos has joined #racket
<greghendershott> In simple cases if you macro "foo" is defined in same namespace, (syntax->datum (expand #'(foo blah blah))).
<greghendershott> Oh also there's command-line `raco macro-stepper`
<greghendershott> As a quick way to launch just the stepper GUI
<alinsoar> greghendershott thanks
kritixilithos has quit [Ping timeout: 240 seconds]
<alinsoar> greghendershott in expansion I got (#%app (#%top . k) ; what is the meaning of #%app and top ?
<greghendershott> It sounds like you're trying to use `expand` in a namespace that doesn't have racket/base in it, which defines those, you can find in Racket docs
kritixilithos has joined #racket
<greghendershott> Suggest using macro stepper if you just want to see your macro expansion without getting into a whole detour right now :)
<alinsoar> greghendershott thank you!
<greghendershott> (but `#%app` is hook that lets you redefine function application, and, `#%top` you're less likely to use but can read about in docs)
<alinsoar> I expected to get (lambda (k) ((lambda (k) (k 100)) (lambda (ev) (k (set! v ev)))))and in fact I got '(#%expression (lambda (k) (#%app k (#%app set (#%top . b) '100))))
<alinsoar> I am not sure it is correct what I did
ArthurStrong has quit [Quit: leaving]
<alinsoar> macro use in racket is infernal
<alinsoar> Can I find a working example of define-syntax combined with syntax-case and to be recursive ?
<alinsoar> I want to define a recursive macro with define-syntax combined with syntax-case
<greghendershott> alinsoar: That's what I meant about _fully_ expanded syntax being a little overwhelming and feeling like "assembly language".
<greghendershott> The stepper tools will hide expansion down into those very primitive forms, if you want, letting you focus on your own stuff
<greghendershott> By fully expanded programs I mean: https://docs.racket-lang.org/reference/syntax-model.html#(part._fully-expanded)
<greghendershott> The GUI stepper has a dropdown list box at the bottom, with choices for hiding
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
efm has quit [Remote host closed the connection]
efm has joined #racket
kritixilithos has quit [Ping timeout: 240 seconds]
kritixilithos has joined #racket
dddddd has joined #racket
horatiohb has joined #racket
KDr24 has joined #racket
KDr23 has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 258 seconds]
C79 has joined #racket
<C79> how can I boolean a range of numbers
FreeFull has joined #racket
jshap has joined #racket
<jshap> do people actually use drracket successfully?
<jshap> it's so slow for me
efm has quit [Read error: Connection reset by peer]
<C79> every time I've been here, no one says anything
<jshap> yeh i mean i figured
<jshap> there's a lot of community irc channels that are basically ghost towns
<C79> do you mean the program is slow on your computer?
efm has joined #racket
<jshap> beyond slow
<C79> it's pretty quick on mine
<C79> what kind of set up dp ypu have?
<jshap> arch linux
<C79> oh
<jcowan> Scheme is a minority interest, and while people here are both knowledgeable and helpful, they are also usually very busy.
<jshap> yeah jcowan
<jcowan> "here" meaning all the Scheme channels including ##lisp (#lisp is Common Lisp), #scheme, #racket, #guile, etc.
<jcowan> You may also get better results on the mailing list.
<jcowan> The more details you can provide in your first email, the better.
<C79> awesome
<jshap> i think it's more that im just looking to shout into the void than i am looking to actually solve a specific problem
<C79> haha
<jshap> like "drracket debugging is slow" isn't exactly something that seems like a "solvable" issue
<jcowan> The Void, at your service!
<jcowan> The alternative is "fast but no debugging at all" in most Schemes
<jshap> yes exactly lol
<jshap> im at the "trace isn't enough and the contract violation message isn't good enough either"
<jcowan> Then you have no choice but to bear the slowness of unoptimized interpretation.
zenspider has quit [Ping timeout: 265 seconds]
endformationage has joined #racket
C79 has quit [Remote host closed the connection]
kritixilithos has quit [Quit: quit]
nullcone has joined #racket
narimiran has joined #racket
Boc has quit [Read error: Connection reset by peer]
<lavaflow> does anybody have experience with logging (e.g. https://docs.racket-lang.org/reference/logging.html) across places?
<lavaflow> I don't really want to reinvent the wheel if I don't have to, but I don't see anything in the docs for it already
<lavaflow> basically I'm thinking for each place, I create a new logger with a log receiver that sends log events across a place channel
<lavaflow> changing the log level during runtime would require me sending some sort of control message back to each place I think, to avoid sending log events across the place channel that will be ignored anyway
zenspider has joined #racket
sz0 has joined #racket
<greghendershott> lavaflow: I haven't, not really. Closest I've come is making a log-receiver that HTTP PUTs things to a "cloud" logging service.
<greghendershott> I think you're right about needing to send a control message to places, to set the log level, so they behave more efficiently even short of sending things.
<greghendershott> As for sending log events, I think you could look at that orthogonally? e.g. Not even use places, for that, necessarily?
dustyweb has quit [Remote host closed the connection]
<greghendershott> If you know you'll want one central log event store, whether it's your own or third party, that could work however you prefer. Which might be using place channels, or not.
<lavaflow> I thought about having each place just write to the log file itself, but it seems those writes aren't necessarily atomic, particularly if they're not small
<greghendershott> Hmm OK so it can't be quite _that_ simple, maybe. :)
<greghendershott> There is support to use the OS system logger, I think?
<lavaflow> I'm not sure, that's probably worth considering though
<lavaflow> I didn't see anything in the docs about syslog, but I didn't look very hard
<lavaflow> each place sending log messages to syslog instead of across a place channel seems reasonable enough
<greghendershott> I think it might even be on by default, for some OS's, but only for error level?
<lavaflow> looks like you're probably right: "For this initial logger, two log receivers are also created: one that writes events to the process’s original error output port, and one that writes events to the system log."
<lavaflow> I'm not using the initial logger because I don't want it outputting to stderr, so I guess I dropped the system log receiver at the same time inadvertently
<lavaflow> (spamming stderr seemed to cause trouble for emacs and/or geiser, I'm not really sure why.)
<greghendershott> Logging, for me, is either of two extremes. Either I'm "OMG just-work I don't want to think about it", -or-, a complete yak shave detour. But never a happy medium. :)
<lavaflow> yeah pretty much :D
<greghendershott> So if my suggestions sound lazy, it's from trying to tip into the latter. :) Sorry to project onto you.
<lavaflow> not at all
<lavaflow> my logging breaks after dynamic-rerequiring one of my modules (the dozen or so before it don't break anything)
<lavaflow> the module that breaks it happens to be the one that uses racket/unsafe/ops... this could be fun
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<lavaflow> nothing to do with unsafe ops apparently, it just stops after the last one no matter what it is. huh.
<notnotdan> https://docs.racket-lang.org/guide/performance.html#%28part._.Mutation_and_.Performance%29 Why does it say here that "a new location is allocated for x on every iteration"? I would imagine that the same location `n` is used for every iteration
efm has quit [Remote host closed the connection]
efm has joined #racket
nullcone has quit [Quit: Connection closed for inactivity]
narimiran has quit [Ping timeout: 260 seconds]
Fernando-Basso has quit [Quit: Leaving]
sz0 has quit [Quit: Connection closed for inactivity]
efm has quit [Ping timeout: 240 seconds]
efm has joined #racket
vraid has quit [Disconnected by services]
vraid has joined #racket
orivej has joined #racket
<lavaflow> I don't know what the problem was, but it was seemingly something to do with with-logging-to-port and/or how I was using that
<lavaflow> I replace the use of with-logging-to-port with a thread looping on (fprintf log-file "~a~n" (sync log-receiver)) and now things seem to work. tbh this seems a suitable enough solution to me.
dustyweb has joined #racket
nullcone has joined #racket
vraid has quit [Disconnected by services]
orivej has quit [Ping timeout: 268 seconds]