Re: Dreams come true: Compiling and running linux apps on windows :)

2016-08-07 Thread Abdulhaq via Digitalmars-d-announce
On Saturday, 6 August 2016 at 17:34:14 UTC, Andre Pany wrote: Hi, there is a new feature with the recent windows 10 update. You now can compile and run your linux apps (console only) on windows. Install XMing and run GUI apps too!

Re: Running a D game in the browser

2016-08-07 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Friday, 5 August 2016 at 13:18:38 UTC, Johan Engelen wrote: That patch doesn't look too bad. Could you introduce a CMake option for building with Emscripten-fastcomp? And a #define "LDC_LLVM_EMSCRIPTEN" or something like that, so that you can change `#if LDC_LLVM_VER >= 309 && 0` to `#if

Re: string mixup problem with stdin.byLine

2016-08-07 Thread Dave Akers via Digitalmars-d-learn
I do believe your problem is with the line... On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote: string cleanLine = strip( cast(string)line ); It's casting a char[] to and immutable(char)[], causing the mutable buffer from byLine to be used as a string. what you want is...

This Week in D: debugging uncaught exceptions

2016-08-07 Thread Adam D. Ruppe via Digitalmars-d-announce
I decided to write up a think on untrapping exceptions this week: http://arsdnet.net/this-week-in-d/2016-aug-07.html Next week I'll prolly talk about calling D from Ruby. Last week, we had a status report from Stefan Koch on his CTFE engine. If you aren't already following this, every Sunday

Re: Dreams come true: Compiling and running linux apps on windows :)

2016-08-07 Thread Mike via Digitalmars-d-announce
On Saturday, 6 August 2016 at 17:34:14 UTC, Andre Pany wrote: there is a new feature with the recent windows 10 update. You now can compile and run your linux apps (console only) on windows. For those who might not be aware of this and are looking for a little more info, it's called the

Re: Dreams come true: Compiling and running linux apps on windows :)

2016-08-07 Thread Mike via Digitalmars-d-announce
On Sunday, 7 August 2016 at 03:06:27 UTC, Martin Nowak wrote: What OS does it detect and download? $lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 14.04.4 LTS Release:14.04 Codename: trusty

string mixup problem with stdin.byLine

2016-08-07 Thread torea via Digitalmars-d-learn
Hi all, I'm still at beginner level in D and trying to make a simple note program in the terminal. I've been struggling with a simple problem for the last 2 hours so I could use some help! What I want to do is: if I write #m, I record the following lines in a specific string member of a

Cannot distinguish between template function wtih 0 args and 1 arg

2016-08-07 Thread Engine Machine via Digitalmars-d-learn
This really makes no sense Error: template Mem cannot deduce function from argument types !(cast(eException)1280L, "main.d", 38u, "main.WinMain")(int), candidates are: Mem(T, B = eX, string file = __FILE__, uint line = __LINE__, string func = __FUNCTION__)(size_t bytes) Mem(T, B = eX, string

Re: SortedRange.lowerBound from FrontTransversal

2016-08-07 Thread Michael Coulombe via Digitalmars-d-learn
On Monday, 8 August 2016 at 00:57:41 UTC, Michael Coulombe wrote: ... And looking at the source, the reason it fails when using TransverseOptions.assumeNotJagged is that it does not implement length or $. I made this into an enhancement request:

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

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16363 Issue ID: 16363 Summary: Cannot construct a random access range using frontTransversal Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 11934] Allow `ref` in `foreach` over range iff `front` returns by `ref`

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

[Issue 16362] `foreach (ref v; range)` with non-ref returning `.front()` missing dtors

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

Re: SortedRange.lowerBound from FrontTransversal

2016-08-07 Thread Michael Coulombe via Digitalmars-d-learn
On Saturday, 6 August 2016 at 23:00:42 UTC, Alex wrote: Hi all... a technical question from my side... why the last line of the following gives the error? import std.stdio; import std.range; import std.algorithm; void main() { size_t[][] darr; darr.length = 2; darr[0] = [0, 1, 2,

Re: The Computer Language Benchmarks Game

2016-08-07 Thread Walter Bright via Digitalmars-d
On 8/7/2016 10:53 AM, Isaac Gouy wrote: Rather than only being dismissive, http://www.digitalmars.com/d/archives/digitalmars/D/No_D_in_Great_Computer_Language_Shootout_103371.html#N103383 https://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/c0u7uv8

Re: callback craziness

2016-08-07 Thread Engine Machine via Digitalmars-d-learn
On Sunday, 7 August 2016 at 23:02:26 UTC, ag0aep6g wrote: On 08/08/2016 12:08 AM, Engine Machine wrote: On Sunday, 7 August 2016 at 20:48:29 UTC, ag0aep6g wrote: [...] Delegates don't necessarily need a GC allocation. They only need it when they need a closure. Delegates of methods don't need

Re: The Computer Language Benchmarks Game

2016-08-07 Thread jmh530 via Digitalmars-d
On Sunday, 7 August 2016 at 22:43:35 UTC, Isaac Gouy wrote: "Chapel programs versus C++ g++" just compares 2. Where are those "more specific benchmarks" ? I think he's referring to a HPC cluster running chapel vs. C++ versions of programs. However, I would argue Chapel would only win

[Issue 11599] BigInt crashes on very large operations.

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11599 --- Comment #4 from Kirill Kryukov --- Yes. Sadly I've no time to work on it currently. But this bug (and the related #16264) is a blocker to serious use of D's BigInt. --

[Issue 14855] -cov should ignore assert(0)

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14855 --- Comment #5 from Jonathan M Davis --- > Maybe we can add a compiler flag or API in Druntime to change the behavior > based on a user's opinion? Much as I would love to see assert(0) not counted towards the

[Issue 9471] std.xml uses DbC to validate XML syntax

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9471 --- Comment #1 from Stewart Gordon --- abhishekkmr18 - you added the 'pull' keyword. Have you really done a pull request for this? If so, could you please post a link to it here? Furthermore, you really should assign a bug to

Re: Autotesting dub packages with dmd nightly

2016-08-07 Thread Martin Nowak via Digitalmars-d-announce
On Saturday, 16 July 2016 at 20:34:49 UTC, Sebastiaan Koppe wrote: I am aiming really low at first, but will eventually add things like memory usage, history, notifications, etc. I actually don't think this makes sense. You're not in the position to maintain 1K+ packages, it's the library

Re: callback craziness

2016-08-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 7 August 2016 at 23:02:26 UTC, ag0aep6g wrote: Not exactly. When you do something that requires a closure, it errors out. As I said, a delegate doesn't always require the allocation of a closure. You can also throw scope in there iff the delegate will never be stored: @nogc void

Re: callback craziness

2016-08-07 Thread ag0aep6g via Digitalmars-d-learn
On 08/08/2016 12:08 AM, Engine Machine wrote: On Sunday, 7 August 2016 at 20:48:29 UTC, ag0aep6g wrote: [...] Delegates don't necessarily need a GC allocation. They only need it when they need a closure. Delegates of methods don't need closures. And when you pass the delegate in a `scope`

Re: Battle-plan for CTFE

2016-08-07 Thread Martin Nowak via Digitalmars-d-announce
On Saturday, 6 August 2016 at 14:26:00 UTC, Stefan Koch wrote: I added a switch to my version of dmd which allows to toggle the ctfe engine. So now I can compare apples to apples when posting perf data. That's indeed very useful, also for testing purposes.

Re: The Computer Language Benchmarks Game

2016-08-07 Thread Isaac Gouy via Digitalmars-d
On Sunday, 7 August 2016 at 21:19:54 UTC, qznc wrote: Comparing so many languages is too broad. We need more specific benchmarks which must be looked at in more detail. "Chapel programs versus C++ g++" just compares 2. Where are those "more specific benchmarks" ? If you want to answer the

Re: callback craziness

2016-08-07 Thread Engine Machine via Digitalmars-d-learn
On Sunday, 7 August 2016 at 20:48:29 UTC, ag0aep6g wrote: On 08/07/2016 10:01 PM, Engine Machine wrote: @nogc void foo(void delegate(int x) @nogc f); fails with the @nogc. Compiles just fine for me. 2nd, I cannot use a delegate because of the @nogc context, Delegates don't necessarily

[Issue 14704] The design, which allows not to write import, import, import ... for selective imports

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

[Issue 14673] BigInt needs more performance and total revision

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

Re: The Computer Language Benchmarks Game

2016-08-07 Thread qznc via Digitalmars-d
On Sunday, 7 August 2016 at 17:53:12 UTC, Isaac Gouy wrote: On Sunday, 7 August 2016 at 05:04:29 UTC, Walter Bright wrote: Ultimately, my opinion is that the benchmark is outdated and not useful today. I ignore it, if anybody cites the benchmark game for performance measurements. Yeah, I

Re: Why doesn't dlang-bot use the GitHub conventions?

2016-08-07 Thread Seb via Digitalmars-d
On Sunday, 7 August 2016 at 21:04:40 UTC, qznc wrote: On Sunday, 7 August 2016 at 20:08:48 UTC, Martin Nowak wrote: On Sunday, 7 August 2016 at 20:03:45 UTC, Martin Nowak wrote: BTW, dlang-bot got a logo and it's own home page today. [Dlang-Bot](http://dlang-bot.herokuapp.com/) Also since

[Issue 16358] the most basic program leaks 88 bytes

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

Re: Why doesn't dlang-bot use the GitHub conventions?

2016-08-07 Thread qznc via Digitalmars-d
On Sunday, 7 August 2016 at 20:08:48 UTC, Martin Nowak wrote: On Sunday, 7 August 2016 at 20:03:45 UTC, Martin Nowak wrote: BTW, dlang-bot got a logo and it's own home page today. [Dlang-Bot](http://dlang-bot.herokuapp.com/) Also since yesterday it cancels outdated Travis-CI builds to reduce

[Issue 16361] New: Exclude other OS folders from a OS relase

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16361 Issue ID: 16361 Summary: Exclude other OS folders from a OS relase Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: callback craziness

2016-08-07 Thread ag0aep6g via Digitalmars-d-learn
On 08/07/2016 10:01 PM, Engine Machine wrote: @nogc void foo(void delegate(int x) @nogc f); fails with the @nogc. Compiles just fine for me. 2nd, I cannot use a delegate because of the @nogc context, Delegates don't necessarily need a GC allocation. They only need it when they need a

[Issue 11599] BigInt crashes on very large operations.

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11599 tkoo...@gmail.com changed: What|Removed |Added CC||tkoo...@gmail.com --- Comment #3 from

[Issue 13804] BigInt have no binary interface to be used in crypto

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13804 tkoo...@gmail.com changed: What|Removed |Added CC||tkoo...@gmail.com --- Comment #3 from

Re: Why doesn't dlang-bot use the GitHub conventions?

2016-08-07 Thread Martin Nowak via Digitalmars-d
On Sunday, 7 August 2016 at 20:03:45 UTC, Martin Nowak wrote: BTW, dlang-bot got a logo and it's own home page today. [Dlang-Bot](http://dlang-bot.herokuapp.com/) Also since yesterday it cancels outdated Travis-CI builds to reduce our test load.

Re: Why doesn't dlang-bot use the GitHub conventions?

2016-08-07 Thread Martin Nowak via Digitalmars-d
On Sunday, 7 August 2016 at 20:03:45 UTC, Martin Nowak wrote: That is actually the syntax for github's Bugzilla integration that we're using, and I don't plan on replacing that. We also rely on that for our changelog.

Re: Why doesn't dlang-bot use the GitHub conventions?

2016-08-07 Thread Martin Nowak via Digitalmars-d
On Wednesday, 18 May 2016 at 14:27:22 UTC, Jacob Carlborg wrote: Can we please have dlang-bot recognize the GitHub syntax as well? That is actually the syntax for github's Bugzilla integration that we're using, and I don't plan on replacing that. We also rely on that for our changelog. As

callback craziness

2016-08-07 Thread Engine Machine via Digitalmars-d-learn
I use callbacks a lot and have trouble with D in a nogc context. First, I cannot declare the parameters with a nogc or I get a compile time error. @nogc void foo(void delegate(int x) @nogc f); fails with the @nogc. 2nd, I cannot use a delegate because of the @nogc context, @nogc void

Re: I need a @nogc version of hashOf(). What are the options?

2016-08-07 Thread Gary Willoughby via Digitalmars-d-learn
On Sunday, 7 August 2016 at 18:37:19 UTC, ag0aep6g wrote: On 08/07/2016 07:10 PM, ag0aep6g wrote: https://github.com/dlang/druntime/pull/1624 Has been merged. Is going to be part of 2.072. Very cool! MurmurHash3 is a great addition too. Thanks guys.

Re: I need a @nogc version of hashOf(). What are the options?

2016-08-07 Thread ag0aep6g via Digitalmars-d-learn
On 08/07/2016 07:10 PM, ag0aep6g wrote: https://github.com/dlang/druntime/pull/1624 Has been merged. Is going to be part of 2.072.

I'll be back soon

2016-08-07 Thread Andrei Alexandrescu via Digitalmars-d
Hello, I've been busy with a paper submission that has a deadline on Wednesday. There have also been some computer troubles along the way. After Wed I should be able to tend to the many open PRs (dog days of the summer these aren't! thanks for the many contributions!), look at GSoC progress,

Re: The Computer Language Benchmarks Game

2016-08-07 Thread Isaac Gouy via Digitalmars-d
On Sunday, 7 August 2016 at 05:04:29 UTC, Walter Bright wrote: Ultimately, my opinion is that the benchmark is outdated and not useful today. I ignore it, if anybody cites the benchmark game for performance measurements. Yeah, I wouldn't bother with it, either. Rather than only being

Re: The Computer Language Benchmarks Game

2016-08-07 Thread Isaac Gouy via Digitalmars-d
On Sunday, 7 August 2016 at 13:30:27 UTC, Russel Winder wrote: In the end a bit of X10 or Chapel code running on a Blue Gene ro Cray is going to annihilate any code written in Fortran, FORTRAN, C++, C, or any other language for performance.

Re: I need a @nogc version of hashOf(). What are the options?

2016-08-07 Thread ag0aep6g via Digitalmars-d-learn
On 08/07/2016 06:42 PM, Gary Willoughby wrote: I need a @nogc version of hashOf(). Here's one i'm currently using but it's not marked as @nogc. https://github.com/dlang/druntime/blob/master/src/object.d#L3170 That seems to be an oversight. https://github.com/dlang/druntime/pull/1624

Re: I need a @nogc version of hashOf(). What are the options?

2016-08-07 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Sunday, 7 August 2016 at 16:42:47 UTC, Gary Willoughby wrote: I need a @nogc version of hashOf(). Here's one i'm currently using but it's not marked as @nogc. https://github.com/dlang/druntime/blob/master/src/object.d#L3170 What are the options now? Is there anything D offers that I could

Re: Battle-plan for CTFE

2016-08-07 Thread Stefan Koch via Digitalmars-d-announce
On Saturday, 6 August 2016 at 23:04:48 UTC, Stefan Koch wrote: On Saturday, 6 August 2016 at 19:07:10 UTC, Rory McGuire wrote: Hi Stefan, Are you saying we can play around with ascii string slicing/appending already? No, not now, but very soon. I want to have _basic_ utf8 support before I

I need a @nogc version of hashOf(). What are the options?

2016-08-07 Thread Gary Willoughby via Digitalmars-d-learn
I need a @nogc version of hashOf(). Here's one i'm currently using but it's not marked as @nogc. https://github.com/dlang/druntime/blob/master/src/object.d#L3170 What are the options now? Is there anything D offers that I could use? I need a function that takes a variable of any type and

[Issue 16360] New: DMD fails to inline functions that contain a type

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16360 Issue ID: 16360 Summary: DMD fails to inline functions that contain a type Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-07 Thread deadalnix via Digitalmars-d
On Saturday, 6 August 2016 at 09:35:32 UTC, Walter Bright wrote: On 8/6/2016 1:21 AM, Ilya Yaroshenko wrote: We need 2 new pragmas with the same syntax as `pragma(inline, xxx)`: 1. `pragma(fusedMath)` allows fused mul-add, mul-sub, div-add, div-sub operations. 2. `pragma(fastMath)`

[Issue 14855] -cov should ignore assert(0)

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

Re: The Computer Language Benchmarks Game

2016-08-07 Thread Russel Winder via Digitalmars-d
On Sat, 2016-08-06 at 22:04 -0700, Walter Bright via Digitalmars-d wrote: > On 8/5/2016 7:02 AM, qznc wrote: > > > > Ultimately, my opinion is that the benchmark is outdated and not > > useful today. I > > ignore it, if anybody cites the benchmark game for performance > > measurements. > > Yeah,

[Issue 16356] cdouble is broken

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16356 --- Comment #3 from greensunn...@gmail.com --- The deprecation of builtin complex types is WIP - see e.g. this PR for more info: https://github.com/dlang/dmd/pull/5731 --

Re: Autotesting dub packages with dmd nightly

2016-08-07 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Saturday, 6 August 2016 at 20:00:53 UTC, Basile B. wrote: On Saturday, 6 August 2016 at 19:06:34 UTC, Sebastiaan Koppe wrote: - code.dlang.org has an api but doesn't provide an endpoint to retrieve all packages/version. Now I just scrape the site instead (thanks Adam for your dom

Re: Autotesting dub packages with dmd nightly

2016-08-07 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Saturday, 6 August 2016 at 19:46:52 UTC, Seb wrote: That are excellent news! Thanks. 1) Send the packages a notification about the build error (e.g. Github comment) - this should probably be tweaked a bit, s.t. it doesn't spam too often for still broken packages I was thinking about

[Issue 16085] wrong visibility warning for overloaded alias symbol

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #11 from Martin Nowak --- (In reply to Walter Bright from comment #10) > This is the equivalent of: > > alias reallocate = whatever.reallocate; > > I.e. an actual alias is generated. The alias is not hidden. The

Re: Dreams come true: Compiling and running linux apps on windows :)

2016-08-07 Thread Zardoz via Digitalmars-d-announce
On Sunday, 7 August 2016 at 08:07:37 UTC, Andre Pany wrote: On Sunday, 7 August 2016 at 03:06:27 UTC, Martin Nowak wrote: Good news, I'm really not that keen to write a powershell script. What OS does it detect and download? I am not sure how to get this information. The windows

[Issue 16359] New: Mangling of const static arrays does not match C++

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16359 Issue ID: 16359 Summary: Mangling of const static arrays does not match C++ Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

[Issue 16359] Mangling of const static arrays does not match C++

2016-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16359 Walter Bright changed: What|Removed |Added Keywords||C++ --

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-07 Thread Walter Bright via Digitalmars-d
On 8/6/2016 11:45 PM, Ilya Yaroshenko wrote: So it does make sense that allowing fused operations would be equivalent to having no maximum precision. Fused operations are mul/div+add/sub only. Fused operations does not break compesator subtraction: auto t = a - x + x; So, please, make them as

Re: Dreams come true: Compiling and running linux apps on windows :)

2016-08-07 Thread Dicebot via Digitalmars-d-announce
On Sunday, 7 August 2016 at 03:06:27 UTC, Martin Nowak wrote: On Saturday, 6 August 2016 at 17:34:14 UTC, Andre Pany wrote: The build script is working fine: curl -fsS https://dlang.org/install.sh | bash -s dmd Good news, I'm really not that keen to write a powershell script. What OS does

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-07 Thread Iain Buclaw via Digitalmars-d
On 6 August 2016 at 22:12, David Nadlinger via Digitalmars-d wrote: > On Saturday, 6 August 2016 at 10:02:25 UTC, Iain Buclaw wrote: >> >> No pragmas tied to a specific architecture should be allowed in the >> language spec, please. > > > I wholeheartedly agree.

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-07 Thread Ilya Yaroshenko via Digitalmars-d
On Saturday, 6 August 2016 at 22:32:08 UTC, Walter Bright wrote: On 8/6/2016 3:14 PM, David Nadlinger wrote: Of course, if floating point values are strictly defined as having only a minimum precision, then folding away the rounding after the multiplication is always legal. Yup. So it does

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-07 Thread Ilya Yaroshenko via Digitalmars-d
On Saturday, 6 August 2016 at 21:56:06 UTC, Walter Bright wrote: On 8/6/2016 1:06 PM, Ilya Yaroshenko wrote: Some applications requires exactly the same results for different architectures (probably because business requirement). So this optimization is turned off by default in LDC for