7:02 AM
@Nasser if you would print out the pdf it would be unreadable. On screen a reader could zoom - but if the equations are read only on screen you could also simply make the paperwidth 3m wide and left align the equations, then the reader would not have to zoom in and zoom out all the time.

1 hour later…
8:15 AM
@egreg @Nasser Is there a reason for not collapsing \sqrt{a}\sqrt{x} into \sqrt{ax} (and I apologize if it's been discussed before)

9:11 AM
If the command called by \immediate\write18 returns an error, how do I get that error passed on to TeX?
Did a search, didn't find anything.
This is actually a common problem calling across languages.

@FaheemMitha that's complicated. You better redirect both STDOUT and STDERR to files and then scan the files

@yo' Ugh.
Perhaps I should use Lua then?

@FaheemMitha no idea, I've never been solving this.
I just remember how annoying \tikzexternalize knows to be if there's an error.

9:29 AM
@yo' Ok, trying Lua.
One thing I do know is that Lua returns a error, TeX will stop.

@FaheemMitha It doesn't
@FaheemMitha Remember, \write18 could be disabled or whatever anyway
@FaheemMitha os.execute()?

@JosephWright What doesn't what?
@JosephWright In this case, the error doesn't get passed to Lua. :-(
It sucks that something so simple and basic doesn't have a clean solution.

@FaheemMitha \write18 does not 'return' anything: from a TeX Point of view this is just 'stuff happens'

@JosephWright I guess that's reasonable, from TeX's perspective.
Given that it isn't a "normal" language.

@FaheemMitha Yes it does: local errorlevel = os.excute("<whatever>") gives you the error level

9:40 AM
@JosephWright Error level?
You mean Unix error codes or similar?
Checking...

@FaheemMitha I mean errorlevel :)

In any case, you'd have to explicitly handle it, because Lua happily continues regardless.

@FaheemMitha The error level is the status returned by a program

@JosephWright I don't know what that is.

@FaheemMitha Well yes, of course

9:41 AM
@JosephWright Some Lua-specific thing?

@FaheemMitha assert(os.execute("<whatever>") == 0)
@FaheemMitha No!

So os.execute would suffice to stop the program if there is an error?
@JosephWright Hmm. I've kind of learned to hate Lua's assert, because it always seems to get in the way. And hides messages.
@JosephWright I'd much prefer it was handled automatically.
assert(os.execute("foo") == 0)
Gives
sh: 1: foo: not found
lua5.3: foo.lua:4: assertion failed!
stack traceback:
[C]: in function 'assert'
foo.lua:4: in main chunk
[C]: in ?
I guess the first line is coming from the shell.

10:07 AM
@FaheemMitha Correct.

Hi @HaraldHanche-Olsen

@FaheemMitha Hi. Sorry, I'm off to lunch, can't talk …

10:35 AM
@FaheemMitha How? The entire thing here is that os.execute does arbitrary stuff. An assertion is the classical way to deal with 'this can't happen' situations, in which case the error is low-level but better than total loss of control.
@FaheemMitha If you want control of what happens, you have to do it
@FaheemMitha Remember that neither Lua nor any other language can 'know' what is going on when you call a shell function

@JosephWright A reasonable default would be if whatever code is inside os.execute throws an error, the error is propagated.

@FaheemMitha That's what errorlevel is

Assuming that Lua knows something about shell. Though I don't think that standard output/error as such exotic concepts.
@JosephWright Well, I'll read what the Lua docs say about this.
Python can do it by default, with the subprocess library.

@FaheemMitha Lua can't know what the right approach to an error is: most of the time, the programmer is likely to want to handle it themselves
@FaheemMitha Good luck with that: on Windows, there's just the terminal to return information to

@JosephWright Yes, but a default can always be overriden. A reasonable default would be to propagate the error, imo.
@JosephWright Happily, I'm not on Windows.

10:38 AM
@FaheemMitha Only because you are looking at this from your own POV
@FaheemMitha I suspect a lot of things don't differentiate error and output: if your process is dying, just printing 'Argh' is reasonable

@JosephWright I think that's what one wants most of the time. At any rate, you want the calling process to stop. Otherwise the error can easily be ignored.

@FaheemMitha I really don't see what's wrong with checking the errorlevel and issuing a reasonable message if it's non-zero: we have that a lot in l3build
@FaheemMitha But again, that's just a question of using the return value

@JosephWright Nothing is wrong with it. It's just suboptimal, IMO. But since you clearly feel differently, let's agree to disagree.

if os.execute("<whatever>") =~0 then
print"(AARGH")
os.exit(1)
end

@JosephWright Yes, I understood that part. That's also how one would handle it in C/C++ .

10:41 AM
@FaheemMitha Lua's pretty lightweight, and here the docs say that os.excute() is basically C's system()

@JosephWright "AARGH" is less than informative. Possibly the best a limbic system can do, though.
@JosephWright Oh, ok.

@FaheemMitha It's a holder: I meant something like if I was trying to copy a file and it failed, I'd say 'Could not copy file X from Y to Z', or something similar: depending on the context, the user might not even know about file X

BTW, have you stopped writing blog entries?

@FaheemMitha No, it's just a question of inspiration

@JosephWright Ok, understood.
@JosephWright Ah.

10:43 AM
@FaheemMitha We have some LaTeX changes that are likely to feature (@DavidCarlisle, @egreg, @PhelypeOleinik, @MarcelKrüger, @UlrikeFischer)

@JosephWright Feature in a blog entry?

2 hours later…
12:30 PM
@JosephWright ooh secret plan

1 hour later…
1:51 PM
In other news, you guys know that arara ships with the animate rule, right? One can create animated GIFs from PDF documents with
% arara: animate: { delay: 15, density: 150 }
4
:)

@PauloCereda Are you implying that "arara rules"? ;-)

@PhelypeOleinik soon. :)
@PhelypeOleinik coming soon, % arara: l3build
:)

@PauloCereda Ooh :-)

@PhelypeOleinik I remember a bloke once trying to invoke arara from arara...

@PauloCereda % arara: make-me-some-coffee

2:01 PM
@PhelypeOleinik yes! :)

@PauloCereda Why was that?

@PhelypeOleinik have you seen the grand finale of my TUG talk, right?
@PhelypeOleinik no bloody idea. :)

@PauloCereda I saw the talk, but I don't remember the specifics. I know David made a cameo in the middle :-)

@PhelypeOleinik youtu.be/g9vx2k9G_6k?t=1521 SOUND ON PLEASE
@PhelypeOleinik I clearly remember David was so happy
Jul 20 '18 at 15:22, by David Carlisle
you are bonkers

@PauloCereda I think everyone will remember that :-)

2:04 PM
@PhelypeOleinik :D

@PauloCereda Do you know if this year's talks were recorded? I'd like to see Mr. Velociraptor's...

@PhelypeOleinik ooh
@PhelypeOleinik I saw Ross and Chris, but I am not sure about the rest. Will investigate.
@PhelypeOleinik meanwhile, Sony stops producing PS4 in our land and the price drops down 100 bucks...

@PauloCereda Thanks :D
@PauloCereda Shouldn't the price rise? .-.
@PauloCereda Still, too expensive for my taste

@PhelypeOleinik it is
@PhelypeOleinik I don't know how economy works
Also, politics

@PauloCereda Both of us :-)
@PauloCereda I just thought that if we produce something, that automagically becomes cheaper, since there are less importation taxes and so on...

2:13 PM
@PhelypeOleinik Indeed. One thing that most people do not know is that videogames are considered gambling by Brazilian law, so there's a huge tax applied to them.

@PauloCereda I don't know why, but every sentence I saw that contains "Brazilian law" has something absurd in it :-)

@PhelypeOleinik you don't say. :) Ask @yo' for his impressions. :)

2:32 PM
@PauloCereda You mean e.g. the fact that bamboo is protected despite it's basically weed.

@yo' :)

@yo' Probably because of the Pandas we have here :P

@PhelypeOleinik ooh

Or the strict transaction surveillance

3:04 PM
Signs you might not be emailing a real person: the email you sent apologizing for misspelling their name gets an identical response to the one you sent with the original information.
3

@PauloCereda That's an idea for a TUG talk: “Recursive arara considered harmful”.

3:23 PM
@HaraldHanche-Olsen :)

3:42 PM
@HaraldHanche-Olsen arara recursion astounds rookie adepts

@egreg What is a "rookie adept"?

4:25 PM
@FaheemMitha It seems to be a contradiction in terms. Like an inexperienced expert.

@HaraldHanche-Olsen Yes, that was my initial reaction too.

4:37 PM
@FaheemMitha but it fits the recursive acronym …

@HaraldHanche-Olsen It does?

@FaheemMitha Just look at the initial letters of the sentence (in italics).

@HaraldHanche-Olsen Oh

5:44 PM
@JosephWright Does this fail for you with xetex? Copy cmr10.tfm in the working directory.
\filedump offset 0 length \filesize{\jobname.tex}{\jobname.tex}

\filedump offset 0 length 26 {cmr10.tfm}

\bye
@JosephWright It fails at byte 26, apparently.

5:56 PM
!error: snprintf failed: file ../../../texk/web2c/lib/texmfmp.c, line 3326

6:45 PM
@egreg fails for me too. But only in texlive, in miktex it compiles.

6:58 PM
@egreg I was trying to implement \filedump in that answer. It fails with a slightly different error (snprintf failed: file .\lib/texmfmp.c, line 3351). TeXLive on Windows.
@egreg In Linux the error is the same :/

7:29 PM
@PhelypeOleinik -- There was no recording equipment onsite at the meeting. Ross was connected in by Skype.

@PhelypeOleinik but this makes the markt nervous, and then rules stops applying

7:56 PM
@barbarabeeton Too bad... I believe the articles will be as good as the talks, so they will do. Thanks for the info :-)
@yo' That's a good definition ;-)

8:20 PM
@AlanMunn but i'm from ostraya
@StefanKottwitz it's a gross porn thing isn't it

@tjt263 So you don't fit the joke, I'm afraid. Somehow "Aussie 1 2" doesn't have the same ring to it. :)

9:03 PM
@AlanMunn i missed the joke i thought you just had sound engineer friends all over the world or something