#🪅-progaming

1 messages · Page 101 of 1

winged mantle
#

values have to have a size to exist in memory

valid jetty
#

it works just like you can define an empty vec without a type annotation and then push some T into it and the vec is inferred to be T

#

rust doesn’t know what type the integer is when you first define it, it infers it later from context

winged mantle
#

horror

#

that should be explicit

valid jetty
#

well if rust can’t determine what type it is, it will usually guess i32, however like 九八 said, if you’re passing it to a trait object you need to specify because rust might guess wrong and break stuff

winged mantle
#

IMO types should only be infered from the initial declaration of a variable

tired vigil
#

honestly typescript should add rust's type inference blobcatcozy

winged mantle
#

horror

#

i find it weird for a language all about safety to have advanced inference like this where IMO being explicit wouldn't hurt as well as macros
i doubt rust's implementations of either reduce safety in practice, but I think they can hurt readability
it feels weird because a lot of stuff is more verbose so it feels like it mainly serves to balance this issue xD

valid jetty
#

rust is a very verbose language, having heavy inference helps combat that

#

like for example elle’s inference isn’t as good but it’s a managed language so the verbosity isn’t as much there

#

there’s a balance

fleet cedar
#

I have never seen any evicence for the claim that rust us verbose

lavish cloud
astral swallow
#

how i can easy edit discord color pallete?
early (before discord theme update) i can edit "hsl" values to these result
But in new versions it not working

--theme-h: 0;
--theme-s: 0%;
--theme-l: 19%;
#

I`m tried edit this values but it dont work too..

lavish frigate
lavish frigate
#

JavaScript really is the most advanced programming language

spark tiger
#

how does it work isob

lucid trail
spark tiger
dawn ledge
#

only cares about the september 11 part

spark tiger
#

is it cuz im on firefox

dawn ledge
#

works in chrome

spark tiger
dawn ledge
#

i guess firefox handles date parsing PROPERLY

spark tiger
dawn ledge
#

nvm then

#

js fucking sucks

lavish frigate
#

i think there is another much better solution here that you can use if you clear your mind of the whole needing to have everything be a giant "array" of any type thing
(like structs.... crazy concept i know!)

#

tbh as a javascript developer idk i only know objects they seem similar tho idk

#

this is why new projects always have a million deps

ionic lake
supple whale
#

what doesnt firefox handle differently

frosty skiff
lavish frigate
#

😭

tired vigil
lavish frigate
#

why do you even need a conditional when round()

crude star
crude star
dawn ledge
#

yeah let me just have a 5000 bit long integer

supple whale
dawn ledge
#

🥰

#

just use a language that has packed structs and variable lengths integers
and have a packed struct with u1 fields, way easier to work with

shrewd canopy
winged mantle
#

is there a js lib for packed structs

supple whale
winged mantle
#

what if there was like a bigint backed proxy

spice token
#

gaming

winged mantle
#
const myStruct = packedStruct({
    hp: 5,    
    alive: 1,
});

console.log(myStruct.hp); // 0
console.log(myStruct.alive); // false

myStruct.alive = true;

console.log(myStruct.bits().toString(2)); // 100000
#

/run

function packedStruct(def) {
    let bits = 0n;
    const result = {
        getBits() {
            return bits;
        }
    };

    let offset = 0n;
    for (const [key, size] of Object.entries(def)) {
        const mask = BigInt(parseInt("1".repeat(size), 2)) << offset;
        const thisOffset = offset;

        Object.defineProperty(result, key, {
            enumerable: true,
            get() {
                const masked = (bits & mask) >> thisOffset;
                
                if (size === 1)
                    return masked !== 0;
                else
                    return masked;
            },
            set(value) {
                value = BigInt(value);
                value <<= thisOffset;
                value &= mask;
                bits |= value;
            }
        });

        offset += BigInt(size);
    }

    return result;
}
const myStruct = packedStruct({
    hp: 5,    
    alive: 1,
});

console.log("HP: " + myStruct.hp);
console.log("Alive: " + myStruct.alive);

myStruct.alive = true;

console.log("Alive after update: " + myStruct.alive);

console.log("Raw bits: " + myStruct.getBits().toString(2));
rugged berryBOT
#

Here is your js(18.15.0) output @winged mantle

HP: 0
Alive: true
Alive after update: true
Raw bits: 100000
dawn ledge
#

if anything its worse

winged mantle
#

yeah but it's funny

supple whale
#

/run

const v8 = require('v8')

class Packeted {
  constructor(bits) {
    if (bits) {
      for (const [key, value] of Object.entries(v8.deserialize(bits))) {
        this[key] = value
      }
    }
  }
  get bits () {
    return v8.serialize(this)
  }
}
const x = new Packeted()
x.test = 12
console.log(x.bits)
console.log(new Packeted(x.bits))
rugged berryBOT
#

Here is your js(18.15.0) output @supple whale

<Buffer ff 0f 6f 22 04 74 65 73 74 49 18 7b 01>
Packeted { test: 12 }
supple whale
#

eh

winged mantle
#

lame

#

implementation depednent

valid jetty
#

thats not even packed

#

use Uint8Array

winged mantle
#

it's so good

#

what if i store hp

valid jetty
#

fyi it doesnt work

#

oh wait

winged mantle
#

/run

function packedStruct(e){let t=0n,r={getBits:()=>t},n=0n;for(let[l,u]of Object.entries(e)){let f=BigInt(parseInt("1".repeat(u),2))<<n,i=n;Object.defineProperty(r,l,{enumerable:!0,get(){let e=(t&f)>>i;return 1===u?0!==e:e},set(e){e=BigInt(e),e<<=i,e&=f,t|=e}}),n+=BigInt(u)}return r}
const myStruct = packedStruct({
    hp: 5,    
    alive: 1,
});
console.log("HP: " + myStruct.hp);
console.log("Alive: " + myStruct.alive);
myStruct.alive = true;
myStruct.hp = 7;
console.log("HP after update: " + myStruct.hp);
console.log("Raw bits: " + myStruct.getBits().toString(2));

rugged berryBOT
#

Here is your js(18.15.0) output @winged mantle

HP: 0
Alive: true
HP after update: 7
Raw bits: 100111
valid jetty
#

no it was 0 from the start

#

the hp doesnt work from the original object

supple whale
#

bu hey it works

winged mantle
supple whale
#

and likely will be the fastest solution you'll be able to ever produce

winged mantle
#

in object you specify field width

#

hp is 5 bits

valid jetty
#

why is that useful in any way

#

also why 5 bits 😭

winged mantle
#

enough to store hp

valid jetty
#

no packed struct has 5 bit fields unless theyre other structs

crude star
valid jetty
winged mantle
#

maybe we're storing boss hp

valid jetty
#

why would i want an upper limit of 31 hp

crude star
#

ur trolling her too much 😭

winged mantle
#

oh wait no it's right

#

for a mo i thought 1 + 2 + 4 (and therefore 0b111) was eight

lavish frigate
winged mantle
#

player has 20 hp

#

boss has 30 hp

supple whale
#

sir just v8 serialize and deserialize

winged mantle
#

megaboss has 31 hp

supple whale
#

its so so so much safer and faster

winged mantle
#

lameee

#

i will publish this to npm

crude star
#

its impossible to decode the object without also using v8

#

not network safe

winged mantle
#

this aim here was to have c style structs

#

where you specify with : syntax

crude star
#

what if format changes in versions

winged mantle
#

hmm maybe i could support parsing a c struct

crude star
#

true

lavish frigate
supple whale
lavish frigate
#

js devs are sooo insane

supple whale
crude star
supple whale
#

wont change now

#

anyays if ur dependencies do : "nodejs": "*"

winged mantle
#
const myStruct = cValue(`
#include <stdbool.h>

struct MyStruct {
    unsigned int hp: 5;
    bool alive : 1;
}

export MyStruct struct;
`)
supple whale
#

then u have a different problem

winged mantle
#

this is a superset of c that has thee export keyword

#

the export keyword is used to export the value which is translated into js land

crude star
#

extern...

lavish frigate
valid jetty
#

it might be useful

winged mantle
#

it's only implements this syntax

#

for anything more complex, it just uses ai to translate to js on the fly which is less reliable but allows anything

#

but it's only intended to be used with this syntax

valid jetty
#
type EnumToObject<Keys extends string[], Acc extends string[] = []> =
    Keys extends [infer First extends string, ...infer Rest extends string[]]
        ? { [K in First]: Acc["length"] } & EnumToObject<Rest, [...Acc, First]>
        : {};

type Split<T extends string, D extends string, Acc extends string[] = []> =
    Trim<T> extends `${infer First}${D}${infer Rest}`
        ? Split<Trim<Rest>, D, [...Acc, Trim<First>]>
        : [...Acc, Trim<T>]
        
type Whitespace = " " | "\n" | "\t";
type Trim<T extends string> = 
    T extends `${Whitespace}${infer R}` 
        ? Trim<R> 
        : T extends `${infer R}${Whitespace}` ? Trim<R> : T;

function enu_m<T extends string>(x: T) {
    return x.split('\n').filter(Boolean).reduce(
        (acc, cur, i) => ({ ...acc, [cur.trim()]: i }), 
        {} as EnumToObject<Split<T, '\n'>>
    );
}

const x = enu_m(`
    First
    Second
    Third
    Fourth
    Fifth
`);

//          x.Fourth: 3
console.log(x.Fourth); // 3
``` look !!!!!!!!!
crude star
valid jetty
#

type safety

crude star
#

if it doesn't error its working perfectly

winged mantle
#

you're a garbage programmer

valid jetty
#

it is useless

winged mantle
#

you made me lose faith in humanity

valid jetty
#

i wrote it because vee dared me to

winged mantle
#

you made me quit my software engineering job

#

now i'm cooking burgers

valid jetty
#

ok but on a real note, C structs are not packed lol

#

the fields are all aligned to the highest aligned field

winged mantle
crude star
#

ermmm struct __attribute__((packed))

valid jetty
#

so if you have a u64 in the struct everything else will be aligned to fit within a multiple of u64

winged mantle
#

what if you made a javascript to typescript transpiler

valid jetty
winged mantle
#

not like automatically fixing types

valid jetty
crude star
#

but we're making packed structs specifically

valid jetty
#

the typescript type system is a functional programming language

winged mantle
#

converting the js function code into typescript types

valid jetty
winged mantle
#
function helloWorld() {
    console.log("hello world");
}

would get transpiled to

import { Console } from "tcts";

type HelloWorld = Console.Log<"hello world">;
valid jetty
#

😭

winged mantle
#

and HelloWorld would compute to the string type "hello world"

valid jetty
#

i mean yeah

#

you can do that

winged mantle
#

wait that would be kinda dumb to simulate the console

#

instead just do return "hello world";

crude star
#

Console.Log returns an Environment type which has a stdout field

winged mantle
#

what if npm library to use go inside of js

#
const fmt = {
    Println: console.log
}
#

that sorta thing

#

or is that just called deno

crude star
#

deenuts

frosty skiff
#

true

valid jetty
#

look typescript is easy

#

fuck i didnt show the hover

#

in haskell

rosieRange :: Int -> [Int]
rosieRange n = f 0 []
  where
    f :: Int -> [Int] -> [Int]
    f accLen acc
      | accLen == n = acc
      | otherwise   = f (accLen + 1) (acc ++ [accLen])

main :: IO ()
main = do
  let foo = rosieRange 10
  print foo
#

its very similar

#

in a procedural language

#

well i got carried away with making the array concatenation inline but you get the point

#

or rather the more efficient way is ```rs
acc.iter().single().chain(Iterator::once(acc.len())).collect()

#

actually

#

you can make it look like ts

spark tiger
#

literally nothing worked isob

#

thank you zed

#

i hate that the extensions in zed use github

#

cuz my shit is always ratelimited

frosty skiff
spark tiger
#

frosty skiff
#

#

I wrote os for parsing regex in micro

dawn ledge
valid jetty
#

true

jade stone
frosty skiff
# jade stone What flavor

pcre2 was my goal although i didn't choose a specific flavour mostly because i was writing it in mainly asm 😭

#

I wanted to parse regex as fast as possible

#

i thought the idea of a kernelmode regex parser would be silly so i started with that and then I eventually just ended up writing a tiny os for it

jade stone
frosty skiff
#

so it's why i just decided not todo a specific flavour and just decided to implement regex in a way that's very basic, just so it'd work while i was writing it in asm

jade stone
#

this looks like fun

#

i love pcre because i can do things like this horror for cannonicalizing regex for vencord patches

winged mantle
#

I didn't want to manually update mc server constantly for my friends so i'm now writing a whole minecraft server launcher that automatically downloads the latest version

#

and instead of using shell script i used go

#

because i don't like shell scripting

#

and i feel like it will end up being high quality code because i cannot bare hacking things together any more like i used to

#

when i hacked things together it would just be so horrible adding features to it

#

screw it, i'm making this properly modular

#

splitting into packages

balmy lintel
ornate quiver
winged mantle
#

no it's just a vanilla server

ornate quiver
#

huh

winged mantle
#

i'm already refactoring

#

it's just something to keep our vanilla smp up to date

#

tbf i might want to add a discord bridge

#

based on reading stdout

#

don't think there's an existing bridge solution like that (which will not break between updates!!)

frosty skiff
frosty skiff
lavish frigate
#

i forgot stuff like echo, cd, etc. are implemented by the shell not by the system and in my state of being tired i tried to debug why "echo test" in my shell would fail to run the command

supple whale
#

if only this actually worked

austere idol
#

where

ornate quiver
#

assuming the webview is run in the same process

#

and that would only work if the webview is chromium anyways

jade stone
#

the shell built-in just shadows

median root
#

ok I dont get it. nothing is throwing errors in lsp or building, ive literally copy pasted the const Native line from a plugin which works, so why does it refuse to work?

jade stone
#

why are you importing from tesseract.js

#

that's not a vencord dep

median root
jade stone
#

i have tesseract working in a vencord plugin

median root
#

the let worker line was cuz I couldnt find the return type of the worker

valid jetty
#

???

jade stone
#

idk why i thought that

median root
#

i mean u were partly right to be fair

jade stone
median root
#

its been a long while since ive touched any typescript

median root
jade stone
#

tldr

#
if (!window?.Tesseract) {
    fetch(
        "https://cdn.jsdelivr.net/npm/tesseract.js@6.0.0/dist/tesseract.min.js"
    )
        .then(async r => void (0, eval)(await r.text()))
        .then(async () => {
            worker = await Tesseract.createWorker("eng", Tesseract.OEM.TESSERACT_LSTM_COMBINED, {
                corePath: "https://cdn.jsdelivr.net/npm/tesseract.js-core@6.0.0/tesseract-core-simd-lstm.wasm.js",
                workerPath: "https://cdn.jsdelivr.net/npm/tesseract.js@6.0.0/dist/worker.min.js",
            });
        })
        .then(() => {
            worker.setParameters({
                tessedit_pageseg_mode: Tesseract.PSM.AUTO
            });
        });
}
median root
jade stone
#

no

#

it's not a fork

median root
jade stone
#

yes

#

you can do tesseract without native

median root
austere idol
#

if pnpm were actually a npm fork, it would be MUCH slower

ornate quiver
#

nop

supple whale
#

giga sad

hoary sluice
#

@valid jetty im prob gonna go to a different uni

#

and do technical math instead of ict

valid jetty
#

technical math meaning??

#

complex analysis and stuff?

lavish frigate
lavish frigate
#

Part of zshbuiltins

#

I wouldn’t be surprised if command treats real commands and builtins very similarly

#

Just swapping how they are ran at execution

supple whale
#

I love androidTV

spark tiger
#

no fuck android tv

#

this shit is laggy as fuck

#

i cant use my tv its so fucking slow

#

finna get an apple tv

lavish frigate
#

Which ones do you mean then 😭

jade stone
jade stone
supple whale
#

its the TV manufacturers

#

they release TVs with 2 cores and 2GB of RAM

#

so kinda what do you expect

#

get an urgos

#

or a shield

#

and you'll see what it means to have a good androidTV

#

most shitty androidTVs built into the TVs themselves run in 32 bit

#

good list of "what android TV devices arent shit"

#

the ugoos is laughably cheap

#

especially for its hardware capabilities

#

i have a gen2 chromecast, which is laughably slow, and it outperforms my TCL x10

supple whale
#

;-;

spark tiger
#

and it’s only like $120 or so

supple whale
supple whale
#

mmm, europe prices

spark tiger
#

even here i can buy it for $130 im kinda surprised tbh

supple whale
#

lmao ugos is more expensive in us than here

#

ah right tarifs

#

its china made

#

anyways, androidTV is great, cuz u can pirate on it

#

sideloading apps or patching apps to remove ads or paid features is peak

#

or shit, even just building ur own via cast recievers

spark tiger
#

i just tried to install spotify on it from play market but i never figured out how to change region

#

on app store it was as simple as just changing it in the settings

#

but with android i have nfi how

#

i tried a vpn

#

tried changing account

#

but nothing worked

#

i just want to install spotify and like crunchyroll isob

supple whale
#

lmao are they banned in ur country on play store?

spark tiger
#

yes

supple whale
#

LOL WTF

spark tiger
#

do yk a way tho

supple whale
#

yeah just download the apk from a mirror

#

and install the apk manually

#

no cap

spark tiger
#

uhhhh

#

is there really no way to get it off google app store

supple whale
#

shit, you dont even need to get off ur ass from ur pc to do it

#

if its banned its banned, and if you couldnt figure out how to get a vpn running then this is probs ur best bet?

spark tiger
#

cuz im too paranoid to trust a random apk from the internet

supple whale
spark tiger
#

its just spotify left this country and they removed their app from russian app stores

#

but it does work fine without a vpn

#

(kinda)

spark tiger
#

yeah so see that's why i dont like android tv

#

on apple tv i would just install it off app store

supple whale
#

then you can even do adb connect 192.168.1.yourTVaddress, and adb install -r ./path/to/apk/on/your/pc.apk

#

or copy the apk to the tv and install it on there directly

#

shit, you can even control ur androidTV remotely from ur PC

#

because why not XD

lavish frigate
ornate quiver
#

i know hexadecimal

#

someone teach octal to me

hazy pine
#

i believe in octodecimal supremacy

crude star
#

because 1 means 8

jade stone
#

lc.wa 0o100

visual shellBOT
jade stone
crude star
#

lmao

#

yeah its 8x8

hoary sluice
#

@spark tiger how to translate dolboeb to english

#

im a dolboeb

#

its 64

spark tiger
hoary sluice
#

i think braindead is the translation

jade stone
hoary sluice
balmy lintel
#

whats a dolboeb

#

Dummkopf

#

okay

valid jetty
#

@hoary sluice i love typst

#

i love programming my pdf

#page(
  align(center + horizon)[
    #align(center, text(2.25em)[*#title*])
    #align(center, text(1.25em, description))

    #v(4em)

    #align(center)[
      #text(1.25em)[Rosie Mewmewmew] \
      Catgirl Academy Germany
    ]

    #v(4em)

    = Abstract
    #align(center, block(width: 80%,
        align(left, par(justify: true)[
            This project presents the design and implementation of a compiled programming language featuring exclusively Japanese syntax, intended to improve accessibility for native Japanese speakers with potentially limited English proficiency. Traditional programming languages often rely heavily on English-based keywords and constructs, creating barriers for non-English speakers. By replacing these with natural Japanese equivalents, this language seeks to make programming more approachable and intuitive for native Japanese speakers. The goal is to produce a compiler frontend capable of compiling basic functions and control flow structures utilizing Japanese syntax for the source code.
        ])
    ))
  ]
)
#

i can even embed all of my source code straight into typst

#

its kinda silly

#

i wrote a script to do this

#!/usr/bin/env -S ellec --silent --run
use std/prelude;

namespace DIR;

enum DirentType @repr(u8) {
    Dir = 0b00000100,
    Reg = 0b00001000,
}

struct Dirent {
    u64        ino,
    u64        seekoff,
    u16        reclen,
    u16        namlen,
    DirentType type,
    char       name // opaque static array
}

external fn opendir(string path) -> DIR *;
external fn readdir(DIR *dir) -> Dirent *;
external fn closedir(DIR *dir);

fn collect_files(string path, string[] out) {
    dir := opendir(path) ?: $die();
    defer closedir(dir);

    while dirent := readdir(dir) {
        if [".", ".."].contains(&dirent.name) { continue; }
        out_path := "{}/{}".format(path, &dirent.name);

        if dirent.type == DirentType::Dir {
            collect_files(out_path, out);
        } else if dirent.type == DirentType::Reg {
            out.push(out_path);
        }
    }
}

fn main() {
    path := "src";
    $printf("Generated files at {}...", path.color("green").reset());
    collect_files(path, files := [string;]);
    io::write_to_file("docs/srcs.txt", files.join("\n"));
    $printf(
        "Generated {} files at {}!",
        "{}".format(files.len()).color("green").reset(),
        path.color("green").reset()
    );

    path := "docs/main.typ";
    $printf("Compiling typst at {}...", path.color("green").reset());
    libc::system("typst c {} --root ..".format(path));
    $printf("Compiled typst document!");
}
#

and then in typst

#let embed_code(path, lang) = {
  let data = read(path);
  [
    === File: #" " #raw(path.split("/").last())
    #raw(data, lang: lang, block: true)
  ]
}
#

its kinda awesome actually

fallen nebula
#

am i the only one where discord development try to do this request with TLS1.0 and fail with anything higher
it's been quite a while i didn't launch it because it didn't work and so i quickly investigated by using mitmproxy and proxying discord to it

ornate quiver
#

how secure is your network

eternal wigeon
#

What's better dbeaver or pgadmin

nimble bone
#

psql

native spruce
#

@young flicker honestly not sure what to do with the ux/ui with clipper

#

I have 2 variations but if I add too many customization options its just gonna burn me out

#

or what if I wanted to do that notification center design

#

its just more redundent code

#

idk what to do really

#

not knowing is driving my demotivation

fallen nebula
#

what's weird is that it's only that first request

#

and that canary doesn't have that issue

ornate quiver
#

and vesktop?

fallen nebula
#

and that if i do the request using firefox or curl TLS1.2 works

fallen nebula
#

but since stable, PTB work normally, i'd expect it to work

#

i'm more surprised by the difference between canary and dev

native spruce
#

i may abandon the panel idea

fallen nebula
#

because for the most part they are basically the same

native spruce
#

update to sonoma and itll automatically do it

#

I don’t think it’s anything special

#

Looking at clipper code there’s nothing in significance

dense sand
#

im playing with this app idea, but it requires to run arbitrary js from the user, is using web workers a good enough isolation?

crude star
#

uhh

#

use an iframe

#

and set srcdoc

#

hm thats sorta awkward to communicate with though

valid jetty
#

husk

shrewd canopy
valid jetty
#

also look at this diagram made in typst

#
#align(center)[
  #let args = (inset: 1em, corner-radius: 0.25em);
  #diagram(
    node-stroke: .1em,
    spacing: 4em,
    node((0, 0), "Source Code", ..args, name: <src>),
    edge(label: "Lexer", "-|>"),
    node((1, 0), "Token Stream", ..args, name: <tokens>),
    edge(label: "Parser", "-|>"),
    node((2, 0), "Abstract Syntax Tree", ..args, name: <ast>),
    edge(label: "IR Generation", "-|>"),
    node((2, 1), "Intermediate Representation", ..args, extrude: (-2.5, 0), name: <ir>),
    edge(label: "Optimization", "-|>"),
    node((2, 2), "Optimized IR", ..args, name: <opt>),
    edge(label: "Codegen", "-|>"),
    node((1, 2), "Assembly", ..args, name: <asm>),
    edge(label: "Assembler", "-|>"),
    node((0, 2), "Object", ..args, name: <obj>),
    edge(label: "Linker", "-|>",),
    node((0, 1), "Executable", ..args, extrude: (-2.5, 0), name: <exe>),

    node(
      enclose: (<src>, <tokens>, <ast>, <ir>),
      corner-radius: 0.25em,
      name: <frontend>,
      shape: shapes.bracket.with(dir: top, label: [Frontend])
    ),

    node(
      enclose: (<opt>, <asm>),
      corner-radius: 0.25em,
      name: <backend>,
      shape: shapes.bracket.with(dir: bottom, label: [Backend])
    ),
  )
]
hoary sluice
fleet cedar
#

Do you have a source that english keywords affect learning speed? I'd be more inclined to believe that's caused by english docs

valid jetty
#

i’ll look for a source

valid jetty
hoary sluice
#

the reasoning is a lie

#

she wanted to make a japanese lang cause shes addicted to anime and thinks japan is perfect

#

not to "help japanese people who dont speak english"

#

what softward are u gonna build with just ichigo and no english

valid jetty
#

the real reason i made the lang is because i thought it would be funny

#

but i need an actual reason to put on the document for school

#

how would i write it without it sounding like ai

#

This project presents the design and implementation of a compiled programming language with exclusively Japanese syntax, which is designed to improve accessibility for native Japanese speakers who have potentially limited English proficiency. Traditional programming languages rely heavily on English-based keywords and constructs, which creates a steep learning curve for non-English speakers. This language aims to replace these with their Japanese equivalents, which would make programming more enjoyable and intuitive for native Japanese speakers. The goal is to produce a compiler frontend capable of compiling basic functions and control flow structures utilizing Japanese syntax for the source code.

hoary sluice
#

sorry i wanted to answer a question not order a yappacino

hoary sluice
valid jetty
#

dramatic effect 😭

hoary sluice
valid jetty
#

no

hoary sluice
#

put it into gptzero

hoary sluice
#

i think

#

it doesnt matter as long as u wrote it urself

fleet cedar
#

Just be honest and say you did it to evaluate the capabilities of your other compiler, and/or to explore whether taking inspiration from a different language gives any interesting syntax

valid jetty
#

well no because they want a """"client"""" for the project

#

i would do that if i could lol

hoary sluice
#

Just be honest and say you did it because you're unemployed

valid jetty
#

thank you

hoary sluice
#

np ❤️

#

plesae actually leave that

valid jetty
#

how about this lmao

#

fuck

#

"for a Japanese students"

lucid trail
#

why is that so verbose

valid jetty
hoary sluice
#

its written in yappanese

valid jetty
hoary sluice
#

reminds me of my thesis

#

and of java

#

unnecessarily verbose to havd more pages

lucid trail
#

My brain is so cooked that anything which isnt prose sounds excessive to me

valid jetty
#

i want to score full marks on this thing soooo ofc im gonna yap a lot

valid jetty
#

good

valid jetty
#

Roi e

hoary sluice
wild coral
#

mraow

ornate quiver
#

unbeliveably funny how students now have to pass their writing through ai detection tools even if they didnt use ai

#

last quarter i was writing a paper and using wikipedia as my primary source (it didnt rly matter), but then it seems like that style of writing leaked into my own paper
and it was detected as like 80% ai
spent an hour reorganizing and rewriting words until it was down to 5%

valid jetty
#

we moved from plagiarism checkers to ai checkers

#

it’s the same thing but the slopmeter turned up to 100%

ornate quiver
#

yeah but the slopdetector is 100% unreliable now too

valid jetty
#

that’s fair

supple whale
#

i love android TV

#

7s to load a 0.5kb svg

#

TCL is dogshit

ornate quiver
#

yop

valid jetty
#

i love diagramming

valid jetty
#

slay

#

oh hmmm

lavish frigate
shrewd canopy
lavish frigate
#

C is dead. Rust will replace it.

shrewd canopy
#

That already became real

#

(Says someone who can't figure out borrowing issues for few days)

lavish frigate
#

its okay

#

sometimes i just turn my brain off and when i run into issues with the borrow checker i just throw shit against the wall to see what sticks

blazing haven
#

hilfe

nimble bone
lavish frigate
#

right

nimble bone
#

how

#

tbh i don’t see why rust got big as The memory safe language

#

when you have swift ykyk

blazing haven
hoary sluice
#

literally bachelor in advent of code

#

and its fully remote except for some exams

#

and some seminars

shrewd canopy
jade stone
#

how would this be resolved with List<List<T>>

external fun <T> List<T>.foo(other: List<T>): Unit
external fun <T> List<T>.foo(other: T): Unit
#

@nimble bone

native spruce
#

NSIMAGEVIEW SUCKS

supple whale
nimble bone
#

but it's  how could it suck ykyk

jade stone
#

@nimble bone i still know what you sent

nimble bone
#

i didn't delete this?

#

your vencord be on crack

jade stone
nimble bone
#

yea i realised

crude star
spark tiger
lavish frigate
#

😭

nimble bone
visual shellBOT
# nimble bone lc.@grok is this true
is this true

Yes, if "existed" means inception: Rust's development started in 2006 (personal project by Graydon Hoare, Mozilla-backed by 2009), while Swift began in 2010 (by Chris Lattner at Apple). That's four years earlier—not eons, but "way before" in fast-paced tech. Stable releases flipped it: Swift 1.0 (2014) beat Rust 1.0 (2015).

spark tiger
#

i thought rust was like 2007 💔

#

istg i read it somewhere it was as old as that

#

well not 2007 but

lavish frigate
#

im reading the rust wikipedia page and am shocked by the horrors it grew out of

crude star
#

this is why

torn thunder
#

Just don't use an IDE

#

Use ed...

spark tiger
spark tiger
#

👍

crude star
#

fr.......

native spruce
# pearl stag

this embed is kinda fire but I dont like where the pfp is put 💔

frosty obsidian
#

they should fix that

native spruce
#

update bro

austere idol
austere idol
# spark tiger <:husk:1026532993923293184> https://x.com/kai_fall/status/1945180203472375966

blobhuskcozy

#include <stdlib.h>

struct Node { struct Node* next; int data; };
struct Array { struct Node* root; long long length; };

void Array_init(struct Array* target) {
    target->length = 0;
    target->root = NULL;
}

void Array_push(struct Array* target, int val) {
    struct Node* n = malloc(sizeof(struct Node));
    n->data = val; n->next = NULL;
    if (!target->root)
        target->root = n;
    else {
        struct Node* p = target->root;
        while (p->next)
            p = p->next;
        p->next = n;
    }
    target->length++;
}

void Array_free(struct Array* target) {
    for (struct Node* p = target->root; target->root; target->root = p) {
        p = p->next;
        free(target->root);
    }
}

int main() {
    struct Array arr; Array_init(&arr);
    Array_push(&arr, 1);
    Array_push(&arr, 2);
    Array_push(&arr, 3);
    /* ... */
    Array_free(&arr);
}
ornate quiver
#

HUSK

shrewd canopy
winged mantle
#
v := []int{1, 2, 3}

"why do you need built in syntax for such a trivial thing lol"

#

different languages can have different philosophies and that's ok!!

#

rust allows the developer to have more syntactic control

austere idol
hoary sluice
austere idol
hoary sluice
#

crust is correct

austere idol
#

imagine rust with exact c syntax

hoary sluice
lavish frigate
#

Imagine c with actual nice syntax

austere idol
hoary sluice
hoary sluice
shrewd canopy
austere idol
lavish frigate
#

C gets sucked off so much just for being old and used often it’s old design choices suck in current day free yourself from the shackles of internet brownie points and start being real ❤️

austere idol
#

c looks nice if you know it (i dont)

lavish frigate
austere idol
#

struct Thing thing; enum Enum e;

I LUV EXPLICTNESS!!!!!

#

typedef struct { ... } thing_t; is a gimmick invented by c++ users to omit that struct in every decl

#

i only wish we had turing complete macro system and automatic type resolution for variable types (e.g.

notDeclared = "eeee";
/* in pre-ansi c it means that you declare an int, and this sucks
 * i want it to automatically determine the type (e.g. char*)
 */
lavish frigate
#

you know nothing*

#

Escape the matrix

austere idol
lavish frigate
#

You are a sheep of old programming language we must get you out immediately.

lavish frigate
#

We must also get you a job.

austere idol
#

or i need to learn elle to count?

austere idol
lavish frigate
#

Zig isn’t good because I have yet to find a single job opening searching for zig devs

#

In my eyes this makes it not a real language

shrewd canopy
austere idol
#

i hate memory safety

shrewd canopy
#

learn cpp

austere idol
austere idol
austere idol
lavish frigate
hoary sluice
#

@valid jetty duckduckgo is down i think

valid jetty
dawn ledge
# winged mantle

well yeah in this case you can just Vec::from([1, 2, 3]) but the macro does much more than just that

winged mantle
#

vec! is kinda cool though

#

less typing

lavish frigate
#

let a = [1, 2, 3];
or if you wanna add a type
let a: [i32; 3] = [1, 2, 3];

#

unless go arrays are dynamic ofc

valid jetty
#

yea go arrays are mutable and dynamic

lavish frigate
valid jetty
#

yeah ^

lavish frigate
dawn ledge
#

go arrays are ass

#

yes please i asked for arr = append(arr, foo)

#

lc.g go docs array append

visual shellBOT
lavish frigate
#

i dislike languages which dont have accessible functions on primitives like i LOVE doing stuff like [].len() or 1.to_string() give me more pls

dawn ledge
#

It is common to append new elements to a slice, and so Go provides a built-in append function. The documentation of the built-in package describes append.

func append(s []T, vs ...T) []T
The first parameter s of append is a slice of type T, and the rest are T values to append to the slice.

hoary sluice
#

@valid jetty loan me 2000£

#

at -1% apr

valid jetty
#

i don’t even have that much money

#

can you loan me £2000 and i’ll loan you it

hoary sluice
#

youll pay me in 20£ installments for 100 months

#

+1% per year for the amount alreado paid

valid jetty
#

hmmmm

hoary sluice
#

in exchange ill pay it back in 12 years

lavish frigate
hoary sluice
#

are you still talking about c

#

that creep

lavish frigate
#

im not still talking im just starting

hoary sluice
#

we have texas going on and youre still talking about c?

#

how is int - bool a float

lavish frigate
#

do you not have your bools actually be floats?

lucid trail
valid jetty
#

that’s not a reason to dislike it

#

less is more in programming languages

hoary sluice
lavish frigate
hoary sluice
#

why are they called reals

#

this is progmanig not instagram

lavish frigate
#

idk 😭

#

only real type

hoary sluice
#

im gonna call my floats tiktoks

valid jetty
#

the thing from mathematics

#

the set of real numbers

hoary sluice
#

instagram reels

lucid trail
#

reels mentioned!!

valid jetty
#

i swear eagely is always ragebaiting

lavish frigate
#

i looked into it more apparently gms devs then do if (true > 0.5) ??????????????????????????????????????????

hoary sluice
crude star
lavish frigate
#

crazy crazy

crude star
#

you can append to slices

valid jetty
crude star
#

well its not really fixed-size

hoary sluice
valid jetty
#

the poor implementation of gm is not a reason to excuse his poor code

lucid trail
#

i’ve only seen screenshots

valid jetty
lavish frigate
valid jetty
#

the storyline_game_array thing is real

valid jetty
#

if the structs are made up of integers or structs or whatever, they can be serialized as long as they don’t hold pointers which things in gm wont

lavish frigate
#

as if fast serialization is that much more important than making sure you can actually continue reading the code 2 months later

#

""""fast serialization"""" as if seralizing structs isnt almost instant too

hoary sluice
#

too much progaming today now im gonna eat ice cream and spread misinformation on the interwebs

valid jetty
#

even if you can’t serialize structs you can convert the structs to an array when you need to serialize them

austere idol
valid jetty
#

at the VERY least the huge 1d array could have named constants for the values but it doesn’t even have that

crude star
#

vencord has been talking about the same code for 3 days

lavish frigate
#

and ?? can we not make fun of awful code?! !

lucid trail
#

wow very cool

valid jetty
austere idol
lucid trail
#

This feels like it would take more effort to have everything in one array

valid jetty
#

oh yeah eagely have you ever tried submitting an email patch before

crude star
#

guys i just found out sbrk(3) is just an array of bytes??

#

pirateslop

#

i cant believe my memory goes to an array of bytes

hoary sluice
austere idol
crude star
#

pirateslop is just being nice to the compiler and giving it less work to do 😊

crude star
#

i always use tcc

austere idol
#

remind me of every time something is commited into dwl repo

winged mantle
valid jetty
crude star
#

why

#

slices do have a capacity higher than length usually

#

it doesnt always change the pointer

spark tiger
#

how would one apply a js source map

#

so basically im exploring an app that uses js for some stuff and

#

and there are .js.map files

#

how would one like idk apply it

#

so my js files make sense

crude star
#

is devtools not using the sourcemaps?

spark tiger
#

can i use it without devtools

#

like just with my code editor

#

or is it not how it works

crude star
#

uh there's probably an extension or something out there

#

but its meant for devtools

spark tiger
#

argh

#

i found an internal build of one app and i'm trying to see what i can do with it blobcatcozy

crude star
#

why the hell do u have sourcemaps but not the actual source code

spark tiger
#

im not going to abuse it or anything

#

im just curious if there's any real impact

#

besides "haha i got all your internal builds"

#

or is it already bad enough?

crude star
#

i mean yeah it could be bad

spark tiger
#

im trying to see what they use for build distribution

#

so i know what endpoints i can use

#

im trying to see if i can upload a build

#

cuz if i can this would be really bad

valid jetty
#

each append call creates a new slice, copies the stuff into it, pushes your new values, then returns it (this is speculation, i’m really hoping they don’t actually do this)

valid jetty
#

then why do you need to reassign the variable

crude star
#

unless the slice is full

#

idk golang isn't like rust where pointers are unpinned

valid jetty
#

ITS A BUILTIN?????

crude star
#

what's the problem

valid jetty
#

needing a builtin for such a simple concept makes it sound like it’s hell to do anything low-level in go

crude star
#

yeah its a language meant for real operating systems

#

it has gc and threading builtin

valid jetty
#

ok but a lot of networking code is also low level code

lavish frigate
#

yeah its a language meant to be replaced and not meant to be used in real operating systems

valid jetty
#

considering you can’t even access the pointer of a slice that just means go is not useful as a language

crude star
#

ok girl

valid jetty
#

why would you even use go to begin with

valid jetty
#

go prides itself for being peak in networking yet i can’t even access a pointer

crude star
#

java isnt useful as a language

valid jetty
#

ok but java does not pride itself for being peak in networking

crude star
#

js isnt useful as a language there are no pointers

valid jetty
#

ok whatever 😭 just feels like it’s gonna become a headache the second you try to do anything actually complicated in go

lavish frigate
spark tiger
lavish frigate
#

ive discovered this game where you have to write assembly code to control microprocessors and do different things

#

and the docs for this imaginary asm lang are a pdf file that ships with the game, its genius

crude star
#

get the printed version

#

actually i think only exapunks has a printed ver

lavish frigate
#

my favourite function

crude star
#

let x = 0.clone().clone().clone().clone();

lavish frigate
#

let _ = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".clone().clone().clone().clone().clone().clone().clone().clone().clone().clone();

crude star
#

let x = Box::new(0).leak().into::<Box<u64>>().leak().into::<Box<u64>>().leak().into::<Box<u64>>().leak().into::<Box<u64>>().leak().into::<Box<u64>>().leak().into::<Box<u64>>()

lavish frigate
#

stop leaking my boxes.

crude star
#

mmmm yummy memory leak

winged mantle
#

personally i would have ethical concerns if that was allowed

lavish frigate
#

rust invented cloning people specifically for this

#

me & copying rust errors? no way!

ivory heath
ivory heath
#

you can do that as well.

#

unsafe lets you do anything

winged mantle
#

javascript doesn't let you though... it's a useless language...

valid jetty
ivory heath
#

its really not

valid jetty
#

well in the traditional sense of interop at least

#

why is every C function namespaced under the C namespace

#

it should be global and allow you to namespace them yourself

#

you lose out on a lot of namespacing opportunities

winged mantle
#

because of how go packages work? lol

valid jetty
#

oh i guess that makes sense

lavish frigate
#

if im ever gonna write Go ill just import C and write C instead of go

#

useless language..

ivory heath
#

wait

valid jetty
ivory heath
#

that might now work with C

#

lemme check

valid jetty
#

isnt C a pseudonamespace

ivory heath
#

depends on what you mean, there is a golang preprocessor that generates golang bindings to whatever c header youre using and then its linked later

valid jetty
#

idk i found this sorta weird

ivory heath
#

AWWW

cannot rename import "C"compilerImportCRenamed
ivory heath
valid jetty
#

yeah but all of this stuff feels like a superset of go rather than part of go

#

if you know what i mean

ivory heath
#

sodathink I dont get what you mean

#

but i dont know how else go would implement it with as much ease as it is now

winged mantle
#

does anyone use that

ivory heath
#

Why would you dirty name spaces?

lavish frigate
#

Sadly useless for me cuz I don’t do dependencies 🔥

ivory heath
#

I wonder why they dont just do full tree shaking

lavish frigate
fleet cedar
ivory heath
#

It does not modify tree structure if cases cannot be reached or skip compiling some functions all together.

fleet cedar
#

It absolutely does prune unreachable branches from control flow

#

And skipping compiling some functions altogether is what this new hint does

ivory heath
ivory heath
fleet cedar
#

Within a crate, rather

#

Optimizing such things across crates requires lto

ivory heath
#

A entire crate is treated more or less as a single file

#

Multiple languages do it

ivory heath
fleet cedar
#

Better say compilation unit if you mean compilation unit

fleet cedar
ivory heath
#

One is significantly harder to do with compiled languages

crude star
#

whag

ivory heath
#

Idk why constants wouldn’t be done at compile time.
Removing unreachable cases post compile is harder to do, especially when the compiler restructures

fleet cedar
#

Why would optimizing post-link ir be harder than pre-link ir

#

Other than being much bigger so might be slow

ivory heath
#

I thought you meant post machine code which is where LTO works.

fleet cedar
#

No, lto works on ir

ivory heath
#

Is this a rust thing?

fleet cedar
ivory heath
#

sodathink I didn’t know LTO embedded IR in objects when using LTO

fleet cedar
#

Well yeah can't embed raw it, need to encode it as a data stream

ivory heath
#

anyways ignore me then

lavish frigate
#

„No global variables“ uh huh right

hoary sluice
#

teach me how thats done

austere idol
hoary sluice
austere idol
#

he allocates memory, but statically

#

e.g. not on heap

hoary sluice
#

malloc stands for memory allocate

#

hes telling me he can use variables withuot allocating memory

#

@valid jetty i love languages where error handling is done using hopes and dreams

#

like ok thanks for putting 5 lines of comments saying (Required) and not actually making it required

lavish frigate
austere idol
hoary sluice
#

i dont see a red underline

lavish frigate
#

absolutely hate the final keyword

hoary sluice
#

absolutely hate most java keywords

hoary sluice
lavish frigate
# hoary sluice so not globals?

global as in a lifetime equal to that of the programs remaining runtime
the hate on globals is two part:
one that they pollute the global scope (which static variables dont do)
and two that they can make code unpredictable as in you change how your program runs based on something other than input (thus breaking the same input same output philosophy) (static variables absolutely do this)

fleet cedar
#

Whether globals pollute the scope is a language issue
That they enable action at a distance is an inherent issue with global state

lavish frigate
#

yep

winged mantle
#

the biggest problem i have when developing things is getting stuck on implementing things that aren't inherently difficult, i just often avoid starting until i feel satisfied with my idea of how i should do it (which probably just wastes time because things are never going to be perfect the first time anyway)

#

i often completely step away from the code and try to work things out in my head

warped rapids
#

hi

winged mantle
#

but i feel like it just makes me a 0.1x engineer

#

maybe it's betteer to let yourself make mistakes because it gives you the context to improve things?

#

and it's impossible not to anyway

#

i think you need a balance

#

my approach limits my motivation

lavish frigate
#

i just start writing

#

and then iterate on stuff

winged mantle
#

i might not even do the thinking things through thing

#

i might procrastinate that

lavish frigate
winged mantle
#

i'm like the opposite of a vibe coder

#

i make my brain work way more than it needs to

nimble bone
#

the kode tode vibe codes

winged mantle
#

i spent ages thinking about structure for my discord bot but it changed several times

#

and it still relies on loads of global state

#

well the real problem is highly scattered global state

#

😭

lavish frigate
#

i personally think ive already figured out a really good structure for (at least py-cord) discord bots

#

after

#

10 attempts at writing a bot!

nimble bone
#

write in rust you spend ages shilling rust

nimble bone
lavish frigate
#

i am writing rust rn

#

that discord bot was before i started rust

winged mantle
#

global state isn't inherently bad but i way overdid it

#

though it's js/ts so i think that's normal practice

lavish frigate
#

i religiously avoid global state

royal nymph
#

global state is fire

#

and rust is cringe for making global state so painful

winged mantle
#

i mean you will almost always have a global state

#

even if you're just passing it down everywhere

royal nymph
#

global state is better than the crazy DI shenanigans you have to do otherwise

lavish frigate
#

thats kinda funny

winged mantle
#

in a discord bot for example a bot token is needed for the entire lifetime of the program 😭

lavish frigate
#

nop

#

i log into the discord api every time i need the token

#

so many bot requests a new token for every request

winged mantle
#

horror...

lavish frigate
#

☹️

#

no love?

winged mantle
#

realistically every discord bot has a singleton of some libraries Client class

#

no matter how you're representing it

royal nymph
#

the moment you have an .env or config file, it's cbt to use it in a language like rust

#

it's so much nicer to have it as a global variable and just access it from anywhere

winged mantle
#

idk my code is probably fineish

royal nymph
#

yes you can use lazystatic or smth like that but that's ugly and once you have some more specific config logic you can't do that

#

in go or js you just make a module for it and export it as top level stuff

winged mantle
#

maybe even better than average (which i'm careful to say when on average most people think they're better than average)

lavish frigate
#

shows how 100% of the rust haters dont know anything about the language

winged mantle
#

i did really put a lot of thought

#

but i don't think it's complete perfection and i also do some things that would be better to be a separate library

lavish frigate
winged mantle
#

like roll my whole own complex prefix command parsing

royal nymph
#

i'm not talking about the parsing part

winged mantle
#

my biggest issue with rust would be async

crude star
#

pyra wants her imperative language to be like haskell

winged mantle
#

this video feels like it was aimed at me https://www.youtube.com/watch?v=AiSl4vf40WU

I have explained the joy of rust at length on my channel, HOWEVER, some of what I have mentioned breaks down when interacting with async rust.
Though the compiler is getting more and more helpful with each iteration, async is still a sharp edge, especially for newcomers.

But you don't have to use it.

👉Get Rust training from Let’s Get Rust...

▶ Play video
#

Async Isn't Real & Cannot Hurt You

lavish frigate
#

Async Isn't Real & Cannot Hurt You

lavish frigate
# winged mantle my biggest issue with rust would be async

async is an issue in an systems language, python and js and whatever hide a fuck ton of complexity and their solutions arent that great either
easy to use sure but its definitely not optimal, something you mostly dont and shouldnt care about in python/js
having to manage your memory already makes async 100000000 times more complicated thats why its also not great to use in c++ and similar either

royal nymph
#

it's super nice to use in go though

lavish frigate
#

and gos solution like python and js is easy to use but not optimal either

#

¯_(ツ)_/¯

winged mantle
#

rust has even more implications to async code than function colouring

#

(function colouring honestly isn't that bad but i'm sure go developers go on about it blobcatcozy )

crude star
#

go async is the most optimal actually

lavish frigate
lavish frigate
crude star
lavish frigate
#

..?

#

i dont think ive said i love simplicity here, im saying thats where system languages like rust & c++ are different to other languages

winged mantle
#

rust devs certainly don't love simplicity

lavish frigate
#

rust tries to be as simple as possible but that doesnt always mean simple in the eyes of a systems language, some things just cannot be simple

winged mantle
#

after all we are talking about the language where this is how you create a vector

let vec = {
     let tmp = Vec::new();
     tmp.append(5);
     tmp
};
lavish frigate
#

going to go route of hiding all the complexity, shooting you in the leg then screaming at you for asking why it did that isnt solving the complexity

winged mantle
lavish frigate
#

for no reason

#

i just like the unsafe keyword

#

horror...

winged mantle
#

why is rust so verbose compared to go

for i := range 10 {
    fmt.Printf("Counting to 10: %d", i)
}
let mut i = 0;
loop {
    std::io::stdout::write(format!("Counting to 10: {}", i).as_bytes());
    if i < 10 {
        i += 1;
    } else {
        break;
    }
}
woven mesa
lavish frigate
crude star
winged mantle
lavish frigate
#

i do not have reddit !! do not send me reddit memes

crude star
#

wait no it doesnt

crude star
#

rust is sane

winged mantle
woven mesa
#

why would they use let mut

fleet cedar
woven mesa
#

have they heard of variable

winged mantle
#

i believe you can do this

for i in 0..10 {
    println!("{i}")
}
lavish frigate
crude star
woven mesa
#

true

#
for i in 0..<10 {
  print(i)
}
``` doesnt incl 10 in range
winged mantle
lavish frigate
#

..?

winged mantle
#

nvm

lavish frigate
#
  • 2 for missing spaced i guess
winged mantle
#

i swear the loop line looked shorter

#

what the freak is 0..=10

#

we don't want to include 10

lavish frigate
lavish frigate
spark tiger
crude star
#
Array.from(Array(10), (_, i) => console.log(i))
woven mesa
#

true

crude star
#

js is beautiful ❤️

lavish frigate
lavish frigate
winged mantle
#
for (int i : Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)) {
    System.out.println(String.format("Counting to 10: %d", i))
}
winged mantle
#

wait does this work

fleet cedar
#

You know System.out.printf exists, right?

winged mantle
#

long time since doing java

#

i know

#

it's meant to be making each language look bad

#

like that twitter person

#

that's my goal today

crude star
winged mantle
#

(apart from go)

fleet cedar
#

Java doesn't need help looking bad

winged mantle
#

yes it does...

fleet cedar
crude star
#

[*map(print,range(10))]

woven mesa
#

swift async is nice

crude star
#

forgot

fleet cedar
winged mantle
#

what do you think the longest await in history was

#

the longest time an async task has taken before the rest of the function proceeds

woven mesa
#
Task { @MainActor in
  DispatchQueue.main.sync {
    print("meow")
  }
}

can anyone guess what is printed

winged mantle
#

imagine if you do await fetch("someurl") and it takes 30 years

lavish frigate
#

doesnt fetch timeout

winged mantle
#

set the timeout to Infinity

woven mesa
#

no one guessed

#

i cry

fleet cedar
#

Just sleep(Duration::MAX).await

winged mantle
#

which will happen first

#

the heat death of the universe or this finishes running

fleet cedar
#

Computer reboots

crude star
winged mantle
#

foiled by windows update

lavish frigate
winged mantle
#

ate is my favourite ios flag

#

why do you need to turn the string literal into std::string

#

oh wait

#

i guess otherwise you would need to do std::string("romfs:/")

#

but is there no string suffix operator

#

"romfs:/"_s or something

#

idk i admittedly never use that

lavish frigate
winged mantle
#

seems pretty fire

#

if they're a beginner that makes it even more impressive