mvanotti

Joined 13 years ago

Karma
20
Submissions
16
Member since
Jul 8
Computer Science student at University of Buenos Aires.
View on Hacker News

Recent submissions

Comment · 10 years ago
My biggest problem with fbsd in the rpi is that it's really hard to cross-compile ports for arm, and compiling everything in the rpi takes a lot of time (I think it was half a day to compile tmux in the rpi A).
Comment · 11 years ago
I've tried freeBSD in a Raspberry Pi 1, but I couldn't get any binaries precompiled for ARM :(. I would like to have an easy way to cross-compile ports from my main machine.
Comment · 11 years ago
So, bad certificate HAS to be signed by leaf certificate, and leaf certificate HAS to be trusted. (And you need two CAs with the same keys)

openssl would accept certs that have been issued by a non-ca cert (which is trusted).

So if you have control over the leaf cert, you can just use it for contacting openssl.

If you don't have control over the leaf cert, you can't issue a bad cert.

Am I missing something?

Comment · 11 years ago
In the blog post it says that CNNIC issued the CA=TRUE on the basis that MCS H only use it for domains that they have registered.. Wouldn't it be better to just issue a CA cert with name constrains extensions?

Why do we have that extension if nobody uses it :( ?

Comment · 11 years ago
Comment · 11 years ago
Thank you for this challenge :)

It was easy to solve, but I'm struggling trying to get the design right, also trying to be more robust with the parsing (there are fields that can be interpreted as uint64, int64, int32, uint32, etc).

Most of the hex editors available for linux are broken, ghex for example, the "grab these 4 bytes and interpret them as float32" functionallity doesn't work at all. I don't know what people who work doing this kind of things use.

Comment · 12 years ago
I have a Zenbook Infinity and yes, it is good, but the battery life is too bad. On linux it lasts 3 hours or less with the OnDemand governor, whilst on windows it last 4 o 5 hours.

I don't know what to do to improve battery life :(. I regret not buying a Macbook Air for the same money instead.

Comment · 12 years ago
Actually, I really prefer writing that in C rather than asm: You can use bitfields to define the GDT, IDT, Page Directories and so on. Doing everything is ASM is a PITA, for debugging and for readability.

(I am a teaching assistant at one of these courses and hate when students do everything in asm.. but they are allowed to do as they want, as long as it works as specified).

Comment · 12 years ago
Maybe it messes with the random number generator.. somehow.

Awesome article, but I suspect that something is wrong. If we see Mewtwo, lvl 70, full hp, frozen solid it says that -on average- we need 6 ultra balls. That is FAR from true. I always freezed all the legendaries to capture them easier, and it took always more than 10 balls to capture them.

Comment · 12 years ago
Oh God. I spent hours trying to understand how it works, when I saw it yesterday :/ I wish I had seen your link!
Comment · 12 years ago
Just an FYI for anyone reading: It's not the multiplicative inverse of 10 modulo 2^64. Multiplying by it only works if the number is divisible by 10.

What it's happening here is something more clever:

  let z be: (2^67 + 2)/10. 
2^67 isn't divisible by 10 (that's why we add 2).

  z = 14757395258967641293L
Now, I claim that

  n/10 = floor(z * n/ 2^67)
z is an integer, but it represents the exact division of

  (2^67 + 2)/10
 
we distribute the n:

  (n * 2^67)/10 + 2 * n/10
we distribute the 2^67 division:

  (n * 2^67)/(10 * 2^67) + 2 * n / (10 * 2^67)
simplify the terms:

  n/10 + n/(10 * 2^66)  [1]
Now:

  floor(x/d + c) == floor(x/d) if c < 1/d
we want to take floor of that number[1], but as

  n/(10 * 2^66) < 1/10
(the maximum value for n is 2^64 - 1), it follows that

  floor(z * n / 2^67) = n/10.
That's what the code is doing: 0xcccccccccccccccd is 14757395258967641293L the multiplication of z * n fits in 128 bits, and the mul instruction stores the higher 64 bits of $rax * $rdx into $rdx.

We need to divide by 2^67, whichs is shift 3 67 bits to the right. If we take the higher part (rdx) we get the higher 64 bits, and then we shift 3 bits to the right (shr $0x3, %rax) and that's our answer :).

Cool trick.

Comment · 12 years ago
Once you have a mixed graph (One-way streets and two-way streets), the problem is known as the Mixed Chinese Postman Problem and is NP.
Comment · 13 years ago
Wow, this sounds awesome. I hope it becomes popular :)
Comment · 13 years ago
Comment · 13 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton