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
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/
Hi,
What are the reasoning behind core.sync.* primitives being
classes and not structs? This prevents them from being placing on
shared memory.
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
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?
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
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
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
/**
...
...
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
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:
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
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.
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
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.
[...]
https://issues.dlang.org/show_bug.cgi?id=18076
hst...@quickfur.ath.cx changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from
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
--
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:
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
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;
https://issues.dlang.org/show_bug.cgi?id=11133
Jonathan M Davis changed:
What|Removed |Added
CC|
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
https://issues.dlang.org/show_bug.cgi?id=17985
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--- Comment
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.
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
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
https://issues.dlang.org/show_bug.cgi?id=18075
Jonathan M Davis changed:
What|Removed |Added
Keywords||ddoc
--
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
https://issues.dlang.org/show_bug.cgi?id=18074
Jonathan M Davis changed:
What|Removed |Added
Keywords||ddoc
--
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
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.
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
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:
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
https://issues.dlang.org/show_bug.cgi?id=17981
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
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
https://issues.dlang.org/show_bug.cgi?id=18056
Eugene changed:
What|Removed |Added
Status|NEW |RESOLVED
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
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:
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
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
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
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
auto foo(T: V[K], V, K)(T t)
{
CopyConstness!(T, V[K]) aa = t;
return aa;
}
https://run.dlang.io/is/LSMa5C
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.
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
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.
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
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;
>
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
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
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
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,
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
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) =>
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
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
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
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
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.
--
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.
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
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
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
https://issues.dlang.org/show_bug.cgi?id=18071
Steven Schveighoffer changed:
What|Removed |Added
CC|
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).
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
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
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
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
https://issues.dlang.org/show_bug.cgi?id=18071
Jack Stouffer changed:
What|Removed |Added
CC||j...@jackstouffer.com
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
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
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:
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
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.
https://issues.dlang.org/show_bug.cgi?id=18068
ZombineDev changed:
What|Removed |Added
CC|
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
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
https://issues.dlang.org/show_bug.cgi?id=17188
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
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
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
--
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
--
https://issues.dlang.org/show_bug.cgi?id=17956
Seb changed:
What|Removed |Added
CC||greensunn...@gmail.com
---
https://issues.dlang.org/show_bug.cgi?id=17375
Seb changed:
What|Removed |Added
Status|NEW |RESOLVED
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
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,
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
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
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
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()
90 matches
Mail list logo