[newbie question] Pointer to cstring

2017-01-26 Thread mmierzwa
Hi I am having hard time understanding pointers, addr, cstrings. var i: cstring = "a" var pi: ptr cstring = i.addr echo repr(i) echo repr(pi) Output: 005BC058"a" ref 004477F8 --> 005BC070"a" My understanding is this. First we declare

Re: Forum rules

2017-01-26 Thread Araq
> Take my last few posts for example. Some saints out there actually think that > my jokes are funny, and that my occasional "keep it copyfree" advocacy is not > particularly annoying. Too bad for you then that one admin disagrees...

Re: var param vs tuple as return value

2017-01-26 Thread Libman
I think that noobs (like myself) should be encouraged to avoid annoying the DevGods on GitHub with anything short of a fully-baked well-thought-out bug report, but message forums are a lower tier of seriousness, about on par with chat, where novices and noobs can help each-other. Chat logs

Re: Forum rules

2017-01-26 Thread Libman
The problem with the Golden Rule is that some values are subjective. Take my last few posts for example. Some saints out there actually think that [my jokes](http://forum.nim-lang.org/t/2738/3#17079) are funny, and that my occasional ["keep it

Re: Enum and repr prints invalid data

2017-01-26 Thread frelars
Same example but with all cases added. I noticed while working on this example that the issue would disappear and surface again simple by changing the object and function names (no semantic difference). But this version is tested and shows the issue type Status = enum

Enum and repr prints invalid data

2017-01-26 Thread frelars
Hi There seems to be an issue with repr on returned stack objects containing enums. See example below. If I create the Ret object in local stack frame, it works. If I change Ret.data to uin32 it works even if returned from a function. type Status = enum Ok, Error

Re: Forum rules

2017-01-26 Thread dom96
The rule is: Utilise common sense and [the Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule).

Re: messaging - or communicating between GUI's

2017-01-26 Thread mmierzwa
Thank you for your reply **Krux02**, I appreciate it. Not quite there however because what I am interested in is processes not threads and how to set up communication between two. Also I am looking for pipes, shared memory, ffs and differences among them, performance etc. I do not want to setup

Re: Forum rules

2017-01-26 Thread flyx
There are no official rules. There have been threads about having a CoC and the majority was against it. General opinion usually is _„instead of thinking about rules, just write some Nim code“_. There also isn't some big sign on your front door which tells you how to behave while out on the

Re: messaging - or communicating between GUI's

2017-01-26 Thread god
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

Re: Forum rules

2017-01-26 Thread Krux02
Good point, I don't rememeber any official forum rules. But I can give you some recommendations if you want to: > * Be nice. > * Don't start a flamewar. >

Forum rules

2017-01-26 Thread AironGregatti
I am new to the forum, like all forums, there are a set of rules that should be followed, I wanted to know what they are for this forum.