February 03, 2006 Re: slashdot: beyond java ~ my bony white ass | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote: > kris wrote: > >> I hope you misunderstood me on that one ~ I didn't mean any commercial stuff that I might have personally (all my code is gratis too). Instead I meant using D as a recognized and valid alternative for C++/ObjectiveC/Java within the place where I work. I don't care much for those, so it would be nice to legitimally use D in the workplace instead. > > > No, I don't think I did... Just that I'm using Perl/PHP "commercially" > at the moment and don't have any non-hobby projects going, D-suitable. OK ... just clarifying :) > I've always found that companies make their decisions on non-technical > grounds, so maybe D just needs some better marketing. Or a new name :-) You know, a better name really might help :-) > Anyway, my vague point was that right now I am doing this for myself. > > Whether or not it (D) will become a legitimate option in the commercial sector is not something that I worry about. Seems to be all .NET anyway. Yeah. The .net thing is too bad ~ it has its place like every other tool, but the corporate view can be that it's a "garden of sweetness and light", guaranteed to whisk one's IT cares away with a comforting wisp of lemon scent. Or something like that. > But I would of course also *like* seeing D become a valid alternative ! > > --anders |
February 03, 2006 Re: slashdot: beyond java ~ my bony white ass | ||||
---|---|---|---|---|
| ||||
Posted in reply to kris | kris wrote: >> I've always found that companies make their decisions on non-technical >> grounds, so maybe D just needs some better marketing. Or a new name :-) > > You know, a better name really might help :-) I wasn't thinking "better". I was thinking something more shiny/sparkly. But we can't blame Walter for the name, he wanted something more spacey. > Yeah. The .net thing is too bad ~ it has its place like every other tool, but the corporate view can be that it's a "garden of sweetness and light", guaranteed to whisk one's IT cares away with a comforting wisp of lemon scent. Or something like that. Kinda reminds me of antoher big company. Write once, Run anywhere :-P D# would still be kewl, though. (Mono has the cross-platform covered) --anders |
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter a damn | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dave | "Dave" <Dave_member@pathlink.com> wrote in message news:druv9v$27p3$1@digitaldaemon.com... > To really make this work nicely, the compiler would have to ignore any > first > line starting with '#!' and would also (ideally) be able to take input > from > stdin. > > example: > > hello_script.d: > --------------- > #!/usr/bin/rdmd > import std.stdio; > int main() > { > writefln("Hello (pseudo) scripting world"); > } > > # chmod u+x hello_script.d > # hello_script.d Is that really all that's necessary to make this work, just ignore the first line with #! ? This is surely a wild idea. I like it. > (At any time it could be simply compiled and run, of course). > > Since the compiler is so fast, it's feasible for even larger 'script' > files (one > problem is that linking with gcc is a bottleneck for single files). True, the gcc linker is painfully slow. |
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter a damn | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dave | In article <druv9v$27p3$1@digitaldaemon.com>, Dave says... > [...] >I just built a small 'interpreter' that will take a D file prefaced with '#!/usr/bin/rdmd', compile it and run it. Nice! >To really make this work nicely, the compiler would have to ignore any first line starting with '#!' and would also (ideally) be able to take input from stdin. > >example: > >hello_script.d: >--------------- >#!/usr/bin/rdmd >import std.stdio; >int main() >{ >writefln("Hello (pseudo) scripting world"); >} > ># chmod u+x hello_script.d ># hello_script.d > >(At any time it could be simply compiled and run, of course). > >Since the compiler is so fast, it's feasible for even larger 'script' files (one problem is that linking with gcc is a bottleneck for single files). You can cache compilations using timestamps. The first time you compile the script and put the binary in some known directory. The second time you pick the cached executable file, if it's newer than the source, otherwise recompile. >Please excuse my babbling, but I think this is one area (small utilities initially) where D could catch on with people: "The power of C++, the speed of C and the convenience of Perl". <g> Indeed. Ciao http://www.mariottini.net/roberto/ |
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter a damn | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <drv7gb$2d4c$1@digitaldaemon.com>, Walter Bright says... > > >"Dave" <Dave_member@pathlink.com> wrote in message news:druv9v$27p3$1@digitaldaemon.com... >> To really make this work nicely, the compiler would have to ignore any >> first >> line starting with '#!' and would also (ideally) be able to take input >> from >> stdin. >> >> example: >> >> hello_script.d: >> --------------- >> #!/usr/bin/rdmd >> import std.stdio; >> int main() >> { >> writefln("Hello (pseudo) scripting world"); >> } >> >> # chmod u+x hello_script.d >> # hello_script.d > >Is that really all that's necessary to make this work, just ignore the first line with #! ? This is surely a wild idea. I like it. Yes Thomas |
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter a damn | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <drv7gb$2d4c$1@digitaldaemon.com>, Walter Bright says... > >> (At any time it could be simply compiled and run, of course). >> >> Since the compiler is so fast, it's feasible for even larger 'script' >> files (one >> problem is that linking with gcc is a bottleneck for single files). > >True, the gcc linker is painfully slow. > We had a similar conversation over on dsource.org regarding the implications of having a runtime linker via the DDL project. In theory, your "rdmd" app could simply take the intermediate output of the compiler (assuming a single script) and execute it directly. No gcc link needed. - Eric Anderton at yahoo |
February 03, 2006 [OT] Re: slashdot: beyond java ~ my bony white ass | ||||
---|---|---|---|---|
| ||||
Posted in reply to kris | In article <drv6ms$2ckk$1@digitaldaemon.com>, kris says... > >Yeah. The .net thing is too bad ~ it has its place like every other tool, but the corporate view can be that it's a "garden of sweetness and light", guaranteed to whisk one's IT cares away with a comforting wisp of lemon scent. Or something like that. > That explains why the last place I worked where .NET was the adopted new platform of choice (back in the .NET Beta-1 days), management had these wild expressions on their faces. Now I'm pretty much convinced that they must've been huffing the code samples and press releases. Good times. - Eric Anderton at yahoo |
February 03, 2006 Re: [OT] Re: slashdot: beyond java ~ my bony white ass | ||||
---|---|---|---|---|
| ||||
Posted in reply to pragma | pragma wrote:
> In article <drv6ms$2ckk$1@digitaldaemon.com>, kris says...
>> Yeah. The .net thing is too bad ~ it has its place like every other tool, but the corporate view can be that it's a "garden of sweetness and light", guaranteed to whisk one's IT cares away with a comforting wisp of lemon scent. Or something like that.
>
> That explains why the last place I worked where .NET was the adopted new
> platform of choice (back in the .NET Beta-1 days), management had these wild
> expressions on their faces. Now I'm pretty much convinced that they must've
> been huffing the code samples and press releases.
heh, same here pretty much. Microsoft passes it around and everyone smokes it, next thing you know management is insisting on a .NET initiative. Thank goodness I develop on Solaris.
Sean
|
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter | ||||
---|---|---|---|---|
| ||||
Posted in reply to kris | In article <drv4st$2bif$1@digitaldaemon.com>, kris says... > >Dave wrote: >> If D had a few more script-language like conveniences, then I think many C developers using shell or Perl for utilities would be impressed if they could replace both script and C with D.. > >On the face of it, trying to mix languages from the opposite ends of the spectrum sounds like dangerous ground :) > What's funny is that at my current and previous gigs (everything outside my workspace has to be ksh, Perl or C and the UNIX platform doesn't support D), I've found myself typing 'notepad foo.d' when I want a quick prototype of an algorithm or whatever that doesn't involve regex work. That's because D arrays, AA's, D strings and things like writefln and std.file.open() make it quicker to do some things than even Perl - at least in my case. I'd have a lot easier time convincing current and future co-workers of the same if some rudimentary search/replace regex stuff was built into the language, I think. Imagine demo'ing D (with built-in regex) to a bunch of Perl/C users on an overhead, and then running a few array and AA benchmarks... >[snip] >> To really make this work nicely, the compiler would have to ignore any first line starting with '#!' and would also (ideally) be able to take input from stdin. >> >> example: >> >> hello_script.d: >> --------------- >> #!/usr/bin/rdmd > >Egad! :) > >Is is possible hide that within a comment? > >[snip] > >> Please excuse my babbling, but I think this is one area (small utilities initially) where D could catch on with people: "The power of C++, the speed of C and the convenience of Perl". <g> > >And the eyes of a snake :) > >It sounds interesting; like a modern-day Rexx perhaps? Yet, though 'auto' is really nice, is it a match for the lax types and late-binding in a typical scripting environment? Isn't there perhaps some risk of creating a FrankenD? Or are you thinking of a much more restricted style of scripting? No changes to D except ignoring the first line of a program if the first two characters are '#!'. I personally can type 'int var', 'char[] var' or 'int[char[]] var' faster than that damn $var, @var or %var all over the place, when you factor in the extra time I spend having to go back and prepend [$@%] 1/2 the time <g> Alot of the Perl I've seen (in shops and even OSS) could often be almost as easily written in C (not the regex stuff of course), because it doesn't need Perl's 'dynamism'. > >Native regular-expressions in D have been visited a number of times, but I don't think anyone has come up with a really solid approach for it yet. There's the distinct possiblity of doing so via templates, but that perhaps wouldn't have the charm or simplicity of a scripting language? > Yes, I know and it's a tough nut to crack. I'm not sure if the DM regexp lib. strictly supports PCRE or PERE either, which may be a road-block. But if the requirements start out with basic search, replace and some form of paranthesized substring support, then I think that *could* be big (the old 80-20 rule). I haven't checked out Eric's compile-time regex stuff yet either, and I'm no regex expert by a long shot, I just get the feeling that there is a market in D 'bridging' the script / compiled gap as best a static compiled language can, because others don't. The whole idea is to encourage others to reach for D instead of either Perl or C for much of what they're doing. Bring the 'cost' (of using D for simple tasks) down and 'value' (adding native regex + all of D's other features) up until it meets a break-even. As soon as people start using D for 'throw-away' utilities, the market is ours (moohuhuhahahaha). >Then there's long unanswered questions about how to handle things like regex text-folding in unicode ~ toupper() et. al. just don't cut it anymore, and the rules can become really quite complex. Perhaps building all that into the language itself (rather than via a configurable library) ought to raise an eyebrow or two? I mention this because of a familiarity with ICU. > >After that, wouldn't one want to start building, say, the IO system directly into the language? Or is that stretching the concept? That would be too far <g> But I've been thinking about how to make it easier to just open up an editor and start knocking out D code for utility type programs. One very easy way would be to come up with 'profile imports'. For example: import std.script; This would publically include, say, std.stdio, std.file, std.string, std.regexp. import std.gui; // import the most often used parts of DWT when that's ready The -H option might even make the extra compile time overhead a break-even (Ha! I knew I'd squeek that in here somewhere <g>) - Dave |
February 03, 2006 Re: slashdot: beyond java ~ why your bony white asses don't matter a damn | ||||
---|---|---|---|---|
| ||||
Posted in reply to Roberto Mariottini | In article <drve1c$2it4$1@digitaldaemon.com>, Roberto Mariottini says... > >In article <druv9v$27p3$1@digitaldaemon.com>, Dave says... >> >[...] >>I just built a small 'interpreter' that will take a D file prefaced with '#!/usr/bin/rdmd', compile it and run it. > >Nice! > >>To really make this work nicely, the compiler would have to ignore any first line starting with '#!' and would also (ideally) be able to take input from stdin. >> >>example: >> >>hello_script.d: >>--------------- >>#!/usr/bin/rdmd >>import std.stdio; >>int main() >>{ >>writefln("Hello (pseudo) scripting world"); >>} >> >># chmod u+x hello_script.d >># hello_script.d >> >>(At any time it could be simply compiled and run, of course). >> >>Since the compiler is so fast, it's feasible for even larger 'script' files (one problem is that linking with gcc is a bottleneck for single files). > >You can cache compilations using timestamps. The first time you compile the script and put the binary in some known directory. The second time you pick the cached executable file, if it's newer than the source, otherwise recompile. > That was the next step, after I bring in the env for things like /usr/tmp, etc... <g> Once I figured out how the shell interprets '#!' it took about 1/2 hour to actually get something running. I'll persue it more since others seem to think it's a decent idea (that is, if my wife lets me 'play with my computer' over the weekend <g>). >>Please excuse my babbling, but I think this is one area (small utilities initially) where D could catch on with people: "The power of C++, the speed of C and the convenience of Perl". <g> > >Indeed. > >Ciao > >http://www.mariottini.net/roberto/ |
Copyright © 1999-2021 by the D Language Foundation