Live data from Hacker News

Bored? How about trying a Linux speed run?

rachelbythebay.com

241–250 of 284 posts

Re: Bored? How about trying a Linux speed run?

#241
post #71
post #6

I think an important category has to be: no outside servers designed to help with this speedrunning challenge. Without such a rule, one can get an outside computer to do much of the work. One would merely write a small program that connects to the known IP and pulls bootstrap code straight into memory. (Granted, still a fair piece of work, but without such a rule the finish line for the speedrun would become "establi…

Generally, speedrunning communities (for games and other things) already bar tricks and strats that require setup on an external file/system. For instance, you can't carry hearts/stamina from one file to another in a Breath of the Wild speedrun, or use wrong warping to instantly go to a location saved on an alternate save file. There are exceptions in certain scenes (in speedruns for Banjo-Kazooie, a glitch is used o…

There are different categories for everything. There's getting to the end of the game and defeating the end boss ASAP. For games with a completion percentage, there's speedruns to get to 100% completion rather than just getting to the end. There's categories for not using "warps", and others that allow using "warps" to skip levels.

Tool Assisted Speedruns (TAS) is a category unto itself. This involves running game on an emulator and making human-impossible precise set of inputs, often disassembling the ROM to find bugs to take advantage of. The Arbitrary Code Execution 'stunt' category includes one where someone programed Super Mario World by picking up items in a precise order (and time) to specify bytes, managing to write tetris and jmp to it.

Competitions are made up, so we can make up whatever point A and point B is, and the rules along the way. Timing going from a Ubuntu ISO to desktop browser with google.com loaded is one A, B pair, but there's so many different possibilities out there!

Re: Bored? How about trying a Linux speed run?

#242

Earlier quoted context omitted.

That's how I learned web development in the 2000s. I downloaded stuff at school on floppy disks and took them home to inspect them. I had cool gifs, midi files, html files and I had Home Site 4.0 which had a great documentation about HTML and some basic JS.

Sadly, for me in the late 90s, it was learning the ins and outs of how to modify Win95 UI. Turns out a whole lot of those skills were total dead-ends. But I can help you make your Win95 look and feel however you like! Need your cursor to be animated but change animations depending on what you're doing? You got it! Find that editing .ini files lacks a certain flair? No problem! Prefer a fuchsia screen of death, or a "…

I had a "Stop" menu on Windows XP where the Start menu was supposed to be, it was quite a feeling of accomplishment.

Re: Bored? How about trying a Linux speed run?

#243
post #240

This is basically what early Gentoo releases were like... A hilariously minimal tool chain and a txt guide to compiling and configuring every piece between basically nothing and a functioning web browser. A typical speed run took a day because compilation times were long. And if you realized late that you'd made a fatal mistake, starting over took a loooong time. #pepperidgefarmremembers

Before I learned enough to understand the compile-from-source performance myth, I once put Gentoo on an old 966MHz Coppermine box I had lying around. I didn't have cross-compiling set up yet, and I unwisely decided to install X. And Gnome. And Open Office. It compiled for days.

Not necessarily a myth anymore, strangely. If you apt/rpm install something nowadays, it probably wasn't built with support for newer CPU instructions (AVX, AES-NI, sometimes even SSE4). -march=native is gonna have a much bigger effect now than stage 1 Gentoo installs did in the mid-2000s.

(and, yes, I do remember waiting a full day for KDE to compile)

https://web.archive.org/web/20080704112619/http://funroll-lo...

Re: Bored? How about trying a Linux speed run?

#244
post #198

Earlier quoted context omitted.

You could sort of do it via Bernstein chaining. If we call this substitute command 'notcd' then you'd invoke it like `exec notcd /some/path sh` and then continue your work in the subshell.

The shell would then have to also have a mechanism to pass all local state such as command history, local non-exported variables (including shell functions), open file descriptors, currently running jobs, etc. to the subshell.

We're talking about bootstrapping to more usable tools, not about whether this hack fully replaces the standard feature. 'cd' certainly comes before command history, for example.

Incidentally you could take the same approach to some other shell built-ins, like redirection. Instead of `cat foo >outfile`, define a program named '>' and then say `> outfile cat foo`. (Assuming the initial bare-bones shell parses '>' as just another ordinary character, not special.) Use these until you've written a more featureful shell.

It might be interesting to figure out a design for a shell where this decentralized approach works well and does not feel like a kludge -- I imagine you'd have to change some deeper aspects of the OS design to really make it work.

Re: Bored? How about trying a Linux speed run?

#245

Earlier quoted context omitted.

People always complain about this, yet nobody contributes: http://who-t.blogspot.com/2019/10/libinputs-bus-factor-is-1....

Bus factor is irrelevant. It's a concept that basically boils down to "people would not be smart enough to understand the code unaided". This is plainly wrong. I speak from experience of diving into some horrible code base. It also assumes that reproducing the functionality from scratch would be hard. Looking at all the reimplementations of A where A is one of unix, X, web browser, network stack, SQL database and oth…

Disagree. Learning a codebase from scratch is tricky; it's better if you have someone to teach you. So if the one contributor gets bus'd, then it'll take time (=money) to get up to speed.

Re: Bored? How about trying a Linux speed run?

#247
post #108

Earlier quoted context omitted.

> It is unclear to me whether the C libs include TCP. The exercise states that you have a Linux kernel and there is a network connection. If the kernel does not have TCP, but only offers a raw socket, well, then you have to write down a very simple TCP stack. But if the kernel does have TCP, the exercise boils down to writing a very simple HTTP client, a very simple DNS resolver and a bare bones XZ decompressor and t…

Or just get a static tar and xz static build, they must be somewhere. Better: busybox build. It already has tar, xz and wget. You just need to compile a simple HTTP client, or better: find a gopher mirror. Bare netcat would work against that. gopher://ftp.icm.edu.pl:70/1/vol/rzm6/busybox/binaries With NetCat: echo vol/rzm6/busybox/binaries/1.21.1/ | nc ftp.icm.edu.pl 70 echp vol/rzm6/busybox/binaries/1.21.1/busybox-i…

> telnet, nc, ftp, ncftp, lftp, wget, curl, lynx, links? Luxury! Gone.

No nc.

Re: Bored? How about trying a Linux speed run?

#248
post #240

Earlier quoted context omitted.

Before I learned enough to understand the compile-from-source performance myth, I once put Gentoo on an old 966MHz Coppermine box I had lying around. I didn't have cross-compiling set up yet, and I unwisely decided to install X. And Gnome. And Open Office. It compiled for days.

Not necessarily a myth anymore, strangely. If you apt/rpm install something nowadays, it probably wasn't built with support for newer CPU instructions (AVX, AES-NI, sometimes even SSE4). -march=native is gonna have a much bigger effect now than stage 1 Gentoo installs did in the mid-2000s. (and, yes, I do remember waiting a full day for KDE to compile) https://web.archive.org/web/20080704112619/http://funroll-lo...

> -march=native is gonna have a much bigger effect now than stage 1 Gentoo installs did in the mid-2000s.

Actually, probably quite the contrary. All x86-64 chips are required to support SSE2, which lets you use SSE for floating-point instead of x87 floating-point, which is a big speed win. But the newer extensions are specialized SSE instructions, which generally require manual use of instructions to utilize; specialized crypto instructions, which definitely require manual use; and AVX instructions, which doubles the width of vectors you can use. The first two is not going to be improved with -march; the code that uses it is almost certainly going to be compiled in a way that lets it dynamically use these instructions when available.

As for vectorized code that could use AVX instead, it's dubious how much of an effect it would have, since the biggest improvement in vectorization will be enabled with the 128-bit vectors, with 256-bit vectors offering at most a 2x speedup in the vectorized code, the effect being reduced by some code only being 128-bit-vectorizable (and not receiving any speedup), and also by Amdahl's Law reducing the benefit of further speedups in that code. Furthermore, vectorization tends to be much less relevant in the "integer" code that is typical of most consumer software, outside of a few hot loops that are already manually specified as above.

Re: Bored? How about trying a Linux speed run?

#249
post #79

Earlier quoted context omitted.

That “nothing” is everything.

Yeah, "nothing" is a really poor term to summarize "Apple made fundamentally superior choices in terms of hardware development, software integration and general OS input architecture in the past 15 years". I use both Windows and Fedora enthusiastically on desktop machines, but recognize that even high-end Windows laptops have trouble matching my 2012 Macbook in terms of input. Apple has been miles ahead of the compet…

> Apple sells desktop versions of the touchpad

Yes, they do, I'm using one. Aside of haptic feedback which allows it to go really quiet, it's really nothing special - just a regular touchpad. I'm also using the internal one in my Dell XPS - if it was slightly bigger it would be just as good. In the past I've used Lenovo Yoga one and it was just as good either.

I'm using touchpads exclusively on GNU/Linux for years now. It's a myth that Apple touchpads are "magical" - it's just macOS which comes with good defaults, but if you put some effort in it you can get it just as comfortable on GNU/Linux as on macOS (sans continuous gestures, I have to admit that's the one thing I envy them).

> even high-end Windows laptops have trouble matching my 2012 Macbook in terms of input

That's only because vendor drivers on Windows are notoriously bad. My girlfriend is using a mid-2012 13" MBP and its touchpad is rather meh. Not bad, but I've used much better ones. Current Macbook touchpads are better than the 2012 ones though.

Re: Bored? How about trying a Linux speed run?

#250
post #9

Reminds me of David Beazley's talk about being locked in a hidden vault to analyse 1.5 TBytes of C++ source code. No tools or internet connection, but a Python interpreter. https://pyvideo.org/pycon-us-2014/discovering-python.html

Such an amazing talk ! Someone linked to this on HN a while back, this allowed me to discover David Beazley. I then got the Python Cookbook, and watched a bunch of other very cool talks. He's an excellent speaker and python wizard!
Post reply on HN