samth changed the topic of #racket to: Racket v7.8 has been released: https://blog.racket-lang.org/2020/08/racket-v7-8.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
aeth has quit [Ping timeout: 256 seconds]
aeth has joined #racket
Fare has quit [Ping timeout: 260 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
cantstanya has joined #racket
tilpner_ has joined #racket
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #racket
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #racket
iamevn has quit [Read error: Connection reset by peer]
Fare has joined #racket
Fare has quit [Ping timeout: 260 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
fredmanglis has joined #racket
_whitelogger has joined #racket
bocaneri is now known as Sauvin
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
mirrorbird has joined #racket
orivej has joined #racket
Fare has joined #racket
Fare has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #racket
vejetaryenvampir has quit [Quit: vejetaryenvampir]
vejetaryenvampir has joined #racket
_whitelogger has joined #racket
vejetaryenvampir has quit [Quit: vejetaryenvampir]
vejetaryenvampir has joined #racket
orivej has quit [Ping timeout: 260 seconds]
true-grue has joined #racket
phillbush has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 264 seconds]
mirrorbird has quit [Quit: Leaving]
Sgeo has quit [Read error: Connection reset by peer]
orivej has joined #racket
selimcan has quit [Read error: Connection reset by peer]
srandon111 has quit [Quit: leaving]
badkins has joined #racket
badkins has quit [Ping timeout: 272 seconds]
dddddd_ has joined #racket
dddddd has quit [Ping timeout: 264 seconds]
dddddd_ is now known as dddddd
mirrorbird has joined #racket
badkins has joined #racket
TCZ has joined #racket
badkins has quit [Ping timeout: 240 seconds]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
laxask has quit [Ping timeout: 246 seconds]
badkins has quit [Ping timeout: 260 seconds]
laxask has joined #racket
davidl has joined #racket
davidl has quit [Read error: Connection reset by peer]
davidl has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Leaving]
laxask is now known as sudden
countvajhula has joined #racket
<countvajhula> greghendershott: makes sense, I thought it might be something like that. I appreciate your input!
TCZ has joined #racket
<bremner> is there a better match pattern for a single number than (? number? x)
badkins has joined #racket
srandon111 has joined #racket
badkins has quit [Ping timeout: 240 seconds]
FreeFull has joined #racket
<greghendershott> bremner: I'd use that for any old single number. Better, how? More concise? More precise?
<greghendershott> I mean for instance flat contracts are predicate functions you could supply for a ? match pattern instead of number?
<bremner> I guess I was wondering if I was missing some common idiom
<bremner> but I guess not? yeah, I just want any old number , it's for a calculator demo
<greghendershott> You could use, say, (? natural-number/c x) or even (? (and/c natural-number/c (between/c 13 42))
<greghendershott> I'm not sure if (ab?)using flat contracts like that is idiomatic
<greghendershott> If you want to DRY some frequent match pattern, probably define-match-expander is better? idk
<greghendershott> bremner: If it's a simple calculator demo then something like (define x (get-input)) (unless (number? x) (show-error ___)) would also be idiomatic. Maybe even clearer. Depends on audience and context.
<greghendershott> I like match and tend to use it "consistently" even for simple cases, but, for some audiences or projects that might not be best.
<bremner> yeah, I'm trying to demo match
<greghendershott> Ah. Well then. :)
<bremner> lies, damn lies, and requests for help :P
<dzoe> Gosh... there really is no way to struct*-doc only what has been added to base struct?
<dzoe> I mean with (struct S1 (a b c)) (struct S2 S1 (d e)), I have to struct*-doc all fields again for S2 and I cannot reuse S1 struct*-doc.
<dzoe> That's kind of strange.
<dzoe> But going for classes in this simple case seems like an overkill :-/
countvajhula has quit [Ping timeout: 244 seconds]
<greghendershott> dzoe: I've seen docs like that for the `exn` tree where the derived structs deliberately don't do that. Instead user can click the super struct name in the doc, to see its fields.
<greghendershott> https://docs.racket-lang.org/reference/exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29
<greghendershott> The idea being "link don't repeat"?
<greghendershott> I think for that example it makes sense?
<greghendershott> But I can imagine you have an example where you'd prefer the docs to recapitulate those field docs over and over for each derived struct.
dustyweb has joined #racket
phillbush has quit [Quit: Leaving]
badkins has joined #racket
phillbush has joined #racket
<dzoe> greghendershott: that is exactly what I want, but apparently I am using struct*-doc the wrong way. I'll dig deeper into the documentation.
<dzoe> Link, don't repeat - that's what I want.
<dzoe> ./pkgs/racket-doc/scribblings/reference/exns.scrbl uses defstruct
<dzoe> I am blind... (id super-id) that's it, not id super-id.
<mirrorbird> in drracket, how can i turn "\lambda" into an actual lambda character?
<mirrorbird> don't understand this keybinding "C-\ M-\ c:x;l "
<mirrorbird> ctrl-alt- c x l all at the same time?
<mirrorbird> oh, ctrl backslash is faster
<dzoe> In emacs' racket-mode c-m-y works, but apparently in DrRacket (even with emacs keybindings) it does not.
vejetaryenvampir has quit [Quit: vejetaryenvampir]
<greghendershott> dzoe: Yeah it looks like struct*-doc and struct-doc correspond to struct and define-struct, which have the different way of specifying an optional super struct.
<greghendershott> And yet both struct doc forms just mention "struct-name", so you'd need to notice the distinction and dig into the struct or define-struct docs to notice.
<greghendershott> So that's unfortunate. :( Glad you figured it out!
vejetaryenvampir has joined #racket
<dzoe> Oh, how I wish you were right ;-)
<dzoe> It's way worse than that.
<dzoe> Looking at ./scribblings/reference/contracts.scrbl shows that it works as it should, however, looking at struct*-doc transformer shows that for provide part of its job it just transforms to contract-out.
<dzoe> And https://docs.racket-lang.org/reference/attaching-contracts-to-values.html?q=contract-out#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._contract-out%29%29 tells us the big picture.
<dzoe> id/ignored and really if it has the form of (id super-id), it means (id ignored-id).
<dzoe> So the contract-out does not care about super structs.
countvajhula has joined #racket
TCZ has quit [Quit: Leaving]
<dzoe> And actually the documentation for contract-out states that pretty clearly.
<dzoe> So it is "link *and* repeat" at best.
<dzoe> As I really like srcdoc.
<countvajhula> i've been noticing some error messages / stack traces in my `raco setup` output lately, since the upgrade to 7.8 CS
<countvajhula>
<countvajhula> should I report these somewhere in case they are CS related?
<countvajhula> since these errors indicate files like `7.8/pkgs/ansi/ansi/private/<something>.rkt`, i tried `raco pkg install ansi` and that claims such a package was already installed and took no action
<countvajhula> it doesn't seem to be causing any problems with actually running any code afaict, but i'm happy to report it somewhere in case anyone thinks that'd be a good idea
narimiran has joined #racket
countvajhula has quit [Ping timeout: 260 seconds]
davidl has quit [Ping timeout: 264 seconds]
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
Sgeo has joined #racket
badkins has joined #racket
Fare has joined #racket
dustyweb has quit [Remote host closed the connection]
endformationage has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 272 seconds]
badkins has joined #racket
Batzy has joined #racket
badkins has quit [Ping timeout: 258 seconds]
badkins has joined #racket
srandon111 has quit [Quit: leaving]
narimiran has quit [Ping timeout: 258 seconds]
mirrorbird has quit [Ping timeout: 272 seconds]
epony has quit [Remote host closed the connection]
epony has joined #racket
TCZ has joined #racket
Fare has quit [Ping timeout: 260 seconds]
true-grue has quit [Read error: Connection reset by peer]
badkins has quit [Remote host closed the connection]
FreeFull has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Leaving]
FreeFull has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 272 seconds]
Fare has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 258 seconds]
sagax has quit [Ping timeout: 272 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
FreeFull has quit [Read error: Connection reset by peer]
phillbush has quit [Quit: Leaving]
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #racket