Interest in lightweight, off-line Comm/Control program?

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Interest in lightweight, off-line Comm/Control program?

Post by WillAdams » Thu Apr 02, 2015 1:16 pm

Okay, I managed to find this rather old (on internet time) program:

https://sites.google.com/site/chuckscncarduino/

and added it to the wiki:
G-code sender GUIGcodeWriter_1.0.py Arduino G Code Sender Program. Python, python serial, and tcl/k (tkinter).[8]
It's ``just'' a Python program: https://drive.google.com/file/d/0B1FDV9 ... sp=sharing

Would it be a suitable basis for a program which is:

- lightweight (suited to running on older, slower equipment and Raspberry Pis and the like)
- cross-platform (available for Linux, Windows and Mac OS X)
- easily customizable by the (naïve) user
- would be available / runnable from a single file (or small collection of files) so that it would be available off-line
- could be expanded to include both routing/milling and 3D printing (and other functions such as probing?)

If so, is there interest in working on it collaboratively? If so, where would be a suitable place to host the code?

If not, what would be a better alternative? Processing?
code sender GCtrl Processing Script to stream Gcode. c.f. Gcode_Feeder_GUI.pde, Gremote, rsteppercontroller
I've been very pleased w/ Zapmaker's port of Kosme's GrblController: http://www.shapeoko.com/wiki/index.php/Grbl_Controller but mislike that it uses a cross-platform toolkit which isn't what I'd consider fully native on Mac OS X (not that Python will be either), and would probably want a lighter-weight program for running on a Raspberry Pi.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

lordmundi
Posts: 207
Joined: Wed Jan 01, 2014 4:02 am
Location: Friendswood, TX
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by lordmundi » Thu Apr 02, 2015 1:25 pm

I personally think running in the browser is the way to go. BUT, I think the fundamental design decision would be to make something where the entirety of the server code is in a git repo that someone can "git clone" and then run themselves if they want to run offline. That's a bit more work, but I think the number of folks who must have offline access are probably way less than folks who are fine with going to a live website. So, that is what I would do - make an online program that people can use but have the option to download and run offline. This is exactly the Wordpress model. So people that want to run offline is no problem - they just double click an html file in a folder.

Furthermore, that allows you to let people make their own widgets and share them and that code base could automatically let you browse available widgets and update to the latest ones if you want. That's really where quite a bit of power and expandability comes from.

That may not be what you want to hear as it doesn't fit in with the options you mentioned, but I think John is right in many of the design decisions he made. I just think a couple of them exclude a non-insignificant portion of the user base.

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by WillAdams » Thu Apr 02, 2015 1:30 pm

I'm not saying that John is wrong --- I'm saying that the reasoning for his decisions doesn't apply to me and his nifty program isn't one I would choose to use. Moreover, I'm really tired of seeing everything surrounded by browser chrome and running in a Javascript penalty box.

If open source isn't about user choice and freedom what is it about?

People would be able to make and share new widgets in a Python (or other) version as well, so that's not applicable.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by Will Winder » Fri Apr 03, 2015 1:34 pm

If the diverse gcode sender tool environment has shown anything, it's that the people interested in being major contributors to a tool like this are more likely to roll their own than contribute to an existing project. This is great for many reasons of course, just look at the wide variety of choices you have available. It also means that most sender applications are primarily developed by a single person with little or no outside support, so trade offs have to be made between features and stability. I've always focused on stability with UGS, but have been working on it long enough to have grown a decent set of features. I take most pull requests, you can see yourself how many contributors there have been in the past 3 years. The best part of the UGS community involvement have been all the bug reports people have made, which is why UGS is one of the most stable options available.

If you're planning to be a major contributor to the development of this 'lightweight, off-line comm/control program', then go for it - that is the freedom of choice open source gives you. If you aren't going to be the major contributor then I suggest you look for active projects and request the features that you find lacking. In this case it sounds like the missing feature is your philosophy... and most developers already have their own philosophy.

All that said I'd love to see more collaboration between developers.
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by WillAdams » Fri Apr 03, 2015 1:51 pm

That's a succinct description of the situation (and problem if one views it that way). It's been interesting finding and listing all the programs. I'm still not convinced I've found them all --- if anyone knows of any which aren't listed, I'd be grateful for a clue.

I wish Java worked for me --- I have to use a couple of Java front-ends at work and they just feel wrong to me, and it's not something that I want to deal w/ in my off time. I just don't like Java --- that probably says more about me than it does the people who choose to use it (esp. when they generously share their work).

Kosme/Zapmaker's GrblController has been fine for me, I just mislike that it's a giant binary blob in a not-quite native toolkit --- this probably says more about the nature of the toolkit than the code.

I've always wondered if there was some sort of tool for comparing large programs and their code in some way which would allow easy analysis and commentary --- it'd be kind of interesting to see all the code for all the comm / control programs arranged in some sort of matrix --- this would be a really cool feature for github.

The problem is, what I want is less. Less bloat, less eye candy, less code. I want a bare minimum, described by a concise bit of text which runs well on a tiny machine and can be easily adjusted (or automatically adjusts) to a given screen size w/ nice spacing and buttons which adjust in size to the screen display and which are easy to hit, esp. on a tablet. Once I've gotten everything else nailed down, I'll see if I can wrap my mind around the code for GUIGcodeWriter_1.0.py and test it out and see if there's a point to improving it (or maybe I'll just use it more-or-less as-is, or run GrblController --- I wish Carbide Motion was going to be available for Linux).

Anyway, nothing I wrote was intended to detract from the wide variety of programs which we have through the generosity of a lot of developers such as yourself, and we're all grateful for the availability and array of choices.

Above all, please don't see this as a complaint of the selections you and others have made in the way of programming languages, environments or toolkits. I understand that each developer has made the right choice for themselves. It's just that I'm not agreeing w/ a lot of choices the computer industry has made --- anyone have a spare Oberon workstation?

Lastly, thanks for the encouragement. If I can't make something else from the list of comm / control programs work I'll give it a go.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by cvoinescu » Fri Apr 03, 2015 2:27 pm

Will Winder, you pointed out a thorny problem. Each programmer has preferences, often strong ones, about languages, libraries, toolkits, operating systems and other such choices. We are also always optimistic about our own capabilities, and often have a low opinion of others' code (often based on not bothering to invest the effort to understand it), which makes even more likely that, for a small application, we'd write our own rather than contribute to an existing one.

Of all the languages and platforms, Java is one of the most divisive, with firm convictions for or against it being the norm. Browser-based JavaScript is emerging as another divisive choice.

Unfortunately, I don't have a good solution. :)

WillAdams, you're the victim of an otherwise reasonable trend in programming. We want to get our stuff out there quickly and with a minimum of effort, ideally on many platforms without additional work. So we use large, complex frameworks that would be too slow and memory hungry but for the constant improvements of hardware. Sure, a G-code sender could be written in C using the Windows API directly, but it would be a lot of work. It would be small and fast enough to be usable on pretty much any computer. Instead, we use a toolkit or a framework, and a slower language such as Python, and get the UI built with a twentieth of the effort. Sure, it'll be ten time slower and use ten times the memory, but that won't be a problem for any computer made in the last five years or so. The knowledge about the lower-level programming, which was not by any means widespread years ago, is becoming a rare, specialized art.

So the choice for an application such as a G-code sender is often between something that works perfectly well on a new PC but is no longer usable on ten year old hardware -- or nothing at all.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by WillAdams » Fri Apr 03, 2015 2:44 pm

The last time I tried it, GrblController worked fine on my ancient old 933MHz Pentium M (actually a bit scared to look up how old it is). It's C --- I just mislike that on Mac OS X the QT toolkit never quite fits in perfectly, most egregiously not supporting Services. It'd be nice if there were a native version written in Objective-C, but that's a really small market (though one should be able to get versions for Windows and Linux using GNUstep).

And the program I'm considering using is in Python: GUIGcodeWriter_1.0.py and seemed snappy enough when I tried it on my new Windows 8 machine (hoping the performance will be reasonable on a Raspberry Pi)

Yeah, I miss highly-optimized/assembly language programs. Some favourites:

- WriteNow --- a word processor for the classic Mac OS and NeXTstep written in ~100,000 lines of M68K assembler
- Altsys Virtuoso --- drawing program which was the basis for Freehand. Objective-C (w/ some hand-coded assembly where necessary?) which nicely leveraged NeXT's providing Display PostScript, PANTONE colour libraries at the system level, Services, &c.
- Wizmo from Gibson Research Consulting (via whose announcement e-mails I first learned of a new 'net search engine w/ the unlikely name of Google)

I knew things were going badly when I installed the Mac OS X Public Beta on my 400MHz G3 at work and it ran at about the same speed as my 25MHz NeXT Cube at home. I still don't get what my iMac here at work is doing w/ all these clock cycles and memory when it bogs down.

Wonder how things would've been different if the FTC hadn't beaten up Japan over their using the TRON OS on early PCs running the 80186 chips.

Oh well, at least we'll always have the option of things such as TeX.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by cvoinescu » Fri Apr 03, 2015 3:00 pm

You and I are dinosaurs.

But Python is not a bad choice -- certainly less polarizing than Java and broswer-based stuff -- and with a low enough barrier for entry that people may, in fact, begin to contribute stuff. It's all up to the maintainer(s) to encourage contribution, which is hard.

As for TK, I don't think that's popular enough to attract many contributions. You probably need a higher level framework that's simpler to program in for non-dinosaurs.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

jlauer
Posts: 115
Joined: Thu Jun 26, 2014 9:29 pm

Re: Interest in lightweight, off-line Comm/Control program?

Post by jlauer » Fri Apr 03, 2015 3:44 pm

I've got some suggestions for anyone who wants to build a lightweight program:

1. Extend/modify Serial Port JSON Server

All the hard work of managing the buffer flow into Grbl and TinyG has been painstakingly done. This is not an easy task and any Gcode sender has to deal with the flow control. Go grab the Github project and add code that lets a user send in a file from the command line. Or take it further up the line and make a GUI. It's going to be hard to make a GUI be cross-platform though, so you'll probably end up with an OS-specific GUI. Won't work on a tablet. https://github.com/johnlauer/serial-port-json-server

2. Build a quickie websocket client front-end to Serial Port JSON Server

If you think about, Frank G already did this and launched it about 4 weeks ago. It's his ShuttleCP app. Check it out at https://github.com/lordmundi/shuttleCP because he embedded a websocket library into his C code and it nicely connects to SPJS and sends commands to it. Somebody could take this and just make a command line version of it or go further upstream and make a GUI. Making a GUI is hard and it will probably end up being OS-specific. Maybe you could get it to work on a tablet, but that seems hard.

3. Make a new workspace

If you think the current default workspaces in ChiliPeppr are too heavy like the Grbl or TinyG ones, you can fork it and remove everything except 3 widgets. You'd need the SPJS widget, the controller widget (Grbl or TinyG) and the Gcode widget for sending. All other ones are optional and can be dropped, especially the 3D Viewer. You'll end up with cross-platform automatically. This will work great on a tablet.

WillAdams
Posts: 8533
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Interest in lightweight, off-line Comm/Control program?

Post by WillAdams » Fri Apr 03, 2015 3:47 pm

Thanks! I'll have to see if I can wrap my mind around what you wrote.

In the meanwhile, there's certainly no lack of graphical frameworks for Python: https://wiki.python.org/moin/GuiProgramming
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Post Reply