932 karma · joined Sep 18, 2020 (6y ago) · 485 submissions
comment 5y ago · link · parent
I can't see the writing. We're learning OpenCV, but I never learned Python. I think my paper was graded incorrectly. My dad passed away, so my coursework is suffering. I should've been in the acknowledgements in my lab's paper. One of my group members is useless. My lab partner smells... like, a LOT. So-and-so keeps taking our oscilloscope. Our workspace is too cold. The professor always calls on women (or Indians or the front row). Why do all groups need to bring a vegetarian option to their presentation but the group with the vegetarian doesn't need to bring meat? The Greek groups all share old exams with each other but not with anyone else. Why does the department need to find a minority instead of just hiring the most qualified applicant? Why can't people just let personal insults roll of their back if their research work can stand on its own?
People from a ton of cultures and backgrounds are jammed into one institution. Of course there will be friction, and it shouldn't be the job of the university president to tell a chronically offending student to only take one slice of pizza at the Friday research talks and go back in line for getting seconds. Also, everyone has a different opinion of what "a big deal" is. Thus, for the sake of everybody and everybody's academic and social development... just be cool. Be reasonable.
comment 5y ago · link · parent
Although, you seem to make a good point. BMI differentiates radio royalties by number of performances[1]. Except---and I haven't researched this very well---they seem to pay more if a song is more popular.
comment 5y ago · link · parent
* Heavy users get too much of a vote. In effect, they decide where money from less active subscribers goes, even if everyone pays the same.
* Specialized or niche content struggles to earn real money. Everyone goes for the big hit.
* It is vulnerable to click fraud. You can control more money than you paid, just by downloading lots.
What they suggest, paraphrased:
If you stream 10 items, each item earns 1/10th of your total usage e.g. each gets $1. Taken to an extreme, if you only stream 1 song, then that artist gets the full $10.
-----
How then, does this model seek to pay artists based on users who aren't paying?
comment 5y ago · link · parent
Programming is not prose, so we can temper our expectations. *
Even in prose, some symbols belong on the left, and some belong on the right. *
The example given is no less readable than the alternative. *
It's more important to be consistent in style than correct to one person's opinion e.g. some people still batch edit source via macros and appreciate when curly braces are not in unexpected places.
comment 5y ago · link · parent
If office hours was an hour long, students come and go for an hour with questions plus some overtime duration of extra clarifications. If office hours was four hours long, students come and go for four hours plus the same bit of overtime. With no bookend between office hours and everything else, students would beg for one more question and push the boundaries of the open-door policy.
In their eyes, the instructor who slams the door in the student's face because, "It's two o'clock, I need to work," is impolite and insensitive.
Putting an unavoidable, important meeting at the end of office hours suddenly put the burden of being impolite on the students. Suddenly, office hours became more efficient and students, more punctual. The professor was no longer so unbelievable cruel for ending the open-door session (gasp) on time. And, most importantly, research could get done at a normal hour.
comment 5y ago · link · parent
A plot of Case Fatality Rate would go down over time as the number of cases goes up. A somewhat related, slightly confusing example is cumulative deaths on a log plot. A handful of people would look at the line without much focus on the axes or title.
A plot of Covid deaths by age group could make it more likely that young people engage in riskier activities, since it downplays the risk for "most" people---well, except someone else's grandparents who were gonna die soon anyway.
And, in the WTF category: https://images.theconversation.com/files/330304/original/fil...
comment 5y ago · link · parent
All the way to 1024 is autopilot by just keeping small numbers out of the bottom row. Then, the thinking begins---plan each move to keep the 32s, 64s, 128s on the same edge of the board until you make an inevitable mistake or have bad luck working in the remaining 2x4 or 2x3 section. This last section is where your analysis algorithm would really add value. Plus, using just three directions until it's time to condense large blocks should reduce your computation a lot.
Do you think regular use of all four directions is necessary to get more consistently to higher values like 16k or 32k? (Actually, is 32k possible?) I feel like once you have most of the blocks on board to get to 8k except for perhaps one 256, you can't really have a random 2 or 4 in the corner or it's Game Over in 10 moves or fewer. Moving in the fourth direction makes the 'corner small number' a guarantee when the board is filled like this.
Playing all large numbers on the bottom also means you can calculate an optimal play (using the smaller numbers) in small (2x3, 2x4, 3x3) regions as long as the result comes out at the same grid location consistently---near the smallest large number.
Then, optimization of the large numbers becomes a separate problem. Do you put everything sequential in the bottom row?
4096-2048-512-128
Or do you put high values at the ends?
4096-128-512-2048
Or low values at the ends? (This is not the answer. Getting a medium value from one end to the other---consistently---without messing everything else up is not probable and probably not possible.)
Or should the high values make a wedge along two sides?
512
4096-2048-128
In summary, I don't think trying to solve the full state space makes sense. This game feels like two separate isolatable optimization problems---small and large numbers---plus a little bit of glue when the isolation breaks down: starting a game, fixing a stuck situation, or collapsing a series of large numbers.
Have you thought about using your worst cases to find rules to make Evil 2048 even more evil? Or see how an MDP works against Evil 2048 to get the best outcome in worst case scenarios?
Oh-- Great article and analysis, by the way.
comment 5y ago · link · parent
There are probably tens of millions of people and ten thousand MIT graduates who love and study physics more because of Walter Lewin. Does that justify the ways that he was abusive or morally ambiguous? Hell no!
Despite the controversy and very public cancellation of Prof. Lewin, his lectures are my top recommendation for studying introductory physics.
comment 5y ago · link · parent
The author, Rod Nave, is old, possibly retired, and probably self-taught in HTML 3.2.
Image maps were the modern tech in the years after Fulton County started pushing internet to residents---1995 or so. I don't remember there being any alternatives at the time; CSS was mostly supported by many browsers, but div tags weren't in widespread use.
For a non-programmer, it would be a herculean effort to learn and transition existing material to a new technology, and the benefits might not be obvious to someone focusing on teaching physics to 100 undergraduates most of the year and seeing the widespread, positive impact of the current implementation.
comment 5y ago · link · parent
Hearing Google Assistant/Maps mispronounce German street or city names in an American accent is very grating to the ears. The pronunciation of a location name should ignore the language spoken, right? (Ignore for a moment the edge cases, like München vs Munich... although the voice says, "Munchin'," which is wrong in both languages!) And it can't be too complicated to borrow phonemes from another language where they don't exist... Right? Your American text-to-speech algorithm encounters an umlaut, then generate the correct waveforms from a language with umlauts.
(I'm sure someone reading this is jumping up and down, yelling about the "photo of a bird" xkcd.)
comment 5y ago · link · parent
I guess this is exactly what we're talking about---mistakes because you are not natively familiar with a particular system, and then you miss the non-base case. For me, I got the tens digit right but not the ten thousands digit.
In the memory case, it's knowing to change a pointer location because an address to a 32-bit value will start or end at a different address than a 64-bit value.
comment 5y ago · link · parent
-----
At least for me, reading 16- and/or 32-bit multi-channel sensor data and then transceiving via 8-bit radio (atmega32u4) is at least a little easier when all the endians align. No byte swapping. No jumping a pointer ahead for each byte in a packet. Most importantly, no calling swapbytes (and its relevant data casts) in Matlab reading the serial data directly off the microcontroller.
While this is all relatively straightforward to code, each extra line is another tiny chance of error, and the failure modes in streaming data are not always obvious e.g. FIFO size is a power of two but channel data is an odd number of bytes/words. Do you drop data or pause until FIFO empties? Do circular buffers increment or decrement?
Luckily, modern sensors (e.g. IMUs) I've used usually have registers to byte swap, drop LSBs when not needed, choose right or left zero bit padding, change channel order, alter FIFO behavior, interrupt at a FIFO threshold, and so on.
comment 5y ago · link · parent
In C, you can have value equality or pointer equality. Then, you have the whole "either write your own character-by-character comparison or learn which libraries to include to compare strings". There's also the detail of remembering what strcmp() returns.
I might be wrong since Python is not my daily driver, but "a is b" and "a in b" and "a == b" and "a == b and type(a) == type(b)" are all distinct from one another.
Javascript has strict equality and equality.
comment 5y ago · link · parent
In Afghanistan, it was common to scan eyes for identification just as it is being done upon air arrival to the U.S.
I understand why reactions here are mixed or even mostly hostile.
At the same time, the headline is quite suggestive and borderline misleading.
comment 5y ago · link · parent
This episode was rock solid.
comment 5y ago · link · parent
The guests themselves make value judgments of whether this polite, motivated, knowledgeable, reasonably boring guy with a sizeable audience and good credentials can help them to spread their own messages without much journalistic pushback.
His audio quality is also not bad.
-----
Personal opinion: The interviews are far too long. I'd like an informed opinion of the best (as opposed to most famous or controversial or odd) guests. If a biology expert told me Lex's interview with Eric Lander was a Must Listen, I'd value that more than, "oh! It's three hours of Elon Musk, but his personal values are well-known and haven't changed."
I would listen to a few very interesting conversations unedited OR a larger collection of reasonably interesting, short, heavily curated conversations. I enjoy hearing about subjects I normally don't encounter, and some of his guests bring this experience. Listening to months of audio to find these gems is not for me.
I prefer a small group of podcasts that have shorter episodes, entertaining/engaging hosts, interesting guests,
comment 5y ago · link · parent
Low Power Sleep
The thing about humans is: they're human. Humans like nice round numbers. They like exactness, even when it is unnecessary. This helps a lot in reverse engineering. For example, what response does the constant 0x380000 elicit in you? None? Probably. What about 0x36EE80. Now that one just catches the eye. What the hell does that mean? So you convert that to decimal, and you see: 3,600,000. Well now, that's an hour's worth of milliseconds. That length is probably only useful for long-term low power sleep. I have lost track of how many things I've reverse engineered where constants of this variety lit the way to finding where sleep is being done!
In this device, the constants passed to the function in question were: 1,5000 2,000 5,000 10,000 3,600,000 1,800,000 0xffffffff. Pretty clear that those are time durations in milliseconds. The last one is probably a placeholder for "forever, or as close as we can get to it"
Here, there was little chance to understand what many of the regs do, as they are only used by the sleep code. Some were in SFR and some were in MMIO space. I was able to copy the code and replicate it. One thing that was interesting was that the sleep timer has two speeds: 32KHz and 1Hz. It is a 24-bit timer, making the shortest sleep possible approximately 30ms and the longest possible sleep around 194 days! More details in the SDK.
-----
If one browses through a disassembly or hex dump of Arm Cortex code and sees C520 and D928 in adjacent blocks, this is 99.9% watchdog-related code for a handful of Arm licensees, mostly Kinetis/Freescale/NXP. Same deal with various NVM or debug port unlock keys.
Plotting the data section of the ODrive motor driver binary, you can easily find the 2048-entry sine lookup table.
I think looking for weird constants is a good idea. Even better is to have the tools at-hand to identify these easier, so hexdump in parallel with ASCII/int/float representations, plot data, automatically look up register names from an SVD as part of parsing I2C/SPI/CAN data streams, etc.
comment 5y ago · link · parent
Good advice at the end plus a link to an unrelated but equally interesting hardware debug/reverse engineer:
Lessons for aspiring reverse engineers
Spend a few hours/days reading before you start doing.
Prior knowledge helps. You'll get better at reverse engineering as you do it more.
Code shape is recognizable. SPI drivers all look the same, I2C drivers all look similar, circular buffers all look the same. Code shape is a great hint about code function.
Assume people who wrote the code and designed the chip are sane (until proven otherwise).
Newton's first law of software and hardware design: without a significant outside force, things will keep being designed as they always have been. Assume most designs are similar, and what you saw before is likely what you'll see again
Defaults are not changed most of the time.
Every bit of knowledge helps eliminate possibilities in other places. When something confuses you, leave it alone and go analyze something else. Come back to this one later when you know more.
Weird-looking constants mean things. The weirder the number, the more meaning it probably carries
Have a theory before you rush to try things. An experiment with no theory is meaningless.
Do try things. A theory with no experiment is pointless.
Take notes as you try/figure out things, since your "trying things" binary will quickly become an unmanageable mess and you'll forget things.comment 5y ago · link · parent
As I'm a MechE before all else, I'd be most interested in structural performance: usability after n strain cycles, resistance to environmental exposure, allowable strain/shear/bending in all dimensions (polyamide, so not much normal strain), heat transport, whether it can be operated inside a fluid/gel, etc.
There are some questions making me wonder what is more likely between an FPGA, Arm Cortex (or other RISC), or a fully nonprogrammable IC being most successfully deployed in a flexible form factor:
How would this be packaged for an end user? Should it be programmable with on-board NVM and a debug port? Or is it programmed with wafer probes during manufacture? What would then be the standard for flexible debug ports? Ideally something easy to connect using automation but (a) small enough to leave on and ignore, or (b) able to be cut off completely for production. Would this still be CoreSight-compliant e.g. having a discoverable ROM table, so anyone with a USB wiggler can attach?
In short, how technical must a user be to program this? Is this then attached to a flexible PCB using BGA? Electronic fabric using thin conductors?
Present-day developers have the alternative of buying a KL02 (2mm x 1.9mm; decidedly better specs/capability) and putting it on a flex PCB. More progress on bendable/non-silicon CPUs would be awesome, and maybe one day they will have a clearer purpose or better economics to displace existing tech.
I'd reserve any final judgment until a test unit or third-party publication appears.
In my eyes, there are gains enough from having an alternative library for the cell architecture. Arm Ltd. involved in the testing suggests a shorter road to market than if undergrad Joe in Dr. Smith's lab published this.
comment 5y ago · link · parent
(in German) https://www.cmshs-bloggt.de/gewerblicher-rechtsschutz/urhebe...
comment 5y ago · link · parent
Is the error the same in non-Apple targets? Does replacing FMADD with FNMADD (negative mult) or FNSUB change the magnitude of error in this case? Also, would the relative error be the same if the numbers were random integers or random floats of a given range (-1 to 1; -0.01 to 0.01; -100 to 100; 0 to 1) rather than integers in sequence?
-----
In most robotics and AI applications, calculations are unlikely to suffer greatly from inaccuracy but benefit from speed. What are the applications where someone would require floating point math AND both extreme speed and extreme accuracy?