Re: [dub] specify dependency configuration

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn
I forgot to mention dub should automatically choose the first configuration available if you do not specify it. In this case that's the library one. Or atleast it should do that.

Re: import conflicts

2015-01-18 Thread Mike Parker via Digitalmars-d-learn
On 1/19/2015 4:37 AM, AndyC wrote: On Sunday, 18 January 2015 at 19:20:34 UTC, Vlad Levenfeld wrote: I get this all the time with std.array.array (I use my own array implementations, but phobos' array seems to secretly creep in everywhere). I think its got to do with that private import

Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread jpkl via Digitalmars-d-learn
On Monday, 19 January 2015 at 02:04:23 UTC, Mike Parker wrote: On 1/19/2015 10:44 AM, WhatMeWorry wrote: On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote: On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote: On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote:

Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn
On Monday, 19 January 2015 at 04:18:47 UTC, tcak wrote: On Sunday, 18 January 2015 at 22:25:39 UTC, anonymous wrote: On Sunday, 18 January 2015 at 18:07:05 UTC, tcak wrote: After these, it works perfectly. I hope this can be fixed in next version. Please file a bug at

Re: druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 18, 2015 23:21:43 jollie via Digitalmars-d-learn wrote: Jonathan M Davis via Digitalmars-d-learn digita lmars-d-le...@puremagic.com Wrote in message: It's been a while since I did anything in Windows with D, and unfortunately, I need to again, and now I can't get druntime

Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread Mike Parker via Digitalmars-d-learn
On 1/19/2015 10:44 AM, WhatMeWorry wrote: On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote: On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote: On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote: I've got a OpenGL function returning a pointer // const

Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn
On Sunday, 18 January 2015 at 22:25:39 UTC, anonymous wrote: On Sunday, 18 January 2015 at 18:07:05 UTC, tcak wrote: After these, it works perfectly. I hope this can be fixed in next version. Please file a bug at https://issues.dlang.org/. And since you seem to know how to fix it, maybe you

Re:druntime build failing because of masm386 problems

2015-01-18 Thread jollie via Digitalmars-d-learn
Jonathan M Davis via Digitalmars-d-learn digita lmars-d-le...@puremagic.com Wrote in message: It's been a while since I did anything in Windows with D, and unfortunately, I need to again, and now I can't get druntime to build. I'm getting this lovely error: dmc -c src\rt\minit.asm masm386

Re: druntime build failing because of masm386 problems

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn
On 19/01/2015 4:53 p.m., Jonathan M Davis via Digitalmars-d-learn wrote: It's been a while since I did anything in Windows with D, and unfortunately, I need to again, and now I can't get druntime to build. I'm getting this lovely error: dmc -c src\rt\minit.asm masm386 -DM_I386=1 -D_WIN32 -Mx

Re: [dub] specify dependency configuration

2015-01-18 Thread Rikki Cattermole via Digitalmars-d-learn
On 19/01/2015 1:59 p.m., cal wrote: Given myapp and a dependency, specified by dub.json's: myapp: dub.json { ... dependencies: { dependency_a: =0.6.0 } ... } dependency_a: dub.json { ... configurations: [ { name: config_a, targetType: library, ... },

Re: [dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole wrote: I just want to verify, you are using configurations only to determine if its being built a certain way? And not lets say as a subpackage? Some dependency (that I don't control) might define for example two configurations, a

Re: [dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole wrote: subConfigurations: { somepackage: glut-app } } Ahh I guess this is it, thanks for that!

Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread WhatMeWorry via Digitalmars-d-learn
On Sunday, 18 January 2015 at 20:07:25 UTC, weaselcat wrote: On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote: On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote: I've got a OpenGL function returning a pointer // const GLubyte *version = glGetString(GL_VERSION); //

druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
It's been a while since I did anything in Windows with D, and unfortunately, I need to again, and now I can't get druntime to build. I'm getting this lovely error: dmc -c src\rt\minit.asm masm386 -DM_I386=1 -D_WIN32 -Mx src\rt\minit.asm; Can't run 'masm386', check PATH Error: 'dmc' not found

Re: druntime build failing because of masm386 problems

2015-01-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 18, 2015 22:19:29 Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, January 18, 2015 23:21:43 jollie via Digitalmars-d-learn wrote: It's been some months since I had this problem pop up, but I just ran touch on the minit.obj file so make thought it was up to date

[dub] specify dependency configuration

2015-01-18 Thread cal via Digitalmars-d-learn
Given myapp and a dependency, specified by dub.json's: myapp: dub.json { ... dependencies: { dependency_a: =0.6.0 } ... } dependency_a: dub.json { ... configurations: [ { name: config_a, targetType: library, ... }, { name: config_b,

Re: Getting a safe path for a temporary file

2015-01-18 Thread Kagamin via Digitalmars-d-learn
On Sunday, 18 January 2015 at 11:21:52 UTC, Marc Schütz wrote: It's not different, and if you're still doing the O_EXCL open afterwards, it's safe. I just assumed you were going to use the generated filename without a further check. This is then unsafe, no matter how the UUID is generated, and

Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn
I create a shared memory by using shmget. And attach to it by using shmat. Finally, I use shmctl to get statistics to learn number of attachments to that shared memory. According to documentation (linux.die.net/man/2/shmat), number of attachments should be 1. Same codes, C returns 1, D

Re: Shared and GC

2015-01-18 Thread Kagamin via Digitalmars-d-learn
http://forum.dlang.org/thread/dnxgbumzenupviqym...@forum.dlang.org :-/

Re: Getting a safe path for a temporary file

2015-01-18 Thread via Digitalmars-d-learn
On Saturday, 17 January 2015 at 17:16:41 UTC, Tobias Pankrath wrote: On Saturday, 17 January 2015 at 16:55:42 UTC, Marc Schütz wrote: On Saturday, 17 January 2015 at 14:37:00 UTC, Laeeth Isharc wrote: On Saturday, 17 January 2015 at 13:47:39 UTC, Marc Schütz wrote: Is it currently possible to

Re: Getting a safe path for a temporary file

2015-01-18 Thread via Digitalmars-d-learn
On Sunday, 18 January 2015 at 00:51:37 UTC, Laeeth Isharc wrote: I don't follow why a collision attack is applicable in this case. Your stage 1 of generating unique names: how is this different from using a random uuid? It's not different, and if you're still doing the O_EXCL open

Re: Getting a safe path for a temporary file

2015-01-18 Thread via Digitalmars-d-learn
On Saturday, 17 January 2015 at 21:32:18 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: But I think that what we need is a function in std.stdio (e.g tempFile insteaf of tmpfile) which returns an open File with a randomly generated name and gives you access to its name rather than using

import conflicts

2015-01-18 Thread AndyC via Digitalmars-d-learn
Hi all, I'm trying to write my first actual app that'll go into production. My file starts with this set of imports: import std.stdio, std.string, std.json, std.process, std.conv, std.file, core.sys.posix.syslog, tinyredis.redis; import core.sys.posix.unistd: chdir; import

Re: import conflicts

2015-01-18 Thread AndyC via Digitalmars-d-learn
On Sunday, 18 January 2015 at 19:20:34 UTC, Vlad Levenfeld wrote: I get this all the time with std.array.array (I use my own array implementations, but phobos' array seems to secretly creep in everywhere). I think its got to do with that private import visibility bug

Re: import conflicts

2015-01-18 Thread Vlad Levenfeld via Digitalmars-d-learn
I get this all the time with std.array.array (I use my own array implementations, but phobos' array seems to secretly creep in everywhere). I think its got to do with that private import visibility bug (https://issues.dlang.org/show_bug.cgi?id=314 or

simple assignment statement compiles but becomes a run time error

2015-01-18 Thread WhatMeWorry via Digitalmars-d-learn
I've got a OpenGL function returning a pointer // const GLubyte *version = glGetString(GL_VERSION); // C++ and openLG code // the following compiles with no errors or warnings char openglVersion[100] = fromStringz(glGetString(GL_VERSION)); // ABENDS HERE! // documentation from

Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread WhatMeWorry via Digitalmars-d-learn
On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote: I've got a OpenGL function returning a pointer // const GLubyte *version = glGetString(GL_VERSION); // C++ and openLG code // the following compiles with no errors or warnings char openglVersion[100] =

Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread tcak via Digitalmars-d-learn
On Sunday, 18 January 2015 at 16:06:39 UTC, tcak wrote: I create a shared memory by using shmget. And attach to it by using shmat. Finally, I use shmctl to get statistics to learn number of attachments to that shared memory. According to documentation (linux.die.net/man/2/shmat), number of

Re: How to avoid invalid memory operation errors (and more) in DLLs?

2015-01-18 Thread Heinz via Digitalmars-d-learn
On Wednesday, 14 January 2015 at 13:51:08 UTC, John Colvin wrote: Would it be possible for you to file this as a bug at issues.dlang.org ? While trying to file this issue, I was simplifing my test case and in the process I was able to make it not crash, but now

Re: Bug on Posix IPC_STAT. Wrong number of attachments

2015-01-18 Thread anonymous via Digitalmars-d-learn
On Sunday, 18 January 2015 at 18:07:05 UTC, tcak wrote: After these, it works perfectly. I hope this can be fixed in next version. Please file a bug at https://issues.dlang.org/. And since you seem to know how to fix it, maybe you can make a pull request via GitHub, too?

Re: simple assignment statement compiles but becomes a run time error

2015-01-18 Thread weaselcat via Digitalmars-d-learn
On Sunday, 18 January 2015 at 19:51:02 UTC, WhatMeWorry wrote: On Sunday, 18 January 2015 at 19:42:33 UTC, WhatMeWorry wrote: I've got a OpenGL function returning a pointer // const GLubyte *version = glGetString(GL_VERSION); // C++ and openLG code // the following compiles with no errors

Colour operations using CyberShadow's graphics library

2015-01-18 Thread Phil via Digitalmars-d-learn
Hi, I'm new to D and having a go at writing some image processing stuff using Vladimir's ae.graphics library. To filter (i.e. perform correlations/convolutions) on a view with colour type C, I'd like to perform intermediate calculations using a colour with the same number of channels as C,