Re: New library: open multi-methods

2017-07-17 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 18 July 2017 at 00:47:04 UTC, Jean-Louis Leroy wrote: I don't know R but after a trip to Wikipedia it looks like it. J-L R is listed as one of the languages with built-in support in this wiki link. I searched for multiple dispatch because I was familiar with the similar

Re: Release fluent-asserts 0.6.0

2017-07-07 Thread Jay Norwood via Digitalmars-d-announce
On Sunday, 2 July 2017 at 13:34:25 UTC, Szabo Bogdan wrote: Any feedback is appreciated. Thanks, Bogdan Hi, if you're just looking for other ideas, you might want to look at adding capabilities like in the java hamcrest matchers. You might also want to support regular expression matches

Re: Cap'n Proto for D v0.1.2

2017-04-19 Thread Jay Norwood via Digitalmars-d-announce
On Wednesday, 19 April 2017 at 16:52:14 UTC, Thomas Brix Larsen wrote: Take a look at FileDescriptor[1]. It is a class I've added to support read/write using File from std.stdio. You can create a similar streamer using std.mmfile. I believe that this would be enough for memory mapped reading.

Re: Cap'n Proto for D v0.1.2

2017-04-19 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 18 April 2017 at 18:09:54 UTC, Thomas Brix Larsen wrote: "Cap’n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster." The features below, from the capnproto.org description, interest

Re: 4x faster strlen with 4 char sentinel

2016-06-28 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 09:18:34 UTC, qznc wrote: Did you also compare to strlen from libc? I'd guess GNU libc uses a lot more tricks like vector instructions. I did test with the libc strlen, although the D libraries did not have a strlen for dchar or wchar. I'm currently using this for

Re: 4x faster strlen with 4 char sentinel

2016-06-28 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 09:31:46 UTC, Sebastiaan Koppe wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" Since no one is answering: It depends on the memory right before c. But if there is at least one 0 right before it - which is quite

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" oops. I see ... need to test for empty string. nothrow pure size_t

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" I'd say use this one instead, to avoid negative size_t. It is also a little faster for the same measurement. nothrow pure size_t

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 20:43:40 UTC, Ola Fosheim Grøstad wrote: Just keep in mind that the major bottleneck now is loading 64 bytes from memory into cache. So if you test performance you have to make sure to invalidate the caches before you test and test with spurious reads over a very

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 16:38:58 UTC, Ola Fosheim Grøstad wrote: Yes, and the idea of speeding up strings by padding out with zeros is not new. ;-) I recall suggesting it back in 1999 when discussing the benefits of having a big endian cpu when sorting strings. If it is big endian you can

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:31:49 UTC, Ola Fosheim Grøstad wrote: Besides there are plenty of other advantages to using a terminating sentinel depending on the use scenario. E.g. if you want many versions of the same tail or if you are splitting a string at white space (overwrite a white

Re: 4x faster strlen with 4 char sentinel

2016-06-26 Thread Jay Norwood via Digitalmars-d-announce
On Sunday, 26 June 2016 at 16:59:54 UTC, David Nadlinger wrote: Please keep general discussions like this off the announce list, which would e.g. be suitable for announcing a fleshed out collection of high-performance string handling routines. A couple of quick hints: - This is not a correct

4x faster strlen with 4 char sentinel

2016-06-26 Thread Jay Norwood via Digitalmars-d-announce
After watching Andre's sentinel thing, I'm playing with strlen on char strings with 4 terminating 0s instead of a single one. Seems to work and is 4x faster compared to the runtime version. nothrow pure size_t strlen2(const(char)* c) { if (c is null) return 0; size_t l=0; while (*c){

Re: SDLang-D v0.9.0

2015-03-16 Thread Jay Norwood via Digitalmars-d-announce
Very nice. I wonder about representation of references, and perhaps replication, inheritance. Does SDL just punt on those?

Re: D is for Data Science

2014-11-24 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 24 November 2014 at 15:27:19 UTC, Gary Willoughby wrote: Just browsing reddit and found this article posted about D. Written by Andrew Pascoe of AdRoll. From the article: The D programming language has quickly become our language of choice on the Data Science team for any task that

Re: D is for Data Science

2014-11-24 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 24 November 2014 at 23:32:14 UTC, Jay Norwood wrote: Is this related? https://github.com/dscience-developers/dscience This seems good too. Why the comments in the discussion about lack of libraries? https://github.com/kyllingstad/scid/wiki