Re: script of the day, to work with multiple nim packages

2016-11-15 Thread dom96
For those interested: I plan to solve this in Nimble by implementing what is described in this comment: [https://github.com/nim-lang/nimble/issues/240#issuecomment-27708](https://github.com/nim-lang/nimble/issues/240#issuecomment-27708). > Btw the yes program just spams "y" lines on

Re: Httpclient Extra Headers Error

2016-11-15 Thread dom96
Here is a working example: import httpclient, json let client = newHttpClient() client.headers = newHttpHeaders({ "Content-Type": "application/json", "x-mashape-proxy-secret": "asdfgqwert",

Re: messaging - or communicating between GUI's

2016-11-15 Thread ka
**pipes** \- OS specific pipes, for Posix systems this is [https://linux.die.net/man/3/pipe](https://linux.die.net/man/3/pipe). For Windows this called Named Pipes

Re: messaging - or communicating between GUI's

2016-11-15 Thread god
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,

Re: messaging - or communicating between GUI's

2016-11-15 Thread ka
Also you need to know that nanomsg is a wrapper library, so you need to handle nanomsg shared library itself.

Re: messaging - or communicating between GUI's

2016-11-15 Thread ka
god, if you dont care about speed, you can use any library you can find in nimble which uses sockets underneath. But sockets are not native mechanism for any OS for inter-process communication, so there can be many troubles (like not properly closed ports, timeouts, etc). So its better and

Re: messaging - or communicating between GUI's

2016-11-15 Thread Varriount
You could also roll your own mechanism via shared memory maps (although this world better for fixed-length structures).

Re: messaging - or communicating between GUI's

2016-11-15 Thread god
Thanks Araq, yeah, I think separate processes are better, will have a look at nanomsg.

Re: Httpclient Extra Headers Error

2016-11-15 Thread alfrednewman
@pdv, thank you for your support. Can you pls kindly help me to fix my code ? I tried to rewrite it following the description of the provided branch, but I got no success. I think I'm missing some key concept. All the best, AN

Re: Fun with deduplicate

2016-11-15 Thread cblake
@Stefan - this is a classic application of `containsOrImpl` in the set APIs (or `getOrPut` in the table APIs) which are very close to the core "search or insert" hash table algorithm. proc uniqCp[T](s: openArray[T]): seq[T] = newSeq(result, s.len) var h =

Anything wrong with this syntax?

2016-11-15 Thread Kerp
just realized this is not how the documentation uses properties but i'm wondering if using them as a constructor type thing is a problem in nim. So far it seems fine but its not in the manual. so here's my example... var cmd_pool: VkCommandPool type

Re: Httpclient Extra Headers Error

2016-11-15 Thread pdv
You're mixing old and new API here. request proc from old API (the one that doesn't use HttpClient) does indeed have extraHeaders parameter. It is, however, deprecated. The new API tends to pass headers in a client. There is, however, an option to pass per-request headers to new request proc in