samth changed the topic of #racket to: Racket v7.7 has been released: https://blog.racket-lang.org/2020/05/racket-v7-7.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
<friscosam> `(add1 e) ...` expands to `(add1 e0) (add1 e1) (add1 e2)` etc.
KindOne has quit [Quit: K-Lined]
<friscosam> Not sure if I follow what you are attempting, maybe if you have some example expansions I can be more assistance.
<stagboot> ah, i see that the ellipsis does the mapping. so, what i'm really basically trying to do is make a macro that takes a symbol argument, adds that to a global set variable, then defines a function that takes that symbol as an argument. the actual function is about 55 lines long, so i'm distilling it to something simpler here ;)
catonano has quit [Ping timeout: 256 seconds]
<stagboot> *sorry: /list/ of symbols
<stagboot> in short: the objective is to make a macro that accepts a list, does a side effect with it, then defines a function that accepts it as an argument.
<stagboot> don't wanna be rude, asking a question then ghosting, but i'm going afk for a while. gotta get out of the room for a bit, ya know?
pierpal has joined #racket
pierpal has quit [Read error: Connection reset by peer]
KindOne has joined #racket
notzmv has joined #racket
pierpal has joined #racket
pierpal has quit [Ping timeout: 258 seconds]
nebunez has quit [Remote host closed the connection]
xsperry has quit [Quit: http://www.okay.uz/ (EOF)]
pierpal has joined #racket
pierpal has quit [Ping timeout: 260 seconds]
pierpal has joined #racket
pierpal has quit [Ping timeout: 240 seconds]
libertyprime has joined #racket
pierpal has joined #racket
wingsorc has quit [Quit: Leaving]
pierpal has quit [Ping timeout: 256 seconds]
pierpal has joined #racket
pierpal has quit [Ping timeout: 260 seconds]
notnotdan has quit [Ping timeout: 260 seconds]
notnotdan has joined #racket
notnotdan has quit [Ping timeout: 272 seconds]
notnotdan has joined #racket
KindOne has quit [Ping timeout: 265 seconds]
KindOne has joined #racket
KindTwo has joined #racket
KindOne has quit [Ping timeout: 272 seconds]
KindTwo is now known as KindOne
aeth has quit [Read error: Connection reset by peer]
aeth has joined #racket
dddddd has quit [Ping timeout: 258 seconds]
dmiles has quit [Ping timeout: 240 seconds]
logicmoo has joined #racket
narimiran has joined #racket
ArthurStrong has joined #racket
lavaflow has quit [Ping timeout: 258 seconds]
lavaflow has joined #racket
ohama has quit [Ping timeout: 240 seconds]
ohama has joined #racket
pierpal has joined #racket
sauvin has joined #racket
sauvin has quit [Max SendQ exceeded]
sauvin has joined #racket
meimeix has quit [Ping timeout: 258 seconds]
pounce has quit [Ping timeout: 256 seconds]
endformationage has quit [Quit: WeeChat 2.6]
selimcan has joined #racket
selimcan has quit [Client Quit]
libertyprime has quit [Ping timeout: 260 seconds]
libertyprime has joined #racket
rgherdt has joined #racket
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #racket
corpix has quit [Remote host closed the connection]
corpix has joined #racket
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #racket
orivej_ has quit [Ping timeout: 256 seconds]
sword865 has joined #racket
Sgeo has quit [Read error: Connection reset by peer]
ridik has joined #racket
orivej has joined #racket
miskatonic has joined #racket
selimcan has joined #racket
ArthurStrong has quit [Ping timeout: 272 seconds]
TCZ has joined #racket
davidl has joined #racket
pierpal has quit [Remote host closed the connection]
revtintin has joined #racket
srandon111 has quit [Remote host closed the connection]
true-grue has joined #racket
dddddd has joined #racket
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
TCZ has quit [Quit: Leaving]
notzmv has quit [Ping timeout: 258 seconds]
`micro has quit [Ping timeout: 258 seconds]
`micro has joined #racket
aeth has quit [Ping timeout: 258 seconds]
aeth has joined #racket
<und-l-t-d[m]> greghendershott: re #:contsructor
<und-l-t-d[m]> (sorry, hit return to early)
<und-l-t-d[m]> re #:constructor-name: for me this is about a more general (newbie) problem I have - the confusion between the type name and instance names. So if I have a struct called point and I'm defining a specific point, I tend to call the binding `point` as well
<und-l-t-d[m]> and function argument names, like (define (is-within point rect) ...)
<und-l-t-d[m]> where the point argument would shadow the struct constructor name I guess
<und-l-t-d[m]> or it wouldn't?
<und-l-t-d[m]> so anyway, I find calling the constructor `make-point` more clear
laxask has quit [Ping timeout: 260 seconds]
<und-l-t-d[m]> but the docs say that `define-struct` is provided for backwards compatibility so I'm hesitant to use it
laxask has joined #racket
catonano has joined #racket
tfeb has joined #racket
selimcan has quit [Ping timeout: 246 seconds]
TCZ has joined #racket
selimcan has joined #racket
libertyprime has quit [Ping timeout: 256 seconds]
nikita` has joined #racket
stagboot has quit [Ping timeout: 260 seconds]
<greghendershott> und-l-t-d[m]: Well after `(struct foo ___)` I think you could add `(define make-foo foo)` and then use `make-foo` instead?
<greghendershott> Aside from that, I agree it can sometimes be confusing, is "point" the struct type or a variable that shadows it.
<greghendershott> The worst case is when you think you defined a var that shadows it, but you didn't, and at runtime learn that. :)
dustyweb has quit [Ping timeout: 260 seconds]
revtintin has quit [Quit: WeeChat 1.9.1]
<greghendershott> At times I've tried capitalizing struct names, e.g. "Point". Neither love nor hate that.
<greghendershott> Capitalizing does seem to be the convention for types in typed/racket.
endformationage has joined #racket
orivej has quit [Ping timeout: 246 seconds]
<und-l-t-d[m]> greghendershott: thanks, using `define` to add another binding didn't cross my mind.
nullcone has joined #racket
sword865 has quit [Quit: Connection closed for inactivity]
rgherdt has quit [Ping timeout: 272 seconds]
TCZ has quit [Quit: Leaving]
cantstanya has quit [Write error: Broken pipe]
corpix has quit [Read error: Connection reset by peer]
corpix has joined #racket
rgherdt has joined #racket
efm has quit [Quit: Konversation terminated!]
cantstanya has joined #racket
ArneBab has joined #racket
miskatonic has joined #racket
<dzoe> Anyone here using x64asm and xmm registers?
<dzoe> Or more generally - did anyone thought about making SIMD available in Racket?
nullcone has quit [Quit: Connection closed for inactivity]
Sgeo has joined #racket
nullcone has joined #racket
<selimcan> english, egnlish...
orivej has joined #racket
nebunez has joined #racket
<dzoe> Typing faster than thinking and changing the thought in the middle of a sentence ... yeah ...
sauvin has quit [Read error: Connection reset by peer]
tonyg has joined #racket
tfeb has quit [Remote host closed the connection]
tfeb has joined #racket
tfeb has quit [Remote host closed the connection]
tfeb has joined #racket
tfeb has quit [Client Quit]
selimcan has quit [Ping timeout: 258 seconds]
meimeix has joined #racket
pounce has joined #racket
KindTwo has joined #racket
KindOne has quit [Ping timeout: 272 seconds]
nebunez has quit [Remote host closed the connection]
KindTwo is now known as KindOne
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
orivej has quit [Ping timeout: 258 seconds]
selimcan has joined #racket
KindTwo has joined #racket
KindOne has quit [Ping timeout: 256 seconds]
KindTwo is now known as KindOne
<und-l-t-d[m]> I had no trouble parsing that sentence.
nullcone has quit [Quit: Connection closed for inactivity]
<und-l-t-d[m]> greghendershott: you have mentioned renaming the constructor when `provide`ing it - do you know if it is possible to combine it with `struct-out` in such a way to not have the original contructor provided too?
<dzoe> und-l-t-d[m]: combining filtered-out with struct-out does not work?
<dzoe> (Haven't tested it though ...)
davidl has quit [Read error: Connection reset by peer]
narimiran has quit [Quit: leaving]
<und-l-t-d[m]> combining with `except-out` seems to work: http://pasterack.org/pastes/56768
<und-l-t-d[m]> though it feels like I'm fighting the language trying to `patch` things over
<und-l-t-d[m]> Thinking from a different angle, if the default behavior of `struct` is to name the constructor the same way the type is called, this is what everyone will expect. So renaming the constructor would complicate things for other people reading the code later.
<greghendershott> I don't know if you're fighting the language, exactly?
<greghendershott> Sometimes "fighting" means "I need to repeat various ceremony to tweak things, and it's tedious". But Racket has macros for that. :)
<greghendershott> You have a good point about confusing your audience.
<greghendershott> Another idea would be just avoid shadowing struct type names with variable names. Change one or the other, as you prefer.
<greghendershott> Either struct types get capitalized ("Point") or whatever. Or, variable names are "the-point" or whatever.
<greghendershott> IIRC that was the original motivation for this -- the shadowing?
<und-l-t-d[m]> greghendershott: yes, shadowing was the pain point I was trying to work around.
_apg has joined #racket
rgherdt has quit [Ping timeout: 246 seconds]
davidl has joined #racket
selimcan has quit [Quit: Leaving]
davidl has quit [Client Quit]
davidl has joined #racket
lbeckman314 has joined #racket
ArthurStrong has joined #racket
libertyprime has joined #racket
pierpa has joined #racket
ArthurStrong has quit [Quit: leaving]
efm has joined #racket
true-grue has quit [Read error: Connection reset by peer]
efm has quit [Read error: Connection reset by peer]
orivej has joined #racket
efm has joined #racket
remexre has quit [Ping timeout: 246 seconds]
ridik has quit [Quit: Leaving]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #racket
efm has quit [Read error: Connection reset by peer]
efm has joined #racket