Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Dmitry Olshansky
23-Jan-2014 23:04, Walter Bright пишет: On 1/23/2014 9:38 AM, Andrei Alexandrescu wrote: Congratulations to Dmitry! (His github ID is blackwhale.) Congrats, too! Thanks, guys! BTW, Dmitry, can you use Dmitry for your github ID, too? I often lose track of which handle goes with which

Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 10:59:47 UTC, Dmitry Olshansky wrote: Congratulations! P.S. In seriousness I hardly see a problem of tracking handles - one click on a handle and you have the user profile with name/surname in big gray letters. You're willing to let a click stand between

Re: So, You Want To Write Your Own Programming Language?

2014-01-24 Thread Chris
On Thursday, 23 January 2014 at 20:11:15 UTC, Nick Sabalausky wrote: On 1/23/2014 5:24 AM, Chris wrote: I find it extremely interesting how the human mind (not just language) is reflected in programming languages. They way I usually see it is that the human mind HAS to be reflected in

Re: So, You Want To Write Your Own Programming Language?

2014-01-24 Thread Mike James
On Thursday, 23 January 2014 at 10:24:23 UTC, Chris wrote: On Wednesday, 22 January 2014 at 18:46:06 UTC, Walter Bright wrote: On 1/22/2014 3:40 AM, Chris wrote: Syntax is getting simplified due to the fact that the listener knows what we mean, e.g. buy one get one free. I wonder to what

Re: dmd 2.065 beta 1 #2

2014-01-24 Thread Martin Nowak
On 01/24/2014 12:24 AM, Brad Anderson wrote: The NSIS script already requires a bit of manual editing (basically just updating the version number). I think I can probably figure out a way to do away with that though (NSIS can pull definitions from a separate file and the NSIS command line

Re: dmd 2.065 beta 1 #2

2014-01-24 Thread Martin Nowak
On 01/23/2014 01:44 PM, Martin Nowak wrote: 1) The link for nsisunz.zip per readme.txt does not work. I wrote the author of the plugin. He no longer has posses this file. @Brad Anderson, maybe you or Walter still have a download laying around?

Re: dmd 2.065 beta 1 #2

2014-01-24 Thread Andrew Edwards
On 1/24/14, 9:17 AM, Martin Nowak wrote: On 01/23/2014 01:44 PM, Martin Nowak wrote: 1) The link for nsisunz.zip per readme.txt does not work. I wrote the author of the plugin. He no longer has posses this file. @Brad Anderson, maybe you or Walter still have a download laying around?

Re: dmd 2.065 beta 1 #2

2014-01-24 Thread Dejan Lekic
Could you please make a 2.065.b1 tag on the GitHub as well so we finally start using the release naming scheme you mentioned in the previous beta-release thread here on the NG?

Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Dejan Lekic
On Thursday, 23 January 2014 at 17:38:04 UTC, Andrei Alexandrescu wrote: Congratulations to Dmitry! (His github ID is blackwhale.) Andrei Yeah, Dmitry deserves this, IMHO. :) Congratulations!

∅MQD, a ∅MQ wrapper for D

2014-01-24 Thread Lars T. Kyllingstad
∅MQD is a D library that wraps the low-level C API of the ∅MQ messaging framework. It is a rather thin wrapper that maps closely to the C API, while making it safer, easier and more pleasant to use. The API is designed to feel familiar to existing ∅MQ users, yet natural to D users. For

Re: So, You Want To Write Your Own Programming Language?

2014-01-24 Thread Steve Teale
On Wednesday, 22 January 2014 at 04:29:05 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/1vtm2l/so_you_want_to_write_your_own_language_dr_dobbs/ Nice Walter. You're almost as down-to-earth as me. I love what you have achieved.

Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Steve Teale
On Thursday, 23 January 2014 at 17:38:04 UTC, Andrei Alexandrescu wrote: Congratulations to Dmitry! (His github ID is blackwhale.) Andrei Can't you go to prison for that?

Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Walter Bright
On 1/24/2014 2:59 AM, Dmitry Olshansky wrote: Well it would be bold of me to claim Dmitry like I'm the only one on github :) I will consider DmitryOlshansky but it's just too long for my tastes. Another reason to use your real name is so that your professional work becomes connected to your

Re: So, You Want To Write Your Own Programming Language?

2014-01-24 Thread Walter Bright
On 1/24/2014 9:56 AM, Steve Teale wrote: On Wednesday, 22 January 2014 at 04:29:05 UTC, Walter Bright wrote: http://www.reddit.com/r/programming/comments/1vtm2l/so_you_want_to_write_your_own_language_dr_dobbs/ Nice Walter. You're almost as down-to-earth as me. I love what you have achieved.

Re: ∅MQD, a ∅MQ wrapper for D

2014-01-24 Thread Justin Whear
On Fri, 24 Jan 2014 17:45:44 +, Lars T. Kyllingstad wrote: ∅MQD is a D library that wraps the low-level C API of the ∅MQ messaging framework. It is a rather thin wrapper that maps closely to the C API, while making it safer, easier and more pleasant to use. The API is designed to feel

Re: ∅MQD, a ∅MQ wrapper for D

2014-01-24 Thread Lars T. Kyllingstad
On Friday, 24 January 2014 at 18:59:54 UTC, Justin Whear wrote: Nicely done. It looks like you haven't wrapped the poll functionality at all, something that I use in most of my 0MQ programs. Thanks! I'm glad that you mention zmq_poll(); I've been wondering how to deal with that. It's

Re: ∅MQD, a ∅MQ wrapper for D

2014-01-24 Thread Justin Whear
On Fri, 24 Jan 2014 19:11:56 +, Lars T. Kyllingstad wrote: On Friday, 24 January 2014 at 18:59:54 UTC, Justin Whear wrote: Nicely done. It looks like you haven't wrapped the poll functionality at all, something that I use in most of my 0MQ programs. Thanks! I'm glad that you mention

Re: dmd 2.065 beta 1 #2

2014-01-24 Thread Andrew Edwards
On 1/24/14, 10:04 AM, Dejan Lekic wrote: Could you please make a 2.065.b1 tag on the GitHub as well so we finally start using the release naming scheme you mentioned in the previous beta-release thread here on the NG? 2.065.b1 is not going to work for FreeBSD and Debian OSes. The tags will

Re: Dmitry Olshansky is now a github committer

2014-01-24 Thread Daniel Murphy
Walter Bright wrote in message news:lbuc93$ke0$1...@digitalmars.com... (I also recommend registering yourname.com and a twitter account in your name, for the same reason.) Not so easy: https://github.com/DanielMurphy (not me) https://twitter.com/danielmurphy (not me)

SFML Game Jam

2014-01-24 Thread Jeremy DeHaan
Hey, everyone! I'm not sure who all would be interested in this, but I thought I might bring it up anyways. I'm pretty active in the SFML community, and a while back I started the first SFML Game Jam. It's a little short notice, but on the 31st we'll be having the second one. The reason I

Re: SFML Game Jam

2014-01-24 Thread Jeremy DeHaan
On Saturday, 25 January 2014 at 04:22:49 UTC, Jeremy DeHaan wrote: Hey, everyone! I'm not sure who all would be interested in this, but I thought I might bring it up anyways. I'm pretty active in the SFML community, and a while back I started the first SFML Game Jam. It's a little short

Re: Should this work?

2014-01-24 Thread Jacob Carlborg
On 2014-01-23 21:53, Andrei Alexandrescu wrote: Ionno. Just look at the current morass with https://github.com/D-Programming-Language/phobos/pull/1875. We have two names for the same function canFind and any. Then we want to deprecate one, but look at how much impact it's having on Phobos

Re: Should this work?

2014-01-24 Thread Andrea Fontana
On Friday, 24 January 2014 at 08:21:12 UTC, Jacob Carlborg wrote: Personally I would expect any to take a predicate and return true if it can find any matching element. If a predicate is not supplied it would behave as the opposite of empty. +1 I would expect contains to take a element and

Re: Should this work?

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 08:21:12 UTC, Jacob Carlborg wrote: On 2014-01-23 21:53, Andrei Alexandrescu wrote: I would expect contains to take a element and check if it exists in the range. I think canFind is just a weird name. I agree on the latter point. As for contains... Well, if

Re: Review of std.signal

2014-01-24 Thread Jacob Carlborg
On 2014-01-23 23:51, Martin Nowak wrote: Wouldn't it be possible to find out whether the delegate context ptr is actually an object? Not sure how to do it safely though and Interfaces slightly differ. ```d import std.stdio; class Foo { void method() {} } void main() { auto foo =

Re: Current state of D as a better C (Windows)?

2014-01-24 Thread Jacob Carlborg
On 2014-01-24 06:17, Mike wrote: That sounds very undesirable. I still don't even understand what purpose modules and ModuleInfo really serve. Right now, I'm just using modules for namespace scope and encapsulation. If you know some documentation that helps demystify ModuleInfo and what its

Re: Review of std.signal

2014-01-24 Thread Johannes Pfau
Am Fri, 24 Jan 2014 09:52:23 +0100 schrieb Jacob Carlborg d...@me.com: On 2014-01-23 23:51, Martin Nowak wrote: Wouldn't it be possible to find out whether the delegate context ptr is actually an object? Not sure how to do it safely though and Interfaces slightly differ. ```d

Re: fullyQualifiedName fails on template

2014-01-24 Thread Dicebot
https://d.puremagic.com/issues/show_bug.cgi?id=10502

Re: Review of std.signal

2014-01-24 Thread Dicebot
On Thursday, 23 January 2014 at 22:37:25 UTC, Martin Nowak wrote: I would have really like more thorough review for the shared library pull request, although I'd like more code review in general. https://github.com/D-Programming-Language/druntime/pull/617 We can do it, sure. You should

Re: fullyQualifiedName fails on template

2014-01-24 Thread Timon Gehr
On 01/24/2014 03:20 AM, Øivind wrote: Is fullyQualifiedName supposed to work on templates? Yes. The following fails: Compiler bug.

Re: fullyQualifiedName fails on template

2014-01-24 Thread Dicebot
On Friday, 24 January 2014 at 09:38:24 UTC, Timon Gehr wrote: The following fails: Compiler bug. More like Phobos bug that is very hard to fix because of compiler bug

Re: Abstract syntax tree manipulation

2014-01-24 Thread Tofu Ninja
On Sunday, 21 April 2013 at 10:13:43 UTC, Jacob Carlborg wrote: On 2013-04-21 09:57, Suminda Dharmasena wrote: Hi, Since macro is reserved perhaps D can introduce AST manipulating macros. Suminda The original idea with the macro keyword was to introduce AST macros. Although nothing has

Re: Abstract syntax tree manipulation

2014-01-24 Thread Tofu Ninja
On Sunday, 21 April 2013 at 10:13:43 UTC, Jacob Carlborg wrote: On 2013-04-21 09:57, Suminda Dharmasena wrote: Hi, Since macro is reserved perhaps D can introduce AST manipulating macros. Suminda The original idea with the macro keyword was to introduce AST macros. Although nothing has

Re: symmetric signed types

2014-01-24 Thread Dominikus Dittes Scherkl
On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: byte a = -128; auto b = -a; What type should b get? (of course byte but the value doesn't fit!) The type will be int. Ah, ok. Of course the small types always become int. But the problem would be the same with long a

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Nick Sabalausky
On 1/20/2014 9:53 AM, Chris wrote: I've had a look at Arch. While it seems to be a nice and (c)lean distro, it is a bit of a pain in the neck to install / set up. Also I don't know, if it will be easy to get the hardware support I need. I don't want to spend ages configuring it and tinkering

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Nick Sabalausky
On 1/21/2014 3:26 AM, Iain Buclaw wrote: On 20 Jan 2014 15:35, qznc q...@web.de wrote: On Monday, 20 January 2014 at 14:53:55 UTC, Chris wrote: Maybe I'll give Fedora (+ Xfce) a shot. You could try Korora, which is based on Fedora, but includes a lot of convenience. For example,

Re: Review of std.signal

2014-01-24 Thread David Nadlinger
On Friday, 24 January 2014 at 08:52:24 UTC, Jacob Carlborg wrote: Why don't you just cast the delegate context pointer to Object? Like this: auto result = cast(Object) dg.ptr; If result is not null the context pointer points to an object. No, this is just a plain (i.e. no-op) cast.

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Nick Sabalausky
On 1/20/2014 11:20 AM, H. S. Teoh wrote: (P.S. Now I know Ubuntu is based on Debian, but the one time I had to deal with an Ubuntu system directly I noticed that they were not as friendly to customization. I'd say that's fairly accurate. Ubuntu started as an easy-to-use Debian. But ever

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Nick Sabalausky
On 1/23/2014 2:00 AM, Thomas Mader wrote: A rolling release system like Arch has it is fabulous, but only if you also get a rollback functionality. Does it?

Re: symmetric signed types

2014-01-24 Thread eles
On Friday, 24 January 2014 at 10:40:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: int a = 2_000_000_000; int b = a + a; should not generate weird stuff like -294_967_296 (which it Long discussion about signed/unsigned

Re: Should this work?

2014-01-24 Thread Regan Heath
On Fri, 24 Jan 2014 08:21:12 -, Jacob Carlborg d...@me.com wrote: On 2014-01-23 21:53, Andrei Alexandrescu wrote: Ionno. Just look at the current morass with https://github.com/D-Programming-Language/phobos/pull/1875. We have two names for the same function canFind and any. Then we want

Re: Should this work?

2014-01-24 Thread Regan Heath
On Thu, 23 Jan 2014 20:53:01 -, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/23/14 8:06 AM, Regan Heath wrote: This. Not my position. Rather I am suggesting we identify individual omissions (like std.string.contains) and add an alias. So that people don't have to

Re: Review of std.signal

2014-01-24 Thread Daniel Murphy
David Nadlinger wrote in message news:nbvmhmhcszmsruszg...@forum.dlang.org... Although this won't handled interfaces. I consider it a bug that an interface cannot be casted to Object. Not all interface implementations are (Object) classes, cf. IUnknown. This is not a problem, it is known

Re: Should this work?

2014-01-24 Thread Regan Heath
On Fri, 24 Jan 2014 08:36:07 -, Stanislav Blinov stanislav.bli...@gmail.com wrote: On Friday, 24 January 2014 at 08:21:12 UTC, Jacob Carlborg wrote: On 2014-01-23 21:53, Andrei Alexandrescu wrote: I would expect contains to take a element and check if it exists in the range. I

Re: symmetric signed types

2014-01-24 Thread Dominikus Dittes Scherkl
On Friday, 24 January 2014 at 11:43:08 UTC, eles wrote: On Friday, 24 January 2014 at 10:40:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: int a = 2_000_000_000; int b = a + a; should not generate weird stuff like

Re: Heap allocation and internal pointers

2014-01-24 Thread Tobias Pankrath
On Friday, 24 January 2014 at 12:40:44 UTC, Tobias Pankrath wrote: On Monday, 20 January 2014 at 20:20:01 UTC, Steven Schveighoffer wrote: On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky dmitry.o...@gmail.com wrote: 20-Jan-2014 23:48, Steven Schveighoffer пишет: I think this is

Re: Heap allocation and internal pointers

2014-01-24 Thread Tobias Pankrath
On Monday, 20 January 2014 at 20:20:01 UTC, Steven Schveighoffer wrote: On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky dmitry.o...@gmail.com wrote: 20-Jan-2014 23:48, Steven Schveighoffer пишет: I think this is somewhat too general. It can be GC allocated, even GC-array allocated.

Re: Current state of D as a better C (Windows)?

2014-01-24 Thread Mike
On Thursday, 23 January 2014 at 22:39:38 UTC, Vladimir Panteleev wrote: I believe the biggest factor for why someone would want to use a lighter runtime is the garbage collector. I think a lot of the code in Druntime still assumes that a GC is present... and then I'm not sure the D maintainers

Re: Current state of D as a better C (Windows)?

2014-01-24 Thread Mike
On Wednesday, 22 January 2014 at 02:18:43 UTC, Vladimir Panteleev wrote: Hi, What's the current situation of using D without Phobos/Druntime? Sometimes, it's quite useful to be able to use D to create tiny EXEs/DLLs. For example, create simple DLL plugins that will be loaded into non-D

Re: Review of std.signal

2014-01-24 Thread Dmitry Olshansky
24-Jan-2014 02:58, Martin Nowak пишет: On 01/13/2014 10:16 PM, ilya-stromberg wrote: It's not so good to have array of delegates because you will have a memory leaks. Delegate has permanent pointer to the object, so GC will never free it. As alternative, you can delete delegate manually, but

Re: Review of std.signal

2014-01-24 Thread Jacob Carlborg
On 2014-01-24 10:06, Johannes Pfau wrote: A delegate context could be a struct or closure as well, then calling cast(Object) is invalid and may crash. There's no good solution, the old std.signals just assumes all delegates belong to classes IIRC. I just tried with a nested function and that

Re: Review of std.signal

2014-01-24 Thread Jacob Carlborg
On 2014-01-24 12:52, Daniel Murphy wrote: This is not a problem, it is known at compile time. Exactly. -- /Jacob Carlborg

Re: Review of std.signal

2014-01-24 Thread Jacob Carlborg
On 2014-01-24 12:13, David Nadlinger wrote: No, this is just a plain (i.e. no-op) cast. It seemed to work when I tested it. Ok, I see what I did wrong. I forgot to actually refer to an outer variable in my nested function. -- /Jacob Carlborg

Re: Abstract syntax tree manipulation

2014-01-24 Thread Jacob Carlborg
On 2014-01-24 11:20, Tofu Ninja wrote: This is amazing, its not 100% perfect but it hits all the main things I want out of a macro system. How long ago did you come up with this? I don't know. Dropbox says the file was created 2013 in February. I've created a DIP out of this:

Re: symmetric signed types

2014-01-24 Thread Meta
On Friday, 24 January 2014 at 12:25:13 UTC, Dominikus Dittes Scherkl wrote: On Friday, 24 January 2014 at 11:43:08 UTC, eles wrote: On Friday, 24 January 2014 at 10:40:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: int a =

Disable warnings per import

2014-01-24 Thread Martin Cejp
Is this possible? I'm importing some older library code (Derelict2) and the compiler gives me a lot of deprecation warnings every time. Can I somehow disable those? Note that the library is pre-compiled as lib*.a, the project just imports it for the declarations.

Re: Disable warnings per import

2014-01-24 Thread Aleksandar Ruzicic
On Friday, 24 January 2014 at 13:38:17 UTC, Martin Cejp wrote: Is this possible? I'm importing some older library code (Derelict2) and the compiler gives me a lot of deprecation warnings every time. Can I somehow disable those? Note that the library is pre-compiled as lib*.a, the project just

Re: symmetric signed types

2014-01-24 Thread Dominikus Dittes Scherkl
On Friday, 24 January 2014 at 13:30:06 UTC, Meta wrote: On the Rust mailing list, there's recently been discussion about auto-promotion to BigInt in case of overflow. Maybe that's a discussion we should be having as well? Nice idea. But is any overflow known at compile-time? Also really

Re: fullyQualifiedName fails on template

2014-01-24 Thread Martin Cejp
On Friday, 24 January 2014 at 09:40:32 UTC, Dicebot wrote: On Friday, 24 January 2014 at 09:38:24 UTC, Timon Gehr wrote: The following fails: Compiler bug. More like Phobos bug that is very hard to fix because of compiler bug The bug hasn't been updated in half a year. Can we help with

Re: fullyQualifiedName fails on template

2014-01-24 Thread David Nadlinger
On Friday, 24 January 2014 at 14:08:45 UTC, Martin Cejp wrote: It's quite an issue if you want to copy a method with a mixin and you can't reliably stringify the return type. In general, you can't reliably stringify types for use in string mixins anyway. Just insert ReturnType!(…) or whatever

Re: fullyQualifiedName fails on template

2014-01-24 Thread Martin Cejp
On Friday, 24 January 2014 at 14:31:01 UTC, David Nadlinger wrote: In general, you can't reliably stringify types for use in string mixins anyway. May I ask why? Anyway, thanks for the workaround.

Re: Symbol Undefined _EnumWindows@12

2014-01-24 Thread AntonSotov
all thank you very much! realized my mistake.

Re: [OT] Good or best Linux distro?

2014-01-24 Thread H. S. Teoh
On Fri, Jan 24, 2014 at 06:01:33AM -0500, Nick Sabalausky wrote: [...] While Linux isn't my primary desktop system, the desktop Linux stuff I do work with has gone from Ubuntu - Debian - Mint. I left Ubuntu because Canonical was starting to piss me off, partly because of their apparent

Re: package.d behavior

2014-01-24 Thread Lemonfiend
That at least one more user here :) package.d really deserves more than just a changelog entry. Like a proper mention in the docs, with a description of its expected behaviour. Then users would at least be able to determine whether something was a bug or working as intended. On Thursday, 23

Re: symmetric signed types

2014-01-24 Thread eles
On Friday, 24 January 2014 at 12:25:13 UTC, Dominikus Dittes Scherkl wrote: On Friday, 24 January 2014 at 11:43:08 UTC, eles wrote: On Friday, 24 January 2014 at 10:40:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: But that is

A question about move() and a rant about shared

2014-01-24 Thread Stanislav Blinov
Ok, this is going to be a long one, so please bear with me. I'll start with a question. 1. std.algorithm.move() and std.container TDPL describes when a compiler can and cannot perform a move automatically. For cases when it isn't done automatically but we explicitly require a move, we have

Re: A question about move() and a rant about shared

2014-01-24 Thread Stanislav Blinov
Ouch. Please excuse the formatting. I didn't pay attention when pasting this :|

Re: symmetric signed types

2014-01-24 Thread Walter Bright
On 1/24/2014 2:40 AM, Dominikus Dittes Scherkl wrote: Ah, ok. Of course the small types always become int. But the problem would be the same with long a = long.min; auto b = -a; does this return ulong (which could hold the correct result) or long (and a wrong result)? The negation operator

Re: A question about move() and a rant about shared

2014-01-24 Thread Dmitry Olshansky
24-Jan-2014 21:07, Stanislav Blinov пишет: Ok, this is going to be a long one, so please bear with me. I'll start with a question. 2 unrelated questions would be better as 2 nice smaller posts. Just saying. 1. std.algorithm.move() and std.container [snip] But why is there no practical

Python and D could work together?

2014-01-24 Thread ReverseFlux
Hi guys, I've been thinking for quite some time if there is any possibility of writing D modules for python do you think it's possible? Do you think I can use the already existing wrappers created for C++?

Re: Python and D could work together?

2014-01-24 Thread Tobias Pankrath
On Friday, 24 January 2014 at 20:26:02 UTC, ReverseFlux wrote: Hi guys, I've been thinking for quite some time if there is any possibility of writing D modules for python do you think it's possible? Do you think I can use the already existing wrappers created for C++? You can always use the

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Thomas Mader
On Friday, 24 January 2014 at 11:26:43 UTC, Nick Sabalausky wrote: On 1/23/2014 2:00 AM, Thomas Mader wrote: A rolling release system like Arch has it is fabulous, but only if you also get a rollback functionality. Does it? If NixOS supports a rollback? Yes indeed it does, you can even

Re: symmetric signed types

2014-01-24 Thread Dominikus Dittes Scherkl
On Friday, 24 January 2014 at 19:03:59 UTC, Walter Bright wrote: On 1/24/2014 2:40 AM, Dominikus Dittes Scherkl wrote: Ah, ok. Of course the small types always become int. But the problem would be the same with long a = long.min; auto b = -a; does this return ulong (which could hold the

Re: A question about move() and a rant about shared

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 19:54:31 UTC, Dmitry Olshansky wrote: 2 unrelated questions would be better as 2 nice smaller posts. Just saying. I know. Sorry if it got you irritated. I have a feeling I'll be coming back with questions that are based on both move() and shared tied up

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Joakim
On Tuesday, 21 January 2014 at 15:08:16 UTC, Chris wrote: How's the FreeBSD documentation / community? Is it easy to find solutions? FreeBSD has the best official docs I've ever seen for an OS: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ The mailing lists and forums are good

Re: Python and D could work together?

2014-01-24 Thread ReverseFlux
On Friday, 24 January 2014 at 21:10:23 UTC, Tobias Pankrath wrote: On Friday, 24 January 2014 at 20:26:02 UTC, ReverseFlux wrote: Hi guys, I've been thinking for quite some time if there is any possibility of writing D modules for python do you think it's possible? Do you think I can use the

Re: symmetric signed types

2014-01-24 Thread Walter Bright
On 1/24/2014 1:39 PM, Dominikus Dittes Scherkl wrote: On Friday, 24 January 2014 at 19:03:59 UTC, Walter Bright wrote: On 1/24/2014 2:40 AM, Dominikus Dittes Scherkl wrote: Ah, ok. Of course the small types always become int. But the problem would be the same with long a = long.min; auto b =

Re: Python and D could work together?

2014-01-24 Thread Martin Cejp
With user-defined annotations and compile-time traits, you could make a pretty smooth binding framework based on, for example, the CPython api.

Re: symmetric signed types

2014-01-24 Thread Timon Gehr
On 01/24/2014 11:33 PM, Walter Bright wrote: ... 2. types do not depend on particular runtime values (the whole notion of static typing would fall apart if it did) http://en.wikipedia.org/wiki/Dependent_type

Re: symmetric signed types

2014-01-24 Thread Andrei Alexandrescu
On 1/24/14 2:40 AM, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: byte a = -128; auto b = -a; What type should b get? (of course byte but the value doesn't fit!) The type will be int. Ah, ok. Of course the small types always become

Re: [OT] Good or best Linux distro?

2014-01-24 Thread ed
On Tuesday, 21 January 2014 at 10:53:32 UTC, simendsjo wrote: [snip] It's the first distro that Just Works (TM) for me, and the distro that made me go full-time GNU/Linux. Even compiling a custom kernel, which I needs for a piece of hardware, is just a couple of commands. I haven't tried

Re: symmetric signed types

2014-01-24 Thread Brad Roberts
On 1/24/14 6:08 AM, Dominikus Dittes Scherkl wrote: On Friday, 24 January 2014 at 13:30:06 UTC, Meta wrote: On the Rust mailing list, there's recently been discussion about auto-promotion to BigInt in case of overflow. Maybe that's a discussion we should be having as well? Nice idea. But is

Re: Python and D could work together?

2014-01-24 Thread John Colvin
On Friday, 24 January 2014 at 20:26:02 UTC, ReverseFlux wrote: Hi guys, I've been thinking for quite some time if there is any possibility of writing D modules for python do you think it's possible? Do you think I can use the already existing wrappers created for C++?

Re: symmetric signed types

2014-01-24 Thread Namespace
On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: On 1/23/14 4:09 AM, Dominikus Dittes Scherkl wrote: There is one mistake in C that D proliverates: The T.min value of signed types. e.g. byte a = -128; auto b = -a; What type should b get? (of course byte but the value

Re: symmetric signed types

2014-01-24 Thread Walter Bright
On 1/24/2014 3:25 PM, Brad Roberts wrote: None of this is new. It comes up periodically and ends up in the typical place of many feature requests, unimplemented. Create the type, share it, see who uses it and how much they gain from the benefits and if they're worth the costs. Conjecture will

Re: symmetric signed types

2014-01-24 Thread Andrei Alexandrescu
On 1/24/14 4:25 AM, Dominikus Dittes Scherkl wrote: On Friday, 24 January 2014 at 11:43:08 UTC, eles wrote: On Friday, 24 January 2014 at 10:40:46 UTC, Dominikus Dittes Scherkl wrote: On Thursday, 23 January 2014 at 20:35:56 UTC, Andrei Alexandrescu wrote: int a = 2_000_000_000; int b = a +

Re: fullyQualifiedName fails on template

2014-01-24 Thread Øivind
On Friday, 24 January 2014 at 09:40:32 UTC, Dicebot wrote: On Friday, 24 January 2014 at 09:38:24 UTC, Timon Gehr wrote: The following fails: Compiler bug. More like Phobos bug that is very hard to fix because of compiler bug Looking at the code, it does not seem like it pays any

Re: [OT] Good or best Linux distro?

2014-01-24 Thread Kapps
On Friday, 24 January 2014 at 23:17:55 UTC, ed wrote: I had a lot of problems with Ubuntu and stability from 7.10-13.04. Even guys at my work, which were Ubuntu fanatics, stopped at 13.04 when I convinced them to try Arch because they were having issues after the release. One did settle on

Re: TLF = thread local functions

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 06:03:27 UTC, dennis luehring wrote: no - the parameters and local vars of the function are in the stack of the thread - so there is no problem with them, only shared variables can have a need to synchronization your idea tries to solve non existing problems?

Re: can't I use __traits(allMembers) recursivly ?

2014-01-24 Thread Uplink_Coder
Orange is neat I had a look at but, the docs are abit lacking ... I don't really know how to get it to do what i want Well I have an Enum in a Struct and I need to serialze the struct members and unfold the enum. can orange do that ?

Re: can't I use __traits(allMembers) recursivly ?

2014-01-24 Thread Tobias Pankrath
On Friday, 24 January 2014 at 06:11:30 UTC, Uplink_Coder wrote: I'm trying to serialize my struct through CT-Refelction Maybe your _pod_ functions needs a parameter. // take a look at std.conv.to string toString(P)(P pod) { }

Re: can't I use __traits(allMembers) recursivly ?

2014-01-24 Thread Tobias Pankrath
On Friday, 24 January 2014 at 09:14:31 UTC, Tobias Pankrath wrote: On Friday, 24 January 2014 at 06:11:30 UTC, Uplink_Coder wrote: I'm trying to serialize my struct through CT-Refelction Maybe your _pod_ functions needs a parameter. // take a look at std.conv.to string toString(P)(P pod) {

Re: TLF = thread local functions

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 09:50:44 UTC, Dicebot wrote: On Friday, 24 January 2014 at 08:11:53 UTC, Stanislav Blinov wrote: ...Unless the thread is started with a delegate (literal or member function), which implicitly gains an unsynchronized view of its enclosing scope (or class). Which

Re: Python calling D

2014-01-24 Thread Russel Winder
On Fri, 2014-01-24 at 02:29 +, Ellery Newcomer wrote: […] I have just tried a trivial D source shared object on Debian Unstable using DMD 2.064.2 from d-apt. Compile up the shared object with entries C linkage, try to use ctypes or CFFI from Python just gives a segmentation violation :-(

Re: TLF = thread local functions

2014-01-24 Thread Dicebot
On Friday, 24 January 2014 at 10:43:05 UTC, Stanislav Blinov wrote: It actually should not even compile without explicit casts. I guess yet another delegate qualifier bug. Why shouldn't it compile? Safe spawner (std.concurrency.spawn) does not accept delegates. Unsafe one (core.thread.Thread)

Re: can't I use __traits(allMembers) recursivly ?

2014-01-24 Thread Uplink_Coder
I have solved by problem. I just forgot to prepend static to the ifs I used :D

Re: TLF = thread local functions

2014-01-24 Thread Stanislav Blinov
On Friday, 24 January 2014 at 11:00:42 UTC, Dicebot wrote: D type system is supposed to guarantee that you never ever can get pointer/reference to data that is not stored in your own TLS (including stack) unless it is marked as shared (immutable / __gshared are in shared category). Agreed.

Re: User defined types: Problems with ref

2014-01-24 Thread Chris
Now the output is as it should be (after changing the elements). // The div.toString(); div class=text onclick=function(); id=1 Hello, world! span I am a span /span /div // Tree Elements [div class=text onclick=function(); id=1 Hello, world! span I am a span /span /div , span I am a span /span

Re: User defined types: Problems with ref

2014-01-24 Thread Chris
On Friday, 24 January 2014 at 01:26:06 UTC, Ali Çehreli wrote: On 01/23/2014 07:26 AM, Chris wrote: On Thursday, 23 January 2014 at 15:24:19 UTC, Chris wrote: Here's what I'm trying to do. struct Element(T) { T x; T y; public void setX(T value) { x = value; }

N-body bench

2014-01-24 Thread bearophile
If someone if willing to test LDC2 with a known benchmark, there's this one: http://benchmarksgame.alioth.debian.org/u32/performance.php?test=nbody A reformatted C++11 version good as start point for a D translation: http://codepad.org/4mOHW0fz Bye, bearophile

  1   2   >