HNHacker News
TopNewBestAskShowJobs

Bognar

883 karma · joined April 10, 2013

submissionscomments
Bognar··on 95 bits per second
I misspoke, not a MacBook but a MacMini. It's on a wired 1G connection transferring across local LAN. I'll have to rerun the experiment when I'm at work again and investigate, but iirc when we did this previously we were seeing one maxed core and low scp perf.
Bognar··on 95 bits per second
The author's scp at the end of the article hits 10 MB/s, which is about what I cap out at when transferring over SSH from my MacBook. That's because it maxes out a single core just trying to encrypt all the data without hardware acceleration. Straight FTP or even HTTPS upload (which is hardware accelerated) should be even faster if they have more bandwidth.
Bognar··on IP address blocking banned after anti-piracy court order hit Cloudflare
Is your vendetta against IPs the reason why you can't remember that my home IP that has not changed in 3 years is actually not a bot?
Bognar··on TypeScript is surprisingly ok for compilers
I would also _highly_ recommend Crafting Interpreters: https://craftinginterpreters.com/

The book is split into two parts. The first implements a language interpreter in Java, and the second implements the same language by building a compiler to byte-code and also implements a byte-code VM in C. Every line of code in the implementation is referenced in the book.

Bognar··on Fastest branchless binary search
Sounds like we're just reinventing B-trees.
Bognar··on Squeeze the hell out of the system you have
Denormalized transactions are not trivial unless you are using serializable isolation level which will kill performance. If you don't use serializable isolation level, then you risk either running into deadlocks (which will kill performance) or inconsistency.

Decent SQL databases offer materialized views, which probably give you what you want without all the headache of maintaining denormalized tables yourself.

Bognar··on Julia Liuson promoted to President of the MSFT DevDiv, which now includes GitHub
She reports to Scott Guthrie. Is this supposed to be relevant to something?
Bognar··on Julia Liuson promoted to President of the MSFT DevDiv, which now includes GitHub
It's incredibly reductive to refer to DevDiv as Azure SDK development.

Also, Nat reported directly to ScottGu whose purview is literally all of Azure and then some. Don't you think that's a closer relationship to Azure than someone who "overlooks Azure SDK development"?

Bognar··on Julia Liuson promoted to President of the MSFT DevDiv, which now includes GitHub
Julia is pretty well regarded by people under her. Additionally, she has some big OSS names reporting directly to her like Miguel de Icaza and Guido van Rossum. Perhaps if she was hellbent on destroying open source then we might hear more about it or see some high profile exits?

Have you considered that this could be just a bog standard corporate promotion + re-org and that you're reading too much into things?

Bognar··on Project Starline: Feel like you're there, together
The real value of business travel is what you do with people outside of work hours.
Bognar··on Upptime – GitHub-powered open-source uptime monitor and status page
This is a common misconception about Lambda and Functions. They don't always give you a fresh container/VM, but Actions does.

https://aws.amazon.com/blogs/compute/container-reuse-in-lamb...

https://docs.microsoft.com/en-us/azure/azure-functions/funct...

Bognar··on Upptime – GitHub-powered open-source uptime monitor and status page
It is definitely the case with Actions.

> I don't think you really have full access to everything

You do.

> their software runs that yaml which could easily exclude any dangerous commands

Categorizing dangerous commands is impossible to do accurately by just looking at a yaml file.

> Plus, github offers a hosted runner service where you pay for a dedicated VM to run your actions in. So that makes it seem like actions are probably run together on larger VMs by default.

I'm not sure what this means. The paid hosted runners are not any different from the free hosted runners, but free runners can only be used on public repos.

Bognar··on Rezoom.SQL: Statically typed SQL for F#
Some discussion on reddit: https://www.reddit.com/r/programming/comments/6qizpb/statica...
Bognar··on I've been writing ring buffers wrong all these years
Yep, sure is. He addresses that on the knot's Technical Info page: http://www.fieggen.com/shoelace/secureknottech.htm
Bognar··on I've been writing ring buffers wrong all these years
The Ian Knot is quick, but as someone who never ties their shoes and just slips them on and off, I much prefer Ian's Secure Knot: http://www.fieggen.com/shoelace/secureknot.htm

I usually tie this knot twice over the lifetime of a pair of shoes. Once when I get them, and once more when they're worn in and need to be tightened.

Bognar··on Tell HN: Riseup.net fails to update canary; fingerprints deleted without notice
"a FOIA" is correct if you pronounce it "foya".
Bognar··on Robin Hood Hashing should be the default hash table implementation (2013)
The post mentions using tombstones for deletion, but I was under the impression that the variance benefits of Robin Hood hashing weren't realized unless you performed a backwards shift on the remaining elements instead of using a tombstone.

See these posts for more information:

http://codecapsule.com/2013/11/11/robin-hood-hashing/

http://codecapsule.com/2013/11/17/robin-hood-hashing-backwar...

Unfortunately there's not great information around the overall CPU performance impact of using a shift vs. tombstone.

Bognar··on Arguments against JSON-driven development
To define a valid shape for related data.
Bognar··on What are Bloom filters? (2015)
Or "Guess Who?" Filtering:

https://en.wikipedia.org/wiki/Guess_Who%3F

Bognar··on Fresh work on the mathematics of bicycles in motion
I can ride pretty well without hands as well. When I heard about counter-steering a long time back I paid closer attention to what I was doing while riding hands-free. Turns out that I was doing a weird little bodily flick motion in to get the wheel pointing to the opposite direction of the turn before I started leaning into the turn.

Pay attention to yourself next time you ride and you might be surprised.

Bognar··on How Two Seattle-Area Brothers Made Dwarf Fortress
They're nothing alike, but I find they scratch a very similar itch.
Bognar··on Test your “free will” at the Aaronson Oracle
This sequence seems to settle right around 50%:

  var simulateKeyPress = function(character) {
    var evt = document.createEvent("KeyboardEvent");
    evt.initKeyEvent ("keypress", true, true, window,
                      0, 0, 0, 0,
                      0, character.charCodeAt(0)) 
    document.body.dispatchEvent(evt);
  };
  
  var num = 0;
  var loop = function() {
    console.log(num);
    var binary = num.toString(2);
    num++;
    for(var i = 0, len = binary.length; i < len; i++) {
      simulateKeyPress(binary[i] == '0' ? 'd' : 'f');
    }
  };
  
  setInterval(loop, 100);
Bognar··on JavaScript async/await implemented in V8
I don't see how it throws away the functional programming paradigm. This is basically Haskell's do-notation applied to JS Promises.
Bognar··on JavaScript async/await implemented in V8
In addition to the answers already given, I think it's important to notate that a function is async in the signature rather than requiring the user to scan the entire method looking for an "await" keyword.
Bognar··on You thought that “This should never happen was bad”? search – eval($_GET)
Actually I thought "This should never happen" was good. This is pretty bad, though.
Bognar··on Mozilla Servo alpha will be released in June
It's definitely true. I've only written a couple toy projects in Rust (no more than a few hundred lines total), and I jumped into the Servo codebase and started contributing. It can be slow going as you wrestle with the language and learn the codebase, but the project maintainers are very helpful.
Bognar··on A previously unnoticed property of prime numbers
> Are there no twin primes (p,p') where p%3 == 1 and p'%3 == 2?

By definition, no there aren't. Twin primes are a distance of 2 apart, so your mod 3 options are 0 -> 2, 1 -> 0, and 2 -> 1. Anything involving 0 means it's divisible by 3, so your only mod 3 possibility for twin primes is 2 -> 1.

EDIT: Excluding the possibility where 3 mod 3 = 0, of course. This allows a 0 -> 2 transition with (3,5).

Bognar··on How to Deploy Software
Elastic tabstops are clearly the best, but until we have good editor support I'm sticking with spaces.

http://nickgravgaard.com/elastic-tabstops/

Bognar··on WebSockets: caution required
It seems like it wouldn't be much more code to just use an AJAX POST for the hash and have the server reply whether it has the hash or not, followed by the chunk upload again over AJAX. It would probably be slower and less data efficient, but I don't see how it would be much more code.
Bognar··on Early exit is a tail call optimization of procedural languages
> Having multiple return statements in a method actually renders the method LESS readable.

I 100% disagree. Introducing a variable instead of using multiple returns means I now have to keep track of yet another variable throughout the entire rest of the method. Is it modified before it's returned? Gotta read the whole thing to find out.

Early returns reduce the complexity of a method by reducing the number of possible states as you move through the method.

← PreviousPage 3 of 5Next →