Gilles 'SO- stop being evil'

Oct 29, 2024 11:09
@MarcusMüller Xterm is not “extremely limited”, and Gnome-terminal is not “much more capable”! Both have major features that the other doesn't. For example, gnome-terminal doesn't have configurable key bindings, which makes it extremely limited when it comes to input: its fanciness is entirely confined to output.
Oct 29, 2024 11:09
This kind of display can be caused by inconsistent information about font sizes, display resolution or both. I don't really know how to investigate that. It might also be caused by trying to use a proportional font: xterm tries to box them to a fixed width but doesn't always produce something usable. Try using a different font. Does xterm -fn 10x20 or xterm -fn fixed work better? Or xterm -fa 'Liberation Mono' (use a monospace font that's available on your system, try fc-list | grep Mono)?
 
Apr 22, 2024 15:12
@OrangeDog It doesn't what? I was wrong about the loop part (the native find does skip loops), but not about following outside directories, which means it could potentially traverse your entire filesystem. That is dangerous since it's traversing directories that a script shouldn't be accessing, could trigger automounts (I'm not sure about that part on macOS), etc.
Apr 22, 2024 15:12
This answer is dangerously wrong: the first find command only works if there are no symbolic links to directories. find -L follows symbolic links to directories, so this command will list files outside the intended directory tree if there are symlinks to directories outside the tree and will list files more than once if there are symlinks to non-ancestor directories inside the tree.
Apr 22, 2024 15:12
@DavidAnderson I haven't verified an infinite loop experimentally. I have verified that it lists files twices if there's a symbolic link to a sibling directory (find -L . reports both dir/somefile and link/somefile if link is a symlink to dir).
 
Jul 17, 2023 22:16
@G.Sliepen You can't avoid “letting” this happen unless you can ensure that nothing slips through the cracks. In a language without memory safety, it's impossible to guarantee that nothing slips through the cracks.
 
Jul 17, 2023 18:41
@supercat I think the disconnect between you and Alexis comes from approaching the issue from opposite ends. The C and C++ specifications don't choose to specify certain things as undefined behavior. Undefined behavior is the default. To make something not UB, the specification has to describe how it works in all cases. They don't go “the behavior is defined except if X or Y”, they go “the behavior is defined if A and B”, and if your program doesn't have properties A and B, too bad.
 
May 18, 2023 10:00
@jubilatious1 The HIGH VOLTAGE SIGN character, which looks like a lightning bolt, has the designation U+26A1. The additional character U+FE0E and U+FE0F are combining characters: they modify the rendering of the previous character, typically used to put accent on letters (e.g. U+0065 LATIN SMALL LETTER E followed by U+0301 COMBINING ACUTE ACCENT is rendered just like U+00E9 LATIN SMALL LETTER E WITH ACUTE). I have no idea why macOS is offering this particular combination or why it's rendered that way. It's not a standard Unicode thing as far as I can tell.
May 18, 2023 10:00
@jubilatious1 This seems to be some weirdness of the macOS panel: normally entries are a single code point, but apparently there's also a “lightning bolt” entry that inserts U+26A1 U+FE0E, which looks like a bold yellow lightning bolt in the normal font. This is not another Unicode character: it's how macOS (or a font on macOS) renders a combination of two characters.
May 18, 2023 10:00
@Enlico Either the terminal program, or the font-related libraries that it uses, or the fonts themselves. Note that many programs combine multiple fonts to cover Unicode; I don't know at which level in the font stack this is handled.
May 18, 2023 10:00
@StéphaneChazelas Yes, you're right. Although for the symbol, both “thunderbolt” and “lightning bolt” are used.
May 18, 2023 10:00
@Enlico Not just browser (I also see this in Firefox and Chrome): for some reason Gnome-terminal also shows it yellow (but Konsole doesn't — I tried both on Ubuntu 22.04). This may be due to some font engine treating this character as an Emoji for some reason. It's weird though since this is in a block of technical characters and surrounding characters aren't given this treatment.
 
Mar 15, 2022 15:59
@jlliagre À ma connaissance le nom « approbateur » dans ce sens n'était utilisé que dans un contexte de censure où l'on n'utiliserait pas le verbe « valider ». Quant à l'histoire de la langue, les exemples que je trouve sur Internet d'« approbateur » comme nom désignant quelqu'un qui prend une décision d'approuver ou nom sont tous des traductions plus ou moins directes de l'anglais (souvent l'approbateur d'un « workflow ») à part sur des sites Suisses. Peut-être que le nom serait compris dans ce sens en Suisse.
Mar 15, 2022 15:59
Non, approbateur est un contresens. Quelqu'un d'approbateur est quelqu'un qui est d'accord (approving), pas quelqu'un dont l'accord compte (approver). Il est possible que le sens soit en train d'évoluer par analogie avec l'anglais approver, mais en 2022, si on me dit « Jean est approbateur », je comprends que Jean est d'accord, pas que c'est lui qui décide. En lisant la phrase que tu donnes en exemple, ma première réaction est qu'il y a une contradiction (parce que approbateur et satisfait sont synonymes), et ensuite seulement je pense à un éventuel jargon franglais.
 
Feb 16, 2022 03:28
Do you really need to use such an old PC? Contrary to what one might think, it is not environmentally-friendly or cost-effective. Any software would run faster in Qemu on a Rapsberry Pi. Such old PC use a lot of power even when idle; assuming 60W (not sure about that figure, but I think it's an underestimation unless it's a laptop) and electricity prices in my country, running it for a year non-stop costs 91€, which would more than pay for the Raspberry Pi.
 
Sep 9, 2021 21:08
In France, there are statues of Chouans and Vendéens. Those were counter-revolutionaries, and the revolutionaries eventually won. I don't know if any have been erected after the last counter-revolutionary period though.
 
Sep 9, 2021 07:36
@MichaelHarvey Sure, but my question isn't whether it would be understood, it's whether it sounds idiomatic or weird.
Sep 9, 2021 07:36
Do you perceive “I am sixty tomorrow” and “I am turning sixty tomorrow” as equally idiomatic? My impression (as a non-native speaker) is that the latter is perfectly fine because it's referring to a specific point in the future, whereas the former is odd, I think because tomorrow is only the start of the period during which “be sixty” is true.
 
Jan 30, 2021 21:44
@CiaránTaaffe Constructive proofs of the existence of non-recursive languages can be found on the web (e.g. search Coq Rice's theorem). Self-reference isn't contradictory with constructiveness.
Jan 30, 2021 21:44
@CiaránTaaffe A constructive proof of “is not a decidable set” is an algorithm that, given any potential proof of ”is a decidable state“, exhibits a contradiction in that proof.
 
Jan 14, 2021 22:49
@Kaddath I'm French and I've never heard anyone pronounce "esse-ache-a". Mind you, I don't think I've ever heard anyone pronounce "ess-aitch-ay" in English either. It's news to me that there are people who know what it is and pronounce it the long way.
 
Oct 23, 2020 19:54
@Alex CBC is the only common mode with padding (and ECB but thankfully it's not that common). Stream modes don't have padding. What you've posted so far is consistent with CBC+padding.
Oct 23, 2020 19:54
@Alex AES-wrap is only meant to encrypt another key. Technically it could be used to encrypt anything, but that's very likely. You still haven't posted anything that's inconsistent with CBC.
Oct 23, 2020 19:54
@Alex Your calculations are correct except that the result for step 3 doesn't make sense (C1||C2 is two blocks). If you encrypt $\mathbf{0}||\mathbf{0}$, you get $E(\mathbf{0}) || E(E(\mathbf{0}))$. But that's with unpadded CBC. Since a 16-byte plaintext results in a 32-byte plaintext, this is probably CBC with padding.
 
Oct 6, 2020 21:39
@kelalaka Good idea, thanks. Based on Luis Casillas's answer, I think it's to accommodate hardware implementations, and not useful for software implementations.
Oct 6, 2020 21:39
I wonder why they suggest an LFSR. It's a pity that they don't give a rationale. Note that they specify “a linear feedback shift register that is driven by a primitive polynomial to ensure a maximal cycle length”. Constructing the IV from LFSR with badly chosen parameters (non-primitive polynomial, or state size that isn't the same as the size of what it's used to generate) could have a small cycle, leading to a repeated IV. It's a needless risk.
Oct 6, 2020 21:39
This is good advice except for the LFSR. A non-cryptographic RNG has no place in crypto code. Why would you use a (non-CS)PRNG to generate IVs anyway? Either use a counter or use a (non-deterministic) RNG. — “Don't you want to see the aim of the attacker so that you can protect yourself?” You already know what failed: you received a message which is not authentic. There's nothing else to investigate.
 
Aug 11, 2020 19:38
and on that scale, how would you guesstimate the difference between, say, C and Haskell?
Aug 11, 2020 19:36
@polcott Is one million a figure you can actually measure, or just a figure of speech?
Aug 11, 2020 19:30
@polcott I don't know what cognitive leverage is
Aug 11, 2020 19:26
@polcott Maybe: I have no idea what your research is. But it isn't relevant to the question you commented on or to my answer.
Aug 11, 2020 19:25
@polcott Yes. But once again, the question of how you move by multiple positions was never relevant.
Aug 11, 2020 19:23
@polcott This is not true, and anyway it's irrelevant.
Aug 11, 2020 19:22
@polcott I have no idea what you mean by “the MIT Turing Machine Description language is precisely correct”. Which of these words have their plain English meaning and which have a technical meaning?
Aug 11, 2020 19:21
@polcott ease of understanding algorithms is not relevant here: we want to determine what can be expressed, not how easily it can be expressed
Aug 11, 2020 19:21
@polcott the question is not how you go back to the same location, but how you store the content at that location so that when you do come back, you read back the content that was last written to it
Aug 11, 2020 18:40
You have to be able to move away from one tape position and come back and find the same content.
Aug 11, 2020 18:39
@polcott And how do you store the tape contents?
Aug 11, 2020 18:39
@polcott It's enough to move the tape head one position at a time. You don't get more expressive power by moving a bounded number of positions in one go.
Aug 11, 2020 16:12
You've proposed to use data addressing that's relative to the instruction pointer. Ok, but it doesn't buy you anything in terms of computational complexity. The instruction pointer has a finite range. You're replacing a finite range by a larger, but still finite range.
Aug 11, 2020 16:10
@polcott No, so far you haven't proposed a model that would make C Turing-complete.
Aug 10, 2020 21:32
@polcott Simulate a machine with 2^62+1 bytes of RAM
Aug 10, 2020 21:32
@polcott A Turing machine doesn't use infinite memory. It uses an unbounded amount of memory: you have to promise to give it as much as it wants, but at any point in time, it only wants a finite amount. This is a very important distinction.
2
Aug 10, 2020 20:28
And in any case, you have a finite amount of code. So you can only reach a finite amount of addresses.
Aug 10, 2020 20:27
That's the whole point! We're talking about the C language, not about some idealized programming language with an unbounded size_t-equivalent
Aug 10, 2020 20:27
No, you can't ignore the storage. You can have as much as you want, but you have to be able to reach it.
Aug 10, 2020 18:54
And whatever the answer to that is, how are you storing the contents of the tape that's outside the current 32-bit window?
Aug 10, 2020 18:54
@polcott Once again, relative to what? and can be addressed by what?
Aug 10, 2020 15:47
@polcott I don't understand what you mean by “only relative addresses”. Relative to what? If you manage to have pointers to two distinct objects at some point in the program, they must have different bit patterns.
Aug 10, 2020 15:47
@polcott So relative to the current program counter? The program is finite, so that only extends the address space by a finite amount. It doesn't change any computability property.