zongor

joined 4 years ago
 

Your computer doesn’t magically become junk because it can’t run Windows 11. Information and local help for people interested in making the switch to Linux.

 

Mine is sandbagging_balance_mix_mo_v1_malicious_5pct

 

Mine is red herring

 

Eat you heart out Zbigniew Brzezinski

 

Your ideas want to be free

1
Test (hexbear.net)
submitted 1 month ago* (last edited 3 weeks ago) by zongor@hexbear.net to c/chat@hexbear.net
[–] zongor@hexbear.net 5 points 1 month ago

Makes me wish rio would have like a "tiled collage" background mode, or maybe for a lock screen. As always this would be a perfect addition to that collection.

 

CW: Brezhnev

[–] zongor@hexbear.net 4 points 3 months ago

Every journey inst/start (s) with a single step

[–] zongor@hexbear.net 5 points 3 months ago (1 children)

Napoleon: total war maybe?

[–] zongor@hexbear.net 5 points 4 months ago

And now I’m crying

[–] zongor@hexbear.net 4 points 4 months ago* (last edited 4 months ago)

Here’s a list of ones you (likely) don’t know about:

Netsurf: I’ve only really used it on plan9 but it’s light weight and works ok for basic JavaScript. They have their own layout and JS engine

nyxt: browser written and configured in Common Lisp, it uses WebKit

surf: suckless browser that also uses WebKit

Ladybird, it’s not ready yet but it’s in very active development, writing their own browser engine from scratch

Mothra: the default web browser for 9front. It ignores all JavaScript and most html and css tags making is super fast and secure.

[–] zongor@hexbear.net 1 points 4 months ago

These look great, thanks!

[–] zongor@hexbear.net 2 points 4 months ago (1 children)

This actually might be close to what im looking for, kinda like this or how haskell does it where it declares the typeclass above the function and then the function signature and body below

[–] zongor@hexbear.net 2 points 4 months ago (1 children)

I have taken a look at Odin, its interesting, its kinda like a bunch of different languages, its got the postfix types like typescript, rust, etc but other structures similar to Go or Pascal.

[–] zongor@hexbear.net 1 points 4 months ago* (last edited 4 months ago)

BQN

Neat! Ill have to read up on this, I haven't used a APL-like language before. The closest thing to APL or BQN ive used is Uiua if you have heard of it.

[–] zongor@hexbear.net 2 points 4 months ago* (last edited 4 months ago)

Luau seems to be a typescript/rust mixture with a pinch of Fortran. It’s serviceable but it’s limited in its primitive types. That’s a different issue I’m still thinking of but that’s not for this one.

[–] zongor@hexbear.net 3 points 4 months ago* (last edited 4 months ago) (8 children)

Right now I’m only focused on look and taste. For reference the closest to what the end product is it’s going to be a typed lua, really simple and easy to understand. I looked at ML, Haskell but they seemed a bit too esoteric for a new dev. Pascal I totally forgot about, should look at that. I also like rusts syntax but I’m not sure if the way the implementation syntax is obvious.

Edit: looked at pascal and this looks similar to an early draft of mine lol. I think I moved away from the style of syntax (I used ‘as’ instead of ‘of’) was that it made the declaration really long and the type being at the end of it means you would need to wait to allocate memory until the whole line is parsed in.

17
submitted 4 months ago* (last edited 4 months ago) by zongor@hexbear.net to c/programming@hexbear.net
 

Hello all, i'm trying to figure out a language syntax and I keep going in circles, maybe some opinions from other devs may help.

For a given programming language what is the most efficient & cleanest way of describing a variable, type, etc?

Here is a list of ones I have considered. (psudocode)

C style (structs and return type prefix), pros: simple, really succinct, cons: annoying lexing because return type is ambiguous.

struct Vec3 {
  f32 v[3];
}
struct Player {
  char *username;
  Vec3 pos;
  Color appearance;
}
Player[] login(Player p, char *password) {
...
}
Player me("me", Vec3(0.0,0.0,0.0), Color(255, 0, 0));
login(me, password);

Rust style (function prefix, arrow return type), pros: separation of data and implementation makes composition easier. Cons: not very intuitive for learners.

struct Player {
  username: str,
  pos: Vec3,
  appearance: Color,
}
impl Player {
  fn login(self, pass: str) -> Vec<Player> {
  ...
  }
}
let me: Player = Player {username="me", ...
me.login(password);

Typescript style (similar to rust but without arrows, also OOP). pros: simple, easy to understand. cons: OOP can cause problems

class Player {
  username: string;
  pos: Vec3;
  appearance: Color;
  constructor(username: string, pos: Vec3, appearance: Color) {
    this.username = username;
    ...
  }
  login(password: string):Player[] {
  ...
  }
}
let me: Player = Player(...
me.login(password);

Fortran style (types below definition). Pros: clear whats going on? (maybe too used to fortran weirdness). Cons: extremely verbose.

type player
  string :: username
  real(kind=32), dimension(3) :: pos
  integer(kind=8), dimension(3) :: appearance
contains
  procedure :: login
end type player

player function init_player(username, position, appearance) result(this)
      string :: username
      real(kind=32), dimension(3) :: position
      integer(kind=8), dimension(3) :: appearance

      this%username = username
      this%position = position
      this%appearance = appearance
end function

function login(this, password) result(players)
  class(player) :: this
  string :: password
  player, dimension(:), allocateable :: players
  ...
end function
...
player :: me
me = Player("me" ...
me%login(password)

Go style, types after like rust/typescript but no :, interfaces instead of OOP, prefix types on the left of functions. Slices also backwards. Pros: simple, cons: syntax is backwards and weird, implementing a tupe would be annoying.

type Player {
  username string
  position Vec3
  appearance Color
}
func (p Player) login(password string) []Player {
...
}
me := Player("me" ...
me.login(...

Let me know what you think, thanks all!

view more: next ›