Ben L. Titzer

1.5K posts

Ben L. Titzer

Ben L. Titzer

@TitzerBL

Director of the WebAssembly Research Center at Carnegie Mellon University. Principal Researcher. Wasm co-founder. Former V8 engineer. Compilers!

เข้าร่วม Mayıs 2022
347 กำลังติดตาม2K ผู้ติดตาม
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@msimoni Nope, the only members of a generic type (type parameter) are the equals/not equals and the cast and query operators, i.e. these: T.== T.!= T.!<U> T.?<U>
English
0
0
2
67
Manuel Simoni
Manuel Simoni@msimoni·
@TitzerBL Can you call any methods on a generic type, like T in Map<T>, without casting? (I've seen that you pass in equals and hash functions to Hashmap, but would Java-style with hashCode and equals _methods_ also work?)
English
1
0
1
106
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@msimoni It doesn't. It would be nice in some situations. I can see a use for subtype constraints and for a typeclass-like system (traits?).
English
1
0
3
87
Manuel Simoni
Manuel Simoni@msimoni·
@TitzerBL Does Virgil have bounds on type parameters, and if not, has the absence ever bothered you?
English
1
0
1
111
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@J_Svenningsson @laurencetratt Loop versioning and bounds check elimination have always been a thing, but these are advanced compiler techniques that weren't fully evaluated in the debate over bounds-checking because of naivety on detractors' parts. There's always more compilermancy to be done.
English
1
0
2
24
Josef Svenningsson
Josef Svenningsson@J_Svenningsson·
@laurencetratt Code tends to be memory- or io bound these days, so additional checks running on the cpu will make a smaller difference. I also suspect it's more common these days to use bulk operations on collections rather than looking up individual elements. Checks can be done once upfront.
English
1
0
0
49
Laurence Tratt
Laurence Tratt@laurencetratt·
Bounds checking isn't as expensive as some folk thought chandlerc.blog/posts/2024/11/… That said, I am not sure I would treat the 0.3% number as gospel. This might, for example, have relied on some manual removals / annotations of bound checks in particularly important cases.
English
5
1
17
1.3K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@laurencetratt 'member back in the 19?0s when every conversation about safety followed exactly the same lines? People were hand-wringing about the cost of safety checks back then too. Guess what, computers are 100X if not 1000X faster today! If we spent 2% on safety, we'd only be 980X faster.
English
1
2
7
649
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@ShriramKMurthi More things should end with -mancy. Like compilermancy or optimancy or datamancy.
English
4
0
10
318
Shriram Krishnamurthi (primary: Bluesky)
TIL that people tried to predict the future from the sound of thunder (not surprising), and this is called «brontology». Now it refers to the scientific field studying thunder. Nevertheless, that older, divination form of brontology is a special case of … «aeromancy».
English
1
3
25
3.5K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@jfbastien Make it nine. I believe after all these years that we've been cheated out of our god-given right to a parity bit. Pretty please and thank you.
English
1
0
8
400
JF Bastien
JF Bastien@jfbastien·
Proposing that C++ acknowledge that there are exactly 8 bits in a byte. I’d love feedback, especially from embedded / DSP folks who think this is a terrible idea. isocpp.org/files/papers/P…
English
26
33
346
106.3K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
The proceedings of JENSFEST are now in the ACM Digital Library! It's a great collection of paper dedicated to Jens Palsberg on the occasion of his 60th birthday. If you're at SPLASH next week, come see them be presented! dl.acm.org/doi/proceeding…
English
0
4
20
1.7K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
Excited for JENSFEST next week, where I'll present work on unboxing ADTs (one of the key optimizations for systems programming in safe languages) in Virgil done by my excellent bachelor's student Bradley Wie Jie Teo. arxiv.org/abs/2410.11094
English
1
1
32
3.4K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@AndrewCMyers @ShriramKMurthi Not that optimizers for safe languages give two craps about all that "correctness" and "observability" nonsense the PL nerds prattle on about. Let those integers overflow into UB! By Cronus we'll do unsound optimizations and blame you when they're wrong!
English
0
0
3
141
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@AndrewCMyers @ShriramKMurthi Unsafe languages are usually low-level, which means they could expose more intermediate steps of a computation. A safe language with deterministic semantics gives a larger scope for optimization because a compiler can assume/prove fewer observations of intermediate states.
English
1
0
3
159
Andrew Myers
Andrew Myers@AndrewCMyers·
Instead of researching how to make unsafe languages run faster, how about we focus on making type-safe and memory-safe languages faster? Benefits for security, energy use, CO2...
English
9
3
46
6.5K
Jules Jacobs
Jules Jacobs@JulesJacobs5·
@AndrewCMyers I think requirement #1 is memory representations without all those extra pointer indirections.
English
3
0
8
712
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@AndrewCMyers Unsafe languages are already stupid fast. How do we make smart fast? Respect for Rust, but it's not the final answer. If I thought it was the final answer, I'd at the very least be adding ownership to Virgil. I'm not. Ownership is a red herring; it's all about dat-dat data.
English
0
0
9
421
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@nomad421 Yeah, the design and binary format is effectively done, so you shouldn't have any issues with late changes.
English
0
0
1
77
𝕐
𝕐@nomad421·
@TitzerBL Cool! Maybe I'll get a head start so stuff is ready when it officially lands.
English
1
0
1
49
𝕐
𝕐@nomad421·
When are we expecting wasm64 to be finalized? There are a lot of things I’d love to test out in wasm but a 32-bit memory address space in 2024 just isn’t it.
English
1
0
4
600
Ben L. Titzer
Ben L. Titzer@TitzerBL·
Yesterday we announced two new developments at the WebAssembly Research Center at CMU, welcoming Bosch as a new affiliate sponsor and celebrating Shopify's deepening their investment as a Gold sponsor. I'm excited for the future of our collaborations! cs.cmu.edu/news/2024/wrc-…
English
0
4
51
2.4K
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@rg9119 What is the domain of x? It seems like if it's the real numbers the equation only has x = 1 as a solution, for n > 0. Or maybe I am missing something.
English
1
0
0
169
Ron Garcia
Ron Garcia@rg9119·
A microcosm of my lifelong battles with math: spent an unreasonable number of hours (on and off, over weeks) trying to flesh out the details of one throwaway sentence in a larger proof. 😩
Ron Garcia tweet media
English
1
1
8
483
Ben L. Titzer
Ben L. Titzer@TitzerBL·
@moyix Nah, spectre is because CPUs hallucinate the answer to branches. They could execute straight-line code out-of-order and it'd be fine--I think. (variant 4 enters the chat). Oh nevermind.
English
0
0
1
92
Brendan Dolan-Gavitt
Brendan Dolan-Gavitt@moyix·
Many people are replying “factory”. However, to see “factory”, you must first see “fact” and “factor”, so we may conclude that these people are liars.
English
29
0
36
12.7K