We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Talk:FlamePL

From Esolang
Jump to navigation Jump to search

Quoting islptng: "不要再造这些即混乱不可读又不知道好在哪里还没有解释器的假语言了,你被R揍得喵喵叫 -- i  s  l  p  t  n  g  14:10, 13 August 2026 (UTC)" --Cleverxia (talk) 10:55, 24 August 2026 (UTC)

yeah i think it's safe to say... they're not gonna stop
User:Gaham (Discord:glebovsky_)

Besides, FlamePL itself isn't purely for data science. Criticizing a general-purpose language with a math-focused language? That's not criticism—it's clearly just nitpicking!


↑ You've said enough, right? Fine, the counterattack starts now.

  1. Click into this link.
  2. So why have those popular programming languages uses equal sign for assignment and double equal sign for the real equality? Why don't they imitate APL and mathematics?
  3. Read this article yourself. Even R has no enough precision.

Don't think that arbitrary-precision floating-point numbers are just for show. Some programming languages are really frustrating, and you actually have to use the standard library (or a third-party library, like in JavaScript) just to get arbitrary-precision floating-point numbers (and that thing called C♯.NET can only do 128-bit floating points).

And don't think the left arrow as an assignment operator is just for looks. If you accidentally type a single equals instead of two, you either get undefined behavior, a syntax error, or it returns the value you assigned. With ← for assignment and = for equality, all these issues can be handled really well.

-- 北国风光,千里冰封,万里雪飘。望长城内外,惟余莽莽;大河上下,顿失滔滔。山舞银蛇,原驰蜡象,欲与天公试比高。须晴日,看红装素裹,分外妖娆。江山如此多娇,引无数英雄竞折腰。惜秦皇汉武,略输文采;唐宗宋祖,稍逊风骚。一代天骄,成吉思汗,只识弯弓射大雕。俱往矣,数风流人物,还看今朝。 2026年8月24日(星期一), 19:38 农历七月十二 (CHN)

Until you stop create those language I will not stop the attack.

0. This is Esolangs and not a normal language wiki.

1. when I run your interpreter I got

  File ".code.tio", line 993
    This is line 1
                 ^
SyntaxError: invalid syntax

and when I escaped the quotes I got

Traceback (most recent call last):
  File ".code.tio", line 1109, in <module>
    run_flame(SAMPLE_PROGRAM)
  File ".code.tio", line 950, in run_flame
    tokens = lexer.tokenize()
  File ".code.tio", line 425, in tokenize
    raise SyntaxError(f"Unexpected char '{ch}' at line {self.line}")
SyntaxError: Unexpected char '.' at line 33

An unfinished / buggy interpreter is not an interpreter.

2. i <- 1 <-> i < -1, right? To my knowledge, only R uses it, and R is unsurprisingly difficult,

3. No computer EVER can store arbitary floating point. using arbitary floating point just makes 0.1+0.2 equal to 0.30000000000000000000000000000000000000000000004 and not 0.3000000000000004. For infinite floating point you have to use (like) sympy, and even then you can't represent (for example) Mertens constant.

1

a = 123
b = 456
print(a + b)

The above program is also valid in R.

R nowadays is no longer the same R as before. Even this language for mathematics has fallen into many of the pitfalls of mainstream languages, and you probably still haven't realized it.

2

def tokenize(self):
    while self.pos < len(self.source):
        ch = self.source[self.pos]
        if ch in ' \t\r':
            self.pos += 1
            continue
        if ch == '\n':
            self.line += 1
            self.pos += 1
            continue

        # Comments
        if ch == '#':
            self.pos += 1
            while self.pos < len(self.source) and self.source[self.pos] != '\n':
                self.pos += 1
            continue

        # Multi‑line string
        if ch == '"' and self.pos + 2 < len(self.source) and self.source[self.pos:self.pos+3] == '"""':
            self.pos += 3
            start_line = self.line
            start_pos = self.pos
            while self.pos < len(self.source):
                if self.source[self.pos:self.pos+3] == '"""':
                    self.pos += 3
                    content = self.source[start_pos:self.pos-3]
                    self.tokens.append(Token('STRING', content, start_line))
                    break
                if self.source[self.pos] == '\n':
                    self.line += 1
                self.pos += 1
            continue

        # Single‑line string
        if ch == '"':
            self.pos += 1
            start_pos = self.pos
            while self.pos < len(self.source) and self.source[self.pos] != '"':
                if self.source[self.pos] == '\n':
                    self.line += 1
                self.pos += 1
            if self.pos >= len(self.source):
                raise SyntaxError("Unterminated string")
            content = self.source[start_pos:self.pos]
            self.pos += 1
            self.tokens.append(Token('STRING', content, self.line))
            continue

        # Assignment <-
        if ch == '<' and self.pos + 1 < len(self.source) and self.source[self.pos+1] == '-':
            self.tokens.append(Token('ASSIGN', '<-', self.line))
            self.pos += 2
            continue

        # Integer division //
        if ch == '/' and self.pos + 1 < len(self.source) and self.source[self.pos+1] == '/':
            self.tokens.append(Token('OP', '//', self.line))
            self.pos += 2
            continue

        # Exponent ^
        if ch == '^':
            self.tokens.append(Token('OP', '^', self.line))
            self.pos += 1
            continue

        # Imaginary literal: e.g. 4i, 10i
        imag_match = re.match(r'^(\d+)i', self.source[self.pos:])
        if imag_match:
            val = imag_match.group(1)
            self.tokens.append(Token('IMAG', val, self.line))
            self.pos += len(imag_match.group(0))
            continue

        # Number (float or int)
        num_match = re.match(r'^(\d+\.\d+|\d+)', self.source[self.pos:])
        if num_match:
            val = num_match.group(1)
            self.tokens.append(Token('NUMBER', val, self.line))
            self.pos += len(num_match.group(0))
            continue

        # Operators and delimiters – now includes '.'
        if ch in '+-*/=(){}[],:<>.':
            if ch == '=':
                self.tokens.append(Token('OP', '=', self.line))
            elif ch == '<':
                self.tokens.append(Token('OP', '<', self.line))
            elif ch == '>':
                self.tokens.append(Token('OP', '>', self.line))
            else:
                self.tokens.append(Token('OP', ch, self.line))
            self.pos += 1
            continue

        # Keywords and identifiers
        ident_match = re.match(r'^([A-Za-z_][A-Za-z0-9_]*)', self.source[self.pos:])
        if ident_match:
            word = ident_match.group(1)
            keywords = {
                'fn', 'class', 'if', 'then', 'else', 'end', 'while', 'do',
                'return', 'null', 'lambda', 'and', 'or', 'not',
                'true', 'false'
            }
            if word in keywords:
                self.tokens.append(Token('KEYWORD', word, self.line))
            else:
                self.tokens.append(Token('IDENTIFIER', word, self.line))
            self.pos += len(word)
            continue

        raise SyntaxError(f"Unexpected char '{ch}' at line {self.line}")

    self.tokens.append(Token('EOF', None, self.line))
    return self.tokens

Use this function to replace the original one yourself. If the code still throws an error, then it's a problem with Python's decimal.

If you don't know that you can change the code string to another code, or if you don't know how to provide code and input buffer through standard input, go check out this article yourself, I can't really help you with writing programs in Python anymore.

3

0.30000000000000000000000000000000000000000000004? What did you think that string was? And what did you think BCD (binary-coded decimal) was? Since you think that arbitrary-precision floating-point numbers would only make 0.1 plus 0.2 equal 0.30000000000000000000000000000000000000000000004, then why do Powershell and calc.exe both say that 0.1 plus 0.2 equals 0.3? Why does APL also say that 0.1 plus 0.2 is exactly equal to 0.3? Why does Python's decimal standard library also say that 0.1 plus 0.2 equals 0.3 instead of 0.3000000000000000444089209850062616169452667236328125?

4

Since you dare to come here and say FlamePL is like R, why don't you go to Talk:The Wind Chaser and say it's like JavaScript? Why don't you call Xonovile like APL? Why don't you say The Second Coming is like Python's body with Ruby's hands, Lua's feet, and Rust's head? Why don't you call Lingua Indeterminatum like Python messed with R? Why don't you say Gemini is like CangjieLang messed with BellBase?

Summary

In short, that’s all I have to say: any programming language, no matter how ordinary or unsuitable for the Esolang Wiki, shouldn’t just be left to gather dust in some folder. The quality of a programming language doesn’t need anyone to judge—it can be a tool as long as it serves a certain purpose, and at the very least, it can be a toy.

-- 北国风光,千里冰封,万里雪飘。望长城内外,惟余莽莽;大河上下,顿失滔滔。山舞银蛇,原驰蜡象,欲与天公试比高。须晴日,看红装素裹,分外妖娆。江山如此多娇,引无数英雄竞折腰。惜秦皇汉武,略输文采;唐宗宋祖,稍逊风骚。一代天骄,成吉思汗,只识弯弓射大雕。俱往矣,数风流人物,还看今朝。 2026年8月24日(星期一), 19:38 农历七月十二 (CHN)

quoting you: "any programming language, no matter how ordinary or unsuitable for the Esolang Wiki, shouldn’t just be left to gather dust in some folder."
esolang wiki is not a place to document non-esoteric prpgramming languages (duh) have you ever thought of documenting it somewhere else? also, the interprter code should be hosted on a separate code hosting platform, like github, gitlab or codeberg --Dragoneater67mobile (talk) 14:08, 24 August 2026 (UTC)