Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions

mqudsi on most sites.
Submissions

comment 10y ago · link · parent

I agree with you 100% and then some. Unfortunately (and you can probably see this by going back and looking at the commit history, <3 open source and version control!) you have no idea the number of emails I received about this being an "incomplete solution" and "incompatible with porting existing Win32 code" because of the lack of PulseEvent.

From the README:

    -DPULSE: Enables the PulseEvent function. PulseEvent() on Windows is 
    fundamentally broken and should not be relied upon — it will almost 
    never do what you think you're doing when you call it. pevents includes 
    this function only to make porting existing (flawed) code from WIN32 to 
    *nix platforms easier, and this function is not compiled into pevents by
    default.

comment 10y ago · link · parent

They cleaned up the MSDN pages (which seems a huge and sad loss of historical data - they should include a history section like man pages), but have a look at the Japanese page:

https://msdn.microsoft.com/ja-jp/library/cc429076.aspx?f=255...

It mentions it's supported on Windows 95 and NT 4.0

(On a side note, I'm completely baffled that the metadata for MSDN is not locale-independent In their documentation generation engine/system. I would have thought only the page text would change from one language to another.)

comment 10y ago · link · parent

Yup. But with a massive warning label and the need to explicitly define support for PulseEvent with a compile-time definition :)

The number of bugs uncovered when switching code to not use PulseEvent() is rather humbling!

comment 10y ago · link · parent

Just because synchronization primitives are pretty low level so it would be nice for it to compile as C code. I should just expose the API without name mangling, I suppose.

(I forgot to add: the library is also free of spurious-wakeups, which I feel is massive gotcha in pthreads.)

comment 10y ago · link · parent

Thanks for posting this to HN. I originally published this some time ago when porting a heavily-multithreaded library from Windows to Mac and Linux. It should run on Windows/Linux/Mac/FreeBSD/etc. and it's been vetted and tested over the years. I even came across some backtraces from Steam's Mac/Linux app that indicated they were using my code a few years back, so there's that.

I'm a bit ashamed that I opted to write it in C++ originally. It doesn't have much in terms of standard library dependencies (just dequeue), but in the process of porting it to C I decided to also change how the inner notifications system works with regards to the cleanup of allocated memory for completed waits and now I'm stuck on a particularly nasty decision of whether to add a mutex, use reference counting, or let memory grow until an event is destroyed... and so the code is still C++ :)

comment 10y ago · link · parent

Technology gets cheaper (and more advanced/capable) over time.

comment 10y ago · link · parent

> It would be nice if it wasn't.

Since you're being pedantic, you might want to go back and change that to "weren't" instead of "wasn't," as it is a hypothetical supposition. (And yet, I agree with you.)

(please no one comment on the comma inside the quotes. I think we're at this awkward point in grammar history where we're seeing a transition from "all punctuation must be inside the quotes" to "sometimes it really really doesn't make sense for the punctuation to be inside the quote, especially if you're not quoting a person saying a full phrase.")

comment 10y ago · link · parent

I don't think it did. Phone numbers are not included in the length of SMS messages - the destination is separate header data that is used in routing and not considered part of the message body. If I sent a message to a special "four digit" phone number or to a full 10-digit number, or even an international text message (not mms) with 40 digits in the address, the message length is not in any way shortened as a result. (Of course once a UDH is needed to deal with message concatenation, etc (which never really work, anyway) the limit is reduced to 153 characters - still longer than twitter's (lame) limit, in all cases.)

The whole "we need twenty characters to set aside the destination" was such a hollow rational that never made any sense. IIRC, it was revealed at some point that the 140 character message limit for tweets was basically the result of someone sitting down and doing a brief, informal testing of whatever they thought to be "the average sms message" and that's the number they ended up with.

comment 10y ago · link · parent

What I find stupid is that the length of usernames counts in the message. A message to @myfriend can be longer than a message to @myfriendblessednaycursedwithalongername

comment 10y ago · link · parent

What's the hardware compatibility like? If you're open to it, there is a market for something that will boot with the bare minimum non-specialized generic drivers on all hardware into a shell or some form of UI.

comment 10y ago · link · parent

Obviously people still are, or else commercial desktop software would no longer exist/be maintained. Not being snarky, just saying it's a non-question (and that our company certainly is a "we do" response to your post).

comment 10y ago · link · parent

This couldn't have come at a better time (for me). I'm playing with a genetic programming library to recreate images from some basic rules and I've been really unhappy with the fitness equality functions I've been able to find. This looks like it may have been made for the job.

5833.

Unmasking Modi: The New Face of India(newrepublic.com ↗)

1 points · by ComputerGuru · 10y ago · discuss

comment 10y ago · link · parent

Until one db is hacked and everyone in the world knows your master password.

5835.

Man failed for refusing to decrypt hard drives(bbc.co.uk ↗)

7 points · by ComputerGuru · 10y ago · 1 comment

comment 10y ago · link · parent

I don't understand - DTLS is covered in depth in the article (as are your or concerns)

comment 10y ago · link · parent

OS X tells me my battery needs to be replaced on my 15" rMBP, it's apparently at under 80% charge capacity now.

According to "System Information", I've done a mere 359 cycles - and according to their website, "Your battery is designed to retain up to 80% of its original capacity at 1000 complete charge cycles." [0]

Of course their warranty on defective batteries conveniently runs out after just one year. I've been meticulous about only charging it with genuine ($80+) chargers, including at home, at work, one in the car, and one in the carry-on. Someone should tell them about this new tech.

0: http://www.apple.com/batteries/service-and-recycling/

comment 10y ago · link · parent

Yup. At the EagleWorks lab which many people confuse as not part of NASA (though it very much is, and exists for testing exactly stuff like this)

https://en.m.wikipedia.org/wiki/Advanced_Propulsion_Physics_...

comment 10y ago · link · parent

Testing HN's Unicode support here (and your browser's)...

Edit: And it failed. I tried the emoji for the record: http://emojipedia.org/clapping-hands-sign/

comment 10y ago · link · parent

This obsession with react/electron/etc for the desktop is ridiculous. The OP acknowledges as much in the title ("secure" - what do you mean, it's a text editor, isn't it? Oh, because they decided to go "all web" for this!).

Use MacDown on OS X http://macdown.uranusjr.com and MarkdownPad on Windows http://markdownpad.com

I don't have any recommendations for Linux, unfortunately.

Then again, the whole point of Markdown is that it's basic plain-text syntax that can be prettified as HTML. Its entire raison d'être is that you _don't_ have to learn (or test) another markup language, but whatever.

5841.

Tomorrow's buildings: Is world's smartest building also the greenest?(bbc.co.uk ↗)

3 points · by ComputerGuru · 10y ago · discuss

comment 10y ago · link · parent

Modern versions of Visual Studio allow you to configure your project as one of ASCII/UNICODE/MBCS. MBCS (multi-byte character set) is UTF8 compatible. TCHAR becomes char (instead of the usual wchar_t) and most APIs you call via their once-ANSI names (e.g. CreateFile being #ifdef'd to CreateFileA) will actually accept UTF8 instead. Unfortunately, APIs that were created when ASCII was declared dead and without an xxxxA counterpart still need manual mapping to the xxxxW functions instead (which is just plain stupid on MS' behalf).

comment 10y ago · link · parent

Not really new, research came out 10 months ago, discussed here on HN previously with 131 comments (but it is incredible):

https://news.ycombinator.com/item?id=9647253

Full link to the original study: https://www.dropbox.com/s/2mmdmty3nxfe5u8/2015-louveau.pdf

comment 10y ago · link · parent

I don't know if it's because I convinced myself a long time ago that I'll never be smart enough to write correct C/C++ code (though that hasn't (yet) stopped it from being my primary development language) or if it's because I just because I'm a secret masochist, but I disagree with this proposal/suggestion.

Regardless of who is right and who is wrong in this matter, I think if everyone took a step back we could at least agree that it makes absolutely no sense to fix this on a (single Linux) distribution level. For Debian to configure/patch compilers on their platform to "narrow" undefined behavior is insane and ineffectual. Software isn't "validated" on/against a particular OS, it's validated on a compiler basis.

Breaking this assumption introduces a massive schism. While Debian is an amazing distro with plenty of clout (I'm a FreeBSD guy, but Debian comes second), it's terrifying to imagine a new generation of "cross-platform" C/C++ software that can only be verified working on Debian (or with Debian's fork/re-configured compiler). We've come so close to making truly cross-platfrom C++ code a reality (even bringing Windows, I repeat WINDOWS, into the fold) with C++11 (and the subsequent releases) and it's, in my humble opinion, utter folly to try and change the way code will fundamentally compile depending on the distribution you run.

If Debian cares, make a proposal to the C++ committee, bribe^H convince members to see their way (or threaten^H blackmail^H show them the dangers of continuing down the road they're on). Heck, fork C/C++ and call it E or C+++ or c-safe or something - or more reasonably - write a tool to convert C to rust or D-without-the-standard-library and announce only tools in that/those languages will be allowed in the standard distribution. But for Heaven's sake, please don't try to redefine C.

comment 10y ago · link · parent

In response to everyone asking about open standards and standardized platforms, there's already an open standard for networked IP cameras and it's called onvif, run by a non-profit organization (for what that is worth). There are open implementations for OnVif and virtually all cameras shipping from China already support OnVif.

comment 10y ago · link · parent

What poor writing! I've come to expect way better research and analysis pieces from startups about their domain (think articles like BackBlaze on drives, OKCupid on dating and socio-economics, Google on the web, etc)

The'most unusually popular car by city' was rather poorly described and I think the results reveal that it was not a very proper query, as the 328i is hardly an 'unusual' car by any means (New York)..

The article mentions the extreme loyalty of the Midwest to buying American but makes no mention of the fact that the biggest city in the Midwest (Chicago, obviously) has only 51% American ownership. No mention of age of vehicles, which is very odd.

5847.

China's 'Great Firewall' blocks its own creator(bbc.co.uk ↗)

2 points · by ComputerGuru · 10y ago · discuss

comment 10y ago · link · parent

Hey Robert! I've had your virtual memory article open in a tab since it made the HN homepage recently - but I had to close it because every day it would cause a massive memory leak in Safari for some really odd reason. I'd repeatedly kill the process hosting the webpage (it'll respawn 3 times then surrender) but every time I visited that tab by accident it would happen again.

Just an FYI :)

1
194195196
277