HNHacker News
TopNewBestAskShowJobs

przemoc

699 karma · joined March 28, 2011

Cross-site thinking SW engineer.

Realist, pragmatist, strong-willed, strong-minded. Sometimes taciturn, sometimes loquacious. FLOSS enthusiast but still using Windows. Alpine Linux advocator.

submissionscomments
przemoc··on Mkcast – GIF terminal screencasts with key presses overlaid
Looks nice. I was going to perform a shameless plug by mentioning my simple Linux OSD nanoproject (for those wanting to use some other recording matters, but still see the keystrokes on the screen):

https://github.com/przemoc/kaos/

but I just remembered that I still haven't fixed a bug I noticed on my computer at work, where I had Gnome back then. Nowadays I have awesome there too (just like on my laptop), so I'll possibly won't reproduce it, but notes I left should be enough to do the fix one day. ;)

przemoc··on Show HN: Offline – Access your favorite websites without a network connection
You are not. I hate how browsers nowadays, especially browsers on smartphones, are unusable without access to Internet. Sure, there is Pocket for instance, but IMHO there shouldn't be need for such app. And while I'm ranting at Pocket - there is still no automated login for LWN.net. (I know I can go with manual way, but still...)

P.S. I'm thinking about making nice dedicated cross-platform LWN.net articles & comments reader one day (well, maybe more), but it's hard to squeeze out enough time for that kind of fiddling (unless it's really a gravely matter, but it isn't here).

przemoc··on Lenovo ThinkPad X1 Carbon Review
I bought my T430 (N1T56PB) on August 2013. 10 months later "Tab" key fell off. 2 months later "A" key fell off and few months ago another one - "S". Currently "E" is the one that behaves a bit differently and surely will be the next one to fall off.

At the beginning I thought that these islandish keyboards aren't that bad, but after a year I'm sure they are total crap, which shouldn't be put in stuff that costs $1500+.

Previously I owned R61 (NF55WPB), which was surely lower-end laptop and I didn't have any problems with keyboard for 3 years that I spent using it (until NVS140m exhibited its factory problem and I have no longer seen anything on the screen).

przemoc··on The LaTeX cargo cult
All hard (but honest) LaTeX fans may enjoy reading my old post about LaTeX, which is somehow loosely related (I hope I'm not overstretching it :>).

Getting things done in LaTeX (or not)

http://abyss.przemoc.net/post/28208254393/getting-things-don...

Surely any modern complete (La)TeX replacement would be a good thing to have, but I haven't found out any yet, so LaTeX IMHO still remains one of the best choices when it comes to writing/publishing stuff.

I think that reStructuredText could be a nice foundation for some more generic writing/publishing solution, where TeX notation could be still uded for math environments (as I don't know any better one for that). Markdown is too vague, imprecise and inflexible, and CommonMark - a strongly specified, highly compatible implementation of Markdown - is not much better, mostly due to Markdown compatibility.

EDIT: AsciiDoc could be also used instead of reST.

przemoc··on The Design and Implementation of the FreeBSD Operating System, 2nd ed.
I was never into FreeBSD (I hoped to dive into it more in the past, but never done so sadly), but heard that 1st ed was really good, so the revised version quite likely shouldn't be any worse (hopefully even better). I would order it, but there are still many technical books on my shelf waiting for my attention, thus adding another one will not help in that matter.

One thing is sure, even if you're not into FreeBSD, broadening your perspective is never wrong. So I may eventually order it in the future.

przemoc··on The Future According to Stanisław Lem
Book was great, I really liked it. I haven't seen the older adaptation yet, but the more recent one (with Clooney) was IMHO terrible. Such adaptations make more harm than good.
przemoc··on Hash functions: An empirical comparison (2008)
Nitpick: You're talking about CRC32c (C of Castagnoli) - 0x1EDC6F41. By CRC32 without any additional context people usually mean CRC using polynomial 0x04C11DB7, which is much more common than CRC32c. CRC32 has also a nice feature:

"CRC-32 polynom 0x04C11DB7 can correct 1 byte error in ~1mbit[,] not that correcting single byte errors in such huge blocks is good for anything but ive found a much better one specifically 0x0D438219 which can correct one byte error in 9747877 bits" [1]

[1] http://guru.multimedia.cx/category/error-correcting-codes/

przemoc··on Why Europeans Don't Refrigerate Their Eggs
Shouldn't "Europeans" in the title be renamed to "Brits"?

In Poland we keep eggs in the fridge, be it home or market.

przemoc··on DuckDuckGo Regex Search
IIRC "security" plays important role here too, because using regexps you can much easier find sensitive data, or to be precise: context (neighborhood) of sensitive data.
przemoc··on Crow – C++ Microframework for Web, inspired by Python Flask
C++ _micro_framework using boost. Just couldn't resist to notice that. ;) (I know that boost consists of many libraries, many of them are header only, etc. so using them doesn't necessarily result in terrible bloat.)

Will have a proper look at it later.

przemoc··on 8088 Domination Post-Mortem, Part 1
Second (and the last) part of trixter's write-up on how 8088 Domination was achieved is already up there.

8088 Domination Post-Mortem, Conclusion https://news.ycombinator.com/item?id=7924928

przemoc··on A portable high-resolution timestamp in C++
What does it mean "in recent years"? Did QPC become better (and Sleep()/WaitForSingleObject() saner, as we're touching time-related stuff) in XP before EOLing? Assuming having Vista+, does it really work reliably even when called from a thread bound to only one core on various (not necessarily latest) hardware? Have you played with it under VMs?

QPC was buggy and is still buggy for many users out there. After 15 years Microsoft is likely getting closer to sane behavior and maybe in latest Windows 8 (8.1) and Sever 2012 (2012 R2) it really works reliably in different setups and loads (haven't tested it yet). OTOH "getting better" by sole die out of setups, where it was working incorrectly, is not really getting any better.

Viewpoint is important here. If you build your own infrastructure, you choose your HW/SW stack, can thoroughly test QPC behavior, then if it seems you go with same setup for your servers or what not [1]. But if you write software for all Windows users out there, then you don't have that much luxury. QPC is simply not good enough. You can always try with building some logic that falls back from QPC to lower resolution functions whenever odd behavior is detected, but unless you have HW/SW instances that you could test it on, then there is (high?) possibility you won't do it right, so maybe you shouldn't do it in the first place?

1 ms resolution at best should be enough in most cases. Increasing timer interrupt frequency from default 64 Hz (15.6 ms resolution) to 1000 Hz (1 ms resolution) indeed affects system behavior and can harm battery life, but it may be necessary evil. If we're talking about high-resolution time, then 1 ms resolution is simply that kind of thing for Windows (as ridiculous it may sound) if we take reliability into account. E.g. games, your multimedia applications and so on are already using timeBeginPeriod(1). Good news is that reportedly since Windows 8 the harm on battery is much less.

[1] But if you really have control over HW/SW stack for your servers, then you'll quite likely happily avoid using Windows...

przemoc··on A portable high-resolution timestamp in C++
Function you are looking for Windows is possibly not QueryPerformanceCounter(). It's unreliable when you consider various hardware, especially in multithreaded applications on multi-core/CPU systems. Even more if you use Windows under VM. QPC can use RDTSC(P), but it's only one of its options, and even if RDTSC(P) is used it doesn't mean anything reassuring actually.

Go with timeGetTime(), remembering about calling timeBeginPeriod(1) early (usually at the beginning of application) to set minimum resolution for periodic timers to 1 ms (well, it will happen only if HW provides that much resolution), and calling timeEndPeriod(1) after you stopped working with time (usually at the end of application). Milliseconds don't give you high-resolution, but at least working in this resolution is reliable. Having us or ns garbage is hardly any better...

przemoc··on 8088 Domination Post-Mortem, Part 1
8088 Domination is one of the examples of truest hacking and deserves to be sticky on HN. I mean it!
przemoc··on Oracle kills third-party JD Edwards reference website
Shouldn't it be "the best anti-user company"? Otherwise it sounds like the company being worst at enforcing anti-user policy, i.e. failing to do it right, i.e. being user-friendly after all.

Even better would be: "the most user-unfriendly company".

przemoc··on Mozilla's 4.5” Dual-Core Reference Phone
The rule of thumb is that screen cannot be larger than 4" to be fully accessible using thumb only. Often you have only one hand available, which makes most of allegedly "awesome" 4.5"+ smartphones inconvenient at best and useless at worst. I don't get this whole 5"+ mindset. If you want something bigger (what for? watching movies?), isn't it better to have 7" tablet while leaving your phone handy?

---

I'm user of Galaxy Ace 2 / i8160 with 3.8" screen and 480 x 800 resolution. I'll change it only for something with 1280x768, but with screen no bigger than 4". Good pixel density (i.e. ~250+ ppi) is really important for comfortable reading. And better battery is a must.

przemoc··on Finding n-th Fibonacci number in x86 assembler
Indeed, it's nothing special. I just casually submitted it without any expectations. Sorry for disappointing you upon clicking the link.
przemoc··on Ask HN: New Laptop
I know that feeling. Recently I bought new ThinkPad T430 (N1T56PB / 2344-56G). Quite expensive, but good stuff.

My previous ThinkPad R61 (NF55WPB) became defunct a few years ago, because of nVidia NVS140m internal chip failure.

przemoc··on The return of nftables
It may be just as you say. But I still think that while it's ok for Corbet to share it widely, it's not ok for just any other one. That is why submitter on HN should add comment that the link was shared by Corbet on reddit in the first place.
przemoc··on The return of nftables
I see. If it's Corbet's link, then let it go wild.
przemoc··on The return of nftables
I'm not sure that sharing subscriber's link to such a wide audience like Hacker News is really ok. LWN doesn't limit you in the sharing, but some common sense should restrain you from abusing this privilege.
przemoc··on HTML5 Piano
This HTML5 Piano has a terrible latency, at least in my Chrome 30 @ wheezy64 on Athlon 64 X2 4600+.

---

Relevant: http://www.jamwithchrome.com/

przemoc··on Just Delete Me
Good idea! And don't worry about the name and description, because they're spot on.
przemoc··on D3 3.3 Released
Thanks, somehow I overlooked that.

> You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release.

Nice. I knew they didn't turn Downloads off for good (API still works, or at least worked some time ago), but I didn't expect such move.

przemoc··on D3 3.3 Released
A bit off-topic, but it bothers me (positively). How in GitHub you can provide that kind of tag summary? Is it part of tag message? (There are even links, so I doubt it.)
przemoc··on 8bit.js: Write music using 8bit oscillation sounds
Yes, back then (2005) I didn't know about ABC nor Lilypond (which I've started using since end of 2011, month after end of my music prototyping Ask HN thing: https://news.ycombinator.com/item?id=3089259, which will hopefully get some follow-up in the future).

To be honest, today I would slightly change my notation, to make it more readable, consistent and friendlier for English-speaking people:

  OTD[.]
  O - octave: [0-9]
  T - tone: C,d(es),D,e(s),E,F,g(es),G,a(s),A,b(es),B,P(ause)
  D - duration: [0-9A-Z] meaning:
                breve (double whole note) // for D==0
                1/D note                  // for D!=0
  . - dotted note, changes duration to:   // d - duration
                d(2 - 1/2^n)              // n - number of dots
Same fugue would start like:

  4A8 4G8 4A8 4F8 4A8 4E8 4A8 4D8 4A8 4d8 4A8 4D8 4A8
which is so much more better...

Why I didn't do it like that from the beginning? No idea...

przemoc··on 8bit.js: Write music using 8bit oscillation sounds
It was IE5 AFAIR.

EDIT: And to be precise, XMLHttpRequest is Mozilla's naming that came later (after Microsoft's interface name: IXMLHTTPRequest). So you meant: ActiveXObject("Microsoft.XMLHTTP")

przemoc··on 8bit.js: Write music using 8bit oscillation sounds
I like the idea, but providing the notes is extremely tedious here. In my old PCSpk (PC-Speaker Server & Client) I made up following notation (excerpt from README):

  first 3-digit number is integer - tempo (bpm)
  next are space seperated values TOL, where:
  T is letter - tone: C,d(des),D,e(es),E,F,g(ges),G,a(as),A,B,H,P(pause)
  O is digit - octave: 0-9
  L is digit/letter - length: L=0-9,A-Z <=> 1/(L+1)
J.S.Bach - Fugue in D minor (fragment):

  240 A47 G47 A47 F47 A47 E47 A47 D47 A47 d47 A47 D47 A47 E47 A47 F47 A47 A37 A47 H37 A47 d47 A47 D47 A47 d47 A47 D47 A47 E47 A47 D43
I've written also Siemens ringtone converter to above format in gawk (GNU awk).

http://git.io/siemens.gawk

EDIT: I just realized that you may wonder what is H there. For conciseness I'll quote Wikipedia on that matter http://en.wikipedia.org/wiki/B_(musical_note)

> However, in Germany, Central and Eastern Europe, and Scandinavia, the label B is used for what, above, is called B-flat, and the note a semitone below C is called H.

przemoc··on 8bit.js: Write music using 8bit oscillation sounds
I don't like the comparison, because IE6 wasn't really ahead of its competition, yet WebKit simply gives you possibility to play with new APIs and not-yet-finished "standards", without waiting for them to become official standards (and already existing implementation helps to improve/fix them before getting final version).

I haven't checked that this is the case (i.e. whether making it work in Fx would be huge burden or even impossible), possibly not. Anyway, just saying.

przemoc··on Hall of API shame: Boolean trap (2011)
Boolean parameter can be useful (for DRY-ness, etc.), but to prevent any misunderstandings, I almost always introduce descriptive constants in such cases:

  const bool SOMETHING = false;
  const bool OTHERTHING = true;
and use them strictly for such parameter.

When there is a default parameter value, sometimes even only one constant can be enough (for non-default variant description).

← PreviousPage 2 of 7Next →