#compiler
Nur 512 Byte: Dieser C-Compiler passt in einen Bootsektor
Ein Entwickler hat einen C-Compiler geschrieben, der in den Bootsektor eines x86-Computers passt. Was der kleine Compiler alles kann.

Nice free course by Cornell university for learning a couple of things about compilers and programming languages implementations
https://cs.cornell.edu/courses/cs6120/2020fa/self-guided/
Github repo: https://github.com/sampsyo/cs6120



That's probably all the coding time I have for today. The function is now being parsed into IL code and variables. The UI allows me to select which to view.
No code gen for the function yet. Shouldn't be too difficult to add the basics, but stack frames still to work on. Also no way to access variables from higher scopes, but I have plans there.


Here’s How To Build a Tiny Compiler From Scratch - Believe it or not, building a tiny compiler from scratch can be as fun as it is ac... - https://hackaday.com/2023/05/21/heres-how-to-build-a-tiny-compiler-from-scratch/ #computerhacks #softwarehacks #classichacks #s-expression #helloworld #compiler #binary
'As I can attest from personal experience, having a #compiler leads to hubris: you start to consider source languages like a hungry person looks at a restaurant menu. "Wouldn't it be nice to ingest that?" That's what we say at restaurants, right, fellow humans?'
from the latest @wingo/log
http://wingolog.org/archives/2023/05/02/structure-and-interpretation-of-ark
Fabriquez vos propres compilateurs en Ada avec Aflex et Ayacc
Stéphane vous explique le contenu des dernières versions de ces deux logiciels avec un focus sur la "réentrance".
Bonne lecture
It's an unfortunate meme IMO that tech Reddit is low-quality. You just have to find interesting subreddits!
I've updated my list for 2023.
https://notes.eatonphil.com/high-quality-subreddits-you-should-be-following.html
LLVM-MOS is a new C -> 6502 compiler (and maybe C++, and Rust some day?) #6502 #Compiler #LLVM #VintageComputing #RetroCoding
https://8bitworkshop.com/docs/posts/2023/llvm-mos-sdk-6502-c-compiler.html
Spending today parsing the #Amstrad #CPC Firmware Guide. I need something in a form my #compiler can consume.
Parsing semi-structured English text is always enjoyable. The code here is converting long-form parameter descriptions into something shorter. Not too hard once you understand the typical boilerplate.
It's also sussing out what (if anything) to use as the function return value.
A lot of state machine happening so it knows exactly where it is on the page and what to pay attention to.

![An extract of the output: a list of function and procedure definitions in Pascal style language. The data extracted includes which registers are corrupted and parameters assigned to registers.
Full text:
[Corrupts AF, BC, DE, HL]
procedure KM_INITIALISE; extern $bb00;
[Corrupts AF, BC, DE, HL]
procedure KM_RESET; extern $bb03;
[Corrupts F]
function KM_WAIT_CHAR: A; extern $bb06;
[Corrupts F]
function KM_READ_CHAR(out Character: A): CF; extern $bb09;
[Preserves all]
procedure KM_CHAR_RETURN(Character: A); extern $bb0c;
[Corrupts A, BC, DE, HL, F]
function KM_SET_EXPAND(ExpansionToken: B;Length: C;Address: HL): CF; extern $bb0f;
[Corrupts DE, F]
function KM_GET_EXPAND(ExpansionToken: A;CharacterNumber: L;out Character: A): CF; extern $bb12;
[Corrupts A, BC, DE, HL, F]
function KM_EXP_BUFFER(Address: DE;Length: HL): CF; extern $bb15;
[Corrupts F]
function KM_WAIT_KEY: A; extern $bb18;
[Corrupts F]
function KM_READ_KEY(out CharacterOrExpansionToken: A): CF; extern $bb1b;
[Corrupts A, HL, F]
function KM_TEST_KEY(KeyNumber: A;out ShiftAndControl: C): ZF; extern $bb1e;](https://s3.eu-central-2.wasabisys.com/mastodonworld/cache/media_attachments/files/110/368/949/131/673/470/small/7f62089c357b9b7c.png)
Aktueller Stand:
- alter #Kernel kann nicht #drucken
- neuere Kernel kann ich noch nicht #booten, vermutlich ist die linuxrc für #LUKS und #ZFS inkompatibel
- in den alten Kernel das Drucken einkompilieren: dafür ist der #Compiler zu neu
- mit der Kamera kann ich aber mittlerweile reden, da brauchte das Makefile nur ein -ltinfo nach einem #ncurses-Update
- die Grafik flackert, ist mir jetzt aber egal
… noch knapp drei Stunden, bis wir losmüssen, also #easypeasy alles …
#Development #Reviews
The JavaScript ecosystem is delightfully weird · The many ways people aren’t writing JavaScript anymore https://ilo.im/12w0an
“The JavaScript you write not only isn’t the JavaScript you run, but under closer examination, it isn’t even JavaScript at all.” —Sam Ruby
_____
#WebDevelopment #WebDev #Frontend #Backend #EcmaScript #JavaScript #Ecosystem #Framework #Library #Compiler #Bundler
I've revisited my #ruby #compiler for the first time in probably a couple of years (with far longer since I wrote an article) and implemented type tagging for integers. Amazingly it took only a couple of hours, and it reduces the memory allocation pressure dramatically to the point where I'm now tempted to try to fix the remaining bugs preventing it from being fully self-hosted and doing some work on it again...
#ITByte: #Programming #Languages and #Compiler Design
A brief overview of programming language trends and concepts of compiler design.

Wasmer 3.3 - Running WebAssembly 2.5x faster with JavascriptCore, https://wasmer.io/posts/wasmer-3.3-and-javascriptcore.
Wasmer 3.3 has a new backend which uses JavaScriptCore. Interesting approach. It’s the 4th backend after SinglePass, Cranelift and LLVM.
Wasmer is still a great project but its CEO is a danger. Reminder: https://mnt.io/2021/10/04/i-leave-wasmer/. Its toxic behaviour is still very present.
But the project is great. Thanks to the contributors and the brave employees working there!
Multiply, division and modulo[0] powerups acquired.
Only two operators to go - left and right shifts - and they should be pretty simple. I feel as though I'm very close to being able to create some useful code for this beast.
[0] Modulo is a waste by-product from division. Once you have division you also have modulo.

It's alive!🎉
I've built a #transpiler in #Rust, compiled it to #WASM and integrated it into a #Vue app! :awesome:
It's called selecuery.✨
It can transpile X++ select statements into query expressions. If you think "X++" is a typo and you don't have any idea of what I'm talking about, don't worry.😄
Have a look at the video below.
This project is dear to my heart! ❤️ I've started it 2019 for learning #RustLang.
I think, I've been transpiled during this project as well.🤪
https://github.com/exaloop/codon
#Codon is a high-performance #Python #compiler that compiles Python code to native machine code without any runtime overhead. Codon's performance is typically on par with (and sometimes better than) that of C/C++
I solved that #Lisp #Compiler bug a few weeks ago, but another one lingered. I needed to set aside a block of time, and that was this morning. Nailed it. No more compiler work for this release cycle.
There was a regression in September whereby, in fixing another bug, I stupidly reintroduced the link between a basic block which ends in a close instruction (make a closure) and the basic block that begins the body of the closure.
If you thought #TypeScript had a crazy #TypeSystem then you probably haven't heard of #Ezno yet (by kaleidawave):
Introducing Ezno:
https://kaleidawave.github.io/posts/introducing-ezno/
"In short, it is a #JavaScript #compiler featuring checking, #correctness and #performance for building full-stack (rendering on the client and server) websites."
Ezno in '23:
https://kaleidawave.github.io/posts/ezno-23/
This type system is craaaazyyy!🤪
Can't wait for 1.0! :awesome: 🚀
Programmieren: GCC Version 13.1 spricht SARIF bei der statischen Codeanalyse
Das neue GCC-Release kann Diagnosedaten auch im OASIS-Standardaustauschformat SARIF bereitstellen. Ein neues Modula-2-Frontend schafft die Basis für Rust.
My #Quiche #pascal #compiler is slowly developing on the background. I’m putting in a lot of effort so the compiler can use 8 bit data and 8 bit operations where possible to keep code compact and fast.
And overflow checking for unsigned operations (add, subtract) is a single instruction. For a signed operation is complex. For a mixed signed, unsigned 16 but operation it requires a 24 but operation plus complexity.
An update on the GCC front end for Rust, https://rust-gcc.github.io/2023/04/24/gccrs-and-gcc13-release.html.
The focus for the next months will be about the `core` crate, along with the borrow checker. Goal is to pass the Rust 1.49 test suite. The ultimate goal is to get it merged in GCC 14, and later, to back port it to GCC 13.2.
> This will enable users to easily start experimenting with the compiler for #![no_std] Rust programs and, hopefully, some embedded targets.
An Efficient #Compiler for the Gradually Typed #Lambda Calculus
- Andre Kuhlenschmidt @ the #Scheme Workshop for #ICFP 2018
https://www.youtube.com/watch?v=UnWyD1vazAM
the one good thing to come out of covid is a whole slew of great courses were shared online. just found Jeremy Siek's lectures from the famous IU #compiler course here:
This looks like an API I just might have to try out!!
---
RT @SyntaxErrorSoft
My Pascal 6502 compiler to try :) #Pascal #compiler #6502 #8BitCoders
https://syntaxerrorsoftware.itch.io/pas6502
https://twitter.com/SyntaxErrorSoft/status/1649256342069325824
Inventing software that can "understand" context-dependent, ambiguous natural language, so that we can let it generate software with a context-free, unambiguous language. ➰
What can go wrong!? :awesome:
#AI #ArtificialIntelligence #ChatGPT #LLM #SALAMI #ContextFree #ProgrammingLanguage #Compiler
@lispi314 sidenote: that #guile bootstrap path was developed for #guix :
GNU Mes (maxwell equations of software) provides a minimal #scheme interpreter and C #compiler with tooling to build #tinycc that can be used with the Mes C library to compile glibc-2.2.5, binutils-2.20.1, gcc-2.95.3 with which you can build the whole #GNU system.
Thanks to #GCCrs that will soon include #Rust
Thanks to #Python on Guile it includes a shortcut for compatible Python-based tooling.
#GCC
@dalias @jschauma
TIL about Codon by this article "MIT Turbocharges Python’s Notoriously Slow Compiler > Codon allows users to write Python code that runs as efficiently as C or C++"
https://spectrum.ieee.org/python-compiler
#python #compiler #codon
This #compiler for the #RosettaCode Virtual Machine assembly language can now target any of #ATS, #C, #Mercury, or #Scheme --
https://sourceforge.net/p/chemoelectric/rosettacode-contributions/ci/default/tree/vmc.dats
The Scheme code runs very fast in #ChezScheme, so-so in all else I have tried. I wonder how they do it. Maybe a lot of C code (instead of Scheme) in the runtime is part of it?
The generated Mercury is not so fast, but such is life with Mercury. It’s fastish, considering.
I decided to keep going and have added "vmc", the virtual machine compiler: https://sourceforge.net/p/chemoelectric/rosettacode-contributions/ci/default/tree/vmc.dats
No guarantee it works at any given time--though, if I am good, I can work with Mercurial branches. Right now it can compile to #ATS and to #C
#Compiler #FunctionalProgramming #ATSlang
The ATS it makes does tail calls. The C uses goto--many more goto than are needed, but optimizers might clean that out. The generated code is in continuation-passing style.
I went ahead and wrote a Virtual Machine to #ATS translator for the #RosettaCode #compiler task series:
Compiler/virtual machine interpreter - Rosetta Code https://rosettacode.org/wiki/Compiler/virtual_machine_interpreter#Compiler
The thing’s designed to make it relatively easy to handle many other languages. Languages with #goto should be easy to do, for instance: convert the program to one procedure with a lot of goto in it. And #Scheme could be done easily. I have ideas for #ObjectIcon and co-expressions.
@Edent it may not be closed any more but #SunMicrosystem's #C #Compiler was a closed-source thing #cc (now #Oracle Developer Studio so chances of being #opensource are slim! https://en.wikipedia.org/wiki/Oracle_Developer_Studio)
Compiler-Infrastruktur: LLVM 16 vollzieht den Wechsel auf C++17
LLVM wechselt auf C++17 und bereitet auf kommende Standards vor. Die Compiler-Infrastruktur liefert zudem Updates für Backends wie ARM, LoongArch und RISC-V.
Tagging @musicmatze. 👆 Regarding your recent #langdev endeavor and your interest in #RocLang, you might be interested 😉
#Development #Overviews
The most popular build tools for front-end developers in 2023 · Key features and benefits of the top build tools for web development https://ilo.im/11g6au
_____
#WebDevelopment #WebDev #Frontend #Workflow #Collaboration #Automation #Tool #BuildTool #Compiler #Bundler #TaskRunner #JavaScript #TypeScript #Esbuild #Lerna #Nx #Parcel #Rollup #Rome #SWC #Turbo #Vite #Webpack
First 10 patches to add Xtensa support inside LLVM have been merged upstream, https://github.com/search?q=repo%3Allvm%2Fllvm-project+Xtensa&type=commits \o/.
#Compiler progress. Over the weekend I wrote some basic code generation. This is outputting Z80 assembler. I've added a wrapper to run it under SCM on the #RC2014
And it only ruddy works! This for a for loop counting to ten and outputting four digit hex values. No spaces of new lines because it can't do them yet.
Programmiersprache Kotlin steuert mit neuem Compiler auf Version 2.0 zu
Die nächste Hauptversion der Programmiersprache Kotlin soll keine wesentlichen Sprachfeatures mitbringen, sondern vor allem den Compiler K2 stabilisieren.
Can the gnat compiler find unused specification procedures/functions/variables? https://stackoverflow.com/questions/75401013/can-the-gnat-compiler-find-unused-specification-procedures-functions-variables #ada #programming #compiler-warnings #unreachable-code #compilation #dead-code #ada
Next Rust Compiler, https://matklad.github.io/2023/01/25/next-rust-compiler.html.
The article discusses what the ideal next Rust compiler should look like, and which features it should provide.
Souper, https://github.com/google/souper.
Souper is a superoptimizer for LLVM IR. It uses an SMT solver to help identify missing peephole optimizations in LLVM's midend optimizers.
GCC undefined behaviors are getting wild, http://blog.pkh.me/p/37-gcc-undefined-behaviors-are-getting-wild.html.
Interesting to see how GCC assumptions on integers behaviors can lead to UB in some cases.
define-compiler-macro:
🧷 http://www.lispworks.com/documentation/lw50/CLHS/Body/m_define.htm#define-compiler-macro
inline / notinline:
🧷 http://www.lispworks.com/documentation/lw50/CLHS/Body/d_inline.htm#inline
Ooops, wrong language ... 🙈
🌺
🏷️ #CommonLisp #Lisp #Compiler #CompilerExtension #CompilerOptimization #Inlining
I've been contacted by someone who's looking for a mentor in the #compiler area. They're new to compiler design, but they do seem very interested and they've taken a sabbatical to learn about it.
Is someone around here interested to become their mentor?
Boosts appreciated 🙏
A wild #blog post appeared!
Did you know that #GCC just added Modula-2 and #Rust frontends to mainline? Come with me as I explore how well they work on #OpenBSD. (Spoiler: excellently out-of-the-box.)
As an added bonus, there are instructions in the blog post for how you can get your own GCC with Modula-2 and Rust on your own OpenBSD machine. Just a quick pkg_add away!
https://briancallahan.net/blog/20221219.html
#compiler #compilers #opensource #freesoftware #FOSS #FLOSS #OSS #FreeBSD #NetBSD #DragonFlyBSD #BSD #Unix #Linux
Been spending some time in my evenings hacking on a TypeScript library to make it easy to build Wasm modules directly in the browser without needing to muck about with the binary encoding.
Could be useful for defining little DSLs that get compiled to Wasm and run directly in the user's browser.
Nuke the C++ implementation of Zig from orbit using WASI, https://github.com/ziglang/zig/pull/13560.
> The idea is to use a small WASI binary as a stage1 kernel that is committed to source control and therefore can be used to build any commit from source. We provide a minimal WASI interpreter implementation that is built from C source, and then used to translate the Zig self-hosted compiler source code into C code.
#Compiler: Okay, so I’m gonna need you to add these numbers and then multiply these numbers.
CPU: You’re saying you want me to…load an effective address?
Another #projects entry
I wrote a compiler that converts Winamp visualizer presets to Web Assembly so they can run efficiently and safely in the browser. The fun part is that the compiler itself runs in the browser.
Playground: https://eel.capt.dev/
Blog post: https://jordaneldredge.com/blog/speeding-up-winamps-music-visualizer-with-webassembly/
Talk: https://www.youtube.com/watch?v=hZzjrgZb-mw
I have more projects than I can count, and way more than I can advance! There's not enough lifetime for them all.
One of my bigger projects is to implement a #compiler or #interpreter for a programming language. I started several, left behind incomplete.
Several other projects can be classified as "algorithmic art" or "creative coding"; when I started some of these, I didn't even know these names.
How to speed up the Rust compiler in October 2022, https://nnethercote.github.io/2022/10/27/how-to-speed-up-the-rust-compiler-in-october-2022.html.
> Of the 521 results measured across 43 benchmarks, 343 were significantly improved, 7 were significantly worse, and the mean reduction across these results was 10.14%.
I’m a Korean enjoying #programming. Main interests are low-level system stuff and #programminglanguages, especially #compiler stuff.
In my free time, I play around #AppKit with #Swift, some #Lisp and #Rust, with #JavaScript and #Python as well.
#Emacs is my main editor, so I also write Elisp and Emacs patches. (I contributed #macOS xwidget support.)
I pretend to have “opinions” on stuff like native desktop apps, Apple frameworks, the UNIX command line, etc… sorry for the rants.
My #introduction 👋 to the fediverse.
My name is John Jolly and I'm currently a graduate student at the #UofU in #SLC. I research #compiler optimizations on sparse tensor data layouts.
I'm also an adjunct professor at #UVU. I teach OS theory and compilers.
I worked for 10 years at #SUSE as a #linux kernel developer on #s390 and #hpc maintainer.
Before that I worked 15 years for #wordperfect - #novell - #microfocus.
I'm an amateur #astronomer and love #retro #arcade systems.
I'm trying to use the fediverse a bit more productively, so:
New (re?) #introduction! I'm Noam Preil, a self-taught software engineer, self-taught hobbyist musician, avid reader, runner, and probably one of two (three?) people on Earth who uses #ANTS as their primary operating system!
I've finally started learning sheet music after playing #piano by ear for basically my entire life, (re)started work on a new #compiler, reading more books, and moderating my own opinions.
Let's chat! :)