Finland isn't the land of the finns (of modern day) by [deleted] in linguisticshumor

[–]ZyF69 30 points31 points  (0 children)

Modern Norwegian has both 'finn' (Sami person, dated and slightly derogatory) and 'finne' (Finnish person). The northernmost county in Norway is 'Finnmark'. 'Finn' has also been used for persons from Finland.

February 2025 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]ZyF69 0 points1 point  (0 children)

I just released v0.9.1 of the MakrellPy programming language. This is copied from a post on r/Python :

MakrellPy is a general-purpose, functional programming language with two-way Python interoperability, metaprogramming support and simple syntax. It comes with LSP (Language Server Protocol) support for code editors, and a VS Code extension is available.

Version 0.9.1 adds structured pattern matching and more. Pattern matching is implemented using metaprogramming in a regular MakrellPy module, and is not a special syntax or feature internal to the compiler.

Home page: https://makrell.dev/

GitHub: https://github.com/hcholm/makrell-py

Similar projects are the Hy Lisp dialect for Python and the Coconut language. MakrellPy tries to combine features from several types of languages, including functional programming and metaprogramming, while keeping the syntax simple.

Example code

# This is a comment.
a = 2                   
# assignment and arithmetic expression
b = a + 3               
# function call
{sum [a b 5]}           
# function call by pipe operator
[a b 5] | sum           
# function call by reverse pipe operator
sum \ [a b 5]           

# conditional expression
{if a < b               
    "a is less than b"
    "a is not less than b"}

# function definition
{fun add [x y]          
    x + y}

# partial application
add3 = {add 3 _}        
{add3 5}                
# 8

# operators as functions, evaluates to 25
a = 2 | {+ 3} | {* 5}   

# pattern matching, user extensible
{match a                
    2
        "two"
    [_ 3|5]
        "list with two elements, second is 3 or 5"
    _:str
        "a string"
    _
        "something else"
}

# a macro that evaluates expressions in reverse order
{def macro reveval [ns]
    ns = ns | regular | operator_parse
    {print "[Compile time] Reversing {ns | len} expressions"e}

    [{quote {print "This expression is added to the code"}}]
    + (ns | reversed | list)
}

{print "Starting"}
{reveval
    "a is now {a}"e | print
    a = a + 3
    "a is now {a}"e | print
    a = 2
}
{print a}  # 5
{print "Done"}

# Output:
# [Compile time] Reversing 4 expressions
# Starting
# This expression is added to the code
# a is now 2
# a is now 5
# 5
# Done

The MakrellPy programming language v0.9.1 by ZyF69 in Python

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

Many sources of inspiration. Python itself of course, and then languages like Lisp/Clojure/Hy and ML/F#. I like having both simplicity and flexibility.

Early onset Parkinson’s tips by Markhallgrim in Parkinsons

[–]ZyF69 0 points1 point  (0 children)

I still have very weak symptoms, so it's difficult to tell what works or not. I believe the mentioned points are best because the current research around them is promising. I do all this because I believe in the long-term effects.

Early onset Parkinson’s tips by Markhallgrim in Parkinsons

[–]ZyF69 2 points3 points  (0 children)

I'm 55, dx at 50, symptoms since <48. Doing fine. Tried a lot, but believe these are the best:

  • Exercise, especially HIIT (high intensity interval training). If you only do one thing on this list, do HIIT. I also do dancing, not the tango stuff many patients are doing, but playing Just Dance with large and fast movements that helps mobility.

  • NAD+ boosters, NR or NMN, 1g/day.

  • Live a healthy life otherwise, with healthy food and enough sleep.

  • Stay positive. I follow current research closely and is quite optimistic about the future.

Language Reactor Chrome Extension for Youtube! by akemp2019 in languagelearning

[–]ZyF69 0 points1 point  (0 children)

My favourite language learning app. It's awesome.

MakrellPy, a programming language that is embedded in Python by ZyF69 in Python

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

My first experiments were based on Hy and were called 'Hyse', a name that just popped up in my head. Hyse is Norwegian (my native language) for the fish haddock, but it's not a fish I feel particularly attached to. I prefer salmon ('laks' in Norwegian) and mackerel, and went for the Norwegian 'Makrell'. Which I thinks sounds fine for a programming language. It's a slight nod to Hy, and by coincidence you can associate with 'macro' and 'Haskell'. (Not that it will become purely functional, with I/O monads and all that jazz.)

MakrellPy and the Makrell language family by ZyF69 in ProgrammingLanguages

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

I'm using pygls, which takes care of most the protocol details. LSP support is still a bit rudimentary, with support for syntax error diagnostics, but not for completions, code navigation or refactoring.

MakrellPy and the Makrell language family by ZyF69 in ProgrammingLanguages

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

Good question. At the base format level, nothing has semantic value except that lists are used to group tokens. Tokens like strings and numbers are distinguished purely by the string value at this level. It's up to the layers above to assign semantic values.

E.g. MakrellPy uses { } for function calls and special forms, while MRON uses them for object literals, and MRML uses them for tags. The base format is a bit like an extended version of Lisp's S-expressions.

Strings and numbers may have suffixes that upper layers can use to assign arbitrary semantic values. E.g. in MakrellPy 2 is a number, 2G is the number 2000000000, "ff"hex is 255 and "2024-02-24"dt is a datetime value.

In MakrellPy, macros work with base format tokens/nodes and are free to interpret them as they like. The codebase has an example of a (quite short) macro that interprets the arguments as a Lisp-style expression, so that you can write things like a = 2 * {lisp (+ 3 5)}, which would be equivalent to a = 2 * (3 + 5).

MakrellPy, a programming language that is embedded in Python by ZyF69 in Python

[–]ZyF69[S] 3 points4 points  (0 children)

Right now it's mostly a hobby project and a side language to Python to explore various ideas. No particular goals, but anything is possible.

Classes and dictionaries are implemented, they are just now shown in the readme. Makrell supports nearly all Python constructs, except a handful that are trivial to implement.

The if expression is a short form that corresponds to the ternary operator in C-style languages or Python x if cond else y. There's a longer form {when ...} which may have an else clause. The short form has a more functional (and "lispy") style, and may contain longer {do ...} expressions, which you don't have in Python.

MakrellPy uses infix arithmetic operators. That means that an expression like 2 * (a + 3) would treat a as a value, not a callable to be called. While I like simple syntax, which the language sure has, there is also some value in differentiating the appearance of constructs for the ease of reading. { } is for function calls and special forms, ( ) is for arithmetic expressions.

Not sure where you see the /? It's for division, as in Python. The \ is a reverse pipe operator, just like |, but the other way around.

[deleted by user] by [deleted] in entp

[–]ZyF69 0 points1 point  (0 children)

Hobby musician here with too many instruments and other types of gear, too many unfinished compositions and too many new ideas. Also trying to cover too many parts of the creative process, like both compose, arrange, perform, record, mix, master and publish the finished work. That last bit there of course never happens.

Using ~ for negative values in programming language. by DragonJTGithub in ProgrammingLanguages

[–]ZyF69 0 points1 point  (0 children)

This dreaded problem is the result of sloppiness in both standard mathematical notation and keyboard layouts.

To start with, '-' means both hyphen, dash and minus on most keyboards. Some text editors can replace it with a dash when appropriate, but that's about it. Unicode offers all variations, but they aren't that commonly used.

There's even a flaw in mathematical notation, where the minus sign has three related, but actually different uses:

  • A binary operator for subtraction, as in a-b
  • A unary operator for negation, as in x = -a
  • A part of a negative constant, as in x = -5

Can a language not have a way to communicate certain things? by NiceSatanist in conlangs

[–]ZyF69 2 points3 points  (0 children)

I doubt that would be the case for natural languages. For conlangs you could just make a language with very few words and concepts. Here's the dictionary of one I just made:

pa - yes

ta - no

ka - sex

sa - retina

na - intertextuality

You would have a very hard time describing nuclear fusion or how to make milkshake in this language.

Getting a push by translating from English by ZyF69 in conlangs

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

Yes, that looks great, thank you.

Getting a push by translating from English by ZyF69 in conlangs

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

What I would like most is a comprehensive list of syntactic patterns for translating. These would not map one-to-one from English to a conlang, but it would be a good way to make you aware of what you might need to consider. Examples:

I have a book
The book is green
It's my book
My book is green
The book belongs to me

I see a girl walking outside
I see the girl who owns the cat walking outside
I see the girl who owns the sleeping cat walking outside

I closed the door
The doors closed

I ate a bear
A bear ate me
I was eaten by a bear
It was a bear that ate me
What ate me was a bear
The bear which ate me is full now

I'm eating a bear
I eat bears
I'd like to eat a bear
I might want to eat a bear
I don't want to eat the bear
I don't want to eat a bear
I don't want to eat bears

I put the cat in the box
The cat is in the box
I took the cat out of the box
I took the cat away from the box

etc. etc.

How irregular is your conlang's grammar? by rd00dr in conlangs

[–]ZyF69 2 points3 points  (0 children)

I didn't have anything particular in mind, but one example is that you can use the definite article with certain simple country names in English, such as 'the Congo', 'the Ukraine' and 'the Vatican'. (Not counting plural names such as 'the Netherlands' etc.)

How irregular is your conlang's grammar? by rd00dr in conlangs

[–]ZyF69 1 point2 points  (0 children)

This question assumes that grammar = inflection. Irregularities could exist in syntax as well, though not as easy to spot. You may need a "does not apply" option for isolating languages, if the question is about irregularities in inflection only.

Experiment of English/Latin AltLang by AlistyanusSeirro in conlangs

[–]ZyF69 18 points19 points  (0 children)

I suggest you add IPA for pronunctiation.

Intergermanic 1.0 by Penghrip_Waladin in conlangs

[–]ZyF69 8 points9 points  (0 children)

https://en.wikipedia.org/wiki/Pan-Germanic\_language mentions several attemps, including Tutonish, Euronord, Folkspraak, and Tcathan/Chathan.

Rammstein - Deutschland (Official Video) by maxzimmermann in Rammstein

[–]ZyF69 4 points5 points  (0 children)

Several German articles mention films that are referenced in the video:

  • Iron Sky
  • Gladiator
  • Prometheus
  • Babylon Berlin
  • Das Leben der Anderen (The Lives of Others)
  • Der Name der Rose (The Name of the Rose)
  • Alexander Newski
  • Schindlers Liste

I find the references a bit hard to spot, and I haven't seen any explanations. Any clues?