#πŸͺ…-progaming

1 messages Β· Page 107 of 1

crude star
#

all i know is the onion bought enron

hoary sluice
#

i dont think anyone bought enron

crude star
ivory heath
#

Who knew a meme could out compete all of Silicon Valley

valid jetty
#

@hoary sluice i made a rhythm game in elle

#

the music is also original

#

i made a pretty basic charting format

0 1136 0
0 1429 1
0 1768 2
0 2136 3
1 2588 0 500
1 2588 3 500
0 3460 1
0 3460 2
0 3884 0
0 4202 3
0 4606 1
0 4969 2
0 5298 0
0 5636 2
0 5995 1
0 5995 2
0 6363 0
0 6363 3
0 6742 1
0 6976 3
0 7354 3
1 7767 0 240
1 7767 1 240
1 8121 2 240
1 8121 3 240
0 8494 0
0 8818 1
0 9166 0
1 9485 3 240
0 9893 1
0 10247 2
0 10565 1
1 10954 0 240
0 11317 2
0 11651 3
0 12089 2
1 12427 3 240
0 12667 0
0 13075 3
0 13443 0
1 13772 1 800
1 13772 2 800
#

the first int is the note type: 0 = single, 1 = hold
the second int is the absolute offset in ms from the start of the song
the third int is the lane index (0-3)
the fourth int is the duration of a hold note (if it is a hold note)

#

i also have this song but idk if i wanna chart this one aswell

delicate groveBOT
#

@young flicker, <t:1754281469:R>: make penis daemon

hoary sluice
valid jetty
#

wdym

valid jetty
#

this is how i parse it

state := State {
    notes = io::read_to_string("charts/{}.pom".format(song_name))
        .split("\n")
        .iter()
        .map(fn(x) x.split(" ").map(i32::parse))
        .map(Note::from_i32s)
        .collect(),
    music = rl::load_music_stream("music/{}.wav".format(song_name)),
    combo = 0,
    time = 0,
};
``` idk what you mean
dense sand
#

guys 2k requests to overpass api isnt very healthy right

austere idol
dense sand
#

i just need to rerequest these places for latitude and longtitude

#

if theres a better way lmk

austere idol
#

internally

dense sand
#

mm java

austere idol
#

that code was too convincing

valid jetty
#

yeah i know lol

broken sierra
#

I swear to lord discord

#

STOP MESSING AROUND MA FUCKIN ACCOUNT

jade stone
#

@deep mulch How do I do a tooltip on hover in compose

deep mulch
#

@jade stone SALAD

jade stone
jade stone
#

./run

int foo[] = {1, 2, 3, 4, 5};
int i = 0;
foo[++i] = ++i;
System.out.println(foo);
rugged berryBOT
#

Here is your java(15.0.2) output @jade stone

[I@376b4233
jade stone
#

./run

int foo[] = {1, 2, 3, 4, 5};
int i = 0;
foo[++i] = ++i;
for (int i = 0; i < foo.length; i++)
  System.out.println("foo@%d = %d", i, foo[i]);
rugged berryBOT
#

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

file0.code.java:5: error: variable i is already defined in method main(String[])
for (int i = 0; i < foo.length; i++)
         ^
file0.code.java:6: error: no suitable method found for println(String,int,int)
  System.out.println("foo@%d = %d", i, foo[i]);
            ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
jade stone
#

./run

int foo[] = {1, 2, 3, 4, 5};
int i = 0;
foo[++i] = ++i;
for (int i = 0; i < foo.length; i++)
  System.out.println(String.format("foo@%d = %d", i, foo[i]));
rugged berryBOT
#

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

file0.code.java:5: error: variable i is already defined in method main(String[])
for (int i = 0; i < foo.length; i++)
         ^
1 error
error: compilation failed
jade stone
#

./run

int foo[] = {1, 2, 3, 4, 5};
int i = 0;
foo[++i] = ++i;
for (int j = 0; j < foo.length; j++)
  System.out.println(String.format("foo@%d = %d", i, foo[i]));
rugged berryBOT
#

Here is your java(15.0.2) output @jade stone

foo@2 = 3
foo@2 = 3
foo@2 = 3
foo@2 = 3
foo@2 = 3
jade stone
#

./run

int foo[] = {1, 2, 3, 4, 5};
int i = 0;
foo[++i] = ++i;
for (int j = 0; j < foo.length; j++)
  System.out.println(String.format("foo@%d = %d", j, foo[j]));
rugged berryBOT
#

Here is your java(15.0.2) output @jade stone

foo@0 = 1
foo@1 = 2
foo@2 = 3
foo@3 = 4
foo@4 = 5
royal nymph
#

never

ornate quiver
#

oh god

alpine pecan
#

back off

deep mulch
#

back off

deep mulch
ornate quiver
#

explode

#

i have enough things to endlessly tinker with

austere idol
#

im about to install home-manager

austere idol
winged mantle
#

/run

import javax.script.*;

public class Main {
    public static void main(String[] args) throws Throwable {
        ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
        engine.eval(
            "var System = Java.type('java.lang.System');\n" +
            "var foo = Array(5).keys().map(k => k + 1);\n" +
            "System.out.println(foo);"
        );
    }
}
rugged berryBOT
#

@winged mantle I only received java(15.0.2) error output

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.eval(String)" because "<local1>" is null
	at Main.main(file0.code.java:6)
still jolt
#

you gotta love java don't you ​​​​​​​​​​​​​​​​​​​​​​​​​​

lucid trail
#

vibe coding hell yeah

hoary sluice
#

@valid jetty when are you gonna try nixos

frail turtle
#

just spent 5 hours having to host a website locally to get access to the API in order to integrate it into a discord bot and finally got it working on the GET requests, only to have another look at the documentation, there's only one (1) POST and it doesn't do what I need it to do cirno_sob NOOO

royal nymph
alpine pecan
#

back off

nimble bone
#

WHY would you configure your selfhostedslop with NixOs just backup the configs

#

ykyk

lavish frigate
#

nixos is the only good linux distro

shrewd canopy
#

BSD is the only good OS family, change my mind

austere idol
nimble bone
lavish frigate
austere idol
#
evaluation warning: `mesa.drivers` is deprecated, use `mesa` instead
evaluation warning: `mesa.drivers` is deprecated, use `mesa` instead
hoary sluice
#

i thought anything you say is ragebait

lavish frigate
hoary sluice
#

use neovim @young flicker @pai.pie@pai.pie@pai.pie@pai.pie@pai.pie@pai.pie

#

@young flicker @young flicker @young flicker @young flicker @young flicker @young flicker @young flicker

#

how did you insta 5husk me

valid jetty
hoary sluice
lucid trail
#

are you using nix on mac rn?

hoary sluice
#

its all propaganda by windows users

valid jetty
#

i know someone irl who uses nixos and their config is so fucked it was honestly kinda funny

hoary sluice
#

same

#

he redid it recently

lavish frigate
hoary sluice
shrewd canopy
alpine pecan
#

not really

runic sundial
#

I haven't fucked up my system in like a year

lavish frigate
#

clueless

runic sundial
#

Even longer

#

I'm not reading the remaining context

jade stone
#

my horrorcode native node.js module worked in electron the first time blobcatcozy

nimble bone
lavish frigate
nimble bone
#

which

lavish frigate
ornate quiver
royal nymph
jade stone
jade stone
#

@deep mulch do you take backups of your vaultwarden

deep mulch
jade stone
#

so easy

royal nymph
jade stone
#

insane

#

hop on automated backups

royal nymph
#

i only use the main db so I only need the sqlite db

#

i haven't backed it up since forever

#

cause havent changed anything

jade stone
winged mantle
#

why is there barely any notable software written in smalltalk

jade stone
#

written in what

winged mantle
#

smalltalk

#

programming language

#

inspiration for objective c

#

hello world in squeak/smalltalk

Transcript show: 'hello world'.
winged mantle
#

FizzBuzz

1 to: 100 do: [ :x | | d3 d5 res |
    d3 := (x rem: 3) = 0.
    d5 := (x rem: 5) = 0.
    res := ''.
    
    d3 ifTrue: [res := res , 'Fizz'].
    d5 ifTrue: [res := res , 'Buzz'].
    
    res isEmpty
        ifTrue: [Transcript showln: x]
        ifFalse: [Transcript showln: res].
]
#

this took so long

#

idk haskell is probably easier

#

smalltalk is so object oriented that it doesn't have if statements

#

ifTrue is a method on booleans

cinder egret
#

vban dumb plugin request spammed everywhere

elder yarrowBOT
delicate groveBOT
dense sand
#

Does anyone know how can i capture network traffic to my phone

deep mulch
#

but just know apps tend to only trust their own certificate authority, so it won't work with those unless you do some work around

dense sand
deep mulch
#

yes

#

this is viewing only

dense sand
#

Also i suppose i wont be able to see https packets?

deep mulch
#

you can

#

well

#

it'll be encrypted

#

I've never looked at https traffic using http toolkit

dense sand
deep mulch
#

should be able to

dense sand
#

Oh i need rooted device

#

For the frida i mean

deep mulch
#

or you can patch the app

#

is it your own app?

dense sand
#

Nope

#

Yea i know i can use revanced

deep mulch
#

try httptoolkit without root stuff and see if the requests are intercepted

dense sand
#

If it is ill decompile the app

frosty obsidian
#

its way easier to do this on an emulator

dense sand
#

but yea i can maybe try

dense sand
#

@deep mulch so apparently i cant connect to internet with httptoolkit

glacial walrus
#

zootie zoot code

deep mulch
#

@glacial walrus bwa

pulsar marten
austere idol
#

safe dhusker mirrors?

hoary sluice
austere idol
lavish frigate
#

rust is taking these guys over like the symbiote

spark tiger
#

what is going on isob

#

this is so fucking weird like it doesn't work the first time and then all other ones it does

#

like huh

hoary sluice
frosty obsidian
#

geometry dash script

lavish frigate
#

Not sure what tools the cool kids use these days

deep mulch
jade stone
valid jetty
#

why is c++ there 😭

#

where is python 😭

#

i guess i don’t really have any python projects public most of that is private

#

oh and my aoc solutions aren’t in my own repo they’re in my friends repo lol

#

that makes sense

valid jetty
#

hiii

deep mulch
#

roieeee

nimble bone
#

first is ts

hoary sluice
#

BN

#

rntearntearntdearntdearntdearntdear

jade stone
#

typescript, ?, ?

deep mulch
jade stone
#

based font

winged mantle
#

i wrote != nil in javascript...

supple whale
winged mantle
#

then i thought it would be funny to #define nil null

#

then i remembered js doesn't have #define

#
const nil = null;
const NULL = null;
const nullptr = null;
const None = null;
const Option = { None: null };
const Optional = { empty() { return null; }, of(v) { return v; } };
royal nymph
winged mantle
#

tbf it was inside a string

tired vigil
#

fun fact "undefined" exists as a property on the global object... and its value is the undefined literal
you could theoretically overwrite it in a custom js environment

royal nymph
#

only in sloppy mode which no one should use in 2025

#

/run ```js
"use strict";

undefined = "hi";

rugged berryBOT
#

@royal nymph I only received js(18.15.0) error output

/piston/jobs/7e22c732-eab3-47b1-ab22-69d39b0bf261/file0.code:3
undefined = "hi";
          ^

TypeError: Cannot assign to read only property 'undefined' of object '#<Object>'
    at Object.<anonymous> (/piston/jobs/7e22c732-eab3-47b1-ab22-69d39b0bf261/file0.code:3:11)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
winged mantle
#

so fire

royal nymph
#

why is there #

winged mantle
#

starts section

#

only displays if user.guild != null

tired vigil
winged mantle
#

const undefined = null;

tired vigil
#

/run

undefined = {};
console.log(undefined, globalThis.undefined)
rugged berryBOT
#

Here is your js(18.15.0) output @tired vigil

undefined undefined
royal nymph
winged mantle
#

in sloppy mode it still seem writes are ignored

royal nymph
#

yes you can't overwrite the global

jade stone
royal nymph
#

but you can shadow it

#

/run ```js
function lol(undefined) {
console.log(undefined);
}

lol("hi");

rugged berryBOT
#

Here is your js(18.15.0) output @royal nymph

hi
jade stone
#

you should be allowed to proxy the window in javascript

tired vigil
winged mantle
#

/run

function usingNamespace(ns) {
    for (const key in ns) {
        // avoid polluting with object/array methods
        if (ns[key] === Object.prototype[key] || ns[key] === Array.prototype[key])
            continue;
        global[key] = ns[key];
    }
}

usingNamespace(Math);

console.log(max(5, 10));
rugged berryBOT
#

@winged mantle I only received js(18.15.0) error output

/piston/jobs/321b7a42-49e0-4ec4-a58f-cde568fc5655/file0.code:12
console.log(max(5, 10));
        ^

ReferenceError: max is not defined
    at Object.<anonymous> (/piston/jobs/321b7a42-49e0-4ec4-a58f-cde568fc5655/file0.code:12:9)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
winged mantle
#

why...

royal nymph
winged mantle
#

i wish you could do const { * } = Math;

jade stone
tired vigil
#

/run

with (Math) {
  console.log(max(1, 2));
}
rugged berryBOT
#

Here is your js(18.15.0) output @tired vigil

2
winged mantle
#

it's c++ style

valid jetty
#

/run

function rosieWith<T>(arg: T, callback: Function) {
    const descriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf(arg));

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && ((globalThis as any)[key] = descriptor.value.bind(arg));
    }

    callback();

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && delete (globalThis as any)[key];
    }
}


rosieWith([1, 2, 3], () => {
  console.log(map(x => x * 2));
}); 

console.log(map(x => x * 2));
rugged berryBOT
#

Here is your ts(5.0.3) output @valid jetty

file0.code.ts(2,32): error TS2550: Property 'getOwnPropertyDescriptors' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
file0.code.ts(4,44): error TS2550: Property 'entries' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
file0.code.ts(10,44): error TS2550: Property 'entries' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
file0.code.ts(17,15): error TS2304: Cannot find name 'map'.
file0.code.ts(20,13): error TS2304: Cannot find name 'map'.
royal nymph
#

you cant use with in strict mode

valid jetty
#

oh

winged mantle
#

why did you do in typescript instead of js

valid jetty
#

because i originally wrote it in typescript

#

/run

function rosieWith<T>(arg, callback) {
    const descriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf(arg));

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && (globalThis[key] = descriptor.value.bind(arg));
    }

    callback();

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && delete globalThis[key];
    }
}


rosieWith([1, 2, 3], () => {
  console.log(map(x => x * 2));
}); 

console.log(map(x => x * 2));
rugged berryBOT
#

@valid jetty I only received js(18.15.0) error output

/piston/jobs/8d821cd7-65d1-4fe5-b986-ff5936024388/file0.code:1
function rosieWith<T>(arg, callback) {
                  ^

SyntaxError: Unexpected token '<'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
valid jetty
#

oh

#

/run

function rosieWith(arg, callback) {
    const descriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf(arg));

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && (globalThis[key] = descriptor.value.bind(arg));
    }

    callback();

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && delete globalThis[key];
    }
}


rosieWith([1, 2, 3], () => {
  console.log(map(x => x * 2));
}); 

console.log(map(x => x * 2));
rugged berryBOT
#

Here is your js(18.15.0) output @valid jetty

[ 2, 4, 6 ]
/piston/jobs/33160626-898b-4cf2-b501-2552989a7245/file0.code:20
console.log(map(x => x * 2));
        ^

ReferenceError: map is not defined
    at Object.<anonymous> (/piston/jobs/33160626-898b-4cf2-b501-2552989a7245/file0.code:20:9)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
valid jetty
#

yeah it works

#

see

jade stone
#

this feels incorrect

valid jetty
#

/run

function rosieWith(arg, callback) {
    const descriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf(arg));

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && (globalThis[key] = descriptor.value.bind(arg));
    }

    callback();

    for (const [key, descriptor] of Object.entries(descriptors)) {
        typeof descriptor.value === "function" && delete globalThis[key];
    }
}


rosieWith([1, 2, 3], () => {
  console.log("--- IN rosieWith ---");
  console.log(map(x => x * 2));
  console.log("--------------------");
}); 

console.log(map(x => x * 2));
jade stone
rugged berryBOT
#

Here is your js(18.15.0) output @valid jetty

--- IN rosieWith ---
[ 2, 4, 6 ]
--------------------
/piston/jobs/6d88160c-cbd4-4328-8828-f3b6ac451a5a/file0.code:22
console.log(map(x => x * 2));
        ^

ReferenceError: map is not defined
    at Object.<anonymous> (/piston/jobs/6d88160c-cbd4-4328-8828-f3b6ac451a5a/file0.code:22:9)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
valid jetty
winged mantle
#

/run

function usingNamespace(ns) {
    while (ns !== Object.prototype && ns !== Array.prototype && ns != null) {
        for (const desc of Object.getOwnPropertyDescriptors(ns))
            global[key] = desc.value;

        ns = Object.getPrototypeOf(ns);
    }
}

usingNamespace(Math);

console.log(max(5, 10));
rugged berryBOT
#

@winged mantle I only received js(18.15.0) error output

/piston/jobs/30146f0f-2f34-4e43-9a31-fa9ddc41c2b5/file0.code:3
        for (const desc of Object.getOwnPropertyDescriptors(ns))
                                  ^

TypeError: Object.getOwnPropertyDescriptors is not a function or its return value is not iterable
    at usingNamespace (/piston/jobs/30146f0f-2f34-4e43-9a31-fa9ddc41c2b5/file0.code:3:35)
    at Object.<anonymous> (/piston/jobs/30146f0f-2f34-4e43-9a31-fa9ddc41c2b5/file0.code:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
jade stone
royal nymph
#

/run ```js
function using(namespace, callback) {
const keys = Reflect.ownKeys(namespace);
const added = [];

for (const key of keys) if (!(key in globalThis)) {
    const v = namespace[key];
    globalThis[key] = typeof v === "function" ? v.bind(namespace) : v;
    added.push(key);
}

try {
    callback();
} finally {
    added.forEach(k => { delete globalThis[k]; });
}

}

using(Math, () => console.log(random()));

rugged berryBOT
#

Here is your js(18.15.0) output @royal nymph

0.07681129048413027
royal nymph
#

you can even do it without polluting the global by instead using eval

valid jetty
#

oh true i forgot eval exists

winged mantle
#

is there a library to do eval in rust

#

why are you husking... rust has a crate for garbage collection

valid jetty
winged mantle
#

rust devs are insane

jade stone
royal nymph
#

I did that in my rust discord bot

winged mantle
#

HORROR

royal nymph
valid jetty
#

thats what proc macros are

royal nymph
#

how do you use a macro at runtime

winged mantle
valid jetty
#

oh

royal nymph
#

this is for runtime

valid jetty
#

i see

#

rust compiles proc macros to dlls and simply dlopens and runs your functions at compiler's runtime blobcatcozystars

winged mantle
#

veval
#include <stdio.h>
puts("Hello world");

royal nymph
#
use libloading::{Library, Symbol};

let clean_code = format!(
    r#"
use std::fmt::Display;

#[no_mangle]
#[allow(dead_code)]
fn eval() -> impl Display + Send {{
    format!("{{}}", {{
        {}
    }})
}}
"#,
    code
);

fs::write("code.rs", clean_code).expect("bad");
let res = Command::new("rustc")
    .args(["code.rs", "--crate-type", "dylib", "-o", "eval.so"])
    .output()?;

let res = unsafe {
    let lib = Library::new("eval.so").expect("Failed to dlopen eval.so");
    let func: Symbol<unsafe extern "C" fn() -> String> =
        lib.get(b"eval").expect("Failed to dlsym eval");
    func()
};
#

rate

winged mantle
#

how are you meant to access discord stuff through eval

royal nymph
#

you don't blobcatcozy

#

import all of it in the boilerplate then you can access it directly

valid jetty
#

i wonder how hard it would be to make proc macros for elle

winged mantle
#

add flash player build target to elle

tired vigil
jade stone
winged mantle
#

i assume it just counts own repos

royal nymph
#

API responded with non-success status code: 403

winged mantle
#

so innacurate

royal nymph
winged mantle
#

this repo is ruining it

#

i just copied an svn repo to github

valid jetty
# valid jetty i wonder how hard it would be to make proc macros for elle
use std/prelude;

fn fmt(TokenStream stream) @proc_macro {
    stream.advance(); // struct keyword
    name := stream.current_token().get_identifier().unwrap();
    
    while stream.current_token().kind != TokenKind::LeftCurly {
        stream.advance();
    }

    stream.advance(); // { punct
    
    fields := [string;];
    
    for ;; {
        if [TokenKind::Comma, TokenKind::RightCurly].contains(stream.current_token().kind) {
            stream.backward();
            fields.push(stream.current_token().get_identifier().unwrap());
            stream.advance();

            if stream.current_token().kind == TokenKind::RightCurly {
                break;
            }
        }

        stream.advance();
    }

    res := fields
        .map(fn(x, i, self) "self.{}{}".format(x, i + 1 >= self.len() ? "" : ","))
        .join("");
    fmts := (0..fields.len()).map(fn() "{{}").collect();
    
    return TokenStream::from("
        fn {}::__fmt__({} self, u64 _) {{
            $println(\"{} {}\", {});
        }
    ".format(name, name, name, fmts, res);
}

then you use it like

struct Foo @fmt {
    i32 a,
    i32[] b
}
#

its probably not this easy

winged mantle
#

my code working so well

#

unfortunately the joined at thing doesn't show on leave unless the member is cached :(

#

generates this code bloubcaitcoezy

let result = "";
if (view?.["user"]?.["guild"] != null) {
        result += view?.["user"]?.["joinedAt"] ?? "";
        result += " (stayed for ";
        result += view?.["user"]?.["membershipDuration"] ?? "";
        result += ")";
}
return result;
#

and code like this can be generated from user input

#

nothing could go wrong

#

i love using function constructor for microoptimisation

#

zod uses it too for parsing

frail turtle
#

I forgot my github repo with like 90 hours of python in the past month isnt public right now lol

ivory heath
jade stone
#

rate

austere idol
placid cape
#

datamining husk

winged mantle
cinder egret
#

and they were mostly right about the fact most restaurants will use trolleyzoom

#

but not a good thing…

lavish frigate
#

this is the equavalent of a ceo saying "in the future all apps will be made with ai and if you cant deal with that then you need to stop using computers"

deep mulch
#

@cinder egret nerd

frosty skiff
#

writiing blog post

#

🀀

#

soontm

ornate quiver
#

love
ping me when you're done i will read

winged mantle
#

why do i do pretty nicely organised code whilst the best developers just dump every source file in the same folder and write swear words + words i'm pretty sure were banned in the 20th century in their comments

nimble bone
#

properly organised @winged mantle

frosty skiff
#

Lemme know if you like my site too

#

I'm working on part 2 soon, if you want me to go over anything specific lmk

#

I'm mainly gonna go over actually reversing JNI libraries, reversing a minecraft cheat that uses JNI for protection/drm, how the VM's classloader works, how JVMTI works etc

#

Also how transpilers like JNIC work and how to fight against transpilation

#

Same with people who proxy calls (like JNIC lol)

gilded surge
#

finally free

#

rust horror

frosty skiff
#

What are you compiling 😭

gilded surge
#

servo

frosty skiff
#

I seeee

gilded surge
#

im also running a 12yr old cpu with 2 cores

#

a friend of mine with a decent cpu compiled it to release target in 5mins

winged mantle
#

is it true most senior developers spend all day aligning things and adding comments like this

/*************************/
/* Color enum            */
/* Enumeration of Colors */
/*************************/
enum Color {
    RED   (255, 0,   0),
    GREEN (0,   255, 0),
    BLUE  (0,   0,   255),
    ORANGE(255, 120, 0),
    // ...
crude star
#

yes

#

this is why golang was invented mainly

winged mantle
#

cool...

deep mulch
#

"If you create more without cleaning up, crash the VM." I think you forgot "you'll" @frosty skiff

deep mulch
#

are you gonna cover local frames in the next part

#

your website is cool

winged mantle
#

c so good

royal nymph
winged mantle
#

i used stringer in go

#

i guess it wouldn't be that hard to implement stringer for c

winged mantle
#

for some reason i got confused and just wrote struct three times

#

and then i wrote try inside the function...

#

in c

#

i love c

crude star
#

#define try
#define catch if (0)

ivory heath
#

you dont even need a tool to generate code like stringer the c compiler preprocessor can

frosty skiff
#

inlcuding local frames & stuff

deep mulch
#

:blobcatcozy:

frosty skiff
# deep mulch love

I'm gonna write another post at some point on JVM obfuscation and I'll probably go more indepth into like

#

how people break ASM & stuff

#

same with how stuff like the stackmap works etc

deep mulch
#

ooo

#

will you ping me when you do

frosty skiff
#

sure

frosty skiff
#

if you wanna know something cool im working on

#

full emulation of jni

#

I'm planning on making it run with the real vm so it doesn't need to use mock data

jade stone
#

I AM GOING TO GO FUCKING ISNANE

#

CHROMIUM HAS IT'S OWN FUCKIGN WINDOW FOR CLIPBAORD

#

X11 HURTS MY HEAD

royal nymph
#

love?

jade stone
#

the window is an orphan so i can't tell which chromiumslop app created it

#

i think i can get around it

the window id of the selection owner seems to be very close to the real window id

#

i can probably manage with some shitty heuristics

jade stone
#

@solemn ravine i want metadata for each clipboard entry (window that copied it, timestamp, icon, ...)

but each program uses it's own window as an "owner" for the selection

#

so it's impossible to know what window copied what

solemn ravine
#

wow

#

My clipboard manager just gets the current active window lol

jade stone
#

it's not just chromium lol

jade stone
solemn ravine
#

when it comes to timestamp, its just when its saved to the sqlite db

royal nymph
solemn ravine
#

I handle a lot of useless data like that on the apps side

jade stone
#

it is also not on any of the selection owner windows

pearl stagBOT
# solemn ravine https://github.com/khcrysalis/Copyboard/blob/main/ClipKit/Sources/ClipKit/Storag...

StorageManager+historyApplication.swift: Lines 24-40

/// Creates an application for the current frontmost application if needed.
/// - Returns: Application object
public func createApplication(for bundle: URL? = nil) -> CBApplication? {
    guard let applicationBundleUrl = bundle ?? NSWorkspace.shared.frontmostApplication?.bundleURL else {
        return nil
    }
    
    if let existingApp = getApplication(for: applicationBundleUrl) {
        print("already exists skiping!")
        return existingApp
    }
    
    let newObject = CBApplication(context: context)
    newObject.uuid = UUID().uuidString
    newObject.bundleUrl = applicationBundleUrl
    return newObject
}
solemn ravine
#

silly

#

macos giving us an api just to get the frontmostApplication is kinda crazy

#

it gives us the path, and using that path you can just retrieve the icon with another api

jade stone
#

i think i will just use focused window until i find something that is incorrect

#

oh

jade stone
#

it would be fucked by things like bitwarden which clear it maybe

#

hmmmmm

royal nymph
#

pretty sure venmic has a similar issue with some apps just not setting basic metadata

solemn ravine
#

Focussed window just seems reasonable

royal nymph
jade stone
#

@royal nymph what if i hooked libx for all processes to add the pid to every window blobcatcozy

solemn ravine
#

I dont really consider apps that arbitrarily modify the clipboard like i do

#

If it happens it happens the user can just copy it from my app again

jade stone
#

ok

#

gtk is sane and doesn't do this window bullshit

pearl stagBOT
#

ClipboardMonitorManager.swift: Lines 79-84

private func _didChange() {
    let current = _pasteboard.changeCount
    guard current != _lastChangeCount else { return }
    _lastChangeCount = current
    _checkClipboardItems()
}
solemn ravine
#

is this considered an event

#

checking NSPasteboard.general.changeCount

jade stone
#

that is def polling

royal nymph
#

event would be your app is suspended and waiting for the os to notify it

solemn ravine
#

when the clipboard changes that value is increased by 1

#

starts from 0 when you first use it

#

when the clipboard changes that value changes so it checks if it has changed and does what it needs to do

#

idk why they do this in particular

jade stone
#

i can't wait to start windows support on this

solemn ravine
#

windows got one nachoPray

jade stone
royal nymph
#

yes

#

native Windows feature

#

it's decent

jade stone
#

(i'm not talking about the native one)

#

that has a okish ui

solemn ravine
#

the native one is like one of the only clipboard managers with sane ui

#

It works as intended but as a mac user i accidentally trigger it because i use win+v for pasting and windows uses that to open the clipboard manager

solemn ravine
#

no its just win+v on mac and I accidentally trigger it bc im too used to it

#

switching between them is annoying because of that..

#

what more do you need from this..

jade stone
solemn ravine
#

oh it has no searching

#

kind of cringe

jade stone
#

also ocr for images

#

idk if yours has that, but i'm adding to mine

solemn ravine
#

bro needs ocr for clipboard

#

Even i didnt add that

jade stone
#

ocr is soooo nice tho

jade stone
solemn ravine
#

criiiinge

#

well mine "doesnt" but it has functionality for it

#

Incorporating html/rtf rendering in such small cells just causing me a lot of trouble

jade stone
#

make some popout window / quick preview for it

solemn ravine
#

I was thinking of just making the user press space to show a proper preview of the clipboard contents with all the rendering, or have a config where all the cells are large and incorporate them there

jade stone
#

i like the idea of the first

#

maybe have some side view that shows the currently hovered item

#

in a bigger preview

solemn ravine
#

I will probably do both

#

honestly ive been holding it off lately because making UI for this sucks

#

ironically

jade stone
#

thats party why i came to electron

#

react my beloved

solemn ravine
#

all the backend work is just done but making ui just for displaying a million types of content in a good way is annoying

jade stone
#

(+ i don't have to deal with intellij and gradle)

solemn ravine
#

I wouldnt have this problem in a mobile app

nimble bone
#

are you making react clipbaord manager @jade stone

jade stone
#

react is what i know

nimble bone
#

I LOVE DOWNLOADING CHROME TO RUN A CLIPBOARD MANAGER

#

just vibe code UI

jade stone
#

if i make it in CEF would you be happy

#

jcef

nimble bone
#

yea

jade stone
#

@nimble bone you love embedding jcef in things like idea and minecraft

ornate quiver
#

i need a windows style clipboard manager for wayland
how is there no actual clipboard manager

#

i can't find one

gilded surge
#

isnt the wayland clipboard manager wayclip or something

#

or no thats clipboard provider

spark tiger
#

like first code block i saw had big text, than mixed text, than small text

frosty skiff
#

yeah idek doesnt happen on my phone lol

spark tiger
#

😭

ornate quiver
# frosty skiff https://aprl.cat/articles/jni-reversing-part-1/

looove nice
pretty website and good writeup

a few things

  • static name resolution actually looks for 3 different names I believe: one with name+parameters, one with just the name, and I can't remember the last one
  • about local references; might be worth mentioning PushLocalFrame together with EnsureLocalCapacity?
  • also might be worth mentioning that for jni on android: starting with Android 8, there's an unlimited amount of local references available. before android 8, it was capped at 512 without requesting extra
frosty skiff
#

ive never touched android lol

#

like ever

ornate quiver
#

husk
well it has jni too just thought id let you know

frosty skiff
#

ya

#

idk people keep telling me to get into android stuff

#

since i already know a lot about jni stuff

frosty skiff
#

there's only the short name and the long name

ornate quiver
#

ah okay

frosty skiff
#

actually looking at openjdk src they have 4?

#

hat

#

what

ornate quiver
#

tf

frosty skiff
#

lol

#

the jni spec only mentions 2

ornate quiver
#

guhh I don't wanna hop off hyprland

deep mulch
#

guhh

#

@ornate quiver make

#

you will have fun doing Wayland protocol stuff

#

:blobcatcozy: :blobcatcozy:

ornate quiver
#

i don't think I will

#

idk how to work with wayland development

deep mulch
#

it's horrid from what I heard

#

would be good blog post

#

you can write how you gone insane

jade stone
#

You will use

#

Wayland support will come after x11 but before windows

ornate quiver
#

oh okay good

#

token lagget

jade stone
#

(Also has built in clipboard api so I only have to handle watching it for changes)

ornate quiver
#

nvm

jade stone
#

(But that is a pain in the ass)

jade stone
ornate quiver
#

aliucord blobcatcozy

jade stone
ornate quiver
#

no I do

#

anyways ill try and if electron is too laggy for me i might try making my own idk

deep mulch
#

800 mb memory usage for clipboard manager

#

insane

ornate quiver
#

and then kill myself trying to get Wayland protocol working

ornate quiver
#

what about just using cef

jade stone
#

But the plus is that native code is really easy

#

I might port to cef if electron is too heavy

#

@ornate quiver i will write in jcef and get the worst of both worlds

deep mulch
#

saladddddd 😭 will do anything but use gtk or qt

ornate quiver
#

what would i even use for ui
I don't want to use qt but gtk kinda sucks

jade stone
#

I tried compose but it sucked so hard

#

Idk how zt manages

ornate quiver
#

compose is amazing but compose desktop isn't really that good

jade stone
#

Yeah, I’m sure it’s great to work with on android

ornate quiver
#

and compose web sucks too @deep mulch hop off

deep mulch
#

I know

#

I just haven't had motivation to

deep mulch
frosty skiff
#

I was writing my own desktop widget system in rust a while ago

#

mainly using tinyskia for rendering

winged mantle
dense sand
#

why the fuck is this saying removed more lines than the original file has

#

the file has 30k lines and it says removed 2 million SKULL_SKELETON

winged mantle
#

why are you reading the file twice

#

why are you parrellising the filtering

#

it doesn't matter what language yyou use

winged mantle
#

or constants ig

#

as constexpr was only added in recent c

hoary sluice
#

@valid jetty @valid jetty @valid jetty @valid jetty @valid jetty

#

@valid jetty @valid jetty @valid jetty @valid jetty

#

@valid jetty @valid jetty @valid jetty @valid jetty

hoary sluice
dense sand
#

im running this on gh actions

#

so not my pc which is exploding troll

spark tiger
#

BRO WHAT THE FUCK

#

I UPDATED AND IT BROKE MY FONTS

#

WHAT IS THIS?????

dense sand
#

Windows moment

placid cape
#

windows

lavish frigate
#

Get scoopβ€˜d

nimble bone
#

@lavish frigate uses Cursor

lavish frigate
#

yea

spark tiger
lavish frigate
#

Alpha test…? git clone …/zed cd zed cargo build

spark tiger
lavish frigate
#

Bro is too lazy to type 3 commands 😭

#

It’s so over

#

AI and TikTok has rotten everyone and everything 😭😭😭😭

winged mantle
#

i mean it would probably take at least an hour..

#

no?

gilded surge
#

im gonna build on my craptop

#

terrible idea

lavish frigate
#

It takes maybe 30 minutes at most and it’s not like u have to sit here and watch you do the commands and you go OUTSIDE

gilded surge
#

if you're like me it takes more than 2 hours

spark tiger
gilded surge
#

if my craptop can compile this then anyone can compile it

pseudo sierra
spark tiger
#

and i mean this alpha test is more for the developers to get feedback me thinks

winged mantle
#

my pc does not like compiling zed blobcatcozy

pseudo sierra
#

ngl the compiler would be doing a bad job if it wasn't at 100% cpu usage

winged mantle
#

true

gilded surge
#

thats the rust compiler for you

#

very optimized for cpu usage

pseudo sierra
#

you paid for the whole cpu you will use the whole cpu

winged mantle
#

unless you want to use other apps while it's compiling

gilded surge
#

you can still mostly do that

pseudo sierra
winged mantle
#

doesn't it default to less than your cores

#

also -j6 would be more than my cores

pseudo sierra
#

oops

winged mantle
pseudo sierra
#

also I think it defaults to nproc

royal nymph
#

use -j100

#

for faster compile

pseudo sierra
#

real

winged mantle
#

i got a laptop with more cores but tbh i regret it because it just seems like a waste of money

#

4 is all you need

#

proceeds to complain about compile times

pseudo sierra
winged mantle
#

but i rarely use this laptop

#

soo

#

i refuse to believe that more powerful cpus are needed for any reason other than modern software being bloat

gilded surge
winged mantle
#

Compiling ai_onboarding v0.1.0

gilded surge
#

estimates say this will take about 260m to compile

winged mantle
#

husk

#

touch grass...

gilded surge
#

im not actually using zed im just curious how long thisll take to compile...

pseudo sierra
winged mantle
#

yea yea i know we have really cool stuff now

#

but it's bloat

pseudo sierra
#

no you still do have a point

#

kind of

#

like most of the time my cpu is at less than 5% usage

#

and discord still lags πŸ’”

winged mantle
#

i've been listening to old people yelling at clouds a lot lately

placid cape
winged mantle
#

it's amazing how many crimes web developers commit

#

ok it only took 20m to compile zed

#

impressive

#

time to delete it now

gilded surge
#

release or dev

winged mantle
#

probably dev

spark tiger
frosty skiff
royal nymph
ivory heath
royal nymph
#

it's a joke 😭

valid jetty
#

@hoary sluice look at this lmao

#

not my images

#

but its funny

#

"The function is a bit too long"

#

rewrites it into an even longer class

frosty obsidian
valid jetty
#

true

#

or fuck even

winged mantle
hoary sluice
#

MY MONTH LONG VACATION JUST STARTED AND YOU IMMEDIATELY REMIND ME OF ENTERPRISE JAVA

fleet cedar
#

All those nonsense instance fields are sooo clean

blazing haven
#

old but gold

supple whale
paper ermine
#

Yooo how do I clear vencords themes that its looks for, when I enable and disable any theme I get errors that it's trying to look for old theme files I no longer have and Im trying to clear up my console.

Make sure discord is fully closed first

AppData\Roaming\Vencord\settings\settings.json

CTRL+F: enabledThemes

Remove the old ones.

deep mulch
paper ermine
# spark tiger

I needed to clear it cause Im trying to debug a theme rn and I had those errors distracting me. No context was provided that's my b

spark tiger
#

why is react lowkey so much bloat 😭

#

also how tf did ppl build sites before react & svelte

alpine pecan
#

lowk

gilded surge
#

its not that difficult

paper ermine
gilded surge
#

all frameworks are bloat

paper ermine
#

^^

alpine pecan
#

lowk

gilded surge
#

you can make a good site with html and css

#

99% of the time you do not need some crazy js

paper ermine
#

I have one thats all PHP only hard coded, its my current project ^

alpine pecan
#

lowk

spark tiger
#

yeah but with frameworks like svelte you can do some like conditions easier

paper ermine
spark tiger
#

instead of manually adding elements and shi

alpine pecan
#

thanks for telling me

spark tiger
gilded surge
#

what do you use???

spark tiger
#

iphone???

gilded surge
#

explod

alpine pecan
#

give me $3m @spark tiger

spark tiger
#

u can buy a new iphone for like $400 istg

alpine pecan
#

give me $400

shrewd canopy
alpine pecan
#

i wouldn't buy an iphone if it was $50

shrewd canopy
#

The only sane phone

spark tiger
#

im not using anything nonapple anymore

shrewd canopy
#

Why

alpine pecan
#

he's special needs

spark tiger
#

cuz apple is the company of the future

alpine pecan
#

as you can see

gilded surge
#

apple is the company of several year old android hardware

spark tiger
#

okay thats just wrong

#

is any android as powerful as m4

gilded surge
#

yes

#

best android and best iphone are evenly matched computingwise basically

spark tiger
#

iphones are just perfect i dont see a reason not to use it

shrewd canopy
#

hostile to being ran on non-apple hardware

spark tiger
#

im buying an iphone

#

not some temu hardware phone and installing ios there

shrewd canopy
#

you can't install android on iphone either (without breaking eula of course)

valid jetty
spark tiger
#

iunno it seems much more needlessly complicated than svelte

nimble bone
#

sideloading is useless

#

also Apple locking down their operating systems to Apple devices allows for a more polished experience

#

bugdroid is on many different phones which gives you an ass overall experience

#

iOS meanwhile only runs on Apple silicon

jade stone
#

Oh

#

Checks out

royal nymph
#

or php

#

low quality ragebait @nimble bone

#

do better

nimble bone
urban isle
#

Apple hardware is miles ahead

#

The software on the other hand....

nimble bone
urban isle
#

shit's so locked down it pmo

nimble bone
#

if you're a nerd and have 50 sideloaded apps

#

every OS has a target userbase ykyk

urban isle
#

Yeah

#

Funny that privacy-wise, iOS is better for normies than your average Android device

#

unless you flash a custom ROM

#

Google πŸ‘Ž

nimble bone
spark tiger
#

how did i forget ts

hoary sluice
#

@valid jetty my fav vibecoder

#

gpt 5 is out

valid jetty
winged mantle
#

so good

hoary sluice
#

and then they proceed to show a github screenshot

deep mulch
#

@valid jetty hiiiiiiiiiiiiiii

ivory heath
#

I think i got lost in the sause

#

my body convulses at the idea of writing any more HTML or HTML templates so... this was created

#

i dont think a similar lib exists in go..... its also somewhat slow so i implemented my own templating to avoid recompiling a page for small reasons

#

i guess templ does something similar

winged mantle
#

gox

deep mulch
#

what

ivory heath
#

its a joke about jsx i think

ivory heath
lucid trail
ivory heath
frosty skiff
#

cfg crimes

#

🀀

lucid trail
#

that looks like a celeste map

frosty skiff
#

obfuscated_data

deep mulch
#

insnaity

frosty skiff
spark tiger
hoary sluice
#

id absolutely pay for a haskell lsp

#

for a good one

spark tiger
hoary sluice
#

there is one but its not as great as r-a or the jetbrains jvm ones

#

id pay for an lsp thats as good as r-a or a good package management system like cargo

spark tiger
#

sorry $9

hoary sluice
#

is that macos store

#

or what

spark tiger
#

yeah

hoary sluice
#

nah i want an nvim lsp not a macos ide

spark tiger
#

i randomly found it in awesome-mac with an expired domain lol

hoary sluice
#

also can u even pay in the mac store

spark tiger
#

...wdym?

hoary sluice
#

sanctions and stuff

spark tiger
#

ah u mean for me

hoary sluice
#

ye

spark tiger
#

yeah well apple is really one of the few companies that didn't really fully block shit

hoary sluice
#

oh cool

#

i remember kazakhstan used to rely heavily on russian infrastructure until "the incident"

#

now we have our own banks and everything

spark tiger
#

like you can either buy gift cards or top up your balance with like MTS (ig yk what that is?)

hoary sluice
#

i dont know

spark tiger
#

idk what's the proper name for it but it's mobilniy operator

#

mobile operator?

#

idk

#

like tmobile or whatever

hoary sluice
#

isp

spark tiger
#

and like the best thing it's not some 3rd-party app, you can literally do it inside app store or settings or

#

or just switch your app store region

#

fortunately it's VERY easy to do on apple

hoary sluice
#

does russie have beeline

#

yes they do

#

can u use beeline as well

spark tiger
#

iunno tbh

#

i personally never used it

#

i just bought gift cards

#

and then switched to turkey

ornate quiver
#

terrible

fleet cedar
#

90% of those aren't due to yaml, they're due to schemaless yaml

hoary sluice
#

philosophical question: which hdd is bigger?

winged mantle
fleet cedar
#

And of course, the latter half of the questions are random tools that use yaml, not yaml itself

winged mantle
#

i have no kubernetes knowledge but a fair bit of yaml knowledge

#

like what

fleet cedar
#

That one's a bad schema question, and also a "what's k18s got to do with this" question

#

Should've just asked what json this parses as

#

Which of course is a fallacious question as well, since yaml is a different tree than json, with yaml having tag? Γ— {map, list, string, unquoted string} as opposed to json's {object, array, string, float, bool, null}

winged mantle
#

ah yes the false file format equivilence fallacy

fleet cedar
#

The 14 kinds of multiline strings are indeed cringe though

winged mantle
#

what json this parses as is fine

#

just imagine JSON.stringify(yaml.parse("..."))

#

{ "geoblock_regions": ["us", "fr", false, "sf", "in", "uk"] }

fleet cedar
#

Specifically, what json does this equate to using the json-like schema

#

Yaml-the-syntax just says {unquoted string "us", ..., unquoted string "no", ...}

winged mantle
#

i think that's overcomplicating it...

fleet cedar
#

The json-like schema chooses that unquoted string "no" means false and most other unquoted strings are strings

winged mantle
#

this specific yaml has an obvious json mapping and if you know about the norway problem you will be able to answer it fine

fleet cedar
#

People conflating yaml-the-syntax with yaml-with-json-schema annoys me to no end

crude star
alpine pecan
#

90% of those aren't due to javascript, they're due to badly written javascript

hoary sluice
winged mantle
#

what the husk

dense sand
#

@nimble bone

spark tiger
#

if i see webpack in webtools does this mean this site sends all the source maps to the client...?

crude star
#

yes

spark tiger
#

wow sounds fun!

#

idk what it gets me yet

crude star
#

isnt this the 10th time you ask

spark tiger
#

well not really

#

i did ask about .js.map's before yeah

#

but it was outside devtools

#

so even after getting an aswer i still had no idea what it looks like in devtools

lavish frigate
spark tiger
#

sounds weird to me for a big airline site to do so but okay

lavish frigate
#

who gaf

#

you cant do a lot without the actual source code

spark tiger
#

but it makes it much much easier to get understanding of how things work

lavish frigate
#

ok

spark tiger
#

oh neat i just found a big list of all endpoints

spark tiger
lavish frigate
#

i mean yeah what else should we answer when nobody really cares about having sourcemaps like the downside is that already experienced people can use them to maybe make it easier to understand the code (not really though).. i guess might speed up reverse engineering..? (who even does that??!) and the benefit is that if prod breaks you can debug it easier and get the site working again easier

crude star
#

nobody hire chloe

lavish frigate
supple whale
#

webpack devtools....?

#

what?

spark tiger
#

?

crude star
#

yeah that's how it shows up when you have sourcemaps

supple whale
#

huh they added an icon?

#

didnt know thats possible

#

cool

crude star
#

i think its literally webpack specific

supple whale
#

but "sends source maps" isnt quite rigtht

#

if you're using inline-sourcemap, then its send together with the JS, since its inline

#

but if you're not using inline, then its requested by the devtools when you open devtools

#

and not loaded otherwise

#

which is why u usually want source maps enabled on prod if you're publishing source available code

#

since it helps, and doesnt imapct user performance

crude star
supple whale
#

i need sourcemaps for jsc code

#

as counter intuitive as that is

#

no1 made that yet doe

royal nymph
supple whale
#

if ur code is source available

#

it doesnt matter

#

as long as u dont use inline sourcemaps

royal nymph
#

yes duh

#

do you really think airline makes their code available

supple whale
supple whale
#

who?

royal nymph
#

did you even read chat wires

supple whale
#

oh

#

eh

spark tiger
supple whale
#

nah

#

just generic unhinged behavior

placid cape
royal nymph
lavish frigate
supple whale
#

XD

blazing haven
fleet cedar
#

Everything except the files only containing ts definitions, since those didn't produce any output code to put the sourcemap on

lavish frigate
#

Im telling Nintendo

ionic lake
#

Cope

lavish frigate
supple whale
#

wicked

ivory heath
# lavish frigate

I don't agree that it should be inline if a lot of casting and bit manipulation is used. Especially if its used as crap ton.

The function name makes no sense however.

lavish frigate
#

i mean if the function literally is just (a << 16) + b it doesnt make any sense its not like he says that helpers shouldnt be used just that that exact helper is stupid and sucks

#

even though i dislike this guy he does sum it up pretty nicely

ivory heath
#

linus was implying that b for some reason would have to be casted as well in some cases... and idk why unless it wasn't a literal uint16_t

#

oh yeah it isnt because they just bit shift one

#

so there is a little extra work its not just (a << 16) + b.
What arch tho is polluting the higher bits in a uint32 (i assume) and if were overflowing then we need to account for role over before merging.
Or why is this even rolling over... why is this code even needed...

ivory heath
lavish frigate
#

Whelp I’m too lazy to find the patch somewhere in the mailing list so unless someone else wants to spend their time looking through that we might never know

ornate quiver
alpine pecan
#

get bent

alpine pecan
#

i'm not taking advice from tim sweeny epic......

jade stone
#

@deep mulch rate

hoary sluice
#

but its still more understandable

tired vigil
#

classic rookie mistake

valid jetty
#

@hoary sluice

placid cape
#

heh

#

how's it going with elle?

ionic lake
#

Still can't design properly with good ux

#

Of course it's gonna take jobs

fleet cedar
#

I'm sure ai could file your taxes just fine

#

As could a proper automated system

#

But that wouldn't be beneficial for the taxes mafia

winged mantle
placid cape
winged mantle
#

it was kinda annoying to duplicate lots of code

#

though tbf i did get confused by my own helper

#

and didn't properly use the return value\

valid jetty
#

the worst one was enums

#

enum type conversion specifically

#

when you try to cast an enum to a type of a higher weight, it reinterpret casts it to that type (which is fine for any integer)

#

however since floats have a different binary representation, if you have an enum with an int repr and cast it to a float (say Foo::A * 2.0) it would reinterpret cast the integer value from Foo::A into a float and break everything

#

so instead i made it so if there’s any floats involved, the type conversion is fully extended to do stuff like integer extension and float truncation

#

safe to say that was an impossible bug to debug in the rhythm game

#

i was making raylib rectangles and the widths and heights started being 0 when i switched to using enums for defining my layouts lmfaooooo

lavish frigate
hearty lintel
lavish frigate
# hearty lintel is this true tho

People like to imagine this as true but the reality is that we members of the rust cult have slowly started swapping out their existing infra with rust

austere idol
#

cloudflare uses some r*st things, but not anyone else

hearty lintel
gilded surge
#

that's definitely not true

hoary sluice
lavish frigate
# hearty lintel not anyone else? idk if thats true

okay for real now: cloudflare uses rust in "performance critical systems" citing QUIC/HTTP3 and firewall engine
AWS uses rust citing lambda, ec2 and bottlerocket os for containers
microsoft has introduced rust in windows kernel components, linux has introduced rust in hardware drivers
firefox rendering engine (specifically servo components) is written in rust, chrome has added rust support to their codebase (specifically security-critical code paths)
linux utilities are actively being made in rust, uutils coreutils strives to port the entirety of GNU coreutils to rust and together with sudo-rs is being adopted into ubuntu, along with newer tools like ripgrep or fd
asahi linux (linux for apple mac) is made almost entirely in rust
lets encrypt uses rust in its ACME protocol handling
databases like surrealdb and tikv are made almost entirely in rust

  • many other day to day services are slowly converting to rust like the platform you are on right now, discord, using rust in the backend for very high usage server routes and rust in the frontend planning to speedup parts of the app
    dropbox moved to rust for critical syncing code, figma uses rust in image rendering and multi-user systems, 1password (and many more) use rust to make crossplatform core libraries
    (sadly?) a lot of web3 (crypto, blockchain) is made in rust
hearty lintel
#

very extensive list!

lavish frigate
#

there is probably a lot more but companies dont often have a reason to expose their rust usage, especially on server side

hoary sluice
hearty lintel
lavish frigate
# lavish frigate there is probably a lot more but companies dont often have a reason to expose th...

i think one nice part of discord is that they (relatively rarely?) publish blogs on development https://discord.com/category/engineering
here is a discord blog article about rust! https://discord.com/blog/why-discord-is-switching-from-go-to-rust

This post explains why Rust made sense for Discord to reimplement: how it was done, and the resulting performance improvements.

lavish frigate
austere idol
#

i'm lagging behind a lot

#

my knowledge has already rotten

#

and i still dont want to touch rust

valid jetty
shrewd canopy
austere idol
#

rust is bad at compile times

lavish frigate
valid jetty
#

from testing

  • rust is faster than C in most cases
  • C can be faster than rust if you are aware of invariants you can uphold that the rust compiler can’t represent, meaning in particular cases you can beat rust
#

in most cases rust already has very fast general case implementations in the standard library so you’re not beating it even if you use C

#

but in some cases it can be faster

lavish frigate
# austere idol rust is bad at compile times

its not as bad as people think, and while its annoying if you are building a project from scratch, incremental compilation make it very much bearable for developers and some lunatics (the dioxus development team) has even managed to add sub second rust hot module reloading using binary patching

valid jetty
#

my programming language with about 20k lines of rust takes like 30 seconds to compile

#

and that’s not a cold start that’s after all the deps compile

valid jetty
#

like particular unsafe memory operations

hearty lintel
valid jetty
#

that the rust compiler can’t guarantee safety for and a C compiler could optimize better

valid jetty
#

compile your bulk code once, compile the hot module into a dylib, then dlopen and dlsym, when you need to reload you compile the small module very quickly and reload the dylib

#

unfortunately rust is rust

visual shellBOT
# royal nymph lc.gem tldr?
tldr?

It's clear from your detailed list that Rust is rapidly gaining traction across a wide range of applications.

Here's the TL;DR:

Rust has become a go-to language for performance, reliability, and security. It's being adopted by major tech companies like Cloudflare, AWS, and Microsoft for core, mission-critical systems such as operating system kernels, infrastructure, and firewalls. In the open-source world, projects like the Linux kernel and various utilities are turning to Rust for better performance and safety. The language's strengths in handling memory and concurrency safely make it ideal for building everything from new web browsers to essential cloud services and cross-platform applications.

hearty lintel
valid jetty
# hearty lintel so why is rust fast? cuz of its standard library?
  • fast implementations for common things in the stdlib like vectors and iterators (and on that note iterators are compiled to loops)
  • memory safety adds extra optimizations the rust compiler can make because of assumptions about the memory
  • loads of the stdlib are zero cost abstractions
  • aggressive inlining
  • the type system is powerful enough that you can prove more things at compile time rather than needing runtime assertions for it
  • llvm (though they raise this down to llvm ir from their own mir on which they perform some basic optimizations)
#

i’m sure there’s more

lavish frigate
#

i wonder what made the llvm devs choose this as their logo

#

wait what 😭

hoary sluice
#

hui

royal nymph
lavish frigate
#

so true

valid jetty
#

becomes lower and lower level until they pass it to llvm for the final optimizations and stuff