HNHacker News
TopNewBestAskShowJobs

zaxomi

352 karma · joined March 31, 2015

submissionscomments
zaxomi··on Dinero.js – JavaScript library for working with monetary values
Using | will cast it to a 32 bit integer!

   2147483648 | 0 = -2147483648
  -2147483649 | 0 = 2147483647
   4294967296 | 0 = 0
  -4294967296 | 0 = 0
   6442450944 | 0 = -2147483648
zaxomi··on U.S. To Seek Social Media Details from All Visa Applicants
No, it is actually not extreme at all to refuse to visit because of this. It is non of your countries business.

The only extreme thing with this, is collecting this useless information.

zaxomi··on Sourceforge is down since March First
Me too. I figured out that they moved to another data center during February, but not much else. Maybe I'm looking at the wrong place.
zaxomi··on Sourceforge is down since March First
They are up again, since about an hour: https://twitter.com/sfnet_ops/status/970143157307559936
zaxomi··on Let's Learn About Waveforms
On a synth in a musical piece, absolutely.

But in a technical piece like this, I prefer if it isn't.

zaxomi··on Let's Learn About Waveforms
Great, you found my comment!

That explains why I didn't find what tuning you where using.

By the way, there is no contact information on the page (if there is, I didn't see it when I was looking for it.)

zaxomi··on Let's Learn About Waveforms
Nice work!

I have a suggestion about the chord:

With a single chord like this I think it sounds better to tune it with "just intonation". For a major chord it is [ f * 1, f * 1.25, f * 1.5 ]. With these frequencies the chord will not wobble.

zaxomi··on Let's Learn About Waveforms
When using sine waves in a single chord the tuning is much more obvious.

I looked at the code and for the major chord it uses:

[f * 1, f * 1.2599388379204892, f * 1.4984709480122322]

With f = 440Hz it will be [440.000, 554.373, 659.327].

Equal temperament (12-TET) would be:

[f * 1, f * 1,25992104989487, f * 1,49830707687668]

With f = 440Hz it will be [440.000, 554.365, 659.255].

Since it isn't pure it will wobbly a little bit.

In this case it would be better to use "just intonation":

[f * 1, f * 1.25, f * 1.5]

With f = 440Hz it will be [ 440, 550, 660 ].

zaxomi··on London City Airport Shut as WW2 Bomb Found in Thames
A short video about SS Richard Montgomery:

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

zaxomi··on Hawaii official who sent false missile alert has been fired
Previous discussions

https://hn.algolia.com/?query=hawaii&sort=byDate&prefix&page...

zaxomi··on Intel Warned Chinese Companies of Chip Flaws Before U.S. Government
> It is a “near certainty” Beijing was aware of the conversations between Intel and its Chinese tech partners, because authorities there routinely monitor all such communications, Mr. Williams said.

Doesn't that mean that it is a “near certainty” that the U.S. Government was aware of it, because authorities (NSA, etc) routinely monitor all such communications?

zaxomi··on JS things I didn’t know existed
"unwise to use features like these which you wouldn't expect other people to know"

I understand what you mean, but most of the described features has been in the language for ages, some of them more than 20 years.

I think the reason why so many aren't aware of the features, is because they learn the language by looking at code written by others or from simplified tutorials, and never look at the formal specification.

I remember how I struggled back in the late 90's to find good information, and how I read the ECMA-262 specification when I found it. Whenever a new specification is released I download it and read though it to see all new features, and also refresh my memory about the old.

zaxomi··on Reality has a surprising amount of detail (2017)
A former boss of mine told the employees to assemble the furniture at the new location. It was fast and it looked good.

After a week the monitors started to fail, because the cable to the monitor was too tight, so when they moved the monitor, the contact on the back of the monitor broke.

zaxomi··on Is it time for open processors?
Maybe it is time to rethink how computers are built? For example, that the kernel is running on a dedicated cpu, with dedicated cache and memory.
zaxomi··on SQL Keys in Depth
When I decided to learn more about regular expressions back in 2002-2003 I found a regular expression for RFC822 (with comments removed): http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html

As an exercise, I deconstructed that into the pieces it was built from. Funny times :)

zaxomi··on When volcanic ash stopped a Jumbo at 37000 feet (2010)
Wonderful story! Thank you for sharing!
zaxomi··on How to hack a turned-off computer, or running unsigned code in Intel ME [pdf]
I can give you an example of why I think the code quality is questionable:

At my work we use AMT for legitimate purposes: remote administration and support (we have offices in different cities). A big problem for us is that the AMT crashes by itself and the computer needs to be power-cycled for the AMT to work again. Sometimes the web-interface don't answer, sometimes the passwords doesn't match anymore. I think there is a process that is writing where it shouldn't, because it works again after the computer is power-cycled by removing the power-cord.

I now have a script that checks every registered computer twice a day , to see if it is still possible to login to the AMT, and if not, it sends an email to a person at the local office requesting them to restart the computers that fails.

When it works it is a great tool, allowing us to fix computers and give support without the need to travel to each city.

zaxomi··on Remove my password from lists so hackers won't be able to hack me
The code that Data says: 173467321476C32789777643T732V73117888732476789764376

The code on the screen (in upper case letters) 17346721476C3278977763T732V731171888732476789764376

Source: https://www.youtube.com/watch?v=rAUVUUhf7U0

zaxomi··on Keeping Time with Amazon Time Sync Service
Or shorter... Leap seconds can be negative.
zaxomi··on Car key 'relay' attack caught on CCTV
How about having a button on the keyfob, that unlocks and locks the car?

Then you don't need to worry about the relay-attack, don't need to worry that you car unlocks just because you walk past it, and don't need a steering lock...

zaxomi··on A Branchless UTF-8 Decoder
Why branchless? Because branches can kill performance. For an explanation, see this answer on branch prediction: https://stackoverflow.com/a/11227902
zaxomi··on Apple reminds the FCC that it can’t activate imaginary iPhone FM radios
I live in Sweden, and major power outages are rare here too (latest was in 2003 and 1983). Small ones happens from time to time. I was convinced that it was a legal requirement here too, but it turns out that's not the case. Fortunately that will be changed, so from 2020 it will be mandatory here.

But, even if it is a legal requirement, it will not always work. All that is needed is a major storm that disrupts the normal power, and it will be down for days or maybe even months...

zaxomi··on Apple reminds the FCC that it can’t activate imaginary iPhone FM radios
>Really, what's is the last time you did not have at least 3G reception ?

Last time when there was a power outage. Every cell tower died. When the power come back, it took about half a day before the cell towers where working again.

zaxomi··on Sysadmin war story: the network ate my font
> This leads to an obvious question: "why did the programmers not always just embed the font?".

Historically the size of hard-disks have been very limited, so it was important to save a file with as few bytes as possible.

Also the serial transfer speed to the printer was very low, so it was important to limit how much data that was sent for each print job.

zaxomi··on ASCII and Unicode quotation marks
Actually, ASCII have mechanism for solving the problem that you describe, with control codes FS, GS, RS and US.
zaxomi··on 24/192 Music Downloads Are Very Silly Indeed (2012)
I believe the parent is referring to the latency of real-time effects used during performance:

* With analogue equipment the latency between the input and output of the effect is often below 1 ms (unless the effect is supposed to have a delay).

* Standalone digital effect equipment that processes the samples one at a time can also have a latency below 1 ms. (48kHz ≈ 0.02 ms)

* If you use a computer for real-time effects, the samples are not transferred sample by sample from the audio interface, but in a block of many samples. The number of buffers and the size of them can usually be changed by the user. With a buffer of 1024 samples, the oldest sample is already about 21 ms old before the computer can process it. After the buffer is processed it has to be transferred to the audio interface, and that will add another 21 ms. So the minimum latency for any real-time effect in the computer is about 42 ms at 48 kHz if the size of the buffers is 1024 samples. Often it is much worse because the operating system adds more latency. If the equipment can handle a sample rate of 192 kHz, the same latency is about 10 ms. If the computer can handle smaller buffers, the latency can be lowered. With 256 samples per buffer the minimum latency will be about 11 ms at 48 kHz and 3 ms at 192 kHz.

zaxomi··on URL obfuscation (2002)
A quick test show that Chrome, Firefox and IE accepts dotted, long, class a, and long with auth in decimal, octal, and hex notation. Firefox also accepts long overflow.

Non of them accept Dotted overflow, Class B or Class C.

Decimal Dotted http://192.168.0.1/

Decimal Dotted Overflow http://448.424.256.257/

Decimal Long http://3232235521/

Decimal Long Overflow http://7527202817/

Decimal Class A http://192.11010049/

Decimal Class B http://49320.1/

Decimal Class C http://12625920.1/

Decimal Long with auth http://fake.site@3232235521/

Octal Dotted http://0300.0250.00.01/

Octal Dotted Overflow http://0700.0650.0400.0401/

Octal Long http://030052000001/

Octal Long Overflow http://070052000001/

Octal Class A http://0300.052000001/

Octal Class B http://0140250.01/

Octal Class C http://060124000.01/

Octal Long with auth http://fake.site@030052000001/

Hex Dotted http://0xc0.0xa8.0x0.0x1/

Hex Dotted Overflow http://0x1c0.0x1a8.0x100.0x101/

Hex Long http://0xc0a80001/

Hex Long Overflow http://0x1c0a80001/

Hex Class A http://0xc0.0xa80001/

Hex Class B http://0xc0a8.0x1/

Hex Class C http://0xc0a800.0x1/

Hex Long with auth http://fake.site@0xc0a80001/

zaxomi··on HTTP Error Code 418 I'm a Teapot is about to be removed from Node
Only about 1/3 of the available codes in 4xx is currently used, so there is still plenty of space left.
zaxomi··on 6502 transistor level hardware simulation in JavaScript
And then there is a dis-integrated version, with a lot of LEDs that show how the chip works internally: http://monster6502.com/
zaxomi··on Opening a plane door mid-flight
If the door is opened when armed, the evacuation slide will be inflated. When it breaks off the aircraft it can be sucked into the engine or damage the tail.
← PreviousPage 4 of 5Next →