Stream: show and tell

Topic: draft blog post about purity inference


view this post on Zulip Richard Feldman (Jan 06 2025 at 05:02):

Here's a first draft of a blog post announcing purity inference:

https://gist.github.com/rtfeldman/ac6e3a6da7714b9f8d03e50865403637

I don't plan to post this yet, since the transition is still in progress, but I did want to write up a draft to get feedback for when we're ready to announce it.

view this post on Zulip Richard Feldman (Jan 06 2025 at 05:02):

any feedback welcome!

view this post on Zulip Sam Mohr (Jan 06 2025 at 05:16):

Who is your intended audience with this post? Or rather, where do you plan on posting it?

view this post on Zulip Richard Feldman (Jan 06 2025 at 05:19):

the goal is for it to end up on the front page of Hacker News

view this post on Zulip Richard Feldman (Jan 06 2025 at 05:21):

I plan to post it on rtfeldman.com just like the others (if I remember right, I think the previous one made it to the front page whereas the one before did not)

view this post on Zulip Richard Feldman (Jan 06 2025 at 05:22):

the main reason for posting it on rtfeldman.com is that I wanted to avoid having an "official blog" because that creates an obligation to post on it regularly, or else people misread the lack of posting as a signal that something is wrong (e.g. that development is slowing down, or people have lost interest in the language, etc.)

view this post on Zulip Richard Feldman (Jan 06 2025 at 05:23):

whereas I figure that if there is no "official Roc blog" then that downside doesn't happen, and if I personally (or others) haven't posted in awhile, people won't read the same things into it (e.g. "oh maybe he's just got other demands on his time right now" etc.)

view this post on Zulip Luke Boswell (Jan 06 2025 at 06:30):

Love it. Really enjoyed reading the draft. :smiley:

view this post on Zulip Jasper Woudenberg (Jan 06 2025 at 07:08):

Great post! Found one small typo: "... the LLVM perfomrance optimizations ..."

view this post on Zulip Fábio Beirão (Jan 06 2025 at 10:05):

I'm loving the read so far. On the topic of typos, I found ...one of of pure..., ...previous snytax used..., ... a result so delighftful!

view this post on Zulip Karl (Jan 06 2025 at 11:07):

As part of the function syntax explanation I think it's worth mentioning || doesn't interfere with tuple syntax.

The "few more breaking changes" link is not a public zulip conversation.

view this post on Zulip Oskar Hahn (Jan 06 2025 at 11:33):

Thank you for mentioning the kingfisher platform. Reading this forced me to create a new release, before you publish the post :sweat_smile:

Will the new function syntax with || be merged in main before you publish the post?

view this post on Zulip Richard Feldman (Jan 06 2025 at 13:31):

I'm assuming so, yeah!

view this post on Zulip Anton (Jan 06 2025 at 13:42):

Great post! One possible improvement could be to use collapsible sections for "What we consider observable" and "Algebraic Effects". A shorter looking post could mean the difference between "It's not so long, I can read this now." and "This is interesting but it's a little long, I'll save this for later." (And possibly forget about it).

view this post on Zulip Anthony Bullard (Jan 06 2025 at 14:11):

@Oskar Hahn I'll try to get that going. Doing a bit of a PNC refactor to quiet the last of the fuzzer issues. I'll be doing that next

view this post on Zulip Anthony Bullard (Jan 06 2025 at 14:26):

And I'm very humbled to be mentioned in the post Richard, it's gratifying to see basically every contribution I've made (outside of bugs - some of which I created :smile:) being called out.

view this post on Zulip Anthony Bullard (Jan 06 2025 at 14:26):

I think this is a great post, and I'm sure the Orange Site chatter will be fun to read

view this post on Zulip Richard Feldman (Jan 06 2025 at 14:34):

thanks for making the contributions, they've been great! :smiley:

view this post on Zulip Agus Zubiaga (Jan 08 2025 at 13:59):

This looks great overall! I wonder if it'd be worth mentioning how we let you run effects from functions annotated to be pure while debugging. I've had really positive reactions to that fact.

view this post on Zulip Agus Zubiaga (Jan 08 2025 at 14:00):

Also, does my name intentionally link to roc-pg's repo? :smiley:

view this post on Zulip Richard Feldman (Jan 08 2025 at 14:10):

oops, I'll fix that!

view this post on Zulip Richard Feldman (Jan 08 2025 at 14:10):

and good call on the running effectful functions anywhere while debugging!

view this post on Zulip Oskar Hahn (Jan 08 2025 at 14:22):

Wow. I did not know that this is possible. I am excited to read about it in the post.

view this post on Zulip Richard Feldman (Jan 08 2025 at 14:23):

yeah it's just a warning

view this post on Zulip Richard Feldman (Jan 08 2025 at 14:24):

we might need to be careful with --optimize and not annotating things as pure in llvm if they're not actually pure :thinking:

view this post on Zulip Anthony Bullard (Jan 08 2025 at 15:50):

dbg is stripped with --optimize right?

view this post on Zulip Richard Feldman (Jan 08 2025 at 15:55):

I forget if it currently is, but the idea is not to

view this post on Zulip Richard Feldman (Jan 08 2025 at 15:56):

--optimize should strip inline expect and that's it

view this post on Zulip Oskar Hahn (Jan 08 2025 at 16:11):

No. It's not. And it was really useful for AoC to have optimize with dbg.

view this post on Zulip Anthony Bullard (Jan 08 2025 at 16:18):

That's troubling to me.

view this post on Zulip Anthony Bullard (Jan 08 2025 at 16:18):

I would expect a production release to maintain the contract of the effectuality of all functions

view this post on Zulip Anthony Bullard (Jan 08 2025 at 16:19):

Unless we are going to have a --optimize-prod flag :smile:

view this post on Zulip Richard Feldman (Jan 08 2025 at 16:51):

we've talked about having like a --release flag or something like that

view this post on Zulip Richard Feldman (Jan 08 2025 at 16:52):

which could fail if there are any warnings or dbgs

view this post on Zulip Anthony Bullard (Jan 08 2025 at 16:53):

But why fail is there are debugs, and not just strip them?

view this post on Zulip Anton (Jan 08 2025 at 16:59):

Because people will add dbg to their code and spend time wondering why it's not printing anything, potentially a lot of time

view this post on Zulip Anthony Bullard (Jan 08 2025 at 20:00):

I’d at least like a —strip-dbg flag

view this post on Zulip Sam Mohr (Jan 08 2025 at 20:01):

Maybe we can make an actual thread about this? We have yet to finalize this design. I can make an #ideas thread in about an hour unless someone else wants to do it

view this post on Zulip Luke Boswell (Jan 09 2025 at 01:35):

I think the only remaining syntax for this, once we land the staged breaking changes are;

  1. |args|
  2. "string ${interpolation}"

view this post on Zulip Sam Mohr (Jan 09 2025 at 01:36):

(removed)

view this post on Zulip Luke Boswell (Jan 09 2025 at 01:40):

The link isn't a publicly visible topic... should we update the Plans page maybe?

To date, Roc has never had a numbered release. We aim to change that by releasing version 0.1.0 sometime in 2025, after landing a few more breaking changes.

view this post on Zulip Richard Feldman (Jan 09 2025 at 01:46):

I like the link being to a topic that isn't public

view this post on Zulip Richard Feldman (Jan 09 2025 at 01:47):

if someone is curious enough what the breaking changes are, that's a good reason for them to join Zulip! :smiley:

view this post on Zulip Richard Feldman (Jan 09 2025 at 02:47):

Anthony Bullard said:

I’d at least like a —strip-dbg flag

hm, what would you use it for? :thinking:

view this post on Zulip Richard Feldman (Jan 09 2025 at 02:48):

it seems like the use case would be "I want to keep dbgs in my code base but have them be no-ops"

view this post on Zulip Richard Feldman (Jan 09 2025 at 02:49):

I always think of dbg as essentially a temporary debugging tool for just the thing I'm currently working on, and I actively don't want it to be persisted in the code base long-term

view this post on Zulip Richard Feldman (Jan 09 2025 at 02:49):

so I can appreciate a tool that helps me identify dbgs that I might have forgotten to take out after I was done debugging

view this post on Zulip Richard Feldman (Jan 09 2025 at 02:49):

but I can't think of a situation where I want to keep them in the code base but have them be no-ops


Last updated: Jul 06 2025 at 12:14 UTC