« first day (3353 days earlier)      last day (1584 days later) » 

12:02 AM
You may have just gotten a notification from it
 
Not that I know of
 
Well I'm following you now ;)
anyway like I said I hope everything is okay in your town
 
Should it not be?
 
As I've said several times here I try not to follow the news too closely for my own sanity but I understand there is something pretty bad happening in your country right now
 
I was not actually on the island
 
 
14 hours later…
2:13 PM
ugh my coworkers really boggle my mind sometimes
Pagerduty recently updated their UI and now it has this "balloon" in the incidents area when there are no incidents
They complained about not wanting to see that balloon so now the IT department is spending time trying to figure out how to get rid of it when there are tons of actually important things they could be working on
 
 
2 hours later…
4:11 PM
@Kusalananda: Well now it will retry 400 times! :p
I reduced the number of retries though because 20 may be excessive
 
4:25 PM
@Jesse_b Yeah. That may be a good move. Also, retrying on a 404 seems a bit pointless.
 
@Kusalananda I don't know, I have some internal sites that will 404 under certain conditions but then become available automatically shortly thereafter
 
@Jesse_b Well in that case.
 
LPEG seems significantly more powerful than regexes. Though I'm not sure I want to spend more time with this. Has anyone here used something similar in another language?
 
Either due to a slow automatic failover or a service that restarted very quickly
 
@FaheemMitha "Powerful", when it comes to pattern matching, should really be "more expressive", which also means "more complicated". I doubt you need to use LPeg for whatever it is you're doing (parsing pathnames?).
 
4:33 PM
@Kusalananda It isn't about a particular task.
And that's not what I was asking, in any case.
 
I have not had the need for anything more expressive than at most PCRE in any language, no.
 
 
1 hour later…
5:55 PM
@MichaelHomer: I opened an issue with one of your tools. I'm also getting some other strange errors but I don't think that project is maintained.
I'm interested in it but if you no longer have the time to maintain it I won't bother you with them :p
 
6:34 PM
@Jesse_b Clearly I never bothered to test it on macOS and GNU expr snuck in
 
$ ./configure --prefex=/usr/local
+ V_PREFIX=/Users/jessebutryn/.local
+ S_NEXT=
+ for opt in '"$@"'
+ '[' '' ']'
+ case "$opt" in
+ echo 'Unknown option --prefex=/usr/local.'
Unknown option --prefex=/usr/local.
+ NEED_GETLINE=
+ mkdir .configure-19730
+ cd .configure-19730
+ cat
+ cc test.c
+ cd ..
+ rm -rf .configure-19730
+ echo '# Generated by configure'
+ echo 'PREFIX = /Users/jessebutryn/.local'
+ echo 'DEFINES = '
+ cat Makefile.conf
# Generated by configure
PREFIX = /Users/jessebutryn/.local
 
prefix has an i in it
 
hah
well that still doesn't seem to work
# Generated by configure
PREFIX =
DEFINES =
I get some malloc errors when trying to use the -r option though
 
Did you pull? It works for me
 
6:37 PM
The new version that fixes the problem you reported
I would not be surprised if there are problems in the actual code too
 
oh no duh I didn't even see there was a commit, I thought I had just used the option wrong
 
And indeed it also crashes for me
 
Nice yeah that works
(Well the make install works anyway)
I would say I wish I understood C so I could help identify the issue I'm seeing but I don't even understand shell well enough to know what the configure file is doing lol
Sounds like you have a mac to test it on and are seeing it as well though?
 
Yeah, I'm not sure where it's actually broken though
 
FWIW I don't get that error with the -u option but it doesn't seem to actually work as documented
 
6:46 PM
Initialise your locals, people
@Jesse_b try again now
I think -u only works alongside -r
 
-r works now, still not having any luck with -u
$ retail -ur foo6 ~/tmp/file.txt
foo1
foo2
foo3
foo4
foo5
foo6
foo7
foo8
foo9
foo10
 
./retail -r print -u follow retail.c
        printf("%s", buf[i]);
        if (i == num_lines)
            i = -1;
    }
    if (follow)
 
oh
 
Or with -f apparently. But it doesn't do anything with the normal POSIX tails it looks like
 
yeah that works
very cool and thanks for the support
 
6:55 PM
Or actually I don't know when it works, maybe everywhere except "last N lines" mode
I haven't had the right kind of logfiles to use this with for a while
 
I think my wife is trying to kill me. I'm having ramen for lunch today with some pieces of leftover chicken from last night. She covered the chicken with red pepper flakes and then gave me like 3 tablespoons of sriracha to add to the ramen
 
 
2 hours later…
9:26 PM
I'm pretty sure I've asked this before but does anyone know of a canonical Q/A for getopts?
 
10:19 PM
@Jesse_b Here's one candidate: unix.stackexchange.com/questions/20975/…
 
@Kusalananda Nice thanks
 
None of the answers are very thorough, but they have lots of upvotes.
... possibly because it's an old question.
@Jesse_b I can't seem to find a really good one though.
 
@Kusalananda You could always add a really good answer to that one :p
 
@Jesse_b That particular one asks about long options too. I'm not really aware of how to do those properly, as getopts doesn't support them and I've never had any need for using them.
There's getopt that supports long options (see here), but I've never used it.
 
Some of my old scripts just use while (($#)); do and then case with -a|--a-long-opt)
but I have gotten rid of them in everything worth updating
and cringe at the sight of my old code
 
10:27 PM
"at the site" was funnier.
 
Stéphane has a getopts that supports long options
 
@Jesse_b Yes. Well, you could point people to that, but then you would have to explain how to use it too, and he might change it.
 
And I would have to learn how to use it :/
 
That too
 
I think people wanting to use long options for their script should be gently encouraged to use another language
by force
 
11:03 PM
@MichaelHomer: that retail utility should really just become the standard
 
It's POSIX-compatible, you can swap it in
 
@MichaelHomer Yeah but I mean all distributions should ship with it. No need for the old tool
 
I wish you luck in your lobbying efforts
 
I'm getting that malloc error again if I pipe to it though
only when using -r and -u together
$ cat ~/tmp/script.sh | retail -r 'case' -u 'esac'
retail(25362,0x107305dc0) malloc: *** error for object 0xc00007fa53e4018d: pointer being realloc'd was not allocated
retail(25362,0x107305dc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
the same command on the file works when not used through a pipe though
 

« first day (3353 days earlier)      last day (1584 days later) »