When I saw the name Vi Hart, the author of the video, it sounded quite familiar. It turned out that She is the daughter of George W Hart, a mathematician and polyhedron man. I'm a big fan of work zome geometry and amazing polyhedron.
If you are interested in recreational mathematics, don't miss to checkout https://georgehart.com/.
I have been playing with a Raspberry 400 for couple of days now. I thought of recommend it for my nephew, but couldn't do it because of the following drawbacks.
1. Lack of 3.5mm audio jack or built-in microphone/speakers
2. Unable to run Zoom reliably
Given that schools are closed (at least in India) and classes are happening over zoom, these two drawbacks makes it a no-go for my use case.
Good point. Audio from a 3.5mm jack would add little to the cost, and also keep down headphone cost. Also, most monitors have really shitty audio. Boo.
"Getting audio out of the Pi 400 was a bit of a challenge; it defaulted to attempting to deliver audio over HDMI, and Raspberry Pi OS' audio control dialog isn't the best. Even after changing the output device to USB Audio (my gaming headset), YouTube wasn't producing audio—and there's no "test" button I could find in Pi OS, like the one in Ubuntu's audio-control dialog. Closing and reopening the browser entirely after changing the output device resolved the issue, and audio played from the headset fine afterward." https://arstechnica.com/gadgets/2020/11/raspberry-pi-400-the...
My experience has been fine. Whether with the default audio device picker (which doesn't work correctly once you've installed PulseAudio) or PA's own "pavucontrol" selecting output device is snap. Sometimes you have to restart the audio-producing program to use the new selection, which is a feature, not a bug - you could have different programs use different audio devices at the same time.
So to get the usual 3.5mm jacks, just buy a cheap USB/analog headset adapter; about $3 from Ali Express. Select as input and output, and done. Microphone is usually not an issue if you're using a webcam since most have an adequate one built in.
Would you be able to output audio or have a audio/headphone/headset jack via a monitor over HDMI? Bluetooth is also an option but would require a headset and setup to work well I think.
> Just for curiosity, is the # of forecasts due to SKU/locations, or due to granularity of series (i.e. let's forecast absolutely every KPI driver, as well as on different time scales).
In our case, the big number was due to SKU/locations. But in other use cases, it could be due to multiple KPIs.
> Apologies if that's an low level question, the Walmart blog was relatively large in use case.
I agree. I was trying to highlight the amount of infrastructure and setup required to scale forecasts. While that makes sense for their scale, there are hardly any options to achieve that without dealing with infra.
Thank you, Anand. Despite being 8 years old, Aaron's html2text.py worked perfectly to convert the HN homepage to Markdown. His memory (and code) continues to be a blessing!
> Any slice implementation that references to the original data has to be some kind of "fat pointer". Is there any other way that can be done?
Yes, add one more level of indirection.
For instance traditional "oo" languages don't usually use fat pointers for dynamic dispatch, you have a single pointer to an instance which holds a pointer to its vtable.
In Rust however, the "object pointer" is a fat pointer of (vtable, instance). Go's interface pointers are the same (which combined with nils leads to the dreaded "typed nil" issue).
I don’t understand people’s beef with “typed nil”. If an interface is just a fat pointer and the data is itself a pointer, then it stands to reason that the interface can be not nil while the data can be nil. If you understand the concept of pointers (or nillable pointers, anyway), surely this should not be surprising to anyone? It would have the same states as a asterisk-asterisk-int (HN formatting prohibits asterisk literals), would it not?
I think it's a combination of several things: First, you've got a good chunk of Go programmers who haven't dug down into the details of the internal representation of interfaces, because for the most part, they don't need to, and they either don't generally dig in to that level, or just haven't gotten around to it yet. (There's nothing wrong with this and this isn't a criticism. It's just that not everybody is an expert in everything they do or use.)
Secondly, I think that for a lot of people, when they have an interface that is itself nil, they mentally tag it with the label "nil", and when they have an interface that contains a typed value that is nil, they mentally tag this with "nil", and from the there the confusion is obvious. Mix in some concepts from other languages like C where nil instances are always invalid, so that you don't mentally have a model for a "legitimate instance of a type whose pointer is nil" [1], and it just gets worse.
Third, I think it's an action-at-a-distance problem. I'd say the point at which you have, say, an "io.Reader" value, and you put an invalid nil struct pointer in there that doesn't work, the problem is there. Values that are invalid in that way should never be created at all, so "interfaceVal == nil" should be all the check that is necessary. So you have a problem where the code that is blowing up trying to use the "invalid interface" is actually caused by an arbitrary-distant bit of code that created the value that shouldn't have been created in the first place, and that pattern generally causes problems with proper attribution of "fault" in code; the temptation to blame the place that crashed is very strong, and, I mean, that's generally a perfectly sensible default presumption so it's not like that's a crazy idea or anything.
[1]: For those who don't know, in Go, you can have a legitimate value of a pointer which is nil, and implements methods, because the "nil" still has a type the compiler/runtime tracks. I have a memory pool-type thing, for instance (different use case than sync.Pool, and predates it) which if it has an instance does its pooling thing, but if it is nil, falls back to just using make and letting the GC pick up the pieces.
This. Nil is the one case where you can seriously screw your self up in Go because it’s an untyped literal that gets typed on assignment. Interfaces are fat pointers and a “true” nil pointer is nil interface, nil implementation. If your function is going to return a known subtype and you store that nil in a temporary you now return a known interface and nil implementation. Then your == nil check on the interface pointer will fail.
I royally screwed up a deploy once because my functions were returning nil error implementations that were != nil and triggered failure paths.
I agree that nil is error prone, but I don’t think interfaces add any additional confusion so long as you think of them as a reference type and reason accordingly. Also, I think you’re mistaken about “true nil”. A “true nil” only requires the interface to be nil. The value doesn’t matter as there necessarily is no value (moreover interfaces can have values which are value-types that cannot be nil!).
Not since 2007 (java 7).
The extra ints (8bytes) used for marking the beginning/end of the string and the fact the subscring leaked the ref. to the original string caused extra memory footprint. So now it's just a copy unless the substring is exactly the same as the original.
Previously (around 2004) I used to call new String(string.substring) in specific cases to prevent leaks.
>Is there any other way that can be done? <-- yes copies.
Not numpy, but Gorgonia tensors are just pointers. The reason: it's cheaper to pass around one word than the absolute minimum "fatness" to pass around a multidimensional array.
The absolute minimum meta info required for a multidim array is shape, stride. Numpy implements them as a [HUGENUMBER] array of integers for both. Gorgonia implements them as slices. Both of these incur a lot of additional movement of memory.
In addition to apt and npm, I would like to see docker image distribution powered by IPFS. It really feels stupid to pull images from a central registry sitting on the other side of the globe when the image is already present in the next node in your kubernetes cluster.
There is a big issue, that ipfs uses its own hash mechanism (hash of protobuf of dag), while registries (and most other existing content based distribution mechanisms) use sha256 hashes of the whole content.
So you can't simply interop between the two without some sort of lookup to convert hash functions. It is hugely frustrating, as basically different content based distribution mechanisms cant work together.
In theory docker image registries support pluggable hash functions, although it is not clear to me that the ipfs function is even very well defined outside its own code. We could start to add a second hash calculation to every registry operation, but it would be a performance hit which some users would not like.
(tree based content hashes that allow parallelisation are nice, but the ipfs one is very ipfs specific and more complex than it needs to be I think).
Reminds of Bhopal, a city in India. People there are very fond of numbers. You see people getting on a bus and buying a ticket for "aath number" (number 8) or even "saade paanch" (five and half). You are right, thay are names of places. Not feeling well? get youself checked at "baara sau pachas" (twelve hundred and fifty). Yes, that is the name of a public hospital. It took me a while to get used it.
ZKM in Karlsruhe, Germany has an exhibition called Open Codes, where they have used a single solid object to generate all letters in the alphabet using projections.
There supposed to be a spiral encoded in the first chapter of genesis. And the spiral itself encodes the alphabet the encoding of the spiral is written in. Very quine like ability. I am not familiar with any other alphabet achieving this.
http://meru.org/letteressays/letterindex.html
If you are interested in recreational mathematics, don't miss to checkout https://georgehart.com/.