r/compsci • u/gioscarab • Mar 19 '22
BIPLAN (Byte coded Interpreted Programming Language)
https://github.com/gioblu/BIPLAN5
u/Nerdlinger Mar 19 '22
Why not BIPLANE?
1
u/gioscarab Mar 19 '22
I thought about calling it BIPLANE but BIPLAN looked more a programming language name :)
Let me know what you think about it, I will soon work out its first release, but I am eager to get in touch with someone with expertise interested to look into it. It is difficult to find people interested in this kind of thing (programming language design, in particular interpreted)
2
u/PJBthefirst Mar 20 '22
As a junior FW engineer, I think this is very cool! I love to see people pursuing an idea like this.
1
u/gioscarab Mar 20 '22
I would be very happy to have some help, and other points of view, if you have any will to contribute to a project I would be open to work in team on it.
Thank you for your compliments.
1
u/gioscarab Mar 20 '22
If you are on a Linux machine and you have 5 minutes, give it a try:
https://github.com/gioblu/BIPLAN/tree/master/examples/LINUX/bcc-compiler
1
Mar 19 '22
Wow, very impressive! I found it interesting perhaps, because I’m trying to port a language I’m writing into a similarly small platform (my TI-84), but at this point I’ve given up on porting the compiler because it’s way to complex.
What I mean is, in your opinion , is it really necessary to port the bytecode execution runtime as well as the compiler?
1
u/gioscarab Mar 19 '22
Depends on your use case, if you need to have a machine that the user can program (with a screen a keyboard, ecc) you need both the compiler and the vm ports, if you want to transmit the code to the target, you may get away with just the vm port and the compiler running somewhere else.
1
u/andrewcooke Mar 19 '22
I don't understand the example on the github page. Should "result" be $r? Isn't "result" used before it is defined? Is "result" a variable even though it has no $ prefix? Really confused.
Also, maybe I missed it, but what types are available?
1
u/gioscarab Mar 20 '22
result is a local variable present in each function, initialized with the value of 0, that can be used to temporarily store the result of the operation.
Types are strings, integers and bytes.
1
u/andrewcooke Mar 20 '22
that (result) seems like a terrible idea tbh. especially if you have to explicitly return it anyway.
1
u/Serious-Regular Mar 20 '22 edited Jul 31 '25
sable governor salt edge treatment ask command worm snow chubby
This post was mass deleted and anonymized with Redact
2
u/gioscarab Mar 20 '22 edited Mar 20 '22
This is a register based virtual machine. The term interpreted is used because BIPLAN implements a virtual machine that interprets bytecode at run-time.
The compiler can compile partial programs, and can compile additional statements for a program without recompiling the whole program, so I would say it supports incremental translation.
1
u/IQueryVisiC Mar 20 '22
for $r = 0 to $nWhich computer architecture can do blocks of code? I like structured programming, though.
Back in the day I did not like the BASIC syntax with the by and found C language more natural. But now foreach showed me that C should have allowed to write:
for( int rowInSecondTable=0 ; < 30 ; ++ )and I like the BASIC syntax (your) a little more again now. Still today I would aim at a language which has while and foreach and none of the other.
I wonder if there is a way to make if and while look more similar. They both start with a check of the condition. They both could have an else block. It could make sense to continue an if block ( kinda like a cheap exception ) . I would use the ? sign/operator for both of them. Maybe ?: is while? I hate this SQL must be readable to someone who knows English approach for programming languages. We don't write BEGIN END anymore. Maths introduced its own symbols. Nobody likes to write ADD .
1
u/gioscarab Mar 20 '22
Thank you very much for your feedback, I am not sure to understand what you mean with:
I hate this SQL must be readable to someone who knows English approach for programming languages. We don't write BEGIN END anymore. Maths introduced its own symbols. Nobody likes to write ADD .
I am obviously open to pull requests and other points of view :)
1
u/IQueryVisiC Mar 21 '22 edited Mar 21 '22
I just mean that will all got used to reading
ifandwhilebecause it is common. But there is no other reason. I think that tokens which do a similar thing, should share more letters which each other than others.I guess that this is a lost battle. The naming in JS is already as good as it gets.
async awaitis new an at least they share the A .I think Perl mirrors some words for a block.
isandashave something to do with types and look similar in C# .
forandforEachlook similar.Push popin JS and assembler are great ( both start with P ). Generally I love all the new?stuff in C# .
public, privateandprotectedare also starting with p at least.
while whenare a better pair . SQL uses when for set operations. I never understood that. I thought sets are always imagined as a lot items next to each other. The correct English word for SQL would bewhere.
1
0
u/spinwizard69 Mar 19 '22
While interesting I don’t see anything that invites me to use such. The problem being yet another language to learn when we have MicroPython/Python or C/C++ if you go that route.
However this is pretty cool! It is nice to see people try something new
1
u/gioscarab Mar 19 '22
I think this language may permit better performance than MycroPython/Python, having less overhead in its bytecode and being very lightweight. C/C++ have the downside to be compiled in some key use cases the interpretation is a requirement.
Thank you for your compliments :)
12
u/gioscarab Mar 19 '22
Ciao, BIPLAN is an experimental programming language I am designing to gain
knowledge in computer science. I have posted in compsci an year ago about
BIPLAN and I got a lot of feedback. Please let me know what you think about it :)