HNHacker News
TopNewBestAskShowJobs

mafuyu

2,461 karma · joined October 27, 2013

submissionscomments
mafuyu··on Why Const Doesn't Make C Code Faster
That's typically in the case of UB, where compilers can make whatever assumptions they want. In this case, even if the code is completely within the C spec, the compiler cannot guarantee that the data is unmodified.
mafuyu··on Intel 10nm Chip Gets Mixed Reviews
Anandtech articles looking at the Ice Lake uarch and performance:

https://www.anandtech.com/show/14514/examining-intels-ice-la...

https://www.anandtech.com/show/14664/testing-intel-ice-lake-...

I'm personally still excited about these chips for laptops. Lower power and higher IPC mean same-ish performance as the previous generations, but with better battery life and thermals. Plus you get better turbo boost, better graphics, built-in support for TB3, WiFi 6, etc. Seems perfect for something like the Surface Pro. The Core uarch is getting dated, yeah, but Intel is going for breadth and better integration here and it looks compelling.

mafuyu··on A2-class microSD cards offer no better performance for the Raspberry Pi
I'd look into industrial SLC uSD cards like the ones from Swissbit: https://www.digikey.com/en/supplier-centers/s/swissbit

Most consumer cards are designed around media storage so they don't last as long.

mafuyu··on DeepMind’s StarCraft II agent will play anonymously on battle.net
APM is misleading because it can mean a lot of things. There are bots out there that will perfectly micro units to win battles that would typically trade out.

SC2 is really about attention management- every action you take, like moving a worker to construct a building that you'll have money for in the future, takes time and attention, and good players will take the minimal action needed to get something done and then move their attention elsewhere while they wait (almost like CPU pipelining). This is why players will do runbys/drop harass at the same time as a big fight. It forces the defending player to spend more attention than the attacker, or risk losing key workers/buildings. APM is just a rough representation of the ability to multitask.

From this perspective, AlphaStar's APM doesn't really matter. If it can instantly understand and juggle different scenarios occuring on the map at the same time (scouting, macro, battles, drop defense), that immediately puts it at an advantage, and many pro level strategies rely partially on pressuring the opponent until they make a mistake.

The high level strategy stuff exists on top of all this, and that's what makes SC2 so difficult. AlphaStar is really impressive, but once it understands the game at some level, I think it's inevitably going to be better than human players. Human players are going to get wins off AlphaStar by forcing tactical errors in weird scenarios, but it's not going to look like typical human games.

mafuyu··on Raspberry Pi 4
Are you running it as both NAS storage and a Plex server? How's transcode performance?

I put together a NAS/Plex box with a Kaby Lake Celeron and some hard drives, but I was thinking of splitting it out into separate NFS and Plex servers.

mafuyu··on True Random Number Generator for a True Hacker (2015)
I read a whitepaper recently that a MEMS accelerometer can provide sufficient entropy to derive random numbers from. Either way, I would treat external sensors as only a raw entropy source, and use them to drive a CSPRNG reseeded from an entropy pool. I don't think it's cryptographically secure to use the values directly. (Maybe an expert could chime in here?)

I've been looking at ways to get cryptographically secure random bytes on low power micros, and that's the approach I'm taking. The standard for CSPRNGs is AES-GCM, which is a bit heavy, though. Anyone know if Fortuna still acceptable to use?

mafuyu··on Tesla’s ‘Bioweapon Defense Mode’ proving invaluable to owners in CA wildfires
Thanks! I started this project on a whim a few days ago, and haven't done a ton of research yet; just picked what looked like the most popular parts online.

I'd definitely be up for putting some assembled spares on Tindie once it's complete. I'll post about it on https://hackaday.io/hylian or https://edwardsh.in once things get going.

mafuyu··on Tesla’s ‘Bioweapon Defense Mode’ proving invaluable to owners in CA wildfires
Thanks for those links- this is something I'm interested in as well. I'm working on a RasPi Zero hat that has a CCS811 for eCO2 and VOC, a BME280 for humidity, temp, and barometric pressure, and a header for a SDS011.

I'm interested in indoor air quality, so just looking at PM2.5 trends over time would probably be enough for me. An error of 2x without calibration makes it useless for any sort of air quality index calculation, though. Maybe I'll include a header for the HPMA as well and compare the two.

mafuyu··on Show HN: CryptSend.io – Share encrypted files with randomly generated links
Thanks, hadn't heard of Wasabi before. The storage pricing is comparable with B2, but no egress charges is nice. Any have experience with this provider?
mafuyu··on We know music is pleasurable, the question is why?
I recommend checking out Adam Neely's channel, where he touches on some similar concepts:

https://youtu.be/6c_LeIXrzAk https://youtu.be/9q4MWdHhgfM https://youtu.be/V5WfgMVtueo

mafuyu··on Chemists discover how blue light speeds blindness
Oh, yeah! Totally forgot about those from high school chemistry class. :)

I'm sure there'll be _some_ blue light. I don't know if a prism would be high resolution enough to tell if it's a dangerous level.

mafuyu··on Chemists discover how blue light speeds blindness
Just tested with my power supply, and the minimum V_on seems to be about 2.7V. So if I want to drive all 10 in series, I'll need 30V+. If I had three banks in a 4,3,3 configuration, I could get away with a 12V power supply as well, which would be nice since I already have a bunch of 12V 5A wall warts.

I already got the board you linked, supposedly configured for 700 mA. Haven't tested yet. The datasheet for the part says it can go up to 2A[0], so I could potentially modify the feedback circuit for 1A, which would reach the full 3W rating of the LEDs.

One issue with that driver chip is that the PWM/enable is active low, so I think I may just stick an inverter on the output of the Mesh Bee. The SDK for the NXP part has changed since the ZLL repo was updated, and I haven't had much luck getting it to compile myself.

[0]: http://www.xlsemi.com/datasheet/XL4001%20datasheet.pdf

mafuyu··on Chemists discover how blue light speeds blindness
I wanted something that was compatible with my existing Hue system, and specifically targeted wavelengths for light therapy.

I already have a normal Hue bulb next to my bed on a schedule, similar to the wake up light, but a light strip right above my head seems more appealing to me.

mafuyu··on Chemists discover how blue light speeds blindness
Yep, will do!
mafuyu··on Chemists discover how blue light speeds blindness
Thanks for the tips! That link is super interesting.

I'm guessing melanopic lux is the lux output weighted over the spectral absorption curve of your eyes?

Some napkin math: I have ten 3W LEDs, and each might produce around 1000 lux when fully driven. If we drive each at half strength, and half of the generated lux is melanopic lux, that's 2500 melanopic lux.

mafuyu··on Chemists discover how blue light speeds blindness
Yeah, especially with these cheapo Chinese LEDs. I looked into spectrometers, but they seem pretty pricey. Maybe some sort of plastic filter that blocks the shorter wavelengths?
mafuyu··on Chemists discover how blue light speeds blindness
Sure, it's not the most exciting project, but I might do a short writeup when I'm done.

I originally purchased these nice LED strip bars with enclosure in blue[0], but after reading this site by the manufacturers of a commercial green therapy light[1], I was convinced to switch to turquoise/cyan.

Turquoise isn't that popular so I wasn't able to find any strips/bars, and I got these individual 3W bead LED modules instead.[2]

For the Hue integration, I'm using a Mesh Bee + UartSBee v5[3] with firmware from PeeVeeOne[4]. It outputs PWM, and I'm hooking it up to a cheapo constant current LED driver I got from Aliexpress. Since all the LEDs need to be in series for a constant current driver, I'm probably looking at a ~20V power supply to power the whole thing.

My bedframe has a headboard, so I'm planning on 3D printing some mounts that clamp on top.

[0]: https://www.ebay.com/itm/50CM-U-Aluminium-shell-DC-12V-36-SM...

[1]: http://www.sunnexbiotech.com/blue%20vs%20green%20light.html

[2]: https://www.aliexpress.com/item/10-pcs-3W-Turquoise-Cyan-LED...

[3a]: https://www.seeedstudio.com/Mesh-Bee-Open-Source-Zigbee-Pro-...

[3b]: https://www.seeedstudio.com/UartSBee-V5-p-1752.html

[4]: https://peeveeone.com/?page_id=252

mafuyu··on Chemists discover how blue light speeds blindness
I'm in the process of building a Philips Hue-compatible light therapy LED strip that goes above my bed, and I chose 500 nm cyan LEDs due to this concern. The goal is to have the lights gradually wake me up every morning and help align my sleep cycles, as I suffer from Delayed Phase Sleep Disorder.

Figure 3[0] in the paper seems to show that 500 nm is safe, and that melanopsin has high absorption at 500nm, which has important effects on circadian rhythm[1].

Anyone more knowledgable than me know if this setup is safe?

[0]: https://www.nature.com/articles/s41598-018-28254-8/figures/3 [1]: https://en.wikipedia.org/wiki/Melanopsin#Effects_on_circadia...

mafuyu··on Best Buy Is Thriving in the Age of Amazon
Even the nice consumer SD cards aren't really designed for high write endurance. I would look into industrial cards like the Swissbit microSDs with SLC: https://swissbit.com/products/nand-flash-products/cards/micr...
mafuyu··on Introducing the LineageOS SDK
https://lineage.microg.org/

MicroG has been picking up steam. They're doing OTA updates of Lineage + MicroG now.

mafuyu··on Ryzen Boards Reign at Embedded World 2018
http://www.lattepanda.com/alpha-edition https://www.kickstarter.com/projects/139108638/lattepanda-al...

Maybe this would fit your usecase? It has an Intel m3-7Y30 onboard.

mafuyu··on Fitbit Firmware Modifications and Data Extraction [video]
The Fitbit SDK is a direct continuation of a lot of the awesome work Pebble did, much of it by the same people. The Ionic may be aimed at a slightly different market, but we’re still working hard at trying to keep that dev goodness alive.
mafuyu··on Fitbit Firmware Modifications and Data Extraction [video]
The Fitbit Ionic has a pretty open JavaScript SDK that we’re still working hard on to improve. You have access to a lot of the device public API, and can share your apps via links without getting it approved for the gallery.

https://dev.fitbit.com/

mafuyu··on Implementing Malloc: Students and Systems Programming [pdf]
Doing this lab was one of my more memorable experiences at CMU. It was tons of fun, but barely getting any sleep for 3 days because I put the assignment off was less fun.

I put in some horrible last minute hacks to optimize for the autograder and raise my grade, like doing a pseudo-bubble sort. Every time I coalesced two adjacent free blocks, I would compare the adjacent nodes in the linked list and swap them if they weren't sorted. That raised my allocation efficiency a tiny bit for certain test vectors- just high enough to bump my grade up a couple points. :)

mafuyu··on Facebook, You Needy Sonofabitch
I installed the Lite version of Messenger, and it's way better. (Not available in the US App Store; there are verified APKs floating around the internet.) It's just a bare-bones chat app that launches when I want it, without all the nagging about chat bubbles, their Snapchat knockoff, and whatever else.
mafuyu··on Legacy extensions disabled by default on Firefox Nightly 57 starting August 11
I'd recommend Qutebrowser as a replacement: https://qutebrowser.org/

I switched over from Pentadactyl to Qutebrowser last year and it's way snappier. And with the experimental WebEngine backend, I haven't run into any rendering or performance issues at all. It also has a vertical tab mode, although it isn't possible to have sub-tabs like Tree Style Tabs.

mafuyu··on Dear Floyd Mayweather, you’re why the SEC exists
Stocks are set up to have some sort of inherent value tied to the company, or nobody would buy them. The typical ways are dividends paid out of profits, company buyouts, and the on hand assets of the company that can be sold. The market is just a pricing mechanism around all that.
mafuyu··on Ask HN: Share Your Raspberry Pi Project
Waaay back in 2011, when I was getting started with electronics, I combined a Raspberry Pi 2 with a battery pack and a head mounted display for an iPod Video to make a HUD. It was horribly hacky, but I did manage to get it to show the time and my Google Calendar events with a Python GUI program and Internet over Bluetooth to my phone.

Some pictures: https://github.com/Hylian/PiHUD

mafuyu··on Google relaunches Glass for businesses
Sounds like they've found a great enterprise usecase, and I hope they can keep improving the device to bring it to consumers once again.

I was able to snag a Glass for a good price when they killed support (before selling it off again after a couple months). I enjoyed using it, and being on a college campus at the time reduced some of the social awkwardness. I could push notifications to my face with IFTTT and the voice recognition worked reasonably well. Ironically, I found the most useful feature to be the camera. It's liberating to be able to wink and get a snapshot of whatever is in your field of view, whether it's some info you want to remember or a small moment you want to share. I'm on vacation now and find myself fumbling with my phone to take snaps of interesting things I want to share way too often.

mafuyu··on 21% of Windows users plan to switch to Mac, says survey, vs. 2% Mac to Windows
I use WSL a bunch on my Surface at home, but I've found GCC build times to be very lacking, with a huge perf hit compared to native Linux. You take a 2x hit when accessing /mnt/c/, and even when building within Linux filesystem, the build times are significantly slower (couple minutes vs 10s of seconds). Benchmarks put WSL on-par or better than native Ubuntu, so it's likely just a file i/o issue that can hopefully be fixed.
← PreviousPage 5 of 10Next →