• 1 Post
  • 24 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle



  • The Chu Ko Nu was more of a party-trick than a real weapon though. The amount of power behind each bolt was miniscule.

    The actual “rapid-fire warbow” the Chinese used was the lol rocket-launcher. (Or really, Koreans did it first, strapping Chinese rockets to a bunch of arrows and lighting all of them at the same time, causing devastating effects on the battlefield). See Hwacha: https://en.wikipedia.org/wiki/Hwacha


    Zhuge Liang’s biggest battlefield contribution in practice was probably the popularization of the “Ox Cart”, aka the Wheelbarrow. The Shu’s army could march further since they had such contraptions powering their logistics. Kinda funny to think that things like Wheelbarrows were still the stuff of sci-fi in the year 200 AD, but that’s where technology was in practice.

    EDIT: The fact that Zhuge Liang’s lanterns (aka: hot air balloons) got practical usage back then is incredible though.



  • Alibaba in some ways.

    My understanding of Alibaba (and the 1001 Arabian Nights) is that they’re closer to Arabic “Duck Tales”. Fantastical stories more designed to woo children with crazy powers and nearly illogical plot structures. However, 1001 Arabian Nights became absurdly popular in Europe, far more popular than well-respected Arabic Heroes. (Much like how Duck Tales is a children’s story in American culture, but way more popular in Europe for some reason). Or for the American equivalent: us importing young-adult shows from Japan (lots of anime) and the American adults consuming it.

    For someone “like King Arthur”, an adventuring Hero that’s well respected in the culture that they’re from (ex: English respect King Arthur and see him as high-culture), Arabic Heroes are closer to Sinbad the Sailor instead, rather than Alibaba, Aladdin, or Scheherazade.

    Unfortunately, if an Arabic tale came to Europe in the 1500s to 1800s, it would be called “Arabic Nights”, because the original 1001 Arabian Nights was just so popular, every translator in Europe would basically add it as one of Scheherazade’s sub-stories. So its difficult from a Western / English-speaking lens to see what is, or isn’t, respected high-culture stories.


    I’m looking through Wikipedia and have come across Antarah ibn Shaddad, a Guardian of the Nativity (Yes, “that” Nativity, Jesus’s birthplace). Such a hero sounds far more similar to King Arthur as a heroic figure to look up towards. (A lot of 1001 Arabian Nights are filled with rather disgusting and backstabby characters and aren’t really “Heroes”).



  • There is this legend / history from Romania called Vlad Dracula. He was a Voivod (would be roughly a Count in Western nobility, but with more military powers) who brutally murdered the rich and corrupt Boyars and gave order and safety to the poor.

    If you ignored the hundreds of impaled men, women and children in front of his Castles… Legend says he kept gold at the center of his towns to prove that all thieves were dead. If anyone openly stole the gold at the center of town, they’d be impaled.


    Perhaps Vlad Dracula was too brutal by Western European standards. But IMO, there seems to be overarching tales of someone who stood up to the corrupt Nobility and actually enacted a sense of justice between both Robin Hood and Vlad.

    Obviously, it’s 100% myth by the time people are telling stories of the Count Dracula who drinks your blood. But as a nobleman of the years 1400s or so, his true story is so difficult to separate out from the myths and legends. Whoever was for real, he was clearly brutal to have caused so many myths to be written about him.


    Going further East, there are the many Tales of Baba Yaga. A powerful and brutal witch of Siberia. There’s all kinds of stories of Baba Yaga, but she usually has Twins or Triplets form, a Dancing Hut and powerful and brutal (but ironically fair) Magicks.

    I wouldn’t say that Baba Yaga is like King Arthur… But Baba Yaga very similar to the evil and brutal Morgana of Arthurian lore. But Baba Yaga has no peer or equal. There is no King Arthur or other set of knights to save society from Baba Yaga wrath.


    Even further East are the Fables from the Romance of the Three Kingdoms of China.

    The TL;DR is that China had a massive civil war at the fall of the Han Empire in the year 200AD or so. This Civil War lasted three generations.

    As the Han Emperor was stolen by the evil Dung Zhou, the 12-way Coalition army tried to save the emperor. It was too late however, China fell into a war and the 12 warlords soon entered a period of free-for-all, vying to control all of China.

    The armies kill and or subsume each other until the rise of Shu, Wu and Wei. The ‘winners’ of that period of chaos. And then the real crazy shit starts happening.

    They utilized Magicks to create battlefield conditions: unlikely wind that spread fires through enemy camps. They find legendary weapons. Single men fight against armies of a thousand or more.

    This crazy Wizard/Inventor named Zhuge Liang invented hot air balloons and used them as communication between troop formations. No wait, this one is actually true and not a legend.

    Lots of Chinese Magic and History here as the three-way free for all causes a natural set of alliance (Shu and Wu were weak early on) but then later when Shu grew more powerful, Wu and Wei staged a careful betrayal killing the God of War: Guan Yu (one of the main generals of the Shu. This is “That long-beard Guy riding the Red Horse” you keep seeing in every Chinese Restaraunt)

    Romance of the Three Kingdoms is somewhere between King Arthur and the Bible in terms of importance to Chinese Culture. Even modern Chinese understand that whoever wrote the book was a Liu Bei fanboy (aka: obviously biased / favors Shu in every situation). But the book is incredibly influential to Chinese Philosophy. Many sayings and parables about the importance of scholarship and science (Zhuge Liang and Sima Yis inventions to change the course of battle), the importance of order and fairness (even the brutal warlord Cao Cao of Wei was well known and well-regarded as a fair king). The importance of recruitment efforts, and other such parables / philosophy regarding how societies can gain advantage over each other. Not just battle, but through economic power, legends, and more.


  • Universal Paperclips is one of the best clicker games.

    In particular: because it isn’t a clicker game. It only starts off as one. There’s only about 2 sections IIRC that are “clicker”, the start (before auto-clippers kick in), and then the quantum computer.

    I guess you have to launch your first 20 or 30 probes at the space stage and that’s done one-click-at-a-time… but I don’t think that counts as a “clicker” game since its so few clicks in the great scheme of things. At no other point is rapid-clicking that useful.


  • I had a pretty standard linear-list scan initially. Each time the program started, I’d check the list for some values. The list of course grew each time the program started. I maximized the list size to like 2MB or something (I forget), but it was in the millions and therefore MBs range. I figured it was too small for me to care about optimization.

    I was somewhat correct, even when I simulated a full-sized list, the program booted faster than I could react, so I didn’t care.


    Later, I wrote some test code that exhaustively tested startup conditions. Instead of just running the startup once, I was running it millions of times. Suddenly I cared about startup speed, so I replaced it with a Hash Table so that my test-code would finish within 10 minutes (instead of taking a projected 3 days to exhaustively test all startup conditions).


    Honestly, I’m more impressed at the opposite. This is perhaps one of the few times I’ve actually taken the linear-list and optimized it into a hash table. Almost all other linear-lists I’ve used in the last 10 years of my professional coding life remain just that: a linear scan, with no one caring about performance. I’ve got linear-lists doing some crazy things, even with MBs of data, that no one has ever came back to me and said it needs optimization.

    Do not underestimate the power of std::vector. Its probably faster than you expect, even with O(n^2) algorithms all over the place. std::map and std::unordered_map certainly have their uses, but there’s a lot of situations where the std::vector is far, far, far easier to think about, so its my preferred solution rather than preoptimizing to std::map ahead of time.



  • How many layers does the Orange Pi Zero pcb have?

    Answer: Good luck finding out. That’s not documented. But based off of the layout and what I can see with screenshots, far more than 4 layers.


    A schematic alone is kind of worthless. Knowing if a BGA is designed for 6, 8, or 10 layers makes a big difference. Seeing a reference pcb-implementation with exactly that layer count, so the EE knows how to modify the design for themselves is key to customization. There’s all sorts of EMI and trace-length matching that needs to happen to get that CPU to DDR connection up-and-running.

    Proving that a 4-layer layout like this exists is a big deal. It means that a relative beginner can work with the SAM9x60’s DDR interface on cheap 4-layer PCBs (though as I said earlier: 6-layers offer more room and is available at OSHPark so I’d recommend a beginner work with 6 instead)


    With regards to SAM9x60D1G-I/LZB SOM vs Orange Pi Zero, the SAM9x60D1G-I/LZB SOM provides you with all remaining pins of access… 152 pins… to the SAM9x60. Meaning a full development board with full access to every feature. Its a fundamentally different purpose. The SOM is a learning-tool and development tool for customization.


  • Well, my self-deprecating humor aside, I’ve of course thought about it more deeply over my research. So I don’t want to sell it too short.

    SAM9x60 has a proper GPU (albeit 2D one), full scale Linux, and DDR2 support (easily reaching 64MB, 128MB or beyond of RAM). At $3 for DDR2 chips the cost-efficacy is absurd (https://www.digikey.com/en/products/detail/issi-integrated-silicon-solution-inc/IS43TR16640C-125JBL/11568766), a QSPI 8MBit (1MB) SRAM chip basically costs the same as 1Gbit (128MB) of RAM.

    Newhaven Displays offers various 16-bit TFT/LCD screens (https://newhavendisplay.com/tft-displays/standard-displays/) at a variety of price points. Lets take say… 400x300 pixel 16-bit screen for instance. How much RAM do you need for the framebuffer? (I dunno: this one https://newhavendisplay.com/4-3-inch-ips-480x272px-eve2-resistive-tft/ or something close).


    Oh right, 400 x 300 x 2-bytes per pixel and we’re already at 240kB, meaning the entire field of MSP430, ATMega328, ARM Cortex-M0 and even ARM Cortex-M4 are dead on the framebuffer alone. Now lets say we have a 10-frames of animation we’d want to play and bam, we’re already well beyond what a $3 QSPI SRAM chip will offer us.

    But lets look at one of the brother chips really quick: Microchip’s SAMA5D4. Though more difficult to boot up, this one comes with H.264 decoder. Forget “frames of animation”, this baby straight up supports MP4 videos on a full scale Linux platform.

    Well, maybe you want Rasp. Pi to run that, but a Rasp. Pi 4 can hit 6000mW of power consumption, far beyond the means of typical battery packs of the ~3-inch variety. Dropping the power consumption to 300mW (SAMA5D4 + DDR2 RAM) + 300mW (LCD Screen) and suddenly we’re in the realm of AAA batteries.


    So we get to the point where I can say: I can build you a 3" scale device powered by AAA batteries that runs full Linux and supports H.264 decode animations running on a Touch-screen interface, fully custom with whatever chips/whatever you want on it. Do I know what it does yet? No. Lol, I haven’t been able to figure that out yet. But… surely this is a useful base to start thinking of ideas.



  • I’m looking it up and it seems like Zebralight is USA-only, so maybe the whole thing is moot. IMO, technology is always improving, 10 years from now we’ll have better… something. Its unpredictable, but something will be better. Maybe more-efficient MOSFETs (on/off switches relating to the power-delivery, especially in the voltage-converter circuits and/or current regulator circuits), or more-efficient LEDs, or more-efficient batteries. Who knows? Something will be obsolete in 10 years however, and you might care for an upgrade by that point.

    But I’m not so loyal to brands. What I believe in is that the “AA-size” is a good, practical, flashlight for everyday carry. Then again, I know that some people prefer the 18650 (aka: Lithium-cell) that’s roughly one-size larger instead.


    Here’s what I do think:

    1. Batteries wear out over time – Replaceable Batteries are key to longevity. My own collection of AAs are thrown away regularly, as they do break down, and I do buy new ones over time. Lithium-Ion in my phones only last 2 to 3 years in my experience. I absolutely require a replaceable battery for any long-term use.

    2. LEDs have long lifespans – 10+ years for the LED is likely. The flashlight likely won’t last for “life” as the LED is the critical component, but if we ignore the battery (which probably only has a few years of life at the best), the “next” component to likely fail is easily 10+ years of life. Other parts inside of the battery (Inductors / MLCC Capacitor for the boost circuit, and other chips) are 20+ year components.

    3. Technology always improves – Every part I listed here has improved in the past decade. Meaning I expect 10+ years from now, that the new tech will improve again somehow.

    4. Its the device class you should be thinking of. – Decide upon AAA-size, AA-size, or 18650-size flashlights. There’s a few custom-battery sizes outside of that, but 18650 is the “standard lithium” cell that likely is replaceable. AA-size might use Lithium-ion 14500 cells, which is also fine and standardized (albeit less popular, but its still a “standard” size with replacements available). The particular brand isn’t too important: as long as its using modern parts, you’ll get roughly the same performance as all competitors. (Be it a Zebralight or a M150 or whatever you end up buying).


    So yeah, that’s your main decision: AAA-sized (180 Lumens), AA-sized for ~280 to 300 lumens (or 14500-sized, the equivalent Li-ion standard-size), or 18650-sized (Li-ion only, 1000+ lumen).

    Bigger is more lumens and hours of use per charge.

    Smaller is easier to carry.

    Brand probably doesn’t matter as long as you choose a premium LED / premium brand of some kind.


  • small Olight ones

    Which small ones? All of the Olights are larger than the Zebralight SC53 except for the AAA Olight. Bigger flashlights will have more lumens and more energy. The question is what’s the right size for EDC?

    Zebralight SC53 is on the smaller side: 77mm long, 21mm diameter (round). But all 1x AA flashlights will be about this size, its just the nature around designing a flashlight around a 50mm long AA battery. AAA is even smaller but you lose out on Lumens significantly: the AAA Olight is 180 Lumens, about half the light that the AA design gets you. But it is even smaller and easier to keep in the pocket, so that’s the tradeoff.

    A lot of people like the 1000-lumen sized flashlights, they’re a touch bigger and they use Li-ion batteries instead. But again, its about the size difference. What size do you want to carry with you?


    For me, I think AA makes the most sense. They have cheap chargers made by a large number of competing manufacturers. If I “lose” my AA charger, I know I can get a replacement for $10 to $20. What happens if you lose that magnetic charger? Can you ever recharge that flashlight?


  • Zebralight has a clip.

    Yeah, a headlamp would be better, but the clip is sufficient for clipping onto a cap or something. It’d probably be a bit difficult to aim but I can imagine it working. Its honestly small enough that I hold mine with my mouth if I’m doing things. Dunno how sanitary this practice is, lol, but lips make it easier to aim and point.

    Then again: the clip is backwards? I guess you’d have to put it into the side of your cap pointing forwards. Hmmmm… I’ll have to play with it (I usually don’t use a cap. Again, I just use my mouth, lol).

    That is: a small AA-sized flashlight, with the right design, can serve the needs of a headlamp (clipping to a cap and/or holding with your mouth/lips), pocket light, and more. I think the 1x AA-sized are the right size for EDC, though some people argue that AAA-sized (one size smaller) is even better. But the smaller you go, the less light you get.

    300 Lumens (albeit for only a short time), maybe 200 Lumens under longer-term use, is a good place to be for AA-sized flashlights. It obviously can’t compete with 18650 flashlights, but the smaller size allows for more uses in practice. On the other hand, AAA-sized loses even more Lumens and 300 is already on the lower side for practical usage.


  • That does sound ideal, but if I could avoid having to buy the battery and charger separately that would be neat.

    AA NiMHs are $1.50 to $2. AA NiMH chargers are $10. Mayyyyybe $20 or $30 if you get a fancy one. Are… you SURE that you wanna get more complex than this?

    AA NiMHs are damn near disposable in my experience. The trickle-charger ($10 for an 8+ hour slow charger that requires 2 batteries at a time) is fine. If you want a charge within 4 hours or less, that’s where $20+ chargers come in. But trickle-charge is fine?

    Basically: NiMHs can be left overcharged, as long as they’re overcharged slowly. They’ll just radiate heat when they reach a state of overcharge, but its actually a safe situation. (maybe reach 120F or 50C temperature during overcharge, but otherwise they’re fine). A $10 trickle-charger has no smarts, it just overcharges the batteries you connect. You set a kitchen timer and 20 hours later you take the batteries out, because they’re probably overcharged by then.


    To answer your question: yes, USB-C AAs exist. But in my experience, the $10 trickle-charger + $2 NiMH is cheaper than buying USB-C AAs. The USB-C charger “inside” the AA also removes room for chemicals (An Energizer or Eneloop AA is 100% chemicals to make as much energy as possible). So you lose on battery life, and the electronics will cause self-discharge (so you’ll also have less life).

    So you’re spending a lot of extra money on worse-specs. IMO not worth it, just stick with the classic NiMH from Eneloop (or reasonable competitors) + standard charger. Buy as much chemicals as you can, lol.

    There are USB-C AA chargers btw.

    https://www.amazon.com/EBL-Individual-Technology-Rechargeable-Batteries/dp/B077XCKC2G

    How long do NiMH batteries hold their charge while not in use?

    Modern NiMHs are “LSD”, low-self-discharge and have specifications of 1Y to 10Y (!!!) of charge hold. However, older “classic” NiMHs self-discharge within 3 months (!!!).

    The brands I discussed: Eneloop, Energizer, and AmazonBasics, should have over 1Y of charge. If you want an “emergency” battery, I suggest Lithium (not Li-ion, but Energizer Lithium)

    These will give you enough charge, and have over 10Y worth of life. But they are NOT rechargable. So they’re “emergency use”, leave in the car kinda thing. They’re also quite expensive ($2+ for non-rechargeable), but their long-life makes them ideal for an emergency use “forget-about-it” battery to leave in a toolbox or something.


  • I have a Zebralight that gives 300 lumens from a single AA battery. Mine is several years old though, there’s probably a better model today.

    But that’s what I’d look at: AA battery and 300 lumens or so. You have to buy NiMH, which is really cheap these days (Eneloop has the best brand recognition. Energizers are good. AmazonBasics are surprisingly rebadged older-eneloops from Panasonic, so they’re also pretty good).

    Basically NiMH gives more current than any Alkaline or Heavy Duty battery. So only rechargable NiMH can offer 300 lumens.


    The metal construction is durable for sure, but note that your phone will get scratched up by the hard metal if you put it in the same pocket as this flashlight. AA is small, but not quite the smallest, you can still feel the thing in the pocket throughout the day, but this is far smaller than your typical 18650 Li-ion based 1000+ Lumen behemoth.

    A web-search gives this as the rough size:


    One cool feature is the firefly setting: 0.1 lumens. You’d be surprised at how useful that one is. You don’t need much light in some situations, and keeping the setting low can keep your “natural night vision” so to speak.


  • Meanwhile in Ubuntu-land, a Python2 script probably just straight up doesn’t work at all.

    “At least the .NET code continues to run today”. And you can setup a 20-year-old developer VM running VS2008 in practice and code “the old way” to continue to maintain the old code (that still runs on today’s machines). Meanwhile, you’re FORCED to migrate the Python2 stuff in Ubuntu-land due to a litany of incompatible changes to systemd, X.org, Python2 vs 3 issues and more.


    Not just Python2, but also Bash-scripts. (Weird changes to netcat, or ipconfig, or other tools that utterly bork old scripts).

    Microsoft isn’t as good at backwards compatibility as it used to be. But they’re still leagues ahead of the OSS community on this.