shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

268
active users

#compiler

0 posts0 participants0 posts today

Today, I discovered that Rust does monomorphization... and what monomorphization is!

rustc-dev-guide.rust-lang.org/

Basically, it's mostly important (I think) if you are reversing Rust or need to understand what the compiler does.
The idea is that with monomorphization, code which is apparently generic is actually compiled in a specialized manner for your code. Like you use "map", well, you'll get your own map with your own specificities.

rustc-dev-guide.rust-lang.orgMonomorphization - Rust Compiler Development GuideA guide to developing the Rust compiler (rustc)

I want to read a #compiler book written in the last 15 years that covers same topics as the Modern Compiler Implementation book by Appel, but uses recent terminology, tools and techniques. Any recommendations? #compilers #programminglanguages

EDIT: It seems like no such book exists. I guess I’ll have to read docs, blogs and papers along with old books to put things together myself.

1. resume work on a hobby compiler project
2. simplify first 'native' backend with a toy risc32 target
3. luckily the emulator was quick to write
4. let's verify the emulator first
5. writing test vectors by hand in hex is no fun
6. time to write an assembler for this ISA
7. and thus yaks are shaved

“Hedge funds will go to great lengths in pursuit of #profits, whether it is by counting cars in satellite photos of parking lots or shipping gold across the Atlantic. Building a #compiler—a piece of #software that turns human-written code into programs a computer can execute—for your homegrown language? That still raises eyebrows.

#JaneStreet is the quant shops’ quant shop, and it does just that, with great success. Last year its trading revenue almost doubled, to $21bn, putting it on a par with giants such as #Citigroup and #MorganStanley. And the goose that lays the golden egg is its #tech system.

But it is what this system is built from that is really unusual. Other firms employ a hotchpotch of #ProgrammingLanguages, allowing staff to choose the right one for the job. At Jane Street almost everyone works in an obscure tongue developed by French academics: #OCaml.

Ask a #trader at the firm for its benefits and they will reel off a string of features, such as its support for #StaticTyping and #FunctionalProgramming, that make it hard to learn but powerful when applied to a problem. The company says the language helps “maximise the #productivity of each person we hire”.”

#HedgeFunds / #finance <economist.com/finance-and-econ> (paywall) / <archive.md/DQ0ku>

The Economist · Jane Street’s sneaky retention tacticBy The Economist

I am building gcc-15.1.0 on my iMac G4 (Tiger) machine. It is on stage2, which is a good sign.

It will include C, C++, Fortran, Modula-2, Objective C, and Objective C++ compilers.

It will depend on my new PowerPC Mac OS X modernization library, libpcc: github.com/ibara/libppc

I'll write a blog post about how to use it once it is all compiled; my goal is to produce a turnkey solution that just works(TM), including assembler, linker, and other utilities, as recent as possible for PowerPC.

And libppc can be instantly extendable to incorporate more C11 and later features. Hopefully others in the retro Mac community are interested in building that up with me.

My ultimate goal is to build some flavor of WebKit some day and have a modern web experience (even if slow, and possibly using X11). But in the meantime we will probably build a lot of excellent modern software to keep these machines going.

GitHubGitHub - ibara/libppc: Modernization effort (C11-C23) for Mac OS X PowerPCModernization effort (C11-C23) for Mac OS X PowerPC - ibara/libppc

GSoC update! @AlleyCH is diving into the Vala compiler to bring native JSON (de)serialization support.

She has been exploring the full compilation pipeline and is working on a new valajsonmodule.vala. Adding native support will make it much easier for Vala developers to work with structured data out of the box—less boilerplate, better developer experience. ✨

Read the full blog post:
alleych.github.io/gnome/compil

Hello World :) · Compiler KnowledgeIntro

TPDE Compiler Back-End Framework

arxiv.org/abs/2505.22610

"TPDE-LLVM: a standalone back-end for LLVM-IR, which compiles 10--20x faster than LLVM -O0 with similar code quality, usable as library (e.g., for JIT), as tool (tpde-llc), and integrated in Clang/Flang (with a patch)."

Holy cow! 🤯

Open Source on GitHub:
github.com/tpde2/tpde

arXiv.orgTPDE: A Fast Adaptable Compiler Back-End FrameworkFast machine code generation is especially important for fast start-up just-in-time compilation, where the compilation time is part of the end-to-end latency. However, widely used compiler frameworks like LLVM do not prioritize fast compilation and require an extra IR translation step increasing latency even further; and rolling a custom code generator is a substantial engineering effort, especially when targeting multiple architectures. Therefore, in this paper, we present TPDE, a compiler back-end framework that adapts to existing code representations in SSA form. Using an IR-specific adapter providing canonical access to IR data structures and a specification of the IR semantics, the framework performs one analysis pass and then performs the compilation in just a single pass, combining instruction selection, register allocation, and instruction encoding. The generated target instructions are primarily derived code written in high-level language through LLVM's Machine IR, easing portability to different architectures while enabling optimizations during code generation. To show the generality of our framework, we build a new back-end for LLVM from scratch targeting x86-64 and AArch64. Performance results on SPECint 2017 show that we can compile LLVM-IR 8--24x faster than LLVM -O0 while being on-par in terms of run-time performance. We also demonstrate the benefits of adapting to domain-specific IRs in JIT contexts, particularly WebAssembly and database query compilation, where avoiding the extra IR translation further reduces compilation latency.

A question for my CS colleagues. I'm looking for examples for interpreters or JIT compilers in places one would not necessary expect in an operating system at runtime (in the widest possible context). Obvious examples are IMHO shells or (e)BPF/dtrace scripts. Some more exotic uses I can think of are interpreters for vector fonts (e.g. PS Type1 or TT hints) or the use of Prolog in the network configuration of NT4.

Do you know other examples?

web.archive.org/web/2004060319

web.archive.orgUsing Prolog in Windows NT Network Configuration

Currently dallying with a simple embedded, statically typed scripting language. The magic is an extensible lexer and parser, with the hosting application able to do something like

VM_addCommand(vm, KEYWORD(“open”), KEYWORD(“file”), TYPE(STRING), KEYWORD(“as”), REFERENCE, END);

to allow something like

open file “foo.txt” as myFile

It’s obviously been done before, but it’s fun to play with. I haven’t done enough #compiler or #parser work lately.