Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Patrick Schluter via Digitalmars-d
On Saturday, 24 February 2018 at 18:46:50 UTC, Steven Schveighoffer wrote: On 2/24/18 7:00 AM, Patrick Schluter wrote: On Saturday, 24 February 2018 at 04:41:44 UTC, H. S. Teoh wrote: [...] Last week I saw a video showing how a forum was shutdown because it was alledgedly full of racists. Th

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-27 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 27 February 2018 at 07:33:05 UTC, Basile B. wrote: On Saturday, 24 February 2018 at 19:30:52 UTC, Patrick Schluter wrote: On Saturday, 24 February 2018 at 18:46:50 UTC, Steven Schveighoffer wrote: On 2/24/18 7:00 AM, Patrick Schluter wrote: [...] Wow, that's insane. I would be in

Re: C++ launched its community survey, too

2018-02-28 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 27 February 2018 at 21:07:03 UTC, H. S. Teoh wrote: On Tue, Feb 27, 2018 at 01:33:18PM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] [...] Not strictly true. My old C++98 project no longer compiled with the latest g++, because it contained things allowed in C++98 that a

Re: Advent of D

2018-03-06 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 6 March 2018 at 18:09:21 UTC, Jordi Gutiérrez Hermoso wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ Really nice, thank you.

Re: Vtable for virtual functions in D

2018-03-07 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote: Does anyone know if D is using the vtable implementation for virtual functions just like most C++ compilers? If yes, can someone explain the advantages of this strategy? A function pointer in C is regarded as expensive because of missing

Re: Vtable for virtual functions in D

2018-03-07 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote: I have worked with C in embedded systems for many years now, and for our modern Linux systems we are using a combination of C and Java today. Java for parts where memory safety is more important than speed/determinism, and C for the crit

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 ref

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 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: 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}, (T3

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: 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 declar

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 che

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 ca

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 no

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

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 f

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 ge

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

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: 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 fo

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 th

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 th

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 GC

Re: {OT} Youtube Video: newCTFE: Starting to write the x86 JIT

2017-04-25 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 25 April 2017 at 09:09:00 UTC, Ola Fosheim Grøstad wrote: On Monday, 24 April 2017 at 17:48:50 UTC, Stefan Koch wrote: [...] Oh, ok. AFAIK The decoding of indexing modes into micro-ops (the real instructions used inside the CPU, not the actual op-codes) has no effect on the cachi

Re: Jonathan Blow's presentation

2017-05-08 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 02:13:19 UTC, Nick Sabalausky (Abscissa) wrote: On 05/08/2017 03:28 PM, Jack Stouffer wrote: Uncompressed? Seriously? I assume that really means FLAC or something rather than truly uncompressed, but even still...sounds more like a bullet-list pandering^H^H^H^H^H^H^H

Re: Fantastic exchange from DConf

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 06:15:12 UTC, H. S. Teoh wrote: On Mon, May 08, 2017 at 06:33:08PM +, Jerry via Digitalmars-d wrote: strncpy(buf, src, sizeof(buf)); Quick, without looking: what's wrong with the above line of code? Not so obvious, huh? The problem is that strncpy is,

Re: Fantastic exchange from DConf

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 06:15:12 UTC, H. S. Teoh wrote: int my_func(mytype_t *input, outbuf_t *output_buf, char *buffer, int size) { /* Typical lazy way of null-checking (that will blow up * later) */ myhandle

Re: Jonathan Blow's presentation

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 08:24:40 UTC, Nick Sabalausky (Abscissa) wrote: On 05/09/2017 02:10 AM, Patrick Schluter wrote: On Tuesday, 9 May 2017 at 02:13:19 UTC, Nick Sabalausky (Abscissa) wrote: On 05/08/2017 03:28 PM, Jack Stouffer wrote: Uncompressed? Seriously? I assume that really means

Re: Fantastic exchange from DConf

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 14:13:31 UTC, Walter Bright wrote: On 5/8/2017 1:55 PM, John Carter wrote: On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: Walter: I believe memory safety will kill C. C/C++ has been granted an extension of life by the likes of valgrind and purify and *-san

Re: Fantastic exchange from DConf

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 16:55:54 UTC, H. S. Teoh wrote: On Tue, May 09, 2017 at 08:18:09AM +, Patrick Schluter via [...] Ouch. Haha, even I forgot about this particularly lovely aspect of C. Hooray, freely call functions without declaring them, and "obviously" they return int! Why not?

Re: Thoughts on some code breakage with 2.074

2017-05-09 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 9 May 2017 at 17:34:48 UTC, H. S. Teoh wrote: On Tue, May 09, 2017 at 02:13:34PM +0200, Adam Wilson via Digitalmars-d wrote: > [...] [...] [...] [...] I don't represent any company, but I have to also say that I *appreciate* breaking changes that reveal latent bugs in my code.

Re: Fantastic exchange from DConf

2017-05-10 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 10 May 2017 at 06:28:31 UTC, H. S. Teoh wrote: On Tue, May 09, 2017 at 09:19:08PM -0400, Nick Sabalausky [...] Perhaps I'm just being cynical, but my current unfounded hypothesis is that the majority of C/C++ programmers ... Just a nitpick, could we also please stop conflating C

Re: Fantastic exchange from DConf

2017-05-10 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 10 May 2017 at 11:16:57 UTC, Atila Neves wrote: [...] The likelihood of a randomly picked C/C++ programmer not even knowing what a profiler is, much less having used one, is extremely high in my experience. I worked with a lot of embedded C programmers with several years of expe

Re: Thoughts on some code breakage with 2.074

2017-05-11 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 10 May 2017 at 19:06:40 UTC, Ali Çehreli wrote: On 05/10/2017 11:49 AM, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, May 10, 2017 05:05:59 Ali Çehreli via Digitalmars-d wrote: >> On 05/09/2017 10:34 AM, H. S. Teoh via Digitalmars-d wrote: >> > After upgrading the com

Re: D is really cool

2017-05-13 Thread Patrick Schluter via Digitalmars-d
On Saturday, 13 May 2017 at 11:05:26 UTC, bachmeier wrote: On Saturday, 13 May 2017 at 06:47:54 UTC, nkm1 wrote: Atilla's library... but, as someone on Reddit said, at the moment that is rather "unergonomic". I'm sure that will get better over time, though. At least I don't see why not. Most o

Re: Fantastic exchange from DConf

2017-05-14 Thread Patrick Schluter via Digitalmars-d
On Sunday, 14 May 2017 at 00:05:56 UTC, Dibyendu Majumdar wrote: On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: Walter: I believe memory safety will kill C. Hi, I think that comparing languages like D to C is not appropriate. C is a high level assembler and has different design goa

Re: Fantastic exchange from DConf

2017-05-14 Thread Patrick Schluter via Digitalmars-d
What does that snippet do ? What should it do? int caca(void) { for(int i=0x; i!=0x8000; i++) printf("coucou"); }

Re: DIP 1003 Formal Review

2017-05-17 Thread Patrick Schluter via Digitalmars-d
On Tuesday, 16 May 2017 at 19:25:25 UTC, Steven Schveighoffer wrote: 1) Consistency with functions without contracts. This only applies to the "naked" version which has ugly }{ in it. The other options people are asking about are replacing body with a keyword, which I think you agree would b

Re: Fantastic exchange from DConf

2017-05-17 Thread Patrick Schluter via Digitalmars-d
On Thursday, 18 May 2017 at 00:58:31 UTC, Steven Schveighoffer wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: On Wed, May 17, 2017 at 04:16:59PM -0700, Walter Bright via Digitalmars-d wrote: On 5/17/2017 1:46 PM, H. S. Teoh via Digitalmars-d wrote: [...] It may not be the dev

Re: Fantastic exchange from DConf

2017-05-18 Thread Patrick Schluter via Digitalmars-d
On Thursday, 18 May 2017 at 06:36:55 UTC, Paulo Pinto wrote: On Thursday, 18 May 2017 at 05:07:38 UTC, Patrick Schluter wrote: On Thursday, 18 May 2017 at 00:58:31 UTC, Steven Schveighoffer wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: [...] What will cause a shift is a cont

Re: C and memory safety comments by me

2017-05-19 Thread Patrick Schluter via Digitalmars-d
On Friday, 19 May 2017 at 13:45:04 UTC, Steven Schveighoffer wrote: On 5/19/17 9:35 AM, Tobias Mueller wrote: They do however say that the actual knowledge about Rust in the D community seems to be rather small, compared to the amount of criticism against it. And TBQH I have to agree. To criti

Re: Warning, ABI breakage from 2.074 to 2.075

2017-05-25 Thread Patrick Schluter via Digitalmars-d
On Thursday, 25 May 2017 at 14:36:43 UTC, Jonathan M Davis wrote: On Thursday, May 25, 2017 13:23:57 Joakim via Digitalmars-d wrote: On Thursday, 25 May 2017 at 10:42:44 UTC, Basile B. wrote: > Static libraries that are > - compiled with dmd 2.074 (maybe previous versions too) > - call format()

Re: Non-x86 targets for DMD

2017-05-25 Thread Patrick Schluter via Digitalmars-d
On Thursday, 25 May 2017 at 20:47:42 UTC, solidstate1991 wrote: On Monday, 22 May 2017 at 14:49:46 UTC, Stefan Koch wrote: Conditional execution is not in the later models of ARM, I believe. Also does not really provide advantages over conditional jumps, except in rare circumstances. That m

Re: Non-x86 targets for DMD

2017-05-25 Thread Patrick Schluter via Digitalmars-d
On Thursday, 25 May 2017 at 21:15:57 UTC, Patrick Schluter wrote: On Thursday, 25 May 2017 at 20:47:42 UTC, solidstate1991 wrote: On Monday, 22 May 2017 at 14:49:46 UTC, Stefan Koch wrote: Conditional execution is not in the later models of ARM, I believe. Also does not really provide advanta

Re: std.csv Performance Review

2017-06-03 Thread Patrick Schluter via Digitalmars-d
On Sunday, 4 June 2017 at 06:15:24 UTC, H. S. Teoh wrote: On Sun, Jun 04, 2017 at 05:41:10AM +, Jesse Phillips via (Note that this is much less of a limitation than it seems; for example you could use std.mmfile to memory-map the file into your address space so that it doesn't actually have

Re: std.csv Performance Review

2017-06-04 Thread Patrick Schluter via Digitalmars-d
On Sunday, 4 June 2017 at 06:54:46 UTC, Patrick Schluter wrote: On Sunday, 4 June 2017 at 06:15:24 UTC, H. S. Teoh wrote: On Sun, Jun 04, 2017 at 05:41:10AM +, Jesse Phillips via (Note that this is much less of a limitation than it seems; for example you could use std.mmfile to memory-map t

Re: Isn't it about time for D3?

2017-06-13 Thread Patrick Schluter via Digitalmars-d
Before even contemplating a big disrupting language split like proposed by the OP, wouldn't it first more appropriate to write a nice article, DIP, blog, whatever, listing the defects of the current language that can not be solved by progressive evolution? I haven't the impression that the *lang

Re: atomic operations compared to c++

2017-06-14 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 14 June 2017 at 12:15:49 UTC, Russel Winder wrote: On Wed, 2017-06-14 at 12:28 +0100, rikki cattermole via Digitalmars-d wrote: > [...] Step back a moment. C++ and Java are trying to stop programmers using these features, in favour of using higher level abstractions. In C++ and

comp.lang.c thread about D

2017-06-20 Thread Patrick Schluter via Digitalmars-d
Funny. Someone replied to a post from 1988 concerning the D language. The original thread (not read yet) from 1988 even has messages from Walter. https://groups.google.com/forum/#!topic/comp.lang.c/y0uGj6tHe2E%5B201-225%5D original thread https://groups.google.com/forum/#!topic/comp.lang.c/y0u

Re: What is your favorite D feature? [Call for snippets]

2017-06-22 Thread Patrick Schluter via Digitalmars-d
On Thursday, 22 June 2017 at 07:00:17 UTC, Seb wrote: Thanks a lot, but I was looking for small snippets (< 10 LoC) than could be used to show the awesomeness of D at the roulette enum E {IN = -1, V1, V2, V3, X1 } mixin({ string code = "enum EBIT : ulong { "~ "init

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 1

2017-06-22 Thread Patrick Schluter via Digitalmars-d
On Thursday, 22 June 2017 at 22:12:57 UTC, MysticZach wrote: On Thursday, 22 June 2017 at 21:56:29 UTC, Timon Gehr wrote: On 22.06.2017 23:51, MysticZach wrote: On Thursday, 22 June 2017 at 21:41:55 UTC, MysticZach wrote: The whole double parentheses is a bit ugly to me. Is there any problem w

Re: dlang website design

2017-06-23 Thread Patrick Schluter via Digitalmars-d
On Friday, 23 June 2017 at 13:43:00 UTC, ag0aep6g wrote: On 06/23/2017 08:49 AM, Ecstatic Coder wrote: "Systems programming" may scare users away who think they're not good enough for that kind of programming. True. "General-purpose programming" is a better fit, in my opinion. In mine to

Re: D Milestones

2017-06-26 Thread Patrick Schluter via Digitalmars-d
On Monday, 26 June 2017 at 12:58:00 UTC, Andrea Fontana wrote: On Monday, 26 June 2017 at 10:14:08 UTC, Martin Tschierschke wrote: I think it would be good for all which want to invest their time in learning D to know more about the history and probably the future of D. D frontend written in

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 a

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 outp

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 time

Re: auto*

2017-07-06 Thread Patrick Schluter via Digitalmars-d
On Thursday, 6 July 2017 at 20:24:24 UTC, FoxyBrown wrote: On Thursday, 6 July 2017 at 18:11:13 UTC, H. S. Teoh wrote: On Thu, Jul 06, 2017 at 06:10:57PM +, FoxyBrown via Digitalmars-d wrote: Create an auto pointer, handy in some cases and fits in the language as a natural generalization.

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 +, Meta

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

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 we

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 typeof(asse

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 code

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 defin

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 e

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 stack[0..$-2]

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: 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 that

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: 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 out

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 lik

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: [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 m

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 merg

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 ev

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: 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 to

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 h

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 "sta

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 studi

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 +, de

Re: Please rid me of this goto

2016-06-24 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, deada

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: 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 write

Re: Has someone encountered similar issues with -cov?

2016-07-01 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. It'

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 Alexandr

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 -- A

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 expressio

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

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: 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 fixed).

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: 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 a

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. ;-) I

<    1   2   3   >