Re: Bugzilla & PR sprint on the first weekend of every month
On Tuesday, 8 May 2018 at 18:48:15 UTC, Seb wrote: What do you guys think about having a dedicated "Bugzilla & PR sprint" at the first weekend of very month? We could organize this a bit by posting the currently "hot" bugs a few days ahead and also make sure that there are plenty of "bootcamp" bugs, s.t. even newcomers can start to get involved. Even if you aren't too much interested in this effort, being a bit more active on Slack/IRC or responsive on GitHub on this weekend would help, s.t. newcomers interested in squashing D bugs get over the initial hurdles pretty quickly and we can finally resolve the long-stalled PRs and find a consensus on them. What do you think? Is this something worth trying? Maybe the DLF could also step in and provide small goodies for all bug hunters of the weekend (e.g. a "D bug hunter" shirt if you got more than X PRs merged). I like this idea, but for reviewing/merging items as IMO that needs more focus (of course, we could combine the two). Again, just my opinion, but a crucial part is coordination between regular committers to get stuff reviewed and merged fast (especially for new contributors participating with PRs). Being on Slack/IRC and being responsive is of course the big one there, as you mentioned. Maybe also creating gitter chats for dmd/druntime/phobos so new contributors have a single point of contact? Due to a sharply increased workload at my day job I can't be available at most times for such a sprint, but I would participate over a weekend. If I know further in advance, I can commit to being active and available over the whole of the weekend. For this upcoming weekend, probably only Saturday and maybe Sunday night. Whether anyone else wants to throw their hat in or not, I'll make sure to be online for Saturday at least, and dedicate a good portion of the day to reviewing PRs and trying to push them through.
Re: unit-threaded v0.7.45 - now with more fluency
On 05/08/2018 05:05 AM, Cym13 wrote: I wouldn't say it's an abuse, the dot means exactly the same thing as everywhere else in the language. No, it really doesn't mean the same thing at all. Not when you look away from the unimportant implementation details and towards the big picture: Normally, saying "x.y" denotes composition and membership: It means "y, which is a member of x". Saying "x.y" does NOT normally denote "The boundary between word 'x' and word 'y' in an english-grammared phrase". But with things like "should.not.be", it's very much NOT a composition/membership relationship: A "be" is not really a member/property/component/etc of a "not", except in the sense that that's how the english-like DSL is internally implemented. A "should" is not really something that is composed of a "not", except in the sense that that's how the english-like DSL is internally implemented. (IF it even is implemented that way at all. I didn't look, so for all I know it might be opDispatch.) I'm not saying that "should.not.be" OR "~" are abuses, I'm just saying whether or not they are, they're definitely both in the same category: Either they're both abuses or neither one is, because they both do the same thing: utilize use existing syntax for something other than the syntax's usual semantic meaning. Formal "operator overloading" isn't the only way to alter (or arguably abuse) a language's normal semantics.
Re: Wait-free MPSC and MPMC implement in D
On 09/05/18 01:09, David Nadlinger wrote: The algorithm isn't wait-free (haven't thought too carefully about this, though) This mirrors a discussion I had with Maor (who originally wrote it). Let's see if I bring you around the way I was brought around. At the API level, there are two areas where the algorithm *cannot* be wait free. If a consumer tries to consume from an empty queue, or a producer tries to produce to a full one. Those two aside (which, as I stated above, are not dependent on the implementation), the algorithm actually is wait free. As far as industry-grade goes, note that many of the comments have not been updated since a previous combined implementation for SPMC/MPSC was split up into two types, so there is quite a bit of stale cruft around. Will definitely have a second look. Shachar
Re: Wait-free MPSC and MPMC implement in D
On 09/05/18 03:20, Andy Smith wrote: During Shachar's talk on the Saturday morning following the conclusion of Dconf he made it clear that the Mecca library is being used by the ~200klock Weka.io codebase ... a codebase which has very stringent latency *and* throughput requirements to satisfy customer needs in the storage space. So if any D codebase has got bragging rights on the term 'industry-grade' I think this has to be one of them. Let me start off by saying that it is great that people appreciate and enjoy Mecca. With that said, I would be wary of the direction this thread is threatening to take. I have a motto in life - if you assume you're great, you most likely aren't. I have grown out of the "my code has no bugs" phase of my life quite a while ago. The fact that code is used, to good effect and for a long period of time does not mean that it doesn't have problems, some of them might be quite fundamental. "This code is highly tested" is not a good answer to "I think I found a problem". As such, I would kindly ask everyone on this list to not take offense at criticism aimed at me or at my code. I find comments such as David's highly constructive, and the last thing I'd want is for him, or anyone else, to be wary of voicing them. I have not had the chance to parse David's critique to decide whether I agree with it or not. Regardless of my final conclusion, I think we should do everything we can to avoid suggesting it is illegitimate of him to make it. So if they've copy/pasted a few comments ... meh ... I for one happy to let it slide. These guys have got bigger fish to fry :-) Perfection is a road you take, not a place you reach. All large repositories of code tend to have areas that are less visited. Mecca is no exception. I, for one, welcome being informed of where my code can be improved. During the documentation phase, I made every effort to really understand the limitations of the code. Any code I was not sure about, I left out of the documentation (and there is a *lot* of undocumented areas in Mecca, some of which I suspect should not stay there). So, my plea is this. If you find an area worth improving in Mecca, please don't hesitate to post. If you find you do hesitate, please please feel free to send me a private message. I *want* to know of the problems. Thank you, Shachar
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 --- Comment #4 from Manu--- I dun a fix: https://github.com/dlang/druntime/pull/2176 Depends on: https://github.com/dlang/dmd/pull/8224 --
Re: Wait-free MPSC and MPMC implement in D
On 08/05/18 07:00, manumaster wrote: Is there some implement like this in D ? https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/multilist-2017.pdf It's two of Mecca's containers: https://weka-io.github.io/mecca/docs/mecca/containers/otm_queue.html
Re: Wait-free MPSC and MPMC implement in D
On Wednesday, 9 May 2018 at 01:30:09 UTC, David Nadlinger wrote: By the way, if anyone ends up testing/benchmarking this on non-TSO CPUs, I'd be curious to hear about the results. Me too! :-) Cheers, A.
Re: Wait-free MPSC and MPMC implement in D
On Wednesday, 9 May 2018 at 00:20:39 UTC, Andy Smith wrote: What's MPSP? :-) Whoops, MPMC, of course. ;) And that wasn't even the only typo; I should know better than to post while distracted… So if any D codebase has got bragging rights on the term 'industry-grade' I think this has to be one of them. So if they've copy/pasted a few comments ... meh ... I for one happy to let it slide. These guys have got bigger fish to fry :-) Oh, it's definitely industry-grade in that it is used to great effect within Weka. It's just much more of an example for an interesting algorithm than it is for "mechanical" code quality. By the way, if anyone ends up testing/benchmarking this on non-TSO CPUs, I'd be curious to hear about the results. I hope I got the memory order semantics right, but of course you don't necessarily see much of that on x86. It would also be interesting to see how bad the lack of fairness can get in synthetic test cases. — David
Re: partially mutable immutable type problem, crazy idea
On Wednesday, 9 May 2018 at 00:58:51 UTC, jmh530 wrote: On Tuesday, 8 May 2018 at 22:31:10 UTC, Yuxuan Shui wrote: snip] This doesn't compile for me on run.dlang.io: onlineapp.d(22): Error: template onlineapp.f cannot deduce function from argument types !()(B), candidates are: onlineapp.d(1):onlineapp.f(T)(immutable T a) Not supposed to. Was proposing an (crazy) idea here.
Re: partially mutable immutable type problem, crazy idea
On Tuesday, 8 May 2018 at 22:31:10 UTC, Yuxuan Shui wrote: snip] This doesn't compile for me on run.dlang.io: onlineapp.d(22): Error: template onlineapp.f cannot deduce function from argument types !()(B), candidates are: onlineapp.d(1):onlineapp.f(T)(immutable T a)
Re: Bugzilla & PR sprint on the first weekend of every month
On Tuesday, 8 May 2018 at 18:48:15 UTC, Seb wrote: What do you guys think about having a dedicated "Bugzilla & PR sprint" at the first weekend of very month? We could organize this a bit by posting the currently "hot" bugs a few days ahead and also make sure that there are plenty of "bootcamp" bugs, s.t. even newcomers can start to get involved. Even if you aren't too much interested in this effort, being a bit more active on Slack/IRC or responsive on GitHub on this weekend would help, s.t. newcomers interested in squashing D bugs get over the initial hurdles pretty quickly and we can finally resolve the long-stalled PRs and find a consensus on them. What do you think? Is this something worth trying? Maybe the DLF could also step in and provide small goodies for all bug hunters of the weekend (e.g. a "D bug hunter" shirt if you got more than X PRs merged). I like the idea, but our current deficiency is not contributions, but reviews. If we do something like this, we'll probably get more PRs in the queue, but they may end up sitting there waiting for a decision through to the next sprint. I, alone, could easily fill the PR queue with more contributions from my backlog, but that will just take resources away from other PRs waiting for review. IMO what we need is a way to increase the number of people who have the talent and good judgement to quickly bring PRs to a resolution (merge or close), and to mentor contributors so they can become mentors themselves. With more review capacity (and velocity) we'd probably get more contributions organically without any additional effort or organization. Mike
Re: Wait-free MPSC and MPMC implement in D
On Tuesday, 8 May 2018 at 22:09:37 UTC, David Nadlinger wrote: On Tuesday, 8 May 2018 at 17:20:33 UTC, Dmitry Olshansky wrote: On Tuesday, 8 May 2018 at 04:00:03 UTC, manumaster wrote: Is there some implement like this in D ? https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/multilist-2017.pdf Look for Mecca by Wekka.io team. It has great idustry-grade lock-free implementations for both. Not very flexible but these things usually are. Are you referring to https://github.com/weka-io/mecca/blob/master/src/mecca/containers/otm_queue.d? These are SPMC and MPSC variants only, not MPSP. It is also bounded-length (power-of-two sizes only), whereas the paper mentioned implements a linked-list based version. The algorithm isn't wait-free (haven't thought too carefully about this, though), and should be used with a queue size much larger than the number of threads to make sure all of them make progress. If you are considering to use it in your projects, definitely keep an eye on the real-world performance in the beginning (but then, if you weren't, you wouldn't be reaching for something like this anyway). There are a few interesting points about the algorithm in this respect; for example, the availability of queue space is checked with loads that use only raw memory order, as changes typically appear fast enough across cores on x86 anyway. If your use case is similarly enough to Weka's, it is indeed very highly optimised, though. As far as industry-grade goes, note that many of the comments have not been updated since a previous combined implementation for SPMC/MPSC was split up into two types, so there is quite a bit of stale cruft around. — David What's MPSP? :-) During Shachar's talk on the Saturday morning following the conclusion of Dconf he made it clear that the Mecca library is being used by the ~200klock Weka.io codebase ... a codebase which has very stringent latency *and* throughput requirements to satisfy customer needs in the storage space. So if any D codebase has got bragging rights on the term 'industry-grade' I think this has to be one of them. So if they've copy/pasted a few comments ... meh ... I for one happy to let it slide. These guys have got bigger fish to fry :-) Cheers, A.
Re: Geany editor: Dlang code autocomplete
On Tuesday, 8 May 2018 at 07:47:26 UTC, Denis Feklushkin wrote: Hi! Does anyone else use Geany as Dlang code editor? I'm looking at the ongoing fundraising for another editor. Unlike it, we have almost everything ready: https://github.com/denizzzka/geany_dlang (More precisely, I think that Geany is not so advanced and currently it is enough to add only tips and autocompletion :-)) But there is one significant "but": in the Geany editor there is no support for plugins that implement autocompletion. More details about this can be found in this issue: https://github.com/geany/geany/issues/1854 If someone knows С and understands how to add good support for this in Geany itself (this is GTK application) plese write to me or to Github issue from above. Estimation of work ~3 hours, it seems. And we finally get a normal autocompletion for D language. Thanks! Hello have a look here: https://github.com/denizzzka/geany_dlang. I cant tell if it's good or not. Personally i'm on another editor.
Re: A bit more Emscripten
On Tuesday, 8 May 2018 at 18:44:06 UTC, Vladimir Panteleev wrote: On Tuesday, 8 May 2018 at 09:51:11 UTC, Mike Franklin wrote: I've been recently assigned the task of building a web-based Ladder Logic editor/compiler (https://en.wikipedia.org/wiki/Ladder_logic). This would not be a short-lived application, however. Hmm, sounds like this would be an interactive application that would need access to the HTML DOM. Currently, this isn't directly possible - when running in an asm.js VM, there is no D type to represent a JavaScript object. It is possible to call out to / eval JavaScript, though, so perhaps it could be possible using a shim, where a JavaScript array holds JavaScript/DOM objects, and D refers to them by index. Maybe we could port something like this to D. Or wait till someday dpp can #include the STL. https://github.com/mbasso/asm-dom/blob/master/README.md
Re: Geany editor: Dlang code autocomplete
On Tuesday, 8 May 2018 at 19:23:44 UTC, Seb wrote: On Tuesday, 8 May 2018 at 07:47:26 UTC, Denis Feklushkin wrote: Hi! Does anyone else use Geany as Dlang code editor? I'm looking at the ongoing fundraising for another editor. Unlike it, we have almost everything ready: https://github.com/denizzzka/geany_dlang (More precisely, I think that Geany is not so advanced and currently it is enough to add only tips and autocompletion :-)) ... Estimation of work ~3 hours, it seems. And we finally get a normal autocompletion for D language. Thanks! Sorry, but I highly doubt that you can get a "normal autocompletion" for D within 3 hours. D's "state of the art" DCD struggles a lot with autocompletion as it only has an AST and no semantic analysis. What do i read here... that's wrong. DCD does have semantic. What it has not are the compile-time features (i.e CTFE and metaprog)
Re: partially mutable immutable type problem, crazy idea
After watching the DConf 2018 video, I came up with this wild idea: auto f(T)(immutable T a) { // If T is a aggregate type, and I only use (directly // or indirectly) the immutable fields of T, // Then it should be OK to call f() with a partially mutable type return a.x+1; } void main() { struct A { int x; } A a; immutable(A) b; f(a); // <- not fine f(b); // <- fine class B { immutable int x = 10; double f; } auto c = new B; f(c); // <- fine too } I think this should solve the reference counting an immutable object, no? To f(), T will just looks like a normal immutable, uncopyable (because copying means modifying the reference counter) type
Dioinformatic Challenges: Implement Needleman-Wunsch and Smith-Waterman algorithms
Hello D community. Just been back for a great Dconf2018. I got some feedback, and it took me some time to collect information and put the challenges here. As you may know, I posted these challenges in the "Learn" forum, but found out that it is better to post here in "announce". I am doing it for fun, for learning purpose, and for bringing up attention of D community to bioinformatics. It is not to hire and pay someone for their solutions. So, please don't mind if the amount of money for the prize is small to you:) A new deadline is also applied: 23:00 GMT+2, Saturday, 9 June 2018. That means we have about a month. Do your timing well and solve the challenges well :) Ask anything you need to know. Please see below for more details. Implement Needleman–Wunsch and Smith–Waterman algorithm ══ • Introduction about alignment problems: [http://bit.do/seqalign] (notes) and [http://bit.do/alignslides] (slides) or search on wikipedia. • Send zipped source code of the solution via email to "biocyberman at gmail dot com" with "DAC2018" in the subject line. • Implement in D. • See more details about these two challenges here: https://github.com/bioslaD/algorithms.bio/blob/master/dac2018/ChallengeGuide.md • Wining criteria: Combination of readability, reusability, scalability and speed • License: GPLv3. I will publish the solutions on Github. • Prize: USD100+ (more if others also want to sponsor?) for each problem (global or local aligment), sent via Papal. • Deadline: 23:00 GMT+2, Saturday, 9 June 2018.
Re: Geany editor: Dlang code autocomplete
On Tuesday, 8 May 2018 at 07:47:26 UTC, Denis Feklushkin wrote: Hi! Does anyone else use Geany as Dlang code editor? I use Geany for D. It already performs autocomplete. I am not sure how good it is. It isn't something I'm that interested in, but I do seem to use it. I suspect if I configured paths for it to scan for files to find symbols in it would work better.
Re: Wait-free MPSC and MPMC implement in D
On Tuesday, 8 May 2018 at 17:20:33 UTC, Dmitry Olshansky wrote: On Tuesday, 8 May 2018 at 04:00:03 UTC, manumaster wrote: Is there some implement like this in D ? https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/multilist-2017.pdf Look for Mecca by Wekka.io team. It has great idustry-grade lock-free implementations for both. Not very flexible but these things usually are. Are you referring to https://github.com/weka-io/mecca/blob/master/src/mecca/containers/otm_queue.d? These are SPMC and MPSC variants only, not MPSP. It is also bounded-length (power-of-two sizes only), whereas the paper mentioned implements a linked-list based version. The algorithm isn't wait-free (haven't thought too carefully about this, though), and should be used with a queue size much larger than the number of threads to make sure all of them make progress. If you are considering to use it in your projects, definitely keep an eye on the real-world performance in the beginning (but then, if you weren't, you wouldn't be reaching for something like this anyway). There are a few interesting points about the algorithm in this respect; for example, the availability of queue space is checked with loads that use only raw memory order, as changes typically appear fast enough across cores on x86 anyway. If your use case is similarly enough to Weka's, it is indeed very highly optimised, though. As far as industry-grade goes, note that many of the comments have not been updated since a previous combined implementation for SPMC/MPSC was split up into two types, so there is quite a bit of stale cruft around. — David
Re: sumtype 0.3.0
On Tuesday, 8 May 2018 at 06:33:38 UTC, TheGag96 wrote: Wow.. without comments and unittests, the implementation is only 116 lines. Awesome job. Even now I still find it incredible what D can do. Is Algebraic in the standard library really that bad? And if so, why aren't implementations like this being accepted? Thanks! Algebraic isn't terrible, but it has one significant design flaw, which is that it shares its implementation with Variant. Variant doesn't have a fixed list of allowed types, so it requires a much more complex implementation than just a union and an integer tag. By sharing that implementation, Algebraic inherits all the costs of its complexity without getting any of the benefits. I've never contributed to Phobos, so someone with more experience may have better insight here, but my guess is that changing Algebraic at this point would break too much code to be worth the trouble. Perhaps when sumtype is more mature, though, a case could be made for including it in a separate module.
Re: andrei - better breakdown of statistics for downloads by region, OS, kind of site (academic/large corporate/large financial/etc)
On 05/08/2018 03:54 AM, Suliman wrote: Stat out of date... Plz update it. Done. Keep in mind those stats are noisy. They need to be improved, but couldn't find anyone to work on that. I have talked to a consultant, he was very successful with showing near-real-time statistics about the project and its progress in a dashboard that was visible to all project participants. For example he had product sales in real time, which I thought was a very nice touch: developers could see the result of their work making money instantly. He told me that that's a classic method used in Agile methodology. A very good project for us would be a near-real-time dashboard displaying downloads, site visits, github activity, and such. I know I'd keep such a page opened at all times. Andrei
Re: andrei - better breakdown of statistics for downloads by region, OS, kind of site (academic/large corporate/large financial/etc)
On 03/21/2017 11:26 AM, Ali Çehreli wrote: For what its worth, here are the stats for ddili.org that hosts my books: Country Pages Hits Bandwidth (MB) --- - - China 18754 19122 304.05 Turkey 18499 76544 536.30 United States 17318 24623 842.63 Russian Federation 8619 10713 239.23 Germany 5904 7232 280.75 France 3310 3654 89.76 Netherlands 2570 3134 79.68 Ukraine 2500 2776 118.80 Great Britain 2479 3068 159.74 Brazil 2265 2713 95.95 Romania 1846 2202 85.69 Norway 1671 1858 23.94 Egypt 1046 1067 12.21 Denmark 1046 1084 11.95 India 1043 1238 33.43 Czech Republic 973 1071 49.75 Canada 893 1174 63.29 Indonesia 892 944 9.69 Bulgaria 854 923 21.66 Italy 799 988 83.28 Unknown 741 741 8.38 Pakistan 659 667 28.96 Argentina 617 656 45.20 Poland 603 950 69.45 Japan 529 781 25.33 Others 7201 11068 975.62 For /ders/d.en/Programming_in_D.pdf (the English version of the book) for this month: Hits: 406 206 Hits: 1,068 Ali An update for the month of April 2018. Visits to ddili.org from different locales: Country Pages Hits Bandwidth --- - - United States36,61944,380 1.81 GB Netherlands 26,73627,035376.55 MB Turkey 21,80960,164663.72 MB China10,96111,434454.98 MB Norway9,541 9,596125.56 MB Russian Federation6,075 8,134392.83 MB Germany 3,281 5,039526.16 MB Great Britain 3,258 3,816148.13 MB Ukraine 2,544 2,779 69.63 MB Romania 2,171 2,611256.53 MB Brazil2,140 2,324 74.60 MB Denmark 2,005 3,807 20.75 MB India 1,828 2,023112.91 MB Indonesia 1,685 1,730 42.46 MB France1,183 1,800 88.90 MB Japan 1,149 1,316 57.90 MB Latvia 899 1,039103.67 MB Thailand825 839 9.13 MB Poland 821 1,109 92.50 MB Canada 791 1,108 51.44 MB Bangladesh 746 746 8.01 MB Hungary 725 885 16.30 MB Singapore 653 676 7.96 MB Sweden 631 714 46.59 MB Philippines 628 635 7.02 MB Others 6774 9373 1.36 GB Remembering that the book is available as HTML as well, here are the downloads for file /ders/d.en/Programming_in_D.pdf (the English version of the book) for April 2018: Hits: 659 206 Hits: 1,689 Ali
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 19:19:26 UTC, Seb wrote: On Tuesday, 8 May 2018 at 18:40:34 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote: [...] Tested with these versions so far, and had all the same errors: C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.079.1 C:\Users\Vaidas>dub --version DUB version 1.8.1, built on Apr 14 2018 C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.080.0 C:\Users\Vaidas>dub --version DUB version 1.9.0, built on May 1 2018 Linking... C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: SetWindowLongPtrA C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: GetWindowLongPtrA error: link failed Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. That's with DMD's bundled LLD linker. Have you tried: 1) installing MS Visual Studio (as others have mentioned their linker works) 2) Using LDC (they usually ship a newer version of the LLD linker) I have installed the one suggested by the dmd-2.080.0.exe installer: Microsoft Visual Studio Community 2017 Version 15.7.0 VisualStudio.15.Release/15.7.0+27703.1 Microsoft .NET Framework Version 4.7.02556 Installed Version: Community Mago Native Debug Engine 1.0.0 A debug engine dedicated to debugging applications written in the D programming language. See the project website at http://www.dsource.org/projects/mago_debugger for more information. Copyright (c) 2010-2014 Aldo J. Nunez ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info Visual D 0.46.0 Integration of the D Programming Language into Visual Studio
Re: andrei - better breakdown of statistics for downloads by region, OS, kind of site (academic/large corporate/large financial/etc)
On Tuesday, 8 May 2018 at 07:54:15 UTC, Suliman wrote: Stat out of date... Plz update it. https://imgur.com/a/xZp95is The first screenshot are the current months in 2018 (with the orange line being the previous period, i.e. the last months in 2017) The second screenshot is from 2017. tl;dr: in 2017 ~200k page views from 34k unique visitors Let me know if you need more detailed statistics.
Re: Geany editor: Dlang code autocomplete
On Tuesday, 8 May 2018 at 07:47:26 UTC, Denis Feklushkin wrote: Hi! Does anyone else use Geany as Dlang code editor? I'm looking at the ongoing fundraising for another editor. Unlike it, we have almost everything ready: https://github.com/denizzzka/geany_dlang (More precisely, I think that Geany is not so advanced and currently it is enough to add only tips and autocompletion :-)) ... Estimation of work ~3 hours, it seems. And we finally get a normal autocompletion for D language. Thanks! Sorry, but I highly doubt that you can get a "normal autocompletion" for D within 3 hours. D's "state of the art" DCD struggles a lot with autocompletion as it only has an AST and no semantic analysis. Fixing this by e.g. using DMD's frontend is way beyond 3 hours of work. Though of course, DCD works well for many cases already. BTW I quickly skimmed your linked issue and it seems that Geany already supports autocompletion for plugins, just not re-using the naive default completion.
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 18:40:34 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote: [...] Tested with these versions so far, and had all the same errors: C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.079.1 C:\Users\Vaidas>dub --version DUB version 1.8.1, built on Apr 14 2018 C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.080.0 C:\Users\Vaidas>dub --version DUB version 1.9.0, built on May 1 2018 Linking... C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: SetWindowLongPtrA C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: GetWindowLongPtrA error: link failed Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. That's with DMD's bundled LLD linker. Have you tried: 1) installing MS Visual Studio (as others have mentioned their linker works) 2) Using LDC (they usually ship a newer version of the LLD linker)
Bugzilla & PR sprint on the first weekend of every month
What do you guys think about having a dedicated "Bugzilla & PR sprint" at the first weekend of very month? We could organize this a bit by posting the currently "hot" bugs a few days ahead and also make sure that there are plenty of "bootcamp" bugs, s.t. even newcomers can start to get involved. Even if you aren't too much interested in this effort, being a bit more active on Slack/IRC or responsive on GitHub on this weekend would help, s.t. newcomers interested in squashing D bugs get over the initial hurdles pretty quickly and we can finally resolve the long-stalled PRs and find a consensus on them. What do you think? Is this something worth trying? Maybe the DLF could also step in and provide small goodies for all bug hunters of the weekend (e.g. a "D bug hunter" shirt if you got more than X PRs merged).
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote: On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: Maybe that isn't the best choice of beginner example if even the D experts can't figure out how to get it to run. Might be a bug, I have already reported it and saw some bug duplicates like mine. However, since 2017 report, it seems to be - still not going well. If I have a chance I'll try to download latest dlang distribution and install on a completely clean Windows 10 Operating system. But I'm not hoping for any luck, but still in need of try trial. So I gave this a try and this command worked: >dub --arch=x86_64 --single start_minimal_server.d I'm on Windows 8 with All the visual studio versions installed DMD32 D Compiler v2.080.0-beta.1 DUB version 1.9.0-beta.1, built on Apr 17 2018 Tested with these versions so far, and had all the same errors: C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.079.1 C:\Users\Vaidas>dub --version DUB version 1.8.1, built on Apr 14 2018 C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.080.0 C:\Users\Vaidas>dub --version DUB version 1.9.0, built on May 1 2018 Linking... C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: SetWindowLongPtrA C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_106c_952.obj): undefined symbol: GetWindowLongPtrA error: link failed Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
Re: A bit more Emscripten
On Tuesday, 8 May 2018 at 09:51:11 UTC, Mike Franklin wrote: I've been recently assigned the task of building a web-based Ladder Logic editor/compiler (https://en.wikipedia.org/wiki/Ladder_logic). This would not be a short-lived application, however. Hmm, sounds like this would be an interactive application that would need access to the HTML DOM. Currently, this isn't directly possible - when running in an asm.js VM, there is no D type to represent a JavaScript object. It is possible to call out to / eval JavaScript, though, so perhaps it could be possible using a shim, where a JavaScript array holds JavaScript/DOM objects, and D refers to them by index. I'm not sure if I would be much help with this, but know that there is demand for it. I think the difficult part would be porting the D runtime to "browser" environment, and I'm not sure what's involved with that, especially given all platform dependencies that the runtime is currently bound to. Here are some of the challenges with getting D to run on emscripten: - Emscripten is neither Windows nor Posix, which causes most version(platform){...}else... blocks to fail. Emscripten does provide a libc (based on glibc, I think) which even abstracts some things like I/O and the filesystem, but the feature set is definitely less complete than the platforms we currently support, so there's lots of stubbing involved. - As a result of this, some parts of Phobos simply have no way of working correctly. For example, a good part of std.math concerns itself with the floating-point environment and flags, but in our case these all come down to "whatever the browser gives you" - which is probably standardized, but not under your control. So, these definitions would need a version(dscripten){}else wrapper. - In theory, garbage collection might be made to work, with extensive help from the compiler. The problem is that we are still using JavaScript's stack, which means we can't scan it for pointers. It could be worked around by getting the compiler to also place references to heap objects somewhere else, like a second stack. For the short term, a practical approach would be to use @nogc memory allocation / container libraries (std.allocator etc.) and minimize GC allocations (e.g. closures are still nice to have). - Exceptions do not work - throwing simply aborts. C++ exceptions do work in emscripten, so I think this could be made to work if a compiler guru spends some time on it. - Threads look like they could be made to work - emscripten seems to have some wrappers to create/control Web Workers through a libpthreads-like API.
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 17:35:13 UTC, Jesse Phillips wrote: On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: Maybe that isn't the best choice of beginner example if even the D experts can't figure out how to get it to run. Might be a bug, I have already reported it and saw some bug duplicates like mine. However, since 2017 report, it seems to be - still not going well. If I have a chance I'll try to download latest dlang distribution and install on a completely clean Windows 10 Operating system. But I'm not hoping for any luck, but still in need of try trial. So I gave this a try and this command worked: >dub --arch=x86_64 --single start_minimal_server.d I'm on Windows 8 with All the visual studio versions installed DMD32 D Compiler v2.080.0-beta.1 DUB version 1.9.0-beta.1, built on Apr 17 2018 Tested with these versions so far, and had all the same errors: C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.079.1 C:\Users\Vaidas>dub --version DUB version 1.8.1, built on Apr 14 2018 C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.080.0 C:\Users\Vaidas>dub --version DUB version 1.9.0, built on May 1 2018
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 18:38:10 UTC, BoQsc wrote: Tested with these versions so far, and had all the same errors: C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.079.1 C:\Users\Vaidas>dub --version DUB version 1.8.1, built on Apr 14 2018 C:\Users\Vaidas>dmd --version DMD32 D Compiler v2.080.0 C:\Users\Vaidas>dub --version DUB version 1.9.0, built on May 1 2018 Well I'm pretty sure the primary reason for my success is having Visual Studio installed and using the ms linker.
Re: dub search
On 5/8/18 11:50 AM, Nicholas Wilson wrote: I was searching for zmq-d on code.dlang.org to find the git page for it ( to differentiate it from the other ama wrappers) and was greeted with 500 - Internal Server Error Internal Server Error Internal error information: vibe.db.mongo.connection.MongoDriverException@../vibe.d/mongodb/vibe/db/mongo/cursor.d(304): Query failed. Does the database exist? ??:? [0xa7bbee] ??:? [0xa825de] exception.d:421 [0x50aa93] exception.d:388 [0x50116d] cursor.d:304 [0x517adc] dbcontroller.d:393 [0x518643] OK, i thought, I'll try searching for "z" Found 30 packages. ^f z one match: Search results for: z That does not bode well for people searching for code on dub. Nic I think there have been some long-standing issues. See for instance this post I made a while back: https://forum.dlang.org/post/p1ecqp$asi$1...@digitalmars.com Of course, now it does find datefmt, but it did not before. -Steve
[Issue 18761] Page for assumeUnique documentation displays incorrectly
https://issues.dlang.org/show_bug.cgi?id=18761 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --
[Issue 18761] Page for assumeUnique documentation displays incorrectly
https://issues.dlang.org/show_bug.cgi?id=18761 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/35d73468d444a81656b45f78247e62ce0bcfc7ee Fix Issue 18761 - Use HTML to force a newline for DDox's macro processor --
Re: D vs nim
On Thursday, 3 May 2018 at 19:11:05 UTC, Mark wrote: On Wednesday, 25 April 2018 at 14:18:07 UTC, Rel wrote: In case you guys like to take a quick look at new emerging, but somewhat unknown systems programming languages: * https://www.red-lang.org/ (own handwritten backend) * https://crystal-lang.org/ (llvm-based backend) * https://ziglang.org/ (llvm-based backend) * http://nitlanguage.org/ (c-based backend?) * https://www.xojo.com/ (llvm-based backend) Funnily, none of these languages have a "static if" construct, nor do Rust, Swift and Nim. Not one that I could find, anyway. Zig has implicit static if: test "static if" { if (false) { @compileError("this is never analyzed"); } } $ zig test test.zig Test 1/1 static if...OK test "static if" { if (true) { @compileError("this is analyzed"); } } $ zig test test.zig test.zig:3:9: error: this is analyzed @compileError("this is analyzed"); ^
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 16:34:53 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: Maybe that isn't the best choice of beginner example if even the D experts can't figure out how to get it to run. Might be a bug, I have already reported it and saw some bug duplicates like mine. However, since 2017 report, it seems to be - still not going well. If I have a chance I'll try to download latest dlang distribution and install on a completely clean Windows 10 Operating system. But I'm not hoping for any luck, but still in need of try trial. So I gave this a try and this command worked: >dub --arch=x86_64 --single start_minimal_server.d I'm on Windows 8 with All the visual studio versions installed DMD32 D Compiler v2.080.0-beta.1 DUB version 1.9.0-beta.1, built on Apr 17 2018
Re: dub search
On 5/8/2018 10:50 AM, Nicholas Wilson wrote: I was searching for zmq-d on code.dlang.org to find the git page for it ( to differentiate it from the other ama wrappers) and was greeted with 500 - Internal Server Error Internal Server Error Internal error information: vibe.db.mongo.connection.MongoDriverException@../vibe.d/mongodb/vibe/db/mongo/cursor.d(304): Query failed. Does the database exist? ??:? [0xa7bbee] ??:? [0xa825de] exception.d:421 [0x50aa93] exception.d:388 [0x50116d] cursor.d:304 [0x517adc] dbcontroller.d:393 [0x518643] ... OK, i thought, I'll try searching for "z" Found 30 packages. ^f z one match: Search results for: z That does not bode well for people searching for code on dub. Nic I am seeing the same thing, apparently it crashes for anything that contains a "-d" in the search. "-dd" doesn't crash.
Re: Wait-free MPSC and MPMC implement in D
On Tuesday, 8 May 2018 at 04:00:03 UTC, manumaster wrote: Is there some implement like this in D ? https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/multilist-2017.pdf Look for Mecca by Wekka.io team. It has great idustry-grade lock-free implementations for both. Not very flexible but these things usually are. Can’t comment on wait-free property (source doesn’t claim it and I haven’t looked close enough to prove either way). https://github.com/weka-io/mecca
Re: D as a college language
On Saturday, 5 May 2018 at 07:37:29 UTC, Walter Bright wrote: On 5/4/2018 4:35 AM, Sjoerd Nijboer wrote: Since D seems to be a language that supports a lot of programming paradigms very well, wouldn't it be beneficial to learn people declarative programming using D for a little and from there expose them to other programming styles in thesame language to lower the barrier of entry? I agree that D being a multi-paradigm language makes it ideal as a vehicle for teaching various paradigms. New paradigms can be taught without the diversion of having to start over learning a new language. Walter, I am considering teaching the programming languages course again in Spring but this time simply using D. Would you be willing to provide me with some advise in the process of converting the one that I had put together based on Dan Grossman's course at UW and which used SML and Python in addition to D. (Dan uses SML, Racket and Ruby). I would like to know if I can purely use D, or at least minimize the use of the two other languages without sacrificing the insights provided by those two languages. Your response indicates that you have a very positive outlook on such a transition and I could help knowing that I am not compromising on the quality of the student's learning experience. -- Sameer
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 13:33:51 UTC, drug wrote: 08.05.2018 16:23, BoQsc пишет: On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: [...] This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799 Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d Failed to find a package named 'start_minimum_server.d'. C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d Unsupported architecture: x64 didn't you forget `--single` option? ``` dub --arch=x64 --single start_minimum_server.d ``` --single is not needed because dub will add it automatically for you. It seems like an optlink bug. Switching to mscoff32/x64 works, but only if you have in addition Microsoft Build Tools or s.th. similar installed. Therefore dmd ships now with the llvm linker but I am not sure how mature this is. Kind regards Andre
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 16:18:27 UTC, bachmeier wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: Maybe that isn't the best choice of beginner example if even the D experts can't figure out how to get it to run. Might be a bug, I have already reported it and saw some bug duplicates like mine. However, since 2017 report, it seems to be - still not going well. If I have a chance I'll try to download latest dlang distribution and install on a completely clean Windows 10 Operating system. But I'm not hoping for any luck, but still in need of try trial.
Re: dxml behavior after exception: continue parsing
On Monday, 7 May 2018 at 22:24:25 UTC, Jonathan M Davis wrote: I've been considering adding more configuration options where you say something like you don't care if any invalid characters are encountered, in which case, you could cleanly parse past something like an unescaped &, but you'd then potentially be operating on invalid XML without knowing it and could get undesirable results depending on what exactly is wrong with the XML. I haven't decided for sure whether I'm going to add any such configuration options or how fine-grained they'd be, but either way, the current behavior will continue to be the default behavior. - Jonathan M Davis I'm not going to ask for that (configuration). I may look into cloning dxml and changing it to parse the badly formed XML.
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 16:02:02 UTC, rjframe wrote: On Tue, 08 May 2018 13:23:07 +, BoQsc wrote: On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d Failed to find a package named 'start_minimum_server.d'. C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d Unsupported architecture: x64 Try the 64-bit build as "--arch=x86_64"; dub doesn't recognize x64 (at least on Windows). dub --arch=x86_64 --single start_minimum_server.d For your first attempt above, adding the --single flag might work. --Ryan C:\Users\Vaidas\Desktop>dub --arch=x86_64 --single start_minimum_server.d Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64. taggedalgebraic 0.10.11: building configuration "library"... eventcore 0.8.34: building configuration "winapi"... stdx-allocator 2.77.1: building configuration "library"... vibe-core 1.4.0: building configuration "winapi"... vibe-d:utils 0.8.3: building configuration "library"... vibe-d:data 0.8.3: building configuration "library"... vibe-d:crypto 0.8.3: building configuration "library"... diet-ng 1.4.5: building configuration "library"... vibe-d:stream 0.8.3: building configuration "library"... vibe-d:textfilter 0.8.3: building configuration "library"... vibe-d:inet 0.8.3: building configuration "library"... vibe-d:tls 0.8.3: building configuration "openssl-mscoff"... vibe-d:http 0.8.3: building configuration "library"... vibe-d:mail 0.8.3: building configuration "library"... vibe-d:mongodb 0.8.3: building configuration "library"... vibe-d:redis 0.8.3: building configuration "library"... vibe-d:web 0.8.3: building configuration "library"... vibe-d 0.8.3: building configuration "vibe-core"... hello_vibed ~master: building configuration "application"... Linking... C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_1034_952.obj): undefined symbol: SetWindowLongPtrA C:\D\dmd2\windows\bin\lld-link.exe: warning: eventcore.lib(sockets_1034_952.obj): undefined symbol: GetWindowLongPtrA error: link failed Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. C:\Users\Vaidas\Desktop>
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: Maybe that isn't the best choice of beginner example if even the D experts can't figure out how to get it to run.
Re: dub search
On Tuesday, 8 May 2018 at 15:50:01 UTC, Nicholas Wilson wrote: I was searching for zmq-d on code.dlang.org to find the git page for it ( to differentiate it from the other ama wrappers) and was greeted with 500 - Internal Server Error Internal Server Error Internal error information: vibe.db.mongo.connection.MongoDriverException@../vibe.d/mongodb/vibe/db/mongo/cursor.d(304): Query failed. Does the database exist? ??:? [0xa7bbee] ??:? [0xa825de] exception.d:421 [0x50aa93] exception.d:388 [0x50116d] cursor.d:304 [0x517adc] dbcontroller.d:393 [0x518643] ... OK, i thought, I'll try searching for "z" Found 30 packages. ^f z one match: Search results for: z That does not bode well for people searching for code on dub. Nic Interesting. Searching for "libneo4j-client" gives 112 search results. Searching for "libneo4j" just one, namely: libneo4j-client ...
Re: "Start a Minimal web server" example do not work.
On Tue, 08 May 2018 13:23:07 +, BoQsc wrote: > On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: >> >> Did you try the newer MSCOFF format >> >> dub --arch=x86_mscoff start_minimum_server.d >> >> or >> >> dub --arch=x64 start_minimum_server.d > > C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d > Failed to find a package named 'start_minimum_server.d'. > > C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d > Unsupported architecture: x64 Try the 64-bit build as "--arch=x86_64"; dub doesn't recognize x64 (at least on Windows). dub --arch=x86_64 --single start_minimum_server.d For your first attempt above, adding the --single flag might work. --Ryan
dub search
I was searching for zmq-d on code.dlang.org to find the git page for it ( to differentiate it from the other ama wrappers) and was greeted with 500 - Internal Server Error Internal Server Error Internal error information: vibe.db.mongo.connection.MongoDriverException@../vibe.d/mongodb/vibe/db/mongo/cursor.d(304): Query failed. Does the database exist? ??:? [0xa7bbee] ??:? [0xa825de] exception.d:421 [0x50aa93] exception.d:388 [0x50116d] cursor.d:304 [0x517adc] dbcontroller.d:393 [0x518643] ... OK, i thought, I'll try searching for "z" Found 30 packages. ^f z one match: Search results for: z That does not bode well for people searching for code on dub. Nic
Re: Need help with the dmd package on NixOS
On Tuesday, 8 May 2018 at 14:45:53 UTC, Thomas Mader wrote: On Saturday, 5 May 2018 at 11:22:06 UTC, Thomas Mader wrote: I also need to skip through changes which might have introduced this problem. Has anyone tried to compile with glibc 2.27? They switched to 2.27 on Master branch and I suspect that the error has to do with that. Yep, using 2.27-3 on ArchLinux here and everything builds fine. - Maybe somewhere there's still an old cache? - Maybe dmd, druntime or phobos aren't checked out at the same version?
Re: Need help with the dmd package on NixOS
On Saturday, 5 May 2018 at 11:22:06 UTC, Thomas Mader wrote: I also need to skip through changes which might have introduced this problem. Has anyone tried to compile with glibc 2.27? They switched to 2.27 on Master branch and I suspect that the error has to do with that.
Re: Disassemble binary.
Source code: https://github.com/vitalfadeev/dasm
Re: Documentation for assumeUnique
On Monday, 7 May 2018 at 15:32:56 UTC, bachmeier wrote: I filed a bug on this several weeks ago. Can someone tell me what is wrong in the source so that I can fix it? It is almost certainly trivial, but I don't see it. You can see the messed up documentation here: https://dlang.org/library/std/exception/assume_unique.html Fix: https://github.com/dlang/dlang.org/pull/2364
[Issue 18761] Page for assumeUnique documentation displays incorrectly
https://issues.dlang.org/show_bug.cgi?id=18761 --- Comment #3 from Seb--- Fix: https://github.com/dlang/dlang.org/pull/2364 --
Re: Binderoo additional language support?
On Monday, 7 May 2018 at 17:28:55 UTC, Ethan wrote: 13 responses so far. Cheers to those 13. I don't really understand what to use binderoo for. So rather than fill out the questionnaire, maybe I would just recommend you do some work on wiki, blog post, or simple examples.
[Issue 18761] Page for assumeUnique documentation displays incorrectly
https://issues.dlang.org/show_bug.cgi?id=18761 Sebchanged: What|Removed |Added Status|RESOLVED|REOPENED CC||greensunn...@gmail.com Resolution|MOVED |--- --- Comment #2 from Seb --- Actually we can fix this without touching Ddox. --
Re: unit-threaded v0.7.45 - now with more fluency
On Tuesday, 8 May 2018 at 03:57:25 UTC, Johannes Loher wrote: Fluent assertions have one major advantage over using pascalCase assertions: There is no ambiuguity about the order of arguments. When using e.g. assertEquals, how do you know wheter is is supposed to be assertEquals(actual, expected), or assertEquals(expected, actual)? The first one is the only one that makes sense wirh UFCS, but it is not clear directly from the API. On top of that, some popular Frameworks (I‘m looking at you, JUnit...) do it exactly the other way round. With fluent assertions, you don‘t have this Problem, it is much more clear that it should be actual.should.equal(expected) and not expected.should.equal(actual), because it fits naturally in the chain of ufcs calls. Okay, I think I see your point, although it looks to me the added verbosity and code complexity is not really worth it, provided you always use UFCS. But of course, that cannot be easily enforced I guess.
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 13:33:51 UTC, drug wrote: 08.05.2018 16:23, BoQsc пишет: On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: [...] This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799 Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d Failed to find a package named 'start_minimum_server.d'. C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d Unsupported architecture: x64 didn't you forget `--single` option? ``` dub --arch=x64 --single start_minimum_server.d ``` C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff --single start_minimum_server.d Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86, x86_mscoff. taggedalgebraic 0.10.11: building configuration "library"... eventcore 0.8.34: building configuration "winapi"... stdx-allocator 2.77.1: building configuration "library"... vibe-core 1.4.0: building configuration "winapi"... vibe-d:utils 0.8.3: building configuration "library"... vibe-d:data 0.8.3: building configuration "library"... vibe-d:crypto 0.8.3: building configuration "library"... diet-ng 1.4.5: building configuration "library"... vibe-d:stream 0.8.3: building configuration "library"... vibe-d:textfilter 0.8.3: building configuration "library"... vibe-d:inet 0.8.3: building configuration "library"... vibe-d:tls 0.8.3: building configuration "openssl-mscoff"... vibe-d:http 0.8.3: building configuration "library"... vibe-d:mail 0.8.3: building configuration "library"... vibe-d:mongodb 0.8.3: building configuration "library"... vibe-d:redis 0.8.3: building configuration "library"... vibe-d:web 0.8.3: building configuration "library"... vibe-d 0.8.3: building configuration "vibe-core"... hello_vibed ~master: building configuration "application"... Linking... C:\D\dmd2\windows\bin\lld-link.exe: warning: phobos32mscoff.lib(crc32.obj): undefined symbol: __allshr error: link failed Error: linker exited with status 1 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. C:\Users\Vaidas\Desktop>
Re: dmd testsuite's runner is now in D
On Tuesday, 8 May 2018 at 12:51:42 UTC, Seb wrote: Just a quick heads-up for all the people using Windows and who have previously complained about the usage of GNUmake for DMD's testsuite. [...] This is great news! Any chance at a slightly more detailed write up on the blog or announce?
Re: "Start a Minimal web server" example do not work.
08.05.2018 16:23, BoQsc пишет: On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: [...] This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799 Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d Failed to find a package named 'start_minimum_server.d'. C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d Unsupported architecture: x64 didn't you forget `--single` option? ``` dub --arch=x64 --single start_minimum_server.d ```
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 13:04:12 UTC, Seb wrote: On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: [...] This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799 Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d C:\Users\Vaidas\Desktop>dub --arch=x86_mscoff start_minimum_server.d Failed to find a package named 'start_minimum_server.d'. C:\Users\Vaidas\Desktop>dub --arch=x64 start_minimum_server.d Unsupported architecture: x64
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 12:37:42 UTC, BoQsc wrote: On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: [...] This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799 Did you try the newer MSCOFF format dub --arch=x86_mscoff start_minimum_server.d or dub --arch=x64 start_minimum_server.d
dmd testsuite's runner is now in D
Just a quick heads-up for all the people using Windows and who have previously complained about the usage of GNUmake for DMD's testsuite. Since a few days, all you need to run the testsuite is a DMD compiler. The test/run.d has a few handy features, so check out the new documentation: https://github.com/dlang/dmd/blob/master/test/README.md The quick summary: ./run# runs all test (with all available threads) ./run -j1# runs all test (with a single thread) ./run.d fail # runs all fail_compilation tests ./run.d compilable # runs all compilable tests ./run.d fail_compilation/diag10089.d # runs a single test ./run.d fail_compilation/diag*.d # if you shell supports expansion, you can build your own subset of tests to run ./run.d fail AUTO_UPDATE=1# automatically update the TEST_OUTPUT text (and generated files soon) It's intended as a drop-in replacement for the Makefile, so all previous commands should work and it can be invoked from anywhere (no need for -C). There are still a few bash tests that might fail on Windows, so use e.g. your git shell [2]. Disclaimer: test/run.d is currently still experimental. If you run into any issues, please report them. PS: The plan is to slowly transition from the Makefile to test/run.d, so any issues you have with test/run.d are important. [1] https://github.com/dlang/dmd/pull/8215 [2] https://gitforwindows.org
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 12:19:14 UTC, Adam D. Ruppe wrote: On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: - #!/usr/bin/env dub This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle. My intuition now says to use dub this way: -- C:\Users\Vaidas\Desktop>dub start_minimum_server.d EC:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. And got an error: Unexpected OPTLINK Termination at EIP=0040F60A EAX=06CB EBX=00438C70 ECX=02C2 EDX=030D ESI=00257000 EDI=06CB34F8 EBP=0019FF38 ESP=0019FEF0 First=00402000 Similar to this one: https://issues.dlang.org/show_bug.cgi?id=18799
Re: "Start a Minimal web server" example do not work.
On Tuesday, 8 May 2018 at 12:13:56 UTC, BoQsc wrote: This is the code example, that was presented on the https://dlang.org frontpage: - #!/usr/bin/env dub This one needs to be compiled+run with the dub package manager instead of with rdmd, which is why it has that shebang line. It has external library dependencies rdmd can't handle.
"Start a Minimal web server" example do not work.
This is the code example, that was presented on the https://dlang.org frontpage: - #!/usr/bin/env dub /+ dub.sdl: name "hello_vibed" dependency "vibe-d" version="~>0.8.0" +/ void main() { import vibe.d; listenHTTP(":8080", (req, res) { res.writeBody("Hello, World: " ~ req.path); }); runApplication(); } - I have copied this example code into start_minimum_server.d file. Ran it as script with rdmd.exe And got an output: -- C:\Users\Vaidas\Desktop>rdmd start_minimum_server.d start_minimum_server.d(8): Error: module `d` is in file 'vibe\d.d' which cannot be read import path[0] = . import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import Failed: ["dmd", "-v", "-o-", "start_minimum_server.d", "-I."] --
[Issue 18843] -deps -unittest causes cataclysmic memory usage
https://issues.dlang.org/show_bug.cgi?id=18843 Sebchanged: What|Removed |Added CC||greensunn...@gmail.com --- Comment #1 from Seb --- Please see and help out on https://github.com/dlang/dmd/pull/8124 --
[Issue 18828] [-betterC] helpless error in object.d
https://issues.dlang.org/show_bug.cgi?id=18828 --- Comment #8 from Xavier Bigand--- dustmite with the --no-redirect option give me the output : Loading ..\common\opengl_api\arb.d Loading ..\common\opengl_api\constants.d Loading ..\common\opengl_api\ext.d Loading ..\common\opengl_api\functions.d Loading ..\common\opengl_api\types.d Loading ..\common\opengl_api\wgl.d Loading ..\common\opengl_api\wglext.d Loading ..\common\utils\ctfe.d Loading ..\opengl32\.dub\dub.json Loading ..\opengl32\dub.sdl Loading ..\opengl32\dub.selections.json Loading ..\opengl32\src\api_entry.d Loading ..\opengl32\src\dll_entry.d Loading ..\opengl32\src\forward_initialization.d None => object.Exception@DustMite\dustmite.d(271): Initial test fails 0x00403B9B 0x00459407 0x00459389 0x00459224 0x00441478 0x76DE8484 in BaseThreadInitThunk 0x77E52EC0 in RtlValidSecurityDescriptor 0x77E52E90 in RtlValidSecurityDescriptor No --
Re: Disassemble binary.
example: ./dasm opcode.o opcode.op_eq_s Disassembly of section .text._D6opcode7op_eq_sFZi: <_D6opcode7op_eq_sFZi>: 0: 55 push %rbp 1: 48 8b ecmov%rsp,%rbp 4: 48 39 d1cmp%rdx,%rcx 7: 75 0a jne13 <_D6opcode7op_eq_sFZi+0x13> 9: 48 85 c9test %rcx,%rcx c: 74 0c je 1a <_D6opcode7op_eq_sFZi+0x1a> e: fc cld f: f3 a6 repz cmpsb %es:(%rdi),%ds:(%rsi) 11: 74 07 je 1a <_D6opcode7op_eq_sFZi+0x1a> 13: b8 00 00 00 00 mov$0x0,%eax 18: eb 05 jmp1f <_D6opcode7op_eq_sFZi+0x1f> 1a: b8 01 00 00 00 mov$0x1,%eax 1f: 90 nop 20: 5d pop%rbp 21: c3 retq ...
Disassemble binary.
Just share. Script for disassemble binary. And script for bash completion. Complete symbol names. Files: ./dasm /etc/bash_completion.d/dasm file <./dasm> #!/bin/bash # Author: abu, vital # Description: puts disassembled objectfile to std-out if [ $# = 2 ]; then sstrg="^[[:xdigit:]]{2,}+.*<$2>:$" objdump -d $1 | awk -F"\n" -v RS="\n\n" '$1 ~ /'$2'/' elif [ $# = 1 ]; then objdump -d $1 | awk -F"\n" -v RS="\n\n" '{ print $1 }' else echo "You have to add argument(s)" echo "Usage: "$0 " arg1 arg2" echo "Description: print disassembled label to std-out" echo " arg1: name of object file" echo " arg2: name of function to be disassembled" echo " "$0 " arg1... print labels and their rel. addresses" fi file # bash completion for dasm _dasm() { local cur=${COMP_WORDS[COMP_CWORD]} if [[ $COMP_CWORD -eq 1 ]] ; then # files COMPREPLY=( $( command ls *.o -F 2>/dev/null | grep "^$cur" ) ) elif [[ $COMP_CWORD -eq 2 ]] ; then # functions OBJFILE=${COMP_WORDS[COMP_CWORD-1]} COMPREPLY=( $( command nm --demangle=dlang $OBJFILE | grep " W " | cut -d " " -f 3 | tr "()" " " | grep "$cur" ) ) else COMPREPLY=($(compgen -W "" -- "$cur")); fi } complete -F _dasm dasm
[Issue 18843] New: -deps -unittest causes cataclysmic memory usage
https://issues.dlang.org/show_bug.cgi?id=18843 Issue ID: 18843 Summary: -deps -unittest causes cataclysmic memory usage Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: default_357-l...@yahoo.de In case you think I'm exaggerating: echo 'import std.stdio; void main() { writeln("Hello World"); }' > helloworld.d /usr/bin/time -v dmd -deps -unittest helloworld.d [...] User time (seconds): 27.24 [...] Maximum resident set size (kbytes): 11550624 That's 11 gigabytes rss for Hello World. The background issue is that -deps -unittest forces DMD to recurse into Phobos unittests and all their imports, eventually semantically evaluating every single unittest in Phobos. Quickfur had a good proposal in https://github.com/dlang/phobos/pull/6159 , that may generalize to -deps: only consider files that are explicitly listed on the command line. That may help. --
[Issue 18828] [-betterC] helpless error in object.d
https://issues.dlang.org/show_bug.cgi?id=18828 --- Comment #7 from Mike Franklin--- The problem is this code in object.d: void destroy(T)(ref T obj) if (is(T == struct)) { _destructRecurse(obj); () @trusted { auto buf = (cast(ubyte*) )[0 .. T.sizeof]; auto init = cast(ubyte[])typeid(T).initializer(); if (init.ptr is null) // null ptr means initialize to 0s buf[] = 0; else buf[] = init[]; } (); } The call to `typeid` needs to return a `TypeInfo` instance. Is there a way to get the initializer at compile-time without a runtime call to `typeid`? --
[Issue 18828] [-betterC] helpless error in object.d
https://issues.dlang.org/show_bug.cgi?id=18828 --- Comment #6 from Seb--- > object.Exception@DustMite\dustmite.d(271): Initial test fails (try using > --no-redirect for details) Then use --no-direct (or the tester command in standalone) to see why it failed. --
[Issue 18828] [-betterC] helpless error in object.d
https://issues.dlang.org/show_bug.cgi?id=18828 --- Comment #5 from Xavier Bigand--- Created attachment 1693 --> https://issues.dlang.org/attachment.cgi?id=1693=edit Complete project I tried dustmite with the command line in a git bash window : dustmite --force -no-redirect .. "dub build 2>&1 | grep -qF 'TypeInfo cannot be used with -betterC'" I am getting the error : object.Exception@DustMite\dustmite.d(271): Initial test fails (try using --no-redirect for details) --
[Issue 18761] Page for assumeUnique documentation displays incorrectly
https://issues.dlang.org/show_bug.cgi?id=18761 Simen Kjaeraaschanged: What|Removed |Added Status|NEW |RESOLVED CC||simen.kja...@gmail.com Resolution|--- |MOVED --- Comment #1 from Simen Kjaeraas --- This is an issue in ddox: https://github.com/rejectedsoftware/ddox/issues/204 --
Re: A bit more Emscripten
On Tuesday, 8 May 2018 at 08:53:36 UTC, Vladimir Panteleev wrote: I heard there was a bit of general interest on the subject, so would be interesting to hear about more potential use cases. I've been recently assigned the task of building a web-based Ladder Logic editor/compiler (https://en.wikipedia.org/wiki/Ladder_logic). This would not be a short-lived application, however. I'd like to use D so I can take advantage of its fantastic modeling features to help manage the complexity of building such tool. It would also be more familiar, and therefore more productive, for me to use a language like D, so I don't have to do so much study and figuring to implement my ideas in Javascript, or learn some new API/framework/library/tool/whatever. One of my primary motivations for learning D is to avoid having to learn a different programming language for every different platform or problem domain: modeling power, modern convenience, and native efficiency are the trifecta for me (we should have kept that motto, IMO). Add some platform independence, and I'm extremely happy. For now, unfortunately, it looks like I'll probably be using primarily Javascript and C#. I'm not sure if I would be much help with this, but know that there is demand for it. I think the difficult part would be porting the D runtime to "browser" environment, and I'm not sure what's involved with that, especially given all platform dependencies that the runtime is currently bound to. Mike
Re: `recursive template expansion` error msg isn't informative
07.05.2018 17:22, Timoses пишет: On Monday, 7 May 2018 at 10:28:14 UTC, drug wrote: I get the error like: ``` ./foo/bar/baz/builder.d(57,23): Error: template instance `staticMap!(DebugTypeMapper, BaseDebuggerTypes)` recursive template expansion ``` That's all. It doesn's print instantiations stack so I can't track back the reason. Could someone give an advice how to struggle with such error? Could you give us some code snippet to eventually reproduce it? It's non trivial and not small code base and I failed to make a reduced case. I've found workaround just importing from the module some (any in fact) symbol. I just replaced: ``` import foo.bar; ``` by ``` import foo.bar; // here I need all symbols from the module import foo.bar : anySymbolFromFooBar; ```
Re: could someone test support for Asian languages in nanogui port?
08.05.2018 11:11, Kagamin пишет: On Sunday, 6 May 2018 at 11:18:17 UTC, drug wrote: Could you describe the problem in more details? SDL probably selects the first font that has the characters, which in his case is a font of comic sans design, instead of a font configured for gui. It's not the case, the font is set explicitly, so may be other font can solve the problem. Also text is rendered by nanovega, not by SDL. nanovega uses FontStash, lowlevel font engine that in its turn uses either freetype or stb (there are three (!) implementations of it: stb port, arsd and iv, probably all of them just are variants of original std)
Re: unit-threaded v0.7.45 - now with more fluency
On Tuesday, 8 May 2018 at 07:07:30 UTC, Nick Sabalausky (Abscissa) wrote: On 05/07/2018 11:57 PM, Johannes Loher wrote: On Monday, 7 May 2018 at 09:19:31 UTC, Dechcaudron wrote: I think I'm siding with Johannes here. Much as the overloads look nice, I don't really see the advantage over `shouldEqual`. Also, what's with `all.these.identifiers`? Any particular reason why you are more fond of them rather than of good ol' pascalCase? Fluent assertions have one major advantage over using pascalCase assertions: There is no ambiuguity about the order of arguments. When using e.g. assertEquals, how do you know wheter is is supposed to be assertEquals(actual, expected), or assertEquals(expected, actual)? The first one is the only one that makes sense wirh UFCS, but it is not clear directly from the API. On top of that, some popular Frameworks (I‘m looking at you, JUnit...) do it exactly the other way round. With fluent assertions, you don‘t have this Problem, it is much more clear that it should be actual.should.equal(expected) and not expected.should.equal(actual), because it fits naturally in the chain of ufcs calls. I don't think that's the issue. At least, it isn't for me. It's not a question of "assert equals" vs "should equal" (Though I am convinced by your argument on that matter). The question is: Why "should.equal" instead of "shouldEqual"? The dot only seems there to be cute. Not that I'm necessarily opposed to any of it (heck, I like cuteness in any sense of the word), it's just that: If the "~" thing is operator abuse, then I don't see how "should.equal", "should.not.be" etc, wouldn't fall into the same category. I wouldn't say it's an abuse, the dot means exactly the same thing as everywhere else in the language. I'm way less fan of overidding ~ since that doesn't have that meaning in any other context. Without having actually used it, I like the composability over pascalCasing here, it looks like it fits nicely in a functional environment with things like aliases and partials I think, defining your own primitives naturally... Nothing one can't do with regular functions and pascalCased assertions, but it sounds like it would be way more verbose. It also sounds like it's easier on the implementation side since you never have to define both a "shouldSomething" and "shouldNotSomething", and that means as a user I can expect less bugs and better maintainance of the library. That said, it'll have to be field-tested to be sure.
A bit more Emscripten
https://github.com/CyberShadow/dscripten-tools This builds a little upon Sebastien Alaiwan (Ace17)'s excellent prior work of putting together a toolchain for compiling D to JavaScript / asm.js. Improvements include a DMD-like driver and rdmd wrapper, meaning that most tools that know how to use dmd/rdmd will be able to also use this toolchain. Dub is an example. Currently the focus is on headless scripts - Web Workers and Node. Also included are some hacked up parts of Phobos/Druntime. Generally such environments are restricted to @nogc stuff, but I wanted to see how far we can get without prior restrictions. As a result, things like Appender and format(...) (i.e. formatting to the heap) work. Of course, garbage collection is unavailable - it's using the "manual" GC implementation (allocates only), though considering most webpages are short-lived, it might not be a problem for many use cases. I heard there was a bit of general interest on the subject, so would be interesting to hear about more potential use cases.
Re: Is HibernateD dead?
On Tuesday, 8 May 2018 at 07:28:31 UTC, Vadim Lopatin wrote: On Monday, 7 May 2018 at 17:27:17 UTC, Jesse Phillips wrote: You should get a hold of Vadim Lopatin and see if he would give you commit rights to the main repo. There was a great article I can't find by someone who would add contributors if they made good pull requests. It helped to keep his work living on and didn't need to keep involved. So I push for people to follow this model (remove contributors if it isn't working out. Guys, if you want to get permissions for pushing to buggins/ddbc and buggins/hibernated, please send me you github id to coolreader@gmail.com I've just sent you a mail :)
Re: could someone test support for Asian languages in nanogui port?
On Sunday, 6 May 2018 at 11:18:17 UTC, drug wrote: Could you describe the problem in more details? SDL probably selects the first font that has the characters, which in his case is a font of comic sans design, instead of a font configured for gui.
[Issue 18842] New: Wrong type for pointers to member functions
https://issues.dlang.org/show_bug.cgi?id=18842 Issue ID: 18842 Summary: Wrong type for pointers to member functions Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: normal Priority: P3 Component: dmd Assignee: nob...@puremagic.com Reporter: ajiesk...@gmail.com When referencing a non-static member function without using an instance to that type, the typecheck malfunctions: import std.stdio; struct IntPair { int a; int b; IntPair opBinary(string op)(IntPair other) { return IntPair ( mixin("a " ~ op ~ " other.a"), mixin("b " ~ op ~ " other.b") ); } } void main() { auto val = IntPair(3, 10); //One would think it works like this, does not compile //IntPair function(ref IntPair, IntPair) fp = !"+"; //val.fp(val).writeln; //this compiles and causes undefined behaviour. IntPair function(IntPair) fp = !"+"; fp(val).writeln; readln; } With D, of course you would prefer using lambdas in cases like this, and using @safe prevents doing this. But I still see no reason why you should be able to call a member funtion pointer without a member, but not with one. --
Re: andrei - better breakdown of statistics for downloads by region, OS, kind of site (academic/large corporate/large financial/etc)
Stat out of date... Plz update it.
Geany editor: Dlang code autocomplete
Hi! Does anyone else use Geany as Dlang code editor? I'm looking at the ongoing fundraising for another editor. Unlike it, we have almost everything ready: https://github.com/denizzzka/geany_dlang (More precisely, I think that Geany is not so advanced and currently it is enough to add only tips and autocompletion :-)) But there is one significant "but": in the Geany editor there is no support for plugins that implement autocompletion. More details about this can be found in this issue: https://github.com/geany/geany/issues/1854 If someone knows С and understands how to add good support for this in Geany itself (this is GTK application) plese write to me or to Github issue from above. Estimation of work ~3 hours, it seems. And we finally get a normal autocompletion for D language. Thanks!
Re: Binderoo additional language support?
On 05/07/2018 01:24 PM, Ethan wrote: On Monday, 7 May 2018 at 03:33:19 UTC, Norm wrote: See, that just sounds a bit too much like a Sumatran Rat Monkey to me. That sounds like a coffee-based cocktail to me ;)
Re: Funding for code-d/serve-d
On Tuesday, 8 May 2018 at 05:53:43 UTC, Apocalypto wrote: On Monday, 7 May 2018 at 09:29:06 UTC, Dechcaudron wrote: Also, though I use WebFreak's extension for VS code, I never really got it to work 100% (never really invested more than a couple minutes either, to be fair). Thinks like syntax highlighting and symbol lookup are really welcome, but I'd like completion support out of the box. Is it only me that has an issue with this? You are not the only one. I'll stick to VisualD for the moment on Windows, especially for debugging experience. #meetoo
Re: sumtype 0.3.0
On 05/07/2018 05:35 PM, Paul Backus wrote: Personally, I consider [pattern matching] an essential feature--arguably *the* essential feature-- After having used Nemerle, I tend to agree. I haven't gotten around to using this yet, but I did take a look at the source and was blown away by how small and simple it is. Kudos! Oh, and I love that it's much easier to remember how to spell than "Algebraic" :) That said, it would be really nice if D made it possible for a tool like this to support more things being defined in-line. For example, in Nemerle, it's possible to define a binary tree like this: - // Mainly from: // https://github.com/rsdn/nemerle/wiki/Grok-Variants-and-matching variant Tree { | Node { left : Tree; elem : int; right : Tree; } | EmptyLeaf } - But AFAIK, in D, each part would have to be defined separately, making the overall structure less clear: - struct Node { Tree* left; int elem; Tree* right; } struct EmptyLeaf {} alias Tree = SumType!(Node, EmptyLeaf); - Of course, that's not your lib's fault, just an unfortunate limitation of D.
Re: Is HibernateD dead?
On Monday, 7 May 2018 at 17:27:17 UTC, Jesse Phillips wrote: You should get a hold of Vadim Lopatin and see if he would give you commit rights to the main repo. There was a great article I can't find by someone who would add contributors if they made good pull requests. It helped to keep his work living on and didn't need to keep involved. So I push for people to follow this model (remove contributors if it isn't working out. Guys, if you want to get permissions for pushing to buggins/ddbc and buggins/hibernated, please send me you github id to coolreader@gmail.com
Re: unit-threaded v0.7.45 - now with more fluency
On 05/07/2018 11:57 PM, Johannes Loher wrote: On Monday, 7 May 2018 at 09:19:31 UTC, Dechcaudron wrote: I think I'm siding with Johannes here. Much as the overloads look nice, I don't really see the advantage over `shouldEqual`. Also, what's with `all.these.identifiers`? Any particular reason why you are more fond of them rather than of good ol' pascalCase? Fluent assertions have one major advantage over using pascalCase assertions: There is no ambiuguity about the order of arguments. When using e.g. assertEquals, how do you know wheter is is supposed to be assertEquals(actual, expected), or assertEquals(expected, actual)? The first one is the only one that makes sense wirh UFCS, but it is not clear directly from the API. On top of that, some popular Frameworks (I‘m looking at you, JUnit...) do it exactly the other way round. With fluent assertions, you don‘t have this Problem, it is much more clear that it should be actual.should.equal(expected) and not expected.should.equal(actual), because it fits naturally in the chain of ufcs calls. I don't think that's the issue. At least, it isn't for me. It's not a question of "assert equals" vs "should equal" (Though I am convinced by your argument on that matter). The question is: Why "should.equal" instead of "shouldEqual"? The dot only seems there to be cute. Not that I'm necessarily opposed to any of it (heck, I like cuteness in any sense of the word), it's just that: If the "~" thing is operator abuse, then I don't see how "should.equal", "should.not.be" etc, wouldn't fall into the same category.
Re: sumtype 0.3.0
On Sunday, 6 May 2018 at 19:18:02 UTC, Paul Backus wrote: snip Wow.. without comments and unittests, the implementation is only 116 lines. Awesome job. Even now I still find it incredible what D can do. Is Algebraic in the standard library really that bad? And if so, why aren't implementations like this being accepted?