« first day (3129 days earlier)      last day (1809 days later) » 
00:00 - 21:0021:00 - 00:00

9:00 PM
Election results time ...
 
Though that isn't one of the listed catcodes, so I'm not sure what it means. But it's probably not important?
 
@FaheemMitha \active = 13: saves a token
 
@JosephWright You too? We just got that dreadful bearded freak re-elected.
I probably shouldn't say we. Let's say, the Indian people.
 
@FaheemMitha Just started on BBC1: we (probably) shouldn't even be involved in this election ...
@FaheemMitha Results will be very spread out: UK ones not until at least 2am here
 
@JosephWright That's gibberish to me right now. But it's not important. Still trying to debug my LuaTeX file.
@JosephWright We?
 
9:02 PM
@FaheemMitha If you have \catcode95 13, you need tokens [space], 1, 3, but if you have \active it's only one
@FaheemMitha UK: it's European elections for the EU, and we were supposed to have left ...
 
@JosephWright Oh, sorry. Somehow I had the impression that the UK was having general elections. But I guess not right now.
 
@FaheemMitha Not just yet, though we have to see what happens with new Prime Minister and of course Brexit ...
 
I hear the PM is resigning, so I guess that's in the offing. Unless I'm mistaken.
 
@FaheemMitha Almost certainly not, at the moment: it would royally mess up Brexit (even more than it already is)
 
@JosephWright Something to look forward to.
 
9:05 PM
@FaheemMitha Er ...
 
I hope you get someone less frightful than here. Indian politics continues to get plumb new lows.
I'm just worried what the freak will think of next.
@JosephWright I was being facetious.
You know it's bad when the Congress looks good.
Can someone point me to a basic ground-level explanation of how labels/references work in LaTeX? My switch to LuaTeX seems to have broken something.
My recollection is pretty sketchy, though I know it involves the aux file.
 
@FaheemMitha "have broken something" is not a sensible description.
 
@FaheemMitha \label writes to the .aux file. On a subsequent run, that is read at the beginning of the document and used to 'store' information which is picked up by \ref
 
@UlrikeFischer That's the best I can do right now, because I don't know what's happened. All I know is that a reference is not being generated correctly.
@JosephWright That's helpful. Can you point me to a description with a bit more detail?
 
@FaheemMitha you don't need to know what happens, you only need to show code instead of vage descriptions.
 
9:24 PM
@UlrikeFischer I could try and produce a MWE, but it won't be very M.
 
@JosephWright ooh :)
 
@JosephWright -- Received. Thanks. Comments on their way back to you.
@JosephWright -- Is it likely to be compatible with TeX Live 2016? (That's the version still being used at AMS, or at least it was as of the day I left, with no upgrade path defined.)
 
9:39 PM
@barbarabeeton Yes, I think so: the solution is based on an existing package, we are just fixing a few issues in edge cases, and then looking at integrating into hyperref proper
 
@JosephWright -- Great! Thanks -- I know a few people who will be very happy when this works.
 
@barbarabeeton a merry quack from a cold Brazil!
It's a freezing 18C!
 
@barbarabeeton what do you mean by "compatible"? Binaries are probably not a problem, but you will need newer versions of e.g. expl3 and hyperref, so it won't work with a "pure" tl2016.
@PauloCereda we had nice warm 20C.
 
@PauloCereda -- Quack to you too. Oh, my -- that's very close to the temperature here, and it's time to open the windows for summer. I've switched into t-shirts instead of turtlenecks for the season. Poor chilly duck.
 
@UlrikeFischer ooh it's cold!
@barbarabeeton uh-oh, it's starting to get cold. :)
@UlrikeFischer: /Threema poke
 
9:48 PM
@UlrikeFischer -- As long as those "extras" don't cause everything else to go south, they can probably be requested explicitly. Broken urls are a real pain.
 
@PauloCereda ;-). We had brazilian champagne to celebrate our chess team's promotion:
 
@UlrikeFischer oooooooh
 
10:43 PM
So, the problem appears to be that I passed a * argument to Lua, and it appears to not have been expanded. On the Lua side, it says \BooleanFalse, which is correct, in the sense that "false" is correct. But it needs to be Lua's 'false'.
In a nutshell, how does one pass a TeX Boolean to Lua?
It looks this might be relevant
11
Q: Querying the state of a boolean from lua

Ulrike FischerI can query and use the states of counts in lua without problem. But now I'm wondering how to at best do it with booleans. I have been looking at the token library but it seems not to allow to get and compare the content of a command. Has someone a good idea? \documentclass[parskip=half-]{scrart...

But it contains LaTeX 3 code, which is still mostly gibberish to me.
Actually, I'm not sure it makes sense to expect it to be expanded. Because, what would it be expanded to? It's clearly not text.
@UlrikeFischer It's your question (and answer), so if what I'm saying is understandable to you (clearly, not a given) would you care to comment?
If not, I guess I could ask a question. An example would be simple enough.
Oh, I'm wrapping it as a string. Perhaps I should try without.
No, that probably doesn't make sense either.
 
@FaheemMitha didn't you ask the same thing the other day? you need to write something like \IfBoolean{#1}{1}{0} to pass 1 or 0 to Lua
 
@DavidCarlisle I don't think I did, actually. Or if I did, I don't remember.
But yes, I guess that would work.
 
@FaheemMitha as Joseph said the other day....
May 22 at 21:41, by Joseph Wright
@FaheemMitha They are not just 0 and 1, they are \chardef'd, so not expandable: you really want to pass using something like \IfBooleanTF #1 { <true marker> } { <false marker> }
 
@DavidCarlisle Oh, right. I'd forgotten about that. That was the "very strange thing" I was doing.
 
(I missed the TF from the command name:-)
 
10:58 PM
May 22 at 21:43, by David Carlisle
@FaheemMitha You haven't shown what you are doing but it sounds like you are doing something very strange:-)
@DavidCarlisle Pardon?
 
compare my answer and Joseph's (his was right:-)
 
@DavidCarlisle Ok.
 
@FaheemMitha \IfBooleanTF{#1}{1}{0} not \IfBoolean{#1}{1}{0}
 
@DavidCarlisle Right, got it. Thank you.
\IfBooleanTF is in xparse. I forget, does that make it LaTeX 3?
And is it worth asking a question about this? There doesn't seem to be much out there. At least not much that is comprehensible to my tiny brain.
It's simple enough to come up with an example with starred commands. Or whatever they are called.
 
@FaheemMitha it's written in expl3, but not really latex3 but that's not a well defined thing.
 
11:03 PM
@DavidCarlisle Ok.
 
@FaheemMitha you could ask but not sure much to gain as you have the answer,
 
Would Lua recognize 0 as false, then?
@DavidCarlisle For posterity. Aka someone who is trying to find the answer.
That's at least in part what SE is supposed to be about.
I see it's now printing 0 at the Lua end...
 
@FaheemMitha yes but you can write false if you prefer as always there is no magic passing of values you are just generating Lua code as a string, so just write out whatever Lua code you want to write
 
@DavidCarlisle Ok.
So \IfBooleanTF{#1}{true}{false}?
Presumably these don't get wrapped as a string?
 
@FaheemMitha ? nothing gets wrapped as a string automatically, as I just said above you are writing Lua code, if you want to generate a string then you need to use string syntax [[ or " or whatever.
 
11:09 PM
@DavidCarlisle Yes, I realise that. My point is that the 1 and 0 aren't getting passed through as strings, presumably.
Would they be interpreted at the Lua end as integers, then?
 
@FaheemMitha they are not passed through as values at all, they are just the characters 0 and 1 as part of a Lua code fragment, they could be part of a variable name foo0 or foo1 it all depends what Lua syntax you are writing around the \IfBooleanTF{#1}{1}{0}
 
@DavidCarlisle Ok. Well, I checked. It's getting interpreted as a number on the Lua side. I guess that's what it does with the 1 and 0 characters.
 
@FaheemMitha but only because you generated a lua fragment where 0 is interpreted as a number, if you wrote it as part of a string it would be a string, or as I say it could be part of a name or any other Lua construct
 
Hmm, changing to boolean seems to have fixed my issue.
@DavidCarlisle Yes, I understand. In some ways, strong typing is more comforting.
I don't understand why 1 and 0 wouldn't work, though.
 
@FaheemMitha strong or weak typing is not the issue. even in a strongly typed language you need to parse the input syntax so it does not make sense to ask what a single character out of context means.
 
11:20 PM
@DavidCarlisle This is strange. Using 1 and 0 doesn't work the same as true and false.
Which is contrary to what I would have expected.
 
@FaheemMitha yes sorry you need true and false not 1 and 0, lua wiki says "An important point to note is that the value 0 is not a false test condition in Lua. In some languages, for example C..."
 
<faheem> I'm seeing some unexpected behavior here with booleans. Shouldn't the integers 1 and 0 work as the booleans true and false in (at least) and/or type expressions?
<LordRyan> the only two values that work as a "false" condition are `false` and `nil`
So apparently not. I wouldn't have expected that, though I don't know what other languages do.
@DavidCarlisle What page is that?
 
just landed on there by google
 
@DavidCarlisle Ok. Thank you.
@DavidCarlisle Has this question been asked before?
 
@FaheemMitha it's a lua syntax question so more or less off topic here
 
11:27 PM
@DavidCarlisle Not that. Passing a bool from TeX to Lua.
And the Lua question would fail the threshold of triviality, anyway. Seeing as it's a documented feature.
 
@FaheemMitha you never pass values, you just write a string with lua syntax so the only question is the lua syntax for true
 
@DavidCarlisle It's not as blindingly obvious as you make it sound.
I think it would be a reasonable question, if it wouldn't be a dupe. Or course.
 
@FaheemMitha you may note I give the same answer to all your questions as I think you are thinking of this the wrong way. Forget luatex you could ask the same thing using pdftex how to \write a file with lua syntax, that is there is no special tex-lua connection you are just asking how to write lua.
 
@DavidCarlisle Yes, I get that ultimately it's just about writing characters somewhere. To be interpreted by what is going to interpret it.
 
00:00 - 21:0021:00 - 00:00

« first day (3129 days earlier)      last day (1809 days later) »