Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Rory McGuire via Digitalmars-d-announce
On Tue, Sep 13, 2016 at 2:29 PM, Vadim Lopatin via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote: > >> Good job, but why do people still use tinypic in 2016, when things like >> imgur exist that are a 1000 times

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote: Good job, but why do people still use tinypic in 2016, when things like imgur exist that are a 1000 times faster to use, no dirty ads and images won't magically be taken down someday. Thanks. I just googled tinypic with "free image

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote: Good job, but why do people still use tinypic in 2016, when things like imgur exist that are a 1000 times faster to use, no dirty ads and images won't magically be taken down someday. Screenshots on imgur: http://imgur.com/a/eaRiT

Re: colour lib needs reviewers

2016-09-13 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: In my lib, colours are colours. If you have `BGR8 x` and `RGB8 y`, and add them, you don't get x.b+y.r, x.g+y.g, x.r+y.b... that's not a colour operation, that's an element-wise vector operation. I think swizzling is way overrated,

Re: colour lib needs reviewers

2016-09-13 Thread Guillaume Piolat via Digitalmars-d
On Monday, 12 September 2016 at 22:51:14 UTC, Walter Bright wrote: My last comment is what can I do with a color library that would not require some additional library? Having correct conversions. Converting sRGB to linear RGB is typically not done correctly, pow isn't enough. It also

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Bauss via Digitalmars-d-announce
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote: Some screenshots (from dlangui example1 app): http://i63.tinypic.com/2wn1bg9.png http://i66.tinypic.com/142yctx.png http://i64.tinypic.com/snlc08.png http://i64.tinypic.com/2n16vcw.png Good job, but why do people still

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 13 September 2016 at 20:19, ketmar via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 02:50:02 UTC, Manu wrote: >> >> std.conv.to seems to 'just work' for color type conversion. >> I'd like to support string -> color conversion via std.conv.to; ie: >>

[Issue 16491] New: Forward referencing and static/shared static module constructors break initialisation

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16491 Issue ID: 16491 Summary: Forward referencing and static/shared static module constructors break initialisation Product: D Version: D2 Hardware: x86_64 OS:

Re: iPhone vs Android

2016-09-13 Thread Shachar Shemesh via Digitalmars-d
On 13/09/16 02:21, deadalnix wrote: RC itself is not panacea, it doesn't work well with exceptions, generate a huge amount of code bloat, I will need explanation to those two. Assuming we have RAII, why doesn't RC work well with exceptions? Also, please note that explicit memory management

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 11:27:19 UTC, Stefan Koch wrote: On Tuesday, 13 September 2016 at 07:51:06 UTC, Vadim Lopatin wrote: On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote: [...] Screenshot of DlangIDE working in console: http://i68.tinypic.com/2hrmkup.png Looks

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Stefan Koch via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 07:51:06 UTC, Vadim Lopatin wrote: On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote: [...] Screenshot of DlangIDE working in console: http://i68.tinypic.com/2hrmkup.png Looks great! can you fix dlang-ui to build on XP ?

Re: Fiber Concurrency Showcase

2016-09-13 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana wrote: Check this: http://ddili.org/ders/d.en/fibers.html Further, are we forced to use the GC for Fiber allocation or can a sub-class of Fiber implement its own allocation strategy?

[Issue 16460] [REG2.071] ICE for package visibility check in function literal

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16460 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16460] [REG2.071] ICE for package visibility check in function literal

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16460 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in

Re: iPhone vs Android

2016-09-13 Thread Stefan Koch via Digitalmars-d
On Tuesday, 13 September 2016 at 10:58:50 UTC, Walter Bright wrote: Interestingly, Warp (the C preprocessor I developed in D) used a hybrid approach. The performance critical code was all hand-managed, while the rest was GC'd. Manual Memory management is key for performance oriented code.

Re: Fiber Concurrency Showcase

2016-09-13 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana wrote: Check this: http://ddili.org/ders/d.en/fibers.html Thanks! I would like to make use of message passing between Fibers aswell. Any code example for this? Specifically: Should the call to `new Fiber()` take all the TId's of

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/12/2016 4:21 PM, deadalnix wrote: I stay convinced that an hybrid approach is inevitable and am surprised why few are going there (hello PHP, here is a thing you get right). Interestingly, Warp (the C preprocessor I developed in D) used a hybrid approach. The performance critical code

Re: Fiber Concurrency Showcase

2016-09-13 Thread Marc Schütz via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana wrote: On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote: I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for

Re: Fiber Concurrency Showcase

2016-09-13 Thread Marc Schütz via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote: I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for massive concurrency. Could anybody show me such a code example or link to a

[Issue 16487] Add function to obtain the available disk space

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16487 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #6 from

Re: colour lib needs reviewers

2016-09-13 Thread Andrea Fontana via Digitalmars-d
On Monday, 12 September 2016 at 22:51:14 UTC, Walter Bright wrote: My last comment is what can I do with a color library that would not require some additional library? I think it's easy to do some image processing using netbpm [1] as format. Reading/Writing images doesn't require any

Re: colour lib needs reviewers

2016-09-13 Thread ketmar via Digitalmars-d
On Tuesday, 13 September 2016 at 02:50:02 UTC, Manu wrote: std.conv.to seems to 'just work' for color type conversion. I'd like to support string -> color conversion via std.conv.to; ie: auto c = "#00".to!RGB8; Is there a simple way to do that? yes. just define a ctor that accepts

Re: iPhone vs Android

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/13/16 3:53 AM, Kagamin wrote: The rule of thumb is that for efficient operation an advanced GC consumes twice the used memory. Do you have a citation? The number I know is 3x from Emery Berger's (old) work. -- Andrei

Re: colour lib needs reviewers

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/12/16 10:50 PM, Manu via Digitalmars-d wrote: std.conv.to seems to 'just work' for color type conversion. I'd like to support string -> color conversion via std.conv.to; ie: auto c = "#00".to!RGB8; Is there a simple way to do that? That was the purpose of toImpl, which I recall has

Re: Fiber Concurrency Showcase

2016-09-13 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote: I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for massive concurrency. Could anybody show me such a code example or link to a

Re: iPhone vs Android

2016-09-13 Thread angel via Digitalmars-d
I think the conclusions about iOS vs. Android OS-level memory collection are not applicable to D GC discussion. An OS collects all the memory pages allocated for a process upon exit - no heap scan, no RC. It more resembles a one huge free() call. The discussion is mainly about eager vs.

Fiber Concurrency Showcase

2016-09-13 Thread Nordlöw via Digitalmars-d-learn
I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for massive concurrency. Could anybody show me such a code example or link to a more descriptive tutorial?

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 13 September 2016 at 17:47, John Colvin via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: >>> >>> Also can I swizzle channels directly? >> >> >> I could add something like: >> auto brg = c.swizzle!"brg"; >> >> The result would

[Issue 16487] Add function to obtain the available disk space

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16487 --- Comment #5 from Johan Engelen --- (In reply to b2.temp from comment #4) > 2. returns -1 on failure. ulong.max: No way !!! The return type is _unsigned_. Throwing an exception is also a possibility. --

Re: Binary heap: obtain a _reference_ to the front of the heap

2016-09-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 08:19:04 UTC, Johan Engelen wrote: In the binary heap documentation, I read that `BinaryHeap.front()` "Returns a copy of the front of the heap". [1] Is there no function to access the front of the heap without a copy? (micro-optimization) Thanks, Johan

Re: iPhone vs Android

2016-09-13 Thread Paulo Pinto via Digitalmars-d
On Monday, 12 September 2016 at 22:57:23 UTC, Andrei Alexandrescu wrote: An interesting article written for laypeople: http://www.theverge.com/2016/9/12/12886058/iphone-7-specs-competition One quote that may be of relevance to us: "As to the iPhone’s memory, this is more of a philosophical

Phobos request: function to get the available disk space

2016-09-13 Thread Johan Engelen via Digitalmars-d
Hope I can motivated someone to work on adding a function to Phobos that returns the available disk space (on a given path): https://issues.dlang.org/show_bug.cgi?id=16487 (I needed this for file cache management in LDC, and was surprised I had to write my own.) I think it'd be a valuable

Binary heap: obtain a _reference_ to the front of the heap

2016-09-13 Thread Johan Engelen via Digitalmars-d-learn
In the binary heap documentation, I read that `BinaryHeap.front()` "Returns a copy of the front of the heap". [1] Is there no function to access the front of the heap without a copy? (micro-optimization) Thanks, Johan [1]

[Issue 16487] Add function to obtain the available disk space

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16487 --- Comment #3 from Johan Engelen --- Version that actually compiles on Windows too: ``` // Returns ulong.max when the available disk space could not be determined. ulong getAvailableDiskSpace(string path) { import

Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote: Hello! Now it's possible to build DlangUI apps to run in console (Linux, Windows). When DlangUI is built with version=USE_CONSOLE (dub subconfiguration "console" for dlangui library) - it works in terminal. Such feature may

Re: iPhone vs Android

2016-09-13 Thread Kagamin via Digitalmars-d
On Monday, 12 September 2016 at 22:57:23 UTC, Andrei Alexandrescu wrote: It follows that the latter needs more memory for the same performance, and is more jerky in behavior than the former. Wondering to what extent this is true. The rule of thumb is that for efficient operation an advanced

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like: auto brg = c.swizzle!"brg"; The result would be strongly typed to the new arrangement. Perfect use-case for opDispatch like in gl3n.

Re: pure functions

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 03:33:04 Ivy Encarnacion via Digitalmars-d- learn wrote: > Can pure functions throw exceptions on its arguments? Also, how > can it perform impure operations? Yes, as long as the exception's constructor is pure, a pure function can throw an exception. However,

<    1   2