cnvogel

Joined 17 years ago

Karma
2,254
Submissions
794
Member since
Sep 8
email: Christian Vogel <[email protected]>

Physics, Electronics, Programming (embedded, C mostly, python), Linux

49.3254794 N 11.3887135 E

View on Hacker News

Recent submissions

Comment · 2 years ago
Here’s what I don’t get: why the many layers of obfuscation in the build phase? (I understand why in the binary linked into ssh.)

Once the first stage, extracting a shell script from one of the „test“ data blobs, has been found it was clear to everybody that something fishy is going on.

It’s inconceivable that I’ve would have found the first stage and just given up, but then it was „only“ a matter of tedious shell reversing…

They could easily done without the „striping“ or „awk RC4“, but that must have complicated their internal testing and development quite a bit.

Comment · 7 years ago
You are not observing the "problem" of entropy running low. Because it doesn't.

You are observing the misguided attempts of fixing this non-problem.

Comment · 7 years ago
https://www.qualcomm.com/products/qualcomm-9205-lte-modem

The Qualcomm® 9205 LTE modem is our next-generation ...

Qualcomm 9205 uses the latest generation (gen9) Qualcomm® GNSS engine ...

Location

Satellite Systems Support: GPS, GLONASS, Beidou, Galileo ...

Comment · 7 years ago
Comment · 7 years ago
Comment · 7 years ago
Comment · 8 years ago
The examples should only view the bit/address mapping, not be a complete example on how to access memory mapped peripherals.
Comment · 8 years ago
It's still non-esoteric today:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....

ARM Cortex M4 supports adressing individual bits (often registers of hardware peripherals) of memory locations as one additional memory location writing to, or reading from a single bit.

e.g., from the examples of said infocenter url:

   *(uint32_t*)0x20000000 |= (1<<7)
   *(uint32_t*)0x20000000 &= ~(1<<7)
should be equivalent to

   *(uint32_t*)0x2200001C = 1;
   *(uint32_t*)0x2200001C = 0;
Also Analog Sharc DSPs (which, I think, still are being sold with this architecture, and still used, even though I've used them only 10 years ago) alias their memory four times, depending if you want to access it as 16bit, 32bit, 48 or 64bit data.
Comment · 8 years ago
Quote from the Article: """The figure is calculated by multiplying 2 by itself 77,232,917 times and then subtracting 1."""

Would HN agree that multiplying 2 by itself once is 2⨯2 = pow(2,2), twice is 2⨯2⨯2 = pow(2,3) and N times yields pow(2,N+1)?

The Mersenne Prime found is pow(2,77232917) − 1, hence the article got the number wrong?

Comment · 9 years ago
The ban is specifically for the ability of the watches to covertly record or transmit audio, not about GPS logging.
Comment · 9 years ago
https://www.python.org/dev/peps/pep-0238/

{Describing the old python-2 behavior:}

-------- Quote: -------

The classic division operator makes it hard to write numerical expressions that are supposed to give correct results from arbitrary numerical inputs. For all other operators, one can write down a formula such as xy*2 + z, and the calculated result will be close to the mathematical result (within the limits of numerical accuracy, of course) for any numerical input type (int, long, float, or complex). But division poses a problem: if the expressions for both arguments happen to have an integral type, it implements floor division rather than true division.

-----------------------

To guarantee the correct mathematical behavior in python2, one would probably have to write:

    def true_math_div(a,b) :
        if type(a) is int or type(a) is long :
            a = float(a)
        if type(b) is int or type(b) is long :
            b = float(b)
        return a/b
as a and b could be int, float, complex, or some object defining the method __div__.
Comment · 9 years ago
Comment · 9 years ago
Another example:

    $ nohup ./long_running_process &
    $ logout
Previously: long running process continues running after you logout. Recent change in systemd: Process is reaped once your login session ends (depending on flags passed via ./configure when systemd was compiled, your distro of choice might not be affected right now).

You could interpret this as "breaking user-space", as it's contrary to long-running practice and user-expectations.

Or you could say that systemd is superior as it's reliably cleaning up unwanted lingering processes which may have bothered some before. And this is worth the hassle of explicitly running intended background processes via systemd-run(1), or adding code to e.g. tmux/screen doing the equivalent via the dbus-api.

Comment · 9 years ago
A DAQ that reconstructs a perfect square wave (or a perfect stair-step function) is employing a "Zero Order Hold", and it would make a god-awful audio DAC.

https://en.wikipedia.org/wiki/Zero-order_hold

With a 0OH you'd gain the ability to potentially reconstruct a infinite bandwidth signal (the squarewave), which is irrelevant in the audio case: With a 10kHz squarewave, the next harmonic would be at 30kHz which is already waaaay out of the human range of hearing.

But limiting the bandwidth of a DAC (or ADC) is the fundamental property which causes it to be able to perfectly reproduce the frequencies within its bandwidth (~up to 20kHz in HiFi Audio), so that's desirable. And the "ripples" on top of a squarewave are just the manifestation of this property: If you cut away the frequencies above Nyquist, you get a rippled squarewave. And conversely if you compute the difference between the perfect squarewave and the "rippled" squarewave you get out of an Audio DAC this only contains (non-audible) energy outside of the bandwith of the DAC!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton