Re: Aedi - a dependency injection library

2016-08-16 Thread Alexandru Ermicioi via Digitalmars-d-announce
On Tuesday, 16 August 2016 at 14:25:10 UTC, Jacob Carlborg wrote: On 2016-08-16 11:41, Alexandru Ermicioi wrote: https://github.com/aermicioi/aedi If you use: ```d ``` For the code block you'll get syntax highlighting for D. Thx, for info. Didn't know about such syntax. I'll update it

Re: Why 16Mib static array size limit?

2016-08-16 Thread Yuxuan Shui via Digitalmars-d
On Tuesday, 16 August 2016 at 17:51:13 UTC, Johan Engelen wrote: On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: With ldc2, the best option is to go with a dynamic array ONLY IF you access the elements through the .ptr property. As seen in the last result, using the []

Re: Template type reduction

2016-08-16 Thread Lodovico Giaretta via Digitalmars-d-learn
On Monday, 15 August 2016 at 19:31:14 UTC, Engine Machine wrote: Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to S(T) for any T, struct Q { S!* s; // Can hold any type of S. } and be able to access s.x,

Re: Why 16Mib static array size limit?

2016-08-16 Thread Johan Engelen via Digitalmars-d
On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: With ldc2, the best option is to go with a dynamic array ONLY IF you access the elements through the .ptr property. As seen in the last result, using the [] operator on the array is about 4 times slower than that. As Yuxuan

[Issue 15951] Inefficiencies in struct initialization

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15951 --- Comment #6 from Johan Engelen --- Same issue: https://issues.dlang.org/show_bug.cgi?id=11331 --

Re: Why 16Mib static array size limit?

2016-08-16 Thread Yuxuan Shui via Digitalmars-d
On Tuesday, 16 August 2016 at 19:50:14 UTC, Yuxuan Shui wrote: On Tuesday, 16 August 2016 at 18:46:06 UTC, Ali Çehreli wrote: On 08/16/2016 10:51 AM, Johan Engelen wrote: > On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli > wrote: >> >> With ldc2, the best option is to go with a

Re: Binderoo - we're open sourcing our binding system

2016-08-16 Thread Meta via Digitalmars-d
On Tuesday, 16 August 2016 at 12:30:14 UTC, Ethan Watson wrote: https://github.com/Remedy-Entertainment/binderoo So I just announced at GDC Europe in my talk. We're open sourcing our binding system. It's currently a complete reengingeering of the system, and it's incomplete at the moment.

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Meta via Digitalmars-d-announce
On Tuesday, 16 August 2016 at 16:34:05 UTC, Dicebot wrote: On 08/16/2016 07:26 PM, Patrick Schluter wrote: What happens in that case ? void test() { scope rnd = new Rnd; // reference semantic and stack allocated Rnd rnd2; rnd2 = rnd;

Re: Why 16Mib static array size limit?

2016-08-16 Thread Ali Çehreli via Digitalmars-d
On 08/16/2016 10:51 AM, Johan Engelen wrote: > On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: >> >> With ldc2, the best option is to go with a dynamic array ONLY IF you >> access the elements through the .ptr property. As seen in the last >> result, using the [] operator on the

Sequence separation

2016-08-16 Thread Engine Machine via Digitalmars-d-learn
alias x = AliasSeq!(a, b, AliasSeq!(c, d)); results in a flat sequence. I would like to be able to keep them separate so I can have sub sequences. x.length == 4;

Re: Template type reduction

2016-08-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/16/16 12:33 AM, Engine Machine wrote: On Monday, 15 August 2016 at 19:40:37 UTC, Steven Schveighoffer wrote: On 8/15/16 3:31 PM, Engine Machine wrote: Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to

Re: Aedi - a dependency injection library

2016-08-16 Thread Rory McGuire via Digitalmars-d-announce
On 16 Aug 2016 20:45, "Alexandru Ermicioi via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > > On Tuesday, 16 August 2016 at 14:25:10 UTC, Jacob Carlborg wrote: >> >> On 2016-08-16 11:41, Alexandru Ermicioi wrote: >> >>> https://github.com/aermicioi/aedi >> >> >> If you

Re: Template type reduction

2016-08-16 Thread Engine Machine via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 17:39:14 UTC, Lodovico Giaretta wrote: On Monday, 15 August 2016 at 19:31:14 UTC, Engine Machine wrote: Suppose I have a templated type like struct S(T) { int x; static if (T is Y) int y; } I would like to be able to create a reference to S(T) for any T,

Re: Template type reduction

2016-08-16 Thread Lodovico Giaretta via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 19:23:51 UTC, Engine Machine wrote: On Tuesday, 16 August 2016 at 17:39:14 UTC, Lodovico Giaretta wrote: On Monday, 15 August 2016 at 19:31:14 UTC, Engine Machine wrote: [...] I don't know if this is exactly what you want: =

Re: Heterogeneous CT array like structure

2016-08-16 Thread Engine Machine via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 15:56:18 UTC, Adam D. Ruppe wrote: On Tuesday, 16 August 2016 at 15:40:19 UTC, Engine Machine wrote: How can I actually store this data for runtime use that doesn't require the GC? The indexing set is fixed at compile time. Just create an ordinary struct...

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 16 August 2016 at 18:25:42 UTC, Meta wrote: What about this? struct Rnd { int* state; } void test() { scope rnd = new Rnd(); Rnd rnd2 = *rnd; saveGlobalState(rnd2); } Same as far as I understand, because "from a lifetime analysis viewpoint, a struct is

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 16 August 2016 at 18:55:40 UTC, Dicebot wrote: On Tuesday, 16 August 2016 at 18:25:42 UTC, Meta wrote: What about this? struct Rnd { int* state; } void test() { scope rnd = new Rnd(); Rnd rnd2 = *rnd; saveGlobalState(rnd2); } Same as far as I understand, because

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Rory McGuire via Digitalmars-d-announce
On 16 Aug 2016 21:01, "Dicebot via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > > On Tuesday, 16 August 2016 at 18:55:40 UTC, Dicebot wrote: >> >> On Tuesday, 16 August 2016 at 18:25:42 UTC, Meta wrote: >>> >>> What about this? >>> >>> struct Rnd >>> { >>> int*

Re: Why 16Mib static array size limit?

2016-08-16 Thread Yuxuan Shui via Digitalmars-d
On Tuesday, 16 August 2016 at 18:46:06 UTC, Ali Çehreli wrote: On 08/16/2016 10:51 AM, Johan Engelen wrote: > On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: >> >> With ldc2, the best option is to go with a dynamic array ONLY IF you >> access the elements through the .ptr

Re: Fact checking for my talk

2016-08-16 Thread Ethan Watson via Digitalmars-d
On Saturday, 13 August 2016 at 19:34:42 UTC, Walter Bright wrote: It's risky to compare with languages you aren't strongly familiar with. All it takes is one mistake and one audience member who knows more than you about it, and it can seriously derail and damage the entire presentation. I

Re: Fact checking for my talk

2016-08-16 Thread Jacob Carlborg via Digitalmars-d
On 2016-08-16 08:13, Ethan Watson wrote: At this point, the only thing I still haven't found concrete information on is function inspection in Swift and Rust, which should be a mark against the languages if it's not easily Googlable. For Objective-C it's possible to use the Objective-C

Re: Command Line Utility Library

2016-08-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-08-16 04:29, Jonathan Marler wrote: Seb how in the heck do you know about all these libraries, geeze. Currently Dub has so few libraries that it's possible to manually scan the list. -- /Jacob Carlborg

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-16 Thread qznc via Digitalmars-d
On Sunday, 14 August 2016 at 17:30:21 UTC, Basile B. wrote: On Sunday, 14 August 2016 at 16:27:51 UTC, qznc wrote: On Saturday, 13 August 2016 at 14:52:06 UTC, Andrei Alexandrescu wrote: On 08/13/2016 08:37 AM, Vladimir Panteleev wrote: Friends don't let friends use Linux Mint Good to know,

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-16 Thread Andrei Alexandrescu via Digitalmars-d
On 8/16/16 1:15 AM, WhatMeWorry wrote: So, did you get the free pinwheel? http://airtop-pc.com/airtop/natural-airflow-technology/ Yes, and it works as advertised. -- Andrei

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-16 Thread Chris via Digitalmars-d
On Saturday, 13 August 2016 at 14:52:06 UTC, Andrei Alexandrescu wrote: On 08/13/2016 08:37 AM, Vladimir Panteleev wrote: On Friday, 12 August 2016 at 19:13:12 UTC, Andrei Alexandrescu wrote: googled for the better part of an afternoon for "fanless desktop" and it turns out it's much harder

[Issue 16395] New: auto return on override

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16395 Issue ID: 16395 Summary: auto return on override Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: spec Severity: enhancement

Aedi - a dependency injection library

2016-08-16 Thread Alexandru Ermicioi via Digitalmars-d-announce
Good day. I'd like to show my library aedi (v0.0.1), which implements dependency injection pattern. They key features of aedi are: 1) Simple api through which a container can be configured with objects. 2) Ability to extend the library with custom logic required by your code. 3) Ability to

[Issue 16396] New: Octal value 08 should result in error

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16396 Issue ID: 16396 Summary: Octal value 08 should result in error Product: D Version: D2 Hardware: Other OS: Linux Status: NEW Severity: enhancement

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-16 Thread yawniek via Digitalmars-d-learn
imo things should be modularized. so there should be (fast) protocol parsers first, something like https://github.com/h2o/picohttpparser or https://github.com/seanmonstar/httparse then a very simple eventloop that has abstractions and range based interfaces for reading/writing data into

[Issue 16395] auto return on override

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16395 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 16395] auto return on override

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16395 Lodovico Giaretta changed: What|Removed |Added CC|

Re: Command Line Utility Library

2016-08-16 Thread Seb via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 06:27:12 UTC, Jacob Carlborg wrote: On 2016-08-16 04:29, Jonathan Marler wrote: Seb how in the heck do you know about all these libraries, geeze. Currently Dub has so few libraries that it's possible to manually scan the list. Manual work? O_o Just open

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-16 Thread ikod via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 09:16:40 UTC, yawniek wrote: imo things should be modularized. so there should be (fast) protocol parsers first, something like https://github.com/h2o/picohttpparser or https://github.com/seanmonstar/httparse then a very simple eventloop that has abstractions and

[Issue 16395] auto return on override

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16395 --- Comment #3 from greenify --- > True in general, but not really an option for my code (I need a certain > amount of runtime polymorphism). I thought so :/ > Regardless of my example, which I solved with option 2, the

Re: [OT] The coolest (literally) desktop machine I've ever had

2016-08-16 Thread Chris via Digitalmars-d
On Tuesday, 16 August 2016 at 08:44:17 UTC, Chris wrote: At home I use Manjaro (https://manjaro.org/) and am quite happy with it (ArchLinux based, rolling release). They have various official desktops (I use XFCE), Cinnamon is available as a community edition:

Re: Fact checking for my talk

2016-08-16 Thread Kagamin via Digitalmars-d
On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote: You still haven't defined the term "design by introspection". Some searching around says it's the pattern of: template Foo(T) { static if (is(typeof(T.bar)) { // preferred implementation takes advantage of T.bar } else {

Establishing a recommended statndard for documenting dub packages

2016-08-16 Thread Karabuta via Digitalmars-d
Looking through documentations for the various packages available in the dub registry, I noticed that some packages have very good documentation whilst others are quite not there yet. ... Therefore I suggest the community put-up some kind of documentation guideline to standardize the learning

Re: When does take modify the underlying iterator?

2016-08-16 Thread ag0aep6g via Digitalmars-d-learn
On 08/16/2016 11:34 PM, ag0aep6g wrote: As for the example, you can rewrite it like so: auto failhard(T)(T iter) { import std.stdio; import std.range: take, drop, refRange; writeln("We have some range:"); writeln(typeid(T)); writeln("We take 1 from it...");

Re: When does take modify the underlying iterator?

2016-08-16 Thread cy via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 21:13:38 UTC, Steven Schveighoffer wrote: static if(isForwardRange!(typeof(iter))) But this may not work for any input range, since any time you copy the range, you are copying internal state that may cache an element or more. Yes, that was the problem with

Re: Compiler Problem with Vibe.d

2016-08-16 Thread Seb via Digitalmars-d
On Tuesday, 16 August 2016 at 14:58:11 UTC, WebFreak001 wrote: The solution is to install libevent-devel and libssl-devel to make it work on Debian and -dev on Arch. https://github.com/rejectedsoftware/vibe.d#additional-setup-on-linux-debianubuntumint This is how it was implemented so I don't

When does take modify the underlying iterator?

2016-08-16 Thread cy via Digitalmars-d-learn
InputRanges that are not ForwardRanges seem to lack a possibly crucial operation. I want to start with an arbitrary range, take 1 from it, then process the rest. But there doesn't seem to be any way to do that, because there's no way to tell whether "take" will advance the range, or whether it

Re: Multi-Thread message passing approach

2016-08-16 Thread Charles Hixson via Digitalmars-d-learn
On 08/16/2016 07:21 AM, Kagamin via Digitalmars-d-learn wrote: On Monday, 15 August 2016 at 01:53:33 UTC, Charles Hixson wrote: If I modify the code to attempt to pass a Tid[] as a member of struct Start I get: /usr/include/dmd/phobos/std/concurrency.d(603): Error: static assert "Aliases

Re: When does take modify the underlying iterator?

2016-08-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/16/16 5:01 PM, cy wrote: writeln("We take 1 from it..."); writeln(iter.take(1)); writeln("The rest of the range has:"); writeln(iter.drop(1).array); The fact that copying a forward range is generally the same operation as .save is a huge problem. But there isn't really a

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Walter Bright via Digitalmars-d-announce
On 8/16/2016 11:25 AM, Meta wrote: What about this? struct Rnd { int* state; } void test() { scope rnd = new Rnd(); Rnd rnd2 = *rnd; saveGlobalState(rnd2); } 'state' is set to null by 'new Rnd()', and so no pointers escape.

Re: Code signing to help with Windows virus false positives

2016-08-16 Thread Kagamin via Digitalmars-d
On Monday, 15 August 2016 at 19:58:14 UTC, Brad Anderson wrote: Please share your suggestions for how to help with the false positive issue (or just continue laughing in ignorance based on an assumption of something I never said). DevExpress components are distributed as an encrypted

Binderoo - we're open sourcing our binding system

2016-08-16 Thread Ethan Watson via Digitalmars-d
https://github.com/Remedy-Entertainment/binderoo So I just announced at GDC Europe in my talk. We're open sourcing our binding system. It's currently a complete reengingeering of the system, and it's incomplete at the moment. It will be documented as the features become more solidified.

Re: Binderoo - we're open sourcing our binding system

2016-08-16 Thread Manu via Digitalmars-d
On 16 August 2016 at 22:30, Ethan Watson via Digitalmars-d wrote: > https://github.com/Remedy-Entertainment/binderoo > > So I just announced at GDC Europe in my talk. We're open sourcing our > binding system. > > It's currently a complete reengingeering of the system,

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #11 from ag0ae...@gmail.com --- Alright, these are arguments for changing the documentation instead of the implementation: 1) Changing the behavior would break existing code. 2) It's hard or impossible to fix in a satisfactory way. In

Re: Multi-Thread message passing approach

2016-08-16 Thread Kagamin via Digitalmars-d-learn
On Monday, 15 August 2016 at 01:53:33 UTC, Charles Hixson wrote: If I modify the code to attempt to pass a Tid[] as a member of struct Start I get: /usr/include/dmd/phobos/std/concurrency.d(603): Error: static assert "Aliases to mutable thread-local data not allowed." test.d(47):

Re: Aedi - a dependency injection library

2016-08-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-08-16 11:41, Alexandru Ermicioi wrote: https://github.com/aermicioi/aedi If you use: ```d ``` For the code block you'll get syntax highlighting for D. -- /Jacob Carlborg

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #15 from Steven Schveighoffer --- I just disagree that the current behavior is a bug. Note that this wasn't documented to begin with, and whoever documented it (probably me) didn't realize the corner case behavior.

Re: Binderoo - we're open sourcing our binding system

2016-08-16 Thread Ethan Watson via Digitalmars-d
Slides are up at http://www.slideshare.net/EthanWatson5/d-using-an-emerging-language-in-quantum-break

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #17 from Eyal --- > The other field being printed is the context pointer, since your struct is > nested in the unittest. Yeah, I've since figured it out - but was surprised because it is inconsistent with code blocks

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #18 from Steven Schveighoffer --- druntime documentation PR: https://github.com/dlang/druntime/pull/1634 phobos initializeAll PR: https://github.com/dlang/phobos/pull/4736 --

Compiler Problem with Vibe.d

2016-08-16 Thread Emre Temelkuran via Digitalmars-d
I am experiencing compiler problem when trying to run vibe.d on linux. I solved it but it needs to be fixed in dub or compiler itself. I tried DMD on Windows first and it was working fine. But on Linux, i tried to install DMD and LDC on Debian,Ubuntu and Arch Linux. I am first installing dmd

Re: Fact checking for my talk

2016-08-16 Thread Ethan Watson via Digitalmars-d
On Tuesday, 16 August 2016 at 06:36:25 UTC, Jacob Carlborg wrote: On 2016-08-16 08:13, Ethan Watson wrote: For Objective-C it's possible to use the Objective-C runtime functions to access some of this information. Based on a method you can access the types of the arguments and the return

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 Steven Schveighoffer changed: What|Removed |Added Keywords||pull, spec --

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #19 from Steven Schveighoffer --- (In reply to Eyal from comment #17) > Yeah, I've since figured it out - but was surprised because it is > inconsistent with code blocks like: x=>x+1 which is inferred to be a >

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #16 from Steven Schveighoffer --- (In reply to Eyal from comment #1) > Prints out: > [Int(1, 7FE7FED92000), Int(2, 7FE7FED92000)] > [Int(3, null), Int(0, 73)] > > The second field being printed for Int seems like

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #20 from Eyal --- It could be nice to add a setInit method that sets a given buffer to the initial value, with no corner cases at all. --

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #21 from Steven Schveighoffer --- (In reply to Eyal from comment #20) > It could be nice to add a setInit method that sets a given buffer to the > initial value, with no corner cases at all. Agreed. I was thinking

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Walter Bright via Digitalmars-d-announce
On 8/16/2016 5:31 PM, Mike wrote: On Monday, 15 August 2016 at 04:58:06 UTC, Walter Bright wrote: On 8/14/2016 9:56 PM, Joseph Rushton Wakeling wrote: Does that actually work in D2? Yes. Can you please clarify the current implementation `scope`, and what DIP1000 proposes to change with

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Walter Bright via Digitalmars-d-announce
On 8/16/2016 6:01 PM, H. S. Teoh via Digitalmars-d-announce wrote: On Wed, Aug 17, 2016 at 01:01:05AM +, Chris Wright via Digitalmars-d-announce wrote: On Tue, 16 Aug 2016 18:55:40 +, Dicebot wrote: You need to add one more level of indirection for things to start going complicated.

Re: Fact checking for my talk

2016-08-16 Thread Chris Wright via Digitalmars-d
On Tue, 16 Aug 2016 10:24:38 +, Kagamin wrote: > On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote: >> You still haven't defined the term "design by introspection". Some >> searching around says it's the pattern of: >> >> template Foo(T) { >> static if (is(typeof(T.bar)) { >>

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Mike via Digitalmars-d-announce
On Wednesday, 17 August 2016 at 01:42:00 UTC, Walter Bright wrote: Can you please clarify the current implementation `scope`, and what DIP1000 proposes to change with respect to the current implementation? It just adds to the existing compiler implementation of 'scope'. It has nothing to do

Re: Why 16Mib static array size limit?

2016-08-16 Thread Steven Schveighoffer via Digitalmars-d
On 8/16/16 4:11 PM, Yuxuan Shui wrote: On Tuesday, 16 August 2016 at 17:51:13 UTC, Johan Engelen wrote: On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: With ldc2, the best option is to go with a dynamic array ONLY IF you access the elements through the .ptr property. As seen in

Re: Establishing a recommended statndard for documenting dub packages

2016-08-16 Thread jmh530 via Digitalmars-d
On Tuesday, 16 August 2016 at 19:59:16 UTC, Karabuta wrote: Looking through documentations for the various packages available in the dub registry, I noticed that some packages have very good documentation whilst others are quite not there yet. ... Therefore I suggest the community put-up

Re: When does take modify the underlying iterator?

2016-08-16 Thread Cauterite via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 21:01:14 UTC, cy wrote: This has also been annoying me lately, so I came up with this workaround: InputRange!T X = inputRangeObject(Src); X.take(6); // remove+return items 0 to 5 X.take(3); // remove+return items 6 to 8

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Chris Wright via Digitalmars-d-announce
On Tue, 16 Aug 2016 18:55:40 +, Dicebot wrote: > You need to add one more level of indirection for things to start going > complicated. Presumably scope is transitive, so things shouldn't get horribly complex.

Re: DIP1000: Scoped Pointers

2016-08-16 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Aug 17, 2016 at 01:01:05AM +, Chris Wright via Digitalmars-d-announce wrote: > On Tue, 16 Aug 2016 18:55:40 +, Dicebot wrote: > > You need to add one more level of indirection for things to start > > going complicated. > > Presumably scope is transitive, so things shouldn't get

Re: Sequence separation

2016-08-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 19:17:27 UTC, Engine Machine wrote: alias x = AliasSeq!(a, b, AliasSeq!(c, d)); results in a flat sequence. I would like to be able to keep them separate so I can have sub sequences. wrap them in a struct.

Re: Why 16Mib static array size limit?

2016-08-16 Thread ketmar via Digitalmars-d
On Tuesday, 16 August 2016 at 20:11:12 UTC, Yuxuan Shui wrote: Wait, doesn't D have strict aliasing rules? luckily, no. at least this is not enforced by dmd. and it is great.

Re: When does take modify the underlying iterator?

2016-08-16 Thread ag0aep6g via Digitalmars-d-learn
On 08/16/2016 11:01 PM, cy wrote: auto failhard(T)(T iter) { [...] writeln("We take 1 from it..."); writeln(iter.take(1)); This line may or may not pop the first element of the original iter. That's because copying a range may or may not be same as calling .save on it. For many

Re: When does take modify the underlying iterator?

2016-08-16 Thread ag0aep6g via Digitalmars-d-learn
On 08/16/2016 11:41 PM, ag0aep6g wrote: My apologies, that actually prints "[0, 1, 2, 3]" in the array case. I don't what's going on. That should work. Maybe I'm misunderstanding something about refRange. Oh, I see. `take` is being clever. When possible, it slices the given range instead of

[Issue 16397] New: test_runner in coverage mode doesn't match with individual test (covers less)

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16397 Issue ID: 16397 Summary: test_runner in coverage mode doesn't match with individual test (covers less) Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Mike via Digitalmars-d-announce
On Monday, 15 August 2016 at 04:58:06 UTC, Walter Bright wrote: On 8/14/2016 9:56 PM, Joseph Rushton Wakeling wrote: Does that actually work in D2? Yes. Can you please clarify the current implementation `scope`, and what DIP1000 proposes to change with respect to the current

Re: Heterogeneous CT array like structure

2016-08-16 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 19:31:02 UTC, Engine Machine wrote: This seems like a long winded way of just creating a struct in the first place, which might bet the simplest way anyways. I literally said "Just create an ordinary struct..." That's how I'd do it, though there are other options

Re: Why 16Mib static array size limit?

2016-08-16 Thread Charles Hixson via Digitalmars-d
On 08/16/2016 01:49 PM, Steven Schveighoffer via Digitalmars-d wrote: On 8/16/16 4:11 PM, Yuxuan Shui wrote: On Tuesday, 16 August 2016 at 17:51:13 UTC, Johan Engelen wrote: On Tuesday, 16 August 2016 at 01:28:05 UTC, Ali Çehreli wrote: With ldc2, the best option is to go with a dynamic

Re: Unum II announcement

2016-08-16 Thread Nick B via Digitalmars-d
On Monday, 15 August 2016 at 00:42:16 UTC, H. S. Teoh wrote: On Sun, Aug 14, 2016 at 09:08:31PM +, Nick B via Digitalmars-d wrote: While I certainly hope this research would eventually revolutionize numerical applications, it would take a long time before it would catch on, and until

[Issue 16390] __traits not accepted where a type is expected

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16390 Ketmar Dark changed: What|Removed |Added CC|

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 Ketmar Dark changed: What|Removed |Added CC|

Re: Why 16Mib static array size limit?

2016-08-16 Thread Walter Bright via Digitalmars-d
On 8/15/2016 6:28 PM, Ali Çehreli wrote: void main() { auto p = arr.ptr; foreach (j; 0 .. 100) { foreach (i; 0..arr.length) { version (POINTER) { p[i] += cast(ubyte)i; } else { arr[i] += cast(ubyte)i;

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #10 from Steven Schveighoffer --- A compile time error isn't possible, as this is a virtual function. It would have to be a runtime error, which I think is even worse. Let's just fix the docs, any bugs that are in

[Issue 14246] proper destruction of partially constructed objects/structs

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 --- Comment #3 from Sobirari Muhomori --- How does it affect safety? --

Re: Command Line Utility Library

2016-08-16 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 13:32:26 UTC, Jacob Carlborg wrote: On 2016-08-16 11:37, Seb wrote: Manual work? O_o Just open code.dlang.org and either hit CTRL-F or use the search bar (Martin added elastic search two months ago) as the packages usually have a very low PageRank. It's a bit

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #14 from ag0ae...@gmail.com --- (In reply to Steven Schveighoffer from comment #12) > 3) Changing the compiler potentially introduces new issues. Changing the > docs does not. (In reply to Steven Schveighoffer from comment #13) >

Re: Command Line Utility Library

2016-08-16 Thread Seb via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 13:52:19 UTC, Edwin van Leeuwen wrote: On Tuesday, 16 August 2016 at 13:32:26 UTC, Jacob Carlborg wrote: On 2016-08-16 11:37, Seb wrote: Manual work? O_o Just open code.dlang.org and either hit CTRL-F or use the search bar (Martin added elastic search two months

Re: Code signing to help with Windows virus false positives

2016-08-16 Thread Kagamin via Digitalmars-d
On Tuesday, 16 August 2016 at 05:38:00 UTC, Ethan Watson wrote: D code seems to be sufficiently different that virus scanners get confused. Well, nothing can be said for sure as nobody bothered with data, but if all assumptions are met, one thing to try is to compile with msvc toolchain

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #12 from Steven Schveighoffer --- 3) Changing the compiler potentially introduces new issues. Changing the docs does not. --

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 --- Comment #13 from Steven Schveighoffer --- changing the compiler when the existing code works JUST FINE as long as it's properly understood and documented seems like a horrible idea to me. It would be a different story if it

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-16 Thread yawniek via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 10:06:05 UTC, ikod wrote: On Tuesday, 16 August 2016 at 09:16:40 UTC, yawniek wrote: There is common http message parser that used in nginx and nodejs. I think it can be ported from C to D. that is pico, see: https://github.com/nodejs/http-parser/pull/200

Re: Command Line Utility Library

2016-08-16 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-08-16 11:37, Seb wrote: Manual work? O_o Just open code.dlang.org and either hit CTRL-F or use the search bar (Martin added elastic search two months ago) as the packages usually have a very low PageRank. It's a bit problematic when you don't know what to search for. Not all projects

Re: Compiler Problem with Vibe.d

2016-08-16 Thread rikki cattermole via Digitalmars-d
On 17/08/2016 2:51 AM, Emre Temelkuran wrote: I am experiencing compiler problem when trying to run vibe.d on linux. I solved it but it needs to be fixed in dub or compiler itself. I tried DMD on Windows first and it was working fine. But on Linux, i tried to install DMD and LDC on

Re: Converting a Visual Studio Solution with many Projects into DUB package?

2016-08-16 Thread Lodovico Giaretta via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 15:46:23 UTC, WhatMeWorry wrote: I've got a large Visual Studio Solution which contains lots of Projects. Each project is a standalone D/OpenGL tutorial. I want to make it OS and IDE agnostic so it can be easily played with on Windows, Linux, and Mac OS so I

Re: Fact checking for my talk

2016-08-16 Thread ZombineDev via Digitalmars-d
On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote: On Mon, 15 Aug 2016 06:43:11 +, ZombineDev wrote: Well, I guess it would hard for me to convince you if you don't know what Design by Introspection means. Some years ago I was on #d on freenode and someone made a reference to

[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

2016-08-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16394 Ali Cehreli changed: What|Removed |Added Keywords||industry

Converting a Visual Studio Solution with many Projects into DUB package?

2016-08-16 Thread WhatMeWorry via Digitalmars-d-learn
I've got a large Visual Studio Solution which contains lots of Projects. Each project is a standalone D/OpenGL tutorial. I want to make it OS and IDE agnostic so it can be easily played with on Windows, Linux, and Mac OS so I thought it best to make it a dub package. I've been reading

Re: Converting a Visual Studio Solution with many Projects into DUB package?

2016-08-16 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 15:46:23 UTC, WhatMeWorry wrote: I've got a large Visual Studio Solution which contains lots of Projects. Each project is a standalone D/OpenGL tutorial. I want to make it OS and IDE agnostic so it can be easily played with on Windows, Linux, and Mac OS so I

Re: Compiler Problem with Vibe.d

2016-08-16 Thread WebFreak001 via Digitalmars-d
On Tuesday, 16 August 2016 at 14:51:37 UTC, Emre Temelkuran wrote: I am experiencing compiler problem when trying to run vibe.d on linux. I solved it but it needs to be fixed in dub or compiler itself. I tried DMD on Windows first and it was working fine. But on Linux, i tried to install DMD

Re: Fact checking for my talk

2016-08-16 Thread ZombineDev via Digitalmars-d
On Tuesday, 16 August 2016 at 06:13:18 UTC, Ethan Watson wrote: [snip] At this point, the only thing I still haven't found concrete information on is function inspection in Swift and Rust, which should be a mark against the languages if it's not easily Googlable. From what I could find,

  1   2   >