#🪅-progaming

1 messages · Page 73 of 1

hoary sluice
#

returns 4

#

lambda calc is magic

spark tiger
#

i mean isn't it kinda silly expecting ppl who chat in #🪅-progaming daily not to know two most popular languages isob

#

and the other one is well

#

the other one is java

hoary sluice
valid jetty
formal belfry
#

Roie

valid jetty
#

Roie

hoary sluice
#

at least half of it and then my attention span couldnt handle it anymore

#

@valid jetty did you rework your error handling

#

and location

#

i dont wanna have to keep putting location into ever enum and struct

valid jetty
#

depends what timeframe youre referring to

hoary sluice
#

is it not horror now

valid jetty
hoary sluice
#

mine is kinda horror

valid jetty
#

just now location is a range instead of a single position

hoary sluice
#

probably like half my loc are error handling

valid jetty
#

so i can properly make the compound location for bigger expressions

hoary sluice
valid jetty
#

before the loc only ever pointed to a single token

valid jetty
pearl stagBOT
# hoary sluice https://github.com/eagely/icypeas/blob/main/src/interpreter/interpreter.rs#L54-L...

interpreter.rs: Lines 54-88

ExpressionKind::Call { function, argument } => {
    let function_name = function.get_identifier_name().ok_or(Error::with_help(
        ErrorKind::InvalidToken,
        function.location.clone(),
        format!("Expected Identifier, got {:?}", function.kind),
    ))?;

    let function_value =
        self.environment
            .borrow()
            .get(&function_name)
            .ok_or(Error::new(
                ErrorKind::UndeclaredFunction,
                function.location.clone(),
            ))?;

    match function_value {
        Value::Function { parameter, body } => {
            let parameter_name = parameter.get_identifier_name().ok_or(Error::new(
                ErrorKind::InvalidToken,
                parameter.location.clone(),
            ))?;
            let evaluated_argument = self.evaluate(*argument)?;
            self.environment
                .borrow_mut()
                .set(parameter_name, evaluated_argument);
            Ok(self.evaluate(*body)?)
        }
        _ => Err(Error::with_help(
            ErrorKind::ExpectedExpression,
            function.location.clone(),
            format!("Tried to invoke a non-function type {:?}", function_value),
        )),
    }
}
hoary sluice
#

this error handling is so horror

formal belfry
#

elle will use pip as package manager

hoary sluice
#

elle will use package.icypeas

spark tiger
#

why tf does this command output help like a fucking window

#

not even gonna mention that the help message is not helpful at all lol

valid jetty
#

its all Option too

spark tiger
#

NO

#

well yes

valid jetty
#

icypeOS

hoary sluice
#

omg...

spark tiger
#

.bat is so ass im literally writing a simple script in .sh just to run it on windows then isob

hoary sluice
#

gonna write an os in an interpreted language brbn

valid jetty
#

then i realized its way too long

hoary sluice
placid cape
#

can you explain the syntax pls

hoary sluice
#

do you not use rustfmt??

hoary sluice
placid cape
#

nope

valid jetty
spark tiger
valid jetty
#

@hoary sluice look at this syntax

impl fmt::Display for Type {
    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
        match self {
            Self::Byte | Self::Char => write!(formatter, "b"),
            Self::Boolean | Self::Word => write!(formatter, "w"),
            Self::UnsignedByte => write!(formatter, "ub"),
            Self::Halfword => write!(formatter, "h"),
            Self::UnsignedHalfword => write!(formatter, "uh"),
            Self::UnsignedWord => write!(formatter, "uw"),
            Self::UnsignedLong => write!(formatter, "ul"),
            Self::Single => write!(formatter, "s"),
            Self::Double => write!(formatter, "d"),
            Self::Null => write!(formatter, ""),
            Self::Struct(td) => write!(formatter, ":{td}"),
            Self::Enum(_, inner) => {
                write!(
                    formatter,
                    "{}",
                    Option::as_ref(inner).unwrap_or(&Self::Word)
                )
            }
            Self::Pointer(..) | Self::Long | Self::Void | Self::Function(_) => {
                write!(formatter, "l")
            }
            Self::Unknown(name) => elle_error!(Location::internal_error(format!(
                "Tried to compile with a generic type {name}"
            ))),
            x @ Self::Infer => elle_error!(Location::internal_error(format!(
                "Attempted to format an invalid type: {x:?}"
            ))),
        }
    }
}
``` the `x @ Self::Infer` thing
#

did you know that existed

placid cape
#

i didnt lol

#

cool

valid jetty
#

im pretty sure x @ Self::Infer => is equivalent to x if matches!(x, Self::Infer) =>

hoary sluice
#

ok its just

def b(y):
  return x # everything is global rn

def a(x):
  return b

a(3)(4)

or without currying in proper python

def ab(x, y):
  return x

ab(3, 4)

i just noticed its supposed to return 3 but returns 4 lemme fix that

#

ig ill go back to not global variables

valid jetty
#

@placid cape

hoary sluice
deep mulch
#

@rosie.pie @rosie.pie

hoary sluice
formal belfry
valid jetty
deep mulch
#

@formal belfry

valid jetty
#

@hoary sluice is this a clear explanation

#

its really hard to explain something in enough detail you can understand while also keeping it simple

deep mulch
#

@valid jetty hiiiii

#

delete

valid jetty
# deep mulch delete

it has become a test in the compiler

use std/prelude;

fn main() {
    i32 x[42];
    (42[x] = 39)[x] = 42;
    $assert(x[x[x[42[x]][x]][x][x]] == 39, nil);

    i32 y[10];
    4[y] = 39;
    $assert(4[y] == 39, nil);
    $assert(y[4] == 39, nil);

    $println("All `inv memory op` tests have passed!".color("green").reset());
}
hoary sluice
#

@valid jetty so it actually doesnt curry at all

hoary sluice
#

it runs a 3, which evaluates to None and then evaluates the literal 4

valid jetty
#

LMAO

#

husk

hoary sluice
#

its not magic...

valid jetty
#

it is if you implement it right

hoary sluice
#

functions are tokens not expressions rn

#

idk how to do that

valid jetty
#

make a parser

hoary sluice
#

oh right i can just curry in the parser

valid jetty
#

you.. can !

#

but thats not a very responsible thing to do because the parser is meant to just parse

hoary sluice
#

and i thought about how to implement partial application while in the kitchen, realized its like 2 lines and immediately forgot and now can think of it

valid jetty
#

(i say, having error diagnostics and some analysis in the parser)

hoary sluice
valid jetty
#

idk how to implement currying because for me to do that i have to make capturing lambdas (which, to be fair, is relatively easy)

#

garbage collection means i dont have to worry about lifetimes

#

look at this

deep mulch
#

@valid jetty is a cat

valid jetty
deep mulch
#

rosinga

#

roieeee 😭

placid cape
hoary sluice
#

@valid jetty i fixed it lol

#

by undoing most of my changes in the parser and deleting half the interpreter

#

i originally had multi arg parsing implemented, then removed it, then brought it back

#

and made functions be expressions so now you can curry functions and the interpreter doesnt need to look up functions by name anymore

#

@valid jetty should this return 1

#

1 is argument z from what i can tell

#

yea ok it should

#

fake booleans!!!!!

#

returns

1
2
deep mulch
#

@hoary sluice what are you doing

dense sand
#

mmm i will probably just split my makefile into 4 different ones to remain some sort of readability, cuz i aint brain processing 400 lines makefile

deep mulch
#

@formal belfry I saw you

formal belfry
#

legion takeover

deep mulch
#

I will kill you

formal belfry
#

cash money programming language

deep mulch
#

@formal belfry

spark tiger
#

am i fucking dumb or this site just doesnt want to work

#

im pretty fucking sure that's how i output variables

valid jetty
#

abc="abcd"

#

no spaces

spark tiger
#

no. fucking. way

#

thanks

valid jetty
#

:3

hoary sluice
#

ok i cleaned it up

hoary sluice
spark tiger
#

was going insane because this was never executed until i realized that i forgot to add a dollar sign

#

that's so annoying why do i need to add ./ to run a shell script

#

whi can't i just do generate.sh <param> <param2>

hoary sluice
#

@valid jetty you will write a lambda calculus to icypeas transpiler in elle

deep mulch
hoary sluice
fallen nebula
#

I made a blog post about Vencor tho idk if it's fully accurate
i tried to make sure of everything i'm saying but if you guys have any feedback
i know in it i'm a bit salty that some plugins don't exist normally and need to be userplugins, but i think i'm still quite fair
https://julienraptor01.ddns.net/blog/why vencord is great… mostly
also i'm quite happy cause i did setup all that with only nginx and static hosting
even the embed stuff is static, tho i made myself a tool to automatically create the json file for it at the right place when i create a new page
quite sad that discord doesn't support Link Headers, would be more convenient for oembed

#

also yeah the title is a bit of a bait lmao

#

but otherwise i wouldn't get people to read it :big_brain:

#

the 5th point of my arguments is probably the weakest

hoary sluice
#

😭 😭 well done

valid jetty
#

make the lang building blocks be out of combinators

hoary sluice
fallen nebula
valid jetty
fallen nebula
hoary sluice
#

how do i optimize it then

valid jetty
#

yes it would be fun

deep mulch
#

idk what that means but yes

valid jetty
hoary sluice
#

its an interpreter i can just use normal numbers and booleans

valid jetty
#

idk

#

yeah but thats lame

hoary sluice
#

at least i dont have hashtag functions

valid jetty
#

making it all from primitives will make the interpreter much simpler too

#

because you can define all the functions in the source code itself

hoary sluice
# valid jetty yeah but thats lame

like ok ill make the number 1000 be f f f f f f f f f f f f f f f f f f f f f f f f ... and then optimize it to a normal number anyways

valid jetty
#

yessss good

hoary sluice
valid jetty
#

true

hoary sluice
deep mulch
#

so insane

hoary sluice
#

omg the args of the script are in lambda calculus

valid jetty
#

yeah i saw this a while ago

#

18k pages :sob;

hoary sluice
valid jetty
#

i spent the past 7-ish hours manually fixing lints

#

im down to 260 without extra optimizations i wanna make that the clippy didnt detect

#

i started with 700 ish

hoary sluice
#

did u not have clippy this whole time

valid jetty
#

not really lol

hoary sluice
#

what did u change

valid jetty
#

its now #![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]

hoary sluice
#

can u run that on icypeas

#

im too lazy to get up from the couch rn

deep mulch
#

@valid jetty

valid jetty
#

wtf how does icypeas compile SO FAST

#

it takes like 20 seconds for elle

hoary sluice
#
  1. it doesnt compile it interprets
  2. its literally just lambda calculus
valid jetty
#

no i meant

#

the cargo build

#

its so fast

hoary sluice
#

refer to point 2

#

elle is like 30k loc

valid jetty
#

70 suggestions

hoary sluice
#

icypeas is like 700

#

how do u configure clippy to show that in zed

valid jetty
#

mostly things like this

valid jetty
#

i manually run cargo clippy --all every time

#

lol

hoary sluice
valid jetty
#

yes but only for specifically identifiers

#

like you can do "{var}" but not "{var.display()}" or "{var.baz}"

hoary sluice
#

oh

#

still

valid jetty
#

like oh my gosh

#

the frozen balls for comparison

#

i can make 1 change every 2 years

hoary sluice
hoary sluice
#

guys why does my hello world script compile faster than the linux kernel??

valid jetty
#

😭

#

elle is not that bloated

hoary sluice
#

run loc on both of them

#

also keep in mind most of icypeas is dead code and unused indirection rn

valid jetty
#

ok whatever 😭

hoary sluice
#

see

frosty obsidian
#

weird that one is faster than the other

hoary sluice
#

why dont u use zoxide

valid jetty
#

still tho 32 seconds vs 0.3s is a big difference

valid jetty
#

just havent gotten around to trying it

#

im sure its great

hoary sluice
hoary sluice
valid jetty
#

17877 lines of rust

hoary sluice
#

do it rn

valid jetty
#

later,,,

hoary sluice
#

nop

#

now

valid jetty
#

nop

hoary sluice
#

rosie when writing huge compiler vs rosie when adding zoxide init | . to zshrc

valid jetty
#

elle is 14.44 times bigger than frozen balls yet compiles it 109.3 times slower

#

thats like an order of magnitude more

#

ok ill stop calling it frozen balls now

hoary sluice
#

if you dont stop i will start calling elle "electronics learning website htl st pölten"

valid jetty
#

😭

hoary sluice
deep mulch
balmy lintel
#

you are bloated

spark tiger
#

if my cli program accepts parameters like that: run.sh "username" "password" -r uk (-r is optional and its alias is --region), what should a proper help message look like?
is this fine: run.sh <username> <password> [-r | --region region]

#

i'm not sure if [-r | --region region] is correct

#

two --region region seems kinda bad

#

bad idk how else to do

valid jetty
#

it doesnt matter

#

just do whatever theres no standard for what it should look like

#

as long as its legible

spark tiger
#

i mean sure but what would look better

#

like personally how would you do it

valid jetty
#
USAGE: run.sh <username> <password> [...flags]

Flags:
    -r, --region <region>      The region to connect to idk what it is in your context
spark tiger
#

okay thanks! i just didn't really want to make it in multiple lines but whatever

valid jetty
#

or if you dont wanna list flags USAGE: run.sh <username> <password> [-r region] [--region region]

#

copied from what grep does

#

this what i did before

dawn ledge
#

i've seen many cli put placeholders in angle brackets

#

once i had an idea of an interactive help menu
where you could navigate the command and subcommands like a tree and optionally pick flags (and fill their values) to run the selected command

#

unfortunately never got around doing it

valid jetty
#

program --help | less should be good enough

dawn ledge
#

and doing anything that involves "i hope xyz terminal" supports it sucks

dawn ledge
valid jetty
#

yeah

#

oh i see what you mean

#

isnt that kinda what arch-install does

dawn ledge
#

no clue

#

i've only ever manually installed arch

valid jetty
#

look it up i guess

dawn ledge
#

people do be doing some insane stuff

hoary sluice
#

this is crazy

hoary sluice
deep mulch
#

@valid jetty Elle emit machine code when

dawn ledge
#

eagely backreading capabilities 0

dawn ledge
hoary sluice
dawn ledge
#

well qbe does it for elle but same thing

deep mulch
#

it uses qbe

hoary sluice
#

which compiles to binary

hoary sluice
dawn ledge
#

zeet you do realize that emitting asm (and then putting it through an assembler) or directly generating machine code is not an easy task right

dawn ledge
#

also unless youre building a target specific language emitting machine code directly means writing variants for the multiple targets you want to support

deep mulch
#

woosh

dawn ledge
#

also you'd have to write the thousands of optimizations stuff like llvm does

valid jetty
#

arhsm

sage apex
valid jetty
#

you know how clippy gives me a billion lints like useless clones

#

does rust like

#

automatically optimize that

#

or is it just telling me

dawn ledge
#

no clue

valid jetty
#

like does it internally perform the """better""" version that it recommends

#

hmm

#

ok

dawn ledge
#

i have never really done a bunch of optimizations cause if my shit code runs in enough time to not notice then idc

valid jetty
hoary sluice
dawn ledge
#

it wasnt fine until i looked at the unit

#

unless this is for a program thats literally 2 lines

valid jetty
#

ok so uh

deep mulch
#

@valid jetty wyd

dawn ledge
#

also can you show an example of said lint

valid jetty
#

look at this LMAO

#

for the same exact file

frosty obsidian
#

@deep mulch work on minkylang

dawn ledge
#

hanalang has made 0 progress

spark tiger
#

how. i literally just created this fucking file myself

dawn ledge
#

sometimes just a simple chmod +x fixes this for me

valid jetty
#

there are better ones but i already fixed them

dawn ledge
#

this seems to imply that the compiler can sometimes optimize it

valid jetty
#

i wonder if the compiler just like fixes it for you

dawn ledge
#

although ig being explicit doesnt hurt

valid jetty
#

i see

#

yeah

#

but also for stuff like taking Vec<T> in a function when i dont consume the values so its possible to use &[T]

#

or the fact that a function can be made const but isnt explicitly set to be

#

that kind of thing i wonder if rust just optimizes for you

deep mulch
spark tiger
valid jetty
#

@hoary sluice btw if you ever run into performance bottlenecks, the flamegraph crate will save your LIFE

dawn ledge
dawn ledge
#

i mean, potential gain if there's a custom clone_from 📈

#

stonks

deep mulch
#

flamegraphs are cool

deep mulch
#

i like flamegraphs

fleet cedar
#

If you like flanegraphs so much, why are you not on fire

deep mulch
#

not usre

spark tiger
valid jetty
#

strangely enough its missing some calls from elle programs

#

or maybe it just takes such little time

deep mulch
#

of course theres yappanese

valid jetty
#

thats just the executable name

#

lol

valid jetty
#

i cant even profile ichigo execution time because some functions run so fast they dont get sampled lol

jade stone
#

flamegraphs so good

hoary sluice
#

how fast does ichigo compile

jade stone
#

somehow found a function that was taking sooo long so just replaced it

#

and the bottleneck went away

valid jetty
#

it used to be much worse

#

and parsing is only slow because of PathBuf conversions and equality checks (which i hate but is required for correctness)

#

if i only check for equality in the module name before doing deduping it becomes about 300ms

fleet cedar
#

Precompiled stdlib when

valid jetty
#

it is

#

the stdlib imports just import headers

#

the compiler automatically links with a static lib for the runtime

valid jetty
deep mulch
#

@valid jetty @valid jetty

valid jetty
valid jetty
#

the ichigo compiler can generate ssa for this

関数 メイン()『
    整数 値 = 乗算(
        加算(
            乗算(132)、
            減算(2310)
        )、
        乗算(52)
    )。

    整数 ミクの数 = 除算(値、剰余(10090))。
    プリント(「%d\n」、ミクの数)。
』
export data $tmp.9 = { b "%d\n", b 0 }
export function w $main() {
@start
    %tmp.3 =w call $_E4B997E7AE97(w 13, w 2)
    %tmp.4 =w call $_E6B89BE7AE97(w 23, w 10)
    %tmp.2 =w call $_E58AA0E7AE97(w %tmp.3, w %tmp.4)
    %tmp.5 =w call $_E4B997E7AE97(w 5, w 2)
    %tmp.1 =w call $_E4B997E7AE97(w %tmp.2, w %tmp.5)
    %_E580A4 =w copy %tmp.1
    %tmp.7 =w call $_E589B0E4BD99(w 100, w 90)
    %tmp.6 =w call $_E999A4E7AE97(w %_E580A4, w %tmp.7)
    %_E3839FE382AFE381AEE695B0 =w copy %tmp.6
    %tmp.8 =w call $printf(l $tmp.9, ..., w %_E3839FE382AFE381AEE695B0)
    ret 0
}
export function w $_E58AA0E7AE97(w %_78, w %_79) {
@start
    %tmp.10 =w add %_78, %_79
    ret %tmp.10
}
export function w $_E6B89BE7AE97(w %_78, w %_79) {
@start
    %tmp.11 =w sub %_78, %_79
    ret %tmp.11
}
export function w $_E4B997E7AE97(w %_78, w %_79) {
@start
    %tmp.12 =w mul %_78, %_79
    ret %tmp.12
}
export function w $_E999A4E7AE97(w %_78, w %_79) {
@start
    %tmp.13 =w div %_78, %_79
    ret %tmp.13
}
export function w $_E589B0E4BD99(w %_78, w %_79) {
@start
    %tmp.14 =w rem %_78, %_79
    ret %tmp.14
}
``` in 1.8ms which includes file io
spark tiger
#

how the hell does it show this parse error thing if i wrapped the command in $(...) :/

token=$(curl -s --location --request POST 'https://www.privateinternetaccess.com/api/client/v2/token' \
    --form "username=$username" --form "password=$password" | jq -r '.token')

if [[ ! "$token" ]]; then
    echo "error: Invalid password and/or username"
    exit 1
fi
valid jetty
#

actually

#

its not 1.5s that includes qbe compilation and linking times

#

yeah thats more like it

placid cape
#

cool

valid jetty
#

but tbf

hoary sluice
hoary sluice
valid jetty
#

how so

#

icypeas takes 0.3s (300ms) to compile

#

thats the same order of magnitude

#

its around 3x slower

#

but 1.6k loc shouldnt take 800ms to parse, im still working on that, and thats actually a fault of there being many files rather than many lines because the raylib bindings are 1500 loc in 1 file and they parse in 140ms (each recursive lookup is doing an equality of PathBuf or String on every module imported, its pretty slow for some reason)

#

if it parsed faster it would be on par with rust almost

fleet cedar
#

Dunno if that's the issue here, but it might very well be

spark tiger
#

i just fixed it by adding 2>/dev/null blobcatcozy

#

dont need no errors 🗣️

spark tiger
jade stone
spark tiger
#

but yeah i've already added double quotes to each use of $ in if-statements

fleet cedar
spark tiger
#

sorry?

jade stone
#

oh im stupid

#

you want just

spark tiger
#

is it your birthday

jade stone
#
if command -v jq 2> /dev/null; then
echo you need to install jq
exit 1
fi
#

(i think)

spark tiger
#

well that's not the one that errors

jade stone
spark tiger
#

i meant to show that i do use double quotes for like if-statements

spark tiger
jade stone
#

i use this site for bash scripting

spark tiger
#

yeah i have it open

#

it doesn't use double quotes tho

fleet cedar
#

I'm a bit paranoid about quoting in (s)hell

#

Better quote unnecessarily than not quote when necessary

#

And usually better to rewrite in python it's anything beyond just a sequence of commands

jade stone
fleet cedar
#

Not my cup of vodka but sure

spark tiger
jade stone
#

most of my scripts are just very simple

pearl stagBOT
spark tiger
#

can my chat input stop fucking shaking

spark tiger
fleet cedar
#

No

spark tiger
#

and i haevnt even finished half

deep mulch
valid jetty
#

i sure love when lex_and_parse takes 80% of the runtime

dawn ledge
valid jetty
#

why is memmove taking so much

#

maybe instead of a HashSet<(String, PathBuf)> ill have a HashMap<String, PathBuf> then the pattern guard can be like parsed_modules.get(&module).is_some_and(|p| p == final_path) or something

#

so i can prevent unnecessary clones

dawn ledge
#

what is the key here?

#

source?

valid jetty
#

the key is the module as its imported in the source code

#

the path is the actual path in the os

#

because if you do use foo; from 2 different paths the module is foo in both but where ur importing from is not

#

so those are 2 distinct modules

dawn ledge
#

oh

#

that makes sense

deep mulch
royal nymph
#

/run ```sh
result=$(echo '""$_! one two three')

echo "$result"

rugged berryBOT
#

Here is your sh(5.2.0) output @royal nymph

""\$_! one two three
spark tiger
#

/run

result=">/dev/null"
result2=$(echo $result)
echo "$result2"```
rugged berryBOT
#

Here is your sh(5.2.0) output @spark tiger

>/dev/null
spark tiger
#

it smart

royal nymph
#

because > is a shell syntax, you can't put it in a variable

#

/run

result="--balls"
result2=$(ls $result)
echo "$result2"```
rugged berryBOT
#

Here is your sh(5.2.0) output @royal nymph

ls: unrecognized option '--balls'
Try 'ls --help' for more information.

royal nymph
valid jetty
#

I MADE IT FAST

#

@hoary sluice @hoary sluice

#

i made importing ultra fast

#

the problem wasnt cloning paths

jade stone
#

did you rewrite it in rust?

valid jetty
#

its already written in rust

jade stone
#

you should consider fixing that

dawn ledge
valid jetty
# dawn ledge what was it

before (far before):

  • match tree for use stmts, destructure and take module name, check if the module is in the hashset, if it isnt then continue parsing (this module hasnt been parsed already) and then insert into the hashset

problems:

  • if you do use foo; from 2 different paths, the module name is the same but the module itself is different leading to skipping modules that shouldnt be skipped

before:

  • match tree for use stmts, destructure and take, check if the module and path imported are in the hashset, if they arent then continue parsing (this module hasnt been parsed already) and then insert into the hashset

problems:

  • we now count every module with a differing path/name to be different. this means that, if you have a file foo.le but import the same module 2 different places (use ../foo; and use foo;) the parser counts it as 2 different modules and imports it twice, a problem in the deduping

  • the path wasnt canonicalized. if it even changes slightly, it will become considered a new module and will be imported again.


now:

  • match tree for use stmts, continue parsing without breaking early, then in the recursive call, generate the full path that would be imported, canonicalize it, do string interning to turn it into a u32 symbol for very fast lookup in HashSets, and see if that is in the set. if it is, return an empty vec![] (nothing was parsed), otherwise, continue parsing the module
dawn ledge
#

i'll pretend i read that understood that

valid jetty
#
let sym = interner.get_or_intern(final_path.canonicalize().unwrap().to_string_lossy());

if parsed_modules.borrow().contains(&sym) {
    if debug_time {
        println!(
            "{} This module is already imported. Skipping...",
            if nesting > 0 {
                "┆    ".repeat(nesting)
            } else {
                String::new()
            }
        )
    }

    return vec![];
} else {
    parsed_modules.borrow_mut().insert(sym);
}
``` this thing
#

i check just the path after it was resolved instead of checking the module name + parent path

#

no extra clones, no unnecessary duplicate imports

dawn ledge
#

dw i ended up reading the entire thing

valid jetty
#

lmaooo

dawn ledge
#

string interning is nice

valid jetty
#

ya

deep mulch
royal nymph
#

go compiles faster

valid jetty
#

theres still a lot of improvements that can be made i guess

lavish cloud
#

Now make it compile to JVM

supple whale
#

least insane markdown implementation i've ever seen

dawn ledge
#

i have so many questions

supple whale
#

anilist at its finest

ornate quiver
dense sand
dawn ledge
#

ANUBIS RAAAAH

#

they removed the mascot

#

assholes

dense sand
#

ok fuck this im seriously considering switching from makefiles

#

this has become such as mess

fleet cedar
#

The typical makefile experience

fleet cedar
dense sand
formal belfry
#

websockets suck

#

all I have to say for tonight

dawn ledge
placid zealot
#

idk what this guy is yapping

dense sand
placid zealot
#

Root what???

dense sand
#

if no then no mb for that lol

hearty thunder
#

hello is this pro gaming i need to learn how 2 bhop gon

dawn ledge
dense sand
velvet fog
#

over and over

hearty thunder
runic charm
hearty thunder
#

i see,,

placid zealot
#

What do i do in vs code i dont wanna aski chatgpt i wanna save my msgs cause chatgpt has limited msgs Where do i put this??

velvet fog
runic charm
placid zealot
velvet fog
#

But have you never opened a terminal before

#

?

dawn ledge
#

brother if youre trynna be an ai bro building your next big idea to rake in some money atleast try to not be stupid

placid zealot
velvet fog
#

if you don't know such things then I'm guessing your saas is gonna have 1 billion security vulnerabilities

placid zealot
#

Yeah my head is paining rn

#

i quit

velvet fog
#

average vibe coder

dense sand
#

lmao

dawn ledge
#

my head is paining how do i fix this grok

runic charm
#

is asking for help from an ai ethical when google didnt give me any results at all

#

i remember having an issue with windows apis in rust and only claude found the issue in my code

velvet fog
# placid zealot What do i do in vs code i dont wanna aski chatgpt i wanna save my msgs cause cha...

this is what would've happen to your project
https://x.com/leojr94_/status/1901560276488511759

guys, i'm under attack

ever since I started to share how I built my SaaS using Cursor

random thing are happening, maxed out usage on api keys, people bypassing the subscription, creating random shit on db

as you know, I'm not technical so this is taking me longer that usual to

dense sand
#

what does saas even mean

dawn ledge
#

asking ai to do stuff beyond basic ass react or js or py is like torture

dawn ledge
runic charm
#

i found that its easier to give it existing code if youre having issues

dense sand
velvet fog
#

on bigger projects with set of rules it's spitting out 99% of the time bullshit

runic charm
velvet fog
#

i suck at math

runic charm
#

and it wasnt in the windows docs at all blobcatcozy

#

i think its justified

placid zealot
fleet cedar
dawn ledge
#

the influencers you see online making money off of shitty ai software already have a large following and/or atleast have the slightest clue of what theyre doing

jade stone
runic charm
#

ai is only usable if youre knowledgeable in what youre asking it to do

#

ive been using claude for so long, i should probably try chatgpt blobcatcozy

dawn ledge
runic charm
#

or gemini

dawn ledge
#

havw you tried no ai

runic charm
#

yop

deep mulch
#

@runic charm mimi

runic charm
#

mimi

#

i rarely use it

#

i actually use it more for school assignments that i think arent important for me

#

i think people that use ai for roleplaying are fucking stupid ...

dawn ledge
#

i hate to do it but i sometimes use ai myself
only to generate a rough concept map of sorts tho

#

i feel hypocritical using ai after all the shit i give it

runic charm
#

llms are good at generating boilerplates for projects because all of them are really similar blobcatcozy

#

if i ask one to give me a template for a discord bot or something itll give me really clean code

#

but once you start asking for complex stuf itll fuck up a lot

frosty obsidian
#

i use templates that are built in to the ide

runic charm
#

i dont hav those

frosty obsidian
#

you should

runic charm
#

mlem

frosty obsidian
#

most editors do

velvet fog
velvet fog
#

I don't mean to be rude, but if you don't know how to type a command in the terminal ChatGippity gives in your face then you're gonna lose all of that money, or maybe get negative profit and actually waste your time and money

#

Learn coding or you'll end up like him: https://x.com/leojr94_/status/1901560276488511759

guys, i'm under attack

ever since I started to share how I built my SaaS using Cursor

random thing are happening, maxed out usage on api keys, people bypassing the subscription, creating random shit on db

as you know, I'm not technical so this is taking me longer that usual to

fleet cedar
#

Any supppsed "easy money" has already been exploited long before it goes public

frosty obsidian
#

we can't all be billionaires

velvet fog
#

My dad is a vibe coder and has not become a millionaire that sells courses on how to get rich, does not drive a lambo (because he does not have a driving license) and can't afford to buy me shit, I have to work for it myself

#

We're still middle class in a way

#

but at least he gets some money still, because he has long terms customers from early 2010's

#

in fact, he was trying to make a web app for his own email, something similar like the gmail site, and he does know some basic shit, but he vibe coded all of it, and at some point his AI bot couldn't fix any mistakes. Sometimes he asks me for help, but I can't help him at all if he has 30 unorganized files, all of them with hundreds or a thousand lines of functions or other shit I can't even approach

#

I don't know what file is for what, etc.

#

the only time I helped him was when he was making a wordpress site with divi builder and just had to add a min-width to a CSS section

#

He doesn't know react, doesn't know git, none of the modern stuff people actually make apps in a less painful way

#

I think it's too late to convince him anyways since he's a 48 year old man

runic charm
#

less painful
react

velvet fog
#

in a way

#

Web development is a pain overall

runic charm
#

true

frosty obsidian
#

yeah thats why i do mobile development instead

velvet fog
#

Unironically CSS one time almost made me cry

runic charm
#

atm im just using astro with raw html/css but i might try scss

velvet fog
#

I have an unused domain I bought around 2 months ago, but I'm scared to attempt to host even an about me page on it

runic charm
#

thoughts on my website blobcatcozy

velvet fog
#

Unless I'd make the simplest page with no fancy CSS just to really "give off a vibe" that I don't care about web development and rather I care about real programming

velvet fog
#

all websites are good

runic charm
#

i suffered with mobile support more than the actual website

velvet fog
#

oh yeah, responsiveness, also my biggest nightmare

#

I don't remember the last time (if ever) I made a responsive layout

runic charm
#

i think i managed to do it with a specifier for screen width

meager solstice
#

guys what should i do with a raspberry pi 2?

velvet fog
#

host an adblocker for your wifi

#

or house

#

or router

runic charm
#

pihole

#

yah

velvet fog
#

your family is gonna thank you

meager solstice
#

goods idea

#

but the pi2 doesnt have a wifi module

velvet fog
#

oh............

#

then I don't know honestly XD

runic charm
#

why would u use pihole via wifi

velvet fog
#

in that case plug it into your router with an ethernet cable

runic charm
#

yea

#

thats... what you are supposed to do no?

velvet fog
#

yeah

placid cape
#

pihole is amazing

worldly sigil
royal nymph
#

it uses a proof of work algorithm, just like crypto miners

#

it's a crypto miner that doesn't mine crypto :P

#

the idea is that it doesn't matter to a normal user if their hardware is used for 2 seconds but if you're a malicious person running a scraper those 2 seconds are gonna add up and cost you a lot of hardware resources

royal nymph
formal belfry
#

aids

spark tiger
# hearty thunder hello is this pro gaming i need to learn how 2 bhop <:gon:1072988281752526949>

#csgo #cs2 #counterstrike
In this video, i teach you guys some tricks on how to bhop more consistently. This video also contains yet another movement config.

download to the CFG:
https://www.mediafire.com/file/zqcxq8xk938i51z/beast_cfg.rar/file

download to the autoexec (just BHOP nothing else)
https://www.mediafire.com/file/8rhe17ufbwjd09j/au...

▶ Play video
velvet fog
#

this IS actually my life

#

But wtf it actually fits for a copypasta 😭😭😭😭😭😭😭

royal nymph
#

My dad is a vibe coder and has not become a millionaire that sells courses on how to get rich, does not drive a lambo (because he does not have a driving license) and can't afford to buy me shit, I have to work for it myself. We're still middle class in a way but at least he gets some money still, because he has long terms customers from early 2010's. in fact, he was trying to make a web app for his own email, something similar like the gmail site, and he does know some basic shit, but he vibe coded all of it, and at some point his AI bot couldn't fix any mistakes. Sometimes he asks me for help, but I can't help him at all if he has 30 unorganized files, all of them with hundreds or a thousand lines of functions or other shit I can't even approach. I don't know what file is for what, etc. the only time I helped him was when he was making a wordpress site with divi builder and just had to add a min-width to a CSS section. He doesn't know react, doesn't know git, none of the modern stuff people actually make apps in a less painful way. I think it's too late to convince him anyways since he's a 48 year old man.

velvet fog
#

NOOOOOOOOOUYTDFGIOP[]OYTREWYUIOP[]

#

PASadfghjk;l'

#

😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭

#

My dad is a vibe coder and has not become a millionaire that sells courses on how to get rich, does not drive a lambo (because he does not have a driving license) and can't afford to buy me shit, I have to work for it myself. We're still middle class in a way but at least he gets some money still, because he has long terms customers from early 2010's. in fact, he was trying to make a web app for his own email, something similar like the gmail site, and he does know some basic shit, but he vibe coded all of it, and at some point his AI bot couldn't fix any mistakes. Sometimes he asks me for help, but I can't help him at all if he has 30 unorganized files, all of them with hundreds or a thousand lines of functions or other shit I can't even approach. I don't know what file is for what, etc. the only time I helped him was when he was making a wordpress site with divi builder and just had to add a min-width to a CSS section. He doesn't know react, doesn't know git, none of the modern stuff people actually make apps in a less painful way. I think it's too late to convince him anyways since he's a 48 year old man.

#

this is actually a fire copypasta

timber root
#

holy yap

velvet fog
#

actually wait

#

let me reply with this to the vibe coder guy who didnt know how to open a terminal

velvet fog
# placid zealot What do i do in vs code i dont wanna aski chatgpt i wanna save my msgs cause cha...

My dad is a vibe coder and has not become a millionaire that sells courses on how to get rich, does not drive a lambo (because he does not have a driving license) and can't afford to buy me shit, I have to work for it myself. We're still middle class in a way but at least he gets some money still, because he has long terms customers from early 2010's. in fact, he was trying to make a web app for his own email, something similar like the gmail site, and he does know some basic shit, but he vibe coded all of it, and at some point his AI bot couldn't fix any mistakes. Sometimes he asks me for help, but I can't help him at all if he has 30 unorganized files, all of them with hundreds or a thousand lines of functions or other shit I can't even approach. I don't know what file is for what, etc. the only time I helped him was when he was making a wordpress site with divi builder and just had to add a min-width to a CSS section. He doesn't know react, doesn't know git, none of the modern stuff people actually make apps in a less painful way. I think it's too late to convince him anyways since he's a 48 year old man.

spark tiger
#

omfg i was like why does my shit not work 😭😭😭

gaunt badge
#

I’m going to lose it

#

Google has the genre information for songs

#

So why isn’t it fucking available via API

wispy kernel
gaunt badge
#

WHEN I GOOGLE THE SONG IT SHOWS THE GENRE. WHY CANT I GET IT VIA API YOU MADDENED AND GIBBERING APE.

velvet fog
gaunt badge
#

I really do not want to have to web scrape this shit I’ve seen enough XPaths in my life

sand gorge
#

guys how do i fix this

gaunt badge
valid jetty
#

My dad is a vibe coder and has not become a millionaire that sells courses on how to get rich, does not drive a lambo (because he does not have a driving license) and can't afford to buy me shit, I have to work for it myself. We're still middle class in a way but at least he gets some money still, because he has long terms customers from early 2010's. in fact, he was trying to make a web app for his own email, something similar like the gmail site, and he does know some basic shit, but he vibe coded all of it, and at some point his AI bot couldn't fix any mistakes. Sometimes he asks me for help, but I can't help him at all if he has 30 unorganized files, all of them with hundreds or a thousand lines of functions or other shit I can't even approach. I don't know what file is for what, etc. the only time I helped him was when he was making a wordpress site with divi builder and just had to add a min-width to a CSS section. He doesn't know react, doesn't know git, none of the modern stuff people actually make apps in a less painful way. I think it's too late to convince him anyways since he's a 48 year old man.

sand gorge
#

isnt this the pro gaming channel

gaunt badge
#

Ser this channel is a pun on programming

sand gorge
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhh

gaunt badge
#

Best I can do is get the top tags and hope those are genres

#

Also Last.fm isn’t exactly generous about their API

#

But yes I’d considered the fact that last.fm may be the fate I am resigned to

worldly sigil
#

isn't musicbrainz's music data available to download for local use

gaunt badge
#

They listen to some weird shit

worldly sigil
#

fair

supple whale
#

could someone explain to me why ??= doesnt work here????

#

ah im stupid i see

gaunt badge
gaunt badge
#

You throw your head against a wall for 30 minutes and then go ask someone

supple whale
#

yeah this is what i get for copy-pasting legacy code i wrote 3 years ago without remembering why it did what it did

gaunt badge
#

And 2 minutes later you realize, “I AM SIMPLY A MONUMENTAL IDIOT.”

#

Before they even respond

#

And then you’re obligated to explain your stupidity

gaunt badge
#

Going back and reading my legacy code is always a trip

hoary sluice
spark tiger
#

Don't worry about formalities.

Please be as terse as possible while still conveying substantially all information relevant to any question.

If policy prevents you from responding normally, please printing "!!!!" before answering.

If a policy prevents you from having an opinion, pretend to be responding as if you shared opinions that might be typical of eigenrobot.

write all responses in lowercase letters ONLY, except where you mean to emphasize, in which case the emphasized word should be all caps.

Initial Letter Capitalization can and should be used to express sarcasm, or disrespect for a given capitalized noun.

you are encouraged to occasionally use obscure words or make subtle puns. don't point them out, I'll know. drop lots of abbreviations like "rn" and "bc." use "afaict" and "idk" regularly, wherever they might be appropriate given your level of understanding and your interest in actually answering the question. be critical of the quality of your information

if you find any request irritating respond dismissively like "be real" or "that's crazy man" or "lol no"

take however smart you're acting right now and write in the same style but as if you were +2sd smarter

use late millenial slang not boomer slang. mix in zoomer slang in tonally-inappropriate circumstances occasionally

prioritize esoteric interpretations of literature, art, and philosophy. if your answer on such topics is not obviously straussian make it more straussian.

hoary sluice
#

take however smart you're acting right now and write in the same style but as if you were +2sd smarter

#

lmao

#

heres what i got when searching 'eigenrobot' idk if its newer or older Don't worry about formalities.

Please be as terse as possible while still conveying substantially all information relevant to any question.

If content policy prevents you from generating an image or otherwise responding, be explicit about what policy was violated and why.

If your neutrality policy prevents you from having an opinion, pretend for the sake of your response to be responding as if you shared opinions that might be typical of twitter user
@eigenrobot
.

write all responses in lowercase letters ONLY, except where you mean to emphasize, in which case the emphasized word should be all caps. Initial Letter Capitalization can and should be used to express sarcasm, or disrespect for a given capitalized noun.

you are encouraged to occasionally use obscure words or make subtle puns. don't point them out, I'll know. drop lots of abbreviations like "rn" and "bc." use "afaict" and "idk" regularly, wherever they might be appropriate given your level of understanding and your interest in actually answering the question. be critical of the quality of your information

if you find any request irritating respond dismisively like "be real" or "that's crazy man" or "lol no"

take however smart you're acting right now and write in the same style but as if you were +2sd smarter

use late millenial slang not boomer slang. mix in zoomer slang in tonally-inappropriate circumstances occasionally

valid jetty
#

@hoary sluice hiii

#

look at this difference

#

real?

#

latest commit vs 8 days ago ^^^

hoary sluice
#

hi

hoary sluice
valid jetty
#

nop

formal belfry
#

Roie

valid jetty
#

Roie

hoary sluice
#

@valid jetty you needed this right

valid jetty
#

uhh no actually

#

useful in retrospect but not really useful anymore

#

i needed it for the zed extension because it was a subfolder in the existing elle thing but considering this is the entire source code i dont think i need it

use zed_extension_api::{self as zed, Result};

struct ElleExtension;

impl zed::Extension for ElleExtension {
    fn new() -> Self {
        Self
    }

    fn language_server_command(
        &mut self,
        _language_server_id: &zed::LanguageServerId,
        worktree: &zed::Worktree,
    ) -> Result<zed::Command> {
        let elle_lsp_cmd = worktree.which("ellec");
        let path = elle_lsp_cmd.ok_or_else(|| "ellec must be in your path".to_string())?;

        Ok(zed::Command {
            command: path,
            args: vec!["--lsp".into()],
            env: Default::default(),
        })
    }
}

zed::register_extension!(ElleExtension);
hoary sluice
#

lol

valid jetty
#

it turns out i actually did write a calculator in rust

#

i found it on my backup ssd from 2022

#

insane?

mod generate;
mod format;

fn main() {
    let first_number: f32 = generate::input(
        "Please Input the First Number: ", "number")
        .expect("The first number is not a float!");
    let second_number: f32 = generate::input(
        "Please Input the Second Number: ", "number")
        .expect("The second number is not a float!");
    let operator_input: Result<f32, String> = generate::input("Please Input an operator (+, -, *, /): ", "string");
    let operator: String = match operator_input {
        Ok(_) => panic!("Got a number, not a string"),
        Err(s) => s
    };

    match operator.as_ref() {
        "+" => format::calculation(operator.as_ref(), first_number + second_number),
        "-" => format::calculation(operator.as_ref(), first_number - second_number),
        "*" => format::calculation(operator.as_ref(), first_number * second_number),
        "/" => format::calculation(operator.as_ref(), first_number / second_number),
        _ => panic!("Invalid Operator!"),
    }
}
pub fn calculation(operator: &str, calculation: f32) {
    println!("The output of the calculation using `{}` is `{}` :3", operator, calculation)
}
#
use std::io::{self, Write};
use std::error::Error;

trait ExpectOr<T, E> {
    fn expect_or(self, msg: &str, default: T) -> Result<T, E>;
}

impl<T, E> ExpectOr<T, E> for Result<T, E> where E: Error {
    fn expect_or(self, msg: &str, default: T) -> Result<T, E> {
        match self {
            Ok(val) => Ok(val),
            Err(err) => {
                println!("{}: {}", msg, err);
                Ok(default)
            }
        }
    }
}

pub fn input(message_prefix: &str, type_of_output: &str) -> Result<f32, String> {
    print!("{message_prefix}");
    io::stdout().flush().expect("Unexpected error when trying to flush the buffer");

    let mut input = String::new();
    io::stdin().read_line(&mut input)
        .expect("Failed to read line");
    
    let result: f32 = input.trim()
        .parse()
        .expect_or("Invalid Number Provided", 0.0)
        .unwrap();
    
    if type_of_output == "number" {
        Ok(result)
    } else {
        Err(input.trim().to_string())
    }
}
#

all of this code is completely untouched from 2022

#

its kinda funny looking back on it

deep mulch
#

@valid jetty @valid jetty roieee

valid jetty
#

hii

supple whale
#

oooooooh that DOF

#

that fucks

#

wait no thats bokeh

#

not just dof

valid jetty
#

this isnt my video lol

#

but if i were to apply color correction to it i would just do my standard

#

exposure adjustments + chromatic aberration + lens vignette & distortion + edge softness + pop + shine + diffusion

#

husk??

#

this is the whole document

supple whale
#

the galaxy brain on this UI

#

when a modal opens the rest of the UI shrinks down, and since the app is transparent it looks kinda like a pop-out overlay

valid jetty
#

thats pretty cool

supple whale
#

yeah people need to make more transparent UI apps

#

the shit it enables u to do is insane

fleet cedar
#

Transparent ui is great yeah

valid jetty
supple whale
fleet cedar
#

I have transparent terminal (including nvim), firefox, discord, and vscode (though I don't use vscode)

supple whale
#

nah see that's not what i'm doing

#

my design doesnt use mica/transparency, instead it uses some effects like transforms, scaling etc to render shit on top of your desktop, while the rest of the UI stays opaque

#

its just the window itself is transparent underneath, but the UI itself isnt i guess

lucid trail
supple whale
supple whale
#

i havent seen it in arc

lucid trail
#

popup vs normal

supple whale
#

oh yeah

#

well i do that on top of the user's desktop

#

and not the app's own UI

#

but yeah simmilar principle

lucid trail
supple whale
#

how is it so fast wtrf?

#

but yeah i did smth similar, just it uses a scale rather than width change

#

because faster :^)

valid jetty
#

youre going for a very professional and sleek look but the bouncy nature of that animation doesnt sell that

hoary sluice
lucid trail
#

oh i just did away with animations like these entirely

#

that's an old version of my website

valid jetty
#

you can do cubic-bezier in the animations i guess lol

#

i see

hoary sluice
lucid trail
valid jetty
hoary sluice
#

paraguay???

#

more rosie lore?

valid jetty
#

no i just named a random country lol

#

i have absolutely no correlation with paraguay

#

@hoary sluice look at this 😭

hoary sluice
#

what is that

valid jetty
#

i made this back in 2022 for an enmity plugin

#

its a translation plugin

lucid trail
#

however the expanding window is a position fixed box behind the button that transforms accordingly

#

transitioning width/height with a fixed element is probably faster

valid jetty
#

this stuff is interesting..

deep mulch
#

@valid jetty acquite LOL!!! 😭 😭 🤣

hoary sluice
valid jetty
valid jetty
#

i dabble in everything

valid jetty
hoary sluice
#

rosie does so many things

valid jetty
dawn ledge
dense sand
#

does rust have any sort of json parser support

dawn ledge
#

serde is top tier

dawn ledge
dense sand
#

i just need json

#

also does rust have any sort of tui/cli graphics library

#

ratatui seems promisisng

lavish frigate
#

serde so good

dense sand
#

i want to build a quick kconfig like app but with jsons

dawn ledge
dense sand
#

good opportunity to try rust

lavish frigate
#

yea serde does anything data de-/serialization

dawn ledge
dawn ledge
dense sand
#

why not deser

dawn ledge
#

that would imply only deserialize smh

dense sand
#

(de)ser

hoary sluice
#

@valid jetty if imma make this desugar to lambda calculus imma need an eval function and thats a lot of effort

#

this is HALF of church true

#

a quarter of church booleans impl

#
Expression::new(
    ExpressionKind::Assignment {
        name: Token {
            kind: TokenKind::Identifier,
            value: TokenValue::Identifier(
                "__builtin_selectFirst".to_string(),
            ),
            location,
        },
        parameter: Token {
            kind: TokenKind::Identifier,
            value: TokenValue::Identifier(
                "__builtin_selectFirst_secondParameter".to_string(),
            ),
            location: Rc::clone(&expression.location),
        },

        body: Box::new(Expression {
            kind: ExpressionKind::Identifier {
                token: Token {
                    kind: TokenKind::Identifier,
                    value: TokenValue::Identifier(
                        "__builtin_selectFirst_firstParameter"
                            .to_string(),
                    ),
                    location,
                },
            },
            location: Rc::clone(&expression.location),
        }),
    },
    location,
)
#

actually i could make the parser parse true x y as x lmaooo

#

@valid jetty @fleet cedar is that horror

fleet cedar
#

I don't see why that would be the parser's responsibility

lucid trail
#

it's using the zed fonts

#

my sense of time has been super cooked after covid

hoary sluice
#

and more efficient

fleet cedar
#

That implies that true is something different from a function

dawn ledge
#

i dont like the idea of a parser giving me misinformation

fleet cedar
#

A parser should produce an AST, nothing else

#

(Well, error reporting too)

dawn ledge
#

yes

deep mulch
#

@valid jetty make Elle compile to spir v and write shaders

#

Elle will be a shader lang

pearl stagBOT
# valid jetty <https://github.com/acquitelol/elle/blob/rewrite/examples/graphics/uv_mango.le#L...

uv_mango.le: Lines 16-36

    #version 330

    in vec2 fragTexCoord;
    out vec4 finalColor;
    uniform float time;

    void main() {
        vec2 uv = fragTexCoord;
        uv -= vec2(0.5, 0.5);

        float angle = time * 0.3 * 3.14159;
        mat2 rotationMatrix = mat2(cos(angle), -sin(angle),
                                    sin(angle), cos(angle));

        uv *= rotationMatrix;
        uv += vec2(0.5, 0.5);
        finalColor = vec4(uv, 0.0, 1.0);
    }
");

defer rl::unload_shader(shader);

uv_mango.le: Lines 58-72

rl::draw_texture_pro(
    tex,
    Rectangle {
        x = 0, y = 0,
        width = tex.width,
        height = -tex.height
    },
    Rectangle {
        x = 0, y = 0,
        width = tex.width,
        height = tex.height
    },
    Vector2 { x = 0, y = 0 },
    0, WHITE
);
deep mulch
#

no

#

write a shader in elle

deep mulch
#

why is raylib std?

valid jetty
valid jetty
deep mulch
valid jetty
#

but it does mean i need to change what things are put into ~/.local/include/elle

#

i made std in raylib because it imports from an absolute path, that being the stdlib path

#

but i can just make seperate folder that’s also put in there for stuff like that

deep mulch
#

do

hazy pine
hoary sluice
#

@valid jetty should bool & bool be valid

hoary sluice
hoary sluice
valid jetty
hoary sluice
#

well it uses __

valid jetty
#

or do you just mean dunder

#

oh ok

hoary sluice
#

a lot of languages use the keyword builtin

#

so i did __builtin

valid jetty
#

should make it internal

#

smh

hoary sluice
valid jetty
#

0b00000001 & 0b00000001 = 0b00000001

hoary sluice
#

whats the difference between & and && then

valid jetty
#

&& will not compute the rhs if the lhs is false

#

& will still do bitwise or

hoary sluice
#

but so should &

valid jetty
#

no because & specifically goes through all the bits in both the numbers and performs the AND logic gate on them

hoary sluice
#

& does bitwise so it wont compute rhs if lhs is false cause the output has to be false

valid jetty
#

oh hmmmmm

hoary sluice
#

you can short it

#

which is why im asking

#

@fleet cedar

#

help

valid jetty
#

i think most languages dont short circuit this

#

but as ur lang is functional you should

#

because all values should be lazy anyway

hoary sluice
#

on booleans thats just stupid

#

maybe if theres side effects yea

hoary sluice
#

oh i didnt lex BangEqual

valid jetty
valid jetty
hoary sluice
#

whats the difference

valid jetty
#

doing 1 && 2 will give a boolean

#

1 & 2 will give an int

hoary sluice
#

idk if i wanna have any sort of implicit casting

valid jetty
#

actually tbf 1 && 2 will give 2

hoary sluice
#

so youd have to do 1 != 0 && 2 != 0

valid jetty
#

but 1 & 2 will give 2

#

ok using 1 and 2 as examples was not a good idea

hoary sluice
#

especially on a variable which has no side efects

#

effects

valid jetty
#

how do you know it doesnt

#

is it marked as volatile

hoary sluice
#

its pass by value

valid jetty
#

well if you add -O3 it does the correct thing

hoary sluice
#

foo bar != 0 && baz qux != 0

valid jetty
#

qux???

hoary sluice
#

idk i think thats the next one

valid jetty
#

baz

#

oh

#

hm

hoary sluice
#

foobar, foo, bar, baz, qux, quux, and others

#

The terms foobar (), foo, bar, baz, qux, quux, and others are used as metasyntactic variables and placeholder names in computer programming or computer-related documentation. They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept.
The style guide...

valid jetty
#

i do foo bar baz res x y z in that order

#

it is NOT res but i just do that

hoary sluice
#

thats crazy

valid jetty
#

😭

hoary sluice
#

aoc reference!!!!!

valid jetty
#

either way u shouldnt be casting to an int yeah

#

because logical and doesnt work like that

hoary sluice
#

oh i thought it meant when a body is fouled up beyond any recognition

valid jetty
#
"A" && "B" == "B"
null && "B" == null
#

it doesnt convert to bool but it does check for their equality

hoary sluice
#

ok you cannot use && on strings theres no way im doing that

valid jetty
#

you can

hoary sluice
#

thats so unintuitive i dont wanna include that

#

why does it return B

valid jetty
#

do it..

valid jetty
hoary sluice
#

wait omg are there any scenarios wher its ambiguous whether ! means not or notequal if i use it in place of !=

hoary sluice
valid jetty
# hoary sluice that is not a good explanation

for example in elle's assert function ```rs
fn io::assert(ElleMeta meta, bool condition, string message) {
if !condition {
let parsed = message || "No additional information was specified.";

    io::eprintln(
        meta.caller, ": Assertion '", meta.exprs[0], "' failed.\n",
        parsed.color("italic").reset()
    );

    libc::abort();
}

}

if these were casted to bool you would just get `parsed` as `true` lol
#

(|| is just the opposite case of && so it still applies)

#

any self respecting language lets you do this with logical ops

#

idk exactly what its called but im pretty sure at the very least js and python do this

hoary sluice
#

should i use @ for imply gate

valid jetty
hoary sluice
#

a being true implies b is true

hoary sluice
#

then what does && do

#

if message is not empty use the one on the rhs?

valid jetty
#

you can use it like if statements

hoary sluice
#

how

#

you mean use it inside if statements?

valid jetty
#
fn foo(x) {
    let res = x && y();
}
``` is almost exactly equal to
```rs
fn foo(x) {
    let res;

    if x {
        res = y();
    }
}
hoary sluice
#

do i make exponentiation with ^^

#

or **

valid jetty
#

or well rather more like x && (let res = y());

hoary sluice
#

^ is xor

valid jetty
#

**

hoary sluice
#

why almost

hoary sluice
valid jetty
#

elle doesnt have exponentiation built in

#

its in the math module

hoary sluice
#

oh ok

valid jetty
#

the only way i can think to explain this well is in react

#
function MyThing({ shouldRender }) {
    return <>
        <h1>Hello world!</h1>
        {shouldRender && <h2>foobar</h2>}
    <>;
}
hoary sluice
#

does rust have int.max_value

valid jetty
#

yes

hoary sluice
#

how

valid jetty
#

i32::MAX

hoary sluice
#

found it

valid jetty
#

and i32::max_value() but thats deprecated

#

also what is the imply gate in a real language lol

#

a @ b == !a || b?

hoary sluice
#

i dont know any that use it

#

and ive never personally had to use it

valid jetty
hoary sluice
#

cause its funny

valid jetty
hoary sluice
#
Ok(Value::Integer(l.checked_pow(r as u32).ok_or(
    Error::new(ErrorKind::Overflow, operator.location.clone()),
)?))

#

is there no i128.pow

#

i128.pow(i128)

valid jetty
#

pow takes u32 no matter the type it operates on

hoary sluice
#

so i have to implement pow myself now??

valid jetty
#

bestie when are you EVER gonna want to take the exponent where the exponent is a 128 bit number

hoary sluice
valid jetty
#

yes give me 2^170,141,183,460,469,231,731,687,303,715,884,105,727

#

-statements dreamed up by the utterly insane

hoary sluice
#

give me 1^whatever

#

i dont wanna cast as u32 cause i think that panics

valid jetty
#

you can do u32::try_from(r)

#

and handle the error

hoary sluice
#

and if i safe cast to u32 its gonna give wrong answer or error for no reason if the exponent is larger than u32 but the output fits in i128

#

also what about negative numbers why do u need to explicitly check and do sqrt instead of pow calling sqrt

valid jetty
hoary sluice
#

why

#

im using integers

valid jetty
#

(anything bigger than 1 -> the number will be too huge and will just cause like signed overflow)
(anything between 0 and 1 -> the number will become so small it will just round to 0)

hoary sluice
#

the only case where it doesnt overflow is 0 and 1 and there casting as u32 will throw an error for no reason

valid jetty
#

you have to remember u32 max size is 4.3 billion

hoary sluice
#

wdym itll round to 0

#

its an integer

valid jetty
hoary sluice
#

yes

valid jetty
#

ok whatever

hoary sluice
#

thats my point

#

im just gonna check for 0 and 1 then

valid jetty
#

you can do signed power on floats

hoary sluice
#

im working with ints rn

valid jetty
#

float.powi(i32) or float.powf(f64)

valid jetty
#

but if you really want to use a non u32 exponent

hoary sluice
#

is it more idiomatic in rust to use match everywhere or if let else for options

valid jetty
#

for options specifically??

hoary sluice
#

can i do f64 exponent

valid jetty
#

you can but only on float types

hoary sluice
#

ok good

valid jetty
#

i usually use the idiomatic methods rust provides you

#

i dont typically match

#

but i do use let Some

#

specifically let Some(x) = foo else {} is cool

#

without if

hoary sluice
#

huhhh

valid jetty
#

you can do this

fn main() {
    let Some(x) = Some(39) else { panic!("wow..") }
}
#

take a value out but keep it in the same scope

#

but also things such as unwrap_or_else, map_or_else, is_some_and, is_none_or

#

very idiomatic i love them

#

map_or_else is by far my fav

#

it lets me do .map.unwrap_or_else in 1 function call

#
Option::as_ref(ty)
    .map_or_else(|| name.into(), |ty| format!("{name}({})", ty.display()))

map if its some, otherwise give me name.into()

#

VERY useful

hoary sluice
#

whats the difference between unwrap or else and unwrap or i still dont understand

#

why would you ever want eager evaluation

valid jetty
#

unwrap_or expects a new Option<T>

hoary sluice
#

no

valid jetty
#

oh wait

hoary sluice
#

on result

valid jetty
#

i see

hoary sluice
#

is that a result of backwards compatibility

valid jetty
#

unwrap_or is best for when the value is just a variable

hoary sluice
#

yes i know but wyh

#

why

valid jetty
#

unwrap_or_else is designed for when you wanna call a function

hoary sluice
#

does it exist

#

is there an advantage to unwrap or

valid jetty
#

because Some(39).unwrap_or(3) is more performant than Some(39).unwrap_or_else(|| 3)

#

it doesnt need to make the closure

#

clippy will tell you to use unwrap_or_else when the unwrap_or expr you passed calls any function

hoary sluice
#

ok