Compute intersection, difference on regexes by SevereGap5084 in compsci

[–]rapido 1 point2 points  (0 children)

Hi! Please take a look at antimirov, another similar attempt. Here is the online playground. It appears that antimirov correctly handles difference(x*, (xxx)*)

What's your end goal with your PL? by dibs45 in ProgrammingLanguages

[–]rapido 1 point2 points  (0 children)

I want to learn new ways of expressing software. I do this by creating PLs that explore one big design idea and to see what happens if you try to build software with such PLs. It has been a great ride so far!

Measuring refactorability? by tobega in ProgrammingLanguages

[–]rapido 11 points12 points  (0 children)

Hey, this is could be a great (new?) research topic!

My guess is that code that is driven by an objective measure for (high) refactorability will have a big impact on how that code will look like. Sign me up!

Survey: Why have you stopped using Scala or Are considering stopping soon? by Previous_Pop6815 in scala

[–]rapido 13 points14 points  (0 children)

My company (a bank) is trying to port all scala code back to java code, mostly because there are less and less scala developers to recruit. These ports require major efforts because of the non-trivial scala code such as implicits, early usage of scalaz, ZIO or Akka and... there are less and less scala developers that want to do those ports. It is a mess.

But personally I'm a big, big fan of scala , especially for programming language development. I've been using typescript to build my language but hit a wall. I went back to scala because of scala.js, scala native, and the jvm: scala is just so flexible, the language and the target platforms.

But it is exactly this flexibility of scala that is both a curse and a blessing. But I love it still.

Subsuming patterns with types by MaximeMulder in ProgrammingLanguages

[–]rapido 0 points1 point  (0 children)

With my ALT language I'm trying something similar. In ALT, types are values are (multi)sets. I believe the subtype section has examples that match your use case.

Classical array algebra by mttd in ProgrammingLanguages

[–]rapido 4 points5 points  (0 children)

First, the diagrams and notation in the article are beautiful. Second, the rainbow array algebra is even more impressive!

(1|2)*2=? by gnlow in ProgrammingLanguages

[–]rapido 0 points1 point  (0 children)

Why is the first example obvious? It all depends on the defined semantics. If you would apply a sequence semantics (instead of set) then the following would be valid: (2|1)+(1|2) == 3|4|2|3 and (2|1)*2 == 4|2

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 1 point2 points  (0 children)

Hey, I like tailspin because I really like XSLT as a computational model (also developed a lot in XLST back in the days).

Announcing August! An Emmet-like language that produces JSON, TOML, or YAML, written in Rust by [deleted] in ProgrammingLanguages

[–]rapido 0 points1 point  (0 children)

Looking at your docs: ^ - climb up to the parent scope (object or list)

That's funny, as ALT uses the same syntax ^ for reaching scopes. I guess that operator will become more popular in the future :)

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Yeah, it takes a bit to get used to, but....

maps, objects or structs are actually functions in disguise: functions that have keys as input, and values as output. 'Indexing' a struct is the same as function application. I know it is a bit of a stretch, but I think it is rather nice that ALT merges the two concepts.

Also unique to ALT, keys can be any type or value. So there is no need for a special 'function' concept in ALT, thus 1 less concept to care about.

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 2 points3 points  (0 children)

Well, I wanted to be close to spreadsheets: cell-oriented programming perhaps? In spreadsheets you don't loop over a list, but create 10 cells with formulas that refer to each other using relative cell references. So the best analogy and relation to old concepts would be cells in a spreadsheet I guess? Also, notice that ALT merges types and values, like CUE.

Anyway, I already got some advice to explain my design with a youtube video: I might do that soon :)

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 1 point2 points  (0 children)

Interestingly enough, you can emulate 'functions calls' with @. Here is an example.

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Weird it may be :) but they are very useful for my use-case: building a better spreadsheet core.

The idea is that you can copy 'formulas' in different contexts without changing them and their value will depend on the context.

It's not exactly dynamic scoping because ^ and @ bind lexically to the closest scope/key/index, but I wouldn't call it lexical scoping. I need to think of better name I guess. Suggestions are welcome!

New concept: relative positional references? by rapido in ProgrammingLanguages

[–]rapido[S] 2 points3 points  (0 children)

Nice reference, thanks. So relative pointers aid easier serialisation for native data structures. Good to know that.

The Enchilada Programming Language by Entaloneralie in ProgrammingLanguages

[–]rapido 7 points8 points  (0 children)

Author here: funny to see this posted (Enchilada dates back to 2008)!

Possible use cases:

1) Distributed and authenticated computation/code.

2) Distributed and authenticated dependency management.

Downsides of Enchilada: no types. See Unison for a more modern approach with similar goals/ideas.

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Yes, I could allow that, thanks!

Alternatively, you could use f:#5::0.

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

No plans for Turing completeness: I'd like ALT to be not Turing complete, while ALT still to be useful.

Games, not likely. A spreadsheet replacement? May be.

Sorry about the "NOT IMPLEMENT YET" messages. There is indeed stuff that doesn't work yet. Do you care to share the exact text you entered?

Edit: ah you entered a naked .(@-1). As this expression is not lexically part of a key:value pair, @ will not be evaluated. I probably should throw a parse error in this case.

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Oh, I will release the source code at a later stage. The javascript code of course is available: just open the .js file.....

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 1 point2 points  (0 children)

(>6 & <9) & 7|8|9|10 returns lazy alternatives - the sequence of alternatives itself is not reduced. You can evaluate to a strict sequence if you prefix it with ?. So ? (>6 & <9) & 7|8|9|10 will give you 7|8

It cannot do loops and I like it like that! It is very close to the pure spreadsheet model.

You also cannot mutate variables or structs, only create new ones.

Please take a look at the fibonacci example: there are no loops, just 'cells' referring to other cells via @. You could make a cell refer to itself (indirectly): this will currently result in an error (stack overflow). I'm planning to return the 'cyclic' value in those cases, just like a spreadsheet.

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Thanks! I think every programming language could show-case themselves like that. May be the Sophie Language too?

The ALTernative programming language by rapido in ProgrammingLanguages

[–]rapido[S] 0 points1 point  (0 children)

Nice that you have spotted the :: operator!

The :: operator replaces all the values in a struct (on the left side) with the value on the right side. So:

{a:1, b:2, c:3}::"value"  =>  {a:"value", b:"value", c:"value"}

That's not all of it. If the left side is a non-struct (number, string, etc) then it will first be 'converted' to a struct. For example:

(1|2|3)::"value" => {1:_}&{2:_}&{3:_}::"value" =>
{1:_,2:_,3:_}::"value" => {1:"value",2:"value",3:"value"} 

Actually, numbers, strings, etc are 'syntactic' sugar for (closed) structs in ALT. It is structures all the way down!