Andrei Alexandrescu wrote:
Georg Wrede wrote:
Andrei Alexandrescu wrote:
Georg Wrede wrote:
Should I be able to
$ rdmd --eval='printf("Yay, rdmd!")'
Yah. For my money, I can't fathom working in D without rdmd.
You can't imagine the initial resistance... :-)
Now with --eval and passable regexes it's even better because I can
easily do tasks (from shell files) that would take longer in Perl.
That, and one could concentrate on one language. And Pride!! "We do it
with D!"
Since the current source uses the not-yet-released phobos, I wanted
to attach a binary so you can try it, but it's too big for the news
server.
Yup, I've been fighting and tweaking and compiling...
And the thought crossed my mind, too.
FYI, I just implemented caching of the executables generated by --eval.
They'll be kept around for 24 hours. It's pretty neat. On my laptop, the
first --eval='printf("Yay, rdmd!\n")' takes 0.34 seconds to compile and
run. Subsequent calls are under 0.1 (practically instant).
Just downloaded D 2.026 and tried rdmd. No eval?????
$ rdmd --help
Usage: rdmd [RDMD AND DMD OPTIONS]... program [PROGRAM OPTIONS]...
Builds (with dependents) and runs a D program.
Example: rdmd -release myprog --myprogparm 5
Any option to be passed to dmd must occur before the program name. In
addition
to dmd options, rdmd recognizes the following options:
--build-only just build the executable, don't run it
--chatty write dmd commands to stdout before executing them
--compiler=comp use the specified compiler (e.g. gdmd) instead of dmd
--dry-run do not compile, just show what commands would be run
(implies --chatty)
--force force a rebuild even if apparently not necessary
--help this message
--man open web browser on manual page
I'd *really* appreciate a --version switch. (Probably, instead of fancy
version numbers, either the repo version, and/or just plain compilation
date would be nice.) Currently, since the binary is packed, there is no
way to even peek at the strings in hopes of getting a clue....
It also seems to accept just any switch:
$ rdmd --bullcrap="bull crap"
Error: crap.d: No such file or directory
And from my bash dmd-wrapper log:
compiling /usr/local/digitalmars/dmd2026/linux/bin/dmd --bullcrap=bull
-v -o- crap.d
--------
I hope it's not just me...