Why Phobos is cool

Jordan Wilson wilsonjord at gmail.com
Mon Jul 6 20:47:36 UTC 2020


On Friday, 26 June 2020 at 05:39:59 UTC, H. S. Teoh wrote:
> On Fri, Jun 26, 2020 at 03:02:20AM +0000, Jordan Wilson via 
> Digitalmars-d wrote: [...]
>> [...]
> [...]
>
> These days, if you use a recent compiler, it's even easier:
>
> [...]

Just now I wanted to find the max value of a column in a text 
file, my thinking went "Excel? It'll take ages to load...I'll 
just google awk or something...hang on a minute, didn't I read 
somewhere about D oneliners?"

echo 'import std; void main() { 
File("emu.sift","r").byLine.map!(a => a.splitter(" 
").front.to!double).maxElement.writeln; }' | dmd -run -

Thanks!

Jordan


More information about the Digitalmars-d mailing list