@pranabekka

34 Followers
24 Following
222 Posts

Pranab (he/him)

i like programming, the terminal/cli, inclusive multiplayer games (video or card), ux design, plus cool art/ui

pls forgive for spouting out nonsense

see featured/pinned posts for more

or my site

https://pranabekka.github.io

personal sitehttps://pranabekka.github.io
pronounshe/him

i like a chonky `Nil` instead of a tiny `;` for returning nada

#gleam #rust

(also #gleamlang #rustlang )

RE: https://hachyderm.io/@inthehands/115991679951111631

this is so depressing. i don't get how any of this is happening

In summary:

1. Remove `&`, `&mut` and `clone()`
2. Mutate by assigning to the same variable, with hidden moves/borrows for performance
3. Copy/clone on assigning to new variable

I'd love to hear any questions or feedback!

https://pranabekka.github.io/borrow-infer/

Borrow inferrer - Pranab’s site

A clone occurs whenever you assign to a new variable, for the simple reason that if they were meant to be the same, then there's no reason to create a new variable. In the following example, `list_2` is a copy of `list`.

We've thus completely inferred moves, borrows and clones. I discuss some more cases and benefits of this syntax in the article, but this is the start.

4/?

I'm going to change the syntax to differentiate from Rust and fit more.

Here, `list_fn` gets a move or mutable borrow of `list`. But `dbg!`, on the other hand, doesn't return a value for us to assign to `list`, so it receives an immutable borrow.

We've removed the need for `&` and `&mut`!

3/?

Look at the following Rust snippet. It only has borrows for the specific string type, but no other annotations!

Basically, we remove `&mut` and instead use this style of "assignment to mutate", which can use moves or borrows without us needing to know the details.

2/?

EDIT: Ignore this post. I really messed up the explanation. Better one coming soon

I've discovered a way to infer moves, borrows and clones without any extra work from the user. There's some edge cases to figure out, but I'm confident it's possible, and it'll make an awesome high-level language.

I have it all on a single page, but I'm going to summarise it here as well.

I'd love any feedback!

https://pranabekka.github.io/borrow-infer/

#rust #rustlang #programming

1/?

Borrow inferrer - Pranab’s site

Please boost!

Like all people and organizations when face to face with their own racism, this thought is likely to ruffle feathers, but nonetheless 100% true.

Mastodon gGmbH has a problem with systemic racism at the organizational level.

It's time to make Mastodon friendly to non-white cultures and we need to start at the top.
#Native #Indigenous #Mastodon #Racism
>>---> https://www.patreon.com/posts/148563046

rust with gc (or go with aliasing xor mutability) would actually be easier than all the mainstream high-level (imperative) languages, because it would catch correctness issues and make functions easy to use without worry

i want it

#rust #rustlang #programming

(maybe hylo will help; i might have something better in mind)

I realised nearly two weeks ago that Gleam code just pushes some happy buttons in my brain, and it's still true, and I'm still not sure why, but I'm happy.

I think it's because it has Go's surface simplicity with Rust's deep correctness, but who can say.
Maybe it's because it's well-rounded without any extra cruft, but who can say.

It just makes me feel a bit giddy and excited :p

#gleam #gleamlang