[http://redmonk.com/sogrady/2017/06/08/language-rankings-6-17](http://redmonk.com/sogrady/2017/06/08/language-rankings-6-17)/
Ok, a bit messy with the strings and your hard-coded msglen (4) etc, but here's
where I got to:
* * *
There's a couple of superfluous cast[pointer] in my original, in both send and
recv message. They were left over from developing (they have no effect because
they were just casting pointer ->
mmierzwa, as I'm on windows, I used Windows Named Pipes (not ipc)
I adapted some example cpp code (see comments in paste) to get a basic
server->client in nim.
A bit of a simple hack (one direction messaging), but it worked for my needs.
Here's an example, inc a basic test
Ok, thanks for the clarification
I know Nim isn't python, but from a new user's perspective, all (or most of)
the 'echo's in the nim manual are shown python-style eg. echo thing, not
echo(thing)
It would not be obvious to them (and wasn't to me) that the brackets (or
implied brackets) and
should it?
[python]
print (5 + 1) * 6
36
even 'echo ((5 + 1) * 6 ))' gives the 'spacing is deprecated' warning
(just doesn't feel right to me, though I'm not a language professor)
Oh well... thanks
Not exactly sure what I'm doing wrong
var
x = (5 + 1) * 6 # ok 36
echo (5 + 1) * 6# Error: type mismatch: got (void, int)
Also, I find the new "Warning: a [b] will be parsed as command syntax; spacing
is deprecated [Deprecated]" slightly confusing.
Success!
Cobbled a client/server solution in windows using Named Pipes.
Gui's can now run as separate processes with events passing between them.
Thanks all, especially Mr. Ka whose links were not only interesting, but they
got me to a solution.
Thanks Ka, Varriout. Speed is not a concern as my controls gui2 is more of a
designer for the 3d objects in a design mode. (sliders to manipulate a 3d
objects size, orientation etc which I then need to pass/reflect in the opengl
gui1)
> >So its better and safer to use pipes, shared memory,
Thanks Araq, yeah, I think separate processes are better, will have a look at
nanomsg.
Hey all,
I have two Nim GUI programs running and would like to know the easiest way to
get them to communicate
Gui 1. Is 3d physics environment using opengl, all wrapped in nim, I have the
mainloop
Gui 2. Is a nim IUP gui (uses nim IUP nimble package) with panels, buttons etc
I would like
This may be a silly question, but in the OderWat example above, on the two proc
calls for type Foo (x), should x.v be updated in outer scope? i.e First echo
shows (v: 5, s: Test), second echo shows (v: 5, s: Test) - on my system.
Should the second call not then echo (v: 6, s: Test) considering
Oh I got it - the twoForOne procs are only working on a copy (not ref) of Foo.
Sorry :)
12 matches
Mail list logo