« first day (3912 days earlier)      last day (1034 days later) » 

6:18 AM
@jesse_b It's a bit bananas.
 
 
2 hours later…
8:20 AM
@jesse_b damn :D
when those are beautiful:
"Two beautiful things in Unix:

1. Pipelines, and
2. The pattern-action mechanism of awk."
confirms that he loves one liner
@PrabhjotSingh actually we all are saying this to him everytime since he was started with his first answer
 
 
1 hour later…
9:45 AM
@αғsнιη You just haven't seen how I write pipelines and awk programs ;-)
 
10:07 AM
If there are pipelines, plural, then it can't be a one-liner.
 
@AndrasDeak Oh? cat fifo | wc -l & grep pattern | sed expression >fifo
 
I see two pipe lines
 
Yep, on one line.
 
That makes 3 lines total.
 
Huh?
 
10:16 AM
:D
There's an old joke here. "How many ends will a stick have if you break it in two?" "Five, because there will also be an end to the stick."
 
I never understood one-liner though. Why write unreadable code when it's easy to write code that is both readable and beautiful?
 
Yeah, line count is never the right metric. One might use one-liners in private interactive work just to get it done quick, but posting crap like that on an SE site for noobs to see is very different (something something between four walls)
 
I'd guess for some people one-liner actually means a simple command or a single pipeline (with pipes connecting simple commands).
"A solution that's easy to remember and to type, please" -- regardless of how complex a problem is (theoretically).
The POV of who loves solving problems v. that of who wants to see problems solved.
 
10:45 AM
@Kusalananda : )
Technically one-linear (from my point of view) means execute a commnad and only once and get all what I needed for, no future processing or anything else with some other commands
 
@αғsнιη That's a once-liner :-)
 
11:42 AM
@Kusalananda Because I only want to do it once and don't want to write a script into a file for it?
One-liners are for the command line, not for scripts.
 
I write multi line commands for the command line too
If it is so long that my terminal starts to wrap that is a no go
"one-liners" are only cool if you come up with a nifty way to perform a task in under 80 characters
 
Oh, ah. Yeah, I don't. My "one liners" regularly span 4 or 5 lines on the terminal.
 
I often try that and sometimes succeed but I always end up missing a quote or a ; somewhere and find it too hard to keep track of things when it gets too long. If I'm writing a loop for example I just hit enter after the do and let it span multiple lines
 
Makes sense. I guess I'm used to it.
while read id; do ( acd $id && ( if [[ -e sentieon ]] && grep -q TNscope sentieon/log; then sname=$(id2sampleId "$PWD"); grep -oP 'COMMAND\s*\K.*' sentieon/log; echo 'rm sentieon/!(*bed)'; echo "rm -r sentieon scratch/sentieon preprocess; mkdir -p sentieon preprocess"; grep -oP  'COMMAND\s*\K.*' preprocess/log; fi ) | sed 's|/ref/|/devel/|g' | sed -E "s/(--tumor_sample ')[^']+/\1$sname/" | sed -E "s|'(\S+)/[0-9]*.bed'|\1/*.bed|" | perl -pe 's|\d+\.1\.vcf|sentieon/variants.tmp.vcf|; s|\d+\.2\.vcf|sentieon/variants.vcf|; END{print "bgzip sentieon/*vcf
That kind of thing...
 
11:57 AM
 
Yeah, welcome to my world :)
Heh, my longest "one liners" ara almost 1000 characters:
$ sed 's/^ *[0-9][0-9]* *//' ~/.bash_history | awk '{print length($0)}' | sort | tail
996
996
998
998
999
999
999
999
999
999
 
what does the sed do in that?
I've got you beat
$ awk '{l=length($0); if (l>m) {m=l}} END {print m}' ~/.bash_history
1145
 
I've got 618 and I'm decently sure that one was a paste mistake.
 
@terdon @terdon mygod, is that one liner? if so, then I have a same one liner that is almost liner than yours. LOL
 
$ awk '{sum+=length($0)} END {print sum/NR}' ~/.bash_history
25.6502
 
12:12 PM
@jesse_b 😂😂😂😂
it's more like to me that we need to open a meta question 😂😂
 
my longest line was just me echoing some json data so I could pipe it into a json parser
 
@jesse_b echoing input is part of a liner?
no that is not fair then
 
Good
 
@jesse_b how you find these, I found you always have pictures for every situation :D
 
I have 2.9 GB of pictures saved, sometimes I get them from the web
 
12:21 PM
Ohhh, but how do you search for them? you have text in their name? for easy finding?
 
@αғsнιη I just sort of know where in the directories they are generally
 
@jesse_b removes the leading numbers from the history file.
@jesse_b Ha! Nice :)
@jesse_b Home:
$ awk '{sum+=length($0)} END {print sum/NR}' ~/.bash_history
34.7254
Work:
$ awk '{sum+=length($0)} END {print sum/NR}' ~/.bash_history
62.0162
 
hah
my work is 61.646
 
length() is short hand for the length($0) : )
 
12:33 PM
yes
 
12:52 PM
clearly terdon worries not about things being short
 
1:16 PM
The `zsh` history format in my `~/.zsh_history` has a 15 chracter prefix on each line. Removing this I get the following
```
% awk '{sum+=length -15} END {print sum/NR}' ~/.zsh_history
26.2015
```
That's an average over 8080 commands in the history. The median is 19.
 
code fences don't work in chat, nor can you mix code blocks and text, alas
 
Well, you see what I mean anyway.
 
1:57 PM
I just got a really weird error when trying to backport Scipy to Debian stable/buster.
Any idea what might be going on here?
The bit where things really go off the rails appears to be:
    PYTHONPATH=$PYLIBPATH make -C doc html PYTHONPATH=$PYLIBPATH PYVER=3)
building docs using PYLIBPATH=/usr/local/src/scipy/scipy-1.6.0/.pybuild/cpython3_3.7_scipy/build
make[2]: Entering directory '/usr/local/src/scipy/scipy-1.6.0/doc'
fatal: not a git repository (or any parent up to mount point /usr/local)
Searching for the error message suggests this results from trying to run A Git command outside a Git repository.
The setup.py does appear to be calling git. I don't understand why, though.
 
2:20 PM
@FaheemMitha yes, that's what the error refers to
What exactly is this backporting business about? Just out of curiosity.
 
It's probably trying to call git to get version information to bake into the build.
The easiest way around this is likely to just check it out from git rather than unpacking a tarball or w/e you did to get the source, although usually tar source releases have that sort of version information precomputed so the build process doesn't need git...
 
the doc building checks whether the installed version of scipy is the same as the current git commit
 
I'll never not read that as "spicy"
 
 
2 hours later…
4:37 PM
@AndrasDeak @ToxicFrog Sorry, poor job of contextualizing.
I was just trying to rebuild the Debian sources from unstable on stable.
This should not fail, provided the build dependencies are satisfied.
In particular, Debian sources aren't Git repositories.
So there is no way that assuming that they were would be successful.
 
Check the spec file, or whatever debian uses, to see if there's special build instructions?
E.g. there may be a command line argument or envar needed to pass the version explicitly rather than assuming it'll be inferred from git.
 
@FaheemMitha just for scipy? What is the goal, to install scipy? Is there a benefit from going through the package manager?
 
 
1 hour later…
6:12 PM
35
Q: How can I install more recent versions of software than what Debian provides?

Faheem MithaSuppose I want a more recent version of software than is available for my current version of an operating system, what can I do? Cases to consider: There are semiofficial/official sources of additional packages available for that version of the OS. E.g. backports.org for Debian or PPAs for Ubu...

@AndrasDeak The goal is to upgrade Scipy because Pandas insists on it.
And I hope you don't want to have a discussion about the merits of package management, because I don't. I've had it far too many times.
 
No, I meant to ask why you don't just pip install scipy
 
6:37 PM
presumably your pandas is already pip installed otherwise the packages would be consistent (I hope/expect)
 
6:57 PM
@AndrasDeak No, neither Pandas nor Scipy is pip installed.
@AndrasDeak The packages are consistent, of course. I'm trying to upgrade Pandas.
 
7:13 PM
Also by backports? I see.
So let me ask what I meant to ask: why don't you just pip install both?
sounds like you have a hammer, trying to handle some screws
 
 
3 hours later…
10:43 PM
wow, after all this one liner talk I think @Kusalananda hopped on board. He just suggested a one liner to a user, and not just that...it contains eval!
:)
 
he's become an evalgelist
any code is a one-liner if it's a string with newlines inside eval
 
@jesse_b In this particular case, the one-liner is a one-liner due to the restrictive format of the comment. It is also safer than the user's code, in terms of quoting.
 
:) I'm just busting chops
 
11:11 PM
c\
a\
t\
 \
f\
|\
g\
r\
e\
p\
 \
.
One-liners are so passé.
 
Starred it just to see how it would render on the starred list
 

« first day (3912 days earlier)      last day (1034 days later) »