Val

joined 2 years ago
MODERATOR OF
[–] 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?

 

Hares another thought I had.

We all know the political compass. The simple way to map all of politics in just two axis on a 2d plain. Reducing the fascinating complexity of society to just four sectors. With such unhelpful labels as "left" and "right". Here's my version. The "left-right" axis is replaced with class authority and "lib-auth" with state authority. Now If any lib-rights want to argue with me about the label I'm happy to do so.

The other thing I want to note is that, in my opinion, the lib-right and auth-left sectors are impossible. They represent ideas that do not match reality. because authority creates authority. By mapping class and state authority separately you can see that if you somehow manage to eliminate one but champion the other, the remaining will just form the other. Either by state bureaucrats becoming the privileged class, or the companies creating private militias and becoming states in all but name. That is what the black arrows represent: the tendency to move to a stable balance between the two authorities.

 

I have a theory. (technically I have many but today I'm talking about this one.) Well actually it's more of a visualization. As an anarchist I have spend a lot of time pondering on anarchist society and it's relation to the archic one. This pondering led me to this scale. The Chaos-Order scale. It position political systems on a single point depending on the amount of chaos a society deems acceptable.

I decided to divide the scale into 4 sections. There could be more but i wanted clearly defined borders between them.

  1. Total chaos
  2. Anarchy
  3. Democracy
  4. Authoritarianism (Authy)

These sections are defined by clear boundaries (marked with #):

  1. The minimum required order for society
  2. Anarchy-Democracy border
  3. Democracy-Authorotarianism border

The arrows signify how every section can be entered.

It should be noted that anarchy and total chaos are separated by an impassable border. #1 The minimum order for society. This is because total chaos can only exists for a moment between archic systems collapsing and the formation of an extremely authoritarian society (The rule of violence). True anarchic systems should be immune to this collapse as it requires the complete breakdown of the social bonds between people.

The second border is the anarchy-democracy border. This border is defined by having any form of hierarchical society. It is passed when an anarchist revolutionary class takes control of the entire functioning of society or when an anarchic society collapses back into archy.

The third is the democracy-authy border. This is defined by having some form of democratic control over society. Essentially free elections. Most people should already be familiar with the concept.

 
view more: next ›