Val

joined 2 years ago
MODERATOR OF
 

cross-posted from: https://lemm.ee/post/56400451

Started with blender but when the eraser started lagging I switched to krita.

CC0 - No Rights Reserved

 

Started with blender but when the eraser started lagging I switched to krita.

CC0 - No Rights Reserved

[–] Val@lemm.ee 5 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

Was inspired by the article to draw this. Sadly It doesn't make much sense without context.

You do not own the words you say

 
[–] Val@lemm.ee 56 points 1 month ago

and people complain about wayland.

[–] Val@lemm.ee 2 points 1 month ago

The Idea is that the enum acts as a union, capable of holding any of the member types, It's not that different from using identifiers and when transpiling to rust I will probably only support variants beginning with string literals (or maybe generate them).

The main reason is that I could use type inference to define the variants in a returned anonymous enum.

I like the pipe symbol because it is useful for distinguishing between enums and structs without keywords. And I just personally think it looks better. And allow for pretty anonymous enums like (|String |Int) for something that can accept both a string and an integer.

 

I'm making a language with a lot of inspiration from rust and was experimenting with alternative enum syntax. It relies on literals to be types in order to convey information on the different options.

I don't really get on well with Typescript but having the ability to use literals as types is something I really liked as a lot of the times I use static string literals as errors. and having all the variants upcast through types makes it easier to do pattern matching.

Plain-text transcription of the image:

// using rust like enum syntax
Option<T> (
  | "Some" T
  | "None"
)

fn match_demo() {
  let some_option = Option "Some" "text";
  let none_option = Option "None";

  match some_option {
    "Some" "hello" => print("oh hi there"),
    "Some" text => print("Option is {text}"),
    "None" => print("Option is {text}"),
  }
}

// Or maybe more experimental syntax
Option<T> (
  | T
  | ()
)

fn match_demo2() {
  let opt = Option "something";
  match opt {
    "text" => "matching directly",
    var => "bind to variable",
    () => "nothing",
  }
}
[–] Val@lemm.ee 3 points 1 month ago

Not having a license is "All Rights Reserved". That's why I bothered with the license section in the readme at all.

[–] Val@lemm.ee 4 points 1 month ago

Thanks!

I intend for the language to have a similar borrow checker and type system. Which is why I'm targeting rust. It means I have something to check against when writing the tooling. (Although I'm not sure I'll get that far. My computer is littered with dead projects).

[–] Val@lemm.ee 1 points 1 month ago (2 children)

I don't really want to clutter the repo with something so frivolous. If they were links or an SPDX ID would that be enough?

[–] Val@lemm.ee 4 points 1 month ago (2 children)

I'm intending to use this for a custom language "OA" that I want to compile to Rust and JS to start with.

I don't know enough about LLVM to compile directly to machine code although I would like to.

 

cross-posted from: https://lemm.ee/post/52336135

1
I made a thing. (codeberg.org)
1
submitted 1 month ago* (last edited 1 month ago) by Val@lemm.ee to c/anaval@lemm.ee
 

Original in this post: https://lemmy.dbzer0.com/post/33311504

I thought it was cool and spent an hour in Inkscape trying to recreate it.

 
[–] Val@lemm.ee 1 points 1 month ago (1 children)

You can use Unicode pictures: ␜ ␝ ␞ ␟

https://en.wikipedia.org/wiki/Control_Pictures

 

After needing to find a small delimiter for my data format I started wondering if I could use 0x1E-0x1F?

They are part of the control codes so I thought they might do something weird?

https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Field_separators

[–] Val@lemm.ee 5 points 3 months ago* (last edited 3 months ago)

Isn't this the source for the relay? https://github.com/bluesky-social/indigo/tree/main/cmd/bigsky

And even then the readme says:

A note and reminder about Relays in general are that they are more of a convenience in the protocol than a hard requirement. The "firehose" API is the exact same on the PDS and on a Relay. Any service which subscribes to the Relay could instead connect to one or more PDS instances directly.

And the PDS source code is here: https://github.com/bluesky-social/pds

EDIT: The PDS source is actually here: https://github.com/bluesky-social/atproto/tree/main/packages/pds the other link is for self hosting.

[–] Val@lemm.ee 2 points 3 months ago

No you weren't. At least not in my opinion. I was just continuing the thought not refuting anything you said.

[–] Val@lemm.ee 0 points 3 months ago

You think the election posts were low quality? I was going more of a clean minimalist vibe instead. Got any tips?

[–] Val@lemm.ee -1 points 3 months ago (1 children)

I guess you could see it that way. Just the "opinion rather than relevancy" sounds so appropriate to the downvote topic that I assumed it was that.

 

feel free to remove if it's too low quality. Just wanted to post somewhere nice for a change.

1
submitted 3 months ago* (last edited 3 months ago) by Val@lemm.ee to c/anaval@lemm.ee
 

Hopefully now with less downvotes.

Oops. I made it in a hurry so I used Kamala instead of Harris. Just now noticed. Is it worth a reupload?

view more: next ›