
Reminder: The European Lisp Symposium 2020 is now live. https://www.twitch.tv/elsconf

Whats your project?

Hello, is there something like a Planet Racket I can subscribe to via RSS / Atom / etc ?

Not yet. I haven’t made a feed for http://racket-stories.com\|racket-stories.com yet.

There is a feed for Planet Scheme though.

looks great! I would be happy to help and/or subscribe

The source is available on Github if you feel an itch to improve something.


Yes.

thanks will take a look

Most new blogs aren’t on Planet Scheme. Maybe they don’t know that they can get on it my sending me an email.


The tutorial that eventually turned into Racket Stories is here: https://github.com/soegaard/web-tutorial

That’s easier to get up and running.

Does anyone know where I could find the text or a recording keynote ‘Multilingual Component Programming in Racket’ by MT ?

The slides are here: https://felleisen.org/matthias/Presentations/11GPCE/gpce11.pdf, it’s very unlikely there’s anything else to find.

@greg how do I set up completions in racket-xp-mode?

In general I’ve been thinking of using “shells” for many things so just having a quick REPL type thing for prototyping is nice.

I got it working yesterday with <100 LOC (mostly just finding the right mixins in framework) connecting to a simple minecraft RCON running some commands.

I used to us MH for reading my email and a Racket backed MH with a nice gui shell is something I’m pondering now.

Thank you. I posted the acmdl pdf on r/reddit and only realised it was an abstract and an series of references today.

I’m not sure what you mean by “set up”?
The completion candidates are found automatically whenever racket-xp-annotate
is run (either automatically after you pause editing, or if you manually invoke it.)
To actually do completion, does M-x completion-at-point
(usually bound to C-M-i
) work for you? If so, do you mean you’d like that to be bound to a different key, or use company-mode
, or $OTHER?

I do manual completion, with it set to TAB
using a setting I can explain.

Some people like auto completion, usually with company-mode these days.

Ok, I will look into company-mode — do I have to do something to set it up with racket-xp-mode?

Whats MH?

Do you use use-package
?

I just installed it with install-package

and what is a minecraft RCON?

I was jsut curious before. Now I have to know!

OK, well my use-package
config is https://github.com/greghendershott/.emacs.d/blob/master/init.el#L240-L250. But I think mainly you just need something like global-company-mode
to turn it on everywhere in emacs. Or, add a call to company-mode
in your racket-mode-hook
and racket-repl-mode-hook
for just those.

But there’s no special glue to make company-mode work with Racket Mode’s completion. it should “just work” automatically.

It sounds like you are attaching a repl to anythign oyu can find an api for>

?

Which is brilliant, BTW.

TL;DR it’s just the usual enabling a mode or not, stuff, for company-mode. No other magic to make it work with Racket Mode.

Do you already understand how/why? If not, can you give me a small example how to break?

It breaks it because racket-mode now (transitively) depends on TR, so starting racket-mode fails

I think it’s because drracket/check-syntax transitively depends on TR

maybe because the blueboxes code is typed

Oh. :disappointed:

to see it in action, go to the typed-racket/main.rkt and add an extra (

If you disable racket-xp-mode
, it might still work enough for you to do editing until you fix TR?

Because I think Racket Mode’s back end lazy-require’s drracket/check-syntax and won’t demand it until racket-xp-mode does.

Haha.

(And if that’s false, it’s probably accidentally so and I could make it true, again.)

MH is/was a mail user agent that used a small set of shell commands to read your mail and manipulate mailboxes


And minecraft?

RCON is a very simple protocol for sending command and getting responses

It’s on a lot of game servers. So I wrote the protocol bit and hooked it to a minecraft server my kids are using

that one just reads a line and sends the command to the server

is it for admin? So you can kick them off the server at bedtime?

yeah or give the items etc.

liek spawners etc

Just hooking the protocol to a pl allows scripting out stuff etc.

Nice.

I’d love to see a demo

adn look at your code?

Yeah, I’m going to clean it up to essentials and put it up on github.

Nice

@c has joined the channel

Forgive the screenshot. The docs are not online yet. Before I keep working on the package showing this example, I wanted to know if someone else already put out a library that uses hashes in this way.

So it is a struct-like interface to hash-tables?

Yes.

Clojure is used that way

Is a splay tree used anywhere?

No, but a thesaurus was.

:wink:

also I think you can define records to really be various kinds of data in Common Lisp, but I don’t know if hashes are one of the kinds

I’d better look it “splay” up - I have never heard it used besides the phrase “splay tree”.

Yeah, sorry. I was looking for a word that indicated struct fields were scattered over a source.

I would suggest using a syntax more like struct
, ie (splayed-struct editorial (title summary))

Sounds good, thanks @samth. Does Racket have an equivalent to how CL approaches records?

no, but it would be nice to

Btw: “hierarchical”

I always mess that one up.

Same with “received”

So a “splayed structure” is neither a splay tree nor a structure :slightly_smiling_face:

Correct. Open to a new name.

Does “non-hierarchical” mean that you can’t store other splayed structures in a splayed structure?

No, I was meaning that you could not specify a super-id
. My use case was made more complicated by inheritance.

I’m working on a plugin system of sorts where a user can decorate a singular value with groups of data. This library came from that.

So “non-hierarchical” is an implementation choice and not a conceptual limitation?

From how I read your question, that sounds correct. I felt what I was doing was niche enough that expanding it too much would make it an annoying reinvention of structs.

That’s fair.

And to answer your original question: I can’t remember seeing a similar library.

Thanks much. The CL record stuff sounded interesting. If this plays out well and time permits I might be able to offer something there.

Is hash-subset
too broad, or a misuse of the term? As in, (hash-subset news (title summary))

Maybe even subhash

hash-struct ?

That works too. I’ll chew on this a bit. As always, naming things takes longer than making them work. :smile:

Yeah, naming is hard.

I think this phrasing is easier to justify. Thanks @soegaard2 and @samth @title{Define Private Keys in a Hash using a Struct-Like Interface}
Given a hash table, this library gives you a @racket[struct]-like
interface for uninterned symbol keys.
@racketblock[
(require hash-partitions)
(hash-partition editorial (title summary))
(provide (hash-partition-out editorial
[title string?]
[summary (or/c #f string?)]))