Protty

1.5K posts

Protty banner
Protty

Protty

@kingprotty

System optimizer + concurrency geek.

Katılım Ağustos 2019
79 Takip Edilen3.3K Takipçiler
Protty
Protty@kingprotty·
Oops, forgot to enable DMs. The port is open now (& thanks for the support)
English
0
0
0
153
Protty
Protty@kingprotty·
Ello timeline, Currently looking for work. If you need someone to sculpt computers into moving data around efficiently (databases, vms, backends, compute kernels), I'd love to chat.
English
6
12
33
7.3K
Protty
Protty@kingprotty·
@filpizlo @salty_grndpa memory-safety = no UB from memory op. Fil-C turns LLVM memory-op-UB into panics. Rust has its own lang-level memory-op-UB outside LLVM (shared-xor-mut ref liveness, strict provenance, !Unpin mut-ref aliasing). Plugging Fil-C to Rust isnt enough hence MIRI. Zig=LLVM re:UB so ok
English
0
0
1
73
Filip Jerzy Pizło
Filip Jerzy Pizło@filpizlo·
@salty_grndpa Fil-C is completely memory safe. Rust isn’t (because unsafe). Zig isn’t (because uaf). You can make Rust and Zig memory safe by having them adopt Fil-ABI. Folks who understand memory safety know this. It’s not controversial
English
2
1
60
1.9K
Protty
Protty@kingprotty·
@penberg memory safe = no UB from memory op. Fil-C: turn UB memory ops to panics for LLVM IR. Rust: safe-rust guarantees no UB, but there's still unsafe-rust that doesn't. "Rust not memory safe (enough)" prob means "unsafe-rust" since that's part of Rust.
English
0
0
8
383
Pekka Enberg
Pekka Enberg@penberg·
I am catching up with memory safety discourse. Fil-C is memory safe because it turns invalid memory accesses to a runtime panic. Rust is not memory safe because it catches the same problems at compile time, unless you use explicit unsafe?
English
28
6
260
55.1K
Protty
Protty@kingprotty·
@filpizlo @dreamsofcode_io I run real rust programs; pulls in loads of crates but no C code,excluding libc ofc. AttackSurface here is unchecked mem-safety(unsafe) not security. Asked only about former for Fil-C & Rust, not special conditions(must be in prod or use C deps). "Fil-C safer" claim has asterisks
English
0
0
1
133
Filip Jerzy Pizło
Filip Jerzy Pizło@filpizlo·
The point is, if you run a Rust program in production with Miri (which nobody does, but even if we ignore that) then the program’s attack surface includes every C dependency. And there will be many of those. Every real Rust program pulls in loads of C code. If you run a C program in production in Fil-C (something people do), then the programs’s attack surface includes only the Fil-C runtime itself. Therefore, Fil-C is safer. But this is a super pointless discussion considering that nobody runs Miri in production
English
1
0
0
200
Dreams of Code
Dreams of Code@dreamsofcode_io·
I read this issue earlier this morning and kinda feel sympathetic towards Andrew. Bun’s rewrite to Rust has obviously impacted him (hence the “unlike Rust” comment). Whilst that part is petty, it does seem to be driving him to find a solution for Zig. Personally, I don’t think garbage collection is the right solution (1-6x perf impact), but even still, the fact he’s searching for one to improve Zig following one of its biggest negative events is commendable imho. Either way, will be interesting to see where he lands.
Kai Fell@kai_fell

the author of Zig needs therapy

English
20
6
333
45.5K
Protty
Protty@kingprotty·
@filpizlo @dreamsofcode_io This seems unrelated to Rust itself. I thought the claim was that Fil-C was safer than (unsafe) Rust, which includes MIRI.
English
1
0
0
207
Protty
Protty@kingprotty·
@filpizlo @dreamsofcode_io They both crash the program at runtime-detected UB. Fil-C is definitely faster / more usable for prod, but does that detract from Rust having an option for similar safety guarantees?
English
1
0
3
793
Protty
Protty@kingprotty·
@filpizlo @dreamsofcode_io Rust includes MIRI; Are there edge cases that Fil-C traps against that MIRI doesnt? (esp. considering that MIRI handles data races, not just provenance races).
English
1
0
2
1.8K
Filip Jerzy Pizło
Filip Jerzy Pizło@filpizlo·
It’s necessary for those of us working on memory safety to pinpoint that we are doing something that isn’t like Rust, because Rust has an incomplete memory safety story while pretending to be memory safe (in the sense that internet experts will get upset if you point out Rust’s flaws). So for those of us who understand memory safety, it is 100% necessary to draw the “unlike Rust” distinction.
English
4
6
96
10.2K
Protty
Protty@kingprotty·
@1_div_0 @antirez This has been my exp as well; Rigorously designing the higher-level view of the app/dataflow works, but then peek inside and it's holding locks over IO, copying megabytes worth of data accidentally, or (understandably) didnt employ some trick you know as someone more experienced
English
0
0
0
28
Stephen
Stephen@1_div_0·
@antirez Last week I was working in a database and it coded something that was significantly less efficient than I would do. It wasn’t even a large change. If I didn’t read it, I would have never known that it was technically correct, but not what was desired. How does one deal with that?
English
3
0
14
576
antirez
antirez@antirez·
It is my belief that many devs right now are not maximizing what they can do with automatic programming because they still look at the code. Doing it makes you the bottleneck. Your time is better invested in new ideas, QA, design, and asking yourself what is your goal.
English
278
259
2.7K
502.7K
Protty
Protty@kingprotty·
@misterclayt0n @sibaiisaac Rust isnt a "correct" language. Its a "can't cause UB in safe mode" one. You can still have race conditions, leak memory, crash, etc. If the UB cases it addresses have been your primary failure modes, then it indeed can help with correctness.
English
2
0
3
89
davi
davi@misterclayt0n·
@sibaiisaac because you can't out test bad language design. the bugs mentioned by the blog post should be not be possible in a correct language
English
1
0
2
157
davi
davi@misterclayt0n·
to sum it up, in Andrew's vision: > original bun was slop > slop rewrite > jarred is a bad manager and bad engineer > he's happy bun is no longer in zig tho I'm not the biggest fan of the rewrite, bun's blog post at least made some valid technical points (and somehow tried to praised zig quite a lot), which illustrated how lacking zig is, while Andrew is just being hostile for no reason at all this reading feels like a complete waste of my time
Debasish (দেবাশিস্) Ghosh 🇮🇳@debasishg

Andrew's thoughts on the Bun Rust rewrite .. andrewkelley.me/post/my-though…

English
22
7
533
64.8K
Protty
Protty@kingprotty·
@swerverx402 @penberg Zig development/leadership != Zig community. The biggest zig users are pretty unaligned, but they still use it because it's useful.
English
0
0
0
22
swerver
swerver@swerverx402·
@penberg The hostile vibes from the Zig community in general is counter productive. Sorry not sorry it’s an excellent language for AI assisted low level work whether they like it or not. The language doesnt need the purists or Bun to be excellent. It already is.
English
1
0
3
868
Jon
Jon@thjonml·
@charliermarsh Nobody is rewriting anything in Zig or C, and it's going to be some of the worst Rust code you can imagine... but may still be an improvement over whatever it was ported from.
English
4
0
8
1.6K
Charlie Marsh
Charlie Marsh@charliermarsh·
Entering an era in which there will be constant posts about how someone rewrote X in Rust or Y in Zig or Z in C, and they'll have nice-looking benchmarks and graphs, but you'll have no idea if it's at all good or usable
English
40
17
744
138.7K
Protty
Protty@kingprotty·
I naturally reason/design algs in pseudocode. Turns out LLMs have no problem working with it too. Allows writing minimal boilerplate Having fun with "pseudocode -> real impl" and "paper -> pseudocode" pipelines. It makes learning & testing new concepts/optimizations much easier.
English
0
1
17
1.2K
Protty retweetledi
Mitchell Hashimoto
Mitchell Hashimoto@mitchellh·
Mind boggling to me that I can make a thing faster and there's always people that ask "but why?" What kind of mentality is that? The pursuit of excellence does not need justification. Also, I find in so many cases, we can't know the impact of an improvement until we do it. For example, one I've talked about before: Ghostty's high IO throughput has enabled terminal program (emulator and TUI) fuzzing at a speed thats incomparably fast to prior solutions. This has resulted in upstream patches to resolve issues in popular projects like btop, tmux, and more. Speed enabled that anecdotally example that lifted the tides of adjacent communities that don't rely on Ghostty technology at all. I didn't predict this. Make things better because they can be better and let the results naturally play out.
English
170
465
5.8K
411.7K
マリク 🇿🇦
マリク 🇿🇦@malik672_·
is crossbeam ArrayQueue one of the worst lib and api ever ? Probably the worst I've seen
マリク 🇿🇦 tweet media
English
1
0
3
345
Protty
Protty@kingprotty·
@swenlei56 @valigo Its convenient & the ordering is defined in most other langs. Here, it can just happen accidently: # define F(x) f(x, x) F(*ptr++)
English
0
0
1
20
swenlei
swenlei@swenlei56·
@valigo why would you use a side effecting operation when giving a parameter in a function call?
English
4
0
0
1.1K
Valentin Ignatev
Valentin Ignatev@valigo·
In C, function arguments evaluation order is unspecified. gcc evaluates them from right to left, clang - left to right. This used to be a source of tricky bugs, but now -Wall flag catches it. Every time I see things like this I wonder if there are interesting ways to exploit it
Valentin Ignatev tweet media
English
35
18
570
33K
Protty
Protty@kingprotty·
loud incorrect buzzer sound for every L3d miss
English
1
0
2
756
Protty
Protty@kingprotty·
@valigo @SolidBasis Should take a look at things like ControlNet, inpainting, img2img, regional prompts, and other forms of intentional visual generation. It's not that reductionist.
English
0
0
0
38
Valentin Ignatev
Valentin Ignatev@valigo·
@SolidBasis > because you can definitely help shape things created by AI Yeah, just like entering your opponent's moves into the Windows 7 chess bot.
English
2
0
11
204
Valentin Ignatev
Valentin Ignatev@valigo·
Calling yourself an AI artist is like calling yourself a chess player while letting Windows 7 chess bot make your moves
English
15
5
211
7.9K
Protty
Protty@kingprotty·
@nuoji No: #Anonymous-Struct-Literals" target="_blank" rel="nofollow noopener">ziglang.org/download/0.6.0… T{} is struct literal .{} is anonymous (inferred) struct literal For zig, it's 6y old now
English
1
0
0
694
Christoffer Lernö
Christoffer Lernö@nuoji·
Is the .{ … } syntax from Jai? If so I kind of forgot about it because Zig’s using that syntax SO MUCH.
English
3
0
8
2K