Re: OT: Need help with translation D-faq to other languages

2016-02-20 Thread Eugene Wissner via Digitalmars-d
On Friday, 19 February 2016 at 04:42:12 UTC, Suliman wrote: On Thursday, 18 February 2016 at 18:20:48 UTC, Eugene Wissner wrote: On Wednesday, 17 February 2016 at 18:28:08 UTC, Suliman wrote: Hello, I wrote pretty good FAQ about D on Russian language. I need help with translation it to English

Re: Need help understanding exception...

2016-02-20 Thread sanjayss via Digitalmars-d-learn
On Sunday, 21 February 2016 at 06:24:54 UTC, sanjayss wrote: On Sunday, 21 February 2016 at 01:06:16 UTC, Ali Çehreli wrote: [...] Thanks. That helps. I am making the stdin non-blocking (but reverting it back before doing the readln()) -- maybe that is causing some problems. Will follow

Re: Neovim autocompletion using deoplete

2016-02-20 Thread NVolcz via Digitalmars-d
On Saturday, 20 February 2016 at 22:04:57 UTC, landaire wrote: Demo: https://gfycat.com/ImprobableSecondhandAmericanwarmblood [1] https://github.com/landaire/deoplete-d [2] https://github.com/Shougo/deoplete.nvim This is well worthy the announcement group and reddit :-)

Re: Need help understanding exception...

2016-02-20 Thread sanjayss via Digitalmars-d-learn
On Sunday, 21 February 2016 at 01:06:16 UTC, Ali Çehreli wrote: On 02/20/2016 04:45 PM, sanjayss wrote: > [...] basically "line > [...] is saying. > [...] ioctls and > [...] this, but > [...] am doing > [...] issue). > [...] std.stdio.readlnImpl(shared(core.stdc.stdio._IO_FILE)*, ref > [...]

[Issue 15710] New: Replacement for std.utf.validate which does not throw

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15710 Issue ID: 15710 Summary: Replacement for std.utf.validate which does not throw Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

immutable class can't override opEquals, workaround?

2016-02-20 Thread SimonN via Digitalmars-d-learn
Hi, immutable class A { int i; this(int arg) { i = arg; } override bool opEquals(Object rhsObj) { auto rhs = cast (immutable(A)) rhsObj; return rhs && i == rhs.i; } } Error by dmd 2.070: ./immutclass.d(4): Error:

Re: C++ UFCS update

2016-02-20 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 21 February 2016 at 00:52:13 UTC, bitwise wrote: Am I crazy, or is this paper proposing the exact opposite of what would be needed to do chaning of ranges or extension methods? That is a good thing. I don't get how it would be useful at all to type f(x, y) and have the compiler

Tease: Empire on Pi

2016-02-20 Thread Dan Olson via Digitalmars-d
This is a tease because there is nothing you can download and I am occupied with other stuff at the moment, but... While improving LDC linux ARM support, I've been using an original Pi to debug, test the changes, and it is all in good shape. Now, back in 2012 I changed the Windows D version of

[Issue 15709] New: [Downloads] cannot install dmd using curl script

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15709 Issue ID: 15709 Summary: [Downloads] cannot install dmd using curl script Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/ OS: Linux Status:

Re: Need help understanding exception...

2016-02-20 Thread Ali Çehreli via Digitalmars-d-learn
On 02/20/2016 04:45 PM, sanjayss wrote: > I got the following exception on a line of code that is basically "line > = readln()" and need help in understanding what the exception is saying. > (I am playing around with stdio prior to this using unix ioctls and > maybe I am messing something up in

Re: C++ UFCS update

2016-02-20 Thread Era Scarecrow via Digitalmars-d
On Sunday, 21 February 2016 at 00:52:13 UTC, bitwise wrote: I don't get how it would be useful at all to type f(x, y) and have the compiler call x.f(y) for me. Why would I ever not want to just use member invocation syntax? One reason could be connecting to OO based code that's written

Re: C++ UFCS update

2016-02-20 Thread bitwise via Digitalmars-d
On Saturday, 13 February 2016 at 10:27:59 UTC, Daniel N wrote: "Abstract This is the proposed wording for a unified call syntax based on the idea that f(x,y) can invoke a member function, x.f(y), if there are no f(x,y). The inverse transformation, from x.f(y) to f(x,y) is not proposed."

Need help understanding exception...

2016-02-20 Thread sanjayss via Digitalmars-d-learn
I got the following exception on a line of code that is basically "line = readln()" and need help in understanding what the exception is saying. (I am playing around with stdio prior to this using unix ioctls and maybe I am messing something up in the process resulting in this, but

Re: Implement the "unum" representation in D ?

2016-02-20 Thread Nick B via Digitalmars-d
On Saturday, 20 February 2016 at 23:25:40 UTC, Nick B wrote: On Wednesday, 17 February 2016 at 16:35:41 UTC, jmh530 wrote: On Wednesday, 17 February 2016 at 08:11:21 UTC, Nick B wrote: Having just looked at the slides again, I believe this will break compatibility with std.math, (for

Re: Implement the "unum" representation in D ?

2016-02-20 Thread Nick B via Digitalmars-d
On Wednesday, 17 February 2016 at 16:35:41 UTC, jmh530 wrote: On Wednesday, 17 February 2016 at 08:11:21 UTC, Nick B wrote: Wrt phobos, I would just recommend that whatever unum library gets eventually written has a companion with the equivalent of the functions from std.math. Having

Re: [OT] Some neat ideas from the Kotlin language

2016-02-20 Thread Xinok via Digitalmars-d
On Saturday, 20 February 2016 at 09:40:40 UTC, Tobias Müller wrote: ... It's not much more verbose but more explicit. Changing the type of a variable based on static analysis is just advanced obfuscation. It hurts readability and the gain is questionable. At least it only works for nullable

Neovim autocompletion using deoplete

2016-02-20 Thread landaire via Digitalmars-d
I wanted to drop by with a link to something I've been working on for a few days: deoplete-d [1]. If anyone uses Neovim with deoplete [2] this plugin will add asynchronous autocompletion for D utilizing DCD. It's pretty basic right now but I've found it better than using dutyl. Issues are

Re: Normal distribution

2016-02-20 Thread Timon Gehr via Digitalmars-d
On 20.02.2016 15:01, Andrei Alexandrescu wrote: Do we have a good quality converter of uniform numbers to Gaussian-distributed numbers around? -- Andrei I don't know about quality, but the following is in Phobos: https://dlang.org/phobos/std_mathspecial.html#.normalDistributionInverse

Re: std.xml2 (collecting features)

2016-02-20 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 20 February 2016 at 19:08:25 UTC, crimaniak wrote: - the ability to read documents with missing or incorrectly specified encoding - additional feature: relaxed mode for reading html and broken XML documents fyi, my dom.d can do those, I use it for web scraping where there's all

Re: std.xml2 (collecting features)

2016-02-20 Thread crimaniak via Digitalmars-d
On Sunday, 3 May 2015 at 17:39:48 UTC, Robert burner Schadek wrote: Please post you feature requests... - the ability to read documents with missing or incorrectly specified encoding - additional feature: relaxed mode for reading html and broken XML documents Some time ago I worked for

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread cym13 via Digitalmars-d-learn
On Saturday, 20 February 2016 at 17:22:49 UTC, Mike Parker wrote: On Saturday, 20 February 2016 at 17:20:16 UTC, Mike Parker wrote: getValue(); It's not unusual to discard the return value when calling a function. Though a getter isn't a good example of this, of course. Oops. I somehow

Re: [unsigned] No, you can't address full address space in D

2016-02-20 Thread Chris Wright via Digitalmars-d
On Sat, 20 Feb 2016 18:07:59 +, Steven Schveighoffer wrote: > On Saturday, 20 February 2016 at 17:21:42 UTC, Chris Wright wrote: >> >> That's still doomed to failure. You're not leaving space for the stack >> (which has preallocated address space) or application binary (which is >> memory

Re: [unsigned] No, you can't address full address space in D

2016-02-20 Thread Steven Schveighoffer via Digitalmars-d
On Saturday, 20 February 2016 at 17:21:42 UTC, Chris Wright wrote: That's still doomed to failure. You're not leaving space for the stack (which has preallocated address space) or application binary (which is memory mapped from the file and takes up address space). You're using the garbage

RefCounted status

2016-02-20 Thread Erik Smith via Digitalmars-d
My understanding is that using RefCounted is the recommended approach for implementing value types involving shared resources that require deterministic lifetimes. However, there has historically been a race condition involving RefCounted destruction and GC. Is there a solution for this?

Re: Status icon on Linux

2016-02-20 Thread Gerald via Digitalmars-d-learn
On Saturday, 20 February 2016 at 11:36:11 UTC, Mike Wey wrote: The documentation states we should use notifications, that means i'll probably need to add libnotify bindings to GtkD. Though sending notifications using DBus is also possible. (https://developer.gnome.org/notification-spec/)

Re: Qt's MOC getting replicated in D for Calypso

2016-02-20 Thread Nicolas F. via Digitalmars-d-announce
This is really cool and an interesting project, though I've got one concern: How will this fit in with the rest of the C++ efforts done upstream? As I see it the goal here is to spearhead a working Qt <-> D interaction, but how would this be used in production? Would Calypso simply be run to

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 20 February 2016 at 17:20:16 UTC, Mike Parker wrote: getValue(); It's not unusual to discard the return value when calling a function. Though a getter isn't a good example of this, of course. Oops. I somehow had it in my head that your example function was getValue(), rather

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 20 February 2016 at 15:47:27 UTC, Jeremy DeHaan wrote: With the case of auto of course there is ambiguity, you don't know which one to pick. In my example there should have been no ambiguity at all as only one of the overloads would actually compile. That is what confuses me and

Re: [unsigned] No, you can't address full address space in D

2016-02-20 Thread rsw0x via Digitalmars-d
On Saturday, 20 February 2016 at 17:04:11 UTC, Kagamin wrote: It doesn't even compile: http://dpaste.dzfl.pl/ec0f5183e42e This looks like it's a limit purely on the interface for allocating arrays from the GC. i.e, ubyte* ptr; ubyte arr = ptr[0 .. size_t.max]; compiles just fine

Re: [unsigned] No, you can't address full address space in D

2016-02-20 Thread Chris Wright via Digitalmars-d
On Sat, 20 Feb 2016 17:04:11 +, Kagamin wrote: > It doesn't even compile: http://dpaste.dzfl.pl/ec0f5183e42e Check the error. Add a `cast(size_t)` in there. Try again. That's still doomed to failure. You're not leaving space for the stack (which has preallocated address space) or

Re: What happens if memory allocation fails?

2016-02-20 Thread Chris Wright via Digitalmars-d-learn
On Sat, 20 Feb 2016 16:58:02 +, Adam D. Ruppe wrote: > On Saturday, 20 February 2016 at 14:21:28 UTC, tcak wrote: >> What happens if memory allocation fails with "new" keyword? > > Be aware that memory allocation might never actually fail. It really > depends on the operating system. > >

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Chris Wright via Digitalmars-d-learn
On Sat, 20 Feb 2016 15:47:27 +, Jeremy DeHaan wrote: > If there are multiple overloads that have the same number of parameters, > a very simple addition to the rules of function overloading would be > "does it compile?" If only one overload compiles, use it. If more than > one compile, there

[unsigned] No, you can't address full address space in D

2016-02-20 Thread Kagamin via Digitalmars-d
It doesn't even compile: http://dpaste.dzfl.pl/ec0f5183e42e

Re: What happens if memory allocation fails?

2016-02-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 20 February 2016 at 14:21:28 UTC, tcak wrote: What happens if memory allocation fails with "new" keyword? Be aware that memory allocation might never actually fail. It really depends on the operating system. But if it did fail, it would throw OutOfMemoryError

Re: What happens if memory allocation fails?

2016-02-20 Thread Kagamin via Digitalmars-d-learn
Currently it crashes: https://issues.dlang.org/show_bug.cgi?id=1180

[Issue 1180] the GC failes to handle large allocation requests propperly

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1180 Sobirari Muhomori changed: What|Removed |Added Severity|normal |regression --

[Issue 1180] the GC failes to handle large allocation requests propperly

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1180 Sobirari Muhomori changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Normal distribution

2016-02-20 Thread John Colvin via Digitalmars-d
On Saturday, 20 February 2016 at 14:01:22 UTC, Andrei Alexandrescu wrote: Do we have a good quality converter of uniform numbers to Gaussian-distributed numbers around? -- Andrei There is this, from years ago: https://github.com/DlangScience/dstats/blob/master/source/dstats/random.d#L266 and

[Issue 7349] assert(0) in class destructor - bad (or incorrect) error

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7349 Sobirari Muhomori changed: What|Removed |Added CC|

[Issue 15705] Invalid memory operation during array growth (@safe code)

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15705 Sobirari Muhomori changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 2830] private attribute doesn't work for structs/unions/classes

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2830 Issue 2830 depends on issue 313, which changed state. Issue 313 Summary: [module] Fully qualified names bypass private imports https://issues.dlang.org/show_bug.cgi?id=313 What|Removed |Added

[Issue 313] [module] Fully qualified names bypass private imports

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=313 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 3108] [meta] Protection

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3108 Issue 3108 depends on issue 313, which changed state. Issue 313 Summary: [module] Fully qualified names bypass private imports https://issues.dlang.org/show_bug.cgi?id=313 What|Removed |Added

[Issue 314] [module] Static, renamed, and selective imports are always public

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314 Issue 314 depends on issue 313, which changed state. Issue 313 Summary: [module] Fully qualified names bypass private imports https://issues.dlang.org/show_bug.cgi?id=313 What|Removed |Added

[Issue 313] [module] Fully qualified names bypass private imports

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=313 --- Comment #20 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ea25aad26d11951ccbcd2a57f8c3add968f32434 fix Issue 313 - Fully

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Jeremy DeHaan via Digitalmars-d-learn
On Saturday, 20 February 2016 at 12:29:21 UTC, Jonathan M Davis wrote: On Saturday, February 20, 2016 03:24:45 Jeremy DeHaan via Digitalmars-d-learn wrote: snip I'm unaware of any language that takes the return type into account when overloading. The type the expression test.thing() has to

Re: Normal distribution

2016-02-20 Thread Guillaume Piolat via Digitalmars-d
On Saturday, 20 February 2016 at 14:01:22 UTC, Andrei Alexandrescu wrote: Do we have a good quality converter of uniform numbers to Gaussian-distributed numbers around? -- Andrei Not sure if good quality but: https://d-gamedev-team.github.io/gfm/gfm.math.simplerng.html

Re: Alternate databases

2016-02-20 Thread yawniek via Digitalmars-d-learn
On Saturday, 20 February 2016 at 13:09:53 UTC, Andrew Edwards wrote: I'm searching for client drivers for the following databases. Are the any available? https://rethinkdb.com/docs/install-drivers/ http://docs.basho.com/riak/latest/dev/references/client-implementation/ Thanks, Andrew none

Re: std.allocator issues

2016-02-20 Thread Andrei Alexandrescu via Digitalmars-d
On 02/20/2016 10:00 AM, Steven Schveighoffer wrote: I found some bugs in GCAllocator.expand, will submit a PR. Thx! -- Andrei

Re: Normal distribution

2016-02-20 Thread Leandro Motta Barros via Digitalmars-d
Maybe not good quality, but I like this one for my ludic purposes: https://github.com/lmbarros/sbxs_dlang/blob/master/src/sbxs/rand/rng.d#L283 It is an implementation of an approximation algorithm that used to be described here: http://home.online.no/~pjacklam/notes/invnorm/ But appears

Re: std.allocator issues

2016-02-20 Thread Steven Schveighoffer via Digitalmars-d
On 2/20/16 8:47 AM, Andrei Alexandrescu wrote: On 02/20/2016 12:39 AM, Steven Schveighoffer wrote: Given that there is "goodAllocSize", this seems reasonable. But for ease-of-use (and code efficiency), it may be more straightforward to allow returning more data than requested (perhaps through

Re: Google Summer of Code 2016 Only A Few Hours Left

2016-02-20 Thread jmh530 via Digitalmars-d-announce
On Saturday, 20 February 2016 at 13:31:03 UTC, bachmeier wrote: On Friday, 19 February 2016 at 21:50:43 UTC, jmh530 wrote: On Friday, 19 February 2016 at 21:10:45 UTC, Dave wrote: Alternately, you could try calling pystan or rstan from D. If you make any progress on these approaches, I would

Re: Transposing a static array

2016-02-20 Thread maik klein via Digitalmars-d-learn
On Saturday, 20 February 2016 at 03:02:11 UTC, cym13 wrote: On Saturday, 20 February 2016 at 02:26:56 UTC, maik klein wrote: On Saturday, 20 February 2016 at 02:22:12 UTC, Ali Çehreli wrote: [...] Your "Method B" is how I did it too but how do I convert it back to a static array of

Re: problem with std.range.choose()

2016-02-20 Thread Ali Çehreli via Digitalmars-d-learn
On 02/20/2016 02:18 AM, Johannes Loher wrote: On Wednesday, 17 February 2016 at 01:35:34 UTC, Johannes Loher wrote: Hello, I have a problem with using std.range.choose(): When using std.range.choose() on a range R, for which hasElaborateCopyConstructor!R is true, then a postblit for the result

Re: [OT] Some neat ideas from the Kotlin language

2016-02-20 Thread Steven Schveighoffer via Digitalmars-d
On 2/20/16 5:04 AM, Daniel N wrote: On Friday, 19 February 2016 at 21:30:37 UTC, Yuxuan Shui wrote: I think the same applies to Swift. But I think you're supposed to use it like this: if let a = var { // a is no unwrapped } But you would need to give the unwrapped value a new name.

[Issue 15708] New: std.range.choose assumes hasElaborateCopyConstructor means "has __postblit"

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15708 Issue ID: 15708 Summary: std.range.choose assumes hasElaborateCopyConstructor means "has __postblit" Product: D Version: D2 Hardware: x86_64 OS: Linux

What happens if memory allocation fails?

2016-02-20 Thread tcak via Digitalmars-d-learn
This is not easy to try. So I need ask, maybe someone has experienced. What happens if memory allocation fails with "new" keyword? Does it throw an exception? throwable? All I want is to be able to catch OutOfMemory event, and take other steps based on that.

Re: Normal distribution

2016-02-20 Thread Edwin van Leeuwen via Digitalmars-d
On Saturday, 20 February 2016 at 14:01:22 UTC, Andrei Alexandrescu wrote: Do we have a good quality converter of uniform numbers to Gaussian-distributed numbers around? -- Andrei There is one in dstats: https://github.com/DlangScience/dstats/blob/master/source/dstats/random.d#L266

Normal distribution

2016-02-20 Thread Andrei Alexandrescu via Digitalmars-d
Do we have a good quality converter of uniform numbers to Gaussian-distributed numbers around? -- Andrei

Re: std.allocator issues

2016-02-20 Thread Andrei Alexandrescu via Digitalmars-d
On 02/20/2016 12:39 AM, Steven Schveighoffer wrote: Given that there is "goodAllocSize", this seems reasonable. But for ease-of-use (and code efficiency), it may be more straightforward to allow returning more data than requested (perhaps through another interface function? allocateAtLeast?) and

Re: Running DMD tests on Windows / build requirements

2016-02-20 Thread Martin Krejcirik via Digitalmars-d
Dne 20. 2. 2016 v 13:40 kinke napsal(a): > You may want to have a look at > http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC#Running_the_dmd-testsuite_tests > for some tools prerequisites. I have gnu make, but it doesn't work: D:\prac4\dmd\test>make -f Makefile Creating

Re: Google Summer of Code 2016 Only A Few Hours Left

2016-02-20 Thread bachmeier via Digitalmars-d-announce
On Friday, 19 February 2016 at 21:50:43 UTC, jmh530 wrote: On Friday, 19 February 2016 at 21:10:45 UTC, Dave wrote: Alternately, you could try calling pystan or rstan from D. If you make any progress on these approaches, I would be interested. If it has an R interface, it also has a D

Alternate databases

2016-02-20 Thread Andrew Edwards via Digitalmars-d-learn
I'm searching for client drivers for the following databases. Are the any available? https://rethinkdb.com/docs/install-drivers/ http://docs.basho.com/riak/latest/dev/references/client-implementation/ Thanks, Andrew

[Issue 15707] New: Extend aggregate TypeInfo with information about `alias this`

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15707 Issue ID: 15707 Summary: Extend aggregate TypeInfo with information about `alias this` Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: 111

2016-02-20 Thread Ivan Kazmenko via Digitalmars-d-learn
On Saturday, 20 February 2016 at 04:15:50 UTC, Lisa wrote: module main; import std.stdio; import std.math; int main() { int A, B, C; writef("A = "); readf("%lf", %A); writef("B = "); readf("%lf", %B); writef("C1= "); readf("%lf", %C);

Re: Running DMD tests on Windows / build requirements

2016-02-20 Thread kinke via Digitalmars-d
On Saturday, 20 February 2016 at 00:25:12 UTC, Martin Krejcirik wrote: How do I run DMD tests on Windows ? I'm not able to, even with gmake. You may want to have a look at http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC#Running_the_dmd-testsuite_tests for some tools

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, February 20, 2016 03:24:45 Jeremy DeHaan via Digitalmars-d-learn wrote: > module main; > > struct ThingOne > { > int thing = 1; > } > > struct ThingTwo > { > float thing = 2; > } > > > struct Test > { >ThingOne thing() > { >return ThingOne(); > } > >

Re: Installing DUB on OSX

2016-02-20 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-02-20 04:21, Joel wrote: How do you do symbolic links? ln -s Replace and with the appropriate paths. -- /Jacob Carlborg

Re: Status icon on Linux

2016-02-20 Thread Mike Wey via Digitalmars-d-learn
On 02/20/2016 06:13 AM, Chris Wright wrote: I want a status icon for a Linux application. gtk.StatusIcon notes that it's deprecated (and doesn't work on MATE 1.8.2). What should I be using? The GTK developers have decided that we don't need no status icon, it would presumably mess up there

Re: problem with std.range.choose()

2016-02-20 Thread Johannes Loher via Digitalmars-d-learn
On Wednesday, 17 February 2016 at 01:35:34 UTC, Johannes Loher wrote: Hello, I have a problem with using std.range.choose(): When using std.range.choose() on a range R, for which hasElaborateCopyConstructor!R is true, then a postblit for the result of std.range.choose() is created, which

Re: [OT] Some neat ideas from the Kotlin language

2016-02-20 Thread Daniel N via Digitalmars-d
On Friday, 19 February 2016 at 21:30:37 UTC, Yuxuan Shui wrote: I think the same applies to Swift. But I think you're supposed to use it like this: if let a = var { // a is no unwrapped } But you would need to give the unwrapped value a new name. Swift also has guard, which solves this

Re: [OT] Some neat ideas from the Kotlin language

2016-02-20 Thread rsw0x via Digitalmars-d
On Saturday, 20 February 2016 at 09:40:40 UTC, Tobias Müller wrote: Yuxuan Shui wrote: [...] In Rust that would be: let var : Option = ...; if let Some(var) = var { // You can use var here } It works for every enum (= tagged union), not just Option Swift

Re: [OT] Some neat ideas from the Kotlin language

2016-02-20 Thread Tobias Müller via Digitalmars-d
Yuxuan Shui wrote: > Just come across Kotlin today, and found some interesting ideas > skimming through its tutorial: > > 1) Null check > > Kotlin has Optional types, suffixed with a '?'. Like 'Int?', same > as in Swift. But instead of explicitly unwrapping them (e.g. var!

Re: Head Const

2016-02-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, 19 February 2016 at 21:53:16 UTC, Walter Bright wrote: On 2/19/2016 4:38 AM, Jonathan M Davis wrote: Yes, as long as you have the source code, finding @trusted violations is _way_ easier in D than it is in C++, but the fact that it's possible to cast away const and mutate still

Re: C++ UFCS update

2016-02-20 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 19 February 2016 at 16:42:36 UTC, David Nadlinger wrote: On Friday, 19 February 2016 at 16:18:12 UTC, Dejan Lekic wrote: I have to go through each piece separated by dots to understand what it is... Let me play devil's advocate here: How would this be any different if UFCS were

Re: Vulkan bindings

2016-02-20 Thread ParticlePeter via Digitalmars-d
On Tuesday, 16 February 2016 at 19:01:58 UTC, Satoshi wrote: Hello Vulkan API 1.0 is here and I just wrapped it into D. https://github.com/Rikarin/VulkanizeD Have fun! I think your usage of const pointer is wrong. E.g. c const char* maps to d const(char)* etc.

Re: Vulkan bindings

2016-02-20 Thread ParticlePeter via Digitalmars-d
On Friday, 19 February 2016 at 01:49:12 UTC, Alex Parrill wrote: On Thursday, 18 February 2016 at 03:39:30 UTC, Kapps wrote: On Thursday, 18 February 2016 at 03:38:42 UTC, Kapps wrote: This is what I did with OpenGL for my own bindings. It had some nice benefits like having the documentation