Compile with `--gc:stack`
var rx: Region
withRegion rx:
... json code here ...
You're right though that it needs documentation. I don't even know if it's in
0.14.
> How do I avoid accidentally trashing the refcounts?
protect and dispose only give you a `pointer` that you can cast to `ptr
JsonObj` and so RCs are not affected.
> But as you mentioned before, I can force it with a cast. Is that part of the
> solution you're suggesting?
Well yes. But you rea
GD Designs Rochdale Reviews (16) . Looks fab and was half price of other
companies. Barry Fairhurst
@vega
I think it is different between io of httpserver and stand stream. readChar
readData ... are not useful. I think we need apis like recvOnClientError
recvOnAChunk recvOn100Continue recvOnTimeout etc.
Say, I never did get an answer to either of the questions above. I'm still
curious:
1\. If the json is stored in a thread-local heap, then I let other threads
reference the json, those other threads are going to tend to touch the
refcounts. But the refcounts, presumably, aren't atomic ints. How
Yeah, but he needs information on how to cause an normally garbage-collected
library (for example, the JSON library) to allocate out of a memory region,
without changing the code for the library. I think the real answer is: I don't
think memory regions are implemented yet, I don't think anyone's
> I mean somehow I have to tell Nim when to free memory right?
Yeah sure, you just use these:
[alloc](http://forum.nim-lang.org///nim-lang.org/docs/system.html#alloc,Natural),
[dealloc](http://forum.nim-lang.org///nim-lang.org/docs/system.html#dealloc,pointer),
[allocShared](http://forum.nim-
Araq, I dont understand. I'm just now looking into Nimlang. How would I have to
change the programming style to program with memory regions in Nim? It can't
just be a flag to the compiler, I mean somehow I have to tell Nim when to free
memory right?
WIP is here:
[https://github.com/vegansk/asyncstreams](https://github.com/vegansk/asyncstreams)
@dom96: That reminds me that I was going to submit a PR for that...
Hi @boia01,
It will be possible to create concepts based on type lists, but I don't
consider this a feature of the concepts per se, but rather a general support
for variadic generics. You can take a look at this github issue:
[https://github.com/nim-lang/Nim/issues/1019](https://github.com/nim-
> Thats why I want to write asyncstreams module for the standard library. What
> do you think about it?
Sounds like a good idea :)
Last chance to get 50% off Nim in Action! Use code `pbbutcherlt`:
[https://manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81](https://manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81)
> Hi @dom96! > Just ordered the book. Thank you for the discount!
Thank you for ordering it!
> Because now to understand which methods for example the seq type supports the
> fastest is to use Internet search. setLen is in system, some others are in
> sequtils and etc.etc.
Keep reading, i'm pr
I created the fork of asynchttpserver for the test:
[https://github.com/vegansk/asynchttpserver2](https://github.com/vegansk/asynchttpserver2)
where you can read entire body using `request.body.readAll`, get the length of
the request without reading it via `request.body.len`. And the main featur
Suggest to export the data received at each time, so that users can use this
api to customize how their datas are stored (copy to their buffer or disk
files).
16 matches
Mail list logo