Re: range simple toy problem

2018-06-01 Thread Xiaoxi via Digitalmars-d-learn
On Friday, 1 June 2018 at 18:40:45 UTC, ag0aep6g wrote: On 06/01/2018 07:00 PM, Xiaoxi wrote: This prints "3 4 5 6 7 8 9": import std.range; import std.algorithm; import std.stdio; void main() { auto s = "1 2 3 4 5 6 7 8 9"; auto iter = refRange(&s).splitter!(c => c == ' ').drop(2);

range simple toy problem

2018-06-01 Thread Xiaoxi via Digitalmars-d-learn
import std.range; import std.algorithm; import std.string; import std.stdio; void main() { auto s = "1 2 3 4 5 6 7 8 9"; auto iter = s.split(" ").drop(2); // How to find the unconsumed/not-split part of s here? // i.e. "3 4 5 6 7 8 9" NOT ["3", "4", "5", "6", "7", "8", "9"]

Re: std.experimental.allocator optlink error

2015-11-10 Thread Xiaoxi via Digitalmars-d-learn
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote: Can you find the sources in your setup ? Any chance that that phobos.lib is still the the one distributed with dmd 2.068 ? When you setup dmd 2.069, did you use the 7z or installer ? i have the same issue. i used the installer. i only h

Re: pass by value && elide dtor + post-blit

2015-06-21 Thread Xiaoxi via Digitalmars-d-learn
On Saturday, 20 June 2015 at 22:44:17 UTC, Ali Çehreli wrote: On 06/20/2015 02:09 PM, Xiaoxi wrote: The output: before deneme.S.this after deneme.S.~this Ali Dear Ali, thank you for helping! Problem happens when passing by value as in param. DMD32 D Compiler v2.067.0 deneme.S.this before

pass by value && elide dtor + post-blit

2015-06-20 Thread Xiaoxi via Digitalmars-d-learn
When passing a struct by value: Is there any way to trick the compiler to elide unnecessary post-blit & dtor pair? Maybe using an union, somehow?

linux n00b

2014-07-13 Thread Xiaoxi via Digitalmars-d-learn
Hi, at home I run, osx, windows and freebsd, all work fine with D. However our servers at work run linux RHEL5, RHEL6.4 and our workstations run Ubuntu... can i use feodora rpm for rhel? If I want to build a d program which works on all dists, can i build that from any linux machine since d