#๐Ÿช…-progaming

1 messages ยท Page 75 of 1

median root
#

ill use pascal case if i dont feel like reaching to the corners of my keyboard for the goddam underscore

spark tiger
#

lmao is it real

hoary sluice
spark tiger
#

insane

hoary sluice
#

he actually shills linux now

#

might actually make a pretty big impact

#

110M subs

#

and the video is really good

#

its an r-a bug i think

#

ive had those and they usually just go away

#

or more likely you dont have option imported or something like 98 said

#

this isnt about casing

#

rust has an enum variant called None and rust-analyzer gets confused because its not snake case

#

but None is correct

median root
#

yeah i know

hoary sluice
#

@valid jetty

macro_rules! err {
    ($kind:expr, $location:expr) => {
        Err($crate::error::Error::new($kind, $location))
    };
    ($kind:expr, $location:expr, $help:expr) => {
        Err($crate::error::Error::with_help($kind, $location, $help))
    };
}
valid jetty
#

most necessary macro

hoary sluice
spark tiger
#

why are errors such a pita in rust. like if during my method it can throw two different error types, how the hell do i even type it

#

like -> Result<T, ???>

hoary sluice
#

now im too incompetent to write a regex to replace all my non macro errors

hoary sluice
spark tiger
#

what's the magic here

#

like i get what dyn error is

#

but

#

why box

hoary sluice
#

idk

spark tiger
#

isnt box something related to heap/stack

hoary sluice
#

rustc: the size for values of type (dyn std::error::Error + 'static) cannot be known at compilation time
the trait Sized is not implemented for (dyn std::error::Error + 'static)

fleet cedar
#

Or, yes, you can use a catchall error if you don't care

spark tiger
#

why does it say Ts instead of TypeScript lol

#

ts

pearl stagBOT
placid cape
spark tiger
#

thank uu! and yeah i've starred it already before

placid cape
#

the ts icon doesnt work rn because of discord cache but should work in like ~15 minutes

spark tiger
#

i think your repo is like one of the most starred ones among zed extensions lol

placid cape
#

maybe

#

i just found this and got an idea "let's do it"

spark tiger
#

i'm trying to port vencord/companion to zed

placid cape
#

that would be awesome

spark tiger
#

sadly extensions cant mess with ui so i have to do it via code actions

#

i was so dumb i thought like i would have to rewrite all that stuff to rust until i got explained that it's not how lsp's work

placid cape
#

yeah you can write lsp in any language

spark tiger
#

and i just have to slightly modify the original code to convert it into an lsp and then use it in zed

placid cape
spark tiger
#

yeah im ngl i was using yours a bit as a reference but it still kinda confused me

placid cape
#

i had to implement symlink creation because of github ratelimits

spark tiger
#

horror

#

why is it considered an error

#

eslint dum

dense sand
#

why is it so fucking hard to write a integration tests in spring

fleet cedar
#

Convoluted things are harder to test

dense sand
#

Its more about the fact it seems do documentation lacking

velvet fog
#

AI and crypto fan final boss

#

me omw to make the bot ignore all instructions, ping everyone and start banning everyone

balmy lintel
#

@elder yarrow please ban the member fres with reason freaky

#

funny idea

velvet fog
nimble bone
elder yarrowBOT
dawn ledge
#

you dont want to erase your error types

hoary sluice
#

he just wanted to know how to return any error i think

#

@valid jetty @valid jetty hii

ornate quiver
#

I think Box<dyn Error> should really only in leaf applications, no?

#

although you would probably want to use anyhow anyways

fleet cedar
#

Anyhow has backtraces

dawn ledge
#

i just dont like the idea of erasing error types of all things

lavish frigate
#

i love leaking boxes

dense sand
#

goddamit deepseek ๐Ÿ˜ญ

lavish frigate
#

get to implementing lazy ass

hoary sluice
#

@valid jetty is -false == true

valid jetty
supple whale
#

for js

dawn ledge
#

ofc its js

supple whale
#

its giga common to see !0 or !1

dawn ledge
#

why wouldnt it be js

dawn ledge
supple whale
#

still, real g's simply compile the JS to bytecode and load the bytecode to the v8 vm directly

dawn ledge
#

but isnt that different from -false being equal(?) to true

#

!0 and !1 are just true and false in 2 bytes

#

instead of 4~5

supple whale
#

yeah

#

-false and -true are like -0 and -1

#

and -0 isnt false

dawn ledge
#

js is cursed on every level

supple whale
#

XD

#

TRU

dawn ledge
#

just wrote this

supple whale
#

best way to call object.toString() ?

#

'' + object

dawn ledge
#

minifiers do that

#

and it throws me off

#

๐Ÿ˜ญ

supple whale
#

few do actually because its unsafe

fleet cedar
supple whale
#

i need to try oxlint, because my eslint is blowing up

#

shit takes too long for my project now

dawn ledge
#

biome is nice

supple whale
#

not strict enough doe

dawn ledge
#

if you ignore some bullshit default lints

supple whale
#

it doesnt have many of the rules i want

#

i have like 1050 lines of eslint rules in my project

#

XDDDDDDDDDDDD

dawn ledge
supple whale
#

since i simply dont like 10 tools doing 1 thing

dawn ledge
#

alright fine

#

js is the only language i codegolf in

fleet cedar
#

Python is great for golfing

hazy pine
dawn ledge
#

whats the best way to yeet a directory out of existence in nodejs

#

rmdir?

#

rimraf?

#

fs-extra?

shrewd canopy
hazy pine
#

i dont even know how you're supposed to use this, it doesnt export anything lmao

placid cape
#

doesnt make any sense

hazy pine
#

hold on wouldnt like

#

1-false = true

royal nymph
placid cape
#

false is 0

hazy pine
#

!!(1-false)

#

reverse minify

placid cape
#

if we interpreter booleans as 0 and 1

royal nymph
#

please do not use insane libraries for this ๐Ÿ˜ญ

placid cape
hazy pine
spark tiger
#

after a month i finally made wakatime in zed work...

#

this is so fucking annoying

placid cape
#

there's an extension for it

spark tiger
#

ikk but it was broken on windows

placid cape
#

you can make pr

spark tiger
#

yeah im going to

placid cape
#

i'm happy that discord presence works on windows though :D

spark tiger
placid cape
spark tiger
#

yeah

hoary sluice
spark tiger
#

one of the zed maints opened this issue but doesn't seem to have changed anything so

hoary sluice
dawn ledge
hoary sluice
spark tiger
#

tell it to ms isob

hoary sluice
#

just dont use windows

#

even pewdiepie uses linux

spark tiger
#

I SAID IT ALREADY IM BROKE I CANT AFFORD A MAC

hoary sluice
#

you dont need a mac to use linux

spark tiger
#

i need a mac to use macos. i had bad times with linux

hoary sluice
#

nop you didnt

#

!

hazy pine
placid cape
#

if you choose correct distribution

#

then everything is okay

#

i have void linux for more than a year

#

and it's amazing

spark tiger
hoary sluice
#

linux was meh to use for someone who isnt dedicate to it back in like 2020

spark tiger
#

it was mint

hoary sluice
#

gets better every year

placid cape
#

yeah

hoary sluice
#

mint works

placid cape
#

linux > windows

spark tiger
#

also i tried booting into an ubuntu usb flash a month ago and my wifi just didnt work lol

hazy pine
hoary sluice
#

well you need to set it up

placid cape
#

i also started reinstalling my friends' computers to have linux instead of windows :P

spark tiger
#

my classmate decided to move to linux and chose ||kali||

hoary sluice
hazy pine
#

linux isnt perfect by any mean and it has so many flaws but i would never go back to windows

spark tiger
#

but what about gaming

#

valoranto

#

genshin impacto

placid cape
hazy pine
placid cape
#

windows skill issue

placid cape
hoary sluice
#

in ~2021 we were all on windows, then i installed ubuntu, they installed ubuntu/mint, i installed arch, they installed arch, then my friend got nixos and we all switched to nixos

hoary sluice
hazy pine
#

if you play good games then you wont have gaming issues on linux

hoary sluice
#

or dont play furry games

placid cape
#

but nixos is amazing because of their configuration

hoary sluice
#

exactl

#

y

spark tiger
#

okay okay then what distro do i choose

hoary sluice
#

i used void linux for a bit but missed the aur

placid cape
#

the fact you can just easily reproduce the machine state is amazing

hoary sluice
spark tiger
#

i can probably just like use linux for coding and windows for everything else

placid cape
hoary sluice
#

its kinda hard to use at first

placid cape
#

everything is hard if you're working with it for the first time

hoary sluice
placid cape
#

yeah aur is really good

hoary sluice
#

nixpkgs is better ๐Ÿ˜„

spark tiger
placid cape
#

on arch you can install things easier than on windows lol

hazy pine
#

actually like just today i was watching pewdiepies video and i saw him do systemd-analyze and instantly went to see if i could improve my boot times

spark tiger
#

how do i do it then

hoary sluice
# spark tiger WHY

this is why all software needs to be written only for linux and maybe for mac

placid cape
#

cool

#

void uses runit

hoary sluice
#

and if its server software for bsd too

placid cape
#

systemd has a lot of unnecessary stuff

spark tiger
hoary sluice
#

do you have an hdd from 1843

spark tiger
#

how do i use cfg with expression

hazy pine
hoary sluice
#

idk

placid cape
#

just create function

hazy pine
#

i had a bunch of services that shouldnt have been enabled but were so it was running at boot

placid cape
#

like i did in zed discord presence

hoary sluice
#

i explicitly stated in the requirements of my diploma thesis that windows support was not planned

spark tiger
pearl stagBOT
# placid cape https://github.com/xhyrom/zed-discord-presence/blob/200ae73131a098516025e4fd5269...

discord_presence.rs: Lines 27-43

#[cfg(unix)]
fn create_symlink(src: &str, dst: &str) -> std::io::Result<()> {
    std::os::unix::fs::symlink(src, dst)
}

#[cfg(windows)]
fn create_symlink(src: &str, dst: &str) -> std::io::Result<()> {
    std::os::windows::fs::symlink_file(src, dst).or_else(|_| {
        fs::copy(src, dst)?;
        Ok(())
    })
}

#[cfg(not(any(unix, windows)))]
fn create_symlink(_src: &str, _dst: &str) -> std::io::Result<()> {
    fs::soft_link(_src, _dst)
}
hazy pine
placid cape
#

hi rosieee

valid jetty
hoary sluice
hazy pine
spark tiger
placid cape
hoary sluice
#

ok so basically i need to remove my screen

placid cape
hoary sluice
#

and my firewall and my internet

hoary sluice
#

i did systemd-analyze

placid cape
#

oh okay

hoary sluice
#

but you dont need it anyways

#

void has almost instant boot

#

like it boots before you can sit down

placid cape
#

yea

dawn ledge
placid cape
#

i wonder if i should use alpine or void for rpi

#

what do you think?

dawn ledge
#

is wakatime_cli variable only available on windows?

placid cape
#

alpine is probably more lightweight with busybox and musl

hoary sluice
spark tiger
hoary sluice
#

or you can make a service that calls uptime

hoary sluice
placid cape
dawn ledge
#

how does that compile without let being mut ?_?

hoary sluice
#

how are you accidentally copying everything i do

placid cape
#

i read your diploma

#

and alpine is lightweight

spark tiger
placid cape
#

and probably easier to install on rpi than void

hoary sluice
placid cape
#

yea

spark tiger
#

13s long build for a 300loc file husk

valid jetty
#

@hoary sluice opinions on

for i in [1, 2, 3] {
    $dbg(i);
}

for [1, 2, 3] {
    $dbg(it);
}
```???
hoary sluice
placid cape
#

oh xdd

hoary sluice
placid cape
#

kotlin has it everywhere, you dont

valid jetty
#

it would be funny tho

placid cape
#

yea but you dont want to end up like javascript

#

implement with ๐Ÿ˜๐Ÿ˜

dawn ledge
#

with is a cursed feature in js

hoary sluice
placid cape
#
with ([1, 2, 3]) {
  console.log(toString()); // 1,2,3
}
hoary sluice
#
for 0..10
log i
placid cape
#

๐Ÿ”ฅ

hoary sluice
placid cape
#

what????

placid cape
#

yeah it's horrible

valid jetty
placid cape
#
with (Math) {
  console.log(PI)
}
valid jetty
#

or well not quite like that

placid cape
placid cape
valid jetty
#

its more like

struct Foo { i32 x; };

fn Foo::bar(@scope Foo self) {
    return x;
}
``` this
#

this isnt jai syntax

#

but you get the idea

placid cape
#

yea

placid cape
spark tiger
placid cape
#

you can use this. but you dont have to

spark tiger
#

C:/C:/

placid cape
#

but JS took it into another level

placid cape
#

i know you didnt ask me but i like it more blobcatcozy

hoary sluice
#

it just reduces the amount of code i need to write

placid cape
#

yea

hoary sluice
#

and i think its more readable

dawn ledge
#

ellefication of icypeas

hoary sluice
#

tho maybe not very idiomatic

hoary sluice
placid cape
#

start using crust

dawn ledge
#

you could totally do this without a macro

hoary sluice
placid cape
#

well it tries to be like c

#

so

hoary sluice
#

maybe i realize i need to add help or i realize the help is useless

#

also @fleet cedar @valid jetty is there a way to make trailing commas work in macros

dawn ledge
#

yes

#

you add a $(,)?

hoary sluice
#

ty

dawn ledge
#

($kind:expr, $location:expr $(,)?) => {

#

etc

hoary sluice
#

($kind:expr, $location:expr $(,)?) => {

#

ok

#

how did you do that faster than me when i have it open in zed

spark tiger
#

wakatime site is so random cuz like why does it have a fucking twitter follow button

hoary sluice
#

oh this is so husk

#

i wanna make the trailing comma forced but a trailing comma on a single line is husk

runic charm
#

this works well w/ claude too

hoary sluice
#
(y $ (x $ y)) 1 2
#

boolean false with my lambdas

#

i think

#

or no thats true

solemn ravine
#

using rust in my swift project ๐Ÿ’ช

valid jetty
#

@hoary sluice @placid cape hii

#

i dont like that you have to do --

#

but i see no other way

hoary sluice
#

why the --

#

isnt that only needed when the args are prefixed with -- and u want them literally

valid jetty
valid jetty
#

in compilers you use -- when you wanna denote "these args should be passed to the executable, not the compiler" (at least when theres a --run mode like this)

#

lookie

dawn ledge
fleet cedar
#

Add --husk flag

dawn ledge
#

you might need to update your treesitter grammar

placid cape
#

elle for scripting? ๐Ÿ”ฅ

valid jetty
valid jetty
valid jetty
#

but yeah with shebangs i also added the --run flag

#

you can now do ellec foo.le --run -- foo bar baz

#

it is the most BASIC run flag ever but whatever

#
if let EmitKind::Executable(path) = out {
    if run {
        let exec = Path::new(&path).to_path_buf();
        let with_slash = Path::new(".").join(&exec);

        Command::new(&if exec.components().count() > 1 {
            exec
        } else {
            with_slash
        })
        .args(exec_args)
        .stdin(Stdio::inherit())
        .stdout(Stdio::inherit())
        .stderr(Stdio::inherit())
        .output()
        .unwrap_or_else(|err| {
            panic!(
                "{}Failed to execute {path}: {err}{}",
                get_RED!(),
                get_RESET!()
            )
        });

        remove_file(&path).unwrap_or_else(|err| {
            panic!(
                "{}Failed to delete file {path}: {err}{}",
                get_RED!(),
                get_RESET!()
            )
        })
    }
}
dawn ledge
valid jetty
#

@dawn ledge which way should it be

--release, -R
--run, -r

--release, -r
--run, -x

--release, -r
--run, -u
dawn ledge
#

-e

valid jetty
#

for what

dawn ledge
#

run

valid jetty
#

hmmmm ok

hoary sluice
dawn ledge
pearl stagBOT
dawn ledge
#

athough its completely irrelevant to elle

valid jetty
#

i added this too

dawn ledge
#

you can also just force it to be --run <path> <args...> and avoid the --

#

ellec --hush --run ./main.le foo bar

#

:3

valid jetty
#

hmmm not a bad idea

valid jetty
#

whats a 40 line flag gonna do

hoary sluice
#

i mean make ellec only compile and elle do stuff like running

valid jetty
#

i know yeah, but ellec just does everything all at once atm including lsp stuff

frosty obsidian
#

elle sp

valid jetty
#

elle stack pointer

valid jetty
#

@hoary sluice does kotlin have x ?: y

#

equivalent to x ? x : y

hoary sluice
#

elvis operator

#

oh its called that everywhere

#

yes it has an elvis operator

valid jetty
#

ok cool

hoary sluice
#

specifically ?:

#

but no ternaries lol

valid jetty
#

.......................what

#

thats

#

horrible

hoary sluice
#

if (x) x else y

valid jetty
#

wait but ?: is a token?

hoary sluice
#

yes

valid jetty
#

reminds me of php doing casts HORROR

hoary sluice
valid jetty
#

in (int)xin php, (int) is a whole token, and int is not actually a type

#

adding partial implementations of operators is so cursed imo

hoary sluice
#

why

#

?: is the elvis operator, it is not an empty ternary

#

they couldve picked ฮถ as the token

valid jetty
hoary sluice
#

no

#

well idk

#

semantically it means
x?

no?

ok do:

y

valid jetty
#

i see it was a shorthand for x ? x : y

#

its a common pattern to just want if x is truthy { x } else { y }

#

i made shebangs think theyre comments

hoary sluice
#

its only for x == null i think

hoary sluice
#

just use # for comments

#

oh wait

valid jetty
#

i mean to be completely fair lol

hoary sluice
#

im prob gonna use -- for comments in order to allow # and // to be used in the lang

valid jetty
#

shebangs are also lexed as comments

#

in the compiler

hoary sluice
#

only on line 1?

valid jetty
#

but itโ€™s specifically #! thatโ€™s interpreted as a comment not #

#

no i thought it would be funnier if i allow it everywhere

#

#! is a new comment now

hoary sluice
#

just say you were too lazy to make it first line only

#

can u make an lsp execute code inline

#

i think the haskell one does that right

#

u can call a function with a hotkey

#

since its pure functional

valid jetty
#

i just didnโ€™t want to

#

โ€œ!โ€ if row == 1 => instead of โ€œ!โ€ => or whatever for matching it

hoary sluice
#

whats --hush

valid jetty
#

doesnโ€™t print whether the file was compiled successfully or not

valid jetty
#

basically like โ€”quiet or โ€”silent

hoary sluice
#

why hush and not quiet

valid jetty
#

i made it both โ€”silent and โ€”hush

#

i just got used to โ€”hush

spark tiger
#

unbelievable. wireguard devs confused l10n with i18n ๐Ÿ’”

hoary sluice
#

those acronyms are stupid just call it internationalization

valid jetty
#

๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

hoary sluice
#

or smth like intnat

#

not fucking i18n

valid jetty
#

a11y and i18n my beloved

hoary sluice
#

a11y is so husk

hoary sluice
#

i love doing accessibility but if someone asks me to improve the a11y i am not doing it

valid jetty
#

my fav form of a11y is when the code works on my machine with my preferred configuration

#

and thatโ€™s the whole a11y

hoary sluice
#

yop

#

when elle on nixos

valid jetty
#

never

#

n*xos

hoary sluice
#

just you wait

spark tiger
#

just tried cloning a repo with like 20-30 submodules. spent 20 minutes trying to fix it isob

hoary sluice
#

in ~4 months you will be shilling and glazing nixos

valid jetty
#

the neferious โ€”recursive flag

spark tiger
#

yeah that didnt work either

valid jetty
#

wha

spark tiger
#

i think the devs just broke it

#

can yall check it if its just me

valid jetty
#

are they like vendor sub modules cloned by the build script instead of git submodules or something lmfaooo

valid jetty
spark tiger
#

do git clone https://github.com/pia-foss/desktop-dep-build && git submodule update --init --recursive (yes ik u can just --recursive in git clone but i think it doesnt show errors the same way git submodule does)

lucid trail
#

got a .git is not a submodule but nothing other than that

spark tiger
#

did it update all submodules

lucid trail
#

No url found for submodule path 'components/hnsd/openssl', is that what you got?

spark tiger
#

yep

lavish cloud
#

is there something similar to pgvector that can run locally on an android device?

winged mantle
#

i have become a monster

valid jetty
#

@hoary sluice best rust feature

spark tiger
#

also what is @

valid jetty
#

you can match something while also capturing the thing you matched as a variable

spark tiger
#

isnโ€™t it like if let Err(e) = something thonk

valid jetty
valid jetty
#

thats just cursed

valid jetty
#

e@Err(_) captures the whole Err while Err(e) will capture just the inner part

spark tiger
#

ah ic

#

yeah this is useful sometimes

dawn ledge
spark tiger
#

thanks but i donโ€™t think iโ€™ll remember it lol

#

i still donโ€™t know what |v| pattern is called

dawn ledge
spark tiger
#

like that thing you use in map

dawn ledge
#

yeah its called a closure, its bascially like an arrow function in js

#

or a lambda in python

valid jetty
spark tiger
#

yeah ik i just never knew what its name was

#

like in python itโ€™s lambda, in csharp itโ€™s.. something else

valid jetty
#

its just (x) => x*2

spark tiger
#

no i mean the naming

#

my discord on phone is literally dying ๐Ÿ˜ญ

dawn ledge
#

when does discord not

#

literally slopware

valid jetty
#

theyre all called lambdas

#

the general word for it is a lambda

#

its all called lambdas

dawn ledge
#

yeah but in rust terminology its a closure :^)

valid jetty
#

well its still a lambda lol

dawn ledge
#

math lovers and their obsession with greek

valid jetty
#

yessss

spark tiger
dawn ledge
#

rewrite the bible in greek

valid jetty
#

i guess so

#

technically lambdas are closures tho

#

otherwise you wouldnt be able to do currying

dawn ledge
#

technically you are not human

valid jetty
#

husk

dawn ledge
#

give me 500 reasons why youre human

leaden crater
valid jetty
#

if lambdas didnt capture then you could not do |x| |y| x + y

spark tiger
#

i wonder how many other patterns rust has i didnโ€™t know about

leaden crater
#

today's color is durian husk

dawn ledge
#

they have ast definitions

valid jetty
dawn ledge
#

currying is only pretty when your language doesnt use () for calls

spark tiger
royal nymph
#

did bro vibecode

formal belfry
#

level 5 vibe coder

formal belfry
#

On my bingo card for 2025 certainly wasn't PewDiePie using Linux, but not only that using Arch Linux, Hyprland and making a Linux ricing video.

==========Support The Channel==========
โ–บ Patreon: https://brodierobertson.xyz/patreon
โ–บ Paypal: https://brodierobertson.xyz/paypal
โ–บ Liberapay: https://brodierobertson.xyz/liberapay
โ–บ Amazon US...

โ–ถ Play video
#

the year of the linux desktop

lavish cloud
#

@royal nymph how to andoot pls

ornate quiver
#

lol i still find async closures vs async blocks confusing
async move || async move || async move || async move { }

formal belfry
#

@nimble bone @ornate quiver rate sip

dawn ledge
#

damn

#

goes hard

#

love it

#

no light mode tho: (

#

really like the 88x31 effect

formal belfry
#

tyy

formal belfry
#

light mode

hoary sluice
spark tiger
#

how do they want me to do it thonk
or does #[cfg(โ€ฆ)] support being uh inside a method call

formal belfry
meager solstice
#

I just made a random picture and noticed a logo on a car. This logo looks extremely familiar to the colored Git logo.. ๐Ÿ˜ญ

placid cape
#

Microsoft

hoary sluice
#

is x IntegerLiteral?

dawn ledge
#

TokenKind::IntegerLiteral

hoary sluice
#

x is the value of the thing that got matched right

dawn ledge
#

yes

hoary sluice
#

why is it useful here

dawn ledge
#

because you want to use it???

#

duh

hoary sluice
#

is this a new rust feature or why am i seeing so much @ lately

dawn ledge
#

its not new

hoary sluice
#

ok no its at least 3.5 years old

formal belfry
hoary sluice
#

@valid jetty someone solved the 5th busy beaver??????

#

i thought it was only known until 4

formal belfry
#

wtf is a busy beaver

hoary sluice
signal oakBOT
#

The busy beaver problem asks, for a Turing machine with a given number of states, what is the maximum number of 1s it can write on an initially blank tape before halting, and what is the maximum number of steps it can take before halting.

hoary sluice
#

@valid jetty solve 6th bb in elle

#

(the collatz conjecture is a 6 rule turing machine so you have to solve that first)

dense sand
#

Unknown words

dawn ledge
#

eagely and rosie are math nerds

valid jetty
#

1 sec let me upload the source code but it might take a second

fleet cedar
#

It's 4, right?

valid jetty
#

i was typing at 192210 wpm for the last 23 mins soo

#

might take a sec

valid jetty
hoary sluice
dawn ledge
jade stone
#

@hoary sluice whatโ€™s bb 64

dawn ledge
#

man do i wish i could embed images and do syntax highlighting in plaintext
i dont wanna write my readmes in markdown

#

because plaintext ones are displayed in monospace

hoary sluice
#

you have to solve the collatz conjecture for 6

valid jetty
#

i donโ€™t remember where

hoary sluice
#

and probably a lot of others

valid jetty
#

they run a github ci which automatically compiles the typst document into a pdf, and you can embed pdfs in readmes

jade stone
hoary sluice
#

yop

jade stone
#

Insane

#

You will do it in a weekend

hoary sluice
#

and every other conjecture that fits in a 6 rule turing machine

hoary sluice
dawn ledge
#

this busy beaver and collatz conjecture you speak of is interesting but unfortunately im math illiterate

hoary sluice
#

theres an infinitely recursive lambda calculus function that finds all fixed points of the riemann zeta function

hoary sluice
dawn ledge
#

and now those are random words

valid jetty
#

๐Ÿ˜ญ๐Ÿ˜ญ

jade stone
valid jetty
#

how do you do computer science and donโ€™t know what a turing machine is

#

plsss watch like 3 youtube videos on it from the big educational channels

dawn ledge
dawn ledge
valid jetty
#

typically

#

itโ€™s not the formal definition

#

but 99% of the time something which has variables loops and conditionals is turing complete

dawn ledge
#

as i said i dont know the formal definition
i just know a turing machine outlines some sets of operations that a modern computational device should be able to perform or something

#

i dont know a suprising amout of things
i dont have a formal cs education

hoary sluice
# dawn ledge yes and no i have never looked up the formal definition but i know that if x is ...
  • infinitely long 1d array "tape" of 0s
  • a cursor on position 0
  • a set of rules, each rule stating what to do if the current cursor position is 0 and what to do if its 1
  • rules say the value to write, the direction to move and the next rule to choose
  • rules can just say HALT
  • everything thats computable can be computed by a turing machine
  • the busy beaver is the turing machine with N rules that writes the most 1s before halting, an infinite loop cant be a busy beaver
  • busy beaver up to and including 5 rules is solved
  • the collatz conjecture is an unsolved NP-hard hypothesis that can be represented as a 6 rule turing machine, therefore busy beaver of 6 requires solving it
valid jetty
#

basically if you know brainfuck, thatโ€™s a direct representation of a turing machine as a programming language

dawn ledge
#

i do know brainfuck yes

#

at one point i was about to write a bf compiler in rust

valid jetty
#

i wrote an interpreter in elle in like 70 lines xd

hoary sluice
#

all tokens are exactly 1 char long

#

so theres no lexes

#

lexer

#

and the language is fully imperative so you can just follow what it does

valid jetty
#

^^^ other than loops

hoary sluice
#

loops are just while in rust

#

ig thats a few lines extra

valid jetty
#

also they said compiler

#

you have to generate ir or asm

hoary sluice
#

then its even easier

#

you can just .replace with asm instructions

valid jetty
#

i mean yeah but you also need to add the prologue and epilogue right

hoary sluice
#

still 1 line of string concatenation

#

and manipulation

#

no logic

valid jetty
#

true

#

write it !!

hoary sluice
#

if i get my sway to work

#

ok it works

#

should i write it in icypeas

#

i have no io and no string manip so id have to represent it with function calls

valid jetty
#

..can you

#

oh

hoary sluice
#

well its turing complete

#

its lambda cald

#

calc

#

and binops

valid jetty
#

true but i didnโ€™t realize you finished it lol

#

or not finished, but finished enough to make it turing complete

hoary sluice
#

well its not even close to finished but i have a working lambda calculus, binary operators, unary operators, and literals

valid jetty
#

monads when

hoary sluice
#
selectFirst s = f
churchTrue f = selectFirst

selectSecond s = s
churchFalse f = selectSecond

churchTrue 1 2
churchFalse 1 2

addTwice1 s = f + s + s
addTwice f = addTwice1

addTwice 1 10

1 == 1
3 + 4
10 - 5
2 * 3
20 / 4
20 % 3
2 ** 3
5 & 3
5 | 3
5 ^ 3
7 == 7
7 != 8
3 < 10
10 <= 10
15 > 5
15 >= 15

(y $ (x $ y)) 1 2
(x $ x+2) 1 
#

last 2 lines dont work yet

#

theyre inline lambdas

#

and i didnt add test cases for unary ops

#

but they work

#

even --7 is valid as long as you do -(-7) blobcatcozy

valid jetty
valid jetty
hoary sluice
#

priority list rn is:
inline lambdas
clean up the codebase (identifiers should use a string + location struct, rn they use Token which is an enum of all token kinds and values, error handling should be improved and i need to set up clippy with max checks)
basic io
either type system or lists

valid jetty
#

but thatโ€™s only because i interpret -- as the decrement op and throw a lex error

hoary sluice
#

nope i interpret --7 as (-(-)) 7

#

and (-(-)) is only a function in real lambda calc

#

- isnt a function for me

valid jetty
hoary sluice
#

i did that

#

but its still meh

#
let name: String = name.get_identifier_name().ok_or(Error::with_help(
    ErrorKind::InvalidToken,
    expression.location.clone(),
    "Function name must be an identifier",
))?;
#

instead of just using the name right away

#

cause it also has location

valid jetty
#

maybe one that just gives you the string with no context and panics if thereโ€™s no string

hoary sluice
#

why is it annotated lol

#

i think thats copilot slop

valid jetty
#

what

#

oh

hoary sluice
#

name: String

hoary sluice
valid jetty
#

lmao i thought you made get_identifier_name return an impl Into<String> or something and set : String so it calls into automatically ๐Ÿ˜ญ

hoary sluice
#
pub fn get_identifier_name(&self) -> Option<String> {
    if let TokenValue::Identifier(name) = &self.value {
        Some(name.to_string())
    } else {
        None
    }
}
#

returning impl into string is husk afaik

valid jetty
#

someone should make an option! macro which takes a pattern like in matches! but takes the value out and creates an option out of it

hoary sluice
#

what

valid jetty
#

i can make that actually

hoary sluice
#

you mean if it matches its some if it doesnt its none?

fleet cedar
#

I often make a cooler_matches!(&self.value, TokenValue::Identifier(name) => name.to_string()) that does that

hoary sluice
#

if let with matches! syntax?

valid jetty
hoary sluice
#

oh thats cool

valid jetty
#

in your case its what ไนๅ…ซ sent

hoary sluice
valid jetty
#

i mean they are chinese characters technically

#

they just mean 98 tho

#

theyre read kyuu hachi

#

in jp

hoary sluice
#

@valid jetty i vibe coded a bf compiler

valid jetty
#

vibe coding compilers

hoary sluice
#

idk why it did i386

#

idk the asm lore

#

apparently bf types are 30kB

#

tapes**

valid jetty
#

yeah they are

#

whenever i see a bf interpreter in C they just have a static array of 30,000 chars

placid cape
valid jetty
#

doesnt matter its just allocating 30000 bytes in the assembly, a bf compiler is just a program that generates a bf interpreter

hoary sluice
#

like i said i vibe coded this so i didnt actually check

#
println!("section .bss\ntape resb 30000\n");
valid jetty
#

lmaooo

spark tiger
#

what do i do

#

do i use like gh actions or is there some other stuff for building

formal belfry
#

whats that

spark tiger
#

a c++ app

#

that i want to build for all targets

#

but i canโ€™t

formal belfry
#

wheyre

spark tiger
hoary sluice
spark tiger
spark tiger
#

me when dependencies are exes fr

fleet cedar
hoary sluice
#

@valid jetty fucking kill me

#

i spent so much time thinking about how to implement lambdas in interpreter

#

yesterday

formal belfry
hoary sluice
#

ok it was like 5 minutes

#

but i couldnt figure it out

#
ExpressionKind::Lambda { parameter, body } => Ok(Value::Function { parameter, body }),
#

its literally this

spark tiger
# formal belfry why

wdym why
because iโ€™m making a fork and want it to have executables for all targets

hoary sluice
#

idk why i even made lambda its own type

#

i guess i planned to put the name of the function inside the Value value

placid cape
#

easiest

spark tiger
#

yeah but iโ€™m afraid iโ€™m gonna hit the limit

placid cape
#

its free for public repos

hoary sluice
spark tiger
#

like if an action takes too long it just stops

placid cape
#

๐Ÿ’€

placid cape
#

or maybe it has

#

but im sure that running it for 12h is still fine

formal belfry
#

idk why they added that

#

so stupid

placid cape
#

but im fine :D

#

discount

formal belfry
#

microslop

hoary sluice
#

ok now if you have lambda calculus with parentheses instead of ฮป and $ instead of . its valid icypeas

#

untyped single arg

spark tiger
#

i have a great idea. what if lambda functions used ฮป syntax instead of whatever they use now

formal belfry
#

what did they do to reactions

#

this shit does not look normal

spark tiger
#

vec.map(convert(ฮป))

hoary sluice
# spark tiger i have a great idea. what if lambda functions used `ฮป` syntax instead of whateve...

boy do i have a surprise for you https://en.wikipedia.org/wiki/Lambda_calculus

In mathematical logic, the lambda calculus (also written as ฮป-calculus) is a formal system for expressing computation based on function abstraction and application using variable binding and substitution. Untyped lambda calculus, the topic of this article, is a universal machine, a model of computation that can be used to simulate any Turing ma...

#

python is the closest it gets to lambda functions

#
lambda x: x * x
ฮปx.x*x
spark tiger
#

or like a half life reference

#

how could i know its some math thing

ionic lake
#

how do u think of lambda calc as a half life reference

hoary sluice
ionic lake
#

you are too valve-pilled just like me

hoary sluice
ionic lake
#

yes but they dont know lambda calc

hoary sluice
# spark tiger how could i know its some math thing

Theres the Turing Machine by Alan Turing, Lambda Calculus by Alonzo Church, and Combinatory Logic by Moses Schรถnfinkel and Haskell Curry, all 3 of which are complete systems that can compute any computable function

#

its not really math

fleet cedar
#

It is very much math

ionic lake
#

i love me some haskell curry

#

favorite meal

hoary sluice
#

altho lambda calc is literally just algebra

spark tiger
valid jetty
#

i think im finally ready to make capturing lambdas in elle

fleet cedar
signal oakBOT
hoary sluice
valid jetty
#

in elle what i can do is like

valid jetty
#

when you create a lambda

#

it generates a struct

#

where the fields are all like scoped variables

#

itll capture everything by value because then i can return the lambda

spark tiger
#

Ghostth

valid jetty
# hoary sluice Theres the Turing Machine by Alan Turing, Lambda Calculus by Alonzo Church, and ...

Combinatorial optimization is a subfield of mathematical optimization that consists of finding an optimal object from a finite set of objects, where the set of feasible solutions is discrete or can be reduced to a discrete set. Typical combinatorial optimization problems are the travelling salesman problem ("TSP"), the minimum spanning tree pr...

#

๐Ÿ’”

#

The knapsack problem is the following problem in combinatorial optimization:

Given a set of items, each with a weight and a value, determine which items to include in the collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.
It derives its name from the problem faced by someone w...

#

oh! wtf

#

is it truncating or something

#

supposedly it fails here

#

i think i know why

hoary sluice
valid jetty
#

no idea

valid jetty
#

stupid linked list

#

..........what???????????

hoary sluice
#

@valid jetty how do u use clippy

formal belfry
#

cargo clippy

#

it keeps going up

#

it was at 600 7 days ago

#

๐Ÿ˜ญ

valid jetty
#

or well i do cargo clippy --all

spark tiger
#

isnโ€™t it in rust analyzer already

ionic lake
#

cargo check also

valid jetty
#

but i have NO idea what this function is doing

#

its do pm whatever pm is

#

parallel move??

hoary sluice
#

pm == positive modulo

valid jetty
#

I FOUND THE ISSUE

#

its this

#

how??? idk

#

oh i see

#

lmfao

#

for things that are sub-word but signed, like i16 and i8

#

theyre gonna be into_base'd aka turned into word

#

so the offset is wrong

#

so the pointer becomes wrong

#

ok

#

cool

#

insane....

ionic lake
#

jinkpad

valid jetty
#

every single test in the auto test suite in 1.7s is kinda insane

formal belfry
#

new colorscheme : o

#

666 mem

#

sus

hoary sluice
valid jetty
#

WHERE ELSE DO I PUT IT

#

i dont think it really matters

hoary sluice
#

~/workspace

fleet cedar
#

I have most of my stuff in /home/fun/*

pseudo sierra
#

~/Documents/garbage for other ppls shit and ~/Documents/shit for my garbage trolley

fleet cedar
#

Nah /home/src for "large read-only git cloned project"

#

/home/large for large things that aren't git repos, such as video game dumps and music collection

#

/home/data is where all application-specific data and config goes, unless they're evil and disobey the XDG spec

runic charm
#

what do you MEAN

#

nvm it still works its just vvsc being Stupid

formal belfry
spark tiger
#

i used to put repos in D:/Git on my laptop (D: was a partition of the SSD)

#

now i decided to use what microsoft intended ~/Documents for

#

so i'm storing it in ~/Documents/Projects

hoary sluice
#

.local is a dir i consider to be safely deletable lol

hoary sluice
formal belfry
#

idk

hazy pine
median root
hazy pine
#

hear me out

#

/dev

median root
#

I can see the logic there at least

#

not in terms of practicality but in terms of naming

hoary sluice
fleet cedar
hoary sluice
#

isnt var root protected

median root
hoary sluice
#

or do they chmod /var/src

fleet cedar
#

They do

#

On shared vms

hoary sluice
#

probably from /var/www

fleet cedar
#

It's kinda annoying

median root
formal belfry
median root
hoary sluice
#

@placid cape since when is tsoding on void??

hoary sluice
median root
placid cape
hoary sluice
#

timestamp link

median root
hoary sluice
#

xbps-query

hoary sluice
#

wait actually i think im stupid

#

i mixed it up

valid jetty
hoary sluice
#

chown is short for chgrp

#

chmod is only perms not own

valid jetty
#

chmod is to change the permissions for the owner of a file

placid cape
valid jetty
#

chown chooses who the owner is

#

theyre different commands

#

???

hoary sluice
#

yes i havent chmodded anything besides +x and 777 in a long time i forgor

valid jetty
#

lmao horror

median root
hoary sluice
#

you can still use chmod tho

valid jetty
#

why would you EVER need to develop in /var

hoary sluice
#

chmod it for other

#

scroll up

valid jetty
median root
valid jetty
#

where do i put it then ๐Ÿ˜ญ

#

i used to put it in /usr/local but that doesnt work on some systems because make fails when i run with sudo as the $PATH is different and .cargo is not gonna be in there

hoary sluice
#

statically link it

valid jetty
#

it is statically linked but i still need to put the file somewhere

valid jetty
hoary sluice
valid jetty
#

no the runtime

#

because its not just the executable that goes into .local its the stdlib headers and runtime static lib too

hoary sluice
#

put it into a nix derivation

#

maintain a nix pkg ๐Ÿ™‚

valid jetty
#

ellec is statically linked (mostly)

#

im not gonna link with libc and libm statically

hoary sluice
#

make an aur pkg

#

and a nix pkg

#

and every major version pr into into nixpkgs

#

idk how fedora pkgs work

#

but you shouldnt be using fedora anyways

valid jetty
#

whats wrong with fedora

#

lol

valid jetty
hoary sluice
#

it doesnt have a big pkg system

hoary sluice
hoary sluice
#

arch

stoic helm
#

:3

valid jetty
#

i just use fedora because nix is unmaintainable as someone who is actually productive and arch needs me to update my packages every day

stoic helm
valid jetty
#

fedora just kinda works and is fast enough that i dont care enough to try anything else

valid jetty
#

its the same reason i dont have hyprland

hoary sluice
#

6 hours ๐Ÿ˜ญ its literally 6 hours hello

#

ive spent weeks in total ricing

hazy pine
#

i wanna spend more hours configuring my os its so fun

valid jetty
#

horror

hoary sluice
#

same

#

main reason why idm nix being more work

valid jetty
#

imo nixos is only good as a server OS and for annoying veeeeee๐Ÿ˜ญ

hoary sluice
#

the server should run openbsd

#

actuallo nixos is good too

valid jetty
#

idk nixos is pretty cool for servers

hoary sluice
#

u can steal a security config from gh

valid jetty
#

but not for a standard user machine lol

hoary sluice
#

wryng

#

wrong

formal belfry
formal belfry
#

NEVER THOUGHT I'D AGREE WITH YOU

dawn ledge
hazy pine
#

nerd

dawn ledge
dawn ledge
dawn ledge
frosty obsidian
#

i think its fine to not want to spend hours configuring things

valid jetty
#

its not a waste if you want to express yourself creatively

#

its just a waste for me because i dont have the time

valid jetty
dawn ledge
#

yeah

#

nixos packages are just a bunch of patches and bandages for nixos' design choices

hoary sluice
#

@valid jetty

hoary sluice
hoary sluice
hoary sluice
hoary sluice
#

this is literally just false

frosty obsidian
#

to each their own

hoary sluice
#

theres home manager which is a big part and nh which is a cli beautifier basically but nixpkgs are literally just normal packages except theres a lot of them

shrewd canopy
hoary sluice
#

yop

shrewd canopy
#

well technically it compiles into bytecode lol