[erlang-questions] GUI development with Erlang

519 views
Skip to first unread message

Alan Gingras

unread,
Dec 4, 2017, 12:50:51 AM12/4/17
to erlang-q...@erlang.org

Has anyone tried using Windows Forms (.net) with Erlang?  This would be in a similar fashion to way Python can use Windows Forms.  On Linux I believe this would be Mono (http://www.mono-project.com/docs/gui/winforms/).  Basically I think I’m looking for something similar to Python’s “import” and C#’s “using” features.  If no one has anything, any hints on how a feature like this might be implemented.

 

Basically, I have been working on implementing genetic programming in Erlang and would like to provide a GUI front end.  The WxWidgets front end that comes with Erlang is difficult at best.  I’ve used several different GUI kits on *nix and Windows platforms but WxWidgets seems the most difficult for me.  So I’m trying to see what else is available.  I followed Joe Armstrong’s quest earlier this year and didn’t see where he came up with anything.

 

Thanks.

Alan

Wilmar Pérez

unread,
Dec 4, 2017, 6:22:18 AM12/4/17
to Alan Gingras, erlang-questions
Hi Alan,

Unless you have a very pressing need to create a fat GUI client that you can install per machine I'd encourage you to better focus on a Web interface for your application. There are several frameworks you can use. This would allow you to offer a friendly interface which you can run on one or more servers to which all users would connect simply using a browser.

Best regards,

Wilmar

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


Alex S.

unread,
Dec 5, 2017, 3:07:50 AM12/5/17
to Alan Gingras, Erlang
For what it's worth, you can always implement your view and controller in something like C#/F#, and your model in Erlang, and hook them up via TCP. Alternatively, there was an Erlang-toF# compiler floating around I believe.

Sergej Jurečko

unread,
Dec 5, 2017, 3:13:51 AM12/5/17
to Erlang
What we did when we wanted to ship a GUI app with Erlang was running erl in the background and communicate over stdin/stdout. 

Regards,
Sergej

Zachary Kessin

unread,
Dec 6, 2017, 3:04:43 AM12/6/17
to Sergej Jurečko, Erlang
I had thought it would be an interesting idea to build a GUI toolset around Erlang such that each widget on screen was a process. That being said I think to develop such a toolkit would probably cost on the order of $1,000,000 (Total guess on the number).

If I had to develop a desktop app with Erlang I would probably use something like Electra to do a virtual browser with an Elm Frontend.

Zach
--
Zach Kessin
Reduce project risk with training in Elm For web teams
Skype: zachkessin

Richard Carlsson

unread,
Dec 6, 2017, 4:26:20 AM12/6/17
to Zachary Kessin, Erlang
Joe did that back in 2004 - See https://dl.acm.org/citation.cfm?id=1022472


        /Richard

Alan Gingras

unread,
Dec 6, 2017, 7:09:49 AM12/6/17
to Sergej Jurečko, Zachary Kessin, Erlang

Thanks for the suggestion.  I've been trying to keep the work totally in Erlang.  Partly because I am trying to become better with Erlang itself and partly out of stubbornness.  I had looked at using a browser based GUI but for what I'm doing I really don't want (or need) to be too complicated.  One of the other responses suggested using C# to create the front end and communicate with Erlang via TCP.  I had thought of that as well, but decided to pursue using pure Erlang but have become stymied by wxErlang and its difficulty.  Most likely I will end up pursing the C# (or similar) front end.


Alan

Iván Carmenates

unread,
Dec 6, 2017, 10:45:42 AM12/6/17
to Alan Gingras, erlang-questions
Regards, a while a go I did a little framework to easily communicate Erlang with C#, here is the documentation if you get interested we can update it to match the current times.

ExtendedVisualOtp (English Version).pdf

Alan Gingras

unread,
Dec 6, 2017, 3:09:01 PM12/6/17
to Alex S., Erlang

Thanks Alex.  I had thought of that but was trying to make this a pure Erlang application.  This is most likely the approach I will end up taking unless I decide to pursue wxErlang, but that is probably a little unlikely.

Alan Gingras

unread,
Dec 6, 2017, 3:11:44 PM12/6/17
to Sergej Jurečko, Erlang

Thanks Alex.  I had thought of that but was trying to make this a pure Erlang application.  I had even thought of using an Erlang  Port but again, this would lead me outside of a strictly Erlang solution.

 

From: erlang-quest...@erlang.org [mailto:erlang-quest...@erlang.org] On Behalf Of Sergej Jurecko
Sent: Tuesday, December 05, 2017 03:14
To: Erlang <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang

 

What we did when we wanted to ship a GUI app with Erlang was running erl in the background and communicate over stdin/stdout. 

ll...@writersglen.com

unread,
Dec 6, 2017, 4:08:58 PM12/6/17
to Alan Gingras, Erlang
Hi Alan,

Perhaps a browser front-end would suit your purposes. And, if so, you might look into Nitrogen. It provides a rich set of GUI elements with the additional benefit of making your genetic models accessible through the web.

All the best,

LRP

-----Original Message-----
From: "Alan Gingras" <alang...@comcast.net>
Sent: Wednesday, December 6, 2017 3:08pm
To: "'Alex S.'" <alex0...@gmail.com>
Cc: "'Erlang'" <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Thanks Alex. I had thought of that but was trying to make this a pure Erlang application. This is most likely the approach I will end up taking unless I decide to pursue wxErlang, but that is probably a little unlikely.

From: Alex S. [mailto:alex0...@gmail.com]
Sent: Tuesday, December 05, 2017 03:08
To: Alan Gingras <alang...@comcast.net>
Cc: Erlang <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang

For what it's worth, you can always implement your view and controller in something like C#/F#, and your model in Erlang, and hook them up via TCP. Alternatively, there was an Erlang-toF# compiler floating around I believe.

2017-12-03 22:43 GMT+03:00 Alan Gingras <alang...@comcast.net <mailto:alang...@comcast.net> >:

Has anyone tried using Windows Forms (.net) with Erlang? This would be in a similar fashion to way Python can use Windows Forms. On Linux I believe this would be Mono (http://www.mono-project.com/docs/gui/winforms/). Basically I think I’m looking for something similar to Python’s “import” and C#’s “using” features. If no one has anything, any hints on how a feature like this might be implemented.

Basically, I have been working on implementing genetic programming in Erlang and would like to provide a GUI front end. The WxWidgets front end that comes with Erlang is difficult at best. I’ve used several different GUI kits on *nix and Windows platforms but WxWidgets seems the most difficult for me. So I’m trying to see what else is available. I followed Joe Armstrong’s quest earlier this year and didn’t see where he came up with anything.

Thanks.

Alan


_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org <mailto:erlang-q...@erlang.org>
http://erlang.org/mailman/listinfo/erlang-questions

Richard A. O'Keefe

unread,
Dec 6, 2017, 8:46:10 PM12/6/17
to erlang-q...@erlang.org


On 6/12/17 9:04 PM, Zachary Kessin wrote:
> I had thought it would be an interesting idea to build a GUI toolset
> around Erlang such that each widget on screen was a process. That being
> said I think to develop such a toolkit would probably cost on the order
> of $1,000,000 (Total guess on the number).

I once saw this done in Flat Concurrent Prolog. It worked very well,
and was done by one person in about a year. I was quite impressed by
it, and ever since have been struggling to try to remember the name
of the author.

This was more than 20 years ago, so I have *some* excuse for not
remembering. Mind you, this was in the era when people thought a
4MB computer was *plenty* to run OS, GUI, Emacs, and compiler all
at once..., so we aren't talking about a *lot* of code. Which I
guess is the point. Start with just enough GUI for the task at hand
and grow it.
>
> If I had to develop a desktop app with Erlang I would probably use
> something like Electra to do a virtual browser with an Elm Frontend.

Links?

Joe Armstrong

unread,
Dec 7, 2017, 7:50:39 AM12/7/17
to Alan Gingras, Erlang
If you want something that just works and is reasonably simple to implement
Browser based GUI's are pretty good.

The combination of web sockets + SVG/Canavas/DOM manipulation in JS
is pretty easy to setup and loads of people understand JS/Browser things.

Stand-alone outside the browser is tricky.

TCL/Tk is really easy to get going and interface (yes it's old but works well)

Java Swing is what it is - and if you're good at Java might be an alternative
but you'd have to interface it to Erlang.

QT is brilliant but you'd need to write the GUI in C++ and interface it to Erlang

WxWidgets is actually pretty good but has a steep learning curve (a cliff) -
I did actually manage to build some interfaces with it and concluded that
it was pretty good but that it needed a *lot* of examples and getting started
tutorials.

Cheers

/Joe

ar...@riseup.net

unread,
Dec 7, 2017, 8:04:21 AM12/7/17
to erlang-q...@erlang.org
Hi,
I have been using wxErlang on some projects and I don't find it too
hard. I make the GUI in separate processes and communicate with the
application using regular erlang message passing.
Using the wx_object, it is practically a breeze. It is like programming
a gen_server. I even run the GUI processes supervised, to allow me to
"let it crash".
Also, you can use wxFormBuilder to do the layout and use the generated
PHP or LUA code to figure out what you need to do in wxErlang. I suppose
you could even write a parser to generate your erlang code from those.
So I am curious. What is that you find so hard about it? And what makes
it easier with C# or the like?
Thanks
Arif


Date: Wed, 6 Dec 2017 15:08:39 -0500
From: "Alan Gingras" <alang...@comcast.net>
To: "'Alex S.'" <alex0...@gmail.com>
Cc: 'Erlang' <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang
Message-ID: <002901d36ece$026702a0$073507e0$@comcast.net>
Content-Type: text/plain; charset="utf-8"

Thanks Alex. I had thought of that but was trying to make this a pure
Erlang application. This is most likely the approach I will end up
taking unless I decide to pursue wxErlang, but that is probably a little
unlikely.


From: Alex S. [mailto:alex0...@gmail.com]
Sent: Tuesday, December 05, 2017 03:08
To: Alan Gingras <alang...@comcast.net>
Cc: Erlang <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang

For what it's worth, you can always implement your view and controller
in something like C#/F#, and your model in Erlang, and hook them up via
TCP. Alternatively, there was an Erlang-toF# compiler floating around I
believe.


2017-12-03 22:43 GMT+03:00 Alan Gingras <alang...@comcast.net
<mailto:alang...@comcast.net> >:

Has anyone tried using Windows Forms (.net) with Erlang? This would be
in a similar fashion to way Python can use Windows Forms. On Linux I
believe this would be Mono
(http://www.mono-project.com/docs/gui/winforms/). Basically I think I?m
looking for something similar to Python?s ?import? and C#?s ?using?
features. If no one has anything, any hints on how a feature like this
might be implemented.

Basically, I have been working on implementing genetic programming in
Erlang and would like to provide a GUI front end. The WxWidgets front
end that comes with Erlang is difficult at best. I?ve used several
different GUI kits on *nix and Windows platforms but WxWidgets seems the
most difficult for me. So I?m trying to see what else is available. I
followed Joe Armstrong?s quest earlier this year and didn?t see where he

Vance Shipley

unread,
Dec 7, 2017, 8:19:25 AM12/7/17
to ar...@riseup.net, Questions erlang-questions
I'm very pleased with the approach we took in github.com/sigscale/ocs where we implemented simple web components using Polymer <iron-ajax> over our standard REST APIs. It's a really low impedance match if you have an "API first" design.


Zachary Kessin

unread,
Dec 7, 2017, 9:33:09 AM12/7/17
to Joe Armstrong, Erlang
I was thinking of something like Electron https://electronjs.org/ with an Erlang backend. 

Mind I have no idea how to actually build that

Zach

Joe Armstrong

unread,
Dec 7, 2017, 10:10:46 AM12/7/17
to Zachary Kessin, Erlang
How big are the applications built with Electron?

/Joe


Thomas Elsgaard

unread,
Dec 7, 2017, 12:47:06 PM12/7/17
to Joe Armstrong, Erlang
Hello World is 115 MB ;-)

Grzegorz Junka

unread,
Dec 7, 2017, 3:11:08 PM12/7/17
to erlang-q...@erlang.org

Electron is mainly an executable, which is a customized Chrome browser. The UI itself is only as heavy as a typical HTML/JavaScript page. See here for an overview:

https://electronjs.org/docs/tutorial/quick-start

It's very similar to Erlang. In Erlang you have the VM and OTP. Your application is lightweight but when you create a distribution you have to package the VM, libraries and your application into it. It's the same with Electron.

The Electron executable is loading and executing your application, which is a web-based JavaScript application. That application could connect to your running Erlang VM like any other web-based application running locally in a browser.

GrzegorzJ

Joe Armstrong

unread,
Dec 7, 2017, 3:51:26 PM12/7/17
to Thomas Elsgaard, Erlang
Hello world (or rather a little window with a couple of buttons)
in Qt is 33KB - only 3484 times smaller.

Which probably explain why Qt is more popular for building apps than 
Electron.

Being an old timer I recall a time when the entire OS including the 
windowing system and a large number of applications all fitted in
under 640KB :-)

Where did we go wrong ?




Loïc Hoguin

unread,
Dec 7, 2017, 3:53:30 PM12/7/17
to Joe Armstrong, Erlang
We gave people more memory.

On 12/07/2017 09:51 PM, Joe Armstrong wrote:
> Hello world (or rather a little window with a couple of buttons)
> in Qt is 33KB - only 3484 times smaller.
>
> Which probably explain why Qt is more popular for building apps than
> Electron.
>
> Being an old timer I recall a time when the entire OS including the
> windowing system and a large number of applications all fitted in
> under 640KB :-)
>
> Where did we go wrong ?
>
>
>
>
>
> On Thu, Dec 7, 2017 at 6:46 PM, Thomas Elsgaard
> <thomas....@gmail.com <mailto:thomas....@gmail.com>> wrote:
>
> Hello World is 115 MB ;-)
>
> tor. 7. dec. 2017 kl. 16.10 skrev Joe Armstrong <erl...@gmail.com

> <mailto:erl...@gmail.com>>:


>
> How big are the applications built with Electron?
>
> /Joe
>
>
>
> On Thu, Dec 7, 2017 at 3:32 PM, Zachary Kessin
> <zke...@gmail.com <mailto:zke...@gmail.com>> wrote:
>
> I was thinking of something like Electron

> https://electronjs.org/ <https://electronjs.org/> with an


> Erlang backend.
>
> Mind I have no idea how to actually build that
>
> Zach

> <mailto:alang...@comcast.net>> wrote:
>
> __


>
> Thanks for the suggestion.  I've been trying to keep
> the work totally in Erlang.  Partly because I am
> trying to become better with Erlang itself and
> partly out of stubbornness.  I had looked at using a
> browser based GUI but for what I'm doing I really
> don't want (or need) to be too complicated.  One of
> the other responses suggested using C# to create the
> front end and communicate with Erlang via TCP.  I
> had thought of that as well, but decided to pursue
> using pure Erlang but have become stymied by
> wxErlang and its difficulty.  Most likely I will end
> up pursing the C# (or similar) front end.
>
>
> Alan
>
>> On December 6, 2017 at 3:04 AM Zachary Kessin

>> <zke...@gmail.com <mailto:zke...@gmail.com>> wrote:
>>
>> I had thought it would be an interesting idea to
>> build a GUI toolset around Erlang such that each
>> widget on screen was a process. That being said I
>> think to develop such a toolkit would probably
>> cost on the order of $1,000,000 (Total guess on
>> the number).
>>
>> If I had to develop a desktop app with Erlang I
>> would probably use something like Electra to do a
>> virtual browser with an Elm Frontend.
>>
>> Zach

>> ᐧ
>>
>> On Tue, Dec 5, 2017 at 10:13 AM, Sergej Jurečko
>> <sergej....@gmail.com

>> <mailto:sergej....@gmail.com>> wrote:
>>
>> What we did when we wanted to ship a GUI app
>> with Erlang was running erl in the background
>> and communicate over stdin/stdout.
>>
>> Regards,
>> Sergej
>>
>>
>>> On 5 Dec 2017, at 09:07, Alex S.
>>> <alex0...@gmail.com

>>> <mailto:alex0...@gmail.com>> wrote:
>>>
>>> For what it's worth, you can always implement
>>> your view and controller in something like
>>> C#/F#, and your model in Erlang, and hook
>>> them up via TCP. Alternatively, there was an
>>> Erlang-toF# compiler floating around I believe.
>>>
>>> 2017-12-03 22:43 GMT+03:00 Alan Gingras
>>> <alang...@comcast.net

>>> <mailto:alang...@comcast.net>>:


>>>
>>> Has anyone tried using Windows Forms
>>> (.net) with Erlang?  This would be in a
>>> similar fashion to way Python can use
>>> Windows Forms.  On Linux I believe this
>>> would be Mono
>>> (http://www.mono-project.com/docs/gui/winforms/

>>> <http://www.mono-project.com/docs/gui/winforms/>).

>>> Basically I think I’m looking for
>>> something similar to Python’s “import”
>>> and C#’s “using” features.  If no one has
>>> anything, any hints on how a feature like

>>> this might be implemented.____
>>>
>>> __ __


>>>
>>> Basically, I have been working on
>>> implementing genetic programming in
>>> Erlang and would like to provide a GUI
>>> front end.  The WxWidgets front end that
>>> comes with Erlang is difficult at best.
>>> I’ve used several different GUI kits on
>>> *nix and Windows platforms but WxWidgets
>>> seems the most difficult for me.  So I’m
>>> trying to see what else is available.  I
>>> followed Joe Armstrong’s quest earlier
>>> this year and didn’t see where he came up

>>> with anything.____
>>>
>>> __ __
>>>
>>> Thanks.____
>>>
>>> Alan____


>>>
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-q...@erlang.org

>>> <mailto:erlang-q...@erlang.org>
>>> http://erlang.org/mailman/listinfo/erlang-questions


>>> <http://erlang.org/mailman/listinfo/erlang-questions>
>>>
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-q...@erlang.org

>>> <mailto:erlang-q...@erlang.org>
>>> http://erlang.org/mailman/listinfo/erlang-questions


>>> <http://erlang.org/mailman/listinfo/erlang-questions>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-q...@erlang.org

>> <mailto:erlang-q...@erlang.org>
>> http://erlang.org/mailman/listinfo/erlang-questions


>> <http://erlang.org/mailman/listinfo/erlang-questions>
>>
>>
>>
>>
>> --
>> Zach Kessin
>> Reduce project risk with training in Elm For web teams
>> Skype: zachkessin

>> +972 54 234 3956 <tel:+972%2054-234-3956> / +44
>> 203 734 9790 <tel:+44%2020%203734%209790> / +1 617
>> 778 7213 <tel:(617)%20778-7213>


>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-q...@erlang.org

>> <mailto:erlang-q...@erlang.org>
>> http://erlang.org/mailman/listinfo/erlang-questions <http://erlang.org/mailman/listinfo/erlang-questions>


>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org

> <mailto:erlang-q...@erlang.org>
> http://erlang.org/mailman/listinfo/erlang-questions


> <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
>
>
> --
> Zach Kessin
> Reduce project risk with training in Elm For web teams
> Skype: zachkessin

> +972 54 234 3956 <tel:+972%2054-234-3956> / +44 203 734 9790
> <tel:+44%2020%203734%209790> / +1 617 778 7213
> <tel:(617)%20778-7213>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org <mailto:erlang-q...@erlang.org>
> http://erlang.org/mailman/listinfo/erlang-questions


> <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>

--
Loïc Hoguin
https://ninenines.eu

Eric des Courtis

unread,
Dec 8, 2017, 12:42:22 AM12/8/17
to Joe Armstrong, Erlang
My guess is that it might have something to do with time being linear and Moore's law not.

Don't worry however Rock's law will force us to revisit this soon.

Attila Rajmund Nohl

unread,
Dec 8, 2017, 2:50:14 AM12/8/17
to Erlang
2017-12-07 21:51 GMT+01:00 Joe Armstrong <erl...@gmail.com>:
>
> Hello world (or rather a little window with a couple of buttons)
> in Qt is 33KB - only 3484 times smaller.
>
> Which probably explain why Qt is more popular for building apps than
> Electron.
>
> Being an old timer I recall a time when the entire OS including the
> windowing system and a large number of applications all fitted in
> under 640KB :-)
>
> Where did we go wrong ?

I believe back in those days we were using displays with 320x200
pixels, 8 bits color depth. Nowadays we're using 1680x1050 with 32
bits color depth. Instead of 64 KB now it's takes more than 7 MB for a
single display frame.

zxq9

unread,
Dec 8, 2017, 4:49:16 AM12/8/17
to erlang-q...@erlang.org
On 2017年12月07日 木曜日 21:53:20 Loïc Hoguin wrote:
> On 12/07/2017 09:51 PM, Joe Armstrong wrote:
> > Where did we go wrong ?
>
> We gave people more memory.

Not just more memory.

Here, let me pay you for that memory chip in bitcoin... brb...

-Craig

zxq9

unread,
Dec 8, 2017, 4:53:42 AM12/8/17
to erlang-q...@erlang.org
On 2017年12月08日 金曜日 08:50:02 Attila Rajmund Nohl wrote:
> 2017-12-07 21:51 GMT+01:00 Joe Armstrong <erl...@gmail.com>:
> >
> > Hello world (or rather a little window with a couple of buttons)
> > in Qt is 33KB - only 3484 times smaller.
> >
> > Which probably explain why Qt is more popular for building apps than
> > Electron.
> >
> > Being an old timer I recall a time when the entire OS including the
> > windowing system and a large number of applications all fitted in
> > under 640KB :-)
> >
> > Where did we go wrong ?
>
> I believe back in those days we were using displays with 320x200
> pixels, 8 bits color depth. Nowadays we're using 1680x1050 with 32
> bits color depth. Instead of 64 KB now it's takes more than 7 MB for a
> single display frame.

In the graphics controller's state, not your program.

Anthony Ramine

unread,
Dec 8, 2017, 8:10:32 AM12/8/17
to Joe Armstrong, Erlang
I'll wait for a 640KB OS that is accessible and can be used by disabled people before saying we went wrong somewhere.

> Le 7 déc. 2017 à 21:51, Joe Armstrong <erl...@gmail.com> a écrit :
>
> Where did we go wrong ?

_______________________________________________

Attila Rajmund Nohl

unread,
Dec 8, 2017, 9:30:55 AM12/8/17
to erlang-q...@erlang.org
2017-12-08 10:53 GMT+01:00 zxq9 <zx...@zxq9.com>:
>
> On 2017年12月08日 金曜日 08:50:02 Attila Rajmund Nohl wrote:
> > 2017-12-07 21:51 GMT+01:00 Joe Armstrong <erl...@gmail.com>:
[...]

> > > Being an old timer I recall a time when the entire OS including the
> > > windowing system and a large number of applications all fitted in
> > > under 640KB :-)
> > >
> > > Where did we go wrong ?
> >
> > I believe back in those days we were using displays with 320x200
> > pixels, 8 bits color depth. Nowadays we're using 1680x1050 with 32
> > bits color depth. Instead of 64 KB now it's takes more than 7 MB for a
> > single display frame.
>
> In the graphics controller's state, not your program.

But that still needs to be created in the program.

Lloyd R. Prentice

unread,
Dec 8, 2017, 10:50:59 AM12/8/17
to Attila Rajmund Nohl, erlang-q...@erlang.org
Way back in the day my company developed Apple II educational and consumer software products delivered on Apple II single-sided floppy discs. These included interactive games, delightful full-screen graphics and animation, and music. 



Folks swore that you couldn't do music on the Apple II, but we did.

The secrets: Forth '79, which provided an incredibly small footprint and its own operating system.

All the best,

LRP

Sent from my iPad

scott ribe

unread,
Dec 8, 2017, 3:32:08 PM12/8/17
to Lloyd R. Prentice, erlang-q...@erlang.org
Hey, if we're playing that game, I once contracted to develop grammar reference which had to fit on a floppy disk along with the OS & MS Word. The effort/code size ratio was obscene.

> On Dec 8, 2017, at 8:50 AM, Lloyd R. Prentice <ll...@writersglen.com> wrote:
>
> Way back in the day my company developed Apple II educational and consumer software products delivered on Apple II single-sided floppy discs. These included interactive games, delightful full-screen graphics and animation, and music.
>

--
Scott Ribe
https://www.linkedin.com/in/scottribe/
(303) 722-0567

Alan Gingras

unread,
Dec 9, 2017, 7:27:19 AM12/9/17
to Joe Armstrong, Erlang

Thanks Joe.  I appreciate yours (and others) suggestions.  I have actually worked through some wxErlang and agree that WxWidgets can produce a decent user interface but as you said there is a cliff there.  I am trying to avoid getting bogged down in learning wxWidgets.  My preference is a stand-alone application but it looks like that is not really going to be possible.  My genetic programming code is in Erlang and I must say it was a joy to implement it there.  Out of curiosity and for comparison of languages I implemented it in both C++ and Erlang at the same time.  The Erlang was less effort to get right and ended up being a fraction of the code.  The C++ version still has issues (memory issues mostly) and crashes more often than not.  I had originally implemented it in C++ but after getting exposed to Erlang was convinced it would work better.  As I said I implemented it in Erlang and re-implemented it in C++.  Sure the C++ is faster but doesn’t work 100% yet.  Erlang works wonderfully.  A point to note here is that I have been working in C/C++ for both desktop and embedded development for 20+ years and was actually shocked that as a novice in Erlang I was able to implement it better there than in C++ where I am much more experienced.

 

Sorry for the digression.  Most likely I will end up using C# to implement my GUI and connect to the Erlang using a port or TCP.

 

Again, my thanks to you and others for your advice.

 

Alan

 

From: Joe Armstrong [mailto:erl...@gmail.com]
Sent: Thursday, December 07, 2017 07:50
To: Alan Gingras <alang...@comcast.net>
Cc: Sergej Jurečko <sergej....@gmail.com>; Zachary Kessin <zke...@gmail.com>; Erlang <erlang-q...@erlang.org>
Subject: Re: [erlang-questions] GUI development with Erlang

 

If you want something that just works and is reasonably simple to implement

Alan Gingras

unread,
Dec 9, 2017, 7:40:03 AM12/9/17
to ar...@riseup.net, erlang-q...@erlang.org
Arif,

Perhaps my difficulty lies in the documentation for wxErlang and WxWidgets
combined with my experience with Windows.Forms, TCL/Tk and others. I have
been able to find excellent documentation and examples easily for pretty
much everything I have wanted or needed to do. Not diminishing WxWidgets,
but getting the layouts correct and working as desired has been faster and
easier for me in every other GUI package I've used. The others (for the
most part) seemed more intuitive to me than the windows/panels etc. of
wxWidgets. And I have worked through what little I can find on the
wxErlang, i.e.
http://www.idiom.com/~turner/wxtut/wxwidgets.html
http://wxerlang.dougedmunds.com/

In the end, I think better documentation - not written for someone who
already knows how to use either WxWidgets or wxErlang - would be a key
improvement.

Regards,
Alan

Loïc Hoguin

unread,
Dec 9, 2017, 8:32:06 AM12/9/17
to Alan Gingras, ar...@riseup.net, erlang-q...@erlang.org
I used to have the book https://www.wxwidgets.org/docs/book/

It's a really good resource to learn wxWidgets. I don't know how well it
aged exactly but it should still be very relevant as the interface has
not changed that much.

--
Loïc Hoguin
https://ninenines.eu

ar...@riseup.net

unread,
Dec 21, 2017, 3:06:48 PM12/21/17
to Alan Gingras, erlang-q...@erlang.org
Thanks Alan for your explanation. It makes sense. I sort of forgot about
the initial difficulties. So I have put together a small description for
you in case you still want to give it a try.
https://arifishaq.files.wordpress.com/2017/12/wxerlang-getting-started.pdf
Good luck!
Arif

Leo Liu

unread,
Dec 21, 2017, 9:18:58 PM12/21/17
to erlang-q...@erlang.org
On 2017-12-21 12:06 -0800, ar...@riseup.net wrote:
> Thanks Alan for your explanation. It makes sense. I sort of forgot about
> the initial difficulties. So I have put together a small description for
> you in case you still want to give it a try.
> https://arifishaq.files.wordpress.com/2017/12/wxerlang-getting-started.pdf
> Good luck!
> Arif

👍👍👍👍👍

This is amazing. It will be even more amazing to be part of the wx
documentation in OTP. Thank you.

Leo

Alan Gingras

unread,
Dec 22, 2017, 10:12:41 AM12/22/17
to ar...@riseup.net, erlang-q...@erlang.org
Arif,

Wow! Thanks for this excellent tutorial. All the searching I've done and I
have found nothing like this. I've worked through Doug Edmunds site and the
few others I've found but this booklet is definitely a great resource. I
will work through this and see if it changes my mind about doing my project
with wxErlang. I have what I want to accomplish in mind and see some
difficulties ahead (mostly with the desire to create a chart). I see that
wxErlang / wxWidgets does not have a "native" chart control. I know that
the Erlang observer utility has some load charts but it looks like they draw
the chart themselves so I might be able to "steal" that.

Thanks again.

Sincerely yours,
Alan

Alan Gingras

unread,
Dec 29, 2017, 12:35:15 PM12/29/17
to Leo Liu, erlang-q...@erlang.org, ar...@riseup.net
Arif,

I have now worked my way through all of your wxerlang-getting-started document. Again, I think it is terrific. I did have to add a "startGame" function to actually start the "chess clock" in both flavors (gen_server and wx_object). And I modified the handle_info function for 'reset' to start tell player 1 to move. The startGame/1 method was:

startGame( N ) ->
?SERVER ! { reset, N }.

And the handle reset method is now:

handle_info({reset, N}, State) ->
player1 ! {reset, N},
player2 ! {reset, N},
player1 ! move,
{noreply, State};

And to get the clock going:

10> arbiter:start_link().
{ok, <0.207.0>}
11>arbiter:startGame( 10 ).
{reset,10}
12>
Or:
52> wo_arbiter:start_link ().
{wx_ref,35,wxFrame,<0.363.0>}
53> wo_arbiter: startGame( 10 ).
{reset,10}
54>

Thanks again for the tutorial. I hope other find it as instructive as I did.

Sincerely yours,
Alan

ar...@riseup.net

unread,
Apr 15, 2018, 4:04:44 PM4/15/18
to Alan Gingras, Leo Liu, erlang-q...@erlang.org
Hi,

I have written a follow up to the getting started piece.

It may not be enough to write your chart widgets, but I hope it gives
you some more insights into the workings of wxErlang.

https://arifishaq.files.wordpress.com/2018/04/wxerlang-speeding-up.pdf

Best regards
Arif

ar...@riseup.net

unread,
Apr 18, 2018, 6:06:47 AM4/18/18
to erlang-q...@erlang.org
To answer a colleague, no, you don't _have_ to run the arbiter and the
player processes on different hosts. To go through the examples, you can
run them all on a single node, as long as it is a distributed node.
Of course the fun in atually playing a game is lost if the two players
are sitting on the same host :)
Best regards
Arif


Date: Sun, 15 Apr 2018 13:02:44 -0700
From: ar...@riseup.net
To: Alan Gingras <alang...@comcast.net>
Cc: 'Leo Liu' <sdl...@gmail.com>, erlang-q...@erlang.org
Subject: Re: [erlang-questions] GUI development with Erlang
Message-ID: <9d1ff54235e9bdfc...@riseup.net>
Content-Type: text/plain; charset=US-ASCII

Joe Armstrong

unread,
Apr 18, 2018, 7:34:10 AM4/18/18
to Arif Ishaq, Leo Liu, Erlang
Excellent - thanks a lot

.Joe
Reply all
Reply to author
Forward
0 new messages