Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Robert M. Münch via Digitalmars-d
On 2017-09-02 21:27:58 +, Moritz Maxeiner said: Thanks for your post about Rebol, I didn't know it before. As said, the official Rebol-2 version is a dead-end. Even our main product is still based on it :-) 15 years old technology, but still working and we know all problemes. So very few

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 02:08:20 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 August 2017 at 12:50:08 UTC, Robert M. Münch wrote: Maybe of interest: https://www.think-cell.com/en/career/talks/iterators/#1 I haven't read

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 09:24:03 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 02:08:20 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 August 2017 at 12:50:08 UTC, Robert M. Münch wrote: Maybe of interest: http

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 08:37:36 UTC, Robert M. Münch wrote: On 2017-09-02 21:27:58 +, Moritz Maxeiner said: Thanks for your post about Rebol, I didn't know it before. As said, the official Rebol-2 version is a dead-end. Even our main product is still based on it :-) 15 years old

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 06:11:10 UTC, Uknown wrote: On Sunday, 3 September 2017 at 03:49:21 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 03:04:58 UTC, Uknown wrote: [...] void foo(ref RCArray!int arr, ref int val) @safe { { auto copy = arr; //arr's (and copy's) refere

Re: Call to Runtime.unloadLibrary corrupts stdout and stderr

2017-09-03 Thread Rainer Schuetze via Digitalmars-d
On 02.09.2017 23:38, Markus Pursche wrote: Hi, I'm trying to hot reload a DLL while the program is running to allow for rapid iteration in a game engine I am working on. I started reading up on how DLLs work between D code here: https://wiki.dlang.org/Win32_DLLs_in_D#D_code_calling_D_code_in_

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 3 September 2017 at 12:35:16 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 09:24:03 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 02:08:20 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 August 2

Re: C `restrict` keyword in D

2017-09-03 Thread Uknown via Digitalmars-d
On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that pointers/references can change at runtime, so I don't think a static analysis in the compiler can cover this in general (which, I think, is also why the C99 keyword is an optimization hint on

Re: [OT] "Safe Systems Software and the Future of Computing" talk by Joe Duffy

2017-09-03 Thread Walter Bright via Digitalmars-d
On 9/2/2017 1:03 PM, Paulo Pinto wrote: Some of his ideas also apply to improving D's adoption among system devs. Some interesting observations he made: 1. rigor is not wanted when prototyping D recognizes this in that you can ignore @safe programming and pretty much all of the annotations w

Deimos X11 bindings license question

2017-09-03 Thread Gary Willoughby via Digitalmars-d
Hi, A few years ago I forked the Deimos X11 bindings[1] repo to add dub support. Since then my repo[2] has received bug fixes and as such it's being used in many projects. (Also, in the following years dub support was added to the Deimos repo too.) I had a question from a developer as to the

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 14:19:19 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 12:35:16 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 09:24:03 UTC, Ilya Yaroshenko wrote: On Sunday, 3 September 2017 at 02:43:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September

Re: Deimos X11 bindings license question

2017-09-03 Thread Mike Parker via Digitalmars-d
On Sunday, 3 September 2017 at 16:10:11 UTC, Gary Willoughby wrote: Hi, A few years ago I forked the Deimos X11 bindings[1] repo to add dub support. Since then my repo[2] has received bug fixes and as such it's being used in many projects. (Also, in the following years dub support was added t

Re: [OT] "Safe Systems Software and the Future of Computing" talk by Joe Duffy

2017-09-03 Thread Mike Parker via Digitalmars-d
On Sunday, 3 September 2017 at 15:46:36 UTC, Walter Bright wrote: On 9/2/2017 1:03 PM, Paulo Pinto wrote: Some of his ideas also apply to improving D's adoption among system devs. Some interesting observations he made: 1. rigor is not wanted when prototyping D recognizes this in that you can

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 3 September 2017 at 15:39:58 UTC, Uknown wrote: On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that pointers/references can change at runtime, so I don't think a static analysis in the compiler can cover this in general (which, I th

Re: D easily overlooked?

2017-09-03 Thread thinwybk via Digitalmars-d
On Saturday, 2 September 2017 at 17:00:46 UTC, Joakim wrote: Sorry, I assumed the D version worked fine and didn't bother to check the output, turns out it needs two foreach loops changed in advance(dt). Specifically, "Body i" should be changed to "ref Body i" in both foreach statements, so th

Re: D easily overlooked?

2017-09-03 Thread thinwybk via Digitalmars-d
On Saturday, 2 September 2017 at 17:00:46 UTC, Joakim wrote: On Saturday, 2 September 2017 at 15:41:54 UTC, Joakim wrote: D: https://bitbucket.org/qznc/d-shootout/raw/898f7f3b3c5d55680229113e973ef95ece6f711a/progs/nbody/nbody.d ldc 1.4 beta1, llvm 4.0.1 ldc2 -O3 nbody.d The D version averages

Re: Call to Runtime.unloadLibrary corrupts stdout and stderr

2017-09-03 Thread Markus Pursche via Digitalmars-d
On Sunday, 3 September 2017 at 13:41:33 UTC, Rainer Schuetze wrote: On 02.09.2017 23:38, Markus Pursche wrote: [...] Unfortunately, this section only applies to simple programs (no multi-threading, no sharing of other resources than GC-memory, not even malloc'ed memory). I think there shou

Re: D vs Rust

2017-09-03 Thread Eljay via Digitalmars-d
I work on a large multi-platform desktop shrink-wrap application. It is a large application, with a code base of over 400,000 files. The majority of which is C++, although there is some JavaScript in the mix in some of the corners of the UI. The code base is about 30 years old... so you prob

Re: D easily overlooked?

2017-09-03 Thread Joakim via Digitalmars-d
On Sunday, 3 September 2017 at 17:56:26 UTC, thinwybk wrote: On Saturday, 2 September 2017 at 17:00:46 UTC, Joakim wrote: On Saturday, 2 September 2017 at 15:41:54 UTC, Joakim wrote: D: https://bitbucket.org/qznc/d-shootout/raw/898f7f3b3c5d55680229113e973ef95ece6f711a/progs/nbody/nbody.d ldc 1

Re: D vs Rust

2017-09-03 Thread Ali Çehreli via Digitalmars-d
On 09/03/2017 11:26 AM, Eljay wrote: > I put D on the list. Been there, done that. Decision makers rationalize any other choice pretty easily: - Python is 20 times slower: "We don't need speed." - Python has a global lock: "We will start RESTful separate processes." - Python's memory foot p

Re: Call to Runtime.unloadLibrary corrupts stdout and stderr

2017-09-03 Thread Rainer Schuetze via Digitalmars-d
On 03.09.2017 20:21, Markus Pursche wrote: On Sunday, 3 September 2017 at 13:41:33 UTC, Rainer Schuetze wrote: On 02.09.2017 23:38, Markus Pursche wrote: [...] Unfortunately, this section only applies to simple programs (no multi-threading, no sharing of other resources than GC-memory, n

Re: D vs Rust

2017-09-03 Thread Guillaume Piolat via Digitalmars-d
On Sunday, 3 September 2017 at 19:40:27 UTC, Ali Çehreli wrote: Decision makers rationalize any other choice pretty easily: There is a useful method in the book "Thinking Fast and Slow" to try to be rational about a choice. 1/ Before looking the different solitions, make a list of relevan

Re: D vs Rust

2017-09-03 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 3 September 2017 at 19:40:27 UTC, Ali Çehreli wrote: > Hi Bearophile! I'm afraid bearophile has moved to greener pastures. I've run into bearophile on Reddit on Rust-related threads. He uses a different name there. *sigh*

Re: C `restrict` keyword in D

2017-09-03 Thread Uknown via Digitalmars-d
On Sunday, 3 September 2017 at 16:55:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 15:39:58 UTC, Uknown wrote: On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that pointers/references can change at runtime, so I don't think a st

Re: C `restrict` keyword in D

2017-09-03 Thread Moritz Maxeiner via Digitalmars-d
On Monday, 4 September 2017 at 02:43:48 UTC, Uknown wrote: On Sunday, 3 September 2017 at 16:55:51 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 15:39:58 UTC, Uknown wrote: On Sunday, 3 September 2017 at 12:59:25 UTC, Moritz Maxeiner wrote: [...] The main issue I see is that point

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Ilya via Digitalmars-d
On Sunday, 3 September 2017 at 16:33:04 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 14:19:19 UTC, Ilya Yaroshenko wrote: Ranges requires for 25% more space for canonical matrixes then iterators. We do have to differentiate between a container and the API with which to iterate o

Re: C `restrict` keyword in D

2017-09-03 Thread Uknown via Digitalmars-d
On Monday, 4 September 2017 at 04:10:44 UTC, Moritz Maxeiner wrote: What I meant (and apparently poorly expressed) is that you can turn a pointer into a reference (as long as it's not null) and taking the address of a "ref" yields a pointer and as in my `foo` example in the above, which path is

Re: Call to Runtime.unloadLibrary corrupts stdout and stderr

2017-09-03 Thread Brad Roberts via Digitalmars-d
On 9/3/2017 1:07 PM, Rainer Schuetze via Digitalmars-d wrote: This workaround has side effects, i.e. it doesn't automatically close any file still open by the DLLs' instance of the C runtime, so it might cause incomplete files if someone relies on these being automatically flushed and closed.

Re: Function pointer from mangled name at runtime?

2017-09-03 Thread Jacob Carlborg via Digitalmars-d
On 2017-09-01 22:53, bitwise wrote: Basically, the problem is deserializing a scene-graph from a json text file. The architecture of my scene-graph enforces that some template-function will be instantiated for every symbol that is reflected. So what I'm trying to avoid is having to store all o