Re: Performance of ranges verses direct

2013-12-13 Thread Nikolay
I found that performance of ranges is miserable in many cases. You should not use them if there is any chance for big/critical computations. Actually I don't like to have two subsets of language: one with good performance, and other with good maintainability/readability. I have a couple thought

Re: Performance of ranges verses direct

2013-12-14 Thread Nikolay
And now try -inline-threshold=1024 ;-) Reading -help-hidden sometimes helps. Thanks. It is really game changer. I get my words about ranges back.

Re: How to set JSON_TYPE in 2.0.65

2014-04-10 Thread Nikolay
I used JSONValue rs = JSONValue([null:null]); for empty object

Re: Small-Size-Optimized Array

2016-05-18 Thread Nikolay via Digitalmars-d-learn
On Monday, 16 May 2016 at 11:05:40 UTC, Nordlöw wrote: Does Phobos contain any standard small-size-optimized (SSO) array that starts with a stack array and union-converts into a standard builtin D-array when grown beyond the size of the stack array? If not has anybody put together one? You

Re: Fibers under the hood

2016-06-08 Thread Nikolay via Digitalmars-d-learn
On Thursday, 9 June 2016 at 04:57:30 UTC, Jonathan Marler wrote: I've googled and searched through the forums but haven't found too much on how fibers are implemented. How does yield return execution to the caller but then resume execution in the same place on the next call? Also some informa

Re: Deploying Vibe.d applications to OpenShift

2014-07-24 Thread Nikolay via Digitalmars-d-learn
Please let me know how you did it, because I know it's possible with the DIY-cartridge they provide you(atleast it should be). I tried it some time ago. It is possible but: - vibe.d requires a lot of memory for project compilation - it is hard to install additional libraries (it is not usual

Re: Deploying Vibe.d applications to OpenShift

2014-07-24 Thread Nikolay via Digitalmars-d-learn
You should compile and test on a CentOS 6.3 machine first and then write the cartridge using the wget command to move the same libevent package and the compiled vibe.d binary. You won't be able to compile on a cartridge. Yes but what if I use some additional libriaries? Every new librar

simple question about function call syntax

2014-08-18 Thread Nikolay via Digitalmars-d-learn
I found this code sample in vibe: void connect(NetworkAddress addr) { enforce(.connect(m_ctx.socketfd, addr.sockAddr, addr.sockAddrLen) == 0, "Failed to connect UDP socket."~to!string(getLastSocketError())); } What does mean ".connect"? Where I can find description of this

Re: simple question about function call syntax

2014-08-18 Thread Nikolay via Digitalmars-d-learn
right here: http://dlang.org/expression.html#PrimaryExpression language documentation rulez! ;-) Yes I found it. Correct link: Module Scope Operator http://dlang.org/module.html

Re: Access Violation Tracking

2014-11-07 Thread Nikolay via Digitalmars-d-learn
i also developed a habit of writing assert()s before dereferencing pointers first time (including class refs) in appropriate places, so i'll got that stack trace for free. ;-) and i never turning off that asserts in "release builds". About null pointer deref & core dump I think, it is prob

Re: Access Violation Tracking

2014-11-08 Thread Nikolay via Digitalmars-d-learn
i also developed a habit of writing assert()s before dereferencing pointers first time (including class refs) in appropriate places, so i'll got that stack trace for free. ;-) and i never turning off that asserts in "release builds". If we can't rely on system level may be we should have in

Re: Thrift

2015-09-17 Thread Nikolay via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 16:57:39 UTC, ddos wrote: please help if you know how to get a simple example with d & thrift running thx, dominik Some time ago I could use facebook brunch with dlang: https://github.com/facebook/fbthrift