#πŸͺ…-progaming

1 messages Β· Page 115 of 1

valid jetty
winged mantle
#

java is everywhere

supple whale
#

it's way better than not having it

#

but it's still running a horrific version of opengl

spark tiger
#

guh i wanna try and learn typst so much but i have no idea what i can use it for

valid jetty
#

i used it to write my school assignments

#

do that

spark tiger
#

cuz here we only get homework and it's basically do N tasks from the book and write it down to copybooks

valid jetty
spark tiger
#

i mean i have seen it but not like i could understand anything :isob:

valid jetty
#
ι–’ζ•°γ€€γƒ—γƒͺγƒ³γƒˆζ•΄ζ•°οΌˆζ•΄ζ•°γ€€xοΌ‰γ€Ž
    γƒ—γƒͺγƒ³γƒˆοΌˆγ€Œ%d\n」、x)。
』

ι–’ζ•°γ€€γƒ‘γ‚€γƒ³οΌˆοΌ‰γ€Ž
    ζ•΄ζ•°γ€€x = 1οΌ‹2*3γƒΌ4。
    γƒ—γƒͺγƒ³γƒˆζ•΄ζ•°οΌˆx*3γƒΌ4・3οΌ…7)。
』
#

thats one of my school assignments

#

im writing a dissertation on the implementation of it

#

in typst

valid jetty
#

it makes a surprisingly readable piece of code

visual shellBOT
# valid jetty lc.tr

-# <:i:1323844562875187291> Translated from πŸ‡―πŸ‡΅ Japanese to πŸ‡ΊπŸ‡Έ English β€’ Google Translate

Function Print Integer(Integer x) `
Print("%d\n", x).

Function Main() `
Integer x = 1 + 2 * 3 - 4.
Print Integer(x * 3 - 4 3% 7).

spark tiger
#

well i kinda do have an assignment i can use typst for but uhh

#

so basically one of the bonus homework we got was to make a text/slideshow/whatever about the difference between euler diagrams and venn diagrams

#

but uh

#

apparently its like

#

which is kinda too small to use typst for

#

like idk what i can say about it more

valid jetty
#

idk

#

i can show you what a typst document looks like if you want

#

so you can get a feel for what you can do

spark tiger
#

sure

#

whyre they using .ts for this

valid jetty
#

theyre not

spark tiger
#

oh

valid jetty
#

i put .ts for the syntax highlighting

spark tiger
#

oh ic

valid jetty
#

i think if i made .typ it wouldnt even embed a preview

#

for the record you wont be able to compile this into a pdf because you dont have the corresponding references and text files

#

but yeah

spark tiger
#

dude i hate discord why does syntax highlighting just stop working when i open the code in fullscreen

valid jetty
#

yeah </3333

spark tiger
#

i just find typst kinda cool for quickly writing some math

#

seems much easier than latex

#

but yeah i really need to find a good task i can do with it

valid jetty
#

its very good for easy professional looking documents

spark tiger
#

can u easily print typst docs

valid jetty
#

well yeah

#

it compiles to a pdf

#

ofc

spark tiger
#

oh okay i might try to use it for my annual school project

#

i have no idea what theme ill choose though

#

idek if it will be math/cs related

deep mulch
#

god im going feral

valid jetty
#

like organic chemistry and fundamental particles

#

and a bunch of other stuff

spark tiger
#

it sounds so boring like what can i say about english

wild coral
#

im still figuring this stuff out
does this look good to use for my aiohttp bs

AUTHORIZATION = {
    "website": {
        "BaseURL": "placeholder",
        "Headers" : {
            "Authorization": "Basic " + base64.b64encode(f"{os.getenv('placeholder')}:{os.getenv('placeholder')}".encode()).decode(),
            "User-Agent": "placeholder"
        }
    },
    "website2": {
        "BaseURL": "placeholder",
        "Auth": {
            "user_id": os.getenv('placeholder'),
            "api_key": os.getenv('placeholder')
        }
    }
}

API_HANDLING = {
    "website": {
        "method": "GET",
        "endpoint": "/posts.json",
        "params_type": "query",
        "response_format": "json"
    },
    "website2": {
        "method": "GET",
        "endpoint": "/index.php",
        "params_type": "query",
        "response_format": "xml"
    }
}
winged mantle
#

horror

#

in my lexer 5..myVar and 5 .. myVar is outputs different tokens

#
Type                          Lexeme                        Data
float                         5.                            5.000000
dot                           .                             
symbol                        myVar                         
int                           5                             5
dot-dot                       ..                            
symbol                        myVar                         
#

it thinks the former is accessing myVar as a property of 5. and the latter is concatenating 5 and myVar

#

i should not support trailing decimal

lavish frigate
#

Do you have a separate concatenation operator

winged mantle
#

yeah

lavish frigate
#

Okay here is a lesson in language design: explain your reasoning behind adding a concat operator and why you are not just using addition

winged mantle
#

so that it's clear what you're doing

#

it's a dynamically typed language :p

#

easy solution is to just require 5.0

#

and not allow 5. as a shorthand

#

(you can just do 5f)

lavish frigate
winged mantle
#

isn't this clearer

print("1 + 1 is " .. 1 + 1)
#

then again it probably won't support auto conversion

#

i suppose with strict enough rules it's not really needed

#

it would come more handy in js where things make no sense blobcatcozy

#

i mean there is logic to it but it's confusing

tired vigil
valid jetty
#

its nicer than making + concat and being forced to do #cast(void *, a) + b)

crude star
#

<> is the not equals operator

#

?

valid jetty
#

the humble !=..

winged mantle
#

adding strings with + feels so cursed...

#

i've been doing too much c

#

and using strcat and snprintf

#

probably best to limit the amount of syntax

valid jetty
#

iirc go has that?

valid jetty
#

if the type youre trying to concat isnt a string, you have to:

foo <> "{}".format(bar);

or

"{}{}".format(foo, bar);
``` its kinda fucked
winged mantle
#

i think i will just have a format function instead of f strings

valid jetty
#

yeah no i have that too

winged mantle
#

i planned f strings too 😭

valid jetty
#

these arent f strings

#

"{}".format(x) is sugar for string::format("{}", x) lol

winged mantle
#

i think i will have a load of useful global functions

valid jetty
#

hmmm

winged mantle
#

i don't think i want to support static methods anyway

#

i would like format("hello {}", name) or format("hello %s", name) best

#

why are you huskin g i don't want to make java

#

public static volatile transient final booolean;

valid jetty
#

do what i did :3

#

namespaces are max 1 level deep

#

foo::bar and no further

winged mantle
#

i don't want namespaces either

#

this is meant to be more like lua than c++

valid jetty
#

you know lua has namespaces right

winged mantle
#

aren't they just tables

valid jetty
#

well yeah i guess

#
Foo = Foo or {}

function Foo.bar(a, b)
    return a + b
end

print(Foo.bar(1, 2))
jade stone
winged mantle
#

i don't know

#

it's been a while since i did java for real

#

iirc some of the access modifiers are encoded the same and just treated differently for different member types

jade stone
#

./run

public class Main {
  public static volatile transient final String foo;
  static {
    Main.foo = "bar";
  }
  public static void main(String[] args) {
    System.out.println(Main.foo);
  }
}
rugged berryBOT
#

@jade stone I only received java(15.0.2) error output

file0.code.java:2: error: illegal combination of modifiers: final and volatile
  public static volatile transient final String foo;
                                                ^
file0.code.java:4: error: cannot assign a value to final variable foo
    Main.foo = "bar";
        ^
2 errors
error: compilation failed
jade stone
#

./run

public class Main {
  public static volatile transient final String foo = "bar";
  public static void main(String[] args) {
    System.out.println(Main.foo);
  }
}
rugged berryBOT
#

@jade stone I only received java(15.0.2) error output

file0.code.java:2: error: illegal combination of modifiers: final and volatile
  public static volatile transient final String foo = "bar";
                                                ^
1 error
error: compilation failed
winged mantle
#

i thought about making my lang copy java's jar system though

#

i like jars

jade stone
#

./run

public class Main {
  public static volatile transient String foo = "bar";
  public static void main(String[] args) {
    System.out.println(Main.foo);
  }
}
rugged berryBOT
#

Here is your java(15.0.2) output @jade stone

bar
jade stone
#

bar

winged mantle
#

i will copy META-INF/MANIFEST.MF

crude star
#

mfing manifest

winged mantle
#

i made a dumb mistake (first time doing recursive descent)

#

it's not very recursive

#

bnf really helps me understand what is going on

valid jetty
#

are you hand rolling your parser

winged mantle
#

yeah

#

is it weird to have an expression for unary +

#

oh wait

#

i guess types could overload unary + maybe

#

but it would be kind of bad practice to make it return anything other than itself

#

i don't want coercion in the core lib

valid jetty
#

i simply have it for the symmetry with unary minus tbh

#

unary minus acts like a mul by -1, unary plus acts like a mul by 1

jade stone
valid jetty
paper path
#

./run

console.log('test')
rugged berryBOT
#

Here is your js(18.15.0) output @paper path

test
winged mantle
#

does clang format not allow you to align struct members

#

oh it does

#

but you can't exclude functions

jade stone
#

idk tho

winged mantle
#

or local variables

dense sand
#

horrible font

winged mantle
#

i tried a few

#

this is nicest

winged mantle
#

i didn't fall in love with any vector fonts so i used a bitmap one

#

well really just a ttf port of a bitmap font with antialiasing disabled

#

it's nicer to read

#

more sharp

#

without looking strange like cleartype

supple whale
#

WDYM GOOGLE, WHY DO I HAVE A STACKTRACE WITH 21k THREADS

#

KILL ME PLEASE

deep mulch
#

sorry

ivory heath
winged mantle
#

finally

winged mantle
#

i think i will skip doing a tree-walk interpreter and go straight to bytecode because it feels more interesting

winged mantle
#

The Underhanded C Contest was a programming contest to turn out code that is malicious, but passes a rigorous inspection, and looks like an honest mistake even if discovered. The contest rules define a task, and a malicious component. Entries must perform the task in a malicious manner as defined by the contest, and hide the malice. Contestants ...

still jolt
#

sounds like just programming in C as a contest ​​​​​​​​​

lavish frigate
#

Wonder why it stopped

winged mantle
#

people were getting too good at it...

#

if this was still going jia tan would probably get first place

#

i have an idea

#

linux++

#

linux but c++

crude star
lavish frigate
hazy pine
#

the true linux++ was macos all along

royal nymph
#

insane @crude star

crude star
#

YWS

#

YESSS

#

I've been using

royal nymph
#

This feature is experimental and is subject to change. Disable it by passing --no-experimental-strip-types CLI flag.

#

insane that they shipped an experimental feature as default

crude star
#

they support enums and other special ts syntax with --experimental-transform-types

royal nymph
#

INSANE

pearl stagBOT
crude star
#

tsx is so slow for some reason so ive been using this

royal nymph
crude star
#

the only annoying part is that you need to import files with .ts extension

royal nymph
#

node try not to ruin a cool feature challenge (impossible)

crude star
#
% time tsx -p 0
0
tsx -p 0  0.56s user 0.11s system 147% cpu 0.453 total
% time node -p 0
0
node -p 0  0.03s user 0.02s system 100% cpu 0.047 total
#

100ms

#

i cant wait that long

royal nymph
#

INSANE

crude star
#

(the actual problem is that they use --keep-names which for some reason causes my code to slow down)

#

i forgot why

royal nymph
#

make ur own tsx

crude star
#

i mean with this feature the only thing you need to do is add a module resolver

#

for extensionless

#

making soon

deep mulch
#

@crude star rinini

#

rini tax

royal nymph
#

its just 600 bytes why would discord lie

crude star
#

are we fileshaming now

jade stone
#

copilot so out of date

royal nymph
#

try changing it to sonnet 4

royal nymph
jade stone
cinder egret
#

sadan and vee being ai bros is to be expected…..

#

oh mb

#

husking instantly at the same time.. the deep state is against me

royal nymph
jade stone
tired vigil
#

isn't grock just a chat gpt wrapper

valid jetty
#

grok is like chatgpt but racist

royal nymph
royal nymph
stark timber
jade stone
#

tsserver try to autocomplete symbols property challenge (impossible)

#

this is the second issue i've reported on this

royal nymph
#

simply dont use symbols

jade stone
#

@haughty socket guh
just typescript parse time

supple whale
jade stone
supple whale
#

and well

#

secure

#

fucking private

#

symbols is where its at

supple whale
#

i forgot

#

use that

#

its good

royal nymph
royal nymph
jade stone
#

oh, this looks like a neat API, i wonder why it isn't showing up in typescript

#

ill enjoy using it in three years

jade stone
#

polyfills my belove

#
crude star
royal nymph
#

I will never stop using esbuild

#

I love esbuild for its simplicity

jade stone
royal nymph
#

I used rollup and disliked it

crude star
#

i really don't understand webpack and such

royal nymph
#

but vite seems better than rollup

#

painless with frameworks like astro

crude star
#

like it kinda makes sense having dynamic modules, but if they all get packed in the same chunk then..???

jade stone
crude star
#

why not just compile like esbuild does

royal nymph
jade stone
#

yeah

royal nymph
#

using vite for a Discord bot is crazy

jade stone
#

afaik it's a bit weird on node tho

royal nymph
#

but you could just use tsc

jade stone
royal nymph
#

yes

#

that's why i use esbuild

#

tsc go might change it

jade stone
royal nymph
#

btw how is typescript in node implemented? @crude star if you know

#

like what parser does it use

#

does it use tsc and be slooow

crude star
#

I think it's their own parser

#

bc its just as fast as js

jade stone
#

(i looked this up the other day)

crude star
#

yeah i heard that name

royal nymph
#

ducko wrote

jade stone
royal nymph
#

no i made that up

crude star
#

wtf its swc

jade stone
ionic lake
dense sand
#

wtf does this mean, its regular uint8_t nooo

jade stone
dense sand
ionic lake
#

i can run my bot standalone without the dashboard

#

doing this also gives me free access to everything from oceanic

valid jetty
ivory heath
#

I think at some point i should stop and ask myself why

func progressCallbackCFunction(current, total C.int64_t, ptr *C.void) {
    ptrInt := int64(*((*C.int64_t)(unsafe.Pointer(&ptr))))
}
royal nymph
frosty obsidian
#

why is ferris portrayed as seething, he looks enthusiastic about sharing knowledge

hexed surge
#

Does Vencord, discord servers allow you to create RTC and other connections?
For example, only for sound, and work on the basis of streaming, but for sound?

lavish cloud
deep mulch
#

i love compose

royal nymph
#

sane

#

do this for rini native @crude star

jade stone
haughty socket
#

There's no way that's necessary

#

But I can't prove it

jade stone
#

what does const on a type parameter even do

royal nymph
jade stone
#

INSANE COMMIT FORMAT

haughty socket
#

That covid pandemic format

jade stone
#

@royal nymph adding πŸ”§ to all my vencord prs

royal nymph
royal nymph
#

I never tried elysia I just follow aom cause hes cute

haughty socket
#

I'm ok with insane types

#

But like computed

royal nymph
#

computer

#

where?

#

you from sea too?

#

why is every RN mod dev from sea

frosty obsidian
# jade stone

conventional commits but with emojis bc mentally im a 5 year old

jade stone
#

i think this was the most insane type i ever wrote

type IsNever<T> = [T] extends [never] ? true : false;
type AssertedType<T extends Function, E = any> = T extends (
  a: any
) => a is infer R
  ? R extends E
    ? R
    : never
  : never;
export function findParrent<
  T extends Node = never,
  F extends Function = never,
  R extends Node = AssertedType<F, Node>,
>(
  node: Node,
  func: IsNever<T> extends true
    ? F extends (a: Node) => a is IsNever<T> extends true ? R : T
      ? F
      : never
    : (a: any) => a is IsNever<T> extends true ? R : T
): IsNever<T> extends true ? R | undefined : T | undefined {
  while (!func(node)) {
    if (!node.parent) return undefined;
    node = node.parent;
  }
  return node;
}
frosty obsidian
#

ooo pretty picture 🀀 🀀

royal nymph
frosty obsidian
#

they aren't even consistent with it

#

they use docs and doc

#

sometimes they use pencil and paper emoji and sometimes its a book

jade stone
#

it's the only way to tell if something is never

royal nymph
#

bro had a front row seat

haughty socket
#

Does never extends T not work

jade stone
haughty socket
#

Not a type

royal nymph
#

is never the nan of typescript

haughty socket
#

NaT

royal nymph
#

as in nan != nan

haughty socket
#

Empty set is not a superset of empty set πŸ’”

#

Axiom of delusion πŸ’”

jade stone
frosty obsidian
#

yeah its pretty bad when you need a table like that

#

glad my language is more sane in that regard

#

you never use that

jade stone
royal nymph
haughty socket
#

My edge case

royal nymph
frosty obsidian
jade stone
haughty socket
#

Doom library

#

Doom.kt

royal nymph
#

it's a spoiler 😭

#

clock on the left

haughty socket
#

Top left

jade stone
#

Didn't work

#

Discord mobile has no bugs

haughty socket
#

Clock on the top left

frosty obsidian
#

weird

#

seems to work for me no problem

jade stone
haughty socket
frosty obsidian
#

obviously

frosty obsidian
haughty socket
#

Clock on the top left

frosty obsidian
#

also update your phone

#

qpr should be out by now

haughty socket
#

It updated 2 days ago

jade stone
frosty obsidian
#

you mean right now?

jade stone
#

Less now

frosty obsidian
#

yeah its not in beta anymore

jade stone
#

But it was pretty bad a bit ago

haughty socket
#

I only have bug fix available

frosty obsidian
#

breaking news: betas tend to be worse in performance

#

qpr1 should be released

#

idk why you're not getting it

haughty socket
#

I'm on 15

#

Why

#

Why

frosty obsidian
#

oh you aren't even on 16 yet?

#

how

haughty socket
#

I loed

#

It's 16

#

I lied

jade stone
frosty obsidian
#

i accidentally stayed on the beta program so now im stuck on qpr2 beta release that added annoying pip bug

jade stone
valid jetty
#

horror

viscid grove
#

not exactly programming, but does anyone know how to add something to the main windows 11 context menu (1) instead of the more options version (2)?
I kind of want to remove edit in notepad and notepad++, and add edit with vscodium there
I haven't been able to find anything online

winged mantle
dense sand
#

guys im looking for a frontend stack which is not nextjs but is react, any tips? like so far tanstack router with vite was my option, but ill take any recommendations

spark tiger
nimble bone
#

tbh just disable the new menu it sucks

deep mulch
nimble bone
ionic lake
dense sand
viscid grove
lavish cloud
viscid grove
#

I thought this was what was adding it, idk though. when I removed it, it didn't disappear, but maybe it needs a computer restart for some reason

brisk sentinel
#

is rhis chanel progaming or programing

#

am a bit slow

spark tiger
brisk sentinel
#

oh oka

fleet cedar
#

Channel desc says so

jade stone
lavish cloud
#

<10MB on a website I use it for

lavish cloud
jade stone
#

the entire js for my website is only like 300kb

pseudo sierra
lavish cloud
lavish cloud
tired vigil
lavish cloud
#

it becomes bigger instead of smaller

tired vigil
#

😭

valid jetty
#

it encodes 3 bytes into 4 chars

lavish cloud
#

shhh you get the idea

winged mantle
#

i assume that's not all code you wrote

scarlet tendon
#

should this be safe to do

shrewd canopy
#

that's not supported by Windows itself

scarlet tendon
#

wdym

#

it works fine on my bios pc without uefi

#

pop os is being weird

shrewd canopy
#

its all fun and games till Windows' updates (or bootloader) overwrite grub (or vice versa)

scarlet tendon
#

im on uefi on this oc

#

pc

jade stone
supple whale
#

my entire app is fucking 1MB

#

w/o assets

#

2MB with C code compiled to JS via WASM2JS

#

XD

jade stone
#

it's all of discord's intl keys

nimble bone
#

we need to make satan stop using react

lavish cloud
#

what if we make satan use react

#

then tell all react devs they're doing what satan wants them to do

#

then they'll stop using JS

pseudo sierra
#

TRUE

lavish frigate
lavish cloud
#

?

pseudo sierra
#

nina #1 react shill

lavish frigate
#

You are 8 years late

lavish cloud
#

fym how do you even prove that

#

you got a pull request from hell or something

pseudo sierra
#

yes

lavish cloud
#

but also wouldnt I have been 12 years late

worldly sigil
#

programming languages derived from historic religious figures

lavish frigate
lavish cloud
#

but react was released 12 years ago so wouldn't satan have used it back then already

lavish frigate
#

12 years late would be lizard people, not satanic, satanic takes a while to get on new tech

lavish cloud
#

why are we even having this discussion satan isnt real

lavish frigate
#

satan is real

tulip warren
ornate quiver
#

@jade stone ?

sweet pebble
#

ive created a list of plugin ideas, is there any that u guys would object to? or say i shudnt bother with?

fleet cedar
#

Just wrap the link in <>

sweet pebble
#

<C:\Users\lando's pc\Documents\VAULT\Collection of Pictures>

#

oh shit that sorta works thanks

fleet cedar
#

I guess, but I meant for the one that involves links

valid jetty
frosty skiff
tired vigil
hazy pine
jade stone
jade stone
#

tsserver insane

valid jetty
#

proposing making fn it == y as shorthand for fn(x) x == y

#

opinions??

#
while server.is_err_and(fn(err) err == Errno::EADDRINUSE) {
    server = TcpServer::bind(port += 1);
}

shorthand

while server.is_err_and(fn it == Errno::EADDRINUSE) {
    server = TcpServer::bind(port += 1);
}
jade stone
valid jetty
#

this would come with a foreach shorthand too

for <expr> {
    $dbg(it);
}

as a shorthand for

for x in <expr> {
    $dbg(x);
}
crude star
valid jetty
#

(0..3).map(fn it * 2).intersperse(0).collect()

#

[0, 0, 2, 0, 4, 0]

ivory heath
#

This feels like delving into function and also unreadable insanity

valid jetty
#

it's not a keyword

#
for 0..10 {
    $dbg(it);
}

is shorthand for

for it in 0..10 {
    $dbg(it); 
}
#

there's no special case fuckery, it just automatically declares a variable for you if you don't give it a name yourself

ivory heath
#

Yes in the first one where is it being defined as the variable

valid jetty
#

yeah

#

oh what

#

that was a question

#

the first one is semantically equivalent to the second one

#

i'm not sure what you mean by where

ivory heath
#

Yes but where in for 0..1 do you define IT being the value

valid jetty
#

you don't

ivory heath
#

So it’s a keyword

valid jetty
#

unless you do for x in y in which case x will be the name

crude star
#

doesn't have to be

valid jetty
#

the first one basically creates the second one

#

it's syntax sugar

#

it would be a keyword if it had some special binding or special meaning but it's just the default name for the variable in the foreach unless you specify one yourself

lavish frigate
#

That’s so weird

#

Why

valid jetty
#

basically if you don't add the ... foo in ... part, it will assume you want ... it in ...

lavish frigate
#

What’s the benefit of this

#

Apart it not being clear (I guess the benefit is confusing people new to the language?)

valid jetty
#

very often i just wanna iterate values of something which is iterable and i don't wanna come up with a name for the element lol

crude star
#

kotlin has it

valid jetty
#

and jai

ivory heath
#

I think it’s potentially very misleading f

valid jetty
#

and odin (iirc)

crude star
#

those are not real languages sorry

valid jetty
#

i'm pretty sure swift also has it

crude star
#

it's $0

valid jetty
#

oh yeah

valid jetty
#

and it's annoying

#

i think scala uses _ instead of it?

crude star
#

ugly

valid jetty
#

yeah i don't like that either

#

the only other one i would consider is $ but that's out of the question because that's the alias to create tuples

pearl stagBOT
crude star
#

why are tuples limited to 2 elements 😭 😭 😭 😭

valid jetty
#

because i haven't written n-tuples yet

pearl stagBOT
valid jetty
#

any more and you might aswell just use a struct tbh

crude star
#

horror

deep mulch
#

@crude star@valid jetty hiiii

crude star
#

at least name it pair

#

or something

deep mulch
#

yop

valid jetty
#

Pair<T, U> and Polycule<T, U, V>

deep mulch
valid jetty
#

it's fine because most of the time you won't even see the name of the tuple type

#

there is a type alias of (T, U) to Tuple<T, U>

crude star
#

unusable language

deep mulch
#

elle syntax evil

crude star
#

steal julia pairs a => b

valid jetty
crude star
#

or kotlin a to b

valid jetty
#

i'm writing all of my school projects in it and it's more pleasant than c#

deep mulch
#

well anything more pleasant than C#

crude star
#

im writing all my school projects in riniscript and its more pleasant than malbolge

deep mulch
#

@crude star

#

hii

crude star
#

@deep mulch

deep mulch
#

hiiiii

crude star
#

Malbolge was very difficult to understand when it arrived, taking two years for the first Malbolge program to appear. The author himself has never written a Malbolge program. The first program was not written by a human being; it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp.

#

this is elle

deep mulch
#

this is the rini

jade stone
#

thanks vscode

#

it's been like two minutes

#

why is clang-format so slow

crude star
#

wtf are you formatting

valid jetty
#

would make

$map(
    $("a", 1),
    $("b", 2),
    $("c", 3),
);

into

$map(
    "a" to 1,
    "b" to 2,
    "c" to 3
);
#

i also wanted to fix that fucked up array init syntax

#
[i32; 1, 2, 3];

into

[1, 2, 3]i32;
#

or

[Note;];

into

[]Note;
#
x := []Note;
crude star
#

GUH

jade stone
jade stone
valid jetty
#

which part is guh

#

is the new syntax guh or the old syntax or what

#

😭

crude star
#

both

valid jetty
#

what do you propose instead

#

i kinda like the 2nd one, it makes some symmetry between the value and the type

#

the type is Note[], the value is []Note

jade stone
#

but it's not perfect

#

waiting on that blobcatcozy

shrewd canopy
crude star
#

use js-beautify

spark tiger
crude star
#

it uses nothing

#

node runs typescript directly now

#

no

#

use relative imports

ionic lake
#

you can assign them in package.json

#

"imports": {
"#framework": { "types": "./src/framework/index.ts", "default": "./src/framework/index.ts"
}
},

#

here you go

crude star
#

oh huh

#

does node actually support

ionic lake
#

yes

#

not globs though

crude star
#

guhhh

#

will they ever ship a complete feature

#

dont use its malware

ionic lake
#

undo what

#

just use whatever you want

#

lmao

crude star
#

Entries in the imports field must be strings starting with #.

#
{
    "compilerOptions": {
        "allowImportingTsExtensions": true,
        "strict": true,
        "verbatimModuleSyntax": true,
        "module": "nodenext",
        "moduleResolution": "nodenext",
        "noEmit": true,
        "target": "esnext"
    }
}
#

my paige is so useless

#

tbh

#

dont use tsx

#

why do you need

ionic lake
#

tsx is not supported by node

ionic lake
crude star
#

so baddd

ionic lake
#

you will need to use something like tsx or oxnode

#

its okay roshie

#

you'll be fine.

crude star
#

my paige is so dumb man

ionic lake
#

paige is not dumb at all

#

just a bit frustrated...

#

wait are you using oceanic?

#

It's because oceanic.js is still on cjs, and it's not mixing well

#

I fixed it by downgrading tsx but well you could probably enable the cjs typescript flags

crude star
#

horror

ionic lake
#

Let me look into it

#

I'm working on my bot too

crude star
#

node --disable-warning=ExperimentalWarning --experimental-transform-types src/index.ts

#

just works

#

never using anything else now (lie)

ionic lake
#

Version is tsx@4.7.0

crude star
#

esbuild src/index.ts --bundle --platform=node --format=esm --sourcemap=inline | node --enable-source-maps -

ionic lake
#

are you filesystem loading

#

jiti also works? im getting a different error but feel free to try

#

you need to define jsxFactory

#

in tsconfig

#

i think ur using venbot cv2 code but look into its tsconfig

jade stone
#

esbuild based iirc

ionic lake
#

no it's using babel

jade stone
#

oh

#

maybe i'm thinking of something else

ionic lake
#

yes it just basically compiles with esbuild's transform api and then sends it to node

#

then its in build.mjs

crude star
pearl stagBOT
# crude star use my shitty replacement https://github.com/rniii/tetris-vendor/blob/main/src/c...

tetris.ts: Lines 69-87

ActionRow([
    TextButton("swap", {
        style: ButtonStyles.SECONDARY,
        emoji: { name: "πŸ”€" },
    }),
    TextButton("hard-drop", {
        style: ButtonStyles.SECONDARY,
        emoji: { name: "⏬" },
    }),
    TextButton("none1", {
        style: ButtonStyles.SECONDARY,
        label: "\u200b",
        disabled: true,
    }),
    TextButton("rotate-left", {
        style: ButtonStyles.SECONDARY,
        emoji: { name: "β†ͺ️" },
    }),
]),
ionic lake
#

one sec

#

point jsxImportSource to runtime.ts

crude star
#

@young flicker

#

dude just ```ts
const TextDisplay = (content: string): TextDisplayComponent => ({
type: ComponentTypes.TEXT_DISPLAY,
content,
});

lucid trail
#

my math prof used maple mono on her slides

ionic lake
#

@young flicker you still want it?

royal nymph
#

just import runtime somewhere and make them global functions

#

and set jsxFactory and jsxFragment in your tsconfig

#

should work

#

actually

#

node doesn't support it probably

jade stone
#

guh

I am going to go insane

ionic lake
#

hi

sweet pebble
sweet pebble
#

this is prolly a bad time for me to make vencord plugins today skull_cry 13 thanks ddos

lavish cloud
#

I take it back @lavish frigate the devil does use react

lavish frigate
#

❀️

jade stone
#

vue hurts my head too much

#

how is there hot reload for components but not css

royal nymph
#

wtf lmaoo

frosty obsidian
#

did you not even look at the preview in obs

frosty obsidian
#

sadan ignoring 2/3rds of the screen

#

default i think

#

it came with the kde that i installed

pearl stagBOT
royal nymph
#

RECORDED THE WRONG MONITOR award

frosty obsidian
#

no i just mean the widget (or w/e kde calls them) comes preinstalled

jade stone
#

it's the Global Menu in kde itself

frosty obsidian
#

global menu is included by default you just have to add it to a panel yourself

jade stone
#

HLJS supports nix

formal belfry
#

Something shat itself
React is not defined

crude star
#

define it??

deep mulch
jade stone
#

vue is insane

#

i don't understand how people use it

deep mulch
#

@jade stone loves vue

ionic lake
#

I love vue

#

its awesome

jade stone
ionic lake
#

have fun

dense sand
#

color-name but it seems it already got reverted

merry kettle
#

Is this an help channel?

elder yarrowBOT
nimble bone
#

vbun

stark timber
#

seriously how is this ever undefined

#

this has to be a problem with the minifier right?

#

when registerContext gets imported shouldn't that contexts variable be initialized?

#

idgi

crude star
#

what bundler are you using

stark timber
#

rolldown

fleet cedar
#

What blunder are you using

crude star
#

its undefined if the function gets called before that line

#
registerContext(whatever);

const contexts = new Set();
stark timber
#

this is minified

#

wait

crude star
#

well

#

when is init context called

deep mulch
#

@crude star

stark timber
#

a bunch

#

this is how the error occurs

#

but it should be fine no??

#

wait

#

I get it

stark timber
#

how do I even fix that 😭

#

I think it's circular import bc context imports plugins set from plugin and then plugin imports registerContext from context

#

which is usually fine I think but bc the set gets defined at the bottom of those init things it BREAKS

#

@lyric latch ik u use rolldown do u have this issue too or naw

#

yeah but init_plugin also calls init_context

#

yeah

#

how do I even fix this tho

#

😭

#

yea that's what I was doing before but eh

#

is it acceptable

#

to have like

#

a registry.ts file

#

where I have the contexts set and the plugins set and whatever else

#

ohhhhhhhhhhhhhhhhhhhhhhh

#

wait that makes sm sense

#

thx goat

stark timber
#

it works!

stark timber
#

@lyric latch do you know why this happens

#

lol

#

also it's already closed

winged mantle
#

maybe people should avoid using too many libraries

#

reinventing the wheel can have advantages

#

of course you need to use some its just sometimes ridiculous

lavish frigate
#

No I think this is fine

winged mantle
#

use libraries for things which are actually hard

lavish frigate
#

No purposefully use libraries which got hacked

winged mantle
#

there's just one problem with that

lavish frigate
# spark tiger

In case you didn’t get it all of these were under the latest supply chain attack

winged mantle
#

yeah that's the point people should avoid using too many libraries

#

it increases the probabability of being affected by some kind of attack

#

probababilitiy

lavish frigate
#

Most people don’t use any of these directly but they are part of some larger framework which people do use

winged mantle
#

framework authors are people too

lavish frigate
#

I don’t think so

#

I actually think they are plue

#

Actually I think people should get more into assembly making an 6502 emulator has been quite fun

winged mantle
#

i made one too but had no idea how to test it without attaching a display

#

i guess it is doable to use nes test rom without ppu

#

also 6502 isn't just nes specific

lavish frigate
#

I can send it later I’m outside rn

winged mantle
#

outside? with your laptop?

lavish frigate
#

No I’m sending this on my phone in car rides the pic I sent was from yesterday

winged mantle
#

(sorry i just found it funny to say this because of a conversation i had with some other people)

lavish frigate
#

on patreon but its a free post

#

and in case you dont want to actually read this the test roms are at the very bottom

deep mulch
#

the roms

winged mantle
#

i prefer to work things out without tutorials

lavish frigate
#

im deviating extremely from the tutorial because the tutorial is extremely basic

#

but the tutorial contains a lot of small stuff you can easily overlook

#

like you cant tell me you can find out yourself that the nes decrements the stack by 3 on startup????

jade stone
#

really good

lavish frigate
#

yeah i did

#

thats what inspired me to make my own emulator

jade stone
crude star
ivory heath
#

bitpacking makes me go fucking insane

#

37%

#

37% for 10 bit values and 25% for 12 bit

#

and for anything larger than a few thousand samples it runs at GIGABYTES a second single threaded

jade stone
#

@deep mulch you love dynamic typing in rust

deep mulch
#

scary

fleet cedar
dense sand
#

i want to scrape a website but its protected by CF check, is there any way to bypass it?

fleet cedar
#

Literally the whole point of CF is to stop people like you

dense sand
#

i know, i just want my train data sobvelasmutny

shrewd canopy
dense sand
#

like puppeteer?

shrewd canopy
#

yeah or playwright

dense sand
dense sand
#

tried to use puppeteer but cloudflare still blocked it

pseudo sierra
#

flaresolverr sillycat

dense sand
jade stone
#

why does it seem that every crate i use is made by this same guy

shrewd canopy
#

plus serde

jade stone
supple whale
jade stone
#

who knows what else transitively

supple whale
#

80% of shit was made by feross, diego or endless

#

or mafintosh

jade stone
#

how is this still not a thing

#

insane

delicate groveBOT
#

Alright @dense sand, in 5 hours, 20 minutes and 1 second: arch linux presentation

jade stone
#

guhh why is there no method to get T or E from Result<T, E> where T and E implement a common trait

fleet cedar
#

What type would that method return?

valid jetty
#

can you return &impl T?

#

is that a thing

fleet cedar
#

Sure

valid jetty
#

then that

fleet cedar
#

But that's one type, not two

valid jetty
#

Box<dyn T>

fleet cedar
#

Can't be generic over traits though

#

You could certainly have a fn either(&self) -> &dyn Debug where T: Debug, E: Debug

valid jetty
#

can you make a macro that does basically

if let Ok(v) = x { v as impl T } else { x.unwrap_err() as impl T }

#

i'm typing on my phone and can't test any of this

#

if it seems like garbage, it is

fleet cedar
#

No, both if branches have to have the same type

valid jetty
#

hmmmm

crude star
#

i think you can only return impl in function signatures

valid jetty
#

well yeah but the macro wouldn't have an explicit return type

crude star
#

and when you do you can't actually use diff types

#

it just becomes an opaque type

valid jetty
#

i don't remember how you cast an rval to a particular trait to perform specifically that trait's methods

fleet cedar
#

You can Debug::fmt(&foo)

crude star
#

boxed dyn

valid jetty
#

because foo.bar() is ambiguous there was some way to call bar on the right trait without Foo::bar(&foo)

#

i don't remember what the syntax is tho

crude star
#

i don't think that's a thing

valid jetty
#

you can just as &dyn T

#

hopefully the optimizer will refrain from creating a vtable

crude star
#

/run ```rs
trait T {}
struct A {}
struct B {}
impl T for A {}
impl T for B {}

fn foo(x: bool) -> impl T {
if x {
A {}
} else {
B {}
}
}

rugged berryBOT
#

@crude star I received rs(1.68.2) compile errors

error[E0308]: `​if`​ and `​else`​ have incompatible types
  --> file0.code:12:5
   |
9  | /   if x {
10 | |     A {}
   | |     ---- expected because of this
11 | |   } else {
12 | |     B {}
   | |     ^^^^ expected struct `​A`​, found struct `​B`​
13 | |   }
   | |___- `​if`​ and `​else`​ have incompatible types
   |
help: you could change the return type to be a boxed trait object
   |
8  | fn foo(x: bool) -> Box<dyn T> {
   |                    ~~~~~~~  +
help: if you change the return type to expect trait objects, box the returned expressions
   |
10 ~     Box::new(A {})
11 |   } else {
12 ~     Box::new(B {})
   |

error: aborting due to previous error

For more information about this error, try `​rustc --explain E0308`​.
chmod: cannot access 'binary': No such file or directory
error[E0308]: `​if`​ and `​else`​ have incompatible types
  --> file0.code:12:5
   |```
valid jetty
#

well yeah that's not what i meant tho

#

hold on let me get in the car

jade stone
jade stone
valid jetty
# hoary sluice

i didn't understand a single word of this other than "advent of code"

lavish frigate
crude star
#

wtf is this

delicate groveBOT
#
Reminders
1530112: <t:1757534400:R>

arch linux presentation

delicate groveBOT
#

@dense sand, <t:1757515199:R>: arch linux presentation

pseudo sierra
shrewd canopy
#

πŸͺŸ

supple whale
tired vigil
#

nyaa~

jade stone
#

rust macros my beloved

deep mulch
#

@jade stone next_sadan

jade stone
hoary sluice
#

@valid jetty im gonna be a shepherd

#

fuck this

ornate quiver
#

tf

valid jetty
winged mantle
#

have an appetite for c++ again πŸ˜‹ but i think i want to avoid iostream this time

#

and write it more like c

#

is this weird

deep mulch
#

no

winged mantle
#

i feel an urge to write pre c++11

#

but it's probably not that pleasant

#

idk i just want to return pointers from things

#

and basically write c with classes

#

and have wanted to for a while

#

i imagine c++11 irons out some quirks

#

and has some things that i would otherwise need to implement myself for no good reason

limpid mica
#

that or use a LOT of boost

winged mantle
#

i think it's the metapgoramming that turns me off c++ sometimes

limpid mica
#

i used to use boost::bind and boost::function so much

winged mantle
#

i've tried c many times but it always feels like well... c++ is basically just c without handicaps.. right

limpid mica
#

yeah

#

ig

winged mantle
#

the real problem with c++ is it's a slippery slope

limpid mica
#

what do you mean? hides her c++26 codebase under the table

winged mantle
#

i think c is an impressive language considering it often makes modern languages look dumb with the way they do things

#

C:

struct Person {
  const char *name;
  int age;
}

Java (before records):

#

(give me a second)

#
public class Person {
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public boolean equals(Person other) {
        if (this == other)
            return true;
        if (other.getClass() != Person.class)
            return false;

        return Object.equals(this.name, other.name) && this.age == other.age;
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.name, this.age);
    }
}
#

OK OK, c doesn't give you equals and hashCode for free either

#

but if you don't implement them in java right away you might be in for some surprises, because every object has these methods with default behaviour if you don't specify your own

jade stone
winged mantle
#

true

#

but look at actual java code written before 202x

winged mantle
#

string views are far too handy - i implemented them while making a c interpreter

#

for the lexer

ivory heath
#

Many apis do it as well

winged mantle
#

true

#

opaque pointesr

#

it's just this... at least at one point was like the default way of doing things

#

using opaque pointer/pimnpl outside of a library would be a bit weird?

ivory heath
#

Hidden state is common to do all the time in c libs

#

C libs do exactly what you’re complaining about that Java does

valid jetty
#

especially when you define a setter

#

like why define a setter and getter at all just make the field public

ivory heath
#

It’s common at least in Java or some other oop languages because there is implicit logic that is ran when state is updated

#

Let’s say for example we have a vector class.

The could for example just change the int that says how long the memory allocation is to whatever we want.

Instead we have a .set() or .reserve() that implicitly calls Malloc or whatever we use

#

Or you trust the user to manage our state

#

And the end user will never do it correctly.

#

C is amazing in its simplicity but it does not stop you from blowing your whole god damn foot off

#

If anything with asinine things like inconsistent implementations of strings it’s very easy to do so

winged mantle
winged mantle
#

this is... correct... right..? 😟

#

c strings are also not that efficient though

#

strcat is iterating the string again for the null terminator

ivory heath
#

The fact it isn’t even standardized

ivory heath
valid jetty
# winged mantle i don't think joining together two strings is that much harder than c++ but i ca...
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>

char *__nstrcat(char *strings[], int n) {
    size_t sizes[n];
    size_t length = 0;

    for (size_t i = 0; i < n; ++i) {
        sizes[i] = strlen(strings[i]);
        length += sizes[i];
    }

    char *result = malloc(sizeof(char) * (length + 1));
    size_t index = 0;

    for (size_t i = 0; i < n; ++i) {
        char *current = strings[i];

        for (size_t j = 0; j < sizes[i]; ++j) {
            result[index] = current[j];
            index += 1;
        }
    }

    result[index] = '\0';
    return result;
}

#define nstrcat(...) __nstrcat((char *[]){ __VA_ARGS__ }, sizeof((char *[]){ __VA_ARGS__ }) / sizeof(char *))

int main() {
    char *res = nstrcat("a", "foo", "..mroww", "\n");
    printf(res);
    return 0;
}
tired vigil
#

That's so cool

#

Where are you pulling this data from?

supple whale
#

as all other anime metadata in the app

#

well.. for the most part

tired vigil
# supple whale anilist

I've never seen the relations visualized through a graph automatically (ik that people usually make these graphs by hand) so I was wondering if there's like an endpoint that returns all related anime, or do you like have to recursively fetch everything

shrewd canopy
#

GraphQL πŸ’€

supple whale
#

their gql server shits itself after 3 recursions

#

so i need to run multiple queries

#

abd de-duplicate

tired vigil
#

😭

supple whale
supple whale
#

automatic entity normalized offline caching its nuts

#

i just run a query, and URQL goes "ah, I've seen that one before" and resolves the query based on the data in your cache without needing to run network requests

#

like what???

valid jetty
supple whale
#

i think i was up at 4am today coding it

#

cuz i couldnt sleep

#

so i forced myself to code

winged mantle
#

i just had a strange thought

#

i feel like i might end up writing a c++ projcet without using stdc++ at all

#

if you use new i assume you need it at runtime though?

#

"vector is too annoying to use, i'll just use malloc and realloc"

#

i am basically writing legacy c++

#

in 2025

ivory heath
#

For example ffmpeg will return a char ptr of the string name of a pixel format if you pass the enum value

#

But never actually clarifies if for example if it’s a static const global or a copy you must free

winged mantle
#

why would you need to free that

#

that would be dumb

ivory heath
#

Because the pointer and ownership is passed to you

winged mantle
#

it's probably returning literals

ivory heath
winged mantle
ivory heath
#

It’s implicit in behavior

#

It’s not literal ofc

winged mantle
#

yeah but you can't assume everything a function returns to you now belongs to you