Re: C++ Interop
On Saturday, 6 January 2018 at 11:20:01 UTC, Seb wrote: On Saturday, 6 January 2018 at 11:17:56 UTC, Seb wrote: On Friday, 5 January 2018 at 13:02:12 UTC, qznc wrote: I'm exploring [0] C++ interop after watching Walter's presentation [1]. [...] I know about this: https://github.com/Remedy-Entertainment/binderoo https://github.com/dlang/druntime/pull/1802 And: https://github.com/dlang/druntime/pull/1316 Also I think Ian (@ibuclaw) and @Razvan7 are currently working on a header generation tool from D sources to C++ headers. It would be great to have std::vector and std::string out of the box in D, but putting it into druntime? Druntime is supposed to be shared among all frontends, isn't it? GCC and Clang probably do not have equivalent vector/string classes that the same D code can be used.
C++ Interop
I'm exploring [0] C++ interop after watching Walter's presentation [1]. I hit a block with classes as template parameters. This means vector works, but vector does not. D seems to map vector!Foo to vector. Likewise shared_ptr is a problem. Any way to fix that on the D side? The ugly workaround is to adapt the C++ code. I understand that this mapping makes sense for function calls because bar(Foo f) in D maps to bar(Foo *f) in C++. And C++ bar(Foo f) has no equivalent in D because classes are reference types. On a related note, C++ interop requires to redeclare or even reimplement C++ code. Has anybody started a libcpp-in-d project? I'm looking for basics like vector and string. [0] https://github.com/qznc/d-cpptest [1] https://youtu.be/IkwaV6k6BmM
Re: D User Survey
On Friday, 1 December 2017 at 18:56:50 UTC, WebFreak001 wrote: Hi everyone, I made a public survey (everyone can look at the responses) and it would be great if you took some time and answered it. I think it will greatly benefit D as a whole if we had more anonymous data on users. I'm also open for changing some questions if there is confusion. https://docs.google.com/forms/d/e/1FAIpQLSdPFx9ebHJ05QSW1VypBsQPw-1RbZ1v8FMgo1su6NvN6VErBw/viewform The age results look interesting. It seems that the D community is relatively old. Tried to find a comparison, but the Rust survey seems to not ask for the age.
Re: D jobs?
On Saturday, 25 November 2017 at 13:16:19 UTC, Tofu Ninja wrote: Are there any places to look for D jobs? It seems really hard to find anything online. I got a really crappy job doing C++ and hate it to bits. Also if anyone is in the bay area and is in a position to higher maybe check out this project I have been working on in my free time, its a small game engine in D that I have been working on https://github.com/tofuninja/DGraphics. I have an interview scheduled with Funkwerk, but that is in Germany. I knew about them because on of their devs wrote an article on the D blog. I contacted him directly and he relayed me. You could contact Andrei and ask for some contact at Facebook. What happened to warp? https://github.com/facebookarchive/warp
Re: TickDuration deprecation
On Saturday, 18 November 2017 at 16:17:00 UTC, Jonathan M Davis wrote: Folks have asked for the ability to create Durations from floating point values too, and I rejected that for the same reason - using floating point values with time is just begging for bugs, and Walter backed me up on that one. Makes me think about my money library. It does accept floating point values and it has lead to at least one confused user [0]. Hm. [0] https://github.com/qznc/d-money/issues/3
Re: Platform to make any programming language interactive & explorative (http://jupyter.org)
On Sunday, 12 November 2017 at 12:12:43 UTC, Robert M. Münch wrote: Hi, that might be some interesting project to add D to, for interactive exploration. http://jupyter.org Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages. Last change 2 years ago, so probably some update needed. https://github.com/DlangScience/PydMagic
Re: Advice requested for fixing issue 17914
On Monday, 23 October 2017 at 16:56:32 UTC, Brian Schott wrote: Context: https://issues.dlang.org/show_bug.cgi?id=17914 I need to get this issue resolved as soon as possible so that the fix makes it into the next compiler release. Because it involves cleanup code in a class destructor a design change may be necessary. Who should I contact to determine the best way to fix this bug? Looking at git blame [0], I guess Martin Nowak and Nemanja Boric seem to be pretty involved. Not sure how deep Petar Kirov and Sean Kelly are into Fibers. My question wrt to the bug: Why is munmap/freeStack called in the destructor? Could be done right after termination? [0] https://github.com/dlang/druntime/blame/ec9a79e15d446863191308fd5e20febce2053546/src/core/thread.d#L4077
Re: D for microservices
On Sunday, 22 October 2017 at 02:48:57 UTC, Joakim wrote: This is a niche that D and all newer languages should target. How do we do it? Optimize the TechEmpower benchmark? Vibe.d looks quite weak there. https://www.techempower.com/benchmarks/
Re: Unit Testing in Action
On Friday, 20 October 2017 at 14:04:25 UTC, Mike Parker wrote: After a couple of weeks of quiet on the D blog, it's about to get noisy again. The latest is is a post by Mario Kröplin of Funkwerk describing how the company now uses D's built-in tests in their codebase after several years of using third-party frameworks. Blog: https://dlang.org/blog/2017/10/20/unit-testing-in-action/ Reddit: https://www.reddit.com/r/programming/comments/77m8r8/ds_builtin_unit_testing_in_action/ Thanks for this post. Personally, I have not really hit the pain points described here, so I learned something. It is a valuable comparison of different unit-testing libraries and which aspects they tackle. I took the following items from the post: * Phobos should provide a UnitTestError class, so we can separate expectation libraries (which throw) from execution libraries (which catch). The community is not ready to decide on best library, so we need to try things and this separation would make that easier. * fluent-asserts is considered the best expectations library. Syntax is `(x + y).should.equal(42).because("of test reasons");` and it gives nice output with code snippets. * unit-threaded is considered the best execution library, because it shows description strings for each test. The parallelization feature did not work out for the author. * coverage is not sufficiently solved. The author suggests to reformat code so short-circuit evaluations become multiple lines? * Fixtures and test parameters do not require special support because builtin features like static foreach are sufficient.
Re: What is the Philosophy of D?
On Monday, 16 October 2017 at 00:25:32 UTC, codephantom wrote: D's overview page says "It doesn't come with an overriding philosophy." Is philosophy not important? I'd like to argue, that the problem of focusing on getting the job done quickly and reliably, does *not* leave behind maintainable, easy to understand code, but rather it leads to unintended outcomes ... If the philosophy of C, is 'the programmer is in charge', what might the philosophy of D be? e.g. Maximum precision in expression, perhaps? The frontpage says "It combines efficiency, control and modeling power with safety and programmer productivity." The three big words are: Convenience, Power, Efficiency. What are the "philosophies" we are talking about? Probably the usual paradigms, like object-oriented, functional, etc. D supports them, but none of them is overriding or dominant. Maximum safety is another philosophy. D allows you to enhance safety (@safe) or diminish it (inline assembly).
Re: Why Physicists Still Use Fortran
On Monday, 16 October 2017 at 00:26:20 UTC, H. S. Teoh wrote: On Sun, Oct 15, 2017 at 03:09:21PM -0700, Walter Bright via Digitalmars-d wrote: http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/ Some good information there! 1-based array indexing... I don't know, but I've become so accustomed to 0-based indexing that I doubt I'll ever be able to get used to a language with 1-based indexing. Or whether D will ever be able to challenge Fortran in this respect. :P Dijkstra made a good argument for zero-based: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
Re: My first experience as a D Newbie
At least on Ubuntu, this gives me an IDE: dub run dlangide I have not used it much and I don't know if it works on Windows, but it might be the easiest way once you installed dmd and dub.
Re: D on quora ...
On Saturday, 7 October 2017 at 05:19:21 UTC, Adam Wilson wrote: I saw we ditch the lot and focus on the large languages where D can get some traction (C#/Java). I don't see a chance to attack C# unless Microsoft officially adopts D. Java is facing some uncertainty at the moment. The Java 9 module feature (Jigsaw) was forced against community/committee consensus. Oracle seems to let go (See EE4J). Java people are fine with GC, but really care for their IDE and D is lacking there. With respect to GC, I consider performance a red herring. Everybody who really cares for performance has enough possibilities in D to achieve it. My short answer wrt D and GC is "It is not really an issue" which admittedly does not sound very convincing. There is a long answer which is basically the article series in the D blog and I believe it is convincing enough. People looking for a short convincing answer are just chasing some hype, ignore them. I see opportunities for D in the web backend world. Microservices and serverless architectures make it (relatively) easy to introduce new languages. D needs more framework stuff for "easy and quick" microservices. D needs better IDE support, for example in hipster editors like VSCode. I see opportunities for D in the embedded world. The people who try to use Java for embedded would be served very well with D. Crosscompiling and architecture support needs improvement though. I recently heard some praise for Go, which allegedly makes it easier than C or Rust. I'm not sure about performance critical stuff. Maybe marketing C++-integration more could be helpful to get the people who rely on stuff like OpenCV, are forced to use C++ and dream about something better. We are fighting the C++ renaissance cool-aid, though. C++21 will surely solve all problems...
Re: Request for conference talk
On Tuesday, 11 April 2017 at 21:29:15 UTC, Vasudev Ram wrote: On Monday, 10 April 2017 at 07:32:15 UTC, qznc wrote: And accepted :) https://www.topconf.com/conference//duesseldorf-2017/talk/abstractions-from-c-to-d/ Abstractions: From C to D That talk sounds interesting. If the slides and/or video are available after the conf, please post about it here. Slides are available now: http://beza1e1.tuxen.de/talks.html Unfortunately, there is no recording. I need to find another opportunity to give this talk and have it recorded.
Re: Known reasons why D crashes without any message?
On Wednesday, 13 September 2017 at 10:20:48 UTC, Thorsten Sommer wrote: Right now, we are done with the development and ready to start experiments. Until now, almost anything runs fine with our unit tests. Besides the unit tests, the main program is now able to startup but crashes after a while without any message at all. No stack trace, no exception, nothing. Obviously, this makes it hard to debug anything... I assume you see a return code which is nonzero, because you say it "crashes". Which one? Most likely would be a segmentation fault (invalid memory access, stack overflow, null pointer dereferenced, etc). Use a debugger. Compile with debug info and execute wrapped in gdb. It should stop right where it crashes and can show you a stack trace. If necessary, inspect the value of variables. If gdb does not stop on its own, someone is calling exit to terminate prematurely. Set a breakpoint at exit to get a stack trace. If you cannot use gdb on your server and you cannot trigger the crash on your desktop, maybe you can let it coredump on the server? Then use gdb to inspect the dump. Did you try to annotate your code with @safe? It helps to avoid errors leading to segmentation faults.
Re: Let's paint those bikesheds^Werror messages!
On Tuesday, 27 June 2017 at 14:32:28 UTC, Vladimir Panteleev wrote: - Yes, not everyone likes colors. You can turn all colors off with a command-line switch. Is there a way to do this globally? For example, a config file or an environment variable? I'm one of the rare people who use a light background in my terminal (like 99% of websites). It seems only dark backgrounds are considered, which is understandable.
Re: What is your favorite D feature?
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote: Hi, I am currently trying to modernize the D code example roulette on the dlang.org front page [1]. Hence, I would love to hear about your favorite feature(s) in D. Ideas: - favorite language construct - favorite code sample - "only possible in D" Before you ask, yes - I want to add a couple of cool examples to dlang.org (and yep the roulette rotation is currently broken [2]). [1] https://github.com/dlang/dlang.org/pulls?q=is%3Apr+is%3Aopen+label%3A%22Frontpage+example%22 [2] https://github.com/dlang/dlang.org/pull/1757 H. S. Teoh calendar: https://wiki.dlang.org/Component_programming_with_ranges /** * Formats a year. * Parameters: * year = Year to display calendar for. * monthsPerRow = How many months to fit into a row in the output. * Returns: A range of strings representing the formatted year. */ auto formatYear(int year, int monthsPerRow) { enum colSpacing = 1; return datesInYear(year) // Start by generating all dates for the given year .byMonth() // Group them by month .chunks(monthsPerRow) // Group the months into horizontal rows // Format each row .map!(r => r.formatMonths() // By formatting each month .array() // Storing each month's formatting in a row buffer // Horizontally pasting each respective month's lines together .pasteBlocks(colSpacing) .join("\n")) // Insert a blank line between each row .join("\n\n"); }
Re: sqlite3 vs. sqlite-d
On Thursday, 8 June 2017 at 08:44:56 UTC, Russel Winder wrote: But what is D's equivalent to Python's SQLAlchemy? C++ now has sqlpp11. There is HibernateD. http://code.dlang.org/packages/hibernated For my own project, I used handwritten SQL. It is still on my todo list to replace that with HibernateD. So, no practical experience, yet.
Re: Phobos 2
On Thursday, 1 June 2017 at 18:40:05 UTC, Brad Anderson wrote: A (surely controversial) idea popped into my head while talking in #d on Freenode. The C++ guys are making an STL2 (the highlight of it being that it is range based). What about taking all the lessons learned from Phobos and creating a Phobos 2? It wouldn't replace the current version. You could import either in one program. It also wouldn't be a radical redesign. Most of Phobos could be used as is. What it would do is allow fixing some hard or impossible problems without losing backward compatibility. We could do away with auto-decoding. Design it around using Andrei's allocators throughout. Make the GC optional from the start. Fix a few important naming conflicts and discrepancies. There are problems, of course. Rampant code duplication is probably the biggest (though maybe public imports of identical code would help a lot). I don't really expect this to go anywhere but I am curious to hear what changes you'd all like to see made to Phobos that can't happen because of backward compatibility. Also, how would you approach doing this? An on disk copy of Phobos with changes would not be an acceptable approach, I think. Frankly, I do not see the need for Phobos2. If you want to build alternative packages, just go ahead and publish them via dub like Mir, for example. You can even make a meta package, if you find yourself using the same group of packages all the time. Still, why would you call that meta package "Phobos2"? It only confuses people. If you want to rewrite parts of the standard library, build the alternatives first and then we can adopt them piecewise. Nevertheless, I would love to read a detailed analysis of Phobos and what should be improved. Please, write a blog post somewhere. However, do not mention "Phobos2". D has a painful history with two competing standard libraries. If you seriously propose this path, I hope Andrei and Walter will publicly and vehemently oppose it. Otherwise that ghost from the past becomes a PR disaster for D.
Re: Built-in RAII in D
On Sunday, 28 May 2017 at 18:50:02 UTC, Nerve wrote: On Sunday, 28 May 2017 at 18:38:21 UTC, Moritz Maxeiner wrote: All in all, I see little to no benefit to what you propose, while requiring significant work on the language spec. Point taken. My only remaining reservation then is the communication problem D has with the wider prospective programming world in conveying that the GC has alternatives that work. I agree. Currently, a good answer is to direct people to the "Don't fear the reaper" [0] article, but I feel it does not really address all concerns of people. Concerns like: * How much of Phobos does not work with @nogc? A good answer would probably be case studies of larger programs/companies. Does Weka use @nogc a lot? * How to work around the GC? The reaper article does not mention RefCounted. * Limitations of @nogc? It does not prevent *another* thread to call the GC, which might then stop the world. We have to mention the trick to create threads which are not tracked by GC. * How good is the D GC? Will it improve in the foreseeable future? Information about the performance of the current GC is quite dated, although I guess not much has changed. Also, p0nce has some more GC tricks: https://p0nce.github.io/d-idioms/ [0] https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
Re: Another "D is cool" post
On Tuesday, 30 May 2017 at 05:14:21 UTC, H. S. Teoh wrote: On Tue, May 30, 2017 at 01:44:58AM +, Mike Parker via Digitalmars-d wrote: On Monday, 29 May 2017 at 19:51:26 UTC, David Gileadi wrote: > On 5/29/17 12:07 PM, H. S. Teoh via Digitalmars-d wrote: > > [snip an excellent post] > I think a longish post like this would make an excellent > shortish post for the D blog. Yes, please. OK, this is the 3rd or 4th time somebody asked about this. What exactly is involved in making a post on the D blog? Hopefully it would not require too much more effort, because I usually wouldn't have much time to spend on top of the time I already spent writing the original post. If it's just a matter of copy-n-pasting the text somewhere, then perhaps somebody could do that for me? For a more general audience, I would suggest to expand the first paragraph and tell more about your pet project. Some parts should be extended, so non-D-programmers can understand it. For example, the mention of `pragma` is probably confusing for C/C++ people. Inserting a few links would be nice (e.g. for std.array.split). If you really want to put in work, insert lots of code examples with C and D versions. Finally, a question: Did you count lines of code C vs D? Or better yet, number of tokens? Anyways, I was tempted to send the forum link around, so it is already a nice blog post as it is.
Re: Weak Eco System?
On Thursday, 18 May 2017 at 05:43:48 UTC, Manu wrote: On 17 May 2017 at 00:51, Benro via Digitalmars-d < digitalmars-d@puremagic.com> wrote: [...] 4 Hours work. Discouraged and gave up after this. Visual Studio proper is the only IDE that 'just works' well, VisualD is very good. MonoDevelop also has good 'just works' support last I checked, but debugging is much better in Visual Studio. We could use a more precise statement than "just works". Here is someone who likes IntelliJ IDEA's Rust support [0]. What I can see: * Show documentation in tooltip * Inline renaming of local variable (What about project-wide?) * Completion (with semantics, I assume) * Find all uses (of a local variable? What about project-wide?) * One-click dependency resolution (I guess) * Folding What I do not see (might or might not be available): * Advanced refactoring, like "extract function" or "converted lambda to named function" * Clicking on build errors/warnings and showing them inline * Displaying unit test status * Integrated debugger (which should probably have various sub-items...) * Integrated profiling * GUI builder * Color picker [0] https://twitter.com/kot_2010/status/865861074360426496
Re: Weak Eco System?
On Thursday, 18 May 2017 at 05:43:48 UTC, Manu wrote: On 17 May 2017 at 00:51, Benro via Digitalmars-d < digitalmars-d@puremagic.com> wrote: [...] 4 Hours work. Discouraged and gave up after this. Visual Studio proper is the only IDE that 'just works' well, VisualD is very good. MonoDevelop also has good 'just works' support last I checked, but debugging is much better in Visual Studio. Maybe there should be a more precise description what works. I guess Syntax Highlighting works nearly everywhere. Formatting mostly works, but people need to configure dfmt. I would assume refactoring works nowhere, not even VisualD. I have no Windows, I cannot try VisualD, so do not really know. It would require an integrated parser instead of using the usual external tools (dftm, etc).
Re: Eric Niebler talks about C++ Ranges at Microsoft Campus Wed evening
On Thursday, 18 May 2017 at 20:09:04 UTC, Mark wrote: Eric's talks are generally not to be missed. I remember this talk of him, which was great: CppCon 2015: Eric Niebler "Ranges for the Standard Library" https://www.youtube.com/watch?v=mFUXNMfaciE "Stolen from the D community wiki" :D
Re: Serialization in D
On Friday, 12 May 2017 at 18:06:32 UTC, qznc wrote: Nice. Coincidentally, I also just published an article. It shows how Lua binding are magically concise thanks to D meta programming. My blog: http://beza1e1.tuxen.de/into_luad.html Reddit: https://www.reddit.com/r/programming/comments/6asxnc/how_to_generate_lua_boilerplate_with_d/ Maybe some people are interested into the traffic patterns. I posted my article roughly at the same time to HN, reddit, and lobste.rs. HN is by far the most traffic. Nothing new here. http://imgur.com/a/LGCE3 graph by Piwik From 2830 visitors 25 people clicked through to dlang.org.
Re: Fantastic exchange from DConf
On Sunday, 14 May 2017 at 02:11:36 UTC, bachmeier wrote: On Sunday, 14 May 2017 at 00:05:56 UTC, Dibyendu Majumdar wrote: (a) Trust the programmer. I don't understand this point. C doesn't offer the programmer much to work with. If you trust the programmer, shouldn't that mean you provide a large set of tools and let them decide which parts to use? C is pretty much "here are some pointers, go have fun". The C99 Rationale also says: "The Committee is content to let C++ be the big and ambitious language. While some features of C++ may well be embraced, it is not the Committee’s intention that C become C++." I read that as: C is mostly in preservation and fossilization mode. If you want new features look elsewhere. We will not rock the boat. That is probably a good thing. C has its niche and it is comfortable there. If you want to beat C, it will not fight back. The only problem is to convince the C programmers to move.
Re: Serialization in D
Nice. Coincidentally, I also just published an article. It shows how Lua binding are magically concise thanks to D meta programming. My blog: http://beza1e1.tuxen.de/into_luad.html Reddit: https://www.reddit.com/r/programming/comments/6asxnc/how_to_generate_lua_boilerplate_with_d/
Re: Thank You DConf 2017
On Saturday, 6 May 2017 at 16:44:00 UTC, Stanislav Blinov wrote: Fantastic three days of presentations. A big Thank You to all presenters, organizers and sponsors, and a special Thank You to the team that made the livestream possible, so even those of us who couldn't make it to Berlin could not only learn from the conference but actually participate. An awesome event and lots of food for thought, exploration, experimentation and implementation. Thank You! I completely agree! :) Now I wish the remaining people a lot of fun at the hackathon and wait for some talks I missed to be published.
Re: On Andrei's Keynote / checkedint
On Saturday, 6 May 2017 at 14:14:25 UTC, Andrei Alexandrescu wrote: [0] http://beza1e1.tuxen.de/leaky_abstractions.html Nice job writing a post so quickly! It was a coincidence. It took longer. That post is part of my preparation for another conference [0], but that talk will be strongly influenced by DbI and other tidbits from DConf. ;) [0] https://www.topconf.com/conference//duesseldorf-2017/talk/abstractions-from-c-to-d/
Re: Adding D code to a C++ codebase
On Saturday, 6 May 2017 at 11:44:28 UTC, Russel Winder wrote: CLion, IntelliJ IDEA, Eclipse/CDT, Xcode, and Visual Studio seem to be the IDEs of the moment. There is effort to get D support in IntelliJ IDEA, but CLion is where the C++ folk are. Eclipse/CDT appears to have lost all activity on the D support. I'm on Linux so Visual Studio is not an possibility. There is a plugin for IntelliJ [0], but I have not tried it. I don't know the Jetbrains products. Is Clion and IntelliJ IDEA the same core with different plugins and branding or is it really different? [0] https://github.com/intellij-dlanguage/intellij-dlanguage
Re: On Andrei's Keynote / checkedint
On Saturday, 6 May 2017 at 10:45:56 UTC, qznc wrote: I just watched Andrei's Keynote slightly delayed so I could not ask live via chat. One question and one remark: 1. ... 2. ... 3. Checkedint has the same problem as std::string in C++, which Scott Meyers highlighted in his keynote the day before: Literals are not wrapped, so `checked_x + 42 + 42` may behave differently to `42 + 42 + checked_x`.
On Andrei's Keynote / checkedint
I just watched Andrei's Keynote slightly delayed so I could not ask live via chat. One question and one remark: 1. Is there any reason to restrict this to integrals? Why not use Checked!(float,H) or Checked!(complex,H) or Checked!(polynomial,H)? If it is more general, then we should change the name as long as we still can (it is experimental). 2. With respect to "Where did you steal all this money?": I recently [0] read about the Metaobject Protocol (MOP) and I noticed some similarities. MOP comes from the Lisp world, where things are more dynamic, but also compile-time and run-time are not that clearly separated. At least the intention of Gregor Kiczales and Andrei's DbI match. In Kiczales words from 1992 [1]: "for those cases where the underlying implementation is not adequate, the client has a more reasonable recourse. The meta-level interface provides them with the control they need to step in and customize the implementation to better suit their needs" [0] http://beza1e1.tuxen.de/leaky_abstractions.html [1] https://pdfs.semanticscholar.org/39ea/ec97dde6db7e2245e9b8dc662652a3cefa64.pdf
Re: Fantastic exchange from DConf
On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: Walter Bright: I firmly believe that memory safety is gonna be an absolute requirement moving forward, very soon, for programming language selection. Scott Meyers: For, for what kinds of applications? Walter: Anything that goes on the internet. Scott: Uh, let me just, sort of as background, given the remaining popularity of C, unbelievable popularity of C, which is far from a memory-safe language, do you think that that... I'm having trouble reconciling the ongoing popularity of C with the claim that you're making that this is going to be an absolute requirement for programming languages going forward. Walter: I believe memory safety will kill C. Scott: ... Wow. https://www.youtube.com/watch?v=_gfwk-zRwmk#t=8h35m18s The whole exchange starts with a question at the 8h:33m mark and goes on for about 13 mins, worth listening to. I agree with Walter that safety will be big going forward, should have been big already. Hm, Sociomantic removes the live captures the next day? One request: Chop the panel discussion into one clip per question/topic, please. Alternatively, provide some means to easily jump to the start of each question.
Re: DConf 2017 Berlin - Streaming ?
On Friday, 5 May 2017 at 06:33:13 UTC, Joakim wrote: On Friday, 5 May 2017 at 06:32:31 UTC, Joakim wrote: They were posted to reddit, Mike will probably do it again. Whoops, forgot to give the reddit link: https://www.reddit.com/r/programming/comments/696310/d_programming_language_conference_2017_day_1_live/ I guess the best link every time is: https://www.youtube.com/user/sociomantic/live
Re: Blog post on automem
On Friday, 28 April 2017 at 15:39:07 UTC, Swoorup Joshi wrote: On Friday, 28 April 2017 at 14:40:03 UTC, Mike Parker wrote: Atila was kind enough to do a write up on his automem library for the D Blog, talking about why he did it and showing some of the implementation details. This is officially part of the GC series. The next post in the series will be my @nogc post (I've pushed it back to after DConf). [...] Automem is something, that should just be there in the standard library. There is a RefCounted in std.typecons as well. The article does not explain the differences though.
Re: Thoughts from newcommer
On Wednesday, 12 April 2017 at 19:31:06 UTC, thedeemon wrote: On Tuesday, 11 April 2017 at 19:57:19 UTC, Piotr Kowalski wrote: http://benchmarksgame.alioth.debian.org/ Why D is not there? Because maintainer of that site doesn't want D there, as I remember from previous discussions. At some point (years ago) D was present there, then removed. C and C++ programs are trivially translatable to D and compiled with the same LLVM backend with LDC, so whatever speed is shown by C and C++ there can usually be repeated in D. No. Isaac is very cooperative. He usually pops up quickly, if someone mentions benchmarksgame. https://forum.dlang.org/post/wcownwoteiownrtni...@forum.dlang.org https://forum.dlang.org/post/rrfbuokpyhjsusuxq...@forum.dlang.org https://forum.dlang.org/post/iskkpwaaaqlcgjymh...@forum.dlang.org
Re: Use of "T"
On Wednesday, 12 April 2017 at 13:17:42 UTC, solidstate1991 wrote: How can I make use of T? I've seen it being used many times for this application. What "T"? This letter is often used as a generic template parameter. Are you talking about templates? Maybe you can give some examples of the "many times" you have seen it used?
Re: Walter and Andrei and community relationship management
On Wednesday, 12 April 2017 at 07:51:28 UTC, Joakim wrote: On Tuesday, 11 April 2017 at 19:18:32 UTC, H. S. Teoh wrote: On Tue, Apr 11, 2017 at 10:24:01AM -0700, Walter Bright via Digitalmars-d wrote: On 4/11/2017 2:18 AM, qznc wrote: > It usually comes down to charismatic and visionary leaders. > Walter and Andrei are good with that, otherwise D would > have faltered long ago. For a socially inept nerd such as myself, with all the charisma of a lamppost, I think D has done very well. You underestimate yourself. While you're no charismatic hero by any stretch of imagination, you do carry quite some weight in what you say simply by your history of achievements, as well as your technical expertise and wealth of experience in computer-related issues. It's no surprise that in this crowd full of like-minded nerds who respect technical expertise, you're doing none too badly. It might be a completely different story if you were in a more "typical" social setting, though. :-P I was going to say something similar. I have seen responses in reddit/HN threads where devs were in awe that Walter Bright responded to them. In the tech community, which has _completely_ different ideas of what constitutes charisma and vision, Walter and Andrei, with his distinguished history and very entertaining talks, are pretty much the definition. That is not the issue, D has those in spades. +1 I'm not sure if Walter can claim to have written a complete C++ compiler all by himself. Even if not, he is probably the one person on this planet, who is closest. Walter is also pretty good with nerd-sniping [0]. ;) [0] Example: https://forum.dlang.org/post/mg13tc$2ptk$1...@digitalmars.com
Re: Request for conference talk
On Tuesday, 11 April 2017 at 21:29:15 UTC, Vasudev Ram wrote: On Monday, 10 April 2017 at 07:32:15 UTC, qznc wrote: And accepted :) https://www.topconf.com/conference//duesseldorf-2017/talk/abstractions-from-c-to-d/ Abstractions: From C to D That talk sounds interesting. If the slides and/or video are available after the conf, please post about it here. Sure. The last TopConf conferences were published to Youtube. I have a plan for the content, but it is not final. If you have any suggestions, I'd like to hear them. :)
Re: Thoughts from newcommer
On Tuesday, 11 April 2017 at 19:57:19 UTC, Piotr Kowalski wrote: Two other important things to change people minds about D performance: http://benchmarksgame.alioth.debian.org/ Why D is not there? I worked on that [0] and decided its not worth it. It is literally a "game". You can have some fun tuning benchmark programs. You should not let it influence your decision making. If you want to talk about performance, articles like the one on Mir GLAS [1] provides better information. [0] https://github.com/qznc/d-shootout [1] http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/glas-gemm-benchmark.html
Re: The D ecosystem in Debian with free-as-in-freedom DMD
On Tuesday, 11 April 2017 at 12:56:59 UTC, Jonathan M Davis wrote: But if we just use dub - which _is_ the official packaging and build tool - then we avoid these issues. Ideally, the compiler and dub would be part of the distro, but libraries don't need to be. And it sounds like that's basically how the Go and Rust folks want to function as well. So, it would make sense for these languages to simply not have their libraries be included in distros. The build tools are plenty. This is not compatible with Debian. Debian requires to include *everything*. You must be able to build every package without network access only from source packages. Essentially, somebody must fix this dub issue: https://github.com/dlang/dub/issues/838
Re: fluent-asserts released
On Sunday, 9 April 2017 at 13:30:54 UTC, Szabo Bogdan wrote: Hi! I just made an update to my fluent assert library. This is a library that allows you to write asserts in a BDD style. Right now, it contains only asserts that I needed in my projects and I promise that I will add more in the future. I would really appreciate any feedback that you can give me. https://code.dlang.org/packages/fluent-asserts Thanks! I was looking for testing exceptions. It is not documented, but the seems to be there. Still, it looks weird, because it does not fit the style: should.not.throwAnyException({ throw new Exception("test"); });
Re: "Competitive Advantage with D" is one of the keynotes at C++Now 2017
On Tuesday, 11 April 2017 at 06:08:16 UTC, Ali Çehreli wrote: I will be presenting D as a time-saving tool at C++Now: http://cppnow.org/ I have to say it took me a very long time to come up with the title and the abstract. How could I sell D to C++ experts? Luckily, I asked Manu and among a long list of ideas he said "it's about saving time" and "time is money". How can you argue with that? ;) Do you agree or disagree that D brings competitive advantage? Please let me know. Safety (bounds checking, @safe, memory safety) is huge for debugging. You can probably steal a lot from Walters DConf Talk. Compilation time, because a quick iteration of edit-compile-test is significant for productivity and really underrated. C++ interop, so you can migrate from C++ to D in small steps and without building a C API bridge. Little things C++ lacks because it is too old: A package manager, a standard string type. Meta programming naturally, but "static if" might trail into discussions about concepts, so it is a little bit dangerous?
Re: "Competitive Advantage with D" is one of the keynotes at C++Now 2017
On Tuesday, 11 April 2017 at 06:08:16 UTC, Ali Çehreli wrote: I will be presenting D as a time-saving tool at C++Now: http://cppnow.org/ Looks like C++Now has two keynotes. One keynote on D and one keynote on Rust. Maybe they should change their name. ;)
Re: Walter and Andrei and community relationship management
On Tuesday, 11 April 2017 at 02:20:07 UTC, Walter Bright wrote: On 4/10/2017 6:04 PM, Jonathan M Davis via Digitalmars-d wrote: LOL. IIRC, there have been cases where you and/or Andrei have actually tried to get folks to do specific stuff, and it generally hasn't worked. Pretty much everything that gets done around here is because someone steps and does it. It pretty much totally doesn't work, even when the person asks "what can I work on?" It's an interesting management problem, one I've never seen covered in management books, which never seem to cover volunteer organizations. I'd say it is more about politics than management theory. At least in the lower ranks of politics. Local affairs are driven by volunteer work as well. It usually comes down to charismatic and visionary leaders. Walter and Andrei are good with that, otherwise D would have faltered long ago.
Re: The D ecosystem in Debian with free-as-in-freedom DMD
On Monday, 10 April 2017 at 11:40:12 UTC, Matthias Klumpp wrote: 1) Is there some perspective on D getting a defined ABI that works with all major D compilers? 2) What would the D community recommend on how to deal with the ABI issues currently? A Linux distribution is a bunch of tightly integrated software, and changing one piece in an incompatible way (e.g. by building it with LDC instead of DMD) will have consequences. 3) Will DMD support more architectures in the near future? How should the architecture issue be handled? My prediction for Walters reply: 1) No. Not worth it, because templates, ctfe, etc. 3) No. Not worth it, because D frontend stuff is more important. Also: If you want to help out Debian's D team, feel free to ping me or any other D team member (we are very short handed and are only two active people right now). See https://wiki.debian.org/D (caution, wiki page is very outdated, last touched in 2012) Tentative ping, but that Wiki page is not helpful. The linked svn repo is empty. Where and how do you work? I guess the issue are still the same as you wrote here (except 1. is solved): https://gist.github.com/ximion/fe6264481319dd94c8308b1ea4e8207a So, mostly dub needs work, I guess.
Re: The D ecosystem in Debian with free-as-in-freedom DMD
On Monday, 10 April 2017 at 11:40:12 UTC, Matthias Klumpp wrote: So, in summary: 1) Is there some perspective on D getting a defined ABI that works with all major D compilers? 2) What would the D community recommend on how to deal with the ABI issues currently? A Linux distribution is a bunch of tightly integrated software, and changing one piece in an incompatible way (e.g. by building it with LDC instead of DMD) will have consequences. 3) Will DMD support more architectures in the near future? How should the architecture issue be handled? I am interested in some feedback here, since I currently can't see a good way to address these issues. How do Debian and C++ go along? There is no ABI compatibility between GCC and Clang afaik. I general, I would favor to build stuff with LDC instead of DMD, because of performance.
Re: Request for conference talk
On Friday, 3 February 2017 at 12:08:44 UTC, qznc wrote: Topic idea two: A more general talk about abstractions. Starting from the basics (procedures) up to Design-by-Introspection techniques which are quite D specific. In between stuff like the "magic" D Lua bindings. This topic is probably interesting for C++ and Java programmers as well. Other TopConf talks and thus the audience seem to be quite mainstream. And accepted :) https://www.topconf.com/conference//duesseldorf-2017/talk/abstractions-from-c-to-d/ Abstractions: From C to D Abstraction is about hiding the irrelevant to focus on the relevant. A master in the art of abstraction will find the right balance between the over-engineered swiss army knife and the tedious boilerplate. This talk starts at common ground for many people: The C programming language. Then we explore more powerful techniques of abstraction enabled by the D programming language with its unique meta programming techniques.
Reading on D safety?
Safety of C has been in the (hacker) news lately [0]. When I tried to tell people about D, I had no good link to share on the topic. The spec for @safe [1] is not comprehensive. The article of SafeD [2] is fluffy and without much meat. The C to D comparison is too much irrelevant stuff. I found nothing on the blog. The topic of safety is an important one imho. It comes up again and again. D has a good story to tell about being easier than Rust and safer than C++. How should this be addressed? A blog article? [0] https://news.ycombinator.com/item?id=13966241 [1] https://dlang.org/spec/function.html#function-safety [2] https://dlang.org/safed.html
Re: Dont Fear the Reaper -- A gentle introduction to D's GC
On Monday, 20 March 2017 at 14:07:35 UTC, Mike Parker wrote: This is the first in a series of posts introducing D's garbage collection and how it interacts with user code. This one is a basic introduction. Blog: https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/ Reddit: https://www.reddit.com/r/programming/comments/60gnx0/dont_fear_the_reaper_a_gentle_introduction_the_d/ Whenever the GC comes up, I wonder about the "conservative" part. As far as I know there were attempts to make the GC "precise". What is the current status about that? If it is the subject of a future part of the series, I can wait. ;)
Dub and bindings
Are there any general tips or best practices for bindings in dub packages? For example, I love the d2sqlite3 package. It just works out of the box. No linker configuration or anything. However, that is probably a testament to sqlite's lack of dependencies. That cannot work for libraries, which rely on other libraries. Should the C code be included in the Github repo? Are submodules fine? Should the C build be invoked by dub via "preBuildCommands"? What about system libraries? Can that be made cross-platform? Should lflags be specified in the dub config or should they be passed via environment variable? There should be a general guide for this. Maybe there already is one?
Re: Zcoin implementation bug enabled attacker to create 548, 000 Zcoins
On Tuesday, 7 March 2017 at 15:34:54 UTC, ketmar wrote: Jack Stouffer wrote: On Tuesday, 7 March 2017 at 15:05:45 UTC, ketmar wrote: only for primitive types, sadly. void main () { Object a, b; a == b; } oops. no more error messages. yes, i know that this invokes `opEquals()`, and `opEquals()` can have side-effects. but what are the chances of writing such code *intentionally*? Hmm, I guess the compiler can (and should) output an error message if it knows that opEquals is `pure`. https://issues.dlang.org/show_bug.cgi?id=17245 yet Object's `opEquals()` is not pure (and it cannot be, to allow non-pure overloads). still, the code i've written has no sense. I'm curious. Where does it make sense for opEquals to be non-pure? Likewise opCmp, etc. Maybe we want to support weird DSLs, where operators are reused with very different semantics? For example, the pyparsing parser generator allows you to write a grammar like [0] this: exp << Group(lparen + op + (number | exp) + (number | exp) + rparen) [0] http://pyparsing.wikispaces.com/file/view/pycalc.py/480674428/pycalc.py
Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D
On Tuesday, 7 March 2017 at 03:04:05 UTC, Joakim wrote: https://z0ltan.wordpress.com/2017/02/21/goodbye-rust-and-hello-d/ "A much much safer language than C++ while being much more programmer-friendly than Rust." Nice quote. :) I somewhat wonder about "Arrays (arguably the most important data structure) are actually sane, consistent, and very much logically intuitive in D unlike the mess that’s C (and C++)." At some points, people get bitten by the determinism issue [0]. Probably, z0ltan was lucky so far. Nevertheless, arrays/slices are the way they are for good reasons. [0] https://dlang.org/d-array-article.html
Re: Range with lookaround
On Thursday, 2 March 2017 at 01:44:19 UTC, Andrei Alexandrescu wrote: May be worth discussing in here: https://issues.dlang.org/show_bug.cgi?id=17238 -- Andrei I don't understand the use case. PR #5153 seems to be about getting the last element, not about some lookahead. When I think about lookahead, I always think of parsers. If the lexer provides an input range of tokens, my recursive descent parser might need 3 tokens lookahead, for example. For the lexer input a "push back a character into my input" is more convenient. Should it give some performance guarantees? I guess, we don't want to refresh the buffers at every popFront, so it would probably be as lazy as possible.
Re: What about this logo ":D" to advertise the D language ?
On Thursday, 2 March 2017 at 09:45:40 UTC, Martin Tschierschke wrote: On Thursday, 2 March 2017 at 09:05:43 UTC, Jared Jeffries wrote: I'm not completely joking ;) D deserves a lot more fame, because it really allows programmers to "develop with a smile", so maybe the logo and slogan should reflect it... With D you can get the job done, as with C++, Java, C#, Node.js etc, but easier, faster, safer and with a lot more pleasure ! D is really good at this, hence the logo :D I like it! The D evolution: :-( => :-| => :-) => ;-) => :D Why D? Give your coding a smile :D Isn't it :C => :C++ => :D Much better than :C# of course.
Life is better with community automation
I just watched this talk "Life is better with Rust's community automation" by E. Dunham Video: https://youtu.be/dIageYT0Vgg Blog post: http://edunham.net/2016/09/27/rust_s_community_automation.html (Not the same talk, but very close and by the correct speaker/blogger) Some of the 2017 H1 vision [0] concerns "Improve process (release, DIPs, deprecations/enhancements)" and "Improve operational efficiency". So community automation fits the agenda. I guess most people are roughly aware of the Rust tooling (bors, highfive, etc). Somethings are replicated with D, but we don't anthropomorphize [1] our tools. One thing, I did not know yet was the Servo Starters website [2]. Servo is not Rust itself, but its biggest "demo" project. The starters website is for newbies, who would like to contribute a little. It maintains a list of open issues for newbies and filters them a little. With D, we just point people to the wiki [3]. Maybe this approach would be a little more inviting? [0] https://wiki.dlang.org/Vision/2017H1 [1] https://auto-tester.puremagic.com/ [2] https://starters.servo.org/ [3] https://wiki.dlang.org/Get_involved
Re: Snap package for LDC 1.1.0 available to test
On Friday, 3 February 2017 at 22:56:33 UTC, Joseph Rushton Wakeling wrote: Please do let me know what your experience is trying the package! Worked in my quick try. :) Why does it not show up with `snap find`? Because it is "edge"?
Re: Request for conference talk
On Thursday, 2 February 2017 at 21:09:38 UTC, Chris Engelbert wrote: Hey guys, we organize a conference (TopConf) this year for the first time in Dusseldorf, Germany. I would like to see if there are interested speakers to give a talk about D. The conference is hold in English and is not specific to a single programming language but will feature multiple different ones as well as some more soft-skill like sessions / tracks. I'm looking forward to see if there are interested people. The CFP page is available here: https://www.topconf.com/conference/duesseldorf-2017/callforpaper I'm tempted and will think about it. Topic idea one: Dust off my "Functional Programming in D" [0] talk. However, it is tight in 40 minutes for an audience, which probably does not know D at all. Topic idea two: A more general talk about abstractions. Starting from the basics (procedures) up to Design-by-Introspection techniques which are quite D specific. In between stuff like the "magic" D Lua bindings. This topic is probably interesting for C++ and Java programmers as well. Other TopConf talks and thus the audience seem to be quite mainstream. [0] http://beza1e1.tuxen.de/articles/functional_D.html
Re: Snap packages for D compilers and core projects
On Monday, 30 January 2017 at 16:53:34 UTC, Joseph Rushton Wakeling wrote: Snap packaging started as something Ubuntu were developing for their use-case, but started gaining cross-distro interest last year (probably because AFAICT its feature-set and simplicity of use is quite a bit ahead of alternatives like Flatpak). I just tried FlatPak and Snap. Snap is actually useable. FlatPak might be superior technology with its sandboxing, but I'm no expert. FlatPak has no central repository, which makes it unuseable for the layman at the moment. It feels like the PPA situation in Ubuntu. Snap has stuff like pulseaudio (audio daemon) or ogre (rendering engine) in the repo. That seems weird, because these are not applications. The first belongs into the base system, the second into a development environment.
Re: Call for arms: Arch Linux D package maintenance
On Wednesday, 1 February 2017 at 12:47:51 UTC, Dicebot wrote: As I have previously announced (http://forum.dlang.org/post/o6fbbu$1qli$1...@digitalmars.com), I am stepping down from maintaining Arch Linux packages for D. That means there are 3 possibilities: - No one will adopt them and all packages will be moved to AUR - Some existing Trusted User decided to adopt them - Someone from D community decides to become Trusted User and adopts them In another thread [0] Snap packages are discussed. What is the view of Arch? If Snap wins, there would be only one package to maintain for all distros. [0] https://forum.dlang.org/post/mzklrdgeyymuwmtqz...@forum.dlang.org
Re: Snap packages for D compilers and core projects
On Sunday, 29 January 2017 at 20:07:50 UTC, Joseph Rushton Wakeling wrote: The question is, (i) is this a welcome proposal? and (ii) if it is welcome, what do people see as the best way to go about this? No comments? Well, there seems to be no downside (apart from the work). So far, I considered Snap an Ubuntu-only initiative of yet-another-package-format. If it really gains cross-distro support, this is a great way for better D support on Fedora, Arch, etc. What is the evidence for cross-distro support? Can it be measured somehow? Is it legally possible to distribute DMD this way? Afaik only dlang.org is allowed to distribute it publically due to the backend licence issue.
Re: A mini D book: Markdown or LaTeX?
On Thursday, 26 January 2017 at 02:41:24 UTC, Walter Bright wrote: On 1/24/2017 6:27 AM, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. I've used Ddoc to publish a couple of Kindle books. https://www.amazon.com/s/ref=dp_byline_sr_ebooks_1?ie=UTF8=Walter+Bright=digital-text=Walter+Bright=relevancerank "The Historian's History of the World Vol. 1: Prolegomena: Egypt, Mesopotamia" What about Vol. 2? ;)
Re: A mini D book: Markdown or LaTeX?
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. I used Sphinx here: https://qznc.github.io/d-tut/ The syntax "ReStructured Text" is more ugly than Markdown, but has more features (e.g. different kinds of blocks). Sphinx can generate HTML, LaTeX, EPub, and more. http://www.sphinx-doc.org/
Re: Testing in the D Standard Library
On Friday, 20 January 2017 at 13:35:40 UTC, Mike Parker wrote: Jack Stouffer details how unit testing, code review, and code coverage are handled in the development and maintenance of Phobos. Thanks, Jack! Blog: https://dlang.org/blog/2017/01/20/testing-in-the-d-standard-library/ Reddit: https://www.reddit.com/r/programming/comments/5p3vlq/testing_in_the_d_standard_library/ No comments on Reddit? I guess everybody is busy with the Trump inauguration.
Re: Vision document for H1 2017
On Wednesday, 4 January 2017 at 19:22:33 UTC, Andrei Alexandrescu wrote: We release a brief Vision document summarizing the main goals we plan to pursue in the coming six months. This half we are focusing on three things: safety, lifetime management, and static introspection. https://wiki.dlang.org/Vision/2017H1 I guess the 2017H1 document is quite final now. Why not turn that into a blog post? It could be official (by the leaders) or informal (interview with Andrei).
Re: Red Hat's issues in considering the D language
On Wednesday, 21 December 2016 at 17:49:43 UTC, Johannes Pfau wrote: Am Wed, 21 Dec 2016 08:18:48 -0500 schrieb Andrei Alexandrescu: On 12/20/16 6:08 PM, Andrei Alexandrescu wrote: > Hello, a few engineers at Red Hat are taking a look at using > the D language on the desktop and have reached out to us. > They have created a list of issues. We are on the top-level > ones, and of course would appreciate any community help as > well. > > https://gist.github.com/ximion/77dda83a9926f892c9a4fa0074d6bf2b An engineer from Debian wrote down what's needed on the distribution side to give a green light to the D language: https://gist.github.com/ximion/fe6264481319dd94c8308b1ea4e8207a From a compiler dev point of view I think one of the most important issues is the stable ABI. Many of the compiler specific problems could be solved easily if we could mix code from different compilers. Rust is considering to install packages as source code. https://internals.rust-lang.org/t/debian-rust-packaging-policy-draft/4453 Not an ideal solution. Having a stable ABI would be better. A pragmatic idea, though.
Re: [GSoC] Precise GC
On Sunday, 23 October 2016 at 05:34:08 UTC, Jeremy DeHaan wrote: On Monday, 17 October 2016 at 02:59:15 UTC, Dsby wrote: On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote: On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be getting merged. [...] On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi,how about the precise GC, now? I want to known too. I was asked the same question on github, but I'll answer it here too with a couple more details. I've done a little work, but not enough to getit finished. I started school a couple of weeks ago and I'm still trying to get my schedule figured out, but I'm hoping to start putting some regular effort into it starting next week. Did anything happen?
Re: D future ...
On Tuesday, 20 December 2016 at 10:18:12 UTC, Kelly Sommers wrote: The things I really want from D to really sway me would be the following (some already exist): 1. Evolve the GC like Go has. 2. No overhead calling C libraries. 3. Easily composable libraries. 4. Good IDE support. I agree. 1. takes surprisingly long. There is still no precise GC. 2. and 3. are already there. Well, libraries are never perfect, of course. 4. is proceeding, but slowly. Afaik no core dev uses an IDE.
Re: D future ...
On Tuesday, 20 December 2016 at 08:41:21 UTC, Benjiro wrote: F*ck this. Its like talking to walls. Anyway, do what you want. I have my own projects to deal with and i can write around the lacking libraries, documentation etc. Unfortunately, not everybody can and its those people you are hurting with that wiseass attitude. Good luck getting new people motivated in D like that. What did you expect with a rant like that? You vented your anger. This is fine. Some concrete actions were already taken (e.g. Andrei filed an issue about writeln). People should do this more often, because core-devs are blind to issues such as writeln documentation. They never look that up. Thanks for that! However, into your rant mixed proposals in a "wiseass attitude" with lots of bikeshedding potential. Naturally, people react to that and shoot it down. If you want to do something like that again, my advice would be: Delay the proposals until the very end and write in a very humble way. Describing the problems precisely is worth more than coming up with ideas for a solution anyways.
Re: The Computer Language Benchmarks Game - no D
On Sunday, 18 December 2016 at 22:50:36 UTC, Brad Anderson wrote: On Sunday, 18 December 2016 at 21:29:05 UTC, jmh530 wrote: On Sunday, 18 December 2016 at 21:26:36 UTC, Boston wrote: Some days ago I'd been looking for comparisons between different programming languages, and I found this site: It's been discussed on the forum before. Yeah, many times. We'd all like to see D there but Isaac Gouy (the maintainer of the language shootout) has made it pretty clear D isn't getting on there but he welcomes anyone to use the shootout's infrastructure to run their own benchmarks for D and put it up on their own site. I did this [0]. Eventually, I stopped because so many of the benchmark programs are not worth it these days. The most useful benchmark is regexdna. It compares D's stdlib regex engine with established C/C++ libraries. However, you could use the C/C++ libraries in D just as well. So, is that a meaningful comparison? Where C/C++ wins over D (well LDC), it is usually about some builtins for SSE instructions. Those are not portable in C or D, though. [0] https://github.com/qznc/d-shootout
Re: A betterC modular standard library?
On Sunday, 18 December 2016 at 14:37:55 UTC, Radu wrote: On Sunday, 18 December 2016 at 09:26:09 UTC, Ilya Yaroshenko Who is interested in betterC _modular_* standard library? I am planing to make libmir org a community for it. Thought and concerns? I hope this doesn't turn into a new Tango vs. Phobos war. My first thought as well. Probably an irrational fear, but the question will pop up often.
Re: Making preconditions better specified and faster
On Thursday, 15 December 2016 at 18:48:22 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=16975 Whenever I think about preconditions and speed, I think that they should actually be put into the caller instead of into the function/callee. The chance that intra-procedural optimization can remove the checks increases. Of course, inlining voids the discussion, but think about the non-inline case. pragma(inline, false) int twice(int x) in { assert(x < int.max / 2); } body { return x + x; } void main() { int x = 42; int y = twice(x); } You can put the check at the front of twice, which makes it necessary to evaluate the check at runtime. Alternatively, put the check into the main function, where constant propagation and folding can easily remove the check. Obviously, the downside is code size when precondition-functions are called from more than one point. (This is probably off-topic for the issue, thus my comment here)
Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm
On Friday, 9 December 2016 at 10:25:49 UTC, Kagamin wrote: On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote: http://beza1e1.tuxen.de/articles/functional.html What about python and javascript? Python and Javascript are mixed paradigm languages. You could argue if purity and immutability are part of FP, then Python and Javascript lack essential parts of FP and are not mixed. That is a good point. It is also what hardcore FP programmers think about those languages. They pity them. If FP is about being declarative, then logic programming (Prolog) is even more so.
Re: [OT] Interesting blog post on disadvantages of the pure functional paradigm
On Friday, 9 December 2016 at 09:58:27 UTC, Kagamin wrote: Functional doesn't imply purity and immutability I disagree. What is your definition of Functional Programming? Mine: http://beza1e1.tuxen.de/articles/functional.html
Re: Should we warn if we detect null derefernces or void value uses ?
On Monday, 5 December 2016 at 04:41:55 UTC, Stefan Koch wrote: This requires data-flow analysis (The same kind that tells you if you are skipping a statement) And will slow down compilation a little if we enable such a warning. I would rather see a separate tool for stuff like this. It can be much slower and do much more analysis. Compare: clang-analyzer http://clang-analyzer.llvm.org/
Re: Joe Duffy on concurrency
On Thursday, 1 December 2016 at 12:17:46 UTC, Barry wrote: http://joeduffyblog.com/2016/11/30/15-years-of-concurrency/ delegate void PureFunc() immutable; This meant that a lambda conforming to the PureFunc interface could only close over immutable state. Notice how powerful this has suddenly become! This PureFunc is precisely what we would want for a parallel task. As we will see shortly, these simple concepts alone are enough to enable many of those PFX abstractions to become safe. That is an interesting idea. Afaik, D does not allow to limit closure like this?
ESA's Schiaparelli Mars probe crashed because of integer overflow
Although, the article [0] does not say that literally, it sounds like an integer overflow: After trawling through mountains of data, the European Space Agency said Wednesday that while much of the mission went according to plan, a computer that measured the rotation of the lander hit a maximum reading, knocking other calculations off track. That led the navigation system to think the lander was much lower than it was, causing its parachute and braking thrusters to be deployed prematurely. "The erroneous information generated an estimated altitude that was negative—that is, below ground level," the ESA said in a statement. That is why we need CheckedInt, folks. Reminder End. ;) [0] http://phys.org/news/2016-11-glitch-blamed-european-mars-lander.html
Re: Don't truncate forum titles, use multiple lines instead
On Sunday, 20 November 2016 at 08:59:19 UTC, Tourist wrote: Please implement the suggestion. Thanks. http://imgur.com/X7fJLpF For mobile I would prefer it to use the whole width for the title and convert the other two columns into "subtitle text" below.
Re: TechEmpower Web Framework Performance Comparison Round 13 -- vibe.d non-starter?
On Friday, 18 November 2016 at 11:02:20 UTC, Daniel Kozak wrote: Dne 18.11.2016 v 11:46 thedeemon via Digitalmars-d napsal(a): On Thursday, 17 November 2016 at 18:24:05 UTC, Daniel Kozak wrote: Dne 17.11.2016 v 18:49 sanjayss via Digitalmars-d napsal(a): Ubuntu 12.04 to 16.04 which has PIE enabled now, and there are problems with D on it. Where can I learn more about it? It has been typo, it should not be 16.04 but 16.10. Why would you run a non-LTS Ubuntu on a server? Anyways, I could not find anything about the OS on the website. The only info about environment is: Physical hardware environment for Rounds 13 and beyond. Provided by ServerCentral. Dell R910 (4x 10-Core E7-4850 CPUs) application server; Dell R420 (2x 4-Core E5-2406 CPUs) database server; switched 10-gigabit Ethernet
Re: Boston D Language Meetup in Back Bay
On Thursday, 17 November 2016 at 02:55:46 UTC, Meta wrote: Thanks for recording the presentation, your IOPipe library is pretty interesting. +1 Especially for any parser, this looks like a great solution! The output (valves) looks meh, though. I hope, you discover something more elegant.
Re: Nov 16 - Memory Safety and the D Programming Language
On Monday, 14 November 2016 at 06:57:07 UTC, Walter Bright wrote: · Follow our YouTube channel. So, there will be a recording? Great!
Re: PDF generation in D?
On Thursday, 10 November 2016 at 22:30:34 UTC, Karabuta wrote: Hello community, does anyone have on something for PDF generation in D? I may need a PDF generation library in a vibe.d project I'm working on. :) You can pull in Gtk with Cairo and Pango. Cairo can generate pdf. Pango is necessary for advanced text rendering.
Re: Article: Running D without its runtime
On Thursday, 10 November 2016 at 00:56:02 UTC, Guillaume Piolat wrote: https://www.auburnsounds.com/blog/2016-11-10_Running-D-without-its-runtime.html "Our products now run with the D language runtime disabled. This post is both a post-mortem and tutorial on how to live without the D runtime. " For runtime users the good news is that speed is already fine. :) The hacks you needed to go through are ugly. Any ideas how this could be improved? (animated background ag...)
Re: [OT] web/desktop dying
On Wednesday, 9 November 2016 at 16:00:45 UTC, Nick Sabalausky wrote: On 11/05/2016 02:00 AM, Joakim wrote: Nothing is ever "completely replaced"- somebody somewhere is still using a mainframe or a UNIX workstation- but yes, PCs will basically disappear, just as you never see those old computers anymore. Android 7.0 has a full multi-window mode, just dock your smartphone with a monitor and keyboard/mouse and start working: http://arstechnica.com/gadgets/2016/03/this-is-android-ns-freeform-window-mode/ But it probably will take over anyway, because, let's face it, when the fuck has being complete and utter fucking shit ever stopped a computing tech from becoming a runaway success?: I don't believe that. Software developers need a big machine, because these days you have to run a bunch of VMs to get anything done. Unless we migrate to Cloud-IDEs, we will use PCs in the foreseeable future and I don't see Cloud-IDEs happening. Office Workers who are happy with MS Office alone could use Android. However, there is always this old internal app, which barely works on newer Windows versions. It will take a few decades until those are replaced. Executives could move to pure mobile and probably already did. Reading reports and writing emails works well already. I believe the PC is just as tenacious as the x86 architecture, which is still backwards compatible over the last three decades.
Re: Linux Kernel in D?
On Tuesday, 1 November 2016 at 16:22:58 UTC, Andrei Alexandrescu wrote: On 11/01/2016 09:41 AM, Wild wrote: On Tuesday, 1 November 2016 at 12:12:29 UTC, Heisenberg wrote: Just an idea. Do you think it would have any advantage compared to the one that is written in C? I think it wouldn't really be worth it. I tend to think the same but for different reasons. Currently the Linux kernel is a large mature product that has its own evolution. It would be very difficult to reimplement it from first principles in any other language and get a competitive, timely product. As an intellectual exercise, D's safety would help but at this point impart little advantage; the kernel has reached good stability and safety bugs are few and far across. This trend is likely for the foreseeable future. Security is a big topic for Linux: https://lwn.net/Articles/662219/ Mostly the problem are drivers. They are produced hastily by careless companies without the scrutiny of the core kernel parts (like scheduler, file system, etc). I think D might help there, because it could enforce @safe or other properties onto the drivers. Nevertheless, I don't see a successful D kernel in the foreseeable future. Building a kernel for IoT devices is trendy, but you want a lot more portability for that and C compilers are everywhere. On the server, you could build a hypervisor OS with D, but currently containers are hyped so much more. You'd only have a chance, if you also port the JVM onto your D-OS. Still, where is the advantage to Linux?
Re: Got a post for the D Blog?
On Monday, 31 October 2016 at 03:51:16 UTC, Mike Parker wrote: I want to publish more posts like Andreas's 'Find Was Too Damn Slow, So We Fixed It` [1] (which, by the way, is the most-viewed post so far, just ahead of Joakim's interview with Walter [2]), or Steven's 'How to Write @trusted Code in D' [3], but I need help. [1] http://dlang.org/blog/2016/06/16/find-was-too-damn-slow-so-we-fixed-it/ [2] http://dlang.org/blog/2016/08/30/ruminations-on-d-an-interview-with-walter-bright/ [3] http://dlang.org/blog/2016/09/28/how-to-write-trusted-code-in-d/ I take that as a compliment. Thanks! The rest of you, take that as a challenge. ;) What I would like to read about would be LuaD [4] or ctRegex [5], because they are great demos of CTFE. The auto-tester would be worth an article as well. Not about the implementation details, but about its features and the PR workflow. Also, some embedded D use like kernel or freestanding stuff. None of these are "I fixed something in D" though. Hm, Taking a look through the recent 072 changelog, I found two items which could be worth a story: * std.range.padLeft and std.range.padRight were added (if someone can write comedy and wants to take some jabs at the Javascript leftPad story) * std.range.generate fixed to be a proper range (I remember some heated discussion about the semantics of front) [4] http://jakobovrum.github.io/LuaD/ [5] https://dlang.org/phobos/std_regex.html#.ctRegex
Re: Linus' idea of "good taste" code
On Wednesday, 26 October 2016 at 09:54:31 UTC, Dicebot wrote: On 10/26/2016 12:53 AM, Walter Bright wrote: It's a small bit, but the idea here is to eliminate if conditionals where possible: https://medium.com/@bartobri/applying-the-linus-tarvolds-good-taste-coding-requirement-99749f37684a#.nhth1eo4e I find it both funny and saddening how many reddit commentators complained about Linus version of that code is over-complicated. "Prefer clear code over smart code" principle is good in general but sometimes it is over-applied to the point where incompetence gets glorified. And this sucks. I'm unsure about Linus' version. For this example, I agree that it is elegant. It is fine in this specific case, because everything is local within a single function. In general, the trick to use a pointer to the element probably not a good idea. The article/Linus does not explain the tradeoffs properly, which makes it dangerous advice.
Re: gdc in Linux distros recommended?
On Wednesday, 19 October 2016 at 00:07:12 UTC, bachmeier wrote: According to this page https://gdcproject.org/downloads/ there are only distro packages for Ubuntu, Debian, and Arch. If that's accurate, there really is no sense in which GDC is more available than DMD. Yes it is. Installing gdc is just "apt install gdc" on Ubuntu without looking for any download sites.
Re: Idea for a new tool
On Friday, 14 October 2016 at 13:13:16 UTC, Andrei Alexandrescu wrote: https://issues.dlang.org/show_bug.cgi?id=5051 -- Andrei Reminds me of Lisp, where they also have code generation wrapped in code generation wrapped in ... here is an example: http://stackoverflow.com/q/16579844/2361979 Lispers have a REPL and can expand interactively and specifically, though. I guess the most awesome D use case would be inside an IDE. Click on a template/mixin call to expand exactly that one. An IDE would have access to all build and link parameters, which naturally influence this. For example, click on "foo.find(bar)" and it opens a new buffer/tab/window, where the correct variant of find is instantiated according to foo and bar. Click on "mixin Foo;" and it inlines the instantiated code.
Re: D, ZeroMQ, Nanomsg
On Thursday, 29 September 2016 at 04:18:55 UTC, Nikolay wrote: On Wednesday, 28 September 2016 at 11:53:05 UTC, Russel Winder wrote: Has anyone wrapped Nanomsg? Be aware - Nanomsg project is mostly dead now. See http://sealedabstract.com/rants/nanomsg-postmortem-and-other-stories/ That article was in February. There was a 1.0.0 release in June.
Re: Why D is not popular enough?
On Thursday, 1 September 2016 at 08:04:00 UTC, Bienlein wrote: D has a lot to offer with regard to functional programming. It has pure functions and true immutable classes (true = also sub objects become immutable), which Scala all doesn't have (because of restrictions of the JVM). Does D have tail call recursion optimization? I don't know, actually. If D had that and pattern matching, it would beat Scala with all it's hype by a big leap. D does not guarantee tail calls, but the compiler might sometimes decide to do it. Functional programmer usually want to guarantee, so they don't have to write a loop. The downside of TCO is that the stack trace is missing frames, which can be very confusing. D has no syntax for pattern matching, but some library support: https://p0nce.github.io/d-idioms/#Recursive-Sum-Type-with-matching
Re: About spinlock implementation
On Thursday, 1 September 2016 at 10:30:12 UTC, Guillaume Piolat wrote: On Thursday, 1 September 2016 at 07:46:04 UTC, qznc wrote: I find the documentation on MemoryOrder lacking about the semantics of rel. :( [0] https://dlang.org/library/core/atomic/memory_order.html What helped me was to read std::memory_order documentation http://en.cppreference.com/w/cpp/atomic/memory_order Yes, but how do they map? Is D's rel = relaxed or release or acq_rel? Also, reading C++ documentation should not be required of course. ;)
Re: About spinlock implementation
On Thursday, 1 September 2016 at 06:44:13 UTC, mogu wrote: I found an implementation of spinlock in concurrency.d. ``` static shared struct SpinLock { void lock() { while (!cas(, false, true)) { Thread.yield(); } } void unlock() { atomicStore!(MemoryOrder.rel)(locked, false); } bool locked; } ``` Why atomicStore use MemoryOrder.rel instead of MemoryOrder.raw? I'm not sure I understand rel [0], but raw is too weak. Raw means no sequencing barrier, so local_var = protected_value; spinlock.unlock(); could be transformed (by compiler or CPU) to spinlock.unlock(); local_var = protected_value; This effectively makes the access to the protected value unprotected and nullifies the effect of the spinlock. I find the documentation on MemoryOrder lacking about the semantics of rel. :( [0] https://dlang.org/library/core/atomic/memory_order.html
Re: Joakim Intreviews Walter for the D Blog
From the article: We nailed it [simplicity] with arrays (Jan Knepper’s idea) D arrays are a great example of simple, but not easy. For details see the Slices article section "Determinism". https://dlang.org/d-array-article.html
Re: The D Language Foundation is now a tax exempt non-profit organization
On Tuesday, 30 August 2016 at 12:36:12 UTC, Russel Winder wrote: Andrei, This is splendid news for the purveying of the D Programming language. The question is though: this covers the USA what about the Rest of the World? For Germany this would probably require a separate application to the tax office to become a "gemeinnützige Organisation" (charitable organization). It seems [0] within the EU, it is enough for the donor to proof charity by including the charter in the tax declaration, but not for the US. [0] https://www.steuertipps.de/anlegen-vererben-spenden/themen/wann-sind-spenden-an-auslaendische-stiftungen-absetzbar
Re: ISO D
On Wednesday, 17 August 2016 at 08:02:42 UTC, eugene wrote: will ISO D be in future or not? What would be the benefits?
Re: [OT] The coolest (literally) desktop machine I've ever had
On Sunday, 14 August 2016 at 17:30:21 UTC, Basile B. wrote: On Sunday, 14 August 2016 at 16:27:51 UTC, qznc wrote: On Saturday, 13 August 2016 at 14:52:06 UTC, Andrei Alexandrescu wrote: On 08/13/2016 08:37 AM, Vladimir Panteleev wrote: Friends don't let friends use Linux Mint Good to know, thanks. So what should I use then? -- Andrei I use Ubuntu LTS, because one breaking upgrade every two years is enough. I recently spent a few hours to get my laptop nvidia card back to work. The "crash and back to login screen" bug I guess ? We're so many people to have encountered it. On OpenSuse 13.2 I cannot get G04 to work anymore since months but G03 is fine. Yes. Although "crash and back to login screen" is probably the symptom for many graphics related problems and not a specific bug. In my case, the solution was to switch to the legacy nvidia-340 driver.
Re: [OT] The coolest (literally) desktop machine I've ever had
On Saturday, 13 August 2016 at 14:52:06 UTC, Andrei Alexandrescu wrote: On 08/13/2016 08:37 AM, Vladimir Panteleev wrote: Friends don't let friends use Linux Mint Good to know, thanks. So what should I use then? -- Andrei I use Ubuntu LTS, because one breaking upgrade every two years is enough. I recently spent a few hours to get my laptop nvidia card back to work.
Re: D Github contributors - enable 2 factor authentification
On Thursday, 11 August 2016 at 13:05:49 UTC, Steven Schveighoffer wrote: There's also nothing private in the dlang repository, but a malicious person could just delete everything and it would be a major problem for us to recover from that. Well, the code will all be on everyone's system. The PRs should be pretty safe too, since they are all branches on everyone's private fork. The code is pretty safe thanks to git. The comments get lost. Likewise, deleting bugzilla would be ugly. We could start signing git commits/tags for additional safety.
Re: D Github contributors - enable 2 factor authentification
On Thursday, 11 August 2016 at 07:54:48 UTC, Jonathan M Davis wrote: But I'd be even more worried about depending on an app on your phone (like is sometimes the case with two-factor auth), since that won't necessarily then work with another phone with the same number, in which case, changing phones could lose you access I use Authy. They provide desktop apps and sync in addition. So if my phone fails, I can use my laptop and vice versa. https://www.authy.com/