Re: feature request: nim's compilation option pragmas

2016-12-17 Thread Stefan Koch via Digitalmars-d
On Sunday, 18 December 2016 at 04:46:34 UTC, Timothee Cour wrote: Could we support something similar to nim's compilation option pragmas [1]: ``` {.push checks: off.} # compile this section without runtime checks as it is speed critical # ... some code ... {.pop.} # restore old settings ```

Re: DirectX bindings

2016-12-17 Thread evilrat via Digitalmars-d-announce
On Sunday, 3 November 2013 at 05:27:24 UTC, evilrat wrote: https://github.com/evilrat666/directx-d A long awaited update - v0.10.0 is out! Be wary there is still a lot of things untested, and one may encounter access violation or random crashes. It is great to see community expanding and

[Issue 16979] Race in druntime leads to undefined behaviour

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16979 safety0ff.bugz changed: What|Removed |Added Hardware|x86_64 |All

[Issue 15939] GC.collect causes deadlock in multi-threaded environment

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15939 safety0ff.bugz changed: What|Removed |Added See Also|

[Issue 16979] New: Race in druntime leads to undefined behaviour

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16979 Issue ID: 16979 Summary: Race in druntime leads to undefined behaviour Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

feature request: nim's compilation option pragmas

2016-12-17 Thread Timothee Cour via Digitalmars-d
Could we support something similar to nim's compilation option pragmas [1]: ``` {.push checks: off.} # compile this section without runtime checks as it is speed critical # ... some code ... {.pop.} # restore old settings ``` in D could look like: ``` pragma(push, "-noboundscheck -O -release");

Re: Linux Kernel in D?

2016-12-17 Thread lobo via Digitalmars-d
On Sunday, 18 December 2016 at 03:05:13 UTC, Whatsthisnow wrote: On Sunday, 18 December 2016 at 00:10:47 UTC, sarn wrote: [...] I am basing the kernel on Linux because, well, I like Linux, and its the only complete kernel with free source that I currently know of. Given that it is widely

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

2016-12-17 Thread pineapple via Digitalmars-d
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 just don't see any argument for it,

Re: Linux Kernel in D?

2016-12-17 Thread Whatsthisnow via Digitalmars-d
On Sunday, 18 December 2016 at 03:05:13 UTC, Whatsthisnow wrote: I am basing the kernel on Linux because, well, I like Linux, and its the only complete kernel with free source that I currently know of. Given that it is widely Used as an OS kernel, it kinda made sense to port it, give it a new

Re: Linux Kernel in D?

2016-12-17 Thread Whatsthisnow via Digitalmars-d
On Sunday, 18 December 2016 at 00:10:47 UTC, sarn wrote: On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? Depends on how strictly you want to reimplement GNU/Linux, or whether

Re: Linux Kernel in D?

2016-12-17 Thread Whatsthisnow via Digitalmars-d
On Saturday, 17 December 2016 at 17:19:55 UTC, Jesse Phillips wrote: On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? I think the project should have started with a fork of the

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

2016-12-17 Thread Chris Wright via Digitalmars-d
On Sat, 17 Dec 2016 19:34:12 -0500, Andrei Alexandrescu wrote: > Most of these have been the case with all C++ and D projects I've been > involved with at Facebook. I've had similar frustrations when using C# without an IDE (which is a problem because it encourages larger namespaces), and

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

2016-12-17 Thread Andrei Alexandrescu via Digitalmars-d
On 12/17/2016 02:34 PM, Chris Wright wrote: Just looking at this again: The obvious workaround to the problem that dependencies must be module- level is to simply define many small modules---in the extreme, one per declaration. Andrei works in phobos a lot. Phobos has a lot of large modules.

Re: Linker-hacking out the D runtime

2016-12-17 Thread Iain Buclaw via Digitalmars-d-announce
On 18 December 2016 at 01:04, sarn via Digitalmars-d-announce wrote: > As it stands, the -betterC flag is still immature and only removes a bit of > the D runtime. -betterC removes module info and module helpers, not the D runtime. You will find it in gdc

Re: Linux Kernel in D?

2016-12-17 Thread sarn via Digitalmars-d
On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? Depends on how strictly you want to reimplement GNU/Linux, or whether something Posix-y is enough. Anyway, a D "libc" would be

Linker-hacking out the D runtime

2016-12-17 Thread sarn via Digitalmars-d-announce
As it stands, the -betterC flag is still immature and only removes a bit of the D runtime. I've been playing around a bit to see what could be possible. To do that, I've had to do some linker hacking to make code that's completely free of D runtime dependencies. I thought I'd write

Re: Accessing members through pointers to structs (also, CTFE associative arrays)

2016-12-17 Thread Ali via Digitalmars-d-learn
On Friday, 16 December 2016 at 01:48:59 UTC, Ali Çehreli wrote: On 12/15/2016 05:30 PM, Stefan Koch wrote: On Thursday, 15 December 2016 at 19:30:08 UTC, Ali Çehreli wrote: Yeah, I think the compiler is confused because the function is called in a non-const context during the initialization

Re: Using tango with dub

2016-12-17 Thread Soulsbane via Digitalmars-d-learn
On Saturday, 17 December 2016 at 20:26:53 UTC, albert-j wrote: I thought Tango was obsolete a long time ago. Is there a specific reason you need to use Tango and can't use Phobos? I need a Set implementation and from what I understand there isn't one in Phobos right now? Have you seen

Re: Using tango with dub

2016-12-17 Thread albert-j via Digitalmars-d-learn
I thought Tango was obsolete a long time ago. Is there a specific reason you need to use Tango and can't use Phobos? I need a Set implementation and from what I understand there isn't one in Phobos right now?

Re: Using tango with dub

2016-12-17 Thread bauss via Digitalmars-d-learn
On Saturday, 17 December 2016 at 15:46:20 UTC, albert-j wrote: I am trying to use Tango in a dub project because I need a HashSet. I added Tango as a dependency to the dub.json, but now dub gives me a bunch of depreciation warnings and a few errors, like

Re: Using tango with dub

2016-12-17 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-17 16:51, albert-j wrote: Since I just do "dub build", I assume it invokes dmd? I have v2.072.0. Try an older version. -- /Jacob Carlborg

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

2016-12-17 Thread Chris Wright via Digitalmars-d
Just looking at this again: > The obvious workaround to the problem that dependencies must be module- > level is to simply define many small modules---in the extreme, one per > declaration. Andrei works in phobos a lot. Phobos has a lot of large modules. For instance, std.datetime is 35,000

Re: Cryptic C function pointer for conversion

2016-12-17 Thread bachmeier via Digitalmars-d-learn
On Saturday, 17 December 2016 at 15:15:26 UTC, data pulverizer wrote: Does this mean that you can translate C code to D natively? I am currently only aware of the dstep package. It may not help you, but something I've done in the past is use Swig to create a Common Lisp interface. It

Re: d***@*******

2016-12-17 Thread Swoorup Joshi via Digitalmars-d
On Saturday, 17 December 2016 at 16:46:24 UTC, hacker wrote: I am hacker So.. ?

Re: Linux Kernel in D?

2016-12-17 Thread Suliman via Digitalmars-d
On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? Linux is too bloated and there is no any reasons to re-implement it.

Re: Linux Kernel in D?

2016-12-17 Thread Jesse Phillips via Digitalmars-d
On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? I think the project should have started with a fork of the official source and should always build a working kernel, making

d***@*******

2016-12-17 Thread hacker via Digitalmars-d
I am hacker

Re: unDE 0.1.0: original file manager, image and text viewer

2016-12-17 Thread thedeemon via Digitalmars-d-announce
On Thursday, 15 December 2016 at 20:16:10 UTC, unDEFER wrote: Hello, my dear friends! So many days you answers on many my questions. And today I glad to present my work: unDE 0.1.0. It is very original file manager, image and text viewer. More information:

[Issue 16978] [REG2.072.0] pragma(lib) is broken with rdmd

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16978 Vladimir Panteleev changed: What|Removed |Added Keywords||pull ---

[Issue 14296] RDMD fails at building a lib when the source is in a subdir

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14296 Vladimir Panteleev changed: What|Removed |Added Keywords||pull ---

[Issue 16962] rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 Vladimir Panteleev changed: What|Removed |Added Keywords||pull ---

Re: Using tango with dub

2016-12-17 Thread albert-j via Digitalmars-d-learn
Since I just do "dub build", I assume it invokes dmd? I have v2.072.0.

Re: Using tango with dub

2016-12-17 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-17 16:46, albert-j wrote: I am trying to use Tango in a dub project because I need a HashSet. I added Tango as a dependency to the dub.json, but now dub gives me a bunch of depreciation warnings and a few errors, like

Using tango with dub

2016-12-17 Thread albert-j via Digitalmars-d-learn
I am trying to use Tango in a dub project because I need a HashSet. I added Tango as a dependency to the dub.json, but now dub gives me a bunch of depreciation warnings and a few errors, like ../../../.dub/packages/tango-1.0.3_2.068/tango/tango/util/log/Log.d(349,51): Error: undefined

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

2016-12-17 Thread Jacob Carlborg via Digitalmars-d
On 2016-12-13 23:33, Andrei Alexandrescu wrote: Destroy. https://github.com/dlang/DIPs/pull/51/files A couple of questions. 1. The text says: "void process(File input) import (std.stdio); With this syntax, the import is executed only if the declared name is actually looked up." Is

Re: Cryptic C function pointer for conversion

2016-12-17 Thread ketmar via Digitalmars-d-learn
p.s.: that means that i didn't really *decoded* that declaration, just brute-forced someting that c++ compiler happily accepts. so take it with a grain of salt. ;-)

Re: Cryptic C function pointer for conversion

2016-12-17 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 17 December 2016 at 14:06:07 UTC, ketmar wrote: On Saturday, 17 December 2016 at 13:39:27 UTC, data pulverizer wrote: that is what it means, in D: //void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); struct sqlite3_vfs {} extern(C) { alias RetRes = void

Re: Cryptic C function pointer for conversion

2016-12-17 Thread ketmar via Digitalmars-d-learn
On Saturday, 17 December 2016 at 15:15:26 UTC, data pulverizer wrote: Does this mean that you can translate C code to D natively? I am currently only aware of the dstep package. with my head and bare hands. well, armed with some regular expressions. did you seen some of my "port"

Re: Cryptic C function pointer for conversion

2016-12-17 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 17 December 2016 at 14:06:07 UTC, ketmar wrote: that is what it means, in D: //void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); struct sqlite3_vfs {} extern(C) { alias RetRes = void function (); alias DeclType = RetRes function (sqlite3_vfs *a,void *b, const

Re: concepts v0.0.1

2016-12-17 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-12-16 21:51, Atila Neves wrote: Since my phobos PR for better static assertions was clearly never getting merged (https://github.com/dlang/phobos/pull/3677), I moved the code to dub instead: http://code.dlang.org/packages/concepts Basically, as long as you pair up your template

[Issue 16978] [REG2.072.0] pragma(lib) is broken with rdmd

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16978 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 16962] rdmd --build-only --force -c main.d fails: ./main: No such file or directory

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16962 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 16978] New: [REG2.072.0] pragma(lib) is broken with rdmd

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16978 Issue ID: 16978 Summary: [REG2.072.0] pragma(lib) is broken with rdmd Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: regression

Re: Cryptic C function pointer for conversion

2016-12-17 Thread ketmar via Digitalmars-d-learn
On Saturday, 17 December 2016 at 13:39:27 UTC, data pulverizer wrote: that is what it means, in D: //void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); struct sqlite3_vfs {} extern(C) { alias RetRes = void function (); alias DeclType = RetRes function (sqlite3_vfs *a,void

Cryptic C function pointer for conversion

2016-12-17 Thread data pulverizer via Digitalmars-d-learn
I have come across a function pointer in C that I am attempting to convert, and am not sure what the current interpretation is: ``` \\ The C Code: void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); ``` The best I can tell is that this is a function pointer that returns a

[Issue 16595] thisExePath resolves symlinks but this isn't mentioned in docs

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16595 --- Comment #9 from Jacob Carlborg --- I think we're misunderstanding each other. A potential thisExePathUnresolved function, you obliviously don't that to resolve symbolic links, correct? Do you want that to return the absolute path?

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

2016-12-17 Thread Walter Bright via Digitalmars-d
On 12/16/2016 11:59 AM, Andrei Alexandrescu wrote: Soon the naive approach "let's replace this import with a static import and rebuild" ran into the midst of a comedy of errors. Code in various other modules fails to compile. Sometimes (happy case) the error indicates the symbol that is not

[Issue 16977] bad debug info for function default arguments

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16977 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #1

[Issue 16977] New: bad debug info for function default arguments

2016-12-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16977 Issue ID: 16977 Summary: bad debug info for function default arguments Product: D Version: D2 Hardware: All OS: Windows Status: NEW Keywords: symdeb

Re: CTFE Status

2016-12-17 Thread Stefan Koch via Digitalmars-d
On Saturday, 17 December 2016 at 08:53:07 UTC, Stefan Koch wrote: Miscompiling phobos code is down to 4 functions. std.range.primitives.{front, empty, back} and std.traits.defaultParameters. Note, StructLiterals are still regressed. I am looking into it. Fixed the regression. It was an

Re: CTFE Status

2016-12-17 Thread Stefan Koch via Digitalmars-d
Miscompiling phobos code is down to 4 functions. std.range.primitives.{front, empty, back} and std.traits.defaultParameters. Note, StructLiterals are still regressed. I am looking into it.

Re: [OT] D in makefiles

2016-12-17 Thread John Colvin via Digitalmars-d
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 you define SHELL = rdmd you might not