Re: D Users Survey: Primary OS?

2014-05-29 Thread John Colvin via Digitalmars-d
On Thursday, 29 May 2014 at 20:07:53 UTC, Adam D. Ruppe wrote: I mostly use slackware linux (64 bit OS but i prefer to build 32 bit programs) for D stuff. I also use a variety of Windows systems from time to time, especially if I want to distribute a gui to other users (always 32 bit programs).

Re: Hardware Traps for Integer Overflow

2014-05-30 Thread John Colvin via Digitalmars-d
On Friday, 30 May 2014 at 07:00:58 UTC, Marco Leise wrote: Am Thu, 29 May 2014 20:10:13 + schrieb "John Colvin" : On Thursday, 29 May 2014 at 20:01:25 UTC, Tobias Pankrath wrote: > On Thursday, 29 May 2014 at 15:32:54 UTC, Wanderer wrote: >> I don't see any valid a

Re: Performance

2014-05-31 Thread John Colvin via Digitalmars-d
On Saturday, 31 May 2014 at 14:01:52 UTC, Andrei Alexandrescu wrote: On 5/30/14, 11:36 PM, Russel Winder via Digitalmars-d wrote: As well as the average (mean), you must provide standard deviation and degrees of freedom so that a proper error analysis and t-tests are feasible. Or put it another

Re: [OT] Extra time spent

2014-06-02 Thread John Colvin via Digitalmars-d
On Monday, 2 June 2014 at 01:30:08 UTC, Adam D. Ruppe wrote: On Monday, 2 June 2014 at 00:26:31 UTC, Jonathan M Davis via Digitalmars-d wrote: I would have expected that the kinds of folks who would post here would be doing a fair bit with their computers in their free time (especially those wh

Re: Performance

2014-06-03 Thread John Colvin via Digitalmars-d
On Tuesday, 3 June 2014 at 11:25:31 UTC, Marco Leise wrote: I don't want to believe that the OS has an effect on a loop that doesn't make any calls to the OS. There's always the scheduler, swap etc. Not that they should have any effect on *this* benchmark of course.

Re: (git HEAD) std.datetime spewing deprecation messages

2014-06-04 Thread John Colvin via Digitalmars-d
On Wednesday, 4 June 2014 at 14:16:31 UTC, Meta wrote: On Wednesday, 4 June 2014 at 11:28:52 UTC, Kagamin wrote: Does one really needs only one component, but not the others? Maybe it should provide full computed broken form instead of separate components? auto d=dur.breakUp; d.hours; d.minut

Re: (git HEAD) std.datetime spewing deprecation messages

2014-06-04 Thread John Colvin via Digitalmars-d
On Wednesday, 4 June 2014 at 17:06:22 UTC, Meta wrote: On Wednesday, 4 June 2014 at 15:51:58 UTC, John Colvin wrote: Assuming hours, minutes and seconds are already declared, you can do this already TypeTuple!(hours, minutes, seconds) = dur.parts; A full working example of the syntax

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the only way distributions can ship DMD is via a script that does a download from dlang.org, extract, install process (like eg: flashplayer). Unless I'm misunderstanding how the arch repositorie

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 12:45:06 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 11:35:23 UTC, Dicebot wrote: On Thursday, 5 June 2014 at 11:24:47 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the onl

Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]

2014-06-05 Thread John Colvin via Digitalmars-d
On Thursday, 5 June 2014 at 11:35:23 UTC, Dicebot wrote: On Thursday, 5 June 2014 at 11:24:47 UTC, John Colvin wrote: On Thursday, 5 June 2014 at 06:50:04 UTC, Iain Buclaw via Digitalmars-d wrote: Don't quote me, but the only way distributions can ship DMD is via a script that does a dow

Re: SurveyMonkey for D users OS - Results

2014-06-07 Thread John Colvin via Digitalmars-d
On Saturday, 7 June 2014 at 09:53:52 UTC, Paulo Pinto wrote: Am 07.06.2014 11:47, schrieb Dicebot: On Saturday, 7 June 2014 at 04:34:06 UTC, Paulo Pinto wrote: Am 07.06.2014 01:38, schrieb Dicebot: On Friday, 6 June 2014 at 22:04:35 UTC, Paulo Pinto wrote: Bleeding edge distros have best h/w s

Re: [OT] Extra time spent

2014-06-09 Thread John Colvin via Digitalmars-d
On Monday, 9 June 2014 at 16:37:18 UTC, Nick Sabalausky wrote: On 6/8/2014 9:51 AM, Andrei Alexandrescu wrote: On 6/8/14, 10:46 AM, SomeDude wrote: You want in ear isolating earphones. Basically earplugs that play music. Since the ambiant noise is greatly reduced, you don't need to play loud

Re: [OT] Extra time spent

2014-06-11 Thread John Colvin via Digitalmars-d
On Wednesday, 11 June 2014 at 07:30:41 UTC, Kagamin wrote: And last time I did an indie game (ages ago) I was very surprised how much difference I noticed (even on ordinary speakers) when encoding the music as 128kbps MP3, as opposed to 128kbps Vorbis and 320kbps MP3. I can only hear a differ

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 15:22:07 UTC, Andrei Alexandrescu wrote: On 6/14/14, 5:33 AM, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without specifyin

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 14:51:10 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init; Why this is a type hole if initializer is explicitly provided? T

Re: A Perspective on D from game industry

2014-06-15 Thread John Colvin via Digitalmars-d
On Sunday, 15 June 2014 at 20:20:37 UTC, Brad Roberts via Digitalmars-d wrote: You'll likely toss me into the same boat as the post you're ranting about, but please, watch the misogynistic language here. Unnecessarily offensive in the context, yes, but reasonable people can and do disagree on

Re: Is D production-ready?

2014-06-16 Thread John Colvin via Digitalmars-d
On Monday, 16 June 2014 at 10:24:46 UTC, John Petal wrote: I can't really see anything besides abandoned libraries written in D. Is it possible – for example – to write a simple 2D game, or an automation program, or a text editor in D? I know the language is perfectly capable, but I'm not sure

Re: A Perspective on D from game industry

2014-06-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 June 2014 at 13:24:11 UTC, Dicebot wrote: On Tuesday, 17 June 2014 at 13:13:00 UTC, Artur Skawina via Digitalmars-d wrote: artur (who implemented both features last weekend; it started out as a fun "let's-see-how-D-would-look-if-it-had-this"-project, but after making them work an

Re: A Perspective on D from game industry

2014-06-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 June 2014 at 13:52:48 UTC, Dicebot wrote: On Tuesday, 17 June 2014 at 13:36:48 UTC, John Colvin wrote: also, foreach that works outside of function scope would be awesome: mixin template A(TL ...) { foreach(i, T; TL) { mixin("T v" ~ i

Re: Druntime DMD/LDC/GDC architecture

2014-06-23 Thread John Colvin via Digitalmars-d
On Monday, 23 June 2014 at 18:09:46 UTC, Ilya Yaroshenko wrote: Hello all! very simple code: -- double[] a, c; ... c[] += a[]; -- The DMD version I can find in _arraySliceSliceAddass_d, https://github.com/D-Programming-Language/druntime/blob/master/src/rt/array

Re: Is void* compatible with function pointers?

2014-06-23 Thread John Colvin via Digitalmars-d
On Tuesday, 24 June 2014 at 04:24:51 UTC, deadalnix wrote: On Tuesday, 24 June 2014 at 01:41:13 UTC, Steven Schveighoffer wrote: This is because most CPUs consider the instructions as immutable. Even x86 do not provide any guarantee (which makes it very hard to swap implementation outside of a

Re: Is this a bug?

2014-06-26 Thread John Colvin via Digitalmars-d
On Thursday, 26 June 2014 at 10:09:53 UTC, Rene Zwanenburg wrote: I /think/ this is a bug, but I'm not 100% sure. The following compiles without any problems, as it should: import std.typecons; alias Handle(T) = RefCounted!(T, RefCountedAutoInitialize.no); auto initialized(T)() if(is(T == Ref

Re: Is this a bug?

2014-06-26 Thread John Colvin via Digitalmars-d
On Thursday, 26 June 2014 at 12:38:40 UTC, John Colvin wrote: On Thursday, 26 June 2014 at 10:09:53 UTC, Rene Zwanenburg wrote: I /think/ this is a bug, but I'm not 100% sure. The following compiles without any problems, as it should: import std.typecons; alias Handle(T) = RefCount

Re: std.math performance (SSE vs. real)

2014-06-27 Thread John Colvin via Digitalmars-d
On Friday, 27 June 2014 at 10:51:05 UTC, Manu via Digitalmars-d wrote: On 27 June 2014 11:31, David Nadlinger via Digitalmars-d wrote: Hi all, right now, the use of std.math over core.stdc.math can cause a huge performance problem in typical floating point graphics code. An instance of this

Re: std.math performance (SSE vs. real)

2014-06-27 Thread John Colvin via Digitalmars-d
On Friday, 27 June 2014 at 13:04:31 UTC, dennis luehring wrote: Am 27.06.2014 14:20, schrieb Russel Winder via Digitalmars-d: On Fri, 2014-06-27 at 11:10 +, John Colvin via Digitalmars-d wrote: [
] I understand why the current situation exists. In 2000 x87 was the standard and the 80bit

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 06:16:51 UTC, Walter Bright wrote: On 6/27/2014 10:18 PM, Walter Bright wrote: On 6/27/2014 4:10 AM, John Colvin wrote: *The number of algorithms that are both numerically stable/correct and benefit significantly from > 64bit doubles is very small. To be bl

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 10:34:00 UTC, Russel Winder via Digitalmars-d wrote: So D should perhaps make a breaking change and have types int32, int64, float32, float64, float80, and get away from the vagaries of bizarre type relationships with hardware? `real`* is the only builtin numeri

Re: std.math performance (SSE vs. real)

2014-06-28 Thread John Colvin via Digitalmars-d
On Saturday, 28 June 2014 at 14:01:13 UTC, Andrei Alexandrescu wrote: On 6/28/14, 3:42 AM, Walter Bright wrote: Inverting matrices is commonplace for solving N equations with N unknowns. Actually nobody does that. Also, one consideration is that the focus of numeric work changes with time;

Re: std.math performance (SSE vs. real)

2014-06-29 Thread John Colvin via Digitalmars-d
On Sunday, 29 June 2014 at 19:22:16 UTC, Walter Bright wrote: On 6/29/2014 11:21 AM, Russel Winder via Digitalmars-d wrote: Because when reading the code you haven't got a f### clue how accurate the floating point number is until you ask and answer the question "and which processor are you

Re: std.math performance (SSE vs. real)

2014-06-30 Thread John Colvin via Digitalmars-d
On Monday, 30 June 2014 at 16:29:06 UTC, Element 126 wrote: On 06/29/2014 11:04 PM, John Colvin wrote: [...] mixin(`alias real` ~ (real.sizeof*8).stringof ~ ` = real;`); is more useful to me. Be careful : this code is tricky ! real.sizeof is the storage size, ie 16 bytes on x86_64. The

Re: [OT] Intel for mobile

2014-07-02 Thread John Colvin via Digitalmars-d
On Wednesday, 2 July 2014 at 09:13:50 UTC, Chris wrote: Will Intel get into the mobile market in the next couple of years? I've heard that some mobile devices are now fitted with Intel processors. First tablets and now a Lenovo smartphone. I used to have an intel az210 phone. Terrible build qu

Re: Optimizing Java using D

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:40:33 UTC, Wanderer wrote: On Thursday, 3 July 2014 at 11:30:57 UTC, Alix Pexton wrote: Saying that one is always more significant than the other is far too much of an oversimplification. I just thought, with the presence of structs in D, things are not that sim

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format which is obviously not true on ARM. I haven't got the required

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 17:03:51 UTC, Johannes Pfau wrote: Am Thu, 03 Jul 2014 16:47:41 + schrieb "John Colvin" : testing the latest gdc release, writeln and friends are broken for 64bit reals. Use core.stdc.stdio.printf with %lf instead. Actually mixing code compiled w

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format which is obviously not true on ARM. I haven't got the required

Re: GDC/ARM: Help needed: Porting std.math.internal.gammafunction

2014-07-03 Thread John Colvin via Digitalmars-d
On Thursday, 3 July 2014 at 17:54:17 UTC, John Colvin wrote: On Thursday, 3 July 2014 at 15:35:35 UTC, Johannes Pfau wrote: Hi, std.math.internal.gammafunction is the last module with failing unittest on ARM, simply because it assumes that reals are always in x86 extended precision format

Re: std.math performance (SSE vs. real)

2014-07-04 Thread John Colvin via Digitalmars-d
On Friday, 4 July 2014 at 17:05:16 UTC, Walter Bright wrote: On 7/4/2014 3:38 AM, Don wrote: What is "the longest type supported by the native hardware"? I don't know what that means, and I don't think it even makes sense. Most of the time, it is quite clear. For example, Sparc has 128-bit

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer have if you disable the GC, but I can't think of any others. You can definitely use slices without the GC and they are still awesome without the GC. What you cannot do is cre

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 10:25:17 UTC, Oluca wrote: On Tuesday, 8 July 2014 at 10:07:18 UTC, Tobias Pankrath wrote: On Tuesday, 8 July 2014 at 09:57:15 UTC, Oluca wrote: - No, it can't be disabled if you want to keep using "impressive features" of the language. What do CTFE, mixins, Ds pow

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 11:22:42 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer have if you disable the GC, but I can't think of any others. You can definitely use slices without the G

Re: Bottom line re GC in D

2014-07-08 Thread John Colvin via Digitalmars-d
On Tuesday, 8 July 2014 at 11:31:49 UTC, Oluca wrote: On Tuesday, 8 July 2014 at 11:26:55 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 11:22:42 UTC, John Colvin wrote: On Tuesday, 8 July 2014 at 06:23:13 UTC, Jeremy DeHaan wrote: I remember that slices was one thing you would no longer

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 13:09:42 UTC, bearophile wrote: Dicebot: No one but Walter / Andrei can do anything about it. Right now we are in weird situation when they call for "lieutenants" but are not ready to abandon decision power. It can't possibly work that way. No amount of volunteer

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 12:54:19 UTC, Dicebot wrote: On Thursday, 10 July 2014 at 12:13:03 UTC, bearophile wrote: Dicebot: I can't blame Sonke or anyone else for not wanting to waste his time on pushing more stuff upstream considering how miserable contribution experience is right now.

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 14:14:20 UTC, Dicebot wrote: On Thursday, 10 July 2014 at 14:09:41 UTC, John Colvin wrote: To be fair to Walter/Andrei, you need to be clear who your lieutenant is before you can delegate to them. Who has stepped up to take charge of concurrency in D? I think it

Re: Opportunities for D

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 14:54:51 UTC, Dicebot wrote: E.g. https://github.com/D-Programming-Language/phobos/pull/1527 is some apparently work that's just sitting there abandoned. Hm, slightly OT: is it considered widely acceptable to take over such pull requests by reopening rebased one w

Re: Char.length

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 17:01:45 UTC, Jane Doe wrote: One thing that bothers me quite a bit is that char's do not have length. This makes it difficult in templates that can take either strings or chars. While one can write a template that returns the length of a string or char, I would i

Re: Proposal for design of 'scope' (Was: Re: Opportunities for D)

2014-07-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 July 2014 at 20:13:18 UTC, Marc Schütz wrote: On Thursday, 10 July 2014 at 20:10:38 UTC, Marc Schütz wrote: snip That's curious. I actually replied to H. S. Teoh in his new thread, but somehow it ended up here... You are in the new thread...

Re: Read text file fast, how?

2015-07-27 Thread John Colvin via Digitalmars-d
On Monday, 27 July 2015 at 12:03:40 UTC, Johan Holmberg wrote: On Sun, Jul 26, 2015 at 5:36 PM, Andrei Alexandrescu via Digitalmars-d < digitalmars-d@puremagic.com> wrote: [...] Back on MacOS again, I thought I should try to run "Instruments" on my program. I'm not familiar with the DMD s

Re: Yes or No Options

2015-07-27 Thread John Colvin via Digitalmars-d
On Monday, 27 July 2015 at 15:40:56 UTC, Alex wrote: Hey guys! I am super new to programming and still trying to learn the very basics via a book that I bought. [...] This isn't the right place for this sort of question, please use http://forum.dlang.org/group/learn, I'm sure someone will

Re: Working with pdf

2015-07-30 Thread John Colvin via Digitalmars-d
On Thursday, 30 July 2015 at 11:19:48 UTC, Kingsley wrote: Hi Can anyone recommend any ways of pdf creation using D. I am generating an HTML and JavaScript page but I would like it in pdf format as well. I don't know of any pdf handling libraries in D Definitely check first to see if a comm

Re: Why Java (server VM) is faster than D?

2015-08-03 Thread John Colvin via Digitalmars-d
On Monday, 3 August 2015 at 16:27:39 UTC, aki wrote: When I was trying to port some Java program to D, I noticed Java is faster than D. I made a simple bench mark test as follows. Then, I was shocked with the result. [...] What compilation flags?

Re: Why Java (server VM) is faster than D?

2015-08-03 Thread John Colvin via Digitalmars-d
On Monday, 3 August 2015 at 16:27:39 UTC, aki wrote: When I was trying to port some Java program to D, I noticed Java is faster than D. I made a simple bench mark test as follows. Then, I was shocked with the result. test results on Win8 64bit (smaller is better) Java(1.8.0,64bit,server): 0.677

Re: Why Java (server VM) is faster than D?

2015-08-03 Thread John Colvin via Digitalmars-d
On Monday, 3 August 2015 at 16:41:42 UTC, Steven Schveighoffer wrote: On 8/3/15 12:31 PM, Dmitry Olshansky wrote: On 03-Aug-2015 19:27, aki wrote: When I was trying to port some Java program to D, I noticed Java is faster than D. I made a simple bench mark test as follows. Then, I was shocked w

Re: Why Java (server VM) is faster than D?

2015-08-03 Thread John Colvin via Digitalmars-d
On Monday, 3 August 2015 at 16:47:14 UTC, Adam D. Ruppe wrote: You can try a few potential optimizations in the D version yourself and see if it makes a difference. Devirtualization has a very small impact. Test this by making `test` take `SubFoo` and making `bar` final, or making `bar` a sta

Re: Why Java (server VM) is faster than D?

2015-08-03 Thread John Colvin via Digitalmars-d
On Monday, 3 August 2015 at 16:53:30 UTC, Adam D. Ruppe wrote: On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote: gets me down to 0.182s with ldc on OS X Yeah, I tried dmd with the final and didn't get a difference but gdc with final (and -frelease, very important for max

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 13:42:15 UTC, Chris wrote: On Tuesday, 4 August 2015 at 13:25:22 UTC, maarten van damme wrote: I'm not a programmer myself and used D for a project in computational electromagnetics. While I had to implement numerical integration and a bit of linear algebra which wa

Re: assert(0) behavior

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 22:06:06 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 4 August 2015 at 20:21:24 UTC, Walter Bright wrote: On 8/3/2015 8:37 PM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= wrote: The input/environment/code distinction does not work very well. Sure it does. If your user ev

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 20:37:18 UTC, bachmeier wrote: A couple of things that might make D more pleasant for me are: - I do a lot of simulation-related things, where the inputs and outputs can change a lot as I figure out how I want to do things, and - I use R. R was invented down the hal

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 18:56:20 UTC, jmh530 wrote: On Tuesday, 4 August 2015 at 09:48:07 UTC, Chris wrote: I agree with bachmeier. You cannot go wrong. You mentioned nested loops. D allows you to concatenate (or "pipe") loops. So instead of foreach { foreach { foreach {

Re: D for Game Development

2015-08-05 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 19:14:51 UTC, Rick wrote: Unfortunately I'm regrettably having to reconsider my decision to start a game project (or any project requiring significant time investment) in D. Not because of the language or compiler, but rather because of the lack maturity in the su

Re: D for Game Development

2015-08-05 Thread John Colvin via Digitalmars-d
On Wednesday, 5 August 2015 at 15:08:46 UTC, Rick wrote: On Wednesday, 5 August 2015 at 09:03:47 UTC, John Colvin wrote: On Tuesday, 4 August 2015 at 19:14:51 UTC, Rick wrote: Unfortunately I'm regrettably having to reconsider my decision to start a game project (or any project requ

Re: D for project in computational chemistry

2015-08-06 Thread John Colvin via Digitalmars-d
On Thursday, 6 August 2015 at 08:11:49 UTC, Gerald Jansen wrote: On Wednesday, 5 August 2015 at 18:49:21 UTC, bachmeier wrote: Yes. The question is whether we can put together a group of developers to build the infrastructure, which is a lot more than just code. That means, in particular, good

Re: Proposal : mnemonic for start index for slices

2015-08-08 Thread John Colvin via Digitalmars-d
On Saturday, 8 August 2015 at 13:08:08 UTC, Temtaime wrote: Hi ! I want to add some sugar to D : sometimes it's necessary to use complex start index. For example: auto sub = arr[idx + 123 * 10..idx + 123 * 10 + 1]; Proposal is to add a mnemonic for start index, for instance : auto sub = arr[

Re: D for Game Development

2015-08-10 Thread John Colvin via Digitalmars-d
On Sunday, 9 August 2015 at 05:31:41 UTC, Walter Bright wrote: I agree, and now we ship a Phobos DLL, resolving that issue. I think most people these days associate "DLL" exclusively with windows. I certainly do.

Re: Where the F*** is phobos on OSX nowadays ?

2015-08-11 Thread John Colvin via Digitalmars-d
On Tuesday, 11 August 2015 at 04:51:03 UTC, deadalnix wrote: And why does it keep moving ? Why isn't it in some place where linker will find it ? Is that really worth it to have every build system to have to jump through hoops to find it, and to break it on a regular basis ? well if you're

Re: Suggestion: arrays.

2015-08-11 Thread John Colvin via Digitalmars-d
On Tuesday, 11 August 2015 at 08:59:50 UTC, DLearner wrote: From dlang: Static array properties are: ... .dup Create a dynamic array of the same size and copy the contents of the array into it. .idup Create a dynamic array of the same size and copy the contents of the array into it. The cop

Re: Where the F*** is phobos on OSX nowadays ?

2015-08-11 Thread John Colvin via Digitalmars-d
On Tuesday, 11 August 2015 at 16:12:12 UTC, Sebastiaan Koppe wrote: On Tuesday, 11 August 2015 at 08:01:53 UTC, John Colvin wrote: On Tuesday, 11 August 2015 at 04:51:03 UTC, deadalnix wrote: And why does it keep moving ? Why isn't it in some place where linker will find it ? Is that r

Re: D for project in computational chemistry

2015-08-17 Thread John Colvin via Digitalmars-d
On Sunday, 16 August 2015 at 13:59:33 UTC, Idan Arye wrote: Initially I thought the Python version is so slow because it uses `range` instead of `xrange`, but I tried them both and they both take about the same, so I guess the Python JIT(or even interpreter!) can optimize these allocations away

Re: Presentation Intro to D: What works?

2015-08-20 Thread John Colvin via Digitalmars-d
On Wednesday, 19 August 2015 at 20:15:48 UTC, qznc wrote: On Thursday, 25 June 2015 at 12:39:11 UTC, qznc wrote: [...] Presentation done. Only six people in the audience, but they appreciated it. 5/6 already had heard about D. 3/6 had played with it. If you are interested in my slides: ht

Re: Amazing brand spanking new programming concept: Parameter Paths!

2015-08-21 Thread John Colvin via Digitalmars-d
On Friday, 21 August 2015 at 00:29:35 UTC, TheHamster wrote: Parameter paths, a thousand words summed up: void foo(p1, p2|p3|p4, p5|p6, |*p7|p8){ ... } [...] Could you give an example of where this enables something really new and/or much more convenient than using templates?

extern opaque struct

2015-08-23 Thread John Colvin via Digitalmars-d
Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate to D as: struct UndeclaredStruct; extern UndeclaredStruct blah; auto p = &blah; which doesn't compile. Why not? Neither the size nor any defaul

Re: extern opaque struct

2015-08-23 Thread John Colvin via Digitalmars-d
On Sunday, 23 August 2015 at 22:20:26 UTC, John Colvin wrote: Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate to D as: struct UndeclaredStruct; extern UndeclaredStruct blah; auto

Re: extern opaque struct

2015-08-24 Thread John Colvin via Digitalmars-d
On Monday, 24 August 2015 at 04:08:28 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:uhpgjffttsuqeswyj...@forum.dlang.org... Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which woul

Re: Casting double to ulong weirdness

2015-08-24 Thread John Colvin via Digitalmars-d
On Monday, 24 August 2015 at 18:06:08 UTC, rumbu wrote: BTW, 1.2 and 12.0 are directly representable as double 12.0 is representable, but I'm pretty sure, if you work it out, 1.2 isn't.

Re: vibe.d - cannot allocate memory in static TLS block

2015-08-27 Thread John Colvin via Digitalmars-d
On Thursday, 27 August 2015 at 11:33:02 UTC, John Colvin wrote: On Thursday, 27 August 2015 at 09:06:54 UTC, ddos wrote: when i import the vibe.d module my project it dies with the error message "cannot allocate memory in static TLS block" compiled as dynamic library on debian

Re: vibe.d - cannot allocate memory in static TLS block

2015-08-27 Thread John Colvin via Digitalmars-d
On Thursday, 27 August 2015 at 09:06:54 UTC, ddos wrote: when i import the vibe.d module my project it dies with the error message "cannot allocate memory in static TLS block" compiled as dynamic library on debian x86 "name": "alice", "description": "A minimal D application.", "copyright": "Co

Re: vibe.d - cannot allocate memory in static TLS block

2015-08-27 Thread John Colvin via Digitalmars-d
On Thursday, 27 August 2015 at 13:08:18 UTC, ddos wrote: On Thursday, 27 August 2015 at 11:34:36 UTC, John Colvin wrote: P.S. this would be better asked in http://forum.dlang.org/group/learn or http://forum.rejectedsoftware.com made a thread before on the vibe forum too, see here http

Re: vibe.d - cannot allocate memory in static TLS block

2015-08-27 Thread John Colvin via Digitalmars-d
On Thursday, 27 August 2015 at 15:40:20 UTC, ddos wrote: On Thursday, 27 August 2015 at 15:16:25 UTC, John Colvin wrote: I think your problem is that you need to initialise the D runtime. Perhaps adding a call to http://dlang.org/phobos/core_runtime.html#.Runtime.initialize inside OnInit will

Re: dmd codegen improvements

2015-08-27 Thread John Colvin via Digitalmars-d
On Thursday, 27 August 2015 at 13:49:18 UTC, Bruno Medeiros wrote: On 19/08/2015 09:22, Dmitry Olshansky wrote: I'm interested in ways to reduce that gap. [...] Replace the backend with GDC or LLVM? :-P Oh come on - LLVM was an inferiour backend for some time. So what? Let us no work on i

Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x => x + b); } unittest @nogc @safe { int[] test = [1,2,3]; assert(test.foo(3).equal(only(4,5,6))); } Challenge: reimplement `foo` such that above unittest will compile. No cheating with malloc etc.

Re: Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x => x + b); } unittest @nogc @safe { int[] test = [1,2,3]; assert(test.foo(3).equal(only(4,5,6))); } Challenge: reimplement `foo` s

Re: Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
On Sunday, 30 August 2015 at 11:21:34 UTC, Russel Winder wrote: On Sun, 2015-08-30 at 10:38 +, John Colvin via Digitalmars-d wrote: On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: > [...] Ok, so now I feel stupid. Not only was the unittest I gave above broken anyway

Re: Member function pointers

2015-09-10 Thread John Colvin via Digitalmars-d
On Thursday, 10 September 2015 at 01:52:17 UTC, digitalmars.D wrote: On 10 September 2015 at 04:55, Walter Bright via Digitalmars-d wrote: On 6/10/2013 7:33 AM, Manu wrote: [...] Sorry to say, your n.g. poster is back to its old tricks :-) We've resolved this issue since 6/10/2013 no? ;)

Re: std.experimental.testing formal review

2015-09-11 Thread John Colvin via Digitalmars-d
On Friday, 11 September 2015 at 11:27:59 UTC, Atila Neves wrote: On Friday, 11 September 2015 at 10:02:22 UTC, NVolcz wrote: Is it possible to categorize tests? D's module system does that already. Along with things like version(unittestFeatureA) or version(unittestPrecision)

Re: DUB release candidate 0.9.24-rc.3 ready for testing

2015-09-15 Thread John Colvin via Digitalmars-d
On Monday, 14 September 2015 at 11:45:13 UTC, Sönke Ludwig wrote: If no regressions show up in this RC, the final release will be made on the upcoming Sunday. The main additions are support for SDLang [1] package recipes [2] and a vastly improved "dub describe". Download: http://code.dlang.or

Re: Type helpers instead of UFCS

2015-09-15 Thread John Colvin via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. - noobs, code is unreadable. That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defin

Re: dpaste web site

2015-09-16 Thread John Colvin via Digitalmars-d
On Wednesday, 16 September 2015 at 16:12:03 UTC, Kagamin wrote: On Wednesday, 16 September 2015 at 13:54:36 UTC, Andrea Fontana wrote: I mean: to check some frequencies of common d keywords/combo like "class", "struct", "int", "float", "if(" "while(", "(int ", "(float ", etc that are not common

iterate over a directory, dealing with permission errors

2015-09-18 Thread John Colvin via Digitalmars-d
Posting here instead of learn because I think it uncovers a design flaw void main(string[] args) { import std.file : dirEntries, SpanMode; import std.stdio : writeln; foreach(file; dirEntries(args[1], SpanMode.depth)) writeln(file.name); } Modify this program such that it wi

Re: iterate over a directory, dealing with permission errors

2015-09-18 Thread John Colvin via Digitalmars-d
On Friday, 18 September 2015 at 11:54:32 UTC, Robert burner Schadek wrote: On Friday, 18 September 2015 at 11:35:45 UTC, John Colvin wrote: Posting here instead of learn because I think it uncovers a design flaw void main(string[] args) { import std.file : dirEntries, SpanMode; import

Re: iterate over a directory, dealing with permission errors

2015-09-18 Thread John Colvin via Digitalmars-d
On Friday, 18 September 2015 at 12:27:37 UTC, Robert burner Schadek wrote: On Friday, 18 September 2015 at 12:17:25 UTC, John Colvin wrote: That's neat, didn't know about std.exception.handle It is at least a year old. I created it because I had a range that threw, and there was

Re: dmd: failed to launch executable

2015-09-18 Thread John Colvin via Digitalmars-d
On Friday, 18 September 2015 at 15:07:52 UTC, Rinzler wrote: I had installed `dmd` using `brew` some time ago, and now I was trying to use `dmd` again, but I keep getting the following error: `dmd: failed to launch executable at /Library/Compilers/dmd2/osx/bin/dmd`. Even after doing `brew u

Re: dmd: failed to launch executable

2015-09-19 Thread John Colvin via Digitalmars-d
On Saturday, 19 September 2015 at 15:46:32 UTC, Rinzler wrote: On Saturday, 19 September 2015 at 15:32:33 UTC, Laeeth Isharc wrote: On Saturday, 19 September 2015 at 10:21:30 UTC, Rinzler wrote: On Saturday, 19 September 2015 at 10:17:21 UTC, Jacob Carlborg wrote: On 2015-09-19 12:05, Rinzler

Re: dmd: failed to launch executable

2015-09-19 Thread John Colvin via Digitalmars-d
On Saturday, 19 September 2015 at 16:44:38 UTC, Rinzler wrote: Quick point about paths and so on: if you don't understand what's going on, or have just made a change and want to be sure whether it worked, always open a new terminal session and try again. There are caches that can need emptying,

Re: can D compiler support C/C++ source code?

2015-09-20 Thread John Colvin via Digitalmars-d
On Monday, 21 September 2015 at 05:25:01 UTC, donglei wrote: While D is binary compatible with C code, it cannot compile C code nor C header files. In order to use C/C++ binary libs, I have to convert C or C++ header files to D module. It make very difficult to use C binary libs. Can D compiler

Re: Indicators and traction…

2015-09-23 Thread John Colvin via Digitalmars-d
On Wednesday, 23 September 2015 at 15:09:53 UTC, Nick Sabalausky wrote: On 09/23/2015 08:19 AM, Russel Winder via Digitalmars-d wrote: The most important can be paraphrased as "I had heard of D but as it was getting no traction, I never looked at it again." While I agree this is something

Re: DMD nightly builds?

2015-09-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 September 2015 at 13:18:28 UTC, Rikki Cattermole wrote: On 25/09/15 12:46 AM, Temtaime wrote: Hi all ! It's sad a little that there's no dmd's nightly builds. Maybe we can introduce them ? It would be great to have an ability to download latest dmd. What would be really nice

Re: DMD nightly builds?

2015-09-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 September 2015 at 13:36:09 UTC, Rikki Cattermole wrote: On 25/09/15 1:32 AM, John Colvin wrote: On Thursday, 24 September 2015 at 13:18:28 UTC, Rikki Cattermole wrote: On 25/09/15 12:46 AM, Temtaime wrote: [...] What would be really nice is to pair up the auto tester to

Re: pragma(inline, true) not very useful in its current state?

2015-09-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 September 2015 at 15:47:45 UTC, David Nadlinger wrote: Hi all, I'm not even referring to the multitude of restrictions in the DMD frontend inliner here. When looking into the remaining 2.068 test failures for LDC, I was surprised to find out that DMD only honors pragma(inline,

Re: DMD nightly builds?

2015-09-24 Thread John Colvin via Digitalmars-d
On Thursday, 24 September 2015 at 18:41:41 UTC, Laeeth Isharc wrote: On Thursday, 24 September 2015 at 13:44:11 UTC, John Colvin wrote: I guess I don't get why anyone would be interested in having last night's build instead of the latest build. If the latest build is broken for yo

Re: Moving back to .NET

2015-09-25 Thread John Colvin via Digitalmars-d
On Friday, 25 September 2015 at 07:26:13 UTC, rumbu wrote: On Friday, 25 September 2015 at 04:38:36 UTC, Rikki Cattermole wrote: On 25/09/15 4:11 PM, Sebastiaan Koppe wrote: On Friday, 25 September 2015 at 03:00:12 UTC, Jonathan M Davis wrote: I do kind of wonder though what MS would do if the

<    5   6   7   8   9   10   11   12   13   >