HNHacker News
TopNewBestAskShowJobs

alvil

134 karma · joined April 25, 2015

submissionscomments
alvil··on James Dolan, co-creator of SecureDrop, has died
thank you for your comment
alvil··on James Damore has filed a class action lawsuit against Google
Go for it.
alvil··on Leaving htop running freezes macOS High Sierra
Htop is pretty leaky on any system.
alvil··on Fast nnn file browser v1.6 released
https://github.com/jarun/nnn/blob/master/nlay

  # bash 4.0 way to switch to lowercase
  ext="${ext,,}"
alvil··on Fast nnn file browser v1.6 released
It looks like it is bash dependent
alvil··on Not raising funds to stay small and happy
Funding is just another form of employment (or slavery if you wish).
alvil··on Norway votes to decriminalise drugs and offer treatment instead of jail time
Norwegian islamic republic, with half of nation on drugs, without terrestrial broadcasting and without cash, easy to manipulate:D Fuck neoliberals.
alvil··on I gave Amazon a key to my house and regretted it
Regret nothing. You are simply idiot :D
alvil··on Reddit is ready for advertisers, but are advertisers ready for Reddit?
... And are users ready for ads?
alvil··on Station X Linux Machines
It starts to be wrong with Linux.
alvil··on Why the Update Fever Is Bad
Do fake update at semi-random time. Visualize it, eg. show them a dialog with progress bar and percentage.
alvil··on Ask HN: Why are supercomputers all running Linux and not BSD?
> While Linux has better hardware support

Linux has wider, not better hardware support. If OpenBSD supports some hardware it simply works out of the box and is stable and rock solid.

alvil··on Debian and GNOME announce plans to migrate communities to GitLab
Most of these companies projects on Github are projects of their employees, not official projects :)
alvil··on RSS: there's nothing better
I really like the idea of RSS I just would replace it with JSON.
alvil··on Is it time to stop trusting Google search?
Agregators and spam. Can't agree more.
alvil··on Ask HN: Does a good desk setup make you more productive?
Good desk and comfortable chair makes you more fat, that's all.
alvil··on Gender Distribution in North Korean Posters
I like North Korean look of Ubuntu UI :)
alvil··on Efficient pagination of a SQL table with 100M records
I usually use query similar to this one (in PHP/MySQL), it's much faster than traditional offset query. You can compare it for yourself using EXPLAIN. Sure not for 100M records, but for 1M or so :)

  $items = db("SELECT a,b,c FROM item
           JOIN (SELECT id
              FROM item
              WHERE
              <your-where-conditions>
              ORDER BY id DESC
              LIMIT <offset>, <limit>)
              AS x ON
              x.id = item.id");
alvil··on Efficient pagination of a SQL table with 100M records
With this approach you can't have page numbers on the front-end, just first, prev, next and maybe last. You can't jump to particular page. It is old technique and I like it, but if it would be usable it would be used by everyone but it is not.
alvil··on Show HN: A simple, fast and user-friendly alternative to find, written in Rust
Pet: https://github.com/knqyf263/pet and Peco: https://github.com/peco/peco
alvil··on A Lua 5.3 VM and compiler written in Go
Crippled Lua
alvil··on Golang Is Good, Structure Is Bad
You can also use dot

  import (
          . "fmt"
  )
  
  ....
  
  // now call function without prefix
  Println("Read more docs")
alvil··on Parallel processing with Unix tools
I like it using newLISP :)

  ;calculate primes in a range
  (define (primes from to)
    (local (plist)
        (for (i from to)
            (if (= 1 (length (factor i)))
                (push i plist -1)))
        plist))

  (set 'start (time-of-day))

  ; start child processes
  (spawn 'p1 (primes 1 1000000))
  (spawn 'p2 (primes 1000001 2000000))
  (spawn 'p3 (primes 2000001 3000000))
  (spawn 'p4 (primes 3000001 4000000))

  ; wait for a maximum of 60 seconds for all tasks to finish
  ; returns true if all finished in time
  (sync 60000) 

  ; p1, p2, p3 and p4 now each contain a lists of primes
  (println "time spawn: " (- (time-of-day) start))
  (println "time simple: " (time  (primes 1 4000000)))

  (exit)
alvil··on Gitlab 10.0 released
Searching is still slow but otherwise Gitlab is excellent, I'm using it every day.
alvil··on Recutils – Tools and libraries to access plain text databases called Recfiles
I'm wondering if it is possible also with Signal (signal.org)
alvil··on Anko SQLite, a library to simplify working with SQLite on Android
Here are some comments from SQLite itself:

https://www.reddit.com/r/PHP/comments/59na74/sqlite_as_the_o...

alvil··on A simple heap memory allocator in about 230 lines of C
+1 for this
alvil··on Delete Facebook Account
There is no such thing as permanently delete Facebook or Google account :)
alvil··on In Urban China, Cash Is Rapidly Becoming Obsolete
Only idiot can support cashless society creation.
alvil··on Redis 4.0
may I use color names as values? is black and white allowed?? is this correct politically?
Page 1 of 2Next →