New week, new Racket! What are you folks up to?

67 views
Skip to first unread message

Stephen De Gabrielle

unread,
Apr 19, 2020, 1:04:18 PM4/19/20
to Racket Users
New week, new Racket! What are you folks up to? 

Answer here or on 
- Tweet @racketlang on Twitter 
- Racket discord https://discord.gg/6Zq8sH5 

Don’t forget to sign up for, and contribute to Racket News at https://racket-news.com/ AND submit your links to Racket Stories https://racket-stories.com/

Kind regards, 

Stephen



Ryan Kramer

unread,
Apr 21, 2020, 11:06:40 PM4/21/20
to Racket Users
I'm finally finishing up a major overhaul of Plisqin, my alternative to SQL. I don't think I will consider it "stable" just yet, but it is getting much closer. The biggest new feature is a type system that prevents the three-valued logic mistakes that are too easy to make in SQL. I also hope to write better documentation this time around thanks to a better example database. (I've ported the AdventureWorks schema and some of the data to SQLite.)

I also think I can add basic Typed Racket support pretty easily. If I know the names and types of each column that a query will produce, I can expose this to Typed Racket as, for example:

(: get-users (-> DbConnection
                 (Sequenceof (Object (field [first-name String]
                                            [last-name String]
                                            [age Number])))))

Will this actually be useful? I'm not sure, but at this point it doesn't seem like much more work than the untyped version. I'd welcome advice here. Is "fields vs methods" worth thinking about? Or maybe Object isn't the best type to use. But Object seems like the best way to get structural-ish typing, which is probably better than (Sequenceof get-users-result) or something like that.

Hendrik Boom

unread,
Apr 22, 2020, 11:33:50 AM4/22/20
to Racket Users, Hendrik Boom
On Sun, Apr 19, 2020 at 10:04:18AM -0700, Stephen De Gabrielle wrote:
> New week, new Racket! What are you folks up to?

# Related to Racket

## Working on the OpenGl binding.

Still wrestling with Khronos's new XML specification for OpenGL.
I have a somewhat confusing parser that processes sxml's output;

The parser nees at least three representations for types: XML expressione,
ctypes for the ffi, and Racket types for the documentation (and, peresumably
someday, for the typed-Racket binding for OpenGL.)

I'm changing the parser from Racket to Typed Racket, gaining much clarity in
the code.

## But Typed Racket brings its own problems.

For example, take a list of type (Listof Foo).
Check if it in null.
In the branch where it's not null, the tyechecker now knows the list
is of type (Pair Foo (Listof Foo))

Undersome circumstances (which aren't quite clear to me) operations take an
argument of type (Listof Foo) don't seem to recognise that a
(Pair Foo (Listof Foo)) is also of type (Listof Foo)

IIRC, map is on of these operations.

And why can't Typed Racket error messages contain a line number? In DrRacket
it means I can easily fix one error per run. Although the error areas get
attention-getting pink backgrounds, they aren't in the same order as the error
messages, and all pink the backgrounds disappear as soon as I start to fix
the first error.

* Unrelated to Racket.

I spent a weekend on LudumDare, not managing to produce a game, but
ending up with a rudimentary terrain generator with rivers, written in
Javascript mbedded in HTML. See https://github.com/hendrikboom3/LudumDare46
for source code; http://topoi.pooq.com/hendrik/ld46/game.html to see a map
being generated.

I've also enjoyed attending math seminars all over the world; COVID-19 has
forced then to go online and that means they're easy for me to go to.

-- hendrik

John Clements

unread,
Apr 22, 2020, 11:39:45 AM4/22/20
to Stephen De Gabrielle, Racket Users
Alongside everything else, I started exploring writing code to post GraphQL queries (specifically in order to interact with Canvas). The language’s syntax is yet another needlessly complicated approximation to s-expressions, but I do have some things working. Not sure if I should put together a CRAPL-licensed starter kit as a package.

John Clements
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/07e9a208-c896-46e1-8a7e-9a94bceda393%40googlegroups.com.



Reply all
Reply to author
Forward
0 new messages