Re: Is it possible to request a code review?

2017-12-13 Thread Ali Çehreli via Digitalmars-d
On 12/13/2017 07:57 PM, IM wrote: > - Is this the idiomatic way to define a singleton in D?: > https://gitlab.com/3d_immortal/libdtasks/blob/master/src/tasks/TaskSystem.d#L24. > I got this from Ali's book. I think you got it from Adam D. Ruppe's book. David Simcha's DConf 2013

Re: queries on druntime

2017-12-13 Thread Arun Chandrasekaran via Digitalmars-d
On Thursday, 14 December 2017 at 07:04:49 UTC, Arun Chandrasekaran wrote: Hi, What are the reasoning behind core.sync.* primitives being classes and not structs? This prevents them from being placing on shared memory. s/placing/placed/

queries on druntime

2017-12-13 Thread Arun Chandrasekaran via Digitalmars-d
Hi, What are the reasoning behind core.sync.* primitives being classes and not structs? This prevents them from being placing on shared memory.

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread Mike Franklin via Digitalmars-d-announce
On Thursday, 14 December 2017 at 06:26:16 UTC, Seb wrote: It's interesting to see that no one complained about gdc not being there - I thought that this would be the first comment. Allow me to be the first. But seriously, considering the use case for run.dlang.io, I don't see the need for

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread Seb via Digitalmars-d-announce
On Thursday, 14 December 2017 at 02:57:42 UTC, David Nadlinger wrote: On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote: Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. Shouldn't the overhead from that be fairly manageable?

Re: Is it possible to request a code review?

2017-12-13 Thread IM via Digitalmars-d
On Thursday, 14 December 2017 at 04:12:33 UTC, rikki cattermole wrote: On 14/12/2017 3:57 AM, IM wrote: snip     - Is this the idiomatic way to define a singleton in D?: https://gitlab.com/3d_immortal/libdtasks/blob/master/src/tasks/TaskSystem.d#L24. You say singleton I think wrong. Use

Re: Is it possible to request a code review?

2017-12-13 Thread rikki cattermole via Digitalmars-d
On 14/12/2017 3:57 AM, IM wrote: snip     - Is this the idiomatic way to define a singleton in D?: https://gitlab.com/3d_immortal/libdtasks/blob/master/src/tasks/TaskSystem.d#L24. You say singleton I think wrong. Use free-functions and globals instead. Singletons are always a code smell

Re: Is it possible to request a code review?

2017-12-13 Thread IM via Digitalmars-d
On Wednesday, 13 December 2017 at 07:30:55 UTC, Jonathan M Davis wrote: On Wednesday, December 13, 2017 06:14:04 bauss via Digitalmars-d wrote: Documentation can be done like this for multiline: /** * ... * ... * etc. */ Instead of: /// ... /// ... /// etc. You can also do /** ... ...

Re: Is it possible to request a code review?

2017-12-13 Thread IM via Digitalmars-d
On Wednesday, 13 December 2017 at 07:02:47 UTC, Ali Çehreli wrote: On 12/12/2017 07:15 PM, IM wrote: I started learning D recently. Welcome! There is also the Learn newsgroup[1]. ;) Ali [1] Available through a forum interface here: http://forum.dlang.org/group/learn Thanks, I posted a

Re: Is it possible to request a code review?

2017-12-13 Thread IM via Digitalmars-d
On Wednesday, 13 December 2017 at 06:14:04 UTC, bauss wrote: On Wednesday, 13 December 2017 at 03:15:11 UTC, IM wrote: Thanks! First thing. Generally in D module names are kept lower-case. To give an example your: AbstractTaskRunner.d module tasks.AbstractTaskRunner; Would usually be:

Ddoc and struct members

2017-12-13 Thread n00nb via Digitalmars-d-learn
Hi all! How do I generate documentation for struct members using ddoc? I don't understand if there is a way to generate documentation for all the members without putting a '///' over every member

Re: Ddoc and struct members

2017-12-13 Thread rikki cattermole via Digitalmars-d-learn
On 14/12/2017 3:16 AM, n00nb wrote: Hi all! How do I generate documentation for struct members using ddoc? I don't understand if there is a way to generate documentation for all the members without putting a '///' over every member There isn't.

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread David Nadlinger via Digitalmars-d-announce
On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote: Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. Shouldn't the overhead from that be fairly manageable? After all, the last layer would only be as large as a single DMD/LDC

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Dec 13, 2017 at 04:59:00PM -0800, H. S. Teoh via Digitalmars-d-announce wrote: [...] > Sadly, `dmd - -run` currently doesn't quite work just yet. I should look > into fixing that. And *then* we wouldn't need to invent a temporary > filename for the executable in our keybinding. [...]

[Issue 18076] dmd -run should work with `-` (stdin) too

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18076 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #1 from

[Issue 11133] ddoc: documented unittest outside of version scope

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11133 --- Comment #4 from Jonathan M Davis --- Related: https://issues.dlang.org/show_bug.cgi?id=18077 --

[Issue 18077] New: Documentation duplicated when example is inside static if or version

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18077 Issue ID: 18077 Summary: Documentation duplicated when example is inside static if or version Product: D Version: D2 Hardware: All OS: All Status:

Re: How to catch line number of exception without catching it ?

2017-12-13 Thread codephantom via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 18:24:09 UTC, Thomas wrote: Or is there a better solution for tracing the error position from root till the branch ? Speaking of tracing exceptions, here's my favourite one .. so far ;-) (I mean come on.. debugging is great fun!) btw. If you compile/run

[Issue 11133] ddoc: documented unittest outside of version scope

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11133 --- Comment #3 from Jonathan M Davis --- Here's an example that has the problem with static if: /// struct S(R) { /// Some docs static if(is(R == string)) alias S = R; else alias S = int;

[Issue 11133] ddoc: documented unittest outside of version scope

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11133 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 18076] New: dmd -run should work with `-` (stdin) too

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18076 Issue ID: 18076 Summary: dmd -run should work with `-` (stdin) too Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

[Issue 17985] Implement -stdin for rdmd

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17985 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

can't use ldc calypso on OSX; help needed

2017-12-13 Thread Timothee Cour via Digitalmars-d
Has anyone used https://github.com/Syniurge/Calypso on OSX? I'm running into a basic issue : https://github.com/Syniurge/Calypso/issues/60 which makes any binary crash immediately Making Calypso work would make integration with C++ libraries much easier, so it's rather important for dlang.

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Dec 14, 2017 at 12:22:15AM +, Meta via Digitalmars-d-announce wrote: > On Wednesday, 13 December 2017 at 00:54:07 UTC, H. S. Teoh wrote: > > On Wed, Dec 13, 2017 at 12:50:40AM +, Meta via > > Digitalmars-d-announce wrote: > > > On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb

[Issue 18075] New: DDOC_CONSTRAINT macro not applied to constraints that aren't on functions

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18075 Issue ID: 18075 Summary: DDOC_CONSTRAINT macro not applied to constraints that aren't on functions Product: D Version: D2 Hardware: All OS: All

[Issue 18075] DDOC_CONSTRAINT macro not applied to constraints that aren't on functions

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18075 Jonathan M Davis changed: What|Removed |Added Keywords||ddoc --

[Issue 18074] New: Struct members missing from docs when the struct has a ditto ddoc comment

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18074 Issue ID: 18074 Summary: Struct members missing from docs when the struct has a ditto ddoc comment Product: D Version: D2 Hardware: All OS: All

[Issue 18074] Struct members missing from docs when the struct has a ditto ddoc comment

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18074 Jonathan M Davis changed: What|Removed |Added Keywords||ddoc --

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread Meta via Digitalmars-d-announce
On Wednesday, 13 December 2017 at 00:54:07 UTC, H. S. Teoh wrote: On Wed, Dec 13, 2017 at 12:50:40AM +, Meta via Digitalmars-d-announce wrote: On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote: > After it has been in stealth mode for quite a while, I'm > happy to announce that

Re: `Socket.receive` providing arbitrary packet sizes and hanging without sending EOF

2017-12-13 Thread Ali Çehreli via Digitalmars-d-learn
On 12/13/2017 11:39 AM, Unazed Spectaculum wrote: > ubyte[] receiveBytes(T)(T socket, size_t receiveCount) > { > ubyte[] buffer = new ubyte[receiveCount]; > size_t count = socket.receive(buffer); Don't trust code you find on newsgroups. :o) You have to check the returned value first.

Re: Global variable type does not match previous declaration

2017-12-13 Thread Satoshi via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 21:38:49 UTC, Satoshi wrote: What means this error and how to solve it? object.d-mixin-1072(1112): Error: Global variable type does not match previous declaration with same mangled name: _D10TypeInfo_m6__initZ Actually, I'm working on OS with minimal D

Global variable type does not match previous declaration

2017-12-13 Thread Satoshi via Digitalmars-d-learn
What means this error and how to solve it? object.d-mixin-1072(1112): Error: Global variable type does not match previous declaration with same mangled name: _D10TypeInfo_m6__initZ Actually, I'm working on OS with minimal D runtime and I'm unable to compile object.d source code:

Re: LDC 1.7.0-beta1

2017-12-13 Thread kinke via Digitalmars-d-announce
On Wednesday, 13 December 2017 at 08:42:40 UTC, Suliman wrote: Is it's possible to produce x64 binaries on Windows x64 without installing Visual Studio? DMD do not have linker for x64. You could try using the llvm linker, lld, as noted in the release notes for ldc 1.5: Could you explain

[Issue 17981] DMD Nightly is broken

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17981 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

How to statically link Derelict SDL2 satellite libs

2017-12-13 Thread eskaypee via Digitalmars-d-learn
I'm on Linux 64 bit, all SDL libraries (-dev versions) are installed, dub is set up with: "dependencies": { "derelict-sdl2": "~>3.0.0-beta" }, "subConfigurations": { "derelict-sdl2": "derelict-sdl2-static" }, "libs": ["sdl2"] All the SDL core library functions

[Issue 18056] rdmd is deleted on Debian

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18056 Eugene changed: What|Removed |Added Status|NEW |RESOLVED

Re: state of ranges

2017-12-13 Thread H. S. Teoh via Digitalmars-d
On Wed, Dec 13, 2017 at 03:33:51PM -0500, Steven Schveighoffer via Digitalmars-d wrote: > On 12/13/17 2:33 PM, Jonathan M Davis wrote: [...] > The best way I think to have ranges work is to only modify them in > popFront/popBack, and the ctor. [...] I don't see anything wrong with doing work in

Re: state of ranges

2017-12-13 Thread Dukc via Digitalmars-d
On Wednesday, 13 December 2017 at 10:15:10 UTC, ag0aep6g wrote: `front` can't assume that `empty` has been called before. For a well-behaved range, `front` must work the same whether you've called `empty` or not (given that the range isn't actually empty). That last point is what I meant:

Re: Understanding how dub works

2017-12-13 Thread datboi via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole wrote: 1. Does dub compile dependencies as separate binaries? And if yes how to specify where should be they placed? Object/static files, but yes. Where they go: Windows: %APPDATA%/roaming/dub Posix: ~/.dub You don't need to

Re: state of ranges

2017-12-13 Thread Steven Schveighoffer via Digitalmars-d
On 12/13/17 2:33 PM, Jonathan M Davis wrote: On Wednesday, December 13, 2017 11:33:35 Steven Schveighoffer via Digitalmars-d wrote: I don't think there's a requirement for empty not to do any work, it just has to return the same value each time. IIRC, when this was discussed previously, it

Re: GSoC 2018 - Your project ideas

2017-12-13 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Dec 13, 2017 at 07:50:44PM +, bpr via Digitalmars-d-announce wrote: > On Tuesday, 5 December 2017 at 18:20:40 UTC, Seb wrote: [...] > Of the projects in [2], I like the general purpose betterC libraries > most, and I think it's something where students could make a real > impact in

Re: How to extract the AA type?

2017-12-13 Thread Steven Schveighoffer via Digitalmars-d
On 12/13/17 11:30 AM, jmh530 wrote: On Wednesday, 13 December 2017 at 16:00:32 UTC, Steven Schveighoffer wrote: A nice puzzle for those template gurus out there. I have a function like this: auto foo(T: V[K], V, K)(T t) {    RealAAType!(T, V, K) aa = t;    return aa; } So I need to know what

Re: How to extract the AA type?

2017-12-13 Thread Jack Applegame via Digitalmars-d
auto foo(T: V[K], V, K)(T t) { CopyConstness!(T, V[K]) aa = t; return aa; } https://run.dlang.io/is/LSMa5C

Re: state of ranges

2017-12-13 Thread H. S. Teoh via Digitalmars-d
On Wed, Dec 13, 2017 at 12:33:02PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, December 13, 2017 11:33:35 Steven Schveighoffer via > Digitalmars-d wrote: > > I don't think there's a requirement for empty not to do any work, it > > just has to return the same value each time.

Re: GSoC 2018 - Your project ideas

2017-12-13 Thread bpr via Digitalmars-d-announce
On Tuesday, 5 December 2017 at 18:20:40 UTC, Seb wrote: I am looking forward to hearing (1) what you think can be done in three months by a student and (2) will have a huge impact on the D ecosystem. Of the projects in [2], I like the general purpose betterC libraries most, and I think it's

Re: How to catch line number of exception without catching it ?

2017-12-13 Thread Nathan S. via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 18:24:09 UTC, Thomas wrote: So my question is: Is there a way to catch that line where the exception has happened without a catch ? Yes: use a debugger.

[Issue 18073] New: rdmd --eval 'int main() {return 0;}' fails to find 'std/stdiobase.d'

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18073 Issue ID: 18073 Summary: rdmd --eval 'int main() {return 0;}' fails to find 'std/stdiobase.d' Product: D Version: D2 Hardware: x86_64 OS: Mac OS X

Re: How to catch line number of exception without catching it ?

2017-12-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, December 13, 2017 18:24:09 Thomas via Digitalmars-d-learn wrote: > Hi forks! > > I wanted to ask if there is a way to catch the line position on > an exception without setting a try + catch block ? > What I want is something like this: > > > module main; > > import std.stdio; >

`Socket.receive` providing arbitrary packet sizes and hanging without sending EOF

2017-12-13 Thread Unazed Spectaculum via Digitalmars-d-learn
ubyte[] receiveBytes(T)(T socket, size_t receiveCount) { ubyte[] buffer = new ubyte[receiveCount]; size_t count = socket.receive(buffer); return buffer[0 .. count]; } string receiveAll(T)(T socket, size_t segmentSize = 1024) { ubyte[][] data; size_t count

Re: state of ranges

2017-12-13 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, December 13, 2017 11:33:35 Steven Schveighoffer via Digitalmars-d wrote: > I don't think there's a requirement for empty not to do any work, it > just has to return the same value each time. IIRC, when this was discussed previously, it was decided that you really couldn't do work

How to catch line number of exception without catching it ?

2017-12-13 Thread Thomas via Digitalmars-d-learn
Hi forks! I wanted to ask if there is a way to catch the line position on an exception without setting a try + catch block ? What I want is something like this: module main; import std.stdio; import std.conv; void foo() { scope(failure) { writeln("Got a

Re: Tuple Array Sorting

2017-12-13 Thread Vino via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 19:00:01 UTC, Biotronic wrote: On Tuesday, 12 December 2017 at 15:19:35 UTC, Vino wrote: import std.algorithm: filter, map, sort; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln; import std.typecons: Tuple,

Re: Container Array or tuples Sorting

2017-12-13 Thread Vino via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 15:58:40 UTC, Vino wrote: On Wednesday, 13 December 2017 at 15:16:50 UTC, Vino wrote: Hi All, Request your help, on how to sort a tuple container array, I have raised the same topic in one of the other thread "Tuple Array Sorting" and was addressed to use

Re: Date Formating

2017-12-13 Thread Vino via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 17:16:46 UTC, Vino wrote: On Wednesday, 13 December 2017 at 08:32:34 UTC, codephantom wrote: [...] Hi All, [...] Hi All, Thank you very much , was able to resolve the issue by changing the writefln line as below. Sorted[].sort!((a,b) =>

Re: SDL2 texture blend help

2017-12-13 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 13 December 2017 at 13:54:28 UTC, Martin Drašar wrote: Dne 13.12.2017 v 4:03 Ivan Trombley via Digitalmars-d napsal(a): On Wednesday, 13 December 2017 at 01:44:33 UTC, Dmitry wrote: On Tuesday, 12 December 2017 at 23:28:23 UTC, Ivan Trombley wrote: Here's the code that produces

Re: Date Formating

2017-12-13 Thread Vino via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 08:32:34 UTC, codephantom wrote: On Wednesday, 13 December 2017 at 07:35:40 UTC, Jonathan M Davis wrote: In general, you probably want to cast the SysTime to a DateTime if you're going to do something like that. yes, I would agree ;-) Of course the intention

Re: state of ranges

2017-12-13 Thread Steven Schveighoffer via Digitalmars-d
On 12/12/17 6:43 PM, Luís Marques wrote: On Tuesday, 12 December 2017 at 23:25:19 UTC, Neia Neutuladh wrote: Have you noticed performance problems or implementation side irregularities? Well, I was referring to things like in front() having to use code such as `if(!inited) ...; return

Re: How to extract the AA type?

2017-12-13 Thread jmh530 via Digitalmars-d
On Wednesday, 13 December 2017 at 16:00:32 UTC, Steven Schveighoffer wrote: A nice puzzle for those template gurus out there. I have a function like this: auto foo(T: V[K], V, K)(T t) { RealAAType!(T, V, K) aa = t; return aa; } So I need to know what to write RealAAType. What I'm

[Issue 18071] [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18071 --- Comment #4 from Steven Schveighoffer --- (In reply to Jack Stouffer from comment #3) > assert(0) isn't removed in release mode Right, but it's implemented as a segfault, not throwing an AssertError with a nice message. --

How to extract the AA type?

2017-12-13 Thread Steven Schveighoffer via Digitalmars-d
A nice puzzle for those template gurus out there. I have a function like this: auto foo(T: V[K], V, K)(T t) { RealAAType!(T, V, K) aa = t; return aa; } So I need to know what to write RealAAType. What I'm looking for is a mechanism to write the exact AA type that is passed in.

[Issue 18071] [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18071 --- Comment #3 from Jack Stouffer --- (In reply to Steven Schveighoffer from comment #2) > (In reply to Jack Stouffer from comment #1) > > The first example can be fixed by having `byValue.front` and > > `byValue.popFront` do

Re: GUI program on Mac OS in D?

2017-12-13 Thread mrphobby via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 15:17:59 UTC, Jacob Carlborg wrote: I forgot to mention that there have been several discussions around adding support for reference counted classes. Several of the mentioning interfacing with Objective-C is important/a requirement. Ok, good to know! I have

Re: Container Array or tuples Sorting

2017-12-13 Thread Vino via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 15:16:50 UTC, Vino wrote: Hi All, Request your help, on how to sort a tuple container array, I have raised the same topic in one of the other thread "Tuple Array Sorting" and was addressed to use standard array rather than container array, and i am not able

[Issue 18071] [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18071 Steven Schveighoffer changed: What|Removed |Added CC|

Re: GUI program on Mac OS in D?

2017-12-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-12-13 16:07, Jacob Carlborg wrote: On 2017-12-13 13:18, mrphobby wrote: Would it be possible to somehow hook this up automatically to the D destructor perhaps? Interested in hearing your thoughts on this! As far as I know, the destructor is only called (automatically by the GC).

Container Array or tuples Sorting

2017-12-13 Thread Vino via Digitalmars-d-learn
Hi All, Request your help, on how to sort a tuple container array, I have raised the same topic in one of the other thread "Tuple Array Sorting" and was addressed to use standard array rather than container array, and i am not able to find any document or example in the library for the

Re: GUI program on Mac OS in D?

2017-12-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-12-13 13:18, mrphobby wrote: I have been taking a look at your example. Looks pretty neat! Some advanced mixin stuff there that looks pretty useful. They're pretty basic ;) However, as far as I can tell there is no handling of retain/release. No, that's correct. How would you

Re: LDC 1.7.0-beta1

2017-12-13 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-12-13 09:42, Suliman wrote: Could you explain hot to do it? Install LLVM? And than how I could specify what linker should be used? with the "-linker=" flag. -- /Jacob Carlborg

Re: SDL2 texture blend help

2017-12-13 Thread Martin Drašar via Digitalmars-d
Dne 13.12.2017 v 4:03 Ivan Trombley via Digitalmars-d napsal(a): > On Wednesday, 13 December 2017 at 01:44:33 UTC, Dmitry wrote: >> On Tuesday, 12 December 2017 at 23:28:23 UTC, Ivan Trombley wrote: >>> Here's the code that produces the correct results (exactly the same >>> as GIMP): >> Share

[Issue 18071] [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18071 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: SDL2 texture blend help

2017-12-13 Thread Dmitry via Digitalmars-d
On Wednesday, 13 December 2017 at 03:03:09 UTC, Ivan Trombley wrote: Foreground image: http://a4.pbase.com/o10/09/605909/1/166706860.c1yD4VWp.image.png Okay, I see. With this image it's obvious that it's not a just blending problem. But previous was look exactly as blending problem. Sorry

[Issue 9631] Error message not using fully qualified name when appropriate.

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9631 --- Comment #14 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/5c2155907e511cd4212a88ba57642b5336cb6e6f Issue 9631 - Error message not using fully qualified name

[Issue 18072] New: Compile/link fails, DMD 2.077.1

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18072 Issue ID: 18072 Summary: Compile/link fails, DMD 2.077.1 Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: blocker Priority:

Re: GUI program on Mac OS in D?

2017-12-13 Thread mrphobby via Digitalmars-d-learn
On Thursday, 23 November 2017 at 17:28:43 UTC, Jacob Carlborg wrote: I have a simple example [2] of an application that shows a window with a WebKit view, i.e. and embedded browser. This works with the upstream DMD and LDC compilers. It basically only contains bindings for what I needed for

Help needed with 32-bit OSX druntime test failure

2017-12-13 Thread Ali Çehreli via Digitalmars-d
A test program I added to core/thread.d as a part of a pull request fails with only the 32-bit Darwin (OSX) tests: https://github.com/dlang/druntime/pull/1989 Here is the bug: https://issues.dlang.org/show_bug.cgi?id=18063 I was able to reproduce the issue on a MacBook Pro.

[Issue 18068] No file names and line numbers in stack trace

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 ZombineDev changed: What|Removed |Added CC|

Re: state of ranges

2017-12-13 Thread ag0aep6g via Digitalmars-d
On 12/13/2017 10:13 AM, Dukc wrote: front() can assume that something can be found, so it may as well fetch the value without checking and rely on built-in array bounds checking and null behaviour for memory safety. empty() is the one which should check those things manually. No. As Seb has

Re: run.dlang.io - a modern way to run D code

2017-12-13 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, December 13, 2017 08:33:36 rikki cattermole via Digitalmars-d- announce wrote: > On 13/12/2017 8:11 AM, Jonathan M Davis wrote: > > On Wednesday, December 13, 2017 08:04:19 rikki cattermole via > > Digitalmars-d-> > > announce wrote: > >> On 13/12/2017 7:56 AM, Jonathan M Davis

[Issue 17188] `core.stdc.stdlib.qsort()` is broken

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17188 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: state of ranges

2017-12-13 Thread Dukc via Digitalmars-d
On Tuesday, 12 December 2017 at 23:43:19 UTC, Luís Marques wrote: Well, I was referring to things like in front() having to use code such as `if(!inited) ...; return value I think you only have to do that if you have some custom pointer arithmetic and you want to make sure it remains memory

[Issue 18068] No file names and line numbers in stack trace

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 --- Comment #4 from Seb --- And the DRuntime testcase doesn't work either: make -f posix.mak test/exceptions/.run BUILD=debug --

[Issue 17956] core.memory unittest failure (possibly glibc 2.26 specific)

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17956 --- Comment #3 from Seb --- > However this test should be fixed, pureMalloc(long.max-2) maybe? Let's see what the auto-tester says: https://github.com/dlang/druntime/pull/1991 --

[Issue 17956] core.memory unittest failure (possibly glibc 2.26 specific)

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17956 Seb changed: What|Removed |Added CC||greensunn...@gmail.com ---

[Issue 17375] colliding modules detected with binutils 2.28 linker and shared libraries

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17375 Seb changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18071] New: [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

2017-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18071 Issue ID: 18071 Summary: [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code Product: D Version: D2 Hardware: x86_64 OS: All

Re: AssocArray to string is ok,but how to get the AssocArray from string? Thanks

2017-12-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 17:32:15 UTC, Frank Like wrote: Hi,everyone, who can help me,about the "AssocArray to string is ok,but how to get the AssocArray from string? ". For example: SysTime[][string] AATimes; AATimes["a1"] =[SysTime(DateTime(2017, 1, 1, 12, 33,

Re: LDC 1.7.0-beta1

2017-12-13 Thread Suliman via Digitalmars-d-announce
Is it's possible to produce x64 binaries on Windows x64 without installing Visual Studio? DMD do not have linker for x64. You could try using the llvm linker, lld, as noted in the release notes for ldc 1.5: Could you explain hot to do it? Install LLVM? And than how I could specify what

Re: Released vibe.d 0.8.2

2017-12-13 Thread Sönke Ludwig via Digitalmars-d-announce
Am 13.12.2017 um 01:24 schrieb Seb: I think you should mention more prominently that for people who want to use OpenSSL 1.1, they can now use: dub --override-config="vibe-d:tls/openssl-1.1" This allows to use OpenSSL 1.1 _without_ needing to set the `VibeUseOpenSSL11` version in their

Re: What's the proper way to use std.getopt?

2017-12-13 Thread bauss via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 07:37:17 UTC, Jonathan M Davis wrote: On Wednesday, December 13, 2017 06:55:46 bauss via Digitalmars-d-learn wrote: [...] If it works, it's a bug related to code lowering (since scope statements are always lowered to try-catch-finally blocks). You're not

Re: Date Formating

2017-12-13 Thread codephantom via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 07:35:40 UTC, Jonathan M Davis wrote: In general, you probably want to cast the SysTime to a DateTime if you're going to do something like that. yes, I would agree ;-) Of course the intention was not really to just format it the same way as Clock.currTime()