site: eli.thegreenplace.net
FAAS in Go with WASM, WASI and Rust
https://eli.thegreenplace.net/2023/faas-in-go-with-wasm-wasi-and-rust/ [eli.thegreenplace.net]
2023-05-11 21:07
tags:
go
programming
rust
wasm
web
This post is best described as a technology demonstration; it melds together web servers, plugins, WebAssembly, Go, Rust and ABIs. Here’s what it shows:
How to load WASM code with WASI in a Go environment and hook it up to a web server.
How to implement web server plugins in any language that can be compiled to WASM.
How to translate Go programs into WASM that uses WASI.
How to translate Rust programs into WASM that uses WASI.
How to write WAT (WebAssembly Text) code that uses WASI to interact with a non-JS environment.
source: L
Position Independent Code (PIC) in shared libraries
https://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries/ [eli.thegreenplace.net]
2019-08-27 02:30
tags:
c
cpu
format
library
perf
programming
This article explained what position independent code is, and how it helps create shared libraries with shareable read-only text sections. There are some tradeoffs when choosing between PIC and its alternative (load-time relocation), and the eventual outcome really depends on a lot of factors, like the CPU architecture on which the program is going to run.
source: L
Go compiler internals: adding a new statement to Go
https://eli.thegreenplace.net/2019/go-compiler-internals-adding-a-new-statement-to-go-part-1/ [eli.thegreenplace.net]
2019-07-06 03:27
tags:
compiler
go
programming
This is the first post in a two-part series that takes a tutorial-based approach to exploring the Go compiler. The compiler is large and would require a small book to describe properly, so the idea of these posts is to provide a quick depth-first dive instead. I plan to write more descriptive posts on specific areas of the compiler in the future.
source: L
Type erasure and reification
https://eli.thegreenplace.net/2018/type-erasure-and-reification/ [eli.thegreenplace.net]
2018-12-05 20:54
tags:
intro-programming
type-system
In this post I’d like to discuss the concepts of type erasure and reification in programming languages. I don’t intend to dive very deeply into the specific rules of any particular language; rather, the post is going to present several simple examples in multiple languages, hoping to provide enough intuition and background for a more serious study, if necessary. As you’ll see, the actual concepts are very simple and familiar. Deeper details of specific languages pertain more to the idiosyncrasies of those languages’ semantics and implementations.
source: HN
Book review: "Working Effectively with Legacy Code" by Michael C. Feathers
http://eli.thegreenplace.net/2017/book-review-working-effectively-with-legacy-code-by-michael-c-feathers/ [eli.thegreenplace.net]
2017-07-26 21:14
tags:
book
development
The hacks are a good match to the foe - they’re about as awful as the code itself, so young and innocent developers may find themselves (rightfully) horrified.
source: danluu