Re: Actor model implementation, seeking feedback

2021-06-27 Thread Ariela Wenner
Hi, Théo!

What I did is really the bare minimum to send and receive messages via req-rep
sockets, feel free to grab that if it is of any use to you. I've been thinking
about working on full-fledged bindings for nng, unfortunately I don't feel like
I have enough experience with the library to do so right now. Maybe in the
future :)

I've actually made a soft fork and stripped encryption, serialization and nng
(instead I used mailbox and a global "registry" to keep track of all actors) to
play around with just that idea! It definitely seemed to perform better. I might
upload that sometime.

Cheers!

On Sun, 27 Jun 2021 10:59:57 +0200
Théo Cavignac  wrote:

> Hi ! That's cool, actor model is very useful !
> 
> Also nng is soo cool, that would be fantastic if you could extract a 
> standalone binding egg from your work !
> 
> How does your implementation perform in purely local single process 
> environment where serialization and encryption are not required ?
> 
> Cheers !
> 
> Théo
> 
> Le 26/06/2021 à 17:38, Ariela Wenner a écrit :
> 



Re: Compiling Chicken app for Windows from linux with Docker

2021-06-27 Thread Théo Cavignac

Hello Vasilij, thank you for your answer !
First, here is the right docker hub link: 
https://hub.docker.com/r/lattay/chicken-mingw
I did not realize that I send the link to my private dashboard for the 
image.


> That does sound interesting, though I'm not sure whether this won't 
be an issue later on for foreign dependencies


That may be a problem indeed, I am going to try more complex apps.
Also the build environment itself should be usable for dynamic binaries 
I think
You just would have to copy everything from /mingw-chicken-rt (in 
container) and put it specifically in C:\chicken (on target system).


> I'd start with the trivial applications first. The gl-utils egg has 
some examples that create graphical windows.


It seem like a good idea ! I will try that.

> I have seen a few attempts at creating Windows-specific eggs, but so far
> the only applications I've spotted were Kooda's games (which are
> cross-compiled in a similar manner to your Docker setup). You can find
> them here: 

I think I will try to compile https://kooda.itch.io/smlilme. Not sure 
how hard I will try though, the dependency list seems a bit hard to 
fullfill for a test.


>  I suspect the main problem is that Scheme applications are CLI-only 
unless you somehow get GLFW3/SDL2/IUP running


Yes, I'd like to work on that problem next, because I would like to be 
able to develop concrete non CLI apps with Chicken.


I think if I find a framework for GUI programming that suits me I may 
provide a ready to go docker env for that specific use case so that it 
is easy to build GUI apps for both linux and Windows from the comfort of 
linux (or from CI/CD pipelines, which is nice).


> Even a console application can make use of GLFW3 to launch a graphical
> window to perform OpenGL drawing in, so the distinction is rather
> technical: 

I see, there is no reason that my setup does not work then.


Théo

Le 27/06/2021 à 13:00, Vasilij Schneidermann a écrit :

Hello Théo,


Using the cross development article on the wiki, digging through the build
system a bit and fiddling a lot I created a MinGW-w64 based environment that
let you build standalone apps from your chicken code and your favorite eggs
that can be distributed as a single binary without needing dev oriented
dependencies like cygwin or MSYS2.

That does sound interesting, though I'm not sure whether this won't be
an issue later on for foreign dependencies.


Here is an image ready to go (because compiling chicken twice is pretty
long): https://hub.docker.com/repository/docker/lattay/chicken-mingw

That link redirects me to a login page.


Currently my testing of this environment is pretty limited. I did a test
with the args egg but I don't know how well it would perform with more
complex eggs like bind based one.

I've done some manual testing in a MinGW64-msys2 environment and managed
to get most of my eggs to work. You can for example try to get the
breadline or taglib egg running as they only need readline/taglib
respectively.


I don't have a non trivial app that would work on windows to test with this
process.

I'd start with the trivial applications first. The gl-utils egg has some
examples that create graphical windows.


Hence, I would be interested in some real world Windows ready app for this.

I have seen a few attempts at creating Windows-specific eggs, but so far
the only applications I've spotted were Kooda's games (which are
cross-compiled in a similar manner to your Docker setup). You can find
them here: 

My testing of egg installation under MinGW unveiled 94 errors, with
Cygwin being somewhat better off. I suspect the main problem is that
Scheme applications are CLI-only unless you somehow get GLFW3/SDL2/IUP
running and that is enough of a roadblock to deter all but the most
enthusiast users from spending more time with this Scheme system (and
instead use Racket's built-in cross-platform GUI or something else).


Also, I have yet to understand what is the difference between console and
GUI app in windows and how this environment could be used to build graphical
apps.

Even a console application can make use of GLFW3 to launch a graphical
window to perform OpenGL drawing in, so the distinction is rather
technical: 

Vasilij




Re: Compiling Chicken app for Windows from linux with Docker

2021-06-27 Thread Vasilij Schneidermann
Hello Théo,

> Using the cross development article on the wiki, digging through the build
> system a bit and fiddling a lot I created a MinGW-w64 based environment that
> let you build standalone apps from your chicken code and your favorite eggs
> that can be distributed as a single binary without needing dev oriented
> dependencies like cygwin or MSYS2.

That does sound interesting, though I'm not sure whether this won't be
an issue later on for foreign dependencies.

> Here is an image ready to go (because compiling chicken twice is pretty
> long): https://hub.docker.com/repository/docker/lattay/chicken-mingw

That link redirects me to a login page.

> Currently my testing of this environment is pretty limited. I did a test
> with the args egg but I don't know how well it would perform with more
> complex eggs like bind based one.

I've done some manual testing in a MinGW64-msys2 environment and managed
to get most of my eggs to work. You can for example try to get the
breadline or taglib egg running as they only need readline/taglib
respectively.

> I don't have a non trivial app that would work on windows to test with this
> process.

I'd start with the trivial applications first. The gl-utils egg has some
examples that create graphical windows.

> Hence, I would be interested in some real world Windows ready app for this.

I have seen a few attempts at creating Windows-specific eggs, but so far
the only applications I've spotted were Kooda's games (which are
cross-compiled in a similar manner to your Docker setup). You can find
them here: 

My testing of egg installation under MinGW unveiled 94 errors, with
Cygwin being somewhat better off. I suspect the main problem is that
Scheme applications are CLI-only unless you somehow get GLFW3/SDL2/IUP
running and that is enough of a roadblock to deter all but the most
enthusiast users from spending more time with this Scheme system (and
instead use Racket's built-in cross-platform GUI or something else).

> Also, I have yet to understand what is the difference between console and
> GUI app in windows and how this environment could be used to build graphical
> apps.

Even a console application can make use of GLFW3 to launch a graphical
window to perform OpenGL drawing in, so the distinction is rather
technical: 

Vasilij


signature.asc
Description: PGP signature


Compiling Chicken app for Windows from linux with Docker

2021-06-27 Thread Théo Cavignac

Hi all,

After my previous mail concerning the static compilation in a Docker 
container I figured it would be nice to use the same idea to create a 
cross compilation environment for linux-to-windows dev.



Using the cross development article on the wiki, digging through the 
build system a bit and fiddling a lot I created a MinGW-w64 based 
environment that let you build standalone apps from your chicken code 
and your favorite eggs that can be distributed as a single binary 
without needing dev oriented dependencies like cygwin or MSYS2.


I have to say I am pretty happy with this achievement, even if it may 
not be much, because I learned a ton on the building system of Chicken, 
and on linking in general.


I plan on contributing to the wiki some of the knowledge I gathered 
during the process. I already submitted a ticket to fix what seems to be 
a typo in the Makefile.cross-linux-mingw file in chicken sources.


By the way, I don't think I have an account to edit the wiki. Can I have 
one with username lattay ?



Here is the Docker environment ready to be built: 
https://github.com/Lattay/chicken_docker/tree/main/mingw


Here is an image ready to go (because compiling chicken twice is pretty 
long): https://hub.docker.com/repository/docker/lattay/chicken-mingw


The script that automate the process of spinning the container and 
extracting the final binary has been updated accordingly and now support 
the option `--platform mingw`: 
https://github.com/Lattay/chicken-build-static



Currently my testing of this environment is pretty limited. I did a test 
with the args egg but I don't know how well it would perform with more 
complex eggs like bind based one.


I don't have a non trivial app that would work on windows to test with 
this process.


Hence, I would be interested in some real world Windows ready app for this.

I would also be interested in feedback from testing this with your own app.

Also, I have yet to understand what is the difference between console 
and GUI app in windows and how this environment could be used to build 
graphical apps.



As always, I am very open to critiques and suggestions so please feel free !

Cheers,




Re: Actor model implementation, seeking feedback

2021-06-27 Thread Théo Cavignac

Hi ! That's cool, actor model is very useful !

Also nng is soo cool, that would be fantastic if you could extract a 
standalone binding egg from your work !


How does your implementation perform in purely local single process 
environment where serialization and encryption are not required ?


Cheers !

Théo

Le 26/06/2021 à 17:38, Ariela Wenner a écrit :


Hi all! Over the past few months I've been working on and off in a simple
implementation of the actor model. It actually started as a research/toy project
more than anything else (because I think the actor model is very neat), but
eventually seemed to be turning into something which *might* actually be useful
for someone.

But that's just my opinion, so I'd like to hear some feedback about it before I
decide if it's worth submitting to the coop now, or ever.

The project uses nng[1] for communication (I made some rudimentary bindings to
the bare minimum), protobuf for serialization and tweetnacl for encryption.
Now, I'm FAR from an expert on communication, security, or even concurrency,
so there's probably a lot to pick on :)

Code is a bit messy and there's no comments, but hopefully it's clean enough.

Here's the link: https://gitlab.com/ariSun/myriam

Cheers!

[1] https://github.com/nanomsg/nng