Re: Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
On Monday, 27 October 2014 at 04:34:41 UTC, Kyoji Klyden wrote: I'm against it. dub already tracks down libraries for you if need them, and dub already calls dmd for you. So all this seems like to me is calling dmd on the command line would just essentially be calling dub. I much rather have a c

Re: function pointer bug?

2014-10-26 Thread Kagamin via Digitalmars-d
Looks like &T[0] tries to take delegate to instanceMethod, hence complains about this type.

Re: Dub integrated into the compiler?

2014-10-26 Thread Kyoji Klyden via Digitalmars-d
On Monday, 27 October 2014 at 02:33:18 UTC, Tofu Ninja wrote: I don't think this is a new idea but it would be pretty awesome. So the idea is that the compiler could check dub for libraries that it can't find and automatically download and integrate them. It would essentially make all of dub s

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 03:55:50 + Tofu Ninja via Digitalmars-d wrote: > I have brought up the idea of executing external exe's at compile > time and capturing the output a few times before. Specifically > for the use you just mentioned. But every time I suggest it, it > gets shot down with co

Re: Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
On Monday, 27 October 2014 at 03:42:08 UTC, ketmar via Digitalmars-d wrote: i'm dreaming about having this as CTFE interface. one, for example, could write special module like 'core.import_resolver', DMD will load and parse it when it encounters missing import, and then evaluate some of it's we

Re: Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
On Monday, 27 October 2014 at 03:24:47 UTC, Ola Fosheim Grøstad wrote: That's ok for a personal user account, but not for a work account IMO. Then again, I prefer to fetch directly from repos manually and only use dub-like features for languages that run in a VM. What I am saying is that unl

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 03:34:34 + Tofu Ninja via Digitalmars-d wrote: p.s. no, really, we have a VERY powerful scripting language built into DMD itself! why we should resort to plugin libraries or so? i know that it's a mad idea. well, that's 'cause i'm a madman! ;-) signature.asc Description

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 03:34:34 + Tofu Ninja via Digitalmars-d wrote: > It probably could, I didn't even think about that. But I think > you're "universal" interface idea is a bit better and it seems > like something that could very easily be added to rdmd or dmd > itself in a jiffy. i'm drea

Re: Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
On Monday, 27 October 2014 at 02:58:15 UTC, ketmar via Digitalmars-d wrote: i think it would be better to develop something like "universal interface" for this. so we can configure compiler to exec external program which does all the things. this way it wouldn't be tied to dub. The universal

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 03:24:46 + via Digitalmars-d wrote: > Another point is that if you make fetching libraries too easy it > means bloat starts creeping in. OK for a scripting language, but > for a system level language…? D is not only system-level language. D's metaprogramming features mak

Re: Dub integrated into the compiler?

2014-10-26 Thread via Digitalmars-d
On Monday, 27 October 2014 at 03:15:45 UTC, Tofu Ninja wrote: On Monday, 27 October 2014 at 03:00:50 UTC, Ola Fosheim Grøstad Bad for security. My response to that is that any library you ever download is bad for security (including dmd and phobos). I currently run dmd on a separate user a

Re: Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
On Monday, 27 October 2014 at 03:00:50 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 October 2014 at 02:33:18 UTC, Tofu Ninja wrote: Cons: Could degrade perceived quality of stdlib if bad dub packages got in. Bad for security. My response to that is that any library you ever download is bad

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 03:00:49 + via Digitalmars-d wrote: > On Monday, 27 October 2014 at 02:33:18 UTC, Tofu Ninja wrote: > > Cons: > > Could degrade perceived quality of stdlib if bad dub packages > > got in. > > Bad for security. this feature can be made explicit opt-in with proper message

Re: Deimos library interfaces needed for these

2014-10-26 Thread Matt Soucy via Digitalmars-d
On 10/26/2014 12:21 PM, Sean Kelly wrote: > On Saturday, 25 October 2014 at 20:49:26 UTC, Walter Bright wrote: >> https://github.com/D-Programming-Deimos >> >> http://en.docsity.com/news/programming-2/free-libraries-for-everyday-work-in-popular-languages/ >> >> These appear to have C interfaces, so

Re: Dub integrated into the compiler?

2014-10-26 Thread via Digitalmars-d
On Monday, 27 October 2014 at 02:33:18 UTC, Tofu Ninja wrote: Cons: Could degrade perceived quality of stdlib if bad dub packages got in. Bad for security.

Re: Dub integrated into the compiler?

2014-10-26 Thread Rikki Cattermole via Digitalmars-d
On 27/10/2014 3:33 p.m., Tofu Ninja wrote: I don't think this is a new idea but it would be pretty awesome. So the idea is that the compiler could check dub for libraries that it can't find and automatically download and integrate them. It would essentially make all of dub seem like it was a par

Re: Dub integrated into the compiler?

2014-10-26 Thread ketmar via Digitalmars-d
i think it would be better to develop something like "universal interface" for this. so we can configure compiler to exec external program which does all the things. this way it wouldn't be tied to dub. by the way, i believe that something like this can be done with external wrapper like rdmd. dub

Re: little experiment with CTFE writef

2014-10-26 Thread ketmar via Digitalmars-d
On Mon, 27 Oct 2014 04:46:14 +0200 ketmar via Digitalmars-d wrote: p.s. i know that it can be simplified by using, for example, std.conv numeric parser instead of my homegrown one, but i just can't resist the temptation to build that hairy state machine. ;-) signature.asc Description: PGP signa

little experiment with CTFE writef

2014-10-26 Thread ketmar via Digitalmars-d
Hello. http://repo.or.cz/w/iv.d.git/blob/HEAD:/writer.d it's not full-featured or so, just experiment in CTFE and (semi)functional programming with templates. excerpt from unittests: class A { override string toString () const { return "{A}"; } } char[] n = ['x', 'y', 'z']; char[3]

Dub integrated into the compiler?

2014-10-26 Thread Tofu Ninja via Digitalmars-d
I don't think this is a new idea but it would be pretty awesome. So the idea is that the compiler could check dub for libraries that it can't find and automatically download and integrate them. It would essentially make all of dub seem like it was a part of the standard lib and make integratin

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 23:20:21 UTC, Mike wrote: Language support for this kind of thing would be nice. `@weak` attribute[1] perhaps, or `virtual`/`final` module methods anyone? `final` by default please. :) [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Function-Attributes.html#Fu

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/11/2014 03:34 PM, Robert burner Schadek wrote: As answered multiply times before, to build log hierarchies. You don't need classes for hierarchies. You need them for runtime polymorphism. We're already building complex hierarchies with Ranges, same can be done for loggers, see http:/

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/27/2014 12:45 AM, Martin Nowak wrote: If you allow to define a Logger with a LogLevel know at compile time and you statically pass the LogLevel of your message to the logging function you can elide that call. For anything else you need a runtime check. You are trying to globally define a

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/27/2014 12:45 AM, Martin Nowak wrote: but reduce it to its essence. but let's reduce

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 11:29 PM, Robert burner Schadek wrote: And I forgot to add, no better solution presented itself in one year. Well I showed one solution, but reduce it to its essence. If you allow to define a Logger with a LogLevel know at compile time and you statically pass the LogLevel of you

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 14:13:25 UTC, Maxime Chevalier-Boisvert wrote: What I'm trying to do is have some specific classes be pool-allocated though, not completely circumvent the GC. The method I proposed just overrides `new` (i.e. _d_newclass). What goes inside of `new` is up to you,

Re: Algorithms to solve programming contest problems

2014-10-26 Thread ketmar via Digitalmars-d
On Sun, 26 Oct 2014 23:42:14 +0100 Martin Nowak via Digitalmars-d wrote: > > and last, but not least: not everyone wants to switch to dub. > What's the problem? my own build tool can build alot more things than just D sources. for example, build C library with D project. and many more. it is base

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 11:27 PM, Robert burner Schadek wrote: it is not really a dependency as the one template that uses the version identifier uses them optionally. It simply doesn't work, e.g. you could not statically disable logging in phobos without recompiling phobos. cat > lib.d << CODE versio

Re: Algorithms to solve programming contest problems

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 10:11 PM, ketmar via Digitalmars-d wrote: please, no! ;-) there is alot sense of having many things in phobos. for beginners it's much easier to use just compiler and standard library, for example. it's much easier than "oh, well, compiler. and > that strange 'dub' thing. Well dm

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Robert burner Schadek via Digitalmars-d
On Sunday, 26 October 2014 at 22:12:20 UTC, Martin Nowak wrote: On 10/25/2014 06:43 PM, Dicebot wrote: Because of that I am going to start voting despite some arguments being still in process. I hope that won't cause any tension. The dependency on external version identifiers in phobos is st

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Robert burner Schadek via Digitalmars-d
On Sunday, 26 October 2014 at 22:27:55 UTC, Robert burner Schadek wrote: The dependency on external version identifiers in phobos is still a complete bummer it is not really a dependency as the one template that uses the version identifier uses them optionally. And I forgot to add, no bett

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/24/2014 02:16 PM, Robert burner Schadek wrote: On Friday, 24 October 2014 at 11:01:40 UTC, Martin Nowak wrote: On Sunday, 12 October 2014 at 12:06:44 UTC, Robert burner Schadek wrote: What's stopping an interface or class to implement a logging concept? Same as last time: Logger[], Logg

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Kagamin via Digitalmars-d
On Sunday, 26 October 2014 at 14:14:43 UTC, Maxime Chevalier-Boisvert wrote: I'll do that if I have to, but it's cleaner with an override of new as it makes it impossible to mistakenly allocate the object outside of the pool. It's also nicer if you can pass arguments to your constructor. Such

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 11:14 PM, Martin Nowak wrote: As answered multiply times before, to build log hierarchies. You can easily create classes from structs, that's what I said 2 lines below. And you could also log into a tuple of logger structs without polymorphism.

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/11/2014 03:34 PM, Robert burner Schadek wrote: - Why do loggers have to be classes? As answered multiply times before, to build log hierarchies. You can easily create classes from structs, that's what I said 2 lines below. > Add a Logger interface and a loggerObject to wrap structures

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/25/2014 06:43 PM, Dicebot wrote: Because of that I am going to start voting despite some arguments being still in process. I hope that won't cause any tension. The dependency on external version identifiers in phobos is still a complete bummer and there are still many implementation issu

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Kagamin via Digitalmars-d
Came up a while ago: http://forum.dlang.org/post/komuednbngkbeirrr...@forum.dlang.org

Re: Algorithms to solve programming contest problems

2014-10-26 Thread Dmitry Olshansky via Digitalmars-d
26-Oct-2014 04:37, Vic пишет: On Saturday, 25 October 2014 at 20:51:04 UTC, Walter Bright wrote: http://www.quora.com/What-are-the-algorithms-required-to-solve-all-problems-using-C++-in-any-competitive-coding-contest Anyone want to review these and see what we should add to Phobos? I have en

Re: Algorithms to solve programming contest problems

2014-10-26 Thread ketmar via Digitalmars-d
On Sun, 26 Oct 2014 21:58:27 +0100 Martin Nowak via Digitalmars-d wrote: > I'd actually also like to see less things being stuffed into phobos. > Now that we have dub and code.dlang.org the benefit of adding > something to phobos instead of maintaining it as a separate library > is much smaller.

Re: Who pays for all this?

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/06/2014 06:02 AM, Andrei Alexandrescu wrote: Some more couple thousands would buy us things like a web designer. Well we had some people working on a new website (http://w0rp.com:8010/) and if someone had collaborated with them to advance and integrate the work we would have a new websi

Re: Algorithms to solve programming contest problems

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 02:37 AM, Vic wrote: JRE has Oracle and 100 devs, CLR has MS and 100 dec, there are 7 for D, and it should be narrow, like LUA. It should have 7% of their platform. Majority of scared cows must be killed, the sooner leaders realize the better. I'd actually also like to see less th

Re: Fiber is better than go's goroutine?

2014-10-26 Thread Martin Nowak via Digitalmars-d
On 10/26/2014 05:12 PM, Sean Kelly wrote: We need a better Scheduler. It's something I've been planning to do, but had held off until the base Scheduler proposal was accepted. At that point I think D will be in pretty good shape. The FiberScheduler is a good start though, if you want to experim

Re: Algorithms to solve programming contest problems

2014-10-26 Thread rst256 via Digitalmars-d
On Saturday, 25 October 2014 at 20:51:04 UTC, Walter Bright wrote: http://www.quora.com/What-are-the-algorithms-required-to-solve-all-problems-using-C++-in-any-competitive-coding-contest Anyone want to review these and see what we should add to Phobos? Dear Mr. Bright. Just can not now comme

Re: Deimos library interfaces needed for these

2014-10-26 Thread Sean Kelly via Digitalmars-d
On Saturday, 25 October 2014 at 20:49:26 UTC, Walter Bright wrote: https://github.com/D-Programming-Deimos http://en.docsity.com/news/programming-2/free-libraries-for-everyday-work-in-popular-languages/ These appear to have C interfaces, so should be tractable for D without too much effort.

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Sean Kelly via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: I also wanted to ask if there was an implementation of an object pool in the standard library. If not, I'm wondering what the best way to implement this is. Is there any way to overload new and destroy? Andrei has

Re: Fiber is better than go's goroutine?

2014-10-26 Thread Sean Kelly via Digitalmars-d
On Sunday, 26 October 2014 at 15:35:28 UTC, FrankLike wrote: Many persons like go's goroutine,but how about is the same thing in D? We need a better Scheduler. It's something I've been planning to do, but had held off until the base Scheduler proposal was accepted. At that point I think D w

Fiber is better than go's goroutine?

2014-10-26 Thread FrankLike via Digitalmars-d
Many persons like go's goroutine,but how about is the same thing in D? Thank you everyone.

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Maxime Chevalier-Boisvert via Digitalmars-d
I'll do that if I have to, but it's cleaner with an override of new as it makes it impossible to mistakenly allocate the object outside of the pool. It's also nicer if you can pass arguments to your constructor. On Sunday, 26 October 2014 at 11:16:39 UTC, Damian wrote: On Sunday, 26 October 20

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Maxime Chevalier-Boisvert via Digitalmars-d
What I'm trying to do is have some specific classes be pool-allocated though, not completely circumvent the GC. On Sunday, 26 October 2014 at 08:02:25 UTC, Mike wrote: On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: I tried this on my Linux desktop, and while everything compiled and l

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Damian via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? I als

Re: std.experimental.logger formal review round 3

2014-10-26 Thread Jacob Carlborg via Digitalmars-d
On 2014-10-25 18:43, Dicebot wrote: Jut for the reference, my position on current state of things as review manager is this: I agree with some of mentioned concerns and would like to see those fixed. However, I don't think any of those are truly critical and this proposal has been hanging there

Re: Arduino and D

2014-10-26 Thread Trass3r via Digitalmars-d
my work has stalled as I try to find a way to make the experience more polished, and less like patchwork. It's a shame this went nowhere: https://issues.dlang.org/show_bug.cgi?id=12270

Re: Array bound checks removal increasing importance

2014-10-26 Thread rst256 via Digitalmars-d
On Saturday, 31 May 2014 at 23:30:41 UTC, Walter Bright wrote: On 5/31/2014 4:06 PM, "Nordlöw" wrote: I've looked around in DMD for a suitable place to add checks for this but haven't found the spot where range-check is injected. Help anyone? There isn't a suitable place. To make it work, dat

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Iain Buclaw via Digitalmars-d
On 26 Oct 2014 08:05, "Mike via Digitalmars-d" wrote: > > On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: > >> I tried this on my Linux desktop, and while everything compiled and linked without errors, it resulted in a segmentation fault at runtime. But where I have failed, others may suc

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: I tried this on my Linux desktop, and while everything compiled and linked without errors, it resulted in a segmentation fault at runtime. But where I have failed, others may succeed. I tested with LDC and GDC, but not DMD. It does wo

Re: debug = x overrides command line

2014-10-26 Thread Dicebot via Digitalmars-d
I use this pattern somewhar often: version(unittest) { debug = ExtraCostlySanityChecks; }

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 04:22:29 UTC, Mike wrote: but there may be a way to link in your implementations instead of the defaults at link time, thus giving you an "override" effect. The technique I was thinking of here is the --wrap option in the ld linker [1] (See the bottom of the pa