#πŸͺ…-progaming

1 messages Β· Page 65 of 1

winged mantle
#

when i see vscode: eh fine

#

wait no

#

what's the thing

valid jetty
#

what the hell is this

winged mantle
#

first image = vscode
second = brave

#

literally me

pulsar elk
valid jetty
#

yes

#

for loops create while loop ast nodes

deep mulch
#

@valid jetty you

valid jetty
#

i like it because

  • it doesnt pollute with global functions yet still is short to type (just put a # at the start)
  • its a unified system, ie if you see one directive you an guess how the other directives work
  • not everything needs to be sugar

YEARS OF LANGUAGE DESIGN yet NO REAL-WORLD USE FOUND for prefixing functions with #
the point is that theyre not functions actually :3 the # makes an important distinction that the thing you are calling will do a compile-time thing instead of at runtime

deep mulch
#

I am in favor of removing #

valid jetty
#

i think as couldve been a good idea if ptr types were left associative instead

#

ie *u8 and not u8*

deep mulch
valid jetty
#

the left one is easier to read with as

#

x as *u8 * y vs x as u8 * * y

#

thats what rust does too with ptr types which is why it can have as i think

deep mulch
#

space between would mean multiply I think

valid jetty
deep mulch
#

I agree until it's regarding types like that

fleet cedar
#

Whitespace can affect tokenization (foo bar and foobar are obviously different), but it typically shouldn't affect parsing

#

Though in my lexer I convert <= to two tokens and then look if there was space between so that's a bit hypocritical

dawn ledge
hoary sluice
#

@valid jetty im installing nvchad

#

configuring nixvim got too tedious

hoary sluice
dawn ledge
#

whitespace should only matter for the lexer

hoary sluice
#
let foo = "bar" 







                                  in x 


*




a =                                       





        foo ++ a


should be the same as

let
  foo = "bar"
in
x *a = foo ++ a
hoary sluice
#

whitespace shound be irrelevant in the lexer other than separating identifiers

#

unless its python

fleet cedar
#

Whether the pasting of non-whitespace-separated symbols into multi-symbol ops counts as part of the lexer or parser is up to individual interpretation

#

I do it in the cursor over the token tree, which I'd count as part of the lexer

hoary sluice
#

the parser does not know what a whitespace is unless its python

dense sand
#

where exactly am i supposed to edit the config for e.g. nvim-cmp in nvchad? do i just add it to plugins/init.lua?

hoary sluice
#

it just knows [Let, Ident("foo"), Equal, String("bar"), In, etc...]

fleet cedar
lucid trail
dense sand
hoary sluice
#

cause the whole point is not to configure nvim

lucid trail
fleet cedar
hoary sluice
#

depending on whitespace is so husk

fleet cedar
#

cursor.operator("<=") checks whether the span of each symbol token is conjoined

hoary sluice
#

oh u mean if u have a <= token

fleet cedar
#

Yeah

#

I don't have <= tokens, I have single-symbol tokens and then a function that checks if they are consecutive

hoary sluice
#

i tried doing that but decided its easier to just make them combined

fleet cedar
#

C++ templates had trouble with that for a long time

#

Since vector<vector<T>> lexed as a right shift

#

In my case the lexer neither knows nor cares what composite ops the parser can dream up

hoary sluice
#

yea ik u had to do vector<vector<T> >

#

but i dont have generics (not even any types at all yet) and theyre not going to use <>

fleet cedar
#

I just thought it was easier to implement this way

valid jetty
deep mulch
#

awful

valid jetty
#

?????

#

zoot is a python lover

deep mulch
#

that's not good 😭

#

who writes code like that

valid jetty
#

ERROR: inconsistent whitespace detected

valid jetty
deep mulch
#

python sucks too

valid jetty
#

you can put 2 spaces between something and itll still compile

deep mulch
#

im saying enforce the whitespace on the type identifier

valid jetty
#

types are parsed with tokens not characters

#

and tokens are whitespace indenepdent

deep mulch
#

u8* = u8 pointer
u8 * n = u8 multiplied by n
u8* * n = u8 pointer multiplied by n

valid jetty
deep mulch
#

Rosie insane

valid jetty
#

also there is no "type identifier"

#

types can be more complex than T*

deep mulch
#

rust 2.0

deep mulch
valid jetty
#

(Foo<Bar> *[], (i32, i64 **[]))

a tuple with

  • on the left, a Foo<Bar> * array
  • on the right, a tuple with
    • on the left, an i32
    • on the right, an array of i64 **
#

thats a valid type

deep mulch
#

interesting

#

id do it as ([Foo<Bar>*], (i32, [i64**]))

dawn ledge
#

also @dense sand if you dont want shitty distro vendor lockin crap you can go with kickstart-nvim

jade stone
dawn ledge
hoary sluice
dense sand
dawn ledge
valid jetty
#

@deep mulch

#

the tuple and array types are sugar so its expanded in the $dbg view

deep mulch
#

&# 😭

#

what even

dawn ledge
#

&#cast is cursed

#

please #cast(&i64, &1)

deep mulch
#

what's the $ before random things

valid jetty
#

stdlib aliases

deep mulch
#

each tupe

valid jetty
#

oh

#

tuple constructors are just functions

deep mulch
#

why not just remove requiring a $

valid jetty
#

$ is a function

deep mulch
#

it's confusing

valid jetty
dawn ledge
#

elle is built on hopes and dreams

valid jetty
#

lmao

deep mulch
valid jetty
#

if i can have tuples be concise to create at no expense to the parser and compiler (no changes were made) then i might aswell do that

deep mulch
#

I'm confused about the syntax

valid jetty
#

i just use the alias system that already existed when i made it ```rs
fn Tuple::new<T, U>(T x, U y) {
let tuple = #alloc(Tuple<T, U>);

tuple.x = x;
tuple.y = y;

return tuple;

}

external fn Tuple::new<T, U>(T x, U y) @alias($) -> (T, U)

valid jetty
#

its just a function

deep mulch
#

cause you use angle brackets < for denoting a generic type in the structure
wouldn't it be more consistent to do this everywhere else like cast<i64>(g)

hoary sluice
#

how do yall configure the hover menu in nvim

dawn ledge
#

triples are cursed
please be a basic person and make tuples variable length

hoary sluice
dawn ledge
#

it conflicts with existing keybind but idc

hoary sluice
#

?

#

i didnt mean what keybind

pearl stagBOT
valid jetty
hoary sluice
#

how do u configure the borders and stuff

dawn ledge
#

oh i dont

valid jetty
#

you can now ```rs
cast<i64>(1)

deep mulch
hoary sluice
deep mulch
dawn ledge
#

basic popup at the cursor without any border

hoary sluice
#

isnt that super unreadable

valid jetty
deep mulch
hoary sluice
#

light mode

dawn ledge
#

shut up

hoary sluice
#

yea its readable with that theme

valid jetty
#

idk what youre trying to say 😭

hoary sluice
#

hes saying to x as T

dawn ledge
#

x: i64 := cast(y) blobcatcozy

valid jetty
deep mulch
#

cast(i64, 1) should not compile because using an unvalued type i64 in the param
it should be cast<i64>(1) imo

valid jetty
#

T is explicitly set, U is inferred from expr

dawn ledge
#

πŸ™

#

😭

deep mulch
#

😭 😭

valid jetty
#

theyre expressions too

#

:3

deep mulch
#

@valid jetty I fork elle

#

rename to belle

valid jetty
#

yeah if you can figure out how to read the code ❀️

deep mulch
#

@valid jetty when will Elle be written in Elle

valid jetty
#

at some point in the distant future

hoary sluice
#

he did say hes gonna maintain it

deep mulch
#

oh

#

eagley already had the idea

hoary sluice
#

elle readme longer than all code ive written in my file

#

life

valid jetty
#

@deep mulch

nimble bone
#

@valid jetty Roie

hoary sluice
#

sorry i mean belle

valid jetty
#

youll contribute

deep mulch
#

@valid jetty @valid jetty

valid jetty
deep mulch
#

lui

nimble bone
#

if you know a bit of french you know

valid jetty
#

FRESSS

deep mulch
#

I fork elle then rewrite to run on jvm

#

@valid jetty Elle.jar

hoary sluice
#

rewrite elle in kotlin

#

rewrite elle in elle

#

when elle bootstrap

deep mulch
#

soon

nimble bone
#

veeee 😭dicated

hoary sluice
#

call it elleelle

deep mulch
#

when Elle for MS dos

hoary sluice
#

ellelle

#

elele

#

i will make elele the elle elle compiler

nimble bone
#

@deep mulch get secure 2FA

valid jetty
deep mulch
#

make Elle for data analytics

#

@nin0.dev

jade stone
#

@nimble bone fork FreeNitroGenerator to freakyfres

deep mulch
#

use

nimble bone
#

i should do an org like freakyfres but its called johnmeyer

deep mulch
#

Fress

nimble bone
#

tehe

deep mulch
#

tehe

valid jetty
#

@deep mulch sign your git commits

royal nymph
deep mulch
solid gazelle
#

i should make programming language in slugcat conlang

nimble bone
#

πŸ‘‹ Welcome to Codespaces! You are on our default image.

πŸ” To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).

πŸ“ Edit away, run your app as usual, and we'll automatically make it available for you to access.

solid gazelle
deep mulch
#

Rosie's password is ":3:3::3wbwbenwbd332288"

royal nymph
solid gazelle
nimble bone
solid gazelle
dawn ledge
deep mulch
#

@nimble bone deluser fres

solid gazelle
#

𝓹𝓷𝓹𝓢 𝓲𝓷𝓼𝓽π“ͺ𝓡𝓡

hoary sluice
deep mulch
#

pkill fres

hoary sluice
#

did you know cooki spelled backwards is still cooki

nimble bone
#

ikooc

#

iKooc

deep mulch
#

@hoary sluice @nimble bone

nimble bone
#

iCock

valid jetty
#

HOW IS THIS AUTOMODDED

nimble bone
deep mulch
#

hacking into Rosie's PC and setting everything back to English

fleet cedar
#

Too many consecutive all-caps words?

hoary sluice
nimble bone
#

@royal nymph the pgp hype died you should unautomod

hoary sluice
#

rosie i thought you werent allowed to use pgp in the uk

valid jetty
#

zoot will never find the true meaning

royal nymph
#

people wouldn't stop spamming pgp signed messages 😭

valid jetty
#

lmao horror

hoary sluice
#

guys here is the public key of my ssh key that i use for all my logins and all my millions in crypto

royal nymph
#

same happened in Aliucord when someone published a SentFrom plugin

Sent from my Samsung SmartFridge

royal nymph
#

we had to ban "Sent from"

solid gazelle
#

----BEGIN PHP SIGNED MESSAGE----
<?php
echo "hello";
?>

dawn ledge
#

/run ```js
console.log(atob(atob(atob(atob(atob(atob(atob(atob(atob("Vm0weGQxTXdOVWhTYmxKV1YwZFNVRlp0TVc5V01XeDBaVVYwVjAxWGVGWlZiWFF3Vm1zeFdHVkVRbUZTVmxsM1dWZDRZV1JXUm5OaFJtUnBWMFpHTTFaclVrdFRNVTVJVm10V1UySklRbTlVVmxwM1ZWWmtXR1JIZEZSTlZuQjZWMnRvVDJGV1NYZFhiR2hYWVd0d2RsWldXbXRYUjFKSVVteGthVlpyV1RCV2EyTXhWVEZXUjFkdVZsSmlhMHBZV1ZSR1lXRkdXbkpYYkhCc1ZqQTFSMWRyWkRCVWJVcEdZMFpzVjJFeVRYaFdWRXBMVWpGT2RWWnNTbWxTTW1oWFZtMTBWMWxXU1hoalJscFlZa1p3YzFWdGVIZE5SbkJHVjI1a1YwMUVSbGhaTUZwelYwWmFSbE50YUZwbGExcG9WbXBHYTFkWFNrZFhiV3hYVm01Q1dsWXhZM2ROVmtWNFdrVmthRTB5ZUhOVmJGSnpWMFpzYzFadFJsUldiRm93VkZab1QxWnJNWEpqU0d4V1RXNW9NMVpxU2t0V1ZrWnhWV3hXYUUxWVFqWldiWEJIWVRGa1dGSnJaR2hTTW5odldsZDRZVmxXV1hoYVJFSm9UVlpXTkZkclZtdGhWazVHWTBab1dtSllUWGhXYTFwaFkxWkdWVkpzVW1sU00xRjZWakowYjFReFdsaFRiRnBYWVd4YVlWcFhjekZsVmxaSFVsUnNVVlZVTURrPQ=="))))))))))

rugged berryBOT
#

Here is your js(18.15.0) output @dawn ledge

zoot is so silly and freaky fres and veeeeeeeeee :sob:
valid jetty
hoary sluice
solid gazelle
#

@valid jetty if you had an ip address what would it be

hoary sluice
valid jetty
#

yes lol

valid jetty
hoary sluice
#

ok well kinda makes sense

valid jetty
#

its weird because you cant view your public keys from within github itself

placid cape
#

thats cool

valid jetty
#

like i cant view the keys

#

i can only see that they exist

hoary sluice
#

your public keys are supposed to be private or like uhh

valid jetty
#

.

deep mulch
valid jetty
#

its in the name bestie

hoary sluice
#

i know

valid jetty
solid gazelle
#

lc.eval ```php
<?php
var_dump(md5('240610708') == md5('QNKCDZO'));

visual shellBOT
deep mulch
#

Acquite LOL!!! 😭 πŸ˜‚πŸ˜‚πŸ˜­

solid gazelle
#

stole from chloe

valid jetty
#

@hoary sluice hop on

hoary sluice
deep mulch
#

fres pastes random code in console

hoary sluice
valid jetty
hoary sluice
#

no that is a private key

deep mulch
#

@valid jetty hiii

hoary sluice
#

i did ssh-keygen just now

valid jetty
#

oh

#

its a private key

#

not your private key

deep mulch
#

@valid jetty I have informations about you

valid jetty
#

i wanna thank tnixc because they wrote the base of it lol

hoary sluice
#

finally elle is useable

#

usable

#

wheres elle-analyzer

deep mulch
#

Elle ide

nimble bone
#

----BEGIN BALLS

deep mulch
#

when will Elle have AI ide for it

valid jetty
#

theres a Cargo.toml and a src/lib.rs but it ..??????????????????

valid jetty
#

its quite literally ```toml
[package]
name = "elle-zed"
version = "0.0.1"
edition = "2021"

[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]

[dependencies]
zed_extension_api = "0.1.0"

#

i have a feeling its something to do with the fact that the crate is called elle-zed but the folder is called zed

#

or the fact that the folder is inside of an existing crate but that shouldnt mean anything because i have my proc macro crate here too and it works fine

#

ok wait now im confused

#

with this setup and this it works

deep mulch
#

@valid jetty Elle for Roblox when

jade stone
#

GUHHHHHHHHHHHHHHHHHHHHHHH

#

ah yes, break apis for naming

#

so sane

valid jetty
jade stone
blazing haven
valid jetty
#

@hoary sluice lsp!!

dawn ledge
#

now add incremental compilation

valid jetty
#

im gonna spend at least the next month on this lsp lol

#

if i want to get proper errors with squiggly lines and hovering to see values and stuff

deep mulch
#

now add Gradle compatibility

fleet cedar
#

No

#

Eliminate gradle immediately

jade stone
#

how does rust know if this is a a logical or or a bitwise or

hoary sluice
#

ellei

deep mulch
#

Elle repl

valid jetty
fleet cedar
valid jetty
#

^

dense sand
#

my pc will explode any minute

hoary sluice
#

can u do if foo | bar { in rust

fleet cedar
#

If you want bitwise or, that'd be const { THREAD_ATTACH | THREAD_DETACH }, though that's unstable in patterns

fleet cedar
#

Assuming the bit_or operator on that type returns a bool obviously

jade stone
fleet cedar
#

/run ```rs
println!("{}", matches!(1 | 2, 1 | 2))

rugged berryBOT
#

Here is your rs(1.68.2) output @fleet cedar

false
fleet cedar
#

Match selects exactly one branch

jade stone
jade stone
# fleet cedar You don't

how would i do something like this in rust

function foo(bar: number) {
  switch(number) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
fleet cedar
#

1 | 2 => ...?

jade stone
fleet cedar
#

It's not a logical or

#

Since logical or is an expression (and is written ||)

#

It's an or pattern

jade stone
#

😭

dawn ledge
valid jetty
#

no i meant logical or

#

they said how does rust differentiate | being bitwise or and logical or and in match patterns | is not a logical or

#

its a variant matcher

fleet cedar
#

Bit or, logical or, and pattern or are all different things

valid jetty
#

you cant put arbitrary rust in match patterns unless its in the _ if arbitrary_rust => {}

dawn ledge
valid jetty
#

i know

#

but they asked how does rust differentiate between bitwise or and logical or

#

and i said its not logical or

#

😭

jade stone
#

how do you use a reference in a struct?

royal nymph
#

it tells you

#

you need to add a lifetime specifier

#

it seems to have an autofix too

spark tiger
lavish frigate
# jade stone

either use a static reference &'static str, specify a lifetime struct BuildCtx<'a> arch: &'a str or use a String (thought it of course wont be a reference anymore)

dawn ledge
#

dont bother with String if its never gonna be mutated

fleet cedar
spark tiger
lavish frigate
#

depends on the use case

spark tiger
#

idk for like json

dawn ledge
#

c++ is such a clusterfuck of a language

spark tiger
#

to just get data

#

and read

#

not modify

lavish frigate
#

for json? youd use serde anyway which gives you Strings

dawn ledge
#

i'll do you one better
what advantage do you get when using an owned String in a place where the ownership doesnt matter and/or you arent mutating it

spark tiger
#

idk u can always mutate it ig

dawn ledge
#

the way i see it in sadans case its never gonna be mutated

#

god forbid your device decides IM GONNA CHANGE CPU ARCHITECTURE mid runtime

spark tiger
#

i should probably read rust book

winged mantle
valid jetty
#

this is so annoying

#

i implemented the lsp thing and i have a diagnostic to report

#

but its not appearing in zed

#

its so annoying

deep mulch
#

@valid jetty vscode plugin when

valid jetty
#

i have this mode

lucid trail
jade stone
valid jetty
#

and i just parse that into a Diagnostic

dawn ledge
#

fake it till you make it

deep mulch
valid jetty
jade stone
valid jetty
#

why does it pick the taplo lsp instead of the elle lsp when loading a .le file whaaaa

#

these logs are just not here

#

wtf is zed doing

#

the lsp has started yet its just not doing anything on .le files

deep mulch
#

sadan science

valid jetty
#

oh

deep mulch
#

@jade stone sadantify

valid jetty
#

i ran out of storage

#

thats why

#

😭

deep mulch
#

Rosie has 20 gb ssd

leaden crater
dawn ledge
#

rm -rf /

leaden crater
#

wouldn't that just remove a little

#

cd into / first

deep mulch
#

Elle generates 2 TB of cache

leaden crater
#

idk how I'm gonna rust on a 256gb

deep mulch
dawn ledge
valid jetty
#

ITS RIGHT HERE

#

WHY ISNT ZED PUTTINg SQUIGGLY LINES

deep mulch
valid jetty
#

im doing ```rs
async fn did_open(&self, params: DidOpenTextDocumentParams) {
let uri = &params.text_document.uri;
dbg!("File opened", uri);

if let Some(path) = uri.to_file_path().ok() {
    if let Ok(output) = run_ellec(&path).await {
        let diagnostics = output_to_diagnostics(&output);
        dbg!(&diagnostics);

        self.client
            .publish_diagnostics(uri.clone(), diagnostics, None)
            .await;
    }
}

}

shrewd canopy
#

Insane

leaden crater
valid jetty
#

where are my squiggly lines,,,,,.,,.,,.,.,.

valid jetty
shrewd canopy
#

I have 1 terabyte on my secondary disk

leaden crater
#

man i wanna go to forbidden planet

dawn ledge
shrewd canopy
valid jetty
leaden crater
#

😭

#

I just want miku + nso figures

deep mulch
#

one day Rosie is just gonna stop speaking English @hoary sluice

leaden crater
valid jetty
valid jetty
#

o-sa vorbesc duar in japoneza si romana ca sa fiu sigura ca zoot nu o-sa ma inteleaga

leaden crater
#

based

#

recommend

frosty obsidian
#

i don't think thats programming

wispy kernel
#

I solved a math question using python husk

deep mulch
#

@ornate quiver writes assembly programs to do fractions homework

#

rusher only knows how to solve math in code but not on paper

ornate quiver
#

real

wispy kernel
#

I just realized there was a specific formula for solving the math question

spark tiger
#

i think github changed code font

#

WAIT

deep mulch
spark tiger
#

WHY IS IT SF MONO

#

LOL

deep mulch
#

oh

spark tiger
#

smh github makes me break the license

#

duhhhh i keep forgetting i cant sayi cant lie

#

i wanted to say sf mono is so pretty

valid jetty
#

the locations are a little messed up lol

#

@placid cape its real now !!

hoary sluice
valid jetty
#

because namespace

hoary sluice
#

not reason

lucid trail
valid jetty
#

there are lots of cases where the location is just wildly wrong

#

or well

dawn ledge
#

how

valid jetty
#

itll be the right line but nowhere near the right column

dawn ledge
#

does your error reporting not use source relative spans

valid jetty
#

nop its so cursed

dawn ledge
#

cursed

hoary sluice
#

her erros are just panics

valid jetty
#

no not even that

#

i decided it would be a great idea to make location be row, col, length

#

not start { row, col } and end { row, col }

#

so you cant have a multiline location

dawn ledge
#

start_byte, end_byte

valid jetty
#

idk

dawn ledge
valid jetty
#

the lsp leaves a lot to be desired

#

mostly the fact that it cant type check individual modules lol

dawn ledge
#

gonna need compiler integration

valid jetty
#

huuuusk

valid jetty
dawn ledge
#

ssa mentioned

#

write a language
look inside
dsl for qbe IR

placid cape
dawn ledge
valid jetty
#

i fixed that highlighting for struct literals lol

dawn ledge
#

make *self shorthand for foo *self

valid jetty
#

i do wanna do that yeah

deep mulch
valid jetty
#

yeah i have an animated wallpaper

#

THATS SO COOL

jade stone
valid jetty
#

now

#

do i pr this to zed/extensions

#

ok ill do that after i fix all the issues

dawn ledge
#

urgh work in progress

valid jetty
#

wouldnt it be really funny if i called this LZ

#

its growing,,,,

#

ellec --help | less will become mandatory soon

lucid trail
#

now time for more tooling

placid cape
#

you're doing a lot of progress, amazing

lavish frigate
#

elle package manager when

valid jetty
#

i was making a lot of progress before it just wasnt really visible

placid cape
#

i'll work on blom again after voice assistant

valid jetty
#

yay

dawn ledge
#

whats like the best type of gc in terms of speed to implementation ratio

jade stone
#

can someone explain rust's module system to me

if i have something like this

src/
-main.rs
-util/
  -file1.rs

given that file1.rs has a function foo()

how do I call foo from main

||i've tried looking at the rust book but i wasn't able to understand it||

valid jetty
#

mark-sweep is the simplest to make

valid jetty
dawn ledge
valid jetty
#

^

#

no u put the filename lol

dawn ledge
#

and in main do utils::file1::foo

#

yeah mybad

jade stone
#

is the mod.rs boilerplate needed for every dir?

dawn ledge
#

yes

jade stone
#

insane

dawn ledge
valid jetty
jade stone
#

what's the difference bewteen use and mod then

dawn ledge
#

mod declares it as "yeah this exists and is a part of this (sub)module"

fleet cedar
dawn ledge
fleet cedar
#

Or technically you can do mod util { mod file1; }

#

But don't

rose otter
#

helo, is there any reason why theres no gui for adding unofficial plugins? is it just not possible or is there other reasons?

jade stone
#

why add a gui for something we dont support

dawn ledge
#

wdym not supproted

#

just fork

#

:^)

rose otter
#

but having like a github import url thing

#

makes life easier you know

fleet cedar
#

A gui for recompiling vencord is very much a waste of effort

rose otter
#

ohh, do the plugins need to get recompiled? i see

fleet cedar
jade stone
#

there's this (cant copy link bc discord's shitcode)

but it is questionable

rose otter
#

oooh thats cool

valid jetty
#
poll_question_text

which

victor_answer_votes

2

total_votes

6

victor_answer_id

2

victor_answer_text

#cast(T, x) (cant be ambiguous, type goes first)

jade stone
valid jetty
fleet cedar
#

pub use file1::foo;

valid jetty
#

think of it like index.ts in jsland

jade stone
#

im looking for utils::foo()

valid jetty
#

yeah do the thing kyuu said

valid jetty
jade stone
valid jetty
#

is it a good idea to have row and byte_offset

#

or hmmmmm

fleet cedar
#

Why

dawn ledge
#

byte_offset + length :^)

fleet cedar
#

Just byte_offset

dawn ledge
#

depends on how you use this information
if youre doing non-line-aware ops youre gonna get away with byte offset

fleet cedar
#

The only line aware thing you're gonna do is line numbers in diagnostics

lucid trail
#

#[1,2,3] for tuples lol

spark tiger
#

im tryina read the rust book but my eyes hurt so much what do i do

dawn ledge
#

you change the theme

spark tiger
#

im always using the light theme

dawn ledge
#

FINALLY A LIGHT MODE USER

#

im no longer lonely

#

rushiii hater

spark tiger
#

fr

#

how do i listen to rust book as audiobook

fleet cedar
#

Espeak

dawn ledge
#

reading mode dictate

spark tiger
#

i was joking but thanks lol

valid jetty
jade stone
#

vscode so insane

jade stone
dawn ledge
#

then do crate::utils::foo

jade stone
dawn ledge
#

yes

jade stone
#

fucking insane

fleet cedar
#

It needs to be declared where it should be

#

If you want a file2::util module, declare it as such

#

If you want a util module that's accessed from file2 midule, declare that

dawn ledge
#

pub(in file2) mod utils trolley

fleet cedar
#

That'll give an error since file2 is not a parent

dawn ledge
#

commit war crimes

fleet cedar
#

Rust's module system takes a while to get used to when you're used to less structured systems

dawn ledge
#

cough go cough

#

or python

jade stone
#

eh, python is better than rust and go for module systems

spark tiger
dawn ledge
#

i was referring to the "less structured"

spark tiger
#

no

jade stone
spark tiger
#

wha

dawn ledge
#

i am getting conflicting information

#

@wheat kernel enlighten

spark tiger
#

u need to add it to each subdirectory

jade stone
#

i never needed to add it when i wrote python

wheat kernel
#

but folders dont have to be modules

#

if u have a package folder without an __init__.py u can't from package import file but u can from package.file import xxx

spark tiger
#

ffs all the sites use sf mono now isob

dawn ledge
#

so its optional

#

got it

spark tiger
fleet cedar
#

As it should

spark tiger
#

i just dont get why sf mono is in priority

dawn ledge
spark tiger
#

okay i never knew it worked like that

#

crazy

#

i think my headphones died

valid jetty
#

ok errors should start being better soon !!!! i made some changes which means now you can specify the whole location of an astnode by just taking a mutable copy of the location of the first token, then making the end position be the last token in the structure's end position

#

so for a structure like use foo/bar;, you take the location of use, then make the end position be the end position of ;

#

that should be saner hopefully,,,,,,,,

fleet cedar
#

That's a useful feature yeah

fleet cedar
#

I haven't needed that on this particular parser though

valid jetty
#

it makes it very clean to get the diagnostic messages in my lsp

deep mulch
#

@valid jetty does Elle have custom error throwing syntax like throw SomeError()

valid jetty
#

no

deep mulch
#

are you gonna add

valid jetty
#

you return nil and pray

fleet cedar
#

Golang style

valid jetty
#

yeah

deep mulch
#

insane

#

so you can't specify a message?

jade stone
#

return tuple (res,err)

valid jetty
#

you can do ```rs
if x := get_my_value() {
$dbg(x);
} else {
$panic("fuck we got an error");
}

jade stone
#

WHY DID IT JUST LOOP 100 TIMES

#

ERROR AND TELL ME YOU FUCK

valid jetty
deep mulch
#

noo I mean like

#

hm

valid jetty
#

you can pass nil in place of a real string if there is no error

deep mulch
#

so it's like golang

valid jetty
#

strings are just char *, nil is void *, T * -> void * is an allowed implicit cast in the compiler

valid jetty
fleet cedar
#

Enums when

deep mulch
#

god

#

help

#

@valid jetty

valid jetty
deep mulch
#

I like C style enums

valid jetty
#

you have that already in elle technically

fleet cedar
valid jetty
#
// Texture parameters: wrap mode
// #begin TextureWrap
    const TEXTURE_WRAP_REPEAT        = 0;    // Repeats texture in tiled mode
    const TEXTURE_WRAP_CLAMP         = 1;    // Clamps texture to edge pixel in tiled mode
    const TEXTURE_WRAP_MIRROR_REPEAT = 2;    // Mirrors and repeats the texture in tiled mode
    const TEXTURE_WRAP_MIRROR_CLAMP  = 3;    // Mirrors and clamps to border the texture in tiled mode
// #end TextureWrap
// Texture parameters: wrap mode
enum TextureWrap {
    TEXTURE_WRAP_REPEAT            // Repeats texture in tiled mode
    TEXTURE_WRAP_CLAMP             // Clamps texture to edge pixel in tiled mode
    TEXTURE_WRAP_MIRROR_REPEAT     // Mirrors and repeats the texture in tiled mode
    TEXTURE_WRAP_MIRROR_CLAMP      // Mirrors and clamps to border the texture in tiled mode
}
#

1 is elle 2 is C

jade stone
deep mulch
#

when I make a lang it'll be a combination of C style and OOP

deep mulch
visual shellBOT
# jade stone lc.g c++
C++

-# High-level programming language

C++ is a high-level, general-purpose programming language created by Danish computer scientist Bjarne Stroustrup. First released in 1985 as an extension of the C programming language, it has since expanded significantly over time; as of 1997, C++ has object-oriented, generic, and functional features, in addition to facilities for low-level memory manipulation for systems like microcomputers or to make operating systems like Linux or Windows.⁽¹⁾

deep mulch
#

maybe go would be closer

valid jetty
deep mulch
#

too many non OOP languages

valid jetty
#

especially if you wanna make full oop with protected and mixins and reflection and whatever

valid jetty
deep mulch
#

nop

#

add iota @valid jetty

valid jetty
#

STOP DOING OOP

CODE WAS NOT MEANT TO BE CLASSED

valid jetty
#

i will do that

deep mulch
#

pleaseee

#

yay

valid jetty
#

#iota coming soon

#

i thought you were gonna complain about the #

deep mulch
#

I hate the # still

valid jetty
#

how else would i do it

deep mulch
#

iota with no hashtag

valid jetty
#

iota() is cursed because it maintains internal compiler state

#

iota itself is bad because what if you want to make a constant with that name

deep mulch
#

idk

#

user issue

valid jetty
#

zoot's lang is gonna squat every single useful name for variables and functions

deep mulch
#

nop

#

I find way

valid jetty
#

yeah # prefix

#

what looks better $dbg() or dbg$()??

jade stone
#

second

#

is $ valid in normal identifiers

deep mulch
#

also why is that $

valid jetty
deep mulch
#

at least use the same symbol

valid jetty
#

like it cant be the sole name of a function but it can be an aliased name for a function

#

but its a valid identifier

valid jetty
#

its an stdlib alias

deep mulch
#

aaa

#

hate

valid jetty
#

the unaliased version is io::dbg()

deep mulch
#

just import io then and no need for that

valid jetty
#

no you cant bring namespaces into scope atm

deep mulch
#

oh

dawn ledge
dawn ledge
lavish frigate
# visual shell

C++ is a GARBAGE, USELESS programming language created by Danish computer IDIOT Bjarne Stroustrup. First released in PRE HISTORIC TIMES as an extension of the USELESS C programming language, it has since BLOATED significantly over time; as of 1997, C++ has NO REAL FEATURES, in addition to INSTALLING MALWARE and facilities for low-level memory CORRUPTION for systems like microcomputers or to make operating systems like Linux or Windows

deep mulch
#

@valid jetty will Elle mascot be a diseased rat

valid jetty
#

i will make the elle mascot the cat word so vee unbans it

dawn ledge
#

@valid jetty i like the fn foo::bar syntax elle has for scoping (ik c++ has it too but fuck cpp)
but idk how to blend that with protocols (fancy name for traits :^) ) without being hella repetitive

valid jetty
#
protocol DoThing {
    fn foo(Foo *self, i32 x);
    fn bar(string x) -> string;
};

struct Foo {
    i32 x;
};

bind DoThing for Foo {
    fn foo(Foo *self, i32 x) {
        $println(self.x + x);
    }

    fn bar(string x) { // return type can be inferred
        return "{}_{}".format(x, self.x);
    }
}
``` hm?
#

i specifically tried to refrain from protocols/traits/interfaces in elle for the longest time tho because fn foo::bar is very ungimmicky and obvious what is happening, there is no magic

#

unlike with protocols/traits/interfaces

lavish frigate
#

{}_{}

valid jetty
#

you should still be able to do ```swift
bind Foo {
fn foo() { ... }
}

dawn ledge
#

taking notes

valid jetty
#

but this is not a feature i would ever personally make

valid jetty
#

loveeeeeee

#

soon i can put syntax highlighted things in there probably

spark tiger
#

should i

  1. fork a repo and modify it the way i work
  2. rewrite its basics in rust and add what i want
#

the repo is in c++ it's such a fucking pain the ass to just compile it lol

#

i hate it

valid jetty
#

!riir

#

lc.riir

#

lc.define riir

visual shellBOT
valid jetty
#

.

#

lc.g riir

visual shellBOT
valid jetty
#

finally

spark tiger
#

maybe maybe

#

im just unsure how hard it is to make a vpn

#

like yeah you basically just use a protocol that someone has already made

#

but still

dawn ledge
#

wireguard

spark tiger
#

but yeah

#

basically same thing

valid jetty
#

@dawn ledge have you ever heard of Option::or 😭

#
fn main() {
  let x = Some(1);
  let y = x.or(Some(2));
}
#

not unwrap_or just or

jade stone
#

does rust have a function pointer type
eg: if I pass foo to bar()

fn foo() {
  println!("foo");
}
fn bar(func: /* what goes here */) {
  dbg!(func);
}
fn main() {
  bar(foo);
}
valid jetty
#

Fn(i32) -> i32

#

well specifically for non-closures you use fn(i32) -> i32

jade stone
#

should have been more specific

im looking for something that will take a function that takes any args and returns anything

valid jetty
#

uhh i think it’s something like &dyn Fn()

jade stone
#

i have a feeling this will get cursed

valid jetty
#

why the &&

jade stone
#

im just copying the capi blobcatcozy

spark tiger
jade stone
#

how do i get a functions pointer in rust

valid jetty
#

is it not just let my_ptr = func_name;?

jade stone
#

BINDGEN INSANE

#

WHY IS THE DOC IN A MASSIVE ONE LINE STRING

dawn ledge
#

sadan something tells me porting your spotify mod to rust is diminishing returns

jade stone
#

dont care, im just doing it to learn

valid jetty
#

currently working on converting every .expect() into .unwrap_or_else(|| elle_error!()) so the lsp can get those errors

#

there are 71 to do lol

#

but tbf there’s almost double elle_error

valid jetty
#

@hoary sluice all the location issues from before are fixed !!!!!!!!!!!!!

#

only took until 3am for the second night in a row

#

im not gonna commit tonight because i need to split all these changes into commits and itll be about 5

valid jetty
#

yes

#

its a habit i got into recently, its good for git bisect to have many smaller commits than 1 big commit

lucid trail
valid jetty
#

non-instance methods

#

fn Foo::new() {} for example

lucid trail
#

like a namespace?

#

yeah

valid jetty
#

that too but also just functions that you want associated with a struct but which dont need an instance of it

#

rust has that too

#

you can make a function in an impl block without self and you have to call it with Struct::non_instance_func()

#

or, Self::non_instance_func() if called from within the impl block

#

(this is also how namespaces work though you were right ;3)

#
global pub, external;

fn isalnum(char arg) @alias(char::is_alphanumeric) -> bool;
fn isalpha(char arg) @alias(char::is_alphabetic) -> bool;
fn iscntrl(char arg) @alias(char::is_control) -> bool;
fn isdigit(char arg) @alias(char::is_digit) -> bool;
fn isgraph(char arg) @alias(char::is_graphic) -> bool;
fn islower(char arg) @alias(char::is_lowercase) -> bool;
fn isupper(char arg) @alias(char::is_uppercase)-> bool;
fn isprint(char arg) @alias(char::is_printable) -> bool;
fn ispunct(char arg) @alias(char::is_punctuation) -> bool;
fn isspace(char arg) @alias(char::is_whitespace) -> bool;
fn isxdigit(char arg) @alias(char::is_hexdigit) -> bool;
fn tolower(char arg) @alias(char::to_lowercase) -> bool;
fn toupper(char arg) @alias(char::to_uppercase) -> bool;
#

although i guess these are technically """instance""" methods

#

you can do 'a'.is_digit()

#

ok good night i have an absolutely horrible headache

lucid trail
#

insane sleep schedule

formal belfry
#

sleep schedule doesnt exist

deep mulch
#

insane sleep surely has nothing to do with the headache husk

jade stone
#

this feels impressive

dense sand
#

can someone tell me how do music services stream music? like what strategy is used? in my spring boot i just serve stream of the mp3 file, but im nto sure how effective this is

deep mulch
young junco
#

think apple music also serves the entire file but i could be wrong

dense sand
#

gpt showed me something called "http live streaming"

deep mulch
#

ye

#

im wondering if WebRTC could be used for this

#

would be interesting

dense sand
#

I think hls can fit better, webrtc seems to be more fittable for a bit different usecase

inner bone
#

hello, how can i get a vencord version in plugin?
and also can i from plugin check updates for vencord? (not so that I get a built-in notification, but so that I only get a response in the plugin)

ornate quiver
pearl stagBOT
ornate quiver
pearl stagBOT
valid jetty
#

i slept at 3, that’s earlier than the night before

dawn ledge
dawn ledge
dawn ledge
#

i meant this

#

good for CI too

valid jetty
#

ah

#

i could do that

#

oh gd json output means i have to add serde too

dawn ledge
#

hand roll

valid jetty
#

its growing πŸ˜”

#

do you love

pub async fn get_file_output(path: &Path) -> Result<String> {
    if path
        .extension()
        .is_none_or(|ext| format!(".{}", ext.display()) != SHORT_EXTENSION)
    {
        return Err(anyhow::anyhow!("File must have the '.le' extension").into());
    }

    let output = Command::new("ellec")
        .arg("-c")
        .arg("-x")
        .arg("-Wall")
        .arg("--noclr")
        .arg(path)
        .stderr(std::process::Stdio::piped())
        .output()
        .await?;

    dbg!(&output);
    Ok(String::from_utf8_lossy(&output.stderr).to_string())
}
#

the lsp just calls ellec recursively on opened/saved files

#

all the diagnostics come from the same place no matter if its the lsp or pure compilation :3

dawn ledge
#

you can probably remove levenshtein
its like 10 lines at most

valid jetty
#

yeah lol its a single file

#

this is it

/**
 * `levenshtein-rs` - levenshtein
 *
 * MIT licensed.
 *
 * Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>
 */
#[must_use]
pub fn levenshtein(a: &str, b: &str) -> usize {
    let mut result = 0;

    /* Shortcut optimizations / degenerate cases. */
    if a == b {
        return result;
    }

    let length_a = a.chars().count();
    let length_b = b.chars().count();

    if length_a == 0 {
        return length_b;
    }

    if length_b == 0 {
        return length_a;
    }

    /* Initialize the vector.
     *
     * This is why it’s fast, normally a matrix is used,
     * here we use a single vector. */
    let mut cache: Vec<usize> = (1..).take(length_a).collect();

    /* Loop. */
    for (index_b, code_b) in b.chars().enumerate() {
        result = index_b;
        let mut distance_a = index_b;

        for (index_a, code_a) in a.chars().enumerate() {
            let distance_b = if code_a == code_b {
                distance_a
            } else {
                distance_a + 1
            };

            distance_a = cache[index_a];

            result = if distance_a > result {
                if distance_b > result {
                    result + 1
                } else {
                    distance_b
                }
            } else if distance_b > distance_a {
                distance_a + 1
            } else {
                distance_b
            };

            cache[index_a] = result;
        }
    }

    result
}
dawn ledge
valid jetty
valid jetty
#

and this prevents it from generating the object file

dawn ledge
#

nah like
if filea depends on fileb and youre just compiling filea does that resolve fileb internally

valid jetty
#

yes

dawn ledge
#

alright

valid jetty
#

because it calls ellec recursively, the use statement embeds fileb into the ast of filea so the error goes away

#

next step might be to get hover info but thatll be a lot harder i think

dawn ledge
#

btree of symbol/ident locations blobcatcozy

royal nymph
#

honestly you should really move to an official elle server or a thread

this channel has been nothing except elle, elle every day

formal belfry
#

sigma.le

#
// sigma.le

use std/io;

fn main() {
    io::println("Sigma.");
}
dawn ledge
#

why is this brainrot of a word not banned

#

but castspeak is

lavish frigate
#

Sigma

royal nymph
fleet cedar
#

It's a greek letter

dawn ledge
#

how many times has it been usd for math or greek over brainrot

formal belfry
#

very sigma

valid jetty
#

😭

solemn ravine
#

certified sigma

hoary sluice
formal belfry
#

who knows

hoary sluice
#

@valid jetty your lsp doesnt work on stable rust

error[E0658]: use of unstable library feature `os_str_display`
  --> src/lsp/get_file_output.rs:10:46
   |
10 |         .is_none_or(|ext| format!(".{}", ext.display()) != SHORT_EXTENSION)
   |                                              ^^^^^^^
   |
   = note: see issue #120048 <https://github.com/rust-lang/rust/issues/120048> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ellec` (bin "ellec") due to 1 previous error
valid jetty
#

oh

#

lmao maybe i should make it clear that you have to build with nightly

hoary sluice
#

or just add elle to nixpkgs so i dont have to build it

valid jetty
#

n*x (ill see)

hoary sluice
#

elle flatpak husk

fleet cedar
#

From what I understand os_str_display was stabilized recently, so it's in a weird state where it's stable on nightly

hoary sluice
#

well using rust nightly on nix requires some extra setup

fleet cedar
#

Meaning you don't need #[feature] on nightly because it's stable, but can't use it on latest stable

#

Using anything on nix requires extra setup

hoary sluice
#

unless you do nix-shell -p rustup and rustup toolchain install nightly

hoary sluice
valid jetty
#

itll will probably become compilable on stable in like a week

hoary sluice
#

is elle.nvim a thing yet

valid jetty
#

no

dawn ledge
#

why woudl you do that

#

thats counter intuitive

valid jetty
#

eagely is in the thick of with nix

dawn ledge
#

rustup installs to its own install location

valid jetty
#

~/.cargo right

#

wait

hoary sluice
valid jetty
#

~/.rustup

dawn ledge
valid jetty
#

lmao

hoary sluice
#

i know

#

this is not a permanent solution

valid jetty
#

switch back to arch πŸ™

hoary sluice
#

nop

#

never

#

actually maybe not never

#

mabe never

dawn ledge
#

switch back to arch and install nix package manager :^)

hoary sluice
#

nop

#

when elle 1.0?

valid jetty
#

like in a year

#

until 1.0 i can just bump minor when there is a backwards incompatible change and be done

#

when 1.0 i have to bump major or make it backwards compatible and i dont really wanna have to deal with that

hoary sluice
#

why does make delete ellec

#

[nix-shell:~/workspace/elle]$ cp examples/ellec .

[nix-shell:~/workspace/elle]$ make
cargo build --release && mv ./target/release/ellec ./ellec
Compiling ellec v0.20.0 (/home/eagely/workspace/elle)
Finished release profile [optimized] target(s) in 17.59s
mkdir -p /home/eagely/.local/bin/
mv ./ellec /home/eagely/.local/bin/ellec
rm -rf /home/eagely/.local/include/elle/std
mkdir -p /home/eagely/.local/include/elle/std
cp -rf std/* /home/eagely/.local/include/elle/std
mkdir -p /home/eagely/.local/lib
ellec /home/eagely/.local/include/elle/std/runtime/index.le -o libelle.o -c -p --noalloc --nogc --nosm --nofmt --nostd
make: ellec: No such file or directory
make: *** [Makefile:32: install-runtime] Error 127

[nix-shell:~/workspace/elle]$ ls
build.rs Cargo.lock Cargo.toml codegen elle-zed examples hello.le LICENSE.md Makefile README.md src std target tests tools

valid jetty
#

it doesnt it puts it in ~/.local/bin/ellec

#

if you want just the executable do make install-compiler-release

hoary sluice
#

oh cause .local/bin isnt in path

valid jetty
#

yeah

hoary sluice
#

i want the stdlib

valid jetty
#

puts in ~/.local/include/elle/std/** and ~/.local/lib/libelle.a

hoary sluice
#

evil

#

can i statially link the stdlib

#

statically

valid jetty
#

the stdlib is just headers

#

you can just do this tho

#

elle$ ellec x.le --std-path .

#

nix.. complicates things a bit i think

solemn ravine
#

elle on swiftpm

valid jetty
#

this is way better than "Read full commit"

formal belfry
#

github desktop user

dawn ledge
#

gitbutler

formal belfry
#

me when i commit my changes from the command line

#

actually in a vim buffer

valid jetty
#

i do that for smaller commits

#

but when theres a lot i dont wanna miss anything and github desktop is good for that

formal belfry
#

i just use a function in my zshrc that calls into vim and type my message + description there

valid jetty
#

yea

#

@hoary sluice @dawn ledge look at this

#

error in 1 file 2

formal belfry
valid jetty
#

highlights the import path of file2 in file1

formal belfry
#

but then you got this:

git commit -m "long ass name" -m "long ass description that takes up too much goddamn space and is hard to wrap, has multiple other problems as well"

valid jetty
#

and does the same for anything that imports file1

#

silly

valid jetty
#

with nothing

#

opens a vim buffer

formal belfry
#

no

#

oh wiat

#

how did i not know about this

#

that is highkey embarrassing how did i not know about this until now

valid jetty
#

lmao

valid jetty
#

@ornate quiver Project RUSHER

dense sand
#

this is not a good practice but i dont care

dawn ledge
#

i'd call it HANDLE_CASE

#

instead of HANDLER

deep mulch
#

@valid jetty hii

valid jetty
#

hii

valid jetty
dawn ledge
#

love

#

although pretty pointless if your target doesnt have the syscalls used

#

also doesnt work on macos since syscall for write on macos is 4 not 1

#

or bsd

#

bsd is also 4

#

guhhh im not on linux rn

#

i wanted to see what it would do if i went over 1024

steady zephyr
#

it's joever πŸ’”

valid jetty
#

NOOOOOOOOOOO

dawn ledge
#

how are enums represented in memory
are they just like unions but tagged

dense sand
#

Godbolt?

dawn ledge
#

true

fleet cedar
jade stone
#

im so good at writing cursed typescript classes

#
class LastTwo<T> {
    constructor(private one: T, private two: T) {
    }

    push(val: T) {
        this.one = this.two;
        this.two = val;
        return val;
    }

    get(): [T, T] {
        return [this.one, this.two];
    }
}
dawn ledge
#

least cursed

#

i've done worse

supple whale
dawn ledge
#

way worse

valid jetty
jade stone
#

thats the point!

valid jetty
#

why would you EVER need this

jade stone
jade stone
#

love when typescript reports errors in deps

supple whale
jade stone
#

it's a pnpm issue

supple whale
#

no?

#

lol?

dawn ledge
#

its a ts issue

supple whale
#

why would it ever be

#

yeah

dawn ledge
#

add skipLibChecks

supple whale
#

tsconfig fuckign sucks ass

#

with the amt of config it needs

#

and the defaults for tsconfig are dogshit

#

who in the right mind leaves

"typeAcquisition": {
  "enable": false
},
```on my default
#

"ah yes, lets just automatically inject types into your project, which are controlled by a 3rd party repository [DT], which consistently approves broken and incorrect types and doesn't allow their removal. oh but if you use vscode we'll sometimes include them and sometimes not!"

lavish frigate
#

πŸ”₯

#

tsconfig does suck ass

median root
#

Yo has the new discord ui thing broke the vesktop transparency for anyone else?

#

it aint transparent no more πŸ˜”

fleet cedar
#

Nah the ui update did nothing transparency related

#

But you need an updated theme to utilize it

dawn ledge
#

transparency lovers when text becomes unreadable

leaden crater
#

or how does transparency even work

median root
#

Its just that for me I got the enable window transparency setting on in the vencord settings