(hide navigation)
  • Swedish content
Fund my projects
Patreon
Steady
Forum
Register
Log in
Latest comments
Syndication
RSS feed
Feedback

Forum comments in chronological order

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Mar 2021

Autosokoban

Anonymous
Mon 1-Mar-2021 14:14
The world NEED Autosokoban as an app. Every good thing must last forever!
(ClockworkBastard)
Definitely 100%

The TTY demystified

Anonymous
Thu 11-Mar-2021 16:15
Dear Mr. Linus Åkesson,
(..)
MIke

Hey MIke,

Not Linus Akesson but I might clear up the confusing here, I admit it is a topic that can lead to much confusion. I took a quick peek into "iSH" but keep in mind iOS is not my forte, nor do I fully know how "iSH" is implemented. In that regard I do not know what is possible and what is not but I give my educated guess at the end.

To clear up any confusion about a "tty" and "bash": both have absolutely nothing to do with anything graphical, be it rendering text on a terminal or doing anything GUI related.

- "bash" is simply a shell like there are many other shells ("sh", "zsh", "ksh"). To really oversimplify things: "bash" reads input bytes (your commands you type for example) and spawns processes. These processes produce output. Bash does not intercept this output nor does it render text. For example, if you type "ls" and press enter, it reads the command, creates a new process ("ls") and that process produces output.

- A "tty" neither has anything to do with rendering text. You can read and write to a "tty". The article explains the "tty"'s role: It is a passive object with some data fields. Just like a normal file you can read and write to the "tty". A keyboard can for example write to a "tty", "bash" can read that data from the "tty". The "ls" process can write to the "tty" and a >virtual terminal< (e.g. xterm) can read that data from the "tty". The "tty" also contains data about processes for example who the foreground process is in order to direct signals to the right process and process groups.

Then who is responsible for the actual rendering? The (virtual) terminal (not the "tty") plays a central role here. If we only focus on a virtual terminals we have basically two cases mentioned in the article.

1. The virtual terminal process resides in kernel space (called the console).It reads from the "tty", say the output from the "ls" process and renders the text. It interacts with the VGA driver to do so.

2. The virtual terminal process resides in user space: An example of virtual terminal is "xterm", "gnome-terminal" is another, "st", the one I use, but here are many more. The virtual terminal has the same tasks as the kernels virtual console but instead of interacting with the VGA driver it interacts with a display server (Xorg for example). The display server in turns interacts with the videocard drivers to render graphical output.

In short a "tty" has so little to do with rendering anything that a "tty" does not even need to be connected to a virtual terminal. A ssh server for example reads from a socket, writes to a "tty" and returns the output back over the connection to a ssh client. The ssh client writes the results to a "tty" and your virtual terminal process reads it and presents it to the screen.

As far as the 'iSH' app is concerned: it seems that it merely emulates a virtual terminal. To do anything GUI related in a linux enviroment you should have a display server running (e.g. Xorg) that interacts with the linux video display drivers. Opening "xterm" in "iSH" is like starting a new virtual terminal from a virtual terminal you are already in ("iSH"). So in order to start a graphical user interface you have to install a display server and all display drivers which I doubt "iSH" can do (hence the response from the developer 'it is not really set up to do anything graphical').

I hope this helps,
Bennie
Anonymous
Fri 12-Mar-2021 03:28
Wow, Bennie, thanks for that thorough response, and it does help. I thought the TTY might be the answer to most of my questions, but I now understand that it is much more complex than that.

Have a good week,

Mike
Anonymous
Sat 13-Mar-2021 16:34
A well formulated question deserves a proper answer I think. Besides, you did your research by even contacting the app-developer. Happy to help :).

To go a bit off topic regarding the article (since noone is really posting here anyway) and to say a bit about running linux on an ipad I think you have three options. What you want depends on your goals (but running iOS apps inside linux will not be possible).

1. Either/or linux/iOS: jailbreak
If you want to run a full fletched linux OS on the ipad an option is to jailbreak the ipad and try to install linux. This is hard because Apple does not want you to and a failed installation might render the ipad useless. Also you will not be able to run any iOS apps anymore obviously.

2. Interact with the ipad linux-like: 'iSH'
To interact with the ipad like running xterm is using the 'iSH' app, the reason I think it was created . I'm not totally sure what the app is capable of but I guess you can do pretty much anything with your system as on a normal linux distribution, as long as it does not require GUI applications (except perhaps starting iOS apps you already have installed).

3. Running linux on top of iOS: Virtualisation Software
The last option I can think of is to run linux in a virtual machine (I checked and VirtualBox seems to have a port for ipads). Here you run linux on top of iOS in an app such as VirtualBox. The downside is when in emulating software such as VirtualBox things run more slowly, because it has to emulate the environment. Also, it will only grant access to linux application and its own filesystem; interacting directly with files and apps under iOS is not what it is intended to do. The upside is that you can keep using you ipad in the normal way and switch to linux whenever you want (with a graphical user interface if you like).

Hope you are having a great weekend :),
Bennie
Anonymous
Sat 13-Mar-2021 17:04
I forgot to mention some resources if you are interested:

To get a kind of overview how graphics work under linux have a look at the graphics server (note that Xorg is not the only player in town anymore. Wayland is a newly developed display server):
https://en.wikipedia.org/wiki/X.Org_Server

If you want to go down the rabbit hole:
- Bovets 'Understanding the linux kernel' is an indepth look into how the kernel works.
- A more specific look at the role and code of a tty driver is Coberts 'Linux Device Drivers' (chapter 18 is devoted to tty drivers)

Another tip is looking at the source code of the mentioned 'st' terminal (https://st.suckless.org/). It is thé terminal with the least bloat and easiest to understand code in my opinion (take for example x.c where xlib is included, the interface to the X server to make 'draw' requests).

About me

Anonymous
Fri 19-Mar-2021 13:55
If I didn't like your compositions so much, I'd say that, by your self-description, you are a little bit pretentious...

Why? He just says what he likes doing.

A Mind Is Born

Anonymous
Fri 19-Mar-2021 18:41
This is beautiful, Linus. If you ever consider making an extended version, please do it! Otherwise, listening on repeat works for me :D

Post Scriptum: The Impossible Bottle

Anonymous
Sat 20-Mar-2021 17:55
I think found a bug where I think you can get into an unwinnable state. If you drop the batteries while inside the bottle, and then try to take the batteries, you get a message about not being able to do more than one thing at once. But without the batteries you can't turn the power back on.

Watch Room

Anonymous
Sun 21-Mar-2021 22:23
That's awesome, Linus! It really fits like f**k

I minted an NFT of A Mind Is Born

Anonymous
Tue 23-Mar-2021 12:05
Disappointed in this, I have to admit. The environmental, social and economic impact of cryptocurrencies in general and NFTs in particular are, by now, pretty well documented and spread over the internet, and while it is possible you're unaware of it, it is not entirely likely.

I hope this is a case of idealistic, naive curiosity, fed by grifters selling you on the blockchain and NFTs (because it's all grifters, all the way down) and that it stops here.
lisperati
Conrad Barski
Tue 23-Mar-2021 16:02
(Note: I'm the person who purchased the NFT)

I think this is a understandable perspective to hold, it's good to have it stated here as a counterpoint. For what it's worth, Ethereum is currently in the process of switching to "Proof of Stake", which has dramatically lower energy costs (somewhere in the order of 1000x less energy cost) https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/

Anonymous
Tue 23-Mar-2021 20:37

lisperati wrote:

(Note: I'm the person who purchased the NFT)

I think this is a understandable perspective to hold, it's good to have it stated here as a counterpoint. For what it's worth, Ethereum is currently in the process of switching to "Proof of Stake", which has dramatically lower energy costs (somewhere in the order of 1000x less energy cost) https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/

Ethereum has been "just about" to switch to PoS for years at this point. I'll believe it when I see it.

Regardless, PoS is not going to help with all the other numerous problems of Ethereum and cryptocurrencies in general.

I minted an NFT of A Mind Is Born

Anonymous
Tue 23-Mar-2021 21:59
What I don't get is this: "I hereby announce that I will not create any more NFTs" It seems to be a bunch of characters, not a blockchain, it's not a guarantee at all.
Don't get me wrong, I do not doubt your word at all! But what's the point of the blockchain thing?
lft
Linus Åkesson
Wed 24-Mar-2021 17:23
It seems to be a bunch of characters, not a blockchain, it's not a guarantee at all.

That is an excellent point. The blockchain doesn't protect every link of the trust chain. Here is my understanding:

When somebody buys, say, an expensive painting from the 19th century, they need to take steps to ensure that it's genuine. This is done by gathering evidence, certainly from the object itself, but also from its provenance (ownership record). For instance, if a newspaper clipping from 1885 says that Mrs. So-and-so, the well-known art collector, bought it from the artist, then that's evidence for it being the real thing at the time. If every subsequent ownership change is documented, and every buyer and/or auction house along the way seems trustworthy enough, then it's probably still the real thing. And having passed through all those owners and auctions also confirms, and sometimes increases, the value of the object.

But if there's a perceived weakness in the chain, or some suspicion that the painting was replaced somewhere along the way, its value would be reduced. The blockchain solves this problem by keeping a perfect record of the provenance. The record is even timestamped; art forgers sometimes create elaborate fake documents to confirm the history of an object, but this isn't possible on a blockchain.

Unless, of course, a parallel history of a forged item is started right about now, and then meticulously maintained and updated in realtime, bought and sold by shills along the way, so it would look as genuine as the real object at some point in the future. To prevent that possibility, my announcement also included a reference to the genuine NFT (in the form of a cryptographic hash).

Next, we have to consider the possibility that the announcement was forged. Like you say, the contents of the announcement are just a bunch of characters, easily faked. But they appear on this website, which is evidence (but not proof) that they originate from the same person who created the demo. The buyer has paid good money for the artefact (this is documented in the ledger), which is evidence (but not proof) that they considered it genuine at the time. Many have witnessed the public announcement, I have not gone on record denying it, etc. All of this is evidence.

Finally, I could go back on my word and create more NFTs of the same artwork, or deny that this was a legitimate trade. That would of course be immoral and ruin my reputation. Furthermore, there is no immediate economic incentive for me to do it, since any later NFTs originating from me (regardless of artwork) would lose much of their perceived value if I can't be trusted. Meanwhile, the identity of the original NFT would still be established (as per the previous paragraph) and considered canonical. The controversy might even cause it to increase in value---but I wouldn't benefit from that.

In conclusion, the buyer and I had to build up enough trust between us to go through with the initial trade. Then, each new buyer would have to evaluate the evidence that this initial exchange was legitimate. Part of that evidence is in the provenance: "If all these earlier owners had a large stake in this being a genuine article, after reviewing all the evidence available to them, then it probably is." And the provenance is guaranteed by the blockchain.
lft
Linus Åkesson
Wed 24-Mar-2021 21:37
Disappointed in this, I have to admit. The environmental, social and economic impact of cryptocurrencies in general and NFTs in particular are, by now, pretty well documented and spread over the internet, and while it is possible you're unaware of it, it is not entirely likely.

I hope this is a case of idealistic, naive curiosity, fed by grifters selling you on the blockchain and NFTs (because it's all grifters, all the way down) and that it stops here.

Thanks for being frank about these concerns. There are indeed ethical aspects of blockchains, and I take them seriously, but I humbly acknowledge that I may have missed some things. But I also think the matter is more complex and nuanced than you make it appear.

First, the environmental impact. I know that crypto-mining uses lots of electricity worldwide, and that is indeed a problem. The mining will continue as long as the cryptocurrency is considered valuable. So there is a sense in which I'm contributing to the perceived value of Ether by participating in the network. Proof-of-work is like an arms-race; there's no easy way to back down. Proof-of-stake would solve this problem, and I was happy to see that Ethereum was moving in that direction. I was disappointed to learn (from your comment) that it's been "just about" to happen for several years, which suggests that it may never happen. I admit that I could have been more prudent there.

I am unsure about the social and economic impact you refer to. Money laundering? Blockchains appear to be more transparent than international bank transfers. Consumer rights and the inability to reverse transactions? But nobody is forcing consumers to pay with cryptocurrency; it's opt-in. Again, I could be wrong, so please elaborate.

Yes, I did this partly out of technical curiosity, but I'm not convinced that it was naive, or that blockchains are run by "grifters, all the way down". Grifters flock to money, of course, but staying away from blockchains because grifters are attracted to money seems to me like staying away from democracy because sociopaths are attracted to power. Besides, I would expect the Ethereum userbase to have its fair share of idealists (the ideals being decentralization and transparency) and technology buffs (understandably fascinated by a distributed Turing-complete virtual machine, built from cryptography primitives, running on top of a loosely-knit network of adversaries). And I know I'm not a grifter myself. I agreed with a buyer to sell a digital object for a sum of money; everything is above the board, and I'll obviously pay tax on the income.

UNICEF, American Red Cross, and the UN World Food Program accept donations in cryptocurrencies. Of course, I can't just point to somebody else and say "they're doing it so it must be okay"; I am responsible for my own actions. But you seem to imply that these aid organizations are morally corrupt, and I say it's probably a little more nuanced than that.
Anonymous
Sat 27-Mar-2021 13:40
The basic problem of blockchains is that they try to impose scarcity into a domain that _by its very nature_ resists it. This takes either an enormous amount of effort (PoW) or some trusted party (PoS) to uphold. It is also completely unnecessary, since the things people want to make scarce are all social constructs in the first place. The only change is who the trusted party is (and it's also mostly not a change - it's all rich people).

Everything done using blockchains, from money transfers to lotteries to contracts, are already achievable without using something like 1% of the worlds entire energy use to accomplish it. They solve no problem, fix no social ill, and impose significantly worse conditions on the world, not just now, but for decades or centuries to come. Conditions that the world's poor will bear the brunt of.

NFT's in this context, is a skewed lottery where mostly already wealthy people will be paid enormous amounts of money (which will be written off as tax-deductible) for literally nothing. This is not dissimilar from the traditional art market, but has the added detriment of burning up the planet.

In terms of the social impacts of blockchain research, from my view it's been an enormous drain and waste of resource that could have been spent on actual, useful progress in decentralisation, federation, and scientific research (supercomputers are more expensive because blockchain mines buy up a lot of stock). If _half_ of the people duped into dumping their efforts into some doomed blockchain project instead had been working on, say, torrent-based live streaming, or strong software support for better, federated social networks, trading sites, chat protocols and so on, I think we could have had real, major competitors to the big five.

For the economic side of things, blockchains serve very much as contradiction heighteners in existing late capitalism, where those With are continually getting more than those Without. Despite whatever anyone tells you about blockchain, these are no different. By having some money and doing lucky speculation, you can get some more money, but it is entirely arbitrary when and how each individual project goes up and down, and the only constant thing is that those with _lots_ of money (who can hedge risk, buy mining equipment, participate as stakeholders in PoS) are the ones getting out on top.

Now, all this being said, if you need to hustle to survive or live comfortably, I won't judge anyone for jumping into the grift and trying to grift with the best of them. Chances are against you unless you're already rich, however.

In terms of you, Linus, and you, the buyer's relationship, I would encourage you to, if you want to do similar things in the future, to instead solve things using traditional assymetric key crypto. Set up a certificate for "Dibs on <whatever>", link it to an announcement page on here, sell that, and send an update on each sale. I'm sure you can figure out how to do this reasonably.

And you have a trusted party (linus) who can be contacted, generate a new key in case the old gets lost, etc. same as it would have to be on the Ethereum blockchain anyway. Just with less burning of fossil fuel.

The sixtyforgan

Anonymous
Mon 29-Mar-2021 01:38
simply superb!
LaraCraft
Mon 29-Mar-2021 09:21
Hi Linus,
i would like to try that out myself.
I have a 6 voice c64 and a spring reverb from an old organ too.

Still waiting for the code of the Chipophone too ;)

most of us are not as good with Assembler and Maschinencode as you ^^"

kind regards from Germany Lara

A Mind Is Born

Anonymous
Mon 29-Mar-2021 15:43
This is amazing! Just watched the video on youtube and came here to see how it worked, but I know nothing about programming so it all goes right over my head lol. Either way, very very cool! And I love your website as well, feels very early 2000's, not in a bad way though it's just functional lol
Anonymous
Mon 29-Mar-2021 21:08
With Revision coming up, I though I'd listen to this a few more times. It's still amazing. I started working my way through all the seeds and went from 00 to 79 hex, and have 129 versions of the prg in a directory. I might just finish them off all the way to FF one day.

The sixtyforgan

Anonymous
Tue 30-Mar-2021 11:45
May I ask which waveform you chose for the organ? Is there a modulation or combination? Just asking for a friend..
Anonymous
Tue 30-Mar-2021 12:00
This has just made my day. The most bonkers thing I've seen in ages, and an utter delight. Thank you so much for sharing - I'm still giggling now!
Anonymous
Tue 30-Mar-2021 12:28
Having played with Hauptwerk this suddenly makes ~£500 plus another ~£200 for an instrument look quite expensive!

Brilliant demonstration that us choristers all knew! A generous acoustic hides a multitude of sins and just makes everything sounds much better.

Super demo and project!
Going to read up on this reverb device!

GCR decoding on the fly

Anonymous
Wed 31-Mar-2021 07:20
I thought my favorite assembly hack was one I did using the x86 direction flag to use the same code to perform AES sbox/isbox byte translation and byte reordering for encryption as for decryption (normally not possible; while it's easy to swap the translation table, the bytes reorder differently between encrypt/decrypt).

It turns out with a few instructions overhead the same code can do both reorders by an accident of the architecture and the right code structure that mixes string loads and stores (which change direction with the direction flag) with register swaps (which don't change direction).

That is, it was my favorite until I found this. This is pretty badass and I've never even owned a C64.

The sixtyforgan

Anonymous
Wed 31-Mar-2021 14:39
wonderful project, very very well explained! Is the C64 playing program available for download? I made a similar program but for piano-like keyboard

(haiku)

Anonymous
Wed 31-Mar-2021 16:15
I have no idea what this says. im stoned and wandering the internet and found your brain birth song and then came to this site, and i saw this poem had no comments. well sir i hope u know that if this poem is as good as your music then i dont even need to understand it to know its great stuff.