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

Is it possible to build a full OS emulator on top of MMIX?

> The above tools could theoretically be used to compile, build, and bootstrap an entire FreeBSD, Linux, or other similar operating system kernel onto MMIX hardware, were such hardware to exist.

https://en.wikipedia.org/wiki/MMIX


I did a google search on “dup2(2, 1)” in a fresh private tab on my iPhone Safari and this thread came up the second, between

https://man7.org/linux/man-pages/man2/dup.2.html

and

https://man.archlinux.org/man/dup2.2.en

A lot of bots are reading this. Amazing.


Sometime all you need is to RTMF from the source instead of Nth hand information (N > 1)

https://www.gnu.org/software/bash/manual/html_node/Redirecti...


Great if you know where to look, but most people who ask themselves the question don't know they have to look up the bash manual in the "redirection" section.

The usual thing (before LLMs) is to Google the question, but for the question to appear in Google, someone has to ask it first, and here we are.

Also the Stackoverflow answers give different perspectives, context, etc... rather than just telling you what it does, which is useful to someone unfamiliar with how redirections work. As I said, someone who doesn't know about "2>&1" is unlikely to be an expert given how common the pattern is, so a little hand holding doesn't hurt.


> Great if you know where to look, but most people who ask themselves the question don't know they have to look up the bash manual in the "redirection" section.

Where else would you look but in the manual of your shell? And you don’t have to know in which section to look, you can just search for “2>&1” in the bash man page.


What is a command and what is shell syntax is not always obvious, especially to a beginner, which I assume most people asking this question are.

Take the command "ls -l ~/.. ; fg" for instance. What is interpreted by the shell and what are commands? If you have some experience in bash, you probably know, and therefore you know which part to look in which man page, but you probably also know "2>&1".

Spoiler: "-l" is part of the command, so look in the "ls" manpage. "~", is expanded by the shell, ";" is shell syntax and "fg" is a builtin, all three are in the "bash" manpage. ".." is part of the filesystem.


And how do you find that?

Google search literally is useless for these days, for Average Joe.


Try "info bash" on your system. It's the same manual.

In Emacs, when I hit C-h i I get a menu of all my info manuals and I first read the bash one there.


That is correct. And also simple `man bash`:

REDIRECTION Before a command is executed, its input and output may be redirected using a special notation interpreted by the shell. Redirection may also be used to open and close files for the current shell execution environment. The following redirection operators may precede or appear anywhere within a simple command or may follow a command. Redirections are processed in the order they appear, from left to right.

       In the following descriptions, if the file descriptor number is
       omitted, and the first character of the redirection operator is <, the
       redirection refers to the standard input (file descriptor 0).  If the
       first character of the redirection operator is >, the redirection
       refers to the standard output (file descriptor 1).

       The word following the redirection operator in the following
       descriptions, unless otherwise noted, is subjected to brace expansion,
       tilde expansion, parameter expansion, command substitution, arithmetic
       expansion, quote removal, pathname expansion, and word splitting.  If
       it expands to more than one word, bash reports an error.

       Note that the order of redirections is significant.  For example, the
       command

              ls > dirlist 2>&1

       directs both standard output and standard error to the file dirlist,
       while the command

              ls 2>&1 > dirlist

       directs only the standard output to file dirlist, because the standard
       error was duplicated as standard output before the standard output was
       redirected to dirlist.
...

Ah, thanks, didn't realise they put the whole manual into the manpage. For other tools (e.g. make), the info manual is complete but the manpage is just a summary.

Do these days include the nearly seventeen years ago when this question was posted? ;)

https://www.gnu.org was there for decades, much older than SO and google.

I know GNU -> Google -> SO -> LLM is a culture shift, this is how human attention goes. The search engine and LLM only capture the latest group attention and we have short memory. That is why reading is a critical skill for us as human beings, we can't afford to outsource that to machine. (Same with writing.)


Fascinating reading if you care about system design. Who would imagine this charged the world.

https://info.cern.ch/hypertext/WWW/DesignIssues/Overview.htm...


I am watching ACM A.M. Turing Award Laureate Interviews to set the perspective.

https://www.youtube.com/playlist?list=PLn0nrSd4xjjaSLBSzmno-...


For example:

Allen Newell, 1975 ACM A. M. Turing Award Recipient: “Desires and Diversions”

https://www.youtube.com/watch?v=hCe0ZPGap_k

Wisdom from the previous AI era.


I watched this YouTube video

Two decades of Git: A conversation with creator Linus Torvalds

https://www.youtube.com/watch?v=sCr_gb8rdEI

I was surprised that he only spent four months on it as a maintainer. What a great piece of work by a great software developer.


I am not at lecture 9 yet. I would love to follow their journey at human pace just like I did 30 years ago.

I do think your point is valid. The trend in the industry is putting emphasis on cosmetic qualities (format, workflow, testing), producing huge amount of metadata that consumes huge amount of human and machine energy for the peace of mind.

Complexity, maintainability, modularity have more to do with thinking about the problems at proper abstraction levels.

It seems we ended up spending more time on tools like writers spending more time on sharpening pencils or playing with fonts than writing something meaningful.

A low quality software can have beautiful code just like a low quality book has beautiful fonts.


When I was a Physics Ph.D. student in NYU in the late nineties, I took a course called UNIX tools in the CS department. It was a hands on course where the instructor did live REPL in the terminal and we watched him showing us all the tricks. I got hooked with UNIX since then. Got myself a dialup terminal in my tiny apartment in east village and dial in to the workstation on campus. The latency is so bad that I can’t only see the feedback after a few keystrokes. That was when I trained my vi muscle memory. (EMacs was out of the question.)

Later I got my own IBM 386 and installed Linux on it and started to program in Perl …

I am a big fan of Jon’s YouTube videos on Rust and I started to use Rust in non conventional ways.

I am going to follow this lecture series and “port” them to rustdoc and see how it goes.

Another rabbit hole to fall down, it is going to be fun.

https://ontouchstart.github.io/rabbit-holes/missing/


I have played with both mlx-lm and llama.cpp after I bought a 24GB M5 MacBook Pro last year.

Then I fell down the rabbit holes of uv, rust and C++ and forgot about LLMs. Today after I saw this announcement and answered someone’s question about how to set it up, when I got home, I decided play with llama.cpp again.

I was surprised and impressed:

https://ontouchstart.github.io/rabbit-holes/llama.cpp/

I am not going to use mlx-lm or lmstudio anymore. llama.cpp is so much fun.


Attention feeds attention.

Attention is ALL You Need.


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

Search: