Re: This is why I don't use D.

2018-09-06 Thread Patrick Schluter via Digitalmars-d
On Thursday, 6 September 2018 at 12:33:21 UTC, Everlast wrote: On Wednesday, 5 September 2018 at 12:32:33 UTC, Andre Pany wrote: On Wednesday, 5 September 2018 at 06:47:00 UTC, Everlast wrote: [...] You showed as a painful issue in our eco system which we can work on, thank you. You do

Re: Sutter's ISO C++ Trip Report - The best compliment is when someone else steals your ideas....

2018-07-13 Thread Patrick Schluter via Digitalmars-d
On Friday, 13 July 2018 at 20:12:36 UTC, Steven Schveighoffer wrote: On 7/13/18 3:53 PM, Paolo Invernizzi wrote: On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer wrote: On 7/13/18 8:55 AM, Adam D. Ruppe wrote: [...] But it doesn't scale if you use OS processes, it's too

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

Re: Linux signal handling - notifying a condition variable

2018-03-15 Thread Patrick Schluter via Digitalmars-d
On Thursday, 15 March 2018 at 19:23:26 UTC, Dmitry Olshansky wrote: On Thursday, 15 March 2018 at 17:30:50 UTC, Jim King wrote: [...] Another option if you are on linux is to use eventfd. Then you can trigger it with simple write on eventfd descriptor. As far as waiting goes it’s either

Re: Linux signal handling - notifying a condition variable

2018-03-15 Thread Patrick Schluter via Digitalmars-d
On Thursday, 15 March 2018 at 16:51:59 UTC, Jim King wrote: I am trying to add graceful shutdown support to a test harness. In the test harness, a server class consumes a thread to accept connections and service them. In order to stop the server, it has to be interrupted. This interruption

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

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: that is bug?

2018-04-08 Thread Patrick Schluter via Digitalmars-d
On Saturday, 7 April 2018 at 20:57:23 UTC, kdevel wrote: On Saturday, 7 April 2018 at 16:52:00 UTC, Patrick Schluter wrote: [...] The odd man out is C++ [1], assignment has higher precedence because of right to left evaluation. Your reference [1] is not even a witness to your claim. The

Re: that is bug?

2018-04-08 Thread Patrick Schluter via Digitalmars-d
On Sunday, 8 April 2018 at 16:47:59 UTC, Patrick Schluter wrote: On Sunday, 8 April 2018 at 10:03:33 UTC, kdevel wrote: On Sunday, 8 April 2018 at 07:22:19 UTC, Patrick Schluter wrote: [...] To summarize: C++ works as expected and C prevents the assigment because the conditional operator

Re: that is bug?

2018-04-08 Thread Patrick Schluter via Digitalmars-d
On Sunday, 8 April 2018 at 10:03:33 UTC, kdevel wrote: On Sunday, 8 April 2018 at 07:22:19 UTC, Patrick Schluter wrote: You may find an in-depth discussion of the C++ case in https://stackoverflow.com/questions/7499400/ternary-conditional-and-assignment-operator-precedence My formulation was

Re: that is bug?

2018-04-09 Thread Patrick Schluter via Digitalmars-d
On Monday, 9 April 2018 at 14:28:54 UTC, MattCoder wrote: On Monday, 9 April 2018 at 03:35:07 UTC, Ali Çehreli wrote: ... I don't have any problem with that part either. The following makes sense to me. I may have even used it in the past (likely in C++): (cond ? a : b) = foo; ... For

Re: that is bug?

2018-04-07 Thread Patrick Schluter via Digitalmars-d
On Saturday, 7 April 2018 at 14:28:05 UTC, kdevel wrote: On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis wrote: true?stt="AA":stt="BB";-///Out:BB [...] Assignment takes precendence over the ternary operator. That's not true. Not in D and not in C/C++ The

Re: Small Buffer Optimization for string and friends

2018-04-16 Thread Patrick Schluter via Digitalmars-d
On Sunday, 8 April 2012 at 09:46:28 UTC, Vladimir Panteleev wrote: On Sunday, 8 April 2012 at 05:56:36 UTC, Andrei Alexandrescu wrote: Walter and I discussed today about using the small string optimization in string and other arrays of immutable small objects. On 64 bit machines, string

Re: Deprecating this(this)

2018-04-01 Thread Patrick Schluter via Digitalmars-d
On Sunday, 1 April 2018 at 10:49:22 UTC, bachmeier wrote: On Sunday, 1 April 2018 at 10:04:04 UTC, Johannes Loher wrote: This seems really sudden, april fool's joke? Not really sure, as there are real problems with this(this)... What I was wondering too. I mean, breaking changes just don't

Re: newCTFE Status March 2018

2018-03-31 Thread Patrick Schluter via Digitalmars-d
On Friday, 30 March 2018 at 20:46:32 UTC, Stefan Koch wrote: On Friday, 30 March 2018 at 20:15:20 UTC, 12345swordy wrote: On Friday, 30 March 2018 at 19:48:02 UTC, Stefan Koch wrote: [...] How close are you to finish this? 85 to 90% maybe. Ok, so it will take 90% of the total to get to

Re: newCTFE Status March 2018

2018-03-31 Thread Patrick Schluter via Digitalmars-d
On Saturday, 31 March 2018 at 08:29:22 UTC, Stefan Koch wrote: On Saturday, 31 March 2018 at 08:19:39 UTC, Patrick Schluter wrote: On Friday, 30 March 2018 at 20:46:32 UTC, Stefan Koch wrote: On Friday, 30 March 2018 at 20:15:20 UTC, 12345swordy wrote: On Friday, 30 March 2018 at 19:48:02

Re: About making Phobos @safe

2018-03-24 Thread Patrick Schluter via Digitalmars-d
On Friday, 23 March 2018 at 20:33:40 UTC, Jack Stouffer wrote: On Friday, 23 March 2018 at 17:31:09 UTC, Jesse Phillips wrote: [...] If @safe doesn't protect against buffer overflows then chuck the whole thing out the window and start over. [...] zlib sources are included in phobos. It

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

Re: Sign the installers

2018-06-27 Thread Patrick Schluter via Digitalmars-d
On Thursday, 28 June 2018 at 01:34:22 UTC, Jonathan M Davis wrote: On Wednesday, June 27, 2018 17:59:42 Brad Roberts via Digitalmars-d wrote: On 6/27/2018 5:34 PM, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, June 27, 2018 17:26:36 Manu via Digitalmars-d > wrote: >> I guess people

Re: Deep nesting vs early returns

2018-10-05 Thread Patrick Schluter via Digitalmars-d
On Friday, 5 October 2018 at 16:02:49 UTC, Nick Treleaven wrote: On Thursday, 4 October 2018 at 06:43:02 UTC, Gopan wrote: I have seen people enclosing the function logic inside a while(1) merely to stick on to single return at the end. while(1) { ... break; //otherwise

Re: D Logic bug

2018-10-11 Thread Patrick Schluter via Digitalmars-d
On Thursday, 11 October 2018 at 14:35:34 UTC, James Japherson wrote: Took me about an hour to track this one down! A + (B == 0) ? 0 : C; D is evaluating it as (A + (B == 0)) ? 0 : C; As it should. The whole point of the parenthesis was to associate. I usually explicitly associate

Re: D Logic bug

2018-10-12 Thread Patrick Schluter via Digitalmars-d
On Thursday, 11 October 2018 at 23:17:15 UTC, Jonathan Marler wrote: On Thursday, 11 October 2018 at 21:57:00 UTC, Jonathan M Davis wrote: On Thursday, October 11, 2018 1:09:14 PM MDT Jonathan Marler via Digitalmars-d wrote: On Thursday, 11 October 2018 at 14:35:34 UTC, James Japherson wrote:

Re: D Logic bug

2018-10-12 Thread Patrick Schluter via Digitalmars-d
On Thursday, 11 October 2018 at 23:17:57 UTC, Jonathan M Davis wrote: On Thursday, October 11, 2018 8:35:34 AM MDT James Japherson via Digitalmars-d wrote: Certainly, major languages like C, C++, Java, and C# all do it the way that D does, and they all have the same kind of precedence for

Re: D Logic bug

2018-10-12 Thread Patrick Schluter via Digitalmars-d
On Friday, 12 October 2018 at 13:15:22 UTC, Steven Schveighoffer wrote: On 10/12/18 6:06 AM, Kagamin wrote: On Thursday, 11 October 2018 at 23:17:15 UTC, Jonathan Marler wrote: [...] That's https://issues.dlang.org/show_bug.cgi?id=14186 Wow, interesting that C precedence is different from

Re: Shared - Another Thread

2018-10-18 Thread Patrick Schluter via Digitalmars-d
On Thursday, 18 October 2018 at 17:01:46 UTC, Stanislav Blinov wrote: On Thursday, 18 October 2018 at 16:31:33 UTC, Vijay Nayar wrote: Imagine a simple algorithm that does logic on very long numbers, split into bytes. One multi-threaded implementation may use 4 threads. The first operating

Re: Shared - Another Thread

2018-10-18 Thread Patrick Schluter via Digitalmars-d
On Thursday, 18 October 2018 at 16:24:39 UTC, Manu wrote: On Thu., 18 Oct. 2018, 5:05 am Patrick Schluter via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote: >> If something might be used by someone else

Re: D Binding to GUI libraries

2018-10-21 Thread Patrick Schluter via Digitalmars-d
On Sunday, 21 October 2018 at 18:24:30 UTC, Jacob Carlborg wrote: On 2018-10-21 19:29, Russel Winder wrote: But who apart from Eclipse and JetBrains uses Java for desktop GUI applications? There's probably a ton of business/enterprise applications that are written in Java. But I don't

Re: Shared - Another Thread

2018-10-18 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote: If something might be used by someone else it's better not to touch it, unless one has confirmation it is not used by someone else. This is what shared has to enforce. Yes. But how can the compiler statically verify this?

Re: Warn on unused imports?

2018-10-05 Thread Patrick Schluter via Digitalmars-d
On Thursday, 4 October 2018 at 18:55:01 UTC, Nick Sabalausky (Abscissa) wrote: On 09/26/2018 06:00 AM, Anonymouse wrote: On Tuesday, 25 September 2018 at 13:03:30 UTC, FeepingCreature wrote: I'm playing with a branch of DMD that would warn on unused imports: Would just like to say that I

Re: Deep nesting vs early returns

2018-10-06 Thread Patrick Schluter via Digitalmars-d
On Saturday, 6 October 2018 at 05:36:59 UTC, Paolo Invernizzi wrote: On Friday, 5 October 2018 at 19:04:26 UTC, Nick Sabalausky (Abscissa) wrote: On 10/04/2018 11:40 PM, rikki cattermole wrote: [...] It's not *my* statement about newer/older. If you recall the programming atmosphere around

Re: Walter's Guide to Translating Code From One Language to Another

2018-09-22 Thread Patrick Schluter via Digitalmars-d
On Friday, 21 September 2018 at 06:24:14 UTC, Peter Alexander wrote: On Friday, 21 September 2018 at 06:00:33 UTC, Walter Bright wrote: I've learned this the hard way, and I've had to learn it several times because I am a slow learner. I've posted this before, and repeat it because bears

Re: OT: Bad translations

2018-09-26 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 26 September 2018 at 02:12:07 UTC, Ali Çehreli wrote: On 09/24/2018 08:17 AM, 0xEAB wrote: > - Non-idiomatic translations of tech terms [2] This is something I had heard from a Digital Research programmer in early 90s: English message was something like "No memory left" and

Re: Updating D beyond Unicode 2.0

2018-09-24 Thread Patrick Schluter via Digitalmars-d
On Monday, 24 September 2018 at 13:26:14 UTC, Steven Schveighoffer wrote: 2. There are no rules about what *encoding* is acceptable, it's implementation defined. So various compilers have different rules as to what will be accepted in the actual source code. In fact, I read somewhere that not

Re: phobo's std.file is completely broke!

2018-09-17 Thread Patrick Schluter via Digitalmars-d
On Monday, 17 September 2018 at 12:37:13 UTC, Temtaime wrote: On Sunday, 16 September 2018 at 22:49:26 UTC, Vladimir Panteleev wrote: To elaborate: On Sunday, 16 September 2018 at 22:40:45 UTC, Vladimir Panteleev wrote: If *YOU* are OK with the consequences of complexity, implement this in

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 September 2018 at 15:25:55 UTC, Joakim wrote: You've probably heard of the possibly apocryphal story of how Blackberry and Nokia engineers disassembled the first iPhone and dismissed it because it only got a day of battery life, while their devices lasted much longer. They

Re: vsprintf or printf variable arguments

2016-08-06 Thread Patrick Schluter via Digitalmars-d-learn
On Friday, 5 August 2016 at 08:32:42 UTC, kink wrote: On Thursday, 4 August 2016 at 21:03:52 UTC, Mark "J" Twain wrote: How can I construct a va_list for vsprintf when all I have is the a list of pointers to the data, without their type info? A va_list seems to be a packed struct of values

Re: pure functions

2016-09-13 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 06:59:10 UTC, Jonathan M Davis wrote: On Tuesday, September 13, 2016 03:33:04 Ivy Encarnacion via Digitalmars-d- learn wrote: A pure function cannot call any function that is not pure [...] I've read that a lot but it's not true. A pure function can call

Re: D and Oracle Pro*C

2017-01-29 Thread Patrick Schluter via Digitalmars-d-learn
On Sunday, 29 January 2017 at 01:53:01 UTC, KP wrote: Hi, Is anyone using Oracle's Pro*C with D? Thanks, KP Not yet, but would like to too.

Re: simple static if / traits question...

2017-02-23 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 23 February 2017 at 18:35:29 UTC, Profile Anaysis wrote: [...] option 1 is the one I was shooting for. does the static if (audio) just check for the existence of audio, or does it also check to see if audio is true as well? Yes, but it checks at compile time. So the code

Re: DIP1000: Scoped Pointers

2016-08-16 Thread Patrick Schluter via Digitalmars-d-announce
On Monday, 15 August 2016 at 21:25:22 UTC, Walter Bright wrote: On 8/15/2016 6:54 AM, Rory McGuire via Digitalmars-d-announce wrote: okay nice, so that code would not compile but code such as: void test() { scope rnd = new Rnd; // reference semantic and stack allocated auto rnd2 = rnd;

Re: Recommend: IDE and GUI library

2017-03-01 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 1 March 2017 at 23:44:47 UTC, XavierAP wrote: On Wednesday, 1 March 2017 at 20:00:32 UTC, thedeemon wrote: For this I found out how to clone the dependencies, sorry about that... (Only from the command line... Anyone recommends better free Windows Git gui clients than GitHub

Re: Why double not? (!!)

2016-11-19 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 19 November 2016 at 15:50:26 UTC, Adam D. Ruppe wrote: On Saturday, 19 November 2016 at 15:40:38 UTC, Ryan wrote: Wouldn't this just be the same as auto hasConsole = cast(bool) GetConsoleCP(); ? Yes, it is in D, though the habit often comes from C where things are different. But

Re: DIP 1003: remove `body` as a keyword

2016-12-11 Thread Patrick Schluter via Digitalmars-d-announce
On Sunday, 11 December 2016 at 11:33:40 UTC, Basile B. wrote: On Sunday, 11 December 2016 at 07:52:28 UTC, Rory McGuire wrote: On Sat, Dec 10, 2016 at 4:43 PM, Basile B. via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: [...] Why is #line obsolete? I use it a lot

Re: -fPIC and 32-bit dmd.conf settings

2017-04-09 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 8 April 2017 at 21:31:31 UTC, Joseph Rushton Wakeling wrote: Hello folks, The default dmd.conf settings for 64-bit environments include the -fPIC flag (for good reason), but the settings for 32-bit environments do not. Any particular reason for this? Thanks & best wishes,

Re: -fPIC and 32-bit dmd.conf settings

2017-04-09 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 8 April 2017 at 21:31:31 UTC, Joseph Rushton Wakeling wrote: Hello folks, The default dmd.conf settings for 64-bit environments include the -fPIC flag (for good reason), but the settings for 32-bit environments do not. Any particular reason for this? Thanks & best wishes,

Re: Release D 2.075.0

2017-07-20 Thread Patrick Schluter via Digitalmars-d-announce
On Wednesday, 19 July 2017 at 19:34:44 UTC, Joakim wrote: On Wednesday, 19 July 2017 at 15:36:22 UTC, Martin Nowak wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 [...] Wow, dmd builds in 12 seconds on a single linux/x64 core, can't wait to see what that time is when the backend is

Re: Why structs and classes instanciations are made differently ?

2017-07-26 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 24 July 2017 at 17:42:30 UTC, Steven Schveighoffer wrote: On 7/24/17 11:45 AM, Houdini wrote: On Monday, 24 July 2017 at 15:41:33 UTC, Steven Schveighoffer wrote: Because types with inheritance generally don't work right if you pass by value (i.e. the slicing problem). structs

Re: Release D 2.075.0

2017-07-20 Thread Patrick Schluter via Digitalmars-d-announce
On Thursday, 20 July 2017 at 12:10:14 UTC, Adrian Matoga wrote: On Thursday, 20 July 2017 at 07:19:03 UTC, Patrick Schluter wrote: version 2.067 that still had the C++ frontend took more than 100 seconds. I can hardly believe it. I remember versions 2.05x building in about 11 seconds. 1

Re: Funny issue with casting double to ulong

2017-07-04 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 4 July 2017 at 00:35:10 UTC, H. S. Teoh wrote: On Mon, Jul 03, 2017 at 07:13:45AM +, Era Scarecrow via Digitalmars-d-learn wrote: On Monday, 3 July 2017 at 06:20:22 UTC, H. S. Teoh wrote: [...] > I don't think there's a way to change how the FPU works -- > the hardware is

Re: Funny issue with casting double to ulong

2017-07-03 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 3 July 2017 at 05:38:56 UTC, Era Scarecrow wrote: On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote: 6.251 has no perfect double representation. It's real value is: I almost wonder if a BCD, fixed length or alternative for floating point should be an option... Either

Re: "Competitive Advantage with D" is one of the keynotes at C++Now 2017

2017-04-29 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 28 April 2017 at 22:11:30 UTC, H. S. Teoh wrote: The latest WAT I found in D is this one, see if you can figure it out: char ch; wchar wch; dchar dch; pragma(msg, typeof(true ? ch : ch));// char - OK pragma(msg, typeof(true ? ch : wch));

Re: "Competitive Advantage with D" is one of the keynotes at C++Now 2017

2017-04-29 Thread Patrick Schluter via Digitalmars-d-announce
On Saturday, 29 April 2017 at 11:48:46 UTC, Ola Fosheim Grøstad wrote: On Saturday, 29 April 2017 at 11:24:36 UTC, Patrick Schluter wrote: C99 says "if an int can represent all values of the original type, the value is converted to an int; otherwise, it is converted to an unsigned int."

Re: No tempFile() in std.file

2017-05-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 13:56:57 UTC, Jonathan M Davis wrote: On Tuesday, May 16, 2017 11:19:14 bachmeier via Digitalmars-d-learn wrote: On Monday, 15 May 2017 at 22:38:15 UTC, Jonathan M Davis wrote: > [...] That seems perfectly reasonable to me. Couldn't the function return both the path

Re: No tempFile() in std.file

2017-05-16 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 17 May 2017 at 05:30:40 UTC, Patrick Schluter wrote: On Tuesday, 16 May 2017 at 13:56:57 UTC, Jonathan M Davis wrote: [...] As your solution doesn't inherently solve the race condition associated with temporary files, you could still generate the name with a wrapper around

Re: The syntax of sort and templates

2017-05-26 Thread Patrick Schluter via Digitalmars-d-learn
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote: Hello everyone, I just started using D and I am a bit puzzled by the syntax of the sort function is std.algorithm.sorting, which is sort!(comparingFunction)(list) where comparingFunction is often a lambda expression. For instance in the

Re: Faster Command Line Tools in D

2017-05-30 Thread Patrick Schluter via Digitalmars-d-announce
On Tuesday, 30 May 2017 at 21:18:42 UTC, Steven Schveighoffer wrote: On 5/26/17 11:20 AM, John Colvin wrote: On Friday, 26 May 2017 at 14:41:39 UTC, John Colvin wrote: [...] This version also has the advantage of being (discounting any bugs in iopipe) correct for arbitrary unicode in all

Re: DCompute is now in the master branch of LDC

2017-05-30 Thread Patrick Schluter via Digitalmars-d-announce
On Tuesday, 30 May 2017 at 14:25:12 UTC, Atila Neves wrote: On Tuesday, 30 May 2017 at 12:21:02 UTC, piotrklos wrote: On Tuesday, 30 May 2017 at 06:00:57 UTC, Brad Anderson wrote: On Monday, 29 May 2017 at 20:36:26 UTC, Walter Bright wrote: [...] For what it's worth, I see "Compute" used

Re: DCompute is now in the master branch of LDC

2017-05-31 Thread Patrick Schluter via Digitalmars-d-announce
On Wednesday, 31 May 2017 at 09:07:16 UTC, ParticlePeter wrote: On Tuesday, 30 May 2017 at 18:06:56 UTC, Walter Bright wrote: [...] D-GPU is very misleading to people who use the GPU for its original purpose, which is graphics programming. One could assume D-GPU being an alternative to

Re: howto count lines - fast

2017-05-31 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 1 June 2017 at 04:39:17 UTC, Jonathan M Davis wrote: On Wednesday, May 31, 2017 16:03:54 H. S. Teoh via Digitalmars-d-learn wrote: [...] Digitalmars-d-learn wrote: [...] If you're really trying to make it fast, there may be something that you can do with SIMD. IIRC, Brian

Re: howto count lines - fast

2017-05-31 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 31 May 2017 at 23:03:54 UTC, H. S. Teoh wrote: On Wed, May 31, 2017 at 03:46:17PM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: On Wednesday, May 31, 2017 12:13:04 H. S. Teoh via Digitalmars-d-learn wrote: > I did some digging around, and it seems that wc is using >

Re: Creating and loading D plugins in D app

2017-06-03 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 3 June 2017 at 09:41:58 UTC, aberba wrote: On Friday, 2 June 2017 at 16:36:34 UTC, H. S. Teoh wrote: On Fri, Jun 02, 2017 at 12:19:48PM +, Adam D. Ruppe via Digitalmars-d-learn wrote: On Friday, 2 June 2017 at 11:09:05 UTC, aberba wrote: > 1. Get shared libs to work in D (the

Re: howto count lines - fast

2017-05-31 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 23:41:01 UTC, H. S. Teoh wrote: On Tue, May 30, 2017 at 08:02:38PM +, Nitram via Digitalmars-d-learn wrote: After reading https://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/ , i was wondering how fast one can do a simple "wc -l" in D. size_t

Re: Use template functions within mixin

2017-06-06 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 6 June 2017 at 15:00:50 UTC, Timoses wrote: Hey there, I'm wondering how I can use a template function within my mixin: ``` ubyte[] value = x[33, 3a,3f, d4]; foreach (type; TypeTuple!("int", "unsigned int", "byte")) {

Re: std.path.buildPath

2017-06-04 Thread Patrick Schluter via Digitalmars-d-learn
On Sunday, 4 June 2017 at 15:56:58 UTC, Jacob Carlborg wrote: On 2017-06-04 07:44, Jesse Phillips wrote: What is your expected behavior? Throw an exception? You can't really append an absolute path to another. Of course you can. I expect buildPath("/foo", "/bar") to result in "/foo/bar".

Re: How to implement opCmp?

2017-06-13 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 13 June 2017 at 16:49:14 UTC, H. S. Teoh wrote: On Tue, Jun 13, 2017 at 10:51:40AM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] I think Andrei has a nice way to do opCmp for integers that's a simple subtraction and negation or something like that. [...] In

Re: Looking for an equivalent to C++ std::getline in D

2017-05-07 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 6 May 2017 at 10:15:03 UTC, k-five wrote: Although I am not sure but it may Range in D, has the same concept that C++ has on iterator, like InputIterator or OutputIterator, since I realized that the output of [ filter ] does not have RandomAccessRange so I can not use input[ 0

Re: Looking for an equivalent to C++ std::getline in D

2017-05-07 Thread Patrick Schluter via Digitalmars-d-learn
On Sunday, 7 May 2017 at 13:16:16 UTC, bachmeier wrote: On Sunday, 7 May 2017 at 10:33:25 UTC, k-five wrote: Although I found D for being more better, nicer,and fun than C++ is, but there is a few questions on Stack-Over-Flow, videos on Youtube, and some other forums in my country. So, why

Re: Looking for an equivalent to C++ std::getline in D

2017-05-07 Thread Patrick Schluter via Digitalmars-d-learn
On Sunday, 7 May 2017 at 12:29:20 UTC, Stanislav Blinov wrote: On Sunday, 7 May 2017 at 10:33:25 UTC, k-five wrote: [...] Because everyone is asking this question instead of actually doing something about it :) To be fair, D has a good amount of usage even today, it's just not being

DCOnf 2017 videos online

2017-05-07 Thread Patrick Schluter via Digitalmars-d-announce
It looks like the good people of Sociomantic have already posted videos of the Dconf2017 on youtube. https://www.youtube.com/channel/UC54uUlXuGhigMsdaNtP6THQ Enjoy.

Re: What the hell is wrong with D?

2017-09-23 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 18:34:13 UTC, Brad Anderson wrote: On Tuesday, 19 September 2017 at 18:17:47 UTC, jmh530 wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: Thanks for wasting some of my life... Just curious about who will justify the behavior and

Re: What the hell is wrong with D?

2017-09-22 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 18:34:13 UTC, Brad Anderson wrote: On Tuesday, 19 September 2017 at 18:17:47 UTC, jmh530 wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: Thanks for wasting some of my life... Just curious about who will justify the behavior and

Re: 24-bit int

2017-09-03 Thread Patrick Schluter via Digitalmars-d-learn
On Friday, 1 September 2017 at 22:10:43 UTC, Biotronic wrote: On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta wrote: Is there a way to create a 24-bit int? One that for all practical purposes acts as such? This is for 24-bit stuff like audio. It would respect endianness, allow for

Re: Private imports and Objects

2017-11-30 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 30 November 2017 at 06:44:43 UTC, Jonathan M Davis wrote: Object exists primarily because D didn't originally have templates, and when you don't have templates, having a single base class is the only way to have a function accept any class, and for something like a container,

Re: scope(exit) and Ctrl-C

2017-12-02 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 2 December 2017 at 04:49:26 UTC, H. S. Teoh wrote: On Sat, Dec 02, 2017 at 04:38:29AM +, Adam D. Ruppe via Digitalmars-d-learn wrote: [...] Signal handlers can potentially be invoked while inside a non-reentrant libc or OS function, so trying to do anything that (indirectly

Re: git workflow for D

2017-12-04 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 4 December 2017 at 11:51:42 UTC, Nick Sabalausky (Abscissa) wrote: On 12/03/2017 03:05 PM, bitwise wrote: One thing to keep in mind: Any time you're talking about moving anything from one repo to another, there's exactly two basic primitives there: push and pull. Both of them are

Re: ESR on post-C landscape

2017-11-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim Grostad wrote: On Tuesday, 14 November 2017 at 11:55:17 UTC, codephantom wrote: [...] Well, in another thread he talked about the Tango split, so not sure where he is coming from. [...] No, the starting point for C++ was that

Re: ESR on post-C landscape

2017-11-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 09:43:07 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 14 November 2017 at 06:32:55 UTC, lobo wrote: "[snip]...Then came the day we discovered that a person we incautiously gave commit privileges to had fucked up the games’s AI core. It became apparent that I was

Re: git workflow for D

2017-12-03 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 4 December 2017 at 01:54:57 UTC, ketmar wrote: Basile B. wrote: On Sunday, 3 December 2017 at 22:22:47 UTC, Arun Chandrasekaran wrote: Git CLI is arcane and esoteric. I've lost my commits before (yeah, my mistake). Who hasn't ;) me. Happened to me last time because i tried a

Re: Sort characters in string

2017-12-07 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 15:12:22 UTC, Steven Schveighoffer wrote: On 12/6/17 4:34 AM, Ola Fosheim Grøstad wrote: On Wednesday, 6 December 2017 at 09:24:33 UTC, Jonathan M Davis wrote: UTF-32 on the other hand is guaranteed to have a code unit be a full code point. I don't think the

Re: Sort characters in string

2017-12-07 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 09:24:33 UTC, Jonathan M Davis wrote: a full code point (IIRC, 1 - 6 code units for UTF-8 and 1 - 2 for UTF-16), YDNRC, 1 - 4 code units for UTF-8. Unicode is defined only up to U+10. Everything above is illegal.

Re: Sort characters in string

2017-12-07 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 6 December 2017 at 09:34:48 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 6 December 2017 at 09:24:33 UTC, Jonathan M Davis wrote: UTF-32 on the other hand is guaranteed to have a code unit be a full code point. I don't think the standard says that? Isn't this only because the

Re: D User Survey

2017-12-01 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 1 December 2017 at 18:56:50 UTC, WebFreak001 wrote: Hi everyone, I made a public survey (everyone can look at the responses) and it would be great if you took some time and answered it. I think it will greatly benefit D as a whole if we had more anonymous data on users. I'm also

Re: iopipe v0.0.4 - RingBuffers!

2018-05-12 Thread Patrick Schluter via Digitalmars-d-announce
On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer wrote: OK, so at dconf I spoke with a few very smart guys about how I can use mmap to make a zero-copy buffer. And I implemented this on the plane ride home. [...] They can be problematic with some CPU's and OS's. For modern

Re: iopipe v0.0.4 - RingBuffers!

2018-05-12 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 11 May 2018 at 16:06:41 UTC, Jonathan M Davis wrote: [...] Oh, there had been an epic forum thread about the use of GNU grep for BSD. i don't remember the details but it was long and heated (it was so epic that I even read it as I normaly don't care at all for BSD stuff).

Re: Encouraging preliminary results implementing memcpy in D

2018-06-14 Thread Patrick Schluter via Digitalmars-d-announce
On Wednesday, 13 June 2018 at 06:46:43 UTC, Mike Franklin wrote: I had a little fun today kicking the crap out of C's memcpy with a D implementation. https://github.com/JinShil/memcpyD Request for help: I don't have a Linux system running on real hardware at this time, nor do I have a wide

Re: Encouraging preliminary results implementing memcpy in D

2018-06-15 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 15 June 2018 at 00:15:35 UTC, Mike Franklin wrote: On Thursday, 14 June 2018 at 20:35:23 UTC, baz wrote: [...] Correct! D already has features like `a[] = b[]` so there is no reason to call `memcpy` directly; that is a job for the druntime. `memcpyD` is intended to be an

Re: OT: Parsing object files for fun and profit

2018-05-31 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 31 May 2018 at 18:33:37 UTC, Ali Çehreli wrote: On 05/31/2018 09:49 AM, Adam D. Ruppe wrote: > Should be fairly simple to follow, just realize that the image is a 2d > block for each char and that's why there's all those multiplies and > divides. I remember doing similar things

Re: First run after build on Windows is slow

2018-06-26 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 26 June 2018 at 12:58:29 UTC, Adam D. Ruppe wrote: On Tuesday, 26 June 2018 at 12:40:05 UTC, phs wrote: Although, it's a little bit strange because I have never had this issue with my C++ development. The c++ compiler and runtime libraries are common enough that the antivirus

Re: Consequences of casting away immutable from pointers

2018-01-05 Thread Patrick Schluter via Digitalmars-d-learn
On Friday, 5 January 2018 at 18:13:11 UTC, H. S. Teoh wrote: On Fri, Jan 05, 2018 at 05:50:34PM +, jmh530 via Digitalmars-d-learn wrote: Be careful with that: class C { int x; } immutable C c = new C(5); auto i = c.x; C y = cast(C) c; y.x = 10;

Re: Release D 2.075.0

2017-12-24 Thread Patrick Schluter via Digitalmars-d-announce
On Thursday, 20 July 2017 at 12:10:14 UTC, Adrian Matoga wrote: On Thursday, 20 July 2017 at 07:19:03 UTC, Patrick Schluter wrote: version 2.067 that still had the C++ frontend took more than 100 seconds. I can hardly believe it. I remember versions 2.05x building in about 11 seconds. My

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 15 January 2018 at 04:27:15 UTC, Jonathan M Davis wrote: On Monday, January 15, 2018 03:14:02 Tony via Digitalmars-d-learn wrote: On Monday, 15 January 2018 at 02:09:25 UTC, rikki cattermole wrote: > Unicode has three main variants, UTF-8, UTF-16 and UTF-32. > The size of a code

Re: How to proceed with learning to code Windows desktop applications?

2018-01-29 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 06:25:52 UTC, rikki cattermole wrote: On 30/01/2018 5:47 AM, thedeemon wrote: On Tuesday, 30 January 2018 at 03:07:38 UTC, rikki cattermole wrote: But since Windows is the only platform mentioned or desired for, everything you need is in WinAPI! It's like

Re: sys_write in betterC doesn't write anything

2018-02-03 Thread Patrick Schluter via Digitalmars-d-learn
On Saturday, 3 February 2018 at 15:38:19 UTC, Basile B. wrote: On Saturday, 3 February 2018 at 15:30:10 UTC, Basile B. wrote: [...] okay solved: module runnable; __gshared static msg = "betterC\n"; __gshared static len = 8; extern(C) int main(int argc, char** args) { asm {

Re: Vanquish Forever These Bugs That Blasted Your Kingdom

2018-02-11 Thread Patrick Schluter via Digitalmars-d-announce
On Sunday, 11 February 2018 at 15:11:55 UTC, psychoticRabbit wrote: On Wednesday, 7 February 2018 at 20:30:54 UTC, Dmitry Olshansky wrote: Other languages like Rust or C# (or Java) have bounds check. Plus we probably lose it in release mode, which is the mode where lurking bugs are discovered

Re: dxml 0.2.0 released

2018-02-13 Thread Patrick Schluter via Digitalmars-d-announce
On Tuesday, 13 February 2018 at 20:10:59 UTC, Jonathan M Davis wrote: On Tuesday, February 13, 2018 15:22:32 Kagamin via Digitalmars-d-announce wrote: On Monday, 12 February 2018 at 16:50:16 UTC, Jonathan M Davis wrote: > The core problem is that entity references get replaced with > more XML

Re: dxml 0.2.0 released

2018-02-14 Thread Patrick Schluter via Digitalmars-d-announce
On Tuesday, 13 February 2018 at 22:00:59 UTC, Jonathan M Davis wrote: On Tuesday, February 13, 2018 21:18:12 Patrick Schluter via Digitalmars-d- announce wrote: [...] Well, if dxml just passes the entity references along unparsed beyond validating that the entity reference itself contains

Re: Beta 2.079.0

2018-02-22 Thread Patrick Schluter via Digitalmars-d-announce
On Thursday, 22 February 2018 at 08:52:21 UTC, Timothee Cour wrote: you should also mention an important point: current syntax disallows importing a simple module foo (with no package), eg: import std.stdio:write,foo; // there's no way to specify a module `foo` import std.stdio:write & foo;

Re: Beta 2.079.0

2018-02-23 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 23 February 2018 at 13:42:45 UTC, psychoticRabbit wrote: On Friday, 23 February 2018 at 12:06:23 UTC, Patrick Schluter wrote: Absolutely. D scripting is the trojan horse that enables introduction of it in hostile environment. Runnable compiled source code is nice. scripting

Re: Beta 2.079.0

2018-02-23 Thread Patrick Schluter via Digitalmars-d-announce
On Friday, 23 February 2018 at 09:48:33 UTC, Norm wrote: [snip] On Friday, 23 February 2018 at 04:06:23 UTC, psychoticRabbit wrote: Third, making D more and more like a quick scripting/hacking language (by removing or hiding so called 'noise', is not a good idea in my opinion. That too

<    1   2   3   4   5   >