#🪅-progaming

1 messages · Page 90 of 1

valid jetty
#

nop it's beautiful

lucid trail
#

i did some reading and apparently some other languages need you specify a power

valid jetty
#

what like scientific notation?

lucid trail
#

pretty confusing to me

#

oh it's just for ambiguity of f in this case

#

yeah not sure if i need this

#

this is neat

#

also golang has imaginary numbers??????? as literals?????

valid jetty
#

i mean thats nothing new so does python

deep mulch
#

@valid jetty SLEEP

#

😭

valid jetty
#

no

deep mulch
#

@valid jetty does your family not care that you never sleep

dense sand
#

Honestly id want to have such energy for programming too

lucid trail
#

yeah energy like that for me usually comes in cycles

deep mulch
#

i donmt have that much energy

native spruce
#

protokolle stream controller is around 500

#

but it has some fancy animations so it’s a container in another view

#

add like idk 200 to that

#

don’t be worried about how many lines it is but I would worry if it’s that many lines and is a horrible mess

#

just make sure everything is organized and makes sense

#

Use extensions if possible to help with code organization

winged mantle
#

less loc better

#

merge lines using ;

solemn ravine
#

@young flicker IT GOT APPROVED

#

HOOLY SHIT

#

U GOTTA WAIT THOUGH

hoary sluice
#

why do u have a separate enum for punctuation

fleet cedar
#

Punctuation(';') is superior

native spruce
#

hahaha they allow it

pseudo sierra
#

protokolle

spark tiger
#

[ PROTC
KOLLE ]

unkempt shuttle
#

why does your lexer parse

valid jetty
unkempt ember
#

Good advice, I should keep that in mind from time to time

lucid trail
lucid trail
unkempt shuttle
#

it's probably fine tbqh

#

i just get alarm bells when i see complex number types handled by the lexer

lucid trail
unkempt shuttle
#

it's up to whatever you find easiest to handle

fleet cedar
#

What does 0xff have to do with complex

lucid trail
#

Also that

unkempt shuttle
#

never mind

#

sorry

#

my bad

fleet cedar
#

Things like python's 1j definitely go in lexer though

valid jetty
#

why does +2 consume the 2

#

i know it’s unary but it should be contextual whether it’s lexed as unary or binop

lucid trail
#

I'm handling unary vs binops in the parser

valid jetty
#

insane

#

you could do what i do trolley

#

have a condition to check the previous token and if it’s not a specific kind you parse the punct as unary otherwise binary

lucid trail
#

oh that's a good idea

#

my lexer doesn't ever look at what's already there

valid jetty
#

beware the context to parse as unary is pretty huge

lucid trail
pearl stagBOT
fleet cedar
#

What point is there even in parsing - as part of the numeric literal?

hoary sluice
valid jetty
#

that’s the thing, -39 and +39 are themselves literals which become -1 * 39 and 1 * 39 respectively

hoary sluice
#

and GreaterDot ig? tho i dont have that

valid jetty
#

which sounds bad on paper but qbe does constant folding so it is actually ok

hoary sluice
fleet cedar
#

- isn't a function, it's a token

valid jetty
hoary sluice
#

that doesnt help and i dont want help

#

have u seen my board

#

its crazy

valid jetty
#

yes lol

#

mine was also crazy

hoary sluice
#

1 green 1 yellow 4/6 ONE DUPLICATE LETTER

weak roostBOT
hoary sluice
valid jetty
#

eagely fubction

lucid trail
#

why does discord have wordle now

valid jetty
#

it’s actually a benefit

#

i can’t run it on my phone because my ios is too old

#

but i can run the discord version

hoary sluice
#

wait why does this work

#

nvm makes sense

#

i didnt know i could use no arg functions (variables) standalone

#

ooo function aliases come for free!!!!

#

i might put print = println in the prelude so i stop forgetting to write ln

valid jetty
#

i can do that but it didn’t come for free

hoary sluice
#

NO BUT HOW WAS IT THAT EASY

hoary sluice
#

but this wasnt the intention

#

time for lists

#

@valid jetty is there any reason to use x:xs over arraylists

valid jetty
#

wdym

hoary sluice
#

yes i love when it makes my entire function unreadable with yellow lines just because its too long

valid jetty
#

this is why you don’t enable clippy in zed

hoary sluice
valid jetty
#

yeah

hoary sluice
valid jetty
#

oh

hoary sluice
#

but i think imma keep it enabled

valid jetty
#

something like haskell would do that as an optimization step but purely functionally speaking arraylists do not exist

hoary sluice
valid jetty
#

nop

#

that’s kinda cheating

hoary sluice
#

well i need arraylists for aoc

valid jetty
#

you should implement pairs and pair destructuring

#

then write functions that operate on the pairs like arraylists

hoary sluice
valid jetty
#

the internal representation of the structure shouldn’t be relevant at the call site

#

all you’re doing is map arr (\x -> x * 2)

#

you don’t need to know whether arr is an arraylist or linkedlist

hoary sluice
#

maybe i just make iterators first?

valid jetty
#

true

#

oh did you see

#

my type erasure strategy worked

hoary sluice
#

yes i saw

valid jetty
#

i love implementing concepts i learnt from rust in non-rust

#

(phantom generics, Boxing, type erasure)

hoary sluice
#

my parser was completely broken until i rewrote it almost from scratch

valid jetty
#

fix

hoary sluice
#

im gonna fix clippy issues first

jade stone
#

i love multithreaded lifetimes

#

ended up holding a shared_ptr to this to solve it blobcatcozy

spark tiger
#

is there some crate or a smart way to have some sort of a resources folder in rust?

#

just need to have a 100kb json file to be used in the app

#

and i'd rather it to be loaded dynamically than to be like included into the PE

#

so its size doesn't get too big

#

though 100kb isn't that much

#

i guess

hoary sluice
#

icypeas is 4.9MB

#

and its a really small program with no deps

#

100kb shouldnt be an issue

spark tiger
#

im just worried cuz the app is supposed to be running in background

#

so i want to make it as small as possible

hoary sluice
#

well how big is it rn

hoary sluice
spark tiger
#

idk i havent finished it yet fr

spark tiger
hoary sluice
#

if not then 100kb is really gonna be irrelevant

hoary sluice
spark tiger
#

i mean its not ready at all

hoary sluice
#

well just check how big it is rn

spark tiger
#

do i just cargo build --release

hoary sluice
#

ye

hoary sluice
spark tiger
#

2.8mb fr

#

idek how it is that big

hoary sluice
#

yea so 100kb is irrelevant

spark tiger
#

like i literally just have a bunch of structs

#

and thats it

hoary sluice
#

do u have any deps

spark tiger
#

yeah

#
[dependencies]
anyhow = "1.0.98"
reqwest = { version = "0.12.15", features = ["blocking", "json"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
hoary sluice
#

there u go

spark tiger
#

i can prob replace serde with just serde_derive ig?

hoary sluice
#

theres ur 2.8mb

#

pretty sure serde { features = derive } is the same as serde_derive

spark tiger
#

also uh

valid jetty
hoary sluice
#

it can be a gb for all i care

valid jetty
#

i wonder how big elle is

spark tiger
#

is it possible to like uhh free memory from that big ass json file once i convert it into structs getting rid of extra stuff i dont need? cuz like it should take less memory if i just store it as structs rather than pure bytes obviously but will i be able to like get rid of the plain bytes in memory? idfk how to epxlain it better

valid jetty
#

ellec is only 5.6mb lmaooo

#

not that big

#

then again i ```toml
[profile.release]
opt-level = 3

valid jetty
#

as long as you copied the bytes over into your structs instead of storing a reference to them ofc :3

spark tiger
#

i see

#

won't rust do it automatically

#

i mean free the included bytes

#

once out of scope

#

or something

valid jetty
#

well yeah

#

but i assumed you do it in the main function

#

like you just ```rs
fn main() {
let bytes = read_thibg_colon_3();
let (x, y, z) = parse_bytes(bytes);
std::mem::drop(bytes);

do_stuff(x);
// ...

}

valid jetty
#

true..

#

but this is rust not C

jade stone
#

something something bindgen

valid jetty
#

more effort than its worth imo

jade stone
#

tbh wouldn't be that hard to make for rust instead of c

valid jetty
#

im sure theres some macro in the stdlib to embed some file at compile time into the code

jade stone
valid jetty
#

cant you do this

const a: &[u8] = include_bytes!("path/to/image.png");
``` idk
fleet cedar
#

include!() is for including rust code

#

include_str!() and include_bytes!() for data

valid jetty
#

yeag

spark tiger
#

i wonder if i should do include_str or include_bytes

#

cuz like its json

#

it should be a valid utf-8 string anyways

valid jetty
#

include_str

spark tiger
#

i guess it makes sense to like minify it

#

i mean remove any spaces in json

jade stone
#

you could prob generate a structred rust file with your resources

spark tiger
#

tbh i think i'll stick with just dynamically loading the file with fs

#

include_str/bytes seem a bit confusing to me idk

fleet cedar
#

They aren't confusing at all though

spark tiger
#

im just dumb then isob

valid jetty
#

you literally just put

const my_json_stuff: &'static str = include_str!("path/to/your/file.json");

fn main() {
    // wow use..
}
#

as far as im aware

#

though keep in mind none of that will be dropped

#

because its in bss

spark tiger
fleet cedar
#

It's memory-mapped, i.e. essentially free

unkempt shuttle
#

also consts use screaming snake case

#

sorry...

#

(i'm not actually sorry)

valid jetty
#

dont worry rust will shout at you when you try to compile

spark tiger
#

am i coding in zig isob

ionic lake
#

no its good but if you want to, you could just remove the decl

spark tiger
#

what am i doing wires

unkempt shuttle
#

i don't think this is how you want to use that

#

why are you mem dropping a static str

ionic lake
#

youre serializing it and then dropping it?

spark tiger
#

i have no idea what i’m doing. i just want to like get rid of it from memory since i already have it structured via PiaResponse

unkempt shuttle
#

it sounds like you want a lazycell

#

this, actually

#

i got confused by the names lol they changed it

#

anyway this lets you store the data in a static after you parse it

#

and as such the string will be dropped automatically

#

once the lock is done evaluating

spark tiger
#

so uhh sorry how do i use it? basically i think i want something like that:

include_str!("my_json_file.json");
then deserialize it with serde_json
store the retrieved struct in a static variable or something
free the included str from the beginning

unkempt shuttle
#

you don't want to use include_str in this case i don't think

#

a regular file read will work fine

spark tiger
#

yeah that's what i thought too

unkempt shuttle
#

include_str embeds the bytes in the binary afaik so there's nothing to free

#

it's like. part of the executable

spark tiger
#

is there a simple way to make my json file always be next to the compiled PE when building? or only by creating build.rs?

fleet cedar
#

Shell script

#

Cargo does not give a damn about what happens to your exe after it's built

spark tiger
#

or like make / just?

fleet cedar
#

Yeah or something simpler like a shell script

spark tiger
#

im on windows fr

unkempt shuttle
fleet cedar
#

No, build.rs is completely irrelevant and does not help

unkempt shuttle
fleet cedar
#

It is for setting up the environment so that the package can be built

#

It has nothing to do with what happens after

unkempt shuttle
#

yes but you can also use it for not that

fleet cedar
#

Yeah and you can use a toaster for frying eggs

spark tiger
unkempt shuttle
#

i mean

spark tiger
#

is it actually a common practice to use makefiles with a cargo project?

unkempt shuttle
#

god no

#

i don't see why you can't use the build.rs to throw the json file into the cargo output dir

spark tiger
#

idk which of u to listen to isob

unkempt shuttle
#

hello i'm a senior software engineer nice to meet you

#

afaik you can get the cargo target dir in the build.rs

spark tiger
#

aight!

#

ngl that would be a great opportunity for me to try just wires

#

also what should i use to create executables for rust apps

#

for windows and other OS’s

ionic lake
#

cargo cross

unkempt shuttle
#

@spark tiger alright

#

so

#

you can use env!("OUT_DIR")

#

never mind i lied

#

you need to use std::env::var

#

okay there we go

#

OUT_DIR is where artifacts / binaries get placed

spark tiger
#

😭😭😭

unkempt shuttle
#

it's set during runtime

#

or you can use just

#

your choice

spark tiger
ionic lake
#

what do you mean installers

#

what are you making

unkempt shuttle
#

i would go for using build.rs because it's more convenient and integrated

unkempt shuttle
spark tiger
unkempt shuttle
#

you can just use a msi or write a shell script

spark tiger
ionic lake
#

you want something like cargo-dist

unkempt shuttle
#

see above

ionic lake
unkempt shuttle
#

why are you so concerned about the json file being in the binary

ionic lake
#

why do you want a json file next to the binary, or inlined in the binary, what are you making

unkempt shuttle
#

are you targeting a 256kb machine or something

spark tiger
unkempt shuttle
#

json file MUST be there
seemingly does not want json file to be embedded in binary
wants json file to be there alongside binary

spark tiger
unkempt shuttle
#

lol yeah

#

trust me

#

you can embed it

#

it'll be fine

#

you're not gonna get beaten up

#

if you want the json file to ever change, that's a different story

spark tiger
#

yeah but i was just worried that i will basically have two instances of the same data in the memory: one is plain json string and another is my own rust struct with same data

unkempt shuttle
#

so???

#

kilobytes

#

rust devs istg

fleet cedar
#

The string isn't even in ram

unkempt shuttle
#

(sorry)

#

yeah

fleet cedar
#

It's on disk, via virtual memory

#

And, it's also smaller than an ant

spark tiger
fleet cedar
#

Yes, mapped in virtual memory

unkempt shuttle
#

if you're worried about a single json file worth of data, well, i have BAD news for you regarding essentially all of the electron apps you have installed on your system right now trol

spark tiger
spark tiger
unkempt shuttle
#

right

#

so like

#

why worry

#

lol

#

if it was gigabytes in size i'd like. fix that

#

but it's not

spark tiger
#

idk!!! rust makes me very concerned about like memory optimization and stuff

unkempt shuttle
#

you have nothing to worry about

#

why?

#

the point of rust is that you don't have to worry about that

#

because it does it for you

#

asterisk

#

it makes you do it for you

spark tiger
#

but there are still like ownerships

unkempt shuttle
#

do you even know what an ownerships is

#

if you're looking out for every single byte, rust still memory leaks shrug

spark tiger
#

not really

ionic lake
#

you should inline the json using bincode to store it efficiently

spark tiger
#

i’m the worst rust developer

unkempt shuttle
#

it's okay

#

you're okay

#

you're going to get through this

#

you're going to include_str the json

#

and then parse it in a lazycell

#

and be happy and content with life

#

and not have to include the json alongside the binary

ionic lake
spark tiger
unkempt shuttle
#

yep

#

you can also use a lazylock/oncelock to have it in a static

#

which means it'll be globally accessible

#

((((((asterisk))))))

spark tiger
#

will it work like that tho

fn something() -> LazyCell<i32> {
  LazyCell::new(|| {
    println!("initializing");
    92
  })
}
println!("ready");
println!("{}", *something());
println!("{}", *something());
fleet cedar
#

That'll create a new LazyCell on each call

spark tiger
#

argh

unkempt shuttle
#

you want

#
static PARSED_JSON_THING = LazyLock::new(|| {
    // code to parse json goes here
});```
#

and then just

#

use it

spark tiger
#

oh yeah was gonna ask if i should use static then

unkempt shuttle
#

yop

ionic lake
#

something like

spark tiger
#

can i use static variables in global scope tho?

#

i mean outside any func

unkempt shuttle
#

yeah that's like

#

the point

spark tiger
#

aha

ionic lake
#
static RAW_JSON: &str = include_str!("./servers.json");

static SERVERS: Lazy<Vec<Server>> = Lazy::new(|| {
    serde_json::from_str(RAW_JSON).expect("Invalid JSON")
});

using once_cell

#

you could do i guess

spark tiger
#

should i do oncecell or lazycell thonk

unkempt shuttle
#

lazylock is in the stdlib and does the same thing

#

yeah

unkempt shuttle
#

lazylock

spark tiger
#

i thought u said lazycell at first

unkempt shuttle
#

it's okay i'm tired

ionic lake
#

sorry im been old

spark tiger
#

oh

This type is a thread-safe LazyCell, and can be used in statics. Since initialization may be called from multiple threads, any dereferencing call will block the calling thread if another initialization routine is currently running.

unkempt shuttle
#

yop

spark tiger
#

alright lets try

unkempt shuttle
#

good luck

spark tiger
#

thanks and thanks for the help yall i apprciate it a lot

unkempt shuttle
#

of course

spark tiger
#

why do i have so much shit on my taskbar jesus christ

#

macos ahh taskbar

hoary sluice
spark tiger
hoary sluice
#

thats not a reason

unkempt shuttle
#

get your hot arch user friend to do it for you

#

that's what i did

spark tiger
#

i dont have any linux user friends irl wires

#

wait actually i have one

#

but

#

uh

#

he used kali as his first linux os

#

im not sure i can trust him isob

hoary sluice
#

kali is just debian with preinstalled cybersecurity tools

spark tiger
#

yeah but why would anyone purposely install it as their main os

#

like

#

why

ionic lake
#

showoff

unkempt shuttle
#

why would anyone purposely install [windows] as their main os

shrewd canopy
spark tiger
unkempt shuttle
#

LOL

#

paid for windows

#

laugh at this user

hoary sluice
spark tiger
#

i also (used to) pay for adobe

unkempt shuttle
#

scrub trol

spark tiger
#

i just dont wanna break any laws!

unkempt shuttle
#

it never happened if you never get caught

spark tiger
#

also like i recently saw how cheap adobe creative cloud and photoshop was here before adobe left and like jesus fucking christ it was SO CHEAP

#

i swear to god i'd be paying for it

unkempt shuttle
#

"cheap"

spark tiger
#

lemme find the screenshots

unkempt shuttle
#

well, if you're ever looking for someone to give your adobe money to instead of adobe

#

my wallet's open

spark tiger
#

$9 a month

hoary sluice
#

oh before they left russia

spark tiger
#

yop

unkempt shuttle
#

give me 9 dolar

#

a month

spark tiger
unkempt shuttle
#

wooow

spark tiger
#

big ass error

#

wtf is this comment on rust's docs lmfao isob

spark tiger
#

oh nevermind

fleet cedar
#

Yep, statics can only exist outside of impls

#

Mostly because it's unclear how it would interact with generic types I think

spark tiger
#

that should work i guess

ionic lake
#

if you care you can also optimize that further but idt you should lmao

spark tiger
#

trynna use it like that but it keeps saying rust-analyzer: no such field

spark tiger
ionic lake
#

show full code?

spark tiger
#

it's a bit long but uh sure

valid jetty
spark tiger
#

no SERVERS is in global scope

#

im trynna like have a reference to it or something

valid jetty
#

yeah but you’re trying to put it in the struct lmao

#

if you just do SERVERS it tries to do SERVERS: SERVERS

ionic lake
#

yeah right no im being a dumbass rn and no its like your constructor(x,y,z)

spark tiger
#

servers: SERVERS works now ty

valid jetty
#

what did you think it did 😭

#

😭😭😭😭😭😭😭😭

spark tiger
#

i mean i could use username and password without explicitly writing the field name so

valid jetty
#

yea but this is more like behavior from js not C in terms of how it infers what field to put

spark tiger
#

it keeps importing SERVER from reqwest lmfao

valid jetty
#

requwuest UwU

spark tiger
#

do i convert this one into LazyLock<PiaResponse> or make it a reference (or a pointer?) and then handle the lifetimes?

#

duh rustc: cannot move out of static item SERVERSmove occurs becauseSERVERShas typeLazyLock<PiaResponse>, which does not implement the Copy trait

#

fuck am i even doing

royal nymph
#

for compile time json parsing

spark tiger
#

true

royal nymph
#

🐮

fleet cedar
#

If you want to support both static and runtime values without lifetime hassles

spark tiger
fleet cedar
#

That doesn't allow values defined at runtime

spark tiger
#

i mean it wont change anyways or wdym

fleet cedar
#

In other words, pointless to have the field at all, just use the static directly

spark tiger
#

being able to do pia_instance.servers sounds more convenient than doing like use pia::SERVERS

fleet cedar
#

SERVERS is more convenient than self.servers

spark tiger
#

alright then

hoary sluice
#

@valid jetty is this blobcatcozy or husk

hoary sluice
deep mulch
#

@hoary sluice

hoary sluice
#

ZOoter

deep mulch
#

🦅ly

hoary sluice
fleet cedar
#

Prompts should be beautiful

hoary sluice
#

i stole someones starship config

#

(it wasnt theirs)

deep mulch
#

@hoary sluice is a goose farmer

hoary sluice
#

i have previously considered becoming a shrimp farmer

#

but it is not economically sustainable

spark tiger
hoary sluice
#

floppa breeding however

hoary sluice
#

thing at the bottom is lualine

spark tiger
hoary sluice
#

@deep mulch i cant work ~an hour before sunset because the sun goes through the holes in my blinds

valid jetty
#

this reminds me of those bugs in windows where it only crashes on tuesdays at 14:38 if you have notepad open with the text "foo" inside

hoary sluice
deep mulch
#

hus

spark tiger
#

i wake up at sunrise

hoary sluice
#

sunrise is not at 1:32 am

#

no way

spark tiger
hoary sluice
#

do you live in yakutia

deep mulch
#

insanen

hoary sluice
#

or a place with very wrong timezones

spark tiger
spark tiger
hoary sluice
#

kazan prob has smth like this

deep mulch
#

@hoary sluice will explode on August 15th, 2084

hoary sluice
spark tiger
#

the sunset is at 9pm

hoary sluice
#

yea thats normal

spark tiger
#

the sunrise is normal as well fr

hoary sluice
#

at 1 am??

#

is that dawn or sunrise

#

we have dawn at 2:30am and sunrise at 5am

spark tiger
#

sunrise

hoary sluice
#

so you have dawn the day before?

spark tiger
#

uhh idk

hoary sluice
#

where are you

spark tiger
#

🤫

hoary sluice
#

what oblast

#

or general area

spark tiger
#

north.

hoary sluice
#

oh yea the sun is messy far north

#

right

#

murmansk has sun up all day lol

spark tiger
#

hell

hoary sluice
#

and probably no sun all day outside of summer

deep mulch
#

@valid jetty i passed my radio license exam

#

@valid jetty

hoary sluice
#

ur what

deep mulch
#

ham radio license

valid jetty
#

can you finally play country music in the car or something

deep mulch
#

rosie dum

#

@valid jetty

spark tiger
#

wtf is radio license

#

like just use it

#

or something

deep mulch
#

illegal to transmit

#

without

hoary sluice
#

🇺🇸

deep mulch
#

nop

#

FCC

hoary sluice
#

how are they gonna know

deep mulch
#

direction finding

hoary sluice
#

they cant teleport

royal nymph
#

ZT RADIO

#

WHERE CAN I LISTEN @deep mulch

deep mulch
#

i cant tell

#

id have to dox myself

royal nymph
#

do you also need a radio license for making an online radio / podcast

#

or only actual radio

hoary sluice
#

how do they know if u have a license or not

spark tiger
deep mulch
#

actual radio

deep mulch
royal nymph
#

so if u just make internet radio it doesn't matter

hoary sluice
royal nymph
#

what's zt radio frequency

deep mulch
#

HF

hoary sluice
#

ah yes high frequency, my favorite frequency

deep mulch
#

HF is 3-30 MHz

spark tiger
#

mf saying like that was him isob

ionic lake
#

the entire of youtube is like this, flashy clickbait

supple whale
#

hate the guy

#

once in a blue moon he'll say smth smart

#

but its rare

hoary sluice
#

love the guy

#

he uses an advantage 360 and nvim

#

@valid jetty any time i look at elle src its like those enterprise java programs

fleet cedar
#

That's not a very nice thing to say

hoary sluice
#

you have multiple structs for expressions and im trying to see how you return them as one type in the parser and your parser does a bunch of random stuff and the word expression isnt even used in the parser

lavish frigate
#

whens the ellec rewrite to elle

fleet cedar
#

Wednesday

#

Yeah that parsing is wack

#
                let tokens = self.yield_tokens_with_delimiters(&[TokenKind::LeftCurlyBrace]);
                let elif_condition = Statement::new(tokens, 0, self.body, self.shared).parse().0;
```![husk](https://cdn.discordapp.com/emojis/1026532993923293184.webp?size=128 "husk")
valid jetty
valid jetty
fleet cedar
#

Untyped asts are terrible though

valid jetty
#

it hasnt been refactored basically at all ever since i first wrote it

#

its just hacks on top of hacks

fleet cedar
#

You will fix immediately

#

Preferably before the end of the month

valid jetty
#

the parser is huge and complicated

#

rewriting it is gonna be a big process

#

ill need to do it incrementally

fleet cedar
#

Rewrite it to not be huge and complicated, then

valid jetty
#

the language is complicated lol

fleet cedar
#

Not syntactically, from what I've seen

valid jetty
#

the syntax can get ambiguous to parse at times

fleet cedar
#

Like what?

valid jetty
#

like for example, you have a unary expression, which needs to yield tokens until it sees some "stopping point" (things like end of stream, arithmetic tokens, etc)

~???

that expression may be a function call

~foo()

that function call may be wrapped and have an extra arithmetic operation applied to it

~(foo() + 1)

arithmetic tokens are one of the "stopping points", so suddenly you have to keep track of parenthesis nesting and not count it as a stopping point if nesting > 0

that function may be generic and have explicit generics passed in

~(foo<i32>() + 1)

again, arithmetic tokens are one of the "stopping points", which means that, because < and > are arithmetic tokens, you need to keep track of generic nesting. how do you do that, you need to lookahead after the < and see if the next token is a type

ok, what if the type is more complex??

~(foo<(i32, i32)>() + 1)

now you have to lookahead skipping certain tokens until you can ensure with certainty whether the < is used in an arithmetic or generic context and treat it differently accordingly

it quickly gets complicated, at least with the current way the parser is setup considering its handrolled

fleet cedar
#

Ah, the Bastion

valid jetty
#

wha

valid jetty
#

what is this 😭

fleet cedar
#

An example of why <> generics are inherently ambiguous

valid jetty
#

wait is that how rust deals with it

#

put :: before generics

#

lmao

#

i never thought about that

#

unfortunately not quite solves all the problems because of array literal shorthands

fleet cedar
#

If you do generics with <>, there is no way to resolve the ambiguity in foo(a<b,c>(d))

valid jetty
#
!([Foo<i32>;]);
fleet cedar
#

Unless you do like c++ which knows at parse (or even lex? Not sure) time which identifiers are defined, so it knows that a is a template

valid jetty
#

i dont do that i only do that for struct and enum defs

fleet cedar
#

But that leads to a very nasty chimaera of type checking and parsing

valid jetty
#

yeah

#

i was thinking that allowing for T x = y syntax is also inherently ambiguous unless you do heavy lookahead

fleet cedar
#

It's very hard to do assignments unambiguously

valid jetty
#

because ```rs
fn(i32) -> i32

and ```rs
fn(i32 x) x * 2;
``` is a valid lambda

it can be ambiguous when you do ```rs
fn(i32) -> i32 x = fn(x) x * 2;
``` unless you lookahead far enough to see "oh, this has args, it must be a lambda def and not a lambda type"
fleet cedar
#

In rust sin(x) and sin(x) = 0.5; are both valid but mean very different things

valid jetty
#

let x: ??? is unambiguous because you know 100% that youre parsing a type after the :

fleet cedar
#

I don't know how rustc deals with that ngl

fleet cedar
#

Unwrapping a newtype struct

valid jetty
#

isnt that specifically required to have let before it

fleet cedar
#

Wait no since there's a float in the rhs that's not valid

valid jetty
#

well

#

thats a thing for the analyzer to check

fleet cedar
#

/run ```rs
struct sin(f32);
let x;
sin(x) = sin(0.5);

rugged berryBOT
#

@fleet cedar I received rs(1.68.2) compile errors

warning: type `​sin`​ should have an upper camel case name
 --> file0.code:2:8
  |
2 | struct sin(f32);
  |        ^^^ help: convert the identifier to upper camel case (notice the capitalization): `​Sin`​
  |
  = note: `​#[warn(non_camel_case_types)]`​ on by default

warning: variable `​x`​ is assigned to, but never used
 --> file0.code:4:5
  |
4 | let x;
  |     ^
  |
  = note: consider using `​_x`​ instead
  = note: `​#[warn(unused_variables)]`​ on by default

warning: value assigned to `​x`​ is never read
 --> file0.code:6:5
  |
6 | sin(x) = sin(0.5);
  |     ^
  |
  = help: maybe it is overwritten before being read?
  = note: `​#[warn(unused_assignments)]`​ on by default

warning: 3 warnings emitted

valid jetty
#

wtf

#

why can you do that

#

that code is so cursed holy shit

fleet cedar
#

Useful for fib and stuff ```rs
for x in 0..n {
(prev, cur) = (cur, prev + cur);
}

valid jetty
#

i think parsing tuple destructuring and tuple creation is also ambiguous

#

for now thats not a problem

#

because for me theyre different

#
x, y := $(z, w);
#

but that sounds like a pain to parse correctly

#

on that note

#

how does rust differentiate expressions and patterns in cases where either can fit

#

@hoary sluice wake up new sebastian lague video dropped

fleet cedar
#

Perhaps parses both the same and disambiguates later

hoary sluice
#

where

valid jetty
#

the name is uhhh

#

not ideal

fleet cedar
#

Wow your statement.rs is bigger than my whole lexer+parser+printer

valid jetty
#

but whatever

hoary sluice
hoary sluice
valid jetty
#

why is it not rendering

pearl stagBOT
valid jetty
#

that

hoary sluice
#

ty

valid jetty
#

that is the root statement being compiled, any then the inner ones may each call compile themselves

#

compile itself doesnt really exist its a proc macro

fleet cedar
#

At the very least, you'll almost always at least want separate stmt and expr types

valid jetty
#

yeah i know

#

technically speaking, every node is considered a "Statement" semantically (by name) though that means nothing because some of those nodes return None and some return Some((ty, val))

#

depending on if its actually an expression or statement

fleet cedar
#

In other words, not all nodes are expressions

valid jetty
#

yes

#

because all expressions are statements but not all statements are expressions

#

so everything falls into the umbrella term "Statement" and then can potentially return a value

#

which isnt really how statements work but whatever

fleet cedar
#

I don't know about elle specifically, but in most languages that is not true, at least

#

foo() is an expression, foo(); is a statement

valid jetty
#

i mean yeah i guess you can look at it that way

#

the program

fn main() {
    1;
}
``` would have a single node which is a literal, that is a statement but it still yields a (ty, val)
fleet cedar
#

Expressions can be embedded in statements, including as standalone, but statements (usually) cannot be embedded in expressions

valid jetty
#

terminology is.. not great here

fleet cedar
#

Some languages do allow it with clever use of {} though

valid jetty
hoary sluice
valid jetty
hoary sluice
#

i was gonna only have expr at first but what does x + (foo = bar) mean

valid jetty
#

no need for parenthesis because you can use blocks to split things

hoary sluice
#

or better yet x + (foo :: int int)

valid jetty
#

thats what it would do in elle

hoary sluice
#

x + (foo a b = a + b)

#

whats this

valid jetty
#

a type conversion error

#

oh i see

fleet cedar
#

Declarations are the single thing in rust that are not expressions

valid jetty
#

well thats a problem with how you parse functions

hoary sluice
#

tried to cast FunctionDeclaration to Int?

valid jetty
#

yeah

hoary sluice
fleet cedar
#

Only language I can think of without stmt/expr distinction is lisp

#

And that one's... yeah

valid jetty
valid jetty
fleet cedar
#

Well fix that then

valid jetty
#

yeah, once i rewrite the parser

#

the current one has worked well enough that i havent found a need to yet but as its gonna take a while ill probably do it during the summer holiday

#

wait fuck im supposed to be studying in that time

hoary sluice
valid jetty
#

uhhhhhh idk when ill do it

valid jetty
fleet cedar
#

/run ```lisp
(1 + (defun foo (a b) (+ a b)))

rugged berryBOT
#

@fleet cedar I only received lisp(2.1.2) error output


; file: /piston/jobs/71d5274c-5aaf-4dab-8a07-919e01f5292a/file0.code
; in: 1 +
;     (1 + (DEFUN FOO (A B) (+ A B)))
; 
; caught ERROR:
;   illegal function call
; 
; compilation unit finished
;   caught 1 ERROR condition
Unhandled SB-INT:COMPILED-PROGRAM-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                     {1001558103}>:
  Execution of a form compiled with errors.
Form:
  (1 + (DEFUN FOO (A B) (+ A B)))
Compile-time error:
  illegal function call

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1001558103}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-INT:COMPILED-PROGRAM-ERROR {100158F6B3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SB-INT:COMPILED-PROGRAM-ERROR {100158F6B3}>)
2: (INVOKE-DEBUGGER #<SB-INT:COMPILED-PROGRAM-ERROR {100158F6B3}>)
3: (ERROR SB-INT:COMPILED-PROGRAM-ERROR :MESSAGE "illegal function call" :SOURCE "(1 + (DEFUN FOO (A B) (+ A B)))")
fleet cedar
#

Well there you have it

hoary sluice
#

where does it ever make sense for declarations to be expressions

fleet cedar
#

/run ```lisp
(+ 1 (defun foo (a b) (+ a b)))

rugged berryBOT
#

@fleet cedar I only received lisp(2.1.2) error output

Unhandled TYPE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                  {1001558103}>:
  The value
    FOO
  is not of type
    NUMBER
  when binding SB-KERNEL::Y

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1001558103}>
0: (SB-KERNEL:TWO-ARG-+ 1 FOO) [external]
1: (+ 1 FOO)
2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (+ 1 (DEFUN FOO (A B) (+ A B))) #<NULL-LEXENV>)
3: (EVAL-TLF (+ 1 (DEFUN FOO (A B) (+ A B))) 0 NIL)
4: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (+ 1 (DEFUN FOO (A B) (+ A B))) 0)
5: ((LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) (+ 1 (DEFUN FOO (A B) (+ A B))) :CURRENT-INDEX 0)
6: (SB-C::%DO-FORMS-FROM-INFO #<FUNCTION (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) {10008A746B}> #<SB-C::SOURCE-INFO {10008A7433}> SB-C::INPUT-ERROR-IN-LOAD)
hoary sluice
#

right

#

lisp syntax

valid jetty
#

what the fuck

spark tiger
#

@fleet cedar I only received lisp(2.1.2) error output

valid jetty
#

what is wrong with js seriously

#

does strict mode catch this

hoary sluice
valid jetty
#

since when

hoary sluice
#

you use ts

#

that counts

valid jetty
#

not very often (and ts would catch this)

#

@lucid trail btw is your goal to make a full compiled language or?

ionic lake
#

i should make a programming language

fleet cedar
#

You should make a progaming language

deep mulch
#

@valid jetty hiii

spark tiger
#

i should make a game console emulator

#

that runs in a terminal

ionic lake
lucid trail
woven mesa
#

are you only trying to get the top level stuff at root then

hoary sluice
#

@valid jetty husk format!("Unsupported operator: {:?}", self.node.operator.node.kind),

#

self.node.operator.node.kind

#

nested Located

woven mesa
#

why not just get items at directory then

#

you can do top level with enumerator but no point if you’re already doing the work on bg thread to then show it at once

#

i would use swift async for this

lucid trail
woven mesa
#

make a mainactor task that awaits value of a detached background task which does the filesystem work and returns rhe result

#

then use that in your ui

#

before awaiting the bg task maybe show a loading spinner

#

im on mobile but i can write example code if you want

solemn ravine
#

test

woven mesa
#

i cant remember how to use enumerator to read top level files and dirs bc ive only ever used it once in meret

solemn ravine
#

creating a directory with like 10k files in it

woven mesa
#

you’ll have to find out how to use it yourself

#

sorry oomf

#

no you have to do a thing at each iteration to not dive into a child

#

@young flicker @solemn ravine

solemn ravine
#

cute

#

@young flicker half my codebases are convenience extensions </3

woven mesa
#

my nose and eyes hurt

#

i didnt sleep last night bc of it

woven mesa
#

🥺

#

do i win bc i have more

#

or do i lose bc thheres too many

#

@young flicker

#

would you believe me if i said it ran like shit

#

well it did

#

@young flicker

//
//  View+AppPersistence.swift
//  Meret
//
//  Created by Lakhan Lothiyi on 20/03/2025.
//

import SwiftUI

public extension View {
    /// Add this to the root of your app or something so it can receive preference changes from persist modifier.
    func persistenceHandler() -> some View {
        self.modifier(AppPersistenceHostViewModifier())
    }
}

struct AppPersistenceHostViewModifier: ViewModifier {
    func body(content: Content) -> some View {
        content
            .onPreferenceChange(AppPersistenceHostKey.self) { newValue in
                UIApplication.shared.isIdleTimerDisabled = newValue
            }
    }
}
struct AppPersistenceHostKey: PreferenceKey {
    static var defaultValue: Bool = false
    
    static func reduce(value: inout Bool, nextValue: () -> Bool) {
        value = value || nextValue() // combines all values, if any are true, return true else return false
    }
}

public extension View {
    /// Prevents the device from going to sleep while this view is on screen, or the value is made false.
    /// All views with this modifer set to true will cause the device to not sleep. They need to all be removed to allow sleep.
    /// - Parameter value: Whether to prevent sleep
    func persist(_ value: Bool = true) -> some View {
        self
            .preference(key: AppPersistenceHostKey.self, value: value)
    }
}
#

somehow not a swiftui feature

woven mesa
#

i use it in ipod when the lyrics ui is open

#

i mean meret

solemn ravine
#

UIApplication.shared.isIdleTimerDisabled = true

#

what the korn

woven mesa
#

though its fine for console app bc it will always be open

#

in my case meret should only keep phone awake when lyrics ui is open

#

instead of using on appear and on disappear, my modifier ensures the phone is only kept awake if the view exists and is guaranteed this way

solemn ravine
woven mesa
#

what did i do

hoary sluice
#

@valid jetty remember when i tried changing my email from my school email to my personal email on all my repos

#

i did that and it unsigned all my commits

#

so i tried signing them with rebase

hoary sluice
#

and thats the only repo i ran it on (other than another private, irrelevant one) which i didnt have saved locally

#

cause i just update it from github

#

not locally

valid jetty
#

is icypeas updated already

hoary sluice
#

nah

#

idk how to sign all previous commits without changing their date

#

like there is a way but its scary

#

id rather just not sign

valid jetty
#

solution: 怖くないよ

hoary sluice
#

uhm so this is just a lie

#

lol

#

infinite contributions glitch

#

i had like 200 before all these shenanigans

#

allegedly github has a gc that wipes orphned commits from the contribution graph so its prob gonna get fixed soon

#

i found one

#

git rebase --root --gpg-sign --committer-date-is-author-date

spark tiger
#

what do i use here? to_string? to_owned? another one?

#

also uh does it look fine

#

also im trynna make it so that if token somehow does not exist - it returns an Err

lucid trail
spark tiger
#

that's anyhow's Result

lucid trail
#

oh cool

spark tiger
#

yop

hoary sluice
#

@valid jetty i did it

#

and i dont think anything is too broken

#

all my commits are now signed and use my correct email

lucid trail
#

Does the github graph reflect it accurately?

hoary sluice
#

nope

lucid trail
#

or is it doubled

hoary sluice
#

its like 10x

#

im pretty sure that orphaned commits get garbage collected tho

#

cause i amend a lot and i cant find one where its duplicated because of an amend

#

or an undone commit

#

so im guessing github garbage collects this like once a week or smth

spark tiger
#

how do i fuckin get rid of Option i keep forgetting

#

idk why but it says rustc: unreachable call

hoary sluice
#

@valid jetty when vibe coding elle

lucid trail
hoary sluice
lucid trail
spark tiger
#

ight but lets forget about anyhow

#

just how do i do it

hoary sluice
#

does anyhow do anything besides adding context and bail!

spark tiger
#

idk i just use it cuz errors are annoying in rust

lucid trail
#

I probably wont be adding generics for a year but if i ever do Ill make the syntax foo[T]

valid jetty
#

good idea

fleet cedar
#

bail!(...) is return Err(anyhow!(...))

valid jetty
#

isnt return a statement???????

fleet cedar
#

Return is an expression of type !

valid jetty
#

oh ok that makes sense actually

#

i was literally planning to do the same thing for my thing

#

insane

lucid trail
#

I'm thinking of using generational_arena for my AST nodes but having it all untyped is wack

#

I don't think this is very sane

fleet cedar
#

Yeah that does not look like a particularly meaningful enum

lucid trail
#

should probably go use typed arena instead

fleet cedar
#

Bumpalo is a popular choice

valid jetty
#

keep in mind that struct variants in sum types cannot be collected into a struct, you must destructure it

lucid trail
#

yeah that has been a bit annoying already

fleet cedar
lucid trail
#

maybe i should just do arena and not enforce type safety at that level

jade stone
#

what the fuck is this

//  
// Usage: SetThreadName ((DWORD)-1, "MainThread");  
//  
#include <windows.h>  
const DWORD MS_VC_EXCEPTION = 0x406D1388;  
#pragma pack(push,8)  
typedef struct tagTHREADNAME_INFO  
{  
    DWORD dwType; // Must be 0x1000.  
    LPCSTR szName; // Pointer to name (in user addr space).  
    DWORD dwThreadID; // Thread ID (-1=caller thread).  
    DWORD dwFlags; // Reserved for future use, must be zero.  
 } THREADNAME_INFO;  
#pragma pack(pop)  
void SetThreadName(DWORD dwThreadID, const char* threadName) {  
    THREADNAME_INFO info;  
    info.dwType = 0x1000;  
    info.szName = threadName;  
    info.dwThreadID = dwThreadID;  
    info.dwFlags = 0;  
#pragma warning(push)  
#pragma warning(disable: 6320 6322)  
    __try{  
        RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*)&info);  
    }  
    __except (EXCEPTION_EXECUTE_HANDLER){  
    }  
#pragma warning(pop)  
}
#

why do i need to raise an exception to set the thread name

pulsar elk
lucid trail
#

Hey that's pretty cool

lucid trail
#

error recovery is somewhat difficult

fleet cedar
#

My favorite strategy for error recovery is to pair delimiters during lexing

#

Admittedly gives poor recovery if said delimiters are mismatched, but once that's done, simple schemes like skipping to the end of the delim work surprisingly well

hoary sluice
#

@valid jetty there is no programming language called icy other than a 4-commit project on github with only a lexer

#

should i name it icy

winged mantle
#

tbh doing a loop for promise retry is pretty annoying

#

i can't really think of a better way

spark tiger
spark tiger
fleet cedar
#

Yes

#

The unwrap_or can never happen since it's after a return

spark tiger
#

so how do i fix it thonk

fleet cedar
#

Probably want .ok_or_else(|| anyhow!("invalid json response"))?

#

Or equivalently, .context("invalid json response")?

spark tiger
#

arghhhhh

#

ok that worked lol

#

is it cursed or not

#

yay that works

fleet cedar
#

Consider defining a struct for the response though

spark tiger
fleet cedar
#

That makes a very simple struct then

spark tiger
#

hm, alright

#

there we go

#

should be all good now i believe

hoary sluice
#

@valid jetty is this horror

#

i tried making an Evaluate trait and splitting Expression into multiple structs but it got too complicated and i gave up

fleet cedar
#

What's with all the evaluate_binary_plus et al?

hoary sluice
#

so clippy doesnt whine

fleet cedar
#

That looks like it could be written with less boilerplate

hoary sluice
#

ik

#
trait Evaluate {
  fn evaluate(env: Env) -> Result<Value>;
}

struct UnaryExpression {
  operator: Located<Token>,
  expression: Located<Box<dyn Evaluate>>,
}

impl Evaluate for UnaryExpresson {
...
}
#

like this?

#

this is the cleanest way i can think of

fleet cedar
#

Or just match (node.kind, self.force_eval(left)?, self.force_eval(right)?) { ... }

#

&& and || wouldn't work with that but doesn't look like you have those there anyway

lucid trail
hoary sluice
#

im talking about all expressions not just binary

lavish frigate
#

yall made me want to make my own language but instead of a general programming language ill make a shell

valid jetty
#

lmao fair enough

hoary sluice
#

i made 3 alts and lost everything on coinflips

#

make that 4

valid jetty
#

internal server error

hoary sluice
#

like this?

#

itd look so much better like this but glob imports are the devil apparently

fleet cedar
#

Glob imports are fine if you use them sparingly

#

Using them just before a match is fine

#

The two issues with glob imports are that they make it a little harder to tell what's in scope (not an issue if it's in a small scope), and that if you remove or rename a unit variant, then EqualEqual can suddenly become a match-all pattern instead (but you get naming and unreachable pattern warnings in that case)

hoary sluice
#

and tbh this is already very short and maintainable

fleet cedar
#

A good compromise is use TokenKind as T;

hoary sluice
#

i dont like that

#

maybe use TokenKind as Kind

#

ill just leave it

#

its fine

fleet cedar
#

I'm on mobile so I can't see the code in question

hoary sluice
#

heres a snippet

#

some are longer

fleet cedar
#

A bit ugly that some of the arms have {} but others don't, but otherwise looks fine

hoary sluice
#

if i make it put {} everywhere then other match statements will be ugly

#

i dont like how it doesnt put {} around l.checked_operation

fleet cedar
#

I'd probably glob import Value::* there

hoary sluice
#

i dont like it

#

less clear about what exactly Integer(l) means

fleet cedar
#

Fair enough

royal nymph
#

@valid jetty idea for elle

#

allow ? and ! as suffix for method names

#
- if rosie.isGay()
+ if rosie.gay?()
``` (you can also omit the parentheses) 

```rb
array.sort()  # copy
array.sort!() # in place
#

ruby / crystal do that

#

so good

fleet cedar
#

That's a lisp thing

spark tiger
#

i should learn crystal

#

it seems fun

valid jetty
#

i wanted to make the ? and ! operators be:

x := y?;
if y.is_none() {
    return y;
}
x := y.unwrap();

and

x := y!;
x := y.unwrap();
``` respectively
hoary sluice
fleet cedar
#

Ah, the toy code operator

hoary sluice
#
usa.good??() # false
valid jetty
fleet cedar
#

usagi.good??() # true 🐇

deep mulch
#

@valid jetty hiii

valid jetty
#

you can do !! or ?? if there is a double option chain

#

Option<Option<T>>

hoary sluice
#

true

valid jetty
#

or a combination of them

deep mulch
#

@valid jetty add elvis operator

valid jetty
#

i have it??

deep mulch
#

oh

hoary sluice
#

reverse elvis

#

:?

fleet cedar
#

Add some other famous musician operators too

valid jetty
#

it exists you can do x ?: y and it is the same as x ? x : y

deep mulch
#

the rosie operator

hoary sluice
#
beatles.good_music:?() # false
hoary sluice
valid jetty
#

what would the rosie operator do

hoary sluice
#

foo.bar 💔 🥀 ()

fleet cedar
#

Be very cute

deep mulch
#

yop

hoary sluice
#

foo.bar 🚡 () is also ok

deep mulch
#

yop

royal nymph
spark tiger
#

ight can’t really find anything either. is it like something on language-level or just like a way to name things

royal nymph
#

it's just naming convention

#

? is for "questions" (booleans) and optional stuff
! is for destructive actions

lavish frigate
#

was this not stabilized

royal nymph
#
"hi"[2]   # => IndexError
"hi"[2]?  # => nil
#

so peak

deep mulch
#

@royal nymph sleep

valid jetty
deep mulch
#

its naptime

valid jetty
#
#![feature(let_chains)]
#![feature(if_let_guard)]
royal nymph
#

/run ```cr
print "hi".blank?
print "hi".byte_at? 3
print "hi".byte_at 3

rugged berryBOT
#

Here is your cr(0.36.1) output @royal nymph

Unhandled exception: Index out of bounds (IndexError)
  from /piston/packages/crystal/0.36.1/share/crystal/src/string.cr:1203:8 in 'byte_at'
  from file0.code:3:1 in '__crystal_main'
  from /piston/packages/crystal/0.36.1/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code'
  from /piston/packages/crystal/0.36.1/share/crystal/src/crystal/main.cr:96:7 in 'main'
  from /piston/packages/crystal/0.36.1/share/crystal/src/crystal/main.cr:119:3 in 'main'
  from __libc_start_main
  from _start
  from ???
false```
valid jetty
lavish frigate
royal nymph
#

/run ```cr
puts "hi".blank?
puts "hi".byte_at? 3
puts "hi".byte_at 3 rescue print "byte_at exploded"

spark tiger
rugged berryBOT
#

Here is your cr(0.36.1) output @royal nymph

false

byte_at exploded```
deep mulch
#

rosiinga

spark tiger
#

cuz like crystal seems like an interesting simple language

#

sounds like a python alternative to me blobcatcozy

royal nymph
#

you can use crystal for whatever you want