User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Programming languages support

Fri Oct 11, 2019 2:27 am

Finally plugged the second screen into the home Pi4 last night.
Went looking for Interpreted languages.
Browser instructions in one window, compiling in the other, so easy now.

Weird and small ones, just grabbed the git and most just "make'd.
I did this in Buster 32 and Gentoo64 on a Pi4
A couple of versions of Forth, Pike, Jim, LiL and other embeddable ones look like fun for baremetaling.

I was surprised how many I could make from source on a Pi4.
https://en.wikipedia.org/wiki/List_of_p ... _languages
I even tried Node.js :lol:
Baremetal JS on Pi's? Espruino for Pi's?

I would like to try Smalltalk but Squeak slows things down and it looks like cartoons.
Exploring the small ones is more fun, I seem to be learning more than just trying to master a big one like C++.

I have yet to find what I am looking for, might just have to invent my own :lol:
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ejolson
Posts: 3828
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming languages support

Fri Oct 11, 2019 3:35 am

Heater wrote:
Thu Oct 10, 2019 7:37 pm
For this reason the popularity of JS/node.js is self perpetuating. Since many know that language well, many new programs are creating using that language.
Thanks, the typo in my earlier post has now been corrected.

User avatar
PeterO
Posts: 5153
Joined: Sun Jul 22, 2012 4:14 pm

Re: Programming languages support

Fri Oct 11, 2019 5:40 am

Heater wrote:
Thu Oct 10, 2019 9:01 pm
PeterO,

You don's seen to understand what I wrote. I'll try again with reference that man mage:

* a file descriptor becomes ready;
In which case there is somethign to do and you do it

That could be a long time when reading from sockets, serial ports etc.
A long time when there is nothing to do and you code is doing nothing which is what you want.

* the call is interrupted by a signal handler; or

Which may never happen.
I never bother about this.
* the timeout expires.

Well there you go, either that is a zero or very short time out, in which case you are thrashing around needlessly wasting performance and generating heat.
You are ignoring the normal case where the timeout is not "short" or "zero", but is set to something appropriate. If your application needs millisecond response to some other source of events then set the timeout to 1mS. If it only needs a slower response then set it longer.

Or that is a longer timeout in which case you have hung up all processing for the duration.
Only if you wite all your code in a naive way. If you can make all your sources of events look like files or devices then you just add them to your
poll call and deal with them when they are ready. This is what gui toolkits like GTK do. You can add file descriptors for serial ports and network sockets to the main event loop and set callback handlers for various conditions on the socket.
Likely one can find a middle ground but it's a bit kludgy to my mind.
As jabboater says
You should actually try using it .... then it would become clear.
As is often the case you seem to be making your argument with no actual real experience of using the thing you are criticising.



PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

timrowledge
Posts: 1290
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Programming languages support

Fri Oct 11, 2019 8:31 pm

Gavinmc42 wrote:
Fri Oct 11, 2019 2:27 am
I would like to try Smalltalk but Squeak slows things down and it looks like cartoons.
Perhaps you could spend a moment to explain this? How exactly does Squeak “slow things down”? How did you install it? I do hope it was not with apt-get since that would most likely install a ten or more year old version!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Programming languages support

Sat Oct 12, 2019 12:01 am

do hope it was not with apt-get
:oops: Guilty.
Perhaps time to try a newer version?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

timrowledge
Posts: 1290
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Programming languages support

Sat Oct 12, 2019 12:22 am

Gavinmc42 wrote:
Sat Oct 12, 2019 12:01 am
.
Perhaps time to try a newer version?
Please; go to www.squeak.org and download the linux(ARM) package. It’s the one on the front page under the three icons (for Mac, Windows & linux(X86)).
I really wish we had never made the mistake of getting a download in the Debian wotsit. All it ever does is cause problems. If you’re seriously interested in learning about Smalltalk feel free to
a) contact me at (my first name)@(my surname).org I think you’re smart enough to work out the details from my handle on this forum.
b) join the Squeak mailing list
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

User avatar
Gavinmc42
Posts: 4064
Joined: Wed Aug 28, 2013 3:31 am

Re: Programming languages support

Sat Oct 12, 2019 5:55 am

Thanks Tim, that's got it, much better on a Pi4 :D .
Need to see if there is an Aarch64 version for Gentoo64.
If not, time to learn how to make it.

A baremetal version is possible?
Er, Google found me back in April talking about this and Dynabook.

Still have that Byte 1981 mag somewhere.
I suppose Lisp and Fortran must be some of the last old langs I need to try installing.

I am finding not many limitations in using Pi4B4's as a development environment.
Apart from running out of uSD card room :D

.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 13923
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming languages support

Sat Oct 12, 2019 8:10 am

PeterO,
As is often the case you seem to be making your argument with no actual real experience of using the thing you are criticising.
As is so often the case you are making wild, unfounded, assumptions about people's knowledge and experience and hence showing yourself incapable of rational discussion, stooping to ad hominem argument as you regularly do.

Anyway, biting my lip and ignoring Peter's condescending and insulting tone (again)...

It seems to me we have been talking at cross purposes here. I have explained how select() works. Peter and jahboater have agreed with that by reiterating the very things I have said. Whilst at the same time maintaining that I don't understand. Well, that's just not logically consistent.

Obviously I have not made my concerns about using select() clear. I'm not sure I can spell it out any more clearly though.

I suggest rather than we debate that further here it would be more useful for you guys hop over to this thread: https://www.raspberrypi.org/forums/view ... 4#p1550213 and help DanielLazar with his problem regarding a serial port blocking whilst he wants to do other things in his program. Perhaps he needs select().
Memory in C++ is a leaky abstraction .

pik33
Posts: 183
Joined: Thu Sep 10, 2015 4:26 pm

Re: Programming languages support

Sat Oct 12, 2019 8:41 am

and the ONLY other camera library I know about is in Python.
I made this for Ultibo: https://github.com/pik33/SimpleCamera

User avatar
PeterO
Posts: 5153
Joined: Sun Jul 22, 2012 4:14 pm

Re: Programming languages support

Sat Oct 12, 2019 10:48 am

Heater wrote:
Sat Oct 12, 2019 8:10 am
I suggest rather than we debate that further here it would be more useful for you guys hop over to this thread: https://www.raspberrypi.org/forums/view ... 4#p1550213 and help DanielLazar with his problem regarding a serial port blocking whilst he wants to do other things in his program. Perhaps he needs select().
Why can't you help him ? You know how select works :roll:
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Heater
Posts: 13923
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming languages support

Sat Oct 12, 2019 11:47 am

My help desk is closed for a while. I have enough problems of my own to solve.

I'm sure I can leave it in your capable hands.
Memory in C++ is a leaky abstraction .

timrowledge
Posts: 1290
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Programming languages support

Sat Oct 12, 2019 6:16 pm

Gavinmc42 wrote:
Sat Oct 12, 2019 5:55 am
Thanks Tim, that's got it, much better on a Pi4 :D .
Need to see if there is an Aarch64 version for Gentoo64.
Nope, not yet, sorta. Writing a new Cog (the dynamic translation cpu specific part) is non-trivial. You *could* build the non-cogged VM on pretty much any machine that has a tolerable c compiler etc. We have over the past done ports to Windows, Mac, *nix, OS/2, RISC OS, IBM mainframe OS, etc, etc, but the Cog is currenlty only available for x86, x64, ARM32 (and I think a MIPS version that isn't much used). It will, duh, not be as fast as a CogVM because it will be interpreting rather than translating. Having said that a Pi4 might be about as fast(ish) with an interpreter VM as the Pi3 is with a CogVM. I don;t have a Pi4 yet to test out that theory.

Gavinmc42 wrote:
Sat Oct 12, 2019 5:55 am
A baremetal version is possible?
Yes, definitely, but it always has costs. What libraries is the baremetal system lacking that support important thing one wants to do? What dev tools does it have? We've collectively done bare or near-bare metal Smalltalks many times over the years and I'm always happy to be paid to do another. There is an elegance to a system where we can simply make a frame buffer and write to it with no X or Mac or Windows insanity in the middle. There's also a not-so-pleasant aspect of maybe having to write your own hardware interrupt handling code; personally I think that is going a bit far; been there, still got the mental scars. In balance I'd tend to stick with something like a linux with no X and grab that frame buffer, unless one found a good frame-buffer+GPU-driver library to work with.

It's also useful for headless purposes; I have a code repository server running on a spare Pi3 that uses simple web requests via the SeaSide web system to provide a quite sophisticated repository (there's a publically accessible instance running at squeaksource.com which of course hosts its own source too). Probably the biggest publicly visible Squeak system is TERF ( https://www.3dicc.com/product-details/) which provides massive online virtual conferencing. And as I demonstrated in the famous giant-fibonacci thread, it's perfectly usable as a scripting/scripted system.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

MisterEd
Posts: 104
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: Programming languages support

Sun Oct 13, 2019 2:56 pm

B.Goode wrote:
Thu Oct 10, 2019 11:47 am
ejolson wrote:
Thu Oct 10, 2019 12:43 am
timrowledge wrote:
Wed Oct 09, 2019 6:04 pm
Smalltalk is considerably faster than python and offers easy access to gpio, web services, client-server, OS access, excellent developer tools, actual, real, portability, a sensible language and generally a lot of good things. There has been a Smalltalk available for ARM since before it was originally announced.
www.squeak.org
The link is broken. Has squeak been discontinued?

Just a trivial slip in composing the forum post. The site is there.
You are right...
You linked the text "www.squeak.org" with the link https://www.raspberrypi.org/forums/www.squeak.org
You meant to link the text "www.squeak.org" with the link https://squeak.org/

Return to “General programming discussion”