Re: GSoC 2016 - Precise GC
On Sunday, 8 May 2016 at 11:16:56 UTC, deadalnix wrote: Ones that have only pointers are probably OK too. Though I'm not sure if a precise scanner takes into account the type of the pointer. I would expect it to use embedded typeinfo in target block. -Steve Because of void* and classes, the GC MUST be able to find out what type was actually allocated, or at least its pointer bitmask. Yep, and it does that by looking at metadata of the pointed object itself, it doesn't care about the type of pointer to that object. I mean if we have object x of class X in heap and pointers "X p1", "void* p2" and "Y p3" all having same value (pointing to the same address) then GC will have no problem in scanning x as long as it can access x's type info knowing the address of x in heap. Which means all p1, p2 and p3 might easily be just at one position in a union and that would not be a problem.
Re: C#7 features
On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote: Most of them are also present in D, yay. https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/ Added a comment: https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6 Andrei Their tuples seem to be a complete DIY: https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx I wouldn't be surpised to see in the implementation an array of variant or something like that, explaining why it's limited to octuples [1]. Sharp tuples look weak compared to D tuple-ish things: Tuple, TList, AliasSeq, variadics, ... [1] Also I think that the param-"variadicity" is simply emulated via a set of overloaded constructor, explaining why they stop at 8.
Re: Adventures in D Programming
On Sun, May 08, 2016 at 10:45:51PM +0300, Andrei Alexandrescu via Digitalmars-d-announce wrote: > On 5/8/16 8:19 PM, qznc wrote: > >On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: > >>http://blog.tenstral.net/2016/05/adventures-in-d-programming.html > > > >Thanks, I missed that post until now. > > > > > >"the documentation not matching the actual code is a bad experience > >for someone new to the language" > > > >I would interpret that as a sign that we want multiple versions of > >documentation available on the website. For example, Python does > >that. > > > >https://docs.python.org/3.4/contents.html > > > >You see the "3.4" version in the URL and on the page top-left is a > >dropdown menu to switch between versions. > > > >Has this been discussed for Phobos yet? > > No, but it's been on my mind for a while. -- Andrei AFAICT, it shouldn't be super hard to do this. We're already building Phobos docs in phobos-prerelease/, and IIRC the dlang.org repo already downloads the last official release and installs it in phobos/. So it's just a matter of extending this to install multiple doc builds in phobos-x.y.z/. T -- This sentence is false.
Re: Adventures in D Programming
On Sunday, 8 May 2016 at 17:19:05 UTC, qznc wrote: On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: http://blog.tenstral.net/2016/05/adventures-in-d-programming.html Thanks, I missed that post until now. "the documentation not matching the actual code is a bad experience for someone new to the language" I would interpret that as a sign that we want multiple versions of documentation available on the website. For example, Python does that. You've quoted the wrong part of the paragraph. The real problem he encountered was not the doc, it was the phobos bugs in the older version shipped with GDC/LDC: "For GDC, which I used to compile my code due to LDC having bugs at that time, this means that it is shipping with a very outdated copy of Phobos" The the doc thing is "just" a symptom. Older offline doc is always available in the release archive, it's easy to understand that so it's not the actual problem.
Re: Adventures in D Programming
On Sunday, 8 May 2016 at 19:12:17 UTC, Adam D. Ruppe wrote: On Sunday, 8 May 2016 at 19:09:07 UTC, Daniel Kozak wrote: I remember that I have mentioned that once here, but I thing there was not big interest at it :( I'm doing it on dpldocs.info as soon as I leave the alpha period (which is finally coming soon). I haven't logged on for a look in ages. Have done so now, and they've come on leaps and bounds. Really like the layout and styling of the different pages. Jolly good show!
Re: Adventures in D Programming
On 5/8/16 8:19 PM, qznc wrote: On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: http://blog.tenstral.net/2016/05/adventures-in-d-programming.html Thanks, I missed that post until now. "the documentation not matching the actual code is a bad experience for someone new to the language" I would interpret that as a sign that we want multiple versions of documentation available on the website. For example, Python does that. https://docs.python.org/3.4/contents.html You see the "3.4" version in the URL and on the page top-left is a dropdown menu to switch between versions. Has this been discussed for Phobos yet? No, but it's been on my mind for a while. -- Andrei
Re: Adventures in D Programming
On Sunday, 8 May 2016 at 19:09:07 UTC, Daniel Kozak wrote: I remember that I have mentioned that once here, but I thing there was not big interest at it :( I'm doing it on dpldocs.info as soon as I leave the alpha period (which is finally coming soon).
Re: Adventures in D Programming
Dne 8.5.2016 v 21:09 Daniel Kozak napsal(a): Dne 8.5.2016 v 19:19 qznc via Digitalmars-d-announce napsal(a): On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: http://blog.tenstral.net/2016/05/adventures-in-d-programming.html Thanks, I missed that post until now. "the documentation not matching the actual code is a bad experience for someone new to the language" I would interpret that as a sign that we want multiple versions of documentation available on the website. For example, Python does that. https://docs.python.org/3.4/contents.html You see the "3.4" version in the URL and on the page top-left is a dropdown menu to switch between versions. Has this been discussed for Phobos yet? I remember that I have mentioned that once here, but I thing there was not big interest at it :( http://forum.dlang.org/post/srhttrxrqawhspibd...@forum.dlang.org
Re: Adventures in D Programming
Dne 8.5.2016 v 19:19 qznc via Digitalmars-d-announce napsal(a): On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: http://blog.tenstral.net/2016/05/adventures-in-d-programming.html Thanks, I missed that post until now. "the documentation not matching the actual code is a bad experience for someone new to the language" I would interpret that as a sign that we want multiple versions of documentation available on the website. For example, Python does that. https://docs.python.org/3.4/contents.html You see the "3.4" version in the URL and on the page top-left is a dropdown menu to switch between versions. Has this been discussed for Phobos yet? I remember that I have mentioned that once here, but I thing there was not big interest at it :(
Re: Adventures in D Programming
On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: http://blog.tenstral.net/2016/05/adventures-in-d-programming.html Thanks, I missed that post until now. "the documentation not matching the actual code is a bad experience for someone new to the language" I would interpret that as a sign that we want multiple versions of documentation available on the website. For example, Python does that. https://docs.python.org/3.4/contents.html You see the "3.4" version in the URL and on the page top-left is a dropdown menu to switch between versions. Has this been discussed for Phobos yet?
Re: GSoC 2016 - Precise GC
On Friday, 6 May 2016 at 09:06:59 UTC, Dmitry Olshansky wrote: On 06-May-2016 05:37, Jeremy DeHaan wrote: On Wednesday, 4 May 2016 at 12:42:30 UTC, jmh530 wrote: On Wednesday, 4 May 2016 at 02:50:08 UTC, Jeremy DeHaan wrote: You can identify safe functions with https://dlang.org/phobos/std_traits.html#isSafe or https://dlang.org/phobos/std_traits.html#functionAttributes All I meant was that I don't know enough about what the compiler does with built in types to make this work. It almost sounds like we would need a safe union and unsafe union type and do some extra stuff for the unsafe union, but I'm just starting to learn about this stuff. I'd note that a union without pointers doesn't hurt precise scanner, it's only the ones with pointers that are bad. Union is an user-defined-kind value and only user codes can tell the difference. I believe this will also effect the reference count implementation. I suggest that when a type has a union member, it should create a function such as gcValues with a parameter of output range of record (offset: size_t, type: typeid). the function should return that info based on whatever the actual value of those pointer types. If that function is missing, use conservative approach as before Cheers Pham
Re: GSoC 2016 - Precise GC
On Friday, 6 May 2016 at 09:31:08 UTC, Steven Schveighoffer wrote: On 5/6/16 11:06 AM, Dmitry Olshansky wrote: On 06-May-2016 05:37, Jeremy DeHaan wrote: On Wednesday, 4 May 2016 at 12:42:30 UTC, jmh530 wrote: On Wednesday, 4 May 2016 at 02:50:08 UTC, Jeremy DeHaan wrote: I'm not sure, but one would think that @safe code wouldn't need any extra information about the union. I wouldn't know how to differentiate between them though during runtime. Probably someone with more experience with the compiler would know more about that kind of thing. You can identify safe functions with https://dlang.org/phobos/std_traits.html#isSafe or https://dlang.org/phobos/std_traits.html#functionAttributes All I meant was that I don't know enough about what the compiler does with built in types to make this work. It almost sounds like we would need a safe union and unsafe union type and do some extra stuff for the unsafe union, but I'm just starting to learn about this stuff. I'd note that a union without pointers doesn't hurt precise scanner, it's only the ones with pointers that are bad. Ones that have only pointers are probably OK too. Though I'm not sure if a precise scanner takes into account the type of the pointer. I would expect it to use embedded typeinfo in target block. -Steve Because of void* and classes, the GC MUST be able to find out what type was actually allocated, or at least its pointer bitmask.
Re: DConf video news
On Friday, 6 May 2016 at 14:35:02 UTC, Andrei Alexandrescu wrote: Hot off the press from the video producers: "just a heads-up! as a quick fix [a colleague] will add chapter markers in the ustream videos so that one can see who is talking when and directly jump to the talk in question! actually pretty nice i guess. everything else will come later (in better quality)." -- Andrei Thanks for the heads up. Keep us posted.
Re: Adventures in D Programming
On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: I was paged about a blog post from an old friend who floats around the circles in the Debian camp. The author, Matthias, should be no stranger around these forums, though I was surprised to discover that I know him on OFTC too (I wonder if he knows this also). For those who have been watching the talks at dconf, I think there should be nothing unexpected here. But each time we hear from the same issues or conclusions being raised, it gives them more weight in the priority queue for what we need solving. So Matthias, I'd like to give a thanks for your excellent post. And I hope you don't mind me posting it here. http://blog.tenstral.net/2016/05/adventures-in-d-programming.html For everyone else, hope you enjoy the read. -- Iain Not only in his blog, even lwn.net mentions it! Antonio
Re: It's alive! D building D building D, all on Android
On Sunday, 8 May 2016 at 05:08:32 UTC, Rory McGuire wrote: On 08 May 2016 02:21, "Joakim via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: On Saturday, 7 May 2016 at 09:58:14 UTC, Johan Engelen wrote: Fantastic news! I hope we can find a good way to integrate automated testing of github branches/PRs for Android. There is beta support for Android on Travis, perhaps it can be used to run the druntime and phobos tests in an emulator. https://aws.amazon.com/device-farm/ I've heard of it, but it's overkill just to run command-line tests, ie an emulator is enough, and that service costs money. I think that's more for devs who want to test their app on a wide variety of devices, not open-source languages like D.
Adventures in D Programming
I was paged about a blog post from an old friend who floats around the circles in the Debian camp. The author, Matthias, should be no stranger around these forums, though I was surprised to discover that I know him on OFTC too (I wonder if he knows this also). For those who have been watching the talks at dconf, I think there should be nothing unexpected here. But each time we hear from the same issues or conclusions being raised, it gives them more weight in the priority queue for what we need solving. So Matthias, I'd like to give a thanks for your excellent post. And I hope you don't mind me posting it here. http://blog.tenstral.net/2016/05/adventures-in-d-programming.html For everyone else, hope you enjoy the read. -- Iain