Re: Pull request names

2014-03-24 Thread monarch_dodra
On Monday, 24 March 2014 at 17:49:43 UTC, Steven Schveighoffer wrote: If you want to say "fix issue XXX", please repeat the bug title at least. -Steve Yeah, that does get on my nerves sometimes too. But I do nothing about it, so I'm not part of the solution. I guess I should now. Also, whe

Re: Losing 32 bits of a void pointer

2014-03-24 Thread Paolo Invernizzi
On Monday, 24 March 2014 at 23:16:38 UTC, Andrej Mitrovic wrote: On 3/24/14, sumo wrote: For anyone who runs in to this, it is a because the epoll_event struct is packed on x86_64 bits processors. Have created a pull for druntime. I'm really surprised this wasn't caught sooner. I thought e

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread dennis luehring
Am 24.03.2014 17:44, schrieb Andrei Alexandrescu: On 3/24/14, 5:51 AM, w0rp wrote: On Monday, 24 March 2014 at 09:02:19 UTC, monarch_dodra wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Before we roll this

Re: Appropriateness of posts

2014-03-24 Thread Ola Fosheim Grøstad
On Monday, 24 March 2014 at 23:04:16 UTC, Andrej Mitrovic wrote: There is a little bit too much elitism IMO. I can't see this anywhere, could you elaborate? I could. >;-} All the major contributors to D are always helpful towards newbies, especially in D.learn. Yes, bearophile, John Colvi

Re: Appropriateness of posts

2014-03-24 Thread Corry
I didn't have a problem with most of his posts, but constantly waving around that "windoze" flamebait at every possible opportunity (and then feigning innocence about it) was the real problem. And I'm even saying that as someone who does carry a lot of hatred toward windows (among many other th

Re: Pull request names

2014-03-24 Thread Jakob Ovrum
On Monday, 24 March 2014 at 17:49:43 UTC, Steven Schveighoffer wrote: To all who are generating pull requests: I get emails for every pull request message that is posted, as do anyone who is subscribed to the github project. Though I agree with everything you said, it is possible to "watch"

Re: Pull request names

2014-03-24 Thread Walter Bright
On 3/24/2014 12:47 PM, Andrej Mitrovic wrote: On 3/24/14, Steven Schveighoffer wrote: To all who are generating pull requests. I keep saying the same thing to pull makers. When I'm not too busy I also rename their pull request to add the title description. Another thing I keep mentioning is

Re: Appropriateness of posts

2014-03-24 Thread Nick Sabalausky
On 3/24/2014 8:12 PM, H. S. Teoh wrote: On Mon, Mar 24, 2014 at 11:08:05PM +, Andrej Mitrovic wrote: [...] Sorry, I didn't read this thread about Ramon yet (I'm just going through these posts). I'll look it up now. Oh you mean this guy?: http://forum.dlang.org/post/csusavszritzlaqds...@for

Re: Reviewing pull requests (was: A division problem)

2014-03-24 Thread Daniel Murphy
"Steven Schveighoffer" wrote in message news:op.xc8uqgsneav7ka@stevens-macbook-pro.local... 2 things: 1. Pulls that are waiting for author changes, but haven't been touched in a week (maybe?) should be closed. They can always be reopened. 2. Pulls that are closed do not get tested, so they a

Re: Pull request names

2014-03-24 Thread Daniel Murphy
"Steven Schveighoffer" wrote in message news:op.xc8mg5laeav7ka@stevens-macbook-pro.local... The "view it on Github" is a link to the message. So I can see what this is about. But it would be nice if the pull request title was more descriptive. I don't know what issue 12419 is. It does say t

Re: Reviewing pull requests

2014-03-24 Thread Brad Roberts
On 3/24/14, 4:50 PM, Walter Bright wrote: On 3/24/2014 1:53 PM, Brad Roberts wrote: Older than 2 weeks and they aren't likely to get tested either.. since any change to the branch (ie, a pull being merged) restarts testing, so they're effectively just dead weight down the queue. Only a lull in

Re: Appropriateness of posts

2014-03-24 Thread H. S. Teoh
On Mon, Mar 24, 2014 at 11:08:05PM +, Andrej Mitrovic wrote: [...] > >Sorry, I didn't read this thread about Ramon yet (I'm just going through > >these posts). I'll look it up now. > > Oh you mean this guy?: > http://forum.dlang.org/post/csusavszritzlaqds...@forum.dlang.org > > That guy reall

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Daniel N
On Monday, 24 March 2014 at 12:21:55 UTC, Daniel N wrote: I'm currently too busy to submit a complete solution, but please feel free to use my idea if you think it sounds promising. I now managed to dig up my old C source... but I'm still blocked by dmd not accepting the 'pext' instruction...

Re: Reviewing pull requests

2014-03-24 Thread Walter Bright
On 3/24/2014 1:53 PM, Brad Roberts wrote: Older than 2 weeks and they aren't likely to get tested either.. since any change to the branch (ie, a pull being merged) restarts testing, so they're effectively just dead weight down the queue. Only a lull in pull merging would allow them to be tested,

Re: Reviewing pull requests

2014-03-24 Thread Steven Schveighoffer
On Mon, 24 Mar 2014 19:33:47 -0400, Brad Roberts wrote: The sync between github and the tester isn't instant, so time is sometimes wasted on an already merged pull. However, it does check between steps to see if the run has been marked as old. If so, it stops working on it. Brad, I w

Re: Reviewing pull requests

2014-03-24 Thread Brad Roberts
On 3/24/14, 2:26 PM, Steven Schveighoffer wrote: On Mon, 24 Mar 2014 16:53:36 -0400, Brad Roberts wrote: On 3/24/14, 1:48 PM, Steven Schveighoffer wrote: On Mon, 24 Mar 2014 16:11:34 -0400, Andrej Mitrovic wrote: 2 things: 1. Pulls that are waiting for author changes, but haven't been tou

Re: Losing 32 bits of a void pointer

2014-03-24 Thread Andrej Mitrovic
On 3/24/14, sumo wrote: > For anyone who runs in to this, it is a because the epoll_event > struct is packed on x86_64 bits processors. Have created a pull > for druntime. I'm really surprised this wasn't caught sooner. I thought epoll was supposed to be popular. Maybe not so much in the context

Re: Appropriateness of posts

2014-03-24 Thread Andrej Mitrovic
on On Monday, 24 March 2014 at 23:06:27 UTC, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 23:04:16 UTC, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 22:24:46 UTC, Ola Fosheim Grøstad wrote: On Monday, 24 March 2014 at 13:31:34 UTC, Dicebot wrote: D community is single most friendly

Re: Appropriateness of posts

2014-03-24 Thread Andrej Mitrovic
On Monday, 24 March 2014 at 23:04:16 UTC, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 22:24:46 UTC, Ola Fosheim Grøstad wrote: On Monday, 24 March 2014 at 13:31:34 UTC, Dicebot wrote: D community is single most friendly and helpful place I have ever seen in the internet. All communitie

Re: Walter's DConf 2014 Talks - Topics in Finance

2014-03-24 Thread Ola Fosheim Grøstad
On Sunday, 23 March 2014 at 18:58:20 UTC, Walter Bright wrote: On 3/23/2014 11:29 AM, "Ola Fosheim Grøstad" While that is true you can have a soft real time thread feeding the hard real time thread Yes, and you can do that with GC, too. You can, but the way I view "soft real time" is that yo

Re: Appropriateness of posts

2014-03-24 Thread Andrej Mitrovic
On Monday, 24 March 2014 at 22:24:46 UTC, Ola Fosheim Grøstad wrote: On Monday, 24 March 2014 at 13:31:34 UTC, Dicebot wrote: D community is single most friendly and helpful place I have ever seen in the internet. All communities rate themselves that way, I think it is somewhere in the middle

Re: Losing 32 bits of a void pointer

2014-03-24 Thread deadalnix
On Monday, 24 March 2014 at 20:45:13 UTC, sumo wrote: On Wednesday, 19 February 2014 at 02:39:39 UTC, sumo wrote: I am using D & epoll on Fedora 3.12.10-300.fc20.x86_64 and am running into a very odd issue. For anyone who runs in to this, it is a because the epoll_event struct is packed on

Re: Improve D's syntax to make it more python like

2014-03-24 Thread Ola Fosheim Grøstad
On Monday, 24 March 2014 at 22:23:50 UTC, Nick Sabalausky wrote: Using the same language on client/server is indeed quite nice, partly because of less mental context-switching, and also because of increased code sharing (which also makes it easier to move things between client vs server if you

Re: Walter's DConf 2014 Talks - Topics in Finance

2014-03-24 Thread deadalnix
On Sunday, 23 March 2014 at 17:38:17 UTC, Sean Kelly wrote: On Saturday, 22 March 2014 at 14:04:01 UTC, Daniel Davidson wrote: For example, I could see technical reasons why in certain non-quant areas like XML parsing where D can be faster than C++. (http://dotnot.org/blog/archives/2008/03/1

Re: protocol for using InputRanges

2014-03-24 Thread Joseph Rushton Wakeling
On 24/03/14 14:20, Dicebot wrote: I think there is one design mistake with current InputRange rules that makes usage so inconsistent. We have `empty` but don't have any distinct `not yet started` state. If calling `popFront` at least once was required before accessing `front`, I can't imagine the

Re: Improve D's syntax to make it more python like

2014-03-24 Thread Nick Sabalausky
On 3/22/2014 2:38 PM, "Ola Fosheim Grøstad" " wrote: On Saturday, 22 March 2014 at 17:54:16 UTC, Russel Winder wrote: like "end to end" the same language. Many are asking about server-side Dart as well as client-side Dart in the browser. Yes, a CLI/server Dart VM exists that is suitable for a

Re: Appropriateness of posts

2014-03-24 Thread Ola Fosheim Grøstad
On Monday, 24 March 2014 at 13:31:34 UTC, Dicebot wrote: D community is single most friendly and helpful place I have ever seen in the internet. All communities rate themselves that way, I think it is somewhere in the middle. Meaning: there is room for improvement. There is a little bit too

Re: Lazy private selective imports

2014-03-24 Thread monarch_dodra
On Monday, 24 March 2014 at 22:06:07 UTC, Peter Alexander wrote: On Monday, 24 March 2014 at 21:43:36 UTC, monarch_dodra wrote: In any case, while not as convenient as a built-in "lazy import", it could be a solution worth digging into. This is why I brought this up. Oops. I *thought* the c

Re: Lazy private selective imports

2014-03-24 Thread Peter Alexander
On Monday, 24 March 2014 at 21:43:36 UTC, monarch_dodra wrote: On Monday, 24 March 2014 at 21:21:30 UTC, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 21:18:49 UTC, Peter Alexander wrote: Would it be possible to perform private selective imports lazily? This was discussed fairly recently

Re: Lazy private selective imports

2014-03-24 Thread monarch_dodra
On Monday, 24 March 2014 at 21:21:30 UTC, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 21:18:49 UTC, Peter Alexander wrote: Would it be possible to perform private selective imports lazily? This was discussed fairly recently: http://forum.dlang.org/thread/l8t2o1$kq0$1...@digitalmars.com

Re: Walter's DConf 2014 Talks - Topics in Finance

2014-03-24 Thread TJB
On Monday, 24 March 2014 at 11:57:14 UTC, Daniel Davidson wrote: On Saturday, 22 March 2014 at 17:30:45 UTC, TJB wrote: On Saturday, 22 March 2014 at 16:35:07 UTC, Brian Rogoff wrote: This is a very interesting thread that you started. Could you flesh it out more with some example C++ that you

Re: Reviewing pull requests

2014-03-24 Thread Steven Schveighoffer
On Mon, 24 Mar 2014 16:53:36 -0400, Brad Roberts wrote: On 3/24/14, 1:48 PM, Steven Schveighoffer wrote: On Mon, 24 Mar 2014 16:11:34 -0400, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 20:02:51 UTC, Andrei Alexandrescu wrote: The single most impactful way to improve D some more a

Re: Lazy private selective imports

2014-03-24 Thread Andrej Mitrovic
On Monday, 24 March 2014 at 21:18:49 UTC, Peter Alexander wrote: Would it be possible to perform private selective imports lazily? This was discussed fairly recently: http://forum.dlang.org/thread/l8t2o1$kq0$1...@digitalmars.com?page=9 (and previous or next pages)

Re: A division problem

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 1:21 PM, bearophile wrote: Andrei Alexandrescu: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull requests on github. My time is more efficiently used suggesting people new ideas to create new pull requests :-) You an

Re: A division problem

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 2:51 AM, Don wrote: It is indeed a common floating-point bug. I came up with a solution for this a couple of years ago, never got around to doing a pull request, but it's on the newsgroup somewhere. It's a little extension to the range propagation implementation. You add a boolean fl

Re: Lazy private selective imports

2014-03-24 Thread Peter Alexander
On Monday, 24 March 2014 at 21:18:49 UTC, Peter Alexander wrote: // non-selective std.stdio imported import std.stdio; void writeln( void main() {} Oops, that unfinished line isn't meant to be there... :-)

Lazy private selective imports

2014-03-24 Thread Peter Alexander
Would it be possible to perform private selective imports lazily? i.e. only import when the symbol selectively imported is requested. -- // not used => std.stdio not imported import std.stdio : writeln; void main() -- //

Re: Should we deprecate comma?

2014-03-24 Thread Joseph Cassman
On Monday, 24 March 2014 at 20:04:23 UTC, deadalnix wrote: On Monday, 24 March 2014 at 18:58:52 UTC, Michel Fortin wrote: On 2014-03-24 16:42:59 +, Andrei Alexandrescu said: tuple() tuple(a) tuple(a, b) tuple(a, b, c) struct() struct(a) struct(a, b) struct(a, b, c) Tuples are actually

Re: Reviewing pull requests

2014-03-24 Thread Brad Roberts
On 3/24/14, 1:48 PM, Steven Schveighoffer wrote: On Mon, 24 Mar 2014 16:11:34 -0400, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 20:02:51 UTC, Andrei Alexandrescu wrote: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull re

Re: A division problem

2014-03-24 Thread Asman01
On Monday, 24 March 2014 at 03:55:41 UTC, bearophile wrote: This kind of code sometimes is wrong, because you forget to cast x to double before the division and you lose precision (but here the compiler knows that the result of the division will go inside a double): void main() { int x =

Re: Reviewing pull requests

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 1:11 PM, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 20:02:51 UTC, Andrei Alexandrescu wrote: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull requests on github. I've been through most Phobos pulls several times

Re: Reviewing pull requests (was: A division problem)

2014-03-24 Thread Steven Schveighoffer
On Mon, 24 Mar 2014 16:11:34 -0400, Andrej Mitrovic wrote: On Monday, 24 March 2014 at 20:02:51 UTC, Andrei Alexandrescu wrote: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull requests on github. I've been through most Phobos

Re: Losing 32 bits of a void pointer

2014-03-24 Thread sumo
On Wednesday, 19 February 2014 at 02:39:39 UTC, sumo wrote: I am using D & epoll on Fedora 3.12.10-300.fc20.x86_64 and am running into a very odd issue. For anyone who runs in to this, it is a because the epoll_event struct is packed on x86_64 bits processors. Have created a pull for drunt

Re: Should we deprecate comma?

2014-03-24 Thread Sean Kelly
On Sunday, 23 March 2014 at 20:56:45 UTC, Andrei Alexandrescu wrote: Discuss: https://github.com/D-Programming-Language/dmd/pull/3399 Kill it. I'll admit to using the comma operator on occasion, but never for any reason that warranted it. If there are any lingering uses in Druntime I'm 100% f

Re: Should we deprecate comma?

2014-03-24 Thread Marc Schütz
On Monday, 24 March 2014 at 16:38:42 UTC, Andrei Alexandrescu wrote: On 3/24/14, 5:18 AM, "Marc Schütz" " wrote: This is nice, although I guess it will make parsing harder. It probably means that the distinction between "," as operator and tuple element separator will be context-dependent. N

Re: A division problem

2014-03-24 Thread bearophile
Andrei Alexandrescu: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull requests on github. My time is more efficiently used suggesting people new ideas to create new pull requests :-) If you diverted 1.0/10 (sic!) of the effort

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Andrei Alexandrescu: That would be a different function but same syntax. In fact for safety I favor myFunc().scatter(a, b, c) -- Andrei That's awful :-) Are you now saying you don't want a good tuple unpacking syntax in D? Then what's the "eye to tuples" you were talking about regrding comma

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread monarch_dodra
On Monday, 24 March 2014 at 16:31:42 UTC, Andrei Alexandrescu wrote: On 3/24/14, 2:02 AM, monarch_dodra wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Before we roll this out, could we discuss a strategy/gu

Re: Reviewing pull requests (was: A division problem)

2014-03-24 Thread Andrej Mitrovic
On Monday, 24 March 2014 at 20:02:51 UTC, Andrei Alexandrescu wrote: The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing pull requests on github. I've been through most Phobos pulls several times now in the last few months, and from what

Re: Should we deprecate comma?

2014-03-24 Thread deadalnix
On Monday, 24 March 2014 at 18:58:52 UTC, Michel Fortin wrote: On 2014-03-24 16:42:59 +, Andrei Alexandrescu said: tuple() tuple(a) tuple(a, b) tuple(a, b, c) struct() struct(a) struct(a, b) struct(a, b, c) Tuples are actually nameless structs, no? This whole point is that this part

Re: A division problem

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 12:51 PM, bearophile wrote: Peter Alexander: We are passed the initial stage of designing the language. D is used now in lots of real code. I'd like D improve some more. The single most impactful way to improve D some more at this point is, without a shred of doubt, reviewing p

Re: A division problem

2014-03-24 Thread bearophile
H. S. Teoh: Don't we have a wiki page for ideas for "future D" (or D3?)? These ideas can go on that page. I don't think Andrei will want a D3 language, so better to keep the focus on D2 first :-) And he is right because there are still some parts of D2 unfinished. The little type system impr

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Dmitry Olshansky
24-Mar-2014 01:22, Andrei Alexandrescu пишет: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei I had to join the party at some point. This seems like 25 instructions: http://goo.gl/N7sHtK -- Dmitry Olshansky

Re: A division problem

2014-03-24 Thread bearophile
Peter Alexander: We are passed the initial stage of designing the language. D is used now in lots of real code. I'd like D improve some more. The focus now has to be on completing the original design, The original D design is to make a language that is "focused on safety", so we are stil

Re: Should we deprecate comma?

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 9:57 AM, bearophile wrote: Andrei Alexandrescu: Look at some of the syntaxes here: http://wiki.dlang.org/DIP32#Use_case_of_uniform_tuple_syntax One of the syntaxes: @{} @{a} @{a, b} @{a, b, c} WTF??? tuple() tuple(a) tuple(a, b) tuple(a, b, c) Andrei So you are saying you w

Re: Pull request names

2014-03-24 Thread Andrej Mitrovic
On 3/24/14, Steven Schveighoffer wrote: > To all who are generating pull requests. I keep saying the same thing to pull makers. When I'm not too busy I also rename their pull request to add the title description. Another thing I keep mentioning is to add a link to the bugzilla issue in the pull

Re: A division problem

2014-03-24 Thread H. S. Teoh
On Mon, Mar 24, 2014 at 07:19:58PM +, Peter Alexander wrote: > On Monday, 24 March 2014 at 03:55:41 UTC, bearophile wrote: > >Seasoned C/C++/D programmers watch for the types every time they > >perform a division, to avoid that trap. But less experienced > >programmers introduce bugs with divis

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
deadalnix: tuple(1,2)two-element tuple tuple(1) one-element tuple (1) simple expression tuple() empty tuple Oh, wait... Yes, that. 99% of the problem is not in the syntax to build tuples. What's desired are mostly syntaxes to do the opposite, pulling tuples apart

Re: A division problem

2014-03-24 Thread Peter Alexander
On Monday, 24 March 2014 at 03:55:41 UTC, bearophile wrote: Seasoned C/C++/D programmers watch for the types every time they perform a division, to avoid that trap. But less experienced programmers introduce bugs with divisions. Can D help the programmer reduce the frequency of similar bugs? An

Re: Should we deprecate comma?

2014-03-24 Thread deadalnix
On Monday, 24 March 2014 at 16:40:29 UTC, Andrei Alexandrescu wrote: How about tuple(1,2)two-element tuple tuple(1) one-element tuple (1) simple expression tuple() empty tuple Oh, wait... Yes, that.

Re: Should we deprecate comma?

2014-03-24 Thread deadalnix
On Monday, 24 March 2014 at 13:12:36 UTC, Dicebot wrote: If you are not ready to break the code for it, there is nothing to discuss. It is not something to compromise about - either kill it completely, or just let it be. Anything else will make things only worse. Actually, Andrei's solution o

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Michel Fortin: struct() struct(a) struct(a, b) struct(a, b, c) Tuples are actually nameless structs, no? That syntax is even longer/wordier :-) auto arr = [struct(1, 2), struct(3, 4), struct(5, 6)]; Structs usually don't support slicing and concatenation. But they are indeed related struct

Re: Should we deprecate comma?

2014-03-24 Thread Michel Fortin
On 2014-03-24 16:42:59 +, Andrei Alexandrescu said: tuple() tuple(a) tuple(a, b) tuple(a, b, c) struct() struct(a) struct(a, b) struct(a, b, c) Tuples are actually nameless structs, no? -- Michel Fortin michel.for...@michelf.ca http://michelf.ca

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
w0rp: Yes, I am with you on this. I prefer tuple(1) over (1, ) I don't think people are advocating for the "(1, )" syntax. Regarding the "tuple(1)" syntax, it is one of the alternative syntaxes you can find in the DIP. One disadvantage of the "tuple()" syntax is that it's a little long, so

Re: A division problem

2014-03-24 Thread bearophile
Temtaime: It requires a little more attention and that's all. Please, stop creating such "fake" enchantments and go to fix real bugs. Thanks. I don't agree they are fake :-) We have removed several classes of common C bugs from D with those enhancements, and there is still some space left f

Re: A division problem

2014-03-24 Thread Temtaime
It requires a little more attention and that's all. Please, stop creating such "fake" enchantments and go to fix real bugs. Thanks.

Re: Should we deprecate comma?

2014-03-24 Thread w0rp
On Monday, 24 March 2014 at 16:40:29 UTC, Andrei Alexandrescu wrote: On 3/24/14, 5:25 AM, w0rp wrote: Please kill the comma operator with fire. Is is just bad. On Monday, 24 March 2014 at 12:20:11 UTC, Marc Schütz wrote: Or, if you really want to distinguish them, this would work: (1,2)tw

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Dicebot: While you can do this: void foo(in @(int a, int b, int c}) {...} auto result = arr.map!foo; I believe it is dangerous misfeature and I don't want to see this in D. Sorry :( Why do you think it's a dangerous and a misfeature? I think you are misaken. It's present in most functio

Pull request names

2014-03-24 Thread Steven Schveighoffer
To all who are generating pull requests: I get emails for every pull request message that is posted, as do anyone who is subscribed to the github project. A recent message in my email: Re: [phobos] Fix issue 12419 (#2038) @monarchdodra Good point, done. - Reply to this email directly or

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Dicebot: I understand but this is something that can be pretty hard to fit into D semantics/grammar and I am not sold that it is worth the push on its own. I'd like a good tuple syntax in D. What is the difference with this then? void foo(int a, int b, int c) { // ... } auto t = tupl

Re: Should we deprecate comma?

2014-03-24 Thread Dicebot
On Monday, 24 March 2014 at 17:51:15 UTC, bearophile wrote: The difference is that your experience with tuples will be less good. One difference can be seen here. Given an array of tuples (here I am using a shorter syntax): auto arr = [@{1, 2}, @(3, 4)] You can't do this: void foo(int a, int

Re: Should we deprecate comma?

2014-03-24 Thread Dicebot
On Monday, 24 March 2014 at 17:35:46 UTC, bearophile wrote: Dicebot: int a, b, c; tuple(a, b, c) = foo(); writeln(a, b, c); // 000 TypeTuple!(a, b, c) = foo(); writeln(a, b, c); // 123 } One of the points of a good tuple syntax is to n

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Dicebot: int a, b, c; tuple(a, b, c) = foo(); writeln(a, b, c); // 000 TypeTuple!(a, b, c) = foo(); writeln(a, b, c); // 123 } One of the points of a good tuple syntax is to not need to define the variables before (because in several c

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Chris Williams
On Monday, 24 March 2014 at 16:17:52 UTC, Andrei Alexandrescu wrote: On 3/24/14, 12:53 AM, Chris Williams wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei http://goo.gl/TaZTNB Nice! Why assert(ret != 0)? A

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread dnspies
Whoops, wrong "original" version. That was the one before I understood the game. Here mine is fixed (but up to 180 lines - 16 labels = 164 instructions): http://goo.gl/wjIAVm On Monday, 24 March 2014 at 17:14:11 UTC, dnspies wrote: It seems like mine wasn't being inlined because I had carele

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread dnspies
It seems like mine wasn't being inlined because I had carelessly replaced char[] with const(char)[] in the function signature (I don't know why that should make a difference, but it does) Going back to my original version (with Andre's trick to avoid letting the loop unroll), I get dnspies_or

Re: Should we deprecate comma?

2014-03-24 Thread Dicebot
On Monday, 24 March 2014 at 16:59:37 UTC, bearophile wrote: void foo(in auto tuple(a, b, c)) {} This snippet does not make any sense.

Re: Should we deprecate comma?

2014-03-24 Thread Dicebot
On Monday, 24 March 2014 at 16:57:09 UTC, bearophile wrote: So you are saying you want to support a syntax like this? tuple(a, b, c) = myFunc(); Bye, bearophile This actually almost works: auto foo() { return tuple(1, 2, 3); } void main() { int a, b, c; tupl

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
So you are saying you want to support a syntax like this? tuple(a, b, c) = myFunc(); And: foreach (tuple(a, b, c); myTuples) {} void foo(in auto tuple(a, b, c)) {} Bye, bearophile

Re: Should we deprecate comma?

2014-03-24 Thread bearophile
Andrei Alexandrescu: Look at some of the syntaxes here: http://wiki.dlang.org/DIP32#Use_case_of_uniform_tuple_syntax One of the syntaxes: @{} @{a} @{a, b} @{a, b, c} WTF??? tuple() tuple(a) tuple(a, b) tuple(a, b, c) Andrei So you are saying you want to support a syntax like this? tupl

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread John Colvin
On Monday, 24 March 2014 at 16:41:02 UTC, John Colvin wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei On a bigendian machine with loose alignment requirements (1 byte), you can do this Same again, but for

Re: Should we deprecate comma?

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 5:25 AM, w0rp wrote: Please kill the comma operator with fire. Is is just bad. On Monday, 24 March 2014 at 12:20:11 UTC, Marc Schütz wrote: Or, if you really want to distinguish them, this would work: (1,2)two-element tuple (1,) one-element tuple (1) simple expression

Re: Should we deprecate comma?

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 5:44 AM, bearophile wrote: w0rp: I am a regular Python user, and I advise against using this syntax for tuples. I have been bitten many times by something which I thought was a tuple becoming an expression and something I thought was a simple expression becoming a tuple. I agree,

Re: Should we deprecate comma?

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 5:35 AM, "Marc Schütz" " wrote: 1. How frequent is the breakage? Is most code going to still work? 100x Very infrequent, judging by other peoples' repsonses here, and the fact that there were only a handful of places in all of druntime and Phobos. Breaking druntime and phobos in m

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread John Colvin
On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei On a bigendian machine with loose alignment requirements (1 byte), you can do this, which is down to 13 instructions on x86 (which is of course meaningless, what with

Re: dynamic library building and loading

2014-03-24 Thread Etienne
On Tuesday, 18 June 2013 at 20:23:42 UTC, 1100110 wrote: On 06/18/2013 10:14 AM, Bottled Gin wrote: Actually, I seriously doubt everything is working as expected. For example, what happens when an application loads (via dlopen or similar) a D dynamic library: * Are exception handlers registe

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 5:51 AM, w0rp wrote: On Monday, 24 March 2014 at 09:02:19 UTC, monarch_dodra wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Before we roll this out, could we discuss a strategy/guideline in rega

Re: Should we deprecate comma?

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 5:18 AM, "Marc Schütz" " wrote: On Monday, 24 March 2014 at 04:00:14 UTC, Andrei Alexandrescu wrote: On 3/23/14, 8:30 PM, bearophile wrote: How is this more limited change affecting possible future syntax usage of commas for tuples? :-) The change has an eye to that. Disallowing t

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 3:30 AM, dnspies wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Ok, I managed to make it smaller. I think this is the smallest so far with only 23 instructions (no loop unrolling in this one):

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Vladimir Panteleev
On Monday, 24 March 2014 at 16:31:42 UTC, Andrei Alexandrescu wrote: On 3/24/14, 2:02 AM, monarch_dodra wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Before we roll this out, could we discuss a strategy/gu

Re: Should we deprecate comma?

2014-03-24 Thread Kagamin
On Sunday, 23 March 2014 at 20:56:45 UTC, Andrei Alexandrescu wrote: Discuss: https://github.com/D-Programming-Language/dmd/pull/3399 Andrei I like comma operator and use often in my code, it's a very nice syntactic construct for mini-statements. if(len<=optlen)opti=i, optj=j, optlen=len;

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 2:02 AM, monarch_dodra wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Before we roll this out, could we discuss a strategy/guideline in regards to detecting and handling invalid UTF sequences?

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 1:56 AM, dnspies wrote: On Monday, 24 March 2014 at 08:06:53 UTC, dnspies wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Here's mine (the loop gets unrolled): dchar front(const char[] s) { as

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 1:06 AM, dnspies wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei Here's mine (the loop gets unrolled): dchar front(const char[] s) { assert(s.length > 0); byte c = s[0]; dchar res = cast

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread Andrei Alexandrescu
On 3/24/14, 12:53 AM, Chris Williams wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei http://goo.gl/TaZTNB Nice! Why assert(ret != 0)? Andrei

Re: OS X GUI library

2014-03-24 Thread John Colvin
On Monday, 24 March 2014 at 16:07:33 UTC, Nikos wrote: On Saturday, 15 February 2014 at 01:43:20 UTC, Anton wrote: On Friday, 14 February 2014 at 18:50:21 UTC, Russel Winder wrote: I have to admit I departed D + QtD for Go + goqml since the former needs effort and the latter has got it. Howeve

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread John Colvin
On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei http://forum.dlang.org/post/fsgdviklnbugdzjsg...@forum.dlang.org

Re: OS X GUI library

2014-03-24 Thread Nikos
On Saturday, 15 February 2014 at 01:43:20 UTC, Anton wrote: On Friday, 14 February 2014 at 18:50:21 UTC, Russel Winder wrote: I have to admit I departed D + QtD for Go + goqml since the former needs effort and the latter has got it. However I have conflict with this as I much prefer D over Go

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread John Colvin
On Monday, 24 March 2014 at 15:32:09 UTC, John Colvin wrote: On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei I've probably missed something, but here's 15 instructions: http://goo.gl/d3Mgj0 woops yeah, that's com

Re: Challenge: write a really really small front() for UTF8

2014-03-24 Thread John Colvin
On Sunday, 23 March 2014 at 21:23:18 UTC, Andrei Alexandrescu wrote: Here's a baseline: http://goo.gl/91vIGc. Destroy! Andrei I've probably missed something, but here's 15 instructions: http://goo.gl/d3Mgj0 Also, I contacted the owner of d.godbolt.org and hopefully we'll have a more up-to

  1   2   >