-
12 votes
-
Go generics can make your code slower
3 votes -
Whose build times are slower: Rust or C++?
8 votes -
Microfeatures I'd like to see in more languages
4 votes -
Sigils are an underappreciated programming technology
3 votes -
Goodbye to the C++ Implementation of Zig
9 votes -
Zig 0.10.0 has been released
10 votes -
Zig is self-hosted now, what's next?
9 votes -
Stack Overflow trends: Weekday vs weekend site activity
5 votes -
Statically recompiling NES games into native executables with LLVM and Go
6 votes -
The false language dichotomy
3 votes -
Google introduces Carbon, an experimental replacement for C++
11 votes -
Implementing regular expressions in Hare
3 votes -
The Helios microkernel
10 votes -
Google has been DDoSing SourceHut for over a year
16 votes -
When will we learn?
6 votes -
JavaScript physics engine for the absolute beginner
1 vote -
You should compile your Python and here’s why
11 votes -
Why store code as text files?
Code is usually version controlled nowadays in git or some other VCS. These typically operate on text files and record the changes applied to the files over their history. One drawback from this...
Code is usually version controlled nowadays in git or some other VCS. These typically operate on text files and record the changes applied to the files over their history. One drawback from this is that formatting of the code can introduce changesbto the files that make no semantic difference, e.g. newlines are added/removed, indentation is altered etc.
Consistent formatting makes the code easier to read, but the style used is an aesthetic preference. There might be objective reasons for readability in at least the extreme cases, but in many cases the formatting is purely a preferred style.
If we instead version controlled code in the form of an abstract syntax tree (AST) (possibly even as just a series of transformations on that tree), we could have any formatting we'd like! When editing the code we would just be changing a projection of the AST and when we've made our changes the transformations could be made to the stored AST. If two languages shared the same AST the choice of language even becomes a choice for the programmer. Sadly this has some limitations since ASTs are usually language specific... But we could possibly take this a step further.
Could we take a compiled binary and use that as the basis for generating an AST? This is essentially what decompilers do. For heavily optimized code this is severely limited, but for debug builds a lot of extra information is retained in the binary that can be utilized to construct a sensible representation. This way of storing code the language used becomes a style preference! Code compiled from one language might become alien when viewed in another language (thinking of lazy Haskell code viewed in C), but maybe that is a corner case?
There are issues when considering binaries for different platforms. A binary for the JVM isn't the same as one for ARM64 or one compiled to run on an x86. So there are some limitations there...
One (very) good thing about storing code as text files is the ubiquity of software capable of viewing and editing text. It would however be cool if we could make programming language a stylistic preference that is compatible with other languages! At least the AST part should be perfectly achievable.
16 votes -
These artists are making tiny ROMs that will probably outlive us all
13 votes -
Nim Community Survey 2021 Results
2 votes -
Experience with Crystal programming language?
I have heard just a little bit about the language Crystal every so often, probably since it was first mentioned on /r/programming. From what I know, it's Ruby-like syntax but with a static type...
I have heard just a little bit about the language Crystal every so often, probably since it was first mentioned on /r/programming. From what I know, it's Ruby-like syntax but with a static type system, which seems like a big benefit to me.
I written just a little bit of Ruby, so the syntax isn't very familiar to me, and I haven't bothered trying Crystal out, but I'm curious to know what kinds of things people do with it.
So, my questions are: Do you have any experience with Crystal? If so, what have you used it for? Was it a professional or recreational project? How did you like it? What about it stood out to you compared to your experiences with other languages?
Thanks!
8 votes -
Using Zig to build native Lua scripts
6 votes -
Aro is a C compiler written in Zig
3 votes -
Zig 0.9.0 has been released
13 votes -
What programming languages or technical projects did you focus on in 2021? What will you focus on in 2022?
In 2020 I posted two topics: What programming languages will you focus on in 2020 and why? What programming languages or technical projects did you focus on in 2020 and why? The discussions were...
In 2020 I posted two topics:
- What programming languages will you focus on in 2020 and why?
- What programming languages or technical projects did you focus on in 2020 and why?
The discussions were interesting, and I figured I would re-ask both questions here at the end of 2021.
So, what programming languages, frameworks, and technologies did you focus on in 2021? It could be something you dedicated time to as a hobby, something you use professionally, etc.
What languages, frameworks, and technologies would you like to focus on and spend more time with in 2022? Why?
7 votes -
Unix philosophy without left-pad, Part 2: Minimizing dependencies with a utilities package
9 votes -
Following the Unix philosophy without getting left-pad
4 votes -
Rust Moderation Team resigns
20 votes -
Ruby vs Python comes down to the for loop
6 votes -
Programming in FORTH on Commodore 64
4 votes -
The coming firmware revolution
15 votes -
It's time to get hyped about const generics in Rust
11 votes -
Taking the warts off C, with Andrew Kelley, creator of the Zig programming language
17 votes -
Common mistakes and bad habits in Rust
5 votes -
FD 100
7 votes -
The Fennel survey results: 2021
3 votes -
Zig 0.8.0 has been released
9 votes -
Go proposal: expression to create pointer to simple types
4 votes -
Crystal 1.0 - What to expect
6 votes -
Zig, parser combinators - and why they're awesome
7 votes -
A recent Python Enhancement Proposal targets adding "exception groups," as well as new syntax to catch and handle the groups
4 votes -
The lead developer of curl analyzed its known security vulnerabilities and determined that half of them are related to it being written in C
12 votes -
Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun
9 votes -
Nx (Numerical Elixir) is now publicly available
7 votes -
[Python] Buffer overflow in PyCArg_repr
5 votes -
Why I still Lisp (and you should too!)
10 votes -
Obituary of Dr. Brad J. Cox Ph.D.
9 votes -
Haskell doesn't have macros
3 votes -
Lua, a misunderstood language
12 votes