Hacker Newsnew | past | comments | ask | show | jobs | submit | rrampage's commentslogin

Interesting project. Why does it use LLVM toolchain when it already builds gcc in an earlier stage?

LLVM is a much more mature and modern compiler by basically every measure, and importantly, a native cross compiler unlike GCC.

One copy of LLVM can build for many architectures vs needing one GCC toolchain for every architecture you wish to target.

Also modern languages like rust require LLVM so we need it anyway, and the kernel has rust now, so why not make the most mature compiler stack the global default? Using two different compilers for the kernel would be begging for problems.

I am most optimistic for the Fil-C fork of LLVM being a default some day where we get compile time memory safety too.

We do maintain gcc in tree for legacy languages like Fortran though.


If I understand correctly, I think they build an older version of gcc using tcc (Tiny C Compiler by Bellard); then using that to build newer versions incrementally until they get to the modern stack with LLVM.


Fun read! I built a minimal Linux shell [0] in c and Zig last year which does not depend on libc. It was a great way to learn about execve, the new-ish clone3 syscall and how Linux starts a process. Parsing strings is the least fun part of the building the shell.

[0] https://gist.github.com/rrampage/5046b60ca2d040bcffb49ee38e8...


Recurse center is awesome! The community is curious, kind and supportive. I did 2 batches there and each one expanded my horizons as a programmer.


I've been building small programs in Zig, C and ARM64 assembly without relying on libc and only using Linux syscalls directly.

Some examples:

- A minimal C shell with built-ins like cd, pwd, type: https://gist.github.com/rrampage/5046b60ca2d040bcffb49ee38e8...

- Terminal Snake game which fits in a QR code using Linux syscalls for drawing: https://gist.github.com/rrampage/2a781662645dc2fcba45784eb58...

- HTTP server with sendfile support in ARM64 assembly: https://gist.github.com/rrampage/d31e75647a77badb3586ebae1e4...

I learned to handcraft a static ELF binary using just GNU assembler (no linker): https://gist.github.com/rrampage/74586d0a0a451f43b546b169d46... . Trying to see if I can craft a small assembler in ARM64


Kudos! Especially for the asm.

http.S is something I wanted to do by myself, ended up with generating data in asm and reusing Go for a http server.


The paper title is "Sandboxing: Foolproof Boundaries vs. Unbounded Foolishness"


Yurichev's SAT/SMT by Example [0] is a great (free!) resource for learning how to model problems to SAT/SMT

[0] - https://smt.st/


I second this as a good starting point. When I was picking up z3, this was helpful.


Storage cost is much higher. Express One Zone is $0.16 per GB while standard S3 is $0.023 per GB ( https://aws.amazon.com/s3/pricing/?nc=sn&loc=4 )


Repos:

Snapshot - Capture a snapshot (or subset) of your Postgres database whilst transforming the data ( Link: https://github.com/snaplet/snapshot )

Copycat - Generate deterministic fake values (e.g to anonymize sensitive data) ( Link: https://github.com/snaplet/copycat )

Seed - Automatically seed your database with production-like dummy data based on your schema for local development and testing ( Link: https://github.com/snaplet/seed )


  Location: Mumbai, India
  Remote: Preferred
  Willing to relocate: Yes, within India
  Technologies: Java, Golang, Python, WebAssembly, Linux, SQL, Kubernetes, AWS, GCP, Ruby on Rails
  Résumé/CV: https://www.linkedin.com/in/raunak1/
  Email: raunak1001 (at) outlook (dot) com
- Principal Software Engineer with 11 years experience.

- Have predominantly worked in scaling out backend services with a focus on building search, analytics and recommendation systems, refactoring monoliths, optimizing cloud costs.

- Have done minimal downtime migrations of infrastructure for AWS and GCP.

As a side project, I have been building a WebAssembly interpreter from scratch at https://github.com/rrampage/wart . It can run Doom and boot Linux!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: