I have an idea for a universal programming language

Joined
Jun 15, 2022
Messages
101
Reaction score
0
I’d love to hear your thoughts.

Otherwise, I figured this out today: Ember is a working prototype for the universe. Check it out.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
First of all, read the whole thing now. I think the machine could work, the logic is just wrong. When recieving X's blueprints, it should be smart enough to go, "is this my own blueprint? Am I part of another machine?". If it's its own blueprint, and it's part of a different machine, it should reverse it's logic before finishing. This would be part of the internal logic. Plus, I DO THINK computers can do that, as it could also just not work for that problem.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
Now, as for a super language, it's appearing like ember is still not what I mean. What I mean, would be if C++, HTML, JavaScript, and my language biflex, were put into one language, by adding special universal features. Not an add on to an existing language. Such a language, is what I aim to create!

I guess we already have low level ones, because mine is one example, and machine code too. But I'm trying to create a high level one or so.

Hope you found your solution though!
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
I mean so ok Ember isn’t “the” solution, or it would be a programming language, but what it DOES do is model an algorithm (in such a way that you would never need anything else to make **anything** work). What I’m getting at is why not use it as a model for universal programming (and, ultimately a universal programming language)?

Anyways I don’t mean to be annoying and keep telling you to look at Ember, I’m just trying to make a single stroke through everything to be thorough.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
I mean so the reason I keep mentioning ember is it’s a completely factored solution for computer programming, to the nth degree, so don’t throw the baby out with the bath water (unless it really is a bad baby;).

A universal solution should be extreme in its efficiency (like I said ember is about 250 lines of code w/out white space/comments)…the only thing I can think of that is even better is simply a 1.

Anyways so I figured I would explain ember in case you haven’t taken a thorough look at it: so it’s simply persistent data, in minimalist (universal) form, with I/o filters so everything comes out right on the mark. Now, if I’m correct, it is thus a prototype of the universe, extensible to represent any “quark” in the universe.

Why not start there?
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
How bout this: using the types object, array, string, float, int, Boolean, and null see if there’s anything you **can’t** do.

Is there anything you **can’t** do?
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
OK. Now I understand what you mean by ember. I don't know that language, just found a description of it.

Now, you wanted me to elaborate:

First of all, there's what I've actually implemented. That can be found at the smileynet000 user and PNF project, of github. (no link, just description, becuase I don't want to just keep posting the link, although it's great publicity, posting the link over and over is not that great). I've implemented enough to do C-like work, in a language sort of like C (works on Linux so far, that's where I'm doing my main development now). However, when adding objects, like C++, it's been a little slow, as there are bugs, and I'm not good at when bugs come up yet. Some of these, are very strange to me. While I don't like posting code that doesn't quite work, in the latest development section, I went ahead and posted it. But I did not post a release yet. That's so, my hope was somebody might stumble upon it and help me through the bugs, but so far no one.

Now, it isn't a straight copy of C++ and lower levels. It's the lower level I'm working on hard right now, not the upper level. The lower level is PNF. It has interfaces like Java, but the interfaces can extend themselves, and multiple inheritance is supported for sure, even though there are interfaces too. That's the general description so far. That's what I'm actually implementing so far, but there is some experimental features, like a brain area of code, being worked on too. Feelings affect the brain and stuff like that, making it a different language than what any other language out there is like, on the lower level so far. See my other thread for the posts on bugs.

Now, what I want to actually implement, as soon as I can, is more than that. Once I get the higher levels done, and the lower levels can support objects, and the feeling implementation catches up and stuff, I'm going to rewrite the lower level in the higher levels. The minimum it requires is to have C++ like objects available. Then, I'm going to try to keep the inovation going, with the copy written in itself. There is already a PNF2CPP command, which will allow me to make an .exe or Linux app from it, native, that is. The output of that command will compile with g++. Of course, before going that far, I will make sure it's interpreted form works, one is a copy of the other. It's pretty clever, I think, how each behaves the same, because when you run PNF2CPP, it just makes a specialized interpreter.

Then, when I get to that point, I will have 1 major program written in my language, itself. I'll keep the versions side by side, but the one I'll add all the features to is the one written in itself. By the way, this language is backwards compatible as much as I can. Once it's released, I try to never add incompatible features to it.

What I want to do though, really bad, is develop the higher levels, and if I remember right, that's called PNFHA (Portable Numbers Format High Level Language A). That's where I'm really going to work on this super language of mine, though by the time I get to the super language, it will probably have a new name at the highest level. There is documentation that takes you through the current features.

Just to add in more abillities, I do also want to make a special version of g++, if it isn't too hard, where it has the option, not requirement of compiling to my lower level, and that will give me the choice of using standard C++ as well.

When I get to the super language part, I will probably have to slightly reinvent the wheel, but only because there are issues I see with HTML, and other web languages, which will probably lead me to make a new version of chromium, depending on the license for the source code. I like chromium based browsers overall (some of them), but I think even though it's older tech, that HTML should be able to easily support older modes still, such as command line mode, as well as graphics mode. And in my OS, that I plan to create, I really want there to be a few modes that there aren't in modern stuff, like the ability to work in a "text gui", and command line mode. I would build the whole thing with a Linux kernel, but I'd add another layer, I call the PNF Kernel. That OS, could eventually pave the way for a hardware implementation called the PNF-PC (might have to change it's name). The OS will probably be my biggest project, but I'm not there yet. I'm creating PNF right now.

I don't want to reinvent the wheel more than I will have to though, so I may find other solutions. But I don't know HTML or even C++ enough to be able to instantly whip out my own compilers and use standard syntax. That's why I'm trying to slightly reinvent the wheel. If anyone wants to help, I'd appreciate it. I DID end up putting the PNF suite under the GPL, though the OS may NOT be under it. There was a whole fight in me about whether to GPL it or not, and GPL won, for the abillity to later use other GPL code. I'm not going to break licenses to write the programs. I'd also love to see in the future, it used in more standard senses, like a language suite that wins out, where mine would be used and gcc line would be used, similiar to .NET from Microsoft, but open source, but I don't know whether I'll be able to work on that or not.

But back to the topic-centric stuff, I want to have control over enough languages to make, in implementation my super language. I see 2 possibilities for syntax, but I'll choose the simpler one. One choice, for a completely universal language, would have syntax perhaps like this:

A controlling language, and a language defining syntax, and finally the language syntax. To make a simple Hello World program, you would start by telling the controlling language that you are going to define a syntax for a language, then you would define the language, then you could use your definition to make a Hello World program. This would be a completely universal language, but Hello World, would take possibly 200 lines of code. So I probably won't go that route, though I could.

The next best, would be assuming you have some standard syntax. If you want to use a non-standard syntax, you could still define it and use it (the 200 line Hello World example). But it would assume some standards, like having my language and HTML-like language, as described before. The controlling language, would be at the top. If I can find the code button, I'll try and write and example.

Code:
version 0;
mode 0;
extmode 0;

language "document";

<DSHTML>
<HEAD>
<TITLE>Hello World</TITLE>
</HEAD>
<BODY>
Hello World!
</BODY>
</DSHTML>

Or:

Code:
version 0;
mode 0;
extmode 0;

language "general-purpose";

println "Hello World!";

Or:

Code:
version 0;
mode 0;
extmode 0;

language "language";

%%%

(I forgot what a very simple biflex scanner looks like, but you get the idea)

The control section, at the top, controls what version, like in the rest of my language, for compatibility's sake. The language part, defines the syntax going forward. For the computer to recognize it, I might have to split the whole thing up into sections the way biflex is set up. By the way, look at that project, though its simple. I expect to use it a lot in future development. Biflex, which I've implemented, is "bison and flex". I can see it becomming a future standard on unix, if nothing else. I have no code yet, (the point of explaining before the syntax), but I am really trying to be able to implement it in actuality, I'm not just trying a theory.

The whole point of it, is to afterward, get people programming in my later language, english-like. I can imagine in the future, the next generation, how you could decide to write a hello world program, and save it to your computer by saying, "Alexa, create a Hello World program plus save it to my account 'smileynet'", which would create in english-like the basic Hello World program, and save it to a website, with the account 'smileynet'. Then you'd be able to download it (your very own source code), from a special website, to your computer, and you'd be able to run it by compiling it from your machine and run your Hello World .exe. But that's not all! Thanks to my PNF, you may be able to create your Hello World OS similarly. Just like on star trek, basically! English-like would allow you to program your creation in English, not all english is in english-like, but all english-like is english. Alexa, which already exists, would allow you to speak it. My super language would let you create basically whatever type of program you desire, be it a website, or a general purpose OS. english-like compiles to my super language. I hear you can do it with python already, but my super language would enable you to do it with more stuff, like a whole webiste, or OS. Finally, my PNF interpreter, would allow it to run, and would also allow it to compile to native, if you want. I think that system, assuming bugs I could get out, would be about 30 years down the road.

I really want to do this as a company, but I have some steps to take to do that. That's why I'm not working on it full time yet. But I'm asking a general question, what if anybody could easily create an OS? Yes there would be standard OSs, but not everyone would want one anymore. Yes there would be one fit for the general public, a very good one I'm sure, but for all those who like to tinker or who have special needs, there could be more than one OS. If we get people doing that, a lot will change fast! I'm having to go through a lot of hoops to do that. But what if I didn't have to anymore? Microsoft could continue to create OSs, which I'm sure a lot of people would still want. But there could really be a lot more choices, beyond just distributions.

I'd probably choose something like Cinnamon as the standard desktop for my whole OS, and Linux as the kernel. It's the PNF kernel that hasn't been written yet. Because of difficulties, I've been at work at it 15 years already. Hope all that, pretty much answers the real dream.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Wow ok

So you’re definitely right about something, creating a universal programming language or system would definitely speed things up. The way I see it this isn’t too hard to achieve, either.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
"The way I see it this isn’t too hard to achieve, either."

Bugs aside, not really. Its the bugs eating up my time. In a world without bugs, id be done with the interpreter now. For my body, im planning a low tech week soon. Maybe the third week out.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Why not “fundamentalize” your project and just make something small that does it all? That’s why I made ember, to satisfy my web dev needs in the meantime.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
A reduced instruction set is harder to implement, because its not the way i think. I think more like the pc is designed, as far as instructions go. I guess i could simulate objects to write itself in itself, as long as i have structs working. But its harder.

No, objects are the way to go!
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Well there is definitely the potential at that point for the thing to get bigger, so you’re still making sense.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
Something that I’ve found helps with this sort of thing is programming everything in a master language. I’m currently using php.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
I dont understand, "master language", but the language i know best that is already entirely working, is c++. Thats why if i can, it will be so important to also fork g++ into an option to compile to my pnf.

I dont want to work on any more parts, than i already started, until i get this step working. The objects are what i most want to work. But the whole brain concept was because i got bored of just working on objects. Im purposely going slow and intentional at it. Its just a couple of classes buried in and never used so far.

By the way, im enjoying this talk with you.
 
Joined
Jun 15, 2022
Messages
101
Reaction score
0
@des000 yea this is good

So this might interest you: there was a point where I figured the macroscopic way to do this is to apply an across-the-board rule and stick to it

So I was thinking what about defining objects for each type that have input/output filters, as a universal rule

Or more simply if everything is made of code, everything is string, so just build a full-blown system for handling string
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
Tell me more, please. I apply a current rule at low level that every instruction, has instruction type operand. At runtime, it adds extrai. Also, todays operating systems should interpret it as human readable decimal numbers. An os may do as it wants, but for the current oss, this means text files.

Thats a feature, because its easy to modify at lowest level, compared to .exe or elf, which looks like garbage, but really isnt.

I should probably document these things too.
 
Joined
Sep 14, 2022
Messages
25
Reaction score
0
That seems to be why its so fast! But ive yet to know how to get exact times. I should find a way to measure. Then compare hello world side by side with raw c++, raw c, java, and mine. See which is faster under linux mint. Dont know how to measure, that may be another topic. But i have a feeling that its nearly as fast as c++, and faster than java. Why? Its parsing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,073
Messages
2,570,539
Members
47,196
Latest member
GeraldGeno

Latest Threads

Top