Top
Best
New

Posted by zoidb 7 days ago

Twelve Days of Shell(12days.cmdchallenge.com)
258 points | 86 commentspage 2
bluecalm 7 days ago|
It looks very nice. One problem I've encountered is that when you make a mistake then the name of the file you have to use disappears and it's impossible to get it back. What is this website created with btw? I like the style a lot.
ilvez 7 days ago||
Constantly hit Ctrl-w and close the tab. Ctrl-Shift-Tab to get back to it :-) God bless saved state, otherwise I would not have completed :D
Barathkanna 7 days ago||
Fun idea. It’s basically an Advent calendar for shell one-liners. Nice way to level up your CLI muscles without diving into full projects.
jll29 7 days ago|
Neat.

Perhaps it would be even nicer if the "advent" theme was more prominently present, e.g. using the Bible as the target data file to be used.

Here's three examples tasks from me:

(1) Write an sh script (using only POSIX standard commands) to create a Keywords in Context (KWIC) concordance of the new testament.

(2) Write a bash script that uses grep with regular expressions to extracts all literal quotes of what Jesus said in the New Testament. [Incidentally, doing this task manually marked the beginnings of philology and later automating it marked the beginning of what was later called literary and linguistic computing, corpus linguistics, computational linguistics, and digital humanities.]

(3) How many times is Jesus mentioned by each of the four accounts of his life (Matthew, Mark, Luke, and John)?

(You may begin by extracting the New Testament from the end of the Bible with a grep command.)

Dataset: https://openbible.com/textfiles/kjv.txt

chrisweekly 7 days ago||
Respectfully, many would find that off-putting. "Advent of X" in tech is entirely decoupled from religion. Keeping it neutral seems to me the "nicest" approach. That said, something like what you described might be a cool exercise for your bible study group. Finally, I appreciated your "incidentally" aside about the origins of philology.
lo_zamoyski 7 days ago||
I'll preface this by saying I was never especially bothered or moved by the non-religious use of "Advent of X", for better or for worse. In fact, my remark is inspired only by your comment, concerning its consistency and who has the stronger case.

Specifically, while it is true that certain kinds of words can become decoupled from their original meanings (which is generally normal), in this case, the usage is not so decoupled, especially given that this usage occurs during the religious season of Advent and with the intentional allusion to the religious season of Advent. (Otherwise, what is "Advent of X" without its religious origin and which takes place at the exact same time during the year?)

You can make a much stronger argument that the non-religious usage is a kind of cultural appropriation. That would make your concern entirely backwards. Your wish is to keep it "neutral" to please those who don't practice Advent, as you show a simultaneous lack of concern for the tradition it appropriates from. This involves a tacit claim of possessing the authority to do so as well, but if anything, given the source, if anything, the authority belongs not to the appropriators, but to the Church.

One wonders how a "Ramadan of Code" or "Teshuvah of Shell" would be received.

"Neutrality" is, of course, a bunk concept, and the idea that we ought to be guided by what is "nice" rather than what is "good" is a grave misunderstanding of how decisions ought to be made.

chrisweekly 6 days ago||
Thanks for the response. I don't intend to get into a protracted debate here, but would like to point out that the winter solstice holiday we call "Christmas" was itself appropriated from various traditions, esp. "Saturnalia" as practiced by the Romans. In modern times, countless non-religious homes in the US feature "advent calendars", with tiny treats hidden behind numbered doors. They -- like santa, elves, gift-giving, and "christmas" trees -- have nothing to do with Christian orthodoxy.

By all means, you should do what you think is "good". That's what I strive to do. My comment about "nice" was literally quoting you, so in trying to take me to task for that, as with your broader point, you've missed the mark. I don't think your hypocrisy is intentional, but I do feel good about pointing it out.

Have a nice day and holiday season! :)

kwar13 5 days ago||
#11 was confusing as hell: this is what worked 'grep -R 'piping' ./place-for-pipers | cut -d: -f2-'

only content no filenames. Need to see the output if it's wrong to baseline what's being asked.

haolez 7 days ago||
The way that worked for me to properly learn shell is to do a non-shell project with it.

Like, do a complex background worker for a web server that listens to a socket, does complicated stuff, exports functions (if in Bash), etc.

You don't have to use it afterwards. The value is in the journey. It's fun :)

sannysanoff 7 days ago||
Fluent in shell, but cultural context is more difficult, especially with pipers, had to do guess work.
ggirelli 7 days ago|
I think that's part of the fun :)
cornonthecobra 7 days ago||
It doesn't handle backspace correctly. The character is erased visually, but not removed from the buffer, so when you type the next character, the erased character reappears. Make one typo and you have to reload the page.
6LLvveMx2koXfwn 7 days ago||
"Try sending the command ls in the command box to list all files in the directory."

  My answer: `ls -a`
er, wrong. Then don't put all in the question!
naikrovek 7 days ago||
I use the shell all day every day and I got stopped at the SECOND question.

"lines that contain 'laugh'". lines of what? Doesn't tell you without looking at the answer.

genius.

FailMore 7 days ago|
How would one make a true shell in a website like this one? (As in, is there an open source library to host an interactive shell for educational purposes - eg codecademy)
ctippett 7 days ago|
I couldn't tell you the exact details (I'm only passingly familiar with how it works myself), but you'd almost certainly want to start by looking into web assembly.

I found a-Shell's documentation[1] quite interesting, it describes their use of web assembly and offers some practical tips for compiling stuff so it can work in a sandboxed environment.

[1]: https://bianshen00009.gitbook.io/a-guide-to-a-shell/lets-do-...

More comments...