Re: [racket-users] lexer-parser approach in Racket [was the list of languages made with racket [Hacker News]]

2019-02-28 Thread Aidan Gauland
On 24/02/19 12:08 PM, Matthias Felleisen wrote: > 2. The means of implementation in Racket are radically different from a > lexer-parser approach. Wait, does this mean that the /Beautiful Racket/ book is leading me down the wrong path?  I'm in the middle of the bf chapter

Re: [racket-users] how to use union types

2019-02-28 Thread Ben Greenman
On 2/28/19, Brian Craft wrote: > So, when working with large data that is internal to an app, where schema > is guaranteed by serialization, there's no way to load that without another > O(N) pass to satisfy the type checker? Right. This is how the type checker helps find & prevent bugs. There's

Re: [racket-users] how to use union types

2019-02-28 Thread jackhfirth
There is, but it's called "wrap your data in a struct". The type checker doesn't know that serialization guarantees your schema, and you haven't proved that *only* previously-serialized data will be constructed. In order to represent this knowledge with types, you can create a struct wrapper in

Re: [racket-users] how to use union types

2019-02-28 Thread Brian Craft
So, when working with large data that is internal to an app, where schema is guaranteed by serialization, there's no way to load that without another O(N) pass to satisfy the type checker? On Thursday, February 28, 2019 at 1:03:48 PM UTC-8, Sam Tobin-Hochstadt wrote: > > Yes, a cast to a List

Re: [racket-users] how to use union types

2019-02-28 Thread Sam Tobin-Hochstadt
Yes, a cast to a List type checks all the elements of the list. There's no way to tell if every element of list is a string in less than O(N) time -- that information just isn't available anywhere. Sam On Thu, Feb 28, 2019 at 3:52 PM Brian Craft wrote: > > Really? A cast is also O(N)? > > On Thu

Re: [racket-users] how to use union types

2019-02-28 Thread Brian Craft
Really? A cast is also O(N)? On Thursday, February 28, 2019 at 11:11:01 AM UTC-8, Sam Tobin-Hochstadt wrote: > > Any of these solutions need a O(N) traversal of the data. That's > because we need to do a full traversal to be sure we got an actual > (Listof String) from read-json -- there's no w

Re: [racket-users] performance, json

2019-02-28 Thread Brian Craft
I added some type annotations & tried it. The result is 16s, substantially slower. Haven't tried tjson, yet. I'm not actually even that interested in json, it was just something at-hand to try. >From this thread, it sounds like there's some knowledge about racket performance that isn't yet in

Re: [racket-users] how to use union types

2019-02-28 Thread Sam Tobin-Hochstadt
Any of these solutions need a O(N) traversal of the data. That's because we need to do a full traversal to be sure we got an actual (Listof String) from read-json -- there's no way around it. Sam On Thu, Feb 28, 2019 at 2:04 PM Brian Craft wrote: > > I would think there'd be a large performance

Re: [racket-users] how to use union types

2019-02-28 Thread Brian Craft
I would think there'd be a large performance issue, as well, due to needing an O(N) walk of the data. I'm having type checker issues with (time), so haven't tested it, but maybe (cast) will get me past those. Thanks! On Monday, February 25, 2019 at 4:26:52 PM UTC-8, Philip McGrath wrote: > > An

Re: [racket-users] type annotation example

2019-02-28 Thread Brian Craft
It was just random. I'd installed it previously & lost track of how long it had been. On Wednesday, February 27, 2019 at 7:44:24 PM UTC-8, Sam Tobin-Hochstadt wrote: > > Brian, > Since this has turned out to be relevant for other reasons, can you > say how you ended up using version 6.0? Was i

Re: [racket-users] the list of languages made with racket [Hacker News]

2019-02-28 Thread Stephen De Gabrielle
I've made a PR with a draft 'languages' page for the site. I have created a curated list of languages in pr #89 that has some example languages to show the flexibility of Racket with respect to Syntax, semantics, ffi, and targets (javascript, assembler, html) It is a first draft so I'm hoping for

Re: [racket-users] Re: Recording of conference talk: Make your own language with Racket FOSDEM19

2019-02-28 Thread Stephen De Gabrielle
Thanks Jérôme, Much appreciated! https://github.com/euhmeuh/web-galaxy looks good - I'm checking it out now! kind regards, Stephen On Tue, Feb 26, 2019 at 9:15 AM Jérôme Martin wrote: > It was my first talk so some things are off (I'm planning to correct them > when the youtube video is up).

Re: [racket-users] R6RS history

2019-02-28 Thread Matthias Felleisen
> On Feb 27, 2019, at 1:42 PM, Arthur Nunes-Harwitt wrote: > > Dear Matthias, > > Would you be willing to share your thoughts about the history of > denotational versus operational semantics in the report? [[ This is probably totally off topic for the list. ]] Denotational semantics emer