Re: The DConf Experience

2017-04-19 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 4/19/17 11:26 AM, Joakim wrote:


Nice post.  What's the occupancy like for the event so far? Seemed 
pretty full last year, wondering how many more can sign up this year.


There are still available seats. -- Andrei


Re: Cap'n Proto for D v0.1.2

2017-04-19 Thread Thomas Brix Larsen via Digitalmars-d-announce

On Wednesday, 19 April 2017 at 18:24:46 UTC, Jay Norwood wrote:

[...]

Ok, thanks. I took a look at several capnproto implementations 
just now, and didn't see any tests for a mmap 'feature'.  The 
roadmap doc below indicates it doesn't exist, and perhaps there 
are some details yet to be resolved to make it 'friendly' for a 
mmap.


But reading using random access *is* a feature of Cap'n Proto. So 
when reading a memory mapped Cap'n Proto file, getters will be 
faster if you use it in a non-sequential way.


The format of Cap'n Proto doesn't currently support *writing* to 
a memory mapped file.




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.


[1]: 
https://github.com/ThomasBrixLarsen/capnproto-dlang/blob/master/source/capnproto/FileDescriptor.d


Ok, thanks. I took a look at several capnproto implementations 
just now, and didn't see any tests for a mmap 'feature'.  The 
roadmap doc below indicates it doesn't exist, and perhaps there 
are some details yet to be resolved to make it 'friendly' for a 
mmap.


https://capnproto.org/roadmap.html

mmap-friendly mutable storage format: Define a standard storage 
format that is friendly to mmap-based use while allowing 
modification. (With the current serialization format, mmap is 
only useful for read-only structures.) Possibly based on the ORM 
interface, updates only possible at the granularity of a whole 
ORM entry.



In java the MappedByteBuffer can be used with a RandomAccessFile 
channel, and then the accesses of the loaded map can be random, 
without requiring sequential accesses of the whole mapped file. 
So java nio already has some higher level classes in place that 
would make it easier to develop a first implementation of the 
mmap features.




Re: Cap'n Proto for D v0.1.2

2017-04-19 Thread Thomas Brix Larsen via Digitalmars-d-announce

On Wednesday, 19 April 2017 at 16:34:02 UTC, Jay Norwood wrote:

[...]

This info from stackoverflow also seems to imply that 
MappedByteBuffer would be required for some of the capnproto 
features.  So, could you explain a little more about what are 
the capabilities of the current d library implementation, with 
just the ByteBuffer implemented from the java nio code?  
Thanks, Jay


[...]


The port of ByteBuffer just wraps a slice when reading in D.

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.


[1]: 
https://github.com/ThomasBrixLarsen/capnproto-dlang/blob/master/source/capnproto/FileDescriptor.d


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 
me.  However a MappedByteBuffer would be used for the mmap 
feature in java.


https://capnproto.org/

mmap: Read a large Cap’n Proto file by memory-mapping it. The OS 
won’t even read in the parts that you don’t access.


Inter-language communication: Calling C++ code from, say, Java or 
Python tends to be painful or slow. With Cap’n Proto, the two 
languages can easily operate on the same in-memory data structure.


Inter-process communication: Multiple processes running on the 
same machine can share a Cap’n Proto message via shared memory. 
No need to pipe data through the kernel. Calling another process 
can be just as fast and easy as calling another thread.


This info from stackoverflow also seems to imply that 
MappedByteBuffer would be required for some of the capnproto 
features.  So, could you explain a little more about what are the 
capabilities of the current d library implementation, with just 
the ByteBuffer implemented from the java nio code?  Thanks, Jay


http://stackoverflow.com/questions/29361058/read-proto-partly-instead-of-full-parsing-in-java

'If you are willing to consider using a different protocol 
framework, Cap'n Proto is extremely similar in design to 
Protobufs but features in the ability to read only the part of 
the message you care about. Cap'n Proto incurs no overhead for 
the fields you don't examine, other than obviously the bandwidth 
and memory to receive the raw message bytes. If you are reading 
from a file, and you use memory mapping (MappedByteBuffer in 
Java), then only the parts of the message you actually use will 
be read from disk.'








Re: The DConf Experience

2017-04-19 Thread Joakim via Digitalmars-d-announce

On Wednesday, 19 April 2017 at 13:03:23 UTC, Mike Parker wrote:
The registration deadline for DConf 2017 is just around the 
corner (this Sunday). As a fun way to remind you, a handful of 
past attendees have shared some anecdotes of their experiences.


I've personally attended two conferences and watched (portions 
of) two on livestream + IRC. If you've never been and haven't 
yet registered, I can't emphasize strongly enough how much more 
fun and rewarding it is to be there in person. If you've got 
the time and the means, just do it!


Blog:
http://dlang.org/blog/2017/04/19/the-dconf-experience/

Reddit:
https://www.reddit.com/r/d_language/


Nice post.  What's the occupancy like for the event so far?  
Seemed pretty full last year, wondering how many more can sign up 
this year.


Re: The DConf Experience

2017-04-19 Thread Mike Parker via Digitalmars-d-announce

On Wednesday, 19 April 2017 at 13:03:23 UTC, Mike Parker wrote:
The registration deadline for DConf 2017 is just around the 
corner (this Sunday). As a fun way to remind you, a handful of 
past attendees have shared some anecdotes of their experiences.


I've personally attended two conferences and watched (portions 
of) two on livestream + IRC. If you've never been and haven't 
yet registered, I can't emphasize strongly enough how much more 
fun and rewarding it is to be there in person. If you've got 
the time and the means, just do it!


Blog:
http://dlang.org/blog/2017/04/19/the-dconf-experience/

Reddit:
https://www.reddit.com/r/d_language/


And also:

https://www.reddit.com/r/programming/comments/66adnz/the_dconf_experience/


The DConf Experience

2017-04-19 Thread Mike Parker via Digitalmars-d-announce
The registration deadline for DConf 2017 is just around the 
corner (this Sunday). As a fun way to remind you, a handful of 
past attendees have shared some anecdotes of their experiences.


I've personally attended two conferences and watched (portions 
of) two on livestream + IRC. If you've never been and haven't yet 
registered, I can't emphasize strongly enough how much more fun 
and rewarding it is to be there in person. If you've got the time 
and the means, just do it!


Blog:
http://dlang.org/blog/2017/04/19/the-dconf-experience/

Reddit:
https://www.reddit.com/r/d_language/


Re: Cap'n Proto for D v0.1.2

2017-04-19 Thread Jacob Carlborg via Digitalmars-d-announce

On 2017-04-18 23:08, Dmitry Olshansky wrote:


Risking a flamewar but what's wrong with Java?


I don't like any language that force me to write in a particular style 
or paradigm. Because all problems cannot be solved (or not in a good 
way) in the same way. That said, my D code is quite heavily influenced 
by Java.


--
/Jacob Carlborg