Better HN
topnewbestaskshowjobs
Log inSign up

PennRobotics

932 karma · joined Sep 18, 2020 (6y ago) · 485 submissions

Submissions

comment 2y ago · link · parent

Before I understood how voltage regulators worked, I thought you could just attach a LM7805 to a 22 volt lithium source for running the electronics on a high-power robot. I learned that a failing/overheating LM7805 will pass the full voltage to your microcontroller, and that the microcontroller core will still be "oven hot" a full minute or two after it releases its innards.

comment 2y ago · link · parent

A bunch of the same business also takes away space from the sorts of businesses that your region probably lacks which would make the town more self-sufficient, interesting, and/or economically productive: a butcher, a jeweler, an audiologist, an independent insurer, a pub, a gardening store, a glassmaker, a theater, a brewer, a computer repair shop, and so on.

My hometown of 40,000 has five; one which replaced the only movie theater in the county (a one-hour radius) that closed at the end of 2020. The local government remarked the car wash will provide jobs. Three employees are needed, according to the "local" news. (Actually, the local newspapers were replaced years ago by a nationwide chain of "independent, regional" news sourcers.)

I'm glad I got away from that place. The most fun you could have on a Friday night was meeting friends at Walmart and then driving to an empty parking lot.

comment 2y ago · link · parent

Oh, and stop leaving the EQ/optimization to drivers or Dolby Access. Those don't make it into Linux.

comment 2y ago · link · parent

Consider yourself lucky.

I've wasted at least a full work week's time figuring out whether speaker/keyboard/suspend/lid/forcepad/stylus/overheating/GPU/scaling/dock/HID audio/application problems in my Z13 Gen 1 were caused by Lenovo, one of Lenovo's partners, the Linux kernel, Fedora, Wayland + GNOME, or just cosmic radiation.

comment 2y ago · link · parent

Don't forget to put the Wi-Fi card back in a slot!

I didn't want this stupid, buggy Qualcomm Wi-Fi adapter in my AMD ThinkPad (probably one major cause of 6.7.x suspend hanging) and wanted to switch it out with an AX210, but I can't because it's soldered on.

comment 2y ago · link · parent

Ironically, when I have the laptop on my lap, there is enough clearance between my legs to let air through. If I put the laptop on a mattress, it gets ridiculously hot because it doesn't activate lap mode and the mattress makes a great seal on all of the chassis bottom edges.

It's also a mismanagement of resources that someone is writing IMU drivers and some [clearly imperfect] decision logic, some other person is routing that IC onto the motherboard, the thing will need to be documented and bugfixed (and not necessarily by the same people that designed and wrote the thing), it adds another supply chain constraint, the whole subsystem is an unnecessary power consumption (even if it's optimized to 50 or 20 uA)...

There are much bigger fires to extinguish at Lenovo with their hardware/firmware/vendor/driver choices, and a handful of people are spending finite engineering resources on "lap mode."

comment 2y ago · link · parent

I don't know your particular model or situation and what the root cause would even be, but I have had issues with the USB ports that were later fixed in firmware, or one port that would stop working after a BIOS update until I disconnect the battery and wait a few minutes. Others on the Lenovo forums have identical/similar issues and resolutions.

I also had a functional laptop where they switched out the mainboard due to USB connector issues (which never showed up in BIOS tests).

Lenovo's approach to USB is a mystery.

comment 2y ago · link · parent

True, I hadn't noticed that at first glance, and I didn't see that as a third-party cookie in my site data. Nonetheless, I regularly see cookie warnings on sites with purely first-party cookies or even "just" session storage. (Mostly, I have been alert to this for the past year as I've started making non-personal web sites in Europe.)

comment 2y ago · link · parent

It only took two minutes to find at https://www.schwarzkuenstler.com/ and I'm sure I can find a dozen more in half an hour.

Germany is a bit litigious w.r.t. internet or privacy, so the combination---cookie consent---is a doozy. Nearly every German website that does anything will have a consent notification, and the slightest misstep (e.g. using Google Fonts without asking permission) can be punishable.

comment 2y ago · link · parent

https://gitlab.gnome.org/GNOME/mutter/-/issues/3276 ?

131.

Google I/O '24 Puzzles(io.google ↗)

71 points · by PennRobotics · 2y ago · 85 comments

comment 2y ago · link · parent

Bitwarden.

"Find in page" will only show a result if it is visible on the page (even though the scrollbar indicates the full vault has loaded, and even after scrolling down to the desired result and then back up).

They have a "Search vault" field that works fine, so it's not a major inconvenience, but the first few times I've Ctrl+F'd a newly added site and gotten "Phrase not found" when I know I added credentials? That's a mild anxiety I'd rather not have.

I could be convinced there's a security-related reason for this---in fact, I never really thought about it until now---but then I'd assume anyone able to get access to your vault can use Selenium and fill in the "Search vault" input field.

comment 2y ago · link · parent

DOS emulator and Vim emulator, and that's almost all I can imagine. Maybe games that would use the control key as an additional input---but in the browser???

comment 2y ago · link · parent

From my experience, the list of new terminals IS always growing.

Wayland? A developer wanting to flex their Rust or Go muscles? Poor Unicode or RTL support? Slow buffer? "I can GPU accelerate the terminal"? Tiling? Dropdown on tilde? Keypress customization? Better cross-platform compatibility? Sixel support? "We're a trendy yet ancient mega-corp that now supports open source please use our cloud product"? ... all reasons I've seen a new terminal or three.

Last night, I ssh'd into a server that had a huge TERM list but alacritty was not on it, so I had no dircolors even when using --color=always. The only reason I'm even using alacritty is due to my last terminal not working well on new hardware.

I don't have a better solution. Obviously the terminal should self-report its capabilities and everyone writes software respecting those, but that ship has sailed, so we're stuck with QWERTY as a keyboard layout (or whatever your country collectively uses; FR, DACH, etc), x86 as an architecture, and TERM as a variable.

comment 2y ago · link · parent

This, but set closer to 200 or 100 ms (and for me, swapping the translate 8 and 18 so that the switch barely moves on mouseDown, because that's damn close to a real switch's behavior). This seems like it could be a good compromise to all of the people complaining about lag and others who understand that the visual system is powerful and movement is a huge part of that. Also, it's relatively simple as far as CSS animations go!

comment 2y ago · link · parent

If anyone at Lenovo reads this thread, test and fix your EC firmware---both earlier and to a higher standard.

The support forums constantly reveal EC-realm issues: suspend broken, lid switch screwy behavior, odd interrupts causing battery drain, holding power 10 seconds does not work during some hangs, keyboard stops working (even in the BIOS tests in some cases), long startup, keyboard beep setting is ignored, changing settings via /proc/whatever does not always persist, and the list goes on.

Every BIOS update has half a dozen EC-related "fixes", so it's clear that problem discovery and reporting is left to the customer. So many Linux desktops run 6.6, 6.7, 6.8 totally fine, which to me suggests a problem involving addition of a battery, low-power states, and the controller tying all that together.

I will never buy another modern ThinkPad. It has cost too much of my productivity figuring out problems that should crop up in internal testing and never, ever reach the customer. I was able to find (and document) ten showstopper bugs in the first week of owning the damn thing!

comment 2y ago · link · parent

^ Sheet music is the only use case I've ever had for portrait mode on a laptop.

comment 2y ago · link · parent

I'm a Vim user so I'm constantly pressing Ctrl, but I press it with the edge of my palm.

Something like Ctrl+R, -T, -Y, etc. one-handed is extremely uncomfortable using a pinky (either rotate your hand to use the thumb or stretch your whole hand) or crossed-under thumb. When palming Ctrl? Any of those combos is just another keypress to me---more natural than capitalizing a letter.

If the corner key were Fn, I could no longer just palm Ctrl, and that does not sit well with me

comment 2y ago · link · parent

The ThinkPad Z13 comes with Fedora---at least in Europe.

comment 2y ago · link · parent

Lenovo also ships Linux laptops, although their Linux team needs the ability to veto hardware choices that were made in support of Windows. (I wonder if the XPS team can choose their hardware; my developer edition XPS was rock solid.)

Lenovo's Linux team seems to use up a lot of their QA/support resources because they are handed a dozen new laptop designs each year with (for instance) a MIPI IPU6 webcam having no kernel driver, S0ix suspend broken at the EC-level, new types of forcepads and trackpoints and touchscreens and styli and soldered on Wi-Fi card with a track record of crashing in Linux... and told to figure it out.

Plus, I think they occasionally get sidetracked by stupid bullshit like getting the boot logo to not flicker moving from BIOS to Plymouth.

Also, they maybe should have pushed really hard on AMD (and possibly Qualcomm and their BIOS supplier) for having _multiple_ kernel releases that reached the stable "updates" on non-Rawhide Fedora that then broke suspend on several ThinkPad models. Bisect. Blame. Revert. If Linus used a newer AMD ThinkPad, some choice words would have landed on the mailing list.

comment 2y ago · link · parent

I wonder if Lenovo is using this as a path to debugging one ThinkPad using another:

https://www.intel.com/content/www/us/en/developer/articles/t...

---

Update: probably.

https://www.youtube.com/watch?v=ExUvQa_jB7c

(Debugging Intel Firmware using DCI & USB 3 0)

comment 2y ago · link · parent

I have no earthly idea, but WSL2 is known[1] for its snail-like cross-platform file transfers. Some of my colleagues install MSYS2 in parallel with WSL2 so they can sync our nightly much faster but still not have to jump through all the hoops of getting our proxy, certificates, network shares, etc working in MSYS2.

I use the extra time waiting for WSL2 to get a coffee.

[1] https://github.com/microsoft/WSL/issues/4197

comment 2y ago · link · parent

From the changelog:

  nautilus
  ========
  - Added extra tentacles to confuse AI-generated blogs

comment 2y ago · link · parent

The other half of this (the "Most decisions will be easy" part) is knowing rough odds.

Four to a flush on the flop? One in three chance of getting it. If a lot of people are in the hand and the flush looks like it would be the best outcome, stay in.

Same with an open-ended straight, and you should know whether others could have a better straight draw than your own.

If you see a bunch of random crap on the flop e.g. no straight draw or flush draw or high cards? If you have high pocket pair or two pairs, get aggressive as everyone else is either drawing (and you want them under the profitability threshold of 3+ other players in the hand) or playing a hopefully lower pocket pair or very ill-guided low two pairs (so watch the big blind or historically loose players).

You can usually calculate in your head how many of the unseen cards need to be somewhere to beat you: Suppose I have the best two pairs on an otherwise unspectacular board. My opponent needs a pocket pair to beat my hand. I have 8 opponents, usually a pocket pair is dealt 6% of the time. Even if I sum all the percentages---mathematically wrong but worse than the truth---it's less than 50% chance SOMEONE has been dealt a pocket pair, so I don't have to feel bad about staying in.

If you can do this quickly and make it look like you are acting impulsively or inexperienced, more money will bet against you.

comment 2y ago · link · parent

There's also the psychological aspect of continuing to play in those soft games even when the other players know they are losing.

A guy I dealt to for years was known at the table as Hillbilly. He had a manner that just disarmed some other players. He wasn't an amazing player, but he was a lot smarter than most people assumed, and you wanted him at the table because he was fun to chat with and you thought you could beat this disheveled, ol' country boy.

When you lost to Hillbilly, it was just bad luck. When you won, it's because he's a simpleton, of course. But somehow, he always had a pretty big stack of chips in front of him.

A lot of pro players have this edge, too; just the right personality to get other people to believe their superiority, ignore their discipline, and "go on tilt" (make suboptimal decisions)

comment 2y ago · link · parent

Tantalizing: something you really want but probably cannot get.

...named after Tantalus, the son of Zeus who was condemned to stand in water under a fruit tree, but the fruit and water were always just out of reach. He had a daughter, Niobe, and son, Pelops.

Tantalum, the material, was named because it could not be easily dissolved in any acid, unlike most other metals. Despite knowing of the element's existence, researchers could not isolate the chemical in tantalite samples for decades, as it was always bound to this other material---later called niobium, although one guy thought there were two or more other metals and wanted to call the other one pelopium. Nope; all niobium!

Sadly, tantalum became something of a semi-professional metal outside of capacitors, and even there ceramics and aluminums are preferred for one reason or another---usually cost. It was good for bulb filaments until tungsten displaced it. It was great for fountain pen nibs but not as great as iridium and osmium. It doesn't help with alloying because it embrittles. Other biologically inert materials are usually chosen over tantalum for implants. It could be a refractory ceramic but tantalum carbide is not as heat resistant as hafnium carbide.

It also has weird nuclear properties, where someone will probably look back in a the distant future and remark, "damn, that awesome commercial application of nuclear tantalum evaded us for centuries! What a fitting name!"

I never connected until just now that I should probably avoid breathing in any of the magic smoke when a tantalum capacitor explodes.

comment 2y ago · link · parent

I wanted to test this and found a surprising result, although with shuf instead of tail...

  ( head -n40000 filelist_h.txt | grep 'v\|$' >> /dev/null; )       0.00s user 0.02s system  43% cpu  0.045 total
  ( tail -n40000 filelist_h.txt | grep 'v\|$' >> /dev/null; )       0.00s user 0.01s system  22% cpu  0.066 total
  ( shuf -n40000 filelist_h.txt | grep 'v\|$' >> /dev/null; )       0.71s user 1.37s system  12% cpu 16.874 total
  ( cat filelist_h.txt | head -n40000 | grep 'v\|$' >> /dev/null;   0.00s user 0.01s system 101% cpu  0.017 total
  ( cat filelist_h.txt | tail -n40000 | grep 'v\|$' >> /dev/null;   0.05s user 0.45s system  54% cpu  0.930 total
  ( cat filelist_h.txt | shuf -n40000 | grep 'v\|$' >> /dev/null;   0.60s user 0.91s system  96% cpu  1.565 total
The results are fairly repeatable:

- as expected, head and tail alone are equally quick alone

- shuf is ridiculously slow due to overhead compared to cat | shuf

- cat | shuf is just a bit slower than cat | tail.

- cat | tail is slower than tail.

- cat | head is faster than head (but only because of overhead)

Caveats are that this is WSL2 and the file is 480 MB (5 million lines) in a mounted Windows directory, although that helps magnify that slow I/O can influence how you pipe commands.

comment 2y ago · link · parent

infinite loop in C:

  for(;;){
      // loop body here
  }

comment 2y ago · link · parent

I base this on my day-to-day messing with firmware for some Arm microcontroller implementations, and it is only a guess that PC would be similarly affected and only affecting latency, not throughput. But, in this specific case, I don't know.

I only learned enough to buy some and put it in my last build, and I've only gone as far as checking that dmesg says the memory bus is 72 bits wide; no benchmarks, no overclocking. Then again, my goal is stability and not performance.

1
456
17