skysight-inc/HackerNews huggingface dataset:
One key motivator for Morocco to seek alternatives to Oil, is it's neighbor and arch enemy Algeria. Think of it like USA vs Russia and their race to be the Nr 1. All the advancement in telecommunication, Space, Robotics..etc are partly due to this race. Algeria actively supports separatists in the Sahara (Polisario front) for independence. Algeria was a very rich country until the recent demise of Oil price. Morocco has to compete with a neighbor with a very big budget and a military that is buying more and more sophisticated equipment and arsenal. Alternatives had to be found. So for energy, independence is a must have for Morocco, dictated by a geo-political environment that is not stable and very volatile.
If you made a change to your .profile why wouldn't you just apply it?

. ~/.profile

Why logout and back in? You know which file was changed because you made the change.

As someone else mentioned down below, if you just need a new login shell with your variable changes just do this:

exec /bin/bash -l

(the -l meaning, "act as if... invoked as a login shell")

Also a tip if you're using KDE: You don't need to logout and back in. Just do this:

killall plasmashell
kstart plasmashell

That should apply any changes you've made to environment variables to any applications that get launched (subsequently) via KDE's usual methods (e.g. K menu or krunnner aka Alt-F2). Your running applications will remain open!
The Redis community is moving to Reddit
Meh... you don't really need tool for that.
Paying above average to reduce churn and establish long-term attitude towards career is not new, has been pioneered (or made mainstream in American industry, to be pedantic) by Henry Ford, and is now used by companies like Costco, In'n'Out Burger and variety of tech companies as a competitive advantage.
MusicJOT – music notation application for iPad
Does anyone understand their argument clearly?

For three flips I get this sample space:

TTT no data; TTH no data; THT one data point HT; THH one data point HH;
HTT one data point HT; HTH one data point HT; HHT two data points HH, HT; HHH two data points HH, HH

total data points by result:
HT 4
HH 4

For four flips it's the same deal, after an H I'm equally likely to get another H or a T. Of course.

What am I missing? I don't quite understand their definition of 'empirical probability.'
7 ways I have benefited from waking up early
Dang said this is intentional, to allow stories which didn't receive much attention the first time another chance to be viewed. I, for one, appreciate this, since I did not see this article the first time around.
Processed meats do cause cancer – WHO
Also, despite it not being "standard" @NotNull, and @Nullable have worked really well for me so far. And I don't think Optional was meant to replace them.
> That said, it's pretty rare to need exactly 0 or 1 of something.

That's interesting and sort of hard to agree with. I think uniqueness is very often desirable and very often paired with a lack of certainty about existence.

"Does a user with this identity exist?" certain is handled properly as a 0-or-1 question, e.g..
This works for any application started by Explorer (which also means the task bar and start menu). Windows broadcasts a message that the environment has changed and Explorer listens and updates its environment accordingly.
3 simple and effective Twitter hacks
How to De-identify Your Data: Balancing accuracy and privacy
Hey all,

I started learning android development for about a month now and I feel really comfortable now.

Made Classy, it's my first hobby app.

Classy is an ambient sound player which can help you drown out the surrounding noise and help you focus on your tasks.

Please try and let me know your feedback. I think I can learn a lot this way and will will definitely evaluate and consider your ideas :)

P.S: Things learnt so far experimenting and building Classy:
1. Wireframe tools like Balsamiq and free paper sketching to put ideas on paper.
2. Photoshop basics to change color of icons and to generate color palette
3. Android ListView in depth and its limitations and actual functioning of recycle view
4. Android's Mediaplayer and Soundpool: pros and cons
5. Customizing native controls like seekbar.
6. Activities and how to trigger them.

More learning on the way! :)

Thank you all.
it adds a source of unstability in the mix

Because thermal plants never trip??
We tried to use Optional<> instead of returning null. Accidentally returning null from methods returning Optional<> is something that actually happens, especially when migrating existing code. Of course you can solve that with @Nonnull annotations, but then why use Optional in the first place?

The other problem is that the Optional<> interface is clunky. There is ifPresent(), but no ifAbsent(). The stream syntax is incompatible with the rest of the Java world, in the same way that List<T>#toArray has always been ridiculous. And if you use ifPresent(), you have to live with the fact that you cannot return from Java lambdas, and you cannot change any variables or even use non-final variables. I want to scratch my eyes out when I see people allocate one-element arrays on the heap just to work around Java's lambdas.

I don't see the value of Optional<T> if you already have @Nullable.
As if they shipped updates to these devices within the warranty period in the first place.
It's not a fantasy - you kinda had a similar situation on 9/11 with United 93. In that case, the passengers brought it down before a decision could be made, but in case they didn't, the moral question would be nearly identical.

There's a plane full of people that got hijacked and will definitely be used to cause even more casualties. You know that the people on the plane are going to die anyway. Would you really shut it down just like that?
Please join us at SPOJ (spoj.com) if you are not afraid of programming. Some examples: http://www.spoj.com/problems/TWOSQRS/ (number theory problem), http://www.spoj.com/problems/KPPOLY/ (geometry).
Wouldn't it be better to have a non-nullable type, akin to C++'s return by value? That way, instead of forcing the programmer to think, you are removing the problem that they would need to think about.
Of course, ClassX::doSomething must still be at least in principle prepared to handle nulls.
Except those other people are not risking their assets to create that employment opportunity. Most entreprenurial undertakings fail. The high reward for the ones that succeed is the carrot that entices people to take those risks and create the opportunity for a lot of other people to earn a more modest reward but for far less personal risk.
Why I Decided to Build My Own Casual Event Planner
I'm a little surprised that there is no mention of iTunes University, or maybe that doesn't count as a MOOC. I know there are some very popular courses on there that are easy to access.
This is factually incorrect.

The reason that solar power projects have been executed without any major controversy (otherwise all so visible in India in relation to any big project) has mainly been possible because India has a huge chunk of arid/non-arable land in the West and center of India. All of the major solar project so far and all of the planned one's have come up in these areas.
It's heartening there are so many math focused courses. With the Calculus course at https://www.coursera.org/learn/calculus1/ - I'm going over differential calculus right now, but I'm getting somewhat stuck on the Chain Rule, and in particular working out how to use it to differentiate 2^x.

The courses I've found so far haven't been all that helpful, even Khan academy is confusing me somewhat. Does this course explain things better?
Yes, the Optional<T> is a "0 or 1 result" type. It's little more than a list with max length 1.
iTunes university is really quite awesome. Only you need an Apple product to access it.
To add specificity to this tip...

To restart popular desktops/launchers without logging out:

KDE

killall plasmashell
kstart plasmashell

Gnome

killall -3 gnome-shell

Unity

unity --replace &> /dev/null & disown

XFCE

killall -HUP xfdesktop
Although there are many options available to accomplish casual event planning, that matters little if they lack the ability to solve a particular type of problem you may have. That's the situation I found myself in, struggling to improve coordination for gaming sessions among my friends. This post describes how I came to decide how to solve this problem for myself.
1996, not 2012!
Someone already has:

https://upload.wikimedia.org/wikipedia/commons/e/ed/Fullneed...
Yes, that's what spawned my question. It's a great thread.
And what proportion of the critics are so equipped.
The ribbon was specifically designed for programs that have so many functions and features that the traditional menu+toolbar would be nigh-unusable (as evident in older Office versions where users often didn't even know that certain features existed). So I guess indeed, Notepad with probably ten different functions that could be exposed, can live just fine with a menu bar.
Just to clarify since `unsafe` is a special term in Rust: `unwrap` still checks for None and panics, it doesn't blindly assume it's valid.

That said, I think you're too dismissive of "can never fail" assumptions. There's tons of places where something is optional in general, but based on various invariants you know it won't be. For instance, if you successfully acquire the first element in an array, you know you can get the last.

If you legitimately believe that Option is always Some, I don't understand what you think you would otherwise put there? Gonna have your function return an Err if an internal invariant is broken? Gonna have callers actually check for that?
wonder why they didn't sell the other business?
That doesn't matter to anyone other than GPL fans in practical terms if Debian and Ubuntu do their thing right.
The IMF tied Morocco's $6.2bln precautionary loan line (coming directly from the IMF) to its energy dependence. This solar project is being hurried up so the loan can be unlocked. All of this is in a timetable from 2012.
how can i do that?
I was going to suggest Google Alerts. It works really well!
Dyson robotic vacuums go on sale in Japan
Thanks a lot dude! much help
Is there a reason why some of the comments on the blog are openly racist? I feel I'm missing some context here?
I wonder if the cooling it surely provides to the ground under the reflectors would make the land retain more water and be hospitable enough for plants to eventually start growing there.
It looks like Coursera has recently opened up a lot of classes that had been closed.

For example, Hinton's class on neural networks from 2012 seems to be open again. https://www.coursera.org/course/neuralnets
Show HN: Ruxit Cinematic Trailer – Application Monitoring for Cloud Natives
The first time I did visual regression testing, I generated a bunch of screenshots on my Mac, chucked them into version control, and then ran the tests on CI. They broke because of the font rendering differences between OS X and Ubuntu.

The tool I used, PhantomCSS, did allow for a threshold underneath which pixel differences would not get picked up, but I opted instead to run my tests locally in vagrant so that the environment would be closer to identical to CI.

So yes, platform noise is just one of the myriad of challenges you have to solve when implementing such tooling.
Choosing a tech stack for your bootstrapped startup
Using the writeup I managed to find a crashing SSH-key which would give `ssh-keygen -l -f $file` a segfault.

Great writeup, and a great tool.

Bug reported to Debian, where it languishes:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801530

Reported upstream, and seem to be fixed somewhere between OpenSSH 6.6 and 6.8:

http://lists.mindrot.org/pipermail/openssh-unix-dev/2015-Oct...

Brief background on the reason for searching:

http://blog.steve.org.uk/so_about_that_idea_of_using_ssh_key...
A 6-12 charcters only password?
HAproxy in the era of Microservices
How about Ctrl+C? The meaning is unambiguous: If there is a selection, Ctrl+C is handled by the console host and copies the selection. If there is no selection, Ctrl+C is passed on to the running program which then does whatever it likes with it (i.e. in many cases terminate itself).
Did you know you can easily change the music at many coffeeshops?
If you get him hired, does Blizzard give you a referral bonus?
If you are certain optional has a value, don't use optional.

Checking presence of value of an optional is an anti-pattern, the same as doing != null checks.

You should treat Optional the same as a List type with size 1. You never check if a list is size 1 before doing map or filter.
Neither are solar or wind farms, if you count everything that went into their construction. None of the three technologies have enough CO2 emissions to worry about, though.
A medieval technical marvel
Yes, I understand that this solar plant is in a desert.

The observation is meant for solar in general. In Europe, the US, and Japan, for example, many people are pro-solar, which is good. However, it appears that nuclear is really needed if want to greatly reduce our dependence on fossil fuels. Coal is still used for 40% of electricity generation in the US. It's 80% in China, which uses even more electricity.
Writing programs using ordinary language – MIT News
The question I have, as do most of my colleagues, is that if you have a data connection why not just send an email? Rather than installing yet another app and having to encourage people to adopt it.
Really good point - WhatsApp probably did well because it had fewer features, and what features it did have were well polished and understandable.
I would say that every return type that can be NULL should be checked for being NULL. In C++, this is possible, because you most functions are return-by-value or return-by-reference. This leaves only return-by-pointer that need to be explicitly checked. In Java, all functions that do not return primitives are return-by-pointer, and are therefore nullable. This, as you mentioned, makes it infeasible to apply null-checks on every function return.
What does this have to do with $70,000/year minimum wages?
There is absolutely such a thing as talker's block. It's called stuttering and it's a huge problem for some people.

Edit: I am not being facetious.
Why Will FanDuel and DraftKings Stick Around? Because Money
Low barriers to entry would bump the completion rate down, as people are less invested in finishing the course. That's one of the reasons that college completion rates are usually >90%.
Also, wind, solar and other renewable are able to be produced with a much smaller capital cost, and are only getting cheaper.

Are you including the energy storage systems they require to provide either baseline or peaking power? Outside of perhaps some very special locations (i.e. cover deserts with solar cells if you can get that past the BANANAs, and that still doesn't cover nighttime to, e.g., recharge electric cars) they don't, you know, actually produce the two types of electrical production the system actually needs....
It may depend on the copyright agreement Coursera made with the instructor and institution. Understandably many course creators may not wish their course materials to be consumed indefinitely for free without themselves ever receiving any compensation.

That said, I agree with your main point, which is that if the billions that go into the journal and textbook scams were redirected to instructors (via higher salaries and resources) and students (via lower tuition costs), we would have a much stronger education system.
It's true that LevelDB has a lot of drawbacks, including its complexity (making reliability problems much more likely). However, I think Howard Chu is way too pessimistic about (I'd say biased against) LSM-trees.

I wrote an LSM-tree database based on Chu's LMDB[1] that was able to support a much higher write throughput than LMDB, although it was still slower than LevelDB for writes. Unfortunately it had some other drawbacks and would be hard to make it "production ready" so I'm not using it.

I'm using LMDB by default in my current project because of it's simplicity and read performance (which are truly amazing). But I'm convinced that a write-optimized database on par with LMDB is possible. SQLite4[2] might eventually be it, if it ever gets finished.

[1] https://github.com/btrask/lsmdb

[2] https://www.sqlite.org/src4/doc/trunk/www/lsmusr.wiki
TL;DR: He and his company are both doing great.
I answered an interesting SO question on that recently, which asked how to save and restore the environment in PowerShell. Turns out, the environment being in a PSDrive helps very much with that because you can treat the variables just like you treat files:

# Save environment
$savedState = Get-ChildItem Env:

# Restore environment
Remove-Item Env:*
$savedState | ForEach-Object { Set-Content Env:$($_.Name) $_.Value }
The Design Of Computer Programs on Udacity by Peter Norvig is pretty awesome. As someone who's only been seriously programming for a year or two , each problem set went like this :

Write the code here to do X :

I write a messy 4 liner after lots of thinking.

Professor Norvig comes along and does it in a simple functional one liner.

Mind blown.

He teaches good functional style program design one epiphany at a time.
Yea, this was kind of giving an upper bound. Actually that's not very impressive given that people CAN burn more than 8000 calories in a single day.
> I don't believe them that the cost of decommissioning is built in. Especially since the financiers who pay during construction aim to sell their equity. Also in the UK, recently had to pay 4 billion worth of tax payer funds to decommission. That puts the whole thing at a loss.

Only if you're counting the decommissioning costs for nuclear but not for anything else. By the time a mine is exhausted it's generally a Superfund site, whether they're mining coal or neodymium. And what do you do with fifty million decommissioned solar panels?

> Also, uranium costs are not fixed.

The amount uranium price fluctuations contribute to operating costs is negligible.
I believe the point @jontro is making is that unsafe programming behavior is unsafe without regard to the language's constraints. Option simply makes it more difficult to behave unsafely. Of course a developer can still call .get() when the presence of a value is unknown, but the Option type lets them know they are being careless in doing so.
I know what a watt is, and I understand what giga means. I know what a calorie means because I eat food and I have to make decisions about how many calories to consume daily. I know what horsepower means because when I shop for cars, I compare them to one another. I don't know what gigawatt means because I don't shop for power, I don't compare power output of one reactor to another, and I don't worry about power consumption because it's all covered by my wall outlets.

I don't know why you're getting uppity about this specific unit, but your post reeks of elitism and arrogance. You happen to understand what a watt is, so it's disheartening and sad that nobody else does (it's so lonely being so smart and being surrounded by dumb people)? Keep your shitty judgmental attitude to yourself.
Try to post your articles to a place where they would be relevant. If your blog is about programming or startup, people from HN might be interested in it and upvote it. Then, once the search engines know about your blog, you can try to do some SEO so people will find it when looking for something related.
Nulls can be particularly pernicious in Java because of auto-unboxing.

E.g., imagine you got a NPE from this:

String summary = getUserSummary( user.getId() );

...you'd think "user" must be null, right? But it's quite possible that user.id is a Long, the current value is null, and getUserSummary() requires a long primitive argument.

This compiles just fine, and at runtime the Long object will be auto-unboxed to a primitive long... unless it's null.

Surprise!

But things like Optional do help; doing a code review for the things that may be null will fix these kinds of mismatches (and you'll avoid relying on auto-unboxing). The above code is broken -- either user.getId() can never be null (in which case it should be a primitive already) or it might sometime be null, in which case this code must not allow auto-unboxing.
Only if the word is noun. Also by the same reasoning uppercase letters are sentence-starting in english (not to speak of capitalized names and 'I' and all that stuff).
Good point - I should fix that (I'm learning as I go) Thanks!
But what specifically is it about processed meat that makes it more of a risk than fresh cuts of meat?
BuzzFeed cracks 5B content views a month
Or http://followthatpage.com/
The question is why? If China can build 10,000 miles of HSR and the developed world can't build 400 miles, won't there be an infrastructure penalty at some future time?

Spain has built 1500 miles of HSR so it seems that the extreme high cost is avoidable.

https://en.m.wikipedia.org/wiki/High-speed_rail_in_Europe#Sp...
I hope he finally manages to get his obesity under control, or he won't have many more years. He seems much happier during his few healthy-weight years.
Curious notion. So, if a guy got that "human chosen" pattern randomly, they got rooked? He has a very breakable password, while the rest of us got good ones? Sounds like the whole algorithm is busted.
Why a Data Loss Could Mean the End of Your Organization
I think what he is doing is pretty cool. Remember however that although he may be working with people every bit as smart and productive as he is, starting a business is massively risky. I believe in 3-5 years it amounts to a coin flip. He is earning a risk premium. If you buy a risk free US Treasury Bond you expect to earn (much) less yield than the dividends on a share of Exxon or Apple.

He is an entrepreneur/founder. He isn't just a company hopping CEO with soft landings and golden parachutes galore. I think an entrepreneur deserves a solid risk premium.
"More than half the cost will be offset by Price's pay cut."
The difference between email and IM is pretty big in terms of interactivity, threading, etc.
It should also provide some protection from wind, so the soil is not blown away.
However that won't survive a scanning and OCR.

This could be useful to see who leaked a script, for example.
No, it's not SHA2 encryption. SHA2 is a hashing function, meaning it's one way. Encryption is two way or else it wouldn't work. People often confuse the two but they are quite different.
I don't get this yet. Their lead paragraph says:

> Jack takes a coin from his pocket and decides that he will flip it 4 times in a row, writing down the outcome of each flip on a scrap of paper. After he is done flipping, he will look at the flips that immediately followed an outcome of heads, and compute the relative frequency of heads on those flips. Because the coin is fair, Jack of course expects this empirical probability of heads to be equal to the true probability of flipping a heads:0.5. Shockingly, Jack is wrong. If he were to sample one million fair coins and flip each coin 4 times, observing the conditional relative frequency for each coin, on average the relative frequency would be approximately 0.4.

If I try to work this out, I write down the 16 possibilities for four coin flips:

TTTT, TTTH, TTHT, TTHH,
THTT, THTH, THHT, THHH,
HTTT, HTTH, HTHT, HTHH,
HHTT, HHTH, HHHT, HHHH

I count 24 instances where H occurs before the end of the sequence, 12 of which are followed by H and 12 of which are followed by T. So I get the expected 0.5 outcome.

The authors do some other calculation, and I don't understand what they are thinking. Can someone explain?
LLVM Developers Discuss Relicensing Code to Apache License
I'm surprised, no Jeff Ullman Automata?
This is most definitely something to pay very close attention to, but it doesn't always happen.
The Internet of (Somewhat Insecure) Things