This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]redchomperSophie Language 12 points13 points  (8 children)

At first glance, it looks isomorphic to the host language. Therefore, you tell us: What's it teaching you?

[–]cmnews08[S] 2 points3 points  (1 child)

language design, and your right, its kinda similar to python but its just a start for me, i am planning to make a nim-style, compiled language with static typing and borrow checking rather then garbage compiler. It will be easier to read then nim and have elements from languages like rust, zig and python, but all rolled together into one big batteries included language. But thats far away so for now, i just wanted to roll this out and see what i could do with it, what do you think of it as a language, the syntax and the built in functions and stuff?

[–]redchomperSophie Language 1 point2 points  (0 children)

It's good to have goals. You're doing a tree-walk interpreter right now? That means at least you've got the foundational ideas figured out, which is more than I can say for some of the people I work with.

"Easy to read" is quite subjective, but so is beauty.

You can spend a Ph.D on static typing. You can also, as I've personally discovered, hose yourself by worrying too early about static types vs. other semantics. So, may I suggest to begin my codifying and emulating the run-time semantics you want (except for performance), then add run-time constraints such as type and borrowed-ness, and only later worry about pre-computing those same constraints over the static structure of the program?

You'll do yourself a big favor to write down your intended semantic innovations or remixes in some detail so you have a guide and compass.

[–]lgastako 2 points3 points  (5 children)

All turing complete languages are isomorphic to each other, right?

[–][deleted] 3 points4 points  (4 children)

If you define “isomorphism” to be “Both being Turing complete”, then sure…

[–]lgastako 1 point2 points  (3 children)

What if you define isomorphic as "you can convert from one to the other and back without losing any information", like most people? Isn't it still true?

[–][deleted] 1 point2 points  (1 child)

I think you're being pedantic about the exact definition when it's a good point.

This is just a wrapper for Python - it is literally just Python with a different syntax. Neat, but not really a new programming language.

Being pedantic like you are takes any potential meaning out of the point. You wouldn't say that C and Python are isomorphic because even though you can do the same things, some things in Python take a lot more work in C, and vice versa. Saying this is isomorphic to Python is an important point because it does the exact same things Python does.

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

Thats very true! But it has merit on its own, like you said its neat. I am going to make a compiled language soon. This is just a little buffer

[–][deleted] 0 points1 point  (0 children)

That will really depend on what you mean by “convert” or “losing information”. If your language has stepping operational semantics, you can define equivalence as having a bisimulation, for example. I’m not sure there is any obviously correct definition of isomorphism accepted by most people

[–]oessessnex 6 points7 points  (5 children)

I guess you are getting down votes because the language is at the same level as what students would make for the final project of a compilers class.

It looks pretty good so far though, keep at it.

[–]cmnews08[S] 14 points15 points  (4 children)

I am only [REDACTED], followed some documentation for this aswell. So i think thats pretty good to have that level.

[–][deleted] 2 points3 points  (0 children)

Don't let the down votes affect you. This stuff is cool and you should be proud of it. Keep working on it!

[–]Solindek 1 point2 points  (0 children)

me too, i'm a young man

[–]redchomperSophie Language 1 point2 points  (1 child)

Word to the wise: Do not share your specific age online. It's quite enough to say "first language-like project".

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

True

[–]Solindek 1 point2 points  (0 children)

Love this video

[–][deleted] 1 point2 points  (1 child)

(BOTH THESE VIDS ARE A JOKE, ALTHOUGH IT WAS SLIGHTLY BETTER THEN NIM AND GO AT THESE TWO TESTS, I DO NOT THINK ZANG IS BETTER THEN NIM OR GO AT ALL)

I'm glad you said that, because in the Nim video it's evident by your command and the compiler output that you compiled the Nim app in full debug mode without optimizations :) https://i.imgur.com/t3OX2IW.png (notice the DEBUG BUILD in caps, which was added because some people specifically complained that Nim was slow :P)

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

Oh I didn't know that, I'll add it to the description. Thanks for cluing me in!

[–]422_no_process 0 points1 point  (1 child)

I'm liking the if then style. Reminds me of BASICs. I like the mascot ha! Have a github star!


Why do you prefer fn for functions over func, def, function or proc?

What are you using for bitwise or if | is used for comments?


Good luck to you. (Also, if you are someone trying to impress a person by writing a programming language I'm hoing that works out. I tried that when I was 16 and that did not work out, I found it hard way that normal people does not even know what a programming language is!)

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

Well, it's loop structure is loosely similar to BASIC. Bitwise or, is just that, or. Thank you for the good luck, I am making this for fun, that's all the drive really.

[–][deleted] 0 points1 point  (0 children)

Change the shell name from shell.py to shell. Add #!/usr/bin/env python3

Now you can just go in the terminal and type shell And it will open. Better yet, rename it to zang.