Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tomn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
tomn
3y ago
> There's a bunch of global functions that should have been methods on objects, like `len()`. OO in general seems slapped on later, as evidenced by the weird double underscores, and the explicit this object as first arguments for me
62.
▲
by
tomn
3y ago
OT, but this is my number one peeve with code documentation: going to the effort to write a doc comment, taking up at least 6 lines, probably using some special syntax, cluttering up the code, but then adding no information that can't
63.
▲
by
tomn
3y ago
If you do that, it will try to read from a closed file.
64.
▲
by
tomn
3y ago
> which I personally think has a cost Yeah, so many people don't get this, but too many small functions can be hard to understand -- that's why I qualified that option. In this case i agree that inlining it is fine, i was talki
65.
▲
by
tomn
3y ago
I don't think you can really improve on this. You could use a list comprehension, but that can be unclear and hard to extend, depending on the situation. It can be a nice option if most of the parts in the generator can be broken out i
66.
▲
by
tomn
3y ago
Yeah, i agree that the ESP32 docs are good, and what you're going to be using most of the time while using these things. That wasn't what i was talking about though -- if you have a look at the datasheet for this board ( https:&#
67.
▲
by
tomn
3y ago
Yes, but "does it work" is a low standard. - You don't get any documentation, whereas with something more official you will have a complete schematic (so you know which support components will be used), pinout, information ab
68.
▲
by
tomn
3y ago
I don't think they are complaining about the hosting, but the publication process being brittle. For example, I use pelican (pretty much 'what if jekyll but in python and more flexible'), and found that every time i wanted to
69.
▲
by
tomn
3y ago
finally. you don't even have to read anything to work this out -- if things like dictionary access were no longer atomic that would imply that threaded code without locks could crash the interpreter, which isn't going to happen.
70.
▲
by
tomn
3y ago
this is the big one for battery-powered applications NRF52840 is specified to use 1.5uA when deep sleeping with RTC wake-up, while esp32-c3 is 5uA, which sounds ok, but is not the whole story. If you try to build something low-power with ES
71.
▲
by
tomn
3y ago
Yeah, I get your point, but was responding to this: > Basically, NixOS = zero QA effort from application developer -> nothing works. "zero QA effort from application developer" does not imply that "nothing works" i
72.
▲
by
tomn
3y ago
Almost -- it's not quite as bad as you'd expect, because nixpkgs has packages for quite a lot of closed-source software, with whatever hacks are required to make it work.
73.
▲
by
tomn
3y ago
I believe that GIL-removal projects aim to preserve this behaviour: https://peps.python.org/pep-0703/#container-thread-safety That's why gilectomy carries an unreasonable single-threaded performance cost: many ope
74.
▲
by
tomn
3y ago
Ah OK, I misunderstood.
75.
▲
by
tomn
3y ago
What kind of power supply concerns? I've used quite a few of them and never had a problem. For USB-powered development boards IMO the best option is the raspberry pi power supplies -- they are cheap, high quality, and can supply plenty
76.
▲
by
tomn
3y ago
Seems like you need to change the URL to point at a schematic file: https://kicanvas.org/?github=https://github.com/Twisted-Fiel...
77.
▲
by
tomn
3y ago
> if i wanted to learn pure FP i would probably pick many things over Nix of course, but that wasn't the question: > What do you gain from learning Nix, asside from Nix?
78.
▲
by
tomn
3y ago
again, you said > by learning Guile you learn a lisp which some people find quite enlightening so learning a lisp is enlightening, but learning a FP language is not
79.
▲
by
tomn
3y ago
please compare: https://archlinux.org/packages/extra/x86_64/lua/#pkgreqs https://archlinux.org/packages/core/x86_64/guile/#pkgreqs (lua at least is under-counted as t
80.
▲
by
tomn
3y ago
> What do you gain from learning Nix, asside from Nix? Nix is a small and approachable lazy pure-functional language. You can learn a fair bit of functional programming by reading nixpkgs, which is frequently recommended even if you neve
81.
▲
by
tomn
3y ago
> While a FORTRAN 77 compiler is not necessary for building NumPy, it is needed to run the numpy.f2py tests. These tests are skipped if the compiler is not auto-detected.
82.
▲
by
tomn
3y ago
One also shouldn't form an impression of arch (or any other distro) from the experience of one user. I've had this arch install for over 10 years and don't remember having any issues like that; while hearing plenty of people
83.
▲
by
tomn
3y ago
This is a bit outdated -- 802.11r fast transitions (FT) allow devices to roam between access points nearly instantly, and 802.11k and v allow access points and clients to exchange scan results, so that access points can move clients to the
84.
▲
by
tomn
4y ago
Maybe i should have explained this.. To share objects between threads, some synchronisation is needed, for example to update reference counts. There are a few ways to do this: - make the user add locks; the problem with this if it goes wron
85.
▲
by
tomn
4y ago
The GIL improves single-threaded performance compared to other options.
86.
▲
by
tomn
4y ago
This could end up being worse from a signal-integrity point-of-view, as now both of those traces have a stub (of different lengths!), which will comb-filter the signal. If you wanted to be fancy, it would have been better to lift those two
87.
▲
by
tomn
4y ago
From my limited understanding: - the mechanism is large compared to the capacity - they are noisy - they require lots of power - they need to be pre-heated (so only make sense if you're running more than one load) - they require more c
88.
▲
by
tomn
4y ago
> you won't be going anywhere in computer graphics by trying to "write pure functions" or "avoiding side effects" Not sure about this; in my experience (in a different domain, audio processing) you totally can ge
89.
▲
by
tomn
4y ago
Yeah, they are quite good at compatibility. In practice there may often be an upper version limit if you happen to use any features which eventually get deprecated or removed.
90.
▲
by
tomn
4y ago
While what you said is true, for outsiders it misses the 'why' (which I'm sure you are aware of!). The idea with autotools is that the generated configure script (and other assorted files) is supposed to be forwards and backw
More ›