Slashdot Mirror


Python/Unix Hybrid Demoed at PyCon (xon.sh)

A new shell "combines the Python language with features of Bash Unix and the fish and zsh shells," according to InfoWorld. An anonymous reader writes: Pronounced "conch," but spelled Xonsh, it runs on Linux, Windows, and Mac OS X systems, bringing Python libraries to the command line -- for example, the ability to use regular expressions when globbing files. "The first thing you'll notice about Xonsh is that it's really meant to be used as a general-purpose shell," the lead developer explained in a presentation at PyCon. "But on the other hand, it really is Python, so you can do things like add two numbers together."

They're describing it as "a Python-ish, BASHwards-looking shell language and command prompt...a superset of Python 3.4+ with additional support for the best parts of shells that you are used to, such as Bash, zsh, fish, and IPython...the superglue that bonds Python to a command-line interface and other shells."

181 comments

  1. Of course it's a Unix shell.. by freeze128 · · Score: 4, Funny

    It's cleverly named "conch", like the history of other shells (Korn shell, Bourne Shell, Bourne Again Shell (BASH), C Shell). I kinda wonder why there isn't a Taco Shell....

    1. Re: Of course it's a Unix shell.. by Anonymous Coward · · Score: 1

      Commander Taco Shell

    2. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      Yeah, you can add two numbers in Bash just fine. Actually, a few years back someone did all this for Lisp... never really caught on. The traditional shells are well suited for OS operations in a way that other interpreted languages just don't handle so well.

    3. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 5, Funny

      I kinda wonder why there isn't a Taco Shell....

      Because it's a corny idea.

    4. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      Korn rox.

    5. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      I kinda wonder why there isn't a Taco Shell....

      Trump would deport it.

    6. Re:Of course it's a Unix shell.. by K.+S.+Kyosuke · · Score: 1

      Based on the headline, I kind of hoped for the thing to be called "Punix"...

      --
      Ezekiel 23:20
    7. Re:Of course it's a Unix shell.. by Bohnanza · · Score: 1
      >It's cleverly named "conch"

      And annoyingly spelled "Xonch"

      --

      -----

      Sorry, I'm only a 1336 h4x0r.

    8. Re:Of course it's a Unix shell.. by drinkypoo · · Score: 1

      I kinda wonder why there isn't a Taco Shell....

      Because Mexicans are perfectly happy with bash, mang.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    9. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      you're just a faget..

    10. Re:Of course it's a Unix shell.. by wonkey_monkey · · Score: 1

      But it's pronounced "Throat Wobbler-Mangrove."

      --
      systemd is Roko's Basilisk.
    11. Re:Of course it's a Unix shell.. by flargleblarg · · Score: 1

      Conch would have been a perfectly fine name for a shell. Does anyone know why they named it Xonsh (I mean...wut?) instead of Conch?

    12. Re:Of course it's a Unix shell.. by TheGratefulNet · · Score: 1

      I kinda wonder why there isn't a Taco Shell....

      the upside down punctuation, while nicely bracketing, IS a pain to type.

      also, some verbs have changed:

      see_esther(10)

      will sleep for 10 seconds.

      --

      --
      "It is now safe to switch off your computer."
    13. Re:Of course it's a Unix shell.. by TitusC3v5 · · Score: 2

      I'm still waiting for my Command Line Arguments and Management shell.

      --
      And the masses cried out, "09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0!"
    14. Re: Of course it's a Unix shell.. by wonkey_monkey · · Score: 2

      I thought having a stalker would be a bit more interesting than this, to be honest.

      Couldn't you switch it up a bit?

      --
      systemd is Roko's Basilisk.
    15. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      I'm still waiting for my Command Line Arguments and Management shell.

      clam shell - you clever clown

    16. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      easier to search for? less irrelevant results...

    17. Re:Of course it's a Unix shell.. by TheReaperD · · Score: 1

      The annoying spelling is likely for trademark purposes as you can't trademark a common name without millions to spend on lawyers.

      --
      "Be particularly skeptical when presented with evidence confirming what you already believe." -
    18. Re:Of course it's a Unix shell.. by flargleblarg · · Score: 1

      And why would someone need to trademark and open-source shell?

    19. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      $ 3 + 4
      -bash: 3: command not found

      wut

    20. Re: Of course it's a Unix shell.. by Anonymous Coward · · Score: 1

      echo $((3 + 4))

    21. Re:Of course it's a Unix shell.. by Anonymous Coward · · Score: 0

      +1 Funny!

  2. Python by Anonymous Coward · · Score: 0

    Man I hate Python with a passion

    1. Re:Python by MightyYar · · Score: 1

      That's okay, I'll have your sloppy seconds.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    2. Re:Python by wonkavader · · Score: 1

      Python's not as bad as it could be. It's tedious, but relatively clear. I think it's a fine language for other people to program in.

    3. Re:Python by fluffernutter · · Score: 4, Interesting

      I develop in python, java, and objective-c... you know what I hate more then python? Putting parenthesis around every single conditional statement. Once you work in python for awhile and go back, you start to notice how many brackets there are in the other languages.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    4. Re:Python by Cassini2 · · Score: 1

      Python's not as bad as it could be. I think it's a fine language for other people to program in.

      That's faint praise. People said similar things about COBOL. You could always read what someone else wrote ...

    5. Re:Python by TeknoHog · · Score: 1

      I develop in python, java, and objective-c... you know what I hate more then python? Putting parenthesis around every single conditional statement. Once you work in python for awhile and go back, you start to notice how many brackets there are in the other languages.

      You'll also notice how other languages need a semicolon after each line, whereas Python (and Julia, Fortran etc.) understands line breaks. I guess early programming environments had a good reason for cramming multiple statements on one line, but now that we can use line breaks for readability, it might as well be a part of the syntax.

      --
      Escher was the first MC and Giger invented the HR department.
    6. Re:Python by Anonymous Coward · · Score: 0

      It far more kind than anything I would say abut Java or C++

    7. Re:Python by tomhath · · Score: 1

      You don't indent your code blocks? I pity the fool who has to maintain it.

    8. Re:Python by mattventura · · Score: 1

      It will literally take any amount of spaces or a single tab character as one level of whitespace. Hell, it doesn't even need to be consistent, you just can't mix, and when outdenting it has to match the level you're going back to. If someone can't manage their whitespace, I wouldn't want them anywhere near real code.

    9. Re:Python by fluffernutter · · Score: 1

      Agreed. Once you work a lot on all these languages, Python feels a lot more like pseudo-code and therefore more natural. Java has some things you need to do to satisfy the grammar of the language itself, and more so for Objective-C. This is good in certain larger projects with many people, but it depends what you want to do.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    10. Re:Python by fahrbot-bot · · Score: 1

      If someone can't manage their whitespace, I wouldn't want them anywhere near real code.

      People shouldn't have to worry about and/or manage their white space. That Python cares is a stupid feature of the language. Yes, at some level, it's elegant, but not additionally useful and is more a result of Guido's ego than anything else. The language would be just as powerful, useful and productive using block delimiters but w/o the fucking around with problems caused by a extra or missing space on a line. I'll stick with Perl.

      --
      It must have been something you assimilated. . . .
    11. Re:Python by mattventura · · Score: 2

      Let me rephrase that: if someone can't keep indentation straight, especially with the fact that an editor is doing most of the work anyway, I wouldn't want them checking in code for any language regardless of whether the white space was syntactically significant or not.

    12. Re:Python by flargleblarg · · Score: 1

      I develop in python, java, and objective-c... you know what I hate more then python? Putting parenthesis around every single conditional statement. Once you work in python for awhile and go back, you start to notice how many brackets there are in the other languages.

      Parentheses != brackets

      Just saying.

    13. Re:Python by flargleblarg · · Score: 1

      You'll also notice how other languages need a semicolon after each line, whereas Python (and Julia, Fortran etc.) understands line breaks. I guess early programming environments had a good reason for cramming multiple statements on one line, but now that we can use line breaks for readability, it might as well be a part of the syntax.

      I prefer languages which require statements to be terminated by a semicolon (C, C++, Java, Perl, etc.) — and not because I cram multiple statements onto a single line all the time. I just find it much easier for my mind to parse the syntax. I also prefer poetry that places a period at the end of a sentence rather than making me think about where the sentence ends.

    14. Re:Python by fluffernutter · · Score: 2

      yes, and I meant to say brackets. Am I not allowed to increase the scope of my comment in the next sentence?

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    15. Re:Python by goose-incarnated · · Score: 1

      yes, and I meant to say brackets.

      Did you also mean to confuse "then" with "than"?

      --
      I'm a minority race. Save your vitriol for white people.
    16. Re:Python by fahrbot-bot · · Score: 1

      Let me rephrase that: if someone can't keep indentation straight, especially with the fact that an editor is doing most of the work anyway, I wouldn't want them checking in code for any language regardless of whether the white space was syntactically significant or not.

      That I can definitely agree with.

      --
      It must have been something you assimilated. . . .
    17. Re:Python by Anne+Thwacks · · Score: 1
      You can always read other people's Perl too. Unfortunately, you probably won't even understand your own Perl.

      Personally, I would rather lean Cobol than Python, but that is just me.

      --
      Sent from my ASR33 using ASCII
    18. Re:Python by Anonymous Coward · · Score: 0

      Translation: Yes, this was a mistake, but it isn't disastrous and a reasonable engineer can deal with it.
      That said, this aspect of Python causes me endless grief. I think I could have forgiven it if the language actually enforced indenting only with spaces, but accepting tabs just invites problems. The problem is that every engineer thinks that they can do the right thing, but which solution they choose isn't consistent.

    19. Re:Python by FatdogHaiku · · Score: 1

      ... not as bad as it could be...

      Wish I could say that about the upcoming election...

      --
      You have the right to remain sentient. If you give up the right to remain sentient, you will be elected to public office
    20. Re:Python by BitZtream · · Score: 1

      And the really sad part is you still don't understand why Python is fucking retarded for not having them all over the place.

      Your whining about 2 characters which make it infinitely more readable.

      Congratulations, in 10 years, you'll have enough experience to realize how stupid Python is.

      Python does all sorts of stupid shit, it likes to imply via white space changes rather than solid well defined delimiters.

      The fact that white space controls program logic and loading it in the wrong editor or a bad copy and paste can result in code that executes without error even though it's doing something completely different than intended, that's what you need ... More unpredictability and harder readability.

      Idiot

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    21. Re:Python by Anonymous Coward · · Score: 0

      Retarded whitespace issues are really the least of Python's problems. It's just complete and utter garbage all around.

    22. Re:Python by fluffernutter · · Score: 3, Insightful

      Yeah I can't really get that excited about a programming language either way. I just use the tool for the job.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    23. Re:Python by TeknoHog · · Score: 1

      I also prefer poetry that places a period at the end of a sentence rather than making me think about where the sentence ends.

      good point
      but if you always put a line break between statements
      then a period is redundant

      --
      Escher was the first MC and Giger invented the HR department.
    24. Re:Python by Anonymous Coward · · Score: 0

      Oh wow, you've been programming for 10 years. Give me a break.

      Python has been easier to hand off to other programmers of all skill levels than any other language I've ever worked with.

      It is vastly easier to fix some trivial editor spacing issues than it is to get people up to speed on needless syntax.

    25. Re: Python by Anonymous Coward · · Score: 0

      You should have out dented that second statement ...

    26. Re:Python by TheReaperD · · Score: 1

      You prefer the semicolons because that's what you learned with and you've been doing for a while. If you had learned with line breaks, you would prefer it instead. Personally, it's just one less character I have to type virtually every line.

      --
      "Be particularly skeptical when presented with evidence confirming what you already believe." -
    27. Re:Python by TheReaperD · · Score: 1

      This is probably the most insightful comment in this whole thread.

      --
      "Be particularly skeptical when presented with evidence confirming what you already believe." -
    28. Re:Python by Anonymous Coward · · Score: 0

      I just use the tool for the job.

      Python is never the right tool for the job.

    29. Re: Python by jhoger · · Score: 1

      Pretty sure that's supposed to be something less than praise of any kind.

    30. Re:Python by Plus1Entropy · · Score: 1

      I agree, this is the one stupid thing about the language, I definitely prefer white space being completely irrelevant. But everything else about Python fucking rocks, so meh, you get used to it. Honestly I can't remember the last time it was an issue for me, and I use Python A LOT.

      --
      Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
    31. Re:Python by Plus1Entropy · · Score: 1

      I love Python (disclaimer). But semicolons in other languages are more about splitting lines, not combining them, in my experience. That's a nice feature about being white space agnostic. Occasionally, like when splitting a string across multiple lines, you have to escape the line break, but you have to do that in Python as well sometimes, so it's a wash.

      --
      Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
    32. Re:Python by flargleblarg · · Score: 1

      but if you always put a line break between statements then a period is redundant

      Not true. It would still be ambiguous whenever a line wrapped to the next line.

    33. Re:Python by flargleblarg · · Score: 1

      You prefer the semicolons because that's what you learned with and you've been doing for a while.

      You would be wrong on that. I prefer semicolons because they make statements unambiguous.

      If you had learned with line breaks, you would prefer it instead. Personally, it's just one less character I have to type virtually every line.

      You would be wrong on that, too. I actually did learn coding originally in a language that used line breaks for the end of a statment. When I learned C, and switched to semicolons, it was a breath of fresh air for me.

    34. Re:Python by TeknoHog · · Score: 1

      but if you always put a line break between statements then a period is redundant

      Not true. It would still be ambiguous whenever a line wrapped to the next line.

      True, and this is why linebreak-sensitive languages need an extra character for wrapping long lines. Arguably, it's not very elegant, but it's tolerated in many languages, presumably because it happens so rarely; the total count of line-noise characters is lower than peppering everything with semicolons.

      --
      Escher was the first MC and Giger invented the HR department.
    35. Re:Python by TeknoHog · · Score: 1

      I love Python (disclaimer). But semicolons in other languages are more about splitting lines, not combining them, in my experience. That's a nice feature about being white space agnostic. Occasionally, like when splitting a string across multiple lines, you have to escape the line break, but you have to do that in Python as well sometimes, so it's a wash.

      As I mentioned in another post, most lines in practice won't need splitting. So while the escape in Python (or shell scripts, etc.) is ugly, the total amount of ugly punctuation is still lower. It's also nice that you need to do a little extra work to deal with the exceptionally long lines, and perhaps consider if that part of the code needs cleaning up.

      --
      Escher was the first MC and Giger invented the HR department.
    36. Re:Python by flargleblarg · · Score: 1

      Interesting. So a \ character in bash, for example, or in the C preprocessor, is sort of like an anti-line-break.

    37. Re:Python by omfgnosis · · Score: 1

      Only if you never use a line break for a comma
      like you did above

    38. Re:Python by Anonymous Coward · · Score: 0

      >Congratulations, in 10 years, you'll have enough experience to realize how stupid Python is.

      Actually, I'm programming for 20 years now and I think Python's handling of whitespace is a great idea.

      >Python does all sorts of stupid shit, it likes to imply via white space changes

      Yeah, it interprets it just like the human reading the text. Bad, that.

      >The fact that white space controls program logic and loading it in the wrong editor or a bad copy and paste can result in code that executes without error even though it's doing something completely different than intended, that's what you need ...

      Also, it reads wrong to the human reader. Of course it can't know what you intended but it does just what it looks like it would be doing, given the source code.

    39. Re:Python by Anonymous Coward · · Score: 0

      You prefer the semicolons because that's what you learned with and you've been doing for a while. If you had learned with line breaks, you would prefer it instead.

      FWIW, I prefer the semi-colons, too, and my first languages were machine (opcodes on a programmable calculator), BASIC (whatever dialect was on a TRS-80), FORTRAN 66, GW-BASIC, FORTRAN 77, and VAX assembly (on 11/750 or 11/780 - it has been a long time). None of those had semi-colons (nor the concept of lines in the case of the calculator). Next was CDC Cyber JCL, and I can't remember if that had semi-colons, but I do recall a very annoying lack of spaces. Finally, I got to Wirth Pascal and K&R C; I was annoyed with semi-colons for about one simple Pascal program, then found them preferable from then on.

      - T

  3. It's spelled "Luxury yacht" by Anonymous Coward · · Score: 0

    What is it with all this "it's spelt this way, but pronounced that way" stuff?
    Just give it a not-so-clever name nobody cares.

    1. Re:It's spelled "Luxury yacht" by OzPeter · · Score: 3, Funny

      What is it with all this "it's spelt this way, but pronounced that way" stuff?
      Just give it a not-so-clever name nobody cares.

      Hipsters. As indicated by them taking the effort to call out "Pun in name" as being a distinguishing feature.

      --
      I am Slashdot. Are you Slashdot as well?
  4. Oh wait by Anonymous Coward · · Score: 3, Funny

    This is awesome! Wait, it's Python 3?

    NOOOOOOOO

    1. Re:Oh wait by K.+S.+Kyosuke · · Score: 1

      Well, you wouldn't want your Linux 3.x have a version clash with Python 2.x, now would you?

      --
      Ezekiel 23:20
  5. But does set -o vi make it useful to me? by Anonymous Coward · · Score: 0

    Never understood the attraction to the bash cli. Good for scripting, though (when Perl is missing).

    1. Re:But does set -o vi make it useful to me? by knorthern+knight · · Score: 1

      > Never understood the attraction to the bash cli. Good for scripting, though (when Perl is missing).

      Often a lot better than Perl. Perl is a mediocre operating system that lacks a lightweight text-parsing/scripting ability.

      --

      I'm not repeating myself
      I'm an X window user; I'm an ex-Windows user
  6. Fire Editor David by Anonymous Coward · · Score: 0

    It's not pronounced conch, it's pronounced zonsch. It literally says that on the first line of the link you provided.

    You keep doing this shit, lazy fucking editing. You need to go.

    1. Re: Fire Editor David by Anonymous Coward · · Score: 0

      Bring back Timothy. I miss the days when we had lots of good editors: CmdrTaco, Hemos, CowboyNeal, timothy, pudge, jamie, michael, chrisd, and Cliff. All of them were better than the editors we have now. Hell, I might even be happy to read JonKatz again. The editing now is lazy as hell and then the editors add extraneous bullshit to a lot of the stories.

    2. Re:Fire Editor David by flargleblarg · · Score: 1

      It's not pronounced conch, it's pronounced zonsch.

      Jesus, seriously? Zonsch? That's even dumber than being pronounced conch. At least if it were spelled Xonsh and pronounced "conch" they could claim that the X is a (chi) like TeX does.

    3. Re: Fire Editor David by Anonymous Coward · · Score: 0

      The editing now is lazy as hell and then the editors add extraneous bullshit to a lot of the stories.

      Yeah, well... it's typical of kids these days: do what they want, and nobody cares that their English is barely passing. They'd probably argue that "English is a living language, you insensitive clod!", but they don't even know what a "living language" is. :(

    4. Re: Fire Editor David by Anonymous Coward · · Score: 0

      How do you get fired, you fucking douche?

      The second sentence in the first link clearly says, "Pronounced "conch," the tool works with Linux, Windows, and Mac OS X, and it offers a shell language and command prompt.".

      I've complained about David before, but if you're going to be wrong and blame someone else, you're the tool and owe David a mea culpa.

      Fucking idiot.

  7. So not really a Python/Unix hybrid by rminsk · · Score: 5, Informative

    Why is the title of this article "Python/Unix Hybrid Demoed at PyCon" when it is a Python/Bash hybrid? Bash != Unix

    1. Re:So not really a Python/Unix hybrid by dbIII · · Score: 3, Insightful

      It's a beige box is the "hard drive" or a operating system means solitaire game but not device drivers moment - just live with the feeble redefinitions of those that never learned the real definition.

    2. Re:So not really a Python/Unix hybrid by Anonymous Coward · · Score: 0

      I cannot, nor can I live with those who never learned how to use punctuation.

    3. Re:So not really a Python/Unix hybrid by gnupun · · Score: 1

      But bash is the de facto interface for Unix. When there's bug in the Windows UI, do you call it a bug in the Windows GDI or Windows UI? No, you call it a Windows bug.

    4. Re:So not really a Python/Unix hybrid by HiThere · · Score: 1

      This seems a reasonable place to mention that there's nothing remarkable about a Python shell. There have been Ruby and Scheme shells for years, perhaps decades.

      It *IS* a bit unusual that it's cross-platform, but somehow the summary didn't emphasize that.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  8. Great idea! by wonkavader · · Score: 1

    This is such a great idea. I've always wanted to remove the separation between simple execution scripts and complex code which is difficult to understand. it really bugs me that we have these "standards" which simplify portability and make things clear.

    Ideally in a few years, we will have inscrutable, half-assed code all over the execution space. This will give people the opportunity to learn python so they can debug simple execution wrappers. EXCELLENT!

    But if it's not ready yet, we don't have to wait for it... we can simply replace all the .sh files on our systems with .pl files. That'll make everyone happen, too, and we can start today!

    1. Re:Great idea! by Anonymous Coward · · Score: 2

      I'm only pissed that they didn't but in-line ASM in there too :-(

  9. 4 spaces dictatorship in the shell? by Anonymous Coward · · Score: 0

    And now we will be slaved to use the 4 spaces for the indentation in scripts? If we don't follow the rules, then we will be fired?

    Great....

    NOOOOOOOOOOOOOOOOOOOooooooooooooooooooooo ...

  10. Headline "Python/Unix Hybrid" is misleading by Anonymous Coward · · Score: 2, Informative

    Unix is not a shell (if it were, we would not need shells) and Xonsh/bash/Python are not operating systems.

    1. Re:Headline "Python/Unix Hybrid" is misleading by Anonymous Coward · · Score: 0

      Are hybrids created from things that are like, or rather ones that are unlike?

    2. Re:Headline "Python/Unix Hybrid" is misleading by Plus1Entropy · · Score: 1

      Both?

      --
      Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
  11. Perl by goombah99 · · Score: 2

    Many people know that Perl is spelled "perl" and not pearl, but a lot of people don't know it's pronounced "Gob gipple fish waddle". So if you have been wondering while real perl monks ignore you when you ask a question about perl now you know.

    Seriously, if you want a shell with magic powers just use perl. it's exactly what it was originally built for. It is wood chipper to pythons battery powered hedge trimmer when it comes to sysadmin tasks. It's the ideal sys admin and glue language.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Perl by TheGratefulNet · · Score: 2

      perl can look rather odd if you are not used to it. even with years of comp sci experience, if you don't know perl, you can't always read it. and reading/patching/fixing is important.

      python is much more readable even to the point of going too far (insisting on that space stuff). you can write python that 'looks odd' to non-python people, quite true; but it does not come close to the 'huh???' factor that I and many others have when looking at 'tight' perl code. perl is a write-only language, in some ways. I don't prefer those (really hard to get the data back from write-only things, lol)

      perl used to be 'it' before python. you had to know perl to do that level of scripting, and sysadmins had to deal with it. now, its not so obvious that it -has to be- perl, if its a new project. not at all obvious, and python now usually gets the pref over perl for new things.

      --

      --
      "It is now safe to switch off your computer."
    2. Re:Perl by Anonymous Coward · · Score: 2, Interesting

      perl is a write-only language, in some ways.

      Only if you're in a particularly abstract mood that day..

      If I'm writing Perl code for other people, then I tend to lay it out as if I was writing Pascal code (for I am old, bald of pate, grey of hair and beard and learned to program in FORTRAN, ALGOL and Pascal on mainframes..and some really old habits die hard). It's readable, and I tend to comment the hell out of it.

      If I'm writing it for myself, then all bets are off...I have simple 10-60 liners which are fairly understandable, requiring maybe only the application of a couple of glasses of single malt to trigger the old grey matter (my excuse, and I'm sticking to it), there are, however, a couple of bits of code running into several hundred lines of whisky and/or rum inspired Perl code lurking on one of my machines which I really quite don't understand now, oh sure, the individual routines are readable and make sense, but the overall package...well, it collects and munges data from several devices, logs it, then produces pretty graphs..I wrote it all, it works (ran for seven years without a break, only restarted as I needed to upgrade the hardware), but I'll be buggered if I know exactly how it does what it does though..There are comments in the code, but they're scatological, sarcastic and usually nothing to do with the code they're above and beside..

      At least Perl's not as cryptic looking as APL, now that was a fun language to try learn sans the proper keyboard..

      As to Python, every time I start coding something in Python just for the hell of it, the thought 'I can do this a lot easier in Perl pops up' so I usually do, I can debug other peoples Python code (which I'm about to do into in a couple of hours), but hate programming in it myself..

    3. Re:Perl by Anonymous Coward · · Score: 0

      If you need a perl shell, you don't use perl, you use Zoidberg. https://github.com/jberger/Zoidberg

    4. Re:Perl by Timex · · Score: 1

      This was, arguably, the most cohesive and agreeable commentary in this entire thread that I've read so far. No clue why some young farts chose to down-vote it.

      I write things in Python right now because I'm trying to learn it. I wrote a cool routine that makes graphs and all, and tried to share it with Management.

      The people in charge of routines that are shared among teams here won't touch it because their team doesn't know Python (they seem to be the only team in the company that doesn't), so they can't maintain it. I find this disgusting, because a child could follow the blocking in Python, and if one is versed in other languages, it's really not hard to figure out what's going on... ...and yes, I have every major block documented. It's a habit I picked up from Pascal and BASIC+, because I found I would have an epiphany on how to get something to work, look at the code a couple months later and wonder what the hell i was thinking. Documentation for the win.

      I've used Perl professionally, but I get irritated when people seek to obfuscate their code. It just makes it difficult for people later on, when their crap err... clever code needs to be tweaked. Python doesn't have that problem quite so often.

      --
      When politicians are involved, everyone loses.
    5. Re: Perl by jhoger · · Score: 1

      Why not Zoidberg?!

    6. Re: Perl by jhoger · · Score: 1

      Perl is not a write only language in any way. If you're looking at write only Perl code it was written by a write only programmer.

      I found the expressiveness of the Perl language is something that lets me write more code that does exactly what it looks like it does as idioms or phrases. I don't use Perl idioms for compactness. I use them because it makes my intent clear.

  12. Xonsh should sound like Crunch by Anonymous Coward · · Score: 0

    Xmas = Christmas
    Xonsh = Crunch
    Just my humble opinion.

    1. Re: Xonsh should sound like Crunch by Anonymous Coward · · Score: 1

      Shouldn't that be Christonch?

  13. What the hell by dnaumov · · Score: 2

    is "Bash Unix"?

    1. Re:What the hell by Anonymous Coward · · Score: 0

      An article written by someone who isn't very familiar with unix, posted on slashdot by an "editor" who is also not very familiar with unix.

    2. Re:What the hell by U2xhc2hkb3QgU3Vja3M · · Score: 4, Funny

      What is "bash unix"? I'll show you:

      Unix fucking sucks! There's no games on it and you can't even run Microsoft Office 365 even if you're willing to pay for it every fucking year!

    3. Re:What the hell by angel'o'sphere · · Score: 1

      I guess you wanted to make a joke, but actually there are plenty of games on Unix, after my Apple ][ I played only a few games on Macs and then mostly on Unix, like XConq, one of the best turn based strategy games ever. It took minimum 6 or 8 more years that I finally played War Craft 2 and Decent on Windows, and ofc. Doom. Actually I only played a few classics like Half Life, Command and Conquer and Diablo and World Of Warcraft.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    4. Re:What the hell by Anonymous Coward · · Score: 0

      It's what Microsoft has been trying to do for years...

    5. Re:What the hell by rp · · Score: 1

      is "Bash Unix"?

      "Bash Unix" is lingo IT for "interpreter line command".

      See? It wasn't that hard to figure out.

  14. Like Gnu? by goombah99 · · Score: 1

    Is a self referential acronym Hipster?

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Like Gnu? by OzPeter · · Score: 1

      Is a self referential acronym Hipster?

      No .. but calling out as feature is IMHO

      --
      I am Slashdot. Are you Slashdot as well?
  15. Makes sens to me after so many rotten candy by Anonymous Coward · · Score: 0

    I already reported a dozen of child pornography site that I found on Google, do You know what Google did? They changed the names for those places after the police find out those websites.

  16. Meanwhile.... by Anonymous Coward · · Score: 0, Funny

    Meanwhile, in the real world, the rest of us get real work done on Windows with Powershell.

    1. Re: Meanwhile.... by Anonymous Coward · · Score: 0

      LOLOL this needs to be marked +5 funny.

      Babahhahahahahahhah I laughed so hard. Thank you sir.

  17. Not excited by fph+il+quozientatore · · Score: 4, Insightful

    1. What is so awesome about adding two numbers in the shell?
    2. In any case, bash can do it too -- try echo $((15+7)).
    3. One of the selling points of bash is that it needs to be fast for power users, so it uses cd instead of change_directory(). One of the selling points of Python is that readability counts, so it would choose change_directory() over cd. How do you plan to reconcile the two approaches?

    --
    My first program:

    Hell Segmentation fault

    1. Re:Not excited by DoofusOfDeath · · Score: 3, Interesting

      1. What is so awesome about adding two numbers in the shell?
      2. In any case, bash can do it too -- try echo $((15+7)).
      3. One of the selling points of bash is that it needs to be fast for power users, so it uses cd instead of change_directory(). One of the selling points of Python is that readability counts, so it would choose change_directory() over cd. How do you plan to reconcile the two approaches?

      I haven't checked out Xonsh much yet, but I'm stoked if it provides a good hybrid of Bash and Python.

      Lately I've done a lot of Bash scripting, and I've found myself wanting a few features from Python. The first that comes to mind is wanting Python's ability to have lists / dictionaries that can contain other lists / dictionaries. Bash's associative / indexed arrays are a great feature, but it's very inconvenient to compose them in such a manner, and that occasionally makes my life more difficult.

      OTOH, I haven't wanted to migrate the scripting to Python, because I really like how easy it is to refine and reuse the same command back and forth between a Bash script and a Bash command-line.

      If Xonsh can help in cases like mine, and it manages to gain widespread traction, I'll be stoked.

    2. Re:Not excited by Anonymous Coward · · Score: 0

      1. What is so awesome about adding two numbers in the shell?
      2. In any case, bash can do it too -- try echo $((15+7)).
      3. One of the selling points of bash is that it needs to be fast for power users, so it uses cd instead of change_directory(). One of the selling points of Python is that readability counts, so it would choose change_directory() over cd. How do you plan to reconcile the two approaches?

      See this is why nobody respects tech people. Adding on a command line is just an example, not the ultimate answer that can simply be attacked if you want the new piece of tech to go away. echo $((15+7)) is not a decent replacement for 15+7 nor is it "fast for power users". This is a shell hybrid. There is absolutely no reasonable person that would think they are changing cd to change_directory(). That isn't how csh works. That isn't how this python version likely works.

      Technology isn't sacred. Nothing is pure. People come up with new stuff which might or might not be better. You can't just "make it go away" with a couple logical but irrational arguments. That kind of thinking is what unsuccessfully shouted down smartphones, tablets, cloud services, and the resurgence of apple as an ever growing list of technologies that people like the parent get wrong every time because in their heart of hearts they want everything to work the way it has always worked for them just like the end users that get angry when their desktop icons are disturbed.

    3. Re:Not excited by TeknoHog · · Score: 2

      1. What is so awesome about adding two numbers in the shell? 2. In any case, bash can do it too -- try echo $((15+7)).

      Bash only does integer arithmetic, and grownups generally need floating point math. I usually have a Python or Julia shell open for a variety of reasons, including the "desk calculator" aspect, which BTW might include things like sin/cos, log etc.

      --
      Escher was the first MC and Giger invented the HR department.
    4. Re:Not excited by BitZtream · · Score: 0

      One of the selling points of Python is that readability counts,

      Every tin I see someone say something stupid like this I can't help but think that you never in your life have written anything in any computer language, ever.

      That's the only way some says something fucking retarded like Python code being readable. You would probably think ruby is as well, which is equally as stupid

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    5. Re:Not excited by Anonymous Coward · · Score: 0

      It's really too bad that you are so angry and so wrong at the same time.

    6. Re:Not excited by speederaser · · Score: 1

      Bash only does integer arithmetic, and grownups generally need floating point math.

      True, but having bash do it would just be redundant with bc. Try echo "1.64*9.38" | bc.

      I use this function in my bash scripts to do floating point math with bc:

      function calc {
      echo "scale=8; $1" | bc
      }

      Usage: calc 1.64*9.38

      Set your scale and other options to suit.

    7. Re:Not excited by TeknoHog · · Score: 1

      Good point, I was going to mention something about bc or awk, both of which I use in shell scripts, but I thought this discussion was more about interactive use. Though your "calc" might be nice in .bashrc, for example.

      I actually prefer awk in shell scripts for a couple of reasons. First, it seems to be more widely available -- minimalistic distros don't include bc by default, but awk is always there. Also, it's a more complete programming language rather than a calculator. For example, linear regression coefficients from a list of x, y pairs:

      awk '{n = n + 1
      sx = sx + $1
      sy = sy + $2
      sxy = sxy + $1*$2
      sx2 = sx2 + $1**2
      sy2 = sy2 + $2**2}
      END{b = (n*sxy - sx*sy) / (n*sx2 - sx**2)
      a = (sy - b*sx) / n
      r = (n*sxy - sx*sy) / ((n*sx2 - sx**2)*(n*sy2 - sy**2))**0.5
      print a, b, r}'

      --
      Escher was the first MC and Giger invented the HR department.
    8. Re:Not excited by theCoder · · Score: 1

      That's very similar to my 'bcc' function:

      bcc() { echo "$*" | bc -l; }

      Great minds, huh? :)

      The advantage to -l is that it defines things like s() and c(), sine and cosine. It also sets the scale to be long. Passing all the arguments makes it easier to do things like:

      bcc 1 + 2 + 3 + 4 + 5

      without having to put it in quotes. The only time I have to use quotes is if I want to use parenthesis in the expression, since the shell would otherwise interpret those. You do have to be careful not to have any bare * arguments, though, since the shell will interpret that, too.

      --
      "Save the whales, feed the hungry, free the mallocs" -- author unknown
    9. Re:Not excited by Anonymous Coward · · Score: 0

      You just changed my life. Thank you!

    10. Re:Not excited by Anonymous Coward · · Score: 0

      How do you plan to reconcile the two approaches?
      Reply to This Share

      Back in the day, Stratus minis had a proprietary OS called VOS. There the command was "change_directory" and that's what you'd use when writing a shell script, but it was as easy as bash to define a "cd" alias in your login script (though more readably). The same was true throughout the operating system. If you used a command in interactive mode often enough to care, you'd set up an alias. You wouldn't (couldn't) use the aliases in command files ("shell scripts"). You could of course configure the editor to expand aliases automatically when writing scripts. This was on a 68040 based machine 30 years ago. Why is bash still emulating unix/multics' restricted name space?

      Anyhow, systemd will soon replace "cd" with "folderctl update" then we'll all be happy.

    11. Re:Not excited by Anonymous Coward · · Score: 0

      1. Nothing. It's just a simple example. A simple example may not be representative of actual usage.

  18. Nope by Anonymous Coward · · Score: 0

    It's pronounced "Zonsh."

  19. Say what? by Anonymous Coward · · Score: 2, Insightful

    Pronounced "conch," but spelled Xonsh

    How about NO?

    This is yet another example of stupidity in the open source community. You don't get to define how a word sounds. The way you write it defines how it's said.

    And even if you say "Xonsh", it sounds stupid anyway.

    There's a reason people don't use "GIMP" in businesses. Nobody can go see his boss and asks to replace Photoshop by "GIMP".

    1. Re:Say what? by angel'o'sphere · · Score: 1

      And shortly after 'subversion' gets traction companies are migrating to GiT (what is the 'meaning' of git btw.?)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    2. Re:Say what? by Anne+Thwacks · · Score: 1
      Nobody can go see his boss and asks to replace Photoshop by "GIMP".

      maybe if you learned to say "replace Photoshop with "GIMP", your boss might listen to you. Acting illiterate probably does not enhance your reputation as a source of advice.

      --
      Sent from my ASR33 using ASCII
    3. Re:Say what? by BasilBrush · · Score: 0

      Ob. There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

      I sincerely hope that the open source community are good with the caches and iteration, because they suck at naming.

    4. Re:Say what? by jwdb · · Score: 1

      This is yet another example of stupidity in the open source community. You don't get to define how a word sounds. The way you write it defines how it's said.

      Right, because English is so consistent in its link between spelling and pronounciation.

      Night, knight, fox, faux, through, thorough, "the dove dove into the bushes"... I could go on for a while. English is *dominated* by words pronounced without regard to the spelling.

    5. Re:Say what? by Anonymous Coward · · Score: 0

      > "the dove dove into the bushes"...

      It's "dived."

      You almost snuck that one past us!

  20. It looks like bash by goombah99 · · Score: 1

    perl can look rather odd if you are not used to it.

    Yes but in this instance it looks like Bash! and Awk and Sed and Grep. So for a shell, the syntax is just like what you are replacing.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:It looks like bash by jedidiah · · Score: 1

      One of the GUI chat clients even uses sed syntax for editing typos in your conversation.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    2. Re:It looks like bash by Anonymous Coward · · Score: 0

      So for a shell, the syntax is just like what you are replacing.

      since when do you have to keep track of whitespace in the shell?

    3. Re:It looks like bash by Anonymous Coward · · Score: 0

      talking about perl, not python.

  21. The name is not a good choice. by Futurepower(R) · · Score: 1

    "Pronounced "conch," but spelled Xonsh, ..."

    Why give it an annoying name that makes it more difficult to communicate?

    1. Re:The name is not a good choice. by Anonymous Coward · · Score: 1

      "Pronounced "conch," but spelled Xonsh, ..."

      Why give it an annoying name that makes it more difficult to communicate?

      Perhaps because in Spanish "concha" is "shell" ?

      Unfortunately, here in Argentina that's the (more) common word for pussy.

  22. Python/Unix Hybrid? by aglider · · Score: 1

    Unix is a family of OSes, Python is an interpreted language.
    How can a command line shell be a hybrid between an OS and a language?
    You insensitive GUI clod! ^C^C^C^D!

    P.S.
    PySh whould have been a much better prank, at least in Italian!

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
    1. Re:Python/Unix Hybrid? by Anonymous Coward · · Score: 0

      PySh whould have been a much better prank, at least in Italian!

      Works well in Scotland, 'hey pal, yer bletherin pysh...' (Trans: 'Good Sir!, I feel it incumbent upon me to inform you that your recent oration contained a number of terminological inexactitudes')

  23. "Use 4 spaces per indentation level." by Anonymous Coward · · Score: 3, Informative

    Like PEP 8 clearly says,

    Use 4 spaces per indentation level.

    That's it. That's all there is to it. It's simpler and clearer than the rules for just about every other programming language out there.

    Anyone who can't handle using 4 spaces is a lost cause.

    1. Re:"Use 4 spaces per indentation level." by nullchar · · Score: 2

      How do you write a shell one-liner in Xonsh if you need to use whitespace instead of curly braces and semicolons?


      # one line HTTP check in bash
      { echo -e "GET / HTTP/1.1\nHost: reddit.com\nConnection: close\nAccept: text/html\nUser-Agent: Mozilla/5.0\n" #1; while read LINE; do echo "$LINE"; done; } #2 /dev/tcp/198.41.208.140/80

      Replace "#1" with ">&0"
      Replace "#2" with "<>"

    2. Re:"Use 4 spaces per indentation level." by iTrawl · · Score: 1

      I'm going to guess that a multi-liner won't satisfy you.

      It works like iPython: it autoindents if it notices the need, instead of submitting the command. You don't need any backslashes at the end of the line to tell it to do that. If you need to change something, you get to edit the entire block that you submitted. You'd probably use urllib* for your example. *but... as far as I can tell the urllib included with xonch isn't very functional at this time

      Let's assume it will actually work in the near future: all those bash patterns would have to be rethought.

      As for your example: I'm pretty sure I'd use curl or wget instead of doing what you did to begin with anyway. If it's a production script that needs to be quick (the only reason to do it your way) then it should not be a one liner and instead of <> /dev/tcp I'd pipe through 'nc' (netcat), as I'm yet to see /dev/tcp enabled by default anywhere :) Why the heck do you need the >&0 redirect anyway?

      Here's how I'd do it for the same effect, but without any jumping through flaming hoops.

      echo $'GET / HTTP/1.1\nHost: reddit.com\nConnection: close\nAccept: text/html\nUser-Agent: Mozilla/5.0\n' | nc 198.41.208.140 80

      Remove the dollar sign and it works in 'xonch' as well.

      --
      "Everybody's naked underneath" -- The Doctor
    3. Re:"Use 4 spaces per indentation level." by LarryRiedel · · Score: 1

      How do you write a shell one-liner in Xonsh

      At this point it looks like either you don't, or you mangle your Python to be purely functional programming. I'm hoping they will enhance the parser to support some simple convention like curly braces. Not Pythonic, but the whole concept is by definition not purely Pythonic

    4. Re:"Use 4 spaces per indentation level." by buchner.johannes · · Score: 1

      PEP8 is the codestyle guide for contributing to Python:

      This document gives coding conventions for the Python code comprising the standard library in the main Python distribution.

      It is not relevant for any other code written in Python, although other projects may choose to adopt it too.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    5. Re:"Use 4 spaces per indentation level." by Anonymous Coward · · Score: 0

      Or a single tab. PEP 8 is for dogmatic people. Tabs are configurable and take up three less bytes per indent level compared to spaces.

      Of course, any competent editor can switch between them at will. But tabs are superior.

    6. Re:"Use 4 spaces per indentation level." by nullchar · · Score: 1

      This crazy one-liner can be used on many flavors of linux that do not have wget, netcat, curl, etc. Obviously those would be preferred, but if the server is locked down and all you have is bash, it's great to check if a certain webserver hosts a particular website, or to discover your external IP.

      I forget why I needed to redirect to descriptor zero for the read line... I'd have to look that up again.

  24. Python going the way of ... by Anonymous Coward · · Score: 0

    NodeJS. Hipsters are realizing that JS sucks, so now they have to bring their naivety to the python world. Horray! I can't wait to listen to idiot co-workers talk about how great it is that they can now run a heavy shell, just to avoid learning BASH. Can we stop mashing shit together already?

    1. Re:Python going the way of ... by gnupun · · Score: 1

      Bash is a poorly designed language, compared to Python. Bash was great a few decades ago, but it is no match to Python's expressiveness and massive libraries.

    2. Re:Python going the way of ... by Anonymous Coward · · Score: 0

      Saying BASH is a poor language because it has libraries is like saying Perl is better because of Pythons nazi white spacing and then even bigger set of libraries Perl has over Python.

      At least BASH has been compatible with sh and itself for decades unlike Python.

    3. Re:Python going the way of ... by fnj · · Score: 1

      Bash was not "designed" at all. It is a hack to bourne sh adding a crazy quilt of spliced-on features while not totally destroying compatibility all the way back to Unix v7.

  25. Comparable to Fish shell by geggo98 · · Score: 1

    This is a really nice shell. From it's features it's basically comparable to Fish shell. It's probably not compatible to the Bourne shell, so not really good to execute Shell scripts. But the same is true for Fish.

    What I am missing is a good type system and a possibility to exchange data between processes in a way that is more structured than plain text. For the moment it is really hard to even put the output of ls into any other process in a reliable way

  26. What's with all the complaints about the spelling? by pem · · Score: 1
    If google had spelled the name of their "go" language "ggo" or something, it would be a hell of a lot easier to... google.

    If I want the computer conch and am not interested in seeing a bunch of pictures of shells, I know what to type.

  27. Killer Feature by nuckfuts · · Score: 1

    ... you can do things like add two numbers together.

    You mean like I was doing with /bin/sh 25 years ago?

  28. "pip install break-everything" by Anonymous Coward · · Score: 0

    Unfortunately, this introduces "pip install" into the basic shell utilities. For those outside of Python, the PyPi website is the re-invention of Perl's old CPAN utility for Python. Unfortunately, it has all the same problems. Developers insist on including latest/greatest modules of entirely irrelevant components as dependencies in their new code, and other developers are told to run "pip install" to get those modules and all the dependencies. This auto-upgrades working modules on your current system, and breaks the dependency chain for other features.

    Better yet, for RHEL based systrems, since the "rpm" package management uses Python, installing the wrong depeendency from the wrong Python module can break the entire reset of your package management and make the system unrecoverable, except from an old OS image. So now, people setting up this Tower of Babel of a shell can break the *entire* environment, because the wrong package installed can break even the Python based shell itself.

    If this ever takes off, I'm looking forward to a lot of money cleaning up the messes. I cleaned up when people kept writing complex nonsense in Perl and breaking working systems due to unexpected upgrades. And I often did it by stripping *out* the complex Perl nonsense, and now am doing it with complex Python modules, and replacing it with a few lines of stable, reliable, "bash" script. Heck, I just cleaned up on a contract to throw out a complex Python based software deployment system that required 3 different versions of Sphinx to build 3 different Python modules, each of which broke the other two Sphinx modules, and turned the whole mess into one Makefile.

  29. Powershell, anyone? by FuegoFuerte · · Score: 1

    Sounds like someone got jealous of Powershell and decided to a "me too!" shell for the other OSs. Meh.

    1. Re:Powershell, anyone? by iTrawl · · Score: 1

      Nope. This is actually usable. It works like a shell, but can drop into inline Python on a whim, and that has syntactic sugar to very easily run shell commands. The more I play with it the more I feel like I'll convert to it by the middle of the week.

      --
      "Everybody's naked underneath" -- The Doctor
    2. Re:Powershell, anyone? by fnj · · Score: 1

      Sounds like someone got jealous of Powershell and decided to a "me too!" shell for the other OSs. Meh.

      Bzzzt. Sorry, Charlie. Next time you want to render opinion, it might pay to have, or at least make some attempt to acquire, a basic familiarity with the subject matter. Just a suggestion.

      Powershell is not even in the same class as xonsh. One of the two is not joined at the hip to the architecture of an oddball operating system. The other one will never make anyone using a real operating system jealous. You figure out which is which. If you can.

      I've been playing with both xonsh and ipython for no more than a few hours. They both blow every other command shell I've seen all to hell.

  30. Conch = 'Konk' by itomato · · Score: 1, Insightful

    People xonshtantly mispronounce these things.
    Quay.io? It's not "kway", it's "key".
    "Conch" isn't fucking "konsh", it's "konk". Like the devs need on the fucking head.

    1. Re:Conch = 'Konk' by Anonymous Coward · · Score: 0

      So you invented a new word for your project? Then you can choose how it is spelled, or you can choose how it is pronounced.

      You don't get to do both.

      I agree, the developers need a dope-slap with a heavy object.

    2. Re:Conch = 'Konk' by Anonymous Coward · · Score: 0

      That's how those words are normally pronounced in English. A conch is a type of sea shell, a quay is a wharf.

    3. Re:Conch = 'Konk' by Anonymous Coward · · Score: 0

      "Conch" is a shortened slang for "pussy" in Spanish. For real.

  31. Pronounced by Anonymous Coward · · Score: 0

    "Pronounced "conch," but spelled Xonsh,...".

    I pronounce it "Shanika". But I would spell it "pythinux".

  32. Kind of cool, kind of ugly by ohnocitizen · · Score: 1

    More info here: http://xon.sh/

    Some of it looks really cool, python + sh is a great idea. Though some of it looks ugly (http://xon.sh/bash_to_xsh.html), the alternative to '$?' for example.

    1. Re:Kind of cool, kind of ugly by fnj · · Score: 1

      In sh, $? is the return value of the last command. And yeah, __xonsh_history__.rtns[-1] is pretty verbose as well as ugly. The FAQ could use a lot of improvement, though. Here, for example, it could point out that _.returncode also gives you the return value of the last command.[*]

      You could also just define yourself a convenience function:
      def rc():
          return _.returncode
      and then you could just use rc() in place of $?. Unfortunately AFAIK there's no way to avoid the empty parentheses in python.

      [*] _ is a very cool predefined variable. It contains the complete results of the execution of the last command in a tuple: contents of stdin, stdout, and stderr; pid; return code; a sub-tuple of args including the command name; and a couple of other items.

  33. Re:What's with all the complaints about the spelli by Anonymous Coward · · Score: 0

    Try "go language" and "conch unix"?

  34. Zonsh or Ex-onsh by iTrawl · · Score: 1

    Expect it to have its name ripped to pieces (pronounced pisces, for the heck of it). Which pronunciation guide did they use? Is there a language in the world that natively makes it sound right like that?

    --
    "Everybody's naked underneath" -- The Doctor
    1. Re:Zonsh or Ex-onsh by fnj · · Score: 1

      If this bothers you, how do you think TeX is supposed to be pronounced? Hint: it ain't teks.

      My only problem is, are you supposed to pronounce it kontch? Or kongk? The conch shell on the beach is pronounced kongk.

    2. Re:Zonsh or Ex-onsh by iTrawl · · Score: 1

      TeX bothers me too, but at least I can get away with thinking of it as 'techs', because as long as I type 'x' on my keyboard to get to it everything works out nicely. But I'm still trying to convince my brain to formulate a solution with 'ksonsh', 'ExxonSH', and other such configurations to make it easier to get it from brain to keyboard, based on how people would say the word at first sight in a few European languages. Aliasing it to 'xsh' (eks S H) might be the best idea, together with "the shell whose name we shall not say".

      --
      "Everybody's naked underneath" -- The Doctor
    3. Re:Zonsh or Ex-onsh by fnj · · Score: 1

      Well, it turns out the joke's on both of us. The TRUE pronunciation turns out to be zontsh! I figure its creator should know how to pronounce his own creation. The host prnounces it at 01:20 of the podcast, and Anthony Scopatz does NOT correct him. Then Anthony pronounces it the same way at 04:40. Maybe they are both trying to pronounce the leading ks sound, but if so it doesn't matter because it sounds just like zontsh.

      Hopefully we can put this "conch" fabrication/bullshit to bed.

      There is a frame on a page on xon.sh giving the pronunciation, but it is impossible to get a reference to anywhere on that cursed site!

      BTW the above link is a nice xonsh introduction.

  35. Brackets exist for a good reason by Viol8 · · Score: 5, Informative

    They clearly define the block no matter how you format it.

    More than once I've seen a python program where someone has accidentaly deleted tabbed whitespace on a end line in a block and moved that line into the outer block and of course python says nothing. But now the program is broken. Try removing a bracket in C/C++/java and see what happens.

    Whitespace as a block delimiter is a retarded idea, always has been, always will be.

    1. Re:Brackets exist for a good reason by Anonymous Coward · · Score: 1

      Have you seen that problem with Python more often than you've seen the problem of missing and or misplaced brackets? I certainly haven't.

    2. Re:Brackets exist for a good reason by Viol8 · · Score: 1

      If a bracket is missing the program won't compile you dork.

    3. Re:Brackets exist for a good reason by lastman71 · · Score: 1

      But he wrote "missing brackets", not "missing bracket".

      If you missed an open and a close bracket, it wil compile (you dork).

    4. Re:Brackets exist for a good reason by Viol8 · · Score: 1

      Actually jackass it won't necessarily compile if you delete 2. Delete both brackets from this and see how far you get.

      int main() { return 0; }

      Aside from that the chances of accidentaly deleting and open and close bracket in the same function and not noticing are vanishingly small. Far less that deleting some whitespace.

  36. Ipython? by Anonymous Coward · · Score: 0

    This is totally cool! They've invented ipython. Now they just need to make it run in a brower.

  37. Enough with the retarded names by theshowmecanuck · · Score: 1

    You want to pronounce it 'conch', then spell it that way. Not starting with a consonant pronounced like a 'z'. Enough with the cutesy brain damaged fucking names.

    --
    -- I ignore anonymous replies to my comments and postings.
  38. "You can do things like add two numbers together" by Lisandro · · Score: 1

    Whoa.

  39. Here's the video by Anonymous Coward · · Score: 0

    https://www.youtube.com/watch?v=uaje5I22kgE

  40. Perl by Anonymous Coward · · Score: 0

    This was a feature of perl a decade ago.

  41. Wrong Pronunciation by Rhyas · · Score: 1

    It says right on the homepage:

            the xonsh shell

    ~ It is pronounced zonsch ~

    Either way, it's still terrible name.

  42. Shells... by jandersen · · Score: 1

    Does the author of this posting not realise that "UNIX" isn't the same as bash or whatever you use for you login shell? Anyway, in UNIX (incl. Linux), you can use anything as a login shell, including less productive commands like "/sbin/shutdown -r" and "/usr/games/sl". This is not unique to UNIX, BTW - I once worked with an IBM product called AS, which had a fascinating command that could log you out and then log in as a different user; well, I say different - this included the same user, of course. You could also specify this command as you login shell, and if you didn't use a password, you would then have a loop that could only be stopped by atking the whole of AS down.

  43. Need domain specific language for system tasks by ilyasher · · Score: 1

    I have a different vision for future shells: https://github.com/ilyash/ngs/ . Using one of the existing languages has obvious advantages but it's not a domain-specific language for system tasks so it will never be optimal for that. Making DSL on top of an existing language also does not sound like an optimal solution. My approach is a domain specific language which specializes on system tasks and has small simple bash-like syntax mode and "normal" programming language syntax mode. The two modes are easily mixed.

  44. What's the point? by JThundley · · Score: 1

    I love python, I love bash and shell scripting, but why would I want this? I usually just start a python shell if I want python's more advanced string parsing.

  45. Re:"You can do things like add two numbers togethe by Anonymous Coward · · Score: 0

    Brilliance, Keanu, brilliance!