1090

Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages

you are viewing a single comment's thread
view the rest of the comments
[-] bort@sopuli.xyz 110 points 3 months ago* (last edited 3 months ago)

Latex: Problem --> \def\please@#1#2#3#4{\e@kill#2#3{\me#1}#4@now} -->

[-] renzev@lemmy.world 62 points 3 months ago

Accurate. LaTeX is great, it makes you feel like you have superpowers compared to "office suite"-style software. But every once in a while you just run into some bullshit that feels like it's stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable where text in the "date" column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotateboxes, a phantom, a vspace, a hspace and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.

[-] vox@sopuli.xyz 10 points 3 months ago

btw what do you think about typst?
i only used it for simple stuff so far but it seems pretty fun and easy to use

[-] renzev@lemmy.world 8 points 3 months ago

Never heard of it before, but might give it a try at some point. From the website, it seems like something halfway in between LaTeX and Markdown? Sounds exactly like what I need at times, tbh.

[-] vox@sopuli.xyz 1 points 3 months ago

yeah it's perfect for taking notes and stuff

[-] PixelProf@lemmy.ca 4 points 3 months ago

My two cents, after years of Markdown (and md to PDF solutions) and LaTeX and a full two years of trying to commit to bashing my head against Word for work purposes, I'm really enjoying Typst. It didn't take long to convert my themes, having docs I can import which are basically just variables to share across documents in a folder has been really helpful. Haven't gone too deep into it but I'm excited to give it a deeper test run over the next little bit.

[-] humbletightband@lemmy.dbzer0.com 7 points 3 months ago

it makes you feel like you have superpowers compared to "office suite"-style software

Especially the installation process

[-] tetris11@lemmy.ml 5 points 3 months ago

I still have no idea how to exit the build process. It tells I need to type H or \end but it also just lies. I find the easiest way is to invoke Ctrl-Z and then kill the background process, and the ~~younglings~~ children

[-] renzev@lemmy.world 2 points 3 months ago

Yeah, what the hell is up with that? I always just echo | pdflatex to make it shut up and exit on error. Maybe one day I'll learn how to actually use that interactive compilation thing, but not today lol.

[-] tetris11@lemmy.ml 1 points 3 months ago

wait how does your hack work?

[-] renzev@lemmy.world 2 points 3 months ago

So there are many different commands that compile LaTeX, right? pdflatex, pdftex, latexmk, etc. But they all do that thing where they ask for your input as soon as they encounter an error, right? Well, if you just pipe an empty echo command to them, it notices that stdin has reached end-of-file, and gives up trying to ask the user for input, and just exits on first error. So instead of pdflatex mydocument.tex, you can do echo | pdflatex mydocument.tex and it won't ask you for input if it sees an error, it'll just exit. There's probably a "proper" way to achieve the same behaviour, but I can't be arsed to read the docs.

Speaking of stupid TeX hacks, at one point I had a script called latex_compile_and_install_packages_until_it_works.sh. It's essentially a loop that repeatedly tries to compile a document, searches the output of the compiler for anything that looks like a missing package error, and pipes it to sudo tlmgr install. The "fuck it" of package management, arbitrary code execution exploit included!

(Sorry for the screenshot, I lost the original script in text form, probably for the better)

[-] tetris11@lemmy.ml 2 points 3 months ago

Haha that's brilliant! I have a similar script for Conda, where it tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source or just outright rejected.

I would have thought you would have needed a (while :; do echo; done) | pdflatex or a yes "\end" | pdflatex, i.e. something that repeatedly generates output. It's actually quite elegant that pdflatex checks if stdin is already EOF

[-] renzev@lemmy.world 2 points 3 months ago

tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source

Just do all of these in parallel to maximise the change of installing the correct version

[-] tetris11@lemmy.ml 2 points 3 months ago

lmao, though it's noticeably missing pacman, guix, and "pkg install "should be "pkg add" :P

[-] Odiousmachine@feddit.de 2 points 3 months ago

Funnily enough I had a similar problem but I wanted text instead of a date. In the end I used a solution similar to yours and adjusted each cell entry manually for hours. Feels like there should be a lot simpler solution for this problem in LaTeX. Glad I don't need to use it anymore...

[-] renzev@lemmy.world 1 points 3 months ago

u/vox@sopuli.xyz suggested Typst as an alternative to TeX. I gave it a try, and I'm loving it so far. It even has built-in support for the rotated text thing https://typst.app/docs/reference/model/table . I've only used it for notes/homework so far, but I'm looking forward to seeing how it fares for more serious typesetting tasks.

[-] Odiousmachine@feddit.de 1 points 3 months ago

That looks interesting, thanks for the ping. I will give it a try.

[-] bitwolf@lemmy.one 22 points 3 months ago

I got way too excited Lemmy parsed LaTeX for a second

[-] renzev@lemmy.world 3 points 3 months ago

Testing 123

$$ \sigma $$

aww.....

[-] Funkytom467@lemmy.world 5 points 3 months ago

You also need that usepackage just like python.

this post was submitted on 12 Mar 2024
1090 points (95.7% liked)

Programmer Humor

31228 readers
34 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS