Hacker Newsnew | past | comments | ask | show | jobs | submit | pvitz's commentslogin

From the manual:

   The control variable in for loops is read only. If you need to change it, declare a local variable with the same name in the loop body.
Also [0]: Roberto Ierusalimschy > So what's the rationale to make them constant now? Does it have performance > reasons?

Yes. The old code does an implicit "local x = x" for all loops, in case you modify 'x'. With the new semantics, the code only does it when you ask for it.

[0] https://groups.google.com/g/lua-l/c/SlAG5QfpTac


That symmetries imply conservation laws is pretty fascinating (see the Noether theorem). I guess it seems only strange it you assume already that the conservation law holds.


When I was a student of physics and came across this paragraph in Feynman's book, I was curious if he really meant the simple technique explained in the article, a more general one (also described in the article with the integral bounds as functions of a parameter) or something else. I don't know, but this led me to read the text "Advanced Calculus" by Edwin Bidwell Wilson (1912), which includes a lot of examples and gems. If there is some young student out there who wants to go well beyond the basic techniques of calculus taught in analysis or mathematical physics courses, have a look at [0].

[0] https://archive.org/details/advancedcalculus031579mbp/mode/1...


A shot in the dark, but maybe you could give me a hint. Recently, I was interested in extracting sprites from an old game. I was able to reverse the file format of the data archive, which contained the game assets as files. However, I got stuck because the image files were obviously compressed. By chance, I found an open source reimplementation of the game and realised it was LZ77+Huffman compressed, but how would one detect the type of compression and parameters with only the file? That seems a pretty hard problem or are there good heuristics to detect that?


Some simpler cases like various RLE-type encodings can be figured out with that pattern recognizing brain - by staring at them really really hard.

For harder cases? You take the binaries that read or write your compressed files, load them in your tool (typically Ghidra nowadays), and track down the code that does it.

Then you either recognize what that code does (by staring at it really really hard), or try to re-implement it by hand while reading up on various popular compression algos in hope that doing this enlightens you.

Third option now: feed the decompiled or reimplemented code to the best LLM you have access to, and ask it. Those things are downright superhuman at pattern matching known algorithms, so use them, no such thing as "cheating" in RE.

The "hard mode" is compression implemented in hardware, with neither a software encoder or a software decoder available. In which case you better be ready for a lot of "feed data to the magic registers, see results, pray they give you a useful hint" type of blind hardware debugging. Sucks ass.

The "impossible" is when you have just the compressed binaries, with no encoder or decoder or plaintext data available to you at all. Better hope it's something common or simple enough or it's fucking hopeless. Solving that kind of thing is cryptoanalysis level of mind fuck and I am neither qualified enough nor insane enough to advise on that.

Another thing. For practical RE? ALWAYS CHECK PRIOR WORK FIRST. You finding an open source reimplementation? Good job, that's what you SHOULD be doing, no irony, that's what you should be doing ALWAYS. Always check whether someone has been there and done that! Always! Check whether someone has worked on this thing, or the older version of it, or another game in the same engine - anything at all. Can save you literal months of banging your head against the wall.


Thanks for your reply and advice! I guess what you describe as "impossible" is the case I am mostly interested in, though more for non-executable binary data. If I am not mistaken, this goes under the term "file fragment classification", but I have been wondering if practitioners might have figured out some better ways than what one can find in scholarly articles.

And yes, searching for the reimplementation beforehand would have saved me some hours :D


It's not about the data being executable. It's about having access to whatever reads or writes this data.

Whatever reads or writes this data has to be able to compress or decompress it. And with any luck, you'll be able to take the compression magic sauce from there.


I understood "binaries" in "compressed binaries" as "executables", e.g. like a packed executable, but I see that you mean indeed a binary file (and not e.g. a text file).


Reread that just now, sorry for not making it clearer. I kind of just used "binaries" in both senses? Hope the context clears it up.


Same experience here! We used Origin and/or QtiPlot in a physics lab for the graphs and quick regressions.


More like "precomputed table" and "table lookup"...


We have been in the process of upgrading to the latest version and can't continue. The lack of communication by Mathworks is very strange.


The reasons for this change seem to be described in [0] with the following summary:

  > The contribution workflow in Guix has been facing several challenges:
  > difficult onboarding, lack of legibility, complex, unreliable, and
  > labor-intensive infrastructure, and lack of automation.  All these lead
  > to an experience that contributors often find frustrating and hinders
  > quality assurance efforts.  We propose to address these limitations by
  > migrating repositories, issue tracking, and patch tracking to Codeberg,
  > an integrated forge with a Web interface that is hosted by a non-profit.
[0] https://archive.softwareheritage.org/browse/content/sha1_git...


> But the longer I worked there the more I felt like the plan was basically:

> 1. Manually add more and more common-sense knowledge and extend the inference engine

> 2. ???

> 3. AGI!

In retrospect, this reasoning doesn't seem to be so wrong.


I mean if I were to oversimplify and over-abstract AGI into a long list of if / elses, that's how I'd go about it. It's just that there's A Lot to consider.


That the distribution was a fully translated system together with a thick manual (of course also in German) was the whole point and idea. Your comment is too dismissive in my opinion.


The manual was pretty much a Linux for beginners book. It not only explained installation and basic system administration, but had substantial vim and Emacs chapters, as well as a chapter on retro gaming using emulators. (SuSE 5.3 in my case).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: