Better HN
topnewbestaskshowjobs
Log inSign up

PennRobotics

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

Submissions

comment 1y ago · link · parent

My Z13 most definitely was defective, although after seeing a few similar cases, I wonder if they had a bad batch or if that was just an unstable platform. Even after getting it serviced (which was a joke, because they don't diagnose Linux machines at the service center even though Lenovo sells them) nothing improved.

Strangely fortunate: it got stolen in Dublin and was covered by insurance.

comment 1y ago · link · parent

"Awful" would be a kind description of this keyboard. The bottom two rows are aligned, which is the new anti-ANSI laptop trend. Page up and down are now Fn keys. Insert is a function key. PrtSc is long gone. F key font is miniscule. F keys are no longer grouped (unless you count that tiny fillet as a grouping). I'm willing to bet they still haven't added Alt+MicMute as an alias to Alt+F4 (since virtually nobody in the history of computing has needed a keyboard modifier with the MicMute button). Delete is awkwardly wide. Control is sunken in so you can't press it with the outside of your hand anymore. Up and down arrows share one over-wide key. These look like low-travel chiclets. Of course it has Microsoft branding.

I'm willing to bet the ISO variant of this machine is even dumber, with that key that rides right up against Enter.

I hate the Trackpoint. I shed no tears if it goes. It isn't a pleasant experience in Linux and doesn't save any time over keyboard and touchpad, and the entire subsystem is just more crap to debug and waste energy. On the other hand, the ThinkPad keyboard is the only laptop input I consider decent for heavy terminal use and programming.

...as far as copying Apple? At least Apple had the decency to ditch differently sized arrow key pairs. Unless Lenovo offers large gamut IPS or more than 2 watts of speakers or anything at all special, this is "just another" PC laptop.

comment 1y ago · link · parent

I owned a Z13 Gen 1 and it was a horrendous piece of crap. I constantly had crashes, hangs, faulty suspend, keyboard problems, dock problems, audio problems, and so much more from the very beginning.

I very reluctantly purchased a X1 Carbon Gen 12 and am much more satisfied with the Linux implementation.

comment 2y ago · link · parent

Awesome! That's my reading material for the next week.

Now I wonder if MISC.EXE and xGRAPHIC.EXE were the same across different games e.g. Covert Action vs F15 SE2... (I just checked. MISC is different. Some routines are nearly similar, but newer versions have additional machine code and updated strings.)

comment 2y ago · link · parent

Some of the early Microprose games used this, and it was clever for two reasons:

First, more functionality. The minigames and intro/conclusion scenes were their own executables that made use of the original, generated game data. These got loaded into RAM on top of the original executable and then called.

Second, graphics and sound were also overlays. Rather than having useless-to-most Roland MT-32 code in the binary, this was only loaded if requested. There were overlays for Sound Blaster, PC speaker, and Adlib. If your monitor only supported four colors (CGA) there was an overlay for that.

A post would be nice, although you basically described most of it. An .OVL file with a non-zero overlay number is loaded into memory with INT 3Fh (although strangely enough any interrupt number could be chosen?, and the interrupt also would call the desired function after loading into memory). These overlays are loaded as-needed into a shared memory space.

I'd be more curious to see how one would have programmed those overlays in Microsoft C Compiler 3.0. More recent compilers seemed to have better menus and documentation for the memory models, but it seems like they were clairvoyant by squeezing every bit of functionality out of version 3.0 that was made easier by Watcom/Borland/MS 5.0. (Then again, they would have evolved their build system with every successful release and every new hire, plus it was their full time job to "figure that crap out", and maybe Microsoft improved their approach to overlays in response to Microprose and others calling all the time)

The documentation states only one EXE is generated, but Microprose had multiple EXE files. Is it possible those weren't overlays but something very similar? Or did they just change the file extensions? The docs also show the syntax "Object Modules [.OBJ]: a + (b+c) + (e+f) + g + (i)" where everything in parentheses is an overlay. But this isn't elaborated. What are the plus signs? How are these objects grouped? Would their list look like "preload + (cga + mcga + ega + vga) + (nosound + tandy + pcspkr + roland + sb) + (intro) + (newgame) + (maingame) + (minigamea) + (minigameb) + (outro)"? Or would every module be individually parenthesized, and those with plus symbols are interdependent (e.g. not alternatives)? (One website using BLINK seems to suggest the latter.)

I know there are a lot of DOS tutorials (FreeDOS YT channel, blog posts) but I haven't found one that does a start-to-finish overlay example.

comment 2y ago · link · parent

There are a few things that helped me or someone I know to understand some concepts:

e: Hot/cold stuff passively reaching ambient temperature (why does it get colder quicker right at the beginning but so slowly at the end??) as well as the time constant for capacitors (which you could analogize with how long it would take for water to drain out of a broken dam: quickly at first, slowly as the water level decreases)

integrals: My brother designed a boat that he would build. He wanted to know how much volume it would displace until water would spill inside. The walls were not straight nor right-angled. Using the slicing method and estimates of "this is somewhere between an oval and rectangle, so the area of this slice will be between those shapes", he was able to figure out the ballpark volume.

derivatives, and this one takes a LOT of care to avoid confusion... position, velocity, acceleration. I would start with straight distance examples, but it's also cool to note: On a Merry Go Round, the rider's acceleration would only be toward the center if the rotating speed stays the same. It has to! If it were even a little backwards, you'd slow down! If the Merry Go Round were wider, the acceleration would be not so strong. If the Merry Go Round were so wide that it's impossible to tell you are spinning, there would be nearly no acceleration.

When you drop that ball from a window, gravity is its acceleration. Gravity never changes its direction or gets stronger. That is intuitive. The velocity will keep getting larger, but at the same rate for a while (until real life interferes aka drag). The position, you can plot that and see that every second it is a farther interval. That also makes sense: A ball thrown upward doesn't bounce off the air at the top and come down right away at the same speed. It hangs for a brief moment. But it doesn't hang anywhere else after its peak because the position is the second derivative of acceleration, and that second derivative only has one point where it stays nearly the same for a brief moment.

It might not stick for everyone, but you can explain that 6 dB is always "twice as loud". Thus, 12 dB is "2x2 times as loud" and 18 dB is "2x2x2, or 8 times, as loud". The dB amount is always addition, but the "as loud" part is multiplied.

Similarly, every 10 to 30 years (usually about 20) the value of money drops in half due to inflation. You're adding years but multiplying or dividing value. That lets you know that there's a power/logarithmic relationship.

One other concept is more useless but fun for me... There's product-over-sum. It shows up in "how long does it take N lawnmower pushers of varying efficiency to trim so-and-so acres of lawn?" (If Joe does a lawn in 20 and Jake in 30, they do it in 12 together.) but also in things like parallel resistance. In this case, I tend to think of the electrons as the blades of grass in the lawn and the resistors as lawnmower pushers. The electrons don't care who "trims" them, and whichever resistor becomes available to process an electron (at its own given efficiency e.g. conductance/anti-resistance) will do it.

I am a big fan of the Street Fighting Math series from MIT, but I feel like there were much better resources for explaining the concepts (e.g. videos, lectures) than I can find today. The book is not as approachable as the concepts themselves when explained at an audience-appropriate level. The only downside it its lack of general practicality, but it does move some advanced concepts into the napkin math domain.

In one part, Dr. Mahajan shows that because the derivative of the LN function is very close to the derivative of x at 1 (that is, 1), you can approximate powers close to 1 by subtracting 1 to get them into the log domain and multiplying by their exponent. This probably doesn't make sense, so I'll solve an example from the book...

"If 5% of bacteria are mutated during a radiation round, how many bacteria are unmutated after 140 rounds?"

You can eventually figure it will be (.95)^140 by starting with simpler examples (all heads in two coin flips, three coin flips). Once you have the equation, it means that you can approximate its answer by subtracting 1 and multiplying by 140: -0.05x140 = -7. The answer would be quite near e^-7, which is 0.09%. (Beyond that, if you recognize that e^-5 would be five time constants e.g. just below 1%, then e^-10 is 1% of 1%, so then e^-7.5 would be the halfway point; somewhere below but also close to 0.1%.) The right answer is approx. 0.08%.

An actual game that is engaging and shows one math concept (probability/statistics) in-depth? Dope Wars. The entire thing runs off random chance and expectation. You could probably even simulate the outcome of various strategies over many simulations (the same way that a decent investment recommendation would be a percentage of bonds/cash equal to your age with the remainder in stocks)

Even stuff like Pythagorean Theorem isn't as important to an everyman as its moral. "If you cut through the grass, it's less walking." This also extends to the value of social networks (Metcalfe's Law) or understanding why a small bump in speed limit takes a relatively large increase in gas consumption (Ignoring wind resistance, kinetic energy is proportional to v^2, so going 55 mph takes roughly the same energy as someone going 50 plus someone else going 23.)

comment 2y ago · link · parent

This. There's a lot to be said about understanding registers and assembly and different languages and how a USB packet is constructed, but efficiency in reverse engineering comes down to effective pattern recognition.

A binary is likely to have a reasonable amount of often-called code for memory operations (memset, memcpy, strcat, strlen, sscanf, log) and a lot of library code (Flexcomm_Init, Clock_AttachClk, SPI1_Handler, NVIC_EnableIRQ) and then probably fairly little actual application code. For Ghidra users, being able to ignore the boilerplate (mem and BSP code) and quickly find and analyze the application code saves a TON of time.

(Conversely, if I know a binary is written using FreeRTOS, finding the task creation function would be my first step, as this reveals nearly all of the application code.)

There are techniques to help (setting a flash memory region as non-write so string references are recognized and disassembled correctly, loading a chip SVD so all the library code is more obvious) but those come with experience or a good hands-on tutorial, and they still won't tell you everything about the application code.

In my own breakdown of one Cortex-M binary (bare metal, no objects known) the only reason I was able to get the firmware in the first place was by noticing and decoding a base64 string in an unpacked Electron app used for USB communication with the device. This ended up holding plaintext credentials for their update server which had two channels: one for encrypted production binaries and the other for unencrypted development binaries.

In this specific case, it helped to know what base64 looks like, but that's like how knowing different methods of slicing onions might help you figure out a recipe by tasting a cooked meal. Very often such background knowledge is irrelevant. Once in a while it will be the only realistic way forward.

comment 2y ago · link · parent

> ... key players in security—among them Microsoft and the US National Security Agency ...

This phrase does not sit well with me.

comment 2y ago · link · parent

No.

I recently had a ThinkPad Z13 for over a year. I tried earnestly using the TrackPoint on multiple occasions. It had inconsistent pressure pickup, bad haptics, and poor button integration.

I think I had a different opinion 25+ years ago, but that was an era where the laptop might ONLY have a TrackPoint, and its design was intentional---not an afterthought like the current gen.

In fact, one of the main selling points (reducing wrist strain) doesn't apply to the Z13, because the cold, hard, right-angled aluminum edge of the case digs into your wrists the longer you keep them in the same position.

comment 2y ago · link · parent

This looks awesome for music recording as well. Connect to a fanless USB interface and you'd be set for totally* noiseless recording.

* assuming no coil whine or PSU clicking

comment 2y ago · link · parent

* Packet sniff a Windows-only consumer USB/Ethernet device and implement its communication into a Linux and/or mobile device client. (Ideas: audio gear, smart kitchen/coffee appliances, smart lights)

* Create a Docker image (plus ideally a GitHub Action or AWS Lambda) that will build and publish microcontroller binaries using some major vendor's board support files. AS FEW SETUP STEPS AS POSSIBLE is the goal: Upload "main.c" to a template repository (or attempt to compile and link all .c|.h files in the src folder) and a few minutes later, "out.elf" is the output artifact.

* Implement a data browser (or editor) for some abandoned but popular (or personally nostalgic) video game. If this step was easy enough, write a new game client in a modern engine. Props if it works in WASM. If reverse engineering is not forbidden in the EULA (or you are ballsy in your interpretation of your country's laws) release the client, source and/or a fully novel and functional (using the original binary) set of game data publicly.

* Write programs for a reasonably new protocol such as MIDI 2.0. Bonus points if you specifically copyleft it, but that won't stop Behringer from using it without attribution anyway.

* Link a QEMU (or Fast Model) emulation of a specific microcontroller (e.g. STM32F4) with an interactive circuit simulator (such as Falstad). This would need to include at least GPIO and timer subsystems on the MCU side. I think this would be the hardest practical project from this list but would generate a ton of research papers if successful (balancing resource consumption and accuracy as you approach real time; getting 2+ independent simulations to communicate with one another; improving power consumption estimates for a complete embedded system simulation) plus identify a lot of future work (a Falstad protocol analyzer widget, a Falstad SD/SPI flash storage device).

* Improve existing tools: write a Ghidra or KiCad plugin, add new file types to binwalk, etc. One example for Ghidra would be auto-detection and naming of FreeRTOS functions which could be later generalized to other RTOSes/compilers/architectures/preprocessor (FreeRTOSConfig.h) settings.

* Try to improve dead reckoning performance of a mobile robot using its sensor data (perhaps without GPS) under heavy vibration, crosswinds, uneven/sloped/slippery terrain, and any other conceivable interference. (This can be a nice data-heavy AI/ML problem, but a lot of intelligent people have already explored this particular problem.)

* Create a website, documentation, and community presence for any of the aforementioned projects.

* Figure out any improvement to the state-of-the-art in efficient cardboard box packing/nesting. This is vastly explored, but new constraints (e.g. load from back with gravity, contents are not convex, strength/weight is now a factor, effort required to repack a partial unload after a "sea journey" or "intense truck driving") make it possible to break existing algorithms. Success here = PhD-worthy accomplishment and potential to commercialize, plus a pigeonhole for your academic career as an advisor

* Figure out if there would ever be a way to make internet hyperlinks bi-directional. That is: removing a served page should notify all known domains that link to the newly removed paged to remove their link, and if one of your own link targets is no longer found, automatically change the link target to archive.org. Could this be implemented into all the major FOSS web servers on an opt-in basis? Then, a web developer should expect their links to almost always work despite the actions of the linked domains. What are the strong reasons this should not happen? (I would start with "what are trusted domains" and "abuse potential" and "cost of computing/network resources")

(Finished editing)

comment 2y ago · link · parent

PowerToys can be counterproductive.

Consider Ctrl + Space in Windows Explorer. For literal decades, it has been the method for selecting multiple nonsequential files. Now it is the default shortcut for the Peek file preview window. But it doesn't have the title PowerToys or Peek. It's just the filename of whatever gets opened. So now you have two problems: figure out why you can't select multiple files in Explorer like you did last week and last year and ten years ago; and figure out how to disable this mystery preview window so it doesn't keep happening.

Hopefully the first time you discover Peek, you aren't trying to delete a subset of sensitive documents in a shared space without using the mouse. But that's okay; the lead dev states PowerToys is an incubator, and that justifies enabling new features by default, so sensitive files should get previewed using Ctrl + Space without warning! (Only that last part is mine.)

The tools are too opinionated for the amount of productivity they claim to provide. (Yeah, even Quick Accent. I'll stick with my insecure AHK script. At least it only activates when I ask for it.)

comment 2y ago · link · parent

Damn. I used to order metal parts from them. It was nice quality and far cheaper than owning a metal printer

comment 2y ago · link · parent

One of the Turbine devs shared that Asheron's Call (an early MMORPG) was intentionally not released in major outlets at first so they would not scale too fast. This was perhaps wise, the first few months were largely---and remarkably---free of network and load balancer problems.

comment 2y ago · link · parent

The mics look like Shure MX415DUAL

comment 2y ago · link · parent

Even on Hetzner, it's not amazing and not a one-click workflow.

Load their Photoprism image on a standard server with only IPv6 (as a v4 address costs extra) and certificates will not get generated; logs point to Traefik although the solution is modifying Dockerfiles; thanks Dockerphiles, for insisting your software is the answer to everything server...

comment 2y ago · link · parent

My brother had a strong dislike for math that wasn't immediately practical. He ended up understanding integrals (at least numerical approximation) after building a small boat and needing to calculate how much air it would hold: obviously less than the containing rectangle, more than the contained rectangle; and then he figured out you can split the boat into sections and get a good guess of each section's volume, move from rectangles to trapezoids, etc.

comment 2y ago · link · parent

Quick and clear explanation: https://css-tricks.com/leading-trim-the-future-of-digital-ty...

comment 2y ago · link · parent

because sometimes one missing pixel makes everything look awful:

https://stackoverflow.com/questions/11419541/how-can-i-get-r...

comment 2y ago · link · parent

To better understand how people might get confused... Imagine a room 9 feet <insert your favorite unit of measure> long and fans 2 feet in diameter. If you put them with bases equally spaced—3 feet apart—you get a gap 2 feet between the wall and fans… but 1 foot spaced apart in the middle.

Naively, you move each fan a half foot closer to the wall. This makes the gap 1.5 feet to the wall but now 2 feet between each other. (You might find ways to argue that this looks better visually than the true answer below, and that depends on a lot of perception-altering factors including how low the fan hangs from the ceiling, amount/ratio of space available, the distance from the non-perpendicular walls, and light sources as they might cast shadows with different sized gaps on the ceiling.)

You need to take the total room length and subtract the fan diameters, then divide that by 3. (So, 5 / 3 = 1.667 or 1'8" from wall to blade tip.) Thus, each base should be 2.667 feet from its nearest wall. This makes a gap 1'8" between each blade tip:

20" space, 24" blades, 20" space, 24" blades, 20" space = 108" (9 ft) room length

Bringing this around to the theme of web design, this is akin to space-between, space-around, and space-evenly in justify-content[1] (except there isn't a "space the center of each element evenly" selection, except maybe stretch or nesting everything in another flexbox)

[1] https://css-tricks.com/snippets/css/a-guide-to-flexbox/#aa-j...

comment 2y ago · link · parent

Shoutout to all those people unwittingly taking high-def pictures and videos of their fingertips and then just sharing those with the entire world.

I hope you don't use your fingerprints for anything remotely sensitive!

(Addendum: You can always change your signing key.)

comment 2y ago · link · parent

or 30 percent if you use economic boundaries

comment 2y ago · link · parent

Big snowflake(s), medium snowflake, small snowflake on the dial. All embossed, of course.

Arrow/tick mark on the panel.

The bonus is this works in all temperature scales and language systems and probably includes most perception disabilities---blind, dyslexic, illiterate, etc. But I could still imagine a handful of people messing this one up.

(Also, if the thing has an off mode... how do you mark and emboss that? A giant X? Well that looks like a snowflake, especially to your fingertip! A zero? A small horizontal line? Or, probably best, just a separate on/off switch...)

comment 2y ago · link · parent

Plus, at -O1 and up, gcc optimizes this away, so the check itself is not well-defined as necessary.

Does it always make sense to strictly enforce code that will be optimized/changed during compilation? Or does Xr0 run after compilation/linking?

How to handle things like unions where you want data in a nice mixed-type struct that is used locally and can also be sent as a stream of uint8_t over a wireless connection? Then, the last function that needs to use the memory frees it. Or is that still fine as long as you malloc once somewhere, free once somewhere, and annotate that the memory region will be accessed as more than one dereferenced type?

Much more important: Will the proposed changes be understandable enough for your average CS undergrad to learn in four months of halfway diligent study? (Then again, you might do away with students taking time to debug improper malloc/free and whatever else falls under the scope of Xr0...)

comment 2y ago · link · parent

just a guess: Illegal Electronic Surveillance

more of a guess from the below link?

18 U.S.C. § 2512, which prohibits the manufacture, possession, advertisement, sale, and transportation in interstate or foreign commerce of devices that are primarily useful for the surreptitious interception of communications

(although is this a hardware-specific prohibition?)

https://www.justice.gov/archives/jm/criminal-resource-manual...

comment 2y ago · link · parent

Imagine: If Microsoft pushed so hard for Modern Standby and even THEY cannot get it right, why should you trust any laptop designed for Windows to have proper power management?

comment 2y ago · link · parent

I had suspend problems until 6.8.0. Now I have 100% CPU usage by bwrap and still occasionally green glitches on the screen. Not impressed with my thinkpad...

comment 2y ago · link · parent

Last post can't be edited.

I got done loading a Nextcloud image and it works fine. It's also a different base server and configured differently, and it has IPv4 without extra cost. The only issue so far is that ffmpeg is not detected by Memories so transcoding cannot be enabled, even if I install the only app related to ffmpeg, "Automated media conversion." I'll have to keep reading to see if that's the right app. The server is managed in a way that I can't ssh or change anything Docker-related. I can only log in to Nextcloud at a given URL, so I don't know how run commands from the documentation such as "occ ..." With enough time, I can search if this is usable or not.

It will take probably 20 or 30 minutes to figure out running commands and if ffmpeg can be installed/accessed. I've already committed an hour to this platform even before uploading a single ARW, although I'm already farther along than I was with Photoprism...

EDIT: 24 minutes. I can run occ commands. I can't install ffmpeg. Many others have the same well-known problem: no video thumbnails. Oh well, not a dealbreaker.

comment 2y ago · link · parent

I, for one, am sick of "just run the Docker image" as a deployment strategy and the be-all end-all of support. On my last attempt at serving a photo gallery, I deployed Hetzner's Photoprism image on a Hetzner server... and it failed. You would think such a thing would be bulletproof! They don't tell you an IPv4 address is needed and the log does not indicate anything is wrong other than Traefik has problems connecting to the certificate server.

If something doesn't work—regardless of how unhelpful the report or oddly configured the deployment machine is—I would love to hear about it so I temper my own expectations before trying it myself.

While I sympathize with the developer whose product is popular enough to collect 1000 issues as of two days ago, some of your many thousands of users can also get fatigued by spending resources (time, money, mental effort) on deployments that fail because the machine and network running Docker is still different enough from yours that issues arise.

My Hetzner Photoprism bug report has been sitting unanswered for two weeks. Getting the log data and trying out different DNS configurations and writing the bug report took a few hours, because I had to SSH into the Docker image and run curl verbosely and figure out which of the five docker-compose elements was causing problems; running Docker and setting up servers isn't my day job. I don't feel like paying 25 bucks a year for an IPv4 address and don't really want to figure out how to get Let's Encrypt to work on Hetzner's IPv6 by manually adjusting the Docker Compose configuration. I thought that's the point of Docker Compose: that you wouldn't need to dick around with it to get it working. I'll probably delete the thing and replace it with something else—potentially Nextcloud as there's no preconfigured Immich image. So, you know... expect my Memories bug report in a few days.

I can't imagine this user's complaint was fabricated from thin air. Rude or not, they are having problems with the thing you made. Make a mental note, "at least some small percent of users are still having issues, in this case no clear root cause, probably a small enough population to ignore, maybe one day further reduce the friction for reporting bugs or find a way to gather more detailed info." Maybe put them in their place if they actually attack you personally or actually have no useful information e.g. "Product Sucks!!" but beyond that, I (as a potential fellow user) find these not-very-dev-helpful reports insightful, as there are two dozen competing FOSS photo storage programs and I want to efficiently figure out which application has features I prefer, is actually stable and easy to deploy, not likely to switch licenses going forward, has a clear goal and steady progress, documentation is well-written and not just a "Brothers Karamazov" dump of one developer's stream of consciousness, etc.

Should I take two or three hours to file bug reports for each of the 20 photo albums I'd consider testing instead of spending time with family or practicing music? Maintainer fatigue is no joke, but it's also a burden on users if the software does not run, and they've already sunken some opportunity cost, and then not every user knows how to be kind and helpful through their frustration.

Anyway, your reaction is valid. I hope you keep working on the project, but I'd also be okay with not having so many different FOSS options and still no clear winner.

12345
17