HNHacker News
TopNewBestAskShowJobs

ThreeToZero

37 karma · joined January 8, 2022

submissionscomments
ThreeToZero··on A Break from Programming Languages
> Is it so strange that after spending fifteen years of my life trying everything I could to get away from spending all day wrangling a big ball of mud in a Java IDE, that experience sounds pretty cozy to return to?

Relatable experience in software.

Also might lead to the reactionary conservatism she hated in those "frustrating programmers", that liked their toil of assembly and muddy type systems.

ThreeToZero··on Designing a programming language to speedrun Advent of Code
The post gives an example of how python doesn't have this feature in the section [https://blog.vero.site/post/noulith#coding-with-and-without-...]

Python fails this criteria because if you type as you think through the process, you have to move the cursor to the beginning to prefix the 'map' around the input.

For example this series of transforming the input:

puzzle_input.split("\n\n")

map(ints, puzzle_input.split("\n\n"))

map(sum, map(ints, puzzle_input.split("\n\n")))

max(map(sum, map(ints, puzzle_input.split("\n\n"))))

----------------------

Compare to this postfix syntax where you can write this incrementally as you think through the operations:

puzzle_input split "\n\n" map ints map sum then max

ThreeToZero··on Testing GPT 4's code-writing capabilities with some real world problems
Haha good counter example. Well played
ThreeToZero··on Testing GPT 4's code-writing capabilities with some real world problems
A modified A* that solves the fire routing problem (less efficiently than OP's I think).

Each A* location stores where it comes from, how long it takes to get to it, and how many fires it passed through to get there. The algorithm only considers fire cells neighbors if the current number of fires passed through is less than the current fireWillingness global.

1. count fire tiles within movement range

2. run A* from src to dst completely avoiding fire

3. if we can reach then that's the solution

4. if we can't reach, increase fireWillingness to 1, re-run A* on the board

5. keep increasing fire-willingness until the A* results don't change, or we can now reach the dst.

This works because a low fire path is always better than a high fire path. And increasing fire-tolerance will only shorten the paths from src to dst.

ThreeToZero··on The problem with Bitcoin miners
> depends on the block reward AND the price of bitcoin

The direct block reward goes to zero over the years, but the miner's fee will still be a positive amount.

Each miner will be competing for the miner's fee, and will buy more electricity if they can mine more blocks (and get more miner's fees).

The rewards will be proportional to the market cap of bitcoin. If it goes up, so will the investment in electricity.

> making sweeping statements here

The sweeping statements that poster made are the results of a microeconomics analysis.

There is a large & "efficient" market competing for bitcoin mining rewards by buying more electricity.

This is tapping into laws of economics on the level of supply/demand curves: Well studied scenarios that become more accurate the more efficient the market is.

ThreeToZero··on Opensubtitles.org breached – Email addresses, IP addresses, Passwords, Usernames
Super long is >100 character passwords. Not much point: either the hash function is broken or some other hack will happen before humanity develops enough compute power to crack 100 char bcrypt passwords.

Websites (like some banks used to) that have less-than 20 char limits for passwords are purely bad security strategy.

ThreeToZero··on My First Impressions of Web3
Bitcoin is 'vulnerable' to this. The most common use is to put financial transactions on Bitcoin, but you can put whatever binary data you want. Famously the genesis block[1] includes a newspaper headline to prove it was created after a specific day.

It's possible to place illegal content onto the Bitcoin blockchain.

[1] - https://en.bitcoin.it/wiki/Genesis_block