samth changed the topic of #racket to: Racket v7.6 has been released: https://blog.racket-lang.org/2020/02/racket-v7-6.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
pilne has joined #racket
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
iyzsong has joined #racket
catonano_ has joined #racket
catonano has quit [Ping timeout: 240 seconds]
catonano_ is now known as catonano
bitmapper has quit [Ping timeout: 265 seconds]
dddddd has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Leaving]
bremner has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 256 seconds]
ermo has quit [Quit: ZNC 1.7.5 - https://znc.in]
ermo has joined #racket
nullcone has quit [Quit: Connection closed for inactivity]
orivej has joined #racket
pilne has quit [Quit: Tis but a scratch]
ermo has quit [Ping timeout: 246 seconds]
ermo has joined #racket
nan` has joined #racket
nan`_ has quit [Ping timeout: 244 seconds]
rudybot has quit [Ping timeout: 260 seconds]
rudybot has joined #racket
nullcone has joined #racket
dmiles has quit [Read error: Connection reset by peer]
logicmoo has joined #racket
YuGiOhJCJ has joined #racket
zmt00 has joined #racket
badkins has joined #racket
zmt01 has quit [Ping timeout: 240 seconds]
badkins has quit [Ping timeout: 260 seconds]
narimiran has joined #racket
KindOne has quit [Quit: K-Lined]
nan` has quit [Ping timeout: 240 seconds]
KindOne has joined #racket
orivej has quit [Ping timeout: 260 seconds]
logicmoo is now known as dmiles
brianacid has joined #racket
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
badkins has joined #racket
rgherdt has joined #racket
badkins has quit [Ping timeout: 260 seconds]
davidl has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
aidalgol has quit [Quit: br(e)b(ooting)]
aidalgol has joined #racket
juanfra_ has quit [Quit: killed]
olavx200 has quit [Quit: killed]
sciamano has quit [Quit: killed]
BitPuffin has quit [Quit: killed]
und-l-t-d[m] has quit [Quit: killed]
und-l-t-d[m] has joined #racket
orivej has joined #racket
olavx200 has joined #racket
BitPuffin has joined #racket
juanfra_ has joined #racket
sciamano has joined #racket
nullcone has quit [Quit: Connection closed for inactivity]
badkins has joined #racket
badkins has quit [Ping timeout: 246 seconds]
dddddd has joined #racket
TCZ has joined #racket
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
tilpner has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
NinjaTrappeur has quit [Quit: WeeChat 2.7]
corpix has joined #racket
corpix_ has quit [Remote host closed the connection]
sagax has quit [Read error: Connection reset by peer]
corpix_ has joined #racket
corpix has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
corpix_ has quit [Remote host closed the connection]
corpix has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
true-grue has joined #racket
iyzsong has quit [Ping timeout: 240 seconds]
badkins has joined #racket
orivej has quit [Ping timeout: 246 seconds]
TCZ has quit [Quit: Leaving]
orivej has joined #racket
emacsomancer has quit [Read error: Connection reset by peer]
emacsomancer has joined #racket
bitmapper has joined #racket
olivuser has joined #racket
<olivuser> hello #racket. May I ask for help with a HTDP exercise which I simply cant wrap my head around?
<narimiran> olivuser: don't ask a permision to ask. just ask. ;)
<olivuser> @narimiran, thanks :) so I'm actually quite early in the book, Part I, exercise 45 (where you have to move the cat from left to right repeatedly)
<olivuser> what I dont understand is this: with big-bang, you have a render which is re-rendered as the clock ticks, with a position that is altered through a tick-function
<olivuser> I figured that when I want to have the cat re-appear to the left, I need to test whether the current position is smaller than the canvas width. As long as pos is smaller, proceed as normal (place-image CAT pos Y-CAT BACKGROUND). But, as soon as pos is bigger, re-set pos to 0 (place-image CAT 0 Y-CAT BACKGROUND)
<olivuser> I did this with an "if"-expression (if smaller, then normal; else pos=0). However, when "else" is triggered, the cat is set to pos 0, but the animation stops - even though it appears as though the ticking continues.
<olivuser> Why does the animation stop?
<olivuser> Does the order of the "big-bang"-clauses matter?
<narimiran> "You may wish to read up on the modulo function."
<olivuser> @narimiran, yeah, I did read up on it. But for some reason I have no clue at all(!) how this would help me
<narimiran> have in mind that i didn't solve those exercises nor do i exactly know how the remaining of your program works:
<narimiran> position should always increase by 3 pixels, right?
<olivuser> yes
<narimiran> and when it reaches some value (right edge) it should reappear on the left?
<olivuser> yes
<narimiran> ok, so in an attempt to spoil as little as possible: how do you calculate a new position?
<olivuser> adding 3 to t0 in order t receive the pos-value at t1
<olivuser> rephrase: adding 3 to the pos-value at t0 in order to obtain the pos-value at t1
<narimiran> ok
<narimiran> so pos is 0, 3, 6, 9, 12, 15, ....
<narimiran> let's say that right edge is at 10
badkins has quit [Remote host closed the connection]
<narimiran> how do you wrap around? can you use `modulo` for that?
badkins has joined #racket
<olivuser> if (modulo 10 3) = 1, then
<narimiran> not quite....
<narimiran> (the sequence should be: 0, 3, 6, 9, 2, 5, 8, 1, 4, 7, 0, 3, ....)
<olivuser> so its like when it goes above 10, remove 10 and restart (9+3=12-10=2;8+3=11-10=1, ...)
<narimiran> ok, we're getting closer :)
<narimiran> once again: can you use `modulo` for that? :)
<olivuser> actually I wouldnt know why modulo would help in that case, because a conditional could work just without modulo
<olivuser> let me check wiki in parallel, maybe its a translation-related issue (I'm german reading the english book and sucking at math)
<narimiran> what if "clock tick" is at value 63?
badkins has quit [Ping timeout: 260 seconds]
<narimiran> if you just do 63-10, you're way right of your right-limit at 10
<olivuser> yeah, but modulo does simply tell me how much is left when I divide "number a" by "number b". And in the case of a "clock tick"-value of 63, the modulo value would be the same as in the case of a "clock tick"-value of 33.
<olivuser> that is, I dont know how using modulo relates to setting a "rightmost" limit to how far a "pos"-value can go
<narimiran> try `(modulo 63 10)`, it is not 33
<olivuser> yeah I know, but (modulo 63 10) and (modulo 33 1) both yield 3
<narimiran> yes
<narimiran> so you can calculate your new position by always taking a modulo of it and right-limit)
<narimiran> another example where modulo is useful: say you woke up at 10 o'clock, and then 45 hours pass. can you tell me what time is now? (and we both know it is not 55 o'clock :))
<olivuser> okay I think I know where this is going. If I may I might come back to you in a moment
<narimiran> :)
<olivuser> I die. So this is the solution!? I literally experimented for like an hour with if and cond stuff wondering why it wouldnt work
<olivuser> @narimiran, thanks a bunch. I didnt get that if x is smaller than y, it just outputs x, and that it, like, folds the result
<narimiran> you're welcome :)
<olivuser> man, theres a bunch of friendly people here on irc! I might come back when I have a stupid problem to solve the next time ;-)
olivuser has quit [Quit: Leaving]
badkins has joined #racket
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
efm has quit [Ping timeout: 246 seconds]
tlcu has joined #racket
KDr21 has joined #racket
KDr2 has quit [Ping timeout: 260 seconds]
nan` has joined #racket
badkins has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 246 seconds]
ArthurStrong has joined #racket
nan` has quit [Ping timeout: 246 seconds]
SGASAU has quit [Remote host closed the connection]
jcowan has joined #racket
<jcowan> Can someone explain the term "contracted values" to me? I see that they have something to do with contracts, but I don't understand the term itself.
<jcowan> It seems to be used once per document, without definition or explanation
sagax has joined #racket
<samth> jcowan: it's a value that has had a contract applied to it
<jcowan> You told me a while back that these were instances of identifer-syntax: is that because the contract is applied each time the variable holding the value is referenced?
<samth> for functions with contracts on them, when they are used the source location for when they're used is used as part of the contract for the error message
izh_ has joined #racket
<jcowan> Ah, thanks.
<jcowan> I'm having a discussion about whether identifier-syntax should go into R7RS-large
<jcowan> so use cases like the ones you gave me are helpful
<ecraven> identifier-syntax is syntax is non-call-position, right?
<ecraven> somehow this still feels weird to me ;)
efm has joined #racket
tlcu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
efm has quit [Ping timeout: 246 seconds]
wingsorc has joined #racket
<jcowan> To me as well. Of course it would be tasteless to use this for something complex or hard to evaluate: it should be strictly an abbreviation. But for example it can be used to implement immutable variables, something Scheme doesn't have explicitly.
<samth> jcowan: it's necessary to make macro-based implementation truly transparent
dddddd_ has joined #racket
orivej has joined #racket
Sgeo__ has quit [Read error: Connection reset by peer]
<samth> another example -- keyword-argument functions in Racket are implemented as macros, so that when you use them directly with the correct keywords it calls the underlying function directly without keyword parsing overhead
<samth> but you can't do that transparently without identifier syntax
sz0 has quit [Quit: Connection closed for inactivity]
dddddd has quit [Ping timeout: 246 seconds]
<samth> because obviously functions can be used in both first-order and higher-order ways
dddddd__ has joined #racket
dddddd_ has quit [Ping timeout: 264 seconds]
<jcowan> I know about keyword-apply, but how do procedure-with-keywords arguments work?
<jcowan> that is, higher-order?
tlcu has joined #racket
<samth> what do you mean
<samth> you can write (lambda (f) (f #:x 1))
<jcowan> That's a direct call. I mean, in CL you can pass a keyword function as an argument and invoke it with FUNCALL.
Sgeo has joined #racket
<samth> that's not a direct call
<samth> ( is funcall
<samth> jcowan: this quote "Note that Racket converts all variable references and function calls to use magic macros, so the syntax is truly uniform. " doesn't seem right to me
<samth> also, "since R7RS-small was never intended to be a successor of R6RS" is ridiculous
dddddd__ is now known as dddddd
badkins has joined #racket
<lavaflow> what's the difference between (kill-thread th) and (break-thread th 'terminate) ?
<lavaflow> both end the execution of that thread, right? kill-thread doesn't seem to send a break:terminate, but is there other differences?
aidalgol has quit [Remote host closed the connection]
<lavaflow> the documentation on this doesn't seem clear to me
<samth> lavaflow: threads can react to breaks, but not to being killed
<lavaflow> ah okay, so I can't catch a kill-thread
<lavaflow> I didn't see a way but I wasn't sure
<samth> right
<lavaflow> cool, thanks!
denis__ has joined #racket
izh_ has quit [Ping timeout: 246 seconds]
<jcowan> samth: What's ridiculous about it?
<samth> jcowan: you can tell it's a successor because of the 7 in the name
<erkin> haha
<jcowan> Edward VIII was not a successor of Edward VII, though he postdated him
<samth> he was A successor, however, and had be been the immediately-following king he would have been THE succesor
aeth has quit [Quit: Reconnecting]
aeth has joined #racket
KindOne has quit [Ping timeout: 256 seconds]
<samth> I realize that many people involved in the r7rs process would like to pretend various things about it, but the rest of us don't have to go along
denis__ has quit [Quit: Leaving]
KindOne has joined #racket
selimcan has joined #racket
pilne has joined #racket
narimiran has quit [Ping timeout: 260 seconds]
<jcowan> On the other hand, you are not in a position to say what our intentions were.
badkins_ has joined #racket
TCZ has joined #racket
badkins_ has quit [Client Quit]
badkins has quit [Ping timeout: 260 seconds]
<aeth> they should have gone with the name r{5+i}rs instead.
erkin has quit [*.net *.split]
erkin has joined #racket
catonano has quit [Remote host closed the connection]
<jcowan> It's true that R7RS is not the Revised R6RS, and indeed I argued against this name in favor of designing our own (but retaining "Scheme" in it), but tradition prevailed.
<jcowan> Names of the form "X Scheme" are common for implementations, so it would have to have some other form. Date-based names are common for other languages, but given our slow progress they would be an embarrassment.
<aeth> R7RS could have been Scheme 13 and R7RS-large would be Scheme 13B
<aeth> You'd be setting yourself up for a potential problem with the year 2048, though
<jcowan> We had no way of knowing in advance that 13 would be relevant, though.
<jcowan> As Riastradh says, R7RS is done when someone puts in a toothpick and it comes out clean.
aidalgol has joined #racket
<bremner> sounds like a lou reed song
<bremner> not really, sounds like cooking metaphor, but reminds me a of a lou reed song
<jcowan> Sounds like my mother to me
SGASAU has joined #racket
<selimcan> Programming language names should be designed not by piling a qualifier on top of qualifier, but by removing the weaknesses and restrictions that make additional qualifiers appear necessary.
<lavaflow> e.g. "perl 6" -> "raku" ?
badkins has joined #racket
<tlcu> yeah the raku thing just baffles me
<winny> i've heard from peers they don't want to learn raku because it's not perl 6 anymore (it's that trivial to some prospective learners)
<tlcu> I did some testing of it last weekend and it was very slow, and in that respect killed one of the positives of perl for me personally.
selimcan has quit [Read error: Connection reset by peer]
dddddd has quit [Quit: dddddd]
true-grue has quit [Read error: Connection reset by peer]
<FreeFull> Give your programming language a really appealing name, like Rust or Cobol
badkins has quit [Remote host closed the connection]
<tlcu> Scheme and Racket certainly did improve on Lisp in at least this regard
<FreeFull> "Scheme" and "Racket" sound criminal
<FreeFull> Especially Racket
badkins has joined #racket
badkins has quit [Remote host closed the connection]
<aeth> Ugh, the worst thing about "Perl 6" -> "Raku" is now that name's taken so they can't do "R7RS" -> "Raku"
<aeth> The Racket implementation, of course, would be Racku
badkins has joined #racket
TCZ has quit [Quit: Leaving]
badkins has quit [Ping timeout: 256 seconds]
tlcu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
badkins has joined #racket
TCZ has joined #racket
rgherdt has quit [Ping timeout: 272 seconds]