« first day (3209 days earlier)      last day (1726 days later) » 

4:42 AM
@ShreevatsaR I'm curious: Do you use literate programming tools regularly?
 
 
4 hours later…
9:05 AM
@JosephWright ^^ new game :)
 
 
2 hours later…
10:59 AM
This new document from Hans about new features in ConTeXT/MetaFun could be interesting for others inhere.
4
 
11:20 AM
@texdr.aft no I don't use literate programming much... though a couple of times I did give it a shot (with org-babel) and it was actually fun
 
 
1 hour later…
12:27 PM
@mickep Does Hans Hagen do consulting for document typesetting professionally?
 
@FaheemMitha I think you could look at pragma-ade.com to see what the company offers.
 
@FaheemMitha yes that's what context was developed for
 
Ok. Well, nice to know someone is making a living from TeX.
 
@FaheemMitha anyone working for overleaf for example, not to mention the people listed here tug.org/consultants.html
 
12:44 PM
@DavidCarlisle Oh, there's a list.
 
 
3 hours later…
4:00 PM
@FaheemMitha @HenriMenke is an expert on that
 
@Aditya Ok. I see you actually tried running it with luatex. I didn't try that.
faheem@orwell:~/test-latex$ luatex julia.lua
julia.lua:11: failed to find function/global jl_init
 
You need julia header files in the lib path (don't remember the details). Also note that Julia has changed quite a bit since that blog post was written
 
4:17 PM
24 hours ago, by Paulo Cereda
@FaheemMitha I haven't seen the example in Aditya's page, but I am almost sure it's a LUA_CPATH issue. Regardless, try texlua instead of lua and see if it works for you.
 
@Aditya Ok.
 
@FaheemMitha Based on github.com/JuliaLang/julia/issues/28824, it appears that the symbol jl_init has changed to jl_init__threading
So the following works

    local ffi = require("ffi")
    local JULIA = ffi.load("julia", true)

    ffi.cdef [[
    void jl_init__threading(void);
    typedef struct _jl_value_t jl_value_t;
    jl_value_t *jl_eval_string(const char*);
    ]]

    JULIA.jl_init__threading()

    code = [[
    x = [1 2 3]'
    A = [1 0 1; 0 1 1; 1 1 0]

    y = x'*A*x

    print(y[1])
    ]]

    JULIA.jl_eval_string(code)
(What is the formatting language for chat? Markdown doesn't seem to work
 
@Aditya Paste code-only in the box, then click the "fixed font" button that appears. For inline code, backticks work.
 
4:37 PM
@Aditya Ok, I'll try that, thanks. Were you planning to update your blog entry?
@Aditya RROR: could not load library "/usr/lib/x86_64-linux-gnu/../bin/../lib/x86_64-linux-gnu/julia/sys.so"
/usr/lib/x86_64-linux-gnu/../bin/../lib/x86_64-linux-gnu/julia/sys.so: cannot open shared object file: No such file or directory
aheem@orwell:~/test-latex$ dlocate julia/sys.so
libjulia1: /usr/lib/x86_64-linux-gnu/julia/sys.so
Does it expect it to be in /usr/lib/x86_64-linux-gnu/bin/lib/x86_64-linux-gnu/julia?
(Assuming those dots just represent Lua string concatentation...)
 
5:09 PM
@FaheemMitha Not sure why it is looking at julia/sys.so. On my system, the library is libjulia.so and is located at /usr/lib/libjulia.so
 
Also, luajit gives the same error, but lua just says that the ffi library is not found. Does luatex contain the ffi library?
@Aditya What is your system?
 
@FaheemMitha The path is not canonical, so the .. represent the upper directory in the filesystem hierarchy.
 
@FaheemMitha Yes, run using luatex rather than lua
@TorbjørnT. Thanks
 
@Aditya Yes, but my question is whether LuaTeX contains the FFI library. I think it's possible it does.
 
Yes, it does
 
5:12 PM
@Aditya Ok, thanks.
My system (Debian buster) also has libjulia.so. Julia version 1.0.3+dfsg-4. What is yours, again?
 
Archlinux
with Julia 1.1.1-1
 
5:44 PM
@Aditya Hmm. Might be a version thing.
I don't know anything about Julia. Or Arch, really.
@Aditya What Arch version?
1.1.1+dfsg-1 in Debian unstable.
I could try to upgrade it.
 
@FaheemMitha Archlinux is a rolling release, so there are no versions. If you are not familiar with Julia, why are you trying to embed julia in lua :-)
 
@Aditya Trying to see what's possible.
 
What happens when you run luatex filename?
 
I've not particularly familiar with Julia, but I've used similar things before.
@Aditya Huh?
Just upgrading to Julia 1.1.1+dfsg-1. Same error.
 
Are you trying to compile the .lua file with lua or luatex. Do you get the same error when using luatex?
What is the exact command that you are using, and what is the exact error message
 
5:53 PM
:51363074 faheem@orwell:~/test-latex$ luatex julia.lua
ERROR: could not load library "/usr/lib/x86_64-linux-gnu/../bin/../lib/x86_64-linux-gnu/julia/sys.so"
/usr/lib/x86_64-linux-gnu/../bin/../lib/x86_64-linux-gnu/julia/sys.so: cannot open shared object file: No such file or directory
faheem@orwell:~/test-latex$ julia --version
julia version 1.1.1
 
I don't really know what is happening. You'll need to check with someone who knows how linking dynamic libs work. The code should not load julia/sys.so but libjuluia.so so not sure what is happening
 
@Aditya Ok. Is it ok with you if I post it on the site? With suitable attribution to your blog post, of course.
 
Sure
 
@Aditya Ok, writing a question now. Can you confirm that the (slightly) modifed code that you posted currently works on your Arch system?
 
6:15 PM
@FaheemMitha if you are talking about the block of code above, luatex julia.lua gives me 23. Is that what it is supposed to do?
I am on Arch
 
@StrongBad Probably. I don't know, I didn't do the matrix multiplication.
At any rate, it's not supposed to error out. And Arch really has no versions?
 
@FaheemMitha nope. it is a rolling release that just packages things from upstream with no QA or distro supplied bug fixes. Every once in a while they need to patch something to work within the distro lay out, but usually not.
 
@StrongBad And yes, I was talking about the code that Aditya wrote. It's basically what's in his blog post with a minor modification.
@StrongBad That must be an interesting ride at times.
 
@FaheemMitha it has been years since they broke everyones system and if you only use official packages up are typically automatic. For a desktop/laptop system it is fine. My lab server runs it also. Not sure I would want to use it for a production server.
 
@StrongBad Debian spends a lot of time and effort making sure things work correctly. And keeping stuff synced.
I'm a little surprised that a less synchronized approach doesn't create more issues.
 
6:27 PM
@FaheemMitha but Debian also wants to freeze parts and backport other things. In reality you can run unstable and even pull packages from experimental without too many issues. I think of Arch as somewhere between those two.
 
@StrongBad Leaf packages are normally not a problem on Debian. That is true.
I upgrade such things all the time.
 
The FEYNMAN Problem-Solving Algorithm:

i) write down the problem;

ii) think very hard;

iii) write down the answer.
 
@UlrikeFischer ooh
 
@DavidCarlisle @JosephWright ^^^^ after some hard work
 
6:38 PM
@UlrikeFischer Cool
 
@JosephWright can one "freeze" a repo? So that nobody can add issues? I don't think that one should delete it, it has history (also in the issues).
 
@UlrikeFischer Issues yes, pull requests... it's complicated. :)
 
@UlrikeFischer Yes, you can make it read-only
 
@PauloCereda I don't care much about pull requests - if someone doesn't realize that the code is old, the pull request can't be very good.
 
@UlrikeFischer Haven't we got the histroy in your repo?
 
6:44 PM
@UlrikeFischer got it. :) Issues can be disabled.
 
@JosephWright not the issues. The commits should be there as I started with a fork.
 
6:58 PM
@Aditya I asked the question.
 
7:09 PM
@FaheemMitha Shouldn't you say LuaTeX in the title instead of just Lua?
 
7:19 PM
Also, it works for me:
[paulo@satyagraha ~] $ uname -a
Linux satyagraha 5.1.19-300.fc30.x86_64 #1 SMP Mon Jul 22 16:32:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[paulo@satyagraha ~] $ texlua test.lua
23
 
7:47 PM
@PauloCereda Distribution?
 
@FaheemMitha Fedora
 
@PauloCereda There isn't any actual TeX there. I think it would also work with LuaJIT. It requires the FFI library, which isn't in Lua. At leat, that's my understanding.
@PauloCereda Ah. Hmm.
 
@FaheemMitha Well, it's not the vanilla Lua. But it does not make a difference for the question.
 
@PauloCereda Agreed, it's not the vanilla Lua.
 
@FaheemMitha However the body of the question clearly states the interpreter, so no harm done.
 
7:54 PM
@UlrikeFischer github as an "archived" feature (I'm not sure if it is new, I just noticed it earlier today)
@FaheemMitha you can't give luatex a lua file, you need texlua
 
@DavidCarlisle Aren't they the same thing? Anyway, I get the same error either way.
 
@StrongBad 23 looks right, by mental calculation
 
@FaheemMitha not really, even though they are symlink (although actually in tl2019 it seems like it does detect and switch back)
 
@HaraldHanche-Olsen I probably could once do matrix calculations in my head. These days I'd need pen and paper.
 
@HaraldHanche-Olsen Mental calculation seems quicker than getting the code to run smoothly this time :)
 
8:04 PM
@DavidCarlisle What's the difference? Are you saying the same executable behaves differently depending on what name it's called by? If so, that's some interesting behavior.
 
(and yes, I agree on 23)
 
@mickep It would have been a better example if the answer were 42.
 
@FaheemMitha almost all tex related programs have that feature, eg pdftex and pdflatex are symlinked
 
@DavidCarlisle And it matters by what name they are invoked?
 
@HaraldHanche-Olsen Challenge: Change one entry only (to an integer) to get 42 as a result!
 
8:06 PM
@FaheemMitha well yes pdftex gives plain tex and pdflatex gives latex.
 
@DavidCarlisle Hmm.
 
@FaheemMitha Technically, on unix, all programs get the calling arguments in a vector argv[]. And the zero'th argument is the name the program was called with.
 
And it will give an error if you use the wrong name, even though it's the same executable?
@HaraldHanche-Olsen Yes, I know. But it's not normal for programs to use that as part of execution.
 
@FaheemMitha texlua only accepts lua, luatex normally accepts tex, but (I now recall) if the ere is a single file with extension lua or luc then it behaves like texlua
 
No reason not to do so, I suppose. Just, uncommon.
@DavidCarlisle Ok, noted.
Should I change my post, then? To avoid luring others into what are (apparently) bad habits?
 
8:09 PM
@FaheemMitha The good old rsh program (unsecure predecessor of ssh) famously did: If you created a symlink to it named after a host on your network, rsh would connect to that host. So you could run just hostname instead of rsh hostname.
 
@HaraldHanche-Olsen Sounds like a fun source of bugs.
 
@FaheemMitha I never heard of anyone being burned by it. Of course, it would not work if you named the host rsh.
 
@HaraldHanche-Olsen Ok. I've no idea. I've never used it. I've barely heard of it.
 
@FaheemMitha looking in `/bin` I see several non-tex symlink, for example I am sure @PauloCereda will confirm `rvi` is something that is a symlink to vim and `man vim` says `Vim behaves differently, depending on the name of the command (the exe‐
cutable may still be the same file).`
 
@DavidCarlisle Oh.
 
8:13 PM
@FaheemMitha Well, it was way too unsecure to be used at all in the modern world.
@FaheemMitha Oh, an even better example is ex and vi. They are the same program, but ex starts in line mode and vi starts in “visual mode” (hence the name).
 
@HaraldHanche-Olsen Yes, David just said something similar.
I'm not a vi user, so I'm not familiar with this behavior.
 
@FaheemMitha Oh, yeah. In fact, on my mac, ex and vi are both symlinks to vim.
 
@FaheemMitha but you've used tex for a long time:-)
 
@DavidCarlisle I have, yes.
But I'm not really familiar with the internal structure.
And based on my recent installation of TeX Live 2019, it's becoming quite large and complex.
 
@FaheemMitha latex, pdflatex, pdftex, etc have all been symlinked to tex since I think the start of the web2c implementations so late 1980s
 
yo'
8:22 PM
@DavidCarlisle in systems that know what a symlink is, needless to say :)
 
@DavidCarlisle I guess I missed all that.
@yo' Presumably other OS's have a similar feature.
 
@FaheemMitha yes in windows they are copies, so it comes to the same thing, they still use the program name
 
Though once upon a time TeX ran on some quite exotic architectures.
 
@FaheemMitha windows not really
 
@DavidCarlisle Oh
 
8:24 PM
@FaheemMitha texlive on windows copies the executable rather than symlinks but it is a lightweight copy as the executable is just a small stub all the real code is in a dll
 
@DavidCarlisle I see.
 
@DavidCarlisle yes I saw it. It is in the "danger zone", so probably one should ask the other repo owners before clicking on the button ;-).
 
@UlrikeFischer I don't think they will mind:-)
 
@DavidCarlisle I think I'm the newest owner so I guess I will get the blame ;-(.
 
@UlrikeFischer naturally
 
8:32 PM
@FaheemMitha doesn't lib/x86_64-linux-gnu/../bin/../lib put you in lib/lib?
 
@StrongBad I'm not sure what the ".." here means. In Unix it would normally mean go up one level. In Lua it means string concatenation. Neither of these seem to fit the context, however.
 
@mickep Replace 1 in the top left corner of A by 20. The solution is unique, because 19 is a prime number.
 
@FaheemMitha what happens if you use luajittex --shell-escape julia.lua
 
9:06 PM
@DavidCarlisle I get the same error message.
 
@UlrikeFischer Its a +1 from me :)
 
@JosephWright ;-) (Frank said already yes too ...)
 
@UlrikeFischer OK, that's probably enough for me :)
 
9:34 PM
@FaheemMitha can't test as ffi doesn't work here (mostly) and I don't have julia
@UlrikeFischer seems like a good plan (you need someone to blame)
 
@DavidCarlisle ;-) I saw today a video of one of the tug talks and look what I saw there:
 
@UlrikeFischer oh were this years talks videoed?
 
@DavidCarlisle I don't know if all talks, but Chris and Ross were as Ross was in australia.
 
@UlrikeFischer ah
 
@DavidCarlisle I was mentioned more than once - so I still will retain enough blame.
 
9:45 PM
@UlrikeFischer You sending the invite?
 
@JosephWright shouldn't you? You are the one with the keys.
 
@UlrikeFischer I guess
@UlrikeFischer Best email?
@UlrikeFischer You just about ready to move the luaotfload repo?
@UlrikeFischer Sent
 
@JosephWright yes, I just made a luaotfload ctan upload, and sorted all issues. I also tried to adjust the tagging. Imho it can be moved now.
 
@UlrikeFischer Great
 

« first day (3209 days earlier)      last day (1726 days later) »