Live data from Hacker News

Bored? How about trying a Linux speed run?

rachelbythebay.com

31–40 of 284 posts

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

#31

If you have bash, you could retrieve wget or CURL and go from there. { echo -e "GET / HTTP/1.0\r\nHost: ftp.gnu.org\r\n\r" >&3; cat /dev/tcp/ftp.gnu.org/80

Getting it from a Gopher mirror would be even easier, the protocol is barebones. But bash is cheating, you can write an IRC/FTP/Gopher client in seconds and fetch all the info and documentation from here.

You can browse the wikipedia, read an HN mirror, play IF games and even seek Gutenberg from Bash as I can see by just connecting to the port 70 and doing simple Gopher queries. That's too easy then.

If the shell is the one from Busybox or ash, the fun begins.

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

#32

Bored? Write a touchpad driver based on libinput which gives you identical mouse acceleration between Macbook trackpads and linux trackpads.

As someone who can't be bothered to pay the Apple tax, what does the Macbook trackpad do that others don't? My experience with different mouse acceleration configs (Windows, Synaptics, Linux) has only been negative.

I don’t have a clue about _why_, but I know from using macOS and Linux on mbp that whereas the touchpad basically works in macOS, it totally doesn’t function in Linux! :(

In Linux, wrists keep triggering touch events as you type. Screens start scrolling, focus goes to random things, and everyone swears. You end up having to hold your hands right over the keyboard in a very unnatural way to avoid accidental mouse interaction.

I’ve had this problem on my current hp laptop that replaced my mbp too. It’s a Linux concepts problem. Linux simply doesn’t cope with hands near the touchpad.

Lots of coders I know use Linux on laptops. They swap recipes for how to disable the touchpad completely.

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

#33
Embdded development is like this sometimes.

Start with some hardware. If you are lucky, you get a board support package with a Linux kernel. Otherwise you need to write some drivers to talk to the hardware. Progressively get it to the point that it will boot up and get on the network. Then get the application running.

Microcontroller development is even worse. When you don't have any space, you may actually end up writing everything in C from scratch.

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

#34

If you have bash, you could retrieve wget or CURL and go from there. { echo -e "GET / HTTP/1.0\r\nHost: ftp.gnu.org\r\n\r" >&3; cat /dev/tcp/ftp.gnu.org/80

> I realized a few years later that this was just an exercise in flexing the fact that I could probably bootstrap my way up from this with the C compiler to write a terrible editor, then write a terrible TCP client, find my way out to ftp.gnu.org, get wget, and keep going from there.

I assume by "a terrible TCP client" she means a TCP stack, so you don't have a TCP stack yet, so `/dev/tcp` wouldn't exist. Otherwise just opening a socket and sending the request would do the trick. Or maybe that's what she meant by "TCP client"? But writing an editor for that would be overkill I think.

Nice try though :)

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

#35
post #5

Writting a shell is easy, but it's already done (do'h). You could be restricted to a really basic one, with no cd having to reimplenent that yourself. A simple "cd" command taking ARGV as the path would be around 10 lines in C. Reimplementing echo would be the obvious second thing to do, and later, a barebones cat a la plan9/OpenBSD. Finally the 3rd basic tool would be an ed(1) clone without regex support. ed(1) can…

I do not use IRC at all. But still curious, do people use it?

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

#36
post #22

Earlier quoted context omitted.

As someone who can't be bothered to pay the Apple tax, what does the Macbook trackpad do that others don't? My experience with different mouse acceleration configs (Windows, Synaptics, Linux) has only been negative.

IIRC Linux and Windows drivers turn trackpad events into mouse events so by the time the OS sees the movement there is no touchpad info. Apple with tighter integration delivers the actual touchpad movement data and not a faked mouse event. Windows 10 has had work done in this area too but not sure the details.

To make stuff worse, Elantech/Synaptics feature-gate their drivers... I have had laptops where I put a trackpad driver from some totally different laptop and suddenly I'd have a lot more gestures.

But no matter what, two finger scrolling and zooming won't ever be as smooth and "step free" under Windows/Linux... once experienced, cannot be missed.

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

#37

Earlier quoted context omitted.

As someone who can't be bothered to pay the Apple tax, what does the Macbook trackpad do that others don't? My experience with different mouse acceleration configs (Windows, Synaptics, Linux) has only been negative.

I don’t have a clue about _why_, but I know from using macOS and Linux on mbp that whereas the touchpad basically works in macOS, it totally doesn’t function in Linux! :( In Linux, wrists keep triggering touch events as you type. Screens start scrolling, focus goes to random things, and everyone swears. You end up having to hold your hands right over the keyboard in a very unnatural way to avoid accidental mouse inte…

Which laptop are you using? This has never been an issue to me, and I've used Linux exclusively for years. I'm on a Thinkpad T480s.

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

#38

Bored? Write a touchpad driver based on libinput which gives you identical mouse acceleration between Macbook trackpads and linux trackpads.

As someone who can't be bothered to pay the Apple tax, what does the Macbook trackpad do that others don't? My experience with different mouse acceleration configs (Windows, Synaptics, Linux) has only been negative.

Nothing. macOS simply implements touchpad gestures in continuous way as opposed to binary triggers, does it consistently across applications since most of it is handled by toolkit and comes with sane defaults that are harder to accidentally misconfigure than on other systems. Those things contribute to perceived user experience, but there's no real reason other than lack of software polish that it couldn't be like that on other platforms as well. GNU/Linux is slowly getting there, but there's still plenty of work left across toolkits and input stack.

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

#39
post #21
post #8

Why would you write a terrible editor in C and what would you use to type that in? Isn’t cat - > file.txt or echo enough? AFAIK bash is able to set up tcp connections. Can’t you just download a static compiled editor through this? Maybe you don’t have bash. So what exactly is the starting point?

A basic shell with just forks and execs binaries from $PATH and nothing more. Maybe, just maybe, file redirection. You won't have neither echo(1) or cat(1), you must reimplement them. Echo(1) is damn easy.

Better would be to have a scheduled execution of some bits on the disk, every 5 minutes or so, and you are only allowed to write to disk, not execute anything on your own.

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

#40

If you have bash, you could retrieve wget or CURL and go from there. { echo -e "GET / HTTP/1.0\r\nHost: ftp.gnu.org\r\n\r" >&3; cat /dev/tcp/ftp.gnu.org/80

> I realized a few years later that this was just an exercise in flexing the fact that I could probably bootstrap my way up from this with the C compiler to write a terrible editor, then write a terrible TCP client, find my way out to ftp.gnu.org, get wget, and keep going from there. I assume by "a terrible TCP client" she means a TCP stack, so you don't have a TCP stack yet, so `/dev/tcp` wouldn't exist. Otherwise j…

It is unclear to me whether the C libs include TCP.

If not then that seems like the main part of the work because once you have that then you can download everything else.

Unless it was already in BIOS or some network hardware remote admin Intel thing and there was a way to hack into that to use it. Then you would not have to implement TCP IP.

To me the question is what is the minimal part of TCP /IP that you would need. I guess also you need ethernet if that's not in the C libs.

To cheat maybe your computer has a modem and there is a BBS - simpler protocol.

Post reply on HN