www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D on Slashdot

reply "Kiith-Sa" <kiithsacmp gmail.com> writes:
http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanon&utm_medium=feed
Jan 20 2015
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 00:11:46 UTC, Kiith-Sa wrote:
 http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanon&utm_medium=feed
I said this earlier on reddit too, but I think it is a bit too narrow to look for jobs that directly use D as a measure. Don't get me wrong, it'd be nice if there were more, but I actually got a couple out-of-the-blue job offers over the last month explicitly due to my experience with D - they saw it as a good indicator. Now, imagine if a bunch of companies are hiring people with D experience... it is just a matter of time before D users are in decision-making positions... But even if that doesn't come to pass, these are hiring people who recognize the name D and see some value in candidates who know it, even if it just shows ongoing professional development. Not a bad thing!
Jan 20 2015
parent reply "Joakim" <dlang joakim.fea.st> writes:
On Wednesday, 21 January 2015 at 00:33:00 UTC, Adam D. Ruppe 
wrote:
 On Wednesday, 21 January 2015 at 00:11:46 UTC, Kiith-Sa wrote:
 http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanon&utm_medium=feed
I said this earlier on reddit too, but I think it is a bit too narrow to look for jobs that directly use D as a measure. Don't get me wrong, it'd be nice if there were more, but I actually got a couple out-of-the-blue job offers over the last month explicitly due to my experience with D - they saw it as a good indicator. Now, imagine if a bunch of companies are hiring people with D experience... it is just a matter of time before D users are in decision-making positions... But even if that doesn't come to pass, these are hiring people who recognize the name D and see some value in candidates who know it, even if it just shows ongoing professional development. Not a bad thing!
What's interesting is that the original linked article was written by a blogger at dice.com, a long-standing job search website: http://news.dice.com/2015/01/20/state-d-2015/ A nice overview of the current D situation by David Bolton- not the usual filler you see from non-technical authors as he specifically mentions the GC, dub, modules, etc. and details about how they work- D can only hope for more such appreciative and nuanced coverage.
Jan 20 2015
parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 04:45:23 UTC, Joakim wrote:
 A nice overview of the current D situation by David Bolton- not 
 the usual filler you see from non-technical authors as he 
 specifically mentions the GC, dub, modules, etc. and details 
 about how they work- D can only hope for more such appreciative 
 and nuanced coverage.
Aye.
Jan 21 2015
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Kiith-Sa:

 http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanon&utm_medium=feed
One interesting comment: http://developers.slashdot.org/comments.pl?sid=6771453&cid=48860193
That's the funny thing about languages like D or Go or Rust that 
try to replace C. C programmers don't use them. If they get any 
adoption its from elsewhere (rust seems to be hyped by haskell 
and rubes, Go by pythonistas)<
Bye, bearophile
Jan 20 2015
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 00:51:29 UTC, bearophile wrote:
That's the funny thing about languages like D or Go or Rust 
that try to replace C. C programmers don't use them. If they 
get any adoption its from elsewhere (rust seems to be hyped by 
haskell and rubes, Go by pythonistas)<
That's because once you replace C, you aren't a "C programmer" anymore. I mean, sure, I can still write C as well as the next guy and indeed do from time to time, so I guess technically I'm still a C programmer... but the majority of things I would have used C for eight years ago are written in D now.
Jan 20 2015
prev sibling parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 00:51:26 +0000
bearophile via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 Kiith-Sa:
=20
 http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrate=
d-programming-language?utm_source=3Drss1.0mainlinkanon&utm_medium=3Dfeed
=20
 One interesting comment:
 http://developers.slashdot.org/comments.pl?sid=3D6771453&cid=3D48860193
=20
That's the funny thing about languages like D or Go or Rust that=20
try to replace C. C programmers don't use them. If they get any=20
adoption its from elsewhere (rust seems to be hyped by haskell=20
and rubes, Go by pythonistas)<
hm. i'm a C programmer. i'm using D now -- to the extent that i spent two days making dmd.exe work with Wine to write the simple utility which i can write in two hours using MinGW cross-compiler. actually, my first look at D was exactly 'cause it's C-like enough that i feel myself almost at home, yet it has features i really want and don't have in C (metaprogramming rocks!). and even with all my recent frustration i'd better keep going with D than return to C.
Jan 20 2015
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 01:04:11 UTC, ketmar via 
Digitalmars-d wrote:
 two days making dmd.exe work with Wine to write the simple 
 utility which i can write in two hours using MinGW 
 cross-compiler.
I've been using dmd with wine for a long time... I find it sometimes seems to deadlock, but when it does, I just ctrl+c and run it again. Mildly annoying but not a showstopper.
Jan 20 2015
next sibling parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 01:07:03 +0000
"Adam D. Ruppe via Digitalmars-d" <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 01:04:11 UTC, ketmar via=20
 Digitalmars-d wrote:
 two days making dmd.exe work with Wine to write the simple=20
 utility which i can write in two hours using MinGW=20
 cross-compiler.
=20 I've been using dmd with wine for a long time... I find it=20 sometimes seems to deadlock, but when it does, I just ctrl+c and=20 run it again. Mildly annoying but not a showstopper.
for me it segfaults constantly. being unable to debug it i first made it compilable with MinGW, and then found that root/async.c is... well, the root of all problems. i don't even want to know how it works and what it tries to accelerate; there is non-threaded version there, so i just made my build use it and WOW! no more crashes. the most painful task was to build the working dmd.exe with mingw. to be honest, i first tried to build it with visual studio, thinking that it's something that dmc does wrong, and that alone took me half of a day (vs build scripts aren't working, so i have to struggle with that too in additional to vs itself). then i took a false start and wasted another day. and then i stopped before trying to turn dmd into cross-compiler. ;-)
Jan 20 2015
parent reply "Vlad Levenfeld" <vlevenfeld gmail.com> writes:
On Wednesday, 21 January 2015 at 01:24:35 UTC, ketmar via 
Digitalmars-d wrote:
 On Wed, 21 Jan 2015 01:07:03 +0000
 "Adam D. Ruppe via Digitalmars-d" <digitalmars-d puremagic.com> 
 wrote:

 On Wednesday, 21 January 2015 at 01:04:11 UTC, ketmar via 
 Digitalmars-d wrote:
 two days making dmd.exe work with Wine to write the simple 
 utility which i can write in two hours using MinGW 
 cross-compiler.
I've been using dmd with wine for a long time... I find it sometimes seems to deadlock, but when it does, I just ctrl+c and run it again. Mildly annoying but not a showstopper.
for me it segfaults constantly. being unable to debug it i first made it compilable with MinGW, and then found that root/async.c is... well, the root of all problems. i don't even want to know how it works and what it tries to accelerate; there is non-threaded version there, so i just made my build use it and WOW! no more crashes. the most painful task was to build the working dmd.exe with mingw. to be honest, i first tried to build it with visual studio, thinking that it's something that dmc does wrong, and that alone took me half of a day (vs build scripts aren't working, so i have to struggle with that too in additional to vs itself). then i took a false start and wasted another day. and then i stopped before trying to turn dmd into cross-compiler. ;-)
I had some nice experiment control/visualization software in D that was making good impressions (not that physicists really care about programming languages, but it ran fast, had a pleasant syntax and I could safely make major reconfigurations in really short timespans, which made people notice) but ran into a nasty bug in some National Instruments drivers for Linux (which NI doesn't appear to be too interested in fixing) and then wasn't able to build DMD git-head on 64-bit Windows 7 after a couple of weeks of trying. It was like a slow-motion train wreck. So now I use LabView and hate everything about it.
Jan 20 2015
parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 01:44:07 +0000
Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> wrote:

i can see how this thread slowly turning into "how i was forced to live
with windows and how painful it was" thread. ;-)
Jan 20 2015
next sibling parent reply "Vlad Levenfeld" <vlevenfeld gmail.com> writes:
On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via 
Digitalmars-d wrote:
 On Wed, 21 Jan 2015 01:44:07 +0000
 Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> 
 wrote:

 i can see how this thread slowly turning into "how i was forced 
 to live
 with windows and how painful it was" thread. ;-)
Well misery loves company, and right now MS & NI are the two companies making me miserable :)
Jan 20 2015
next sibling parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Wed, Jan 21, 2015 at 01:56:32AM +0000, Vlad Levenfeld via Digitalmars-d
wrote:
 On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d
 wrote:
On Wed, 21 Jan 2015 01:44:07 +0000
Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> wrote:

i can see how this thread slowly turning into "how i was forced to
live with windows and how painful it was" thread. ;-)
Well misery loves company, and right now MS & NI are the two companies making me miserable :)
I left the MS world after DOS stopped being viable (I have always hated Windows) more than a decade ago, and have never looked back since. Every now and then I'm forced to use Windows (or worse yet, asked to diagnose/fix problems on my wife's Windows laptop), and I hate every second of it. :-P Luckily, putty[1] alleviates some of the pain. :-) [1] http://www.chiark.greenend.org.uk/~sgtatham/putty/ T -- If it tastes good, it's probably bad for you.
Jan 20 2015
prev sibling next sibling parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 20 Jan 2015 18:06:59 -0800
"H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> wrote:

 On Wed, Jan 21, 2015 at 01:56:32AM +0000, Vlad Levenfeld via Digitalmars-=
d wrote:
 On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d
 wrote:
On Wed, 21 Jan 2015 01:44:07 +0000
Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> wrote:

i can see how this thread slowly turning into "how i was forced to
live with windows and how painful it was" thread. ;-)
=20 Well misery loves company, and right now MS & NI are the two companies making me miserable :)
=20 I left the MS world after DOS stopped being viable (I have always hated Windows) more than a decade ago, and have never looked back since. Every now and then I'm forced to use Windows (or worse yet, asked to diagnose/fix problems on my wife's Windows laptop), and I hate every second of it. :-P Luckily, putty[1] alleviates some of the pain. :-) =20 [1] http://www.chiark.greenend.org.uk/~sgtatham/putty/
and you know what is the most frustrating thing in windows for me? it's the fact that when i'm using console, i must hit ESC only once! ;-) i must confess that i was heavy windows user and windows programmer 'till 2002 (or something, i don't remember the exact date). i've seen some *nix systems before, i even knew how to quit vi, but was never using *nix OS as my primary one. and then i was forced to move to GNU/Linux, 'cause my employer was not able to buy enough windows licenses, and someone decides that it's time to throw windows out of the window. ;-) and now i can't understand anymore why i was happy with windows. i really love my terminal and all the power *nix utilities gave me! ;-)
Jan 20 2015
parent reply "Kagamin" <spam here.lot> writes:
On Wednesday, 21 January 2015 at 02:23:03 UTC, ketmar via 
Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
 and now i can't understand anymore why i was happy with 
 windows. i
 really love my terminal and all the power *nix utilities gave 
 me! ;-)
BTW, is there a way to make the shell autocomplete file names completely instead of partially? And in quotes: escaped paths are ugly. And autocomplete an empty string too whether it's after a slash or alone.
Jan 20 2015
parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 07:56:47 +0000
Kagamin via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 02:23:03 UTC, ketmar via=20
 Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
nope! it beeps. ;-)
 BTW, is there a way to make the shell autocomplete file names=20
 completely instead of partially?
huh? shell is completing file name to the first ambiguous char. if you have files with names "abdu" and "abde", it will autocomplete to "abd". just hit tab again to see the list of variants. as shell can't do telepathy yet, you must help it by resolving ambiguity. you can also consider using zsh, which will not only show you the list of files, but will allow you to select the file you want from that list with arrows. it also can autocomplete things like '/u/lo/sha/' to '/usr/local/share' in one hit.
 And in quotes
quotes are used for preventing autocompletion. ;-)
 escaped paths are ugly.
just don't use paths that needs escaping. ;-)
 And autocomplete an empty string too whether it's after a=20
 slash or alone.
sorry, i can't understand you here.
Jan 21 2015
parent reply "Kagamin" <spam here.lot> writes:
On Wednesday, 21 January 2015 at 08:19:39 UTC, ketmar via 
Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
nope! it beeps. ;-)
Duh! Don't console programs know, what ctrl-c is for?
 BTW, is there a way to make the shell autocomplete file names 
 completely instead of partially?
huh? shell is completing file name to the first ambiguous char. if you have files with names "abdu" and "abde", it will autocomplete to "abd". just hit tab again to see the list of variants. as shell can't do telepathy yet, you must help it by resolving ambiguity.
Windows console does it elegantly without telepathy: it rolls through the list of ambiguous names.
 And in quotes
quotes are used for preventing autocompletion. ;-)
AFAIK quotes are supposed to treat a string with spaces as a single argument. I don't see, how this is related to autocompletion.
 escaped paths are ugly.
just don't use paths that needs escaping. ;-)
OK, but that's a weak excuse for an ugly interface. In my experience quotes work just fine in place of escaping.
 And autocomplete an empty string too whether it's after a 
 slash or alone.
sorry, i can't understand you here.
I mean autocomplete without typing a single character. The system may have no way to type some characters, rolling autocompletion really helps in this case. It was quite daunting to see a basic operation of getting a file name so quirky and ugly.
Jan 21 2015
next sibling parent reply "Mathias LANG" <geod24 gmail.com> writes:
On Wednesday, 21 January 2015 at 08:56:54 UTC, Kagamin wrote:
 [...]

 Windows console does it elegantly without telepathy: it rolls 
 through the list of ambiguous names.
Personally I use http://grml.org/zsh/. It's available as an ArchLinux package. It's also the default shell config for the installer, and it's a really, really neat out-of-the-box config.
Jan 21 2015
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 1/21/15 1:31 AM, Mathias LANG wrote:
 On Wednesday, 21 January 2015 at 08:56:54 UTC, Kagamin wrote:
 [...]

 Windows console does it elegantly without telepathy: it rolls through
 the list of ambiguous names.
Personally I use http://grml.org/zsh/. It's available as an ArchLinux package. It's also the default shell config for the installer, and it's a really, really neat out-of-the-box config.
Love the zsh. -- Andrei
Jan 21 2015
prev sibling parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 08:56:53 +0000
Kagamin via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 08:19:39 UTC, ketmar via=20
 Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
nope! it beeps. ;-)
Duh! Don't console programs know, what ctrl-c is for?
somehow i can't close cmd.exe by hitting ctrl+c. don't console programs know what ctrl+c is for?
 Windows console does it elegantly without telepathy: it rolls=20
 through the list of ambiguous names.
this is the worst thing one can do with autocompletion. there is no single visual clue about where it hit the wall. it just continues to spit some filenames when i press "tab", replacing the current one. shit! is it broken or what?
 And in quotes
quotes are used for preventing autocompletion. ;-)
=20 AFAIK quotes are supposed to treat a string with spaces as a=20 single argument. I don't see, how this is related to=20 autocompletion.
nope. you are wrong. quotes mark "literal values". there is no sense to autocomplete literals, as they essentially not filenames. they are *literals*.
 escaped paths are ugly.
just don't use paths that needs escaping. ;-)
OK, but that's a weak excuse for an ugly interface. In my=20 experience quotes work just fine in place of escaping.
using a wrong thing to do something may be handy, but this is still using a wrong thing.
 And autocomplete an empty string too whether it's after a=20
 slash or alone.
sorry, i can't understand you here.
=20 I mean autocomplete without typing a single character. The system=20 may have no way to type some characters, rolling autocompletion=20 really helps in this case.
how can you autocomplete without typing? what awkward UI does that and why?
 It was quite daunting to see a basic operation of getting a file=20
 name so quirky and ugly.
exactly! that's why i'm installing cygwin on any windows box i plan to use for a long time: i just can't live with windows' shitty "shell".
Jan 21 2015
parent reply "Kagamin" <spam here.lot> writes:
On Wednesday, 21 January 2015 at 16:34:26 UTC, ketmar via 
Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
nope! it beeps. ;-)
Duh! Don't console programs know, what ctrl-c is for?
somehow i can't close cmd.exe by hitting ctrl+c. don't console programs know what ctrl+c is for?
Well, maybe because it's a shell, not a utility?
 Windows console does it elegantly without telepathy: it rolls 
 through the list of ambiguous names.
this is the worst thing one can do with autocompletion. there is no single visual clue about where it hit the wall. it just continues to spit some filenames when i press "tab", replacing the current one. shit! is it broken or what?
It fills in file names which match what you typed, this is exactly what autocompletion is for. What's so difficult to understand there?
 And in quotes
quotes are used for preventing autocompletion. ;-)
AFAIK quotes are supposed to treat a string with spaces as a single argument. I don't see, how this is related to autocompletion.
nope. you are wrong. quotes mark "literal values". there is no sense to autocomplete literals, as they essentially not filenames. they are *literals*.
Literal means just a value typed in directly instead of being taken from a variable, that's all to it. If you really don't want to autocomplete quoted literals, just don't do it, shouldn't be difficult, after all, unquoted literals may be not meant to be autocompleted either, so there should be no difference.
 escaped paths are ugly.
just don't use paths that needs escaping. ;-)
OK, but that's a weak excuse for an ugly interface. In my experience quotes work just fine in place of escaping.
using a wrong thing to do something may be handy, but this is still using a wrong thing.
Bash docs indicate escaping and quoting serve the same purpose with different syntax: http://man7.org/linux/man-pages/man1/bash.1.html#QUOTING
Quoting is used to remove the special meaning of certain 
characters
or words to the shell.  Quoting can be used to disable special
treatment for special characters, to prevent reserved words from
being recognized as such, and to prevent parameter expansion.
There are three quoting mechanisms: the escape character, single
quotes, and double quotes.
A non-quoted backslash (\) is the escape character.  It 
preserves the
literal value of the next character that follows, with the 
exception
So yeah, escaping is for literals too, if you like them so much. And not a single word about file names and changing meaning of a literal, you made it up. If you care about linux, learn it, ignorance won't do you any good.
 I mean autocomplete without typing a single character. The 
 system may have no way to type some characters, rolling 
 autocompletion really helps in this case.
how can you autocomplete without typing?
As usual - by putting a file name from ambiguity list, which consists of all files in the current directory in this case.
 what awkward UI does that and why?
As I explained, the file can start with a difficult to type character, requiring to type it is unnecessarily daunting.
Jan 22 2015
parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thu, 22 Jan 2015 08:29:57 +0000
Kagamin via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 16:34:26 UTC, ketmar via=20
 Digitalmars-d wrote:
 i even knew how to quit vi
ctrl-c?
nope! it beeps. ;-)
Duh! Don't console programs know, what ctrl-c is for?
somehow i can't close cmd.exe by hitting ctrl+c. don't console=20 programs know what ctrl+c is for?
Well, maybe because it's a shell, not a utility?
shell is a console utility. strangely, ctrl+c is not working in FAR too. it's not a shell. it's obvious console.
 It fills in file names which match what you typed, this is=20
 exactly what autocompletion is for. What's so difficult to=20
 understand there?
it's difficult to understand how it does thelepaty. from my expiriense, it's thelepaty is completely wrong each time. and with putting the whole filename i don't even know where was ambiguty (and if it was at all). so "afjgjoe" means, that this is the only match, or there are more matches? nobody knows, until he hits tab again. and then he lost his "afjgjoe" and have to either tabbing furiously to get it back, or type it manually. perfectly unusable "autocompletion". i must tell you that all my built-in command consoles were using this scheme for years, so i have alot of expirience with it. now i dropped it, 'cause it's usability sux.
 Literal means just a value typed in directly instead of being=20
 taken from a variable, that's all to it.
good luck redefining what the shell does from the times when "windows" was a term from housebuilding.
 So yeah, escaping is for literals too, if you like them so much.=20
 And not a single word about file names and changing meaning of a=20
 literal, you made it up. If you care about linux, learn it,=20
 ignorance won't do you any good.
*i* have *no* problems using *nix shells. with all my ignorance and flawed understanding. maybe that's 'cause i know how it was intended to work, and it indeed works that way? you know what? *i* don't have to read any documentation to understand why autocompletion on quoted strings is not working. and *you* have troubles to understand it even with documentation. isn't it strange? i was trying to explain you what's going on. ah, ok, good luck arguing with machine code, telling it that it must do not what it do.
 I mean autocomplete without typing a single character. The=20
 system may have no way to type some characters, rolling=20
 autocompletion really helps in this case.
how can you autocomplete without typing?
=20 As usual - by putting a file name from ambiguity list, which=20 consists of all files in the current directory in this case. =20
 what awkward UI does that and why?
=20 As I explained, the file can start with a difficult to type=20 character, requiring to type it is unnecessarily daunting.
and you know what? if you hit tab twice on empty line in bash, you'll eventually see something like this: Display all 4788 possibilities? (y or n) good luck browsing thru that.
Jan 22 2015
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
BTW you should try the terminal.getline function in my 
terminal.d. It is fairly new, my own reimplementation of an 
editable getline with history and completion based on the history.

One of the things mine does is show a bit of suggestion of it is 
unambiguous and also if you hit tab twice, it colors in what 
you've already written. So like:

$ foo<tab>
foobar
foobaz

There, it would auto fill the ba and color "fooba". Then it is 
easy to see the next key to continue is either r or z.

I wonder if gnu getline can do that too, in a list with long 
commands, it is hard to tell where the ambiguity actually is.

Of course, eventually I'll write my own shell with my own 
completion function! terminal.d is slowly getting there.
Jan 22 2015
next sibling parent zeljkog <zeljkog home.com> writes:
On 22.01.15 17:27, Adam D. Ruppe wrote:
 Of course, eventually I'll write my own shell with my own completion
 function! terminal.d is slowly getting there.
I'm used to editor. Execute current line - skip comment tags (keyboard shortcut) is all I need.
Jan 22 2015
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 1/22/15 8:27 AM, Adam D. Ruppe wrote:
 BTW you should try the terminal.getline function in my terminal.d. It is
 fairly new, my own reimplementation of an editable getline with history
 and completion based on the history.

 One of the things mine does is show a bit of suggestion of it is
 unambiguous and also if you hit tab twice, it colors in what you've
 already written. So like:

 $ foo<tab>
 foobar
 foobaz

 There, it would auto fill the ba and color "fooba". Then it is easy to
 see the next key to continue is either r or z.

 I wonder if gnu getline can do that too, in a list with long commands,
 it is hard to tell where the ambiguity actually is.

 Of course, eventually I'll write my own shell with my own completion
 function! terminal.d is slowly getting there.
Cool! Is it on dub yet? -- Andrei
Jan 22 2015
parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Thursday, 22 January 2015 at 19:13:08 UTC, Andrei Alexandrescu 
wrote:
 Cool! Is it on dub yet? -- Andrei
Actually, I think it is: Robik has a stable fork here: https://github.com/robik/consoled http://code.dlang.org/search?q=consoled contains his simpler api in the console thing and my harder to use, but more comprehensive I/O thing in terminal.d. Was updated recently so it should include the new getline function. But as I've said before, I don't personally use dub and have no desire to, especially for these independent modules, it just adds way too much overhead for me (I think package managers in general tend to suck). I'll help with other people's packages but I don't do it myself.
Jan 22 2015
prev sibling parent reply "Kagamin" <spam here.lot> writes:
On Thursday, 22 January 2015 at 16:13:31 UTC, ketmar wrote:
 somehow i can't close cmd.exe by hitting ctrl+c. don't 
 console programs
 know what ctrl+c is for?
Well, maybe because it's a shell, not a utility?
shell is a console utility.
Hmm... shell is a user interface providing access to the system and utilities. It's different from user utilities in that it's a system component, making the whole thing usable at all. It shouldn't terminate conventionally, because then the user remains without access to the system, that's why console shell doesn't terminate on ctrl-c and GUI shell doesn't terminate on alt-f4. But a text editor should definitely terminate in a conventional manner.
 strangely, ctrl+c is not working in FAR too. it's not a shell. 
 it's obvious console.
Maybe they just don't give a shit about it? Or they see it as a shell. Truth be told, FAR has a quit button at the bottom.
 It fills in file names which match what you typed, this is 
 exactly what autocompletion is for. What's so difficult to 
 understand there?
it's difficult to understand how it does thelepaty. from my expiriense, it's thelepaty is completely wrong each time. and with putting the whole filename i don't even know where was ambiguty (and if it was at all). so "afjgjoe" means, that this is the only match, or there are more matches? nobody knows, until he hits tab again. and then he lost his "afjgjoe" and have to either tabbing furiously to get it back, or type it manually. perfectly unusable "autocompletion".
Well, that's your implementation. In fact shift-tab returns the previous entry. It's a popular reversal modifier, e.g. in a tabbed browser ctrl-t opens a new tab and ctrl-shift-t opens previously closed tab, in a text editor ctrl-z is "undo" and ctrl-shift-z is "redo".
 Literal means just a value typed in directly instead of being 
 taken from a variable, that's all to it.
good luck redefining what the shell does from the times when "windows" was a term from housebuilding.
The term has nothing to do with windows, it's from theory of programming languages, such things usually tend to be quite old, maybe even older than unix. I think, my understanding corresponds to the established one, and bash docs use it too. Some reading: http://en.wikipedia.org/wiki/Literal_%28computer_programming%29 - about literals in general. http://en.wikipedia.org/wiki/String_literal - more about string literals specifically; the "Delimiter collision" section explains, why string literals need escaping. http://www.gavilan.edu/csis/languages/literals.html - an extensive article about literals; interestingly, Hollerith strings don't suffer from delimiter collision and consequently don't need escaping.
 i was trying to explain you what's going on. ah, ok, good luck 
 arguing
 with machine code, telling it that it must do not what it do.
Well, it's not really needed. User only types the first characters without quotes, no need for them really; then quotes are added by the autocompletion algorithm, if needed.
 As I explained, the file can start with a difficult to type 
 character, requiring to type it is unnecessarily daunting.
and you know what? if you hit tab twice on empty line in bash, you'll eventually see something like this: Display all 4788 possibilities? (y or n) good luck browsing thru that.
On windows you can choose to iterate through some first of them or try something else. There are extreme cases, but they are, well, extreme. User folders are likely to have small number of files.
Jan 23 2015
parent ketmar <ketmar ketmar.no-ip.org> writes:
On Fri, 23 Jan 2015 12:50:31 +0000, Kagamin wrote:

 On Thursday, 22 January 2015 at 16:13:31 UTC, ketmar wrote:
 somehow i can't close cmd.exe by hitting ctrl+c. don't console
 programs know what ctrl+c is for?
Well, maybe because it's a shell, not a utility?
shell is a console utility.
Hmm... shell is a user interface providing access to the system and utilities. It's different from user utilities in that it's a system component, making the whole thing usable at all.
i can use my system without shell at all. it's in no way "system=20 component", nor even "critical system component". it's a simple=20 interpreter, which is not even necessary. a console utility.
 It shouldn't terminate
 conventionally, because then the user remains without access to the
 system
i ran sh in sh. how terminating second sh will leave me without access to=20 the system?
 that's why console shell doesn't terminate on ctrl-c and GUI
 shell doesn't terminate on alt-f4. But a text editor should definitely
 terminate in a conventional manner.
oh, how about "init=3D/usr/bin/vi"? look ma, vi is my shell now!
 strangely, ctrl+c is not working in FAR too. it's not a shell. it's
 obvious console.
=20 Maybe they just don't give a shit about it? Or they see it as a shell. Truth be told, FAR has a quit button at the bottom.
trush be told, vi has a quit command. i can't see why FAR is so different=20 from vi so it can ignore ctrl+c, and vi can't. just 'cause it's SPARTA^W=20 FAR?
 Well, that's your implementation. In fact shift-tab returns the previous
 entry. It's a popular reversal modifier, e.g. in a tabbed browser ctrl-t
 opens a new tab and ctrl-shift-t opens previously closed tab, in a text
 editor ctrl-z is "undo" and ctrl-shift-z is "redo".
it's good for windows-like systems that they appeared so late, so they=20 don't know what the hell those "terminals" was. hint: not every terminal=20 was able to distinguish between tab, shift+tab, ctrl+tab, etc. console=20 utility must remain usable on those things.
 The term has nothing to do with windows, it's from theory of programming
 languages, such things usually tend to be quite old, maybe even older
 than unix.
ok. it's string literal, as opposed to filename literal. string literals=20 are not subjects of autocompletion.
 Well, it's not really needed. User only types the first characters
 without quotes, no need for them really; then quotes are added by the
 autocompletion algorithm, if needed.
effectively turning filename literal to string literal and breaking=20 autocompletion. brilliant! the reason why quoted strings can't be autocompleted is 'cause when you=20 start typing 'em, they are syntatically incorrect: they missing closing=20 quote. if you'll add closing quote, they *can't* be autocompleted, 'cause=20 they are already complete -- you indicated that with closing quote. there=20 is no sense in trying to do all that guesswork.
 As I explained, the file can start with a difficult to type character,
 requiring to type it is unnecessarily daunting.
and you know what? if you hit tab twice on empty line in bash, you'll eventually see something like this: Display all 4788 possibilities? (y or n) good luck browsing thru that.
=20 On windows you can choose to iterate through some first of them or try something else. There are extreme cases, but they are, well, extreme. User folders are likely to have small number of files.
hitting tab in empty line must give you list of *ALL* possible commands.=20 cmd doesn't do that? then it's broken. yes, my system has 4788 commands=20 that i can invoke from command line. and yes, typing "cat " and hitting tab twice will show you the list of=20 all files in the current directory. and once again i must tell you about zsh, which has alot of nice UI=20 enhancements. and sure, you can write custom autocompleters for bash and zsh, using=20 their shell language. there are many packages that allows to autocomplete=20 various arguments to various utilities, shows help when you need it, can=20 extract, show and complete arguments from 'configure' scripts and so on.=
Jan 23 2015
prev sibling next sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Wed, Jan 21, 2015 at 04:22:54AM +0200, ketmar via Digitalmars-d wrote:
[...]
 i must confess that i was heavy windows user and windows programmer
 'till 2002 (or something, i don't remember the exact date). i've seen
 some *nix systems before, i even knew how to quit vi,
LOL... that must be one of the first things anyone learns when confronted with vi's inscrutable UI. :-P I was a big vi* hater for the longest time... until I was forced to use it at work (well OK, my supervisor talked me into it), but then I got hooked, and now I've acquired that twitch in my left little finger that periodically reaches for ESC, with or without reason. :-P
 but was never using *nix OS as my primary one. and then i was forced
 to move to GNU/Linux, 'cause my employer was not able to buy enough
 windows licenses, and someone decides that it's time to throw windows
 out of the window. ;-)
That one deserves a quote from my quote file: English has the lovely word "defenestrate", meaning "to execute by throwing someone out a window", or more recently "to remove Windows from a computer and replace it with something useful". :-) -- John Cowan
 and now i can't understand anymore why i was happy with windows. i
 really love my terminal and all the power *nix utilities gave me! ;-)
Yah, after I switched to Linux, it suddenly dawned on me that MSDOS was just a crippled cheap imitation of the *real* command prompt... I had been flying an paper airplane, and now I was in a real cockpit for the first time. It was both thrilling and kinda scary (I almost nuked my entire system with a mistyped `rm -rf` command, as I'm sure every *nix person has at least once in his life). But either way, that was it for me. Once you've been in a real airplane, you simply could never go back to paper airplanes anymore. It's not that I have anything against paper airplanes... but it's just... once you've tasted the real thing, you just can't settle for anything less. In many ways it's like D... in spite of all its niggling little problems, once I tasted the power of D, I just can't go back to C/C++ anymore. I used to take pride in being the resident C/C++ guru, but nowadays, doing C/C++ is like scratching on chalkboard. I'll do it if I have to (my employer pays me to do it, so I tolerate it), but I'd never do it again voluntarily. D has ruined my life; I just can't do C/C++ anymore. :-P T -- Those who don't understand Unix are condemned to reinvent it, poorly.
Jan 20 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 1/20/2015 10:43 PM, H. S. Teoh via Digitalmars-d wrote:
 Yah, after I switched to Linux, it suddenly dawned on me that MSDOS was
 just a crippled cheap imitation of the *real* command prompt...
Actually, DOS was modeled after CP/M which was modeled after the DEC PDP-11 operating system. It kinda bugs me that people like to give CP/M all the credit, and say Microsoft just copied CP/M, when CP/M quite obviously copied the look and feel from DEC. I learned how to program on DEC machines. DOS felt right at home :-)
Jan 21 2015
prev sibling next sibling parent ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 20 Jan 2015 22:43:04 -0800
"H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> wrote:

 I almost nuked my
 entire system with a mistyped `rm -rf` command, as I'm sure every *nix
 person has at least once in his life
my expirience was simply doing `chmod -R 600 /` as root. lucky me. and i really hate that person who placed '.' and '/' next to each other. ah, and once i accidentally did dd the wrong way and rewrote my harddrive with contents of flash pen.
 In many ways it's like D... in spite of all its niggling little
 problems, once I tasted the power of D, I just can't go back to C/C++
 anymore. I used to take pride in being the resident C/C++ guru, but
 nowadays, doing C/C++ is like scratching on chalkboard. I'll do it if I
 have to (my employer pays me to do it, so I tolerate it), but I'd never
 do it again voluntarily. D has ruined my life; I just can't do C/C++
 anymore. :-P
it's almost the same for me. i hate alot of small things in D (that's why i'm so passioned about them), but i just can't return to C/C++ anymore! it's like going back to MS-DOS. ;-) despite all annoyances D managed to get the main thing right -- thanks to all people that made it possible.
Jan 20 2015
prev sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Wed, Jan 21, 2015 at 09:06:50AM +0200, ketmar via Digitalmars-d wrote:
 On Tue, 20 Jan 2015 22:43:04 -0800
 "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> wrote:
 
 I almost nuked my entire system with a mistyped `rm -rf` command, as
 I'm sure every *nix person has at least once in his life
my expirience was simply doing `chmod -R 600 /` as root. lucky me. and i really hate that person who placed '.' and '/' next to each other.
Mistyping a recursive rm command is a relatively easy mistake, but there are worse things than that. One time, an OS upgrade gone wrong left me with my entire filesystem intact, but with a broken, non-functional ld. ... which meant *nothing* can run, because ld is called to dynamically link in libc, etc., for just about *everything* on the system. So, no rm, no ls, no mv, no chmod, etc., etc.. This was on a remote server, too, and the only connection to the box that I had left was just the last ssh bash session to the box. One mistake, and it's bye-bye server. :-P To recover from that, I had to do this: http://eusebeia.dyndns.org/bashcp It was the most intense few hours, I tell ya, when I had to rescue the system from the brink of reinstallation from scratch back to a functioning system without losing any data. Now try that on Windows. :-D
 ah, and once i accidentally did dd the wrong way and rewrote my
 harddrive with contents of flash pen.
Ouch! On a lighter note, one time I almost peed my pants when, after installing a major OS upgrade, I rebooted and got a kernel panic. (I also made the mistake of having no backup boot media, so there was no other way to get into the system to fix things.) I thought something serious had gone wrong with the upgrade, but fortunately, it turned out that the problem was that I had previously moved my main OS installation to a non-default root (/dev/sdc1 instead of the usual /dev/sda1), but had forgotten to update the bootloader to point to the new root (and didn't notice 'cos Linux tends to just run forever, so it was like 6 months later before this problem finally reared its ugly head). So when the kernel came up it tried to mount root from /dev/sda1 and couldn't, it panicked. Rebooting with the root=/dev/sdc1 parameter saved the day. :-P
 In many ways it's like D... in spite of all its niggling little
 problems, once I tasted the power of D, I just can't go back to
 C/C++ anymore. I used to take pride in being the resident C/C++
 guru, but nowadays, doing C/C++ is like scratching on chalkboard.
 I'll do it if I have to (my employer pays me to do it, so I tolerate
 it), but I'd never do it again voluntarily. D has ruined my life; I
 just can't do C/C++ anymore. :-P
it's almost the same for me. i hate alot of small things in D (that's why i'm so passioned about them), but i just can't return to C/C++ anymore! it's like going back to MS-DOS. ;-) despite all annoyances D managed to get the main thing right -- thanks to all people that made it possible.
+1. T -- I see that you JS got Bach.
Jan 21 2015
parent "deadalnix" <deadalnix gmail.com> writes:
On Wednesday, 21 January 2015 at 18:04:02 UTC, H. S. Teoh via 
Digitalmars-d wrote:
 Mistyping a recursive rm command is a relatively easy mistake, 
 but there
 are worse things than that. One time, an OS upgrade gone wrong 
 left me
 with my entire filesystem intact, but with a broken, 
 non-functional ld.
That's why it is usually a good idea to put the -r after the folder rather than before. Unless you are on OSX, because think different extend to the unix shell.
Jan 21 2015
prev sibling parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via 
Digitalmars-d wrote:
 On Wed, 21 Jan 2015 01:44:07 +0000
 Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> 
 wrote:

 i can see how this thread slowly turning into "how i was forced 
 to live
 with windows and how painful it was" thread. ;-)
Happy Windows user since Windows 3.0. -- Paulo
Jan 21 2015
parent reply ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 10:16:47 +0000
Paulo  Pinto via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via=20
 Digitalmars-d wrote:
 On Wed, 21 Jan 2015 01:44:07 +0000
 Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com>=20
 wrote:

 i can see how this thread slowly turning into "how i was forced=20
 to live
 with windows and how painful it was" thread. ;-)
=20 Happy Windows user since Windows 3.0. =20
ah. refreshing comment! ;-)
Jan 21 2015
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Wednesday, 21 January 2015 at 16:35:18 UTC, ketmar via 
Digitalmars-d wrote:
 On Wed, 21 Jan 2015 10:16:47 +0000
 Paulo  Pinto via Digitalmars-d <digitalmars-d puremagic.com> 
 wrote:

 On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via 
 Digitalmars-d wrote:
 On Wed, 21 Jan 2015 01:44:07 +0000
 Vlad Levenfeld via Digitalmars-d 
 <digitalmars-d puremagic.com> wrote:

 i can see how this thread slowly turning into "how i was 
 forced to live
 with windows and how painful it was" thread. ;-)
Happy Windows user since Windows 3.0.
ah. refreshing comment! ;-)
Also UNIX user since Xenix, having used almost all known UNIX variants since then. I just prefer Windows, that is it. -- Paulo
Jan 21 2015
parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Wed, Jan 21, 2015 at 06:14:16PM +0000, Paulo Pinto via Digitalmars-d wrote:
 On Wednesday, 21 January 2015 at 16:35:18 UTC, ketmar via Digitalmars-d
 wrote:
On Wed, 21 Jan 2015 10:16:47 +0000
Paulo  Pinto via Digitalmars-d <digitalmars-d puremagic.com> wrote:

On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d
wrote:
 On Wed, 21 Jan 2015 01:44:07 +0000
 Vlad Levenfeld via Digitalmars-d > <digitalmars-d puremagic.com>
wrote:
 i can see how this thread slowly turning into "how i was forced to
 live with windows and how painful it was" thread. ;-)
Happy Windows user since Windows 3.0.
ah. refreshing comment! ;-)
Also UNIX user since Xenix, having used almost all known UNIX variants since then. I just prefer Windows, that is it.
[...] To each his own. I personally find the Windows UI extremely cumbersome and painful to use, but obviously I'm in the minority since everyone around me (including my wife) finds *my* preferred UI basically unusable. :-P (I don't use gnome/kde/any of that jazz, I run a bare minimum X server with ratpoison as my "WM". It's really not much of a window manager at all, just a glorified version of GNU screen. :-P And I like it that way. I have almost completely weaned myself off any rodent dependency, the sole major exception being the browser, but these days I've been wrangling with Vimperator, which is a rodent-free layer on top of Firefox, so I will soon be rid of the rodent completely. I'm a happy man. :-P) T -- "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next. -- (Stolen from the net)
Jan 21 2015
prev sibling parent reply "Israel" <tl12000 live.com> writes:
On Wednesday, 21 January 2015 at 01:07:04 UTC, Adam D. Ruppe 
wrote:
 On Wednesday, 21 January 2015 at 01:04:11 UTC, ketmar via 
 Digitalmars-d wrote:
 two days making dmd.exe work with Wine to write the simple 
 utility which i can write in two hours using MinGW 
 cross-compiler.
I've been using dmd with wine for a long time... I find it sometimes seems to deadlock, but when it does, I just ctrl+c and run it again. Mildly annoying but not a showstopper.
I never understood why you guys use DMD on wine. Theres a DMD for linux... Is it because you want to develop your windows programs without having to run a full virtual machine?
Jan 20 2015
next sibling parent ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 06:08:49 +0000
Israel via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 01:07:04 UTC, Adam D. Ruppe=20
 wrote:
 On Wednesday, 21 January 2015 at 01:04:11 UTC, ketmar via=20
 Digitalmars-d wrote:
 two days making dmd.exe work with Wine to write the simple=20
 utility which i can write in two hours using MinGW=20
 cross-compiler.
I've been using dmd with wine for a long time... I find it=20 sometimes seems to deadlock, but when it does, I just ctrl+c=20 and run it again. Mildly annoying but not a showstopper.
=20 I never understood why you guys use DMD on wine. Theres a DMD for=20 linux...
sadly, windows can't run linux ELFs.
 Is it because you want to develop your windows programs without=20
 having to run a full virtual machine?
yes. developing in windows is PITA. besides, windows costs money and eats precious computer resources.
Jan 20 2015
prev sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 06:08:50 UTC, Israel wrote:
 I never understood why you guys use DMD on wine. Theres a DMD 
 for linux...

 Is it because you want to develop your windows programs without 
 having to run a full virtual machine?
My users are on Windows but my files are on a Linux computer. It is a lot easier to just run "wine dmd" and distribute the finished exe than it is to copy all the development files to the windows computer and run it there.
Jan 21 2015
parent reply "MattCoder" <stop spam.com> writes:
On Wednesday, 21 January 2015 at 13:19:00 UTC, Adam D. Ruppe 
wrote:
 It is a lot easier to just run "wine dmd" and distribute the 
 finished exe than it is to copy all the development files to 
 the windows computer and run it there.
For what I'm seeing Wine isn't an emulator like VMWare, it's a layer, so you can compile with "wine dmd", but can you test your software too? Matheus.
Jan 21 2015
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 21 January 2015 at 13:36:47 UTC, MattCoder wrote:
 For what I'm seeing Wine isn't an emulator like VMWare, it's a 
 layer
Yeah, Windows is, from the application programmer's perspective, basically just a giant library. Wine is an implementation of that library on Linux.
 so you can compile with "wine dmd", but can you test your 
 software too?
Yeah, a lot of it. I still run it on the real Windows computer (just need to copy the exe for that, so much easier than copying all the dev files) too but usually it runs close enough to the same on wine that i can find big bugs there.
Jan 21 2015
prev sibling parent ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 21 Jan 2015 13:36:46 +0000
MattCoder via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 On Wednesday, 21 January 2015 at 13:19:00 UTC, Adam D. Ruppe=20
 wrote:
 It is a lot easier to just run "wine dmd" and distribute the=20
 finished exe than it is to copy all the development files to=20
 the windows computer and run it there.
=20 For what I'm seeing Wine isn't an emulator like VMWare, it's a=20 layer, so you can compile with "wine dmd", but can you test your=20 software too?
yep. this is way easier than having two very different development environments. if something works with Wine, there are big chances that it will work in "real" windows too. so i can do most of the debugging with Wine and then just test the final exe on windows box. and use most of my *nix-based dev tools, some of which doesn't even exist on windows.
Jan 21 2015
prev sibling parent "anonymous" <anonymous example.com> writes:
On Wednesday, 21 January 2015 at 00:11:46 UTC, Kiith-Sa wrote:
 http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanon&utm_medium=feed
https://www.reddit.com/r/programming/comments/2t6tvt/the_state_of_d_in_2015/
Jan 21 2015