On Thursday, December 21, 2017 07:46:03 Christian Köstlin via Digitalmars-d-
learn wrote:
> On 20.12.17 17:30, Christian Köstlin wrote:
> > thats an idea, thank a lot, will give it a try ...
>
> #!/usr/bin/env rdmd -unittest
> unittest {
> import std.stdio;
> import std.range;
> import
On Thursday, 21 December 2017 at 04:10:56 UTC, user1234 wrote:
On Thursday, 21 December 2017 at 02:57:00 UTC, Mike Franklin
Unfortunately, that doesn't really shed much light on this
oddity. So, specifically, under what circumstances are
destructors not called?
When the GC is unaware o
On Thursday, 21 December 2017 at 06:47:25 UTC, Ali Çehreli wrote:
On 12/20/2017 10:36 PM, Chris Katko wrote:
[...]
There can be a number of solutions but can you please
demonstrate the issue with compilable code? My attempt does not
agree with your description: super() is called *before* the
On 20.12.17 17:30, Christian Köstlin wrote:
> thats an idea, thank a lot, will give it a try ...
#!/usr/bin/env rdmd -unittest
unittest {
import std.stdio;
import std.range;
import std.algorithm;
import std.string;
import std.functional;
auto parse(int i) {
writeln(
On 12/20/2017 10:36 PM, Chris Katko wrote:
Is there any way to get a warning anytime an implicit super constructor
is called in a sub-class/child-class?
There can be a number of solutions but can you please demonstrate the
issue with compilable code? My attempt does not agree with your
descri
Is there any way to get a warning anytime an implicit super
constructor is called in a sub-class/child-class?
I have game objects with defaults. I specialize them with
specifics. The problem is, if I forget to add an explicit super
call and have it _before_ my code, my code runs, then the supe
On 12/19/2017 02:32 AM, Vino wrote:
> even though it is a simple code copy+paste
The change was a little more complicated than my naive adaptation from
std.algorithm.fold. Here is the pull request:
https://github.com/dlang/phobos/pull/5951
Ali
On Wednesday, 20 December 2017 at 22:38:06 UTC, Jonathan M Davis
wrote:
On Wednesday, December 20, 2017 21:36:00 bauss via
Digitalmars-d-learn wrote:
On Wednesday, 20 December 2017 at 18:50:37 UTC, Jonathan M
Davis
wrote:
> On Wednesday, December 20, 2017 14:30:55 bauss via
>
> Digitalmars-d-l
On Thursday, 21 December 2017 at 02:57:00 UTC, Mike Franklin
wrote:
"Don't expect class destructors to be called at all by the GC"
I was a bit shocked to read that here:
https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors
The document tries to clarify with:
"The garbage colle
I did a fresh clone of dmd and added that as a dependency. That
fixed it. Should've thought of it !! Thankyou.
On Wednesday, 20 December 2017 at 23:51:29 UTC, Johan Engelen
wrote:
On Wednesday, 20 December 2017 at 23:28:46 UTC, jicman wrote:
Greetings!
Imagine,
//start
int getMe(int i)
{
writefln(__LINE__);
writefln(__FUNCTION_NAME__);
So close! Use "__FUNCTION__" or "__PRETTY_FUNCTION__".
https:
"Don't expect class destructors to be called at all by the GC"
I was a bit shocked to read that here:
https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors
The document tries to clarify with:
"The garbage collector is not guaranteed to run the destructors
for all unreferenced o
On Thursday, 21 December 2017 at 00:23:08 UTC, Steven
Schveighoffer wrote:
On 12/20/17 6:01 PM, aliak wrote:
Hi, is there a way to remove a number of elements from an
array by a range of indices in the standard library somewhere?
I wrote one (code below), but I'm wondering if there's a
better
On Wednesday, 20 December 2017 at 23:01:17 UTC, aliak wrote:
Hi, is there a way to remove a number of elements from an array
by a range of indices in the standard library somewhere?
I wrote one (code below), but I'm wondering if there's a better
way?
Also, can the below be made more efficien
On Wednesday, 20 December 2017 at 13:41:06 UTC, Vino wrote:
Hi Ali,
Thank you very much, below are the observations, our program
is used to calculate the size of the folders, and we don't see
any improvements in the execution speed from the below test,
are we missing something. Basically we
On 12/20/17 6:01 PM, aliak wrote:
Hi, is there a way to remove a number of elements from an array by a
range of indices in the standard library somewhere?
I wrote one (code below), but I'm wondering if there's a better way?
Also, can the below be made more efficient?
auto without(T, R)(T[] ar
On Wednesday, 20 December 2017 at 14:30:55 UTC, bauss wrote:
I can't seem to find anything in Phobos that allows you to
specify custom formats for dates.
sometimes it's just better to take control of things yourself ;-)
https://forum.dlang.org/post/dmxdtciktpggcxybd...@forum.dlang.org
On Wednesday, 20 December 2017 at 23:28:46 UTC, jicman wrote:
Greetings!
Imagine,
//start
int getMe(int i)
{
writefln(__LINE__);
writefln(__FUNCTION_NAME__);
So close! Use "__FUNCTION__" or "__PRETTY_FUNCTION__".
https://dlang.org/spec/traits.html#specialkeywords
-Johan
Greetings!
Imagine,
//start
int getMe(int i)
{
writefln(__LINE__);
writefln(__FUNCTION_NAME__);
return I + 1;
}
void main(args )
{
getMe(1);
}
//end
So, the result would be,
4
getMe
So, is there a way to get the name of the function while in that
function? I know I can use some deb
Hi, is there a way to remove a number of elements from an array
by a range of indices in the standard library somewhere?
I wrote one (code below), but I'm wondering if there's a better
way?
Also, can the below be made more efficient?
auto without(T, R)(T[] array, R indices) if (isForwardRang
On Wednesday, December 20, 2017 21:36:00 bauss via Digitalmars-d-learn
wrote:
> On Wednesday, 20 December 2017 at 18:50:37 UTC, Jonathan M Davis
>
> wrote:
> > On Wednesday, December 20, 2017 14:30:55 bauss via
> >
> > Digitalmars-d-learn wrote:
> >> I can't seem to find anything in Phobos that al
On Wednesday, December 20, 2017 14:14:32 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 12/20/17 1:50 PM, Jonathan M Davis wrote:
> > This was posted about recently in the Announce group though:
> >
> > http://code.dlang.org/packages/datefmt
>
> Hm... a search for "date" on code.dlang.or
On Wednesday, 20 December 2017 at 18:50:37 UTC, Jonathan M Davis
wrote:
On Wednesday, December 20, 2017 14:30:55 bauss via
Digitalmars-d-learn wrote:
I can't seem to find anything in Phobos that allows you to
specify custom formats for dates.
Am I on my own or is there already such functionali
On 12/20/17 1:50 PM, Jonathan M Davis wrote:
This was posted about recently in the Announce group though:
http://code.dlang.org/packages/datefmt
Hm... a search for "date" on code.dlang.org does not show this. Why not?
http://code.dlang.org/search?q=date
-Steve
On Wednesday, December 20, 2017 14:30:55 bauss via Digitalmars-d-learn
wrote:
> I can't seem to find anything in Phobos that allows you to
> specify custom formats for dates.
>
> Am I on my own or is there already such functionality?
>
> I'm interested in a formatter with the possibility to output
On 12/20/17 9:30 AM, bauss wrote:
I can't seem to find anything in Phobos that allows you to specify
custom formats for dates.
Am I on my own or is there already such functionality?
You are on your own. Some of the pieces are available, but having
support for everything you may want to do wi
Thanks to Mengü for linking to that section. I have to make corrections
below.
On 12/20/2017 10:04 AM, Ali Çehreli wrote:
> 'auto ref' essentially generates two copies of the function: one taking
> by-value for rvalues
Note that by-value for rvalues means "blitting" in D (blit: bit-level
tran
On Wednesday, 20 December 2017 at 18:04:57 UTC, Ali Çehreli wrote:
On 12/20/2017 07:02 AM, ChangLong wrote:
> [...]
is not
> [...]
The problem is not with opAssign but with left(), which returns
an rvalue. It's by design that rvalues cannot be bound to
references in D.
[...]
was just readi
On 12/20/2017 07:02 AM, ChangLong wrote:
> ===
> struct A {
> alias This= typeof(this) ;
>
> void opAssign(ref This ){
> }
>
> ref auto left(){
> return This() ;
> }
> }
>
> void main(){
> Aroot ;
> ref find() {
>
On 12/20/2017 05:41 AM, Vino wrote:
> auto TL = dFiles.length;
> auto TP = new TaskPool(TL);
I assume dFiles is large. So, that's a lot of threads there.
> foreach (d; TP.parallel(dFiles[],1))
You tried with larger work unit sizes, right? More importantly, I think
all these threads are workin
On Wednesday, 20 December 2017 at 17:16:50 UTC, Mengu wrote:
On Wednesday, 20 December 2017 at 16:54:35 UTC, Marc wrote:
Give this function I'd like to run it at compile time:
import std.concurrency : Generator, yield;
[...]
but when I do:
[...]
I get the following erros:
C:\D\d
On Wednesday, 20 December 2017 at 16:54:35 UTC, Marc wrote:
Give this function I'd like to run it at compile time:
import std.concurrency : Generator, yield;
[...]
but when I do:
[...]
I get the following erros:
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\thread.d(4059):
Give this function I'd like to run it at compile time:
import std.concurrency : Generator, yield;
Generator!string getNonIntegralMembers() {
return new Generator!string({
enum allMembers = __traits(derivedMembers, C);
On Wednesday, 20 December 2017 at 13:41:06 UTC, Vino wrote:
On Tuesday, 19 December 2017 at 18:42:01 UTC, Ali Çehreli wrote:
On 12/19/2017 02:24 AM, Vino wrote:
> Hi All,
>
>Request your help in clarifying the below. As per the
document
>
> foreach (d; taskPool.parallel(xxx)) : The total num
On 20.12.17 17:19, Stefan Koch wrote:
> On Wednesday, 20 December 2017 at 15:28:00 UTC, Christian Köstlin wrote:
>> When working with json data files, that we're a little bigger than
>> convenient I stumbled upon a strange behavior with joining of mapresults
>> (I understand that this is more or le
On Wednesday, 20 December 2017 at 15:28:00 UTC, Christian Köstlin
wrote:
When working with json data files, that we're a little bigger
than
convenient I stumbled upon a strange behavior with joining of
mapresults
(I understand that this is more or less flatmap).
I mapped inputfiles, to JSONValu
When working with json data files, that we're a little bigger than
convenient I stumbled upon a strange behavior with joining of mapresults
(I understand that this is more or less flatmap).
I mapped inputfiles, to JSONValues, from which I took out some arrays,
whose content I wanted to join.
Althou
===
struct A {
alias This = typeof(this) ;
void opAssign(ref This ){
}
ref auto left(){
return This() ;
}
}
void main(){
A root ;
I can't seem to find anything in Phobos that allows you to
specify custom formats for dates.
Am I on my own or is there already such functionality?
I'm interested in a formatter with the possibility to output ex.:
December 20th, 2017 10:00 AM
All I could find was toSimpleString(), but it seem
On Wednesday, 20 December 2017 at 10:15:45 UTC, Benjamin Thaut
wrote:
I found that both the make that comes with msys and the make
that comes with mingw work for me. I‘m currently on vacation
but once I‘m back and in case you are interrested I can post
the batch file I use to run the dmd test
On Tuesday, 19 December 2017 at 18:42:01 UTC, Ali Çehreli wrote:
On 12/19/2017 02:24 AM, Vino wrote:
> Hi All,
>
>Request your help in clarifying the below. As per the
document
>
> foreach (d; taskPool.parallel(xxx)) : The total number of
threads that
> will be created is total CPU -1 ( 2 pro
enum
{
a = "foo",
b = "bar",
c = "baz";
}
is identical to
enum a = "foo";
enum b = "bar";
enum c = "baz";
Thanks Jonathan I think that changes my point of perspective.
And Jacob Carlborg I like the third option a lot with aliases
good to know that
enum Foo : string
{
KErde
On Monday, 18 December 2017 at 16:06:33 UTC, Jonathan Marler
wrote:
Trying to run the dmd test suite on windows, looks like Digital
Mars "make" doesn't work with the Makefile, I tried Gnu Make
3.81 but no luck with that either. Anyone know which version
of make it is supposed to work with on w
On 2017-12-20 05:52, Venkat wrote:
This is regarding the latest D blog post. Jacob Carlborg is here, so I
figured I'd post it.
https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling-dmd-as-a-library/#comment-2922
Simply changing the targetType from library to dynamicLibrary breaks t
44 matches
Mail list logo