Re: The Case For Autodecode

2016-06-03 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 June 2016 at 11:24:40 UTC, ag0aep6g wrote: This is mostly me trying to make sense of the discussion. So everyone hates autodecoding. But Andrei seems to hate it a good bit less than everyone else. As far as I could follow, he has one reason for that, which might not be clear to

Re: The Case For Autodecode

2016-06-03 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 June 2016 at 18:36:45 UTC, Steven Schveighoffer wrote: The real problem here is that char implicitly casts to dchar. That should not be allowed. Indeed.

Re: Why I won't fix phobos bugs anymore

2016-06-02 Thread Patrick Schluter via Digitalmars-d
On Thursday, 2 June 2016 at 20:20:58 UTC, Andrei Alexandrescu wrote: On 06/02/2016 03:41 PM, Basile B. wrote: Yesterday I've took the decision not to propose anymore PR for Phobos bugfixes, even if most of the time it's easy. 1) It can take up to 2 or 3 weeks until a "phobos bugfix" get

Re: The Case Against Autodecode

2016-06-04 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 June 2016 at 20:53:32 UTC, H. S. Teoh wrote: Even the Greek sigma has two forms depending on whether it's at the end of a word or not -- so should it be two code points or one? If you say two, then you'd have a problem with how to search for sigma in Greek text, and you'd have

Re: The Case Against Autodecode

2016-06-04 Thread Patrick Schluter via Digitalmars-d
One has also to take into consideration that Unicode is the way it is because it was not invented in an empty space. It had to take consideration of the existing and find compromisses allowing its adoption. Even if they had invented the perfect encoding, NO ONE WOULD HAVE USED IT, as it would

Re: The Case For Autodecode

2016-06-04 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 June 2016 at 20:18:31 UTC, Steven Schveighoffer wrote: On 6/3/16 3:52 PM, ag0aep6g wrote: On 06/03/2016 09:09 PM, Steven Schveighoffer wrote: Except many chars *do* properly convert. This should work: char c = 'a'; dchar d = c; assert(d == 'a'); Yeah, that's what I meant by

Re: faster splitter

2016-05-27 Thread Patrick Schluter via Digitalmars-d
On Friday, 27 May 2016 at 19:17:44 UTC, Chris wrote: Oops, I've been found out. :-) Thanks. You're right of course, and I've already noticed that bug as it fails on not found. I got the bounds wrong. I had the same "bug" when I wrote my search function on the project at work. I also found

Re: faster splitter

2016-05-27 Thread Patrick Schluter via Digitalmars-d
On Friday, 27 May 2016 at 14:41:29 UTC, Chris wrote: On Friday, 27 May 2016 at 14:06:09 UTC, Chris wrote: This outperforms both `manual_find` and the improved `std find` string findStringS_Manual(string haystack, string needle) { if (needle.length > haystack.length)

Re: [OT] The Case Against... Unicode?

2016-06-01 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 1 June 2016 at 15:02:33 UTC, Wyatt wrote: On Wednesday, 1 June 2016 at 13:57:27 UTC, Joakim wrote: No, I explicitly said not the web in a subsequent post. The ignorance here of what 2G speeds are like is mind-boggling. It's not hard. I think a lot of us remember when a 14.4

Re: faster splitter

2016-06-01 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 31 May 2016 at 17:54:34 UTC, qznc wrote: There is a special version of find for searching a single char in a string. Using a one-letter needle string is more like a user mistake than something to optimize for. At compile time you may not know the length of the needle, like in the

Re: faster splitter

2016-06-01 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 1 June 2016 at 12:41:19 UTC, Seb wrote: On Wednesday, 1 June 2016 at 12:14:07 UTC, Patrick Schluter wrote: On Tuesday, 31 May 2016 at 17:54:34 UTC, qznc wrote: There is a special version of find for searching a single char in a string. Using a one-letter needle string is more

Re: Transient ranges

2016-06-01 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 31 May 2016 at 12:42:23 UTC, Steven Schveighoffer wrote: There are 2 main issues with FILE *: 1) it does not provide buffer access, so you must rely on things like getline if they exist. But these have their own problems (i.e. do not support unicode, require C-malloc'd buffer)

Re: Weird compiler

2016-06-19 Thread Patrick Schluter via Digitalmars-d
On Sunday, 19 June 2016 at 14:45:43 UTC, Rene Zwanenburg wrote: On Sunday, 19 June 2016 at 14:05:22 UTC, mogu wrote: Today, I'm working on a private GUI tool which must be run at linux and windows. It's awful that I compile a little 64bit program(or -m32mscoff) in windows must have visual

Re: Please rid me of this goto

2016-06-24 Thread Patrick Schluter via Digitalmars-d
On Thursday, 23 June 2016 at 20:01:26 UTC, deadalnix wrote: On Thursday, 23 June 2016 at 19:24:54 UTC, via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 07:11:26PM +, deadalnix via Digitalmars-d wrote: | is bitwize or. || is binary or. & is bitwize and. && is binary and. ^ is bitwize xor.

Re: Please rid me of this goto

2016-06-24 Thread Patrick Schluter via Digitalmars-d
On Friday, 24 June 2016 at 10:11:11 UTC, deadalnix wrote: On Friday, 24 June 2016 at 08:40:26 UTC, Patrick Schluter wrote: On Thursday, 23 June 2016 at 20:01:26 UTC, deadalnix wrote: On Thursday, 23 June 2016 at 19:24:54 UTC, via Digitalmars-d wrote: On Thu, Jun 23, 2016 at 07:11:26PM +,

Re: C++17 is feature complete

2016-06-27 Thread Patrick Schluter via Digitalmars-d
On Monday, 27 June 2016 at 06:52:58 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 03:09:46 UTC, Meta wrote: On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote: On 6/26/2016 10:18 AM, Enamex wrote: - template arguments that accept constant values of any type whatsoever

Re: C++17 is feature complete

2016-06-27 Thread Patrick Schluter via Digitalmars-d
On Monday, 27 June 2016 at 06:52:58 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 03:09:46 UTC, Meta wrote: On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote: On 6/26/2016 10:18 AM, Enamex wrote: - template arguments that accept constant values of any type whatsoever

Re: Please rid me of this goto

2016-06-25 Thread Patrick Schluter via Digitalmars-d
On Friday, 24 June 2016 at 20:34:38 UTC, deadalnix wrote: On Friday, 24 June 2016 at 10:33:43 UTC, Patrick Schluter wrote: On Friday, 24 June 2016 at 10:11:11 UTC, deadalnix wrote: On Friday, 24 June 2016 at 08:40:26 UTC, Patrick Schluter wrote: On Thursday, 23 June 2016 at 20:01:26 UTC,

Re: DMD producing huge binaries

2016-05-19 Thread Patrick Schluter via Digitalmars-d
On Thursday, 19 May 2016 at 22:46:02 UTC, Adam D. Ruppe wrote: On Thursday, 19 May 2016 at 22:16:03 UTC, Walter Bright wrote: Using 64 character random strings will make symbolic debugging unpleasant. Using 6.4 megabyte strings already makes symbolic debugging unpleasant. The one thing

Re: Evaluation order of "+="

2016-07-11 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 12 July 2016 at 00:16:58 UTC, deadalnix wrote: On Monday, 11 July 2016 at 23:31:40 UTC, Danika wrote: On Monday, 11 July 2016 at 23:04:00 UTC, Johan Engelen wrote: LDC recently changed the evaluation order of "+=" (I think unintentionally, some other eval order problems were

Re: Evaluation order of "+="

2016-07-11 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 12 July 2016 at 05:46:58 UTC, Patrick Schluter wrote: On Tuesday, 12 July 2016 at 00:16:58 UTC, deadalnix wrote: On Monday, 11 July 2016 at 23:31:40 UTC, Danika wrote: On Monday, 11 July 2016 at 23:04:00 UTC, Johan Engelen wrote: LDC recently changed the evaluation order of "+=" (I

Re: [DIP] In-place struct initialization

2016-07-31 Thread Patrick Schluter via Digitalmars-d
On Sunday, 31 July 2016 at 14:38:33 UTC, Lodovico Giaretta wrote: On Sunday, 31 July 2016 at 13:39:58 UTC, Enamex wrote: I suggest extending the existing `S s = {field: value}` syntax to allow specifying the type itself next to the field list and make it usable generally everywhere. So,

Re: [DIP] In-place struct initialization

2016-08-03 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 3 August 2016 at 21:35:58 UTC, ZombineDev wrote: On Wednesday, 3 August 2016 at 20:30:07 UTC, deadalnix wrote: On Sunday, 31 July 2016 at 14:38:33 UTC, Lodovico Giaretta wrote: I support this idea of extending curly-brace initializers. It would be very useful and less ambiguous

Re: Why D is not popular enough?

2016-08-12 Thread Patrick Schluter via Digitalmars-d
On Thursday, 11 August 2016 at 20:16:04 UTC, bachmeier wrote: On Thursday, 11 August 2016 at 15:41:42 UTC, Edward Diener wrote: the arrogance by which D was initially and repeatedly compared against C/C++ has been totally out of place since the C++ is a very good language and the effort made

Re: Why D is not popular enough?

2016-08-15 Thread Patrick Schluter via Digitalmars-d
On Sunday, 14 August 2016 at 18:03:24 UTC, Shachar Shemesh wrote: I must confess that I have never heard of this rule in C before encountering it in D. Which rule? The rule that says "ubyte + ubyte = uint".

Re: Vision for the D language - stabilizing complexity?

2016-07-15 Thread Patrick Schluter via Digitalmars-d
On Friday, 15 July 2016 at 10:25:16 UTC, Shachar Shemesh wrote: I think the one that hurts the most is fixing "C++ fault" #3. It means there are many scenarios in which I could put const in C++, and I simply can't in D, because something somewhere needs to be mutable. Then it is not const

Re: Card on fire

2016-07-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 16 July 2016 at 04:54:02 UTC, H. S. Teoh wrote: On Fri, Jul 15, 2016 at 05:02:55PM -0700, Walter Bright via Digitalmars-d wrote: On 7/15/2016 3:43 PM, H. S. Teoh via Digitalmars-d wrote: > One of the many reasons I gave up on Windows many years ago, > and never looked back. ;-)

Re: Vision for the D language - stabilizing complexity?

2016-07-10 Thread Patrick Schluter via Digitalmars-d
On Sunday, 10 July 2016 at 02:44:14 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 July 2016 at 08:39:10 UTC, Walter Bright wrote: Seems that in order to make it useful, users had to extend it. This doesn't fit the criteria. Scheme is a simple functional language which is easy to extend. Why

Re: Go's march to low-latency GC

2016-07-11 Thread Patrick Schluter via Digitalmars-d
On Monday, 11 July 2016 at 12:21:04 UTC, Sergey Podobry wrote: On Monday, 11 July 2016 at 11:23:26 UTC, Dicebot wrote: On Sunday, 10 July 2016 at 19:49:11 UTC, Sergey Podobry wrote: Remember that virtual address space is limited on 32-bit platforms. Thus spawning 2000 threads 1 MB stack each

Re: Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

2016-08-06 Thread Patrick Schluter via Digitalmars-d
On Saturday, 6 August 2016 at 10:02:25 UTC, Iain Buclaw wrote: On 6 August 2016 at 11:48, Ilya Yaroshenko via Digitalmars-d wrote: On Saturday, 6 August 2016 at 09:35:32 UTC, Walter Bright wrote: No pragmas tied to a specific architecture should be allowed in

Re: Has someone encountered similar issues with -cov?

2016-07-01 Thread Patrick Schluter via Digitalmars-d
On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei That do { } while(0) construct is ridiculous. It's cargo cult at its worst. It is NOT more readable than an honest to god goto. It's an obfuscated way to

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 07:04:28 UTC, Patrick Schluter wrote: On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer wrote: On 7/1/16 4:08 PM, Andrei Alexandrescu wrote: On 7/1/16 2:46 PM, Steven Schveighoffer wrote: On 7/1/16 2:15 PM, Andrei Alexandrescu wrote: On 7/1/16 2:05 PM,

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 06:45:37 UTC, Patrick Schluter wrote: On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote: On 7/1/16 3:43 PM, Patrick Schluter wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 --

Re: Bug in D type inferencing

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Saturday, 2 July 2016 at 01:20:35 UTC, Hiemlick Hiemlicker wrote: public struct Foo { public void Create(T)(uint delegate(T) c, T param) { } } Foo f; f.Create((x) { }, "asdf"); I'm a D noob so take it with a very big grain of salt, but I think that

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Friday, 1 July 2016 at 20:30:30 UTC, Steven Schveighoffer wrote: On 7/1/16 4:08 PM, Andrei Alexandrescu wrote: On 7/1/16 2:46 PM, Steven Schveighoffer wrote: On 7/1/16 2:15 PM, Andrei Alexandrescu wrote: On 7/1/16 2:05 PM, Chris wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei

Re: Has someone encountered similar issues with -cov?

2016-07-02 Thread Patrick Schluter via Digitalmars-d
On Friday, 1 July 2016 at 20:09:30 UTC, Andrei Alexandrescu wrote: On 7/1/16 3:43 PM, Patrick Schluter wrote: On Friday, 1 July 2016 at 16:30:41 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16224 -- Andrei That do { } while(0) construct is ridiculous.

Re: memcpy() comparison: C, Rust, and D

2017-02-01 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 1 February 2017 at 10:05:49 UTC, Richard Delorme wrote: On Tuesday, 31 January 2017 at 23:30:04 UTC, Walter Bright wrote: On 1/31/2017 3:00 PM, Richard Delorme wrote: The thing about memcpy is compilers build in a LOT of information about it that simply is not there in the

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2017-01-23 Thread Patrick Schluter via Digitalmars-d
On Sunday, 1 May 2016 at 17:06:19 UTC, Seb wrote: On Sunday, 1 May 2016 at 14:31:10 UTC, Bauss wrote: On Friday, 11 September 2015 at 20:29:56 UTC, Vladimir Panteleev wrote: https://github.com/D-Programming-Language/phobos/pull/3631 Apparently it was decided at DConf 2015 to remove std.stream

Re: auto ref escaping local variable

2017-01-24 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 24 January 2017 at 06:51:40 UTC, Stefan Koch wrote: On Tuesday, 24 January 2017 at 00:52:34 UTC, Robert burner Schadek wrote: I have this program that used to compile with 72 but with 73 dmd is complaining that "Error: escaping reference to local variable t" auto ref f2(T)(auto

Re: CTFE Status

2017-01-26 Thread Patrick Schluter via Digitalmars-d
On Thursday, 26 January 2017 at 07:27:13 UTC, Stefan Koch wrote: On Wednesday, 25 January 2017 at 12:36:02 UTC, Stefan Koch wrote: newCTFE is green now on all platforms! I just found an interesting bug just now. The following code would cause newCTFE to segfault. char* initPtr() { return

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},

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.

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: D future ...

2017-02-19 Thread Patrick Schluter via Digitalmars-d
On Sunday, 19 February 2017 at 12:12:07 UTC, timmyjose wrote: I do love C++11 and newer, but I'd rather not use it for any new projects barring some weekend projects of my own. The type system is horrendously outdated. If they could make a clean break and make C++11 the basis, improve error

Re: cost of calling class function

2017-02-23 Thread Patrick Schluter via Digitalmars-d
On Thursday, 23 February 2017 at 17:02:55 UTC, Johan Engelen wrote: On Thursday, 23 February 2017 at 16:25:34 UTC, Johan Engelen wrote: [...] We're in good company: both clang and gcc also do not devirtualize the call when the loopcount is too large (when the loop count is 4, the indirect

Re: Voting for std.experimental.checkedint

2017-02-26 Thread Patrick Schluter via Digitalmars-d
On Sunday, 26 February 2017 at 09:53:42 UTC, Seb wrote: On Sunday, 26 February 2017 at 09:41:46 UTC, rumbu wrote: [...] If you want a module with a lot less features, the low-level core.checkedint might be interesting for you: http://dlang.org/phobos/core_checkedint.html [...] It is

Re: 16MB static arrays again...

2016-08-24 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 24 August 2016 at 07:50:25 UTC, Tomer Filiba wrote: #WEKA #INDUSTRY I found this post from 2007 http://forum.dlang.org/post/fdspch$d3v$1...@digitalmars.com that refers to this post from 2006 http://www.digitalmars.com/d/archives/digitalmars/D/37038.html#N37071 -- and I still

Re: Examples Wanted: Usages of "body" as a Symbol Name

2016-10-05 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 5 October 2016 at 19:45:20 UTC, Basile B. wrote: On Wednesday, 5 October 2016 at 19:30:27 UTC, pineapple wrote: On Wednesday, 5 October 2016 at 19:02:02 UTC, Basile B. wrote: On Wednesday, 5 October 2016 at 18:41:02 UTC, Jacob Carlborg wrote: On 2016-10-05 19:14, Matthias Klumpp

Re: colour lib needs reviewers

2016-09-15 Thread Patrick Schluter via Digitalmars-d
On Thursday, 15 September 2016 at 03:49:55 UTC, Andrei Alexandrescu wrote: On 9/14/16 9:28 PM, Manu via Digitalmars-d wrote: Like, I really just don't care enough to try and understand ddoc sufficiently to have a bag of tricks like those you demonstrated above to workaround these issues. It's

Re: Optimisation possibilities: current, future and enhancements

2016-08-26 Thread Patrick Schluter via Digitalmars-d
On Friday, 26 August 2016 at 17:52:36 UTC, Meta wrote: On Friday, 26 August 2016 at 14:12:24 UTC, Basile B. wrote: That's another story. Of course the optimization pass for this should check that **ALL** the calls to Test in a sub program (or in this scope if you want) are const... Which is

Re: Optimisation possibilities: current, future and enhancements

2016-08-26 Thread Patrick Schluter via Digitalmars-d
On Friday, 26 August 2016 at 19:58:47 UTC, ag0aep6g wrote: On 08/26/2016 09:51 PM, Patrick Schluter wrote: On Friday, 26 August 2016 at 14:03:13 UTC, Meta wrote: [...] class Test { int n; void setN(int val) pure { n = val; } int getN() const pure {

Re: Optimisation possibilities: current, future and enhancements

2016-08-26 Thread Patrick Schluter via Digitalmars-d
On Friday, 26 August 2016 at 14:03:13 UTC, Meta wrote: On Friday, 26 August 2016 at 10:51:15 UTC, Johan Engelen wrote: On Thursday, 25 August 2016 at 14:42:28 UTC, Basile B. wrote: I'll add * create temporaries based on the const function attribute. Struct method constness (as in your

Re: Optimisation possibilities: current, future and enhancements

2016-08-26 Thread Patrick Schluter via Digitalmars-d
On Friday, 26 August 2016 at 20:35:13 UTC, ag0aep6g wrote: On 08/26/2016 10:09 PM, Patrick Schluter wrote: Yes. The optimisation of removing the second call is only possible if there is no access using the this pointer. The call to setN() (or any member function using the mutable this

Re: Linus' idea of "good taste" code

2016-10-30 Thread Patrick Schluter via Digitalmars-d
On Sunday, 30 October 2016 at 06:39:42 UTC, Joakim wrote: It is not worth it, the web is dying. I was stunned to see this chart of mobile web usage in the US: https://mobile.twitter.com/asymco/status/777915894659964928 This isn't some third-world country with mostly 2G usage, the web

Re: CTFE Status

2016-11-08 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 8 November 2016 at 16:57:27 UTC, H. S. Teoh wrote: On Tue, Nov 08, 2016 at 11:40:31AM -0500, Nick Sabalausky via Digitalmars-d wrote: On 11/05/2016 11:48 AM, Marc Schütz wrote: > On Saturday, 5 November 2016 at 01:21:48 UTC, Stefan Koch > wrote: > > > > I recently lost 3 days of

Re: rt_init, rt_term and _initCount

2016-10-20 Thread Patrick Schluter via Digitalmars-d
On Thursday, 20 October 2016 at 07:17:49 UTC, Benjamin Thaut wrote: This is a topic really specific to druntime, I don't know a better place to put it though. rt_init increases the _initCount and rt_term decreases it and only terminates the runtime in case the _initCount reaches zero (see

Re: core.intrinsics

2016-10-14 Thread Patrick Schluter via Digitalmars-d
On Thursday, 13 October 2016 at 23:15:00 UTC, David Gileadi wrote: On 10/13/16 12:52 PM, Stefan Koch wrote: On Thursday, 13 October 2016 at 19:49:42 UTC, Johan Engelen wrote: On Thursday, 13 October 2016 at 19:35:08 UTC, Stefan Koch wrote: Please share your thoughts and tell me what other

Re: core.intrinsics

2016-10-14 Thread Patrick Schluter via Digitalmars-d
On Friday, 14 October 2016 at 04:44:46 UTC, Patrick Schluter wrote: On Thursday, 13 October 2016 at 23:15:00 UTC, David Gileadi wrote: On 10/13/16 12:52 PM, Stefan Koch wrote: On Thursday, 13 October 2016 at 19:49:42 UTC, Johan Engelen wrote: On Thursday, 13 October 2016 at 19:35:08 UTC,

Re: [WORK] std.file.update function

2016-10-18 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 18 October 2016 at 13:51:48 UTC, R wrote: On Monday, 19 September 2016 at 02:57:01 UTC, Chris Wright wrote: You have an operating system that automatically checksums every file? There are a few filesystems that keep checksums of blocks, but I don't see one that keeps file

Re: D Lang installation on Windows, dependency on Visual Studio?

2016-11-14 Thread Patrick Schluter via Digitalmars-d
On Monday, 14 November 2016 at 09:33:48 UTC, AB wrote: On Monday, 14 November 2016 at 09:06:18 UTC, Kagamin wrote: DMD can generate 64-bit object files just fine, you only need to link them, and DMD can invoke ms linker for you, that's all. It is unreasonable to pull in the many GBs of Visual

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-25 Thread Patrick Schluter via Digitalmars-d
On Friday, 25 November 2016 at 09:19:26 UTC, Alix Pexton wrote: On 25/11/2016 07:14, Patrick Schluter wrote: On Thursday, 24 November 2016 at 20:22:00 UTC, Timon Gehr wrote: On 24.11.2016 20:49, qznc wrote: Although, the article [0] does not say that literally, it sounds like an integer

Re: [OT] All your medians are belong to me

2016-11-21 Thread Patrick Schluter via Digitalmars-d
On Monday, 21 November 2016 at 18:39:26 UTC, Andrei Alexandrescu wrote: On 11/21/2016 01:18 PM, jmh530 wrote: I would just generate a bunch of integers randomly and use that, but I don't know if you specifically need to work with strings. I have that, too, but was looking for some real data

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-24 Thread Patrick Schluter via Digitalmars-d
On Thursday, 24 November 2016 at 20:22:00 UTC, Timon Gehr wrote: On 24.11.2016 20:49, qznc wrote: Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of

Re: D Lang installation on Windows, dependency on Visual Studio?

2016-11-16 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 16 November 2016 at 17:06:37 UTC, Patrick Schluter wrote: On Wednesday, 16 November 2016 at 09:21:18 UTC, Kagamin wrote: On Tuesday, 15 November 2016 at 14:41:34 UTC, Daniel Kozak wrote: AFAIK ld on mingw can`t link against mscoff file format so it is not very usable. It's

Re: D Lang installation on Windows, dependency on Visual Studio?

2016-11-16 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 16 November 2016 at 09:21:18 UTC, Kagamin wrote: On Tuesday, 15 November 2016 at 14:41:34 UTC, Daniel Kozak wrote: AFAIK ld on mingw can`t link against mscoff file format so it is not very usable. It's dmd/optlink that don't support mscoff, mingw supports only mscoff. LLD is

Re: D Lang installation on Windows, dependency on Visual Studio?

2016-11-14 Thread Patrick Schluter via Digitalmars-d
On Monday, 14 November 2016 at 18:04:05 UTC, fdjfgj wrote: On Monday, 14 November 2016 at 16:59:56 UTC, Nick Sabalausky wrote: On 11/14/2016 08:44 AM, Patrick Schluter wrote: have their windows system partition on a smallish SSD. Well, in all honestly, that IS going to cause problems

Re: Linus' idea of "good taste" code

2016-11-03 Thread Patrick Schluter via Digitalmars-d
On Thursday, 3 November 2016 at 06:11:08 UTC, Joakim wrote: On Sunday, 30 October 2016 at 10:04:02 UTC, Patrick Schluter wrote: On Sunday, 30 October 2016 at 06:39:42 UTC, Joakim wrote: It is not worth it, the web is dying. I was stunned to see this chart of mobile web usage in the US:

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). 192 and 193 can never appear in a UTF-8 text, they are overlongs not continuation bytes.

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 18:40:11 UTC, Uplink_Coder wrote: It can also be written like this producing smaller code. But it the cost of slower decoding. dchar myFront(ref char[] str) pure { dchar c = cast(dchar) str.ptr[0]; if (c & 128) { if (c & 64) {

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 00:50:08 UTC, Stefan Koch wrote: On Friday, 14 October 2016 at 20:47:39 UTC, Stefan Koch wrote: On Thursday, 13 October 2016 at 21:49:22 UTC, safety0ff wrote: Bad benchmark! Bad! -- Andrei Also, I suspect a benchmark with a larger loop body might not benefit

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
Oooops, I should not post after drinking 2 glasses of Châteauneuf-du-pape. That function does exactly the contrary of what popFront does. This one is conversion from dchar to multibyte not multibyte to dchar as you did. Sorry for the inconvenience.

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
At least with that lookup table below, you can detect isolated continuation bytes (192 and 193) and invalid codes (above 244). __gshared static immutable ubyte[] charWidthTab = [ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 10:05:37 UTC, Patrick Schluter wrote: Next step will be to loop for length 2,3,4, with or without your table. Ok now the looped version which doesn't need the lookup table. This one assembles in 72 lines of assembly (25 lines only for the exception code).

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 08:43:23 UTC, Uplink_Coder wrote: On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter wrote: This looks quite slow. We already have a correct version in utf.decodeImpl. The goal here was to find a small and fast alternative. I know but it has to be

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 October 2016 at 21:21:22 UTC, Stefan Koch wrote: On Saturday, 15 October 2016 at 19:42:03 UTC, Uplink_Coder wrote: On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter wrote: At least with that lookup table below, you can detect isolated continuation bytes (192 and

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
Here my version. It's probably not the shortest (100 ligns of assembly with LDC) but it is correct and has following properties: - Performance proportional to the encoding length - Detects Invalid byte sequences - Detects Overlong encodings - Detects Invalid code points I put the exception to

Re: Reducing the cost of autodecoding

2016-10-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 16 October 2016 at 10:05:37 UTC, Patrick Schluter wrote: On Sunday, 16 October 2016 at 08:43:23 UTC, Uplink_Coder wrote: On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter wrote: This looks quite slow. We already have a correct version in utf.decodeImpl. The goal here

Re: [OT] ISO C++ 17 changes

2017-04-03 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 4 April 2017 at 05:36:55 UTC, evilrat wrote: On Tuesday, 4 April 2017 at 05:18:26 UTC, Dukc wrote: On Tuesday, 4 April 2017 at 02:43:26 UTC, evilrat wrote: [...] But if all you want is to construct some code in interpreter-like way at compile time, string mixin does precisely

Re: Is it acceptable to not parse unittest blocks when unittests are disabled ?

2017-04-01 Thread Patrick Schluter via Digitalmars-d
On Saturday, 1 April 2017 at 09:20:06 UTC, Walter Bright wrote: On 4/1/2017 12:39 AM, Stefan Koch wrote: This should be optional and controlled via a switch like --fast-parse ? Too many switches are a disease, and we already have an awful lot. The non-parsing of unittests have been there

Re: Using the C preprocessor with D code

2017-04-06 Thread Patrick Schluter via Digitalmars-d
On Thursday, 6 April 2017 at 01:21:48 UTC, Walter Bright wrote: On 4/5/2017 1:50 PM, H. S. Teoh via Digitalmars-d wrote: Who says you can't use a preprocessor with D code? ;-) There are some issues with it. The C preprocessor is defined to work on "preprocessor tokens", which are not quite

Re: Interpolated strings

2017-04-19 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 19 April 2017 at 13:04:08 UTC, Jonathan Marler wrote: On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote: On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen wrote: I can think of 3 reasons. 1. Requires GC. NOTE: I believe that most applcations should use

Re: Why don't you advertise more your language on Quora etc ?

2017-03-04 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 March 2017 at 18:45:50 UTC, Nick Sabalausky (Abscissa) wrote: On 03/03/2017 10:40 AM, Russel Winder via Digitalmars-d wrote: IDEs, vastly more supportive, useful software development functionality than editors, especially for debugging, yes. It's that last one, the one about

Re: D street cred: Just a thought

2017-03-04 Thread Patrick Schluter via Digitalmars-d
On Saturday, 4 March 2017 at 07:09:17 UTC, Nick Sabalausky (Abscissa) wrote: Just a thought for boosting D's street cred: Perhaps...take a worthwhile C/C++ project with real potential, fork it, and port it to D. And make a real commitment to maintaining it. Obviously a bit of a gambit,

Re: [OT] Re: Why don't you advertise more your language on Quora etc ?

2017-03-04 Thread Patrick Schluter via Digitalmars-d
On Friday, 3 March 2017 at 19:49:06 UTC, Jared Jeffries wrote: I think that the programming tutorial using D as the first programming language is what is really need, and fortunately I see that now it's on his way. Ali Çehreli's book is really good in that regard. he explains programming

Re: opIndex() may hide opSlice()

2017-03-10 Thread Patrick Schluter via Digitalmars-d
On Friday, 10 March 2017 at 15:41:31 UTC, Jonathan M Davis wrote: On Friday, March 10, 2017 14:15:45 Nick Treleaven via Digitalmars-d wrote: On Friday, 10 March 2017 at 01:10:21 UTC, H. S. Teoh wrote: > On Fri, Mar 10, 2017 at 01:07:33AM +, XavierAP via > > Digitalmars-d wrote: >> The web

Re: Rename 'D' to 'D++'

2017-03-11 Thread Patrick Schluter via Digitalmars-d
On Saturday, 11 March 2017 at 10:32:02 UTC, meppl wrote: On Friday, 10 March 2017 at 11:25:11 UTC, Traktor TOni wrote: I think the name is just misleading, the D developers should at least be honest with themselves. look here: https://en.wikipedia.org/wiki/C_(programming_language)#History

Re: DIP 1011-extern(delegate)--Formal Review

2017-08-12 Thread Patrick Schluter via Digitalmars-d
On Friday, 11 August 2017 at 17:57:30 UTC, Dominikus Dittes Scherkl wrote: On Friday, 11 August 2017 at 10:45:03 UTC, Mike Parker wrote: The first stage of the formal review for DIP 1011 [1], "extern(delegate)", is now underway. I see no problem with this DIP. And even if the usecase is rare,

Re: proposed @noreturn attribute

2017-07-17 Thread Patrick Schluter via Digitalmars-d
On Monday, 17 July 2017 at 15:39:30 UTC, Olivier FAURE wrote: On Sunday, 16 July 2017 at 20:44:13 UTC, Andrei Alexandrescu wrote: An issue is that we already have typeof(null). typeof(null) and typeof(assert(0))* are two ways to specify almost the same thing. One question is whether

Re: proposed @noreturn attribute

2017-07-10 Thread Patrick Schluter via Digitalmars-d
On Monday, 10 July 2017 at 18:09:54 UTC, H. S. Teoh wrote: On Sun, Jul 09, 2017 at 02:49:35PM -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: On 07/09/2017 06:51 AM, Daniel N wrote: > On Sunday, 9 July 2017 at 10:31:47 UTC, Mr.D wrote: > > On Saturday, 8 July 2017 at 10:15:39 UTC,

Re: Slides share: DMesos - Not only a re-implementation of Mesos

2017-07-12 Thread Patrick Schluter via Digitalmars-d
On Monday, 10 July 2017 at 18:45:34 UTC, Nick Sabalausky (Abscissa) wrote: On 07/10/2017 02:16 PM, Joakim wrote: I'm actually skeptical of cloud- I think mobile p2p will eat most of the cloud- I've been REALLY hoping p2p will eat...cloud^H^H^H^H^Hcentralized internet services[1], but if I

Re: The X Macro using D

2017-07-21 Thread Patrick Schluter via Digitalmars-d
On Thursday, 20 July 2017 at 21:17:45 UTC, Walter Bright wrote: Some time ago, I wrote about the X Macro in C: https://digitalmars.com/articles/b51.html I used it from time to time in C code. It's one of the things I actually like about the C preprocessor. But in translating the aged C

Re: all OS functions should be "nothrow @trusted @nogc"

2017-07-27 Thread Patrick Schluter via Digitalmars-d
On Thursday, 27 July 2017 at 11:46:24 UTC, Steven Schveighoffer wrote: On 7/27/17 2:48 AM, Jacob Carlborg wrote: And then the compiler runs the "Dead Code Elimination" pass and we're left with: void contains_null_check(int* p) { *p = 4; } So the result is that it will segfault. I don't

Re: [your code here] Pure RPN calculator

2017-07-26 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 26 July 2017 at 17:12:00 UTC, Mike Wey wrote: On 26-07-17 16:40, Iakh wrote: On Wednesday, 26 July 2017 at 09:46:45 UTC, Timon Gehr wrote: readln.split.fold!((stack,op){ switch(op){ static foreach(c;"+-*/") case [c]: return

Re: all OS functions should be "nothrow @trusted @nogc"

2017-07-26 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 26 July 2017 at 01:09:50 UTC, Steven Schveighoffer wrote: On 7/25/17 8:45 PM, Timon Gehr wrote: On 26.07.2017 02:35, Steven Schveighoffer wrote: On 7/25/17 5:23 PM, Moritz Maxeiner wrote: On Tuesday, 25 July 2017 at 20:16:41 UTC, Steven Schveighoffer wrote: The behavior is

Re: all OS functions should be "nothrow @trusted @nogc"

2017-07-26 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 26 July 2017 at 03:16:44 UTC, Walter Bright wrote: On 7/25/2017 6:09 PM, Steven Schveighoffer wrote: Likewise, because D depends on hardware flagging of dereferencing null as a segfault, any platforms that *don't* have that for C also won't have it for D. And then @safe doesn't

Re: My simple implementation of PHP strip_tags()

2017-06-28 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 28 June 2017 at 18:08:12 UTC, aberba wrote: I wanted strip_tags() for sanitization in vibe.d and I set out for algorithms on how to do it and came across this JavaScript library at string stripTags(string input, in string[] allowedTags = []) { import std.regex: Captures,

Re: Deprecate real

2017-06-30 Thread Patrick Schluter via Digitalmars-d
On Friday, 30 June 2017 at 10:58:50 UTC, ixid wrote: On Friday, 30 June 2017 at 10:49:19 UTC, Stefan Koch wrote: On Friday, 30 June 2017 at 10:44:41 UTC, ixid wrote: On Friday, 30 June 2017 at 10:26:03 UTC, Nicholas Wilson wrote: On Friday, 30 June 2017 at 10:07:44 UTC, ixid wrote: Are there

Re: Graph rendering on dlang.org

2017-07-01 Thread Patrick Schluter via Digitalmars-d
On Friday, 30 June 2017 at 21:52:10 UTC, Brian Schott wrote: On Friday, 30 June 2017 at 21:40:05 UTC, Andrei Alexandrescu wrote: What would be a nice tool to render this DAG online? Who'd want to work on inserting this? Ideally it would be some vector rendering. Graphviz's "dot" tool can

Re: Master thesis

2017-07-01 Thread Patrick Schluter via Digitalmars-d
On Saturday, 1 July 2017 at 15:58:04 UTC, ketmar wrote: Dgame wrote: On Saturday, 1 July 2017 at 14:40:36 UTC, ketmar wrote: Dgame wrote: Which impact would have D on the software-architecture, if it would be choosen for a 2D game instead of C/C++? i can actually finish 'em. most of the

Re: auto*

2017-07-06 Thread Patrick Schluter via Digitalmars-d
On Thursday, 6 July 2017 at 23:50:24 UTC, bauss wrote: On Thursday, 6 July 2017 at 23:12:03 UTC, H. S. Teoh wrote: On Thu, Jul 06, 2017 at 10:31:10PM +, Meta via Digitalmars-d wrote: On Thursday, 6 July 2017 at 21:58:45 UTC, H. S. Teoh wrote: > On Thu, Jul 06, 2017 at 09:42:22PM +,

  1   2   3   4   5   >