Hal Standalone and a Java gui

More
7 years 2 months ago #143410 by dab77
Replied by dab77 on topic Hal Standalone and a Java gui
Thanks Andy, i'm going on in studying python, because i would like to master that, but the most of the time it makes me angry.
in the meanwhile i know i can have something working..
anyway thanks for the suggestion.

davide

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #143424 by rodw
Replied by rodw on topic Hal Standalone and a Java gui

dab77 wrote: Thanks Andy, i'm going on in studying python, because i would like to master that, but the most of the time it makes me angry.
in the meanwhile i know i can have something working..
anyway thanks for the suggestion.

davide


Find the Google tutorial for Python and you will be an expert in 2-3 days.
developers.google.com/edu/python/

The videos are awesome!
The following user(s) said Thank You: dab77

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #143437 by dab77
Replied by dab77 on topic Hal Standalone and a Java gui
Thank you, I missed these tutorials.

going to read them.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #143460 by Reinhard

I would not use Java for ...... well anything ever ...
I do not like the overhead on the recourses.

Those who don't know have an oppinion and they fight for it :(
Oh man ...
Seen that habbit uncounted times ...

I remember one project, where the customer wanted to replace a central system service, which became slow with the time being. Original service was coded in smalltalk ...
We built two replacement prototypes - one coded in C and one in java - and the result was, that the java service had the same client processing times as the C service (within microsecond resolution). Only drawback of the jave program was the initial startup time - but who cares on a system service running 24/7?
We had to code some tweaks to get the garbade collection work as fast as the client connections, but when that was done, the resources consumed stayed stable.
We let the services run several days and nights - with the result, that java was more stable than the C service. Reproducable.
With our prototypes we could beat every lie, like java is too slow, jave needs to many resources, java is not stable ...
At the end, the IT-commissary stated: we're not able to support java and its release cycles ... :(

I very like the idea of java working together with hal services. Java offers the most freedom on UI and has a very clean event system.

But using Runtime.exec is the worst possibility for IPC.
Don't know enuf about NML, but I guess its based on shared memory. To use that, java needs a little help of C - just like Python does too. JNI is the right javatask for that.

But if you're going to code java for linuxcnc - keep in mind, that there is really a lot of UI-stuff already worked out with python. Its pretty big job to code all that from scratch. Don't know, if you want to spend so much time on that item.
.

i'm going on in studying python, ... but the most of the time it makes me angry.

Same happens to me ;)
Every time I look at python sources

Cheers Reinhard
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #143466 by tommylight
@Reinhard
Thank you, you are right, i do not know it although i can mess with it easily and i am fully aware it can do some things that would need many hoops to be jumped when done with anything else. It just uses to much for litle things, like "onmouseover" and similar, and to much of a security risc. But these days everything has become a security risc.
Python does a lot of things easily, but the version changes and the new additions are causing people agravation.
Same goes for all other programing languages/scripting languages, all have good things and not so good things.
Regards,
Tom.

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #143477 by dab77
Replied by dab77 on topic Hal Standalone and a Java gui
I've done some software in java, and i've created my own gui library with all the standard widgets and some special one (once you start..), and i.e. one thing I needed was the ability to change the opacity of the widgets, because I had a video stream as a background and the buttons and texts over. Other than this It was very simple to draw over the video stream in 3D, mixing on the same window 3D and 2D widgets..
It turned out a very useful and modern look software, and it took me little time to program.
Of course there are a lot of guis out there which are ready to be used, and wx and qt are ready with Hal widgets, but I cannot do those exotic things..
I'm sure many things i wrote are not optimized and can be slow, but when I try to replicate some of the things i need in python i get stuck with stupid things..
for example: which is the right library to draw a rectangle and then how to generate an event on mouse click inside that? it should be trivial, but it's hard!

In the meantime, while studying python, I'm digging into the kivy gui library, which seems fast, easy and modern too.
Last edit: 7 years 2 months ago by dab77.

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum