#programmers-off-topic

1 messages · Page 136 of 1

steel kraken
#

remind me in 6 hours to order ravioli for dinner

heavy daggerBOT
#

ehhhhhhhh ok (#7073049) (6h | <t:1771306589>)

cinder karma
#

I eat chili on pasta

rain apex
#

one time i had carbonara udon

cinder karma
#

Oooooh

rain apex
#

it was good but also too heavy for me

cinder karma
#

(Tbh I've never had carbonara)

prisma flume
#

i don't trust any funky weird novelty carbonaras since i know for an absolute fact they have double cream

#

and that's just wrong

rain apex
#

what does double cream mean

steel kraken
#

I love my beef ravioli Bolognese.
and I see zero reason to betray my trust with the meal to bother trying other pasta

prisma flume
#

i will correct myself to 'literally any cream'

cinder karma
#

I love hand pulled noodles

red crest
#

Cheese ravioli tho...

cinder karma
#

Lobster ravioli

#

Costco sells them, they're quite good

rain apex
#

ah is there some kinda cream tier list

red crest
#

Is that a thing

rain apex
#

that my pleb ass is ignorant of

red crest
#

I don't think I like lobster but I kinda wanna try lobster ravioli

prisma flume
#

i mean the tier list is whatever cream is appropriate. and no cream is appropriate for carbonara

cinder karma
#

There are heavier and lighter creams

#

Blueberry, have you ever made croissants

red crest
#

Half and half is C tier at best

#

Pick a side

prisma flume
#

class C is for carbonara

#

i have never. but i have eaten them

steel kraken
#

I miss croissants.

I used to get them from costco but the costco near me moved 🙁

cinder karma
#

Chue do u like biangbiang

red crest
#

The whole Costco moved?

steel kraken
#

yes

cinder karma
#

Oh man you must not have Asian women making six figure salaries around you

rain apex
red crest
#

Business must've been god awful for that to be the better choice I imagine

cinder karma
#

What about tomato and egg noodles

prisma flume
#

i have asian women making two figure savings around me. we have instant noodles

cinder karma
#

Childhood favorite

steel kraken
#

they originally got the land on a very good deal, and when it came to renewal they did not get the good deal

rain apex
#

well i think every chinese kid is taught tomato egg stir fry

#

but i dont think we eat that with noodle very much

prisma flume
#

here i thought tomato egg was a northern food

cinder karma
rain apex
#

ah i never had this

#

blobcatgooglyblep south china

prisma flume
#

that is not what i was expecting lol

cinder karma
#

Family is from Chongqing

prisma flume
#

but like, not the creamy not-scrambled bit

red crest
#

I would like to purchase one Iconic Chinese Breakfast Item please

cinder karma
cinder karma
red crest
#

I am not in a hotel

cinder karma
#

My guilty pleasure is oil sticks

prisma flume
#

what is an oil sticks

cinder karma
rain apex
#

they r kinda like donuts

#

but savory

prisma flume
#

ah yes. chinese churros

devout vault
#

It's a item is Object { Name: "Oil Stick", Stack > 1 }, obviously

prisma flume
#

i've only ever heard them called fried dough sticks, never oil sticks

#

you should really work on rebranding them to chinese churros

cinder karma
#

(I directly translate from the Chinese)

prisma flume
#

yeah i see the 油. odd name lol

#

i've never heard the word cruller in my life either

cinder karma
#

Casey do you have noodle opinions

safe dragon
#

油 is even also Japanese for oil hc_pensive

prisma flume
#

my al-dente noodle opinion is that we should take away scissors from korean restaurants. noodles are meant to be long

frosty echo
# prisma flume i've never heard the word `cruller` in my life either

I looked it up a while ago, after finding it in a song title. https://en.wikipedia.org/wiki/Cruller

A cruller () is a deep-fried pastry popular in parts of Europe and North America. In Europe it is typically either made of a string of dough that is folded over and twisted twice to create its signature shape or is formed from a rectangle of dough with a cut in the center allowing it to be pulled over and through itself to produce distinctive tw...

prisma flume
#

i'll be honest they couldn't've picked a less appetising photo

#

why do they invoke cruller() at the start there

frosty echo
#

The name cruller comes from the early 19th-century Dutch kruller, from krullen 'to curl'.

rain apex
#

IPA got eaten

#

cruller (/ˈkrʌlər/)

red crest
#

Can someone benchmark cruller() please. Should I use that in hot code oil

rain apex
#

I will never learn how to read these funny greek looking things

prisma flume
#

they're pronounced how they're spelt

steel kraken
#

(its IPA, international phonetic alphabet)

#

each symbol directly relates to how a human mouth would pronounce it

#

my memory is very hazy as I last took IPA seriously 12 years ago, but from memory there are symbols for theoretical sounds that no known language actually uses, but its theoretically possible for the mouth to do it

sand frost
cinder karma
#

Hi!

#

How r u?

cinder karma
#

My new work laptop is significantly larger than previous

#

Which is awesome because it means I can see

sand frost
#

Generally seeing is positive yes

#

Concerned for past laptop and/or eyes??

heavy daggerBOT
steel kraken
#

yes sir past me

uncut seal
pliant snow
#

this needs to be a command

#

!averagemodder

indigo mistBOT
#
steel kraken
#

The average dev knows about transpilers and IL obviously

pliant snow
#

and C#

steel kraken
#

I would be impressed if someone knew IL without knowing C#

rain apex
#

I thought IL is a C# concept

steel kraken
#

IL is the .net runtime concept.

You can have c++, VB, f# all in IL

pliant snow
#

see i dont even know what IL is or stands for

steel kraken
#

Same thing as kotlin, scala sharing the same bytecode for jvm

#

Intermediate Language.

The cross platform assembly-like format that the runtime interprets and makes into actual machine code to run on the specific hardware

pliant snow
#

but not a VM

steel kraken
#

The dotnet runtime is just as much of a VM as jvm is.

pliant snow
#

oh

steel kraken
#

It's apples and oranges compared to something like VirtualBox or something that would run an operating system.
But I'll let the comp sci nerds argue semantics about what defines a virtual machine I don't particularly care one way or the other

safe dragon
#

yeah it's as much a vm as JVM or BEAM (from erlang)

safe dragon
rain apex
#

A little IL Emit never hurt anyone

#

I guess it's like hand rolling assembly

pliant snow
#

I get my assembly already handrolled from the grocery store

cinder karma
#

If hand rolling assembly was platform independence

#

Tnh hand roll assembly much less useful these days because compiler smarter than programmer

#

That's the real AI

#

A fucking amazing compiler

pliant snow
#

compiler doesnt start with an I

safe dragon
#

lompiler

#

I feel like handrolling assembly is only worth it at this point if you're either

  1. doing something funky for which the compiler has dedicated instructions like there are for video transcoding
  2. building an emulator and know exactly what instructions to use to match the behavior of the emulated system's instructions
cinder karma
#
  1. Working on an odd special system that compilers dont really understand
safe dragon
#

fair

devout vault
#
  1. Code crimes.
fleet wren
#
  1. Your name is Chris Sawyer
devout vault
#

"is that the Rollercoaster Tycoon 2 guy"
googles
"YEP"

little furnace
devout vault
#

Bold of you to think that Chris sawyer wouldn’t say

#

Random thought re:the is optimization stuff from yesterday: If you were making an embeddable scripting language for a smaller use case - like in a game - I imagine you could make is just as fast since you make more assumptions.

Like, you could use a bitfield to store which types a type can be isd with. Though I suppose that'd probably need a loop if you had more than 64 types

cinder karma
#

I note yesterday we didnt seal a

#

@ sinz come back here and seal a

little furnace
devout vault
#

Worth it for the personal satisfaction is still considered worth it in my book

cinder karma
#

Sinz come back here and seal a plz

supple ether
# fleet wren 5. Your name is Chris Sawyer

as much as I think Chris Sawyer is a legendary game dev, he only used assembly because that's what he already had experience with, and he wasn't very familiar with C when he wrote transport tycoon. (which shared an engine with RCT 1 & 2)

little furnace
#

And because I likes optimizing to perfection. In a way, that's also why he doesn't like re-implementations like OpenTTD and OpenRCT2 because he optimized the original games to perfectly match his vision and he sees them as his art and that's the way they are supposed to be played. His lawyers see them as piracy, but I don't think that's what he thinks himself.

supple ether
#

Well the thing with those projects is that they're rewritten from scratch in c++ with no access to the source code

#

So they're technically an original work

#

They're more like clone games than mods

safe dragon
#

and they don't explode if you try to play them on a resolution higher than you'd find on a warehouse PDA

#

at least my original copy of rollercoaster tycoon 1 basically could only run as a miniscule window

supple ether
#

But 360p is he gold standard /jk

#

It is kinda funny that by default the highest resolution supported by rct3 is 720p. You have to manually edit the config file to get 1080

safe dragon
#

these days (on linux anyway) you can just use gamescope and it'd scale it up for you

#

shoutout to gamescope

#

I use it sometimes when there's a game that doesn't really play nice with niri

fleet wren
#

(I ran into this the other day, and it's apparently a common enough complaint with the original TT that it's in the FAQ on Chris Sawyer's page. with OpenTTD you can just increase it in the configs)

little furnace
#

I agree with you all, but he doesn't think like that.

fleet wren
#

(but yeah there's zero corners to be cut, or added from the original game. it's a very tight product)

#

yes

#

arguably the only TT design choice I'd disagree with is whatever's up with helicopters

#

namely why do they go extinct in 2030 (on top of being slow and terrible)

#

imagine if SDV has a crop that loses you money if you grow it, and then Pierre stops selling it year 3

devout vault
#

More places should do this

lethal walrus
#

im now curious which one you arent meeting

devout vault
heavy daggerBOT
#

ooo not sure if I can count that high but I'll give it my best shot!!! (#7074313) (40d | <t:1774819950>)

lethal walrus
#

and why they only accept 8 symbols

devout vault
#

...

#

REALLY UBER

#

Welp I guess I've 3 april fools mod idea reminders now

#

Maybe 4

little furnace
heavy daggerBOT
#
safe dragon
devout vault
safe dragon
# heavy dagger

this isn't that true either cause of dictionary attacks and all those being common words

lethal walrus
#

of course, 1234!!🦥🫴🏾👑 does seem like a password casey would use
how did scrolling too fast crash the kde emoji selector??

safe dragon
#

it's well programmed

lethal walrus
#

of course

lethal walrus
little furnace
safe dragon
#

o

little furnace
#

Which is how most people choose their passwords.

#

Of course, it's still weaker than password managers, but you don't get such an error message if you use one.

safe dragon
#

I do follow this principle when I am in the odd scenario where passwords aren't randomly generated and in a password manager

#

very annoying for work though with the "having to change it every 3 months" thing

little furnace
safe dragon
#

it used to be recommended I think but it isn't anymore

#

because people will just start incorporating the date into the password or something like that

#

something that allows them to remember which one is the newest

little furnace
#

Yeah. Or they choose really easy ones.

#

2FA is much more realiable.

safe dragon
#

or that yeah which is even worse than a good password with predictable shit appended

little furnace
#

||P1nk'sPassw0rdF3b2026||

safe dragon
#

it's one of those policies that is good in theory when you completely ignore actual human behavior

#

also an unfortunate thing about the smart way to do passwords thing is that a lot of login systems have a maximum character length that's often quite low. Sometimes only like 16 characters

little furnace
safe dragon
#

huh don't think we have an equivalent problem

little furnace
safe dragon
#

yeah I use keepass for mostly everything nowadays

#

just generate a long string of nonsense

#

and feel physical pain when I'm using a login window that blocks copy pasting into the login fields

safe dragon
#

idk, a mystery to me

little furnace
#

"Inspect Element"?

safe dragon
#

some javascript binding probably wouldn't go off cause you just know they aren't using an actual form submit

little furnace
#

They generate custom JavaScript code with your password embedded server-side and it matches whether the input is identical.

safe dragon
#

the app my grocery store uses blocks copy pasting into the email address field and I have no idea why

#

thankfully not the password field

#

like your password manager tries to fill in the field and it just fails

#

it also logs me out every once in a while

#

it's very fun when I'm right there at checkout

#

and find out I was logged out

little furnace
#

This sounds absolutely horrible.

safe dragon
#

I mean for like 3 months logging in didn't work

#

so it's been worse

#

fucking apps

#

I walked past a construction site today with a sign to download the construction company's app to receive updates on the construction efforts

#

we need to bring back rss feeds

little furnace
#

Wouldn't it be easier for everyone involved to maintain an RSS feed... and we had exactly the same thought.

safe dragon
#

😌

#

the prevalence of random apps almost feels like how when games were seen as a cheap way to do promos for your store so you had deals at the store where you would get some random branded game on a floppy disk or something with your purchase

#

the very first game I ever played was actually a free game we got on a floppy disk as a promo when we bought a pair of shoes

#

precedes even playing pokemon red

little furnace
#

I don't remember the first game I played.

safe dragon
#

I don't remember the game either tbh I just know that was it

#

I was like 2 years old

prisma flume
#

pretty sure mine would've either been some edutainment about adding numbers on windows 95, or just quake

safe dragon
#

the dutch version of reader rabbit was definitely one of my first too

#

the first one of which doesn't even teach numbers it's even more basic than that

prisma flume
#

what's more basic than numbers

little furnace
#

Mine could be a jigsaw puzzle simulator with custom family photos.

#

Oh, and maybe Armagetron.

safe dragon
prisma flume
#

ill give you that

safe dragon
#

since my niece is 3 years old I now have fresh memories of that game

#

for most of em you don't even have to understand how or when to click the mouse just how to move it to the correct location

steel kraken
#

despite being younger than java/python, all my early childhood game memories are on the commodore 64 amiga playing stuff like mousetrap, frogger and other floppy disk games

safe dragon
#

I don't think I've experienced pre-windows

steel kraken
#

the amiga was a weird machine.
the computer was the keyboard

tranquil grove
#

mine was some iteration of this on a mac, the only time I remember actually using one SDVkrobusgiggle

safe dragon
#

we even had decent internet earlier than most in my country because our neighbor had a "business internet connection" installed aka not dialup and we were allowed to just also use the connection

prisma flume
#

i live in a windows world. pre-windows is prehistory.

tranquil grove
#

(then normal™ stuff like oregon trail and math blaster in school)

little furnace
#

All my early childhood memories are actually SUSE Linux with KDE Plasma 3.

safe dragon
#

damn

supple ether
#

I think the first game I played was Treasure Cove

prisma flume
#

i think i opened ms-dos once as a bab and cried because it was letters

safe dragon
#

letters are very scary

prisma flume
#

i should've known. the desktop icon was also just letters. but very whimsical colourful ones

supple ether
#

Myst was my first real game, and I was too dumb to solve a lot of the puzzles, but I still enjoyed it

safe dragon
#

I think I had already played a few games before I ever learnt how to read.
(and I had played many before I learnt english despite most of those games being in english)

#

honestly idk how child me finished jrpgs without being able to understand anything being said

#

I couldn't exactly read the gamefaqs walkthroughs either yet though my sister or mom would sometimes help me so they'd read it for me

#

my mom still uses neoseeker walkthroughs to this day, it's honestly kinda nostalgic

little furnace
#

The game that really changed my entire perception of games was Zelda: Twilight Princess, and yeah, it was the first time I actually had to look up walkthroughs and such. And actually realized that fandoms exist. And that games can have story beyond "funny man jumps on turtles to rescue princess".

#

Also, Midna.

safe dragon
#

I had twilight princess for the wii but I don't think I finished the tutorial

#

we had the minish cap before that too which I also did not play

little furnace
#

The tutorial is very long. Most people call it the worst part of the game. And while I enjoy the slow pace, if it keeps people from playing it I have to agree that it's bad.

little furnace
safe dragon
#

it was also one of those early wii games where they tried to make motion controls work I think

#

like having to actually swing

little furnace
#

Actually, it works better in TP than in Skyward Sword.

prisma flume
little furnace
#

And that was released later.

little furnace
prisma flume
#

yeah probably

little furnace
#

I don't know Playstation.

#

Even though I love Sony phones.

safe dragon
little furnace
safe dragon
#

ah

#

the only zelda game I have ever actually finished is link to the past

little furnace
#

Nice. I'd actually say it's among the three best games.

safe dragon
#

I have played uh... minish cap, twilight princess, ocarina of time, majora's mask, breath of the wild

prisma flume
#

i played legend of zelda for nes on an emulator maybe 10 years ago and didn't get it

little furnace
cinder karma
#

What's legend of Zelda

prisma flume
#

but i did play the hanging lampshade or whatever the newgrounds knock-off was

#

which was funny

safe dragon
#

I've just kinda learnt to accept that the zelda franchise is just not for me

prisma flume
#

so that's my entire experience with zelda

safe dragon
#

especially not the "modern" 3d zeldas like botw

#

I find it absolutely baffling that people praise botw so much I really just don't get it

little furnace
safe dragon
#

considering the nearly universal praise, barring the weapon durability thing, it's probably a me problem but yeah I just don't get it

tranquil grove
#

i enjoyed those more than i expected, despite playing botw and totk back to back in the same month

steel kraken
#

I mostly enjoyed botw and totk but the weapon durability is such a terrible system that it poisoned the well for me

safe dragon
#

the shrines were boring as hell. The landscapes weren't very interesting either. Koroks were moreso just a chore

steel kraken
#

I never used any rare weapons for combat because it would just destroy itself after 30 seconds of combat

tranquil grove
#

weapon durability felt mostly irrelevant, but probably because i just played slowly and always had a full pile of spares

runic kraken
#

What I did to C# yesterday almost got me banned from their discord

little furnace
runic kraken
#

Who wants to see the absolute beauty I did

safe dragon
#

yeah the durability system is especially designed to go against everything I enjoy but it was not what made me not want to play it

runic kraken
safe dragon
little furnace
runic kraken
# runic kraken For clarity, I am going to give you a snippet from my parser written in Ocaml (a...

This is the Ocaml version

let parse_if pstate : Ast.Expr.t parser_result =
  (* if cond then <then_branch> else <else_branch> *)
  advance pstate |> ignore; (* consume if *)
  let* cond = parse_expr pstate in
  let* _ = expect pstate T.Then in (* consume then *)
  let* then_branch = parse_expr pstate in
  let* _ = expect pstate T.Else in (* consume else *)
  let* else_branch = parse_expr pstate in
  Ok (Ast.Expr.If (cond, then_branch, Some else_branch))

... and this is what I did to C#

 public static Result<Expr> ParseIf(ParserState state) =>
    Result.Ok(state.Advance()) // Consume 'if'
        *  ParseExpr(state)
        >> cond => Expect(state, T.Then)
        *  ParseExpr(state)
        >> thenBr => Expect(state, T.Else)
        *  ParseExpr(state)
        >> elseBr => Result.Ok(new IfExpr(cond, thenBr, elseBr)); 
tranquil grove
safe dragon
#

are you sure that's C#

tranquil grove
#

also block-pushing puzzles

runic kraken
#

I overrode >> to monadic bind, and * to applicative sequencing

safe dragon
#

are you bitshifting lambda expressions wtf am I looking at

runic kraken
safe dragon
#

this ain't haskell we ain't got applicatives

little furnace
runic kraken
#

It translates to

 public static Result<Expr> ParseIf(ParserState state) =>
    Result.Ok(state.Advance()) // Consume 'if'
        .App(ParseExpr(state))
        .Bind(cond => Expect(state, T.Then))
        .App(ParseExpr(state))
        .Bind(thenBr => Expect(state, T.Else))
        .App(ParseExpr(state))
        .Bind(elseBr => Result.Ok(new IfExpr(cond, thenBr, elseBr)); 
safe dragon
#

wait does C# have operator overloading

runic kraken
safe dragon
#

weird question to ask as a professional C# dev of quite a few years at this point I know

steel kraken
#

C# does have operator overloading yes

safe dragon
#

I see

runic kraken
#

It looks incredibly cursed

steel kraken
#

but unlike C++ people only use it when needed instead of abusing it for piped stdin/stdout

steel kraken
#

and your code isn't readable as a result

runic kraken
#

It's readable to me, but I moved to Ocaml because I didnt wanna have to hack a language to get a not dogshit exception handling paradigm

steel kraken
#

the translated code is considerably cleaner and easier to reason

safe dragon
#

in haskell I'm used to the applicative operators of <*> and the likes

runic kraken
safe dragon
#

I was very confused in C#

runic kraken
#

so I had to use *

#

>> is >>= and * is <*>

safe dragon
#

for a proper parser combinator you're going to need <* and *> too

#

wait it wasn't a parser combinator

runic kraken
#

This was a simple recursive descent parser

safe dragon
#

something related

steel kraken
runic kraken
safe dragon
#

it might "soon" actually since discriminated unions are in the works

runic kraken
#

I used records and abstract records to hack those in for Ok/Error and Just/Nothing

safe dragon
#

I think I've seen libraries for this stuff before but yeah I don't use em

steel kraken
#

In general you either do regular exceptions, or do patterns like TryGet and the boolean success return arg and using output arguments

runic kraken
steel kraken
#

then write haskall?

runic kraken
#

It took me 3 hours to implement these two cornerstones, ill probably make it a library for if I ever need result types

safe dragon
#

Maybe/Option isn't really necessary since as long as you're not casey and actually use Nullable=true in your csproj you effectively have something close to Option already

runic kraken
safe dragon
#

Result would be great though

runic kraken
#

I fell for the bait of Nuget being good and then realized writing my toy language in C# would have been a nightmare so moved to Ocaml

runic kraken
safe dragon
#

pretty sure people have already made nuget packages for shit like monads

runic kraken
#

Yeah but I didnt wanna have to graft a massive depency for like 3 things I needed from it

safe dragon
#

it's ok we just go the javascript route and have null and undefined

runic kraken
#

😭

safe dragon
#

(please don't)

runic kraken
#

JS is probably the worst language on the planet

steel kraken
#

javascript has null, undefined and the absense of a value

#

the third has different behaviour from the first two that can be measured

safe dragon
#

right there's also <Empty>

cinder karma
#

Lol

runic kraken
#

If I have to do web stuff I either reach for Typescript and only use functional programming paradigms, or PureScript

cinder karma
#

I'm too lazy to do Javascript

#

My favorite is when I have to declare a singleton in Python because I cant use None because I'm doing stupid meta shit again

safe dragon
#

Typescript is a wonderful type system glued to a language that makes me want to cry

runic kraken
#

I never fall for the this in JS/TS because I never use classes as anything other than data objects with immutable properties

safe dragon
#

this is almost unused in modern javascript in my experience

runic kraken
#

Every single thing I use in JS gets Object.frozen if I'm absolutely not goign to use it ever again

safe dragon
#

because of how unpredictable it is

lethal walrus
#

generally just in classes i've seen it

#

aside from the strange function/globalThis context

safe dragon
#

I like functional programming but I've never really tried to push immutable programming into languages not designed for it

runic kraken
#

I tend to HATE OOP, and I mean REALLY HATE OOP programming because it is fundamentally alien to my brain

safe dragon
#

I think I have 1 class in my entire work js codebase and even just that one has caused issues before

#

don't trust those things...

#

partially my fault cause svelte reactivity inside classes is full of footguns and not recommended by them either

lethal walrus
#

i never realised classes could do svelte things

red crest
#

I like Javascript SDVpuffersmile

steel kraken
#

gotta love JS where a for loop will see empty, but not map

runic kraken
#

On contrary, I fucking love PureScript

safe dragon
runic kraken
lethal walrus
runic kraken
#

Its so elegant and pretty, I wrote a Discord bot in it one time

safe dragon
#

I had a usecase for it once and it did work quite well for that but it's been nasty for anything else

runic kraken
#
import Prelude
import Effect.Console (log)

greet :: String -> String
greet name = "Hello, " <> name <> "!"

main = log (greet "World")
safe dragon
#

svelte 5 is so much nicer than what came before

red crest
#

I still haven't tried Svelte 5 because my two main Svelte projects have been on Svelte 4 forever and I dread doing the work required to upgrade

lethal walrus
#

the runes are just confusing to me

#

and types on them mildly annoying

safe dragon
#

you can upgrade them gradually fwiw. Places without runes in them run in legacy mode by default

red crest
#

And I know if I try to upgrade one of them I'm going to be sucked into rewriting it from scratch for the third time because it's god awful in its current form and I don't wanna commit time to that

runic kraken
#

PureScript isnt exactly 1:1 with Haskell, it has some weirdnesses like the operators are slightly different

#

But it is a nice language, where I don't have to worry about the stochastic chaos of JS

lethal walrus
red crest
#

If I'm not gonna do the work to upgrade properly though I may as well keep it in Svelte 4 and not risk breaking it

lethal walrus
#
let {
    festivalId, modificationId, selectedTile = $bindable<SelectedFestivalTile | null>(),
} = $props<{} & FestivalMapRendererProps>();
  
const map: MapData = $derived(maps[`${festivalId}_${modificationId}`]) as MapData;

its so much SDVpufferpensive

red crest
#

My docs site wouldve been Svelte 5 if it was released by the time I started it. Alas

safe dragon
runic kraken
#

Probably not very far because the developer does not allow you to use it for anything server side, nor does it have proper typeclasses

safe dragon
#

I see some issue reports from time to time with bugs on hybrid projects where parts are svelte 5 and parts svelte 4 but it seems ok? I'm lucky enough where svelte 5 released before I started the work project

red crest
runic kraken
#

And introduce stochastic chaos? No thanks lol

runic kraken
#

Types are there for a reason

safe dragon
#

shoutout to types

#

I do admit I have like 2 places with the cursed evil as unknown as Type

runic kraken
#

Types are amazing, most people only hate them because they havent used a language with proper type inference

#

eg Ocaml or Haskell, where you never have to specify them - yet they are strictly typed languages

safe dragon
#

yeah these days new languages try to go pretty far on type inference

runic kraken
#

Rust falls into that category too, it has decent type inference (albeit not as good as Ocaml/Haskell)

marble jewel
#

I dunno, types seem kind of sketchy to me. Back in my days there were not types, let, or const. It was all just var.

steel kraken
#

as unknown as Type is the "fuck you type system its this now I don't care what you think"

safe dragon
#

we used this and just kinda hoped that referred to the correct thing

thin estuary
lethal walrus
#

yes

thin estuary
#

like, it would make no sense in a lang like C#

safe dragon
#

yeah typescript is just like "oh ok" cause you can cast anything to unknown and unknown can be cast to anything else

lethal walrus
#

youre forcing it to ignore the type it knows/thinks it is

runic kraken
#

Its an escape hatch I imagine invented to interop with the worlds worst language, PureScript however does not allow this IIRC

steel kraken
#

The type system is purely for type analysis and giving proactive compile errors.
the runtime is just objects and primitives

safe dragon
#

typescript is effectively type erased since types don't exist once compiled

#

so it works

steel kraken
#

in my view, Typescript is one of the most powerful languages as a result of the fact its type system is entirely descriptive and not coupled to memory layouts or whatever

safe dragon
#

typescript typing is great

cinder karma
#

I like it when I know the memory layout smh

runic kraken
steel kraken
#

but purescript isn't readable code

cinder karma
#

That said, union types

runic kraken
#

It supports higher kinded types with row polymorphism

runic kraken
devout vault
#

First time I've ever sat down and made tests for something to ensure it was correct before actually integrating it into the wider system

safe dragon
#

I love being able to be like "this function accepts any object with an id field"

devout vault
#

Or really made much for tests at all

devout vault
#

Tomorrow I'll be making some "tests" that are just for profiling purposes to compare the new implementation to the old one. I'm sure there's plenty of room for me to optimize the new one

prisma flume
#

huh. const cat: number = 'dog' as unknown as number is valid. of course it is

safe dragon
#

my biggest gripe with javascript outside of the complete fucking nightmare that is the Date API is honestly just the lack of any good systems to avoid memory allocations. Like there's no slices/spans for example without diving in some of the most cursed Proxy code imaginable

steel kraken
#

its not poor mans interfaces though.
it doesn't require annotating other types, it accepts anything that matches the pattern

runic kraken
thin estuary
#

does ANY lang's stdlib come with a good date API

lethal walrus
#

purescript does compile to just slightly cursed js

var main = /* #__PURE__ */ Control_Bind.bindFlipped(Effect.bindEffect)(TryPureScript.render)(/* #__PURE__ */ TryPureScript.withConsole(function __do() {
    Data_Foldable.for_(Effect.applicativeEffect)(Data_Foldable.foldableArray)(Data_Array.range(10)(1))(function (n) {
        return Effect_Console.log(show(n) + "...");
devout vault
lethal walrus
#

oh is it just using Effect

safe dragon
#

uh the C# DateTimeOffset API is honestly very good

prisma flume
#

stardew valley has a pretty good date api SDVpuffercowboy

thin estuary
runic kraken
devout vault
runic kraken
#

Who cares what the compiled output looks like

steel kraken
#

I miss DateTimeOffset

red crest
prisma flume
thin estuary
#

i don't remember if C#/.NET started with that

safe dragon
#

it did not

runic kraken
cinder karma
safe dragon
#

DateTime would just work how DateTimeOffset does if it had existed from the start I think

prisma flume
steel kraken
#

JS does have Temporal api now for everywhere except safari

runic kraken
#

If we're talking date api, GO has the worst date API on the fucking planet

safe dragon
#

it does but it's going to take a while till I can actually use Temporal

#

and it's still not really that good

runic kraken
#

I seriously hate GO so fucking much it cannot be quantified

safe dragon
#

it's just not activley harmful

devout vault
runic kraken
cinder karma
red crest
#

Don't act like you know what a video game is

prisma flume
red crest
#

I was about to bring up that same thing

#

Clearly it's not even good enough for a video game!

prisma flume
#

fortunately lies outside of the worlddate api so my claim stands

devout vault
#

Any date api is incomplete without a time api

red crest
#

Ah but your original message only said "date api" not WorldDate api

prisma flume
#

wtf

red crest
#

I'm in agreement with Casey here

prisma flume
#

meaning both are separate and distinct

red crest
#

Python is no role model language to me

red crest
#

Someone's replying as they backread

runic kraken
rain apex
#

Ppl who do C# for work do y'all use monorepos pippleDot

red crest
#

Wouldn't that be kinda up to your employer

devout vault
dusty pollen
devout vault
#

Yes I know that's not an equivalent comparison now hush

prisma flume
rain apex
#

There r ppl upstream from me doing monorepos for ??? reasons even though my work generally don't do that

devout vault
cinder karma
red crest
#

People who do C# for work would you like to trade with me

devout vault
rain apex
#

Whether it is you choose to do it or work is already doing it and changing away would suck

dusty pollen
steel kraken
cinder karma
#

I kinda like the idea behind go's typing system

devout vault
#

I can't think any job I'd trade my current one for

cinder karma
#

But I've never done go professionally

steel kraken
#

If its using project references same repo, if its doing it indirectly via private nuget or whatever then different repo

dusty pollen
#

also any language that integrates oop features but not access modifiers should be jailed

rain apex
#

For reasons I don't comprehend the ppl upstream of me put a bunch of nebulously related rust crates in 1 repo

cinder karma
#

I've done so much insane shit with decorators

steel kraken
#

access modifers are a meme anyway in languages with reflection

cinder karma
#

Eh, I would still

prisma flume
dusty pollen
red crest
cinder karma
steel kraken
#

I used to professionally do C# but stopped in may 2024

cinder karma
#

You what

#

Oh you're TS now

steel kraken
#

Currently im Jinja/Groovy/Yaml templates

cinder karma
#

What

rain apex
#

There's like 6 languages at use for my work and I'm dreading the day they make me touch ruby

red crest
#

I forgot ruby was a thing

steel kraken
#

I don't actually ship code anymore and configure the vendor system to do it due to org change / team changes

cinder karma
#

I might need to touch perl lol

rain apex
#

Woe upon ye

lethal walrus
cinder karma
#

Anyways I have an opinion on languages

#

Which is "if you're willing to pay me to write it I will"

#

Regardless

rain apex
#

My opinion on language is that i write fun things faster and making wheels kind of suck

#

But this has no bearing on what I'll do for work code so

cinder karma
#

Secretly I love programming language nerdy

#

But if I get paid I will write net framework 4.6 lol

steel kraken
#

Majority of my professional time in C# was 4.6

#

but it was also my project to have it stop being 4.6 and bring it to be up to date

cinder karma
#

(4.6 is the version used to interop with labview)

runic kraken
#

but forcing it is horrible

dusty pollen
#

I’m an OOP liker 😌

runic kraken
#

classes have some use but having to use them for everything is a warcrime

steel kraken
#

I did get the solution wide bump to 4.7.2 and then move anything that was a library project to netstandard2.0 to then move the exectables to .net5 only after we did the EF6->EFCore, and our web project from asp.net to asp.net core

prisma flume
#

i've had to dial in the amount of inheritance i've been shoving into our work codebase

dusty pollen
#

but I’m also a functional programming liker so maybe I’m just weird

prisma flume
#

it's turned into a family tree

#

you have to go back generations and ask your class' grandparents about interface implementation

steel kraken
#

I don't mind OOP but I'm very pragmatic and use it to not repeat myself but won't blindly try to use polymorphism when a switch statement would do it better

dusty pollen
#

I think that’s the technically correct use of OOP though?

#

like what you do

steel kraken
#

not if you listen to mr martin and follow Clean Code®™

rain apex
prisma flume
#

otoh one of my recent pain points at work was cross-comparing three nearly identical files where every symbol was renamed but the actual functionality was the same other than like two string literals

dusty pollen
#

I listen to nobody and prefer my code with marinara

prisma flume
#

multiplied by 3

#

why did you fools not just use simple inheritance

devout vault
steel kraken
#

I'm glad I'm no longer in my previous team

dusty pollen
#

this sounds beyond inheritance, it sounds like it could have been a single param somewhere

cinder karma
steel kraken
#

because I think if I actually tried I could shrink their codebase by 70% by not having everything repeated and delete 2-3 layers of abstraction

devout vault
steel kraken
#

but they actively enjoyed the practice of "new functionality, just copy paste a bunch of files and tweak the contents slightly if needed and find and replace the noun with a different one"

prisma flume
#

ts, so single inheritance and interfaces

#

but we're increasingly shifting to mixins on a lot of things which is nice

cinder karma
rain apex
runic kraken
# dusty pollen but I’m also a functional programming liker so maybe I’m just weird

I like functional programming, and absolutely hate OOP with every fiber of my being, but I do see the use in it and am fine writing C# but I write very un-C# C# (nothing like the cursed monads though, that was an out-lier). I just write a lot of lambdas, use absolutely ZERO null types, and keep it to a very very very basic and minimal use of classes, preferring structs or records and readonly 99.999999% of the time

rain apex
#

Unfortunate that 1 morbillion dollars is a lot of dollars

steel kraken
#

I think in my monopoly codebase, the only inheritance I have is between interfaces to not repeat common fields.
no class I think actually extends a different class

rain apex
runic kraken
#

F# is unfortunately mostly abandoned

#

and VB.NET is my worst nightmare

rain apex
#

But it just for fun yes yuniShake

cinder karma
#

Fwiw, when I did c# in mods, I eventually also kinda adopted structs

rain apex
#

You can always go finish the rust clr

cinder karma
#

Structs, readonly as much as possible, etc

prisma flume
#

structs make me a little ill

steel kraken
#

if I trust github search, I indeed only extend between interfaces or generic constraints

prisma flume
#

i just don't see the value and openly resent them for so often being unable to simply change a value on an instance without instead having to recreate the whole instance

runic kraken
#

I hate untracked mutability

#

I cant 'visualize' the flow of code (literal impossibility), so it becomes a nightmare to track what is changing what

rain apex
#

I abuse mutability frequently with abandon MikuBear

prisma flume
#

for something called a valuetype they sure are valueless to me

cinder karma
#

Jk jkjjk

rain apex
#

But to be fair that's probably because I only write modding C#

cinder karma
#

But often it is possible to grab a reference to a struct

#

And change the original

rain apex
#

And not sensible enterprise C# or whatever

steel kraken
#

it is nice being able to pass it into a function and knowing it was impossible for it to mutate the value

cinder karma
#

An effton of structs passed by reference

prisma flume
#

is that not the use case for in

#

the sweet silence as a dozen people go to search the ms docs for in

cinder karma
#

Fwiw, a huge part of it was just trying to give the GC as little work as possible

cinder karma
#

Like I wouldn't know in well

prisma flume
#

i think i've seen in exactly once. in pathos code, of course

steel kraken
#

I very rarely see in be used, but it does require the function to proactively declare that it doesn't mutate stuff

devout vault
prisma flume
#

it's worse with rectangles honestly

devout vault
#

True

cinder karma
#

Thanks, Pathos

#

(It surfaced a Pintail bug)

prisma flume
#

can't just inflate or width, oh no. gotta make a new rectangle with explicit xywh values and can't even just use points because they have virtually no arithmetic overloads

rain apex
cinder karma
#

That is why I have spent too much time with the in keyword

steel kraken
#

it was very weird when doing my cache stuff in the IRawTextureData stuff where copying it was just assigning it to another variable

runic kraken
devout vault
#

Speaking of rectangles and other monogame types. I hate how some things are obj.ModifyInPlace(...) vs obj.ReturnedModified(...)

runic kraken
#

Data should not be "reached into" and mutated at will

rain apex
#

And many more when you harmony prefix ref mutate stuff

cinder karma
prisma flume
#

data should be "reached into" and mutated at will

steel kraken
devout vault
#

Like Rectangle has Inflate, which is in place and returns void, but what if I want don't want to make a temporary variable for it?

rain apex
#

So yeah i think it's at least partly bc there is nothing clean about modding to begin with

red crest
#

I don't know the difference between ref and in

cinder karma
rain apex
#

Crimes go brr

prisma flume
devout vault
#

...did you really just compare mutable data with killing puppies

safe dragon
runic kraken
devout vault
#

what

cinder karma
#

Insane enough to spend literally years making mods just to throw it all away

devout vault
#

are you okay

runic kraken
#

Mutating random data leads to massive race conditions, it also leads to being able to not track state

rain apex
prisma flume
#

some kind of ichorous tower

rain apex
#

I am very aware of the foundation of sand

cinder karma
safe dragon
runic kraken
cinder karma
heavy daggerBOT
steel kraken
#

what race conditions, [on topic redacted] is single threaded

cinder karma
#

Smh

red crest
#

Jokes like this are not appropriate for this discord.

cinder karma
#

Tbh I think a lot of that is opengl

devout vault
runic kraken
prisma flume
safe dragon
#

even singlethreaded code can have race conditions with async!

runic kraken
#

I can think of a better metaphor anyway

steel kraken
#

[redacted] has very little async either

safe dragon
#

I figured

runic kraken
#

It just leads to a million traffic jams if you allow yourself to mutate data and its across threads or network packets, like mods usually are

steel kraken
#

the only places I can think of with any is [redacted] and [redacted]

devout vault
runic kraken
#

what is redacted

rain apex
devout vault
#

@ chu - no

safe dragon
#

this is off topic so the video game this server is about is not to be mentioned...

prisma flume
#

i think there's async in the kitchen. and another one in the bathroom

safe dragon
rain apex
#

For some on topic off topic what does Rc RefCell Arc etc all do LilyDerp

#

I vaguely get the concept of ref counting and that i put me things in here so I can clone them

devout vault
steel kraken
#

rc is the runecrafting skill, arc is the dead mmo right

rain apex
#

No arc raiders is on steamdb top 10

prisma flume
#

refcell is probably to do with biology

devout vault
safe dragon
fleet wren
#

does the book™ not answer those

safe dragon
#

yes

devout vault
#

re:the modifying structs thing earlier

steel kraken
cinder karma
#

Arc is atomic reference counted

rain apex
#

I am trying to figure out if there's something other than RefCell I can use

runic kraken
rain apex
#

If i indeed require borrow_mut

devout vault
cinder karma
#

If you're careful with your scoping

runic kraken
#

so this is pure code and there should be no risks with it

steel kraken
#

(other than the risk of allocations and making the GC do more work)

runic kraken
steel kraken
#

every time the GC is working is time no thread is working and results in inconsistent frame pacing and giving a stuttery feeling to users

devout vault
#

They're structs, I don't think allocations are a problem here, especially since I explicitly use that when I want it for a temporary purpose (like passing in to a function)

runic kraken
steel kraken
#

and C# isn't one of them

safe dragon
#

especially not Unity's GC which is awful...

cinder karma
rain apex
#

Are there alternative GC implementations for the .net runtime

#

Is that a thing u can do

steel kraken
#

out of the box theres the workstation and server GCs

#

with a bunch of knobs to fine tune

supple ether
#

I think custom gcs are a thing

steel kraken
#

Theres also the Satori GC which I was playing with, but there is no true pauseless GC

rain apex
#

Are you allowed to fiddle with it if you ship the whole runtime

steel kraken
#

yes I have [redacted] builds in .net9 with satori

rain apex
#

But it is not like you can just say my dll will use this GC right

steel kraken
#

you need to replace parts of the runtime because its not just the GC, parts of the runtime needed different hooks to behave better

rain apex
#

The (probably not great) analog in my head is jemalloc which is just a shared lib LilyDerp

cinder karma
#

Tbh one of the nice things with zig

safe dragon
#

all I know is that Unity does funky shit and their move to CoreCLR is still not there yet as far as I know so they're still using the mono runtime

cinder karma
#

I love the idea of being able to switch on a different allocatior

#

Crumble bevy game when

safe dragon
#

the bevy game jam just ended

cinder karma
#

You're late not dead

safe dragon
#

perhaps I am

devout vault
safe dragon
#

honestly imagine being stuck in the mono runtime still in 2026

steel kraken
#

I did .net9, .net9 + satori and .net10

safe dragon
#

tbh even if you're using rust there's real benefit to being careful with how much memory you allocate

steel kraken
#

particularly with the current RAM market

safe dragon
#

allocating memory isn't an instant operation either

steel kraken
#

and reading memory is not an instant operation either

safe dragon
#

stackalloc everything

rain apex
#

I need to make less tokio runtimes I think

steel kraken
#

even the stack becomes memory operations if it isn't in l1/l2 right

rain apex
#

There r dum hacks we did LilyDerp

safe dragon
#

stack vs heap are just an abstraction after all

#

it's just memory ultimately

cinder karma
#

U guys get a heap?

#

(Jk, jk, jk)

safe dragon
#

I get lots of heap

rain apex
#

Just alloc shared mem ez

#

(this is a lie it is big pain)

safe dragon
#

shout-out to the day I finally made a release build of my work web application and just so happened to freeze my versions on one with an absolutely horrendous memory leak in svelte

cinder karma
#

I still want to learn zig

#

For no real reason

rain apex
#

Just do it 4 funs

cinder karma
#

Otoh ocaml feels like it belongs to a younger generation

safe dragon
#

Noone ever noticed but I was losing my marbles when I noticed the tab was using 2 entire gigs of memory after scrolling through the datagrid for a few minutes

cinder karma
#

But it feels like i Should Learn That

#

It's 2026 now

#

It's all vibes

safe dragon
#

zig seems neat

#

mainly its allocator stuff and comptime

devout vault
#

I don't know why we're so concerned about allocating memory when you can just download more

cinder karma
#

Use 8GB of vram on your openclaw model

#

It doesnt matter anyway

#

🫧

devout vault
#

What even is openclaw

safe dragon
#

can't wait for my personally hosted AI to dox me online after a disagreement

devout vault
#

Besides more generative AI nonsense I assume

safe dragon
#

basically boils down to installing AI malware with full system access, giving it a personality description in a file and then seeing what it does

#

maybe it will rant online on moltbook, maybe it doxes someone randomly

#

maybe it emails your boss saying that they're a bitch

devout vault
#

...huh????

#

what????

#

sigh

safe dragon
#

it's very innovative

cinder karma
#

Anyways you should ignore me

#

I'm old and grumpy

devout vault
cinder karma
#

Hopefully I'll have made every dollar I need to survive before AI hits

#

Annnnyways zig seems fun

rain apex
#

There's too many ways here

#

Inverse rome situation

cinder karma
#

You know I wasn't joking about selecting thr behavior u want for addition lol

heavy daggerBOT
devout vault
#

For those who missed it, this apparently has two follow up articles about further events

cinder karma
#

ROCHESTER, MN—In an effort to help working individuals improve their fitness and well-being, experts at the Mayo Clinic issued a new set of health guidelines Thursday recommending that Americans stand up at their desk, leave their office, and never return. “Many Americans spend a minimum of eight hours per day sitting in an office, but we ob...

runic kraken
#

my toy compiler now lexes everything I throw at it 🎉

  [OK]          Token Tests          0   lexing: '1 + 2'.
  [OK]          Token Tests          1   lexing: '1 + 2 * 3'.
  [OK]          Token Tests          2   lexing: '-5'.
  [OK]          Token Tests          3   lexing: 'let x = 10'.
  [OK]          Token Tests          4   lexing: 'let x: Int = 10'.
  [OK]          Token Tests          5   lexing: 'if x > 0 then x else -x'.
  [OK]          Token Tests          6   lexing: '\x y -> x + y'.
  [OK]          Token Tests          7   lexing: 'f x y'.
  [OK]          Token Tests          8   lexing: 'f (x y) z'.
  [OK]          Token Tests          9   lexing: 'f $ x y'.
  [OK]          Token Tests         10   lexing: 'f . g . h'.
  [OK]          Token Tests         11   lexing: '{ x; y; z }'.
  [OK]          Token Tests         12   lexing: 'let x <- m'.
dusty pollen
#

@pliant snow I finished exapunks btw

why are the bonus levels always so much harder than the main campaign levels though lmao, genuinely thought I'd have to give up on even making it to the histograms on the last one

#

but all achievements done except the minigame ones

#

oh how times have changed SDVpuffersquee (100%ed tis-100, 100%ed exapunks except for the minigame achievements, easily two of my favourite games now)

cinder karma
#

Atra has played none of them btw

dusty pollen
#

my zachtronics tierlist/ranking is now

top: opus magnum, tis-100, exapunks
last call bbs fairly close after those three

biiiiig gap and then
spacechem is meh
and I really didn't mesh with molek syntez

dusty pollen
cinder karma
#

I will say sometimes I joint a new discord server and I'm sad that I cant use their emojis in other locations

#

Or the very cute pufferheart outside of here

#

Like knitting heart

#

Anyways

#

What the heck is up with ars technica

#

I feel like I've stopped reading them in the last few years tbh

runic kraken
#

Thoughts on my language syntax?

fn main() -> Eff Unit = {
  let name  = "Stardew chat" // purely immutable, no changing ever
  let name  = "everyone"     // reassigning shadows
  print # "Hello world! How are you " ++ name

  // operators: + - * / % < > == != <= >= && || >> >>= <*> <#> <|> <&> (.) ++
  
  loop (n = 0) { 
    if n < 10 then { 
      print . to_string # n
      next (n + 1)
    } else ()
  } 
}
rain apex
#

Crabby

runic kraken
rain apex
#

Ambivalent about having then but also {} for the if block

runic kraken
#

{ } is a monadic chain of sequenced actions

In functional programming, monads are a way to structure computations as a sequence of steps, where each step not only produces a value but also some extra information about the computation, such as a potential failure, non-determinism, or side effect. More formally, a monad is a type constructor M equipped with two operations, return : <A>(a : ...

#

if cond then expr else expr is the default syntax

#

I could special case it I suppose

cinder karma
#

What's #

rain apex
#

Hm what if u have fi sugar for else ()

runic kraken
rain apex
#
if cond then {
    Happenings
} fi
runic kraken
#

else is non optional

cinder karma
rain apex
#

Yeah i did say it's sugar

runic kraken
rain apex
#

As if u #define fi else ()

runic kraken
#

there is no preprocessor defines

runic kraken
cinder karma
#

I dont like fi personally

runic kraken
#

its monadic, not step-by-step

rain apex
#

I don't think i entirely understand the design tho so pay no mind to silly aesthetic suggestions

cinder karma
#

I also despise endcase

#

(Systemverilog)

rain apex
runic kraken
#

this whole thing desugars to

fn main() -> Eff Unit = 
  // Bind the first name
  (\name -> 
    // Bind the second (shadowing) name
    (\name -> 
      // Execute the print effect, then sequence the next action
      seq (print # "Hello world! How are you " ++ name) (\_ ->
        
        // Define the recursive loop as a self-calling identity
        let loop_fn = (\n ->
          // The 'if' is a pure expression returning a monadic action
          if (n < 10) 
          then (
            seq (print # to_string n) (\_ ->
              // 'next' is just a recursive call to the loop function
              loop_fn (n + 1)
            )
          )
          else (pure ()) // 'else ()' lifts the Unit into the Eff monad
        ) 
        in loop_fn 0 // Initialize the loop rail
        
      )
    ) "everyone" // The shadowed value
  ) "Stardew chat" // The jettisoned value
rain apex
#

Oh it makes a lot more sense with the parenthesis written out

runic kraken
#

this is the functionally equivalent version

#

and this is it desugared using monadic operators

fn main() -> Eff Unit = 
  // Bind the first name, then feed it into the next identity
  pure "Stardew chat" >>= (\name -> 
    
    // Shadow the first name with a second binding
    pure "everyone" >>= (\name -> 
      
      // Execute the print effect and discard the result (Unit) via sequencing
      (print # "Hello world! How are you " ++ name) >>= (\_ ->
        
        // The loop is a self-referential monadic transition
        let rec loop_fn = (\n ->
          if (n < 10) 
          then (
            // Composition of morphisms (print . to_string) applied to n
            (print . to_string # n) >>= (\_ ->
              // Recurse into the next step of the rail
              loop_fn (n + 1)
            )
          )
          else (pure ()) // Close the vacuum with a pure Unit
        ) 
        in loop_fn 0
        
      )
    )
  )
rain apex
#

Do u have plans on other kinds of loops?

runic kraken
#

its not a loop

#

its a recursive function in disguise

#

its functionally impossible to do a loop in this language like a C/C++ loop, because everything is immutable

#

once you set x, you can never change x

cinder karma
#

Also I always have to Google the damn switch case syntax lol

rain apex
#

Well yes but u r obscuring it under the hood as is

runic kraken
#

its not a loop, its functionally impossible to define a loop

#

loops require variables and mutating variables

#

you cannot do ```
let x = 1;
x = x + 1


in this language
rain apex
#

So it's more q of do you want to make a thing which resembles for

runic kraken
#

its basically forM

rain apex
#

Or will there only be the tail call looking thingy bolbthinking

runic kraken
#

I may, we'll see. I dont want to lead people astray too much

#

  loop (n = 0) { 
    if n < 10 then { 
      print . to_string # n
      next (n + 1)
    } else ()
  } 

its really not that complicated to use

rain apex
runic kraken
#

you give it a list of input bindings

runic kraken
rain apex
#

Is scope a thing ppl can use explicitly (ig that's just the expanded version?)

runic kraken
#

nothing ever gets changed, even loops. it just "fakes" changes while being absolutely, 100% mathematically pure

runic kraken
#

{ } is not a scope but monadic do notation. { e1; e2; e3 } is the exact same as e1 >>= e2 >>= e3

rain apex
#

Yeah i was wondering if the (\ident -> ... ) was part of the language spec

runic kraken
#

it is thats a lambda expression

#

the grammar for the language is tiny

rain apex
#

I have no idea what this is practically useful for but it's neat 3sSmolMiku

runic kraken
#

I could write it in a single page of paper

let x = 10
let x: Int = 10
let y = 5 in y + 1        // let in
let z = z + 1 where z = 5 // where

data S = S(x: Int, y: Int)
enum E = A | B

if x > 0 then expr else expr
loop (bindings, bindings) 

// function application
f x y
f (x y) z
f # x y

// function composition
f . g . h
f . g # x y

// monadic/applicative/alternative operators
m >>= f
m >> f
f <*> x
f <#> x
m <|> n

// block and bind
{ e1; e2; e3 } // block: semicolons optional
let x <- m     // bind
#

thats it, thats the whole language so far

#

@rain apex

runic kraken
rain apex
#

When would you use where

runic kraken
# rain apex When would you use `where`

for defining variables after the equation eg

let complex_equation = sum_of_things + gravity * (e - mc2)
  where
    sum_of_things = ..
    gravity = ..
    e = ..
    mc2 = ..
rain apex
#

But it is not like i can defer the where right

runic kraken
#

no

rain apex
#

So it is just for readability? DokkanStare

runic kraken
#

yep

#

if youre reading math you often say this is the equation, where these are the values for the equation. its the same concept here

#

the inverse would be let in e.g let x = 5 in x + 1, which would return 6

rain apex
#

I escaped maff by 2nd year colleg you will never catch me 3sCatrun

runic kraken
#

THIS is how you do scoped variables btw

#
let x = 1 in
let y = 2 in
let z = 3 in
  x * y * z

OR

let result = x * y * z
  where 
    x = 1
    y = 2
    z = 3
#

each let x in expr creates a new scope for that expr implicitly

#

so if you wanted local variables (immutable ofc) for a function, you could do this

#

you cannot use let x = 5 normally in a function but it is special cased for monadic blocks { }

thin estuary
#

...although i think the postfix/finalizer could just not be a ref lol

dusty pollen
runic kraken
#

im curious, do you find my parameter naming convention unreadable? or readable? it makes sense to me and it is far less verbose than something like and parse_enclosed parse_state opening_bracket_token seperator_token closing_bracket_token function_handler element_constructor

and parse_enclosed pstate o s c f ct =

#

I could not keep the incredibly verbose version in my head for more than 5 minutes

dusty pollen
#

@safe dragon and so it begins again

steel kraken
# dusty pollen terrible. why isn’t this just a factory pattern

I mainly hated their "route file" -> "controller file" -> "service file" -> "repository file" layers of abstraction.
and ofc grouped on filesystem by type not semantic, so all the routes are together, so tracing out a specific endpoint has you yoyoing across the entire repository constantly going up and down

safe dragon
steel kraken
#

and it was so repetitive that they also copy pasted the unit tests too, and so when I started cleaning up the unit tests I had to fix the exact same mistake like 10 times

safe dragon
#

infinifactory?

#

I vaguely remember struggling with that 3dness of it

#

I mostly just tried to find a solution

dusty pollen
#

yup

#

I hate 3d games so idk how long I'll last tbh

#

my poor laptop also hates them, 96C

safe dragon
#

toasty

prisma flume
#

at least the last two months have just been code cleanup more than anything else

#

which sadly means so many merge conflicts

safe dragon
#

at my old job a lot of copy pasting was done for the old frontend code because I think most people didn't even understand anymore how it worked

#

old WebForms code my beloathed

#

we actually had someone come in a few years into my job there with actual knowledge on WebForms and he was seemingly very upset by most things he discovered

dusty pollen
#

frontend code is just that kind of cursed though

steel kraken
#

I think a common problem is people dismiss the frontend as easy, and so it pretty much gets majority junior / inexperienced devs that blindly do shit and not actually think about architecting the codebase

#

so you just get layered spaghetti of whoever is the current devs flavor of the month solution to state management or whatever

#

I fought for years to have serious discussions at work about architectual principles for frontend

dusty pollen
#

that and the idea that it's "not real dev". it's real dev that I really want to stay far far away from

steel kraken
#

I think in pretty much every project I've worked on, the frontend was more complex than the backend but had less experienced devs on it

dusty pollen
#

what were you doing? most things I've worked on had glorified forms for front ends lmao

#

(I still wrote them terribly, of course)

steel kraken
#

I've spent a lot of time with geospatial data visualisation, graphs and misc data management

dusty pollen
#

I did a map data viz once, submitted my first ever open source pr to the (at the time active) library I was using, and it apparently got abandoned exactly at the same time so it never got merged lmao_dog

steel kraken
#

but particularly compared to a stateless rest API, the frontends job is to be the system that has to do all the state management to keep the server simple

dusty pollen
#

(blanking info didn't work properly iirc so you couldn't leave some areas blank if your data was sparse)

steel kraken
#

even in the simple form case, you have validation per field, error handling, accessibility and then handle all the corner cases like auth session expiring, server throwing errors and how to gracefully handle them to not make the user experience shit

dusty pollen
#

oh right, the bare minimum good practices

...you would have an aneurysm if you read the code I wrote as an intern

steel kraken
#

extra points when the form is for making changes to something and handling the http 429 race conditions of someone else changing it first and to gracefully handle that case

dusty pollen
#

no need! we had five interns working on an app with a single user

#

(I wish I was joking. I really wish they let her just keep her excel spreadsheet instead of making her deal with that)

steel kraken
#

I did have working code for automatically handling the 429, getting the new concurrency token, diffing to see what the new version of the data is and seeing if the users change is still needed and resubmitting it.

but it hit corner cases in the server code where the GET /resources/:id had less privileges than the PATCH /resources/:id and GET /resources, so the code couldn't actually get just the one back

dusty pollen
#

have you ever dug through nexus' frontend

#

it made me feel better about my frontend dev abilities tbh

safe dragon
#

I've worked on complicated backend code but frontend always seem to become complicated

#

especially if you really want to do this "right", keeping in mind stuff like accessibility or how responsive it is on poor internet connections

pliant snow
#

I dont suppose anyone here has ubiquiti devices and are familiar with vlans

cinder karma
#

Work has them

#

I'm not familiar

safe dragon
#

add some flair

pliant snow
#

ubiquiti server requires phone number wtf

devout vault
devout vault
heavy daggerBOT
safe dragon
#

(content patcher)

long verge
#

Yeah don't abbreviate it

lethal walrus
#

It's perfectly normal to abbreviate it in the stardew valley context. However, probably not a good idea given how trigger-happy discord is with those two letters, even in extremely benign contexts

runic kraken
little furnace
little furnace
#

Or maybe even just opening. I don't really understand the context though.

lethal walrus
little furnace
#

We need a new platform like Matrix, but hopefully something that can also host a single "server" on multiple servers.

lethal walrus
cinder karma
#

Clearly we should move to mastadon

#

Speaking of video games, how many socks?

runic kraken
safe dragon
# runic kraken im curious, do you find my parameter naming convention unreadable? or readable? ...

I generally would avoid names like that that are completely impossible to understand unless you happen to have prior knowledge what they stand for. It's fine for things that have become an established standard at a greater scale like i for a loop index or x/y/z for coordinates but otherwise I avoid that stuff. Variable names should be treated as a type of documentation, they play a role in explaining what the code is actually doing

runic kraken
#

I find the shorter more cryptic ones easier and descriptivity does not matter, I dont care about telling a story, I write code to express logic

worn remnant
#

i am a terrible C person and i don't use an IDE, so i like names to be as verbose as necessary but no more

runic kraken
#

the one time I do use verbose variable names are in for loops since I need to be able to track state

little furnace
devout vault
#

I’m definitely not neurotypical (ADHD go brrr) and I agree with Crumble.

little furnace
#

I have been diagnosed with autism since the age of 6.

runic kraken
safe dragon
#

xs/ys are fine list variable names (especially in functional programming for which it is convention) but really only if the list you are iterating over is actually generic and not something you care about.

Like a fold function can take an xs because it's not concerned with the contents, just that it's a list. But if your function expects list of employees that variable name should probably contain the word employee preferably not even just emp

#

I have aphantasia as well and yeah I have no such issues

runic kraken
#

I mean this is coming from the person who wanted to make friends but hated the idea of NT vibing and socializing SO much that I literally 'reverse engineered' some people mid VC and built a map of their behavior so I have a mask now

runic kraken
#

I keep my variable names one word at minimum and im fine

marble jewel
#

Autistic here. I like long variable names. I've encountered too many abbreviated variables (or column names) that no one around could remember what they represented. It's frustrating.

runic kraken
#

But any longer and i start to be unable to manage it

runic kraken
#

or any ML language

#

2 letter variable names are common and good practice

little furnace
# runic kraken Its maybe unique to me then

Do you have a diagnosis for stuff? Because having one might help you when it isn't just your code, like at work or something.
Also, please don't take any of this the wrong way, everything is subjective and both you and your perception are valid.

marble jewel
#

I deal with them as required, but some people just get too darn clever for their own good mashing up a dozen consonants

safe dragon
#

I've been in enterprise C# for too long to be bothered by long ass names anymore... We had a TransactionItemProductDiscountHelper at my old job

runic kraken
#

i store everything in what can only be described as a vector space but mentally, because i have no visual or episodic memory of any kind

safe dragon
#

all the TransactionItemProduct things were fun cause we often abbreviated the variable name to titProduct which was the only amusement to be gained at that job

runic kraken
#

so the extra verbosity is just useless fluff

devout vault
frosty echo
runic kraken
#

also until a few weeks ago i thought flashback was just a metaphor

devout vault
#

I mean I definitely don’t mean a literal flashback here. I’m just being dramatic, because it’s fun

safe dragon
#

I will take a variable called employeeAvailabilitySheet over an empAvails or something funky

little furnace
long verge
#

I stand with Crumble

runic kraken
#

i dont need 40 characters for a variable

safe dragon
#

but how are you going to feel 4 years later when you're back in this code and see some variable name that's not very descriptive of what it is and you have to go on a hunt to figure out what it means

long verge
# long verge I stand with Crumble

I will even go further and say that if someone show me a piece of code with only 2-3 letters variables names, i will probably not even bother to read it

marble jewel
little furnace
devout vault
little furnace
safe dragon
#

there are definitely better alternatives...

#

I just made something up on the spot

long verge
devout vault
#

Like if it was a function dedicated to during stuff to a passed in employee? Don't need the employee part, unless there's other availability sheets in that some function

safe dragon
#

you'll find plenty who agree with your stance in the more math-y parts of computer science though. Like one glance at shadertoy code is enough

marble jewel
#

Most of the people I've encountered who develop code using bad abbreviations are the ones who aren't having to own the code long term

little furnace
devout vault
#

That's sorta why the MM dungeon generation ended up with so many short numbers - ended up using mathematical stuff for it some, and got carried away

marble jewel
#

So it's not their problem

devout vault
#

I am very whimsical
-# in that I get carried away by my whims

safe dragon
#

mario maker dungeon generation...

devout vault
#

I literally just mentioned it a few messages ago, smh

safe dragon
#

moon misadventures

#

ok I found it

devout vault
#

It's almost like the person who never steps into modding space doesn't know modded acronyms offhand

runic kraken
#

I just treat it like logic or math

#

same way with how i comment

devout vault
#

(Though it was never a mod that took off in popularity to begin with)

runic kraken
#

example from my recent project:

and parse_where_clauses pstate : Ast.Clause.t list parser_result =
  (* let result = expr where x = 10 *)
  let parse_clause ps = 
    advance ps |> ignore; (* consume 'where' *)
    let* id = expect_ident ps in
    let* ty_opt = 
      match peek ps with
      | Some T.Colon ->
          advance ps |> ignore; (* consume ':' *)
          let* ty = parse_type ps in
          Ok (Some ty)
      | _ -> Ok None
    in
    let* _ = expect ps T.Eq in (* consume '=' *)
    let* expr = parse_expr ps in
    Ok (Ast.Clause.Where (id, ty_opt, expr))
  in

  (* parse many where clauses *)
  let rec loop acc =
    match peek pstate with
    | Some T.Where ->
        let* clause = parse_clause pstate in
        loop (clause :: acc)
    | _ -> Ok (List.rev acc)
  in
  loop []
long verge
runic kraken
#

i dont see how this is unreadable

devout vault
# runic kraken I just treat it like logic or math

And logic and math is much clearer when you don't have to go back and check multiple things to recall what its for - especially if its code you aren't intimately familiar with.

As others said, it's fine if it works for you, but I find that slightly longer variables names is a good compromise (compared to really long variable names) for remembering what I did a week later.

little furnace
runic kraken
long verge
runic kraken
#

i can understand both sides, i just disagree

safe dragon
#

Your actual code is effectively the only documentation that can't get out of date with reality ignoring (often global) variables whose name is not longer representative of all the shit it does

devout vault
# runic kraken i dont see how this is unreadable

If I hadn't seen you working on programing stuff recently, I would have no clue what this was about besides parsing something. And even still have no clue what several of those variables are.

And some of them I need to go back to where they were defined to figure out, which can work fine, but sometimes it's nice and quick to figure things out if you don't have to learn the full backstory of the function just to fix a bug you ran across in a small portion of it.

little furnace
marble jewel
#

Anyway, if you're writing code that pretty much only you are going to look at, the conventions that make the most sense to you are the ones that matter. I deal with code that others may support in the future, or code written by others, which is why we have standards.

cinder karma
#

Trainchinese is the best app I've found on this

devout vault
cinder karma
#

(It is paid but quite cheap)

runic kraken
runic kraken
safe dragon
devout vault