Re: fluent-asserts released

2017-04-18 Thread Szabo Bogdan via Digitalmars-d-announce

On Wednesday, 12 April 2017 at 06:22:26 UTC, Ali Çehreli wrote:

On 04/11/2017 11:01 PM, Szabo Bogdan wrote:


should.not.throwAnyException({
  throw new Exception("test");
});


what do you mean, they are not documented? there is a md file 
fith some

examples here:
https://github.com/gedaiu/fluent-asserts/blob/v0.3.0/api/exceptions.md

What do you think I can do to have the exception asserts to 
fit the style?


The expression comes first in the other use cases. The 
following is not very pretty but seems to work with my proof of 
concept below:


({
throw new Exception("test");
}()).should.not.throwAnyException();

I checked the syntax with the following code:

struct Should {
Should not() {
return this;
}

Should throwAnyException() {
return this;
}
}

Should should(E)(lazy E expr) {
return Should();
}

void main() {
({
throw new Exception("test");
}()).should.not.throwAnyException();
}

Ali


Hi!

I managed to make another update to the library.

http://fluentasserts.szabobogdan.com/

Based on your feedback I updated the exception asserts and I 
added some new ones

like `Between` and `Approximately`.

Also now it works with unit-threaded.

Thanks for the feedback!





Re: Cap'n Proto for D v0.1.2

2017-04-18 Thread Dmitry Olshansky via Digitalmars-d-announce

On 4/18/17 9:14 PM, Swoorup Joshi wrote:

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."

This is the initial public release of my optimized port of the Java
implementation of Cap'n Proto.

State:
* Passes Cap'n Proto testsuite.
* Optimized. Just a little slower than the official C++ implementation
(see benchmarks on github).
* Missing RPC part of Cap'n Proto.

http://code.dlang.org/packages/capnproto-dlang
https://github.com/ThomasBrixLarsen/capnproto-dlang


Java?? Yikes


Risking a flamewar but what's wrong with Java?

---
Dmitry Olshansky


Re: Cap'n Proto for D v0.1.2

2017-04-18 Thread Paolo Invernizzi 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."


This is the initial public release of my optimized port of the 
Java implementation of Cap'n Proto.


State:
* Passes Cap'n Proto testsuite.
* Optimized. Just a little slower than the official C++ 
implementation (see benchmarks on github).

* Missing RPC part of Cap'n Proto.

http://code.dlang.org/packages/capnproto-dlang
https://github.com/ThomasBrixLarsen/capnproto-dlang


Great Job!

I'm following Cap'n Proto, and it's very very interesting...
I would love also the RPC part, maybe based on Vibe... have you 
any plan to implement that?


I'm really curious to try it!

---
Paolo


Re: Cap'n Proto for D v0.1.2

2017-04-18 Thread Swoorup Joshi 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."


This is the initial public release of my optimized port of the 
Java implementation of Cap'n Proto.


State:
* Passes Cap'n Proto testsuite.
* Optimized. Just a little slower than the official C++ 
implementation (see benchmarks on github).

* Missing RPC part of Cap'n Proto.

http://code.dlang.org/packages/capnproto-dlang
https://github.com/ThomasBrixLarsen/capnproto-dlang


Java?? Yikes


Cap'n Proto for D v0.1.2

2017-04-18 Thread Thomas Brix Larsen via Digitalmars-d-announce
"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."


This is the initial public release of my optimized port of the 
Java implementation of Cap'n Proto.


State:
* Passes Cap'n Proto testsuite.
* Optimized. Just a little slower than the official C++ 
implementation (see benchmarks on github).

* Missing RPC part of Cap'n Proto.

http://code.dlang.org/packages/capnproto-dlang
https://github.com/ThomasBrixLarsen/capnproto-dlang



Re: Yu(玉) - 0.0.3 : A Dlang's Toolkit in My Used

2017-04-18 Thread Dsby via Digitalmars-d-announce

On Tuesday, 18 April 2017 at 09:24:39 UTC, Dsby wrote:

[...]


In github : https://github.com/dushibaiyu/yu
In dub : http://code.dlang.org/packages/yu


Yu(玉) - 0.0.3 : A Dlang's Toolkit in My Used

2017-04-18 Thread Dsby via Digitalmars-d-announce


algorithm
snowflkeId.d : Twitter's Snowflke ID generate 
algorithm.to generate only ID

container : the container base std.experimental.allocator
cirularqueue : Cirular Queue Struct Template.
vector : Like as C++'s std::vector
eventloop : the io(Net) event loop. support EPOLL, KQUEUE , 
IOCP.
asyncsocket : The async socket base std.scoket and 
yu.eventloop
client : the easy Use TCP client. Has time out and 
connect try, and mitil-client
server : the easy Use TCP server. Has Time out and auto 
close .

Acceptor : Tcp listen and accept
TCPClient : Base Tcp client
TCPSocket : Base TCP connection
UDPSocket : Base Udp connection
timer : Timer
eventlooptimer : the timer base yu.eventloop
timingwheeltimer : Time wheel algorithm . base 
std.experimental.allocator

memory
allictor : the yuAlloctor and easy make object base 
yuAlloctor. Base std.experimental.allocator

gc : gcFree to easy free the memory in GC
scopedref : the Unique Ptr/Ref like C++'s std::unique_ptr.
sharedref : the RC Ptr/Ref like C++'s std::shared_ptr
smartref : easy to create the scopedref and sharedref
array : Extend Phobos's std.array. IAppender base 
std.experimental.allocator

bytes : add find in byte or ubyte.
exception : Extend Phobos's std.exception.
functional : add bind use delegate.
string : Extend Phobos's std.string.
task : the task base std.experimental.allocator
thread : auto attach thread
traits : : Extend Phobos's std.traits.