this post was submitted on 13 May 2024
28 points (91.2% liked)

Programming Languages

1186 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
28
submitted 6 months ago* (last edited 6 months ago) by armchair_progamer to c/programming_languages
 

From the site:

We have entered a world in which we need to do more with less. If you, like us, have frowned at the difficulty and inefficiency of creating software, and wondered if there is a better way, Meta is for you. It is a descendant of the acclaimed REBOL and Logo computer languages. Logo was designed in academia to teach programming in a simple yet powerful way. It is widely used in education and influenced many newer systems and languages. REBOL extended this concept to professional programming. It was invented by Carl Sassenrath, the chief software designer of the famous Amiga computer, the first consumer multimedia system. Meta takes the next step by combining this design with the virtues of the C programming language, which has been the standard for software interoperability and performance for half a century.

meta-lang-examples (GitHub)

Try online ("console")

all 28 comments
sorted by: hot top controversial new old
[–] [email protected] 34 points 6 months ago (2 children)

@armchair_progamer

Awful naming. Forgetting the fortune 500 company you're already thinking of, there's already a Meta Lang, abbreviated to ML.

Besides that, does it have any 'meta' features? E.g. Homoiconicity?

[–] [email protected] 23 points 6 months ago (1 children)

Omg im gonna fuking rage if i see any more of these horrible names. Ever had to search for something, yeah?

Its impossible to find anything about a topic if your keyword is something like meta, signal, element, matrix, session, rust.

[–] [email protected] 18 points 6 months ago

People think its a joke when we say us developers are terrible at naming things.

Theres this phenomenal automation app on android called "automate". Searching for anything marginally related is a PIA.

[–] [email protected] 10 points 6 months ago (2 children)

For anyone curious, FizzBuzz:

Meta [
	Title:   {Fizz Buzz math "game"}
	Author:  "Kaj de Vos"
	Rights:  "Copyright (c) 2021,2022 Kaj de Vos"
	License: {
		PD/CC0
		http://creativecommons.org/publicdomain/zero/1.0/
	}
	Notes: {
		https://en.wikipedia.org/wiki/Fizz_buzz
		https://wiki.c2.com/?FizzBuzzTest
		https://www.rosettacode.org/wiki/FizzBuzz
	}
]

For counter 100 [                                   ; Count to 100
    Third?: unless modulo counter 3 [write "Fizz"]  ; Display "Fizz" every third count; remember whether we did

    Any [
        unless modulo counter 5 [write "Buzz"]      ; Display "Buzz" every fifth count
        third?                                      ; Remember earlier result
        write counter                               ; Display the number if not third or fifth
    ]
    Write " "                                       ; Separate the displayed items
]
Write new-line                                      ; Return the text cursor to the start of the line
[–] [email protected] 22 points 6 months ago (3 children)

I find that very hard to read.

[–] [email protected] 4 points 6 months ago (1 children)

What I am not seeing is how it is much different than other languages. But hey, they had me at Atari!

[–] [email protected] 3 points 6 months ago

It's not so bad in a proper editor. These are very long lines and wrapping makes it worse than it is.

[–] hardkorebob -3 points 6 months ago

Complexity Bias. I had it too. Withers away with time.

[–] [email protected] 2 points 6 months ago

It reads just like FiM++

[–] FizzyOrange 6 points 6 months ago (3 children)

I scrolled a lot before I gave up looking for an example. No thanks.

[–] briggsyj 1 points 6 months ago* (last edited 6 months ago)

Wdym, examples are linked in the post's description and in the site's header?

[–] [email protected] 1 points 6 months ago

Honestly, agreed. This reads more like a manifesto than a useful language introduction.

[–] porgamrer 4 points 6 months ago (2 children)

REBOL is one of my biggest blind spots in programming language familiarity. I remember there was another REBOL revival project called RED, which always boasted huge feature sets with small amounts of code, though I never got around to investigating those claims myself.

This project seems to aim to provide strong foundations for a more performant compiler, but still lacks the most powerful REBOL features. I wonder if anyone can summarise those features? In particular, is there anything fundamental that distinguishes REBOL from Lisp, Smalltalk, Ruby, etc?

[–] hardkorebob -2 points 6 months ago* (last edited 6 months ago)

Red/REBOL are a data format first. Many native data types. Lisp uses Fexpr and Red use a basic token. Each character!

Originally Posted on Hacker News by 9214

Red (and Rebol) are based on research in denotational semantics that Carl Sassenrath did. I'll try to briefly explain the main points.

Everything starts with a UTF-8 encoded string. Each valid token in this string is converted to an internal data representation - a boxed structure 4 machine pointers in size, called a value slot or sometimes a cell.

Value slot is composed of a header and a payload. Header contains various flags and datatype ID, payload specifies exact content of the value. If content doesn't fit in one value slot, then payload contains a pointer to an external buffer (an array of value slots, bytes, or other units + offset and start/end addresses IIRC) with extra data.

So, lexer converts string representation to a tree of value slots (this phase is called loading), which is essentially a concrete syntax tree (CST) — this is the crux of homoiconicity.

https://github.com/red/red/wiki/%5BDOC%5D-How-Red-works,-a-brief-explanation

https://github.com/red/red/wiki/%5BDOC%5D-Guru-Meditations#contexts-and-binding

https://github.com/red/red/wiki/%5BDOC%5D-Function-Evaluation

Who cares if creators cant name things great. Forget names lets use and improve technology.

[–] hardkorebob -2 points 6 months ago

Also to be fully homoiconic, Meta needs to be able to manipulate its own code. Currently, that is done by REBOL 3. REBOL is homoiconic, and Meta is currently a REBOL 3 format. It will take a lot more to enable Meta to handle its own code, so that will take time. Even though REBOL and Red are homoiconic, they're not implemented in themselves. REBOL has a C interpreter and Red a Red/System interpreter. Meta is two to three orders of magnitude faster and designed to be able to implement itself eventually.

[–] hardkorebob 2 points 6 months ago* (last edited 6 months ago)

Awesome! Much better layout than the other post made ;) Thanks for the assist.