How much progress have you made since last time? What new ideas have you stumbled upon, what old ideas have you abandoned? What new projects have you started? What are you working on?
Once again, feel free to share anything you’ve been working on, old or new, simple or complex, tiny or huge, whether you want to share and discuss it, or simply brag about it - or just about anything you feel like sharing!
The monthly thread is the place for you to engage /c/programming_languages on things that you might not have wanted to put up a post for - progress, ideas, maybe even a slick new chair you built in your garage. Share your projects and thoughts on others’ ideas, and most importantly, have a great and productive month!
I’m making an engineering language where just about everything is an expression. Lately the most interesting thing to me is the juxtapose operator, i.e. if you stick two expressions next to each other without whitespace, they are considered juxtaposed. Initially juxtapose was just going to be for math/multiplication, but I’ve also decided to make function calling handled via juxtapose as well (since it lets me get rid of several types of syntax and replace them with pure expression handling)
Some interesting examples:
-
since the quotes delimit the string, you don’t need the parenthesis
printl'Hello, World!'
-
though sometimes you need to disambiguate with parenthesis
s = "Hello, World!" printl(s)
-
technically you can wrap either operand, so long as they touch
(printl)s // though this is bad style for function calls
-
this has a neat consequence that string prefixes are just functions, and work pretty seamlessly
mypath = p"this/is/some/path/object" myregex = re"[^i*&2@]" myphonetics = ipa"ɛt vɔkavit dɛus aɾidam tɛɾam kɔngɾɛgatsiɔnɛskwɛ"
p
,re
, andipa
are all just ordinary functions -
some basic math examples
x = 3 y = 2x z = (2+3y)(x*2)
-
complex numbers/quaternions are pretty seamless
1 + 2i 1 + 2i + 3j + 4k
-
also physical units will be first class citizens, and fit in pretty nicely with juxtapose
15kg 7(kg) * 10(m/s/s) 25(N/m^2) + 15(Pa) 1500(W) / 10(A) 5(A) * 2(Ω) 8(m*s^-1) / 2(s) 40(N*m) * 10(rad) 1000(m^3) * 2(kg/m^3)
-
Where it gets really wacky/hard to parse is something like this
sin(x)^2 + cos(x)^2 // => (sin(x))^2 + (cos(x))^2
depending on the types of
sin
andcos
different things can happen. By defaultsin
/cos
are functions, so the function call happens first, but if the user redefined them or constructed an identically formatted expression where they are numeric, then the exponent should happen firsts = 10 c = 20 s(x)^2 + c(x)^2 // => s(x^2) + c(x^2)
but that’s all just a problem for the compiler
Been working on and off on an interpreter/compiler written in python. Pretty slow going though.
-
Been working on a cryptography library in rust that supports/is mostly historical ciphers like the Caesar cipher.
Does that include the Playfair cipher? If not, it totally should, even as a novelty
It does now
Awesome
i’m working on a series of powershell scripts to prepare our VDI images for compose operations - i have some ideas for automating the manual stuff we’re doing.
i’m also going to learn how to use github finally so i can finally version control my shit
Internal development tool in Python. It creates a feature or hotfix branch based on a Jira in the chosen repo, accesses a couple of different internal sites to set and get corporate info, uses Terraform Cloud to build the required pipelines and infrastructure. Once everything is done, it updates the Jira ticket.
I’ve got the basics done, but I want to put a Textual terminal-based UI on top so it looks pretty for management demos. I also need to get to grips with proper classes and more advanced Python.
It’s not too shabby and I’m proud of what this I’ve accomplished because I’m just an old sysadmin turned DevOps. I really wish I could code faster, I’ve always struggled to code. :(
I’m learning the godot game engine, in preparation for a game jam (GMTK) next weekend. 2.5 hours through an 11-hour video, enjoying every bit
It’s been months (8 to be exact) but I’m still working on integrating a new parser in my language, ArkScript. Not that it’s hard, motivation just wears off every so often, because I stumble across an old piece of code that I should modernize and/or optimize. Everything is in place except import resolution which has changed drastically between the two parsers
I went from
# imports everything in the current scope # just copy paste code (import "foo/bar/egg.ark")
to
# imports everything with the prefix `egg.` (import foo.bar.egg) # imports everything from bar in the current scope without a prefix (import foo.bar:*) # imports only a and b symbols from bar # (plus any symbol they use, in a hidden "namespace") (import foo.bar :a :b)
It also takes a long time to merge the CI for the parser with the current CI, because the latter is very big, clunky and old ; hopefully I’ll be done before the end of the year!
Im working on a small email filter tool which hourly filters my emails into the correct folders in python.
I’m still working on a simple language, and I haven’t finished code gen yet bc I redid the parser and lexer using parser/lexer generating libraries instead of by hand in order to clean up the code and hit edge cases more easily.
This redoing led to a redesign of the language in many ways and to refinement on the purpose.
There is a niche of simplistic languages. C is king, and C-likes follow in pursuit. These languages are simple in terms of syntax. Very few features/keywords. However, I feel they don’t always hold up to their simple ideals. In other words, C is a simple language that doesn’t stay simple.
What do I mean?
C is “math-based” (like most programming languages) in that it has things like expressions and functions. It’s a high level language, although less high and more simple than many others. I think that’s a compromise. It’s not high level enough to make full use of the abstractions the math stuff gives it, but its fundamental orientation towards expressions and functions means the deeper you get in a library or function that calls others, the more complex and less C-like it gets. Assembly, on the other hand, stays simple but 1) it’s not uniform across devices and 2) it doesn’t have much in the way of abstractions.
I wanted a language that lets me have my cake and eat it to. I need a language that’s simple like assembly, based around jumps and mutating data, but has an abstraction system also built around that.
So I coined the term “mutator” to refer to a very strict, side-effecty function that can mutate certain kinds of data and created a trait-like system that can store mutators and be implemented for different kinds of data. Every mutator just calls into other mutators. This gives you equivalents to polymorphism and things, but as you get deeper it always stays simple.
On top of that I have an ML inspired syntax and a module system and have it compile to C, so you should be able to easily set up projects and build them anywhere.
I’m now like a third of the way through code generation
I’m working on a blog post on what static checks could go with a dynamically typed language.
Would be nice reading this. Crystal is a Dynamically typed but also staticly type compiled language.
Crystal is a Dynamically typed language.
Does it have a dynamic special type, like in C#?
The language allows you to specify the return type of function. If it is not represent it it will try to find the type. It even allows multiple different types to be returned.
But that happens at compile time, doesn’t it? So it infers types and returns a tagged union for multiple types? Kind of like how some programming languages return multiple values as tuples?
Accurate
I’m making an esolang which is themed after magic, is built around the KPN model of computing, and will eventually be used in a Minecraft mod.
Trying to package openstack on nixos
https://moonpiedumplings.github.io/projects/openstack-on-nixos/
deleted by creator