Trending

#LangDev

Latest posts tagged with #LangDev on Bluesky

Latest Top
Trending

Posts tagged #LangDev

I just released 0.0.47 of #fadebasic which has the compile time execution and deferred statement support. Yeehaw! #indiedev #gamedev #langdev github.com/cdhanna/fade...

8 3 0 0

Working across various domains and having to switch programming languages for all of them, reimplement features, has become too much of a mental task. I am seriously considering creating a custom language or at least a transpiler with multiple backends.

#programming #langdev #compiler #transpiler

0 0 0 0
Output from a terminal, showing some array operations for a programming language I'm building. The array operations are basic arithmetic operations that apply to every element in the array, like addition, subtraction, multiplication, division, and integer division. There is also an operator for checking if a number is divisible by another number.

Output from a terminal, showing some array operations for a programming language I'm building. The array operations are basic arithmetic operations that apply to every element in the array, like addition, subtraction, multiplication, division, and integer division. There is also an operator for checking if a number is divisible by another number.

Added some more operators for some funky, expressive goodness.

Better error messages are coming along slowly... really making me appreciate languages that have really great error messages 😂

#langdev

1 0 0 0
A Short Survey of Compiler Backends As an amateur compiler developer, one of the decisions I struggle with is deciding choosing the compiler backends. Unlike the 80’s when people had to target various machine architectures directly, now there are many mature options available. This is a short and very incomplete survey of some of the popular and interesting options. ### Contents 1. Machine Code / Assembly 2. Intermediate Representations 3. Other High-level Languages 4. Virtual Machines / Bytecode 5. WebAssembly 6. Meta-tracing Frameworks 7. Unconventional Backends 8. Conclusion ## Machine Code / Assembly A compiler can always directly output machine code or assembly targeted for one or more architectures. A well-known example is the Tiny C Compiler. It’s known for its speed and small size, and it can compile and run C code on the fly. Another such example is Turbo Pascal. You could do this with your compiler too, but you’ll have to figure out the intricacies of the _Instruction set_ of each architecture (ISA) you want to target, as well as, concepts like register allocation. ## Intermediate Representations Most modern compilers actually don’t emit machine code or assembly directly. They lower the source code down to a language-agnostic _Intermediate representation_ (IR) first, and then generate machine code for major architectures (x86-64, ARM64, etc.) from it. The most prominent tool in this space is LLVM. It’s a large, open-source compiler-as-a-library. Compilers for many languages such as Rust, Swift, C/C++ (via Clang), and Julia use LLVM as an IR to emit machine code. An alternative is the GNU C compiler (GCC), via its GIMPLE IR, though no compilers seem to use it directly. GCC can be used as a library to compile code, much like LLVM, via libgccjit. It is used in Emacs to _Just-in-time_ (JIT) compile Elisp. Cranelift is another new option in this space, though it supports only few ISAs. For those who find LLVM or GCC too large or slow to compile, minimalist alternatives exist. QBE is a small backend focused on simplicity, targeting “70% of the performance in 10% of the code”. It’s used by the language Hare that prioritizes fast compile times. Another option is libFIRM, which uses a graph-based SSA representation instead of a linear IR. ## Other High-level Languages Sometimes you are okay with letting other compilers/runtimes take care of the heavy lifting. You can transpile your code to a another established high-level language and leverage that language’s existing compiler/runtime and toolchain. A common target in such cases is C. Since C compilers exist for nearly all platforms, generating C code makes your language highly portable. This is the strategy used by Chicken Scheme and Vala. Or you could compile to C++ instead, like Jank, if that’s your thing. Another ubiquitous target is JavaScript (JS), which is one of the two options (other being WebAssembly) for running code natively in a web browser or one of the JS runtimes (Node, Deno, Bun). Multiple languages such as TypeScript, PureScript, Reason, ClojureScript, Dart and Elm transpile to JS. Nim interestingly, can transpile to C, C++ or JS. A more niche approach is to target a Lisp dialect. Compiling to Chez Scheme, for example, allows you to leverage its macro system, runtime, and compiler. The Idris 2 and Racket use Chez Scheme as their primary backends. ## Virtual Machines / Bytecode This is a common choice for application languages. You compile to a portable bytecode for a _Virtual machine_ (VM). VMs generally come with features like _Garbage collection_ , _JIT compilation_ , and security sandboxing. The Java Virtual Machine (JVM) is probably the most popular one. It’s the target for many languages including Java, Kotlin, Scala, Groovy, and Clojure. Its main competitor is the Common Language Runtime, originally developed by Microsoft, which is targeted by languages such as C#, F#, and Visual Basic.NET. Another notable VM is the BEAM, originally built for Erlang. The BEAM VM isn’t built for raw computation speed but for high concurrency, fault tolerance, and reliability. Recently, new languages such as Elixir and Gleam have been created to target it. Finally, this category also includes MoarVM—the spiritual successor to the Parrot VM—built for the Raku (formerly Perl 6) language, and the LuaJIT VM for Lua, and other languages that transpile to Lua, such as MoonScript and Fennel. ## WebAssembly WebAssembly (Wasm) is a relatively new target. It’s a portable binary instruction format focused on security and efficiency. Wasm is supported by all major browsers, but not limited to them. The _WebAssembly System Interface_ (WASI) standard provides APIs for running Wasm in non-browser and non-JS environments. Wasm is now targeted by many languages such as Rust, C/C++, Go, Kotlin, Scala, Zig, and Haskell. ## Meta-tracing Frameworks _Meta-tracing Frameworks_ are a more complex category. These are not the backend you target in your compiler, instead, you use them to build a custom JIT compiler for your language by specifying an interpreter for it. The most well-known example is PyPy, an implementation of Python, created using the RPython framework. Another such framework is GraalVM/Truffle, a polyglot VM and meta-tracing framework from Oracle. Its main feature is zero-cost interoperability: code from GraalJS, TruffleRuby, and GraalPy can all run on the same VM, and can call each other directly. ## Unconventional Backends Move past the mainstream, and you’ll discover a world of unconventional and esoteric compiler backends. Developers pick them for academic curiosity, artistic expression, or to test the boundaries of viable compilation targets. * Brainfuck: An esoteric language with only eight commands, Brainfuck is _Turing-complete_ and has been a target for compilers as a challenge. People have written compilers for C, Haskell and Lambda calculus. * Lambda calculus: Lambda calculus is a minimal programming languages that expresses computation solely as functions and their applications. It is often used as the target of educational compilers because of its simplicity, and its link to the fundamental nature of computation. Hell, a subset of Haskell, compiles to Simply typed lambda calculus. * SKI combinators: The SKI combinator calculus is even more minimal than lambda calculus. All programs in SKI calculus can be composed of only three combinators: S, K and I. MicroHs compiles a subset of Haskell to SKI calculus. * JSFuck: Did you know that you can write all possible JavaScript programs using only six characters `[]()!+`? Well, now you know. * Postscript: Postscript is also a Turing-complete programming language. Your next compiler could target it! * Regular Expressions? Lego? Cellular automata? ## Conclusion I’m going to write a compiler from C++ to JSFuck. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I did a short survey of #compiler backends: abhinavsarkar.net/notes/2025-compiler-back...

#compilers #programming #pldev #langdev #blogging

1 3 0 0
Text output from a REPL session with a language I've created. The code sums all of the numbers in a text file.

A second line of code prints the text "har har har", because I'm so funny.

Text output from a REPL session with a language I've created. The code sums all of the numbers in a text file. A second line of code prints the text "har har har", because I'm so funny.

I'm having so much fun with this stupid little language and interpreter I've made.

#langdev

3 0 1 0
Preview
Supporting children's language in the early years | Course Beetle Discover effective techniques and interventions to improve language and communicative development in the early years.

How can we best support children’s language in the early years?

Find out in our live Zoom course with SLT Wendy Lee 📚

⏰ 9:30–4:30 UK
📆 16/10/25

Explore the effectiveness of various interventions in enhancing language and communicative development in preschool children.

#EarlyYears #LangDev #SLT

2 1 1 0

How difficult would it be to add actual default argument values to functions in C? #langdev

0 0 0 0
The long season of langdev

“The Long Season Of Langdev”, Michael Fogus (blog.fogus.me/langdev/long...).

Via Lobsters: lobste.rs/s/xecakg/lon...

#ProgrammingLanguages #PLDI #LangDev #Programming

0 0 1 0
Post image

Do productive parallel languages like Chapel require magic compilers? Read @bradcray.bsky.social’s take on this question in the latest installment of his “10 Myths about Scalable Parallel Programming Languages” blog series:

chapel-lang.org/blog/posts/1...

#HPC #OpenSource #LangDev

5 1 0 0

I'm about halfway through Crafting Interpreters (by chapters).

Bound methods seem like a good default.
(Inline functions cover the reverse.)

I don't think static type inference is covered, unfortunately, but a recursive two-step (items, then code symbolically) should do the trick well enough.

4 2 1 0
Preview
The Toy Programming Language

Do you like games?

Do you like modding?

Do you like games with modding?

I'm building a scripting language to enable easy modding, and I'm gonna build a roguelike with it!

Come check it out, and drop me a follow!

#gamedev #langdev #toylang #roguelike

toylang.com

9 2 0 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

Functions are successfully called.

No return statement or tests yet, but it's time for a break.

I'm happy now, even if today is a hard day.

#gamedev #langdev #coding #toylang

github.com/Ratstail91/Toy

9 2 0 0
Post image

Simple example of Luhn's checsum algorithm in #Ryelang. #langdev #programming #coding

1 0 0 0

-bool constant = false;
+bool constant = true; //parameters are immutable

It took me all day to change one line.

The simplest solutions are usually the best. I'm not exactly upset, I just wish more of that time had gone towards actually getting the functions working.

#coding #langdev #toylang

0 0 0 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

In case you missed it: Toy now has unofficial support for NetBSD, thanks to NishiOwO!

While not covered by CI, the newly added code is quite minimal, so it should work with little effort. I might even look into custom runners at some point.

#coding #langdev #toylang

github.com/Ratstail91/Toy

0 0 0 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

Why save a peice of text multiple times, when you can save it once and point to it instead?

I finally got this working today!! I've had the outline there for ages, but finally added the actual check - which wasn't easy.

github.com/Ratstail91/Toy

#coding #langdev #toylang

1 0 0 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

Fixed the keyword 'continue', changed the value '0' to be falsey, and started work on functions proper.

They're being parsed into the AST, but compilation is a no-op for now. Parameter types are also not parsed correctly, and the keyword 'return' is its own thing.

#langdev #toylang #coding

0 0 1 0
Missed By A Mile I missed a milestone in Toy. I’m not going to beat myself up over it, instead, I’m going to examine why I missed it, and what I can do about it going forward. Learning from a mistake is the important ...

krgamestudios.com/posts/2025-0...

#production #langdev #coding

0 0 0 0

great work that reminds us that the benefits of shared reading with young children come from *both* the book *and* the reader.. #ReadAloud #LangDev

2 0 0 0
Preview
WIP, adjusting architecture, read more · Ratstail91/Toy@12aedb1 The 'source' directory compiles, but the repl and tests are almost untouched so far. There's no guarantee that the code in 'source' is correct, so I'm branching this for a s...

A big chunk of text, showing my thoughts and plans for the current sprint.

#programming #coding #langdev #toylang

github.com/Ratstail91/T...

0 0 0 0
Preview
Interpreting Brainfuck in Haskell We write a few Brainfuck interpreters in Haskell.

Writing an #interpreter for #Brainfuck is almost a rite of passage for any programming language implementer, and it’s my turn now. In this post, I write not one but four Brainfuck #interpreters in #Haskell: abhinavsarkar.net/posts/brainf...

#ProgrammingLanguages #compilers #LangDev #plt #blog

0 0 0 0
From Scribbles to Syntax: A Journey Into Programming Artistry

Dive into the cosmic journey of creating a programming language from scratch: Virgo 🌌

Language specs & SynTax (yes, with a capital “T”!)
Grammar sketches: From chaos to clarity
And the big reveal: Virgo’s name & lore 🌠
Read now: devonlangston.com/chronicles/f...
#programming #langdev #coding

0 0 0 0
A Grand Adventure into Language Creation

...and read what about devonlangston.com/chronicles/a...

#programming #coding #langdev

0 0 0 0
A fictional code addict who once tried to compile an entire language while balancing a coffee mug labeled “We Were On A Break!” on his head.

Ha! Blog is ready. devonlangston.com
Drop a visit. #programming #coding #langdev

1 0 0 0
I Am Speed I’ve just ran a speed test, comparing Toy v1 against Toy v2. After a long day coding, I’m worn out - let’s get straight to the data. I’ll likely add more data down the road, such as comparisons withou...

Toy Speed Test!

#programming #coding #toylang #langdev

krgamestudios.com/posts/2025-0...

0 0 0 0
Post image

GitHub's action runners seem to be bugging out, so the last couple commits lack the fancy tick.

Nonetheless, I've gotten some small features implemented today, including prefix and postfix ++ and --.

The code looks a lot cleaner with those.

github.com/Ratstail91/Toy

#langdev #toylang

2 0 1 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

It took a bit, but 'break' and 'continue' keywords are working & tested!

It's not exactly easy, when you're jumping around in memory - you need to be super thorough when looking for issues, because the VM will simply keep reading garbage, thinking it's code.

#coding #langdev #toylang

0 0 1 0
Post image

Yay! I put off the break & continue keywords for a bit, but I didn't really need to. Still, it gave me time to think on it.

I'll need to write a proper disassembler soon.

#coding #langdev #toylang

0 0 0 0
Preview
GitHub - Ratstail91/Toy: The Toy Programming Language. The Toy Programming Language. Contribute to Ratstail91/Toy development by creating an account on GitHub.

Yeah, your favourite programming language may be cool, but is it "working key-value tables" cool?

#coding #langdev #toylang

github.com/Ratstail91/Toy

0 0 0 0
Preview
Reworked Toy_String as a union, enabled -Wpedantic · Ratstail91/Toy@a28053d Toy now fits into the C spec. Fixed #158 Addendum: MacOS test caught an error: error: a function declaration without a prototype is deprecated in all versions of C That took 3 attempts to fix c...

github.com/Ratstail91/T...

Top-tier commit message.

On the upside, I reworked Toy_String, so now Toy is C spec compliant across all platforms.

In other words, it shouldn't cause any errors or warnings if someone just dropped it into their project's toolchain.

#langdev #toylang

1 0 0 0