@whitequark@mastodon.social
@whitequark@mastodon.social avatar

whitequark

@whitequark@mastodon.social

catgirl shaped object

"A cat is valued for companionship and its ability to kill vermin."

✧ i have friends, and my purpose is to support them ✧
✦ i have enemies, and my purpose is to eliminate them ✦
✶ i have a life, and my purpose is to reach heaven by violence ✶
✷ nothing else matters ✷

#searchable

This profile is from a federated server and may be incomplete. Browse more on the original instance.

mary_ext, to random
@mary_ext@wetdry.world avatar

"unlike you, who spend all time caring about bundle size, we're over here being productive" is a very awful mindset that's been instilled by the web dev circle

of course everyone shits on the web now, that's your fault

whitequark,
@whitequark@mastodon.social avatar

@mary_ext i'm productive and my bundles load in like a millisecond

whitequark, to random
@whitequark@mastodon.social avatar

compiler driver (it drives you to tears)

whitequark, (edited ) to random
@whitequark@mastodon.social avatar

pick your gender:

whitequark, (edited )
@whitequark@mastodon.social avatar

pick your gender:

whitequark, to random
@whitequark@mastodon.social avatar

the most important thing to remember while compiling Clang is that you're probably going to be still alive a week from now and so you don't really need to rush anywhere

whitequark,
@whitequark@mastodon.social avatar
whitequark,
@whitequark@mastodon.social avatar
lunareclipse, to random

world if Python had a TUI module with Unicode support in the standard library

whitequark,
@whitequark@mastodon.social avatar

@lunareclipse everyone wants batteries to be included but nobody wants to charge the batteries (or recycle the old ones when they're done)

tekknolagi, to random
@tekknolagi@mastodon.social avatar

compilers! compilers! free compilers for sale!
https://bernsteinbear.com/blog/weval/

whitequark,
@whitequark@mastodon.social avatar

@tekknolagi @wingo is this basically Graal for Wasm

whitequark, to random
@whitequark@mastodon.social avatar

this is the first time i encounter a C function returning a function without a typedef and ... no

whitequark, to random
@whitequark@mastodon.social avatar

postgres is a great database engine :)

whitequark,
@whitequark@mastodon.social avatar

@Paxxi fuck that

whitequark, to random
@whitequark@mastodon.social avatar

me: "i like it how the entire LLVM project is one monorepo"
her: "when are you going to compile the entirety of LLVM to WebAssembly?"
me: "yes."
her: "... I said that as a joke"

whitequark,
@whitequark@mastodon.social avatar

@ethantyping deterministic builds is a part of what I'm building this for!

whitequark,
@whitequark@mastodon.social avatar

@brouhaha but I like suffering

whitequark,
@whitequark@mastodon.social avatar

@brouhaha yeah I'm okay with that

whitequark,
@whitequark@mastodon.social avatar
whitequark,
@whitequark@mastodon.social avatar

so... that one was on me, right? so i did a non-LTO, RelWithDebInfo build

the linker finished quickly. and then ran wasm-opt, which consumed a downright concerning 22G of RAM and something like 10 minutes of real time

you can't win.

https://mastodon.social/@whitequark/112465582937702577

whitequark,
@whitequark@mastodon.social avatar

afaict the compiler driver calls wasm-opt unconditionally if:

  • it is on PATH
  • you pass -On with n>0 to the linker

so to make it not spend 10 minutes of real time in wasm-opt you need to pass -O0 to the linker. i only figured this out by reading the sources of the compiler driver.

nobody should be figuring out compiler options by reading the sources of the compiler driver. nobody!

whitequark,
@whitequark@mastodon.social avatar

-rwxr-xr-x 1 whitequark whitequark 877M May 19 09:31 clang-19
-rwxr-xr-x 1 whitequark whitequark 537M May 19 09:35 lld

if i combine the two i will have a 1.5 GB wasm binary. (i will combine the two, eventually)

whitequark,
@whitequark@mastodon.social avatar

so now that i've generated half a gig of debug information i can just feed it into wasmtime, have it generate DWARF for me, and be done with it, right?

wrong.

thread 'main' panicked at /home/whitequark/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-cranelift-19.0.1/src/compiler.rs:565:13:

whitequark,
@whitequark@mastodon.social avatar

do you think the debug information was valid? nope! wasm-opt unconditionally launched by wasm-ld (which performs link time optimization despite lack of -flto) also corrupted the DWARF data

did adding -O0 turn it off? yes! did that make the DWARF data seemingly well formed? yes! did it give me line numbers? of course not, it just gave me function names

0: 0x26e700d - lld!__wasi_thread_start_C
1: 0x26e84cb - lld!wasi_thread_start

thanks

also addr2line doesn't work

whitequark,
@whitequark@mastodon.social avatar

why does a single chromium renderer process peg six cores

whitequark,
@whitequark@mastodon.social avatar

i have solved my problem by disassembling the wasm module (i went through three different disassemblers until i found one that is able to finish this in finite time) and correlating it manually with the source code

... i'm pretty sure that wasmtime isn't reporting the trap correctly T__T

there should be one more frame on top of the frame 0

image/png

whitequark,
@whitequark@mastodon.social avatar

@sanfierro white quarks don't exist

thezoq2, to VHDL
@thezoq2@mastodon.social avatar

It is now possible to go from a clean linux laptop with nothing but chromium installed to running Spade on an in less than one minute!

All the magic is done by @whitequark's http://yowasp.org/ which I just ported Spade to.

Give it a try! https://vscode.dev/github/TheZoq2/spade-vscode-toolchain-demo

video/mp4

whitequark,
@whitequark@mastodon.social avatar

@thezoq2 how does Swim work anyways?

whitequark,
@whitequark@mastodon.social avatar

@thezoq2 ah yeah so shelling out to git will never happen

you'll need to link libgit or the like

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • InstantRegret
  • magazineikmin
  • Durango
  • Leos
  • Youngstown
  • rosin
  • khanakhh
  • slotface
  • ngwrru68w68
  • mdbf
  • thenastyranch
  • kavyap
  • DreamBathrooms
  • megavids
  • modclub
  • everett
  • anitta
  • GTA5RPClips
  • osvaldo12
  • ethstaker
  • cisconetworking
  • tacticalgear
  • tester
  • provamag3
  • cubers
  • normalnudes
  • lostlight
  • All magazines