lexi-lambda changed the topic of #racket to: Racket v7.1 has been released: http://blog.racket-lang.org/2018/10/racket-v7-1.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
clacke[m] has quit [Remote host closed the connection]
peddie1 has quit [Remote host closed the connection]
Blackbeard has quit [Remote host closed the connection]
joebobjoe has quit [Client Quit]
clacke[m] has joined #racket
peddie has joined #racket
keep_learning has joined #racket
pie___ has joined #racket
pie__ has quit [Ping timeout: 264 seconds]
<greghendershott> hjek: The markdown renderer for scribble exists mainly because there was a time when the new package system didn't render docs automatically like the old PLaneT system.
<greghendershott> I submitted a PR to add export-as-markdown so you could at least put something in your e.g. GitHub README.md.
<hjek> nice. that would be neat
<greghendershott> It was an interim thing. It sucked, but not as badly as having no docs online. :)
<greghendershott> I think these days it's moot.
<hjek> oh, i see you're the creator of the racket markdown package!
<greghendershott> Also I just commented on your issue https://github.com/greghendershott/markdown/issues/77 :)
<hjek> cool
<hjek> ah great!
<greghendershott> Yes, but the scribble->markdown thing is separate. That's a very limited hacky subset of markdown to get some crude README docs.
<greghendershott> Please ignore it. :)
<hjek> thx for claryfing on github!
_whitelogger has joined #racket
jmiven has quit [Quit: co'o]
jcowan has joined #racket
jao has quit [Ping timeout: 252 seconds]
jao has joined #racket
acarrico has quit [Ping timeout: 240 seconds]
badkins has joined #racket
orivej has joined #racket
badkins has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
zmt00 has joined #racket
zmt00 is now known as zmt01
zmt01 is now known as zmt00
g00s has joined #racket
pie___ has quit [Remote host closed the connection]
pie_ has joined #racket
pie__ has joined #racket
pie_ has quit [Remote host closed the connection]
hjek has quit [Quit: Leaving.]
jao has quit [Ping timeout: 268 seconds]
libertyprime has quit [Ping timeout: 252 seconds]
Lowl3v3l has joined #racket
rnmhdn has joined #racket
rnmhdn has quit [Ping timeout: 268 seconds]
vraid has joined #racket
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
bor0 has joined #racket
bor0 has quit [Quit: Leaving]
lockywolf has joined #racket
lockywolf has quit [Ping timeout: 264 seconds]
lockywolf has joined #racket
orivej has quit [Ping timeout: 250 seconds]
bug2000 has quit [Ping timeout: 240 seconds]
bug2000 has joined #racket
zeeshanlakhani_ has joined #racket
lockywolf has quit [Ping timeout: 272 seconds]
sz0_ has joined #racket
lockywolf has joined #racket
ephemeron_ has joined #racket
peddie has quit [*.net *.split]
clacke[m] has quit [*.net *.split]
sz0 has quit [*.net *.split]
bartbes has quit [*.net *.split]
bremner has quit [*.net *.split]
ephemeron has quit [*.net *.split]
zeeshanlakhani has quit [*.net *.split]
ephemeron_ is now known as ephemeron
zeeshanlakhani_ is now known as zeeshanlakhani
sz0_ is now known as sz0
rnmhdn has joined #racket
bartbes has joined #racket
peddie has joined #racket
clacke[m] has joined #racket
lockywolf has quit [Ping timeout: 246 seconds]
lockywolf has joined #racket
dddddd has joined #racket
gour has joined #racket
ZombieChicken has quit [Ping timeout: 256 seconds]
ng0 has joined #racket
lockywolf has quit [Ping timeout: 268 seconds]
rnmhdn has quit [Ping timeout: 268 seconds]
rnmhdn has joined #racket
iyzsong has joined #racket
ubLIX has joined #racket
ski has quit [Ping timeout: 268 seconds]
ski has joined #racket
orivej has joined #racket
hjek has joined #racket
<dzoe> Anyone here using racket FFI bindings to hidapi?
<dzoe> I am sort of stuck with http://pasterack.org/pastes/91190 (after regular raco pkg install)
<dzoe> Looking at hidapi sources, nothing really catches my eye immediately.
<dzoe> (Linked package from latest git commit is the same)
acarrico has joined #racket
rnmhdn has quit [Ping timeout: 244 seconds]
<hjek> When using the Racket web server ( https://docs.racket-lang.org/web-server/run.html?q=http#%28part._.Full_.A.P.I%29 ), it is possible to set a "Cache-Control: max-age=" header on the static files served from it?
rnmhdn has joined #racket
pierpal has quit [Quit: Poof]
pierpal has joined #racket
confusedwanderer has joined #racket
rnmhdn has quit [Ping timeout: 245 seconds]
jao has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
acarrico has quit [Ping timeout: 252 seconds]
ubLIX has quit [Quit: ubLIX]
acarrico has joined #racket
rnmhdn has joined #racket
rnmhdn has quit [Ping timeout: 252 seconds]
iyzsong has quit [Ping timeout: 252 seconds]
ubLIX has joined #racket
rnmhdn has joined #racket
badkins has joined #racket
badkins_ has joined #racket
badkins has quit [Ping timeout: 250 seconds]
badkins_ has quit [Ping timeout: 264 seconds]
badkins has joined #racket
sleepnap has joined #racket
bremner has joined #racket
ng0 has quit [Remote host closed the connection]
ng0 has joined #racket
hjek has quit [Quit: Leaving.]
Lowl3v3l has quit [Quit: Leaving.]
YuGiOhJCJ has joined #racket
ubLIX has quit [Quit: ubLIX]
hjek has joined #racket
hjek has quit [Read error: Connection reset by peer]
dbmikus has joined #racket
dbmikus has quit [Client Quit]
dbmikus has joined #racket
ubLIX has joined #racket
rnmhdn has quit [Ping timeout: 260 seconds]
vraid has quit [Quit: Leaving]
lavaflow has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 272 seconds]
badkins has quit [Ping timeout: 246 seconds]
pera has joined #racket
dbmikus has quit [Read error: Connection reset by peer]
dbmikus_ has joined #racket
rnmhdn has joined #racket
badkins has joined #racket
YuGiOhJCJ has quit [Ping timeout: 256 seconds]
dbmikus_ has quit [Ping timeout: 245 seconds]
dbmikus_ has joined #racket
orivej has joined #racket
ng0 has quit [Quit: Alexa, when is the end of world?]
ng0 has joined #racket
lavaflow has joined #racket
vraid has joined #racket
sauvin has quit [Ping timeout: 250 seconds]
rnmhdn has quit [Ping timeout: 250 seconds]
rnmhdn has joined #racket
pera has quit [Ping timeout: 250 seconds]
rnmhdn has quit [Ping timeout: 250 seconds]
sleepnap has quit [Quit: Leaving.]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
orivej has quit [Ping timeout: 250 seconds]
rnmhdn has joined #racket
pierpal has quit [Quit: Poof]
pierpal has joined #racket
YuGiOhJCJ has joined #racket
buyfn has joined #racket
mahmudov has joined #racket
buyfn has quit [Client Quit]
pera has joined #racket
g00s has joined #racket
Fernando-Basso has joined #racket
keep_learning has quit [Remote host closed the connection]
rnmhdn has quit [Ping timeout: 268 seconds]
gour has quit [Quit: Konversation terminated!]
confusedwanderer has quit [Read error: Connection reset by peer]
<dzoe> But actually hid-enumerate definition seems to be to be incompatible with its contract.
<dzoe> The hid-open just looks ok.
<dzoe> Maybe I am overlooking something.
hjek has joined #racket
badkins has quit [Ping timeout: 268 seconds]
Yaargh has joined #racket
hjek has quit [Quit: Leaving.]
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
<Yaargh> trying to move a dot left or right via key events
<Yaargh> it runs fine but fails when I press a key: vector-ref: expects a vector as 1st argument, given (void)
ZombieChicken has joined #racket
<Yaargh> i cant see how the value is void
<Yaargh> appreciate any help
<lexi-lambda> vector-set! returns #<void>, and the on-key handler is supposed to return a new state.
<Yaargh> also i have zero programming experience
<Yaargh> why is it void?
<lexi-lambda> vector-set! performs an imperative update that modifies an existing vector. You might want to use vector-set instead of vector-set! to produce a new vector instead of modifying the old one.
<Yaargh> ahhh
<Yaargh> but still (vector-set! X/Y 0 (sub1 (vector-ref X/Y 0)))
<Yaargh> i dont see why this isnt just decrementing the value instead of returning void
<jcowan> It just happens to be defined that way. (It actually does return a value, but that value could be anything depending on the implementation.)
<jcowan> This is true of most update operations in Scheme.
<lexi-lambda> rudybot: init racket
<rudybot> lexi-lambda: your sandbox is ready
<lexi-lambda> rudybot: (define v (vector 1 2))
<rudybot> lexi-lambda: Done.
<lexi-lambda> rudybot: (vector-set! v 1 3)
<rudybot> lexi-lambda: Done.
<lexi-lambda> rudybot: v
<rudybot> lexi-lambda: ; Value: '#(1 3)
<aeth> On the other hand, basically every Scheme takes undefined literally and returns something like #<undefined> (or in Racket's case, #<void>)
<lexi-lambda> Apparently Racket doesn’t provide vector-set, only vector-set!.
<aeth> While in Scheme everything is an expression, not everything is meaningfully useful as an expression, which is unfortunate.
<Yaargh> lexi-lambda: was just looking in the reference for vector-set
<lexi-lambda> rudybot: eval (define (vector-set vec n v) (define vec* (vector-copy vec)) (vector-set! vec* n v) vec*)
<rudybot> lexi-lambda: Done.
<lexi-lambda> rudybot: eval (vector-set v 1 4)
<rudybot> lexi-lambda: ; Value: '#(1 4)
<lexi-lambda> rudybot: eval v
<rudybot> lexi-lambda: ; Value: '#(1 3)
<Yaargh> ok i am more confused now
<Yaargh> can i simply index the vector an mutate the value?
<lexi-lambda> big-bang is designed to be used in a pure way, without mutating the state.
<Yaargh> ah i see
<lexi-lambda> The idea is that each on-tick, on-key, etc. handler is supposed to return a new state.
<jcowan> (for the value returned by `(if #f #f)`
<Yaargh> ok i shall change to a more functional way
<lexi-lambda> Yaargh: If you wanted, you could probably just put (define (vector-set vec n v) (define vec* (vector-copy vec)) (vector-set! vec* n v) vec*) at the top of your program and change your vector-set! calls to vector-set, and things would likely work.
<Yaargh> in this case it is trivial but wouldnt a lot of vector copying be less performant?
<lexi-lambda> Yes. My guess is that is why Racket does not provide vector-set.
<Yaargh> alright thanks
<lexi-lambda> I have a pvector package that implements persistent vectors, which have an efficient functional set operation, but the package is maybe not ideal at the moment.
<lexi-lambda> With vectors of two elements the cost should be irrelevant, though.
<Yaargh> yeah
<Yaargh> i am on the first chapter of how to design programs
<Yaargh> am punching above my weight here
<Yaargh> i will just continue the book :)
<lexi-lambda> I think if you are using BSL, vectors are not even available. :)
<Yaargh> nope
<lexi-lambda> I think BSL has a posn struct that might work better for you here.
<Yaargh> oh cool
<Yaargh> thanks
<lexi-lambda> Maybe posn is only available in ISL, though, I’m not sure.
<lexi-lambda> Ah, it looks like it is in BSL: http://docs.racket-lang.org/htdp-langs/beginner.html#%28part._htdp-beginner._.Posns%29
<Yaargh> looks perfect!
<lexi-lambda> Yaargh: See also https://htdp.org/2018-01-06/Book/part_one.html#%28part._sec~3aposn-structures%29
<Yaargh> it was a case of "you don't know what you don't know"
<Yaargh> ha thats actually the chapter im reading but i hadnt got that far down yet
Yaargh has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sz0 has quit [Quit: Connection closed for inactivity]
badkins has joined #racket
mahmudov has quit [Ping timeout: 250 seconds]
<jcowan> It's odd that BSL has no vectors when it has everything else your basic Scheme has, plus structures.
<zenspider> why is that odd to you?
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
<jcowan> What is so special about vectors that they should be left out? Lists have more conceptual issues than vectors, not to mention worse terminology.
keep_learning has joined #racket
dbmikus_ has quit [Ping timeout: 240 seconds]
keep_learning has quit [Remote host closed the connection]