skysight-inc/HackerNews huggingface dataset:
Repeat after me: UTF-8 is the sane default in this day and age. This is a good change.

The whole "the ISO 6429 C1 control code 'application program command'" thing is a bit surprising though. (I'm guessing this change doesn't actually avoid this directly? If you sent an APC it'd still do it, it's just that APC is multiple bytes in UTF-8, and hopefully a bit rarer?)

> Reinterpreting US-ASCII in an arbitrary encoding

This way will likely work — at least, I thought. The vast majority of encodings are a superset of ASCII, so reinterpreting ASCII as them is valid. The only one I know of that isn't is EBCDIC, and I've never seen it used. (Said differently, non-superset-of-ASCII codecs are incredible rare to encounter, so the above assumption usually holds.) (The reverse, reinterpreting arbitrary data as ASCII, is not going to work out as well.)

Though it is rather horrifying how easily it is to dump arbitrary data into a terminals stream. Unix does not make this easy for the program. The vast majority of programs, I'd say, really just want to output text. Yet, they're connected to a terminal. Or better, if perhaps a program could say, "I'm outputting arbitrary binary data", or even "I'm outputting a application/tar+gzip"; the terminal would then know immediately to not interpret this input. And in the case of tar+gzip, it would have the opportunity to do something truly magical: it could visualize the octets (since trying to interpret a gzip as UTF-8 is insane); it could even just note that the output was a tar, and list the tar's contents like tar -t. If the program declares itself aware, like "application/terminal.ansi", then okay, you know: it's aware; interpret away.

But it doesn't, so it can't. Part of the difficulty is probably that the TTY is both input and output (not that the input can't also declare a mimetype or something similar). And the vast majority of programs don't escape their user input before sending it to a terminal; it's like one giant "terminal-XSS" or "SQL-injection-for-your-terminal". And it is probably unreasonable to expect it; I don't really know of any good libraries around terminal I/O; most programs I see that do it assume the world is an xterm and just encode the raw bytes, right there, and pray w.r.t. user input.

catting the linux kernel's gzip into tmux can have consequences from "lol" to "I guess we need a new tmux session".

It was also just today that I discovered that neither GNU's `ps` nor `screen` support Unicode, at least, for characters outside the BMP.
I don't think 49 "looks like a prime", because it's clearly 7^2. But I hadn't realized that the other perfect squares are obvious non-primes for other reasons, ie. because of 2s, 3s, and 5s. Neat!
Not that I know of, but it shouldn't take long; there's not much source!

$ git ls-files src/clj | xargs wc -l
109 src/clj/safepaste/api.clj
41 src/clj/safepaste/core.clj
97 src/clj/safepaste/css.clj
23 src/clj/safepaste/expiry.clj
36 src/clj/safepaste/home.clj
306 total

$ git ls-files src/cljs | xargs wc -l
22 src/cljs/deps.cljs
44 src/cljs/safepaste/core.cljs
73 src/cljs/safepaste/dom.cljs
97 src/cljs/safepaste/remote.cljs
236 total
Google Fiber is already under construction in Salt Lake. +1 for Utah--not just Salt Lake, but Ogden and Provo as well. An awesome startup scene, and very low cost of living. Plus SLC is the only city within a few hours of some of the best skiing, hiking, and red rock in the country.
Knee strength is not an absolute. Start working on strengthening it. Have a 5 year plan. Sign up to r/progresspics on reddit. You'll be amazed at what you can do over the long term. You owe it to your body. It's all you really have.
And some have the gall to ask Bernie Sanders how he would find the money to pay for free college education ($80 billion). The American government DOES NOT represent the American people. They ONLY represent corporations who financed their campaigns.
What's up with engadget website?
> Direct programming JavScript in a browser is dead

Wrong. There will be times where you're not the one who decides the stack. If you're thrown into a legacy codebase, where's your Babel now? If you're thrown into a framework like Wordpress, where all you need is bits of jQuery, would you really need a full-blown transpiler setup?

> npm allows you to include various libraries in your code and it's not restricted to node.js - you can include them in your browser apps too.

You missed the part where 1) You're not in control of npm's directory structure (they're always in node_modules which is always beside the package.json) and 2) Most setups using npm in the frontend use some form of build phase, which may not fit on all projects.

> do not do any programming in JavaScript without a first class IDE.

Not really. A sufficiently plugged Sublime Text can do almost the same task. Just add in Sublime Linter, Sublime Linter ES Lint, HTML Prettify (which also prettifies JS and CSS), a correctly configured .eslintrc, .editorconfig, .jsbeautifyrc in the root of the project and we're in business. With that, you have error reporting and code formatter. That takes care of the trivial stuff. Everything else, discipline.
My bad, I meant for a variant of the question that uses chars and not numbers. With numbers the hashmap will be still constant memory just like you said, but it's a big constant (2^32) - but still O(1) memory. This is because the input is of ints, and it can only be one of ~2^32 numbers for either values or keys. And since we only count the number, we don't need a map, we can just use a set (a map with boolean value true if the element is in the set) we add to the set and remove when we see the element again, the only element left is our non duplicate item. But the max we can have is sizeof(int)/2-1 duplicate numbers + 1 non duplicate, so memory can't be more than a constant.

In the char variant, the worst case number of keys in your hashmap is the total number of chars in Unicode. You can't have more than that no matter how big is the input.

So both cases are a very, very big constant, but still a constant.

Time complexity however is theoretically unbounded as you can have any size of input, but again, this is limited to the max size of an array, so TECHNICALLY the time complexity is an integer in Java at most 2^32 as well.

But I would not risk saying that in an interview, O(1) memory will pass, saying O(1) time because the size will never be longer the the max array length sounds more risky.

if it's an int though, it's an O(1) and O(1) memory if you really want to be technical. So are all interview questions involving an array of integers I guess :)
Did you do the test blind? i.e. Did someone give you the problem without you knowing/hearing it before? If you wrote the problem, or even heard it before you had to solve it, you had a big leg up on someone who's never heard it.
Whatever assurances they can give you today cannot be generalized to tomorrow.
Snowden. He's viewed as a hero and a traitor by different people.
> wouldn't that mean you could read it back the same way you wrote it

Not if there's a write-permit fuse as well =)
Join me in Myrtle Beach, SC! Cost of Living is ridiculously low, right by the ocean, big city amenities, due to the short summer tourist season.
Great weather, inexpensive flights to Northeastern Cities. I outline some of this on the (now out of date) http://WhyNotTheBeach.com site.
Getting a "Won't be" assurance is probably going to be next to impossible. Anything could happen in such an unspecified amount of time. A "isn't currently intended to" would likely be easier to get.

That said, with so many viable missile platforms, why would Blue Origin be used for that?
Why not just say 'I run 3 miles every day' if you're American? Saying 5k (also 10k, 1600m, generally any metric units) implies a race or hard workout.
This writeup (found a few pages into the thread) explains things in a little bit more detail for a newcomer. https://niginsblog.wordpress.com/2016/03/07/new-spaceship-sp...
Its almost an eerie feeling of these companies having the potential to last "forever".

common health technologies freeze me now and wake me up in 400 years please.
I've been eating mostly in the 5pm-10pm window for the last 6 months after watching a few TED talks and related videos. Adjustment took about a week or two. I don't feel hunger during the day but when u get home I eat all I want. Lost 10 kilos and am feeling great. Every other morning I go for a 4K run and every day I go for a swim in the ocean. Don't feel any hunger after the run or swim.

I cook breakfast for my family a few times a week and have no cravings while smelling or handling food.

The good things about IF are

- more free time - breakfast and lunch can be spent having fun

- no 3.30itis after lunch - productive all day long

- less money spent

The bad:

- socially awkward. Most social gatherings involve eating. All celebrations are eat-feasts.

All in all it's a positive experience and feels more natural.

I've been thinking "eat less, exercise more" for a while. But only when I started doing IF I really understood what it means: 80% eat less, 20% exercise more. And exercise must come before food - having a big meal, then going for a walk is not as good for you as doing it the other way around. Run first, eat second - like the lions do it.

You have to eat way less and exercise just a little more and your body will adjust. IF is much easier than going for controlled portions. Because "limbic hunger" (look it up).
everybody here is crazy
I agree, but take a look here: SpaceX was established 2 years later than Blue Origin, with principal sponsor's net worth may be an order of magnitude less; yet today's SpaceX achievements, I think, are more serious overall than Blue Origin's.

Having a realistic, incremental long-term plan may be not enough to remain relevant in the market, if the latter shifts fast enough. Would you say Lockheed and Boeing don't have have a realistic plan? Yet their lunch is increasingly eaten by competition. It's good they actually adapt their plans.
Trick: add up digits, if they are divisible by 3 so is the number. In this case 117 yields 1+1+7 = 9, and sure enough so is 117. (117 / 3 == 39).

https://en.wikipedia.org/wiki/Divisibility_rule#Divisibility...
I agree that this scoring is a nightmare, and it should be a warning, but I also think this kind of score would cause economic problems. If I understand, credit ratings would depend partly/mostly on correct political expression. Now China's credit rating system is pretty worthless. Nobody can issue a sound loan. There may be other consequences in the same vein.
There's an interesting point here. I suspect we would both agree that "driving has become safer in Colorado" because more people are choosing to be stoned at home, instead of drunk on the roads. However, I think there are still a lot of people stoned on the roads, and that driving would become even more safer if we could deter that through reliable detection. But it's possible that would be a wash or have a negative result due to re-tipping the scales in favor of being drunk and potentially driving. Obviously, that hasn't been tested, but I think it's worth shooting for an even better outcome, rather than just avoiding an overall bad one.
Will Atlassian Ever Enable SSO with SAML?
Anyone out there fact-checking this? Maybe I missed the comment. Quoting Harris Cooper[1] (from the 2006 paper cited in the Salon article):

> "With only rare exception, the relationship between the amount of homework students do and their achievement outcomes was found to be positive and statistically significant."

Yeah so let's ban elementary homework, amirite??

> "Kids burn out," Cooper said. "The bottom line really is all kids should be doing homework, but the amount and type should vary according to their developmental level and home circumstances. Homework for young students should be short, lead to success without much struggle, occasionally involve parents and, when possible, use out-of-school activities that kids enjoy, such as their sports teams or high-interest reading."

I'd need to track down the whole paper to know for sure, but his attitude here seems to advocate 10 minutes of homework (varied topic, positive, etc.) for elementary school kids, in addition to the 20 minutes or so of reading time they should have. This is what I see at the elementary school (public) where I teach. And I think it works well.

Are we really railing against 10 minutes of homework for an elementary school kid? I need this time - to check in with my kids when they finish and talk about the answers together.

[1] http://today.duke.edu/2006/03/homework.html

EDIT: Here's another synopsis of the same group of studies, but backed with some actual data, along with recommendations for how homework could be more effective.

http://www.ascd.org/publications/educational-leadership/mar0...
Myrtle Beach, SC.

Unlikely place.

Cost of Living is ridiculously low, right by the ocean, big city amenities, due to the short summer tourist season.
Great weather, inexpensive flights to Northeastern Cities. I outline some of this on the (now out of date) http://WhyNotTheBeach.com site.

There's no tech scene to speak of. So you have to be a remote worker to get the value. I maintain a list of remote job opportunities: http://LX.tc/positions

Interestingly it's growing organically due to people having their parents retire here. And then either needing to move here to take care of them, or just discovering the city when coming to visit.
I love breakfast too... I just eat it for dinner :-)
Hacker Dojo morphed from a hacker space to a commercial co-working startup for that reason.

This is false. Hacker Dojo is a non-profit, and many members and those on the board are passionate about its future. The Dojo has the best rates in the Bay Area ($100 for non-work hours and $195 for 24/7 vs. $300 avg for SF/SV). There is a maker-space with a laser cutter on the way, and an electronics area that Woz only wishes existed back in his day. There are several events each day, including tech meetups and educational classes.

Dojo rents out some of its space to bootcamps and startups. Why? To meet its fundraising goals. In May, Dojo will move from Mountain View to Santa Clara; however, several members are interested in buying a building in the next couple of years assuming commercial real estate experiences a down market. I assure you, there is nothing "commercial co-working startup" about it. It is and will continue to be a community-focused non-profit. The board members wouldn't allow otherwise.
Just replying to point out that the grayed out comment above is the correct one.

There is ugliness in coreutils, but it mature, functional, proven ugliness. A lot of it is even there for a reason.

It's not difficult to make an elegant toy in isolation.
Well 1) it took us 5 years to get those features, 3.0 just broke shit and ran slowly for no discernible benefit to the end user.

And 2) I know of no reason those features couldn't be implemented in Python2 other than "we don't want to, because otherwise few people will ever upgrade to 3"
The obvious question is how would you implement that. You might argue (as you should) that git has closer semantics to a filesystem than version control. But actually implementing this sharding would require git be a kernel module. Hardlinks and softlinks won't save you because they are both still dentries and thus have the same performance pathology. Maybe you could do it with fuse, but what have you gained by making your version control system even more annoying to use?
Given how much mindshare atlassian have got in the enterprise market, it is amazing they can't be bothered/organised enough to implement this.
Because lazy! At least mostly. Also we don't have shower facilities at work, so during summer (I'm in Sydney, so summer hasn't quite ended yet) I end up quite sweaty riding to work.

I do have a non-cheater bike as well, I ride it more when it's cooler (but I'm still lazy, so...) More exercise is the plan. Executing on that plan isn't always successful.
Popular paper by famous longevity researcher gets mega-correction
>> The most prominent example is playing instruments. Like half of kids learn to play an instrument at some point, but hardly any of them keep up with it when they are adults.

Why do you think so many fail to keep up with an instrument as an adult? Oh that's right, upon entering adulthood we figure out that we have to dump 40+ hours into earning pennies while the company we work for earns millions.

Earning even a basic income is the real time sink. What most people do all day long, at least 5 days a week, is the real busywork. Society would be much improved if every adult spent a good chunk of their time in the arts. Yet we continue to pretend that if every adult doesn't spend 40 hours doing corporate busywork that the economy would fall apart.
US citizens getting worried about China's finances and growth are akin to peasants getting worried about the finances of noblemen.

Right now the US Congress is seriously considering giving corporations a "tax forgiveness" to the tune of $400 billion. When US citizens are abroad, they have to pay US taxes even if they haven't set foot on US territory for years. That rule doesn't apply to corporations. Do you find that fair?

The establishment media continually fools US citizens by giving them distractions such as: "China is crashing!!!" - "Chinese growth is going down!!!" - "Corruption in China rampant!!!" - "China preparing for WAR!!!"

Easy distractions like these have only one purpose: to distract US citizens from noticing that they are being defrauded by everyone they put in charge to run their country. It's as simple as that.
Software Allows Hackers to Activate MacBook Webcams Without Green Warning Light
I agree with you - its irrelevant to the discussion at hand.

What I am merrily pointing out is that as china moves from a export oriented country into a service based economy, Reducing its import/export is a target . Since their own leadership wants china to transition to a "new normal".

China has a huge cannon ( in terms of controlling a vast amount of humanity's capable hands ). It seems now instead of using it to awash the world with manufactured good they are refocusing it on services.

Measuring output from services is extremely hard - since its investment in human capital, rather than physical goods.

The point I am trying to make is that this is a good thing. It means their is going to be investment in law,education,fiance,software,intellectual property,health-care ...

This will give breathing room for other developing countries to take up china's slack and allow china to innovate in the place where it really helps humanity move forward. We all want cheaper healthcare and cheaper education.

TL:DR good news !
I can't seem to find any posting by GitHub saying "yes! please use our free service as your git-based package manager's backend!" Advertising "host your code and assets with us" doesn't suddenly mean that it's justified to say "fuck it, GitHub can be our CDN".
A technical scheme for “watermarking” intrusions
There's a correct place for every class of input validation. The point is that you don't want multiple levels of input validation for the same thing. Most of what passes for "defensive coding" is superfluous. For example, if you are passing a pointer into a function, you don't need to reflexively null check. However, null checks are important.
All homework for kids is utterly stupid. Adults work 8hrs and come home and are free. Asking kids to continue working throughout the night is freaking stupid. Whoever thought this up was asinine. The only reason teachers assign homework is because they are brainwashed and believe it's just part of life. It doesn't have to be. All it does is make kids less and less interested in perusing learning.
You might want to read this before you get too far into it.

https://medium.com/cuepoint/the-music-startup-meltdown-cd2f7...
It's a pretty fiddly thing, and took me a while to work out too.

Are there specific things you're having a hard time understanding? I'd love to explain and/or update the post!
Could you possibly post the importer? I'm interested in replicating/learning from this. Thanks!
Would you consider putting your ideas for Python in my Python 4 project on github? https://github.com/rjurney/python4
BTW - Anand is a security engineer working for Flipkart and is one if India's smartest security experts. This is not the first time he has found bugs.

http://yourstory.com/2015/10/techie-tuesdays-anand-prakash/
Any number whose digits sum up to a multiple of 3 (3,6,9) when summed until 1 digit remains; is a multiple of 3. Could this be something useful as a quick check for qualifying numbers?

I don't have any Assembly knowledge, but I presume that it wouldn't be efficient implementing this, because of having to cast to string, then back from string for each digit. Then the while loop to sum each digit.

Running the check only for odd numbers could also be an improvement.
Ah, no shit. Had no idea BugHerd was down here too. I use them.
Instant Logo Search
You will need to write a lot before you even start solving the problem.
checkout the different implementations of echo across various operating systems: "https://gist.github.com/dchest/1091803".
Holy shit Grothendieck died in 2014, I NEVER MOURNED HIM. How did this happen?
In my experience it's impossible to enter "flow" in a task unless I've practised to a certain level of automaticity. After that it becomes effortless and very rewarding.

It's not so much about memorising facts for recall (boring!) but training the mind for automatic action. Like offloading the grunt work to a subconscious co-processor and letting you focus on the bigger picture.
Permissions Given to Sri Sri Ravi Shankar's Art of Living Mega Event Were Vague
I gave up on paying any attention to the sport of cycling years ago. Everybody who was winning or did something awesome turned out to be cheating. Seems like that hasn't changed at all.
> At least in the traditional technical interview, interviewers and candidates tend to be roughly equally invested in the interview process in terms of time spent

Not really true unless you go to your interviews completely unprepared :-)
Show HN: Ecks.pl, a handy little tmux wrapper in Literate Perl
Flickr’s desktop auto-upload feature is no longer free
It's like metric vs. imperial. I think you'll find that Asia, Australia, New Zealand, UK all use pawpaw for one fruit.
I guess even with emojis, it's hard not to make tone ambiguous.

...probably especially with emoji.
> may be not enough to remain relevant in the market

You're forgetting that there isn't actually a market here. There is currently no commercial service that brings you into space.
This article addresses the concept very well:

http://www.leangains.com/2012/06/why-does-breakfast-make-me-...
I think it's also important to mention that you should come in with some good questions of your own that you've prepared for them. A lot of times the interviewer uses this to see how much homework you've done on both the company and the job you're applying for.
But isn't that just because of the bus schedules?
https://www.reddit.com/r/debian/comments/3k3fzm/bad_battery_...

Is a general overview. Intel graphics cards almost never enter the lowest idle state in Linux, last time I checked.
Yes, that's what it looks like from here on the ground.
(I'll pretend to defend myself and say I meant zero mod eleven. :) )
Ah that makes sense.

And what was the intended solution for finding if an unsorted list of numbers is an arithmetic series in constant memory? You say it's the same xor trick, but I don't see how it's applicable. Do you xor all the values with all the values shifted over by the common difference?
True Object-Oriented and Immutable Java Web Framework, 0.32.5 Released