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

Regarding the Minecraft issue:

If a Minecraft Java server has the special Geyser plugin ( https://geysermc.org/ ), Minecraft Bedrock clients can connect to it, so you can stick to Minecraft Java on Linux and still play together with your kids who are on Minecraft Bedrock on their iPads.


Here is my explanation for "software people who understand databases". The structure of the explanation will be as follows:

  1. Explain how you would do simple accounting with a database
  2. Point out which indices you'd create for performance
  3. Show how the "double entry" part of double entry accounting is about the indices
1. The way you'd do accounting in a database is with two tables: One table for accounts (e.g. your checking account, or the supermarket account, which you don't own) and another table for transactions. The transactions move an amount of money from one account to another, e.g. from your checking account to the supermarket account. Or if you use it for budgeting, you might split your checking account into a groceries account, a rent account etc. (think "categories").

2. For performance, you would create indices based on the accounts in the transaction table, so you could easily check what's going on e.g. in your groceries account or how much you spent at the supermarket.

3. Double entry accounting was formalized in the 15th century, way before computers became a thing, but bound paper books were already somewhat affordable. The way you'd do accounting is like this: During the business day, you would write down your transactions as they happen, into a scrapbook, similar to the transactions table mentioned above. At the end of the day, you'd do the "double entry" part, which means you take your "index" books where each book is about one account and you transcribe each transaction from your scrap book into the two books of the two accounts that are mentioned in the transaction, e.g. if you spent $10 from your groceries account into the supermarket account, you'd double enter that transaction both into your "groceries" book and into your "supermarket" book. Then, when you want to check on how much you spent at the supermarket in a particular month, you could easily look it up in the supermarket book (this would be very tedious when using the scrap book). These account centered books are like the indices in the database mentioned above.

So the double entry part is about clever index building for making it easier and faster to understand what's going on in your accounting system.


How are investments modeled in this system? e.g I buy $100 of an index fund which can fluctuate in value.


Not an accountant, so if I get it wrong someone please correct me. But index fund shares are an asset: something you own. So is your car, your house (if you own it), and your computer. When you buy an asset, you paid a certain price for it. When you sell it, you pay a different price. Until you sell it, though, you don't actually have the money, so it hardly matters what its value is until you sell it. If you buy $100 of an index fund and a year later it has grown by 10%, you don't actually have $110 yet until you sell it. So you just track that you have a certain number of shares of the fund. Let's say each share sells for exactly $20 when you bought them, so you have exactly 5 shares. Later the share price is $22, but you don't have $110 yet, you still have exactly 5 shares. When you sell them, then you'll have $110.

So you record two entries:

January 1st, 2025:

  -$100 checking account
  +5 shares VFINX at $20 ea
January 1st, 2026:

  -5 shares VFINX at $22 ea
  +$110 checking account
At this point you have "realized" ("made real") $10 of profit from this asset. You bought it for $100 and sold it for $110, so the IRS wants you to pay taxes on the $10 profit you made. (This is capital gains tax). Until you sold them, some people would consider you to have $10 profit in "unrealized capital gains", but you did not actually have that profit until you sold the shares. This is important to remember, because if you start counting on that $10 profit but then the share price drops because the economy took a hit, suddenly you don't have $110 worth of shares, you have $90 worth of shares, and you'll make a loss if you sell them now. (This is one of the reasons why only the economically illiterate would propose a tax on "unrealized capital gains": that means taxing people for income they have not actually received, but merely could theoretically receive. Which is both immoral and stupid.)

Hope this explanation helps a little. And as I said, if I got something wrong, please correct me and explain how I was wrong; I'm not an accountant. I understand the basic principles, but it's entirely possible I was off on some detail or other.


A fancy term of art for all this is "cost-basis accounting". Your (double entry) account tracks only the cost basis (how much you have spent and when you spent it for what commodity) not the current price. Current price fluctuates with the market and you can track the price as well to build an unrealized gain/loss statement. This sort of statement is not an account, it's a report on an account. (And yeah, "unrealized" means what it says that it isn't real money in your accounts, just money you potentially could make if you sold/converted/traded what was in your accounts.)


> (This is one of the reasons why only the economically illiterate would propose a tax on "unrealized capital gains": that means taxing people for income they have not actually received, but merely could theoretically receive. Which is both immoral and stupid.)

But your statement misses the important point of situations where people use the unrealized gains as collateral for a loan which they then use (for example to live off of). This in fact effectively "realizing" them without paying appropriate taxes on them. As long as gains are purely theoretical and not used for any transactions they should remain untaxed. As soon as they become "active" by being sold, or for example in unlocking additional assets by being collateral for a loan, they should be taxed.

Same concept as a retirement account. You can sell within a retirement account and rightfully don't have to pay taxes because you don't really have "access" to the cash. It's still "locked" within the account. Only when you withdraw to have access to it and make it active/real do you pay taxes. But if you take out a large loan leveraging that retirement account as collateral (or against an unrealized gain) you are not making it active and correctly should pay taxes.


If it's a loan, it must be repaid. At that point, the debtor is going to either sell some stocks, thereby actually acquiring real income (and paying capital gains taxes), or use some other source of cash and not touching the stocks. In the former case, he will pay tax on that income at the time when he actually sells the stocks. In the latter case, he paid taxes on that cash at the time when he received it as income, so it's already been taxed and shouldn't be taxed twice. (Which is why inheritance taxes are immoral — they're double-taxation — but that's a totally separate subject).

As for retirement accounts, same principle applies. Collateral is collateral, it's a contingency. It might or might not ever be touched. If it's touched, then there will be real income involved. If it isn't touched, then there was no income.

But as for the idea of paying taxes on things used as collateral for a loan, that only makes sense if you consider money received as a loan as income. And if you do, you're going to get yourself in serious trouble. LOANS ARE NOT INCOME. They have to be repaid, and they actually cost you money in the long term because you also have to pay interest. If you treat loans as if they were income, you'll quickly find yourself neck-deep in credit card debt and in serious financial trouble. On the other side of the equation, if the IRS were to treat loans as if they were income and tax them (or the collateral used to secure the loan), they would do immense damage to the economy.


I feel I should also mention one more thing. The fact that you don't have the money until you sell the shares is also why "net worth" can be a highly misleading concept. (All numbers in the following example are fictional and made up on the spot, BTW). Billionaire Gill Bates, whose net worth is reported to be $20 billion, does not actually have 20 billion dollars. He has $5 million (million, not billion) of actual dollars in his bank account(s), but the rest of his net worth is in assets: he owns 200 million shares of MegaSoft Corp, whose share price is currently $100 per share. If MegaSoft Corp's shares suddenly drop in value (say, because a hacker group announces that MegaSoft's Doors 12 OS is full of, well, backdoors and suddenly nobody wants to buy it anymore) and now their shares are selling for $90, then Gill Bates's net worth will become 18 billion dollars instead of 20 billion. Did he "lose" 2 billion dollars in one day? NO. He never had those dollars. The "net worth" calculation is just the theoretical amount of money he could make if he sold all his shares.

And in fact, he could never actually make that amount of money by selling all his shares, because if he did put 200 million MegaSoft shares on the market, he'd never be able to find buyers for all of them at the current share price, and he'd be forced to drop his asking price by quite a bit before he managed to sell all 200 million shares. Not to mention the fact that if he tried to sell his entire holdings of MegaSoft Corp, many people would wonder what he knows about MegaSoft's long-term prospects, and would be afraid to buy those shares, driving the share price down even further. Gill Bates would be lucky to make $5 billion, let alone his theoretical net worth of $20 billion, if he were to suddenly sell all his shares. (If he sold them in a trickle over the course of ten years, he might well make the full $20 billion in the end, but not if he dumped them all on the market at once).

This is why (well, it's just one of the many reasons why) net worth is misleading. It's a theoretical number, but the actual amount of wealth someone has in practice entirely depends on market conditions at the moment they need the money, as well as how urgently they need it. (If the market is low right now, can they afford to wait six months for it to recover? Or do they need the money tomorrow and have to sell at a lower-than-ideal price?)


Net worth is the denominator for things that people actually want to, which typically don’t require converting it all to cash at once. For example, pulling 4% of your net worth per year is one way to fund a retirement. So you won’t know if you’re ready to retire unless you’re tracking net worth.

For very rich people like Gill Bates, net worth is going to be the denominator for massive loans, tax strategies, and corporate maneuvering. Again, none of that will require converting the entire net worth to cash all at once. That doesn’t mean it’s not real.

Finance is a complex subject, sure, and it gets more complex the bigger the numbers. That doesn’t mean it’s misleading.


Accounts (in the accounting sense) are unitless, and refer to whatever meaning we ascribe to them, so we can transfer value from $ to shares, or USD to GBP or whatever.

Lalit describes this I think really well in his article

https://lalitm.com/post/one-number-i-trust/#chapter-4-invest...


I just finished https://www.lexaloffle.com/bbs/?pid=178450#p , my Signalis themed version of the Regicide card game.

It's mainly a distraction from enterprise programming, but it does have some parts that might be interesting to Lua programmers, like automated test suits, functional programming point free style and deploying to a raspberrypi via justfile.

The git README kinda doubles as a blog post: https://gitlab.com/michaelzinn/replicide


Because the LCARS GUI is only for simple recurring tasks, so it's easy to find an optimal interface.

Complex tasks are done vibe coding style, like La Forge vibe video editing a recording to find an alien: https://www.youtube.com/watch?v=4Faiu360W7Q

I do wonder if conversational interfaces will put an end to our GUI churn eventually...


Conversational interfaces are slow and will still be slow even if AI latency will be zero.

It might be nice way for making complex, one off tasks by personnel unfamiliar with all the features of the system, but for fast day to day stuff, button per function will always be a king.


Keyboard button even. TUIs are faster for many cases.


The obvious answer is direct brain interfacing. Poking at stuff with your fat fingers is barely faster than speech.

The less obvious answer is how to make it work. That is a hard problem.

And the challenge is how to make it work ethically, especially given where Late Capitalism has ended up.

Otherwise we won't turn into Star Fleet, we'll turn into the Borg.


The lack of capitalism meant that the holodeck program authors had no need to optimize their programs for user retention to show them more ads. So much fewer people suffer from holodeck addiction in Star Trek than are glued to their screens in our world.


Although the funniest thing about the holodeck these days is LLMs have answered a question: can you have realistic non-sentient avatars? Evidently yes, and holodeck authorship is likely a bunch of prompt engineering, with really advanced stuff happening when someone trains a new model or something.

Similarly in Stat Wars with droids: Obi-Wan is right, droids can't think and deserve no real moral consideration because they're just advanced language models in bodies (C3PO insisting on proper protocol because he's a protocol droid is the engineering attempt to keep the LLM on track).


"Cargo cult"? As in, "Looks like the genius artists at Pixar made everything extra green, so let's continue doing this, since it's surely genius."


Why does it have Either? Doesn't TypeScript have "A | B" style sum types?


Either is biased, union is not.

Probably we should say "union" instead of sum, as typescript unions are not discriminated. string | string in typescript is exactly the same as just string, while Either[String, String] is a type which is exactly a sum of two string types. Plus Either is biased towards R, the happy path value.


Nice, what's the KMP plan there?

We currently use https://github.com/michaelbull/kotlin-result , which officially should work on KMP, but has some issues.


If you already have quotation marks, what's the point of the commas?


This is a popular question, the most common answer I’ve seen is:

> Commas exist mostly to help JSON be human-readable. They have no real syntactic purpose as one could make their own notation without the commas and it'd work just fine.

https://stackoverflow.com/a/36104693

Elsewhere such commas can be optional, e.g. in clojure: https://guide.clojure.style/#opt-commas-in-map-literals


Try parsing this:

    { foo :"bar" baz :"bak" quux :[ a,b,c,d ] lol :9.7E+42 }
Ref: https://www.json.org/json-en.html, but without commas. It's line noise. Commas allow a nice visual anchor.


Oh, actually that is the syntax I will use for writing abstractions:

    my-abstr x y z foo: "bar" baz: "bak" "quak" quux: [a, b, c, d] lol: 9.7E+42
I don't think

    my-abstr x y z, foo: "bar", baz: "bak" "quak", quux: [a, b, c, d], lol: 9.7E+42
would be better. Indentation and/or coloring my-abstr and the labels (foo:, baz:, quux:, lol:) are the right measures here.


While I have no problems with indentation based syntax, it's not very conductive to minimization, so it's a no go for JSON's case.

Coloring things is a luxury, and from my understanding not many people understand that fact. When you work at the trenches you see a lot of files on a small viewport and without coloring most of the time. Being able to parse an squiggly file on a monochrome screen just by reading is a big plus for the file format in question.

As technology progresses we tend to forget where we came from and what are the fallbacks are, but we shouldn't. Not everyone is seeing the same file in a 30" 4K/8K screen with wide color gamut and HDR. Sometimes a 80x24 over some management port is all we have.


Sure, color and indentation are optional, but even without those, I don't see that a comma in the above syntax helps much, even on a 80x24 monochrome display. If you want separators, note that the labels which end with a colon are just that, and just as clear as commas. There is a reason why you tried to obfuscate that in your example by placing the colons not with the labels, but the arguments.


You can also remove the commas in the arrays.


You could, there is no fixed syntax for arrays in Practal, so it would depend on which custom syntax becomes popular. But for expressions that are bracketed anyway, it makes sense to have commas (or other separators), because otherwise you write something like

    [(a b) (x y)]
instead of

    [a b, x y]
Personally, i like the second option better.


Looks easy to parse to me and you could also remove the commas in the array.

    { foo: "bar" baz: "bak" quux: [a b c d] lol: 9.7E+42 }


I vibe coded an invoice generator by first vibe coding a "template" command line tool as a bash script that substitutes {{words}} in a libre office writer document (those are just zipped xml files, so you can unpack them to a temp directory and substitute raw text without xml awareness), and in the end it calls libre office's cli to convert it to pdf. I also asked the AI to generate a documentation text file, so that the next AI conversation could use the command as a black box.

The vibe coded main invoice generator script then does the calendar calculations to figure out the pay cycle and examines existing invoices in the invoice directory to determine the next invoice number (the invoice number is in the file name, so it doesn't need to open the files). When it is done with the calculations, it uses the template command to generate the final invoice.

This is a very small example, but I do think that clearly defined modules/microservices/libraries are a good way to only put the relevant work context into the limited context window.

It also happens to be more human-friendly, I think?


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

Search: