Re: blog post - "An illustrated guide to using Sublime Text 3 for D programming"
On Friday, 22 January 2016 at 04:39:00 UTC, Pradeep Gowda wrote: Comments are suggestions are welcome. You probably want to point DCD at the phobos and druntime import directories that DMD is actually using, not whatever is in git master. If you run `dmd` with no arguments it will tell you the location of its config file. From that you can determine the phobos and druntime import directories.
blog post - "An illustrated guide to using Sublime Text 3 for D programming"
Sublime text 3 is a decent editor to write D code. However, getting all the different plugins working together has always proven to be somewhat of a challenge for me. So, I decided to document the process as I went along. The result is here: https://www.btbytes.com/posts/st3d.html Comments are suggestions are welcome.
Re: Walter on his experience as a dev, on running an open source project and D
On 1/21/2016 5:06 AM, burjui wrote: Recently I almost stopped listening to music (even ambient) while I write code, because it turns out I do less mistakes and overlook things not so often, when I code in silence. It makes coding less entertaining, but more productive. The trick is to turn the volume down so the music is barely perceptible.
Re: D is now catching C++ exceptions!
On Monday, 18 January 2016 at 22:26:56 UTC, Walter Bright wrote: at least for 64 bit Linux. Other platforms to follow. https://github.com/D-Programming-Language/dmd/pull/5342 This is what Andrei and I call "enabling" technology, as it opens the door for many more uses of D, in this case better interoperability with existing C++ codebases. Thanks to everyone who helped out with this, especially Elie, Iain, David and Andrei! Also looking forward to getting this in GDC and LDC! Andrei and I feel that better interoperability with C++ is a major strategic feature and advantage for D. As the recent thread with Manu's frustrations in doing it show, we still have a significant way to go. But I hope to push it forward hard in the next few months. For the fearless who love working under the hood, extending the support to the rest of the platforms is a great way to materially contribute. This is a good start and we should continue this work. We need review our documentation about interfacing to C++ and clearly delineate the limits of our features. For example we should say how do we may write D binding of C++ class. How do we may inherit D-defined C++ class from external C++ class/interface? When can we pass object of inherited class back to C++ code? How do we may cast one extern(C++) class to another extern(C++) class in D? In C++? Which C++ features we support for different ABIs? Also, I think, we need to implement linking to some C++ features (I'll help with this when I finish my alias this duty): Linking to C++ overloaded operators (without moving their semantic to D). C++ ctors/dtors. Dynamic casting of C++ objects in D. Maybe partial C++ RTTI support.
Re: Next London D Meetup: Wednesday 20th January 2016
On Sunday, 10 January 2016 at 22:01:05 UTC, Kingsley wrote: This time we peek into the mind and code of Ross McKinlay who will give us a tour of some of his D efforts. I'm watching the recording right now. It's pretty exciting to see anything like F# discriminated unions in D. video here: https://skillsmatter.com/skillscasts/7185-london-d-meetup -Wyatt
Re: D is now catching C++ exceptions!
On Thursday, 21 January 2016 at 18:34:27 UTC, Taylor Hillegeist wrote: What is the state of C++ interfacing? is the http://dlang.org/spec/cpp_interface.html up to date? You can read more up-to-date documentation here: https://github.com/D-Programming-Language/dlang.org/pull/1154
Re: D is now catching C++ exceptions!
On 1/21/2016 10:34 AM, Taylor Hillegeist wrote: is the http://dlang.org/spec/cpp_interface.html up to date? No.
Re: D is now catching C++ exceptions!
On Tuesday, 19 January 2016 at 04:58:49 UTC, Walter Bright wrote: On 1/18/2016 8:03 PM, Manu via Digitalmars-d-announce wrote: Nice work! Although I've never used C++ exceptions (or D exceptions) personally. Is there a roadmap for this stuff I can check out? Short list of upcoming C++ work? Since you're at the bleeding edge of interfacing to C++, I'd say your problems are on the short list :-) Since we're nowhere on Win64 C++ exceptions at the moment, I guess it's good you're not blocked by them. What is the state of C++ interfacing? is the http://dlang.org/spec/cpp_interface.html up to date?
Re: Logo for D
On Wednesday, 20 January 2016 at 15:43:16 UTC, Simen Kjaeraas wrote: On Wednesday, 20 January 2016 at 14:09:53 UTC, karabuta wrote: On Monday, 18 January 2016 at 22:48:52 UTC, Brad Anderson wrote: http://i.imgur.com/RSBLFDJ.png Doesn't it look so much better: http://i.imgur.com/QlrbCou.png Waw!! I never new the thing at the top was a moon when I was doing my version :) Is that a moon on the "D" and Mars below the D? :) I now get it. Actually, the D is Mars. The other shapes are Phobos and Deimos, Mars' two moons. And of course two important D libraries. -- Simen Haha! So that the story :)
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 17:42:02 UTC, Jakob Ovrum wrote: On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote: Good work, thanks! Has this been reddited yet? -- Andrei I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :) Someone has submitted it (about a half hour ago): https://www.reddit.com/r/programming/comments/420yhi/memory_safety_in_d/
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 17:56:19 UTC, Brad Anderson wrote: On Thursday, 21 January 2016 at 17:42:02 UTC, Jakob Ovrum wrote: On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote: Good work, thanks! Has this been reddited yet? -- Andrei I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :) Someone has submitted it (about a half hour ago): https://www.reddit.com/r/programming/comments/420yhi/memory_safety_in_d/ I've submitted it to Hacker News.
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote: Good work, thanks! Has this been reddited yet? -- Andrei I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :)
Re: D Article: Memory Safety
On 01/20/2016 09:04 AM, Jakob Ovrum wrote: The article aims to explain how to use @safe, @system and importantly, @trusted, including all the hairy details of templates. https://jakobovrum.github.io/d/2016/01/20/memory-safety.html Any and all feedback appreciated. Good work, thanks! Has this been reddited yet? -- Andrei
Re: D Article: Memory Safety
On Wednesday, 20 January 2016 at 14:04:53 UTC, Jakob Ovrum wrote: The article aims to explain how to use @safe, @system and importantly, @trusted, including all the hairy details of templates. https://jakobovrum.github.io/d/2016/01/20/memory-safety.html Any and all feedback appreciated. Nicely written, enjoyed reading it. And the visual presentation is excellent, I guess because it's based on github's code presentation libraries. Really a nice example of how you can find blog posts online that are an order of magnitude better than any book you've ever read, particularly the visuals. Is it on reddit? The dlang.org redesign, Walter's talk, and a couple other D topics did well on there this week, I think this would also.
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 13:42:13 UTC, Jakob Ovrum wrote: On Thursday, 21 January 2016 at 13:39:48 UTC, Dicebot wrote: I'd suggest at the very least to add a comment before "p.bar();" saying "Must not escape 'p' pointer or @safe-ty will be compromised". I thought about this case, but it relies on UFCS which is controlled by the callee. The caller can't inject that call if the callee is careful with its imports. For member functions, the this reference is `ref` and its address cannot be taken in @safe code. Reasonable, but the UFCS call can result from some other function defined in same module (Phobos modules are not small at all). Even small unlikely violation can completely destroy benefits of @safe so in my opinion one can't be overly cautious when documenting stuff that requires verification.
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 13:52:57 UTC, Dicebot wrote: Reasonable, but the UFCS call can result from some other function defined in same module (Phobos modules are not small at all). Even small unlikely violation can completely destroy benefits of @safe so in my opinion one can't be overly cautious when documenting stuff that requires verification. I agree. Do you think it's worth mentioning UFCS functions in the article?
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 13:39:48 UTC, Dicebot wrote: I'd suggest at the very least to add a comment before "p.bar();" saying "Must not escape 'p' pointer or @safe-ty will be compromised". I thought about this case, but it relies on UFCS which is controlled by the callee. The caller can't inject that call if the callee is careful with its imports. For member functions, the this reference is `ref` and its address cannot be taken in @safe code.
Re: D Article: Memory Safety
On Thursday, 21 January 2016 at 04:31:25 UTC, Jakob Ovrum wrote: That was for non-templated functions where this approach makes no sense. Indeed it is counterproductive, because @trusted on the whole function is a better indication of what needs to be reviewed for memory safety (the whole function!). Thanks! I got confused because your used example actually leaves @safe hole with this specific usage of @trusted : void foo(T)(T t) { auto p = () @trusted { return &t; } (); p.bar(); } struct S { int x; } S* global; void bar (S* ptr) @safe { global = ptr; } void main () @safe { foo(S.init); global.x = 42; // oops, writing to some random stack memory } I'd suggest at the very least to add a comment before "p.bar();" saying "Must not escape 'p' pointer or @safe-ty will be compromised".
Re: Walter on his experience as a dev, on running an open source project and D
On Wednesday, 20 January 2016 at 03:13:38 UTC, deadalnix wrote: https://www.reddit.com/r/programming/comments/41sdzj/walter_bright_on_being_a_developer_running_an/ I also prefer to work at night, mainly because of silence. A simple test: listen to a song in your headphones at day, then listen to it on the same volume level at night. Recently I almost stopped listening to music (even ambient) while I write code, because it turns out I do less mistakes and overlook things not so often, when I code in silence. It makes coding less entertaining, but more productive.
Re: D Article: Memory Safety
On Wednesday, 20 January 2016 at 14:04:53 UTC, Jakob Ovrum wrote: snip Thanks for all the feedback. I've pushed a revision with further changes, most of it based on the feedback in this thread. https://github.com/JakobOvrum/jakobovrum.github.io/commit/07c270567097f6cae5d9b95c88bd4d6c8124498c (I'll try to remember not to force push over this commit and break the link, but if it is broken in the future, sorry, I probably slipped up and forgot.)
Re: D Article: Memory Safety
On Wednesday, 20 January 2016 at 14:04:53 UTC, Jakob Ovrum wrote: The article aims to explain how to use @safe Um, no, the article doesn't explain how to use @safe, it shows patterns that can be used to write safe code. The target audience must already understand safety.
Re: Airfares to Berlin for DConf 2016
On 2016-01-21 09:31, Nordlöw wrote: Is there a special hotel, nearby Semantic HQ, where most of the contenders plan to stay? Further, when do contenders usually arrive (the day before)? I don't know but the site mentions a nearby hotel: http://dconf.org/2016/venue.html -- /Jacob Carlborg
Re: Walter on his experience as a dev, on running an open source project and D
On 2016-01-21 11:01, deadalnix wrote: On Thursday, 21 January 2016 at 05:14:03 UTC, thedeemon wrote: On Wednesday, 20 January 2016 at 11:07:16 UTC, Rikki Cattermole wrote: From what Walter said, they all knew c. So not really too low level for them. To me it looked like: Walter: "You all write in C, right?" Audience silent with expression on their faces "What is C? We've only heard about JavaScript". ;) Isn't C that language that compiles to javascript ? No, it compiles to CoffeeScript which then compiles to JavaScript. -- /Jacob Carlborg
Re: Walter on his experience as a dev, on running an open source project and D
On Thursday, 21 January 2016 at 05:14:03 UTC, thedeemon wrote: On Wednesday, 20 January 2016 at 11:07:16 UTC, Rikki Cattermole wrote: From what Walter said, they all knew c. So not really too low level for them. To me it looked like: Walter: "You all write in C, right?" Audience silent with expression on their faces "What is C? We've only heard about JavaScript". ;) Isn't C that language that compiles to javascript ?
Re: Beta D 2.070.0-b2
On Wednesday, 20 January 2016 at 09:03:50 UTC, Martin Nowak wrote: Well, please write them (targeting stable). Changelog entries should nowadays be part of pull requests. https://github.com/D-Programming-Language/phobos/blob/ca3b4c839770a02f2414b20aa11c38f79419871b/changelog.dd#L9 Ok, I'll look into it.
Re: Airfares to Berlin for DConf 2016
On Wednesday, 20 January 2016 at 09:04:07 UTC, Walter Bright wrote: I saw on the news this evening that air fares for the next 3 weeks will be at a 3 year low. It's a good time to book the flights to Berlin! Is there a special hotel, nearby Semantic HQ, where most of the contenders plan to stay? Further, when do contenders usually arrive (the day before)?