Re: DConf 2014 Day 1 Talk 2
On Tuesday, 3 June 2014 at 16:43:32 UTC, Andrei Alexandrescu wrote: https://news.ycombinator.com/newest http://www.reddit.com/r/programming/comments/277k5c/dconf_2014_day_1_talk_2_templates_in_the_wild_a/ Andrei One thing that positively surprised me is how deep into advanced D features some snippets go. Back when I was doing C++ usage of any overly advanced template tricks was highly discouraged with a reasoning that it will make application non-maintainable by anyone else but original author and it will eventually crush under technical debt. The fact that D makes it possible to actually use the language power in team with varying proficiency level and still move forward successfully - that is a great indicator of design success alone.
Re: Chuck Allison's talk is up
On Thursday, 5 June 2014 at 21:15:40 UTC, Olivier Henley wrote: On Thursday, 5 June 2014 at 16:33:49 UTC, Andrei Alexandrescu wrote: https://news.ycombinator.com/newest http://www.reddit.com/r/programming/comments/27e5d7/dconf_day_1_talk_3_a_real_d_in_programming/ https://www.facebook.com/dlang.org/posts/860528800627469 https://twitter.com/D_Programming/status/474587858812948480 Andrei Hi, I would love to spam my colleges here at Ubisoft Montreal with DConf 2014 talks ... but UStream is blocked studio wide. Is there any plans to mirror the talks somewhere else? We can stream from Vimeo and Youtube. I am adding inofficial YouTube mirrors within few days from original publication. This one will be uploaded in an hour or so ;)
Re: Chuck Allison's talk is up
http://youtu.be/ymoIx3klQ6M
Re: Adam D. Ruppe's D Cookbook now available!
On Thursday, 5 June 2014 at 17:48:44 UTC, Jacob Carlborg wrote: On 2014-06-05 11:25, Chris wrote: My hard copy arrived today. Now I can read it anywhere I like ;) Funnily enough, it's only the second book about D and still I've been more productive in D than in any other language, languages for which thousands of titles are available. There's a book about D1 and Tango as well. Also some Chinese book, or that might have been a translation. There's Ali's online tutorial, of course. Great stuff. But a cookbook was really the thing I needed. Just to pick it up and to know How to send an email is great. A lot of stuff here on the forum is about language design, which made D what it is. However, a lot of things in programming are plain and simple everyday problems like having your program send an email. I recently told a coworker to have a look at D and maybe use it for his number crunching algorithms. You can get far in D without templates, mixins and ranges. You don't need to learn them before you can use the language. You learn about them as you go along. You can dig right in. Maybe that's part of the reasons why people are reluctant to use D. They think you have to be a rocket scientist to write a program. You don't. But it will turn you into one :-)
Re: Chuck Allison's talk is up
On Thursday, 5 June 2014 at 16:33:49 UTC, Andrei Alexandrescu wrote: https://news.ycombinator.com/newest http://www.reddit.com/r/programming/comments/27e5d7/dconf_day_1_talk_3_a_real_d_in_programming/ https://www.facebook.com/dlang.org/posts/860528800627469 https://twitter.com/D_Programming/status/474587858812948480 Andrei I don't know if Chuck reads this thread but one thing I totally forgot to ask him during DConf is why he does not start with introduction to range concept before proceeding to somewhat more complicated thread / fiber streams with similar semantics. Or it is something assumed trivial and thus not mentioned? :)
Re: Interview at Lang.NEXT
On Thursday, 5 June 2014 at 13:32:16 UTC, Bill Baxter via Digitalmars-d-announce wrote: On Thu, Jun 5, 2014 at 2:42 AM, Jonathan M Davis via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Though I confess what horrifies me the most about dynamic languages is code like this if(cond) var = hello world; else var = 42; The fact that an if statement could change the type of a variable is just atrocious IMHO. Yeh, that's possible, but that doesn't look like something anyone with any sense would do. The things I found most enjoyable about working on javascript were 1) REPL / fully interactive debugger When you hit a break point you can just start typing regular js code into the console to poke the state of your system. And the convenience of the REPL for seeing what bits of code do as you write them. That's an advantage of an interpreted language, regardless of typing. 2) Duck typing / introspection ability If you have a bunch of objects that have a .width property, and that's all you care about, you can just look for that. No need to declare an IWidthHaver interface and make all of your objects declare that they implement it. D's ranges are examples of this in a statically typed language. You don't care what the type of the range is, just so long as it has the right api.
Re: Chuck Allison's talk is up
You can download trough this page http://offliberty.com/ without any additional plugins. Just pate the ustream url.
Re: D Hackday this Friday
On Monday, 2 June 2014 at 17:41:10 UTC, Jonathan Crapuchettes wrote: After Andrei's call for reducing pull requests and current issues associated with D, the data department at EMSI is doing a Fix D Issues Day this Friday and we would like to invite the D community to join us. Let's get those bugs below the 2000 mark! --- Jonathan Crapuchettes, Justin Whear, Brian Schott So is the plan to just comb over the issue tracker and fix easy issues and close resolved or invalid issues?
Re: D Hackday this Friday
On Friday, 6 June 2014 at 16:29:13 UTC, Brad Anderson wrote: On Monday, 2 June 2014 at 17:41:10 UTC, Jonathan Crapuchettes wrote: After Andrei's call for reducing pull requests and current issues associated with D, the data department at EMSI is doing a Fix D Issues Day this Friday and we would like to invite the D community to join us. Let's get those bugs below the 2000 mark! --- Jonathan Crapuchettes, Justin Whear, Brian Schott So is the plan to just comb over the issue tracker and fix easy issues and close resolved or invalid issues? I somehow mixed up comb through and pore over into a Trumpian conflation.
Re: D Hackday this Friday
On Fri, 06 Jun 2014 16:29:11 +, Brad Anderson wrote: On Monday, 2 June 2014 at 17:41:10 UTC, Jonathan Crapuchettes wrote: After Andrei's call for reducing pull requests and current issues associated with D, the data department at EMSI is doing a Fix D Issues Day this Friday and we would like to invite the D community to join us. Let's get those bugs below the 2000 mark! --- Jonathan Crapuchettes, Justin Whear, Brian Schott So is the plan to just comb over the issue tracker and fix easy issues and close resolved or invalid issues? We have a company BBQ for lunch ...and free beer in the afternoon ...and my parents are coming into town, so I'm sticking with easy fixes this time around.
Re: Chuck Allison's talk is up
On Friday, 6 June 2014 at 00:24:49 UTC, Andrei Alexandrescu wrote: On 6/5/14, 11:15 PM, Olivier Henley wrote: I would love to spam my colleges here at Ubisoft Montreal with DConf 2014 talks ... but UStream is blocked studio wide. Is there any plans to mirror the talks somewhere else? We can stream from Vimeo and Youtube. Try https://archive.org/details/dconf2014-day01-talk03 p.s: My boss already agreed that I code my next tool in D. I'll let you know in due time... Fantastic. Keep us posted! -- Andrei archive.org works. Thank you. Olivier
Re: D Hackday this Friday
On Fri, 06 Jun 2014 12:30:57 -0400, Brad Anderson e...@gnuk.net wrote: On Friday, 6 June 2014 at 16:29:13 UTC, Brad Anderson wrote: On Monday, 2 June 2014 at 17:41:10 UTC, Jonathan Crapuchettes wrote: After Andrei's call for reducing pull requests and current issues associated with D, the data department at EMSI is doing a Fix D Issues Day this Friday and we would like to invite the D community to join us. Let's get those bugs below the 2000 mark! --- Jonathan Crapuchettes, Justin Whear, Brian Schott So is the plan to just comb over the issue tracker and fix easy issues and close resolved or invalid issues? I somehow mixed up comb through and pore over into a Trumpian conflation. Trumpian conflation LOL -Steve
Re: DConf 2014 Day 1 Talk 2
On Fri, 06 Jun 2014 02:57:47 -0400, Dicebot pub...@dicebot.lv wrote: On Tuesday, 3 June 2014 at 16:43:32 UTC, Andrei Alexandrescu wrote: https://news.ycombinator.com/newest http://www.reddit.com/r/programming/comments/277k5c/dconf_2014_day_1_talk_2_templates_in_the_wild_a/ Andrei One thing that positively surprised me is how deep into advanced D features some snippets go. Back when I was doing C++ usage of any overly advanced template tricks was highly discouraged with a reasoning that it will make application non-maintainable by anyone else but original author and it will eventually crush under technical debt. The fact that D makes it possible to actually use the language power in team with varying proficiency level and still move forward successfully - that is a great indicator of design success alone. Yes, and that is a very common theme amongst all the talks at dconf. -Steve
Re: D Hackday this Friday
On 6/6/2014 12:30 PM, Brad Anderson wrote: On Friday, 6 June 2014 at 16:29:13 UTC, Brad Anderson wrote: So is the plan to just comb over the issue tracker and fix easy issues and close resolved or invalid issues? I somehow mixed up comb through and pore over into a Trumpian conflation. :) The bugtracker has a receding hairline, but the wig plugin doesn't quite fit the site.
Re: Interview at Lang.NEXT
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei OK I noticed that I messed up in answering. I was saying that you 2 seems to be confused between LLVM and clang.
Offtopic: AMA (Was: Interview at Lang.NEXT)
On 6/4/14, 3:19 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei This is offtopic, but why are people obsessed with writing English acronyms? I always have to lookup the meaning and then I'm polluting my head with acronyms. Is there any difference in time/convenience between writing Interviewee here. Ask me anything Between Interviewee. AMA? :-(
Re: Interview at Lang.NEXT
On Wednesday, 4 June 2014 at 22:02:37 UTC, Adam D. Ruppe wrote: Yeah, I'm generally against it... but I have a weird view of typing. The way I see it, you should go either strong and static or dynamic and weak - I hate the middle ground. So, in my view: Best (like D): string a = 10; int b = 20; a + b; // compile time error: cannot do string + int Sometimes ok (my jsvar/script language also PHP and some others): var a = 10; var b = 20; a + b; // 30 Blargh (javascript): var a = 10; var b = 20; a + b; // 1020 Hatred: var a = 10; var b = 20; a + b; // throws an exception at run time Yup, you choose the right tradeoff. I wish std.json has something in the same style as our jsvar. The D one is best because it draws your attention to something that is imperfect immediately and reliably via a compilation error. Then you can solve it with to!int or whatever easily. The weak+dynamic is passable to me because it actually mostly works. The operator you choose coerces the arguments and gives something basically usable. I'd be ok if it threw an exception in the case of a string that cannot be sanely converted to int, but if it can be made to work, just do it. We all have to handle JSON or XML or some other thing like that at some point. When it come to these, having variant typing is huge for ease of use.
Re: Offtopic: AMA (Was: Interview at Lang.NEXT)
On 6/6/14, 5:25 PM, Tourist wrote: On Friday, 6 June 2014 at 19:27:35 UTC, Ary Borenszweig wrote: On 6/4/14, 3:19 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei This is offtopic, but why are people obsessed with writing English acronyms? I always have to lookup the meaning and then I'm polluting my head with acronyms. Is there any difference in time/convenience between writing Interviewee here. Ask me anything Between Interviewee. AMA? :-( AMA is kinda reddit thing. http://www.reddit.com/r/IAmA/comments/1nl9at/i_am_a_member_of_facebooks_hhvm_team_a_c_and_d/ Interesting, I didn't know that. Thanks!
Re: Offtopic: AMA (Was: Interview at Lang.NEXT)
On Friday, 6 June 2014 at 19:27:35 UTC, Ary Borenszweig wrote: On 6/4/14, 3:19 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei This is offtopic, but why are people obsessed with writing English acronyms? I always have to lookup the meaning and then I'm polluting my head with acronyms. Is there any difference in time/convenience between writing Interviewee here. Ask me anything Between Interviewee. AMA? :-( AMA is kinda reddit thing. http://www.reddit.com/r/IAmA/comments/1nl9at/i_am_a_member_of_facebooks_hhvm_team_a_c_and_d/
Re: Offtopic: AMA (Was: Interview at Lang.NEXT)
On Friday, 6 June 2014 at 20:27:45 UTC, Ary Borenszweig wrote: On 6/6/14, 5:25 PM, Tourist wrote: On Friday, 6 June 2014 at 19:27:35 UTC, Ary Borenszweig wrote: AMA is kinda reddit thing. http://www.reddit.com/r/IAmA/comments/1nl9at/i_am_a_member_of_facebooks_hhvm_team_a_c_and_d/ Interesting, I didn't know that. Thanks! What gets me is that there are two acronyms to learn. IAMA = I Am A AMA = Ask Me Anything So: I'm doing an IAMA, AMA. For a while, I thought people were just lazy and AMA was just the 'am a part.
Re: Offtopic: AMA (Was: Interview at Lang.NEXT)
On Friday, 6 June 2014 at 19:27:35 UTC, Ary Borenszweig wrote: On 6/4/14, 3:19 AM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/27911b/conversation_with_andrei_alexandrescu_all_things/ Andrei This is offtopic, but why are people obsessed with writing English acronyms? I always have to lookup the meaning and then I'm polluting my head with acronyms. Is there any difference in time/convenience between writing Interviewee here. Ask me anything Between Interviewee. AMA? :-( Its all the fault of people texting on their cell phones and the like! Too much work to write proper English words. Amirite?
Re: Swift is based LLVM,what will the D's LDC do?
Am Thu, 05 Jun 2014 14:30:40 + schrieb Dicebot pub...@dicebot.lv: On Thursday, 5 June 2014 at 14:01:43 UTC, bioinfornatics wrote: On Thursday, 5 June 2014 at 06:40:17 UTC, Walter Bright wrote: On 6/4/2014 9:25 AM, Iain Buclaw via Digitalmars-d wrote: This likewise gdc too. All you need to do is look at the downloads page on dlang.org ! It still says nothing about doing: sudo apt-get install gdc on Ubuntu! Why keep it a secret? :-) On Fedora sudo yum install ldc ;-) pacman -Sy dlang-ldc pacman -Sy dlang-gdc ;) Late for the show! On Gentoo: layman -a dlang emerge dmd ldc2 gcc[d] -- Marco
Re: Will std.experimental be shipped with DMD zip package?
On Thursday, 5 June 2014 at 16:57:53 UTC, Andrei Alexandrescu wrote: On 6/5/14, 1:08 PM, uri wrote: I assume it will but thought I'd ask all the same... I only use the latest official release and would still like to bash on std.experimental modules so I hope it will be in 2.066.zip. Thanks, uri std.experimental should come with the default installation. -- Andrei terrific, thanks
Re: Using up-to-date GDC [was Re: Swift is based LLVM,what will the D's LDC do?]
Am Thu, 5 Jun 2014 22:47:15 +0200 schrieb Johannes Pfau nos...@example.com: archlinux has a 'pragmatic' approach regarding licenses patents anyway. They also ship libdvdcss, mesa with --enable-texture-float, all multimedia codec packages are in the standard repos etc. On Gentoo, due to the compile-from-source mentality the user has the option to enable patented algorithms for their personal use. Enabling these flags comes with a warning, that the resulting binaries must not be redistributed. That way the distribution stays safe from legal issues and the end user doesn't miss out on relevant features. (Unless their hatred for software patents makes them unable to swallow their pride, that is :) ) -- Marco
Re: Make std.container.Array an output range
05-Jun-2014 17:51, Rene Zwanenburg пишет: I depend heavily on RAII in a project I'm working on. Since structs in dynamic arrays never have their destructors called I'm using Array!T instead. A pattern that comes up often is that I have some input range of T's which need to be stored in a member Array!T. However Array is not an output range so I can't use inputRange.copy(someArray); I understand the difference between a container and a range iterating over that container. However I do think a container is an output range. Should I file an enhancement request or is there something fundamentally wrong with this idea? For Array it should be as simple as adding alias doPut = insertBack; I think we all understand that not every container has one and holy insertion policy. How about adding Array.backInserter ? -- Dmitry Olshansky
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 00:34:19 UTC, Jonathan M Davis via Digitalmars-d wrote: And like with them, it's impossible to use ref for this, because you can't use ref with variadic template arguments. Wait what? void foo(T...)(ref T args) { args[0] = 42; } void main() { int x; foo(x); assert(x == 42); }
Just curious: who do know current purity rules?
As Kenji Hara just created purity fixing pull [1] we will probably soon have more intuitive rules so it's interesting who do understand current purity rules. The following code is proposed to check your understanding: --- alias F = bool function(int) pure; alias D = bool delegate(int) pure; D foo1(immutable F f) pure { return x = (*f)(x); } // ok or error? D foo2(const F f) pure { return x = (*f)(x); } // ok or error? D foo1(immutable F* f) pure { return x = (*f)(x); } // ok or error? D foo2(const F* f) pure { return x = (*f)(x); } // ok or error? --- Who passes this test? By pass I mean completely understand what the compiler do and why. By the way, personally I would fail the test. ) [1] [spoiler!] https://github.com/D-Programming-Language/dmd/pull/3626 -- Денис В. Шеломовский Denis V. Shelomovskij
Re: (git HEAD) std.datetime spewing deprecation messages
It happens regularly with posts going through mailman.
Re: Just curious: who do know current purity rules?
Do you mean true purity rules or whatever is implemented in the compiler?
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 08:58:44 UTC, Kagamin wrote: It happens regularly with posts going through mailman. It happens sometimes. Jonathan's post have been doing it *every time* in the last couple of days...
Re: (git HEAD) std.datetime spewing deprecation messages
On Fri, 06 Jun 2014 08:14:13 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 00:34:19 UTC, Jonathan M Davis via Digitalmars-d wrote: And like with them, it's impossible to use ref for this, because you can't use ref with variadic template arguments. Wait what? void foo(T...)(ref T args) { args[0] = 42; } void main() { int x; foo(x); assert(x == 42); } Well, that's new then. You didn't used to be able to do that. I clearly missed that change. Thanks for the correction. I'd still use pointers in this case though, since it's clearer and consistent with existing code like getopt. - Jonathan M Davis
Re: Will std.experimental be shipped with DMD zip package?
On Thursday, 5 June 2014 at 16:57:53 UTC, Andrei Alexandrescu wrote: On 6/5/14, 1:08 PM, uri wrote: I assume it will but thought I'd ask all the same... I only use the latest official release and would still like to bash on std.experimental modules so I hope it will be in 2.066.zip. Thanks, uri std.experimental should come with the default installation. -- Andrei That's what I guessed but it never hurts to ask :) Cheers, uri
Re: (git HEAD) std.datetime spewing deprecation messages
On Fri, 06 Jun 2014 09:21:56 + monarch_dodra via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 08:58:44 UTC, Kagamin wrote: It happens regularly with posts going through mailman. It happens sometimes. Jonathan's post have been doing it *every time* in the last couple of days... Hmmm. It looks like it works fine when I post from home but consistently gets screwed up when I post from work. I have to interact with the web interface for my e-mail client at work for sending messages, because stupdily, SMTP is blocked (so sending from my local client doesn't work), and something about that process seems to have recently stopped working properly with threading. I may have to stop posting from work for the time being. :| - Jonathan M Davis
Re: [OT] Extra time spent
On Friday, 6 June 2014 at 04:02:22 UTC, deadalnix wrote: On Friday, 6 June 2014 at 02:21:45 UTC, Nick Sabalausky wrote: On 6/5/2014 6:08 PM, deadalnix wrote: On Thursday, 5 June 2014 at 14:11:32 UTC, H. S. Teoh via Digitalmars-d wrote: Ha! Though, truth be told, I can't stand modern pop music. My (completely unfounded) belief is that nobody *truly* likes that stuff. ;) That is not unfounded. When you ship music via hardware like CD, having a lot of choice cost money. So you need to have a large localized public (as nobody will drive 200km to buy a disc). As a result, the most economically efficient music is the not the one that some people like the most, but the one that people dislike the least. The same goes for broadcast medias like TV. Obviously, the internet era tend to change that quite a bit and people tend to be more selective over time. True, true. People were used to drinking shit beer. Now that there is a craft beer revolution and people _do_ have a choice, they choose the good stuff over the big standard brands. It is true, in most cases it is not it's good, I like it, it's ok, it's the best of the worst, that's why I buy it. Funny enough, some people defend shit, only because they're used to it. Amazing. I always go for metal, goa trance and alike. That keep my lizard brain quiet while my higher cognitive capacity are at work. Right now Gamma Ray - Powerplant Yea, I'm similar. It seems kinda weird (even to me), but the heavier, faster, louder stuff often helps me stay in the zone. If I don't have music, or if I play smooth jazz (which I do normally quite like), then my mind will start to wander. My coding music lately has been anywhere between not-entirely-mainstream rock/pop/electronic to industrial metal. Like Kotoko, KMFDM, Thrill Kill Kult, Manson, Crystal Method, Queensryche, Ohgr/Skinny Puppy, Daft Punk's latest album, etc. Largely stuff that would probably make most people go How does that not distract you? Somehow it manages to keep me from distracting myself. Distracting myself. Yes, that is exactly it :D
D Grammar in BNF Text Form?
Can anyone point me to a text version of the D grammar in some kind of BNF or EBNF format? The D lang web site's info is close, but it's buried in html which I'ld rather not have to wrestle with. My purpose is to attempt to write a D language parser in Perl using Damian Conway's Regex::Grammars module (on CPAN). Thanks. Best regards, -Tom
Re: Digital Mars purchase trouble?
Am 06.06.2014 05:19, schrieb K.K.: Hey I know this isn't the perfect place to ask this but... Has anyone else had trouble ordering from Digital Mars? I particularly ordered the Utility package. The site took my order on paypal fine but then I never got anything after that. So I tried emailing wgma...@digitalmars.com about it, and the email bounced back. That's a bit of a fuck over... :\ Anyone else have this trouble? No idea what happened with the order process, but you could try walter instead of wgmars7 to get in contact. I'd also mention the invalid e-mail address, he is probably not aware of it.
Re: D Grammar in BNF Text Form?
On Friday, 6 June 2014 at 10:30:14 UTC, Tom Browder via Digitalmars-d wrote: Can anyone point me to a text version of the D grammar in some kind of BNF or EBNF format? The D lang web site's info is close, but it's buried in html which I'ld rather not have to wrestle with. My purpose is to attempt to write a D language parser in Perl using Damian Conway's Regex::Grammars module (on CPAN). Thanks. Best regards, -Tom Check Brian Schott's work: https://github.com/Hackerpilot/DGrammar
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 09:35:56 UTC, Jonathan M Davis via Digitalmars-d wrote: On Fri, 06 Jun 2014 08:14:13 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 00:34:19 UTC, Jonathan M Davis via Digitalmars-d wrote: And like with them, it's impossible to use ref for this, because you can't use ref with variadic template arguments. Wait what? void foo(T...)(ref T args) { args[0] = 42; } void main() { int x; foo(x); assert(x == 42); } Well, that's new then. You didn't used to be able to do that. I clearly missed that change. Thanks for the correction. I'd still use pointers in this case though, since it's clearer and consistent with existing code like getopt. - Jonathan M Davis And strongly @system.
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 5:32 AM, Philpax via Digitalmars-d digitalmars- On Friday, 6 June 2014 at 10:30:14 UTC, Tom Browder via Digitalmars-d wrote: Can anyone point me to a text version of the D grammar in some kind of BNF or EBNF format? The D lang web site's info is close, but it's buried in html which I'ld rather not have to wrestle with. ... Check Brian Schott's work: https://github.com/Hackerpilot/DGrammar The file there named 'D.g4' seems to be almost exactly what I'm looking for. Thanks, Brian! Best, -Tom P.S. My work on the Perl parser (and BRL-CAD D bindings) can be seen on the BRL-CAD project site at: http://sourceforge.net/p/brlcad/code/HEAD/tree/brlcad/branches/d-binding/misc/d-bindings/
Re: D Users Survey: Primary OS?
On Thu, May 29, 2014 at 10:53 AM, Tom Browder tom.brow...@gmail.com wrote: Has anyone done a survey of the primary OS of D users? Perhaps the D Wiki could be used as an official D user registration site. Right now all persons with an account could be assumed to be D users, and, with a bit of Wiki magic, a verified e-mail. and some profile info, Andrei could have a good source for stats for his State of the Struct address to Dconf next year. Best regards, -Tom
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 10:35:58 UTC, monarch_dodra wrote: On Friday, 6 June 2014 at 09:35:56 UTC, Jonathan M Davis via Digitalmars-d wrote: On Fri, 06 Jun 2014 08:14:13 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 00:34:19 UTC, Jonathan M Davis via Digitalmars-d wrote: And like with them, it's impossible to use ref for this, because you can't use ref with variadic template arguments. Wait what? void foo(T...)(ref T args) { args[0] = 42; } void main() { int x; foo(x); assert(x == 42); } Well, that's new then. You didn't used to be able to do that. I clearly missed that change. Thanks for the correction. I'd still use pointers in this case though, since it's clearer and consistent with existing code like getopt. - Jonathan M Davis And strongly @system. This alone is absolutely blocking objection against pointer-based decomposition in my opinion. Liked simple design with returning struct most.
Re: D Users Survey: Primary OS?
On 6/06/2014 10:56 p.m., Tom Browder via Digitalmars-d wrote: On Thu, May 29, 2014 at 10:53 AM, Tom Browder tom.brow...@gmail.com wrote: Has anyone done a survey of the primary OS of D users? Perhaps the D Wiki could be used as an official D user registration site. Right now all persons with an account could be assumed to be D users, and, with a bit of Wiki magic, a verified e-mail. and some profile info, Andrei could have a good source for stats for his State of the Struct address to Dconf next year. Best regards, -Tom Doesn't the issue tracker verify email and have profile info already? If so we could use that as the registration mechanism. Instead of some custom thing.
Re: What's going on with std.experimental.lexer?
On Thu, 05 Jun 2014 10:57:35 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 4 June 2014 at 21:12:25 UTC, Brian Schott wrote: I've been looking at ways to optimize the D lexer's operation using SIMD instructions. I'm not yet sure if I'll need to change the lexer generator's API to do this. I'm going to wait until I have my proof-of-concept code and some benchmark results before asking for a voting thread or creating a pull request. I still thing we should use it more like `std.staging` - once your updates are ready, go through review/voting and keep module in `std.experimental` for at least one DMD release before adding to Phobos core. This also means relaxing API requirements a lot for initial inclusion. Yeah. std.experimental really should be for stuff that's gone through the review process and is essentially ready for inclusion in Phobos but needs more real world usage to make sure that it really is fully ready to be merged into std and then have its API frozen. It really doesn't make any sense to put anything that's in more flux than that in there, because the release cycle is just way too long for it. Now, Brian's lexer might effectively be at that point already, I don't know. It's been reviewed before, but I generally haven't had much time to look it over for those reviews and don't know what state it's currently in. So, if its API is close enough to final at this point, then it could probably be put in std.experimental, but if it's still in a lot of flux, then that probably isn't appropriate. We do need to figure out what the official process is on this though so that it's clear when it's appropriate for something to go in std.experimental, otherwise we'll have folks who keep trying to put stuff in there which really isn't ready yet, and we'll keep end up arguing over what can and can't go in there. - Jonathan M Davis
Re: D Users Survey: Primary OS?
On Fri, Jun 6, 2014 at 6:01 AM, Rikki Cattermole via Digitalmars-d digitalmars-d@puremagic.com wrote: Doesn't the issue tracker verify email and have profile info already? If so we could use that as the registration mechanism. Instead of some custom thing. Perhaps, but for normal users the bugzilla interface may be confusing, and I'm betting the wiki will be easier to modify than bugzilla. -Tom
Re: D Grammar in BNF Text Form?
On 06/06/2014 12:29 PM, Tom Browder via Digitalmars-d wrote: Can anyone point me to a text version of the D grammar in some kind of BNF or EBNF format? The D lang web site's info is close, but it's buried in html which I'ld rather not have to wrestle with. My purpose is to attempt to write a D language parser in Perl using Damian Conway's Regex::Grammars module (on CPAN). Thanks. Best regards, -Tom The site says it creates recursive decent parser. D does not even fit into lalr1. So it will not work, unless you can inject handwritten parse function for the critical parts
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 7:00 AM, Robert Schadek via Digitalmars-d digitalmars-d@puremagic.com wrote: On 06/06/2014 12:29 PM, Tom Browder via Digitalmars-d wrote: ... My purpose is to attempt to write a D language parser in Perl using Damian Conway's Regex::Grammars module (on CPAN). ... The site says it creates recursive decent parser. D does not even fit into lalr1. So it will not work, unless you can inject handwritten parse function for the critical parts I'm not denying all you say, and I certainly am no expert, but I believe Dr. Conway's module can handle D with some effort. Best, -Tom
Re: (git HEAD) std.datetime spewing deprecation messages
On Thu, 05 Jun 2014 18:42:29 -0400, Brad Anderson e...@gnuk.net wrote: On Thursday, 5 June 2014 at 22:06:02 UTC, monarch_dodra wrote: On Thursday, 5 June 2014 at 08:49:18 UTC, Jonathan M Davis via Digitalmars-d long days; int seconds; short msecs; d.split!(days, seconds, msecs)(days, seconds, msecs); Please don't use pass-by-pointer in D APIs. It makes it a real *nightmare* to ever use the code in a safe context. Besides, we have ref. The only arguments for pass by pointer afaik are: - retain existing/C api (1) - allow null pointers (2) (1) is not applicable, I think. (2) would only make sense if split did not have a template parameter, and took all arguments, and only filled the non-null ones. So, please make these pass by ref. Even better than ref would be out which guarantees that the input parameter values do not affect the function. I think that would be 'out' -Steve
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 09:47:24 UTC, Jonathan M Davis via Digitalmars-d wrote: I may have to stop posting from work for the time being. :| I understand it may not be ideal from the perspective of your usual NG workflow, but maybe the forum interface could offer some relief? -Wyatt
Re: SurveyMonkey for D users OS - Results
On 04/06/2014 19:58, Benjamin Thaut wrote: Am 31.05.2014 15:37, schrieb Abdulhaq: There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits: 3 Mac: 7 Thats a lot more windows users then I would have expected. I suspect a lot of them could be D newbies, lurkers, or otherwise people who don't code in D that much. That's why I thought the NG poll was more interesting, so we could see who is voting for what. -- Bruno Medeiros https://twitter.com/brunodomedeiros
Re: (git HEAD) std.datetime spewing deprecation messages
On Thu, 05 Jun 2014 21:00:39 +0200, Jonathan M Davis via Digitalmars-d wrote: It's a common idiom in core.time and std.datetime to use strings to represent units when you need to give the units as template arguments. If it hade't been strings, it would have been an enum (otherwise, they would risk conflicting with local variables and whatnot), in which case it would have been even more verbose - e.g. Units.days, Unit.seconds, Unit.msecs (and IIRC, I originally had something like that until Anrei suggested that I use strings in the original review for std.datetime). Also, days, seconds, and msecs are free functions in core.time which forward to dur!days, dur!seconds, and dur!msecs, so trying to use them on their own would try and use those free functions, which obviously isn't what we want at all. I can see why you might want to remove the quotes, but they really aren't that bad, and using strings for this purpose has turned out to be extremely useful and flexible. - Jonathn M Davis Yeah its more of a pipe dream, kinda of how we have moved away from passing strings and use the short hand versions of lambdas. A CTFE helper might make it look better, saw this somewhere on the form. d.splitHelper!q{days, second, msecs}(...) the function name is not import here just the idea. There is a stdx project on code.dlang, might be a good place for little helpers like this.
Re: (git HEAD) std.datetime spewing deprecation messages
On Fri, 06 Jun 2014 12:49:42 + Wyatt via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 09:47:24 UTC, Jonathan M Davis via Digitalmars-d wrote: I may have to stop posting from work for the time being. :| I understand it may not be ideal from the perspective of your usual NG workflow, but maybe the forum interface could offer some relief? Maybe, but the problem is that it's my e-mail client (via IMAP) which keeps track of everything that I have and haven't read. Interacting with the forum at work and my e-mail client at home wouldn't work very well, though I could probably dig through the forum and figure out which post it is that I'm trying to reply to and reply in the forum. I'm sure that I can figure something out, but the situation is definitely a bit of a pain. I've never understood why my employer's IT department insists on blocking _outgoing_ ports. It's _really_ annoying to the employees and doesn't help with security except against machines which are already infected with something. It took us ages to get them to even open the outbound ssh port. - Jonathan M Davis
Re: [OT] Extra time spent
On 05/06/2014 18:44, Adam D. Ruppe wrote: (first best opera? https://www.youtube.com/watch?v=nEuf9ZSJrdg oh yeah ff6!) Lol. I was never a big fan of FF 6, or FF in general, but admittedly that opera scene was great, perhaps even my favorite FF moment! (I only played 3 FFs though) -- Bruno Medeiros https://twitter.com/brunodomedeiros
Re: [OT] Extra time spent
On Wednesday, 4 June 2014 at 17:57:16 UTC, Nick Sabalausky wrote: On 6/4/2014 7:59 AM, Dejan Lekic wrote: I humbly believe programmer who does not spend spare time reading literature related to his/her work is most likely going to lose the job at some point, as people who DO spend time in their self-education will take the place. I know from direct observational experience that, depending on the company, keeping one's job (or even getting one in the first place) is not always dependent on one's ability to actually do the job at all. (Heck, I've tutored CS 101 students, and even still: the worst code I've ever seen by far was NOT beginners, but was production code written by professionals whose jobs were nowhere near the chopping block.) Well, we both know that circumstances can be pretty chaotic in any company. I am not going to defend professionals who write bad code, but I am just saying that I can understand the stress, and all that goes together, especially if the person is senior. A typical scenario is when (top-level) manager (M) want thing yesterday, and tell senior engineer (SE) M: How long will it take? SE: Well, we did not even analyse the requirements for this feature. Let's spend some time brainstorming this first, and then I will be able to do better estimation. M: We have no time for that, and I think you already have all you need. SE: OK, 3 days. M: What??? We need this thing yesterday! SE: Well, I could do a quick hack... It will take 1 day, but we will not have time to test, no time for code quality, etc. M: DO IT!!! (that quick hack code stays there because next week another urgent thing came, and SE never had time to make the code better) Moral of the story: it is not SE whom we have to blame for bad code, it can easily be the management who made deliberate decision for that... That said, you're certainly right that continual self-education is very important (even if one's job isn't on the line).
Re: [OT] Extra time spent
On 04/06/2014 20:02, H. S. Teoh via Digitalmars-d wrote: On Wed, Jun 04, 2014 at 11:51:04AM -0700, Walter Bright via Digitalmars-d wrote: On 6/4/2014 11:36 AM, H. S. Teoh via Digitalmars-d wrote: On Wed, Jun 04, 2014 at 09:30:32AM -0700, Walter Bright via Digitalmars-d wrote: On 6/3/2014 11:38 PM, Jacob Carlborg wrote: I can't have music on at work I understand that. But can you have it on at a barely perceptible volume at your desk? That's usually enough for me. I find that music distracts my ability to think clearly, especially when coding or solving a complex algorithmic / mathematical problem. True for me, too. Which is why I prefer ambient music at low volume when coding, and sometimes even then I'll turn it off when faced with a difficult problem. It's strange, I find that even ambient music distracts me, yet the loud noise of an occasional passing train doesn't. Similarly, even whispers will distract me, but birds chirping, trees rustling, etc., don't. It's something about intelligible sounds that engage my brain somehow, that non-intelligible sounds don't have. So far, I haven't found anybody else who experiences the same thing. Have you tried these? http://www.di.fm/cosmicdowntempo http://www.di.fm/spacemusic http://www.di.fm/ambient They are my favorites when I am coding, they are relaxing in a way, but are not distracting cognitively. If I already figured out a problem, and are now just on a execution phase (writing code - but no major cognitive/creative work required), I often switch to more energetic styles: http://www.di.fm/psychill http://www.di.fm/goapsy http://www.di.fm/classictrance -- Bruno Medeiros https://twitter.com/brunodomedeiros
Re: SurveyMonkey for D users OS - Results
One 'other' vote was spoiled. It turns out that the free SurveyMonkey account only allows 100 votes max, but the profile has been much the same since 50 votes so I think the ratios are clear. Perhaps you should try http://www.surveygalaxy.com . That is what I use when I need a survey.
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 7:00 AM, Robert Schadek via Digitalmars-d digitalmars-d@puremagic.com wrote: The site says it creates recursive decent parser. D does not even fit into lalr1. So it will not work, unless you can inject handwritten parse function for the critical parts Do you know the k value for the D language grammar for a LALR(k) parser? -Tom
Re: Digital Mars purchase trouble?
On Friday, 6 June 2014 at 10:34:00 UTC, Sönke Ludwig wrote: Am 06.06.2014 05:19, schrieb K.K.: Hey I know this isn't the perfect place to ask this but... Has anyone else had trouble ordering from Digital Mars? I particularly ordered the Utility package. The site took my order on paypal fine but then I never got anything after that. So I tried emailing wgma...@digitalmars.com about it, and the email bounced back. That's a bit of a fuck over... :\ Anyone else have this trouble? No idea what happened with the order process, but you could try walter instead of wgmars7 to get in contact. I'd also mention the invalid e-mail address, he is probably not aware of it. Actually, Walter emailed me last night and sorted it out. Though, I still don't really know what happened with the order process... Maybe it was just bad luck?
Re: SurveyMonkey for D users OS - Results
On Wednesday, 4 June 2014 at 18:58:09 UTC, Benjamin Thaut wrote: Am 31.05.2014 15:37, schrieb Abdulhaq: There's been 100 votes and the results are: Linux 64 bits: 53 Linux 32 bits: 4 Windows 64 bits:27 Windows 32 bits: 3 Mac: 7 Thats a lot more windows users then I would have expected. I spend most of my days on Windows. At work it is company policy, unless one is doing iOS related development. At home, I got fed up tinkering GNU/Linux since my Slackware days (1995), as laptop support still tends to fall in some parts, namely graphics support, wireless chipsets and battery usage. -- Paulo
Re: [OT] Extra time spent
On Friday, 6 June 2014 at 13:24:22 UTC, Dejan Lekic wrote: On Wednesday, 4 June 2014 at 17:57:16 UTC, Nick Sabalausky wrote: On 6/4/2014 7:59 AM, Dejan Lekic wrote: I humbly believe programmer who does not spend spare time reading literature related to his/her work is most likely going to lose the job at some point, as people who DO spend time in their self-education will take the place. I know from direct observational experience that, depending on the company, keeping one's job (or even getting one in the first place) is not always dependent on one's ability to actually do the job at all. (Heck, I've tutored CS 101 students, and even still: the worst code I've ever seen by far was NOT beginners, but was production code written by professionals whose jobs were nowhere near the chopping block.) Well, we both know that circumstances can be pretty chaotic in any company. I am not going to defend professionals who write bad code, but I am just saying that I can understand the stress, and all that goes together, especially if the person is senior. A typical scenario is when (top-level) manager (M) want thing yesterday, and tell senior engineer (SE) M: How long will it take? SE: Well, we did not even analyse the requirements for this feature. Let's spend some time brainstorming this first, and then I will be able to do better estimation. M: We have no time for that, and I think you already have all you need. SE: OK, 3 days. M: What??? We need this thing yesterday! SE: Well, I could do a quick hack... It will take 1 day, but we will not have time to test, no time for code quality, etc. M: DO IT!!! (that quick hack code stays there because next week another urgent thing came, and SE never had time to make the code better) Moral of the story: it is not SE whom we have to blame for bad code, it can easily be the management who made deliberate decision for that... If people knew how laws, sausages and software are made, there'd be a revolution. :) I remember that the ATMs of a particular bank didn't work for several days, because they used an untested patch that contained an infinite loop. That said, you're certainly right that continual self-education is very important (even if one's job isn't on the line).
Re: SurveyMonkey for D users OS - Results
On Fri, 2014-06-06 at 13:34 +, Paulo Pinto via Digitalmars-d wrote: […] At home, I got fed up tinkering GNU/Linux since my Slackware days (1995), as laptop support still tends to fall in some parts, namely graphics support, wireless chipsets and battery usage. Is this still true? As far as I am aware nVIDIA and Intel graphics support is fine on Linux, ditto Intel wifi support. My AMD card in my dual graphics laptop is 4 years old and AMD have given up supporting it, so that's a fail compared to nVIDIA who are still supporting my 7 year old card. As for battery life, my X201 still gives about 6 hours use per charge, would Windows do any better? -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Roadm: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
[OT] C++ the Clear Winner In Google's Language Performance Tests
Slashdot thread: http://developers.slashdot.org/story/11/06/15/0242237/c-the-clear-winner-in-googles-language-performance-tests Research paper: https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf I wonder what would be situation if they included D, Rust and even Ur in that benchmark... :)
Re: [OT] Extra time spent
On Fri, Jun 06, 2014 at 01:24:20PM +, Dejan Lekic via Digitalmars-d wrote: [...] A typical scenario is when (top-level) manager (M) want thing yesterday, and tell senior engineer (SE) M: How long will it take? SE: Well, we did not even analyse the requirements for this feature. Let's spend some time brainstorming this first, and then I will be able to do better estimation. M: We have no time for that, and I think you already have all you need. SE: OK, 3 days. M: What??? We need this thing yesterday! SE: Well, I could do a quick hack... It will take 1 day, but we will not have time to test, no time for code quality, etc. M: DO IT!!! (that quick hack code stays there because next week another urgent thing came, and SE never had time to make the code better) Moral of the story: it is not SE whom we have to blame for bad code, it can easily be the management who made deliberate decision for that... [...] Yeah that sounds very familiar. A typical situation at my job goes something like this: Customer: I want feature X! Sales rep: OK, we'll implement X in 1 month. Customer: No, I want it by last month! Sales rep: OK, and we'll throw in feature Y too, at no extra charge. (Later) Sales rep (to coders): Here's a new project for you: implement X and Y. Coders: That sounds really complicated! It will take us 2 months. Sales rep: What?! We don't have 2 months! They want this by *last* month! Coders: That's impossible. Even the quickest hack we can do will take 1 month. Sales rep: This is a huge customer and it's going to cost us a billion dollar deal! You have to *make* it work! Coders: sigh... OK, 3 weeks. Sales rep: No, yesterday. Coders: Fine, tomorrow we'll make a paper-n-glue model. Sales rep: Today. Coders: Sigh... T -- Gone Chopin. Bach in a minuet.
Re: SurveyMonkey for D users OS - Results
On Friday, 6 June 2014 at 13:58:59 UTC, Russel Winder via Digitalmars-d wrote: On Fri, 2014-06-06 at 13:34 +, Paulo Pinto via Digitalmars-d wrote: […] At home, I got fed up tinkering GNU/Linux since my Slackware days (1995), as laptop support still tends to fall in some parts, namely graphics support, wireless chipsets and battery usage. Is this still true? As far as I am aware nVIDIA and Intel graphics support is fine on Linux, ditto Intel wifi support. My AMD card in my dual graphics laptop is 4 years old and AMD have given up supporting it, so that's a fail compared to nVIDIA who are still supporting my 7 year old card. As for battery life, my X201 still gives about 6 hours use per charge, would Windows do any better? Battery usage is still a common problem. Everything has been working perfectly for years now.
Re: D Grammar in BNF Text Form?
On Friday, 6 June 2014 at 12:05:36 UTC, Robert Schadek via Digitalmars-d wrote: On 06/06/2014 12:29 PM, Tom Browder via Digitalmars-d wrote: Can anyone point me to a text version of the D grammar in some kind of BNF or EBNF format? The D lang web site's info is close, but it's buried in html which I'ld rather not have to wrestle with. My purpose is to attempt to write a D language parser in Perl using Damian Conway's Regex::Grammars module (on CPAN). Thanks. Best regards, -Tom The site says it creates recursive decent parser. D does not even fit into lalr1. So it will not work, unless you can inject handwritten parse function for the critical parts Dscanner project has ANTLR grammer for D. It is unpolished, but works. It is on Github.
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 9:45 AM, Dejan Lekic via Digitalmars-d digitalmars-d@puremagic.com wrote: ... Dscanner project has ANTLR grammer for D. It is unpolished, but works. It is on Github. Yes, thanks, but I really want one to use in Perl. Any idea of the value of k in LALR(k) for D? -Tom
Re: [OT] C++ the Clear Winner In Google's Language Performance Tests
Am 06.06.2014 16:34, schrieb Dejan Lekic: Slashdot thread: http://developers.slashdot.org/story/11/06/15/0242237/c-the-clear-winner-in-googles-language-performance-tests Research paper: https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf I wonder what would be situation if they included D, Rust and even Ur in that benchmark... :) or retest now - 3 years later :)
.NET - Heap Allocations Viewer plugin
This is how variation on theme of @nogc or @noalloc can look in IDE. New plugin for Resharper from one of JetBrains developers. http://blog.jetbrains.com/dotnet/2014/06/06/heap-allocations-viewer-plugin/ I for sure will try it.
Re: [OT] Extra time spent
On 06/06/2014 04:37 PM, H. S. Teoh via Digitalmars-d wrote: Yeah that sounds very familiar. A typical situation at my job goes something like this: Customer: I want feature X! Sales rep: OK, we'll implement X in 1 month. Customer: No, I want it by last month! Sales rep: OK, and we'll throw in feature Y too, at no extra charge. (Later) Sales rep (to coders): Here's a new project for you: implement X and Y. Coders: That sounds really complicated! It will take us 2 months. Sales rep: What?! We don't have 2 months! They want this by*last* month! Coders: That's impossible. Even the quickest hack we can do will take 1 month. Sales rep: This is a huge customer and it's going to cost us a billion dollar deal! You have to*make* it work! Coders: sigh... OK, 3 weeks. Sales rep: No, yesterday. Coders: Fine, tomorrow we'll make a paper-n-glue model. Sales rep: Today. Coders: Sigh... Isn't the fundamental problem here that the customer will pay a billion dollars even if the software ends up being full of bugs?
Fedora DMD package
Is there a good reason why the dmd Fedora 20 package pulls in the following as dependencies: cyrus-sasl-libi686 2.1.26-14.fc20fedora 152 k glibc-devel i686 2.18-12.fc20 updates 1.0 M libcurl i686 7.32.0-10.fc20updates 225 k libidni686 1.28-2.fc20 fedora 209 k libssh2 i686 1.4.3-9.fc20 updates 133 k nspr i686 4.10.5-1.fc20 updates 124 k nss i686 3.16.1-1.fc20 updates 878 k nss-softokn i686 3.16.1-1.fc20 updates 311 k nss-util i686 3.16.1-1.fc20 updates 68 k openldap i686 2.4.39-2.fc20 updates 335 k OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Roadm: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Re: D Grammar in BNF Text Form?
On 6/6/2014 9:33 AM, Tom Browder via Digitalmars-d wrote: On Fri, Jun 6, 2014 at 7:00 AM, Robert Schadek via Digitalmars-d digitalmars-d@puremagic.com wrote: The site says it creates recursive decent parser. D does not even fit into lalr1. So it will not work, unless you can inject handwritten parse function for the critical parts Do you know the k value for the D language grammar for a LALR(k) parser? It's definitely not LALR(1), I imagine GLR would likely work, anything in between I'm not sure.
Re: (git HEAD) std.datetime spewing deprecation messages
On Friday, 6 June 2014 at 13:04:24 UTC, Jonathan M Davis via Digitalmars-d wrote: It took us ages to get them to even open the outbound ssh port. Oh? This is promising. Sounds like it's time to set up a reverse SSH tunnel! ...Not that I have all sort of experience with these because of WebSense's bizarrely overzealous tendency to block URIs with blog in them, regardless of the useful documentation they might have. What ever could you be talking about? (orz) -Wyatt
Re: Fedora DMD package
curl is dependency of std.net.curl, some of other dependencies may have been pulled by it indirectly.
Re: Fedora DMD package
On Friday, 6 June 2014 at 15:24:20 UTC, Russel Winder via Digitalmars-d wrote: OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. to support -m32, probably
Re: Digital Mars purchase trouble?
On Fri, 06 Jun 2014 13:32:58 + K.K. via Digitalmars-d digitalmars-d@puremagic.com wrote: Actually, Walter emailed me last night and sorted it out. Though, I still don't really know what happened with the order process... Maybe it was just bad luck? Well, while it may arguably be bad luck which causes you to hit a particular bug, it's not like bad luck causes bugs. There had to be a concrete problem which made it not work for you. - Jonathan M Davis
Re: [OT] Extra time spent
On Fri, Jun 06, 2014 at 05:14:34PM +0200, Timon Gehr via Digitalmars-d wrote: On 06/06/2014 04:37 PM, H. S. Teoh via Digitalmars-d wrote: Yeah that sounds very familiar. A typical situation at my job goes something like this: Customer: I want feature X! Sales rep: OK, we'll implement X in 1 month. Customer: No, I want it by last month! Sales rep: OK, and we'll throw in feature Y too, at no extra charge. (Later) Sales rep (to coders): Here's a new project for you: implement X and Y. Coders: That sounds really complicated! It will take us 2 months. Sales rep: What?! We don't have 2 months! They want this by*last* month! Coders: That's impossible. Even the quickest hack we can do will take 1 month. Sales rep: This is a huge customer and it's going to cost us a billion dollar deal! You have to*make* it work! Coders: sigh... OK, 3 weeks. Sales rep: No, yesterday. Coders: Fine, tomorrow we'll make a paper-n-glue model. Sales rep: Today. Coders: Sigh... Isn't the fundamental problem here that the customer will pay a billion dollars even if the software ends up being full of bugs? Yes, because the customer is a corporate entity, whose upper management doesn't know (nor care) about the difference between good software and working but very buggy software. They dictate the financial decisions, and their IT department just has to live with it. So it really goes both ways. Company A's upper management decides to acquire software X from company B, and company B's upper management decides on an unrealistic schedule, and both A's and B's tech staff have to suffer the consequences. A's tech staff can't produce good software in that unrealistic timeframe, and B's tech staff have to deal with all the bugs that end up in X. --T
Re: Digital Mars purchase trouble?
On Friday, 6 June 2014 at 16:52:50 UTC, Jonathan M Davis via Digitalmars-d wrote: On Fri, 06 Jun 2014 13:32:58 + K.K. via Digitalmars-d digitalmars-d@puremagic.com wrote: Actually, Walter emailed me last night and sorted it out. Though, I still don't really know what happened with the order process... Maybe it was just bad luck? Well, while it may arguably be bad luck which causes you to hit a particular bug, it's not like bad luck causes bugs. There had to be a concrete problem which made it not work for you. - Jonathan M Davis I wouldn't argue that. It's just my luck to be the one to hit it first. :P Being that I know very little about web development and the like, I can't really offer any constructive opinions regarding this :\
Re: Fedora DMD package
On 6/6/2014 8:24 AM, Russel Winder via Digitalmars-d wrote: Is there a good reason why the dmd Fedora 20 package pulls in the following as dependencies: cyrus-sasl-libi686 2.1.26-14.fc20fedora 152 k glibc-devel i686 2.18-12.fc20 updates 1.0 M libcurl i686 7.32.0-10.fc20updates 225 k libidni686 1.28-2.fc20 fedora 209 k libssh2 i686 1.4.3-9.fc20 updates 133 k nspr i686 4.10.5-1.fc20 updates 124 k nss i686 3.16.1-1.fc20 updates 878 k nss-softokn i686 3.16.1-1.fc20 updates 311 k nss-util i686 3.16.1-1.fc20 updates 68 k openldap i686 2.4.39-2.fc20 updates 335 k OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. I know that libcurl is needed. Perhaps the others are pulled in by libcurl.
Re: [OT] Extra time spent
On 6/6/2014 1:06 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 06, 2014 at 05:14:34PM +0200, Timon Gehr via Digitalmars-d wrote: Isn't the fundamental problem here that the customer will pay a billion dollars even if the software ends up being full of bugs? Yes, because the customer is a corporate entity, whose upper management doesn't know (nor care) about the difference between good software and working but very buggy software. They dictate the financial decisions, and their IT department just has to live with it. So it really goes both ways. Company A's upper management decides to acquire software X from company B, and company B's upper management decides on an unrealistic schedule, and both A's and B's tech staff have to suffer the consequences. A's tech staff can't produce good software in that unrealistic timeframe, and B's tech staff have to deal with all the bugs that end up in X. Bottom line is, managers are purely liabilities, not assets. It's no surprise to me that the best software out there is usually OSS, where there isn't one damn manager anywhere to be found. Funny how people think managers perform an actual function, and yet we get by fine - BETTER - without their existence.
Re: [OT] Extra time spent
On 6/6/2014 9:24 AM, Dejan Lekic wrote: A typical scenario is when (top-level) manager (M) want thing yesterday, and tell senior engineer (SE) M: How long will it take? SE: Well, we did not even analyse the requirements for this feature. Let's spend some time brainstorming this first, and then I will be able to do better estimation. M: We have no time for that, and I think you already have all you need. SE: OK, 3 days. M: What??? We need this thing yesterday! SE: Well, I could do a quick hack... It will take 1 day, but we will not have time to test, no time for code quality, etc. M: DO IT!!! (that quick hack code stays there because next week another urgent thing came, and SE never had time to make the code better) That's what's known as a *good* corporate culture. Conversely, my experience is more like this (common occurrence): [Manager barges in] Random Developer: Yes? What is it? Manager: The sales dept just sold feature X, promised it by deadline Y, so go do it. [At *every* weekly developer meeting] Manager (pretending to be useful, as usual): The amount of bugs and slow rate of fixing is unacceptable. This company is at a point where we need to transition away from the fire-fighting mode we've been in. Everyone: About damn time. Sounds great. [A few days later] Random Developer: Uh huh? Manager: The sales dept just sold feature Z, promised it by deadline Q, so quit fiddling with that unimportant stuff and go do it. But then, our product was made specifically for HR personnel and headhunter agencies, and those people are the dumbest of the dumbest dumbshits, so they'd never be able to recognize diarrhea if they were drinking it, let alone know what software is worth buying. To this day I'm convinced that's the sole reason that software company has managed to exist at all despite their complete and total ineptitude.
Re: [OT] Extra time spent
On 6/6/14, 11:01 AM, Nick Sabalausky wrote: Bottom line is, managers are purely liabilities, not assets. It's no surprise to me that the best software out there is usually OSS, where there isn't one damn manager anywhere to be found. Funny how people think managers perform an actual function, and yet we get by fine - BETTER - without their existence. In my experience a good manager protects you from outrageous demands from the customer. Just the kinds of examples that were mentioned earlier in this thread, in fact. I'm lucky to have had a couple of managers that actually do this, and I'm super grateful for them.
Re: [OT] Extra time spent
Well, some managers are mindless and that story about do it now or we will lose our customer, in most cases it's just a bluff/threat or call it what you want. The customers usually don't change their software like they change bakery if the bread is horrible. There are many costs envolved in changing application etc. I've saw some programmers complaining about their managers, but what I really would like to see are these programmers joining together to convince the manager the problems with fast and low quality software, and how their company will lose money fixing it later. Matheus.
Re: Fedora DMD package
Russel Winder via Digitalmars-d wrote: Is there a good reason why the dmd Fedora 20 package pulls in the following as dependencies: cyrus-sasl-libi686 2.1.26-14.fc20fedora 152 k glibc-devel i686 2.18-12.fc20 updates 1.0 M libcurl i686 7.32.0-10.fc20updates 225 k libidni686 1.28-2.fc20 fedora 209 k libssh2 i686 1.4.3-9.fc20 updates 133 k nspr i686 4.10.5-1.fc20 updates 124 k nss i686 3.16.1-1.fc20 updates 878 k nss-softokn i686 3.16.1-1.fc20 updates 311 k nss-util i686 3.16.1-1.fc20 updates 68 k openldap i686 2.4.39-2.fc20 updates 335 k OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. glibc-devel.i686 is needed by DMD to successfully build 32bit executables. The rest is probably there because someone made a mistake. libcurl should be the only other dependency there, I think. -- http://dejan.lekic.org
Re: D Grammar in BNF Text Form?
On Friday, 6 June 2014 at 14:56:19 UTC, Tom Browder via Digitalmars-d wrote: Yes, thanks, but I really want one to use in Perl. Any idea of the value of k in LALR(k) for D? -Tom If you somehow manage to get any parser generator to correctly handle D, you will be the first person in the world to have done so. This may help: https://github.com/Hackerpilot/DGrammar/blob/master/grammar.html
Re: Just curious: who do know current purity rules?
06.06.2014 13:05, Kagamin пишет: Do you mean true purity rules or whatever is implemented in the compiler? whatever is implemented. ) -- Денис В. Шеломовский Denis V. Shelomovskij
Re: [OT] Extra time spent
On Fri, Jun 06, 2014 at 02:01:38PM -0400, Nick Sabalausky via Digitalmars-d wrote: On 6/6/2014 1:06 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 06, 2014 at 05:14:34PM +0200, Timon Gehr via Digitalmars-d wrote: Isn't the fundamental problem here that the customer will pay a billion dollars even if the software ends up being full of bugs? Yes, because the customer is a corporate entity, whose upper management doesn't know (nor care) about the difference between good software and working but very buggy software. They dictate the financial decisions, and their IT department just has to live with it. So it really goes both ways. Company A's upper management decides to acquire software X from company B, and company B's upper management decides on an unrealistic schedule, and both A's and B's tech staff have to suffer the consequences. A's tech staff can't produce good software in that unrealistic timeframe, and B's tech staff have to deal with all the bugs that end up in X. Bottom line is, managers are purely liabilities, not assets. It's no surprise to me that the best software out there is usually OSS, where there isn't one damn manager anywhere to be found. Funny how people think managers perform an actual function, and yet we get by fine - BETTER - without their existence. To be fair, there *are* some good managers out there who will actually bother to understand the limits of technology and turn down unreasonable customer requests. Get rid of them, and you may end up with the opposite problem: Techie A: Hey dude, this morning I got this crazy kewl idea on how to make our spreadsheet app play a flight simulator! Techie B: Really?! Let's see it! Techie A: Here, you put this formula in this cell here, and it exploits the automatic solver system to generate flight coordinates! And it uses the built-in graphing function to do 3D rendering! Techie B: But it doesn't let me shoot missiles at buildings. Techie A: True. But if we replace this function here with this other equivalent that does almost the same thing, but does this other thing when called with these unreasonable parameters, then we can simulate exploding buildings! (2 months later...) Techie A: Dude, how come our product isn't selling, while Dumbass Corporation's clearly-inferior product is so popular??! Techie B: I dunno, maybe we need to market our product? Techie A: But I already talked to 50 customers, but all the deals fell through 'cos they keep insisting on unreasonable deadlines! Techie B: Yeah, why are customers so dumb?! They don't deserve our product! Oh BTW, did you pay the rent yet? Techie A: What rent?! I thought you paid for it! I'm broke, man! Techie B: So am I! Looks like we're gonna hafta close shop... Techie A: But what about the flight simulator...?! ;-) I do agree, though, that *in general*, it seems OSS churns out far superior products than proprietary companies. The most provoking sticking point is interoperability, which basically gets thrown out of the window on day 1 because business types have this irrational fear that allowing interoperability will allow competitors to beat them. So either the software is crippled and can't work with anybody else (fortunately, the internet has made this approach untenable), or the data format is kept under NDAs and threats of lawsuits should anybody have the audacity to try to interoperate with it, a veritable walled garden where only corporations with deep pockets can afford to pay for access to API docs. Whatever the scenario may be, the invariable outcome is that end consumers suffer. They have to put up with software A's output files refusing to work with software B, or when edited under software C all the formatting gets screwed up, etc.. And this is just on the point of interoperability... there's also transparency, which is completely absent in most (all?) proprietary houses that I know of. Marketing types seem to have this irrational fear that publishing a list of known bugs will give a negative image of the company, and so no bug databases are ever open to the public. When you submit a bug report, even *you* can't look at its progress afterwards. And who knows how many security holes are lurking there that nobody knows about (except the kind of people that you *don't* want to know about these things -- you *know* they're gonna find it one day; security via obscurity doesn't work)? Sure OSS may lack the glitz and eye-candy, but I'd rather have software that functions *well*, than software that has all the glitz but it's full of bugs and poor performance underneath. T -- English is useful because it is a mess. Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. Similarly, Perl was designed to be a mess, though in the nicests of all possible ways. -- Larry Wall
Re: SurveyMonkey for D users OS - Results
Am 06.06.2014 16:36, schrieb Dicebot: On Friday, 6 June 2014 at 13:58:59 UTC, Russel Winder via Digitalmars-d wrote: On Fri, 2014-06-06 at 13:34 +, Paulo Pinto via Digitalmars-d wrote: […] At home, I got fed up tinkering GNU/Linux since my Slackware days (1995), as laptop support still tends to fall in some parts, namely graphics support, wireless chipsets and battery usage. Is this still true? As far as I am aware nVIDIA and Intel graphics support is fine on Linux, ditto Intel wifi support. My AMD card in my dual graphics laptop is 4 years old and AMD have given up supporting it, so that's a fail compared to nVIDIA who are still supporting my 7 year old card. Not if you care about the latest versions of OpenGL, OpenCL and WebGL support. Having Windows also allows playing around with DirectX from time to time. As for battery life, my X201 still gives about 6 hours use per charge, would Windows do any better? Battery usage is still a common problem. Everything has been working perfectly for years now. Not really, case in point my Netbook Asus EEE PC 1215B, which was sold in Germany via Amazon with GNU/Linux support pre-installed. After one year usage, the wireless card stopped working with IPv4 routers, because Ubuntu devs decided to replace the proprietary driver in the LTS distribution, although the open source version was still work in progress. So I got stuck using a cable until the open source driver reached feature parity with the removed closed source driver. Undoing what the Ubuntu update did was a mess that would require re-flashing the driver firmware, as such I had better things to do than hack around. -- Paulo
Re: Just curious: who do know current purity rules?
On Friday, 6 June 2014 at 19:32:17 UTC, Denis Shelomovskij wrote: 06.06.2014 13:05, Kagamin пишет: Do you mean true purity rules or whatever is implemented in the compiler? whatever is implemented. ) Do someone know whatever is implemented ? I certainly don't.
Re: [OT] Extra time spent
On Friday, 6 June 2014 at 19:37:47 UTC, H. S. Teoh via Digitalmars-d wrote: Techie A: Hey dude, this morning I got this crazy kewl idea on how to make our spreadsheet app play a flight simulator! Techie B: Really?! Let's see it! Techie A: Here, you put this formula in this cell here, and it exploits the automatic solver system to generate flight coordinates! And it uses the built-in graphing function to do 3D rendering! Techie B: But it doesn't let me shoot missiles at buildings. Techie A: True. But if we replace this function here with this other equivalent that does almost the same thing, but does this other thing when called with these unreasonable parameters, then we can simulate exploding buildings! (2 months later...) Techie A: Dude, how come our product isn't selling, while Dumbass Corporation's clearly-inferior product is so popular??! Techie B: I dunno, maybe we need to market our product? Techie A: But I already talked to 50 customers, but all the deals fell through 'cos they keep insisting on unreasonable deadlines! Techie B: Yeah, why are customers so dumb?! They don't deserve our product! Oh BTW, did you pay the rent yet? Techie A: What rent?! I thought you paid for it! I'm broke, man! Techie B: So am I! Looks like we're gonna hafta close shop... Techie A: But what about the flight simulator...?! ;-) Techie A: Man we really fucked by choosing ruby on rails. Our codebase has become unmaintainable. We must do something. Technie B: Let's migrate to Node.js
Re: [OT] Extra time spent
On Fri, Jun 06, 2014 at 07:49:47PM +, deadalnix via Digitalmars-d wrote: On Friday, 6 June 2014 at 19:37:47 UTC, H. S. Teoh via Digitalmars-d wrote: Techie A: Hey dude, this morning I got this crazy kewl idea on how to make our spreadsheet app play a flight simulator! Techie B: Really?! Let's see it! Techie A: Here, you put this formula in this cell here, and it exploits the automatic solver system to generate flight coordinates! And it uses the built-in graphing function to do 3D rendering! Techie B: But it doesn't let me shoot missiles at buildings. Techie A: True. But if we replace this function here with this other equivalent that does almost the same thing, but does this other thing when called with these unreasonable parameters, then we can simulate exploding buildings! (2 months later...) Techie A: Dude, how come our product isn't selling, while Dumbass Corporation's clearly-inferior product is so popular??! Techie B: I dunno, maybe we need to market our product? Techie A: But I already talked to 50 customers, but all the deals fell through 'cos they keep insisting on unreasonable deadlines! Techie B: Yeah, why are customers so dumb?! They don't deserve our product! Oh BTW, did you pay the rent yet? Techie A: What rent?! I thought you paid for it! I'm broke, man! Techie B: So am I! Looks like we're gonna hafta close shop... Techie A: But what about the flight simulator...?! ;-) Techie A: Man we really fucked by choosing ruby on rails. Our codebase has become unmaintainable. We must do something. Technie B: Let's migrate to Node.js (2 months later) Techie A: The Node.js implementation is now running but we still have no customers. Techie B: I know, let's invent our own system from scratch! Then we'll know for sure it's better! (2 years later) Techie A: We've reinvented our system 5 times over, and we still have no customers, and now we're in debt and the bank is after us. Techie B: I'm gonna get a job at McDonald's... T -- A linguistics professor was lecturing to his class one day. In English, he said, A double negative forms a positive. In some languages, though, such as Russian, a double negative is still a negative. However, there is no language wherein a double positive can form a negative. A voice from the back of the room piped up, Yeah, yeah.
Re: [OT] Extra time spent
On 6/6/14, 5:03 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 06, 2014 at 07:49:47PM +, deadalnix via Digitalmars-d wrote: On Friday, 6 June 2014 at 19:37:47 UTC, H. S. Teoh via Digitalmars-d wrote: Techie A: Hey dude, this morning I got this crazy kewl idea on how to make our spreadsheet app play a flight simulator! Techie B: Really?! Let's see it! Techie A: Here, you put this formula in this cell here, and it exploits the automatic solver system to generate flight coordinates! And it uses the built-in graphing function to do 3D rendering! Techie B: But it doesn't let me shoot missiles at buildings. Techie A: True. But if we replace this function here with this other equivalent that does almost the same thing, but does this other thing when called with these unreasonable parameters, then we can simulate exploding buildings! (2 months later...) Techie A: Dude, how come our product isn't selling, while Dumbass Corporation's clearly-inferior product is so popular??! Techie B: I dunno, maybe we need to market our product? Techie A: But I already talked to 50 customers, but all the deals fell through 'cos they keep insisting on unreasonable deadlines! Techie B: Yeah, why are customers so dumb?! They don't deserve our product! Oh BTW, did you pay the rent yet? Techie A: What rent?! I thought you paid for it! I'm broke, man! Techie B: So am I! Looks like we're gonna hafta close shop... Techie A: But what about the flight simulator...?! ;-) Techie A: Man we really fucked by choosing ruby on rails. Our codebase has become unmaintainable. We must do something. Technie B: Let's migrate to Node.js (2 months later) Techie A: The Node.js implementation is now running but we still have no customers. Don't worry, they'll call back.
Re: Optionally strongly typed array indexes
Also true, though as a side note, I think a library solution for this could be quite nice: enum newton = 1.as!kg*m/s^2; // One possibility. enum newton = 1*kg*m/square(s); // Another. Sorry to intrude, but you can also get: enum newton = 1.kg/m/s^^2; Which is quite readable. In this case, 'kg', 'm' and 's' are factory functions. The '1.kg' part is just UFCS in action. For the subjacent return type, you can also define the power operator, at least for integers.
Re: SurveyMonkey for D users OS - Results
On Friday, 6 June 2014 at 19:44:53 UTC, Paulo Pinto wrote: Battery usage is still a common problem. Everything has been working perfectly for years now. Not really, case in point my Netbook Asus EEE PC 1215B, which was sold in Germany via Amazon with GNU/Linux support pre-installed. After one year usage, the wireless card stopped working with IPv4 routers, because Ubuntu devs decided to replace the proprietary driver in the LTS distribution, although the open source version was still work in progress. LTS distribution This is the problem. Don't use LTS releases for desktops and your Linux experience will be much more pleasant. It is natural but wrong approach simply because kernel and driver support is evolving so fast that LTS versions can never really catch up. Bleeding edge distros have best h/w support, though that may cost some time wasted of system tinkering once in a while.
Re: [OT] Extra time spent
Am 06.06.2014 20:51, schrieb Mattcoder: Well, some managers are mindless and that story about do it now or we will lose our customer, in most cases it's just a bluff/threat or call it what you want. The customers usually don't change their software like they change bakery if the bread is horrible. There are many costs envolved in changing application etc. I've saw some programmers complaining about their managers, but what I really would like to see are these programmers joining together to convince the manager the problems with fast and low quality software, and how their company will lose money fixing it later. Matheus. Except that at companies with large budgets, they do change, just because. -- Paulo
Re: [OT] Extra time spent
On Wednesday, 4 June 2014 at 19:04:19 UTC, H. S. Teoh via Digitalmars-d wrote: It's strange, I find that even ambient music distracts me, yet the loud noise of an occasional passing train doesn't. Similarly, even whispers will distract me, but birds chirping, trees rustling, etc., don't. It's something about intelligible sounds that engage my brain somehow, that non-intelligible sounds don't have. So far, I haven't found anybody else who experiences the same thing. Me too! I think it's pretty much the default human nature through evaluation! We keep filtering / ignoring the usual noises so that we can pick up on new ones, just like our noses ignoring an existing smell to be able to recognize a new smell. Similarly, it is easy to hear own name despite all the noise in a crowded room.
Re: SurveyMonkey for D users OS - Results
Am 06.06.2014 22:24, schrieb Dicebot: On Friday, 6 June 2014 at 19:44:53 UTC, Paulo Pinto wrote: Battery usage is still a common problem. Everything has been working perfectly for years now. Not really, case in point my Netbook Asus EEE PC 1215B, which was sold in Germany via Amazon with GNU/Linux support pre-installed. After one year usage, the wireless card stopped working with IPv4 routers, because Ubuntu devs decided to replace the proprietary driver in the LTS distribution, although the open source version was still work in progress. LTS distribution This is the problem. Don't use LTS releases for desktops and your Linux experience will be much more pleasant. It is natural but wrong approach simply because kernel and driver support is evolving so fast that LTS versions can never really catch up. Bleeding edge distros have best h/w support, though that may cost some time wasted of system tinkering once in a while. I got tired of tinkering. It must work out of the box, otherwise I have better things to do with my life. -- Paulo
Re: Optionally strongly typed array indexes
On Friday, 6 June 2014 at 20:22:35 UTC, Philippe Sigaud via Digitalmars-d wrote: Sorry to intrude, but you can also get: enum newton = 1.kg/m/s^^2; Good point. I actually learned D had an exponentiation operator just yesterday. It definitely helps readability in this case.
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 2:26 PM, Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: If you somehow manage to get any parser generator to correctly handle D, you will be the first person in the world to have done so. Oops, fools rushing in, eh? This may help: https://github.com/Hackerpilot/DGrammar/blob/master/grammar.html Now I'm confused--the three files I've found have differences in production rules--it looks like I'll have to look at what the compiler is actually doing--I'm putting that off for a while unless someone has another idea . Best, -Tom
Re: D Grammar in BNF Text Form?
On Friday, 6 June 2014 at 22:25:16 UTC, Tom Browder via Digitalmars-d wrote: Now I'm confused--the three files I've found have differences in production rules--it looks like I'll have to look at what the compiler is actually doing--I'm putting that off for a while unless someone has another idea . Use the HTML version. I haven't updated the ANTLR one in a while. (You may not have noticed the line in the readme that says The file that you're probably looking for is grammar.html.) Right now there are four parsers for D: Mine, which is used by DCD and D-Scanner: https://github.com/Hackerpilot/Dscanner/blob/master/std/d/ DParser2, which powers Mono-D: https://github.com/aBothe/D_Parser/tree/master/DParser2/Parser LibD which is used by SDC: https://github.com/deadalnix/libd/tree/master/src/d/parser The DMD front-end which is used by DMD, LDC, and GDC: https://github.com/D-Programming-Language/dmd/blob/master/src/parse.c
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 5:40 PM, Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 6 June 2014 at 22:25:16 UTC, Tom Browder via Digitalmars-d wrote: Now I'm confused--the three files I've found have differences in production rules--it looks like I'll have to look at what the ... Use the HTML version. I haven't updated the ANTLR one in a while. (You may not have noticed the line in the readme that says The file that you're probably looking for is grammar.html.) I did, but wasn't quite sure what was meant. Right now there are four parsers for D: ... What about the lexer and parser info on the D lang site in the language reference. Is it current? Best, -Tom
Re: D Grammar in BNF Text Form?
On Fri, Jun 6, 2014 at 6:07 PM, Tom Browder tom.brow...@gmail.com wrote: ... What about the lexer and parser info on the D lang site in the I should have been more precise and said the lexical and grammar sections of the language reference. on the D lang site Best, -Tom