Programming Languages

1479 readers
7 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 2 years ago
MODERATORS
1
2
 
 

cross-posted from: https://programming.dev/post/46767538

Gophers, hey. Confusing ^ with exponentiation instead of XOR in Go seems like a pretty easy mistake to make. The bug itself is simple, but it still shows up even in some well-known projects with large codebases.

How often does this happen in your code?

3
 
 

Uiua () is a general-purpose array-oriented programming language with a focus on simplicity, beauty, and tacit code.

Uiua lets you write code that is as short as possible while remaining readable, so you can focus on problems rather than ceremony.

The language is not yet stable, as its design space is still being explored. However, it is already quite powerful and fun to use!

Uiua uses special characters for built-in functions that remind you what they do!

⚂ # Random number
⇡8 # Range up to
⇌ 1_2_3_4 # Reverse

cross-posted from: https://programming.dev/post/46403010

Sample with fibonacci:

⍥◡+9∩1 is the fibonacci in this language


Commenter maegul writes on the Programming community post:

I tried to go through the tutorial a year or so ago.

I can’t recall when, but there’s a point at which doing something normal/trivial in an imperative language requires all sorts of weirdness in Uiua. But they try to sell it as especially logical while to me they came off as completely in a cult.

It’s this section, IIRC: https://www.uiua.org/tutorial/More%20Argument%20Manipulation#-planet-notation-

When they declare

And there you have it! A readable syntax juggling lots of values without any names!

For

×⊃(+⊙⋅⋅∘|-⊃⋅⋅∘(×⋅⊙⋅∘)) 1 2 3 4

Which, if you can’t tell, is equivalent to

f(a,b,c,x) = (a+x)(bx-c)

With arguments 1, 2, 3, 4.

I wanted to like this, and have always wanted to learn APL or J (clear influences). But I couldn’t take them seriously after that.

4
5
 
 

From the README:

What is KORE?

KORE is a self-hosting programming language that combines the best ideas from multiple paradigms:

Paradigm Inspiration KORE Implementation
Safety Rust Ownership, borrowing, no null, no data races
Syntax Python Significant whitespace, minimal ceremony
Metaprogramming Lisp Code as data, hygienic macros, DSL-friendly
Compile-Time Zig comptime execution, no separate macro language
Effects Koka/Eff Side effects tracked in the type system
Concurrency Erlang Actor model with message passing
UI/Components React/JSX Native JSX syntax, components, hot reloading
Targets Universal WASM, LLVM native, SPIR-V shaders, Rust transpilation

Example

// Define a function with effect tracking
fn factorial(n: Int) -> Int with Pure:
    match n:
        0 => 1
        _ => n * factorial(n - 1)

// Actors for concurrency
actor Counter:
    var count: Int = 0

    on Increment(n: Int):
        count = count + n

    on GetCount -> Int:
        return count

fn main():
    let result = factorial(5)
    println("5! = " + str(result))
6
7
4
submitted 2 months ago* (last edited 2 months ago) by greenbelt@lemy.lol to c/programming_languages@programming.dev
 
 

Basically it has hashmaps and arrays, it is untyped. Similar to lua in that regard.

8
 
 

Memory Safe

No garbage collector, no manual memory management. A work in progress, though.

9
10
11
12
13
14
 
 

I hope more languages get these features

15
 
 

(as an interested university student:) From Programming at a small scale in Javascript and Logo¹, I have gathered that not knowing what type something is can be annoying. They also have REPLs, which is pretty nice. From various blog posts and debugging Rust programs, I have learned that not having a REPL can be annoying. Are there languages that have both?

(¹ Logo is a "lisp" with omitable parentheses, where these also don't define runtime-mutable s-expressions, lists are in brackets, and also Logo doesn't have structs, giving it bad maintainability outside of not having Type Annotation too)

Candidates

  • C# : Does it have a repl?
  • Java in BlueJ somehow
  • sometimes people just put Lisp or Lua in their C/Rust++ program (emacs, shenzhen I/O(game)), this accomplishes a similar task of making some debugging or scripting code faster to compile/interpret, but slower to run
16
17
18
 
 

As for textual resources:

The book by Moritz Lenz is quite good.

There's also this polished three-hour introductory lecture.

Combine that with reading up on details in the reference and you're in for a decent start.

For help with questions, best join #raku and #raku-beginner on irc.libera.chat (or the Discord channels that are bridged), they're very welcoming.

19
20
21
 
 

The article ArkScript September 2025 update is the last one I wrote, covering all the changes I made on the language this summer.

Finally, I have released this huge set of breaking changes that makes ArkScript v4, and I'm pretty proud of it. I won't stop working on the language, however it's a big milestone for me: I've reach a point where the language is more than decent to use every day, errors are correctly reported, and the documentation is pretty good too (I might be biaised, I wrote it myself so I don't have an objective point of view): https://arkscript-lang.dev/

I've also written an article comparing ArkScript with other Lisps (which is still a WIP but is already good enough) for the curious ones here.

22
23
 
 

I think this is a decently interesting consideration in programming language design. When you have things flowing from left to right, not only do you get better autocomplete as per the article, but it's probably also easier to read, and very likely easier to edit (your cursor can simply go in its natural direction instead of having to jump around).

Though this comment on Lobsters points out that left-to-right code under one way of thinking is not necessarily left-to-right code if you approach it with a different way of thinking.

24
 
 

Explores how the Lean programming language handles 2 + 2 = 4, which other programming languages collapse into a bool, but Lean considers a Proposition, and requires Proof.

How does provably correct programming look? This article seems to give a good introduction and example.

25
 
 

Pike is a dynamic programming language with a syntax similar to Java and C. It is simple to learn, does not require long compilation passes and has powerful built-in data types allowing simple and really fast data manipulation.

int getDex()
{
  int oldDex = Dex;
  Dex = 0;
  return oldDex;
}

private void
show_user(int|string id, void|string full_name)
{
  write("Id: " + id + "\n");
  if (full_name)
    write("Full name: " + full_name + "\n");
}
view more: next ›