#🪅-progaming

1 messages · Page 116 of 1

ivory heath
#

Well this is why you have to read docs

#

But they’re often really bad

winged mantle
#

it's almost like people who create libraries don't use their own libraries

ivory heath
#

Yep

winged mantle
#

honestly sensible libraries should never allocate anything by default

#

allocation should be the exception, not the rule, and made very clear

#

if create or new or alloc isn't in the name and a function calls malloc/calloc that seems like pretty bad api design

#

i suppose there are some bad apis out there so it's nice to be reassureed

fleet cedar
#

The c language does not. C programming does.

supple whale
#

jesus i cant imagine not using an ultrawide for coding

#

moved vscode to my 16:9 display and that happened

#

XD

lavish cloud
#

wtaf

crude star
#

you have a problem

valid jetty
#

if you do that it's fine

supple whale
#

you know how fucking hard its to find them when u do that?

crude star
#

ngmi

valid jetty
#

which means i can horizontally scroll with a gesture

#

so it is perfectly fine

supple whale
#

sure

#

but you still waste 5 minutes looking for said tabs

#

i never said it doesnt work

#

implementing scrolling is piss

#

but finding 1 tab out of 50 is impossible with scrolling

valid jetty
#

??? i just know where my code is

supple whale
#

just for u to need to scroll back cuz u need to switch back

valid jetty
#

and then open it from the sidebar

supple whale
#

LMAO

#

i wish i could use the sidebar

#

i'd zoom out, but even on max zoom-out the sidebar doesnt fit 10% of my project

#

look how tiny the scroll bar is

spice token
supple whale
#

ex: here u can see 90%

spark tiger
spice token
supple whale
#

since the scroll bar is ~130px out of ~1.3k

supple whale
spice token
supple whale
#

i dont have an editor config, i dont have prettier, i dont have llm configs

#

this is as minimal as it gets for what i need

#

i need 3 tsconfigs, because one is for web stuff, and one is for nodejs local config stuff, and i dont want my nodejs config polluting my web config, because otherwise i'd get node globals like process, and node imports like fs, inside the web part of the project

#

so you need the root compound config for TS server to work

#

and 2 separate configs one for web and one for node, so your tooling can use that specific config, for example sveltekit uses the .web. config

spark tiger
supple whale
#

yeah

#

but wtf am i to do

#

i need the tailwind config, i need the vite config, ci need the svelte config, tailwind requires postcss, i need eslint it even does what prettier does, components.json is needed for shadcn

#

and the introspection shit i could move to a diff folder i guess

#

but thats for the graphQL api's i'm running

supple whale
#

you could easily add 10 more configs here

spark tiger
#

yeah sure i’m not saying you should get rid of all them but i’m just always amazed by how many different tools configs and other shit a single web project can have

supple whale
#

trust me when i say this is still very minimal

#

for a full blown project that is

#

the amt of shit these configs do is insane, and they are so joined together its unfunny

#

even my eslint config imports the svelte config and the tsconfig

#

and the tsconfig imports the graphql schema, which is generated by the introspection

#

so i can have static type analysis on inline gql queries

#

so then my eslint config can throw errors when my gql queries are invalid, or when i access fields in the query responses that arent actually queried

#

....okay maybe not so minimal

supple whale
#

@spark tiger did i mention, this is like one of 6 repositories?

winged mantle
#

c++ swap kind of feels more intuitive than move?

#

but the lack of = default and = delete is killing me

fleet cedar
#

Move is indeed often implemented as swapping with a default

valid jetty
#

who the hell makes an issue with just fucking code

#

???????????????????????????????????????????

jade stone
#

how can i do something like this in rust

crude star
jade stone
tired vigil
# jade stone

Have ParsedProgram take ownership of them, or box them ig

fleet cedar
jade stone
tired vigil
# jade stone it does

Hmm could it be that you're referencing &allocator in Parser::new, but rust can't tell if res.program contains a reference to that allocator? Idk tbh 😭

#

Program does have a lifetime so maybe it does

jade stone
tired vigil
#

Maybe u need to explicitly specify the lifetime in the function return type and possibly some of the variable types

jade stone
#

the whole point of Rc is to not worry about lifetimes

tired vigil
#

I meant ParsedProgram<'a>, and maybe the local Program<'a>

tired vigil
# jade stone

Or store source_text in ur struct too, since ig it requires a reference

supple whale
#

@royal nymph wanna see something turbo, mega giga fucking cursed?

#

obtaining undici's agent constructor, without importing the 2MB library into your code, but instead using the nodeJS built-in

#

this is up there with some of the most tarded shit i've done for peformance

#

fucking works

#

XDDDDDDDDD

stark timber
#

what is that extension

supple whale
#

its vscode

#

lol

stark timber
#

I don't get that

supple whale
#

like because you never once opened the settings menu in vscode

stark timber
#

is it the inlay hints?

supple whale
tired vigil
supple whale
#

yes

#

thats because vscode has 10000 options

#

do you want an AI agent in there to help you search?

#

like what do you expect?

#

XD

#

you cant magically un-setting the settings

#

it has groups and categories

#

search and filter

#

u cant rly ask for much more than that

stark timber
#

I have opened the settings menu before I just didn't know that existed as an option!

#

didn't mean to make u angry or anything

supple whale
#

its been there for a solid few years ngl

#

actually probs more than that

stark timber
#

and I just have never seen it

#

and that's okay elisBall

tired vigil
supple whale
#

oh lord that would be insane to implement

#

esp considering settings includes shit like extensions

#

...doable but crazy amt of work

tired vigil
supple whale
#

sure but how should custom panels then be treated

#

like u can add custom views, panels, buttons, pages, even custom UI

#

so this quickly spirals out of control

tired vigil
supple whale
#

true

#

but its intellij

#

so you've got other problems

tired vigil
#

😭

supple whale
#

XD

stark timber
#

I never had an issue configuring stuff in intellij

#

probably smth about vscode that is a red flag is that u sometimes gotta edit the config file manually

#

that's not a sign of a good config ui lol

tired vigil
#

yeah 😭

stark timber
#

also idk how this is on intellij or other jetbrainsware but custom themes are SO ANNOYING on vscode

#

like let me just change a config file with the colors or smth

#

but I gotta make a whole ahh package

#

I never even tried to do it bc it seemed like such a hassle

stark timber
#

zed needs a config menu 😭

spark tiger
#

tho i think it isnt as bad because there arent like hundreds of settings yet i think

#

but tbh i never even touch settings

stark timber
tired vigil
stark timber
#

I think zed will be the next industry standard

#

once it has official windows support

#

and when there's a settings ui

#

lol

valid jetty
spark tiger
#

because they kept suggesting me some bs code

#

but now on macos there isnt such

deep mulch
valid jetty
#

hi

{
  "disable_ai": true,
  "features": {
    "edit_prediction_provider": "none"
  },
  "collaboration_panel": {
    "button": false
  },
  // "relative_line_numbers": true,
  "chat_panel": {
    "button": "never"
  },
  "agent": {
    "enabled": false,
    "button": false
  },
  "show_edit_predictions": false,
  "edit_predictions": {
    "enabled_in_text_threads": false,
    "disabled_globs": ["**"]
  },
  "diagnostics": {
    "include_warnings": true,
    "inline": {
      "enabled": true,
      "update_debounce_ms": 150,
      "padding": 4
    }
  },
  "vim_mode": true,
  "theme": "Catppuccin Mocha Glass",
  "soft_wrap": "editor_width",
  "ui_font_size": 14,
  "buffer_font_size": 6.0,
  "buffer_font_weight": 300,
  "buffer_font_family": "Maple Mono",
  "buffer_font_features": {
    "zero": true,
    "cv02": true,
    "cv03": true,
    "cv04": true,
    "cv98": true
  },
  "ui_font_weight": 300,
  "ui_font_family": "Maple Mono",
  "terminal": {
    "font_family": "Maple Mono"
  },
  "format_on_save": "off"
}
spark tiger
#

so im kinda fine with leavinf it on

#

wtf is Maple Mono

deep mulch
#

the best font

valid jetty
#

the most peak font ever

lucid trail
#

I could see my prof used maple mono the moment i saw it cause of the @ sign. Also the slides look like this

#

maybe i should switch to it

valid jetty
#

best font

spark tiger
lucid trail
#

the @ looks too much like a fingerprint to me

spark tiger
#

true

supple whale
#

holy shit

#

i feel like i just won a medal

#

this is the first time i crashed v8

#

that said im doing REAAAAALLY dumb shit

jade stone
#

i swear you need a crate to do anything in rust

#

even c++ has regex in it's stdlib

fleet cedar
royal nymph
#

deprecate the old one and make a new one

stark timber
#

true

#

it can just be the same api but different implementation

royal nymph
#

or that

shrewd canopy
#

make it opt-in

#

💯

royal nymph
#
#define NON_SHITTY_REGEX 1
#include <regex>
nimble bone
jade stone
#

i love how rust has aliases in documentation

#

but for some reason they didn't add them to the web docs directly

#

so you can get this

deep mulch
#

building 2 non rust libraries and linking to them

#

will be adding 2 more

solid gazelle
#

@deep mulch

deep mulch
#

@solid gazelle

winged mantle
#

#include <regex2>

fleet cedar
#

That's exactly why rust does not have regex in stdlib

#

There's no one regex implementation that suits all needs, and once something's in std it cannot be incompatibly changed

ionic lake
#

codemods and tests

nimble bone
#

@lyric latch Revenge will use Bun

royal nymph
#

there's no one list implementation that suits all needs, that's exactly why there shouldn't be lists in the stdlib

winged mantle
#

just make a regex implementation that suits some needs

#

however, c++ never tries to just suit some needs, that's how we ended up with the language we have today

royal nymph
#

there are many languages with regex implementations that are perfectly sufficient for 99.9% of use cases

#

even in rust everyone just uses the same regex crate

winged mantle
#

yea it's doable

royal nymph
winged mantle
#

i don't think the problem with C++ regex is it doesn't do everything

#

I think the problem with it is it does everything, and not particularly well

fleet cedar
royal nymph
#

first one says it's built upon the regex crate and has the same api, so it could just be merged into one thing

fleet cedar
#

Yes you could absolutely do that

#

And it would be a worse experience for literally everyone involved

tired vigil
#

Why?

fleet cedar
#

More complicated for devs, less choice for users, more complex performance characteristics including risk for exponential time if you don't read the docs in detail

tired vigil
#

Just have a feature flag for the fancy features if you're worried about accidentally using them

winged mantle
#

feature flags? is this kotlin?

fleet cedar
royal nymph
#

you know it's possible to have separate functions right

tired vigil
#

That you don't have to remember and specifically search for the crate that supports your exact use case
Imagine having to switch to a different library halfway through development cuz regex crate #1 doesn't have a regex crate #2 feature

royal nymph
#

it's not rocket science

fleet cedar
#

Burden of proof isn't with me anyway

#

Why would merging them, let alone into stdlib, make anything better?

royal nymph
#

JS, Go, Java/Kotlin, C#, python, etc all have inbuilt regex and they all work for the vast majority of users

royal nymph
fleet cedar
#

Good dependency management beats bloated stdlib in literally every way

winged mantle
#

i don't really see why pulling in an official rust maintained library is a big deal

#

however.. what's wrong with an stdlib like go's where it has lots of useful stuff

fleet cedar
#

Same things as the last fifty times anyone asked

#

Stagnation, mixed with officially blessing a specific choice that's not necessarily the best

royal nymph
#

opinionated languages are good

winged mantle
#

yeah...

#

standardisation makes it easier to understand other people's code

#

the actual problem is when stdlib ends up with niche things

fleet cedar
#

I half think std::io, std::fs, std::path, and std::net should be an external crate

limpid mica
#

having a shared vocabulary is important

#

i think vocabulary types should be in the standard lib

fleet cedar
#

True

royal nymph
#

this just leads to third parties making their own stdlibs which now become a standard

#

like boost or apache commons

winged mantle
#

boost::optional

limpid mica
#

i used boost so much more pre c++11

winged mantle
#

i wrote something like this in my code today

new(arr) int[sizeof arr / sizeof *arr]();
limpid mica
#

ew

winged mantle
#

placement new just to fill an array with 0

limpid mica
#

std::fill when

#

banned

winged mantle
#

i'm not using std::fill

#

i don't want an std

#

am i insane

limpid mica
#

yes

lavish cloud
#

Yes

jade stone
frosty skiff
#

its prettyyy accurate some things are missing though

shrewd canopy
#

isnt that just ghidra output

frosty skiff
#

(no)

shrewd canopy
frosty skiff
#

its just reconstructed to be more readable since the decompiled output is messy

#

not to be compiled or anything lol

shrewd canopy
#

oh ok

jade stone
frosty skiff
winged mantle
#

i'm using c99 dependencies... and functions and headers which were only added in c99 which c++98 doesn't strictly have

winged mantle
#

conclusion: just use c++11, it doesn't stop you from doing anything

spark tiger
balmy lintel
#

bunjs is so fast

#

cut times

#

dast fast

#

faster than nodjes

#

bun is so ass

nimble bone
#

buntards

spark tiger
#

my bun is so buns for some reason

supple whale
#

"so uuuh we made it faster, by making it not install stuff"

spark tiger
#

huh

supple whale
#

it resolves modules differently

#

so that it can be "cached"

#

which means npm i and bun i will yield different results

ionic lake
#

that should be the default to be honest

#

if you care about refetching --force does it

royal nymph
#

On average, it runs ~7× faster than npm, ~4× faster than pnpm, and ~17× faster than yarn.
why is yarn so fucking slow

spark tiger
ornate quiver
supple whale
#

pretty much

#

its more that yarn stopped changing

#

and everything else improved

#

but pretty much same thing

pearl dawn
deep mulch
#

This video presents an introductory tutorial on IQ signals - their definition, and some of the ways that they are used to both create / generate modulated RF signals, and demodulate / analyze RF signals. IQ signals are most often used in the transmit and receive paths of Software Define Radios (SDR). A PDF of the drawings can be found here:
ht...

▶ Play video
winged mantle
#

i nearly ended up using unordered_map in my cursed codebase

#

but it turned out to be easier just writing my own hashmap impl

#

copying a hash function from stackoverflow without credit, naturally

royal nymph
#

bro brave removed the web filesystem api for no reason and locked the issue thread discussing it since 2021

#

it works in all chromiums except brave

supple whale
#

but the FSA brave has isnt spec compliant

#

and has a lot of security issues

#

since you can open system directories and restricted and root folders

royal nymph
#

lmao why

supple whale
#

riiiight?

royal nymph
#

thats so retarded

supple whale
#

its the only problem i have with brave

#

the FSA

#

i mean its still only one flag

#

but still

royal nymph
#

yeah it's annoying

royal nymph
supple whale
#

yep!

#

but its something to be aware of

#

you can open the root of a C directory

#

and browse ur entire OS

#

and make a file explorer like that

royal nymph
#

is that just if the user manually picks root

#

i thought websites couldnt select which path

supple whale
#

i did that actually

#

:DDD

supple whale
royal nymph
#

ah so it's just not protecting users from their own stupdity

#

eh that's fine to me

supple whale
royal nymph
#

yeep i remember now

supple whale
#

but normally u cant select those directories either

#

but brave lets u

#

usually only subdirectories in those dirs

royal nymph
#

i just needed it for this so I don't have to manually select the file each time

#

is there any way to not need the Go button

#

it needs user interaction to read the file

supple whale
#

if its read only then u can just query the permissions on page interaction

royal nymph
#

I wish it could read it as soon as I opened the site without interaction (I did the "allow access every time")

supple whale
#

if its write u need the prompt

royal nymph
#

i did allow each time so I just have to press the Go button and no prompt

#

but I wish I didn't even need the go button

supple whale
#

nope u need user interaction for FSA

#

come on

#

ur smarter than this

royal nymph
#

i don't really get the security benefit of requiring a user interaction

#

if the user didnt press allow each time it will prompt for permission anyway

#

and if they pressed allow each time they know it will have access

supple whale
#

IWAs dont have those restrictions

#

i thiiiink PWAs still do

royal nymph
#

since the permission prompt is also user interaction

supple whale
#

you can store handles in IDB

#

and read shouldnt need the prompt

#

just on any click

royal nymph
royal nymph
lucid trail
#

good work

limpid mica
#

smh

#

it is common knowledge that 1 Smoot per microfortnight ≈ 1 meter per second

#

no need for weirdness

deep mulch
#

smoot

ornate quiver
#

who thought allowing fs access to websites was a good idea

#

its like webusb

deep mulch
#

lets me gain access to your files

ornate quiver
#

NO

nimble bone
ornate quiver
#

nuh uh

#

i have yet to see a good use for it aside from flashing android roms
and even that is still jank because you sometimes need device drivers anyways

#

and that doesnt justify it's existence

#

ff was right to not add it

worldly sigil
#

though i don't know many other use cases of webusb either

ornate quiver
#

i have a keyboard that still requires drivers to even use the webusb config utility

#

and it fucking sucks

#

i dont want a web configuration tool

#

no internet? good luck changing your keyboard settings

#

its so dumb

royal nymph
#

why is it not a good idea

#

and webusb is also cool

ornate quiver
royal nymph
#

the user has to select a file or folder the website gets access to

ornate quiver
#

oh

royal nymph
#

it's like when android apps ask you for a folder

#

you choose the folder and it won't let you choose too high up folders

#

it has many use cases

#

for example code editors (like vscode) in your browser

#

or something like a video player

#

you give it access to your video folder and now it can display them in the browser

#

it's really neat

#

you could also give a website write access to some folder and now it can automatically save created files there, much more convenient than always showing a save dialog

ornate quiver
#

huh

#

i guess thats kinda neat

#

i feel like thats still potentially ripe for abuse

#

less so though if it prevents selecting folders too high up

royal nymph
#

I don't really think there's too much abuse potential

you could just make the user download and run malware instead or smth

ornate quiver
#

ig yeah

deep mulch
#

@ornate quiver would you download malware if i sent it blobcatcozy

ornate quiver
#

nop

deep mulch
#

guhhh

#

@ornate quiver do you know if theres anything to make rust android errors more verbose

#

like segfaults and stuff

#

like line numbers if possible

ornate quiver
deep mulch
#

LOVE

#

i love my rusher

ornate quiver
#

its basically a proc macro for catch_unwind

deep mulch
#

whats catch_unwind

ornate quiver
deep mulch
#

explain what + means here

#

oh

#

i think catch_panic is broken

#
error[E0596]: cannot borrow `env` as mutable, as it is not declared as mutable
  --> /home/nick/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/catch_panic-1.0.0/src/handler.rs:37:5
   |
37 |     env.throw_new("java/lang/RuntimeException", msg).unwrap();
   |     ^^^ cannot borrow as mutable
   |
help: consider changing this to be mutable
   |
29 | pub fn default_handler(mut env: JNIEnv, err: Box<dyn Any + Send + 'static>) {
   |                        +++

ornate quiver
#

read the error

#

it literally gives you a fix

deep mulch
#

a what

#

thats the crates code

#

not mine

ornate quiver
#

show your usage

deep mulch
#

nothing

#

i just added the crate as a dep

ornate quiver
#

oh wait i forgot that the actual crate is outdated

#

one sec you have to use my fork

deep mulch
#

malware

royal nymph
#

rushiinsane

deep mulch
#

rushiinsane

ornate quiver
#

i have a fork of a fork

#

cause the original crate is dead

#
catch_panic = { git = "https://github.com/rushiiMachine/catch_panic.git", rev = "1a228e5" } # https://github.com/sorz/catch_panic/pull/1
#

there

jade stone
#

rushiinsane

ornate quiver
#

wait

royal nymph
#

one day rushii will realise that C++ > rust and just use C++ again

#

@deep mulch

deep mulch
#

yop

royal nymph
#

soon rushii will try to rewrite aliuhook in rust

ornate quiver
#

i will rewrite lsplant in rust

jade stone
ornate quiver
#

sounds like macroing time

royal nymph
#

well it doesn't do the hooking logic anyway lmao

deep mulch
#

@ornate quiver wyd

jade stone
#

Just use c++ for that like a normal person

royal nymph
#

but it does use a lot of void*

deep mulch
#

@ornate quiver

royal nymph
#

write symtab searcher in rust @ornate quiver

deep mulch
#

blob DAMN cozy

royal nymph
#

rust should add a feature where it enables unsafe everywhere even without unsafe block

deep mulch
#

YOP

#

i hate safety

#

just killed a ninolet

jade stone
#

just killed a ninolet

deep mulch
#

@ornate quiver rushii's and cream

#

rushii wil lbe made into ice cream

ornate quiver
#

the poor mans version of this is making every function unsafe

deep mulch
#

what if wing became a rust developer @ornate quiver

#

wing typing

frosty obsidian
frosty obsidian
deep mulch
#

work on my project with me

frosty obsidian
#

i don't have any knowledge in that field

deep mulch
#

i dont really know the processing stuff

frosty obsidian
#

im not radio nerd

deep mulch
#

im winging it

#

@jade stone

jade stone
deep mulch
#

hi satan

nimble bone
frosty obsidian
#

yeah im not taking advice from you

nimble bone
#

just write good code

hoary sluice
#

rust is only useful for personal projects

#

nobody in the industry uses rust other than crypto blockchain

ornate quiver
#

not yet

frosty obsidian
#

who care

hoary sluice
#

i spent the last 2 years of my life using rust and now i cant get a proper job

#

cause my resume is only rust

frosty obsidian
#

im already familiar with java/kotlin and android

#

job wise thats good

hoary sluice
#

do u have projects for a resume

frosty obsidian
#

kinda

hoary sluice
#

i would keep working on mobile

#

its fun from what i can tell

frosty obsidian
#

i can have fun doing two things

hoary sluice
#

im not saying dont do rust

#

im saying rust wont help on a resume

#

i love rust i want it to be used everywhere

frosty obsidian
#

i don't care about putting it on a resume

hoary sluice
#

then go use rust

frosty obsidian
#

i program for fun

hoary sluice
#

shepherd day job programming hobby?

frosty obsidian
#

ew i hate outside

hoary sluice
frosty obsidian
#

animals are gross

#

i include humans in that

solid gazelle
#

i use that

#

teamviewer but you can selfhost and it's got a web client

#

so you can truly remote from anywhere with internet access

stark timber
#

rust users try not to reference rust in their project name or description challenge

#

(difficulty: FREAKING IMPOSSIBLE)

valid jetty
deep mulch
#

@frosty obsidian will work for mcdonalds soon

crude star
fleet cedar
#

Almost as if you're supposed to have as little unsafe as possible

crude star
#

oh they gave up on making this a compiler error

#

i think

valid jetty
#

it is not

#

i'm pretty sure you're using it wrong

stark timber
stark timber
deep mulch
#

@valid jetty did you watch the videos

royal nymph
#

Rust's proc macros suck btw jfyi

shrewd canopy
jade stone
hoary sluice
#

@valid jetty

#

i will get hired ebcause of a mod i wrote when i was 12

jade stone
#

SKYBLOCK

#

evil

jade stone
royal nymph
#

I just copy pasted it from the crust repo

ornate quiver
#

use reflog to find the commits you dropped

valid jetty
#

lol

jade stone
valid jetty
#

jai has better metaprogramming capabilities than rust

jade stone
valid jetty
#

??? a programming language developed by jonathan blow?

jade stone
hoary sluice
#

@valid jetty i vibe code a portfolio website

#

"I develop independent projects across domains in Kotlin and Rust, aiming for simplicity and performance." husk

#

I love vibe coding

#

it looks fine on mobile too

shrewd canopy
deep mulch
#

make elle ai @valid jetty

lavish cloud
#

also what the fuck is it doing to my cursor

deep mulch
lavish cloud
#

no skeumorphism is making things look physical

#

I think this is called Linear UI?

#

and/or Untitled UI

deep mulch
#

oh

frosty obsidian
#

zeet using design buzzwords

pseudo sierra
#

zeet is a design buzzword

supple whale
jade stone
#

@deep mulch does compose web have hot reload

valid jetty
#

@hoary sluice the fucking #opentowork on your linkedin 😭

deep mulch
#

not really

jade stone
#

evil

deep mulch
#

closest thing is it just reloads entire site on changes

nimble bone
#

Get to know Nick Owens

haughty socket
#

@royal nymph @jade stone @lyric latch this does work btw

#

never does extend never

#

thank god

deep mulch
#

vap insane

haughty socket
#

wait im LYING

haughty socket
#

im lying about it "working", never extends everything

haughty socket
jade stone
haughty socket
#

yop

#

its cus never extends everything

#

cus its the empty set type

#

and the empty set is a subset of all sets

lavish cloud
gilded surge
#

this reminds me of that one blog that's styled like an os

jade stone
#

you were lied to

deep mulch
#

@jade stone

jade stone
ivory heath
#

it makes me wanna KMS how complicated it is to just open a simple subprocess in c++

royal nymph
lavish cloud
#

@deep mulch how do I wasm externals

deep mulch
#

idk

#

ive never used

low pendant
#

the whole #🎨-css-snippets is filled with "frosted glass theme" bs and its lowkey pissin me off

#

no hate tho

ornate quiver
#

liquid ass theme soon

spice token
#

How do i write hello world

limpid mica
#

hey grok print hello world

ionic lake
#

@grog print hello world

#

k doesnt work here

hoary sluice
#

its a linkedin feature

spice token
#

Oh its dead

spice token
#

Cook me some fent for 5 dollars

tired vigil
#

@jade stone random thought, would it be possible for dev companion to show store names on hover/inline? blobcatcozy
I always navigate to every single store then copy the name and go back to rename the mangled import 😭

valid jetty
#

@hoary sluice remember this

valid jetty
hoary sluice
#

@valid jetty do i aoc in rust this year

valid jetty
#

my friend tried and it was kinda awful

#

prepare for as usize

valid jetty
#

i just didnt make a solvable input

#

because idk how to construct inputs

valid jetty
sullen tapir
#

what language

#

I have never seen that syntax

valid jetty
#

rust?

#

thats just plain and normal rust

hoary sluice
#

@valid jetty @valid jetty @valid jetty i HAVE to use rust

#

i will be doing aoc on a 9950x3d potentially

valid jetty
#

what 😭

hoary sluice
#

i wont be home in december but i might remote desktop into it

valid jetty
#

are you planning to get those nanosecond runtimes

#

like last year

hoary sluice
#

no just bruteforce hard days

valid jetty
#

lmao

#

i dont think im attending this year

#

unfortunately

hoary sluice
#

you are

valid jetty
#

nop

jade stone
#

Very possible

pearl stagBOT
deep mulch
#

@jade stone HUGE nutty

#

@tired vigil MASSIVE nutty

jade stone
#

insane

tired vigil
tired vigil
jade stone
#

It's used for the jump to definition LSP handler

#

Stores are just singletons so when you jump to the definition, you're just jumping to an instance of them. So this resolves it to the actual store method

tired vigil
#

ohh I never realized that

#

that makes sense

valid jetty
hoary sluice
#

i will gladly do a whiteboard interview

deep mulch
#

guh nothing even remotely close to me

winged mantle
#

i feel like i would do really bad at whiteboard interview

supple whale
#

i'm just that fucking good

#

that i brick chromium

#

[doesnt show up during OBS recording, wack]

fleet cedar
ornate quiver
#

the drop off in YouTube views caused by a one line change in a block list

gilded surge
#

yeah that tracks

crude star
#

average easylist response

royal nymph
#

they already knew about this in the past and temporarily disabled it

#

but now reenabled it

#

lol

#

sane

gilded surge
#

yea

#

hopefully the absolutely insane maintainer reopens the issue and it's at least partially reconsidered

#

but whatever, no shot that's happening

ornate quiver
#

i wonder whether ubo will override the rule themselves

gilded surge
#

if easylist doesn't then maybe

gilded surge
#

why would you ever do this

#

actually, no

#

this is a good style

ionic lake
#

Easylist is more of the shittest lists than an actual list

#

They will block entire domains for no reason

tired vigil
jade stone
hoary sluice
#

@valid jetty I GET TO WRITE RUST

jade stone
#

least insane typescript type

valid jetty
crude star
winged mantle
#

why use maybe_unused when you can just have a function which does absolutely nothing with everything passed

#

another c++ crime i commited

jade stone
jade stone
winged mantle
#

means macro works even if you have no braces

jade stone
winged mantle
#

if (thing)
panic("argh");

jade stone
#

couldn't you just use braces instead of do while

winged mantle
#

then this breaks because the semicolon ends up being after the braces

if (thing)
    panic("argh");
else
    other_thing();
jade stone
#

guh

#

i just ended using an always inline function when i did something like that

#

and pass the source info as params

winged mantle
#

i remember there were some macros which only worked if i inlined them into the source

#

that's how i found out about this trick

#

i have no idea why the macros didn't work though

#

but they included inline assembly

jade stone
#

how is node 22 and >= 24 ok

#

but not 23

winged mantle
#

regression?

#

i think i would want to use c++ with my own stdlib

ivory heath
#

https://youtu.be/N6ElaygqY74
I love this video

Before you comment about how no programs use AVX-512, you should probably note that chrome uses AVX-512. (And I'm not talking about libraries that chrome uses either.(I probably should've mentioned that in the video))

An AVX-512 video that doesn't just revolve around RPCS3.

0:00 AVX-512 power efficiency
1:47 Power efficiency outside RPCS3
5:55...

▶ Play video
winged mantle
#

good

List<String> my_list;
my_list.add("hello"_str);
my_list.add("world"_str);

for (String &str : my_list) 
    out.println("%s", str);
winged mantle
#

implicit conversion bad

jade stone
#

in general, yes

#

but i'd argue it's worth it for const char* -> string

winged mantle
#

sys::out.println

#

🤔

ivory heath
#

Printf is apart of the c++stdlib now

tired vigil
# jade stone

wha since when does typescript have _ as a valid type argument

jade stone
winged mantle
#

tbh i love how c format strings work

#

apparently the new std::print is also slow in terms of compile time

ivory heath
shrewd canopy
#

my cpu doesn't even support AVX512

winged mantle
ivory heath
#

Overgrown macro.

winged mantle
#

i'm not a template magician but i know you can have variadic args

jade stone
winged mantle
#

i just use stdio.h

#

maybe i should use qt for every project so i can do qDebug() <<

jade stone
#

i wish rust had overloading

ivory heath
ivory heath
jade stone
ivory heath
#

You can implement overloading with them

#

That’s how the print macro works sodalove sodalove sodalove sodalove sodalove sodalove

shrewd canopy
winged mantle
#

i don't particularly like overloading

ivory heath
#

Over a decade old

#

Get ANYTHING new

winged mantle
#

i think my favourite use of overloading is swap though

shrewd canopy
ivory heath
#

You spend more on power consumption than a new pc would cost

shrewd canopy
#

new Intel CPUs consume more energy (and no, I aint getting amd)

winged mantle
#

come to think of it, a decade ago was only 2015

ivory heath
shrewd canopy
ivory heath
#

Virtualization issues are mostly figured out on amd

winged mantle
#

just tri-boot macos, windows and linux

shrewd canopy
#

nope

jade stone
#

eslint my beloved

pnpm i -D @typescript-eslint/{parser,eslint-plugin} @stylistic/eslint-plugin{,-ts} eslint eslint-plugin-{unused-imports,simple-import-sort} jiti
valid jetty
#

@deep mulch you should try this problem

deep mulch
#

whats that

valid jetty
#

basically you have an array of points, the length is arbitrary, which form a line

#

and given multiple of these lines

#

color all intersecting ones differently

#

but you also have to use the least number of colors required to achieve this

deep mulch
#

it doesnt seem too difficult? idk

valid jetty
#

try it

deep mulch
#

would need more info on how many points and colors

valid jetty
#

number of points per line is arbitrary, can be anywhere between 2 and u64::MAX

#

can be different per line

deep mulch
#

so the points and lines would just be randomly generated?

valid jetty
#

i just made a bunch to test with

#

i can give you my array if you like

deep mulch
#

meow

valid jetty
# valid jetty

lines from here

lines := [
    [$(0,  0), $(2, 2), $(4, 4)],
    [$(-1, -1), $(-1, 2), $(-1, 4)],
    [$(-2, 0), $(-1, 4)],
    [$(1, 0), $(1, 3)],
    [$(3, 1), $(3, 3)],
    [$(0, 3), $(3, 0)],
    [$(4, 0), $(4, 4)],
    [$(-3, 0), $(-3, 5)],
    [$(2, 2), $(4, 0)],
    [$(0, 0), $(0, 1), $(0, 2)],
    [$(0, 0), $(5, 5)],
    [$(0, 5), $(5, 0)],
    [$(1, 1), $(3, 3)],
    [$(2, 2), $(6, 6)],
    [$(4, 4), $(8, 8)],
    [$(1, 4), $(2, 2), $(4, 1)],
    [$(3, 5), $(3, 3), $(5, 2)],
    [$(5, 5), $(7, 4), $(6, 2)],
    [$(0, -3), $(3, -3)],
    [$(6, 6), $(8, 8), $(10, 6)],
    [$(10, 6), $(8, 4), $(6, 6)],
];
deep mulch
#

maybe ill try in rust

#

ropsinga

valid jetty
#

rust..

deep mulch
#

@valid jetty make elle tuples use { } instead of $()

valid jetty
#

{} is a block

#

i was actually thinking about how i can drop the $ tho

deep mulch
#

you will use context clues to check how

#

yes

#

make elle use an ai to compile

valid jetty
#

it would need an extra special case for parsing the wrapped exprs

deep mulch
#

elle ai will read the code and convert to rust

valid jetty
#

like (x)

#

if it finds a comma at the top level then treat it as a tuple

deep mulch
#

guh?

valid jetty
#

like python and rust

deep mulch
#

couldnt you just only allow a block based on the previous chars

valid jetty
#

(x) is a wrapped x and then (x,) is a single element tuple of x inside

deep mulch
#

like if theres a function signature before {} then its definetely a block

valid jetty
#

well no because you can have blocks on their own

deep mulch
#

why

valid jetty
#

you can do deferring

#

good for resource management

deep mulch
#

oh

#

defer keyword when

valid jetty
#
fn main() {
    {
        x := get_x();
        defer x.free();
        ...
    }

    {
       y := get_x();
       .. you get the point
    }
}
deep mulch
#

@valid jetty i have to make some project for my operating systems class

valid jetty
#

idk how you dont know this

deep mulch
#

defer my reads

valid jetty
#

well yes but that adds extra bloat

#

the point is that you can do that

#

it works sorta like a "i wanna automatically free this thing later, but not when the function returns, just like a bit later"

deep mulch
#

scary

#

my language wouldnt allow standalone blocks

valid jetty
#

well i mean elle has a gc so you dont need to use this for memory allocation, rather for things like file handles, sockets, db connections, etc

valid jetty
#

standalone blocks basically let you do this too

#

zoooooot when are you doing the line problem

#

my solution || was to find the intersection between each polyline by checking whether the segments intersect, then do graph coloring to give each unique intersection a different color ||

#

took me like 1h 30m

#

if this was aoc i would fail

deep mulch
#

wrong

#

I would

jade stone
deep mulch
#

delete

hoary sluice
valid jetty
#

you should try it

hoary sluice
#

i think you need to find the line with the most intersections and just use that many colors

#

would that work

valid jetty
#

i did graph coloring but that would also work yes

hoary sluice
#

so isnt that really easy

#

i mean i have utils for intersecting lines i think

valid jetty
#

i think the hardest part is finding whether the polyline intersects

#

yeah but its not just a normal line of 2 points

#

it can be any number of points

hoary sluice
#

what

valid jetty
#

like

hoary sluice
#

oh

#

ok

valid jetty
#

[$(0, 0), $(2, 2), $(4, 4)]

hoary sluice
#

well isnt that just multiple lines

#

of the same color

#

idk how i would represent that

valid jetty
#

uhhh yes but if one of the segments intersects another line you gotta make them all a different color

#

this is how i did the intersection

fn orientation((i32, i32) a, (i32, i32) b, (i32, i32) c) {
    return math::sign((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x));
}

fn on_segment((i32, i32) a, (i32, i32) b, (i32, i32) c) {
    return (c.x >= math::min(a.x, b.x) && c.x <= math::max(a.x, b.x)) &&
        (c.y >= math::min(a.y, b.y) && c.y <= math::max(a.y, b.y));
}

fn segments_intersect((i32, i32) p1, (i32, i32) p2, (i32, i32) q1, (i32, i32) q2) {
    d1 := orientation(p1, p2, q1);
    d2 := orientation(p1, p2, q2);
    d3 := orientation(q1, q2, p1);
    d4 := orientation(q1, q2, p2);

    return d1 != d2 && d3 != d4
        || (d1 == 0 && on_segment(p1, p2, q1))
        || (d2 == 0 && on_segment(p1, p2, q2))
        || (d3 == 0 && on_segment(q1, q2, p1))
        || (d4 == 0 && on_segment(q1, q2, p2));
}

fn Array::is_intersecting((i32, i32)[] self, (i32, i32)[] other) {
    for p1, p2 in self.windows(2) {
        for p3, p4 in other.windows(2) {
            if segments_intersect(p1, p2, p3, p4) {
                return true;
            }
        }
    }

    return false;
}
hoary sluice
#

double for loop check if any line in a cross any line in b

valid jetty
#

but you also have to take into account colinearity

hoary sluice
#

what is that

#

rosie i forgot everything

#

last time i did competitive programming or any non school math was 2024 pretty sure

valid jetty
#

yeah me too

hoary sluice
valid jetty
#

yes

hoary sluice
#

isnt that part of the intersection check of normal segments

valid jetty
hoary sluice
#

for a in lines
for b in lines
if b.any(bb -> a.any(aa -> aa.intersects(bb))
count++

#

no?

#

you also have to deduplicate but that shouldnt be hard

valid jetty
#

you also have to use the least number of colors

#

you can generate that number of max intersections and get the number of colors

#

but now you have to assign each color to each intersection

#

idk just try it lol

valid jetty
#

each new intersecting line gets a new color

hoary sluice
#

hard part is finding the number

valid jetty
#

yeah

#

well

#

i used greedy graph coloring for that, its like the go-to for this kind of problem

hoary sluice
#

it sounds like a d20 problem

#

p1

#

i would still take an hour tho

valid jetty
#
fn Array::assign_groups((i32, i32)[][] self) {
    adj := Array::with_capacity<bool[]>(self.len())
        .filled()
        .iter()
        .map_with(fn(v, self) Array::with_capacity<bool>(self.len()).filled(), self)
        .collect();

    for i in 0..self.len() {
        for j in i + 1..self.len() {
            if self[i].is_intersecting(self[j]) {
                adj[i][j] = true;
                adj[j][i] = true;
            }
        }
    }

    colors := Array::with_capacity<u64>(self.len()).fill(u64::MAX);

    for u in 0..self.len() {
        used := Array::with_capacity<bool>(self.len()).fill(false);

        for v in 0..self.len() {
            if adj[u][v] && colors[v] != u64::MAX {
                used[colors[v]] = true;
            }
        }

        c := 0;

        while c < self.len() && used[c] {
            c += 1;
        }

        colors[u] = c;
    }

    return colors;
}
valid jetty
hoary sluice
#

im too lazyyyy

#

id have to set up my aoc env

#

i switched to nixos after the last time i did aoc

valid jetty
#

just open a python repl and start writing stuff lmao

#

or idk if you wanna do it in kt

hoary sluice
#

i dont know python bestie

#

i forgot it all

valid jetty
#

what.....

hoary sluice
#

i forgot progaming

valid jetty
#

literally so me

hoary sluice
#

i didnt remember how to import something in rust today

#

i only know java...

valid jetty
#

were doing dijkstra in school and i genuinely forgot how to do everything

#

its so over for me

hoary sluice
#

ive only done java since july

valid jetty
#

husk

#

j*va

#

ive been focusing less on programming since like may, but even before that, ever since aoc i havent been doing any competitiv prgigm

hoary sluice
#

i tried doing codeforces

#

with c++

#

but like

valid jetty
#

c++ 😭

hoary sluice
#

aeaeaeae

#

cpp has best stdlib for it

#

but like

#

no

valid jetty
#

somehow i managed to remember what a min binary heap is

#

which is what a priority queue is implemented with

#

thats kinda shocking that i still rember

hoary sluice
#

i will try to get the remaining 36 stars before december

valid jetty
#

instead of linear search for the min cost, you use a balanced tree structure

valid jetty
#

and traverse it to get the min cost

hoary sluice
#

not make a team but help eachother

valid jetty
#

and i have so much other stuff going on

#

personal statement

#

uni applications

#

mock exams

#

driving lessons

#

blehh

hoary sluice
#

bestie it is 4 hours

hoary sluice
valid jetty
#

but i need to prepare lmao

#

im 17..

hoary sluice
valid jetty
hoary sluice
valid jetty
#

but yes basically

#

since june

hoary sluice
#

why didnt i know

valid jetty
#

lmao

#

on the week of my birthday i was completely off social media

hoary sluice
#

youre doing the 4 hours

#

its sooo fun

valid jetty
#

i will vibecode it

hoary sluice
#

i vibe coded last year

#

was #1 in the world to solve level 4 and then didn't solve level 5

#

finished #101

valid jetty
#

im surprised you didnt vibecode aoc atp

hoary sluice
#

im actually not a human

valid jetty
#

oh

#

love

hoary sluice
#

im actually claude 3.7 sonnet

#

i am the vibe

valid jetty
#

have you ever heard of a red black tree

hoary sluice
hoary sluice
hoary sluice
valid jetty
#

lmao yeah thats fair enough

hoary sluice
#

im actually RangerMcSexy

valid jetty
#

i may be going to the university of edinburgh..

hoary sluice
#

is that good

valid jetty
#

i think so

hoary sluice
#

im going to a remote uni in germany

valid jetty
#

it doesnt really matter for me

hoary sluice
valid jetty
#

insane..

hoary sluice
#

cause its cs

#

and like

#

i think i know cs

valid jetty
#

i may be able to land a masters 5FT 1 year abroad

#

at some uni

#

if i get really lucky with predicted grades

hoary sluice
#

5 feet 1 yard??

valid jetty
#

5 full time of which 1 is abroad..

hoary sluice
#

skipping bachelor?

valid jetty
#

yeah

hoary sluice
#

bad idea imo

#

id want the ability to drop out early with a bachelor

valid jetty
#

like at leeds

#

4 years full time or 5 years full time (abroad) to get a masters in engineering for cs

hoary sluice
#

idk what that means

#

i just applied to every uni i wanted and got accepted to all

valid jetty
#

horror

#

i have to write a personal statement and all of that..

valid jetty
#

yes its skipping bachelors

hoary sluice