Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pedrovhb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
pedrovhb
4y ago
This is an example of something I've seen referred to as "code hallucination". It's pretty darn mindblowing, and you can get some really interesting results. Those times when AI hallucinates some function that doesn'
92.
▲
by
pedrovhb
4y ago
I've been using pyright more than mypy these days; playing with higher order functions I have pulled about half of my hair out because of things that more often than not turn out to be mypy bugs. I've tried pyre, and that's
93.
▲
by
pedrovhb
4y ago
I love the idea and I'll try it out, but a heads up in case the author is around: the name sd clashes with another tool [0], which works as an alternative to sed. I use that one pretty often, so maybe my first managed script will be on
94.
▲
by
pedrovhb
4y ago
Is the ISP blocking the domain, or is its DNS server returning nxdomain for it? I've seen ISPs provide modems which use the ISP's DNS as a default (via DHCP) unless configured otherwise. Try running `dig mydomain.com @1.1.1.1` to
95.
▲
by
pedrovhb
4y ago
That's awesome. Given the effort that went into it, it's kind of a shame to use a cheap $10 board as a base. I think it'd be worthwhile to spend a bit more and get a keyboard running QMK, which also saves the headache of jerr
96.
▲
by
pedrovhb
4y ago
Doesn't necessarily mean it's safe. Say there's passwords accidentally appearing in logs as part of a traceback - even if the passwords are kept encrypted, just having access to the logs is enough. Even if everything is encry
97.
▲
by
pedrovhb
4y ago
The optimist in me thinks it could be a good thing. I imagine the vast majority of support queries that a big company gets are from non-technical users who need help with trivial things, and ChatGPT has been excellent, in my experience, at
98.
▲
by
pedrovhb
4y ago
Nice! I've been conjuring up a little library for using braille Unicode characters to draw in the terminal which I plan to write a blog post on and release Soon™, and this is a pretty cool idea for a demo. I'll have to try my best
99.
▲
by
pedrovhb
4y ago
That's really neat, I'd love to hear more about it. Was this something you were actively trying to find out, or was it poking around until something caught your eye?
100.
▲
by
pedrovhb
4y ago
Ah, this reminds me of the time a few years ago when I accidentally deleted `sudo`. A lot of stuff broke and it was interesting running around in a system where things would sort of work, but sort of not really. I learned then that sudo was
101.
▲
by
pedrovhb
4y ago
The author conflates generators with generator expressions[1]. He's correct in that generator expressions lazily evaluate and lists don't, but actual generators are a much more powerful construct - they're functions which use
102.
▲
by
pedrovhb
4y ago
Thank you for mentioning gaslighting. I had that thought immediately but was wondering to myself whether it applied here (which means it was working!) It's baffling that a company can do that and expect to still be trusted in the futur
103.
▲
by
pedrovhb
4y ago
Why waste 4 bytes on a float when a 10 bit enum does the trick? With the cushy 1024 possibilities, they even have some room for expansion from the current 900 values.
104.
▲
by
pedrovhb
4y ago
Or a bit more generically, having a configurable allowlist of hosts, so I can make my ESP32 just a dumb "sensors on a microcontroller" thing pushing data to a RPi on my local home network, which has static IPs provided to certain
105.
▲
by
pedrovhb
4y ago
That is really cool, and I'll definitely be using it! Since I found out about sqlite-utils being able to trivially put JSON into a sqlite database without needing to stop and write out a whole schema, I've used it a few times. In
106.
▲
by
pedrovhb
4y ago
I had a whole discussion with it yesyerday about category theory as applied to asynchronous streams, and it was great. I think if it was a person we'd both have come out better programmers, but I guess it was just me.
107.
▲
by
pedrovhb
4y ago
Seems reasonable to me. Although it's not ideal to distrust without a "smoking gun", it is (as pointed out) inadmissible for any ties to exist between a CA and a malware company. Seeing how a closer look by Mozilla, Google an
108.
▲
by
pedrovhb
4y ago
From the "Prompt Engineering Tips" section of the article: Customer: I need my [swear] internet. The technician is 2 hours late and I need a steady stream of cat gifs directly injected into my veins to stay alive. And t
109.
▲
by
pedrovhb
4y ago
The official Python documentation is excellent, and in many ways goes beyond providing just a list of existing modules and what they do. Sometimes if I'm bored I'll actually just pull up documentation for something I'm not 10
110.
▲
by
pedrovhb
4y ago
This looks pretty great, though I'm surprised at the filesize for a simple diagram - 333kb from a simple test I made. A cat of the SVG prints out some base64 which I didn't try decoding, but I'd assume it's the bundled f
111.
▲
by
pedrovhb
4y ago
Conceptually, the `map` function is just syntactic sugar for `for` loops, and it's also meant to simplify actions. There are functional equivalents to many small patterns of code that occur often - for instance lst = [] for e
112.
▲
by
pedrovhb
4y ago
There is one. The author's implementation of `combinations` runs in quadratic time making copies of lists on each iteration. I replaced that for `itertools.combinations`, which uses an iterator, and found a pretty big difference:
113.
▲
by
pedrovhb
4y ago
I have a take that I'm torn on about whether it misses the point/is covered by one of the arguments presented in the article, or makes sense - It seems to me that one can know about all the physical properties of color before havi
114.
▲
by
pedrovhb
4y ago
Is that the case? I was under the impression that Decimals were used in financial contexts because (besides preventing floating point error) you can define how to handle things such as rounding behavior. For instance, at least in Python, 3&
115.
▲
by
pedrovhb
4y ago
I don't know about "living" in a terminal, but CLI/terminal tools are quite far from being out of the picture; if anything, I'd say they're thriving. It's not about one or the other; they're complemen
116.
▲
by
pedrovhb
4y ago
I agree it's a misnomer and it's confusing for developers to find that disabling cookies breaks local storage, but I think it's understandable. When a user disables cookies their intent is presumably for the website to not be
117.
▲
by
pedrovhb
4y ago
I'm sure this is harmless. It's not like anyone just copies code from webpages and just pastes it into their code editor or shell, right?
118.
▲
by
pedrovhb
4y ago
I've been wanting for this forever (though I imagine I'll be waiting quite a bit more still). How does it deal with the eye shifting focus? Would you have to unfocus your eyes to be able to see it? That'd probably be uncomfor
119.
▲
by
pedrovhb
4y ago
I'm a huge fan of the JetBrains IDEs, and while I appreciate the thought of modernizing, I really don't like this approach. Their IDEs are extremely powerful and provide many useful tools, and hiding them behind meaningless icons
120.
▲
by
pedrovhb
4y ago
Well, yes - he's saying "regex is not appropriate for parsing html", and I'm saying "regex is faster than parsing html" - they're not contradictory statements, and both are true :) To be clear, I'm no
More ›