Post Aqnuh1B9PgNKxOpsfo by dpk@chaos.social
(DIR) More posts by dpk@chaos.social
(DIR) Post #Aqnuh1B9PgNKxOpsfo by dpk@chaos.social
2025-02-03T08:00:00Z
0 likes, 0 repeats
I currently have one of those bugs that I tell people doesn’t happen in Scheme because of monomorphism … unfortunately, some things aren’t monomorphic enough :-((And yes, static typing would probably have caught the cause – as-yet unidentified – before it ever happened at run time. Sigh)
(DIR) Post #Aqnuh2MX0r4aczAU3E by dpk@chaos.social
2025-02-03T08:38:57Z
0 likes, 0 repeats
Okay, found and fixed.Getting *so close* to being ready to submit the pattern matcher SRFI now!
(DIR) Post #Aqnuh3LrKq85hBrSds by kakafarm@shitposter.world
2025-02-05T09:28:04.196947Z
0 likes, 1 repeats
@dpk I wanted to ask you what was it. O_O
(DIR) Post #AqoC4jt53JbLV1HRoG by dpk@chaos.social
2025-02-05T10:22:12Z
0 likes, 0 repeats
@kakafarm The bug? I was constructing a record based on a list. There’s a special case for a singleton list that should construct a different record type A with the item from that list; lists of more than one item go into record type B. But in the special case, I forgot to actually pull the item out from the list, and instead constructed record type A with its field being the list itself, not the item from the list. So other procedures saw a list of α when they expected just an α.
(DIR) Post #AqoC4l1GqLkN0i7VDM by dpk@chaos.social
2025-02-05T10:23:15Z
0 likes, 0 repeats
@kakafarm Eventually this would have been caught by my test coverage checking with Meze, but I hadn’t run that yet, and my test data just happened not to tickle that special case yet.More monomorphism (type checks on record field values) would have helped because, once the special case code ran, the error would have been reported at its origin, not when some other procedure found data of a type it didn’t like.A static type checker would have immediately noticed the issue before even then.
(DIR) Post #AqoC4mEQKvrWlnHWM4 by kakafarm@shitposter.world
2025-02-05T12:42:51.644926Z
0 likes, 1 repeats
@dpk Thank you!