Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Jacob Carlborg via Digitalmars-d
On 2016-12-18 17:53, Andrei Alexandrescu wrote: Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding and running unittests. Walter and I think Object.factory was a

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Jacob Carlborg via Digitalmars-d
On 2016-12-18 17:53, Andrei Alexandrescu wrote: For unittests, I figure things like static introspection should make it easier to enumerate and run unittests without a need for ModuleInfo. We currently have no good way to collect unittest between modules. It's easy to collect them for a

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Joakim via Digitalmars-d
On Sunday, 18 December 2016 at 18:42:36 UTC, Andrei Alexandrescu wrote: On 12/18/16 1:03 PM, Joakim wrote: I largely agree with Dmitry. Ilya refactored several Phobos modules to use scoped, selective imports much more, and I pitched in for some remaining imports in the largest modules, so

Re: Pointer to private structure

2016-12-18 Thread Nikhil Jacob via Digitalmars-d-learn
On Monday, 19 December 2016 at 06:21:10 UTC, ketmar wrote: i bet that just trying this with D compiler will take less time than writing forum post. I did try but it seems to give compilation failure... Let me try once more and I will get back with more details.

Re: Pointer to private structure

2016-12-18 Thread ketmar via Digitalmars-d-learn
i bet that just trying this with D compiler will take less time than writing forum post.

Re: A betterC modular standard library?

2016-12-18 Thread Andrey via Digitalmars-d
On Sunday, 18 December 2016 at 19:28:24 UTC, Andrei Alexandrescu wrote: On 12/18/2016 01:49 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 17:41:31 UTC, Walter Bright wrote: On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already have better `cpuid` and better `random` packages.

Re: A betterC modular standard library?

2016-12-18 Thread Mike via Digitalmars-d
On Monday, 19 December 2016 at 05:22:10 UTC, Ilya Yaroshenko wrote: What exactly do you mean by "betterC"? As far as I know, the `-betterC` switch just removes ModuleInfo generation. Because -betterC was not implemented yet. I'm curious to know what a complete implementation entails. Do

Re: Pointer to private structure

2016-12-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 19 December 2016 at 05:51:09 UTC, Nikhil Jacob wrote: In C, we can define a struct without body in an include file and use pointer to that structure For examples in public header file. struct data; data* new_data(); We can then define the elements of struct data privately inside

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 19 December 2016 at 01:52:21 UTC, Andrei Alexandrescu wrote: On 12/18/16 7:31 PM, Seb wrote: tl:dr: Phobos is very bloated. How does the D standard library compare in size with some other languages (C++, Rust, Go, Java, Python)? C++ and Rust are the best from this list in terms

Re: Making preconditions better specified and faster

2016-12-18 Thread deadalnix via Digitalmars-d
On Friday, 16 December 2016 at 10:28:03 UTC, qznc wrote: On Thursday, 15 December 2016 at 18:48:22 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16975 Whenever I think about preconditions and speed, I think that they should actually be put into the caller instead

Pointer to private structure

2016-12-18 Thread Nikhil Jacob via Digitalmars-d-learn
In C, we can define a struct without body in an include file and use pointer to that structure For examples in public header file. struct data; data* new_data(); We can then define the elements of struct data privately inside the implementation of library. Can we do this in D without

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread deadalnix via Digitalmars-d
On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and moved it near the top. https://github.com/dlang/DIPs/pull/51

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 19 December 2016 at 01:33:42 UTC, Mike wrote: On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko wrote: Who is interested in betterC _modular_* standard library? What exactly do you mean by "betterC"? As far as I know, the `-betterC` switch just removes ModuleInfo

[Issue 16983] std.range.takeNone examples does not compile

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16983 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Returning structs from COM

2016-12-18 Thread evilrat via Digitalmars-d-learn
On Saturday, 3 December 2016 at 09:51:00 UTC, John C wrote: Some DirectX methods return structs by value, but when I try calling them I either get garbage or an access violation. Usually COM methods return structs by pointer as a parameter, but these are returning the struct as the actual

proposal string std.utf:sanitizeUTF(string) which returns an always valid UTF8 string

2016-12-18 Thread Timothee Cour via Digitalmars-d
I keep running into issues due to auto-decoding (arguably a significant design flaw of phobos) when using strings from external sources (which may not be 100% valid UTF8) eg see stracktrace [1] on getSomeExternalString().splitLines, Could we have something like `sanitizeUTF` in std.utf, to allow

Re: A betterC modular standard library?

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 7:31 PM, Seb wrote: tl:dr: Phobos is very bloated. How does the D standard library compare in size with some other languages (C++, Rust, Go, Java, Python)? Let's do something about it! I've said this several times, and it bears repeating. We want to make D entirely

Re: A betterC modular standard library?

2016-12-18 Thread Mike via Digitalmars-d
On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko wrote: Who is interested in betterC _modular_* standard library? What exactly do you mean by "betterC"? As far as I know, the `-betterC` switch just removes ModuleInfo generation. Do you actually mean, a standard library that

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Monday, 19 December 2016 at 00:54:13 UTC, Andrei Alexandrescu wrote: On 12/18/16 7:44 PM, pineapple wrote: On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 7:44 PM, pineapple wrote: On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and moved it near the top. I would also like to register that while I respect

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Monday, 19 December 2016 at 00:44:14 UTC, pineapple wrote: On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and moved it near the top. I would also like to

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and moved it near the top. I would also like to register that while I respect your argument regarding scalability,

Re: Linker-hacking out the D runtime

2016-12-18 Thread Mike via Digitalmars-d-announce
On Sunday, 18 December 2016 at 12:57:08 UTC, Iain Buclaw wrote: As a response to my last message in that thread, the changes for classinfo generation is now ready to go in master. Ok, I'll give it a test in the next week or so. However I already have ideas for future implementation that is

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Sunday, 18 December 2016 at 23:18:27 UTC, Andrei Alexandrescu wrote: Great, thanks. Please take a look at the accuracy of the discussion. I expanded the "Workaround" section and moved it near the top. https://github.com/dlang/DIPs/pull/51

Re: A betterC modular standard library?

2016-12-18 Thread Seb via Digitalmars-d
On Sunday, 18 December 2016 at 18:49:33 UTC, Ilya Yaroshenko wrote: 1. Modularity: D should provide a very slim library (like std.traits and may be default GC with old core, which can be turned off or replaced). Other parts or Phobos/Druntime should be split into parts and the parts should

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Mike via Digitalmars-d
On Sunday, 18 December 2016 at 16:53:24 UTC, Andrei Alexandrescu wrote: What other issues/opportunities do you see related to ModuleInfo? I think it would be better to take a more holistic look at the relationship between the compiler and druntime. It's my understanding that many of the

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Sunday, 18 December 2016 at 22:31:34 UTC, Andrei Alexandrescu wrote: Is there a simple command to e.g. unittest everything in the project? Also, is there a build process or it's all templated? -- Andrei There's no build process. To run tests, I compile the root `package.d` file with rdmd,

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Nicholas Wilson via Digitalmars-d
On Monday, 19 December 2016 at 00:00:36 UTC, Andrei Alexandrescu wrote: On 12/18/16 6:48 PM, Nicholas Wilson wrote: [...] Cool cool cool. Thanks. [...] Noice. Wait, the top foreach iterates what? Its a compile time magic loop I think. Both of them. [...] SoA = ?

Re: sort, .array and folding on immutable data (finding most common character in column of matrix)

2016-12-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 18 December 2016 at 22:26:50 UTC, Ali wrote: Hey, so I have this data file that has a list of a string of characters separated by new lines. The task is to find the most common letter in each column. Ie if file is: abc axy cxc Then the letters are a (column 1), x and c. I've

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 6:48 PM, Nicholas Wilson wrote: On Sunday, 18 December 2016 at 16:53:24 UTC, Andrei Alexandrescu wrote: Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding

Our students could use your reviews!

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
Obviously all PRs need our attention. Among them, our DLangUPB scholarship recipients are folks committed to work on longer-term projects and could use our help with ramping up to speed. Here's a canned search with all of their PRs:

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 18 December 2016 at 16:53:24 UTC, Andrei Alexandrescu wrote: Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding and running unittests. Walter and I

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread rikki cattermole via Digitalmars-d
On 19/12/2016 12:37 PM, bitwise wrote: On Sunday, 18 December 2016 at 22:55:30 UTC, rikki cattermole wrote: - -typeinfo=low/low-min/normal/high/none None is pretty much -betterC Low would be unittests + module constructors Low-min would be like low but with only the fields that is needed

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread bitwise via Digitalmars-d
On Sunday, 18 December 2016 at 22:55:30 UTC, rikki cattermole wrote: - -typeinfo=low/low-min/normal/high/none None is pretty much -betterC Low would be unittests + module constructors Low-min would be like low but with only the fields that is needed Normal is what we have now more or

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 05:18 PM, pineapple wrote: On Sunday, 18 December 2016 at 21:09:46 UTC, Andrei Alexandrescu wrote: On 12/18/2016 10:01 AM, pineapple wrote: On Sunday, 18 December 2016 at 13:31:48 UTC, Andrei Alexandrescu wrote: Is the source code publicly available?

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread rikki cattermole via Digitalmars-d
On 19/12/2016 5:53 AM, Andrei Alexandrescu wrote: Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding and running unittests. Walter and I think Object.factory was a

[Issue 16102] [REG2.070] struct dtor replace value on stack

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16102 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6bff4520cc77b682948db87026bfcea1cf150cb2 add test case for issue 16102

[Issue 13927] optimizer hangs in optelem with SIMD initialization

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13927 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c3a32002dc70792130d70bdf58dc7a3ab5915ef6 Merge pull request #6275 from WalterBright/fix13927 --

[Issue 16747] [Reg 2.072] Cannot have stack allocated classes in @safe code

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16747 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a07034f2fe3a50622fedc810cf0ac775bbbfe1d3 fix Issue 16747 - Cannot have stack allocated classes in

[Issue 16699] [REG 2.070] stack corruption with scope(exit)

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16699 --- Comment #32 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a96a3f976204011f083b9af2353e839fcbd8dc72 fix Issue 16699 - [REG 2.070] stack corruption with

[Issue 16193] opApply() doesn't heap allocate closure

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16193 --- Comment #14 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/aac715ff2597d256b5ffe8ecb397316abf32fb2e Revert "fix Issue 16193 - opApply() doesn't heap allocate

Re: The Computer Language Benchmarks Game - no D

2016-12-18 Thread Brad Anderson via Digitalmars-d
On Sunday, 18 December 2016 at 21:29:05 UTC, jmh530 wrote: On Sunday, 18 December 2016 at 21:26:36 UTC, Boston wrote: Some days ago I'd been looking for comparisons between different programming languages, and I found this site: It's been discussed on the forum before. Yeah, many times.

[Issue 16678] [REG] Fix for issue 16193 creates major breakage

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16678 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8c00c7ea978dad3236148ea6fa57a1a9f8af3186 Merge pull request #6251 from Dicebot/revert-regressions --

[Issue 16574] [REG 2.072.0-b1] Unexplained errors about functions that overridde anything

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16574 --- Comment #22 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0aac63dc94ec9471d46e1cfc3de5c2f229db6977 fix Issue 16574 - forward reference issue with with

Re: Making preconditions better specified and faster

2016-12-18 Thread Caspar Kielwein via Digitalmars-d
On Sunday, 18 December 2016 at 21:58:57 UTC, Andrei Alexandrescu wrote: On 12/18/2016 04:24 PM, Caspar Kielwein wrote: On Sunday, 18 December 2016 at 10:47:42 UTC, Stefan Koch wrote: On Sunday, 18 December 2016 at 09:32:53 UTC, Caspar Kielwein wrote: On Thursday, 15 December 2016 at 18:48:22

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 05:18 PM, pineapple wrote: On Sunday, 18 December 2016 at 21:09:46 UTC, Andrei Alexandrescu wrote: On 12/18/2016 10:01 AM, pineapple wrote: On Sunday, 18 December 2016 at 13:31:48 UTC, Andrei Alexandrescu wrote: Is the source code publicly available?

sort, .array and folding on immutable data (finding most common character in column of matrix)

2016-12-18 Thread Ali via Digitalmars-d-learn
Hey, so I have this data file that has a list of a string of characters separated by new lines. The task is to find the most common letter in each column. Ie if file is: abc axy cxc Then the letters are a (column 1), x and c. I've written the code to do this at compile time. But I have a

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Sunday, 18 December 2016 at 21:09:46 UTC, Andrei Alexandrescu wrote: On 12/18/2016 10:01 AM, pineapple wrote: On Sunday, 18 December 2016 at 13:31:48 UTC, Andrei Alexandrescu wrote: Is the source code publicly available? https://github.com/pineapplemachine/mach.d The code looks clean,

Re: Making preconditions better specified and faster

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 04:24 PM, Caspar Kielwein wrote: On Sunday, 18 December 2016 at 10:47:42 UTC, Stefan Koch wrote: On Sunday, 18 December 2016 at 09:32:53 UTC, Caspar Kielwein wrote: On Thursday, 15 December 2016 at 18:48:22 UTC, Andrei Alexandrescu wrote:

[Issue 16983] New: std.range.takeNone examples does not compile

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16983 Issue ID: 16983 Summary: std.range.takeNone examples does not compile Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor

The Computer Language Benchmarks Game - no D

2016-12-18 Thread Boston via Digitalmars-d
Some days ago I'd been looking for comparisons between different programming languages, and I found this site: http://benchmarksgame.alioth.debian.org/ It seems like a good way to compare the performance of different PLs, when fed different tasks to do, but there's a problem - there's no D

Re: The Computer Language Benchmarks Game - no D

2016-12-18 Thread jmh530 via Digitalmars-d
On Sunday, 18 December 2016 at 21:26:36 UTC, Boston wrote: Some days ago I'd been looking for comparisons between different programming languages, and I found this site: It's been discussed on the forum before.

Re: Making preconditions better specified and faster

2016-12-18 Thread Caspar Kielwein via Digitalmars-d
On Sunday, 18 December 2016 at 10:47:42 UTC, Stefan Koch wrote: On Sunday, 18 December 2016 at 09:32:53 UTC, Caspar Kielwein wrote: On Thursday, 15 December 2016 at 18:48:22 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16975 I'd love if preconditions where

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 10:01 AM, pineapple wrote: On Sunday, 18 December 2016 at 13:31:48 UTC, Andrei Alexandrescu wrote: On 12/17/16 10:21 PM, pineapple wrote: I am developing a general-use library for D that is currently resting at around 50,000 lines. Is the source code publicly available?

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 20:16:11 UTC, Andrei Alexandrescu wrote: On 12/18/2016 03:10 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 19:28:24 UTC, Andrei Alexandrescu wrote: On 12/18/2016 01:49 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 17:41:31 UTC, Walter

Re: [OT] D in makefiles

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 2:47 PM, Shachar Shemesh wrote: On 17/12/16 10:06, John Colvin wrote: On Saturday, 17 December 2016 at 02:00:34 UTC, Superstar64 wrote: Makefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept:

Re: A betterC modular standard library?

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 03:10 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 19:28:24 UTC, Andrei Alexandrescu wrote: On 12/18/2016 01:49 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 17:41:31 UTC, Walter Bright wrote: On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 19:28:24 UTC, Andrei Alexandrescu wrote: On 12/18/2016 01:49 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 17:41:31 UTC, Walter Bright wrote: On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already have better `cpuid` and better `random` packages.

Re: [WIP] A Big O notation and algebra for D

2016-12-18 Thread Timothee Cour via Digitalmars-d
https://en.wikipedia.org/wiki/Lattice_(order) On Sun, Dec 18, 2016 at 10:46 AM, John Colvin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: > >> Article: http://erdani.com/d/bigo.html (do not publish; should do it

[Issue 16982] std.experimental.allocator.make!T must either call GC.addRange or be marked @system

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16982 --- Comment #2 from Sönke Ludwig --- Yeah, I used to simply `static if (std.traits.hasIndirections!T) GC.addRange(...);` in vibe.d's allocator module. Using annotations instead of controlling this at the call site is an

Re: [OT] D in makefiles

2016-12-18 Thread Shachar Shemesh via Digitalmars-d
On 17/12/16 10:06, John Colvin wrote: On Saturday, 17 December 2016 at 02:00:34 UTC, Superstar64 wrote: Makefiles allow custom shells. So with a small wrapper script we can use D in makefile. Here's my proof of concept: https://gist.github.com/Superstar64/8b896312ebe1a6e6240b1cba8aed2488. If

Re: A betterC modular standard library?

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/2016 01:49 PM, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 17:41:31 UTC, Walter Bright wrote: On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already have better `cpuid` and better `random` packages. Great! Please PR them for Phobos. cpuid is used in Mir GLAS and it

Re: A betterC modular standard library?

2016-12-18 Thread qznc via Digitalmars-d
On Sunday, 18 December 2016 at 14:37:55 UTC, Radu wrote: On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? I hope this doesn't turn into a new Tango

Re: ModuleInfo, factories, and unittesting

2016-12-18 Thread bitwise via Digitalmars-d
On Sunday, 18 December 2016 at 16:53:24 UTC, Andrei Alexandrescu wrote: Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding and running unittests. Walter and I

[Issue 16982] std.experimental.allocator.make!T must either call GC.addRange or be marked @system

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16982 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #1 from

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 17:41:31 UTC, Walter Bright wrote: On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already have better `cpuid` and better `random` packages. Great! Please PR them for Phobos. cpuid is used in Mir GLAS and it should be a betterC library. Without DRuntime

Re: [WIP] A Big O notation and algebra for D

2016-12-18 Thread John Colvin via Digitalmars-d
On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei static assert( complexity!(insertFrontMany!MyC) <= O("n2") *

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 1:03 PM, Joakim wrote: I largely agree with Dmitry. Ilya refactored several Phobos modules to use scoped, selective imports much more, and I pitched in for some remaining imports in the largest modules, so that only these module-level imports remain, ie those necessary for symbols

[WIP] A Big O notation and algebra for D

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei

[Issue 16982] std.experimental.allocator.make!T must either call GC.addRange or be marked @system

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16982 Sönke Ludwig changed: What|Removed |Added Assignee|nob...@puremagic.com|and...@erdani.com

[Issue 16982] New: std.experimental.allocator.make!T must either call GC.addRange or be marked @system

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16982 Issue ID: 16982 Summary: std.experimental.allocator.make!T must either call GC.addRange or be marked @system Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 16981] [Reg 2.073] assigning class or struct pointers to enum became an error

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16981 --- Comment #1 from Martin Nowak --- Also see issue 11697. --

[Issue 16981] New: [Reg 2.073] assigning class or struct pointers to enum became an error

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16981 Issue ID: 16981 Summary: [Reg 2.073] assigning class or struct pointers to enum became an error Product: D Version: D2 Hardware: All OS: All Status:

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Joakim via Digitalmars-d
On Thursday, 15 December 2016 at 22:56:42 UTC, Dmitry Olshansky wrote: On 12/13/16 11:33 PM, Andrei Alexandrescu wrote: Destroy. https://github.com/dlang/DIPs/pull/51/files Andrei On first it seems like an awesome idea. That solves ... but wait what? Thinking more about the problem at

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 15:18:37 UTC, Andrei Alexandrescu wrote: On 12/18/16 4:26 AM, Ilya Yaroshenko wrote: Hi, Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? We already have better `cpuid` and better

Re: A betterC modular standard library?

2016-12-18 Thread Walter Bright via Digitalmars-d
On 12/18/2016 1:26 AM, Ilya Yaroshenko wrote: We already have better `cpuid` and better `random` packages. Great! Please PR them for Phobos. The betterC std.range and std.algorithm analogs would be released with new ndslice implementation. Mir's algorithm would be faster then Phobos and

Re: Linux Kernel in D?

2016-12-18 Thread Jesse Phillips via Digitalmars-d
On Sunday, 18 December 2016 at 02:54:10 UTC, Whatsthisnow wrote: What are your thoughts on how I have implemented the strcpy type stuff? It looks like you are trying to wrap D types to interact with C. I think Walter's advice should be considered. Convert the files to match the original as

Re: Linux Kernel in D?

2016-12-18 Thread Jesse Phillips via Digitalmars-d
On Sunday, 18 December 2016 at 11:22:49 UTC, Whatsthisnow wrote: thousands of programmers that program for Linux, so creating an entire OS in D based on Linux would encourage (hopefully) a lot of Linux programmers to also write for a D Linux. Since its largely familiar, the learning process

Re: Enabling data-oriented design

2016-12-18 Thread Darren Fielding via Digitalmars-d
On Sunday, 18 December 2016 at 16:06:38 UTC, Joakim wrote: On Sunday, 18 December 2016 at 14:58:53 UTC, Stefan Koch wrote: On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote: [...] Hmm, looks like I pasted a link to the wrong CppCon video, here's the one on data-oriented design:

[Issue 16980] [REG2.072.0] vtable issue in slightly complex scenario

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16980 Sönke Ludwig changed: What|Removed |Added Keywords||wrong-code --

[Issue 16980] New: [REG2.072.0] vtable issue in slightly complex scenario

2016-12-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16980 Issue ID: 16980 Summary: [REG2.072.0] vtable issue in slightly complex scenario Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity:

ModuleInfo, factories, and unittesting

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
Compulsive ModuleInfo generation seems to be a drag. I'm not very familiar with the particulars but my understanding is ModuleInfo is needed for (a) Object.factory and (b) finding and running unittests. Walter and I think Object.factory was a mistake and we'd like to make it opt-in long term

Re: meaning of "auto ref const"?

2016-12-18 Thread Picaud Vincent via Digitalmars-d-learn
On Sunday, 18 December 2016 at 14:32:08 UTC, kinke wrote: TypeInfo_Struct apparently requires (or used to require) an `int opCmp(ref const T rhs)` overload, i.e., a version taking the rhs lvalue argument by reference (see https://dlang.org/spec/operatoroverloading.html#compare). Note that

Re: meaning of "auto ref const"?

2016-12-18 Thread Picaud Vincent via Digitalmars-d-learn
On Sunday, 18 December 2016 at 14:25:04 UTC, Basile B. wrote: ... As you can see, auto ref is more flexible with the parameter. This make sense for templated functions. Thank you for your detailed answer, things are perfectly clear now. Also sorry for the doc linksI should have found it

Re: Enabling data-oriented design

2016-12-18 Thread Joakim via Digitalmars-d
On Sunday, 18 December 2016 at 14:58:53 UTC, Stefan Koch wrote: On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote: I was looking at the most popular videos from CppCon and the second-most popular from the last three years is the one on data-oriented design:

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Walter Bright via Digitalmars-d
On 12/18/2016 5:38 AM, Andrei Alexandrescu wrote: On 12/18/16 6:47 AM, Jacob Carlborg wrote: Rubocop, the major linter in the Ruby world, will complain if a class is more than 100 lines of code. Does that include full documentation and unittests? My complaint is more along the lines of

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 15:20:48 UTC, Radu wrote: 2. In the same time many thing is not possible to create with Phobos/Druntime. The simplest example is numeric libraries. I can create a multithread GLAS with core.thread, but if I do so GLAS will never be accepted as default BLAS

Re: A betterC modular standard library?

2016-12-18 Thread bachmeier via Digitalmars-d
On Sunday, 18 December 2016 at 15:20:48 UTC, Radu wrote: I get point 2, but I should be able to use your new modules without giving up druntime/phobos, right?. They should not be mutual exclusive! I think that being able to use them the same as any other C library should be sufficient.

Re: A betterC modular standard library?

2016-12-18 Thread Radu via Digitalmars-d
On Sunday, 18 December 2016 at 15:01:55 UTC, Ilya Yaroshenko wrote: On Sunday, 18 December 2016 at 14:37:55 UTC, Radu wrote: [...] Maybe I will be able to propose them on DConf. [...] Yes/No in the same time. 1. It would be always possible to use Mir and Phobos together, 100% guarantee.

Re: A betterC modular standard library?

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 4:26 AM, Ilya Yaroshenko wrote: Hi, Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? We already have better `cpuid` and better `random` packages. The betterC std.range and std.algorithm analogs would

Re: A betterC modular standard library?

2016-12-18 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 18 December 2016 at 14:37:55 UTC, Radu wrote: On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko wrote: Hi, Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? We already have better `cpuid`

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread pineapple via Digitalmars-d
On Sunday, 18 December 2016 at 13:31:48 UTC, Andrei Alexandrescu wrote: On 12/17/16 10:21 PM, pineapple wrote: I am developing a general-use library for D that is currently resting at around 50,000 lines. Is the source code publicly available? https://github.com/pineapplemachine/mach.d

Re: Enabling data-oriented design

2016-12-18 Thread Stefan Koch via Digitalmars-d
On Sunday, 18 December 2016 at 14:22:29 UTC, Joakim wrote: I was looking at the most popular videos from CppCon and the second-most popular from the last three years is the one on data-oriented design: https://youtube.com/watch?v=1OEu9C51K2A The wikipedia page has a summary, basically

Re: A betterC modular standard library?

2016-12-18 Thread Radu via Digitalmars-d
On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko wrote: Hi, Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? We already have better `cpuid` and better `random` packages. The betterC std.range and

Re: meaning of "auto ref const"?

2016-12-18 Thread kinke via Digitalmars-d-learn
On Sunday, 18 December 2016 at 13:14:08 UTC, Picaud Vincent wrote: bool opEquals()(auto ref const BigInt y) const pure @nogc { return sign == y.sign && y.data == data; } my problem is that I do not understand the role/meaning of "auto" in this context. See

Re: meaning of "auto ref const"?

2016-12-18 Thread Basile B. via Digitalmars-d-learn
On Sunday, 18 December 2016 at 13:14:08 UTC, Picaud Vincent wrote: Reading std/bigint.d code: https://github.com/dlang/phobos/blob/00c1cc3b0d354363793c8b419ce84da722578138/std/bigint.d#L589 I have seen this: bool opEquals()(auto ref const BigInt y) const pure @nogc { return sign == y.sign

Enabling data-oriented design

2016-12-18 Thread Joakim via Digitalmars-d
I was looking at the most popular videos from CppCon and the second-most popular from the last three years is the one on data-oriented design: https://youtube.com/watch?v=1OEu9C51K2A The wikipedia page has a summary, basically focusing on cache effects more, with links to articles:

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/18/16 6:47 AM, Jacob Carlborg wrote: On 2016-12-18 01:34, Andrei Alexandrescu wrote: Yeah, std/datetime.d is a monster, from what I can tell owing to a rote and redundant way of handling unittesting. I didn't look at its dependencies, but I doubt they are special. I was quite vocal about

Re: DIP10005: Dependency-Carrying Declarations is now available for community feedback

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
On 12/17/16 10:21 PM, pineapple wrote: On Sunday, 18 December 2016 at 02:40:59 UTC, Chris Wright wrote: D doesn't have either of those pitfalls, so I haven't seen it cause problems. I'm also a bit skeptical that this will see much use outside phobos. This isn't really an argument against it. I

meaning of "auto ref const"?

2016-12-18 Thread Picaud Vincent via Digitalmars-d-learn
Reading std/bigint.d code: https://github.com/dlang/phobos/blob/00c1cc3b0d354363793c8b419ce84da722578138/std/bigint.d#L589 I have seen this: bool opEquals()(auto ref const BigInt y) const pure @nogc { return sign == y.sign && y.data == data; } my problem is that I do not understand the

  1   2   >