LaTeX woes - Sympathy for the Blakeyrat
-
@Helix said in LaTeX woes - Sympathy for the Blakeyrat:
TIL tug.org is actually safe for work.
For the record (and training Engine), what did you believe "tug.org" would have that's not NSFW?
-
@blakeyrat said in LaTeX woes - Sympathy for the Blakeyrat:
- Converting a video clip to JSON would make it HUGE
It would be something like:
{ title = "Some Title String" , h264_encoded_bytestring = "lots of bytes in a sensible encoding" }
Hardly any bigger than just the list of bytes.
-
@Captain JSON can't store bytes, only characters.
-
@blakeyrat He did mention “sensible encoding”.
-
@ben_lubar said in LaTeX woes - Sympathy for the Blakeyrat:
@masonwheeler said in LaTeX woes - Sympathy for the Blakeyrat:
So, like I said, there is no way to do it in *nix.
That statement is equivalent to:
There is no way to start a car using a car key.
There isn't in my car. You just have to be carrying the magic token and you hit the START button on the dash.
-
@masonwheeler said in LaTeX woes - Sympathy for the Blakeyrat:
There isn't in my car.
Start a car? What does that even mean? Like, aren't cars always on? You just enter them and press the accelerator, and you're going!
All you grandpas and your keys and nixing each other, it gets old!
-
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
You just enter them and press the accelerator, and you're going!
You just enter them and tell the driver to get moving.
-
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
You just enter them and press the accelerator, and you're going!
But the standard doesn't guarantee that the car has an accelerator. Or keys. Or doors. Those are all optional. The only requirement for calling it a "CAR-compatible vehicle" is that it has four wheels and moves. And none of the major vendors is 100% compatible with the basic standard.
-
@asdf said in LaTeX woes - Sympathy for the Blakeyrat:
And none of the major vendors is 100% compatible with the basic standard.
-
@asdf said in LaTeX woes - Sympathy for the Blakeyrat:
CAR-compatible
Wow. Apparently we now require things to be compatible to the car. What is this world...
-
@Tsaukpaetra I wouldn't even be surprised if there was a standard for cars that's about as useless as POSIX.
-
@asdf OBD-1
-
@Captain said in LaTeX woes - Sympathy for the Blakeyrat:
OBD-1
Wikipedia:
The regulatory intent of OBD-I was to encourage auto manufacturers to design reliable emission control systems that remain effective for the vehicle's "useful life".[citation needed] The Diagnostic Trouble Codes (DTCs) of OBD-I vehicles can usually be found without an expensive 'scan tool'. Each manufacturer used their own diagnostic link connector (DLC), DLC location, DTC definitions, and procedure to read the DTCs from the vehicle. DTCs from OBD-I cars are often read through the blinking patterns of the 'Check Engine Light' (CEL) or 'Service Engine Soon' (SES) light. By connecting certain pins of the diagnostic connector, the 'Check Engine' light will blink out a two-digit number that corresponds to a specific error condition. The DTCs of some OBD-I cars are interpreted in different ways, however. Cadillac (gasoline) fuel-injected vehicles are equipped with actual on-board diagnostics, providing trouble codes, actuator tests and sensor data through the new digital Electronic Climate Control display. Holding down 'Off' and 'Warmer' for several seconds activates the diagnostic mode without the need for an external scan tool. Some Honda engine computers are equipped with LEDs that light up in a specific pattern to indicate the DTC. General Motors, some 1989-1995 Ford vehicles (DCL), and some 1989-1995 Toyota/Lexus vehicles have a live sensor data stream available, however, many other OBD-I equipped vehicles do not. OBD-I vehicles have fewer DTCs available than for OBD-II equipped vehicles.
I hate it when I'm right. Also, reading that paragraph gave me brain cancer.
-
@asdf Oh my PT Cruiser, you cycled the key between "Off" and "Acc" like 5 times in a row and then the odometer would blink the ODB code.
-
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
For the record (and training Engine), what did you believe "tug.org" would have that's not NSFW?
To me it does not look like he did not believe that he would not find anything that's not not suitable for work.
-
@marczellm said in LaTeX woes - Sympathy for the Blakeyrat:
To me it does not look like he did not believe that he would not find anything that's not not suitable for work.
Wow, heavy usage of negatives there.
@Helix said in LaTeX woes - Sympathy for the Blakeyrat:
TIL tug.org is actually safe for work.
The statement's inclusion of "actually" indicates a predisposition that said site might not be safe for work.
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
that's not NSFW?
Oh. I see what you mean.
-
@marczellm
overleaf.com
All the LaTeX kids are doing it.
Git versioning; collaborations; customizable; just works.
No more huge installations of MikTeX.
-
@Thad_Harroun apt-get install texlive git
-
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
For the record (and training Engine), what did you believe "tug.org" would have that's not NSFW?
That all depends on what it is you're tugging on, now doesn't it?
-
-
@Thad_Harroun said in LaTeX woes - Sympathy for the Blakeyrat:
@marczellm
overleaf.com
All the LaTeX kids are doing it.
Git versioning; collaborations; customizable; just works.
No more huge installations of MikTeX.I considered it, but there's a problem. I load my language dependent stuff with
\usepackage[magyar]{babel}
because raisins. LuaTeX loads its language dependent stuff based on a file calledlanguage.dat.lua
. It contains the following:['hungarian'] = { loader='loadhyph-hu.tex', lefthyphenmin=2, righthyphenmin=2, synonyms={}, patterns='hyph-hu.pat.txt', hyphenation='hyph-hu.hyp.txt', }
but it should contain the line
synonyms={ 'magyar' },
but it doesn't. So after the LaTeX installation I look for this file and modify it manually. If I don't do it then LuaTeX doesn't load the Hungarian hyphenation.
On online services like Overleaf and ShareLaTeX and CloudLaTeX I cannot modify that file because I cannot modify their LaTeX installation AFAIK.
I did not figure out who to send the bug report to and how but maybe someday I will.
-
@dkf said in LaTeX woes - Sympathy for the Blakeyrat:
@JBert said in LaTeX woes - Sympathy for the Blakeyrat:
If only the OS-to-program interface were typed (like e.g. Powershell) from the beginning...
The problem with types is that not everything has the same types. They encode a whole bunch of assumptions, and those just aren't universal.
Some are though, at a higher level of abstraction. In particular, something like
int main(dictionary<string, string[]> args, string[] files) { return 0; }
could be done. This would require more structure to the way you call programs from the CLI, but it would solve a lot of problems too. Stealing from F#, and because
<
already acts in a files/stream manner, maybe something likefoo -a bar -b baz quux <| ../file name.txt <| *
or a bit simpler/more conventional, but same thing:
foo -a bar -b baz quux - '../file name.txt' "*"
There are numerous other ways it could be done (and certainly better than what I did above), but the point is: it should be possible to separate switches, switch arguments, and file/object listings in a way that avoids the
rm -rf
problem @blakeyrat pointed out. You could also implement a (basic or better) type system if you want, as well (e.g., PowerShell).
@dkf said in LaTeX woes - Sympathy for the Blakeyrat:
the immutable value model doesn't sit too comfortably with the CIL model
Eh? Why's that?
-
@dkf Technically, that’s a motorcycle, not a car. (At least, that’s the reason the Reliant Robin was designed with three wheels instead of four. <insert stuff about driving licence categories not being the same as vehicle classifications etc. etc. etc. >)
-
@Gurth said in LaTeX woes - Sympathy for the Blakeyrat:
Technically, that’s a motorcycle, not a car
Light car. Drivable on an old bike license but still classed as a car
@Gurth said in LaTeX woes - Sympathy for the Blakeyrat:
that’s the reason the Reliant Robin was designed with three wheels instead of four
Nope, it's all about the weight and nothing to do with the wheel count. I believe the Reliant Kitten was also classed under Light Car
-
@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
..@Tsaukpaetra said in LaTeX woes - Sympathy for the Blakeyrat:
that's not NSFW?
Oh. I see what you mean.
-
@blakeyrat said in LaTeX woes - Sympathy for the Blakeyrat:
Trying to delete one directory and ending up with all subdirectories deleted, with no warning or way to undo, because you have a file with the perfectly valid name of "-rf"?
What the utter shuddering fuck are you wittering on about? You can't delete a directory without deleting its subdirectories. You can't do it on *n*x, you can't do it under Windows, and you couldn't do it under DOS or MacOS.
That you can give a name to a file which clashes with a particular commandline parser should not be news to anyone. It's a syntactic issue, and there are ways around it. It's hard to use a colon in a filename on HFS-based filesystems, too. If you like, you could also whine about not being able to name a variable
int
orthis is my variable
in C.The only way of causing data loss in a scenario similar to that you have described would be if you were to name two files
-rf
and*
(or some other filename-globbing string) in a directory containing other useful data, and then refer to them, unquoted, and in that order, in the context of anrm
command.Unless you can prove otherwise. But you can't.
-
@Dreikin said in LaTeX woes - Sympathy for the Blakeyrat:
Eh? Why's that?
The CIL model assumes that state is typically mutable, which has implications about object identity. Once you're in a true immutable domain (as opposed to somewhere where it's just been grafted on top) then one of the first things that gets thrown away is object identity. That's a subtle difference with very wide-reaching consequences. I don't feel like writing the essay to explain them though. :)
-
@tufty Go back and read it again.
He's trying to clear /floo of all files. He ends up clearing /floo and accidentally also /floo/bop, /floo/grease, /floo/megabop, etc.
Because /floo happened to contain a file with a perfectly valid name that somehow the broken-ass Linux shell interpreted as a CLI param.
-
@gordonjcp said in LaTeX woes - Sympathy for the Blakeyrat:
$ rm - -rf
Simple as that. The first dash effectively says "there are no more options, no matter what it looks like".Two questions:
- Is the backspace character a valid filename character
- if it is, would a file called {backspace}rf change that command from
rm - *
torm -rf
?
-
@blakeyrat Is there any reason why, if I say I want to remove everything in a directory, I need a special parameter so that 'everything' includes subdirectories as well as files? I can only imagine that it is some hack to preserve compatibility with rm versions from the 70'ies or so, which couldn't recursively remove things at all.
-
@Grunnen said in LaTeX woes - Sympathy for the Blakeyrat:
70'ies
Um, actually, I think you mean 70'eventies!
Seriously, its 70s. It isn't even hard. You just have to type less.
-
@Magus said in LaTeX woes - Sympathy for the Blakeyrat:
@Grunnen said in LaTeX woes - Sympathy for the Blakeyrat:
70'ies
Um, actually, I think you mean 70'eventies
Would that be 1970, 1972, 1974, ...?
Why no love for the 70'oddities?
-
-
@Dreikin you'd still need some code to map from the abbreviated -a, -b parameters to their canonical names. But why are you even trying to invent a new syntax for doing function calls in the first place? There's already a perfectly good syntax for that. The issue isn't the syntax for making calls, it's the ability make calls from one exe to another in the first place. Given that function calls generally look the same from language to language, having to go through void main every time, with all the encoding issues that entails, is a real pain in the neck.
-
@Buddy said in LaTeX woes - Sympathy for the Blakeyrat:
Given that function calls generally look the same from language to language
Nope. :(
They might look pretty similar between the languages you usually code with. But there's more diversity in this world…
-
@tufty said in LaTeX woes - Sympathy for the Blakeyrat:
If you like, you could also whine about not being able to name a variable
int
orthis is my variable
in C.The difference, though, is that even in the days of MS-DOS, filenames were being used by people with no knowledge of coding, and therefore (probably) a lot less understanding of which things may or may not be allowed to be used. Anyone with even a small amount of programming skills will realise that using certain names for variables is bound to cause errors and other trouble. Whereas someone who just knows that you must type in a name for a file may be quite surprised to learn that some characters will cause errors and (often unhelpful) warnings. Guess which of these two encompasses most users.
-
@Gurth said in LaTeX woes - Sympathy for the Blakeyrat:
bound to cause
errors and other trouble!!FUN!!FTFDorf
-
@Buddy said in LaTeX woes - Sympathy for the Blakeyrat:
you'd still need some code to map from the abbreviated -a, -b parameters to their canonical names.
Part of the convention I was trying to imply was that anything in the
args
section that starts with an unquoted-
maps to a key of thedictionary<string, string[]> args
. To expand on my example, the inputfoo -a bar -b baz quux - '../file name.txt' "*"
Would map to:
{ "args": { "a": ["bar"], "b": ["baz", "quux"] }, "files": [ "../file name.txt", "other filenames from expanded blob", "with one entry per file" ] }
With a stand-alone
-
signaling the break between command arguments and file arguments. The code still needs to mapa
andb
to whatever their internal meanings are, but this provides a safer, more general way of passing CL text in than the current undifferentiated array of strings method does. It also allows command syntax to more naturally map to the shell's conventions. (e.g, both of the CL syntaxes I gave as examples would produce the same input to main.)@Buddy said in LaTeX woes - Sympathy for the Blakeyrat:
But why are you even trying to invent a new syntax for doing function calls in the first place? There's already a perfectly good syntax for that.
Because this isn't about function calls in the C/C++/etc sense. It's about command line syntax like bash et al, which has different conventions than function calls (and typically a lot more versatility per command, which has to be relatively easy to type). In particular:
- Non-shell commands are executables,
- For which the natural entry point is main,
- Which conventionally just takes an array of strings,
- For which common types of parameters are file names, switches/options, and switch/option arguments
- Which, as @blakeyrat's link above points out, can result in bad results
- Because they don't have any contextual information on which is a file name, which is a switch, and which are switch arguments.
-
@Dreikin said in LaTeX woes - Sympathy for the Blakeyrat:
Non-shell commands are executables,
That's bad
For which the natural entry point is main,
That's bad
Which conventionally just takes an array of strings,
That's bad
For which common types of parameters are file names, switches/options, and switch/option arguments
That's bad
Which, as @blakeyrat's link above points out, can result in bad results
Yes
Because they don't have any contextual information on which is a file name, which is a switch, and which are switch arguments.
Also think about return values. Strong typing allows a lot more versatility than the traditional “two streams and an int˝.
-
@Buddy said in LaTeX woes - Sympathy for the Blakeyrat:
@Dreikin said in LaTeX woes - Sympathy for the Blakeyrat:
Non-shell commands are executables,
That's bad
For which the natural entry point is main,
That's bad
For which common types of parameters are file names, switches/options, and switch/option arguments
That's bad
Why? Mind, I'm not disputing that it might useful to have multiple different entry points that can take different parameters (in the same vein as constructors - and with some of the same troubles), and (unlike constructors) give different return values. I'd actually like if more (any?) languages included the return type as part of determining which function version to call.
Which conventionally just takes an array of strings,
That's bad
Which, as @blakeyrat's link above points out, can result in bad results
Yes
Because they don't have any contextual information on which is a file name, which is a switch, and which are switch arguments.
Also think about return values. Strong typing allows a lot more versatility than the traditional “two streams and an int˝.
Yes, I agree here. I'm fond of (what little I know of) PowerShell's ideas in this respect.
-
@Dreikin said in LaTeX woes - Sympathy for the Blakeyrat:
For which common types of parameters are file names, switches/options, and switch/option arguments
That's bad
Why?
File name parameters are bad because you want to be able to process data streamed in from other processes, immediate data and file system data the same. Switches are bad currently because of the inconsistency of parsing, they would be (admittedly less) bad in the system you proposed because you're still just passing in a hash map that must be pulled apart by the receiving code (cf groovy, where if you pass a map in to a regular function, it matches the keys up to the parameter names). And the proliferation of switches for most command line utilities should also be addressed here: think of the programs installed on a fresh Ubuntu as bash's standard library; consider how much better organized just about any other language's standard library is.
-
@Buddy said in LaTeX woes - Sympathy for the Blakeyrat:
File name parameters are bad because you want to be able to process data streamed in from other processes, immediate data and file system data the same. Switches are bad currently because of the inconsistency of parsing, they would be (admittedly less) bad in the system you proposed because you're still just passing in a hash map that must be pulled apart by the receiving code (cf groovy, where if you pass a map in to a regular function, it matches the keys up to the parameter names). And the proliferation of switches for most command line utilities should also be addressed here: think of the programs installed on a fresh Ubuntu as bash's standard library; consider how much better organized just about any other language's standard library is.
So what do you propose instead? You're going across a security boundary (if you weren't, you'd use a conventional local function call) so you need to be careful. You also need to handle whether the message that you send is going to be appropriately typed, and if so propose how you're going to get the types to match up properly. What's the mechanism for discovery?
It's easy to say “this sucks” but it's harder to establish an alternative that doesn't suck more. Not that I'm saying you shouldn't try; nothing ever gets better if we all give up.
-
@dkf Linux Application Binary Interface Annotations.
-
@Buddy <obligatory style="blakey"> YOU JUST SMASHED THOSE WORDS TOGETHER WITHOUT ANY MEANING! </obligatory>
Seriously, it helps to have a little more info.
I also look forward to seeing what a pile of fail some sort of ABI annotation mechanism is going to be. It's not that it couldn't work, it's that everyone will probably conspire to make it not work anyway. Seen that happen with annotation mechanisms elsewhere, and cross-boundary annotations are about a zillion times harder than they appear to be (assuming you don't want everything to just end up as dead information).
-
(I realized I have already created this topic, after I already wrote this post to start a new one)
I love LaTeX and I have huge respect for the people working on it, but there are some things about it that really make me angry. This post is a rant in order to vent.
- Ugly looking websites:
Good luck for a novice user trying to get around that.
Installing TeX and LaTeX If you are looking to install a complete system, we recommend TeX Live for Unix/GNU/Linux, MacTeX for MacOSX, and proTeXt for Windows. You can join TUG or another user group and have physical discs sent to you, or you can purchase the distributions without joining.
- Ugly looking software. The TeX Live package manager is written in Perl/Tk of all things.
- Ugly user experience.
The MiKTeX distribution has the concept of a system-wide install or a user install. So the LaTeX core can be installed on a Windows system once and then the additional packages are maintained by the individual users, or there can be a complete installation that only one user can use. When a system-wide installation is chosen, the following items are added to the Start menu:- MiKTeX Settings
- MiKTeX Package Manager
- MiKTeX Update
- MiKTeX Settings (Admin)
- MiKTeX Package Manager (Admin)
- MiKTeX Update (Admin)
Also the tools have a command line option
--admin
that's supposed to correspond to whether they should attempt adminy things or not; but they do not always correctly pass this option to each other.The MikTeX distribution has a built-in updater tool that downloads and unpacks new versions of the installed packages. This is very good, unless it breaks itself or the distribution. It has been breaking on me roughly once or twice every year.
- Bugs taking long to fix
- The maintainer not understanding the issue
-
also
-
@marczellm Clearly you're supposed to read each and every changelog to determine what might possibly affect you, clearly.
-
@marczellm What an “obvious” and “discoverable” name
\write18
is!
-
Ooh and of course the issue that prompted the rant!
-
I don't know yet. It's your system. You know when it happened. You are in the position to inspect the log files. You have all the information. I have: not enough information to work on this issue effectively.
Wow, this guy is almost at Jeff levels of customer service