samth changed the topic of #racket to: Racket v7.3 has been released: https://blog.racket-lang.org/2019/05/racket-v7-3.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
ym555 has joined #racket
Fernando-Basso has quit [Remote host closed the connection]
selimcan has joined #racket
soegaard has quit [Quit: soegaard]
nckx has quit [Quit: Updating my GNU Guix System <https://guix.info>]
nckx has joined #racket
lockywolf_ has quit [Ping timeout: 272 seconds]
pera has quit [Ping timeout: 246 seconds]
ym555 has quit [Ping timeout: 248 seconds]
cpup has joined #racket
nisstyre has quit [Changing host]
nisstyre has joined #racket
ym555 has joined #racket
caltelt_ has joined #racket
selimcan has quit [Ping timeout: 272 seconds]
libertyprime has quit [Quit: leaving]
danderso1 is now known as danderson
lockywolf has joined #racket
lockywolf_ has joined #racket
keep_learning_M has joined #racket
lockywolf has quit [Ping timeout: 246 seconds]
acarrico has quit [Ping timeout: 244 seconds]
FreeFull has quit []
efm has joined #racket
ym555_ has joined #racket
orivej has quit [Ping timeout: 258 seconds]
ym555 has quit [Ping timeout: 244 seconds]
Guest62345 has quit [Remote host closed the connection]
lockywolf_ has quit [Read error: Connection reset by peer]
lockywolf_ has joined #racket
jao has joined #racket
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 248 seconds]
meepdeew has joined #racket
Sgeo__ has quit [Read error: Connection reset by peer]
Sgeo has joined #racket
dddddd has quit [Remote host closed the connection]
jao has quit [Ping timeout: 248 seconds]
meepdeew has quit [Remote host closed the connection]
notzmv has joined #racket
caltelt has quit [Ping timeout: 244 seconds]
lockywolf__ has quit [Ping timeout: 245 seconds]
orivej has joined #racket
pera has joined #racket
lockywolf has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Read error: Connection reset by peer]
lockywolf_ has quit [Remote host closed the connection]
<ZombieChicken> Is there a built-in testing system in Racket? Or do I need to install something like Overeasy?
<ZombieChicken> or something similar?
<clacke_movim> ZombieChicken: https://docs.racket-lang.org/rackunit/
<ZombieChicken> ty
Arcaelyx has quit [Ping timeout: 258 seconds]
caltelt_ has quit [Ping timeout: 259 seconds]
lockywolf has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Remote host closed the connection]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket
lockywolf__ has joined #racket
pera has quit [Quit: leaving]
lockywolf_ has quit [Ping timeout: 245 seconds]
sleepnap has joined #racket
sauvin has joined #racket
sleepnap has left #racket [#racket]
_whitelogger has joined #racket
lockywolf__ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #racket
endformationage has quit [Ping timeout: 258 seconds]
Sgeo_ has joined #racket
Sgeo_ has quit [Read error: Connection reset by peer]
<ZombieChicken> Is there a way to put rackunit test into the same file as the code it's testing?
<winny> yes :) (module+ test ...)
<winny> that way, they only run when you use raco test
<ZombieChicken> Oh good. ty
Sgeo has quit [Ping timeout: 272 seconds]
<winny> concrete examples
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
Arcaelyx has joined #racket
ym555 has joined #racket
ym555_ has quit [Ping timeout: 258 seconds]
<ZombieChicken> ty
Sgeo has joined #racket
Sgeo_ has joined #racket
Sgeo has quit [Ping timeout: 272 seconds]
badkins has joined #racket
BSLANG` has quit [Ping timeout: 250 seconds]
BSLANG has joined #racket
badkins_ has quit [Ping timeout: 250 seconds]
jsomedon has joined #racket
<jsomedon> why does racket have three equality check: eq?, eqv? and equal?
<jsomedon> how are they different with each other
Sgeo__ has joined #racket
jsomedon has quit [Quit: jsomedon]
Sgeo_ has quit [Ping timeout: 248 seconds]
soegaard has joined #racket
_whitelogger has joined #racket
zipper has joined #racket
ZombieChicken has quit [Quit: Have a nice day]
mSSM has joined #racket
orivej has quit [Ping timeout: 245 seconds]
<tonyg> jsomedon: eq? checks pointer equality. it's there for pragmatic reasons. eqv? is a leftover from scheme. equal? checks deep structural equality and is what you usually should use
pierpal has joined #racket
zipper has quit [Ping timeout: 248 seconds]
manualcrank has quit [Quit: WeeChat 1.9.1]
zipper has joined #racket
zipper has quit [Client Quit]
clacke_movim has left #racket [#racket]
soegaard has quit [Quit: soegaard]
clacke_movim has joined #racket
keep_learning_M has quit [Quit: This computer has gone to sleep]
soegaard has joined #racket
zipper has joined #racket
soegaard has quit [Quit: soegaard]
soegaard has joined #racket
clacke_movim has left #racket [#racket]
Roargh has joined #racket
jcowan has quit [Quit: Connection closed for inactivity]
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
clacke_movim has joined #racket
zipper has quit [Ping timeout: 248 seconds]
zipper has joined #racket
zipper has quit [Ping timeout: 244 seconds]
zipper has joined #racket
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
soegaard has quit [Quit: soegaard]
ubLIX has joined #racket
acarrico has joined #racket
jao has joined #racket
zipper has quit [Ping timeout: 246 seconds]
davidl has joined #racket
zipper has joined #racket
jao has quit [Ping timeout: 248 seconds]
<clacke_movim> "Pragmatic reasons" sounds a bit dismissive. Object identity is a core concept in any language that allows mutation.
dddddd has joined #racket
<tonyg> clacke_movim: exactly :)
<clacke_movim> Hehe
<tonyg> clacke_movim: but crucially, eq? can tell apart different immutable allocations
<tonyg> it's not a sensible equivalence at the level of racket - only at the level of the racket implementation
<tonyg> if you see what i mean
<tonyg> it's a grungy performance hack that always bites you in the arse
<tonyg> also, racket gets identity of mutable data slightly wrong imo.
<clacke_movim> Aha?
<tonyg> i'd like to have equal? distinguish non-eq? boxes
<tonyg> that is, have equal? be Baker's egal
<clacke_movim> Why would you want equal? to distinguish non-eq? things when you have eq? for that?
<tonyg> because eq? can't identify equal? things
<tonyg> so currently (equal? (list 1 (box 0)) (list 1 (box 0)))
<tonyg> but I want that to be false
<clacke_movim> ... but they're equal
<tonyg> however, I want (let ((b (box 0))) (equal? (list 1 b) (list 1 b))) to be true
<tonyg> clacke_movim: they're `equal?` but not `egal`
<clacke_movim> going to have to find this Baker fellow and talk some sense into him
<tonyg> haha :)
zipper has quit [Ping timeout: 272 seconds]
<clacke_movim> https://www.clojure.org/guides/equality mentions him
<clacke_movim> Ok will read these two, thanks
<clacke_movim> "The More Things Change, The More They Are the Same"
<clacke_movim> Well put, I can see where this is going
<tonyg> :)
zipper has joined #racket
<tonyg> (wow that's a clever way of putting it. i hadn't reflected on that phrasing before now)
<tonyg> "In the next section, we argue that neither EQ nor EQUAL is wrong; EQ is correct for mutable cons cells and EQUAL is correct for immutable cons cells. The major mistake of Lisp is in not distinguishing the two kinds of cons cells based on their mutability."
<tonyg> I should say, there was some situation recently where I had some sympathy for the way Racket does it, but it eludes my recall at present
<clacke_movim> I've been fascinated by battling my preconceived notions of data and identity while playing with Tcl
<clacke_movim> They have fascinating workarounds for their lack of object identity.
<tonyg> http://pasterack.org/pastes/89285 <-- consequence of Racket's approach to equal? and mutability
<tonyg> clacke_movim: cool! I've never spent much time with Tcl
<clacke_movim> My intuitive side: But that's just a stupid number!
<clacke_movim> My dispassionate side: You know, so is a pointer.
<clacke_movim> It just feels wrong in the gut to have human-readable identities like "widget23".
soegaard has joined #racket
zipper has quit [Ping timeout: 245 seconds]
<clacke_movim> That pasterack: Right. An equal?-hash should just refuse mutable keys, like the dictionaries of some languages do.
<clacke_movim> Python is one example.
zipper has joined #racket
_whitelogger has joined #racket
<tonyg> It's moot, of course, until Racket 3000
soegaard has quit [Quit: soegaard]
soegaard has joined #racket
zipper has quit [Ping timeout: 258 seconds]
zipper has joined #racket
rubic88 has joined #racket
raoul1 has joined #racket
Sgeo_ has joined #racket
orivej has joined #racket
mSSM has quit [Quit: WeeChat 2.4]
Sgeo__ has quit [Ping timeout: 245 seconds]
DGASAU has quit [Read error: Connection reset by peer]
<erkin> Is there a procedure that takes a list and returns all its elements as values?
<erkin> Oh, I guess (apply values lst) works.
zipper has quit [Ping timeout: 258 seconds]
zipper has joined #racket
ym555 has quit [Quit: leaving...]
zipper has quit [Ping timeout: 248 seconds]
soegaard has quit [Quit: soegaard]
soegaard has joined #racket
endformationage has joined #racket
lavaflow has quit [Ping timeout: 268 seconds]
DGASAU has joined #racket
lavaflow has joined #racket
sleepnap has joined #racket
soegaard has quit [Quit: soegaard]
sleepnap has quit [Ping timeout: 245 seconds]
efm has quit [Remote host closed the connection]
efm has joined #racket
pfdietz has quit [Ping timeout: 256 seconds]
rubic has joined #racket
rubic88 has quit [Ping timeout: 246 seconds]
englishm has quit [Excess Flood]
englishm has joined #racket
sleepnap has joined #racket
lavaflow has quit [Ping timeout: 244 seconds]
casaca has quit [Ping timeout: 246 seconds]
dan_f has joined #racket
casaca has joined #racket
dimitarvp has joined #racket
efm has quit [Read error: Connection reset by peer]
jao has joined #racket
jao is now known as Guest33310
dimitarvp has quit [Client Quit]
soegaard has joined #racket
sleepnap has quit [Ping timeout: 258 seconds]
soegaard has quit [Client Quit]
kd7ixo has quit [Quit: leaving]
kd7ixo has joined #racket
pierpal has quit [Ping timeout: 258 seconds]
dimitarvp has joined #racket
Guest33310 is now known as jao
lavaflow has joined #racket
dimitarvp has quit [Quit: Bye]
Roargh has quit [Quit: Leaving]
cpup has quit [Quit: Breaking stuff]
acarrico has quit [Ping timeout: 245 seconds]
acarrico has joined #racket
sleepnap has joined #racket
<greghendershott> An `egal?` for Racket written mostly by technomancy https://github.com/greghendershott/rackjure/blob/master/rackjure/egal.rkt
<greghendershott> To riff on Alan Perlis: "If you have a language with a half dozen equality operators, you probably missed some." :)
<technomancy> eh; if you think need more than egal and eq I would be worried you're going off the deep end
pera has joined #racket
<bremner> Do I have to read that paper to understand what egal is?
<technomancy> you don't have to but it's such a good paper that it'd be a shame to miss out on it
<bremner> I'll wait for the tweet
<technomancy> egal? is just "is there no way these two things could behave in a different way from each other, other than possibly eq?"
<bremner> sounds hard.
<technomancy> (well, with false negatives)
<technomancy> because Halting Problem
<bremner> ack
<technomancy> if you know of a predicate that can tell that (lambda (x y) (+ x y)) will always behave the same as (lambda (x y) (+ (* x 2) (* y 2) (- x) (- y))) that'd be a neat trick
cpup has joined #racket
ym555 has joined #racket
sleepnap has quit [Ping timeout: 272 seconds]
acarrico has quit [Ping timeout: 248 seconds]
pera has quit [Ping timeout: 272 seconds]
casaca has quit [Ping timeout: 245 seconds]
dan_f has quit [Quit: dan_f]
dan_f has joined #racket
dan_f has quit [Client Quit]
casaca has joined #racket
dan_f has joined #racket
<J_Arcane> when I did the object system in Heresy, i was genuinely surprised how complicated a concept "equality" actually is when you break it down to what's expected
<J_Arcane> I always thought it's weird that Lisps had so many kinds of equality predicates, but what I realized is it's because most other languages just ... punt on most of the questions
<bremner> pointer equality ought to be good enough for everyone
pera has joined #racket
<J_Arcane> in the end I kinda punted too, and things are checked with `equal?` because that seemed like it most fit what a user coming from non-Lisps might expect. *shrug*
<bremner> I managaged to get through 1.3 semesters of teaching with racket only using equal?
<J_Arcane> (well, actually they're hashed with `equal-hash-code`, and the hash is stored in the object and then compared when comparing objects)
<bremner> I think it was only when writing a little GC simulator I needed eq?
<bremner> someone else had a reasonable example of needing eq? when last the topic arose, but of course I forgot.
<J_Arcane> yeah. I think eq? is probably useful when you're doing something low-level. Heresy doesn't really aim to do that so it didn't seem needed
<J_Arcane> bremner: use in a GC tracks since you're essentially checking memory locations. another thought that pops in my mind is implementing new data structures, you might want to check for `eq?` as an optimisation maybe?
<J_Arcane> "Don't bother doing <thing> to these two values if they're already the same". Or maybe even "don't do <mutating thing> to x if it's eq? to y"
<bremner> checking for cyclic data structures maybe?
johnjay has quit [Ping timeout: 258 seconds]
<J_Arcane> yeah, that's a good thought
<bremner> looking back at my lectures I see I did use eq? for symbols a few places, but that probably just introduced confusion.
dan_f has quit [Quit: dan_f]
johnjay has joined #racket
iclon_ has joined #racket
ym555 has quit [Ping timeout: 258 seconds]
iclon__ has quit [Ping timeout: 272 seconds]
FreeFull has joined #racket
dan_f has joined #racket
manualcrank has joined #racket
johnjay has quit [Read error: Connection reset by peer]
selimcan has joined #racket
pera has quit [Ping timeout: 268 seconds]
johnjay has joined #racket
sauvin has quit [Ping timeout: 258 seconds]
johnjay has quit [Read error: Connection reset by peer]
acarrico has joined #racket
johnjay has joined #racket
vraid has joined #racket
johnjay has quit [Excess Flood]
johnjay has joined #racket
ubLIX has quit [Quit: ubLIX]
pera_ has joined #racket
dan_f has quit [Quit: dan_f]
FreeFull has quit []
FreeFull has joined #racket
johnjay has quit [Read error: Connection reset by peer]
pera_ has quit [Ping timeout: 246 seconds]
johnjay has joined #racket
johnjay has quit [Read error: Connection reset by peer]
johnjay has joined #racket
pera_ has joined #racket
johnjay has quit [Read error: Connection reset by peer]
johnjay has joined #racket
Sgeo__ has joined #racket
Sgeo_ has quit [Ping timeout: 244 seconds]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket
<samth> technomancy: I think sometimes (eg testing) you want equal? instead of egal?
jsomedon has joined #racket
Sgeo__ has quit [Read error: Connection reset by peer]
jsomedon has quit [Client Quit]
Sgeo__ has joined #racket
pera_ has quit [Ping timeout: 258 seconds]
Sgeo_ has joined #racket
nckx has quit [Quit: Updating my GNU Guix System <https://guix.gnu.org>]
nckx has joined #racket
Sgeo__ has quit [Ping timeout: 248 seconds]
johnjay has quit [Read error: Connection reset by peer]
efm has joined #racket
Sgeo__ has joined #racket
johnjay has joined #racket
<technomancy> samth: well... depends on whether you consider "working with mutable data structures" to be "going off the deep end" I guess
Sgeo_ has quit [Ping timeout: 272 seconds]
lavaflow has quit [Ping timeout: 244 seconds]
evdubs has quit [Remote host closed the connection]
evdubs has joined #racket
lavaflow has joined #racket
pera has joined #racket
rubic has quit [Remote host closed the connection]
selimcan has quit [Remote host closed the connection]
moldybits has quit [Ping timeout: 258 seconds]
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #racket
moldybits has joined #racket
ZombieChicken has joined #racket
caltelt has joined #racket
YuGiOhJCJ has quit [Ping timeout: 256 seconds]
johnjay has quit [Read error: Connection reset by peer]
johnjay has joined #racket
moldybits has quit [Quit: WeeChat 2.4]
vraid has quit [Ping timeout: 252 seconds]
acarrico has quit [Ping timeout: 272 seconds]
dan_f has joined #racket
dan_f has quit [Client Quit]
cromyr has joined #racket