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!
thegeekinside has joined #racket
morte_ has joined #racket
morte_ has quit [Remote host closed the connection]
morte_ has joined #racket
morte_ has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
mono_ has joined #racket
koluacik_ has quit [Ping timeout: 245 seconds]
koluacik has joined #racket
Origin has quit [Ping timeout: 245 seconds]
mono_ has left #racket [ERC 5.4 (IRC client for GNU Emacs 28.2)]
hexagram has quit [Quit: WeeChat 3.5]
hexagram has joined #racket
szkl has quit [Quit: Connection closed for inactivity]
morte_ has joined #racket
morte_ has quit [Ping timeout: 246 seconds]
ecraven has quit [Server closed connection]
ecraven has joined #racket
m5zs7k has quit [Ping timeout: 245 seconds]
m5zs7k has joined #racket
m5zs7k has quit [Ping timeout: 240 seconds]
m5zs7k has joined #racket
shawnw has joined #racket
thegeekinside has quit [Ping timeout: 246 seconds]
Boarders___ has joined #racket
libertyprime has joined #racket
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #racket
notzmv has quit [Ping timeout: 245 seconds]
thegeekinside has joined #racket
libertyprime has quit [Ping timeout: 245 seconds]
thegeekinside has quit [Ping timeout: 245 seconds]
thegeekinside has joined #racket
libertyprime has joined #racket
thegeekinside has quit [Ping timeout: 246 seconds]
munksgaard has joined #racket
linj has joined #racket
skapata has quit [Remote host closed the connection]
libertyprime has quit [Quit: leaving]
wwalker has quit [Ping timeout: 250 seconds]
wwalker has joined #racket
lucasta has joined #racket
<Putonlalla> I have a style question. Suppose I implement a procedure for a data structure, which combines its contract and eliminator. Let us call it `break-ds?`. The intent is that, given some motive `prc` and some value `obj`, the procedure `break-ds?` either returns `#f` if `obj` is not an instance of `ds`, or calls `prc` on the fields of `obj` otherwise.
skeemer__ has quit [Remote host closed the connection]
<Putonlalla> The problem arises when the motive is boolean. If I want to be able to distinguish failure from a false result, I must either (1) write the contract of `break-ds?` to prohibit returning `#f`, forcing the user to sometimes box their motives, or (2) always box the result, forcing the user to always unbox successful results.
<Putonlalla> Which approach would you prefer?
jsoo has quit [Server closed connection]
<Putonlalla> Thinking outside the box (and, hence, `box`) by not writing these procedures in the first place is not possible, because they are derived from the corresponding inductive types.
jsoo has joined #racket
lucasta has quit [Quit: Leaving]
thegeekinside has joined #racket
mwnaylor has joined #racket
thegeekinside has quit [Ping timeout: 245 seconds]
<Putonlalla> As an example, for lists, these options would result in the contracts (1) `(let ((a (not/c #f))) (-> (-> a) (-> any/c list? a a) any/c (or/c #f a)))` and (2) `(let ((a any/c)) (-> (-> a) (-> any/c list? a a) any/c (or/c #f (box/c a))))`.
thegeekinside has joined #racket
morte_ has joined #racket
szkl has joined #racket
thegeekinside has quit [Ping timeout: 244 seconds]
mwnaylor has left #racket [ERC 5.4.1 (IRC client for GNU Emacs 30.0.50)]
skapata has joined #racket
szkl has quit [Quit: Connection closed for inactivity]
gcd has quit [Quit: leaving]
gcd has joined #racket
thegeekinside has joined #racket
skapata has quit [Remote host closed the connection]
codaraxis has joined #racket
skapata has joined #racket
Psybur has quit [Read error: Connection reset by peer]
codaraxis has quit [Quit: Leaving]
Tuplanolla has joined #racket
liberalartist has joined #racket
FreeFull has joined #racket
FreeFull has quit [Client Quit]
FreeFull has joined #racket
liberalartist has quit [Ping timeout: 240 seconds]
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
morte_ has quit [Remote host closed the connection]
codaraxis has joined #racket
libertyprime has joined #racket
m5zs7k has quit [Quit: m5zs7k]
morte_ has joined #racket
FreeFull has quit []
morte_ is now known as mono_