Re: Scriptometer

2010-11-05 Thread spir
On Thu, 04 Nov 2010 17:13:12 -0400 bearophile wrote: > Thank you for your work. Even if such little programs look simple and > obvious, they aren't for a D newbie. I may even suggest to put them in the D > examples or in the D wiki, etc +++ Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir

Re: Scriptometer

2010-11-05 Thread spir
On Thu, 04 Nov 2010 21:52:04 +0100 Tomek Sowiński wrote: > Good idea. I must say it was fun writing "scripts" in D. They could use > community sandblasting before publishing. This list is a great source of D idioms for newcomers. Thank you very much (I'll keep it for reference.) Denis -- --

Re: Scriptometer

2010-11-04 Thread retard
Thu, 04 Nov 2010 21:32:14 -0400, bearophile wrote: > retard: > >> I should also mention that you can change all of these languages quite >> a bit with a special library crafted for this purpose. If you want to >> use D for bash style scripting, it's very possible to provide a clean >> set of shor

Re: Scriptometer

2010-11-04 Thread bearophile
retard: > I should also mention that you can change all of these languages quite a > bit with a special library crafted for this purpose. If you want to use D > for bash style scripting, it's very possible to provide a clean set of > shortcut methods and use method "chaining" (e.g. directory.fi

Re: Scriptometer

2010-11-04 Thread retard
Thu, 04 Nov 2010 23:09:47 +0100, Tomek Sowiński wrote: > Dnia 04-11-2010 o 22:13:12 bearophile > napisał(a): > >> But I suggest to not overdo it. Minimizing char count doesn't justify >> writing space-free programs. So I suggest to add spaces and newlines >> where they belong to increase readabi

Re: Scriptometer

2010-11-04 Thread Tomek Sowiński
Dnia 04-11-2010 o 22:13:12 bearophile napisał(a): But I suggest to not overdo it. Minimizing char count doesn't justify writing space-free programs. So I suggest to add spaces and newlines where they belong to increase readability a little. import std.stdio; void main(){writeln("Hello W

Re: Scriptometer

2010-11-04 Thread bearophile
Tomek S.: > Remember, the aim is to write > the smallest program possible, so optimize character count (contiguous > whitespaces count as 1). But I suggest to not overdo it. Minimizing char count doesn't justify writing space-free programs. So I suggest to add spaces and newlines where they

Re: Scriptometer

2010-11-04 Thread Tomek Sowiński
bearophile napisał(a): Nice page. I submitted some "scripts" so D will be featured on it. You may show them here too. Good idea. I must say it was fun writing "scripts" in D. They could use community sandblasting before publishing. Remember, the aim is to write the smallest program possib

Re: Scriptometer

2010-11-03 Thread Jesse Phillips
bearophile Wrote: > Lutger: > > > Here is a quick attempt: > > > > import std.file, std.regex; > > > > void main(string[] args) > > { > > args[1].write( args[1].readText().replace( regex("#.*", "g"), "") ); > > } > > It's cute. Compared to the Python version it doesn't work lazily (by line

Re: Scriptometer

2010-11-03 Thread bearophile
Lutger: > Here is a quick attempt: > > import std.file, std.regex; > > void main(string[] args) > { > args[1].write( args[1].readText().replace( regex("#.*", "g"), "") ); > } It's cute. Compared to the Python version it doesn't work lazily (by lines). I have tried on Windows that D program

Re: Scriptometer

2010-11-03 Thread Lutger
Tomek Sowiński wrote: > Dnia 03-11-2010 o 21:27:00 bearophile > napisał(a): > >> This is a comparison, how much good various languages are for scripting >> purposes: >> http://rigaux.org/language-study/scripting-language/ >> This test may be good both to see if there is something essential >> mi

Re: Scriptometer

2010-11-03 Thread bearophile
Tomek S.: > Nice page. I submitted some "scripts" so D will be featured on it. You may show them here too. > BTW, I was stuck on "sed in place" -- remove #-comments from a file > (modifying the file, i.e. in place): > http://rigaux.org/language-study/scripting-language/#sed_in_place > Any ide

Re: Scriptometer

2010-11-03 Thread Tomek Sowiński
Dnia 03-11-2010 o 21:27:00 bearophile napisał(a): This is a comparison, how much good various languages are for scripting purposes: http://rigaux.org/language-study/scripting-language/ This test may be good both to see if there is something essential missing in Phobos2 and to see how D2 i

Re: Scriptometer

2010-11-03 Thread Kagamin
Kagamin Wrote: > I remember llvm's configure script... Oh, no, not llvm's, but mingw's.

Re: Scriptometer

2010-11-03 Thread Kagamin
bearophile Wrote: > This is a comparison, how much good various languages are for scripting > purposes: > http://rigaux.org/language-study/scripting-language/ > > This test may be good both to see if there is something essential missing in > Phobos2 and to see how D2 is fit for those purposes (