HN user

samuellevy

874 karma

PHP, Python, JavaScript, MySQL; these are all words that I know. I also know the programming languages.

I write code, and design systems that work.

You can find my website behind this link: http://www.samuellevy.com/

Posts55
Comments118
View on HN
atymic.dev 6y ago

Client-Side PHP

samuellevy
2pts0
www.samuellevy.com 7y ago

Show HN: A Naive Approach to VPN and Proxy Detection with PHP and JavaScript

samuellevy
4pts0
blog.samuellevy.com 8y ago

The small tips about freelancing that I've learned over the years

samuellevy
1pts0
samlev.github.io 8y ago

Show HN: A variation on GoL with fertility/mortality based on the age of cells

samuellevy
28pts7
blog.samuellevy.com 10y ago

Workflows for a small team of gits

samuellevy
4pts0
gameoflifetotalwar.com 11y ago

Show HN: Multi-player Competitive Conway's Game of Life

samuellevy
85pts35
blog.samuellevy.com 11y ago

Let's talk about copyright, licensing, and who owns the code

samuellevy
3pts1
blog.samuellevy.com 12y ago

Build Your Own Blog

samuellevy
1pts0
www.sbs.com.au 12y ago

Australia's bad broadband punchline

samuellevy
45pts14
www.weneedthenbn.com 12y ago

Don’t build Labor’s NBN - build the right NBN

samuellevy
1pts0
news.ycombinator.com 12y ago

Ask HN: If you have had a FTTN broadband rollout, how is it?

samuellevy
7pts5
www.weneedthenbn.com 12y ago

Show HN: We Need The NBN

samuellevy
2pts0
www.youtube.com 12y ago

We Need the NBN [video]

samuellevy
1pts1
blog.samuellevy.com 13y ago

The "Do I Look Like I Give A Shit" Public Licence

samuellevy
38pts41
blog.samuellevy.com 13y ago

Teach a man to fish (and he'll die when he catches Fugu)

samuellevy
7pts0
news.ycombinator.com 13y ago

Ask HN: Why aren't we using paired keys instead of passwords for authentication?

samuellevy
5pts6
www.techworld.com.au 13y ago

Australian police issue warning on 3D printed guns

samuellevy
26pts53
blog.samuellevy.com 13y ago

Recruit this

samuellevy
38pts29
blog.samuellevy.com 13y ago

You don't need to know me

samuellevy
4pts2
plus.google.com 13y ago

Can Python replace PHP as a server side language?

samuellevy
8pts2
blog.samuellevy.com 13y ago

PHP is the right tool for the job (for all the wrong reasons)

samuellevy
87pts143
github.com 13y ago

SHITLang - a tiny PHP template engine

samuellevy
1pts0
news.ycombinator.com 13y ago

Suggest HN: Anonymise usernames between threads

samuellevy
10pts3
imgur.com 13y ago

Show HN: This is what a QR code looks like when running Game Of Life rules

samuellevy
1pts0
blog.samuellevy.com 13y ago

The cost (and value) of software

samuellevy
1pts0
blog.samuellevy.com 13y ago

Offer HN: $2000 worth of free work (last 4 days to get your idea in)

samuellevy
51pts16
stackoverflow.com 13y ago

Analysis of the SMBC "FrogSort" algorithm

samuellevy
3pts0
blog.iinet.net.au 13y ago

Iinet tells content industry to change their business model

samuellevy
1pts0
blog.samuellevy.com 13y ago

Offer HN: 25 hours of free programming work

samuellevy
2pts0
blog.samuellevy.com 13y ago

So you wanna be a freelancer?

samuellevy
2pts0

Funny that you mention "accessible"... Because most of these components are anything but.

Modern HTML and CSS are awesome tools on their own, and are able to do so much without needing to rely on massive JavaScript bundles, but you still end up with component libraries that are <div><div><div><div> all the way down.

More than just needing an oracle - the keys and the house are both physical items. There's not really any practical way for a contract on the blockchain to validate that a particular physical item is in fact the item that it purports to be.

Are these ACTUALLY the keys to this house? Are they the only set? The original set? Were the locks changed, and this set in the contract is no longer valid?

Then putting aside all of that... How do you ENFORCE a "smart contract"? Probably through... Existing contract law. Because that's what it's there for. Smart contracts are just more convoluted paper, and we can do that already with DocuSign or any number of other digital contract options - all of which provide, so far as I can tell, precisely the same level of verification that a smart contract does. The only "advantage" of a smart contract over those platforms is that the history of the "document" is more or less baked into the chain, instead of trusting that the third party platform hasn't modified it... Which they will never have any motivation to do...

People have been initialing pages to mark them as read/accepted for more years than I've been alive. In the event of a contract dispute, smart contract or not, it's going to be up to a third party (mediator, judge, etc.) to decide on resolution anyway... At which point even the exact wording of the contract may well be discarded as being unenforceable because _contracts are not above the law_.

How big of a problem are "snake bite victims"? I live in Australia, one of those countries that people would class as "dangerous" with regards to snakes, and... There's only been about 40 deaths in the past 20 years...

It's just a really strange thing to ping as a "big problem to solve", and such a bizarrely expensive solution to the problem, too. I think that a much better solution would be improving development and access to antivenin

I did read the article, and it only vaguely describes the "problem" with smartphones in one paragraph, then it spends the rest of the article talking about the effects of the pandemic. The problem that it attributes to smartphones is that people will get distracted, then expect instantaneous communication, relationships require time & attention...

But the thing that they're blaming smartphones for is nothing new. Communication has always been a difficult thing, and before people had their heads buried in smartphones, they had their heads buried in TV, or newspapers/magazines/books, or they just simply went to bars/pubs.

The whole article seems like a vague, "hot take", nothing. It's an opinion backed up with zero research or evidence other than "I'm a couples therapist, trust me, I know."

They have strict specifications about the types of nails and wood that they can hammer, but they're not documented anywhere. If you send them the wrong type of nails or wood, they'll put them both into an industrial shredder and send you back the dust, because technically the nails have now been integrated with the wood.

Their free plan will let you hammer in 5 nails per month into a single piece of wood, but you can't use a different piece of wood each month. For $30/month you get 50 nails, and up to 5 pieces of wood, or for $60/month you can get 120 nails and unlimited pieces of wood, and two-factor (they'll call you before they hammer in the nails, and ask where you actually want the nails hammered). If you want to have unlimited nails, you have to contact them for enterprise pricing.

They will also sell the measurements of your wood and the nail positions to other carpenters.

https://blog.samuellevy.com/ - I haven't posted in a few years, and I really need to upgrade it/clean up everything. It's not remotely mobile friendly.

I've had a few relatively popular posts over the years:

https://blog.samuellevy.com/post/41-php-is-the-right-tool-fo... A kind of response to a certain post about PHP that still makes the rounds...

https://blog.samuellevy.com/post/46-do-i-look-like-i-give-a-... "Do I Look Like I Give A Shit Public Licence" an alternative to the WTFPL

Ehh... my dog is alive, thinks, and "speaks" in a manner - not a cute term for barking, but he communicates (with relatively high effectiveness) his wants and desires. Maybe not using human words, but he certainly has his own sort of crude language, as does my cat.

The problem is that LLMs aren't alive, and they _don't think_. The speaking is arguable.

That's kind of the point, but also kind of not.

GPT isn't making true or false outputs. It's just making outputs. The truthiness or falseness of any output is irrelevant because it has no concept of true or false. We're assigning those values to the outputs ourselves, but like... it doesn't know the difference.

It's like blaming a die for a high or a low roll - it's just doing rolls. It has no knowledge of a good or a bad roll. GPT is like a Rube Goldberg machine for rolling dice that's _more likely_ to roll the number that you want, but really it's just rolling dice.

Nah, my issue with both terms is that they imply that when the answer is "correct" that's because the LLM "knows" the correct answer, and when it's wrong it's just a brain fart.

It doesn't matter if the output is correct or not, the process for producing it is identical, and the model has the exact same amount of knowledge about what it's saying... which is to say "none".

This isn't a case of "it's intelligent, but it gets muddled up sometimes". It's more of the case that it's _always_ muddled up, but it's accidentally correct a lot of the time.

Yep, the "chinese room" is the classic thought experiment, but I feel like it fails to get the point across because the characters still represent language, so you could conceivably "learn" the language. I prefer the idea of symbols that aren't inherently language, as it really nails in the idea that it doesn't matter how long you spend, there's not something that you can ever learn to "speak" fluently.

I don't really know anything about AlphaGo. There's more types of "AI" than LLMs, but that's not really the point. You don't need AI for people to lose their jobs... but nobody is losing their jobs to AlphaGo, and in the grand scheme of things it's unlikely that people are going to lose their jobs to GPT, too.

So humans have a level of knowledge, understanding, and reasoning ability that LLMs simply don't have. I'm writing a response to you right now, and I "know" a certain amount of information about the world. That knowledge has limits, and I can expand it, I can forget it, all sorts of things...

"Hallucination" is a term that works well for actual intelligence - when you "know" something that isn't true, and has no path of reasoning, you might have hallucinated the base "knowledge".

But that doesn't really work for LLMs, because there's no knowledge at all. All they're doing is picking the next most likely token based on the probabilities. If you interrogate something that the training data covers thoroughly, you'll get something that is "correct", and that's to be expected because there's a lot of probabilities pointing to the "next token" being the right one... but as you get to the edge of the training data, the "next token" is less likely to be correct.

As a thought experiment, imagine that you're given a book with every possible or likely sequence of coloured circles, triangles, and squares. None of them have meaning to you, they're just colours and shapes that are in random seeming sequences, but there's a frequency to them. "Red circle, blue square, gren triangle" is a much more common sequence than "red circle, blue square, black triangle", so if someone hands you a piece of paper with "red circle, blue square", you can reasonably guess that what they want back is a green triangle.

Expand the model a bit more, and you notice that "rc bs gt" is pretty common, but if there's a yellow square a few symbols before with anything in between, then the triangle is usually black. Thus the response to the sequence "red circle, blue square" is usually "green triangle", but "black circle, yellow square, grey circle, red circle, blue square" is modified by the yellow square, and the response is "black triangle"... but you still don't know what any of these things _mean_.

When you get to a sequence that isn't covered directly by the training data, you just follow the process with the information that you _do_ have. You get "red triangle, blue square" and while you've not encountered that sequence before, "green" _usually_ comes after "red, blue", and "circle" is _usually_ grouped with "triangle, square", so a reasonable response is "green circle"... but we don't know, we're just guessing based on what we've seen.

That's the thing... the process is exactly the same whether the sequence has been seen before or not. You're not _hallucinating_ the green circle, you're just picking based on probabilities. LLMs are doing effectively this, but at massive scale with an unthinkably large dataset as training data. Because there's so much data of _humans talking to other humans_, ChatGPT has a lot of probabilities that make human-sounding responses...

It's not an easy concept to get across, but there's a fundamental difference between "knowing a thing and being able to discuss it" and "picking the next token based on the probabilities gleaned from inspecting terabytes of text, without understanding what any single token means"

There's definitely a few echo chambers around AI, but it's definitely not something that "just techies" are onto.

ChatGPT made some waves at the end of last year. My in-laws were wanting to talk to (at) me about it at Christmas. There's plenty of awareness outside of the tech circles, but most of the discussion (both out and in of the tech world) seems to miss what LLMs actually _are_.

The reason why ChatGPT was impressive to me wasn't the "realism" of the responses... It was how quickly it could classify and chain inputs/outputs. It's super impressive tech, but like... It's not AI. As accurate as it may ever seem, it's simply not actually aware of what it's saying. "Hallucinations" is a fun term, but it's not hallucinating information, it's just guessing at the next token to write because that's all it ever does.

If it was "intelligent" it would be able to recognise a limitation in its knowledge and _not_ hallucinate information. But it can't. Because it doesn't know anything. Correct answers are just as hallucinatory as incorrect answers because it's the exact same mechanism that produces them - there's just better probabilities.

There's an interview with Bo Burnham where he puts it clearly...

Don't listen to people who just got very lucky. Taylor Swift telling you to "follow your dreams" is like a lottery winner saying "liquidise your assets, buy Powerball tickets. It works!"

And that's the thing. Skill and talent are important, but there's a certain amount of success that's only achievable through luck, or through starting from _so far ahead_ that it's just genuinely out of reach for us mere mortals.

Is the experience of those people irrelevant? No, but it's also not actually applicable to most other people.

Yeah, there's a process. It's something that I've done a bunch of times for a bunch of clients.

There's so much low-hanging fruit there that's so easy to fix _right now_. No version control? Good news! `git init` is free! PHPCS/PHP-CS-fixer can normalise a lot, and is generally pretty safe (especially when you have git now). Yeah, it's overwhelming, but OP said that the software is already making millions - you don't wanna fuck with that.

I've done it, I've written about it, I've given conference talks about it. The real bonus for OP is that the team is small, so there's only a few people to fight over it. It's pretty easy to show how things will be better, but remember that the team are going to resist deleting code not because that they're unaware that it's bad, but because they are afraid to jeporadise whatever stability that they've found.

silently take a null instead of a string

Oh, so you _haven't_ used any of the recent versions of PHP, then. You're just talking shit with no actual recent experience. Gotcha. Well, thanks for your input.

The rules are a bit more complex than the original, but I'll try to summarise them.

* An empty cell has a chance to breed if there are two or more neighbours of breeding age (10-65).

* The chance of breeding slightly decreases for every neighbouring cell that's over 35 (the older they are over that age, the lower the chance of breeding).

* All cells have a small chance of dying on any turn.

* Cells that are "children" (under 6) or "elderly" (over 65) have an increased chance of dying, depending on how young or old they are.

* Young and old cells have an increased chance of dying from loneliness (less than 2 neighbours), which increases based on how lonely they are.

* "Adult" cells (6-65) have an increased chance of dying from overcrowding (4+ neighbours), which increases based on how crowded they are.

Unlike the original game, there's an element of randomness in the ability for a cell to breed or die, which means that it's not a repeatable simulation in the same way that regular GoL is.

I started the rules relatively close to societal norms (breeding from 16-45), and found that nothing could breed enough to sustain the population for long. I thrn tweaked the rules to their current set just to get populations to at least hold. You can get some more interesting patterns if you play with the death limits, but I haven't spent too much time looking for the perfect rules yet.

Pretty much all the limits are changable through the constants at the top of board.js.

I'm not sure how the tax system works in the US, but I was just talking to my accountant about this issue the other day.

In Australia, my company gets taxed at a flat 30% on all profits in a year. If I want to take cash out of the company after that tax has been taken, I pay "top-up" tax that brings the total tax paid to the level of my income tax rate.

For example, if the company earned $10000, after all expenses, then it would pay $3000 in tax, leaving $7000 left that I can take out. If I earned no money in the year, my income tax rate is 0%, so the top-up tax is -$3000 (I.e. I get a tax refund for $3000). If I earned $50000 in the year, then my income tax rate is 32.5%, so I would have to pay top-up tax of $250 (I.e. 2.5% of the original $10000, which has already been taxed 30%).

Double taxation shouldn't happen, and while my company was set up for tax minimisation purposes, international corporations are able to do an insane level of fuckery to avoid almost all taxation.

[dead] 12 years ago

Bigger boards come when your army size grows (otherwise you would have real trouble filling them).

That's why I didn't look at them - there are hardly any games played on them (at least not enough to pick up any statistical relevance)

[dead] 12 years ago

Included inside: an sqlite3 DB with the starting/ending positions of the games, so you can run your own analysis over them.

Let's see...

I haven't written a post mortem yet, partly because I'm still building it, and partly because I hadn't seen it under heavy load (although I woke to emails from linode screaming at me about high CPU usage)

* The idea is one that I've been toying with for years. I've made other experiments that got some notice here a few years ago, too.

* There are some extra features that I still want to add at some point ('formations' for pre-building shapes, as an example. The database table is there, but no functionality.)

* Nothing given up on entirely yet.

* The only rearchitecting that happened was replacing the board UI with a canvas implementation. The initial version used a table and was painfully slow. From past experience I knew that wouldn't cut it, but it was an easy starting point.

* the initial commit was... October 2nd, but I didn't start working on it till a week later. All in all, I've just grabbed time between other (paying) projects.