Writing a small Programming Language

hey guys,
For a couple of years now iv’e been wanting to write a small programming language
in HEBREW for my young (now 7) and curious daughter.

Iv’e researched some and I feel like I know what has to be learned,
but I also saw thing like SLY for Python that help you generate Lexers,ASTs etc… without
building them from scratch.

I wanna do it in Processing, any ideas? is there any library that could help me?

this is quite daunting for me but I really wanna give it try

:-))

1 Like

you could look here for a start: http://www.lagers.org.uk/qscript/ - QScript [EDITED]

2 Likes

what about swift (https://www.apple.com/education/k12/teaching-code/), tynker (https://www.apple.com/education/k12/teaching-code/) or scratch (https://scratch.mit.edu/projects/editor/?tutorial=getStarted) ?
or blockly a library that you can incorporate into javascript (https://developers.google.com/blockly) mb allowing you to dress your language wishes
probably you know all these already :wink:

3 Likes

I don’t believe that there is anything on my website (Quarks Place) that would help. Sorry.

1 Like

Ah, sorry, I was specifically linking to QScript - @quark

When he wrote a editor he could “transpile” his Hebrew into QScript and run it there.

Chrisir

NP I didn’t click on the link so assumed it went to the home page :innocent:

I assume that he wants the programming language to be in Hebrew rather than the standard US English. Not an area I am familiar with but here is a couple of suggestions

  • to fork the Processing project on github and change the classes to use Hebrew
  • Use Java regular expressions or Perl to convert the Hebrew source code to Java standard syntax thus replacing the Processing transpiler.
4 Likes

This sounds like a great project. I’m a co-organizer of the Critical Code Studies working group, and our online conference this year had a week on indigenous programming and ethnoprogramming, which is somewhat related in that it is often concerned with the ethics and logistics of developing Non-English programming languages. For example, here is part of a thread on a Cree programming language which discusses incorporating non-Arabic numerals in programming language design.

If you haven’t already, I would suggest brainstorming ideas by looking at existing Hebrew programming, especially Hebrew programming for children – for example:

  • (HPL – Hebrew Programming Language) – an old project from ~2003 that was a c++ parser with a Java IDE. I’ve never looked at it – I’m honestly not sure if it was actually developed, or is just a project template, but the source code is available.
  • Lang871

If you want to adapt or incorporate a Hewbrew lexer into Processing, or want a model for someone who has already done it in Java, my guess is that Lang871 will be your best bet. The programs look like this:

עבור א=4,א>0,א=א-2:
	הדפסש "אחלה"
סוף

עבור א = 4, א > 0, א = א - 1:
	הדפסש "יפה"
סוף

and are stored in files with a .871 extension. Lang871 is more recent (last changes and kindly made a new release this week), and it is Java. The repo says “Windows support only” but I was able to launch the IDE Jar on my mac as well, and my guess is that you could import some of the Java resources directly into a Processing project – and/or build your own forked jar to include as a library, rather than using its IDE wrapper.

Good unicode and font support is going to be crucial. You may want to consider using Processing 4 as your platform if you run into any problems, although in terms of the code points you should be fine – I believe that the only Hebrew code point missing from Java 8 / Processing 3 is U+05EF.

Also: While it isn’t a programming language, you might also be interested in browsing processing.co.il, which was a Hebrew-language resource for Processing, ~2003-2007.

Good luck, and let us know what direction you choose and how it is going!

6 Likes

Turtle Script

here is one script language with a Turtle (like in Logo)

Here: https://github.com/Kango/3D-Turtle/tree/master/scriptTurtle

It’s actually a 3D Turtle but you could reduce it to 2D - and to Hebrew, I hope


Wasd-Turtle in 2D

here is also a 2D Turtle with a wasd steering which is not a real programming language but the commands (like w,a,s,d and others) get recorded and you can load and save and run them.

Here: https://github.com/Kango/Turtle-2D-

Both are done with incredible help by the forum!

Chrisir

2 Likes

here is another Sketch where you can drag command items for the Turtle

There is a lot of work to do.

When you are interested, pm me please.

Chrisir

1 Like

wow what a great and informative answer.
thanks sooo much.
i will check all this out when my kids allow me :slight_smile:
here in Israel we just got into at least two weeks of lockdown due to COVID 19

3 Likes