Re: D Hackday Round 2

2014-07-07 Thread Jacob Carlborg via Digitalmars-d-announce
On 07/07/14 05:12, safety0ff wrote: Is this primarily bug tracker culling or does it include PR reviewing, debugging, etc? I don't think anyone will try and stop you to do any of the above ;) -- /Jacob Carlborg

DUB Bash Completion

2014-07-07 Thread Nordlöw
So I put together something that works in the majority of cases even for sub command specific flags including package completion: https://github.com/nordlow/scripts/blob/master/dub-completion.bash Feedback appreciated!

Re: DUB Bash Completion

2014-07-07 Thread Sönke Ludwig via Digitalmars-d-announce
Am 07.07.2014 11:22, schrieb Nordlöw: So I put together something that works in the majority of cases even for sub command specific flags including package completion: https://github.com/nordlow/scripts/blob/master/dub-completion.bash Feedback appreciated! Very nice, I'll try this out this

Re: DUB Bash Completion

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 11:55:48 UTC, Nordlöw wrote: BTW, corresponding GitHub issue: https://github.com/D-Programming-Language/dub/issues/154 Do you fix the PR?

Re: DUB Bash Completion

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 10:58:02 UTC, Sönke Ludwig wrote: Very nice, I'll try this out this later. If you don't mind, we should put this into the DUB main repository and also get in touch with the package maintainers to include it in the standard distribution. Very ok with me :) BTW,

Re: DConf 2014 Day 2 Talk 2: Refactoring JIT Compilation by Maxime Chevalier-Boisvert

2014-07-07 Thread Messenger via Digitalmars-d-announce
On Thursday, 3 July 2014 at 16:12:45 UTC, Andrei Alexandrescu wrote: We're back in business publishing DConf talks! https://news.ycombinator.com/newest (please vote quickly) https://twitter.com/D_Programming/status/484730864220504064 https://www.facebook.com/dlang.org/posts/877858112227871

Re: D Hackday Round 2

2014-07-07 Thread Jonathan Crapuchettes via Digitalmars-d-announce
On Fri, 04 Jul 2014 10:08:39 +, Dicebot wrote: On Thursday, 3 July 2014 at 23:17:33 UTC, Jonathan Crapuchettes wrote: After the success of the last D hackday, EMSI is going to attempt to have a D hackday once a month as close as we can to the first Friday of the month. Our next round will

Smile, you're on Wired

2014-07-07 Thread Andrei Alexandrescu via Digitalmars-d-announce
http://www.reddit.com/r/programming/comments/2a20h5/wired_magazine_discovers_d/ https://hn.algolia.com/#!/story/forever/0/the%20next%20big%20programming%20language https://www.facebook.com/dlang.org/posts/880588921954790 https://twitter.com/D_Programming/status/486179309363941376 Andrei

Re: D Hackday Round 2

2014-07-07 Thread Justin Whear via Digitalmars-d-announce
On Mon, 07 Jul 2014 03:12:24 +, safety0ff wrote: On Thursday, 3 July 2014 at 23:17:33 UTC, Jonathan Crapuchettes wrote: Last time 24 issues were marked as resolved by the community (including EMSI). Please join us in squashing bugs on #d. Is this primarily bug tracker culling or does

Re: Smile, you're on Wired

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 16:06:45 UTC, Andrei Alexandrescu wrote: https://www.facebook.com/dlang.org/posts/880588921954790 Great! Made some encouraging comments at the bottom the Wired article. I hope I got them right :)

Re: Smile, you're on Wired

2014-07-07 Thread Tourist via Digitalmars-d-announce
On Monday, 7 July 2014 at 16:06:45 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/2a20h5/wired_magazine_discovers_d/ https://hn.algolia.com/#!/story/forever/0/the%20next%20big%20programming%20language https://www.facebook.com/dlang.org/posts/880588921954790

Re: Smile, you're on Wired

2014-07-07 Thread Gary Willoughby via Digitalmars-d-announce
On Monday, 7 July 2014 at 16:06:45 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/2a20h5/wired_magazine_discovers_d/ https://hn.algolia.com/#!/story/forever/0/the%20next%20big%20programming%20language https://www.facebook.com/dlang.org/posts/880588921954790

Re: Smile, you're on Wired

2014-07-07 Thread via Digitalmars-d-announce
This, is amazing. Today D is getting a great spotlight.

Re: Smile, you're on Wired

2014-07-07 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 7/7/14, 10:16 AM, Tourist wrote: On Monday, 7 July 2014 at 16:06:45 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/2a20h5/wired_magazine_discovers_d/ https://hn.algolia.com/#!/story/forever/0/the%20next%20big%20programming%20language

Re: Smile, you're on Wired

2014-07-07 Thread Nick Sabalausky via Digitalmars-d-announce
On 7/7/2014 12:06 PM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/2a20h5/wired_magazine_discovers_d/ Excellent article! Best introduction to D I've ever seen. Not only that, but it also helps dissuade the misleading belief that Facebook is written in PHP, so I'm

Re: Decimal Numbers

2014-07-07 Thread Paul D Anderson via Digitalmars-d-announce
On Monday, 7 July 2014 at 03:26:54 UTC, Poyeyo wrote: Can you add a dub.json and submit it to the dub registry? etcimon generated a dub.json file which I've merged into github. Thanks. However, I am unable to register the package because it requires a version number, which I don't know how

Re: Smile, you're on Wired

2014-07-07 Thread Puming via Digitalmars-d-announce
I see in the comments that talks about sociomantic's talk on DConf, can you upload and publish it today? On Monday, 7 July 2014 at 17:49:39 UTC, Andrei Alexandrescu wrote: On 7/7/14, 10:16 AM, Tourist wrote: On Monday, 7 July 2014 at 16:06:45 UTC, Andrei Alexandrescu wrote:

Re: dub shell completion

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 06/07/14 20:09, Nordlöw wrote: Have anybody cooked up some bash completion for dub? That would be nice to have. -- /Jacob Carlborg

Re: Better AAs

2014-07-07 Thread w0rp via Digitalmars-d
I wrote my own hashmap a little while ago for fun, and also because I couldn't get @safe pure nothrow ranges through maps at the time, and it turned out that I could also add in @nogc too for the ranges and a lot of functions, so I could make a lot of my graph types also provide the same

Re: Cryptography and D

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 06/07/14 02:18, Walter Bright wrote: Sure, but nobody is going to blame us for it :-) whereas they will for an official D implementation. If we get D bindings and wrappers of a C library in Phobos, people using it might not no it's actually just bindings/wrappers and start to blame us.

Re: Memoization in DMD

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 06/07/14 23:38, Walter Bright wrote: I'd turn that around and ask where you are seeing potential savings? Note that you can run obj2asm on the generated object files, please do so and point out where things can be cached. Templates perhaps? -- /Jacob Carlborg

Re: dub shell completion

2014-07-07 Thread Iain Buclaw via Digitalmars-d
On 6 July 2014 19:09, Nordlöw digitalmars-d@puremagic.com wrote: Have anybody cooked up some bash completion for dub? What's the list of switches accepted by dub? I'm convinced that --help doesn't show them all. ;)

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 05/07/14 05:00, deadalnix wrote: We need various logos, as they'll be more or less readable at various scales. The flat-minimal is especially important as this is the only one that is going to scale down without become unrecognizable. I agree. We need something that can be used for icons.

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 04/07/14 03:17, Brad Anderson wrote: Actually, mine is less accurate than I thought (I made it by tracing before I knew an SVG was available). Here's some variations made from the original SVG by just deleting paths but leaving them all unaltered:

Re: Languages for servers (Go, D, and more)

2014-07-07 Thread Kagamin via Digitalmars-d
On Saturday, 5 July 2014 at 16:28:13 UTC, Dicebot wrote: This is what I have been referring to in my earlier comment. These utilities provide RAII experience very similar to one in C++ and work pretty good if you stick to certain style of programming. But they are implemented by using struct

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 07/07/2014 8:29 AM, Jacob Carlborg wrote: On 05/07/14 05:00, deadalnix wrote: We need various logos, as they'll be more or less readable at various scales. The flat-minimal is especially important as this is the only one that is going to scale down without become unrecognizable. I agree.

Re: dub shell completion

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 09:26, Iain Buclaw via Digitalmars-d wrote: What's the list of switches accepted by dub? I'm convinced that --help doesn't show them all. ;) I'm pretty sure that dub --help only shows the global options. You have to run dub command --help to find the flags of a specific command.

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 10:05, Alix Pexton wrote: https://drive.google.com/file/d/0B3i8FWPuOpryM0VJQlU5ZDJNcFk/edit https://drive.google.com/file/d/0B3i8FWPuOpryRW9PODBMUUZyMlE/edit I don't think that looks so nice. -- /Jacob Carlborg

Re: Memoization in DMD

2014-07-07 Thread Walter Bright via Digitalmars-d
On 7/7/2014 12:06 AM, Jacob Carlborg wrote: On 06/07/14 23:38, Walter Bright wrote: I'd turn that around and ask where you are seeing potential savings? Note that you can run obj2asm on the generated object files, please do so and point out where things can be cached. Templates perhaps?

Re: Logic const with lazy const

2014-07-07 Thread CarolFargo via Digitalmars-d
okay, that is a great information for me. I have read some kind of related information from a site (a href=http://www.buyessays.us/phd-thesis-writing.php;weblink /a ). There some what additional information is there. Thank you

Re: New Employment

2014-07-07 Thread Kagamin via Digitalmars-d
Use forum web interface FTW.

Re: dub shell completion

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 06:26:06 UTC, Jacob Carlborg wrote: That would be nice to have. So I put together something that works in the majority of cases even for command specific flags and completion registered packages. https://github.com/nordlow/scripts/blob/master/dub-completion.bash

Re: New Employment

2014-07-07 Thread Jonathan M Davis via Digitalmars-d
On Sun, 06 Jul 2014 15:03:35 -0700 Adam Wilson via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sun, 06 Jul 2014 14:57:34 -0700, Adam Wilson flybo...@gmail.com wrote: And now I look like a complete idiot for hitting the wrong button! *embarrassed* At least you accidentally shared

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 07/07/2014 9:17 AM, Jacob Carlborg wrote: On 07/07/14 10:05, Alix Pexton wrote: https://drive.google.com/file/d/0B3i8FWPuOpryM0VJQlU5ZDJNcFk/edit https://drive.google.com/file/d/0B3i8FWPuOpryRW9PODBMUUZyMlE/edit I don't think that looks so nice. Which one, Package or Sourcefile or

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 03/07/2014 8:50 PM, Walter Bright wrote: On 7/3/2014 4:40 AM, Alix Pexton wrote: I agree! I started working on this little document last night while angry and tired, maybe it should find its way to the wiki.

Re: Go vs. D vs Java 8

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 05:51:32 UTC, Nick Sabalausky wrote: If anyone's able to login there, maybe they could post a comment mentioning that SHA-256 (along with the rest of SHA-2) *is* in D as of the v2.066 beta. Done.

Re: Optimizing Java using D

2014-07-07 Thread Wanderer via Digitalmars-d
On Sunday, 6 July 2014 at 21:31:57 UTC, Dmitry Olshansky wrote: Strawman. ... Again your ignorance of what a struct could do shows. ... Plain wrong. Again seeing you have strong Java background, isn't particularly surprising. ... Ignorance. On Sunday, 6 July 2014 at 04:20:21 UTC, Timon Gehr

Re: dub shell completion

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 11:14, Nordlöw wrote: So I put together something that works in the majority of cases even for command specific flags and completion registered packages. https://github.com/nordlow/scripts/blob/master/dub-completion.bash Awesome, I'll have to give it a try later. -- /Jacob

Re: Memoization in DMD

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 10:23, Walter Bright wrote: They're already cached. Does that include templates instantiated with different types but which results in the same code? -- /Jacob Carlborg

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 12:20, Alix Pexton wrote: Which one, Package or Sourcefile or both? Both, actually. These are what I'm currently using myself, but I'm not 100% happy with how they appear when small. I'm trying to work with in the constraints that that seem to have emerged over what elements of

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 07/07/2014 12:26 PM, Jacob Carlborg wrote: On 07/07/14 12:20, Alix Pexton wrote: Which one, Package or Sourcefile or both? Both, actually. Shame, I kinda liked the cardboard box, I surprised myself with how quickly it came together. These are what I'm currently using myself, but I'm

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 07/07/2014 1:09 PM, Alix Pexton wrote: On 07/07/2014 12:26 PM, Jacob Carlborg wrote: On 07/07/14 12:20, Alix Pexton wrote: There is a generic page icon, but that doesn't seem to have been updated to the windows 7 theme. Oh wait, yes it is, my bad A...

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Jacob Carlborg via Digitalmars-d
On 07/07/14 14:09, Alix Pexton wrote: Shame, I kinda liked the cardboard box, I surprised myself with how quickly it came together. What I don't like is that it looks like a standard icon with the D logo just added on top. Have a look at this icon from Adium [1]. This icon is used for

Re: Worrying attitudes to the branding of the D language

2014-07-07 Thread Alix Pexton via Digitalmars-d
On 07/07/2014 3:40 PM, Jacob Carlborg wrote: The C icon probably comes from Xcode. BTW, here's how it looks like [2]. The corresponding icon from TextMate looks like this [3]. Just the TextMate logo with a name of the language at the bottom. So it comes down to where the logo gets positioned.

Re: Go vs. D vs Java 8

2014-07-07 Thread bearophile via Digitalmars-d
Nordlöw: Done. But that author doesn't switch to dmd 2.066beta1 :-) From the blog post: However, the language itself feels a bit old and a bit too much like C++. That's not strange considering its age, but you can’t help thinking that time has left D a bit behind. This is partially

Re: Go vs. D vs Java 8

2014-07-07 Thread Meta via Digitalmars-d
On Monday, 7 July 2014 at 15:33:06 UTC, bearophile wrote: If you write it like java, it looks like java. This sentence struck me as very zen for some reason.

D language on Wired

2014-07-07 Thread bearophile via Digitalmars-d
Wired about D: http://www.wired.com/2014/07/d-programming-language/ Bye, bearophile

Re: Memoization in DMD

2014-07-07 Thread Walter Bright via Digitalmars-d
On 7/7/2014 4:20 AM, Jacob Carlborg wrote: On 07/07/14 10:23, Walter Bright wrote: They're already cached. Does that include templates instantiated with different types but which results in the same code? No. That's doable, but hasn't been done yet.

Re: D language on Wired

2014-07-07 Thread bearophile via Digitalmars-d
Wired about D: Sorry, it's a dupe. Ignore this thread please, Andrei has opened a better one elsewhere. Bye, bearophile

Re: Designing a matrix library for D

2014-07-07 Thread Jared via Digitalmars-d
On Tuesday, 24 June 2014 at 03:29:52 UTC, H. S. Teoh via Digitalmars-d wrote: Using lapack/blas as the backend would guarantee good performance, though I'm not sure if the Phobos maintainers would be too thrilled at the idea, after the fiasco with libcurl. It is straightforward with

Decisions and the preapproved Bugzilla keyword

2014-07-07 Thread Brian Schott via Digitalmars-d
Whet is the list of people who are able to add the preapproved keyword in Bugzilla? I.e. if we need a yes/no decision on a language change that can break people's code, how does one actually go about making it happen (as Walter phrased it in another thread)? We have a decision making process

Re: Designing a matrix library for D

2014-07-07 Thread w0rp via Digitalmars-d
I have implemented a couple of matrices which may be of interest. One is heap allocated with garbage collection, another is based on 2D static arrays. I didn't implement a spare matrix. https://github.com/w0rp/dstruct/blob/master/source/dstruct/matrix.d There's very little which can be shared

Re: Upgrading a codebase from 2.065 to 2.066

2014-07-07 Thread Brian Schott via Digitalmars-d
On Wednesday, 2 July 2014 at 22:34:36 UTC, Brian Schott wrote: 5. A change to object.d broke a line of code that used [] as the defaultValue argument to the get() function for AAs. Casting [] to the expected type worked around this issue. This has been fixed in the compiler. A recent change

Re: Languages for servers (Go, D, and more)

2014-07-07 Thread Sean Kelly via Digitalmars-d
On Saturday, 5 July 2014 at 06:43:31 UTC, Russel Winder via Digitalmars-d wrote: On Fri, 2014-07-04 at 20:25 +, Chris Cain via Digitalmars-d wrote: […] The big problem with that is C++ style memory management implies we're going to have new/delete which AFAIK delete is depreciated and new

Re: Optimizing Java using D

2014-07-07 Thread deadalnix via Digitalmars-d
On Monday, 7 July 2014 at 10:55:38 UTC, Wanderer wrote: I'm starting to think that D community should grow up few more years before reasonable discussion is possible. Last few days, I became disappointed in D - not because the language is rather immature and unstable yet, but mainly because

Re: Decisions and the preapproved Bugzilla keyword

2014-07-07 Thread Andrei Alexandrescu via Digitalmars-d
On 7/7/14, 10:20 AM, Brian Schott wrote: Whet is the list of people who are able to add the preapproved keyword in Bugzilla? I.e. if we need a yes/no decision on a language change that can break people's code, how does one actually go about making it happen (as Walter phrased it in another

Re: Languages for servers (Go, D, and more)

2014-07-07 Thread via Digitalmars-d
On Monday, 7 July 2014 at 18:15:32 UTC, Sean Kelly wrote: On Saturday, 5 July 2014 at 06:43:31 UTC, Russel Winder via Digitalmars-d wrote: On Fri, 2014-07-04 at 20:25 +, Chris Cain via Digitalmars-d wrote: […] The big problem with that is C++ style memory management implies we're going to

Bottom line re GC in D

2014-07-07 Thread Adrian via Digitalmars-d
Hi all, I know there's been quite some discussion about the GC in D, but I've been busy doing other things and haven't been following that closely. So I'd appreciate it if someone could fill me in about proceedings/decisions in this regard... + Has the GC been dropped? + If not, can it

[dmd 2.066-b1] std.range.array with shared objects and AA rehash

2014-07-07 Thread NCrashed via Digitalmars-d-learn
I am using ranges (wrapped in InputRangeObject for use in interfaces) of shared objects, with new beta some cases are broken: ``` import std.range; class A {} InputRange!(shared A) foo() { return [new A].inputRangeObject; } void bar() { auto res = foo.array; } void main() {}

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
See if stdio allows you to specify delete sharing when opening the file.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
On windows files are traditionally opened without delete sharing, such files can't be deleted until closed, because all sharing options are always honored.

Re: Visual D: Settings to Improve compil and link process

2014-07-07 Thread ParticlePeter via Digitalmars-d-learn
On Sunday, 6 July 2014 at 19:27:38 UTC, Rainer Schuetze wrote: Ok, that allows separate compilation of the class, but templates are still compiled with the rest of the program. I thought the templates were the part that cause the slow compilation. I had no chance to profile till now, but I

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Joakim via Digitalmars-d-learn
On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote: See if stdio allows you to specify delete sharing when opening the file. I don't know what delete sharing is exactly, but the File constructor simply calls fopen and I don't see any option for the Windows fopen that seems to do it:

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Regan Heath via Digitalmars-d-learn
On Mon, 07 Jul 2014 12:17:34 +0100, Joakim dl...@joakim.airpost.net wrote: On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote: See if stdio allows you to specify delete sharing when opening the file. I don't know what delete sharing is exactly, but the File constructor simply calls

Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Frédérik
Hi all, I'm discovering the D language that seems very nice in many aspects, but I'm quite confused by the container and range APIs while trying to design a very simple interface-oriented API. Especially I can't figure out how std.containers can connect properly with std.ranges : I'm trying to

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread rumbu via Digitalmars-d-learn
On Monday, 7 July 2014 at 11:17:35 UTC, Joakim wrote: On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote: See if stdio allows you to specify delete sharing when opening the file. In std.stdio, File(name, mode) is forwarded to _wfopen on Windows and to fopen on posix. On Windows there

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Meta via Digitalmars-d-learn
On Monday, 7 July 2014 at 12:06:21 UTC, Frédérik wrote: Hi all, I'm discovering the D language that seems very nice in many aspects, but I'm quite confused by the container and range APIs while trying to design a very simple interface-oriented API. Especially I can't figure out how

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread bearophile via Digitalmars-d-learn
Frédérik: Especially I can't figure out how std.containers can connect properly with std.ranges : std.containers is still primitive, it needs to be improved and fleshed out, after Andrei's memory allocators. I would need to get the range that comes from the red black tree (as returned by

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread anonymous via Digitalmars-d-learn
On Monday, 7 July 2014 at 12:06:21 UTC, Frédérik wrote: I'm trying to achieve something like that (approximate D code): interface MyObjectSet { void add(MyObject o); void SortedRange!MyObject opSlice(); } class SomeRedBlackBasedImplementation { private RedBlackTree!MyObject

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread bearophile via Digitalmars-d-learn
Meta: (a SortedRange needs a range with random access, I think SortedRange was recently improved, and now accepts more than just random access ranges. Bye, bearophile

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Frédérik
Thank you very much to all of you for these very quick and precise answers !! As well as for tour recommendations about D's idiomatisms, it seems very important to me since there are so many available paradigms in D. I'll try these solutions and I'll be able to go ahead with my first D

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Jesse Phillips via Digitalmars-d-learn
On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote: But! I agree with Adam, leave it as a thin wrapper. Being a windows programmer by trade I would expect the remove to fail, I would not expect all my files to be opened with delete sharing enabled by default. R And I believe

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
It can be also a bad user experience, when delete succeeds only pertially and doesn't free the disk space. Delete-on-close flag should be better in this regard.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Regan Heath via Digitalmars-d-learn
On Mon, 07 Jul 2014 15:18:51 +0100, Jesse Phillips jesse.k.phillip...@gmail.com wrote: On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote: But! I agree with Adam, leave it as a thin wrapper. Being a windows programmer by trade I would expect the remove to fail, I would not expect

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Fr via Digitalmars-d-learn
Hi again, The solution of making an array from the range works, but I'm concerned about the cost of instantiating a (potentially very large) array each time I need to walk across the set. Unless doing that is costless in D for any reason, it does not seem practical in my case. And when

Re: [dmd 2.066-b1] std.range.array with shared objects and AA rehash

2014-07-07 Thread Meta via Digitalmars-d-learn
On Monday, 7 July 2014 at 09:53:22 UTC, NCrashed wrote: I am using ranges (wrapped in InputRangeObject for use in interfaces) of shared objects, with new beta some cases are broken: ``` import std.range; class A {} InputRange!(shared A) foo() { return [new A].inputRangeObject; }

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
On Monday, 7 July 2014 at 14:25:54 UTC, Regan Heath wrote: If I had to guess, I would say it would still be possible to access the file. It's documented so. I guess, linux implements file deletion with delete-on-close feature too, if it exists, a separate deletion operation is not needed.

Re: dependency graph

2014-07-07 Thread Vlad Levenfeld via Digitalmars-d-learn
Thanks! Between the -deps flag and duml I think this is exactly what I need.

Re: recursive definition error

2014-07-07 Thread Frustrated via Digitalmars-d-learn
On Monday, 7 July 2014 at 09:56:17 UTC, Marc Schütz wrote: On Monday, 7 July 2014 at 02:57:09 UTC, Frustrated wrote: So, I took all the code surrounding the error message(which was a lot of code) and stuck it into one .d file. No errors! Works as expected. So, WTF?!?! I guess now I have to

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread anonymous via Digitalmars-d-learn
On Monday, 7 July 2014 at 14:51:37 UTC, Fr wrote: The solution of making an array from the range works, but I'm concerned about the cost of instantiating a (potentially very large) array each time I need to walk across the set. Unless doing that is costless in D for any reason, it does not

Re: dmd dub from git master

2014-07-07 Thread Nordlöw
On Sunday, 6 July 2014 at 11:25:04 UTC, w0rp wrote: I hit this myself also. I was trying to use the master branch DMD, druntime, and phobos with a recent vibe.d for building the documentation with ddox, and I ran into the reliance on std.metastrings. I got things to work after some cleanups

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Joakim via Digitalmars-d-learn
On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote: On Mon, 07 Jul 2014 12:17:34 +0100, Joakim dl...@joakim.airpost.net wrote: On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote: See if stdio allows you to specify delete sharing when opening the file. I don't know what delete

dustmite build

2014-07-07 Thread Frustrated via Digitalmars-d-learn
when I build dustmite using dmd or gdc with no options or -O3, it is 18M but in the dmd directory, dustmite is only 650k. I assume I'm statically linking the whole library while in the small one is using some dynamic link library? Or is all that debug information or what?

Re: dustmite build

2014-07-07 Thread Frustrated via Digitalmars-d-learn
On Monday, 7 July 2014 at 17:50:35 UTC, Frustrated wrote: when I build dustmite using dmd or gdc with no options or -O3, it is 18M but in the dmd directory, dustmite is only 650k. I assume I'm statically linking the whole library while in the small one is using some dynamic link library? Or is

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Fr via Digitalmars-d-learn
On Monday, 7 July 2014 at 16:58:51 UTC, anonymous wrote: No array is created in the example. Where do you think an array is created? It's in the example above : SortedRange!(MyObject[]) opSlice() { sequence[].array.assumeSorted; } I thought that that using .array would lead to

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread Meta via Digitalmars-d-learn
On Monday, 7 July 2014 at 19:20:24 UTC, Fr wrote: It's in the example above : SortedRange!(MyObject[]) opSlice() { sequence[].array.assumeSorted; } I thought that that using .array would lead to instantiating something. Yes, this *will* instantiate an array and copy all of the items from

std.algorithm.sort error with default predicate

2014-07-07 Thread Archibald via Digitalmars-d-learn
Using std.algorithm.sort(a,b,c,d,e) I get the error message : core.exception.AssertError@C:\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(1 0350): Predicate for isSorted is not antisymmetric. Both pred(a, b) and pred(b, a) are true for a=Tuple!(float, int, uint[], int, uint[])(-7.56963e-05,

Re: std.algorithm.sort error with default predicate

2014-07-07 Thread bearophile via Digitalmars-d-learn
Archibald: Using std.algorithm.sort(a,b,c,d,e) But isn't std.algorithm.sort accepting only one argument? Bye, bearophile

Re: Ranges containers : is it possible to get a SortedRange from a RedBlackTree ?

2014-07-07 Thread anonymous via Digitalmars-d-learn
On Monday, 7 July 2014 at 19:20:24 UTC, Fr wrote: On Monday, 7 July 2014 at 16:58:51 UTC, anonymous wrote: No array is created in the example. Where do you think an array is created? It's in the example above : SortedRange!(MyObject[]) opSlice() { sequence[].array.assumeSorted; } I

Re: std.algorithm.sort error with default predicate

2014-07-07 Thread anonymous via Digitalmars-d-learn
On Monday, 7 July 2014 at 20:10:10 UTC, Archibald wrote: Using std.algorithm.sort(a,b,c,d,e) I get the error message : core.exception.AssertError@C:\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(1 0350): Predicate for isSorted is not antisymmetric. Both pred(a, b) and pred(b, a) are true

Re: std.algorithm.sort error with default predicate

2014-07-07 Thread Archibald via Digitalmars-d-learn
On Monday, 7 July 2014 at 20:17:16 UTC, bearophile wrote: Archibald: Using std.algorithm.sort(a,b,c,d,e) But isn't std.algorithm.sort accepting only one argument? Bye, bearophile Sorry, it's sort(zip(a,b,c,d,e))

Re: std.algorithm.sort error with default predicate

2014-07-07 Thread Andrew Brown via Digitalmars-d-learn
Is it chain you are after to concatenate the objects and sort them together? http://dlang.org/phobos/std_range.html#.chain You'd need to cast them all to the same type. On Monday, 7 July 2014 at 20:50:06 UTC, Archibald wrote: On Monday, 7 July 2014 at 20:17:16 UTC, bearophile wrote:

Re: std.algorithm.sort error with default predicate

2014-07-07 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 07, 2014 at 08:35:53PM +, anonymous via Digitalmars-d-learn wrote: [...] Looks like a bad bug: void main() { uint[] a = [0x22_DF_FF_FF]; uint[] b = [0xA2_DF_FF_FF]; assert(!(a b b a)); /* fails */ } This looks pretty serious. Please file a bug:

Capture offset of matches in std.regex.matchAll?

2014-07-07 Thread JD via Digitalmars-d-learn
I'm using a compile time regex to find some tags in an input string. Is it possible to capture the offset of the matches in some way? Otherwise I have to calculate the offsets myself by iterating over the results of matchAll. Thanks, Jeroen --- Example code: import std.stdio; import

Sparse Aggregate Assignment/Initialization (RAII)

2014-07-07 Thread Nordlöw
Because D currently doesn't support RAII using named parameters like in Python I tried the following. Say I have an aggregate class C { int x,y,z,w; } or similarly struct C { int x,y,z,w; } I know define a generic _free_ function ref T set(string member, T, U)(ref T a, in U value) if

Re: Sparse Aggregate Assignment/Initialization (RAII)

2014-07-07 Thread Justin Whear via Digitalmars-d-learn
On Mon, 07 Jul 2014 21:34:05 +, Nordlöw wrote: However using this function through UFCS auto cx = new C().set!x(11); fails as algorithm_ex.d(1257,17): Error: template algorithm_ex.set cannot deduce function from argument types !(x)(C, int), candidates are:

Re: Sparse Aggregate Assignment/Initialization (RAII)

2014-07-07 Thread Justin Whear via Digitalmars-d-learn
On Mon, 07 Jul 2014 21:49:22 +, Justin Whear wrote: On Mon, 07 Jul 2014 21:34:05 +, Nordlöw wrote: However using this function through UFCS auto cx = new C().set!x(11); fails as algorithm_ex.d(1257,17): Error: template algorithm_ex.set cannot deduce function from

Re: Visual D: Settings to Improve compil and link process

2014-07-07 Thread Rainer Schuetze via Digitalmars-d-learn
On 07.07.2014 12:46, ParticlePeter wrote: On Sunday, 6 July 2014 at 19:27:38 UTC, Rainer Schuetze wrote: These object files are in the library ;-) That means manual selection, though, as incremental builds to multiple object files don't work with dmd, and single file compilation is painfully

Opinions: The Best and Worst of D (for a lecture/talk I intend to give)

2014-07-07 Thread Aerolite via Digitalmars-d-learn
Hey all, I've not posted here in a while, but I've been keeping up to speed with D's progress over the last couple of years and remain consistently impressed with the language. I'm part of a new computing society in the University of Newcastle, Australia, and am essentially known throughout

Re: Sparse Aggregate Assignment/Initialization (RAII)

2014-07-07 Thread Nordlöw
On Monday, 7 July 2014 at 21:50:22 UTC, Justin Whear wrote: Copy and paste gone astray; should be this link: http://dpaste.dzfl.pl/3c33ad70040f Thx!

  1   2   >