Re: Reflection in D

2017-01-27 Thread rumbu via Digitalmars-d-learn
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote: I have a last question, currently i use : if(lc.name.indexOf("protocol.messages") != -1) To know if the class is a NetworkMessage, Would be possible to do this if(lc is NetworkMessage) Sorry for my English, i speak french. if

Re: Reflection in D

2017-01-27 Thread medhi558 via Digitalmars-d-learn
I have a last question, currently i use : if(lc.name.indexOf("protocol.messages") != -1) To know if the class is a NetworkMessage, Would be possible to do this if(lc is NetworkMessage) Sorry for my English, i speak french.

Re: Reflection in D

2017-01-27 Thread medhi558 via Digitalmars-d-learn
I develop a game server. Currently I use a switch : import protocol.messages.connection.Message1; import protocol.messages.connection.Message2; import protocol.messages.queues.Message3; import .. import protocol.messages.NetworkMessage; class ProtocolMessageManager { public static

Re: A better way to deal with overloading?

2017-01-27 Thread Patrick Schluter via Digitalmars-d
On Saturday, 28 January 2017 at 01:55:10 UTC, Profile Anaysis wrote: On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter wrote: On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: [...] It's funny (or sad) that C has compound types since C99 and that they are good.

[Issue 17123] [REG 2.073] Issues with return @safe inference

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17123 --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/6495 --

[Issue 17123] [REG 2.073] Issues with return @safe inference

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17123 Walter Bright changed: What|Removed |Added Keywords||safe --

[Issue 17124] dmd segfaults on __traits(getMember, ...)

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17124 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #1 from

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Walter Bright via Digitalmars-d
On 1/27/2017 2:51 AM, Chris wrote: On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote: On 1/26/2017 7:02 AM, aberba wrote: I did this book: https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/ Is it the same as this:

Re: Release D 2.073.0

2017-01-27 Thread Walter Bright via Digitalmars-d-announce
On 1/27/2017 4:43 PM, deadalnix wrote: I mostly went silent on this because I this point, I have no idea how to reach to you and Andrei. This is bad because of all the same reasons inout is bad, plus some other on its own, and is going down exactly like inout so far, plus some extra problems on

Re: A better way to deal with overloading?

2017-01-27 Thread Profile Anaysis via Digitalmars-d
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter wrote: On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: [...] It's funny (or sad) that C has compound types since C99 and that they are good. Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as

Re: A better way to deal with overloading?

2017-01-27 Thread Profile Anaysis via Digitalmars-d
On Friday, 27 January 2017 at 12:44:30 UTC, rjframe wrote: On Fri, 27 Jan 2017 10:38:53 +, Profile Anaysis wrote: Do you realize 1. That without change there can be no progress? ... If people with your mentality rules the world we would still be using sticks and stones. This is a

Re: A better way to deal with overloading?

2017-01-27 Thread Profile Anaysis via Digitalmars-d
On Friday, 27 January 2017 at 19:32:29 UTC, Jesse Phillips wrote: On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. I don't understand what issue you are solving. I see an undefined syntax:

[Issue 11531] For a faster std.algorithm.group on strings

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11531 --- Comment #3 from Jack Stouffer --- (In reply to Stefan Koch from comment #2) > Jack, I do not see anything of the kind. > The performance difference is within 2% and will within fluctuations being > caused by the gc. Hmm

[Issue 17117] [REG2.073] erroneous "escaping reference to local variable"

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 --- Comment #6 from Martin Krejcirik --- Walter, can you fix this in 2.073 too ? --

Re: Release D 2.073.0

2017-01-27 Thread deadalnix via Digitalmars-d-announce
On Friday, 27 January 2017 at 19:12:37 UTC, Walter Bright wrote: Yes, I'm 100% responsible for 'return scope' and pushing it harder than most people probably would like. Maybe I'm alone, but I strongly believe it is critical to D's future. You sound like this guy:

Re: Release D 2.073.0

2017-01-27 Thread deadalnix via Digitalmars-d-announce
On Friday, 27 January 2017 at 19:09:30 UTC, Walter Bright wrote: On 1/26/2017 5:42 AM, Dicebot wrote: https://issues.dlang.org/show_bug.cgi?id=17123 Can I have my "I told you so" badge please? Yes, you may. But nobody promised there would be no regressions - just that we'll fix them. I'll

[Issue 17117] [REG2.073] erroneous "escaping reference to local variable"

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17117 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4a4dcf23830e9066a70cb1c381d97306f2bb5bbc fix Issue 17117 - erroneous 'escaping reference to local

Re: Partial arrays reclaimed?

2017-01-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:36:58 UTC, Stefan Koch wrote: It should reclaim the memory from the beginning of the array. I doubt the current implementation will though, you should check.

Concurrent containers

2017-01-27 Thread Arun Chandrasekaran via Digitalmars-d-learn
Does phobos offer concurrent containers? I couldn't find one at http://dlang.org/phobos/std_container.html Any other in the D land? Arun

[Issue 11531] For a faster std.algorithm.group on strings

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11531 Stefan Koch changed: What|Removed |Added CC||uplink.co...@gmail.com

Re: Partial arrays reclaimed?

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:22:17 UTC, Nick Sabalausky wrote: Suppose an array is being used like a FIFO: --- T[] slice; // Add: slice ~= T(); // Remove: slice = slice[1..$]; --- Assuming of course there's no other references to the memory, as

Partial arrays reclaimed?

2017-01-27 Thread Nick Sabalausky via Digitalmars-d-learn
Suppose an array is being used like a FIFO: --- T[] slice; // Add: slice ~= T(); // Remove: slice = slice[1..$]; --- Assuming of course there's no other references to the memory, as this gets used, does the any of the memory from the removed elements

Re: D package for optimizing/compressing images

2017-01-27 Thread Ali Çehreli via Digitalmars-d-learn
On 01/27/2017 03:03 AM, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. I have a minimal MagickWand binding if you want to use or extend:

Re: D package for optimizing/compressing images

2017-01-27 Thread aberba via Digitalmars-d-learn
On Friday, 27 January 2017 at 19:14:19 UTC, Jesse Phillips wrote: On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. I don't know of

Re: Silicon Valley D Meetup - January 26, 2017 - "High Performance Tools in D" by Jon Degenhardt

2017-01-27 Thread Jon Degenhardt via Digitalmars-d-announce
On Friday, 27 January 2017 at 20:48:30 UTC, Ali Çehreli wrote: On 01/27/2017 08:21 AM, Jack Stouffer wrote: On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote: And this: http://youtu.be/-DK4r5xewTY Hey Jon, if you're in this thread, are you able to post any of the code that

Re: Reflection in D

2017-01-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 21:02:13 UTC, medhi558 wrote: Hello, I would like to know if it is possible to recover all classes in the project in D. Yes, `foreach(mod; ModuleInfo) foreach(lc; mod.localClasses)`... but why do you want it? That facility is kinda limited in doing many things

Reflection in D

2017-01-27 Thread medhi558 via Digitalmars-d-learn
Hello, I would like to know if it is possible to recover all classes in the project in D. Example in c# : Assembly asm = Assembly.GetAssembly(typeof(MyClass)); foreach (Type type in asm.GetTypes()) { }

Re: Silicon Valley D Meetup - January 26, 2017 - "High Performance Tools in D" by Jon Degenhardt

2017-01-27 Thread Ali Çehreli via Digitalmars-d-announce
On 01/27/2017 08:21 AM, Jack Stouffer wrote: On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote: And this: http://youtu.be/-DK4r5xewTY Hey Jon, if you're in this thread, are you able to post any of the code that you use for tsv parsing? Yeah, the slide starting at 19'35 is the

[Issue 11531] For a faster std.algorithm.group on strings

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11531 --- Comment #1 from Jack Stouffer --- Created attachment 1635 --> https://issues.dlang.org/attachment.cgi?id=1635=edit test.d Currently group does not auto-decode, and I have attached a test case which shows that using

Re: A better way to deal with overloading?

2017-01-27 Thread Jesse Phillips via Digitalmars-d
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. I don't understand what issue you are solving. I see an undefined syntax: foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) To replace an existing syntax:

Re: Release D 2.073.0

2017-01-27 Thread Walter Bright via Digitalmars-d-announce
On 1/27/2017 3:12 AM, Dicebot wrote: And also stuff like https://github.com/dlang/druntime/pull/1740 I'm curious what is wrong with that? I think the story behind `return scope` is the critical point for me. It is worst technical disaster that has happened to compiler in years, and I am

Re: D package for optimizing/compressing images

2017-01-27 Thread Jesse Phillips via Digitalmars-d-learn
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote: Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project. I don't know of any D projects. If I were doing this I'd be running the vibe.d

Re: Release D 2.073.0

2017-01-27 Thread Walter Bright via Digitalmars-d-announce
On 1/26/2017 5:42 AM, Dicebot wrote: https://issues.dlang.org/show_bug.cgi?id=17123 Can I have my "I told you so" badge please? Yes, you may. But nobody promised there would be no regressions - just that we'll fix them. I'll see about taking care of this one. Thanks for reporting it.

Re: A better way to deal with overloading?

2017-01-27 Thread Patrick Schluter via Digitalmars-d
On Friday, 27 January 2017 at 12:59:54 UTC, Kagamin wrote: On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter wrote: It's funny (or sad) that C has compound types since C99 and that they are good. Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as foo((T1){a,b,{c1,c2,c3}}, (T2){e},

[Issue 17123] [REG 2.073] Issues with return @safe inference

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17123 Walter Bright changed: What|Removed |Added CC|

Re: Question about scope

2017-01-27 Thread Walter Bright via Digitalmars-d
On 1/27/2017 6:36 AM, Nemanja Boric wrote: ``` void bar(scope char** c, scope int* n) @trusted { } void foo() @safe { char[100] buf; char* c = [0]; int n; bar(, ); // Error: cannot take address of scope local c in @safe function foo } void main() { foo(); } ``` This

Re: Silicon Valley D Meetup - January 26, 2017 - "High Performance Tools in D" by Jon Degenhardt

2017-01-27 Thread Jon Degenhardt via Digitalmars-d-announce
On Friday, 27 January 2017 at 16:21:51 UTC, Jack Stouffer wrote: On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote: And this: http://youtu.be/-DK4r5xewTY Hey Jon, if you're in this thread, are you able to post any of the code that you use for tsv parsing? Code has been

[Issue 11703] Typedef properties should not be of the original type

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11703 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/5fedf3503d73cead36a33260ba3efcc39847b8ce fix issue 11703, Typedef properties should not be of

Re: Bug in documentation or misunderstanding it?

2017-01-27 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jan 26, 2017 at 06:47:21PM +, Suliman via Digitalmars-d-learn wrote: > On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote: > > On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote: > > > On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via > > > Digitalmars-d-learn

Re: A matter of propiety

2017-01-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 16:30:14 UTC, WhatMeWorry wrote: But it seems like I'm committing some great sin by doing this. meh i see no problem with it. Just another quick question: is the module that holds the main() function just the same as any other module? It is the same as any

A matter of propiety

2017-01-27 Thread WhatMeWorry via Digitalmars-d-learn
module_common import app; // Ugly? Bad? Better way? common_func() { static if (compileTimeFlag1) codeBlockA static if (compileTimeFlag2) codeBlockB static if (compileTimeFlag3) codeBlockC } I want to have many

Re: Silicon Valley D Meetup - January 26, 2017 - "High Performance Tools in D" by Jon Degenhardt

2017-01-27 Thread Jack Stouffer via Digitalmars-d-announce
On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote: And this: http://youtu.be/-DK4r5xewTY Hey Jon, if you're in this thread, are you able to post any of the code that you use for tsv parsing?

Re: D idom for removing array elements

2017-01-27 Thread cym13 via Digitalmars-d-learn
On Friday, 27 January 2017 at 15:39:57 UTC, cym13 wrote: On Friday, 27 January 2017 at 08:30:41 UTC, Dukc wrote: [...] Note that if the set of values to be excluded isn't smaller than the haystack then using partition is way faster and your method is the slowest of all. If the order of the

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Chris via Digitalmars-d
On Thursday, 26 January 2017 at 15:02:33 UTC, aberba wrote: Will most likely go with markdown and use other solutions for theming it. Then pandoc it to PDF Markdown is also supported by vibe.d's diet templates.

Re: D idom for removing array elements

2017-01-27 Thread cym13 via Digitalmars-d-learn
On Friday, 27 January 2017 at 08:30:41 UTC, Dukc wrote: On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote: My method is much better for large arrays I tested here. Trough, considering the size of the arrays the performance difference should be even greater, like 1000X better instead of

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread jmh530 via Digitalmars-d
On Friday, 27 January 2017 at 12:02:01 UTC, Chris wrote: Yes, you are right of course. In a perfect world we'd just write a text and give the odd reference. Unfortunately, anyone who writes an M.A., M.Sc. or Ph.D. thesis has to reference everything. Not even the most basic concept can be

Question about scope

2017-01-27 Thread Nemanja Boric via Digitalmars-d
Taken from https://github.com/dlang/druntime/pull/1750#discussion_r98181564: ``` void bar(scope char** c, scope int* n) @trusted { } void foo() @safe { char[100] buf; char* c = [0]; int n; bar(, ); } void main() { foo(); } ``` This doesn't compile even with dip1000, but

Re: Release D 2.073.0

2017-01-27 Thread Dicebot via Digitalmars-d-announce
On 01/27/2017 01:29 PM, Nordlöw wrote: > On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote: >> And also stuff like https://github.com/dlang/druntime/pull/1740 - I >> think the story behind `return scope` is the critical point for me. It >> is worst technical disaster that has happened to

[Issue 17124] New: dmd segfaults on __traits(getMember, ...)

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17124 Issue ID: 17124 Summary: dmd segfaults on __traits(getMember, ...) Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: major

Re: Release D 2.073.0

2017-01-27 Thread Nordlöw via Digitalmars-d-announce
On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote: And also stuff like https://github.com/dlang/druntime/pull/1740 - I think the story behind `return scope` is the critical point for me. It is worst technical disaster that has happened to compiler in years, and I am going to blame

Re: A better way to deal with overloading?

2017-01-27 Thread Kagamin via Digitalmars-d
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter wrote: It's funny (or sad) that C has compound types since C99 and that they are good. Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as foo((T1){a,b,{c1,c2,c3}}, (T2){e}, (T3){f,g,c}); of course, the lack of object orientation and

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:21:29 UTC, Nestor wrote: On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote: On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That

Re: A better way to deal with overloading?

2017-01-27 Thread rjframe via Digitalmars-d
On Fri, 27 Jan 2017 10:38:53 +, Profile Anaysis wrote: > Do you realize > > 1. That without change there can be no progress? > > ... > If people with your mentality rules the world we would still be using > sticks and stones. This is a fact... I won't argue whether it would be > the best

Re: Release D 2.073.0

2017-01-27 Thread Kagamin via Digitalmars-d-announce
On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote: And also stuff like https://github.com/dlang/druntime/pull/1740 Why it would break code if `in` meant `scope`?

Re: Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote: On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote: I take it you build without dub ? Have you specified source/sqlite.d on your compile commandline ? That was supposed to say. sqlite-d/source/sqlited.d Please feel free to post here or contact me directly regarding the usage of

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Chris via Digitalmars-d
On Friday, 27 January 2017 at 11:05:41 UTC, Kagamin wrote: On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote: Er, yes. That's how it works. Always ask the publisher first. But that wasn't the question. The question was Markdown or LaTeX, and if you want to generate your own PDF for

Re: Problems compiling sqlite-d

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote: Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename =

Problems compiling sqlite-d

2017-01-27 Thread Nestor via Digitalmars-d-learn
Hi, I was trying to use https://github.com/UplinkCoder/sqlite-d Unfortunately even something as simple as this doesn´t compile (at least on Windows): import std.stdio, sqlited; void main(string[] args) { string filename = (args.length == 2 ? args[1] : "data.db"); Database db =

Re: D idom for removing array elements

2017-01-27 Thread Dukc via Digitalmars-d-learn
On Friday, 27 January 2017 at 10:20:19 UTC, albert-j wrote: I am also wondering why the standard library doesn't have convenience functions for this, e.g. like Java's removeAll? Now there's more typing than necessary for a relatively common task. That might be a good addition considering how

Re: A better way to deal with overloading?

2017-01-27 Thread Alexandru Ermicioi via Digitalmars-d
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: auto t1 = T1(a,b,new X(c1,c2,c3)); auto t2 = T2(e); auto t3 = T3(f,g,c); and then f(t1,t2,t3); or other wise simply inline the above. This also cuts down on constructor overloading. This is sort of liked named parameters

Re: A better way to deal with overloading?

2017-01-27 Thread Patrick Schluter via Digitalmars-d
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. e.g., void foo(T1 t1, T2 t2, T3, t3); But to call foo with new variables we have to create the arguments. This usually requires extra code to

Re: Release D 2.073.0

2017-01-27 Thread Dicebot via Digitalmars-d-announce
And also stuff like https://github.com/dlang/druntime/pull/1740 - I think the story behind `return scope` is the critical point for me. It is worst technical disaster that has happened to compiler in years, and I am going to blame Walter personally for it.

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Kagamin via Digitalmars-d
On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote: Er, yes. That's how it works. Always ask the publisher first. But that wasn't the question. The question was Markdown or LaTeX, and if you want to generate your own PDF for e.g. a M.A. or Ph.D., some people prefer LaTeX because of the

D package for optimizing/compressing images

2017-01-27 Thread aberba via Digitalmars-d-learn
Are there any dub package for compressing images uploaded through web forms? Cropping/resizing may also come in handy. I want one for a vibe.d project.

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Kagamin via Digitalmars-d
On Wednesday, 25 January 2017 at 10:57:41 UTC, Russel Winder wrote: Asciidoc (and it's continuation Asciidoctor) was invented to be a human usable front end to the DocBook/XML toolchain – and it still works for this. Humans should not have to write XML. Hence Asciidoctor. DocBook FTW, other

Re: A mini D book: Markdown or LaTeX?

2017-01-27 Thread Chris via Digitalmars-d
On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote: On 1/26/2017 7:02 AM, aberba wrote: I did this book: https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/ Is it the same as this:

Re: A better way to deal with overloading?

2017-01-27 Thread Profile Anaysis via Digitalmars-d
On Friday, 27 January 2017 at 09:47:48 UTC, Bauss wrote: On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. [...] This is going to be a no from me. It's just another syntactic sugar that doesn't

Re: D idom for removing array elements

2017-01-27 Thread albert-j via Digitalmars-d-learn
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote: TickDuration(28085) TickDuration(42868) TickDuration(1509) Thank you, this is very helpful. I am also wondering why the standard library doesn't have convenience functions for this, e.g. like Java's removeAll? Now there's more typing

Re: A better way to deal with overloading?

2017-01-27 Thread ixid via Digitalmars-d
On Friday, 27 January 2017 at 09:47:48 UTC, Bauss wrote: On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. [...] This is going to be a no from me. It's just another syntactic sugar that doesn't

[Issue 16147] Provide shiny 404 error pages

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16147 Vladimir Panteleev changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: A better way to deal with overloading?

2017-01-27 Thread Bauss via Digitalmars-d
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis wrote: Many times we pass compound types(non-primitives) as arguments to functions. [...] This is going to be a no from me. It's just another syntactic sugar that doesn't really have a purpose, but more syntactic confusion. We

[Issue 16147] Provide shiny 404 error pages

2017-01-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16147 --- Comment #6 from anonymous4 --- Is it supposed to look like this https://abload.de/img/tmp62xp4.png ? --

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-27 Thread Era Scarecrow via Digitalmars-d-learn
On Friday, 27 January 2017 at 07:02:52 UTC, Jack Applegame wrote: On Monday, 16 January 2017 at 14:47:23 UTC, Era Scarecrow wrote: static char[1024*4] buffer; //4k reusable buffer, NOT thread safe Maybe I'm wrong, but I think it's thread safe. Because static mutable non-shared variables

Re: D idom for removing array elements

2017-01-27 Thread Dukc via Digitalmars-d-learn
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote: My method is much better for large arrays I tested here. Trough, considering the size of the arrays the performance difference should be even greater, like 1000X better instead of 15X better so it's definitely not that great.

Re: D idom for removing array elements

2017-01-27 Thread Dukc via Digitalmars-d-learn
On Thursday, 26 January 2017 at 23:10:02 UTC, albert-j wrote: Will it also work correctly and fast for arrays of custom objects? How should opCmp() be defined if objects don't have a meaningful ordering? The order of elements in the original array does not matter. Two options: either define

Re: D idom for removing array elements

2017-01-27 Thread Dukc via Digitalmars-d-learn
On Friday, 27 January 2017 at 05:48:27 UTC, Stefan Koch wrote: To me it looks rather slow. please benchmark! void main() { import std.stdio, std.algorithm, std.range, std.array, std.datetime; int[] a = [1, 2, 3, 4, 5, 6, 7, 4].cycle.take(2000).array; int[] b = [3, 4,