Re: [your code here] HexViewer

2017-08-03 Thread Biotronic via Digitalmars-d
On Thursday, 3 August 2017 at 08:47:12 UTC, Martin Tschierschke wrote: Can you point me to the explanation of this: %(%02X %)%*s %s ? https://dlang.org/phobos/std_format.html Under "Example using array and nested array formatting:" writefln("My items are %(%s %).", [1,2,3]); So "%( %)" is

Re: [your code here] HexViewer

2017-08-03 Thread Martin Tschierschke via Digitalmars-d
On Thursday, 3 August 2017 at 08:47:12 UTC, Martin Tschierschke wrote: On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted

Re: [your code here] HexViewer

2017-08-03 Thread Martin Tschierschke via Digitalmars-d
On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted with writefln directly: void main(string[] args) { import

Re: [your code here] HexViewer

2017-08-02 Thread Andre Pany via Digitalmars-d
On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted with writefln directly: void main(string[] args) { import

Re: [your code here] HexViewer

2017-08-02 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 2 August 2017 at 22:02:49 UTC, Vladimir Panteleev wrote: On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! https://github.com/dlang/dlang.org/pull/1854

Re: [your code here] HexViewer

2017-08-02 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 2 August 2017 at 21:58:18 UTC, H. S. Teoh wrote: Whoa. This is cool and everything, but it also looks pretty intimidating for a newcomer to D. I'm not sure if we should put this on the front page! Perhaps we should make some examples only available if the user selects them

Re: [your code here] HexViewer

2017-08-02 Thread H. S. Teoh via Digitalmars-d
On Wed, Aug 02, 2017 at 09:59:23PM +, Vladimir Panteleev via Digitalmars-d wrote: > On Wednesday, 2 August 2017 at 19:39:18 UTC, Andre Pany wrote: > > This application opens the file passed as argument and display the > > content in hex and text format: > > Good idea! But I think it needs

Re: [your code here] HexViewer

2017-08-02 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 2 August 2017 at 21:59:23 UTC, Vladimir Panteleev wrote: Good idea! But I think it needs more ranges: The format call can be substituted with writefln directly: void main(string[] args) { import std.algorithm, std.format, std.stdio; enum cols = 16;

Re: [your code here] HexViewer

2017-08-02 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 2 August 2017 at 19:39:18 UTC, Andre Pany wrote: This application opens the file passed as argument and display the content in hex and text format: Good idea! But I think it needs more ranges: void main(string[] args) { import std.algorithm, std.format, std.stdio; enum

Re: [your code here] HexViewer

2017-08-02 Thread Steven Schveighoffer via Digitalmars-d
On 8/2/17 3:39 PM, Andre Pany wrote: This application opens the file passed as argument and display the content in hex and text format: 00 00 03 00 00 00 64 00 00 00 FF 56 01 00 00 70 ......d... V..p 02 00 FF A6 00 00 00 20 02 00 00 00 00 00 00 00. ยช... ... 00 00 00 00 00 00 00 00

Re: [your code here] HexViewer

2017-08-02 Thread Steven Schveighoffer via Digitalmars-d
On 8/2/17 5:27 PM, Nick B wrote: On Wednesday, 2 August 2017 at 19:39:18 UTC, Andre Pany wrote: This application opens the file passed as argument and display the content in hex and text format: Is this code in GitHub or DUB ? Is there a link ? Here is a link:

Re: [your code here] HexViewer

2017-08-02 Thread H. S. Teoh via Digitalmars-d
On Wed, Aug 02, 2017 at 09:27:07PM +, Nick B via Digitalmars-d wrote: > On Wednesday, 2 August 2017 at 19:39:18 UTC, Andre Pany wrote: > > This application opens the file passed as argument and display the > > content in hex and text format: > > > > Is this code in GitHub or DUB ? > Is there

Re: [your code here] HexViewer

2017-08-02 Thread Nick B via Digitalmars-d
On Wednesday, 2 August 2017 at 19:39:18 UTC, Andre Pany wrote: This application opens the file passed as argument and display the content in hex and text format: Is this code in GitHub or DUB ? Is there a link ? Nick