@markx I recently wrote a lib that behaves a bit like GTK (with horizontal and vertical boxes as layout) based on charterm
, but it’s not in its own library yet (https://github.com/euhmeuh/virtual-mpu/tree/master/private/emulator/gui). I think @jeapostrophe has something too (https://github.com/jeapostrophe/raart).
I’m planning to get my lib out of its parent project and give it a name. Sample usage: https://github.com/euhmeuh/virtual-mpu/blob/master/private/emulator/terminal.rkt#L107
(on the top of the file you can see mockups of what it looks like when rendered in a terminal)
(except charterm does not support UTF–8 yet so I fall back to +=\|-
characters for now)
@robby Do you have any insights into this: https://github.com/racket/datalog/issues/9#issuecomment-398369738 I have racket-mode finding/using 'drracket:submit-predicate
as well as making sure to load configure-runtime
s so that e.g. current-read-interaction
is set for a lang. However my first test case is datalog/lang, and “it works” but not really. I don’t understand what’s going on with EOF. I suppose the TL;DR is if you jump to the last comment: https://github.com/racket/datalog/issues/9#issuecomment-407765972
I saw the GitHub mention but haven’t had time to investigate yet, sorry. :(
OK no worries. I’ve been working on this a couple days and have all the pieces in my head now — so wanted to ping in case you had time to look now. But totally understand if you can’t. It’s not urgent. If I know you can’t look at it soon, I can at least find another lang example to work with for awhile.
@robby I have some questions about contracts defined using late-neg-projection when you get a moment (I know you just got back, so no rush). (1) Are projections defined with late-neg-projection guaranteed to be supplied a blame object with a missing party, or are they expected to always check blame-missing-party?
to conditionally apply blame-add-missing-party
? (2) Likewise, for projections that defer to other contracts’ projections, what should be passed to the sub-contracts’ projections if the sub-contracts aren’t known until the value (and thus the missing party) has already been supplied? Put another way, if I have a contract combinator with dependent-like behavior, where the sub-contracts aren’t known until the value is known, then it seems silly to pass a blame object with a missing party to the sub-contract given that I already have the missing party.
The are not guaranteed not expected to check. You pass the party you got to others (it may be #f)
Ah, so does (blame-add-missing-party b #f)
not signal an error if b
is not missing a party?
Don’t call that
Just always pass on the missing part
Y
Oh, I see… raise-blame-error
takes a missing party argument. I thought I needed to add the missing party before calling raise-blame-error
, but I guess not.
Right you don’t!
Okay, thank you!
I thought the kidney meant pain as in a kidney stone.
But that was just a guess.
oh I like that too
@lexi.lambda Ah, good catch. It looks like its a problem with the test. I’ll push a fix.
why doesn’t TR match work with occurrence typing? I expected this to type check: #lang typed/racket
(struct foo ())
(: f (-> (U foo String) Void))
(define (f x)
(match x
[(foo)
(void)]
[str
(void (string-append str str))]))
but it says str
has type (U foo String)
in the second branch
@ben because match
doesn’t compile to the code that you’re imagining
I think I should open an issue for this. Max tried to write a program a few minutes ago, thought he had a problem with equi-recursive types, but really it was just a problem with match & occurrence typing https://twitter.com/maxsnew/status/1022210296138661888
(but idk how I’d try to fix this)
I don’t think opening an issue would be helpful — that’s how match
works because of how the compilation scheme for patterns works, and fixing it would involve rewriting match
maybe this is an indication that how match
works is a bad design (although I think other options also have significant drawbacks) but I don’t think a issue is useful
@samth You know your compilation of Matthew top-level-is-hopeless links? I think the time is coming when someone needs to do that for you explaining match
and Typed Racket. :slightly_smiling_face:
it isn’t as fundamental as the problems with the top-level
links would be helpful
before I came here, Max & I quickly tried looking for documentation about match + OT
but you’d probably have to give up =>
I know and I’m not saying match or TR are hopeless. I’ve just seen you answer this a lot, including at least once or twice from me. :slightly_smiling_face:
@ben a documentation entry in the limitations section for TR would be useful
@greg no, I mean that the hopelessness of the toplevel is a fact about the top level as an idea, whereas this is just a fact about particular decisions in match and TR
I know you didn’t mean to suggest anything about TR
@maxsnew has joined the channel
where’s this top-level-is-hopeless compilation?
heh. “compilation”
anyone here going to ICFP?