#πŸͺ…-progaming

1 messages Β· Page 31 of 1

hoary sluice
#

so much easier to do shit in the morning

#

when its 11pm i only watch yt

placid cape
#

when no .insert husk

valid jetty
#

i have a sibling so

#

during the night is so much easier for me

valid jetty
#

are you copying what i did in elle lol because i dont think thats the best way to do that

placid cape
#

it is but it works

placid cape
#

but i'll probably change it to append the variadic argument directly

#

yeah gonna do it

valid jetty
placid cape
#

okay way better

valid jetty
#

appending isnt always correct tho

placid cape
#

it isnt?

valid jetty
#

what if you have

fn foo(i32 x, i32 y, ...) {}

foo(1, 2, "a", "b")
#

your code will insert it after "b" when it should go after 2

placid cape
#

no it'll make it after 2

valid jetty
#

huh

placid cape
valid jetty
#

oh you do it there

#

lol

#

ok

placid cape
#

oh wait husk

#

off by one ✨

valid jetty
#

just like aoc

placid cape
#

exactly heh

#

okay nice it works

#

i should stop committing qbe output file &Β asm

#

gn guys

twilit sigil
valid jetty
placid cape
#

New year, new programming language

valid jetty
#

what the heck this thing is actually kinda cool

placid cape
#

Didn't know this exists lol

#

interesting

valid jetty
#

me neither

#

i searched blom and sorted by most recently comitted

#

wtf

final string = new {
    call(value) => bbvm::str(value);
    
    final startswith(str query) => new {
        call(str search) = {
            query = this..query;
            nsearch = search|len;
            nquery = query|len;
            if(nsearch<nquery) return false;
            while(i in range(nquery)) if(query[i]!=search[i]) return false;
            return true;
        }
    }
    final endswith(str query) => new {
        call(str search) = {
            query = this..query;
            nsearch = search|len;
            nquery = query|len;
            if(nsearch<nquery) return false;
            while(i in range(nquery)) if(query[i]!=search[nsearch-nquery+i]) return false;
            return true;
        }
    }
    final index(str query) => new {
        call(str search) = {
            query = this..query;
            pos = this..pos;
            nsearch = search|len;
            nquery = query|len;
            while(i in range(pos, nsearch-nquery+1)) {
                different = try while(j in range(nquery)) if(query[j]!=search[i+j]) return true;
                catch(different) return i;
            } 
            return nsearch;//fail("Index not found");
        }
    }
    final split(str query) => new {
        default maxsplits = 0;
        call(str search) = {
            query = this..query;
            nsearch = search|len;
            nquery = query|len;
            if(nquery==0) fail("Cannot split on a zero-length string");
            ret = list();
            pos = 0;
            try while(pos<nsearch) {
                prev_pos = pos;
                pos = search|string.index(query :: pos=pos);
                s = search[range(prev_pos, pos)];
                push(ret, s);
                pos += nquery;
            }
            return ret;
        }
    }
}
#

this system is so cool

placid cape
#

well yea

valid jetty
#

i have no idea how this works

placid cape
#

so it uses VM

valid jetty
#

yeah but so does like erlang (and therefore elixir/gleam)

#

and j*va

placid cape
#

Erlang is cool

valid jetty
#

have you seen gleam

placid cape
#

Yea

valid jetty
#

its rust if it was a fpl

placid cape
#

Well I just know that it has similar syntax

#

don't know a lot about the language features

valid jetty
#

ok but this kinda sucks

valid jetty
#

this is actually so similar what the heck

placid cape
#

no loops?

valid jetty
#

no loops ya

placid cape
#

Isn't loop faster than recursion lol

valid jetty
#

not if you do tail call recursion optimization

#

a loop is just a jmp

#

tail call optimizations just turns recursion into a jmp

#

also apparently elle has multiline strings because rust is awesome

#

aswell as unicode in strings because rust chars are wide

placid cape
valid jetty
#

but yeah it has the same "tail of a block is the return" as rust

import gleam/io

pub fn main() {
  let fahrenheit = {
    let degrees = 64
    degrees
  }
  // io.debug(degrees) // <- This will not compile

  // Changing order of evaluation
  let celsius = { fahrenheit - 32 } * 5 / 9
  io.debug(celsius)
}
placid cape
#

well yea that's what I want to do too

valid jetty
#

and looks a lot like rust in general i guess

placid cape
#

I talked about it in the morning/afternoon

valid jetty
#

that would be fun

placid cape
#

yeah the only issue is ```
let a = 5;

{
let a = 7;
{
a = 9;
print a
}
print a
}

print a

#

scope

valid jetty
valid jetty
#

or in rust ()

placid cape
#

yea but talking about variable assignment

#

return types are easy

#

that's not a big deal

valid jetty
#

how do variable assignments have anything to do with the return tho

placid cape
#

I'm not talking about returns

valid jetty
#

oh

placid cape
#

I'm talking about closures and their scope

placid cape
valid jetty
#

what does it print?

placid cape
#

it's not implemented yet xd

valid jetty
#

oh so actually elle does this wrong

#

i know why ill fix that in a sec

placid cape
#

how are you doing it?

#

"renaming" the variables or?

valid jetty
#

this is the issue

#

get variable searches all the scopes

valid jetty
#

i can just make existing be nothing if the variable isnt a redeclaration

#

that shouldnt be too hard

#

1 sec

#

actually thats unrelated

#

this is the issue

#

if it finds an addr for the variable it assigns to that addr even if the variable should be newly declared

#

easy fix

placid cape
#

so you have closures

#

nice

#

first new year in 11 hours

valid jetty
#

nothing is being captured

#

in qbe scopes dont exist

#

theyre a madeup concept in the compiler

#

each scope is a hashmap from the variable name to (ty, val)

#

each new scope pushes a new hashmap

#

each scope end pops the current hashmap

placid cape
#

well yea you just have blocks with own scope or how to call it

valid jetty
#

nope

#

scope is shared between blocks

#

or wait

#

you mean blocks like { x }

placid cape
#

yea

valid jetty
#

im thinking of IR blocks like @start lol

placid cape
#

nono

#

{ { {} } }

valid jetty
#

blocks open a new scope yes

placid cape
#

three blocks

valid jetty
#
AstNode::BlockStatement { body, location: _ } => {
    self.scopes.push(hashmap!());
    self.tmp_counter += 1;

    let body_label = format!("block.start.{}", self.tmp_counter);
    let end_label = format!("block.end.{}", self.tmp_counter);
    func.borrow_mut().add_block(body_label.clone());

    for statement in body.iter() {
        match statement {
            AstNode::Literal { kind, .. } => match kind {
                TokenKind::ExactLiteral => {
                    match self.generate_statement(
                        func,
                        module,
                        statement.clone(),
                        None,
                        None,
                        false,
                    ) {
                        Some((_, value)) => func
                            .borrow_mut()
                            .add_instruction(Instruction::Literal(value)),
                        _ => {}
                    }
                }
                TokenKind::Break | TokenKind::Continue => {
                    self.generate_statement(
                        func,
                        module,
                        statement.clone(),
                        None,
                        None,
                        false,
                    );
                }
                _ => {}
            },
            _ => match self.generate_statement(
                func,
                module,
                statement.clone(),
                None,
                None,
                false,
            ) {
                _ => {}
            },
        }
    }

    func.borrow_mut().add_block(end_label);
    self.scopes.pop();
    None
}
placid cape
#

πŸ‘

#

and closure is just a block that captures the "return" value

#

the last expression

valid jetty
#

yeah

placid cape
#

well okay

valid jetty
#

idk i see closures as capturing lambdas

#

lambdas which capture variables from surrounding scopes in an env

placid cape
#

then it shouldn't be that difficult to make your blocks to actually capture the value

valid jetty
#

its not but it doesnt really make the code that much cleaner and my semicolon parsing is very messy lol

placid cape
#

oh semicolon parsing

#

i hate that

valid jetty
#

yeah

#

worst thing ever

placid cape
#

it's easier to not have semicolons husk

#

but I like them

#

gleam has True and False like python 😭

valid jetty
#

oh what

#

why do they have the same name

#

no wonder it isnt working

#

there we go

#

the expected output

#
external fn printf(string formatter, ...);

fn main() {
    let a = 5;
    {
        let a = 7;
        {
            a = 9;
            printf("%d\n", a);
        }
        printf("%d\n", a);
    }
    printf("%d\n", a);
}
#

a = 9 modifies the a from the inner block

#

the a from the outer scope is left unaffected

placid cape
#

nice

valid jetty
#

ok all the tests pass

#

i swear that was working at some point im not sure how it broke

#

but anyway

#
  1. if no type is specified (ie a = 7 instead of let a = 7) store the value at the nearest scope's address with that name
  2. when creating a new addr for that name make sure its unique
#

seems to work fine

#

if ur gonna implement scopes you should do this i guess

#

its a neat way to do scopes

#
  • when entering a new scope push a new hashmap
  • when leaving a scope pop the hashmap at end of the array
  • when searching for a variable search through the scopes starting from the end
#

maybe ill add mut lol

#

mutability is something i can simulate pretty easily in the compiler

#

except maybe not with ```rs
let x = 0;
let y = &x;
*y = 1;

runic sundial
valid jetty
#

so true veev

runic sundial
valid jetty
#

veev you should make venlang

#

its java syntax but compiles into python

fleet cedar
#

Like jython but worse

valid jetty
#
class __main__ {
    public static void main(string[] args) {
        System.out.println(args[0]);
    }
}
from sys import argv

def main():
    print(argv[0])

if __name__ == "__main__":
    main()
runic sundial
valid jetty
#

is there anything else i need to say in the docs about this

#

its kinda intesting to see how much bloat and abstraction that tiny little example compiles into

#
use std/prelude;

fn main(string[] args) {
    let program = args.pop();

    for arg in args {
        if arg == "foo" {
            io::println("i received a foo!");
        }
    }
}
``` this compiles into this main function
#

keep in mind thats the main function only

#

theres other things that have to be compiled too

#

like the allocator and dynamic arrays and other stuff

fleet cedar
#

Wait does pop remove from the beginning?

valid jetty
#

oh

#

i forgot to update the example

#

no lol

#

its meant to be remove(0)

fleet cedar
#

Makes more sense

valid jetty
#

its crazy how far this silly experiment has come

valid jetty
#

oh my god @hoary sluice

#

commonjs: bundling at its finest
requirejs: the better commonjs
webpack: fixing requirejs
rollup: fixing webpack
parcel: fixing rollup
esbuild: to be used with rollup
vite: fixing rollup
turbopack??? rolldown??? parcel 2???? bun???? when will it end holy shit

serene elk
#

rspack: fix webpack slowness

valid jetty
#

horror

#

await IO\request_output()->writeAllAsync("Hello World!\n");

#

i think that may just be worse than System.out.println("Hello, World!");

ornate quiver
#

works fine

valid jetty
#

the web has gone too far

#

the bloat is just continuously built upon itself

twilit sigil
#

The bloat will soon start in-fighting

#

And the bloat will destroy itself

valid jetty
#

wtf was i writing lol

#

hmmm StatementExpr

valid jetty
#

i made lambdas nicer + added multiline lambdas

use std/prelude;

fn main() {
    let exclaim = fn(string x) x <> "!";
    let whisper = fn(string x) x.to_lower();

    io::assert(exclaim("Hello, world") == "Hello, world!", nil);
    io::assert(whisper("Hello, world") == "hello, world", nil);

    let multiline = fn(f32 x) {
        let foo = math::sqrt(x) * E;
        return (i32)(foo / 4);
    };

    io::assert(multiline(81) == 6, nil);
    io::println("All lambda tests have passed!".color("green").reset());
}
#

still no capturing

#

but its nicer than before

pearl stagBOT
#

Provided file is too long.

void leaf
#

Damn

valid jetty
#

i did a thing idk how silly this is

use std/allocators/heap;
use std/prelude;

fn main() {
    let heap = HeapAllocator::new();
    defer heap.free_self();

    mem::$scoped(
        heap,
        fn() {
            i32 *x = #env.allocator.alloc(#size(i32));
            *x = 39;

            io::dbg(x);
        }
    );
}
#

and HeapAllocator is just the bare minimum allocator interface

use std/libc/mem;
global pub;

struct HeapAllocator {
    i8 _;
};

fn HeapAllocator::new() {
    HeapAllocator *allocator = mem::malloc(#size(HeapAllocator *));
    *allocator = mem::malloc(#size(HeapAllocator));

    allocator._ = 0;
    return allocator;
}

fn HeapAllocator::alloc(HeapAllocator *self, i32 _size) {
    return mem::malloc(_size);
}

fn HeapAllocator::realloc(HeapAllocator *self, void *ptr, i32 _new_size) {
    return mem::realloc(ptr, _new_size);
}

fn HeapAllocator::free(HeapAllocator *self, void *ptr) {
    return mem::free(ptr);
}

fn HeapAllocator::free_self(HeapAllocator *self) {
    mem::free((void *)(*self));
    mem::free(self);
}
#

what $scoped does is use the allocator you specify for the duration of that function and then use the original allocator (arena in this case) for everything else

odd lake
#

import syntax is good, actually

#

I am a deno fan, they took standards and did it well

#

jsx and the bundlers and the such however, I will never understand

valid jetty
#

holy shit i can do this lmfao

use std/libc/mem;

namespace HeapAllocator;
global pub;

fn HeapAllocator::new() {
    return (HeapAllocator *)nil;
}

fn HeapAllocator::alloc(HeapAllocator *self, i32 size) {
    return mem::malloc(size);
}

fn HeapAllocator::realloc(HeapAllocator *self, void *ptr, i32 new_size) {
    return mem::realloc(ptr, new_size);
}

fn HeapAllocator::free(HeapAllocator *self, void *ptr) {
    return mem::free(ptr);
}

fn HeapAllocator::free_self(HeapAllocator *self) {}
valid jetty
#

idk maybe

#

i have ArenaAllocator already

#

next i need TempAllocator and TrackingAllocator i guess

valid jetty
#

i saw this video and i was like "i can write that whats so complicated"

#

so i did

use std/prelude;

fn to<T>(string x) {
    T res = 0;

    for c in x {
        res = (res * 10) + (c - '0');
    }

    return res;
}

fn main() {
    io::dbg(to<i32>("12345"));
}
#

how could they possibly stretch this out for 10 mins

#

oh my god why is it stretched out so much

#

LMAO I WAS SO RIGHT

#

i literally wrote the exact thing they did

viscid grove
#

(also the voice sounds fake)

royal nymph
valid jetty
#

yeah it is

#

its text to speech

royal nymph
viscid grove
#

yeah forgot that phrase oops

valid jetty
royal nymph
#

how does that channel almost have 200k subs

#

who's watching this

viscid grove
#

This video was sponsored by Flexispot.
πŸ’₯FlexiSpot Amazon Prime Day Deal Up to 60% OFFπŸ’₯
10 100% Free orders on July 16th & July 17th🎁
US site: https://amzn.to/3XBuaxV
Upgrade your workspace with OC6 Ergonomic Chair:https://amzn.to/3XLNwAq

In this episode we learn the whole process of casting a decimal number formated as a string to a number tha...

β–Ά Play video
valid jetty
#

yes

#
use std/prelude;

fn to<T>(string str) {
    T res = 0;
    let radix = 10;
    let start = 0;

    if str.len() >= 2 && str[0] == '0' && str[1] == 'x' {
        radix = 16;
        start = 2;
    }

    for i in start..str.len() {
        let c = str[i];
        res *= radix;

        if radix == 16 {
            if c >= '0' && c <= '9' {
                res += (c - '0');
            } else { if c >= 'a' && c <= 'f' {
                res += (c - 'a' + 10);
            } else { if c >= 'A' && c <= 'F' {
                res += (c - 'A' + 10);
            }}}
        } else {
            res += (c - '0');
        }
    }

    return res;
}

fn main() {
    io::dbg(to<i32>("12345"));
    io::dbg(to<i32>("0xFF"));
}
``` hex support
viscid grove
#

now add an optional base argument

valid jetty
#

oh actually this is slightly wrong

viscid grove
#

I think it's parseint()

valid jetty
#

yeah it does

#

parseInt(str, radix)

#

idk how to do floats

#

11.1234 could be turned into 111234 / 10^4

#

where 4 is the number of digits after the decimal

#

thats actually what i do for elle floats

#
fn parse_float(&self, token: Token) -> AstNode {
    let value = match token.value {
        ValueKind::String(val) => val,
        _ => todo!(),
    };

    if !value.contains(".") {
        panic!("Invalid float literal provided");
    }

    let nodes: Vec<&str> = value.split('.').collect();
    let left = nodes[0];
    let right = nodes[1];

    let exponent = right.len();
    let original = String::from_iter([left, right]).parse::<i128>().unwrap();

    AstNode::BinaryOperation {
        left: Box::new(AstNode::Literal {
            kind: TokenKind::FloatLiteral,
            value: ValueKind::Number(original),
            location: self.current_token().location,
        }),
        right: Box::new(AstNode::Literal {
            kind: TokenKind::FloatLiteral,
            value: ValueKind::Number(10_i128.pow(exponent as u32)),
            location: self.current_token().location,
        }),
        operator: TokenKind::Divide,
        treat_as_string: false,
        dunder_methods: true,
        location: self.current_token().location,
    }
}
#

@royal nymph ```rs
use std/prelude;

fn string::to<T>(string self) {
if self.contains(".") {
let parts = self.split(".");
let joined = parts.join("");
let exponent = math::pow(10, parts[1].len());
return (T)(joined.to<i32>()) / (T)exponent;
}

T res = 0;
let radix = 10;
let start = 0;

if self.to_lower().starts_with("0x") {
    radix = 16;
    start = 2;
}

for i in start..self.len() {
    let c = self[i];
    res *= radix;

    if radix == 16 {
        if c >= '0' && c <= '9' {
            res += c - '0';
        } else { if c >= 'a' && c <= 'f' {
            res += c - 'a' + 10;
        } else { if c >= 'A' && c <= 'F' {
            res += c - 'A' + 10;
        }}}
    } else {
        res += c - '0';
    }
}

return res;

}

fn main() {
io::dbg("12345".to<i32>());
io::dbg("0xFFFF".to<i32>());
io::dbg("11.1234".to<f32>());
io::dbg("0".to<i32>());
io::dbg("".to<i32>());
}

placid cape
#

Rosie when sleep????

hoary sluice
#

@valid jetty

hoary sluice
#

my aunt won a horse

viscid grove
hoary sluice
fleet cedar
#

It is beautiful

viscid grove
#

is it a baby horse

#

cool horse

pearl stagBOT
#

Provided file is too long.

placid cape
pearl stagBOT
#

Provided file is too long.

void leaf
#

bruh

placid cape
placid cape
viscid grove
void leaf
viscid grove
#

maybe
that's just a guess

#

then do l1-l1

#

l2

pearl stagBOT
#

Provided file is too long.

#

Provided file is too long.

#

Provided file is too long.

viscid grove
#

whoa

viscid grove
#

what's the other bot that does it

#

i think Ive seen venbot do it?

#

v! help

elder yarrowBOT
# viscid grove v! help
Info Commands

​ discord-status ​ ​ ​Check if discord incidents are happening
forgejo-down? ​ ​ ​Check if Ninos Forgejo is down
help ​ ​ ​List all commands or get help for a specific command
plugin ​ ​ ​Provides information on a plugin
source-code ​ ​ ​Get the source code for this bot

Use v!help <command> for more information on a specific command!

viscid grove
#

ok maybe not

placid cape
pearl stagBOT
#

index.html: Lines 30-36

<div class="panel"> <div class="maxwell"></div>
  <h1> <span class="fa6-solid--cat"></span> Meow:3 <span class="fa6-solid--cat flipped"></span> </h1>
  <p>Welcome to my Website</p>
  <p><d>By: KrystalSkull</d></p>
  <p><d3> The best way to reach me is either Telegram, or Discord</d3></p>
  <p><d3>  <span class="openmoji--warning"></span> <e3 class="warning"> WARNING: The 'pages.gay' mirror as a sync delay of 1hour </e3> <span class="openmoji--warning"></span>  </d3></p>
</div>
void leaf
viscid grove
#

ohhh

#

yeah that explains it

hoary sluice
dense sand
#

Lmao

#

Guys im so out of ideas what to try to make 😭

#

Please give me some ideas

#

Like anything

hoary sluice
dense sand
hoary sluice
#

none of us knew before we started

dense sand
#

And do i just use qbe like y'all use

#

As the backend

hoary sluice
#

idk, im writing an interpreter first and only then thinking about whether i want it to compile or not

#

initially

dense sand
#

Ill make it compile to jvm

#

Fuck it

hoary sluice
#

meh

#

thats prob harder

dense sand
#

Idk ill use kotlin from the start, so ill just use ASM

hoary sluice
#

if ur gonna make it compile then use qbe

dense sand
#

To build the classfiles i mean

dense sand
#

To make a valid qbe intermediary

hoary sluice
#

idk anything abt qbe only that its simple to use

dense sand
#

Right

placid cape
placid cape
#

but I recommend you to create some sort of qbe abstraction and not to have a compiler that just returns string from each statement

hoary sluice
#

@valid jetty temple os uses U0 for void 😭

#

alberta tech mentioned???

placid cape
#

U0 void, but ZERO size!

hoary sluice
#

quiz: coroner software or programming language?

valid jetty
dense sand
valid jetty
#

there are so many languages that compile to jvm

#

there are only 3 which im aware of that compile to beam (erlang, elixir, gleam)

#

This list of JVM Languages comprises notable computer programming languages that are used to produce computer software that runs on the Java virtual machine (JVM). Some of these languages are interpreted by a Java program, and some are compiled to Java bytecode and just-in-time (JIT) compiled during execution as regular Java programs to improve ...

valid jetty
placid cape
#

erlang is really fast, isn't it?

valid jetty
#

the error diagnostics kinda suck and if the program is very big and you dont know what the potential issues are youre kinda on your own

valid jetty
placid cape
#

elixir can handle a lot of connections

#

okay my prolog implementation probably works (for correspondence seminar)

#

now i can work again on blom

valid jetty
#

i should probably get started on those 20 assignments that are due

placid cape
#

I must also read one book

#

create voice assistant backend or something like that

#

and also do math (not that hard thought) but i need to learn slovak

twilit sigil
#

damn every time i put a use another module every function just gets like a new prefix
like first i wanted to just combine a number and some words, so i used sprintf()
but then i found out that's bad, so i used snprintf()
and now i'm trying to make a function which can take more or less arguments, so now its vsnprintf()

#

what's the next evolution

#

so silly

#

in python i would've just like combined all of that while defining the new string in the same line

placid cape
#

What are you doing lol

dense sand
twilit sigil
#

well i have somewhat of an idea

#

i think

hoary sluice
#

man doing runtime precedence resolution was not a great idea

#

its so hard to design

placid cape
#

But I need to create application to work with the hardware so you can e.g. connect it to wifi or stuff like that lol

dense sand
#

what hw u using?

#

esp?

placid cape
#

well idk i haven't chosen yet

dense sand
#

id go with rpi xd

#

would be the easiest

placid cape
#

i already worked with raspberry so yeah that's probably the easiest

twilit sigil
placid cape
#

I'll probably go with that

#

I'm doing it for one competition with my two friends but im the only one who know how to code and hw

#

so I have to do everything

dense sand
placid cape
dense sand
#

ic

#

im the only one who know how to code and hw
well that owuld make sense

placid cape
#

and I also need to 3d print the case for it

#

well it'll be in duck xd

dense sand
placid cape
dense sand
#

true

placid cape
#

but my dad is good at 3d modeling

#

so he'll probably help me with that xd

valid jetty
#

3d modeling is fun lol

#

i did some thingies in the past

#

these are the only things i still have but there are probably more

twilit sigil
valid jetty
#

at some point yeah

#

idk this stuff is all 2+ years ago

twilit sigil
#

oh

placid cape
placid cape
#

@valid jetty why float in elle is done using binary operations?

valid jetty
#

because when i first wrote it i didn’t realise qbe allows you to put float literals in d_

#

like d_1.2

dense sand
#

is LaTeX a compiled programming language

#

screw it i should work on my economics work again

fleet cedar
dense sand
#

which technically makes it compile to pdf

hoary sluice
#

@valid jetty is there a way to differentiate assignment from lambda without looking ahead until i see a $ or an =

expression = declarationns ;
declaration = IDENTIFIER ":" { "_" | IDENTIFIER } | assignment ;
assignment = IDENTIFIER { primary } "=" expression | lambda ;
lambda = { IDENTIFIER } "$" expression | if ;
if = "if" expression expression { "elif" expression expression } "else" expression | binary ;
binary = unary { ( IDENTIFIER | OPERATOR ) unary } ;
unary = ( "!" | "-" | IDENTIFIER ) unary | primary ;
primary = "true" | "false" | "null" | "(" expression ")" | NUMBER | STRING | IDENTIFIER ;
fleet cedar
#

Pdf could be viewed as a program for drawing pages, in which case pdftex et all is a compiler with heavy comptime facilities

#

Latex is not a programming language though, it's a stdlib/framework

hoary sluice
#

latex is turing complete

fleet cedar
#

Tex is turing complete

#

Is rust's std turing complete?

dense sand
#

whats the difference, is latex just an extension of tex

#

stdlib

hoary sluice
#

idk what the difference between tex and latex is

dense sand
#

ah

dense sand
#

my bad i didnt read it

#

so tex is the file format/language itself

hoary sluice
#

the format is called .tex and the package is texlive but everyone says latex so idk which one im using

fleet cedar
#

Nobody uses raw tex though

hoary sluice
#

is raw tex just latex without packages?

fleet cedar
#

Tex is the language, pdftex/luatex is the compiler, latex is the stdlib, texlive is the distro

hoary sluice
#

or without the whole begin{document} thing

fleet cedar
#

Raw tex doesn't have usepackage, documentclass, environments, and I think most math mode stuff, among other things

hoary sluice
fleet cedar
#

It doesn't exist afaik

#

Probably some weird package you're using

dense sand
#

ngl chatgpt is very good for help with latex

hoary sluice
#

it needs package algorithm

#

so im assuming its latex only

fleet cedar
#

Presumably yes

hoary sluice
#

how is tex turing complete then

dense sand
#

altough just looking up overleaf wiki is good enough

#

overleaf is ass tho

#

slow

fleet cedar
hoary sluice
#

huh

fleet cedar
#

Think of it like rust no_std maybe?

dense sand
hoary sluice
#

wtf lol

hoary sluice
dense sand
#

write an interpreter in latex

hoary sluice
#

write anything in latex

#

write aoc day 1 in latex

dense sand
#

How can i render 100x100 grid of moving emojis in react without causing lag

hoary sluice
#

you dont

valid jetty
dense sand
#

Funny it was causing lag only in prod

#

I just had a giant 2d array which i mapped to react nodes

#

Thats probably not that efficient

hoary sluice
#

@valid jetty woohoo

#

oops == doesnt work

#

ill leave that for next year

dense sand
dense sand
hoary sluice
#

so true

valid jetty
#

how tf does == stack overflow 😭

#

anyway nice :3

hoary sluice
#

its not ==

#

its parenthesis

valid jetty
#

oh okay thats reasonable

hoary sluice
#

(z) should be valid, but it sees (, tries to parse an expression and then consume a ), but in icps an identifier can be used as a unary operator so it thinks im calling z on )

#

i think im gonna rework unaries later and just disallow identifiers as unary operators for now

valid jetty
#

the way i do wrapped is

-> encounter (
-> is next token a type?
-> if yes parse a type conversion expr
-> else parse a wrapped statement
-> if parsing a type conversion, expect (, advance, consume a type, expect )
-> else consume tokens with a nesting variable set to 0 initially
-> if encountering ( increment nesting
-> if encountering )
-> if nesting == 0 then break, the wrapped statement is finished
-> else decrement nesting
-> parse that token stream recursively into an astnode

placid cape
valid jetty
#

its a little more "involved" than that i guess

TokenKind::LeftParenthesis => {
    let next = self.next_token();

    if let Some(token) = next {
        let ty_name = token.value.get_string_inner().unwrap_or("".into());

        if token.kind == TokenKind::Identifier
            && (self.shared.struct_pool.borrow().contains_key(&ty_name)
                || self.shared.generics.contains(&ty_name)
                || token.value.is_base_type()
                || token.kind == TokenKind::LeftParenthesis)
        {
            let next = self.next_token_seek(2);

            if let Some(next) = next {
                if next.kind == TokenKind::LeftCurlyBrace
                    || next.kind == TokenKind::DoubleColon
                {
                    self.parse_wrapped_statement()
                } else {
                    self.parse_type_conversion()
                }
            } else {
                self.parse_type_conversion()
            }
        } else {
            self.parse_wrapped_statement()
        }
    } else {
        self.parse_wrapped_statement()
    }
}
valid jetty
#

the thing is that a lot of things can be the start of a type

#

(Foo), ((i32, i32)), (i32), (T), (Foo *)

#

types can be more than 1 token so

#

shrug

fleet cedar
#

You don't parse expressions as expr := atom | expr op atom, but expr := atom (op atom)*

#

Also makes it much easier to handle operator precedence imo

valid jetty
#

parsing is hard

#

how do you differentiate ((i32, i32))x and ((i32)x + 1) without doing a ton of lookahead

#

maybe c style cast just isnt a good idea lol

#

#cast(T, expr) may be the way to go

#

instead of (T)expr

hoary sluice
#

ok i fount the stackoverflow

hoary sluice
# fleet cedar Left recursion is fun

i was trying to parse lambda arg identifiers without consuming the $ first so params were always empty and since cur is $ it made infinite empty lambdas

#

wait no i was skipping the identifiers and getting stuck on the $

placid cape
#

okay compiler is done, now it's time to fix analyzer

#

and then interpreter

#

or I'll ignore interpreter for now

hoary sluice
#

yay it can parse this now ```rs
x : int int int 3 + 3 x a b = (n t $ n + t)

fleet cedar
#

I can't

hoary sluice
#

more readable like this

x : int int int

3 + 3

x a b = (n t $ n + t)
fleet cedar
#

What's the 3 + 3 for, confusing the parser?

hoary sluice
#

Yes

valid jetty
#

giggled at that

hoary sluice
#

the parser is expected to understand that 3 isnt a type and hence start a new expression

#

tho its probably better to require a newline or semicolon here

#

and some better error handling

#

rn if theres a syntax error all i get is .unwrap failed: ExpressionExpected with no location info

fleet cedar
#

If it's recoverable it's nice to insert an error quasi-expr so you can continue chugging on and give more errors

valid jetty
#

currently i panic if there's an error but there's usually good diagnostics

fleet cedar
#

Panicking isn't a good error mechanism

#

Since it's by definition a bug in the program

hoary sluice
#

ok i have forgotten to consume a keyword on 4 separate occasions now

fleet cedar
#

Add better next_if primitives

valid jetty
#

soon

hoary sluice
#

this is probably horror

fleet cedar
#

Yep, you need an advance_if_is function

hoary sluice
#

u can input vararg tokens

#

(so it has to be a macro)

#

also rn binary expressions are left to right

#

gotta figure out the whole runtime precedence thing first

fleet cedar
#

You mean 1 + 2 * 3 == 9?

hoary sluice
#

well its not equal to anything rn cause i dont interpret anything yet

#

but yes

#

this is what adventofcode will do to you

#

600kb of aoc

placid cape
fleet cedar
valid jetty
#

qbe devs are so good

hoary sluice
fleet cedar
#

But how 600kb

#

/run ```py
print(600000/25/10)

rugged berryBOT
#

Here is your py(3.10.0) output @fleet cedar

2400.0
fleet cedar
#

Hm, guess 2.4k per day isn't too unreasonable for a verbose language

hoary sluice
#

kotlin isnt that verbose 😭

#

a lot of it is utils

#

grid has 1130 lines

#

grid is 42.76kB

ornate quiver
#

someone needs to make an actually good cpp build system

#

makefiles are dogshit

hoary sluice
#

qmake

fleet cedar
frosty obsidian
#

lc.xkcd standards

visual shellBOT
hoary sluice
hoary sluice
placid cape
#

πŸ”₯

valid jetty
#

@ public feels slightly verbose hm

#

in elle i make the main function public automatically actually lol

placid cape
placid cape
valid jetty
#

lierally just hardcoded

#

works fine for the purposes of this

placid cape
#

but first i want also way to make it explicit

#

and then i'll work on implicit things

valid jetty
#

fairsies

placid cape
#

like implicit casting but explicit is more important

valid jetty
#

oh on that note

#

what do you think of turning (T)expr into #cast(T, expr)

placid cape
#

its easier for you and your parser

#

im doing that too

#

@cast(expr, T)

valid jetty
#

because it makes distinguishing between ((i32, i32))x and ((i32)x + 1) much easier idk

placid cape
#

should be type first? idk

valid jetty
#

anyway ill do that later im rewatching squid game s1

placid cape
#

hmmm πŸ€”

valid jetty
#

you tried to do -1 on a usize casted to a signed integer

placid cape
#

yea i tried to print hint on row 0 col 0

#

but both are indexed from 1

valid jetty
#

i have that too

#

slightly less pretty error

placid cape
#

32-bit support @valid jetty

valid jetty
#

there’s a lot of work that still needs to be done lol

#

i’ve been following the progress

placid cape
#

well yea but it's cool that they're working on it

valid jetty
#

yeah

royal nymph
#

when elle ui framework @valid jetty

valid jetty
#

the raylib in question

royal nymph
#

not c++ bindings

placid cape
#

when elle cmake

royal nymph
#

native ui library in elle

valid jetty
#

@royal nymph

calm ruin
#

elle wasm and dom manipulation library

#

react in elle

royal nymph
valid jetty
#

yeah i know

#

why do that when raylib exists tho

royal nymph
#

HORROR

valid jetty
#

wdym horror 😭

#

what’s bad about that

royal nymph
#

hop off raylib

#

make native library

#

when selfhosted elle compiler

valid jetty
#

when i make pattern matching and enums lol

#

other than that it’s really doable now

royal nymph
#

pattern matching as in regex? or like rust's match?

valid jetty
#

rust match

royal nymph
#

do

placid cape
#

Like in rust

dense sand
#

@valid jetty jsx support when

valid jetty
#

@royal nymph i made js

valid jetty
valid jetty
#

<Foo bar={baz} /> compiles to React.createElement(Foo, { bar: baz }) in modern react

royal nymph
#

it actually compiles to

jsx(Foo, { bar: baz })

in modern react b_nerd

placid cape
frosty obsidian
#

@royal nymph you will learn clay

valid jetty
royal nymph
#

no...

#
dense sand
#

i mean in the end you can customize what function will be used

valid jetty
#

that’s what i meant

royal nymph
valid jetty
#

ah

hoary sluice
#

@valid jetty locked in

#

maybe if i start the year with dp ill finally understand dp

valid jetty
#

EVERY TIME

#

is there no other fucking example you can give???

hoary sluice
valid jetty
#

Hey guys, just wanted to wish you all a happy new year. Discord is filled with ready-made messages that you don't even read, you just copy and paste to every server, I don't like that, I like writing from my heart. Our friendship, from the deepest to virtual, is very important to me and couldn't ever be represented by a cookie-cutter message from anywhere. So, I'd like to thank you all, you're the best dominating egirl roleplaying server I've ever interacted with.

hoary sluice
#

that implies youve interacted with multiple dominating egirl roleplaying servers

valid jetty
#

yeah and

fleet cedar
#

Yeah I can kinda believe that

valid jetty
#

@placid cape

#

ok i have a question because idk how this really works

#

at my current level of education (sixth form), i’m supposed to start a project next school year where i’m basically on my own and have to make something

#

i’m not entirely sure what yet but i wanna make a compiler

#

and i need to heavily document and reference what i did

#

can i reference myself

#

and elle

#

lol

valid jetty
#

is it called the NEA

#

non exam assessment

hoary sluice
#

idk

valid jetty
#

oh

#

ok

hoary sluice
#

apparently everyone is doing like a simple website

valid jetty
#

yeah idk because i deffo wanna make a compiler but i don’t wanna seek out resources to reference when i already know all the things

#

i wanna write the compiler in elle

hoary sluice
#

he wants to make an interpreter in python (i convinced him)

valid jetty
#

yay

#

but you didn’t answer the question

#

is my code a valid reference

#

can i reference elle compiler code when writing a compiler in elle

#

it won’t be a self hosting compiler for elle because that’s too ambitious but i still wanna make something small but big enough to score full marks

hoary sluice
valid jetty
#

well yeah that’s fair

#

no creativity

#

and cs students who take cs and don’t program in their free time won’t really get anywhere so idk

#

you don’t learn anything in class

hoary sluice
#

yea hes that type of person

hoary sluice
valid jetty
hoary sluice
#

yes

valid jetty
#

fair

hoary sluice
#

not that much at least

#

hes tried

valid jetty
#

if i have to seek out references when i already know the content i’ll just give up and make a basic thing

#

because im not doing that

hoary sluice
valid jetty
#

yeah you do here too

valid jetty
#

yeah in theory but idk if i can reference my own code

#

that was my question

hoary sluice
#

its a diploma thesis so u have to write a thesis

valid jetty
#

oh lol

hoary sluice
#

explaining what it is and the process of making it, ur mistakes, etc

valid jetty
#

mine would probably be more of a dissertation

valid jetty
#

but they also want references for where you learnt the content

hoary sluice
#

how long does it have to be

valid jetty
fleet cedar
#

I just took a random project I had done on my spare time, bullshitted a few pages of report, and passed

hoary sluice
#

hm ig thats similar

fleet cedar
#

That school was kinda crap ngl

hoary sluice
#

meh i dont have worthy projects

#

i cant write a thesis on aoc

valid jetty
#

they also expect at least 2-3k lines of code with warranted complexity

#

like you can’t just do a super easy thing which takes 10 lines in 400 lines and say u wrote 400 lines

hoary sluice
#

im making the software for a voice assistant

valid jetty
#

like

#

text to speech?

hoary sluice
#

my team partner is doing hardware

valid jetty
#

or ai

hoary sluice
valid jetty
#

lmao

#

import ttslib moment

hoary sluice
hoary sluice
valid jetty
#

why do you know this 😭

#

wtf is openai whisper

hoary sluice
hoary sluice
valid jetty
#

my extent of ai was chatgpt 3.5 turbo

hoary sluice
#

another part of it is a frontend in qt/c++ but im oflloading half the work to ffmpeg cause recording audio in qt is hard

valid jetty
#

oooo that sounds fun

#

imgui time?

hoary sluice
hoary sluice
valid jetty
#

ah

hoary sluice
#

theres like QAudioRecorder but it just doesnt work

valid jetty
#

nono ffmpeg sounds fair

hoary sluice
valid jetty
#

horror

#

i honestly forgot latex was a thing

#

ill have to use that now just because i can

hoary sluice
#

my class is genuinely retarded

valid jetty
#

i don’t start anything until like october 2025 so i have plenty of time to prepare

hoary sluice
#

most of them are writing it in word and in german

valid jetty
#

writing it in word is fair tho

hoary sluice
#

no its not 😭

#

its 100-150 pages of word thatll get really messy

#

and u have 0 version control

valid jetty
#

i was originally gonna write it in notion because it has latex support and syntax highlighting for code in various languages and it looks nice and you can have multiple pages and export it to a website

hoary sluice
#

also one guy in my clasr made a nextjs website purely with chatgpt and nothing works and he has no idea how anything works

valid jetty
#

loveeeee

#

that’s the software developer who is being laid off by big companies

#

πŸŽ€

hoary sluice
#

he will never even get hired

#

he works part time as a waiter

#

and on holidays in construction

hoary sluice
valid jetty
#

the only reason i started doing competitive programming and like algorithms and stuff was so i could pass job interviews actually

#

because they seem to love throwing leetcode style problems at you even though that’s definitely not something you will need to use for the job

hoary sluice
#

i started doing competitive programming cause i wasnt creative enough to come up with a project and now i can pass job interviews as a byproduct

hoary sluice
valid jetty
#

imo interviews should be more like β€œhow well do you know git” β€œhow well do you work in a team” β€œcan you decode the shitcode and hack upon hack in our project from 30+ people working on it” instead of β€œcan you reverse this linked list”

#

but oh well

hoary sluice
#

how well do u know git is meh

valid jetty
#

nono because if i’m a hiring manager and someone is β€œAdd files via upload”ing they’re not getting hired i’m sorry

hoary sluice
#

u can learn basics in 5 mins and when shit breaks a colleague will teach u how to rebase in 5mins

valid jetty
#

yeah i guess

hoary sluice
#

Esp internship

valid jetty
#

but you should still know how to like, merge conflicts, commit amends, rebasing

#

you don’t learn that in 5 mins

hoary sluice
#

many companies use ftp

hoary sluice
valid jetty
#

it took me forever to learn how to fix merge conflicts through the stupid vscode interface for it lol

#

the CLI is sooooo much simpler

hoary sluice
#

u can explain basics in 5 mins and merge/rebase in another 5 mins

valid jetty
#

the cli is the best

hoary sluice
#

for add commit push yea, for rebase and merge no

valid jetty
#

β€œgit rebase”

oh noooo files A and B have conflicting changes

remove the parts you don’t want from file A

git add A

git rebase β€”continue

remove parts from B

git add B

git rebase β€”continue

success!

#

so hard

valid jetty
#

idk i guess

hoary sluice
#

also rosie make sure to never make the mistake of working in an agile scrum company

#

literal torture

valid jetty
#

lmfao

hoary sluice
#

and test driven development too

valid jetty
#

yeah true

hoary sluice
#

I would unironically have gotte about 4x as much stuff done without jira and stand ups

valid jetty
#

if only you could just push to master

#

lmfao

#

me when i need to make a whole pr and get it reviewed in 2 weeks for a 2 character typo fix and the person reviewing happens to nitpick another 513 changes i should make to fit their code style (it’s a 40 line file in python)

#

at least that’s what i imagine it being like from the videos i’ve seen on youtube

hoary sluice
#

"hey the chart is offset to the left"
"ok i will open a jira ticket for that, and make sure you write proper tests for it"

#

bitch its 1 character in the css

valid jetty
#

at least ur getting paid for doing nothing

hoary sluice
#

this exact scenario

valid jetty
#

no fucking way

hoary sluice
#

it was something with the chart, he left 70 comments on my pr

valid jetty
#

nitpicking is the worst thing to come to software development

#

LMAO

hoary sluice
#

also that time i forgot to enable eslint and had to spend hours fixing working code

valid jetty
#

like if what they’re doing is clearly wrong or inefficient i’ll leave a comment and tell them the more efficient way to write it but code style nitpicks are evil

hoary sluice
#

also did i mention its in typescript

valid jetty
#

at least it’s typescript

#

i had the joy of reading corporate code once lol

#

my school uses this maths homework website called sparx

hoary sluice
#

there was so much frontend processing that the backend being in kotlin basically didnt matter

valid jetty
#

i wanted to figure out how it works to write a client mod for it

#

the fucking

#

horrors

#

the main window is a huge switch statement of strings to switch to different windows

#

it’s in react

#

it uses react + react redux saga and everything is a dispatcher event

#

at least they eventually rewrote the whole thing and now it uses react query and is sane but still

#

still hard to mod

hoary sluice
#

1 project a worked on had 750 thousand files for a supermarket website, i dont understard how you can even generate that many files, and thats only a part of it

valid jetty
#

LMAO

#

see this is why i wanna go into textiles instead of programming

hoary sluice
#

literally just switch (c) {
case '1': 1
case '2': 2
}

valid jetty
#

my honest reaction when c - β€˜0’

#

anyway happy new year from the uk !!!

hoary sluice
#

it was a library string

valid jetty
#

fuck 2024

hoary sluice
#

oh right happy new year

valid jetty
#

hated that year

#

maybe 2025 will be better

hoary sluice
#

new year new me type shit

#

gyms have huge discounts

#

they prob make so much profit

valid jetty
#

this year i solemnly swear to be as retarded and annoying as possible to everyone i talk to

#

that is my vow

hoary sluice
#

this year im gonna do aoc in templeos (i wont)

placid cape
#

btw happy new year guys if you already have it

#

message from my server if you want to read :)

valid jetty
#

2025 feels scarily big

#

like i’m not 13 anymore i turn 17 this year

placid cape
#

You're 16 now?

#

we're the same age

#

that's cool

placid cape
valid jetty
placid cape
#

but older than me

#

like 18 maybe?

valid jetty
#

lmao

placid cape
#

idk but it's cool xd

#

When is you birthday?

#

my birthday is 6.11

valid jetty
#

is that june 11th or november 6th

#

mine is june 16th

placid cape
#

I'm not American hehe

#

okay I'm gonna sleep since I have to wake up at 7am :d

valid jetty
#

i cant assume lol

#

anyway good night

#

im gonna go back to squid game

ornate quiver
#

why is there so many june birthdays here

#

there's like 5 people within a week of my birthday

dense sand
#

New year new me, I'll finish at least 2 projects this year!!

ornate quiver
#

New year new me, I'll surely finish at least 1 project this year!!

golden narwhal
#

new year new me

#

im drink

#

drujmnk

#

lif0i404grthfghfvbync ftgyhcbnv hfgbytcv

ornate quiver
#

some things never change

dense sand
ornate quiver
dense sand
placid cape
#

yeey I have excellent wake time consistency

valid jetty
#

i haven't slept yet

ionic lake
#

sleep is for the weak

valid jetty
#

i think i just binged the whole of squid game s1 in a single night

#

i already saw it but that was several years ago by now

#

i just have the last episode to watch

#

if i get a good 2 hours of sleep i can wake up and binge s2

placid cape
#

I already came back from church

hoary sluice
#

this is harmful

ornate quiver
#

what the FUCK

#

vee ahhhh sleep schedule soon

hoary sluice
placid cape
fleet cedar
#

6.11 isn't november, it's a float

dense sand
fleet cedar
#

Depends on the language

#

Float and double are dumb terms anyway y'know

#

It's all floats, just of different sizes

dawn ledge
#

long long double

fleet cedar
ornate quiver
#

just used interactive rebase for the first time

#

kinda neat

placid cape
#

because it does when it's a variadic argument

fleet cedar
#

I thought 6.11 was a double literal (6.11f being the float), but it's implicitly casted when you do something floaty

dense sand
#

Yea

#

Atleast thats how most languages have that

hoary sluice
#

it being called double is so stupid

#

like guys we have floats but we need double precision floats, what do we call them? fucking double??

placid cape
#

f64 better

winged mantle
fleet cedar
#

Yep

winged mantle
#

huh

#

long int works but double float does not

hoary sluice
winged mantle
#

oh god

#

stop reminding me that i need to fix my code

fleet cedar
winged mantle
#

i only test on linux

#

if it doesn't work on windows it's your fault

hoary sluice
#

this is why int_xx_t exists

hoary sluice
#

well long is a valid type

#

long == long int == int on windows

#

yet another advantage of macro driven c development

fleet cedar
#

long int and int are different types, just the same size https://godbolt.org/z/3cc499d9W

hoary sluice
#

and what does that change

fleet cedar
#

Not much in practice, unless you're doing template shenanigans

hoary sluice
#

ur still gonna have overflows if you port from linux to windows and forget to change long to int64_t

hoary sluice
fleet cedar
#

Unfortunately

hoary sluice
#

i dont think it can cause problems in c unless you explicitly try

placid cape
#

Gonna watch it blobcatcozy

#

few months ago I thought that QBE is something old, not really maintained but I was wrong heh

dense sand
#

also not really java afaik

fleet cedar
#

Maybe f64

austere idol
#

let the int be int, not i32

fleet cedar
#

No

#

I would be okay with calling β„€ int, but β„€/2Β³Β²β„€ not so much

formal belfry
#

hello

#

how

#

to selfhost

#

bleusky

#

for free

#

i want free domain bluesky

dense sand
#

does anyone know which shadcn component could this be

hoary sluice
fleet cedar
#

You can bake cookies

#

It's not quite free, but pretty cheap

valid jetty
placid cape
#

finally implicit type conversion works

#

now its time to do explicit, @cast fun

valid jetty
#

no way 😭

#

i remember writing that exact code at one point

placid cape
#

yea i copied your euler number code

valid jetty
#

oh wait is that test still a thing???

placid cape
#

hm?

#

you have it in readme

valid jetty
#

i swear i got rid of it when i made E a constant in the math lib

#

oh that

#

yeah that actually used to be a test lol

placid cape
#

time to implement BigDecimal haha xdd

valid jetty
#

truee

placid cape
#

python has Fraction

#

and its actually cool

valid jetty
#

python has the Decimal class too

#

like bigint but for decimals

pearl stagBOT
# valid jetty https://github.com/GeenBot/AdventOfCode2024-With-Friends-3333-/blob/main/Solutio...

part3.py: Lines 1-30

# https://i.imgur.com/ARMCVEV.png
from collections import Counter
from decimal import Decimal, getcontext
from math import floor, sqrt
import sys

getcontext().prec = 1000
sys.set_int_max_str_digits(int(1e10));

def normal(s):
    if s == 0: return [1]

    ss = str(s)
    l = len(ss)
    hl = l // 2

    if l % 2 == 0:
        return [int(ss[:hl]), int(ss[hl:])]
    else:
        return [2024 * s]

def third_eye(s, mid):
    if s < mid:
        return []
    else:
        try:
            t = floor(sqrt(s) ** 3)
        except OverflowError:
            t = floor(Decimal(s).sqrt() ** 3)
        return [t, t - 1, t - 2, t - 3]
hoary sluice
#

@valid jetty hop on aoc 2017

#

kotlin πŸ₯°

placid cape
valid jetty
#

in what world would you POSSIBLY need that data structure

#

use a fucking struct

ionic lake
fleet cedar
#

What's an indexedvalue, a (usize, T) tuple?

dense sand
ionic lake
#

yeah it's custom made

valid jetty
dense sand
#

not that again

#

THAT SONG

#

ITS DESTROYING MY BRAIN CELLS

#

what is normal amount of state hooks to have in a component

ornate quiver
#

1 morbillion

ionic lake
#

maximally 11

dense sand
#

is it possible to somehow fix this

#

i mean i can wget it

#

i fucking hate cors

ornate quiver
hoary sluice
#

@valid jetty least obvious off by 1:

hoary sluice
hoary sluice
#

Collection<T>.withIndex(): Collection<IndexedValue<T>>

placid cape
hoary sluice
dense sand
hoary sluice
#

@valid jetty i just spent 3 hours parsing 6x6 as divisible by 3 but not 2

#

my entire solution is useless

placid cape
#

i just solved day 9 2015

hoary sluice
#

i think this is my best non day 25 delta so far

hoary sluice
fleet cedar
#

Probably? Don't remember which ones I did, but all the ones I've done were live I think

#

Is that weird

hoary sluice
#

i wish id started aoc in 2015 instead of being 8 years old

fleet cedar
#

Skill issue

hoary sluice
#

imagine some gen alpha gets #1 in aoc 2030 and when asked why they didnt participate in 2015 they can say they werent born yet

dense sand
#

does anyone know any good library which can create cool filler backgrounds

dense sand
#

im pretty sure i saw something by theo

dense sand
#

it let you create cool interactive backgrounds

#

like dotted background which would react to cursor

hoary sluice
#

desktop backgrounds? web backgrounds?

dense sand
#

yea for sites

hoary sluice
#

also 2017 day 21 is responsible for 15% of my total runtime cause i cba to do the cool approach

ornate quiver
#

im trying to patch webpack loader
tldr i can't modify the bundle directly, but can run code before it

function __webpack_require__(q) {
    var K = __webpack_module_cache__[q];
    if (void 0 !== K) return K.exports;
    var re = __webpack_module_cache__[q] = {
        id: q,
        loaded: !1,
        exports: {}
    };
    return __webpack_modules__[q].call(re.exports, re, re.exports, __webpack_require__), re.loaded = !0, re.exports
}

can't figure out how to hook __webpack_require__
i can monkeypatch Function.prototype.call and get an invocation on the first module load but have to unpatch afterwards for other reasons

#

@royal nymph help xddd

royal nymph
#

more context

#

what site?

ornate quiver
#

electron app

royal nymph
#

which

#

your short snippet of code is very meaningless

#

do you have access to __webpack_require__, module cache, modules, etc?

ornate quiver
#

gitkraken

royal nymph
#

is it exposed on the window perhaps?

royal nymph
#

how is it initiated?

#

all these things matter