13

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!

Also see: https://www.reddit.com/r/ProgrammingLanguages/comments/14ngaly/july_2023_monthly_what_are_you_working_on_thread/

top 20 comments
sorted by: hot top controversial new old
[-] K2yfi@programming.dev 5 points 1 year ago* (last edited 1 year ago)

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, and ipa 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 and cos different things can happen. By default sin/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 first

    s = 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.

[-] krixcrox@programming.dev 4 points 1 year ago

Been working on a cryptography library in rust that supports/is mostly historical ciphers like the Caesar cipher.

[-] Hexarei@programming.dev 3 points 1 year ago

Does that include the Playfair cipher? If not, it totally should, even as a novelty

[-] aeluon@programming.dev 4 points 1 year ago

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

[-] 000_panther@programming.dev 3 points 1 year ago
[-] SuperFola@programming.dev 3 points 1 year ago

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!

[-] bloopernova@programming.dev 3 points 1 year ago

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. :(

[-] Hexarei@programming.dev 3 points 1 year ago

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

[-] MoriGM@feddit.de 2 points 1 year ago

Im working on a small email filter tool which hourly filters my emails into the correct folders in python.

[-] KindaABigDyl@programming.dev 2 points 1 year ago* (last edited 1 year ago)

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

[-] TheCee@programming.dev 1 points 1 year ago

I'm working on a blog post on what static checks could go with a dynamically typed language.

[-] MoriGM@feddit.de 1 points 1 year ago

Would be nice reading this. Crystal is a Dynamically typed but also staticly type compiled language.

[-] TheCee@programming.dev 1 points 1 year ago

Crystal is a Dynamically typed language.

Does it have a dynamic special type, like in C#?

[-] MoriGM@feddit.de 2 points 1 year ago

https://crystal-lang.org/

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.

[-] TheCee@programming.dev 1 points 1 year ago

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?

[-] MoriGM@feddit.de 2 points 1 year ago
[-] AnnaSH@vlemmy.net 1 points 1 year ago

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.

load more comments
view more: next ›
this post was submitted on 01 Jul 2023
13 points (100.0% liked)

Programming Languages

1160 readers
1 users here now

Hello!

This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.

The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:

This community is dedicated to the theory, design and implementation of programming languages.

Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.

This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.

This is the right place for posts like the following:

See /r/ProgrammingLanguages for specific examples

Related online communities

founded 1 year ago
MODERATORS