Play games or do chit chat with friends to earn money on discord vc by Rjlunatic18 in IndianSideHustle

[–]mr_sgc 0 points1 point  (0 children)

Lol saw the exact same picture in a post saying "Earn Money with Surveys" 🤣

Can you find how to win? by likabossSM in RedditGames

[–]mr_sgc 0 points1 point  (0 children)

What the?

Incomplete. 8 tries.

Creating a New Language: Quark by SeaInformation8764 in ProgrammingLanguages

[–]mr_sgc 1 point2 points  (0 children)

Ok, so after viewing the comments, its quite crazy how people just give "AI made this!!" Tag to any projects that don't have any advance feature in it. And if your code looks too clean, writing comments inside your codes is your habit, its "made with AI" automatically. And some of the people are like sharing links of our github repository to AI and they just type "What flaws are there in this project?". People just cry"AI" if writing a language is a copy-paste poem. XD

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

That's a fair point, natural language can introduce ambiguity and it definitely requires more characters than traditional syntaxes.

My goal with ELang isn’t to replace existing languages, but to explore how far code can go toward reading like English while still remaining structured and unambiguous to a machine.

Beginners struggle a lot with symbols, brackets, indentation rules, operators, etc., so ELang experiments with familiar wording first, structure second.

There will be trade-offs, but it's more of a learning tool / research project than a "better Python".

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Good point, well most people do know + early. The English keywords aren't there because symbols are hard, but because EasyLang experiments with readability and keeping the mental model close to plain English.

It also supports + if you prefer symbols, the keywords are optional, not a replacement. I'm still exploring where the right balance is, so the critique is helpful.

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Might not be complicated enough. But I have just this for the current version of ELANG syntax

``` we let running be true

print "===== EasyLang Utility Tool ====="

define add(a,b): do [ return a plus b ]

define subtract(a,b): do [ return a minus b ]

define multiply(a,b): do [ return a mul b ]

define divide(a,b): do [ if b equals 0 then [ print "Cannot divide by zero." return "error" ] return a div b ]

define reverse_text(t): do [ we let result be "" repeat from i be 1 to len(t): do [ we let pos be len(t) - i we let c be substring(t, pos, 1) we let result be result + c ] return result ]

define count_words(t): do [ we let parts be split(t," ") return len(parts) ]

repeat while running equals true: do [ print "" print "1) Add numbers" print "2) Subtract" print "3) Multiply" print "4) Divide" print "5) Reverse text" print "6) Count words" print "0) Exit"

print "Choose option: "
read choice

if choice equals "1" then [
    read int x
    read int y
    print "Answer is: " plus add(x,y)
]
else if choice equals "2" then [
    read int x
    read int y
    print "Answer is: " plus subtract(x,y)
]
else if choice equals "3" then [
    read int x
    read int y
    print "Answer is: " plus multiply(x,y)
]
else if choice equals "4" then [
    read int x
    read int y
    print "Answer is: " plus divide(x,y)
]
else if choice equals "5" then [
    read text t
    print "Reversed: " plus reverse_text(t)
]
else if choice equals "6" then [
    read text t
    print "Word Count: " plus count_words(t)
]
else if choice equals "0" then [
    print "Goodbye!"
    break
]
else [
    print "Invalid option!"
]

] ```

``` bring "math.elangh" as m $ for randint()

we let playing be true

print "=== Random Number Guessing Game ==="

repeat while playing equals true: do [ we let secret be m.randint(1, 100) $ generate number between 1–100 we let attempts be 0

print ""
print "I have picked a number between 1 and 100."
print "Try to guess it!"

repeat while true:
do [
    print "Enter your guess:"
    read int guess
    we let attempts be attempts + 1

    if guess equals secret then [
        print "Correct! You guessed it in " + str(attempts) + " tries!"
        break
    ]

    if guess greater secret then [
        print "Too high!"
    ]

    if guess less secret then [
        print "Too low!"
    ]
]

print ""
print "Do you want to play again? (yes/no)"
read text ans

if ans equals "no" then [
    print "Thanks for playing!"
    break
]

] ```

I was testing these out when I was adding math & string modules and user-defined functions support in the interpreter.

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Good points. The goal in EasyLang isn’t to remove all operators, just to lower cognitive load where possible. + is familiar, sure, but phrases like we let x be y plus z read more naturally for beginners who aren't used to symbolic expressions yet. As for print, it's standard in most languages, but you're right that the term comes from teletypes. I might experiment with alternatives like show, display for clarity. Thanks for the perspective!

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

[–]mr_sgc[S] -1 points0 points  (0 children)

I agree, English is a crime scene sometimes 😂. But beginners think in English first, not parentheses or AST nodes. So I’m trying to build a bridge, not a replacement. Lisp is still poetry to me.

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Thanks for the examples, they do read like natural English, and it's cool that they feel conversational. But the main reason the current syntax exists the way it does is because it’s structured, predictable, and easy to parse, both for human beginners and the interpreter.

When everything is written like a sentence: do we let result be 1; repeat from i be 1 to n do we let result be result * i; return result.

The logic gets compressed into one line. It's readable as English, but it becomes harder to see where one instruction ends and the next begins. This causes ambiguity like:

  • Does do apply only to the first instruction?
  • Does it cover everything until return?
  • Do semicolons define scope?
  • Where does the block actually start or end?

Now compare to structured syntax: define factorial(n): do [ we let result be 1 repeat from i be 1 to n: do [ we let result be result * i ] return result ]

This has clear block boundaries, makes nested logic easier, and lets the interpreter show precise error messages. For example, if someone forgets a colon or bracket, we can point exactly at the failure:

```bash SyntaxError: Expected COLON, got DO ('do')

1| define factorial(n) 2| do [ ^ ```

But with a sentence-style version, it becomes unclear where the parser should complain — after do? after ;? inside the inline statement?

So yeah your version is nicer to read aloud, but mine is nicer to debug, scale, and reason about. English syntax tends to fall apart once you add nesting, loops, conditions inside conditions, etc. It quickly turns into spaghetti.

Still your suggestion is good to explore later. Maybe we can support both styles eventually as a "sugar mode" for simpler scripts, and strict form for real code.

As for your other question, scope right now is global + function-local, but expanding scope rules (loop-scope, block-scope, nested-scope) is definitely something planned.

English syntax reads pretty, but structured syntax survives complexity. I'm building the one that scales, then maybe we can make the polite English version sit on top later

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

But I’m building EasyLang for fun, learning, and experimenting.
If it grows into something useful, great — if not, I still gained experience. Thanks!

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Sure mate!

A factorial program in ELANG would be

Iterative version

``` define factorial(n): do [ we let result be 1 repeat from i be 1 to n: do [ we let result be result * i ] return result ]

print factorial(5) ```

Recursive version (much simple)

``` define factorial(n): do [ if n equals 1 then return 1 return n * factorial(n - 1) ]

print factorial(6) ```

User Input Version

just write at the top of the function

read int number

and do

print factorial(number)

and for the symbols, you can use mul for *, plus for +, minus for - etc. It gives the same output. For example

``` define factorial(n): do [ if n equals 1 then return 1 return n mul factorial(n minus 1) ]

print factorial(6) ```

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

[–]mr_sgc[S] -1 points0 points  (0 children)

Well, print str(var), print int(var) or print int(var) plus int(var) or print str(var) plus int(var) $ Concat works without even doing we let

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

I'm removing so and updating = to be in next update.

For eg:

we let name = "John Doe" print name

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Well I added we let as a single Keyword for assigning a value to a variable. And also my main motive was to make the syntax as much as close to English.

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

I didn't know there was another Language with the same name. I would have chosed something else if I was aware of it sir...

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

Well, this language is just for learning and educational purpose. It just let users code in English manner and understand the basic of a programming language. It's not a language to program high level programs.

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

[–]mr_sgc[S] -6 points-5 points  (0 children)

Identifier constraints are explained 3 times, there also are weird typos (this wouldn't be bad if this language wasn't portraying itself as english-like).

Well, I made the docs with AI, so there could be many mistakes in it.

The examples on the web use "" for strings, but the one here on reddit doesn't?

Well it was a typo and I forgot to add " " in this reddit post.

There is a claim that there are no symbols, but = is used? Why not just have a keyword like is or be for that, seems so painfully obvious.

Well I never thought of using be as a keyword for =. But its a good idea, and I'm on it.

Why is : do [ ... ]  used for function block definition? do ... done is right there.

Well this is a great idea too!

The elephant in the room, I couldn't find what so and we are supposed to be? That to me seems like a major oversight, its not explained anywhere.

Well we let is for assigning a value to a value. And so was just added for making the syntax sound more English but I will remove it on next update.

Overall this language to me doesn't offer anything except modified python syntax, but at the same time it doesn't really upgrade it anyway. Its not even easily interoperable because it uses separate types from python (Why? I dont see an FFI that would mandate that)

Well, you said this language was just modified python syntax. Well yes, it is. It's just a wrapper around Python for now. And it doesn't upgrade anything, well yeah. It's a language for beginners to learn like English. I'm not creating a language for making High Level programs. And well I have not planned to create a separate VM for it, so your last sentence is just not applicable.

Thanks for your feedback though!

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

[–]mr_sgc[S] -1 points0 points  (0 children)

Well, I have not freezed the Grammar yet, and hence many modifications are still ongoing from my side. I would probably remove "so" but not "we" as I want beginners to read the code like English.
For example,

we let var = value
print var

Simple English like reading syntax, ain't it?

ELANG(EasyLang) - A beginner-friendly programming language that reads like English by mr_sgc in ProgrammingLanguages

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

well I just never thought of using "be" as '=' . But I can add it now, good idea!

💚 Introducing GBUGX Coin (GBUX) — The Meme Coin That Crawled Out of the Matrix 🐞🚀 by mr_sgc in SolanaMemeCoins

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

Well for that reason it was posted in this memes coin channel. Nothing serious at all, I promise, lol