« first day (40 days earlier)      last day (2527 days later) » 

18:10
I like the feature zsh has of cding to a directory without my having to type cd
I believe your version of Bash is new enough to support shopt -s autocd.
zanna@toaster:~$ shopt -s autocd
zanna@toaster:~$ playground
cd -- playground
zanna@toaster:~/playground$
thanks for that :D
4 messages moved from Raiders of the Lost Downboat‌​
Ooh, and so is mine.
I had thought it was added after the 16.04 version but apparently not.
@Zanna I feel like I could spend a decade learning zsh.
I have taken several breathtaking voyages through the initial setup and I'm still O.O
That does not sound like praise of the shell.
18:21
I think a good way to figure out what some of it is all about would be to try to write a shell program, even a really really basic and derivative one
@EliahKagan haha no it's exciting! if there's a problem, it's between the chair and the keyboard
I've never really done all that much with zsh, though I admit it intrigues me.
I'm more comfortable with my shells being simpler than C++.
:)
oh cool...
It's really handy.
I mean, it's not really a shell. Not all REPLs are really shells.
Scripting also works.
#!/usr/bin/env cling

#include <iostream>
std::cout << "Hello, world!\n";
In a sense that actually is more complicated than C++, because it supports C++ syntax, additional syntax, and "meta commands" like .q to quit and .? for help.
I'm not sure how best to reason about the complexity of shells.
Like bash, zsh, and ksh, I mean.
The complexity of a language effectively includes the complexity of its standard library. Being glue languages, shells' standard libraries effectively include all the commands that are required to be present on the system.
19:19
hmm
I think external commands should be considered at least as much a part of "the library" when writing shell scripts as the libraries customarily provided alongside other languages. After all, things one would usually do with language features in other languages are often instead idiomatically done with external commands when shell scripting.
130
Q: Why is using a shell loop to process text considered bad practice?

cuonglmIs using a while loop to process text generally considered bad practice in POSIX shells? As Stéphane Chazelas pointed out, some of the reasons for not using shell loop are conceptual, reliability, legibility, performance and security. This answer explains the reliability and legibility aspects:...

yeah, we like to use the proper tool...
19:42
Yes, though I predict that cut, paste, tr, grep, sed, awk, and perl will be provided by systemd in five years.
hahahaha
as long as they still work I guess :S
So that's the thing -- many of the external tools used commonly from shells are themselves interpreters.
A POSIX system is required to have perl.
Does that make dash more complicated than perl?
:)
o.O well that certainly sounds wrong haha
Different OSes guarantee the presence of different tools beyond those guaranteed by POSIX, as well as not always having everything POSIX says must be present (like a cd executable, lol).
In practice those "library" distinctions are very important. For example, on GNU/Linux with scripts intended to be portable across shells, there's no brace expansion, so seq is heavily used, e.g., for i in seq 1 10.
But seq isn't POSIX and isn't portable to most other operating systems.
Sorry, the program has been ported.
But it is not usually present on systems besides GNU/Linux, nowadays.
Other systems usually have jot, which is not usually present on GNU/Linux systems.
20:00
what's jot? :)
Jot is used to print out increasing, decreasing, random, or redundant data, usually numbers, one per line. The options are understood as follows. -r Generate random data instead of sequential data, the default. -b word Just print word repetitively. -w word Print word with the generated data appended to it. Octal, hexadecimal, exponential, ASCII, zero padded, and right-adjusted representations are possible by using the appropriate printf(3) conversion specification inside word, in which case the data are inserted rather than appended. -c This is an abbreviation for -w %c. -s string Print data separated by string. Normally, newlines separate data. -n Do not print the final newline normally appended to the output. -p precision Print only as many digits or charac
@Zanna Someone solved hackerrank.com/challenges/fractal-trees-all by writing a Haskell program and embedding it into their bash script.
:D
20:16
Do we have a question about performing a base conversion on a single column of input?
Should I be asking if we have that in the Downboat? (Really I should be asking it in AUGR... but I know you've seen a lot of stuff on Ask Ubuntu; I figure if we have such a question, you have likely edited it. :) )
20:34
hahaha base conversion? like to base64?
hmm... back in about 10 hours :/
20:48
Like from octal to binary.
Good night!
In this answer I used the command:
stat -c '%a %n' a b c d | perl -pe 's/\d+/sprintf("%012b", oct($&))/e'
That's pretty unwieldy, and also ad-hoc (the regular expression for columns other than the first is more complicated than just \d+).
If I post a question I'll specify the need for padding, but for ow I'm just wondering if we have any question about base conversion of a single column at all.

« first day (40 days earlier)      last day (2527 days later) »