skysight-inc/HackerNews huggingface dataset:
Wondering if there is a better way of doing this?
function myFunction() {
"use strict";
var num = document.getElementById("numberToCalculate").value;
document.getElementById("answer").innerHTML = "" + num + " = " +convert(num);
}

function convert(n) {
var romanN = "";
var hundreds = (n / 100 | 0);
var fifties = ((n % 100) / 50 | 0);
var tens = (((n % 100) % 50) / 10 | 0);
var fives = ((((n % 100) % 50) % 10) / 5 | 0);
var ones = (((n % 100) % 50) % 10) % 5;
if (n < 256) {
for (var i = 0; i < hundreds; i++) {
romanN = romanN + "C";
}
if (n % 100 >= 90 && fifties !== 0) {
romanN = romanN + "XC";
fifties--;
tens = tens - 4;
}
for (var i = 0; i < fifties; i++) {
romanN = romanN + "L";
}
if (n % 50 >= 40 && tens !== 0) {
romanN = romanN + "XL";
tens = tens - 4;
}
for (var i = 0; i < tens; i++) {
romanN = romanN + "X";
}
if (ones % 4 === 0 && fives % 2 === 1 && ones !== 0 && fives !== 0) {
romanN = romanN + "IX";
fives = 0;
ones = 0;
}
for (var i = 0; i < fives; i++) {
romanN = romanN + "V";
}
if (ones % 4 === 0 && ones !== 0) {
//if (fives % 2 === 0 && fives !== 0) {
romanN = romanN + "IV";
//}
}
else {
for (var i = 0; i < ones; i++) {
romanN = romanN + "I";
}
}
}
else {
romanN = "NA";
}
return romanN;
}

this is the program working
http://ideqa.blogspot.com/p/numbers-to-roman-numeral-calculator.html
I find it so hilarious that these threads always seem to degenerate into moral discussions about some fantasy world where driverless cars have to understand the meaning of everything in the world in order to make judgement calls about the worth of different human lives.

Literally all a driverless car has to do is hit the brakes if it's going to hit an obstacle. There's no moral decisions, no discussions about who deserves to live and who should die. Just use the brakes.

I just wrote the code. And it's open source so any car company is free to use it. Here it is:

if (obstacle) then { brakes = true }.

You're welcome.
For those with Amazon Prime, a number of "Firing Line" episodes are available with better (relatively speaking) quality from Amazon for free. I think this is the same episode that you linked:

https://amzn.com/B007Q292FE
Housing is a basic need and western finance and govt structures work to skim off labour through land. If you are borrowing to rent out you are simply a debt collector for the banks.

We used to have decent manufacturing jobs where the other half didn't have to work who could run a car, had good hours and enough money.

Now land is the primary cost for every family. The same pile of bricks for more of your labour. You happy with that? It's the system not the cost of building or materials. Think of the advances since the 1960s in materials and construction.
Alternatively this is just the subset of early retiring people who are vocal and visible about it.
yeah the moderation there is getting a bit out of hand, recently they've deleted my answer (which was a direct quote, with reference link provided, formatted as a quote) because it was 'plagiarism'. before that they requested to quote from the link - the quotes were added in an edit.
Did you think there was going to be a way to retire without having a bunch of money saved?
Brakes. It should use the brakes.
If I understand this correctly (https://support.google.com/domains/answer/3251241?hl=en)

- My login stays the same (regular @gmail account)

- For receiving e-mails, it works like a simple forwarding service to my Gmail inbox. There's no copy of the e-mails anywhere else, no extra inbox, like I was using POP3

- I'll be able to send e-mails from that custom domain directly in Gmail, using Google's SMTP servers, but all the recipients will be able to see my original Gmail address in the hidden e-mail headers, and it's going to show "sent via Gmail" or something like that. I remember that's how it worked for an old alias I had, maybe it's the same thing.

If this is how it works I would definitely use it. I keep a live local IMAP backup and I also use Takeout regularly so there's very little risk involved.

Are you using this setup? Any problems?
But that was my point. Financial institutions USED TO inject capital into companies. Now they inject MOST of their capital into other financial instruments. Their 'investments' are actually just wagers - bets - because nothing is ACTUALLY manufactured and people are not actually serviced. Financial institutions should be outlawed from 'investing' money in any other financial institution or instrument.
Earth doesn't need to "fight back"---it only lets species that can cope with the changed environment take over.

Once, oxygen was toxic to most of the species on earth, when some algae started producing it by photosynthesis. If Earth fought back, we'd had very different species by now.
I've had luck getting DOSEmu to interact with parallel port hardware. Don't know how well it would work on x64 though.
It's just plain better. The main target audience is still gaming communities, but the feature list is comparable/better then what Slack has to offer.

No restrictions, no limits, voicechat since day 1 etc. It doesn't offer screensharing though, and probably won't.

Linux support is still experimental, but I've had no problems with it.
I'm not so sure AOP is dead. It solves a real pain point, with the canonical method of implementing this in C# being attributes.
Nitrous – Start Coding with Zero Installations
FastMail has been working on something called JMAP [1] for quite some time. It's an HTTP-based replacement for IMAP. Perhaps it could be extended to replace SMTP as well. Then we would have a single, HTTP-based API for all of our email needs.

[1] http://jmap.io/
Has Anyone Played with Oracle's New Open Source JET?
Of course it's been discussed, it's a serious problem. Nobody has ever claimed that U3 is the measure of unemployment, it's just one in a series but happens to be the one with the most history.

If you want to look at the impacts of long-term unemployed or the falling mix, check out the prime-age labor force participation rate.. another metric that is also in the same report:

https://fred.stlouisfed.org/graph/?g=7ujb

There's no conspiracy to hide these numbers, they're reported dutifully every month. It's been discussed by politicians, economists, journalists..
A flexible expandable button menu
http://arstechnica.com/information-technology/2016/09/nypd-c...

> NYPD can’t count cash they’ve seized because it would crash computers: Despite multimillion dollar evidence system, NYPD have no idea how much cash they seize.

> The New York City Police Department takes in millions of dollars in cash each year as evidence, often keeping the money through a procedure called civil forfeiture. But as New York City lawmakers pressed for greater transparency into how much was being seized and from whom, a department official claimed providing that information would be nearly impossible—because querying the 4-year old computer system that tracks evidence and property for the data would "lead to system crashes."

So, you're technically correct. It's reported in great detail. So great they can't actually query the data at all.
DNS-over-QUIC would be a much more compelling technical proposal from Google as a standard
A statically linked hello world in C using the MS toolchain gives me a 77Kb binary. The C++ version, using std::cout, is 176Kb.
On the "Caveats for xterm" page it says

On other operating systems except OpenBSD, there is
no way in hell to make the interaction of locales
with terminal controls truly safe.

But consider a linux system based on musl libc, it's not very different from openbsd's policy of utf-8 and ascii only, it's probably pretty close even if not perfect:

http://wiki.musl-libc.org/wiki/Functional_differences_from_g...
In addition to what you are doing in your 20s, One favor you can do to your future yourself is to learn about investing and finance. Recipe is simple.

* Maximize your income

* Minimize your expenses

* Save the difference

* Grow your savings.
The best way to learn monads is to ignore the IO one for now, and learn what >>= and return does for each "pure" one individually. E.g. Maybe, List, Either etc. With enough examples understand you will understand the pattern. At various points you may want to check you understand what the type system is doing in the implementation.
The FTC Is Cracking Down on Predatory Science Journals
Can you give a specific example as it relates to DARPA? A space walk would have been mission creep for the Mercury program only in the most trivial way because the technology was already developed by that point. The problem was the unacceptable risk and lack or reason to do any kind of spacewalk (Mercury and the mission procedures were not even remotely designed for in-flight repair).
They can move to an emulator on a Raspberry Pi
Virtual reality looks to its adolescence
"Living off $30-45k/year maybe makes sense for 1 person, but 2 people or a whole family?"

You'd be in good company.

The median household income in the US is ~$51k. The median personal income is ~$30k. The poverty line in the continental US for a family of 4 is ~$25k.
Honestly, this seems like one of the more realistic problems NLP could actually solve. Yes there may be many variants, say 100 or even 1000 different structures and vocabularies for updating versions, but a differential neural network where you have inputs (like the pre-amended law) and outputs (like the laws after the "amendments" or version bumps) would actually be perfect for learning what means what and when to do it.

It would be the perfect grad project for someone interesting in bridging the gap between computation/machine learning and legislation.

Of course, it would be a little tedious setting up the learning (thousands of sets of input cases and output cases) but in the end the findings could be used across the board.
"Implementation detail"

We are in strong disagreement about what constitutes an "implementation detail".

But also, you can just use a monad transformer stack and add whatever side-effectful operations you want into it, use it as needed. Boom, dependency injection. And more control over what your functions actually do is there when you need it.
>Hard work is requisite, not satisfactory.

If you're one of the Rich Kids of Instagram, hard work doesn't seem to play much of a role in their lives.

The point about Foxconn is obvious. How many Foxconn employees have a realistic chance of topping the rich list?

Hard work, like the idea of being a self-made person, is largely a self-serving mythology.

Real hard work is doing the same shitty job for 10-12 hours a day six or seven days a week and earning barely enough to pay the rent.

That's the reality of hard work for much of the population. Fetishising the hard work of the already-rich discounts that ground truth.
Well, first off no Lone PhD student has built a SLAM system. LSD itself was years and a whole team. Similar for ORB-SLAM.

Notice also that those systems are built for robots and standup machines to run it, not mobile handsets. Sounds like a small difference if you aren't in it, but it is critically harder, so the approach is actually different. It's not about just "reading the latest papers and implement them." Somewhat offensive to assume that is the case. I'd challenge you to find a mobile monocular SLAM system that is up to our capabilities, let alone usable. They have all been acquired (Apple, Facebook, Intel). The reason you can't just copy paste implementations is because they are non-deterministic in optimization.

Second, SLAM isn't the only thing we do. In fact it's not even the hardest thing we do. The majority of what we do isn't something I'll go into in depth, but it actually falls into the category of "I'll need a research team and five years -- and we might not figure it out" - though now we're in year three and have made enough progress that it's starting to come out of the realm of "we might now figure it out."
This seems so overly complicated, with the RNN learning to do arithmetic coding and image compression all at once. Why not do something like autoencoders to compress the image? Then you need only send a small hidden state. You can compress an image to many fewer bits like that. Then you can clean up the remaining error by sending the smaller Delta, which itself can be compressed, either by the same neural net, or with standard image compression.

The idea of using NNs for compression has been around for at least 2 decades. The real issue is that it's ridiculously slow. Performance is a big deal for most applications.

It's also not clear how to handle different resolutions or ratios.
I've always had the imoression that a sysadmin ( a position I deeply respect) was more comprehensive than DevOps. DevOps mostly focuses on automating the infrastructure of software development. A sysadmin does that and more.
Commodore 64 software is still being developed quite actively by hobbyists, in the form of demoscene productions:

http://www.pouet.net/prodlist.php?platform%5B%5D=Commodore+6...

I recommend anyone curious about retrocomputing to watch a few demos --- it can be quite surprising to see what can be done on hardware orders of magnitude less powerful than available today.
Have $1M at 20 years old, give it all to YC to invest in unicorns and have a billion dollars at 25 then retire at 25 as billionaire.

OK?
Yes! I completely agree. Sequiturs is a great fit for these opinionated discussions that don't work in Stack Overflow's Q&A format.

Here's an example of debating a technology choice on Sequiturs: https://sequiturs.com/arguments/a-beginning-programmer-who-n...
entirely on solar? never. solar + wind + geothermal + hydro + nuclear? sure, someday.
I wrongfully assumed that an appliance manufactured and sold to perform a single task would be able to perform that task.

That was a mistake.
Another example: Caching of results, transparent to the user of your function. If your function is otherwise pure you can simply use its parameter and hash them for a key to your result index. Examples where I've used this: Caching of regex results, replacing file reads with modification date polls and read from cache if not changed..
It's a general framework with individual liberty at the core. It allows for a lot of different positions. It's not uncommon for libertarians to disagree but for different positions.

Yes there are factions of it just like other parties, but the core is that ideas are good if they don't infringe on other people's rights. Making a law which compels someone to provide a service to another is anti-liberty and most libertarians would not support it. Even then, many might support that measure at the local level because state rights is a big component and democracy is respected.

Anyway, what I like about libertarianism is that it provides a framework which is basically the Constitution at the core. Republicans and Democrats have no framework in how they go about things and we're in a big mess at many levels. There's been very little leadership and vision. If you look at what the two parties have done over the last few decades - they aren't that much different in practice and people are getting frustrated.
Are these phone numbers "clean"? Even if a number isn't explicitly blocked by your SMS provider, sites like Craigslist still build their own account-registration blacklists by getting lists from all the "burner phone" providers (and infrastructure providers, like Twilio) of the numbers they're currently assigned.
This pretty easy if you start off with a public sector job right after school.

Go work a government job for 20 years and rock that sweet pension.
Other than ranting, what was your point?
I would imagine that VirtualBox + USB<->RS232 adapter would do the trick. Did you tried that.
ST is exactly the same sort of thing junke was talking about, except it also uses the type system to ensure the imperative core doesn't leak into the outside world.
Did blog and book came before early retirement or after? You are confusing cause and effect. Early retirement doesn't mean you retire and do nothing, it means you do what you want to do, when you want to do, how long you want to do, at your choice.... These people took up blogging and book writing after they retired.
How to extract a specific audio clip from a video file
The "aristocratic English accent being mocked" was actually a Mid-Atlantic accent.

https://en.wikipedia.org/wiki/Mid-Atlantic_accent

That aside, I would pay money to hear William F. Buckley, Jr. speak Spanish.
> I understand it could require swapping the platters into a working drive, but I don't imagine that being such a costly procedure.

It may need to be performed in a clean room, which is likely expensive to set up and maintain. Perhaps it's the required equipment that drives up the cost?

I've wondered if data recovery shops distribute the cost of the intensive recoveries (e.g. swapping plates) across the smaller gigs (corrupt file systems and other stuff).
2016 Halloween Costumes in Japan
This seems like an odd case of defective parts leading to an early failure. I had a GE washing machine fail due to a defective pump (located under the drum and driven by the motor). There was no evidence of abnormal NHV and it is placed on level ground. The interesting thing was that the replacement pump (which cost me like $25 and took an hour to replace) was more robust. It has lasted twice as much as the original part.
There's plenty of space for it to be stored, just not many people who want it stored near them.
mmmmmmmmmmmm. Functional sandwich.
If you tap your 401k before you're 60, you will face major tax penalties. So, that's at least 20 years you have to manage without your 401k funds if you attempt to retire at 40.
We did the same thing w/ JSON responses: https://www.openresolve.com/

This is a bad idea outside of experimentation. Not to be used for production.

If you want to secure DNS look at QUIC, TLS, or my favorite, DNSCrypt (which I funded).
I guess it would depend on what you're using it to build. If you're using it via Ionic framework to build an appstore-bound app, then maybe not so much. However, if your focus is a Progressive Web App for universal use, then it's definitely a problem.

I'd actually like to know what impact that TypeScript has on all this?
DNS-over-HTTPS-over-Tor-over-DNS-over-ICMP is where it's at. None of the three-letter agencies can eavesdrop on your DNS queries now! It might even be faster than RFC 1149.

https://www.ietf.org/rfc/rfc1149.txt
>Which means you were at least an E5 (you had to mess up a lot to retire as an E5)

Looks like the high year tenure for an E5 is 14 years so you'd have to retire at least an E6.

https://en.m.wikipedia.org/wiki/High_Year_Tenure
New Entrepreneur Books
I'd be very interested to see this applied to phones.
Ask HN: Why are there open-source software licenses?
Would we be worse off if there weren't any?
I would say, it should instead reverse extended grapheme clusters. The advent of emojis and emoji ZWJ sequences make those kind of "characters" especially common. For example the family emoji ‍‍‍‍‍‍ is thought of as a single "character" from the user's perspective but it actually has seven code points.

EDIT: HN ate my emoji so there's a link to its emojipedia page: http://emojipedia.org/family-man-woman-girl-boy/
No kidding. Just ask the Japanese - They were known for going through their software with a fine-tooth comb before releasing, but they started to realize how far behind the Americans they were (and arguably still are).
90$ for 5mg, required single dosage appears to several times this... Could get expensive.
Perl 6: What Programming in the Future Is Like (Lightning Talk Slides and Video)
A small example.

class (MonadIO m) => HasLogging m where
log :: String -> m ()

data AppConfig = AppConfig { stuff :: Int }

newtype MyApp a = MyApp { runApp :: ReaderT AppConfig IO a}
deriving (Functor, Applicative, Monad, MonadIO, MonadReader AppConfig)

instance HasLogging MyApp where
log s = liftIO (putStrLn s)

function2 :: Int -> MyApp String
function2 x = do
log "hey guys I'm logging"
return (show x)

-- or without specifying the base monad, yay abstraction

function2' x = do
log "heyooo logging here"
return (show x)

-- Haskell will infer this type:
-- function2' :: (HasLogging m, Show a) => a -> m String
It is optional to use. Just like it's optional to use Googles Dns servers at 8.8.8.8 and 8.8.4.4. The advantage with this is the extra security you get with HTTPS.

Google DNS tends to be one of the fastest DNS servers you can use (just benchmark them against other options). The IPs are anycast, so you will likely be served by the Google data center closest to you.

As for what they log, check it yourself: https://developers.google.com/speed/public-dns/privacy
Showcase Microsoft Docs
Thank you very much.

I am going to use ethernet to work on linux. I am taking some courses in data science and at the meantime I am interested in knowing the Hadoop eco-system and play with it.
At first I thought it was a Commodore 128 because of its form factor. I never knew the 64 came in that form factor as well.
then it would simply mean it is not open. When someone creates something, by default it's "closed" and it's their property. If you take that code and use it when there's no permission, that's stealing. If you want to "open" up your code so anyone can use it, you should explicitly tell people they can take it for free. Meet license.
Spacewalk is monolithic. It takes over packaging and licensing and various other roles.

I appreciate tools like this because they are single purpose and can be easily be retrofitted to old systems.

Also, yum security plugin does not work on centos because security errata are not published in repo. So you have to hack it even with spacewalk.

This tool definitely meets a need in the EL ecosystem.
We'd be blue-green algae
Thanks for the link. I am just exploring whats out there before I commit to the program.
The ones making money dealing drugs don't want or need the publicity
I think this could be more useful if there was a local client that installs and proxies. E.g., A traditional query to localhost:53 gets translated to DNS-over-HTTPS.
Hehe, as a slightly jaded participant in the advertising industry, I note that Chrome only breaks technologies used for ad-serving that Google's stopped using.

That said, I'm glad they are doing this, because finally we can wean our advertisers off their document.write obsession.
I think there still is and will be a market for systems with as few resources as possible, as long as they meet most computing needs.
Cool! Is numer.al a personal project of yours? Do you have a quick description of the features? By the way it looks good, congrats!
Oh, my bad, I got confused with the brackets (which are not on a digit key). I really should have checked. See, we all make mistakes!
Show HN: Dispose or pick up unwanted items online
They're clearly in the wrong on these things, but I wonder how hard it is to resist a strong "us vs those thugs" reaction when you're dealing with criminals day after day. Do they view this as collateral damage? There are innocent lives lost in military action. Does the prevailing attitude and a sense of permitting some collateral damage make it easier for them to excuse this sort of behaviour?
Doesn't work as well as it should for some reason. I've began to reverse engineer the software to try and port it to something newer. We could also buy newer ECUs but then we lose years of tuning.
> Some washing machines, the suit alleges, vibrate violently under heavy loads, causing the tub to “become unfastened, resulting in a dramatic centrifugal explosion that destroys the machine and nearby property.”

Any washing machine, if not level and if overloaded, will shake violently. The picture in the article showed a very small, seemingly fragile washing machine. I imagine one must take extra care to not overload such a machine. In fact, I know that these machines do have warnings to not overload them. What more could reasonably be expected of Samsung?