Better HN
topnewbestaskshowjobs
Log inSign up

craigharley

35 karma · joined Sep 13, 2018 (8y ago) · 19 submissions

Submissions

comment 3y ago · link · parent

Taxing private jets, is not the same as "removing all incentives to be successful".

comment 3y ago · link · parent

Here is another

const nDigitOfPi = (n) => (22/7).toString()[n+1]

comment 4y ago · link · parent

nieve -> naive

Just a small typo, article is good. Clear examples and good explanations.

comment 4y ago · link · parent

How long until my new desktop wallpaper?

comment 5y ago · link · parent

This was my though too, who cares what lines match where - when an IDE can take me to the line, and more importantly, show me the context for that line.

comment 5y ago · link · parent

I thought this was interesting so I created a chart to show the value of US Dollar, against US Dollars over time:

https://i.imgur.com/89MSmlf.png

comment 6y ago · link · parent

Yeah there's a vim plugin https://plugins.jetbrains.com/plugin/164-ideavim

comment 6y ago · link · parent

It’s all because of card fees. It’s not economical to charge $0.5

comment 7y ago · link · parent

Is there any way to import tickets (issues and pull requests) from Github?

10.

C# Action Delegate with 16 Parameters(docs.microsoft.com ↗)

1 points · by craigharley · 7y ago · discuss

comment 7y ago · link · parent

And php does it both ways with its type hinting...

    function foo(string bar): string {
        return “y u do this”;
    }

comment 7y ago · link · parent

How would you recommend going about doing this?

comment 7y ago · link · parent

I made a super simple graph in typescript using an adjacency matrix because all the ones I could find were really bloated, or used far too much memory since I have have a very dense graph.

14.

Super simple graph in TypeScript using an adjacency matrix(github.com ↗)

8 points · by craigharley · 7y ago · 3 comments

comment 8y ago · link · parent

According to the Bureau of Prisons, there are 207,847 people incarcerated in federal prisons. Roughly half (48.6 percent) are in for drug offenses. According to the Bureau of Justice Statistics, there are 1,358,875 people in state prisons. Of them, 16 percent have a drug crime as their most serious offense. There were also 744,600 inmates in county and city jails. (The BOP data is current as of July 16. From BJS, the latest jail statistics are from midyear 2014, and the latest prison statistics from year-end 2013.) That’s an incarceration rate of about 725 people per 100,000 population.

Looks like for federal prisons it's as high as 48.6%, but that looks like it's for all drugs not just cannabis.

It's also probably too big a leap to speculate how many people are incarcerated for drug related incidents (theft to get money to feed a habit for example). Crimes which would probably be greatly reduced in a treatment over prohibition system.

comment 8y ago · link · parent

Do you have a source for that? Not saying you're wrong but would be interested to read.

I had a quick look but couldn't find one.