00:06
greghendershott has joined #racket
00:24
sagax has quit [Quit: Konversation terminated!]
00:29
rj_ has joined #racket
01:02
juanfra_ has quit [Ping timeout: 256 seconds]
01:04
juanfra has joined #racket
01:05
dhil has quit [Ping timeout: 240 seconds]
01:11
Diagon has joined #racket
01:15
rj_ has quit [Ping timeout: 240 seconds]
01:19
Diagon has left #racket ["Leaving"]
02:11
endobson has joined #racket
02:14
evdubs_ has joined #racket
02:16
evdubs has quit [Ping timeout: 264 seconds]
02:51
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:06
endobson has joined #racket
03:37
Fare has quit [Ping timeout: 264 seconds]
03:44
Fare has joined #racket
03:46
aaaaaa has quit [Ping timeout: 240 seconds]
03:54
evdubs_ is now known as evdubs
04:13
nullcone has joined #racket
04:18
lfanew has joined #racket
04:33
Fare has quit [Ping timeout: 264 seconds]
04:46
narimiran has joined #racket
04:47
rmnull has joined #racket
04:49
endformationage has quit [Quit: WeeChat 2.9]
04:57
srandon111 has joined #racket
05:06
rmnull has quit [Quit: WeeChat 3.0]
05:08
fredmanglis has joined #racket
05:37
greghendershott has quit [Quit: Connection closed for inactivity]
05:47
dan_f has joined #racket
06:03
dmiles has quit [Ping timeout: 240 seconds]
06:20
phillbush has quit [Quit: Leaving]
06:48
sagax has joined #racket
06:59
andreyorst` has joined #racket
07:18
bitmapper has quit [Quit: Connection closed for inactivity]
07:21
dan_f has quit [Quit: dan_f]
07:21
dan_f has joined #racket
07:21
dan_f has quit [Client Quit]
07:28
andreyorst` has quit [Quit: andreyorst`]
07:29
andreyorst` has joined #racket
07:38
orivej has joined #racket
07:47
gpanders has quit [Ping timeout: 256 seconds]
07:48
gpanders has joined #racket
07:50
libertyprime has joined #racket
07:59
lfanew has quit [Remote host closed the connection]
08:02
nullcone has quit [Quit: Connection closed for inactivity]
08:13
Sgeo has quit [Read error: Connection reset by peer]
08:37
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:42
srandon111 has quit [Ping timeout: 260 seconds]
08:43
<
yurb >
Hi everyone. I'm trying to write a macro that will define two functions (with syntax-parse)
08:44
<
yurb >
I'm getting "begin (possibly implicit): no expression after a sequence of internal definitions"
08:47
<
yurb >
I'm missing something very basic
08:50
endobson has joined #racket
08:54
<
yurb >
i.e., doing (the-first) in REPL errors with ; the-first: undefined;
08:58
<
yurb >
In DrRacket's macro stepper I see it's being transformed to `(begin (define (the-first) 1) (define (the-second) 2)`
09:00
<
yurb >
* In DrRacket's macro stepper I see it's being transformed to `(begin (define (the-first) 1) (define (the-second) 2))`
09:11
aaaaaa has joined #racket
09:25
fredmanglis has quit [Ping timeout: 260 seconds]
09:33
DGASAU has joined #racket
09:54
fredmanglis has joined #racket
09:56
dmiles has joined #racket
10:00
thallada has quit [Quit: WeeChat 2.4]
10:10
<
dzoe >
yurb: either you have to make your macro a bit unhygienic or pass on the function names (that way you keep it hygienic)
10:14
<
dzoe >
samth: did the pasterack's notify function ever ... functioned? ;)
10:14
<
dzoe >
(don't know who else to ask, it's either you or I assume you know who is in charge there)
10:23
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:26
aaaaaa has quit [Ping timeout: 256 seconds]
11:03
<
yurb >
dzoe: thanks a lot!
11:03
ridik has joined #racket
11:05
phillbush has joined #racket
11:07
<
yurb >
Another (philosophical?) question - is there something like `dict-ref` (or python's `getattr`) for struct?
11:07
<
yurb >
For polymorphic access of struct fields
11:08
<
yurb >
Also iteration on struct fields in the form similar to (for ([(k v) (in-hash ...)]) ...)
11:08
<
yurb >
...where I would get the field name and value
11:13
<
yurb >
Currently I'm tempted to implement something like (struct model (fields data)) where the data would be a simple hash
11:21
<
yurb >
Or more generally, I know there is some metadata stored about structs, but I'm don't understand how to access it (like list of field names?) file:///nix/store/ap2i3mlrqbxgjn8qvls9dv11kkq4havp-racket-7.8/share/doc/racket/reference/structinfo.html?q=structure%20type
11:25
dhil has joined #racket
12:20
<
dzoe >
yurb: you can access the struct elements using their index number and you should be able to get the index number - but I would have to look it up
12:23
libertyprime has quit [Remote host closed the connection]
12:31
jnb has joined #racket
13:12
<
yurb >
Get the index number knowing the field name? Can you give me a hint where to look for that?
13:34
Fare has joined #racket
13:36
notzmv has quit [Ping timeout: 265 seconds]
13:59
TCZ has joined #racket
14:06
sagax has quit [Read error: Connection reset by peer]
14:21
caente has joined #racket
14:22
orivej has quit [Ping timeout: 256 seconds]
14:24
<
samth >
dzoe: pasterack is by stchang, who I don't think is on irc these days
14:25
<
samth >
yurb: dzoe: no, there's no way to treat structs as dictionaries. in some cases, you could use reflection, but the field names are not available at runtime at all
14:41
<
dzoe >
Ah, you are right, te struct-field-index is syntax only within struct form... OTOH it should be fairly easy to wrap struct form into some generic definition, that stores the map between symbols and indices for later use.
14:49
<
dzoe >
samth: Well, some introspection is available using define-namespace-anchor, namespace-anchor->namespace, namespace-symbols and some further trickery.
14:51
<
dzoe >
Trouble is that you need the struct definition at least somewhere. If you just get an opaque value, no reflection for you.
14:59
<
yurb >
I think I should use hashes more often than structs probably
15:08
Sgeo has joined #racket
15:10
notzmv has joined #racket
16:12
endformationage has joined #racket
16:20
bitmapper has joined #racket
16:27
orivej has joined #racket
16:35
andreyorst` has quit [Quit: andreyorst`]
16:38
andreyorst has joined #racket
16:43
sagax has joined #racket
16:44
narimiran has quit [Ping timeout: 256 seconds]
16:46
narimiran has joined #racket
17:22
endobson has joined #racket
17:43
Mrbuck has joined #racket
18:06
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:06
TCZ has quit [Remote host closed the connection]
18:55
aaaaaa has joined #racket
19:11
ben_m has joined #racket
19:31
aeth_ has joined #racket
19:31
aeth has quit [Disconnected by services]
19:32
aeth_ is now known as aeth
19:53
TCZ has joined #racket
20:07
andreyorst has quit [Ping timeout: 260 seconds]
20:21
phillbush has quit [Quit: Leaving]
20:32
ArneBab has joined #racket
20:33
narimiran has quit [Ping timeout: 256 seconds]
20:38
nullcone has joined #racket
21:28
aeth has quit [Ping timeout: 246 seconds]
21:30
aeth has joined #racket
21:33
ArneBab has quit [Remote host closed the connection]
21:37
Blkt has quit [Ping timeout: 272 seconds]
21:40
Blkt has joined #racket
21:54
dustyweb has joined #racket
21:59
Mrbuck has quit [Quit: WeeChat 2.9]
22:01
ridik has quit [Quit: Leaving]
22:08
ermo has joined #racket
22:16
aeth_ has joined #racket
22:16
aeth has quit [Disconnected by services]
22:16
aeth_ is now known as aeth
22:24
sagax has quit [Remote host closed the connection]
22:30
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
23:26
phillbush has joined #racket
23:52
dhil has quit [Ping timeout: 272 seconds]