Re: RDTSCP from dlang

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/08/2016 2:04 PM, kookman wrote: I need to access the x86_64 RDTSCP assembly instruction from D. I found this for C++: http://stackoverflow.com/questions/14783782/which-inline-assembly-code-is-correct-for-rdtscp Does anyone here know how (if?) I can do this from D? It appears dmd's

Re: Do we need a FAQ page?

2016-08-29 Thread Suliman via Digitalmars-d
I already wrote one alternative version. Dlang.ru is down, but on page there is germany translation version http://forum.dlang.org/thread/vxmieatguqfkwgzli...@forum.dlang.org

Re: Need help with accessing outer object

2016-08-29 Thread Cherry via Digitalmars-d
How about having traits like hasOuter and getOuter (analogous to hasMember and getMember)? I can give it a shot to add these traits to D compiler. But would such a pull request be accepted? I mean of course the code in the pull-request has to meet review expectations, but would such a PR be

Re: Do you like bounded integrals?

2016-08-29 Thread Chris Wright via Digitalmars-d
On Mon, 29 Aug 2016 18:20:05 +, tsbockman wrote: > On Tuesday, 23 August 2016 at 20:40:06 UTC, Andrei Alexandrescu wrote: >> When composing, do the limits compose meaningfully? > > They should. Generally speaking, if that doesn't produce reasonable > bounds (leaving aside rounding errors) at

Need help with accessing outer object

2016-08-29 Thread Cherry via Digitalmars-d
Greetings All Can you help me with this code? I could not find any traits or other way to get me outer object of a given inner object. As for the context, I am fiddling with D trying to write a (domain specific) generic baseclass library. InnerBase is part of the library I write and the end

RDTSCP from dlang

2016-08-29 Thread kookman via Digitalmars-d-learn
I need to access the x86_64 RDTSCP assembly instruction from D. I found this for C++: http://stackoverflow.com/questions/14783782/which-inline-assembly-code-is-correct-for-rdtscp Does anyone here know how (if?) I can do this from D?

Re: ATTENTION!!!! ATTENTION!!!!ATTENTION!!!!!ATTENTION!!!!

2016-08-29 Thread bitwise via Digitalmars-d
On Tuesday, 30 August 2016 at 00:05:59 UTC, vanssajane wrote: Hello, offers loans between individuals are mostly scams. The purpose of these scammers, usually located in different countries (according to our findings), is only steal money and steal your identity in order to defraud others

[Issue 12062] std.range.flatten

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12062 greensunn...@gmail.com changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment

Re: Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread Meta via Digitalmars-d-learn
On Monday, 29 August 2016 at 21:24:52 UTC, A D dev wrote: Hi group, Does D have anything like the generators of Python and some other languages? Thanks. There's a Generator class in std.concurrency. I haven't used Python all that much so I can't say for certain whether it is the same or

[Issue 16438] std.typelist still exists!

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16438 --- Comment #2 from greensunn...@gmail.com --- sorry wrong Github PR - see https://github.com/dlang/phobos/pull/3955 https://github.com/dlang/phobos/commit/096480ecc35fbe427b08eeb1441a9ae44ea44f98 --

[Issue 16438] std.typelist still exists!

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16438 greensunn...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 16445] string mixin allows shebang line in source

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

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Rikki Cattermole via Digitalmars-d-announce
Awesome! So has anybody got some games they'd be willing to put on a humble bundle ;)

ATTENTION!!!! ATTENTION!!!!ATTENTION!!!!!ATTENTION!!!!

2016-08-29 Thread vanssajane via Digitalmars-d-announce
Hello, offers loans between individuals are mostly scams. The purpose of these scammers, usually located in different countries (according to our findings), is only steal money and steal your identity in order to defraud others using your name and your contact information. In addition, these

ATTENTION!!!! ATTENTION!!!!ATTENTION!!!!!ATTENTION!!!!

2016-08-29 Thread vanssajane via Digitalmars-d
Hello, offers loans between individuals are mostly scams. The purpose of these scammers, usually located in different countries (according to our findings), is only steal money and steal your identity in order to defraud others using your name and your contact information. In addition, these

[Issue 16446] New: Captures does not expose named captures for iteration

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16446 Issue ID: 16446 Summary: Captures does not expose named captures for iteration Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

[Issue 1820] Let ifti see through static if condition in some cases

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1820 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --

[Issue 16445] New: string mixin allows shebang line in source

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16445 Issue ID: 16445 Summary: string mixin allows shebang line in source Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor

Re: Float values are wrong in union

2016-08-29 Thread Basile B. via Digitalmars-d-learn
On Monday, 22 August 2016 at 18:19:52 UTC, Engine Machine wrote: On Monday, 22 August 2016 at 05:02:41 UTC, jkpl wrote: On Monday, 22 August 2016 at 04:52:40 UTC, Cauterite wrote: [...] That's a 32 bit codegen issue then because DMD64 's disasm shows that SSE regs are used: x86 give 7FF

Re: Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread A D dev via Digitalmars-d-learn
On Monday, 29 August 2016 at 22:03:35 UTC, Ali Çehreli wrote: Here is an example of a generator fiber: Thanks, will take a look.

Re: Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread Ali Çehreli via Digitalmars-d-learn
On 08/29/2016 02:50 PM, A D dev wrote: On Monday, 29 August 2016 at 21:28:15 UTC, Cauterite wrote: Ranges serve some of the purposes that generators are often used for: http://dlang.org/phobos/std_range.html But you can of course make true coroutine-based generators with fibres:

Re: Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread A D dev via Digitalmars-d-learn
On Monday, 29 August 2016 at 21:28:15 UTC, Cauterite wrote: Ranges serve some of the purposes that generators are often used for: http://dlang.org/phobos/std_range.html But you can of course make true coroutine-based generators with fibres: http://dlang.org/phobos/core_thread.html#.Fiber

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Walter Bright via Digitalmars-d-announce
On 8/29/2016 1:42 PM, Craig Dillabaugh wrote: Thanks for your work on this Andrei. Yes, Andrei took charge of this and did all the work. Thank you!

Re: Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread Cauterite via Digitalmars-d-learn
On Monday, 29 August 2016 at 21:24:52 UTC, A D dev wrote: Hi group, Does D have anything like the generators of Python and some other languages? Thanks. Ranges serve some of the purposes that generators are often used for: http://dlang.org/phobos/std_range.html But you can of course

Does D have anything like the generators of Python and some other languages?

2016-08-29 Thread A D dev via Digitalmars-d-learn
Hi group, Does D have anything like the generators of Python and some other languages? Thanks.

Re: Battle-plan for CTFE

2016-08-29 Thread Nordlöw via Digitalmars-d-announce
On Monday, 29 August 2016 at 00:24:01 UTC, Stefan Koch wrote: I feel that this can have a positive I am happy for all comments or suggestions. Incredible work! Keep up!

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Craig Dillabaugh via Digitalmars-d-announce
On Monday, 29 August 2016 at 17:03:34 UTC, Andrei Alexandrescu wrote: We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications,

Error when running vibe.d example application, not sure of the cause.

2016-08-29 Thread e-y-e via Digitalmars-d-learn
I am currently using the following packages on arch linux (parabola [1] to be exact): - DUB version 1.0.0 - LDC version 1.0.0 I create a project with the following command: $ dub init -t vibe.d vibetest Change directories: $ cd vibetest/ And attempt to build and run the project: $ dub

Re: mutable destructor? WAT???

2016-08-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/29/16 3:00 PM, Dicebot wrote: And this segfaults (on Linux): void main() @safe { auto s = const(S)("abcd"); foo(s); } I'd call it a clear bug. Most obvious fix would be to require const destructor if non-default destructor is present AND immutable/const instance is attempted to

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/29/16 1:03 PM, Andrei Alexandrescu wrote: We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications, the most important being

[Issue 16363] Cannot construct a random access range using frontTransversal

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16363 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b450113a4a6c5f6f329ef63cdaca4bd7ca3a8922 Enhancement 16363 Issue 16363 (Cannot construct a

Re: mutable destructor? WAT???

2016-08-29 Thread Dicebot via Digitalmars-d-learn
And this segfaults (on Linux): void main() @safe { auto s = const(S)("abcd"); foo(s); } I'd call it a clear bug. Most obvious fix would be to require const destructor if non-default destructor is present AND immutable/const instance is attempted to be created.

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread jmh530 via Digitalmars-d-announce
On Monday, 29 August 2016 at 17:03:34 UTC, Andrei Alexandrescu wrote: We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications,

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Robert burner Schadek via Digitalmars-d-announce
Awesome Job

Re: mutable destructor? WAT???

2016-08-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/29/16 12:05 PM, Steven Schveighoffer wrote: On 8/28/16 6:35 AM, Dicebot wrote: Looks correct to me. This const annotation does not prevent you from deleting memory or free'ing external resources - but it does ensure no transitive mutations for data reachable from struct fields. If it

Re: Do you like bounded integrals?

2016-08-29 Thread tsbockman via Digitalmars-d
On Tuesday, 23 August 2016 at 20:40:06 UTC, Andrei Alexandrescu wrote: When composing, do the limits compose meaningfully? They should. Generally speaking, if that doesn't produce reasonable bounds (leaving aside rounding errors) at the end of the computation, it means that the logic of the

Using dub to build tutorials

2016-08-29 Thread Resident_Tofu via Digitalmars-d-learn
Hello, everyone! I was directed here after asking around on reddit. (https://www.reddit.com/r/d_language/comments/500rdx/complete_beginner_to_game_dev_and_d/) To get straight to the point, I have practically no programming experience, but I did just finish going through Programming in D and I

Re: The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Seb via Digitalmars-d-announce
On Monday, 29 August 2016 at 17:03:34 UTC, Andrei Alexandrescu wrote: We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications,

Re: Do you like bounded integrals?

2016-08-29 Thread Andrei Alexandrescu via Digitalmars-d
On 08/29/2016 11:33 AM, Marco Leise wrote: The following could make it more accessible, much like the two Exception constructors we have: alias CheckedInt(T, T min, T max, Hook = Abort) = CheckedIntImpl!(T, Hook, min, max); alias CheckedInt(T, Hook = Abort) = CheckedIntImpl!(T,

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f899b4b59620e354b6ba0acfe843efb559202cd8 fix Issue 15907 - unjustified deprecation with getMember -

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

The D Language Foundation is now a tax exempt non-profit organization

2016-08-29 Thread Andrei Alexandrescu via Digitalmars-d-announce
We're happy to report that the D Language Foundation is now a public charity operating under US Internal Revenue Code Section 501(c)(3). The decision is retroactive to September 23, 2015. This has wide-ranging implications, the most important being that individuals and organizations may make

Re: Do we need a FAQ page?

2016-08-29 Thread bachmeier via Digitalmars-d
On Monday, 29 August 2016 at 17:05:26 UTC, bachmeier wrote: ... I see the difference now. The top menu on forum.dlang.org is different from the one on dlang.org.

Re: Do we need a FAQ page?

2016-08-29 Thread bachmeier via Digitalmars-d
On Monday, 29 August 2016 at 16:17:39 UTC, Seb wrote: In addition to needing the FAQ at the highest level of the menus, we need a reference to Ali's book. The old website had it listed as one of the top items as the "official tutorial". Now it's buried and nobody will know it is the official

Is this a bug or I made some mistake?

2016-08-29 Thread solidstate1991 via Digitalmars-d-learn
Since I have some screenshots: https://twitter.com/EvilReptoid/status/770303804550021121 I needed a bitarray, that had some more capability than the one in std.bitmanip for collision detection. I could test a whole line with it at once if my predictions are right. However I couldn't do the

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b2d0226d4845d69b60ea26f54c1edec36ad08b11 supplemental change for Issue 15907 fix - change of

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/deb87b753a455ae847389642d2835a9fb891ab5a spec change and changelog entry for Issue 15907

Thsi Youtube Channel Complete intro

2016-08-29 Thread karabuta via Digitalmars-d
Complete tutorial for beginners https://www.youtube.com/user/KeyEventHandler/playlists

[Issue 13796] A simple "array head const" struct for Phobos

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13796 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/415d573a3c8688396f0f46643bd1fedc923620dc Add std.experimental.typecons.HeadConst - fix issue

[Issue 13796] A simple "array head const" struct for Phobos

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13796 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Do we need a FAQ page?

2016-08-29 Thread Seb via Digitalmars-d
On Monday, 29 August 2016 at 15:53:54 UTC, bachmeier wrote: On Monday, 29 August 2016 at 15:29:40 UTC, Cauterite wrote: You can actually fork the website ( https://github.com/dlang/dlang.org/blob/master/faq.dd ) and improve it yourself if you feel so inclined. I'm sure many of us will be

Re: Fast multidimensional Arrays

2016-08-29 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Monday, 29 August 2016 at 15:46:26 UTC, Steinhagelvoll wrote: On Monday, 29 August 2016 at 14:55:50 UTC, Seb wrote: On Monday, 29 August 2016 at 14:43:08 UTC, Steinhagelvoll wrote: It is quite surprising that there is this much of a difference, even when all run sequential. I believe this

Re: mutable destructor? WAT???

2016-08-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/28/16 6:35 AM, Dicebot wrote: Looks correct to me. This const annotation does not prevent you from deleting memory or free'ing external resources - but it does ensure no transitive mutations for data reachable from struct fields. If it allowed destroying with mutable destructor, type system

Re: Do we need a FAQ page?

2016-08-29 Thread bachmeier via Digitalmars-d
On Monday, 29 August 2016 at 15:29:40 UTC, Cauterite wrote: You can actually fork the website ( https://github.com/dlang/dlang.org/blob/master/faq.dd ) and improve it yourself if you feel so inclined. I'm sure many of us will be happy to help you smooth it over once you get the ball rolling.

[Issue 16444] New: Less noisy error messages if built-in method is @disable (e.g. opAssign)

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16444 Issue ID: 16444 Summary: Less noisy error messages if built-in method is @disable (e.g. opAssign) Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Fast multidimensional Arrays

2016-08-29 Thread Steinhagelvoll via Digitalmars-d-learn
On Monday, 29 August 2016 at 14:55:50 UTC, Seb wrote: On Monday, 29 August 2016 at 14:43:08 UTC, Steinhagelvoll wrote: It is quite surprising that there is this much of a difference, even when all run sequential. I believe this might be specific to this small problem. You should definitely

Re: Silicon Valley D Meetup August 25, 2016 - Fireside Chat with Andrei Alexandrescu

2016-08-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On 8/27/16 12:34 AM, Bill Hicks wrote: On Wednesday, 24 August 2016 at 19:17:19 UTC, Ali Çehreli wrote: We will post a Google Hangouts link here at the start at 19:00 (7pm) Pacific time: http://www.meetup.com/D-Lang-Silicon-Valley/events/232970396/ Please try to come in person for free food

Re: Do you like bounded integrals?

2016-08-29 Thread Marco Leise via Digitalmars-d
Am Tue, 23 Aug 2016 16:40:06 -0400 schrieb Andrei Alexandrescu : > Currently checkedint (https://github.com/dlang/phobos/pull/4613) stands > at 2432 lines and implements a variety of checking behaviors. At this > point I just figured I can very easily add custom

Re: Unicode function name? ∩

2016-08-29 Thread Jesper Tholstrup via Digitalmars-d-learn
On Monday, 29 August 2016 at 13:06:17 UTC, Cauterite wrote: Sounds like you'd love Java. x = new BigDecimal("0.1") x.negate().divide(y).compareTo(z) who needs symbols? >_> Well, I wasn't trying to start a language battle, I like D (which maintains a 'union' keyword;-)) I simply see no

Re: Do we need a FAQ page?

2016-08-29 Thread Cauterite via Digitalmars-d
On Monday, 29 August 2016 at 13:50:07 UTC, Andrea Fontana wrote: It's very deep inside menu. Anyway this FAQ sections sounds not right for a newcomer that never seen D IMO. You can actually fork the website ( https://github.com/dlang/dlang.org/blob/master/faq.dd ) and improve it yourself if

Re: ARSD PNG memory usage

2016-08-29 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 16:40:30 UTC, Adam D. Ruppe wrote: On Tuesday, 16 August 2016 at 16:29:18 UTC, Guillaume Piolat wrote: Hey, I also stumbled upon this with imageformats decoding PNG. Image loading makes 10x the garbage it should. Let's see what this threads unveils... leet me

Re: Fast multidimensional Arrays

2016-08-29 Thread Seb via Digitalmars-d-learn
On Monday, 29 August 2016 at 14:43:08 UTC, Steinhagelvoll wrote: It is quite surprising that there is this much of a difference, even when all run sequential. I believe this might be specific to this small problem. You should definitely have a look at this benchmark for matrix multiplication

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 16:43 Steinhagelvoll via Digitalmars-d-learn napsal(a): On Monday, 29 August 2016 at 13:59:15 UTC, Daniel Kozak wrote: Dne 29.8.2016 v 11:53 Steinhagelvoll via Digitalmars-d-learn napsal(a): [...] It is unfair to compare different backend: gfortran -O3 -o test test.f90

Re: Fast multidimensional Arrays

2016-08-29 Thread Steinhagelvoll via Digitalmars-d-learn
On Monday, 29 August 2016 at 13:59:15 UTC, Daniel Kozak wrote: Dne 29.8.2016 v 11:53 Steinhagelvoll via Digitalmars-d-learn napsal(a): [...] It is unfair to compare different backend: gfortran -O3 -o test test.f90 [kozak@dajinka ~]$ time ./test real0m2.072s user0m2.053s sys

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 16:21 Stefan Koch via Digitalmars-d-learn napsal(a): On Monday, 29 August 2016 at 09:53:12 UTC, Steinhagelvoll wrote: Hello, I'm trying to find a fast way to use multi dimensional arrays. For this I implemented a matrix multiplication and compared the times for different

Re: Why D is not popular enough?

2016-08-29 Thread eugene via Digitalmars-d
On Monday, 29 August 2016 at 12:11:34 UTC, Markus wrote: Take a look on this discussion thread and you know WHY D IS NOT SO POPULAR. The community discusses technical details and compares D to C++, but there is no clear mission statement, there is no vision statement... Hello, the url

Re: Fast multidimensional Arrays

2016-08-29 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 29 August 2016 at 09:53:12 UTC, Steinhagelvoll wrote: Hello, I'm trying to find a fast way to use multi dimensional arrays. For this I implemented a matrix multiplication and compared the times for different ways. As a reference I used a Fortran90 implementation. [...] Any

Re: Fast multidimensional Arrays

2016-08-29 Thread David Nadlinger via Digitalmars-d-learn
On Monday, 29 August 2016 at 10:20:56 UTC, rikki cattermole wrote: By the looks you're not running the tests more then once. Druntime initialization could be effecting this. Please execute each test (without memory allocation) 1 times atleast and then report back what they are. D program

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 16:08 rikki cattermole via Digitalmars-d-learn napsal(a): Okay looks like I've made a boo boo and ldc is compiling out that entire multiplication loop out. Its passing the array statically and since its never assigned back, its just never compiled in (unless you specify it

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 15:57 rikki cattermole via Digitalmars-d-learn napsal(a): My bad, fixed: double[1000][] A, B, C; void main() { A = new double[1000][1000]; B = new double[1000][1000]; C = new double[1000][1000]; import std.conv : to; import

Re: Fast multidimensional Arrays

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
Okay looks like I've made a boo boo and ldc is compiling out that entire multiplication loop out. Its passing the array statically and since its never assigned back, its just never compiled in (unless you specify it via ref). So, this is where I give up as it is 2am. Perhaps try and make it

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 11:53 Steinhagelvoll via Digitalmars-d-learn napsal(a): Hello, I'm trying to find a fast way to use multi dimensional arrays. For this I implemented a matrix multiplication and compared the times for different ways. As a reference I used a Fortran90 implementation. Fortran

Re: Fast multidimensional Arrays

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/08/2016 1:50 AM, Steinhagelvoll wrote: It seems that the ini doesn't work properly. Every value seems to be nan. ini(A); ini(B); ini(C); writeln(A[0][0]); writeln(C[3][9]); nan nan My bad, fixed: double[1000][] A, B, C; void main() { A = new double[1000][1000]; B =

Re: Do we need a FAQ page?

2016-08-29 Thread jmh530 via Digitalmars-d
On Monday, 29 August 2016 at 13:36:05 UTC, Andrea Fontana wrote: A lot of people has prejudices about D (gc, speed, stability, etc...). And recently I read some thread about this. Why there's no FAQ page on website with something like: Does gc slowdown every program I write? Can I avoid

Re: Do we need a FAQ page?

2016-08-29 Thread Andrea Fontana via Digitalmars-d
On Monday, 29 August 2016 at 13:46:29 UTC, jmh530 wrote: On Monday, 29 August 2016 at 13:36:05 UTC, Andrea Fontana wrote: A lot of people has prejudices about D (gc, speed, stability, etc...). And recently I read some thread about this. Why there's no FAQ page on website with something like:

Do we need a FAQ page?

2016-08-29 Thread Andrea Fontana via Digitalmars-d
A lot of people has prejudices about D (gc, speed, stability, etc...). And recently I read some thread about this. Why there's no FAQ page on website with something like: Does gc slowdown every program I write? Can I avoid garbage collector on my programs? Is D slower than C++? Is D still

Re: Fast multidimensional Arrays

2016-08-29 Thread Steinhagelvoll via Digitalmars-d-learn
On Monday, 29 August 2016 at 13:02:43 UTC, rikki cattermole wrote: On 30/08/2016 12:13 AM, Steinhagelvoll wrote: [...] double[1000][] A, B, C; void main() { A = new double[1000][1000]; B = new double[1000][1000]; C = new double[1000][1000]; [...] It seems that the

Re: Optimisation possibilities: current, future and enhancements

2016-08-29 Thread Marco Leise via Digitalmars-d
Am Thu, 25 Aug 2016 11:45:40 + schrieb Cauterite : > - if a function is pure and called with constexpr parameters, the > compiler could potentially execute that call in the CTFE engine > (automatically), as part of the constant-folding phase I guess. > Such a technique

Re: Unicode function name? ∩

2016-08-29 Thread Cauterite via Digitalmars-d-learn
On Monday, 29 August 2016 at 12:53:26 UTC, Jesper Tholstrup wrote: Personally, I would prefer 'intersect' as a function name over '∩' anytime. Which benifits does the symbols add? Sounds like you'd love Java. x = new BigDecimal("0.1") x.negate().divide(y).compareTo(z) who needs symbols? >_>

Re: Fast multidimensional Arrays

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/08/2016 1:02 AM, rikki cattermole wrote: On 30/08/2016 12:13 AM, Steinhagelvoll wrote: Ok I added release and implemented the benchmark for 500 iterations, 1 are not reasonable. I build on the 2d array with LDC: http://pastebin.com/aXxzEdS4 (changes just in the beginning) $ ldc2

Re: Fast multidimensional Arrays

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/08/2016 12:13 AM, Steinhagelvoll wrote: Ok I added release and implemented the benchmark for 500 iterations, 1 are not reasonable. I build on the 2d array with LDC: http://pastebin.com/aXxzEdS4 (changes just in the beginning) $ ldc2 -release -O3 nd_test.d $ ./nd_test 12 minutes, 18

Re: Fast multidimensional Arrays

2016-08-29 Thread Daniel Kozak via Digitalmars-d-learn
Dne 29.8.2016 v 14:13 Steinhagelvoll via Digitalmars-d-learn napsal(a): Ok I added release and implemented the benchmark for 500 iterations, 1 are not reasonable. I build on the 2d array with LDC: http://pastebin.com/aXxzEdS4 (changes just in the beginning) $ ldc2 -release -O3 nd_test.d

Re: Unicode function name? ∩

2016-08-29 Thread Jesper Tholstrup via Digitalmars-d-learn
On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote: Are unicode function names not supported in dmd? bool ∩(A, B)(A a, B b){ return intersect(a, b); } Error: character 0x2229 is not a valid token Personally, I would prefer 'intersect' as a function name over '∩' anytime.

Re: Why D is not popular enough?

2016-08-29 Thread Markus via Digitalmars-d
Take a look on this discussion thread and you know WHY D IS NOT SO POPULAR. The community discusses technical details and compares D to C++, but there is no clear mission statement, there is no vision statement and no marketing. Often you merchandise D as a "system programming language",

Re: Fast multidimensional Arrays

2016-08-29 Thread Steinhagelvoll via Digitalmars-d-learn
Ok I added release and implemented the benchmark for 500 iterations, 1 are not reasonable. I build on the 2d array with LDC: http://pastebin.com/aXxzEdS4 (changes just in the beginning) $ ldc2 -release -O3 nd_test.d $ ./nd_test 12 minutes, 18 secs, 21 ms, 858 μs, and 3 hnsecs , which is

Re: DMD front-end can be used as a library with Dub

2016-08-29 Thread rikki cattermole via Digitalmars-d
On 29/08/2016 11:54 PM, Alexander Breckel wrote: On Monday, 29 August 2016 at 11:31:58 UTC, Seb wrote: On Monday, 29 August 2016 at 10:42:23 UTC, Alexander Breckel wrote: I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just

Re: DMD front-end can be used as a library with Dub

2016-08-29 Thread Alexander Breckel via Digitalmars-d
On Monday, 29 August 2016 at 11:31:58 UTC, Seb wrote: On Monday, 29 August 2016 at 10:42:23 UTC, Alexander Breckel wrote: I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just worked. The dub.json for dmd is fairly small and

Re: DMD front-end can be used as a library with Dub

2016-08-29 Thread Alexander Breckel via Digitalmars-d
On Monday, 29 August 2016 at 11:27:44 UTC, Basile B. wrote: On Monday, 29 August 2016 at 10:42:23 UTC, Alexander Breckel wrote: I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just worked. The dub.json for dmd is fairly small and

Re: DMD front-end can be used as a library with Dub

2016-08-29 Thread Seb via Digitalmars-d
On Monday, 29 August 2016 at 10:42:23 UTC, Alexander Breckel wrote: I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just worked. The dub.json for dmd is fairly small and doesn't require any changes to the code. This might be

Re: DMD front-end can be used as a library with Dub

2016-08-29 Thread Basile B. via Digitalmars-d
On Monday, 29 August 2016 at 10:42:23 UTC, Alexander Breckel wrote: I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just worked. The dub.json for dmd is fairly small and doesn't require any changes to the code. This might be

DMD front-end can be used as a library with Dub

2016-08-29 Thread Alexander Breckel via Digitalmars-d
I just tried to use the DMD frontend as a Dub package in my own project to parse and analyze D files and it ... just worked. The dub.json for dmd is fairly small and doesn't require any changes to the code. This might be common knowledge, but I was completely unprepared for this :) Please

Re: Fast multidimensional Arrays

2016-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 29/08/2016 9:53 PM, Steinhagelvoll wrote: Hello, I'm trying to find a fast way to use multi dimensional arrays. For this I implemented a matrix multiplication and compared the times for different ways. As a reference I used a Fortran90 implementation. Fortran reference:

Re: Fast multidimensional Arrays

2016-08-29 Thread kink via Digitalmars-d-learn
At the very least, give the LDC command line a `-release`, otherwise you end up with all assertions enabled etc.

Fast multidimensional Arrays

2016-08-29 Thread Steinhagelvoll via Digitalmars-d-learn
Hello, I'm trying to find a fast way to use multi dimensional arrays. For this I implemented a matrix multiplication and compared the times for different ways. As a reference I used a Fortran90 implementation. Fortran reference: http://pastebin.com/Hd5zTHVJ ifort test.f90 -o testf && time

Re: Allows the use of part of the language keywords?

2016-08-29 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Sunday, 28 August 2016 at 13:35:59 UTC, ketmar wrote: it has nothing to do with compiler: parser skips comments when peeking tokens. the only thing affected is simplistic syntax highlighter that can't do proper lookup. I have anyway never seen the necessity of the keyword "body" anyway. I

Re: Battle-plan for CTFE

2016-08-29 Thread Stefan Koch via Digitalmars-d-announce
On Monday, 29 August 2016 at 08:05:10 UTC, Rory McGuire wrote: On Mon, Aug 29, 2016 at 9:51 AM, Dominikus Dittes Scherkl via The work you are doing is just awesome! Many thanks. +1 your work is key for our success as a community. R Thanks guys. I just came up with a nifty little patch

Re: yet another event loop

2016-08-29 Thread Johnjo Willoughby via Digitalmars-d-announce
On Saturday, 27 August 2016 at 05:20:40 UTC, Bill Hicks wrote: On Friday, 26 August 2016 at 14:19:55 UTC, Eugene Wissner wrote: On Friday, 26 August 2016 at 10:54:17 UTC, bachmeier wrote: The person you responded to is a troll that has been cluttering the forum. No need to even read what they

Re: Battle-plan for CTFE

2016-08-29 Thread Rory McGuire via Digitalmars-d-announce
On Mon, Aug 29, 2016 at 9:51 AM, Dominikus Dittes Scherkl via Digitalmars-d-announce wrote: > On Monday, 29 August 2016 at 00:24:01 UTC, Stefan Koch wrote: > >> I feel that this can have a positive impact on the whole of dmd, since >> that will allow better

Re: Battle-plan for CTFE

2016-08-29 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 29 August 2016 at 00:24:01 UTC, Stefan Koch wrote: I feel that this can have a positive impact on the whole of dmd, since that will allow better frontend-optimisations. I am happy for all comments or suggestions. The work you are doing is just awesome! Many thanks.

[Issue 12701] Allow disabled default construction for enums

2016-08-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12701 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED

  1   2   >