skysight-inc/HackerNews huggingface dataset:
>
You can map them into higher level constructs that basically are a kind of reference counting on top of GC.

> For example, multiple threads sharing a socket connection. Just create a barrier and have a cleanup thread closing the socket when everyone joins.

Nobody's saying you can't do it. But RAII makes it way easier.

When you implement reference counting manually, you'll find that you want something like a copy constructor, so you remember to bump the reference count every time a new instance of the object is assigned. Then you find that you'll want the compiler to automatically drop reference counts when the object goes out of scope, so you don't forget. Then you'll find you want move semantics, to allow transfer of references without adjusting the counts. You'll discover you want the correct behavior in the presence of exceptions. In short, you want RAII.
RAII in C++ solves the same problems as ARC in Obj-C, just don't use raw pointers but smart pointers. But having said that, both approaches are bad. ARC is sort of a crutch in Objective-C because objects are usually (mostly? always?) created on the heap (C++'s equivalent would be new() or make_shared()), but in C++ it is possible (and good style) to minimize this type of 'fine-grained' heap-object usage as much as possible, otherwise you have this huge soup of tiny objects all over the place and a lot of pointer-chasing and cache misses, good luck getting sensible performance out of this mess. It's usually a broken C++ coding-style like this when Java-, C#- or Objective-C benchmarks can claim that they are 'even faster then C++' ;)
Show HN: Recurring tweets for Dynamic Content
Hi all,

Flutter makes it possible to tweet out, on a recurring schedule, any dynamic content on the web. On a previous project, I wanted to automatically tweet out the oil price on a recurring schedule. Yes, I could have built a one-off solution for this but I thought it might be cool to make it a generic reusable tool. I think it has some potential as a type of growth hacking / social media automation tool but would like to see what everyone else thinks.
...and irix at the other end of the spectrum.
What % of jobs do you think people would do even if they didn't need the money?
Go support? You can run binaries on lambda, as long as they're small enough.

http://blog.0x82.com/2014/11/24/aws-lambda-functions-in-go/
>I'm more inclined to blame the horrible 30 year old UNIX APIs than python.

Datapoint: I encountered the same thing on Windows, having to use the Powershell equivalent of `killall python` to deal with it.
The Lego machine
> All reported cases where the user consumed greater than 5 g/day reported symptoms of the lower urinary tract.

That only implies that if you do 5g/day, you will with near certainty get urinary tract problems. You can definitely get get urinary tract problems with much lower dosages.
Oodle LZNA: Compresses better than 7z/LZMA, 2.5x faster decompression
Show HN: Pure functional lenses in Racket
Is Kickstarter covering up a scam? An open letter to CEO Yancey Strickler
So is it one machine making a cube or three independent ones close together?

( the way the video are cut point to the latter, I think )
That works, but what if there are thousands of comments? Initializing N*M AR objects could be even slower than N+1 queries.

I wish if we could do something like:

has_one :approved_comments_count, -> { select(:post_id, 'COUNT(comments.post_id) as comment_count').group(:post_id) }, class_name: 'Comment'

and

posts.includes(:approved_comments_count).map(&:comment_count)
Any garbage collection algorithms (of which reference counting algorithms is a subset) for C/C++ need to deal with the fact that it is not possible to do a fully generic gc for C/C++ without either a) being conservative (that is, you will miss out on some memory) or b) putting additional constraints on the developers that the language doesn't.

So yes, you can do ARC for C/C++, but it would need to be opt-in, and it would not be sufficient for all memory allocation in C/C++ because the moment you link in a third party library that doesn't play ball you need to do things differently.

The chosen approach in C++ has largely "smart pointers" - template classes that implement various reference counting semantics - coupled with RAII.

E.g. one part of the problem for a fully generic solution in C/C++ is that in C/C++ nothing stops you from taking an arbitrary bit-pattern and treating it as a pointer and vice versa. As an example, take BPTR's in AmigaOS - core parts of AmigaDOS were written on contract due to time constraints, and they were written in BCPL, and that's where they came from.

BPTR's were pointers that had been bit-shifted right two bits - basically BCPL was treating memory as an array of 32bit quantities. So a lot of pointers in AmigaOS are stored in memory as values that don't actually match any memory address. So one hand your compiler don't know when/where to apply a reference count, and on the other hand a generic non-ref-counting gc won't know whether or not any specific value is a pointer, and if so whether it meant to point at the actual memory address indicated by the value or if it needs to be bit-shifted.

In C this is perfectly legal. But to gc apps that do stuff like that, your gc must either be smart enough to figure out every possible pointer manipulation (meet the halting problem, it wants to have a word), or it needs explicit support from the developer.
Norway's police fired their guns just twice last year
I was a great fan of TextSecure until a few days ago. I had encouraged a bunch of friends to install it. One of them couldn't get rid of a notification from TextSecure about an unread message despite there being none, and eventually they uninstalled it. Then, for the next 4 months TextSecure blackholed every message I sent this friend without warning either them or me. They never received a single message from me. After discovering that I uninstalled it.
> a single shared view of the content

So is the lack of options to resort and reorder comments an intentional thing?

It would be interesting to hear the reasons for it and what benefits you consider it brings.
This reminds me: Generic Persistent RRB vectors should be part of every standard library. There's a great master's thesis out there waiting to be written about a similar data structure for variable length encodings of elements (such as UTF-8 strings).
>There's also a catch : if the hashcode of the string is 0, the hashcode will be recalculated every time (since the code assumes it has not been cached yet).

At least that part should be easy to fix by defining a hash function that returns numbers != 0 - even the article says they did it for JVM7 but it's gone in JVM8 - with no explanation ?
Can just bit-or 1.
That's a great concept. Care to correspond about selling?
No, it's obviously a precursor of the Voltron.
I had my SLR and mobile, but Google glass would have been more convenient.
Could. A hypothetical new language could be created to facilitate whole-program escape analysis and thus completely avoid both GC and manual memory (resource) management.
A lot of drugs out there, crack, heroin, cocaine, heck, even MDMA will do damage eventually if you use it in large enough doses. For that matter, legal drugs like smoked cigarettes and alcohol have long time negative consequences with regular use.

I agree with the parent, this whole desire to vilify the monster-du-jour sometimes gets out of the hand, with the MSM frequently playing the willing companion to whatever government propaganda of the day is in vogue.

Can these drugs do damage if abused? Yes. So teach people not to abuse them, and, those who do, or become addicted, have medical issues that should be treated as such.

I'm willing to wager that not only would drug abuse come down, as light was shone on addicts rather than making them hide in the dark, but we'd also see reduced prison populations, and entirely eliminate a major source of income to criminal gangs.

This is probably the 1 Billionth+ time someone has made this argument on a forum though, so I don't hold out to much hope until the winds of sanity for, whatever strange reason they do, blow in that particular direction.
Agreed. Is there a mirror somewhere? Anyone running uBlock probably won't be looking at this project.
The First 30% – Distilled Wisdom from Startup Experts (eBook, Pay What You Want)
No this is bad advice in general! It causes the objects to permanently escape, with the knock-on that any objects stored in that object will also escape etc etc, and to move to the old generation. If you need objects, allocate and use them where you need them. This is more likely to allow scalar replacement, or at least more efficient collection while still in the young generation.
You know that Unity3D is the domain name for the website and the engine is just called Unity. "MVC for Unity3D" makes no sense.
I would argue that if you didn't have better tools for locating oil or determining viable research areas you shouldn't be digging/funding it in the first place because unless you have a high probability of finding something (and we've left the times of early science when there was a bunch of low hanging fruit) the cost of failed attempts will outweigh the benefits of the success stories.
Yes and they made a conscious decision to not include so much in the language in order to make the compiler fast so your criticism is rather odd. They made a choice. It results in a faster compiler. And yet your comment comes across as if this is somehow unfounded praise. Nonetheless we have all come to love your "get-off-my-lawn" sort of approach to criticising golang at this point, I suppose :)
Thanks, programmernews3 :)

DocScrutinizer05 says on IRC that neo900 will accept cash by mail and Bitcoin. And "anonymous fulfillment" (on-site pickup, I presume) for wholesale (N>50) orders. Cool. Someone could sell them for cash at conferences, etc.
Yeah, every time I read something he's written, or written about him, it's a good read. I've always considered myself good at understanding how systems work together, mainly with web applications from front (html/css/js) to back (http/app/services/sql), but Carmack does that with very low level/detailed applications... It's hard for me to imagine.
I was surprised to learn that the familiar "Kickstarter Staff Pick" badge can be used by any project and is sometimes an outright lie. That's ridiculously deceptive.
European Parliament view on EU-US trade deal
Consider it a safeguard. One one hand it can detect (some) leaks. On the other hand if/when your app leaks it can mitigate the consequences of those leaks.

For some very specific types of apps it can also be sufficient to ditch traditional C/C++ memory management, and you can actually even gain speed doing so.

Consider e.g. code that runs a job. Most of the time you know it will need less than 32MB (or whatever) total over the (short) lifetime of the process.

So you tune the GC accordingly to not trigger any collection at all until above that level. Now most of time, a collection will never get triggered, and you're happy - all the memory is just returned to the system at the end in one swoop.

But if occasionally a job requires lots more, the GC may provide sufficient cleanup to still make it viable not to include any memory management.

My first large CGI-era webapp was in C++ and relied exactly on lots of hacks like deferring all memory de-allocation until exit to improve performance (and it worked very well - it had a considerable performance impact; other hacks included static linking to drastically cut the loading cost). We didn't use a GC; instead we had to take extra care when we knew we were going to make large allocations to do manual de-allocation in those cases if the request was potentially long-running. I'd have loved to use the Boehm GC for that.
You'll find that this is true for every messenger on Android, since there is no way to detect someone uninstalling without unregistering.

TextSecure has delivery receipts so you can see when your messages aren't being delivered, and there's a web-based unregistration flow on the Open Whisper Systems website so that users can unregister their numbers if they've uninstalled.
Related: a guy trying to fix the Unity3D's broken core - http://t-machine.org.
Android Hacked Made world's first Android virus
Hi all,

Flutter makes it possible to tweet out, on a recurring schedule, any dynamic content on the web. On a previous project, I wanted to automatically tweet out the oil price on a recurring schedule. Yes, I could have built a one-off solution for this but I thought it might be cool to make it a generic reusable tool. I think it has some potential as a type of growth hacking / social media automation tool but would like to see what everyone else thinks.
FYI, the "key sticking" origin of qwerty is probably a myth: http://www.smithsonianmag.com/arts-culture/fact-of-fiction-t...
The millionaire who rescues migrants at sea
rsync isn't the complete system - you're going to need git (or another vcs) and some other tools of course.

#1 is git (dump and log the git head on a deploy)
#2 don't do that - keep a single consistent environment
#3 use the system openssl - monitor other software components for security updates -- you need to do this anyway in any of these systems.
Maintaining the Illusion of Stability Now Requires Ever-Greater Extremes
That is nonsense. We have have no idea what math will turn out to be useful in the future. To say that it has already turned out to be useless presupposes that we already know all uses we might put it to in the future, which we clearly don't.
Munich Coffees Tried and Tested
thanks (also to bane for providing the link which essentially states the same), will try that next time
I... somehow disagree with everything you are saying, sorry.
Clojure for Lispers, by Rich Hickey (2008)
Twitter: https://twitter.com/unity3d

Reddit: https://www.reddit.com/r/Unity3D

Youtube: https://www.youtube.com/user/Unity3D
Paid feature development can also work well for some types of projects. You have to be careful to not do that for too basic stuff though, otherwise you'll be seen as profiteering. It also just hinders adoption.
Thanks for the reply, Moxie. I realise I sound negative, but I do love your work. The app gave me no indication that delivery was failing. Couldn't you detect the failure when you try and forward on the message from your servers (if it is a push architecture)? Happy to give you my details if you want to look into it.
I tried TextSecure through bluestacks and captured the stream to find out that it is using TLSv1. I am a noob in computer security, but isn't TLSv1.2 more secure?
Yes but it has 350M people living in it, half the HN, Silicon Valley, and Moxie with his team. It's not honest to say the US is just another country among 200.
He's not suggesting the legalities is the primary reason it sounds strange, but that the Chinese government appears to be less than likely to tolerate a criminal organization to have weapons that might allow it to become a threat, when they don't even allow the police access to similar weapons, much less civilians.

I have no idea what situations are like with respect to weapons in China, so I have no idea whether he's right or not, but this is not just about the legality.
I'm not complaining that my PR wasn't merged :)
> Java 7 quietly changed the structure of String. Instead of an offset and a count, the String now only contained a char[]. This had some harmful effects for those expecting substring() would always share the underlying char[].

In theory they could have implemented both. Substring optimization for small but not larger strings.
Sea Level Could Rise at Least 6 Meters
Show HN: FollowPerClick-Personalized Banner Ads That Follow Audience on Websites
In chrome I can create application shortcuts... and with browser notifications it pretty much just works. I usually have pandora and slack as application shortcuts that run in their own windows... it really doesn't bug me that they run in a browser... they work as I expect them to (though not in osx iirc). I agree that the thin wrappers are a little annoying...

On the flip side, though I really appreciate that I can create more feature rich applications with the likes of nwjs or electron. There's a lot of things you can do that go a fair bit beyond just web applications in a thin shell... though most of the better ones are app centric first, and web instance second.

I do wish someone would build a nice mail client for Chrome/ChromeOS though... That part really sucks imho. I mean there's a browser based SSH client for chrome, so it's entirely possible to do.
Linkmoji: The emoji URL shortener (🍕💩.ws)
They are only talking about slow, conservative, stop-the-world collectors there.
They have to scan the full heap. You shouldn't compare apples with oranges.
see no xy, see no yz, see no zx...got it
That would been terrible and unexpected. The behaviour would differ based upon the length of the input String.
Your bitching is longer than what you're bitching about. That's the cancer.

And no, it's not pointless definitional games, the title is intentionally totally wrong. Black vs white. It's not like it's mostly right but not quite, it's almost as wrong as it's possible to be and still be using words. And it's not about pointing out mistakes, it's about calling out pointless clickbait to get it flagged and telling people how to spot it next time. You for one seem to think it's an honest mistake and a good article.

> People roaring about their ignorance and [...]

Oh, you don't say. Do they go on and on? Cluelessly unaware that everyone is looking at them? Wow.
The best thing you can do is to build a distribuite system.

Even something "trivial" if distribuite over few nodes won't be trivial at all.

After you have build it you will need to ship it, and now you can start to use docker or other container.
>But there is no reason that the RAII pattern couldn't be completely orthogonal to memory management

GC + destructors = very very messy even in languages built with GC in mind, kentonv described the whole non deterministic finalizers nicely but there are also other problems see here :

http://ericlippert.com/2015/05/18/when-everything-you-know-i...
String on its own is inefficient class. There is extra pointer, int field... ASCII strings are not downgraded from char[] to byte[]... You get big performance bonus just by replacing String with raw byte[].

I wrote Map<String,String> which does this transparently, and it consumes about 5x less memory compared to HashMap<String,String>.
NASA’s launched an app to explore Mars from the comfort of your home
Funny, but on windows/osx/ubuntu I tend to have a half dozen regularly used programs docked on the taskbar... anything else meta/win then type, and click on what I want in the list... so having apps disappear isn't so bad, except maybe for branding, and when I can't find "that app with the stupid name that does X, that I only need twice a year."
the problem is that the "independent contractor" category, as most of us know it, doesn't really exist. Nearly all "independent contractor" jobs, in the eyes of the IRS, are actually employee jobs, if you get audited.

Now, employers still want to treat employees like independent contractors, right? So what does this mean?

As a computer nerd, this means that if I work as an independent contractor for a company with a legal department, I have to go through a body shop, a company that takes 30-50% off the top, and then wants to hire me as a W2, of course, but without benefits. Which is a pain in the ass, because that means the benefits I buy for myself need to come out of post-tax money.

(Now, if you find an especially shady body shop, they will often let you go "corp-to-corp" - usually they tell you that they will be telling the client that you are a W2, as that provides better protection to the client. But you can find some honest body shops that will let you go corp to corp, especially if you can demonstrate insurance and revenue for your company that isn't you.)

Of course, labor laws are there to protect the low end, and driving is one of the most dangerous jobs that you can get in a modern economy, so I certainly agree that uber drivers need some sort of "workers comp" like disability insurance, just because their job is so dangerous.

I'm just pointing out that telling companies that they can't hire contractors directly doesn't always end up working out better for the employees.
I didn't say it's more complex, I just said more steps.

Yes, if app is planning on being more complex, sure use Angular or Backbone or Ember or React. Otherwise, don't. Your pet projects sure, use it; if my team is billing clients, I've learned from experience, you're screwing them if you're not just using basic jQuery or even raw JavaScript which is a lot better to work with these days. If your reasons are only rooted in your abstract preference of design ideals w/o looking pragmatically at the situations, you're likely doubly screwing them.

Fyi this "paradigm shift" is like 8 years old, React is not disruptive, it's just another variation.
Ryd.io – Manhattan Clustered via taxi-dropoffs
It is a pretty standard problem with people that get heavy into ketamine though.
Note takers, how do you take concise notes? What are your rules?
I think it may be my perfectionist tendencies, but I find myself wanting to note down too many things. (From books, articles, etc.)

Most of the time I understand the main idea but it's the extra stuff I have a problem with. Things that add to it, are interesting, or explain why the main idea happens. I don't know what I should NOT write.

A good example might be something to do with improving productivity. I know the actionable idea may be "Do this" but I'll want to also include the psychology and reasoning behind why it affects humans.

So, note taker, how do you take your notes? Do you have any rules you follow? What do you seek to write and purposely leave out?

(Any examples of notes you've taken from an article or something would be really helpful as well!)
> Though the command set is a little verbose I think powershell is pretty nice.

Last time I checked, PowerShell made more or less sensible programming
language, but was awful in term of command completion. If that hasn't changed,
it is still a terrible shell.
Haravan: Vietnam’s Shopify eats the real Shopify for lunch
I'd suggest that unfortunately the incentives for sites like Kickstarter/Indiegogo/GoFundMe etc are to get as many projects successfully funded as possible that that predicates against rigorous scrutiny of them and exclusion of dubious projects.

There have now been quite a few examples of crowd-funded projects that just haven't delivered and never will (Eyez was a good early example https://www.kickstarter.com/projects/zioneyez/eyeztm-by-zion... $343,000 taken in with nothing to show for it)
Teaching a machine to see: unsupervised image segmentation and categorisation [pdf]
Assuming that nothing in the thing being reverse engineered is not encrypted or protected in some fashion right?
What do you miss in GitLab that RM and Gitolite offer?
The title should say "may trigger soaking winter storms in California".
Thanks for this very informative comment. I had not thought of "close()" and "dispose()" functions as the manual operations equal to manual memory management, but on reflection this is what it boils down to.
It's not science until it can be falsified. Until then, it's merely a speculation.
Munich gets gay couple traffic lights
Microsoft Shows the Augmented Future of HoloLens
Mods, please add the missing trailing 'l' to the title. Thanks.
It shouldn't. The behaviour is specified by the external interface, and if the internal implementation is changing the behaviour, then the implementation is broken.

For example, back when I was at a JVM company, we had two string implementations, one for ASCII strings and one for UCS-2 strings; the JVM uses a lot of ASCII strings, and frequently you could figure this out at code load time. Having an implementation based on an array of bytes saved quite a lot of space, and was completely transparent.