Ask coding questions

← Back to all posts
What do you guys think about this syntax I came up with?
eekboi (80)

Right now its in the works for a language me (@eekboi), @sugarfi, @rohilpatel, and a few others i unfortunately forgot. AMA!

Commentshotnewtop
pyelias (1232)

To me, it just looks like you've thrown together words related to the thing you're doing. I can't see any consistent structure or logic behind it.

As an example of some of the inconsistencies, your sample code contains:

</bin>
  is this or "Binary standard" the part that tells it to encode as binary?

</Output:/>
  where does the :/ come from?

</read Input>>>
  why 3 >s?

</display user input/>
  don't we already have Output and Say? (why are there 2?)
  and why is there a / at the end?
  is that just a comment? if so, it should look less similar to code

</web?URL/display ... 
  what does ? do?
  and why is there no closing > ?

"https://{input}.<"com", "net", "web", "org">"
  is this just an entirely different usage of <> ?

<Say, ("click me!") ...>
  why no / at the start?
  is this another different usage of <> ?

</action"click">
  as far as i can tell this is some kind of function
  but the Say function (is Say a function?) works completely differently

<action>
  missing the / again?

</Create"movements">
  why are these only sometimes capitalized?
  (that's not technically syntax, but still)

<"NORTH", "EAST", ...>
  is this the same as <"com", "net", "web", "org">?
  and why are they lowercase later?

</movement"...">

</movements>

</action>
  it didn't have / before
NicholasMoon (4)

@pyelias you know, I'm not that good with most languages of code, but you do have a good point. None of that has much constancy or much logic. seems like random words made up to be somewhat functioning.

eekboi (80)

@pyelias </bin>
is this or "Binary standard" the part that tells it to encode as binary?` its telling you to encode it in binary.
also most of the stuff you mentioned are typos i will fix. thanks for notifying me about it.
</Output:/>
where does the :/ come from?
typo
</read Input>>>
why 3 >s? typo
</read Input>>>
why 3 >s? typo and typo no its not a comment the slash is a typo
for most of this ive updated it.
</web?URL/display ...
what does ? do?
and why is there no closing > ? the ? is updated to a . and the other thing was a typo.
"https://{input}.<"com", "net", "web", "org">"
is this just an entirely different usage of <> ?
the<> can be used in different ways most predominately used here is to encapture the different options/choices.
</action"click">
as far as i can tell this is some kind of function
but the Say function (is Say a function?) works completely differently
this is a way to make the click a function available to detect.
say is print in python.
<action>
missing the / again?
i was on low sleep man, ok? lol typo
</Create"movements">
why are these only sometimes capitalized?
(that's not technically syntax, but still)
since my syntax isnt case sensitive i used it as a marker incase i make a typo to easily skim thru my code and see it in there to edit it
<"NORTH", "EAST", ...>
is this the same as <"com", "net", "web", "org">?
and why are they lowercase later?
yes thats the same as the other thing you mentioned. same thing with the thing above for the capitilization
</action>
it didn't have / before
im pretty sure i didi but you could be right. thanks for asking and actually caaring!

SixBeeps (1429)

The structure doesn't feel stable enough. You have commands like create and encrypt but at the same time have tags-like tokens, such as </movement"...">. Also, you have a createweb command, which IMO is wayyyy too specific for it to be its own entity.

eekboi (80)

@SixBeeps will take as a note, movement is a variable that i made sure to put in. As for create webserver its a command that runs on the create command, its not its own entity command. for working in the future on this i will take note Thanks!

bob098 (5)

there is an error.But good try

eekboi (80)

@bob098 its not me programming it, its an example.

eekboi (80)

@TurtleAndrew its a syntax thats not being coded in. its an example not an official "thing"

Zexogon (841)

Wait how do you create your own launguage?

eekboi (80)

@Zexogon You have to come up with a syntax for it, write a lexer/tokenizer and a compiler. its pretty complicated. if yo want to see some example docs from my project with @sugarfi @rohilpatel @darknew and more ill inv u

sugarfi (266)

@Zexogon you can either write your own lexer and parser like eekboi said, or you can use a library. Then you have an AST, or Abstract Syntax Tree, representing your program. Then, you either run that directly (interpreted) or convert it to an executable (compiled).

Andi_Chin (144)

seems a bit difficult to parse, especially line 23

eekboi (80)

@Andi_Chin true true. heres a little bicture i made to explain what it all meant (especially line 23) try to view it in its own web thing so the codes bigger :)

eekboi (80)

@RohilPatel i know. its not meant to be ran. It's a syntax that hasnt been released yet.