HNHacker News
TopNewBestAskShowJobs

flgr

256 karma · joined October 13, 2011

submissionscomments
flgr··on Using tame() in userland
For those wondering what this is about: http://marc.info/?l=openbsd-tech&m=143725996614627&w=2

     The current process is forced into a restricted-service operating mode.
     A few subsets are available, roughly described as computation, memory
     management, read-write operations on file descriptors, opening of files,
     networking.  In general, these modes were selected by studying the
     operation of many programs using libc and other such interfaces.
Sounds pretty interesting.
flgr··on No one expects command execution
> but ruby doesn't track external strings as dirty like that.

It does:

  irb(main):001:0> gets.tainted?
  foo
  => true
You can even set $SAFE to 1 or higher to disallow the use of tainted strings in potentially dangerous commands:

  freya:~ flgr$ ruby -e '$SAFE = 1; system "tar bla bla #{gets}"'
  foo
  -e:1:in `system': Insecure operation: -r (SecurityError)
	  from -e:1:in `<main>'

See http://phrogz.net/programmingruby/taint.html for more information.
flgr··on The Ubiquitous B-Tree (1979) [pdf]
If you are interested in an overview of B-Trees, similar data structures, and how well they work on modern hardware, you may also find the survey bit of my master thesis interesting:

See here: https://www.researchgate.net/profile/Florian_Gross/publicati....

Along those lines:

* CSS Trees: Pointerless b-Trees with a layout optimized for cache lines (http://www.vldb.org/conf/1999/P7.pdf)

* Intel & Oracle's fast architecture-sensitive tree search (combines huge pages, cache line blocking, and SIMD in an optimal layout): http://www.researchgate.net/profile/Jatin_Chhugani/publicati...

* Adaptive radix trees (http://codematch.muehe.org/~leis/papers/ART.pdf)

flgr··on String Interning – Trie vs. Hash Table Deathmatch
> Basically all the data fit in the CPU cache

If Mb is used with its usual meaning here (megabit), that's only 175 kilobyte.

flgr··on Memory Layouts for Binary Search
Since I haven't set up any other domain to put it right now (should get to that), I put it here:

http://webclonk.flgr.me/index-search-modern-cpus.pdf

flgr··on Memory Layouts for Binary Search
Or phrased with a bit more seasoning:

"Reading from L1 cache is like grabbing a piece of paper from your desk (3 seconds), L2 cache is picking up a book from a nearby shelf (14 seconds), main system memory is taking a 4-minute walk down the hall to buy a Twix bar, and waiting for a hard drive seek is like leaving the building to roam the earth for one year and three months." — Gustavo Duarte (http://duartes.org/gustavo/blog/post/what-your-computer-does...)

flgr··on Memory Layouts for Binary Search
Sorry for the blatant plug, but it might be relevant — in my M.Sc. thesis I surveyed main memory optimized index techniques and also provided some background for why traditional binary search is not very optimized for modern hardware. There's lots of illustrations and I cite some great material. :)

See here: https://www.researchgate.net/profile/Florian_Gross/publicati...

Along those lines:

* CSS Trees: Pointerless b-Trees with a layout optimized for cache lines (http://www.vldb.org/conf/1999/P7.pdf)

* Intel & Oracle's fast architecture-sensitive tree search (combines huge pages, cache line blocking, and SIMD in an optimal layout): http://www.researchgate.net/profile/Jatin_Chhugani/publicati...

* Adaptive radix trees (http://codematch.muehe.org/~leis/papers/ART.pdf)

flgr··on USCIS Completes the H-1B Cap Random Selection Process for FY 2016
From the way I understand it cases with premium processing should here back until May 11. From what I've heard, others "before October" (one company doing consulting for H-1Bs expects these until August 15).
flgr··on USCIS Completes the H-1B Cap Random Selection Process for FY 2016
If we can extrapolate from the numbers at [1] (not sure how representative it is) then about 29% of the 233,000 total petitions would be filed under the Master's cap. That'd be around 67,337 Master's cap petitions.

[1] http://redbus2us.com/trackers/h1b-visa-tracker/

flgr··on Show HN: kouio, the Reader you've always wanted
While I like the list view, I'm missing one thing:

Would it be possible to add the title of the blog an item is from in lighter text?

flgr··on Console.image - Images in Chrome Dev tools
Would it be possible to use this to render the current state of a canvas to the console? That's something I'd find very useful for debugging.

Edit 1: Looks like they build the memes exactly that way. It still needs to convert the canvas to a data: url first, however, which might be a bit slow?

Edit 2: Looks like there might be a better, but non-standard and non-portable way of achieving that in WebKit browsers: http://updates.html5rocks.com/2012/12/Canvas-driven-backgrou...

flgr··on Ask Matz: why the id of nil is 4?
Hm, I think it's better style to refer to true and false as true and false (their keywords) instead of TRUE and FALSE (constants, could go away in the future?). :)

  irb(main):001:0» TRUE
  » true
  irb(main):002:0» FALSE
  » false
flgr··on Never create Ruby strings longer than 23 characters
AFAIK str2 = str will just share the RVALUE-Pointer.

I think to actually see shared strings behavior, you would have to do str2 = str.clone or str2 = str[0..-1].

flgr··on Steve's Google Platform rant
Isn't it the same with scalability? You won't know if you need a product to be scalable until you have actually launched it and seen its success.

Yet, every product developed at Google seems to be developed with absolute scalability in mind from the get-go, wasting lots of effort invested into scalability in the case of the product failing to get significant customer adoption.

← PreviousPage 3 of 3