Languages

Discussion and questions about programming with Ultibo.
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Languages

Postby Gavinmc42 » Tue Apr 09, 2019 11:42 am

When that API stuff is done will we get a flood of languages being ported to Ultibo?

Perhaps it is time to have a section just for "Languages" box in the Programming posts section?
Bit pointless for me as I'm always straying outside the boxes :D
Not my fault Ultibo can do so many boxes ;)

How many is it already?
Assembler, Zig, Nim, PascalScript?
Whoops nearly forgot C.

Any others?
Does Basic running in an 6502 or Z80 CP/M emulators count?
User avatar
Ultibo
Site Admin
Posts: 2207
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Languages

Postby Ultibo » Wed Apr 10, 2019 12:26 am

Gavinmc42 wrote:When that API stuff is done will we get a flood of languages being ported to Ultibo?

Many of them don't strictly need to be ported, just having a complete C/C++ api will make Ultibo accessible to many compiled languages, adding dynamic library support will add even more.

Scripting or interpreted languages will of course need to be ported but since almost all of them use a C run time they won't require a lot of porting.

Gavinmc42 wrote:Perhaps it is time to have a section just for "Languages" box in the Programming posts section?

Yes we plan to add some new forum categories for other languages to help make it clearer what language a post refers to.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Languages

Postby Gavinmc42 » Wed Apr 10, 2019 5:24 am

I'm looking at interpreted languages first as they could be embedded and used as CLI shells.
Totally unsecure having scripts that can run on Ultibo.
But for simple stuff it could make development even faster without the need of a PC or Pi to host the Laz/fpc tools.

Low level stuff once debugged does not change much, so custom units and shell extensions are fine to be compiled.
It is the UI or application layer that needs changing when it meets the customer or the real world ;)
Having the application as a script that can be edited on site or remotely means tiny and quick updates.

Some of my customer suggested changes after release are a few minutes of editing, a recompile and a kernel copy.
It does not take that long but is does require time and access.
I did once email a new Ultibo 3MB kernel to Russia, so it is not that big a deal.
However having the client edit a small text file adds more user flexibility.
They can already edit the config.ini files for setup parameters so this would be the next level up

Basic
https://sites.google.com/site/smallbasi ... ource-code

This looks interesting
https://xmojmr.cz/en/software/Chip/

I did find a TCL interpreter that had C and Pascal versions but lost it :oops:
Found it, TCL inspired http://runtimeterror.com/tech/lil/
Compiled and just worked on Windows Laz/fpc :D
Interesting way it can extend itself with extra functions, that is cool.
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Languages

Postby Gavinmc42 » Wed Apr 10, 2019 11:37 am

LIL compiled and worked in Windows and Linux :o
The fplil.pas file compiled in Ultibo :o
Now how to convert Laz projects to Ultibo?

Anyway this LIL seems to be clean enough to be made into an Ultibo unit.
Kostas has also used it in some of his games and has demos.
So this could fill the scripting hole in my SteamPunk Game.

The Tannenbaum Minix3 book says Editors, compilers, assemblers, linkers and command interpreters are definitively not part of Operating Systems.
It then says they are important and useful but only spends 3 pages on them :(
Most Bash type shells are all written in C and look like they use system calls which means that Ultibo API stuff will be needed?

Dare I suggest a new section in the Status section of the Wiki- "Languages" :D
So this small interpreter looks like it might port, what tiny compiler will also port?
If I understand the Crenshaw tuts and all those books then a compiler that does not know system calls might not be as useful as a script interpreter.

Self hosting FPC on Ultibo? Well outside my current capabilities, give me another 8 years :lol:

An editor and command line interpreter look to be important for what i need next.
Oh and sorry my posts are sort of becoming blog posts, I did say near the start someone should write a book on how to use Ultibo.
I think I might have written a few chapters by now ;)
"Ultibo for beginners by a beginner"?
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Languages

Postby Gavinmc42 » Thu Apr 11, 2019 10:42 am

TCL/TK was a language I have been avoiding.
Er it's old and therefore useless, the same term could be applied to me ;)

But it looking interesting enough due to the fact it is supposed to be small and embedded-able.
Could TCL be used as Ultibo's scripting language and TK be used to emulate x11 in the graphics console?
FPLIL could be expanded into full TCL compatible mode?

Anyway TCL/TK is getting installed on my PC's and Pi's so I can get used to it and perhaps fake up something that looks like it on Ultibo.

https://www.raspberrypi.org/forums/view ... ?p=1096158
Edit - latest version of Raspbian in testing, install tcl/tk and run the widget demo, cool :D .
Install Laz/fpc and then Ultibo, then get LIL ;)
pik33
Posts: 857
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Languages

Postby pik33 » Fri Apr 12, 2019 6:07 am

We should consider 3 languages:

- Pascal. This is the language in which Ultibo was written.
- C. This is "English" in programming languages. A common language for all the world.
- assembler. This is needed where speed or size matters; you can optimize what you want.

We don' need more.

The exception is: if there is a open source tool written in one of these exotic languages and we want to have it working in Ultibo, it may be easier to convert the programming language than the tool.
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Languages

Postby Gavinmc42 » Fri Apr 12, 2019 6:46 am

The languages are for the users in my case.
I make gadgets for non coders, something simple and easy for them to be able to change a few things.
Or simple for me when I get asked to make changes and forgot how it works ;)

Anyway I think Ultibo will be able to use them all once we have some API docs.
hansotten
Posts: 55
Joined: Thu Feb 04, 2016 7:07 am

Re: Languages

Postby hansotten » Fri Apr 12, 2019 12:43 pm

pik33 wrote:We should consider 3 languages:

- Pascal. This is the language in which Ultibo was written.
- C. This is "English" in programming languages. A common language for all the world.
- assembler. This is needed where speed or size matters; you can optimize what you want.



Agreed! If you mean Object Pascal, the dialect of Delphi and FPC.

A Pascal derivate like Modula or Oberon would be just as welcome.

Being able to use Lazarus would be really nice, but is beyond the design goals of Ultibo atm.
Gavinmc42
Posts: 1586
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Languages

Postby Gavinmc42 » Tue Apr 16, 2019 9:06 am

Lisp like language in Pascal to add to the collection
https://github.com/bobappleyard/pascal-lisp
Have not used Lisp since the DOS AutoCad days :o

Wonder how many others are out there with Pascal source?
User avatar
Ultibo
Site Admin
Posts: 2207
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Languages

Postby Ultibo » Thu Apr 18, 2019 12:26 am

Gavinmc42 wrote:Lisp like language in Pascal to add to the collection
https://github.com/bobappleyard/pascal-lisp

This one seems to need libgc (the C garbage collection library), if you compiled that for Ultibo the rest looks like it would also compile.
Ultibo.org | Make something amazing
https://ultibo.org

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests