Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
BoppreH
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
331.
▲
by
BoppreH
3y ago
Or it only accepts certain inputs, or has an expensive first invocation but amortized cost, or is not bug-compatible with the old `convert`, or it requires a large cache, or it's optimized for parallelism, or uses instructions only ava
332.
▲
by
BoppreH
3y ago
This is a really fun exercise, I recommend every programmer try it once. You can replace most of the tokenization code with re.Scanner[1], which also allows you to have strings without worrying about `code.split()` messing them up. [1] htt
333.
▲
by
BoppreH
3y ago
I've always wondered if we shouldn't be pushing more for type inference with flow analysis. I consider static type checking a must, but the voices opposing type annotations have some valid points: it pollutes the source code, slow
334.
▲
by
BoppreH
3y ago
Decorators seem to be documented now: https://docs.python.org/3/glossary.html#term-decorator https://docs.python.org/3/reference/compound_stmts.html#func...
335.
▲
by
BoppreH
3y ago
Speaking of hidden Python tools, I'm a big fan of re.Scanner[0]. It's a regex-based tokenizer[1] in the `re` module, that for reasons is completely missing from any official documentation. You give it a pattern for each token type
336.
▲
by
BoppreH
3y ago
Netflix Games[1] have higher quality than usual and no ads, no in-app purchases, and no predatory tactics (in the games I tried). Bonus points for being all free if you already have a Netflix account. I can vouch for Poinpy[2], Laya's
337.
▲
by
BoppreH
3y ago
It could be self-selection happening after you randomized the groups. For example a desktop landing page advertising an app, which might be installed on either mobile operating system.
338.
▲
by
BoppreH
3y ago
Are you sure? Consider the case where iOS users are more likely to convert than Android users, but you currently have very few iOS users. You then A/B test a new design that imitates iOS, but has awful copy. Both iOS and Android users
339.
▲
by
BoppreH
3y ago
Do you have any protections against ransomware overwiting your backups too? That's the only thing keeping me from using a solution like this.
340.
▲
by
BoppreH
3y ago
Correction, the empty iterator example should have been `assert 5 not in numbers`, or another expression that exhausts the generator. And to everyone saying that the behaviors are correct because of scoping rules, or iteration protocol: I k
341.
▲
by
BoppreH
3y ago
You're right, "empty list" is an imprecise description. But couldn't they have made it behave like Go channels, for example? Read it until exhaustion, then close it, so that subsequent reads (or calls to 'next()
342.
▲
by
BoppreH
3y ago
> First one is annoying, but it makes sense, to some degree. You say the default is this particular instance that gets created when you define the function. Could just as easily be an expression that's reevaluated on each call. In f
343.
▲
by
BoppreH
3y ago
I don't find that so bad. They look complicated but behave as expected, and would only be a problem if you inherit a code base from a lone wolf without common sense. Python has plenty of warts[1], but I don't think the syntax is o
344.
▲
by
BoppreH
3y ago
Update: it seems there was a new release some months ago, and the UI feels a bit fresher. Time to give it another try.
345.
▲
by
BoppreH
3y ago
I feel like this got better for developers, and much worse for end users. Containers and Infrastructure as Code brought quite some sanity for myself, and even the beast that is Kubernetes is optional and has alternatives. Clouds are complic
346.
▲
by
BoppreH
3y ago
I used Eagle Mode[1][2] for a number of years, and it was non-ironically the best file manager I've ever used. I only stopped because it required dozens of very out-of-date packages for its preview features. But the point of whimsical
347.
▲
by
BoppreH
3y ago
Sorry, I meant 125% screen scaling from the OS, not browser zoom. But I just tested and it also happens with no scaling. As I resize the window the header links slowly move down, until they overlap the text.
348.
▲
by
BoppreH
3y ago
I echo the awe at the hardware and the disappointment at the paradigm. I wish the keynote had three extra demos: - Something whimsical to inspire developers. Give me files represented as physical blocks that I can pile, or a task manager th
349.
▲
by
BoppreH
3y ago
Happens on both Firefox and Chrome on Windows, at 125% scale. After the left and right body margins grow beyond 300px each, the header starts moving into the main text.
350.
▲
by
BoppreH
3y ago
Brilliant, I'd love to participate. A few questions: 1. Are underhanded entries welcome, where the code looks straightforward but does something completely unexpected? For C it's a separate contest[1], but I find a big overlap i
351.
▲
The IntercalScript Programming Language
(github.com)
2 points
by
BoppreH
3y ago
|
0 comments
352.
▲
by
BoppreH
3y ago
Sure it's a known footgun, but I wouldn't be so harsh without knowing more. It could be the result of a series of only slightly bad decisions. A junior developer creates a function with default of [] instead of (), but otherwise n
353.
▲
by
BoppreH
3y ago
This post touches on a hypothesis of mine: the more the context looks like homework or low quality code, the worse the suggestions will be. Like a LLM that autocompletes a childish question with a childish answer, a homework code prompt wil
354.
▲
by
BoppreH
3y ago
> It always seemed strange that there wasn’t any central database of binary parsers that everyone could contribute to. Fully agree on the need for such a database. The problem is that it's been tried, but lacked traction. The latest
355.
▲
by
BoppreH
3y ago
This project has always fascinated me, so I tried making a tiny uroboros quine with Python -> Javascript -> Python -> etc. I started with a quine for each language, and tried inserting them into each other, but the output always gr
356.
▲
by
BoppreH
3y ago
The quines are not simulating each other, they are just printing a string after some formatting (which usually involves embedding a copy of the string into itself). There's no Turing completeness needed (most of the quines don't e
357.
▲
by
BoppreH
3y ago
I, for one, really appreciate this move. Supply chain attacks are huge problem, and package repositories are especially at risk. The options provided are very reasonable, and supporting TOTP ensures that even the most hardcore privacy and f
358.
▲
by
BoppreH
3y ago
The parent was complaining about needing "either [...] a mobile phone [...] or some custom device", which is not true. And sure, Authy is a third-party; but it's not the only option, and you can implement your own (TOTP is no
359.
▲
by
BoppreH
3y ago
Not at all, you can use any TOTP app and the list does include desktop options. I like https://authy.com/ , from Twilio, and use it both on my desktop and phone. I've started using it to enable TOTP backup/syncing
360.
▲
by
BoppreH
3y ago
Price discrimination is a great way to reduce customer trust. I have a friend that Uber consistently charges 20% less than me, for the same trip, at the same time, and before any obvious discounts. My best guess is that it's because of
More ›