Re: This Week in D: debugging uncaught exceptions
On Monday, 8 August 2016 at 04:24:45 UTC, Adam D. Ruppe wrote: I decided to write up a think on untrapping exceptions this week: http://arsdnet.net/this-week-in-d/2016-aug-07.html Next week I'll prolly talk about calling D from Ruby. Last week, we had a status report from Stefan Koch on his CTFE engine. If you aren't already following this, every Sunday night or Monday morning, the little newsletter comes out with a snapshot of forum activity and about half of them have some kind of longer article or tip or other such educational content. The RSS feed (linked on the page) is also a single-page archive so you can search for old things there too! The item 77 should be for the week July 24, 2016 instead of July 03, 2016.
Re: DConf 2016 on YouTube
On Monday, 8 August 2016 at 22:59:27 UTC, jmh530 wrote: On Thursday, 21 July 2016 at 16:35:44 UTC, Ali Çehreli wrote: Stealing the opportunity to announce this news... :) https://www.youtube.com/playlist?list=PL3jwVPmk_PRyTWWtTAZyvmjDF4pm6EX6z Reddit: https://www.reddit.com/r/programming/comments/4txf9w/dconf_2016_video_playlist/ Ali I recommend that they link to the videos from the dconf website. There's currently a bottleneck in the deployment ;-) See: https://github.com/dlang/dconf.org/pull/140
Re: This Week in D: debugging uncaught exceptions
On 08/08/16 06:24, Adam D. Ruppe wrote: I decided to write up a think on untrapping exceptions this week: http://arsdnet.net/this-week-in-d/2016-aug-07.html How to detect if running inside a debugger on OS X [1]. [1] https://developer.apple.com/library/ios/qa/qa1361/_index.html -- /Jacob Carlborg
Re: LDC 1.1.0-beta2 has been released!
On Monday, 8 August 2016 at 16:14:44 UTC, David Nadlinger wrote: On Monday, 8 August 2016 at 16:01:29 UTC, Lodovico Giaretta wrote: Is this beta available on Travis, or will it be? The beta is available from https://dlang.org/install.sh as "ldc-1.1.0-beta2", so it should also be accessible on Travis. On [1] the last reported version is 1.1.0-alpha1. This might be due to LDC's LATEST file having been accidentally set to alpha 1 before the actual release – IIRC, that page just periodically scrapes the output of building with "ldc" on Travis. (Users wouldn't usually expect "ldc" to give them an alpha-quality compiler, although it seems we were lucky and the alpha was already stable enough for nobody to really notice.) — David Thank you very much. I will try it as soon as possible.
Re: LDC 1.1.0-beta2 has been released!
On Wednesday, 3 August 2016 at 20:12:59 UTC, Kai Nacke wrote: Hi everyone, LDC 1.1.0-beta2, the LLVM-based D compiler, is available for download! This BETA release is based on the 2.071.1 frontend and standard library and supports LLVM 3.5-3.9. We provide binaries for Linux, OX X, FreeBSD, Win32 & Win64, Linux/ARM (armv7hf), now bundled with DUB. :-) As usual, you can find links to the changelog and the binary packages over at digitalmars.D.ldc: http://forum.dlang.org/post/nskepdckljprrxsjb...@forum.dlang.org Regards, Kai Is this beta available on Travis, or will it be? On [1] the last reported version is 1.1.0-alpha1. Thank you very much for your work. [1] http://semitwist.com/travis-d-compilers
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On Monday, 8 August 2016 at 08:24:48 UTC, Alix Pexton wrote: On 08/08/2016 08:37, Atila Neves wrote: On Saturday, 6 August 2016 at 10:34:52 UTC, Nicholas Wilson wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: [...] There is a typo in your readme [...] shouldBe (!) adder(2, 3) No, turns out it was right after all. There's a `ShouldFail` UDA on that test. Atila But you are passing the expression (2 + 3), rather than a tuple of arguments (2, 3)! A... Ah, right, oops :$ Changing it... Atila
Re: Battle-plan for CTFE
On Monday, 8 August 2016 at 09:51:03 UTC, Johan Engelen wrote: On Sunday, 7 August 2016 at 16:52:28 UTC, Stefan Koch wrote: On Saturday, 6 August 2016 at 23:04:48 UTC, Stefan Koch wrote: No, not now, but very soon. I want to have _basic_ utf8 support before I am comfortable with enabling string operations. Tomorrow this is going to work. Hi Stefan, How much effort will it be to integrate your work into LDC? I'd like to test it on some Weka code. Definitely let us know once you can CTFE something like std.traits.ParameterStorageClassTuple. cheers, Johan Hi Johan, It won't be too much effort. Since it was designed with that in mind.
Re: Battle-plan for CTFE
On Sunday, 7 August 2016 at 16:52:28 UTC, Stefan Koch wrote: On Saturday, 6 August 2016 at 23:04:48 UTC, Stefan Koch wrote: No, not now, but very soon. I want to have _basic_ utf8 support before I am comfortable with enabling string operations. Tomorrow this is going to work. Hi Stefan, How much effort will it be to integrate your work into LDC? I'd like to test it on some Weka code. Definitely let us know once you can CTFE something like std.traits.ParameterStorageClassTuple. cheers, Johan
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On 08/08/2016 08:37, Atila Neves wrote: On Saturday, 6 August 2016 at 10:34:52 UTC, Nicholas Wilson wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: https://code.dlang.org/packages/unit-threaded What's new: . Mocking support. Classes, interfaces and structs can be mocked (see README.md or examples) . Shrinking support for property-based testing, but only for integrals and arrays . Bug fixes Enjoy! Atila There is a typo in your readme int adder(int i, int j) { return i + j; } @("Test adder") unittest { > adder(2 + 3).shouldEqual(5); } @("Test adder fails", ShouldFail) unittest { adder(2 + 3).shouldEqual(7); } shouldBe (!) adder(2, 3) No, turns out it was right after all. There's a `ShouldFail` UDA on that test. Atila But you are passing the expression (2 + 3), rather than a tuple of arguments (2, 3)! A...
Re: Autotesting dub packages with dmd nightly
On Sunday, 7 August 2016 at 23:08:34 UTC, Martin Nowak wrote: I actually don't think this makes sense. You're not in the position to maintain 1K+ packages, it's the library owners that need to test their code. Thanks for taking the time to respond. I agree with you. Library owners should test their code themselves. But they don't. 24% of the packages don't build. Just this short list I'm using for the project tester is hardly maintainable. I don't need to maintain anything besides linker errors. It is quite simple, I just run `dub test` and see what happens. If that doesn't work I consider it a failed build. https://github.com/MartinNowak/project_tester (uses Jenkins, no need to write yet another CI). I would argue mine is simpler to deploy and have nodes join. I've already thought about many different aspects of this and here are the 2 things that are useful and might work out. - Implement a tester that runs for every PR (just the other testers) and tests the most popular/important dub packages. Once a day is not enough b/c will feel responsible for breakages, we really need feedback before merging. It is just a matter of resources. I choose nightly since it seemed doable using just my own resources. - Show test results of various CIs on code.dlang.org. Testing a dub package on Travis-CI is already a no-brainer. For example the following .travis.yml would test a package against all dmd release channels. ```yaml language: d d: [dmd, dmd-beta, dmd-nightly] ``` Yes, that is quite nice. But that only gets triggered when the repo is updated. All in all I understand your reservations, and I highly appreciate your feedback. I understand I won't bring the end-all solution to testing, but I do hope to reach the goals that I have set forth for myself. 1) catching (some) regressions, 2) giving insights into bit rot on code.dlang.org, 3) have fun. It might take a couple of months before I reach them, or I might not at all.
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On Saturday, 6 August 2016 at 10:34:52 UTC, Nicholas Wilson wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: https://code.dlang.org/packages/unit-threaded What's new: . Mocking support. Classes, interfaces and structs can be mocked (see README.md or examples) . Shrinking support for property-based testing, but only for integrals and arrays . Bug fixes Enjoy! Atila There is a typo in your readme int adder(int i, int j) { return i + j; } @("Test adder") unittest { > adder(2 + 3).shouldEqual(5); } @("Test adder fails", ShouldFail) unittest { adder(2 + 3).shouldEqual(7); } shouldBe (!) adder(2, 3) No, turns out it was right after all. There's a `ShouldFail` UDA on that test. Atila
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On Saturday, 6 August 2016 at 01:50:15 UTC, Øivind wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: https://code.dlang.org/packages/unit-threaded What's new: . Mocking support. Classes, interfaces and structs can be mocked (see README.md or examples) . Shrinking support for property-based testing, but only for integrals and arrays . Bug fixes Enjoy! Atila Thanks! I have started using unit_threaded, and love it. The other day, I was thinking about how to run tests optimally. Not sure if you are doing this at the moment. For every test-run, you could record the time each individual test takes. You could then give two options for running the tests: 1) Fast tests first, to quickly see if things look ok 2) Slow tests first, trying to optimize total runtime Test-times would have to be recorded in a file between runs in order to achieve this. Would also be nice to print the time used by each test next to the tests. -Øivind In my case, unit tests are fast by definition. If I use unit-threaded for integration tests (which I've done), then those are in a separate package and I can just select which tests to run that way. If organising by package is too much hassle, you can tag tests now as well: @Tags("slow") unittest { ... } And then don't run those with the `~@slow` command-line option. Atila
Re: unit-threaded v0.6.26 - advanced unit testing in D with new features
On Saturday, 6 August 2016 at 10:34:52 UTC, Nicholas Wilson wrote: On Friday, 5 August 2016 at 15:31:34 UTC, Atila Neves wrote: https://code.dlang.org/packages/unit-threaded What's new: . Mocking support. Classes, interfaces and structs can be mocked (see README.md or examples) . Shrinking support for property-based testing, but only for integrals and arrays . Bug fixes Enjoy! Atila There is a typo in your readme int adder(int i, int j) { return i + j; } @("Test adder") unittest { > adder(2 + 3).shouldEqual(5); } @("Test adder fails", ShouldFail) unittest { adder(2 + 3).shouldEqual(7); } shouldBe (!) adder(2, 3) Thanks! I'll go fix it. Atila