Re: Template version of ANSI color code lib useful?

2017-10-14 Thread Shriramana Sharma via Digitalmars-d
On Saturday, 14 October 2017 at 17:17:41 UTC, Petar Kirov [ZombineDev] wrote: Why not simply add extern (C) wrappers for your D code? I see no point of using C, unless you want to be portable to arcane architectures. With this approach you'll have both the portability of C and the advantages

Re: Template version of ANSI color code lib useful?

2017-10-14 Thread Shriramana Sharma via Digitalmars-d
On Saturday, 14 October 2017 at 14:51:12 UTC, Adam D. Ruppe wrote: My terminal.d works with most that stuff. Yes I did look into existing solutions. Mainly my desire was not to work in D alone but something available at command line and as a library for shell-scripts and other languages too.

[Issue 15538] [REG 2.064] wrong code with switch

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15538 --- Comment #13 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ef56ed9f8e2d778de2396bde91d34b407e02248d fix Issue 15538 - [REG 2.064] wrong code with switch

[Issue 15538] [REG 2.064] wrong code with switch

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15538 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17899] New: Cannot initialise contextless delegate at compile time

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17899 Issue ID: 17899 Summary: Cannot initialise contextless delegate at compile time Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Proposal: Object/?? Destruction

2017-10-14 Thread Steven Schveighoffer via Digitalmars-d
Sorry for waiting so long to respond, I had to think about this a lot... On 10/12/17 3:05 PM, Timon Gehr wrote: On 10.10.2017 17:05, Steven Schveighoffer wrote: On 10/9/17 11:22 AM, Timon Gehr wrote: On 09.10.2017 01:20, Steven Schveighoffer wrote: My questioning comes with this: void

Re: debugging in vs code on Windows

2017-10-14 Thread Heromyth via Digitalmars-d-learn
On Saturday, 14 October 2017 at 19:01:52 UTC, piotrklos wrote: On Saturday, 14 October 2017 at 13:12:51 UTC, Jerry wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) If you use generate a 32-bit binary using DMD, it generates it in a format that the C/C++ extension

Re: Proposal: Object/?? Destruction

2017-10-14 Thread sarn via Digitalmars-d
On Saturday, 14 October 2017 at 22:20:46 UTC, Q. Schroll wrote: Therefore, and because of brackets, you can distinguish f(1, 2) from f([1, 2]). But in f([1, 2]), it's ambiguous (just by parsing) whether [1, 2] is a tuple literal or a dynamic array literal. You'd need to use a prefix or

Re: D on quora ...

2017-10-14 Thread Adam Wilson via Digitalmars-d
On 10/7/17 14:08, Laeeth Isharc wrote: On 10/6/2017 10:19 PM, Adam Wilson via Digitalmars-d wrote: > What if we stop focusing on the C/C++ people so much? The > like their tools and have no perceivable interest in moving > away from them (Stockholm Syndrome much?). The arguments the > use are

Re: Proposal: Object/?? Destruction

2017-10-14 Thread Q. Schroll via Digitalmars-d
I've thought about tuples and stuff for a while. For tuples, I'll use [brackets]. Reasons follow. Homogeneous tuples are repetitions of some single type. We have them today in form of static arrays. We could allow "inhomogeneous arrays" and call them tuples. T[n] is then an alias for [T, T,

Re: Assert and undefined behavior

2017-10-14 Thread kdevel via Digitalmars-d-learn
On Saturday, 14 October 2017 at 09:32:32 UTC, Timon Gehr wrote: Also, UB can and does sometimes mean that the program can execute arbitrary code. It's called "arbitrary code execution": https://en.wikipedia.org/wiki/Arbitrary_code_execution This confuses different levels of reasoning. In

Re: debugging in vs code on Windows

2017-10-14 Thread Jerry via Digitalmars-d-learn
On Saturday, 14 October 2017 at 19:01:52 UTC, piotrklos wrote: On Saturday, 14 October 2017 at 13:12:51 UTC, Jerry wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) If you use generate a 32-bit binary using DMD, it generates it in a format that the C/C++ extension

Re: D on quora ...

2017-10-14 Thread Adam Wilson via Digitalmars-d
On 10/6/17 23:19, Brad Roberts wrote: On 10/6/2017 10:19 PM, Adam Wilson via Digitalmars-d wrote: What if we stop focusing on the C/C++ people so much? The like their tools and have no perceivable interest in moving away from them (Stockholm Syndrome much?). The arguments the use are primarily

Re: Implicit Constructors

2017-10-14 Thread Q. Schroll via Digitalmars-d
On Friday, 13 October 2017 at 14:50:44 UTC, Adam D. Ruppe wrote: [snip] But actually, I really wish D just had implicit ctors on the types themselves. I think C++'s mistake was that implicit was the default, and you have to write `explicit`. If we did the opposite, where implicit was opt in,

Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Saturday, 14 October 2017 at 13:12:51 UTC, Jerry wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) If you use generate a 32-bit binary using DMD, it generates it in a format that the C/C++ extension doesn't understand. You need to compile -m32mscoff or -m64, and

Re: Implicit Constructors

2017-10-14 Thread Q. Schroll via Digitalmars-d
On Friday, 13 October 2017 at 13:01:48 UTC, Steven Schveighoffer wrote: On 10/12/17 7:57 PM, Q. Schroll wrote: We have some sort of implicit construction already. Weirdly, it's reserved for classes. Just look at this:     class C { this(int x) { } }     void foo(C c ...) { }     void

Re: Vibrant 2.0, major update

2017-10-14 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 13 February 2017 at 22:57:18 UTC, Ali Çehreli wrote: All interesting stuff! Look how much interest the self-important idiom received, which the original author had thought to be a trivial matter: https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ A

Re: Vibrant 2.0, major update

2017-10-14 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 13 February 2017 at 22:57:18 UTC, Ali Çehreli wrote: All interesting stuff! Look how much interest the self-important idiom received, which the original author had thought to be a trivial matter: https://www.reddit.com/r/programming/comments/5tt33y/a_new_import_idiom_for_d/ A

Re: DIP 1009 Status ?

2017-10-14 Thread Andrei Alexandrescu via Digitalmars-d
On 10/11/17 9:09 PM, Mike Parker wrote: On Thursday, 12 October 2017 at 00:38:37 UTC, Moritz Maxeiner wrote: As it has been a while since I've seen an update on DIP 1009 I'd like to ask what the current status of it is: Has it been closed for feedback and the second stage (submission to

[Issue 17870] recursive template "T is nested in both"

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17870 dl...@ryanjframe.com changed: What|Removed |Added CC||dl...@ryanjframe.com --

Re: Template version of ANSI color code lib useful?

2017-10-14 Thread Petar via Digitalmars-d
On Saturday, 14 October 2017 at 14:35:53 UTC, Shriramana Sharma wrote: Hello. I prepared a utility/library to output ANSI escape codes for terminal text attributes with capabilities as advertised at https://sites.google.com/site/jamadagni/files/temp/textattr-usage.html. (AFAIK this set of

Re: debugging in vs code on Windows

2017-10-14 Thread Jerry via Digitalmars-d-learn
On Saturday, 14 October 2017 at 14:23:34 UTC, piotrklos wrote: On Saturday, 14 October 2017 at 13:20:27 UTC, Jerry wrote: On Saturday, 14 October 2017 at 10:15:53 UTC, evilrat wrote: webfreak's NativeDebug extension to be able to click to set breakpoint on lines(only for that). You can

Re: Two way struct wrapper

2017-10-14 Thread drug via Digitalmars-d-learn
14.10.2017 16:23, Alex пишет: On Saturday, 14 October 2017 at 12:39:17 UTC, Alex wrote: ok, the last version for now. Without assumptions on alias number. Sorry for noise. https://run.dlang.io/is/OSJYtY That's cool, but unfortunately demands access to source code of Foo, it's not my case( I

Re: Template version of ANSI color code lib useful?

2017-10-14 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 14 October 2017 at 14:35:53 UTC, Shriramana Sharma wrote: Hello. I prepared a utility/library to output ANSI escape codes for terminal text attributes with capabilities as advertised at https://sites.google.com/site/jamadagni/files/temp/textattr-usage.html. (AFAIK this set of

Re: DIP88 Named Parameters, Status?

2017-10-14 Thread Andrei Alexandrescu via Digitalmars-d
On 10/01/2017 06:51 AM, Petar Kirov [ZombineDev] wrote: On Sunday, 1 October 2017 at 01:54:24 UTC, Jonathan Marler wrote: On Saturday, 30 September 2017 at 22:37:31 UTC, Jonathan M Davis wrote: On Saturday, September 30, 2017 16:57:09 solidstate1991 via Digitalmars-d wrote: On Saturday, 30

Template version of ANSI color code lib useful?

2017-10-14 Thread Shriramana Sharma via Digitalmars-d
Hello. I prepared a utility/library to output ANSI escape codes for terminal text attributes with capabilities as advertised at https://sites.google.com/site/jamadagni/files/temp/textattr-usage.html. (AFAIK this set of capabilities does not exist already in any existing package.) This was

Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Saturday, 14 October 2017 at 13:20:27 UTC, Jerry wrote: On Saturday, 14 October 2017 at 10:15:53 UTC, evilrat wrote: webfreak's NativeDebug extension to be able to click to set breakpoint on lines(only for that). You can just use VS Code setting, put the following into your

Re: Two way struct wrapper

2017-10-14 Thread Alex via Digitalmars-d-learn
On Saturday, 14 October 2017 at 12:39:17 UTC, Alex wrote: ok, the last version for now. Without assumptions on alias number. Sorry for noise. https://run.dlang.io/is/OSJYtY

Re: debugging in vs code on Windows

2017-10-14 Thread Jerry via Digitalmars-d-learn
On Saturday, 14 October 2017 at 10:15:53 UTC, evilrat wrote: webfreak's NativeDebug extension to be able to click to set breakpoint on lines(only for that). You can just use VS Code setting, put the following into your settings.json: "debug.allowBreakpointsEverywhere": true

Re: debugging in vs code on Windows

2017-10-14 Thread Jerry via Digitalmars-d-learn
On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: I have windows 10, VS Code with code-d and C/C++ language extensions. I try to debug but it doesn't work. In particular, the debugging doesn't stop on breakpoints. It exits immediately. I recompile with -m64 and -g. I use dub to

Re: Is there an opposite of .toString()?

2017-10-14 Thread myst via Digitalmars-d-learn
On Saturday, 14 October 2017 at 03:47:29 UTC, Jonathan M Davis wrote: The function to use for conversions in general is std.conv.to. And really, there isn't much of a reason to ever call toString. Functions like writeln, format, and to may use it internally, but it's more or less an

Re: Two way struct wrapper

2017-10-14 Thread Alex via Digitalmars-d-learn
On Saturday, 14 October 2017 at 11:25:20 UTC, Alex wrote: of course, with the proper operator in line 32 return T(mixin("this" ~ op ~ "f")); https://run.dlang.io/is/jGKVYN

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Ecstatic Coder via Digitalmars-d
On Saturday, 14 October 2017 at 10:48:40 UTC, Joakim wrote: On Saturday, 14 October 2017 at 08:52:54 UTC, Ecstatic Coder wrote: On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close

Re: Very tiny script for testing D projects with Pijul version control system.

2017-10-14 Thread Suliman via Digitalmars-d-announce
Here is Windows .bat file that complete uploading project to server with SSH: upload.bat: @echo off for %%a in ("%cd%") do set folder=%%~na winscp.com /command "open sftp://root:PassW0rd@127.0.0.1:; "put latest.tar.gz /code/%folder%/" "exit" Local folder name should be same with remote

[Issue 17898] Segfault in compile with -deps and -unittest

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17898 --- Comment #1 from Saurabh Das --- PS: This is also observed in DMD 2.075.1 but not on DMD 2.074.1 --

Re: Two way struct wrapper

2017-10-14 Thread Alex via Digitalmars-d-learn
On Wednesday, 11 October 2017 at 12:35:51 UTC, drug wrote: Using `alias this` it's easy to make wrapper for structure that calls wrapped structure methods like its own. This is one way - from wrapper to wrapped transformation. Is it possible to create the opposite way from wrapped to wrapper?

Re: Huge increase in UT compile time

2017-10-14 Thread Saurabh Das via Digitalmars-d-learn
On Saturday, 14 October 2017 at 09:03:05 UTC, Joakim wrote: On Saturday, 14 October 2017 at 04:36:25 UTC, Saurabh Das wrote: [...] I can reproduce on linux/x64, looks like a memory leak, as dmd balloons out to eat up all available memory until it's killed. I see it with this minimal

[Issue 17898] New: Segfault in compile with -deps and -unittest

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17898 Issue ID: 17898 Summary: Segfault in compile with -deps and -unittest Product: D Version: D2 Hardware: x86 OS: All Status: NEW Severity: regression

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Joakim via Digitalmars-d
On Saturday, 14 October 2017 at 08:52:54 UTC, Ecstatic Coder wrote: On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of

Re: debugging in vs code on Windows

2017-10-14 Thread evilrat via Digitalmars-d-learn
On Saturday, 14 October 2017 at 07:40:31 UTC, piotrklos wrote: On Friday, 13 October 2017 at 17:04:00 UTC, kerdemdemir wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) I am using VisualD(https://github.com/dlang/visuald/releases) with vs2015 community version(free)

Re: Assert and undefined behavior

2017-10-14 Thread Timon Gehr via Digitalmars-d-learn
On 14.10.2017 07:20, Jesse Phillips wrote: On Thursday, 12 October 2017 at 15:37:23 UTC, John Burton wrote: This is an example of what I mean :- undefined what it is meant to do anyway, so the compiler can "optimize" out the if condition as it only affects the case where the language

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2017 1:52 AM, Ecstatic Coder wrote: On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of Javascript:

[Issue 17893] [REG 2.076.1] contract in templatized final class require nothrow

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17893 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/185fa004c8292214371b841b8f4fd2c5a6dfa2b8 Merge pull request #7208 from ibuclaw/issue17893 Fix 17893:

Re: Huge increase in UT compile time

2017-10-14 Thread Joakim via Digitalmars-d-learn
On Saturday, 14 October 2017 at 04:36:25 UTC, Saurabh Das wrote: On Wednesday, 11 October 2017 at 08:11:37 UTC, Jonathan M Davis wrote: On Wednesday, October 11, 2017 06:25:19 Dhananjay via Digitalmars-d-learn wrote: Hello, I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results on

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Ecstatic Coder via Digitalmars-d
On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of Javascript: https://github.com/DigitalMars/DMDScript What about a

Very tiny script for testing D projects with Pijul version control system.

2017-10-14 Thread Suliman via Digitalmars-d-announce
GIT IMHO very heavy for tiny projects. And I decided to try http://pijul.com/ I am developing on Windows, but I need to test code on Linux. So I did very simple tool-chain: Developing on Windows. Making package with command: `pijul dist -d latest` Syncing code to Linux VPS/VirtualBox instance

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Marco Leise via Digitalmars-d
Am Fri, 13 Oct 2017 17:57:12 + schrieb John Gabriele : > Why do you choose Lua? Whatever replaces Javascript (and compiles > to wasm) will be used for large apps, like how Javascript is > currently used. My understanding is that Lua is not particularly > well suited

Re: D on quora ...

2017-10-14 Thread Ecstatic Coder via Digitalmars-d
On Friday, 6 October 2017 at 20:17:33 UTC, Jonathan M Davis wrote: On Friday, October 06, 2017 17:14:51 Rion via Digitalmars-d wrote: https://www.quora.com/What-is-your-review-of-D-programming-language It seems that D still has the GC being mentioned up to today. Maybe its better to move the

Re: D's open source approach

2017-10-14 Thread Ecstatic Coder via Digitalmars-d
On Thursday, 12 October 2017 at 11:32:55 UTC, jmh530 wrote: On Thursday, 12 October 2017 at 07:54:19 UTC, Joakim wrote: By the reasoning in the essay, I don't expect this to be solved for free: the solution is for the devs behind the IDEs, Visual Studio, DlangIDE, etc., to charge money for a

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2017 12:54 AM, Dmitry Olshansky wrote: On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of Javascript:

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Dmitry Olshansky via Digitalmars-d
On Saturday, 14 October 2017 at 07:45:06 UTC, Walter Bright wrote: On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of Javascript: https://github.com/DigitalMars/DMDScript The surprising

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Ecstatic Coder via Digitalmars-d
On Monday, 19 June 2017 at 01:57:00 UTC, Laeeth Isharc wrote: On Sunday, 18 June 2017 at 23:11:25 UTC, rikki cattermole wrote: On 18/06/2017 5:29 PM, Meta wrote: We should be careful not to make *too* close a comparison. While Javascript is a necessary evil for web applications and some

Re: Advertise D's great compatibilty with JavaScript

2017-10-14 Thread Walter Bright via Digitalmars-d
On 6/18/2017 3:38 AM, Ecstatic Coder wrote: Something I really appreciate a lot with D is how close it is to JavaScript. There's also a D implementation of Javascript: https://github.com/DigitalMars/DMDScript

Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Friday, 13 October 2017 at 17:04:00 UTC, kerdemdemir wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) I am using VisualD(https://github.com/dlang/visuald/releases) with vs2015 community version(free) and I can debug. I highly recommend it if you haven't tried

[Issue 17751] Internal error: ddmd/backend/el.c 2927

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17751 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17751] Internal error: ddmd/backend/el.c 2927

2017-10-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17751 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e10b14fd2d68e9bf228e6715c733e96eece8bf5e fix Issue 17751 - Internal error: ddmd/backend/el.c 2927

Re: Assert and undefined behavior

2017-10-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, October 14, 2017 05:20:47 Jesse Phillips via Digitalmars-d- learn wrote: > The point is assert tells the compiler something it can use to > reason about its job, not that it can insert additional runtime > checks to see if you code is invalid an then add new jumps to > execute