www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Bin2d (0.2.0) Rewrite

reply Rikki Cattermole <alphaglosined gmail.com> writes:
So Bin2D[0] has been rewritten and adds a bunch of nice new features.

- Limit generated code by:
   - package modifier
   - ``version(unittest)``
- Use enum for usage at compile time, instead of ``const(ubyte[])``
- Report with variable name to original filename

Only dependency is Phobos.
The rewrite adds most importantly usage of e.g. byChunk over the input 
files to limit the amount of memory used.

[0] https://github.com/rikkimax/bin2d
Jul 23 2015
parent reply "Suliman" <evermind live.ru> writes:
On Thursday, 23 July 2015 at 10:15:17 UTC, Rikki Cattermole wrote:
 So Bin2D[0] has been rewritten and adds a bunch of nice new 
 features.

 - Limit generated code by:
   - package modifier
   - ``version(unittest)``
 - Use enum for usage at compile time, instead of 
 ``const(ubyte[])``
 - Report with variable name to original filename

 Only dependency is Phobos.
 The rewrite adds most importantly usage of e.g. byChunk over 
 the input files to limit the amount of memory used.

 [0] https://github.com/rikkimax/bin2d
Cool! Could you add example of usage in readme?
Jul 23 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 23/07/2015 11:56 p.m., Suliman wrote:
 On Thursday, 23 July 2015 at 10:15:17 UTC, Rikki Cattermole wrote:
 So Bin2D[0] has been rewritten and adds a bunch of nice new features.

 - Limit generated code by:
   - package modifier
   - ``version(unittest)``
 - Use enum for usage at compile time, instead of ``const(ubyte[])``
 - Report with variable name to original filename

 Only dependency is Phobos.
 The rewrite adds most importantly usage of e.g. byChunk over the input
 files to limit the amount of memory used.

 [0] https://github.com/rikkimax/bin2d
Cool! Could you add example of usage in readme?
There is already a pretty basic example in it. Anything specific in mind?
Jul 23 2015
next sibling parent "Taylor Hillegeist" <taylorh140 gmail.com> writes:
On Thursday, 23 July 2015 at 12:07:21 UTC, Rikki Cattermole wrote:
 On 23/07/2015 11:56 p.m., Suliman wrote:
 On Thursday, 23 July 2015 at 10:15:17 UTC, Rikki Cattermole 
 wrote:
 So Bin2D[0] has been rewritten and adds a bunch of nice new 
 features.

 - Limit generated code by:
   - package modifier
   - ``version(unittest)``
 - Use enum for usage at compile time, instead of 
 ``const(ubyte[])``
 - Report with variable name to original filename

 Only dependency is Phobos.
 The rewrite adds most importantly usage of e.g. byChunk over 
 the input
 files to limit the amount of memory used.

 [0] https://github.com/rikkimax/bin2d
Cool! Could you add example of usage in readme?
There is already a pretty basic example in it. Anything specific in mind?
To be honest it took me a bit to realize what it was. A Command line application that produces a d modules which represent/store those files. The example is great but it could also use a bit more generic outline Bin2d MODULENAME.d=Resource_Reference FILE1_PATH [FILE2_PATH ...] I'm not sure how its usually done. Also even though its not necessary its always nice to have an example that will compile. It also adds some context. MAIN.d ------------------- import std.stdio; import Resource_Reference; void main() { string[] FILE_LOCATIONS = outputFilesToFileSystem(); FILE_LOCATIONS.each!writeln(); } ------------------- compile With dmd MAIN.d MODULENAME.d Actually this didn't work for me... maybe I'm misinterpreting something.
Jul 23 2015
prev sibling parent "Suliman" <evermind live.ru> writes:
 There is already a pretty basic example in it.
 Anything specific in mind?
How to get access to file after it's was build in executable?
Jul 23 2015