#🪅-progaming

1 messages · Page 89 of 1

valid jetty
#

considering traits dont really exist

#

this is the best youre gonna get

hoary sluice
#

r u gonna make traits

valid jetty
#

eventually yeah

#

these are the things i want to do after i finally push iterators to remote

hoary sluice
#

you still didnt push iterators???

valid jetty
#

i need to write tests and docs`

hoary sluice
valid jetty
hoary sluice
#

i dont think i even have that many files

valid jetty
deep mulch
#

@valid jetty

valid jetty
#

its as if you did #[repr(packed)] on a struct in rust but its every struct

hoary sluice
#

i have 32

valid jetty
#

😭

deep mulch
#

@valid jetty hiii

valid jetty
#

goes to show

#

because theres a bunch of unedited files

valid jetty
#

267 files

valid jetty
hoary sluice
valid jetty
hoary sluice
#

oh you have an stdlib

#

right

valid jetty
#

adds up

hoary sluice
#

how much is in src

valid jetty
#

79 in src

hoary sluice
#

i have 19

valid jetty
#

82 rust files in total

#

(build.rs in root, 1 file in the zed extension, 1 file in the proc macro)

valid jetty
#

my rust files will approach 100 when i refactor the parser

hoary sluice
#

"here at lovely, we value good error messages" - kiahjh

valid jetty
#

the stmt parser alone is 4.1kloc

hoary sluice
#

thats almost triple my total loc

valid jetty
#

😭

hoary sluice
#

and thats all of it

valid jetty
#

its complicated to parse

#

though tbf theres a little bit of repetition

valid jetty
#

so tiny

#

the imports alone are huge lmao

#
#![allow(clippy::cognitive_complexity, clippy::single_match)]
use std::cell::RefCell;
use std::iter::FromIterator;
use std::rc::Rc;

use super::enums::{
    Address, Argument, ArrayLength, ArrayLiteral, AstNode, BinaryOperation, BitwiseNot, Buffer,
    Conversion, Declare, Environment, FieldAccess, FunctionCall, IfStatement, Lambda, Literal,
    LogicalNot, MemoryOperation, Primitive, Return, SetAllocator, Size, StructLiteral, Ternary,
    VariadicArgument, VariadicStart,
};

use super::parser::{create_generic_struct, EnumPool, StructPool};
use crate::compiler::qbe::r#type::Type;
use crate::lexer::enums::{Attribute, MutRc};
use crate::misc::constants::ITER_CONSTANT;
use crate::parser::enums::{BlockStatement, TupleDeclare, WhileLoopStatement};
use crate::{
    elle_error, enum_hover, expect_eot, get_type, is_type, set_end, INTERNAL_ITERATOR_FORMAT,
    INTERNAL_VALUE_FORMAT,
};
use crate::{
    lexer::enums::{Location, Token, TokenKind, ValueKind},
    misc::colors::*,
    not_valid_struct_or_type, token_to_node, GENERIC_END, GENERIC_IDENTIFIER,
};

#[derive(Clone, Copy)]
pub struct Shared<'a> {
    pub struct_pool: &'a RefCell<StructPool>,
    pub enum_pool: &'a RefCell<EnumPool>,
    #[allow(unused)]
    pub tree: &'a RefCell<Vec<Primitive>>,
    pub generics: &'a Vec<String>,
    pub known_generics: &'a Vec<Type>,
    pub addr_only: bool,
    pub tmp_counter: &'a RefCell<u64>,
}

pub struct Statement<'a> {
    tokens: Vec<Token>,
    position: usize,
    body: &'a RefCell<Vec<AstNode>>,
    shared: &'a Shared<'a>,
    consumed_addr: bool,
}
#

i definitely need to move to seperate files soon

hoary sluice
#

my statement parser is 141 loc without macros or helper functions

#

256 with

#

and im pretty sure elle does not have 29 times more statements that icy

valid jetty
#

no, but a statement could be more complicated to parse

#

you can look at the use super::enums for all the statements

#

some are more complicated to parse than others

#

it is due for a refactor but theres also quite a lot to parse

hoary sluice
#

your avg stmt takes 5x as many loc to parse than mine

hoary sluice
valid jetty
#

because its not expression-based

#

as in, you cant omit the semicolon to return it

#

i could make a seperate keyword to break out of the if stmt but its just simpler like this

valid jetty
#

but tbf thats mostly sugar unrolling

hoary sluice
#

no other editor arbitrarily prefixes or suffixes plugins with the name of the editor

#

tho this is probably from the separation between vim and nvim

valid jetty
#

lmaooo

#

this is why you use zed

hoary sluice
#

and why is location mutable

hoary sluice
#

ai slop

#

no nix support

valid jetty
hoary sluice
#

oh

valid jetty
hoary sluice
#

oh i read that as 500 lines

valid jetty
#

the logic also allows for tuple destructuring straight in the foreach

hoary sluice
#

idk how

valid jetty
#

oh lol

hoary sluice
#

150 sounds reasonable

valid jetty
#

this is relatively ugly but idk a better way to do it

hoary sluice
#

rosie have i told u alr that the job im starting now suddently wants to force windows

#

im gonna have to buy a new laptop soon

valid jetty
#

yea`

#

buy a thinkpad t480s and dualboot windows and linux on it

hoary sluice
#

i was planning on putting my current nix conf on the work laptop and using it at home too

hoary sluice
#

they want to supervise everything youdo

#

which automatically eliminates dualboot as an option

valid jetty
#

well its your own laptop right

#

you have unlocked bios

#

what are they gonna do

hoary sluice
hoary sluice
#

reset it

#

delete my linux

valid jetty
#

they cant lock down the bios on your own personal machine

hoary sluice
#

do you really think the 2025 supervision software cant detect dualboot

valid jetty
#

i mean it can detect dualboot

hoary sluice
#

its cause their bank clients want supervised systems

hoary sluice
valid jetty
#

oh

hoary sluice
#

they give u a thinkpad

#

i was gonna use that at home too

#

but not if it has windows

valid jetty
#

oh

#

lmao

hoary sluice
#

so i have to buy a new one

valid jetty
#

my laptop keeps doing this aaaa

#

evil

hoary sluice
#

cause mine is old and nvidia and has a NINE WATT battery

#

it was originally 45W but its on 20% health and might explode any moment

valid jetty
#

lmaooo

hoary sluice
#

smth like this

#

i have smth similar

#
macro_rules! current_and_consume (im not very creative with names) {
  ($self:expr) => {
    let $res = self.current_token();
    self.advance();
    $res
  }
}
#

these are what i have

macro_rules! try_consume_any {
    ($self:expr, $($kind:expr),+) => {{
        false $(|| {
            if $self.current_is($kind) {
                $self.advance();
                true
            } else {
                false
            }
        })+
    }};
}

macro_rules! consume {
    ($self:expr, $kind:path, $loc:expr) => {
        if !$self.current_is($kind) {
            return err!(
                ErrorKind::ExpectedExpression,
                $loc,
                format!("Expected {:?}, found {:?}", $kind, $self.current())
            );
        }
        $self.advance();
    };
}
valid jetty
placid cape
#

macros 🔥

valid jetty
#

i dont really have this kind of simplification anywhere in the parser

#

maybe this is why its so long

valid jetty
#
macro_rules! current_and_consume (im not very creative with names) {
  ($self:expr) => {{
    let res = $self.current_token();
    $self.advance();
    res
  }}
}
valid jetty
#

@hoary sluice is this a sane idea

frosty obsidian
#

seems that way

hoary sluice
supple whale
#

i think i cooked

#

a bit too hard

#

XD

#

mobile:

median root
#

torrenting site?

supple whale
#

app

#

but yeah

median root
supple whale
#

doesnt matter

#

just

#

wanted to show the UI i cooked

median root
#

yeah cuz thats really good

supple whale
#

its electron

#

so just insert ur preferred HTML UI framework here

#

i rendered this with HTML and CSS

#

saved it as an image

#

then used it as a background and animated it

median root
supple whale
#

i never did

median root
#

zamn

#

sick ui tho

shrewd canopy
supple whale
#

Steam/steamui/images/client_login_bg_grid.jpg

#

i stole it from steam

#

:^)

deep mulch
#

Ban.

royal nymph
#

make account
make app
git clone
git add .
git commit -m "add virus"
git push

#

and read docs to see what files to add

median root
#

and theyve attached 3 whole pages to read on it

#

and I dont wanna

valid jetty
#

😭

royal nymph
visual shellBOT
# royal nymph lc.gem describe the process of creating an aur package in less than 2000 charact...
describe the process of creating an aur package i…

Creating an Arch User Repository (AUR) package involves a few key steps:

  1. Gathering Information: Identify the software you want to package, its source code URL, dependencies, and how to build and install it.

  2. Creating a PKGBUILD: This is the core of an AUR package. It's a bash script that tells makepkg how to compile the software and create an installable .pkg.tar.zst file. Key sections include:

    • pkgname: Name of the package.
    • pkgver: Version of the package.
    • pkgrel: Release number of the package (for updates to the PKGBUILD itself).
    • url: Upstream URL of the software.
    • arch: Supported architectures (e.g., ('any'), ('x86_64')).
    • license: Software license.
    • depends: Runtime dependencies.
    • makedepends: Build-time dependencies.
    • source: URLs to download source code and patches.
    • sha256sums: Checksums for source files to ensure integrity.
    • build(): Commands to compile the software.
    • package(): Commands to install compiled files into the package directory ($pkgdir).
  3. Testing the PKGBUILD: Run makepkg -sric in the directory containing the PKGBUILD.

    • -s: Installs missing dependencies.
    • -r: Removes unused dependencies after building.
    • -i: Installs the newly created package.
    • -c: Cleans up the build directory.
      This step verifies the package builds correctly and installs all necessary files.
  4. Uploading to the AUR:

    • Create an account on the AUR website if you don't have one.
    • Create a Git repository for your package (e.g., git init, add PKGBUILD, .SRCINFO).
    • Use makepkg --printsrcinfo > .SRCINFO to generate the .SRCINFO file, which the AUR uses to parse package metadata.
    • Commit your PKGBUILD and .SRCINFO to the Git repository.
    • Follow the AUR submission guidelines to push your Git repository to the AUR's Git service.

After submission, the package becomes available on the AUR for others to install using AUR helpers like yay or paru. Maintaining the package involves updating the PKGBUILD for new software versions and pushing changes to the AUR.

median root
#

submisisson guidelines????

lavish frigate
#

who gaf about submission guidelines i put malware onto the aur every day and people install it without them catching on

supple whale
#

this is clean af

median root
median root
supple whale
#

has animations

#

its scrolls side to side

valid jetty
#

is it sane to allow contravariant arity

use std/prelude;

fn foo(fn(i32, i32) -> i32 cb) {
    return cb(39, 42);
}

fn main() {
    $dbg(foo(fn(x) x * 2));
}
#

@hoary sluice @deep mulch

#

the function foo accepts a function with 2 parameters, but since fn(i32) is a subtype of fn(i32, i32), it can implicitly cast (or well, the question is, should it?)

deep mulch
#

idk

#

looks insane

#

also

#

EXPLICIT RETURN TYPES 😭

valid jetty
# deep mulch idk

you could write fn(x, y) x + y for the lambda, but since fn(x) x * 2 is a subtype of the former, should you be allowed to implicitly cast it to the required type? the C abi allows omitting extra arguments; they will be safely discarded

deep mulch
#

hm

#

idk if it would be useful

valid jetty
#

its specifically useful for something like Array::map

#

because you can have [1, 2, 3].map(fn(x) x * 2) or [1, 2, 3].map(fn(x, i) x + i) or [1, 2, 3].map(fn(x, i, self) ...) with no overloading

deep mulch
#

oh

#

kotlin solves that by map and mapIndexed

#

forEach forEachIndexed

valid jetty
#

well i mean in modern elle you have [1, 2, 3].iter().enumerate() but yeah

deep mulch
#

elle will be blazingly fast

valid jetty
#

nope

#

(my laptop is throttled heavily right now)

lucid trail
#

this is so clean!

valid jetty
#

double_perchance!

deep mulch
valid jetty
#

is github down

#

ublock origin stops github from loading???????????

#

wtf why

deep mulch
#

wake up and it will be working

valid jetty
#

how am i supposed to find out whats making it take so long to compile 😭

#

ive done this before but usually its obvious

#

here it just splits a bunch

deep mulch
#

how are you even alive

#

rosie actually terrifies me

valid jetty
#

maybe i could shave off some time here

deep mulch
#

what is "here"

valid jetty
#

i dont think im gonna find any perf bottlenecks in this area 😭

#

even though its like 15% of the total runtime

deep mulch
#

you cant even read the text

valid jetty
#

yeah youre not really supposed to

#

you can just zoom in or hover over it

deep mulch
#

i meant on discord

valid jetty
#

wha

deep mulch
#

zoom and then send

valid jetty
#

welll

deep mulch
#

oh no

valid jetty
deep mulch
#

also light mode at like 5 am

#

insane

valid jetty
#

blame flamegraph for that

deep mulch
#

@valid jetty

valid jetty
#

you cant apply dark reader to a local svg

deep mulch
#

of course its yappanese too 😭

valid jetty
#

well yeah its inherited from my system

deep mulch
#

you are addicted i think

valid jetty
#

"This page is protected by your browser"

deep mulch
#

i thought firefox did dark mode svgs

valid jetty
#

or something

#

im on arc

#

no dont husk, fuck firefox

#

it eats up double the memory of chrome and is consistently slower to use

#

people say "oh use firefox" its not any better

#

all browsers suck

deep mulch
#

rosinga insane

#

rosie has 2 gb of ram

valid jetty
#

the only benefit for firefox is that browser pages open and close faster, but the content on browser pages is ALWAYS slower than chrome

#

even on something like youtube sometimes it stutters at 1080p

deep mulch
#

hardware accel issue

valid jetty
#

i have 16gb of ram on an m1 chip, my hardware is not the problem

deep mulch
#

guranteed

#

i dont have those issues on my pc

lucid trail
#

gecko is so bad

#

it’s got Temporal though!

valid jetty
#

firefox is only good because its not chrome lol

granite geyser
#

zen browser soooo good

valid jetty
#

but nowadays firefox is unmaintained and just as bad if not worse than chrome

granite geyser
#

swithc to zen

valid jetty
# deep mulch

i meant unmaintained as in "no new optimizations/features"

granite geyser
#

zen better 🙏

valid jetty
#

commits being done does not mean theyre making any real progress

#

isnt zen firefox based lol

lucid trail
granite geyser
deep mulch
#

they like just made hevc hardware decoding and some other stuff into stable

#

a few weeks ago

granite geyser
lucid trail
valid jetty
#

idk but i have used firefox and floorp for weeks straight

#

i tried to like them

#

but i switched back to chrome and its just faster lol

lucid trail
#

i can’t use anything except arc, it’s got me so locked down

valid jetty
#

i dont really care about the arc features other than the vertical tabs, but i have that on floorp and i can easily add it to firefox

deep mulch
#

idk if theres any difference i can tell

valid jetty
#

maybe little arc is useful

#

but other than that

deep mulch
#

if there is its insignifcant on my hardware

valid jetty
#

i wish the browser company didnt abandon arc to focus on their ai slop browser

lucid trail
#

i think the gecko perf difference is larger on a mac

valid jetty
#

yeah i think so too

deep mulch
#

wasnt arc already an ai browser

valid jetty
#

it performs fine on my fedora x86_64 machine

valid jetty
#

it has a few ai features but dia is like fully ai-powered

lucid trail
#

Chromium used to be hella slow on macos like 10 years ago but it’s improved a lot

valid jetty
#

yea

valid jetty
#

honestly i hope the ladybird project works out and the browser is a faster alternative to everything else

#

kinda like zed replacing vscode but for browsers

lucid trail
#

It might be comparable in 10 years

#

A competent browser seems like one of those impossible projects to me

valid jetty
#

yeahhh i love when the browser has so many standards its impossible to be compliant lmao

lucid trail
#

Spec grows too fast

deep mulch
#

browsers are hard

#

@valid jetty make a browser in elle

valid jetty
valid jetty
#

theyre not just hard

#

i would argue it is impossible to write a browser on your own

deep mulch
#

i know

#

its hard

#

you could probably write a browser in one day

#

the genius

valid jetty
#

why does it take a whole second to build ichigo

valid jetty
#

figure out whats taking so long

lucid trail
#

I tried figuring out the build process for ungoogled chromium and my mac ended up running out of space lol

valid jetty
#

256gb ssd?

deep mulch
lucid trail
deep mulch
#

fix

valid jetty
#

monomorphization needs all of those 3 passes

deep mulch
#

does it cache at all

valid jetty
#

it cant

#

it deduces new things from each pass

lucid trail
#

i keep 30gb around just to mess around with chromium

valid jetty
#

it cant use previous results because they become meaningless

deep mulch
#

sounds terrifying

valid jetty
#

look at this parse tree lol

#

maybe thats not a good extension

#

js will do

deep mulch
#

you should add arrows

valid jetty
deep mulch
#

for the line prefix

valid jetty
#

wha

#

wdym

deep mulch
#

i cant tell the flow

valid jetty
#

how

#

it gets more and more nested

deep mulch
#

no arrows

valid jetty
#

wha

deep mulch
#

theres no directionality

valid jetty
#

theres no direction its just things importing other nested things

#

the root file imports std/allocators/arbitrary which imports std/runtime/allocators/__internal__

#

etc

deep mulch
#
╭< Importing module 'std/allocators/arbitrary'
┆    ╭< Importing module 'std/runtime/allocators/__internal__'
┆    ╰> Imported 'std/runtime/allocators/__internal__' in 341.209µs
╰> Imported 'std/allocators/arbitrary' in 629.125µs
valid jetty
#

horror

#

i mean i could do it

deep mulch
#

do it for me i will say yay oine time

lucid trail
#

why not do it like lazy

deep mulch
#

does it run in parallel @valid jetty

valid jetty
valid jetty
frosty obsidian
#

if you never run anything it can never be slow

valid jetty
#

single threaded compilation

deep mulch
#

fix

valid jetty
#

that would require a whole restructuring of the project

deep mulch
#

do

frosty obsidian
#

@deep mulch i did this today

lucid trail
#

is there thread safe elle yet

deep mulch
valid jetty
frosty obsidian
#

time to implement async programming and mutexes

valid jetty
#

idk you can already do that if you just use libpthread

deep mulch
#

rosie will remove stdlib and force elle users to use external libraries

lucid trail
#

wow just like rust fr

valid jetty
#

キャラクターたちがコンシューマゲームをプレイしている様子をお届けします!

『Minecraft』 × 25時、ナイトコードで。

イラスト:葉山えいし https://x.com/ha_tak

公式サイト:https://pjsekai.sega.jp
公式X:https://x.com/pj_sekai

(C) SEGA
(C) Colorful Palette Inc.
(C) Crypton Future...

▶ Play video
granite geyser
#

one of these days we will ban wing wong

deep mulch
#

overthrow wing

granite geyser
#

@frosty obsidian in how many hours is it the new day for you

weak roostBOT
#

John Meyer and Vincent •°|∆•°|∆•°|∆•°|∆•°|∆•° were playing

frosty obsidian
#

24 minutes

deep mulch
#

@frosty obsidian play

valid jetty
#

zoot will get it in 6/6

deep mulch
#

yes

frosty obsidian
#

wrong channel

lucid trail
valid jetty
#

i love it

#

idk what kanade is doing but you go girl

lucid trail
#

the tools look so wrong

deep mulch
#

Pablo

frosty obsidian
#

got it in 3

lucid trail
granite geyser
frosty obsidian
#

what is it

gray heron
#

that was easy

deep mulch
#

im stuck @frosty obsidian

gray heron
valid jetty
deep mulch
#

i cant think of a single word that would fit

deep mulch
gray heron
frosty obsidian
#

think of other vowels

frosty obsidian
#

i was replying to koda

deep mulch
#

got it

gray heron
granite geyser
deep mulch
#

@hoary sluice

celest lodge
#

do i C or do i go on the 9front

native spruce
#

@woven mesa I still have the metal shader

#

I thought I lost it

#

though I lost a lot of the code for extracting colors and such

balmy lintel
#

virus

woven mesa
#

so good

hazy pine
#

THEY DID ALL OF THEM SO DIRTY

jade stone
#

is there a reason why i cant use the variable cur here

valid jetty
#

do {} creates a new lexical scope

#

the condition is not in that scope

#

i’m assuming thats C++, the RAII would clean up things at the end of the scope, so anything after the scope ends is unusable because it could potentially be freed

native spruce
#

lexicat

shrewd canopy
#

yea you should be using

for (;;) {
  const auto cur = (FILE_NOTIFY_INFORMATION*)(data + offset);
  auto reason = reasonFromAction(cur->Action);
  // ...

  if (!cur->NextEntryOffset) {
    break;
  }
}

instead

celest lodge
#

cur is only declared in the scope of the braces

jade stone
#

Yeah, I know that part, but it would still be valid after

#

I ended up just lifting it up out of the scope

wet kettle
#

helloworld:(print)

valid jetty
#

@hoary sluice THEY FINALLY BROUGHT SPLIT TERMINAL PANES INTO ZED

#

YOU HAVE NO IDEA HOW MUCH I WAS MISSING THIS FEATURE FROM VSCODE

#

FINALLY

hoary sluice
#

this is a feature from literally everywhere else

valid jetty
#

whatever

#

i missed it coming from vscode

deep mulch
frosty obsidian
#

its very feasible

valid jetty
#

import hell

deep mulch
#

wildcard import * exists

glacial mirage
#

put import *; at the top of every file to win

deep mulch
#

insane

valid jetty
#

i just

#

akjdbwakjdbjwkabda

#

the ONE time having a palindrome name is bad

#

$assert("elle".iter().rev().collect().join("") == "elle");

#

😭

valid jetty
#

thats pretty cool

deep mulch
#

ababa

valid jetty
#

i want it to be different in this case because i’m testing the rev adapter

#

if the output from rev is the same as the input you can’t tell if it actually did anything

echo mural
#

bi

deep mulch
#

@valid jetty hiiii

hoary sluice
#

why did i decide that using my school email for my commits was a good idea

valid jetty
#

because if you clone on a Filter struct, sure its copied correctly but the inner Box<Env> is not cloned (there isnt really a deep clone functionality built in unlike rust's Clone trait)

#

this is the best you can realistically have

hoary sluice
#

time to git filter-repo --replace-email artemiy.smirnov@htlstp.at=artemiy.smirnov@proton.me on all my repos 😭 husk

#

my son will get a proton email address and a lifetime subscription to proton unlimited

#

and a github account with that email

#

when hes born

#

infinite contribution graph glitch: just keep rebasing and force pushing over and over again and github will remember your old commits

#

at least for like a day probably

deep mulch
#

@hoary sluice nop

valid jetty
#

commits that were overriden become standalone, like a 1-time fork

#

you can visit their link at any time in the future

hoary sluice
#

this is 12 commits

#

cause i probably undid a commit twice

#

and then force pushed a rebase

#

wait no

#

theres 4 commits on apr 27th

#

and theyre tripled cause i force pushed twice

hoary sluice
#

cause otherwise i would've had a bunch of duplicate contributions

#

cause i undo commits often

#

that changes the hash and creates one of those single commit forks

#

so im guessing these force pushes are gonna go away too

valid jetty
#

no not force pushes

#

well

#

git commit --amend

#

counts

hoary sluice
#

a requirement for commits is for them to be part of a repo

#

orphaned commits dont count to contribution graph

hoary sluice
valid jetty
#

if you git commit --amend and then git rebase and git push, that counts to your contributions iirc

hoary sluice
#

no

valid jetty
#
$assert(["a", "b"].iter().enumerate().single().zip(Iterator::iota(100)).collect() == [$($<u64, string>(0, "a"), 100), $($<u64, string>(1, "b"), 101)]);
``` what a test 😭
hoary sluice
#

I amend or soft reset like half of all commits I make and I have not seen one that is duplicated on my contribution graph

valid jetty
#

test it right now

#

commit something and then amend it and git push --force

#

see if the number of commits for May goes up by 2

hoary sluice
#

Amend or soft reset interchangeably because there's a button in Zed that resets and sometimes I amend it cuz it's cleaner

valid jetty
#

lmao why not just use cli

hoary sluice
#

well it will go up by 2

#

but only temporarily

valid jetty
#

ah

#

idk

hoary sluice
#

I checked like almost all of may and I have not seen one that is not exactly tripled and it's tripled temporarily because of my two Force pushes

#

I pushed two email changed filter repos to icps so the commits are temporarily tripled

#

And doubled for some other repos but none are an outlier

valid jetty
#

interesting

#

m

winged mantle
#

es-toolkit my beloved

#

soo useful

royal nymph
#

why do you need that

#

while loop

granite geyser
lavish frigate
#

oh wait

#

the default is already 0 😭

#

insane!

#

they should multithread this for easier api-spamming

fleet cedar
#

Does js even have multithreading

lavish frigate
shrewd canopy
#

doesn't exist

royal nymph
#

actually workers exist...

supple whale
#

most native APIs are multithreaded

#

a good rule of thumb, if you're doing await someglobalfunction() its multi-threaded

#

for example await fetch() await crypto.something() await fileSystemFilehandle.write(data)

#

that's all async

#

and multi-threaded

#

implementing multi-threading yourself is pretty much the same as in Java tbf

#

you spawn a thread, use mutexes and locks

#

aka: its fucking cancer

#

we dont have Go style multi-threading tho

#

where ur syntax automagically becomes multithreaded and async

valid jetty
#

what im currently testing

supple whale
#

there are many libs which can however make any function threaded, not to be confused with multi-threaded, it just means the function's work is offloaded to another single thread

#

however threading is simply just:

#

especially if you dont thread absolutely everything

#

if you only thread a few calls, then you're not really gaining much

valid jetty
#

yes

deep mulch
#

make a kernel

#

the test is if it runs

valid jetty
#

internally foreach loops are sugar for while loops

lavish frigate
valid jetty
#

^^^

deep mulch
#

rosinga so smart

valid jetty
#

i still have to write tests for higher order functions and this new module i introduced recently

namespace TypeInfo;
global pub;

fn TypeInfo::type_of_val<T>(ElleMeta meta, T _) {
    return meta.types[0];
}

fn TypeInfo::type_of<T>() {
    res := TypeInfo::type_of_val<T *>(nil);
    return res.slice(0, res.len() - 1);
}

fn TypeInfo::size<T>() {
    return #size(T);
}

fn TypeInfo::is_pointer<T>() {
    return TypeInfo::type_of<T>().ends_with("*");
}
deep mulch
#

looks scary

valid jetty
#

the usecase is this

#

you can now technically print iterators

#
fn Iterator::__fmt__<T, Env, TEnded>(Iterator<T, Env, TEnded> self, i32 nesting) {
    return "<Iterator({}) at {}>".format(
        TypeInfo::type_of<T>(),
        string::as_string(#cast(void *, self))
    );
}
deep mulch
#

TEnded

valid jetty
#

?remind 14h max min find any all position sum product

delicate groveBOT
#

Alright @valid jetty, in 14 hours: max min find any all position sum product

💡 Did you know you can set your timezone with "?timezone set"?

median root
#

yo if i edit something on either side of a symlink does it change on both sides?

#

trying to replicate game saves using symlinks

lavish frigate
solemn ravine
#

making a new app @woven mesa

valid jetty
#

i love when something is slow but nothing in particular is slow its just a culmination of many parts which arent that slow by themselves but end up being slow in the end

#

like yes clearly generate_function is quite slow

#

but it branches off into 8 parts which all branch off into their little parts

#

i think the only way to get performance gains here is to use lifetimes and prevent cloning where possible

lucid trail
#

good luck with that

#

also holy hell monomorphization takes a while there

solemn ravine
#

@young flicker my new powers are immense, I love doing things im not supposed to do on ios 18.5

#

(listing installed apps)

royal nymph
#

hammerandchisel

#

true

native spruce
#

test

deep mulch
#

manul

weak roostBOT
#

Your group is on a 1 day streak! 🔥 Here are yesterday's results:
👑 5/6: @deep mulch @gray heron

woven mesa
#

@young flicker

solemn ravine
#

youve installed

#

already open sourced..

#

(and archived because it was just something for fun)

woven mesa
#

oh

ornate quiver
#

oh sick someone actually made on-device jit enabler

ionic lake
#

let me jit you bb

delicate groveBOT
#

@valid jetty, <t:1748471774:R>: max min find any all position sum product

valid jetty
#

this is the fundamental problem with static dispatch

#

i need to monomorphize Iterator::map for Iterator<i32, i32, DoubleEnded> but i also need to monomorphize it for Iterator<i32, Range<i32>, SingleEnded> and Iterator<string, Map<i32, i32, DoubleEnded>, DoubleEnded> etc, and this holds true for all 15 adapters or however many there are

#

when there are so many function calls with different types that need monomorphization the compilation time quickly creeps up

#

it takes 6 seconds to compile on low power mode on my laptop and 3.2 without LPM

#

i could bring it down to about 2s (on LPM) by preventing clones where possible but bringing it lower than that would require restructuring the core monomorphization system and/or the compiler itself

valid jetty
coral geyser
ionic lake
#

not sure if im a fan of the text variables implementation

#

prob my github but theres like 3 lines of space for some reason

coral geyser
coral geyser
#

i've been trying to find a better alternative, which wouldnt require external software

ionic lake
#

i mean checkVariables

#

didnt even get to the macos part

coral geyser
#

I could try implementing a selection which uses the select element instead

jade stone
#

is this cursed c++?

pseudo sierra
#

for c++? not really, in general? yes

ionic lake
fleet cedar
jade stone
#

Let me try again

hoary sluice
#

also why is it comic sans

deep mulch
vocal ether
#

spending about an hour to get an rpc for it to not even work

#

it found the song i was listening to but its not appearing in my rpc :(

#

so i guess pypresence is working instead of discordrpc but doesnt have support for the "listening" type

#

its pr time!

shrewd canopy
#

You may as well just use headless sessions or social sdk if you dont want to deal with rpc

vocal ether
#

whats that

#

and is there even a python module for it

shrewd canopy
vocal ether
#

yeah?

unkempt shuttle
#

i can see you're in the lanyard discord server? why not just use that

vocal ether
unkempt shuttle
#

what?

shrewd canopy
#

I doubt there is any, however I have a reimplementation of it in python

unkempt shuttle
#

like this?

vocal ether
ornate quiver
#

does lanyard not support listening

unkempt shuttle
#

what's stopping you from just making raw gateway requests

unkempt shuttle
vocal ether
#

isnt lanyard the embed status thing?

#

yeah

ornate quiver
#

no?

unkempt shuttle
#

yes

ornate quiver
#

so what stops it also displaying listening data?

unkempt shuttle
#

that's how i said it worked minus being in the server

unkempt shuttle
#

observe

ornate quiver
#

so what are you @vocal ether trying to do

unkempt shuttle
#

i think codesoft wants to make their own generic music rpc

ornate quiver
#

guhhhh

unkempt shuttle
#

pulling from windows media

#

wow it's almost like i'm a senior software engineer

vocal ether
unkempt shuttle
#

doesn't that provide

#

song name

#

and art

#

and stuff

#

what's stopping you from passing in listening

vocal ether
unkempt shuttle
#

which presence module

vocal ether
#

pypresence

pearl stagBOT
# unkempt shuttle https://github.com/qwertyquerty/pypresence/blob/4e882c36d0f800c016c15977243ac9a4...

types.py: Line 12

LISTENING = 2

rich-presence-music.py:

from pypresence import Presence, ActivityType
import time

client_id = '717091213148160041'  # Fake ID, put your real one here
RPC = Presence(client_id)  # Initialize the client class
RPC.connect() # Start the handshake loop

RPC.update(
    activity_type = ActivityType.LISTENING, # Set the activity to listening
    details=input("Your favorite song: "),
    state=input("The artist who made it: "),
    end=int(input("The length of the song (in seconds): ")) + time.time(),
    # At time of writing this, timestamps don't show for listening statuses!
    # ...so this field is pointless lol
) # Get the user's favorite song!

while True:  # The presence will stay on as long as the program is running
    time.sleep(15) # Can only update rich presence every 15 seconds

vocal ether
#

it does?

#

i had no idea

vocal ether
#

and i am on latest

unkempt shuttle
#

share the full error please

#

i can't see it

ionic lake
#

probably was updated but example hasnt

unkempt shuttle
#

nope

#

it's in the source

vocal ether
unkempt shuttle
#

like, the listening status

vocal ether
ionic lake
#

try install this package as a git dependency

unkempt shuttle
#

is presence a RPC

vocal ether
#

presence = pypresence.Presence(client_id_str)

unkempt shuttle
#

i don't know what that means

vocal ether
#

it should be

#

thats the definition of presence

valid jetty
#

@hoary sluice its finally so over

#

i can start comitting

shrewd canopy
ionic lake
#

install the package as a git dependency

vocal ether
#

that makes a lot of sense

ionic lake
#

then it should work

vocal ether
#

or can i just git clone and pip install .

ionic lake
#

sure

unkempt shuttle
shrewd canopy
#

With discord desktop?...

unkempt shuttle
#

oh i see

#

that's an odd way of doing that

shrewd canopy
vocal ether
#

um nevermind

#

but i did manage to grab thumbnails from the win media sdk

supple whale
#

how?

#

i tried this and it fucking sucked

#

to get mediasession info

#

this shit sucked

vocal ether
# supple whale how?
from winsdk.windows.media.control import GlobalSystemMediaTransportControlsSessionManager as MediaManager
from winsdk.windows.media import MediaPlaybackType
from winsdk.windows.storage.streams import DataReader

manager = await MediaManager.request_async()
current_session = manager.get_current_session()
info = await current_session.try_get_media_properties_async()

# Only proceed if music is playing
if current_session.get_playback_info().playback_type != MediaPlaybackType.MUSIC:
    return None

title = info.title
artist = info.artist
album = info.album_title
#
if info.thumbnail:
    try:
        stream_ref = info.thumbnail
        iraswct = await stream_ref.open_read_async() # IRandomAccessStreamWithContentType

        if iraswct and iraswct.size > 0:
            image_data_size = int(iraswct.size)
            image_data = bytearray(image_data_size)

            reader = DataReader(iraswct) # iraswct implements IInputStream
            await reader.load_async(image_data_size)
            reader.read_bytes(image_data) # Fills the bytearray

            content_type = iraswct.content_type.lower()
            extension = ".jpg" # Default extension
            if "png" in content_type:
                extension = ".png"
            elif "jpeg" in content_type or "jpg" in content_type:
                extension = ".jpg"
            elif "bmp" in content_type:
                extension = ".bmp"
            elif "gif" in content_type:
                extension = ".gif"
            
            # Create a temporary file to store the album art
            # Note: These files are not automatically cleaned up.
            # You might want to implement a cleanup strategy.
            fd, temp_file_path = tempfile.mkstemp(suffix=extension, prefix="albumart_", dir=tempfile.gettempdir())
            os.close(fd) # Close the file descriptor, we'll open with 'wb'
            with open(temp_file_path, "wb") as f:
                f.write(image_data)
            album_art_path = temp_file_path
            # print(f"Album art saved to: {album_art_path}") # Optional: for debugging
        
        # Close the stream and reader if they have close methods (good practice)
        if reader:
            reader.close() # Detach stream
        if iraswct:
            iraswct.close()
supple whale
#

wtf python has a lib for that

vocal ether
#

yeah python has a winsdk library

#

its a community supported version of winrt

shrewd canopy
vocal ether
supple whale
#

oh there's one for nodejs too

#

neat

#

might make it into a rich pressence thing

jade stone
vocal ether
#

i have to upload them to a file host ._.

#

isnt this great

#

I DID IT

lavish frigate
#

Camellia ‼️ ‼️ ‼️

vocal ether
#

Camellia ‼️ ‼️ ‼️

#

Also is there a way to have it instead of Listening to app name you could have Listening to song name

supple whale
#

aka the oauth2 shit

#

that premid does

#

if u figure it out hmu, but from what i've seen its not possible via the normal rich pressence

vocal ether
supple whale
#

yeah it seems to be ignored

vocal ether
#

i do see you have something working

supple whale
#

that's premid

vocal ether
#

oh whats that

supple whale
vocal ether
#

...and the images stopped updating

#

nvm it fixed itself

valid jetty
#

@hoary sluice ITS FINALLY OVER

#

38 commits all at once

#

fuck i forgot about those core iter methods

hoary sluice
#

rosie is the type of person to make an entire page of commits at once

valid jetty
#

that is exactly what i did

#

a little over a page

deep mulch
#

Rosie does more in a day than I do in a month

valid jetty
#

no this is commits from over a week of development

#

i just committed all at once

hoary sluice
valid jetty
#

i have... 434

hoary sluice
valid jetty
#

lmaooo

#

overall

deep mulch
#

@valid jetty when will Elle support android NDK

median root
#

bro 😭 make clean | sh what is this guy on

hoary sluice
#

thats crazy

#

touch some grass

#

who is paying you to make elle

royal nymph
#

finally

#

array methods on iterators

winged mantle
#

I swear I was already using that in node 22

royal nymph
#

almost like node 22 is very recent node

shrewd canopy
#

just enable social sdk for your application and you'll be able to request that scope

supple whale
#

im using rich pressence

shrewd canopy
#

i meant to reply to oauth2 message sorry

winged mantle
#

ye

#

from 2024

#

weird

#

maybe the types just looked like i could but i never actually tested

#

i was disappointed it didn't work on generators

#

nvm you can types just bad

#

@royal nymph it's just safari that's late to the party

#

😭

supple whale
# royal nymph

i dont rly get how that's different from [...iterable].map

#

wasnt [...] close to costless in v8?

#

having them on async iterators would be peak

royal nymph
#

and also chains things properly

#

could potentially be way more performant

supple whale
#

yeah it has no limit tho

#

thats kinda problematic

#

drop is based

#

its legit like seek

winged mantle
#

but.. why can't you use

supple whale
#

.take()!!!!!

winged mantle
#

who keeps there browser on an old version these days

supple whale
#

OMFG

winged mantle
#

pretty sure it works with firefox esr

#

ah

#

nop

#

vencord cares about their firefox esr users

valid jetty
#

@hoary sluice OMG

#

I CAN DO TYPE ERASURE

#

IN ITERATOR ENV

#

IT ELIMINATES THAT GENERIC ALTOGETHER AND THE NEXT FUNCTION IS JUST AS SIMPLE

#

insane..

#

that completely fixes my “identifier too long” error in qbe

#

i just store a void* in the iterator instead of Box<Env> and then cast to the right type in the next fn

#

so simple

supple whale
#

fuckign useless .

royal nymph
#

lmao yeah

#

i wonder why

supple whale
supple whale
#

they both act on yield

#

i mean polyfills for this have existed for years

#

so it doesnt rly matter

#

but still quite brainless

valid jetty
#

i love polyfill bloat

supple whale
#

well its not polyfill i guess

celest lodge
#

golang is a strange language

#

such weird syntax

#

and just annoying concepts to get used to when coming over from C

lucid trail
#

writing a lexer is so annoying, glad this part is finally over

#

have never hated off by one errors more before

#

this code is so bad, lots of monkey patching that shouldn't exist if i had done it properly

valid jetty
#

is your lexer written in js..?

#

@deep mulch im changing TEnded to AnyEnded

#

happy?

deep mulch
#

no

#

idk what its for

lucid trail
#

writing a lexer in js sounds awful

#

Just a simple web tool for me to check correctness

deep mulch
#

ok AnyEnded is a bit of an improvement though still soo cursed

valid jetty
#

im doing this at the type level through phantom generics

#

instead of throwing a runtime error

deep mulch
#

sounds confusing

valid jetty
#

thats cool

deep mulch
#

can it just be hidden away in the compiler side

valid jetty
#

thats very magicky

deep mulch
#

do

valid jetty
#

nope

#

that field is used for this

#

compile time errors when you do an operation that expects a double ended iterator on a single ended iterator

#

why husk

lucid trail
#

top ten palindrome checkers

#
  1. double ended iterator
valid jetty
#

so true

#

me when x.iter().rev.().collect() == x

deep mulch
#

elle will have 30 character long types

#

it sohuld just be Iterator<i32>

supple whale
#

at that point you have a stream XD

valid jetty
deep mulch
#

idk what double ended means

valid jetty
#

you can get elements from the back

#

all iterators can yield from the front but not all can yield from the back

#

for example a Range iterator can yield from both sides

#

meanwhile an infinite iterator has no end so you cant yield from the back

deep mulch
#

why does that need another type though

valid jetty
#

it doesnt

#

its embedded into the Iterator type

deep mulch
#

just make seperate class

#

or somethingh

#

Iterators should be finite i think

valid jetty
#

making a seperate class means i would have to duplicate every single method from normal iterators to the class

valid jetty
deep mulch
#

add inheritance

valid jetty
deep mulch
#

rosie insane

#

dont have to duplicate code with inheritance blobcatcozy

valid jetty
#

dont have to duplicate code with composition either

#

unfortunately i dont have a trait system yet

deep mulch
#

rosie crazy

valid jetty
#

wow simply doing type erasure made it compile a whole second faster

solemn ravine
#

idrr

#

how do you load the contents for the tableview

unkempt ember
#

Yeah you basically did a lazy loading ( I'm not sure if it's the exact term ), that's pretty neat. Also what is the language you are using ? I don't recognize at all, I though it was Go but.... Go uses walrus operator for assignation if I recall correctly

vocal ether
#

what else should i do with my media rpc

#

there is normally a progressbar

#

the other iterations

#

yep

#

they can do playing, streaming, listening, watching

unkempt ember
#

Wow, first time seeing Swift, the syntax looks like a mix of lua and Java / Kotlin to me, this is quite funny. This is indeed good if the OS handle that for you, but I guess you can add some kind of cache or persistence after them being loaded ?

vocal ether
#

i got the progressbar working (click on my profile to see the rpc)

#

and i even have this cool config menu with a preview

#

nevermind its broken

#

how is it different on all three??

solemn ravine
#

lel

vocal ether
#

wdym formats

#

that's the source that gets fed into winsdk

#

and the other two are what the winsdk data gets fed into

#

they get the same data...

solemn ravine
#

actually that looks normal

#

400 liner

#
  • more
#

I mean this is just how I do it

#

you can make it simpler by just making a new constant with a uiaction array then using that constant for the children

#

also I suggest for performance sake don't request such a high res image

#

are you sure

#

I'm having issues with orion 🦀

#

yeah I found it I can just use xcode to make tweaks

#

with proper code completion

#

orion has docs for it

#

well the only issue is that you need to specify objc headers

#

girl its swift

#

what do you expect

#

they can't do much else lol

#

the class name doesn't really matter here LabelHook could just be anything

#

I think

#

theres not much you need

#

in reality

#

wtf is that

#

potentially

valid jetty
#

@deep mulch finally documented

solemn ravine
#

what about it

#

why doesnt oslog show up in console..

#

okay I figured it out

#

thats so stupid

jade stone
#

cursed c++ 2, electric boogaloo

#

was this before

deep mulch
valid jetty
#

no lol

deep mulch
#

dooo

valid jetty
jade stone
#

@valid jetty does rust have an easy way to get the value from a Result<T, E> given that T == E

valid jetty
#

why would T == E

jade stone
deep mulch
#

rosie moment

jade stone
#

result int, error int

#

things like that

valid jetty
#
fn get_any<T>(res: Result<T, T>) -> T {
    match res {
        Ok(val) => val,
        Err(val) => val,
    }
}
pearl stagBOT
jade stone
valid jetty
#

i havent touched windows since march last year ❤️

jade stone
#

i love winapi i love winapi crazy_fucker

ornate quiver
#

windows 10 blobCatCozy

jade stone
#

wait since when does c++ have discriminated unions

#

love

#

(i say since when like it doesnt tell me trolley)

lucid trail
#

good lexer implementation!

valid jetty
#

what is that part even doing 😭

lucid trail
# valid jetty what is that part even doing 😭

basically checks if the current string is a valid special token, and if the next character is INVALID for an identifier(meaning the current string is an identifier), it pushes an identifier.

Also the checks push the recognized token and do everything else

ornate quiver
#

that's crazy

deep mulch
#

@young flicker uses windows copilot

jade stone
royal nymph
#

force him to use fedora

#

is it your laptop or his

pseudo sierra
#

love

lucid trail
#

is the one on the left a better interface than the one on the right?

#

I like the tags style

valid jetty
lucid trail
#

well you can do <g><b> too

#

but yeah

royal nymph
#

your laptop your conditions blah blah

#

if someone asked to borrow my laptop I wouldn't bother installing windows on it for them

lucid trail
#

i'll got with colored i guess

deep mulch
#

nerd

#

@young flicker

#

kill this user @royal nymph

#

unleash the fury of one thousand suns

#

@young flicker

native spruce
royal nymph
#

no..

native spruce
#

🥺

#

how else will I do my work

deep mulch
royal nymph
#

guhmasu

deep mulch
#

@royal nymph @royal nymph sleep

native spruce
#

hop on protokolle layout

solemn ravine
pseudo sierra
#

wait this isn't regulars

solemn ravine
#

im writing swift

lucid trail
#

well these messages were pretty fun to write

#

not very original, I know

#

Can't think of anything better tho

dense sand
pearl stagBOT
# valid jetty <https://github.com/acquitelol/elle/blob/rewrite/std/runtime/limits.le#L67-L81>

limits.le: Lines 67-81

fn f64::max() -> f64 {
    return *#cast(f64 *, &0b111111111101111111111111111111111111111111111111111111111111111);
}

fn f64::min() -> f64 {
    return *#cast(f64 *, &0b1111111111101111111111111111111111111111111111111111111111111111);
}

fn f32::max() -> f32 {
    return *#cast(f32 *, &0b1111111011111111111111111111111);
}

fn f32::min() -> f32 {
    return *#cast(f32 *, &0b11111111011111111111111111111111);
}
valid jetty
#

this but with hex

valid jetty
pearl stagBOT
# valid jetty like this https://github.com/acquitelol/elle/blob/rewrite/src/compiler/qbe/type....

type.rs: Lines 918-933

if lhs.arguments.len() > rhs.arguments.len() {
    if let Some(location) = location {
        elle_error!(location
        .borrow()
        .with_extra_info("This callback takes too many arguments")
        .error(format!("Too many arguments were expected in this callback.\nThe function expects {GREEN}{}{RESET}, but this callback takes {RED}{}{RESET}.",
            rhs.arguments.len(),
            lhs.arguments.len(),
            RESET = get_RESET!(),
            GREEN = get_GREEN!(),
            RED = get_RED!(),
        )))
    } else {
        return false;
    }
}
valid jetty
#

and get_GREEN!() just returns \x1b[32m or an empty string depending on whether you disabled colors (or have NO_COLOR=1 in your env)

lucid trail
#

yeah i noticed that you did that and i think thats just insane