Re: Osproc input stream hang

2020-02-24 Thread cdunn2001
A hang in OS i/o can relate to buffering. You'd need to post a working (hanging) example.

Re: What prevents you from using Nim as your main programming language?

2020-02-24 Thread yewyy
So, I already attempted to make a reply to tell you guys why I'm not using Nim as my programming language, even though, I really would like too. I'm unable to describe the problem I have with Nim, but I don't have to, because somebody else already did and I'm so glad that I'm not alone with

Re: Using async Nim procedures in Python

2020-02-24 Thread dom96
This is a cool idea and doing this might actually not be too difficult. The main pieces to get this working are likely: * Calling Nim's async event loop from Python's periodically * Interoperability between Nim's futures and Python's (not strictly necessary, but would allow awaiting Nim's

Re: question on autolayout in wNim

2020-02-24 Thread Ward
Your rule 2 and rule 4 have contradictions. Rule 2: |-50-[text]| Rule 4: |[text]|

Using async Nim procedures in Python

2020-02-24 Thread ondrej_zapletal
Hello, I have been looking on Nim for couple of months now, and I have to say that I'm very intrigued. I'm currently working for a company that is mainly using python. Our core application is almost entirely written in it (some small parts are written in cython). It is quite large (close to

Re: Help to create a template/macro that reads small chunks of data from a stream.

2020-02-24 Thread mrhdias
Thanks @Hlaaftana but, unfortunately it doesn't work! /home/hdias/dev/tmp/test.nim(32, 25) template/generic instantiation of `async` from here /home/hdias/dev/test.nim(43, 10) template/generic instantiation of `forStream` from here /home/hdias/dev/tmp/test.nim(26, 24)

Re: question on autolayout in wNim

2020-02-24 Thread hed0nist
Most probably a typo error in your layout proc() proc layout() = panel.autolayout """ H:|{groupButton:[btnClick(btnClose)]-[btnClose]}| H:|{groupText:[-50-[text]]}| V:|[label]-[groupText]-[groupButton]| H:|[label, groupText]| Run

Is this a bug? result variable vs last statement

2020-02-24 Thread nim_zwei
Hello everyone! I'm not sure if this is a bug, so I'm writing this post to avoid creating an unnecessary github issue. In the following proc the result variable is being assigned to, but then there is a last statement that would act as the return value. This causes an error as expected:

Re: Generate XML file with xmltree [nesting format issue]

2020-02-24 Thread kaushalmodi
I have attempted to fix this issue in this PR: [https://github.com/nim-lang/Nim/pull/13482/files](https://github.com/nim-lang/Nim/pull/13482/files) XML/xmltree experts: Please review that PR and help me make it better!

ANY TWEAKERS IN THE HOUSE, GOT THAT FIRE CARTEL METH ON DECK DM ME

2020-02-24 Thread drugporn01
Are you just new into the dark web and wondering where and how to start going about buying drug stashes, then here’s the solution for you. Get your VPN connected and contact me for more details. Telegram: Drugporn01 WhatsApp: +1 (408) 412-0793 Wickr: Drugporn01 Email: drugp...@protonmail.com I

ROXICODONE/OXYCODONE- 30MG TOP GRADE 500 PILLS AVAILABLE. Telegram: Drugporn01

2020-02-24 Thread drugporn01
> If you lost your regular drug connect, he got killed, locked or jailed, went > missing or travelled and youre tired of waiting because you need your shit, > then i believe you need an honest, loyal, fast and trustworthy person to keep > supplying them to you no matter your location. Dont get

Re: Osproc input stream hang

2020-02-24 Thread enthus1ast
Since the process streams has not implemented peak functionallity, it seems the only way to do this is with threads.

Re: question on autolayout in wNim

2020-02-24 Thread Araq
I suppose you should ask on wNim's github issue tracker.

Re: Capture Problem

2020-02-24 Thread dawkot
I realised you don't actually need toSeq here  import random, sugar, math proc foo[T, U](a: openArray[T], cdf: openArray[U]): auto = let (a, cdf) = (@a, @cdf) (() => random.sample(a, cdf.cumsummed)) echo foo([1,2], [1,2])() Run

Re: Generate XML file with xmltree [nesting format issue]

2020-02-24 Thread kaushalmodi
It's probably because you are using `newXmlTree` for both **channel** and **rss** tags. May be you should use `newElement` for **channel** too? _PS: I am just guessing; I haven 't used this library._

Re: How to use integer generics in types?

2020-02-24 Thread cblake
There's no easy way to provide default values for such integer generic parameters, is there? E.g. (this doesn't work): type MatchPool[N: static[int] = 3] = object Run

Re: Capture Problem

2020-02-24 Thread schmidh
Thanks a lot!!!

Re: Capture Problem

2020-02-24 Thread dawkot
import random, sugar, math from sequtils import toSeq proc test1[I, T, U](a: array[I, T], cdf: array[I, U]): auto = (() => random.sample(a, cdf.cumsummed)) proc test2[T, U](a: openArray[T], cdf: openArray[U]): auto = (() => random.sample(a.toSeq,

Capture Problem

2020-02-24 Thread schmidh
The following code import random, sugar from math import cumsummed type Generator[T] = () -> T TrafficLight = enum red, yellow, green proc genCDF[T, U](a: openArray[T], cdf: openArray[U]): Generator[T] = assert(a.len == cdf.len)

Re: Modify old code using new/finalizer to compile with gc:arc

2020-02-24 Thread Araq
`defined(gcDestructors)` is fine, but undocumented.

Re: How to use integer generics in types?

2020-02-24 Thread Hlaaftana
To straight up give an example it's like this: type MatchPool[N: static[int]] = object vals: array[N, int] var mp = MatchPool[3](vals: [2, 4, 1]) Run

Re: Generate XML file with xmltree [nesting format issue]

2020-02-24 Thread Araq
Might be a minor bug, but does it matter? XML is not whitespace sensitive.

Re: How to use integer generics in types?

2020-02-24 Thread adnan
You use static[int], as answered in my thread. If N is not a compiletime constant, you need to use seq or unchecked_array.