Why Phobos is cool
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Jul 9 16:26:09 UTC 2020
On Thu, Jul 09, 2020 at 03:58:19PM +0000, jmh530 via Digitalmars-d wrote:
> On Thursday, 9 July 2020 at 15:31:32 UTC, Petar Kirov [ZombineDev] wrote:
> > On Tuesday, 7 July 2020 at 22:29:36 UTC, H. S. Teoh wrote:
> > > [...]
> > >
> > > Awesome stuff!! We should collect a library of these one-liners,
> > > maybe on the wiki or something, that can serve as a useful
> > > reference. It can also be used to show off D's capabilities too.
> > >
> > >
> > > T
> >
> > dmd -run code.d | dmd -
>
> So that compiles and runs code.d and then passes the result to dmd to build?
Meaning, code.d generates D code that is run on the spot.
Here's another one: the most powerful one-line D program that ever
existed and will ever exist. It can do literally anything you tell it
do, and best of all, it doesn't even take up that much space. In fact,
it takes literally no disk space at all. All you have to do is to run
the following one-liner, and type in what you want it to do as D code,
and it will do it! How amazing is that???
cat | dmd -run -
:-P
T
--
Give me some fresh salted fish, please.
More information about the Digitalmars-d
mailing list