Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

5101.

Number Munchers ( for young desperadoes)(youtube.com ↗)

1 points · by rtpg · 11y ago · discuss

comment 11y ago · link · parent

At least for me, coming from an imperative language OCaml's runtime seemed like magic. But I know now that it's only because I was comparing OCaml to C.

I think getting lost in the implementation details is what gets many Haskell learners, because the majority know an imperative language and use it as the base.

comment 11y ago · link · parent

Do you think mailchimp is worse because of the ads it puts in podcasts? How about Squarespace?

Arguing that all advertising is misleading and evil is just as silly as saying that all advertising is truthful and trustworthy.

Honest salespeople know that selling a product to someone is a win-win situation. And honest ads can help people find things they are genuinely looking for, and solve a problem they are having.

comment 11y ago · link · parent

That's a pretty naive way of doing it. Without advertising, many (real as in "sells goods" sense) businesses would not find any real growth. Advertising is a business cost like any other. and websites with ads sell eyeballs.

Things cost more because of advertising or marketing in general only in the sense that said things would not exist without them.

That's like saying conferences actually cost more because of sponsors.

comment 11y ago · link · parent

well that first example in the article would be

    foldl (+) 0 (map (+2) [1..10])
or

    sum $ map (+2) [1..10]
So... make up your own mind.

As someone who has written only small chunks of lisp but at many different points in life, I do find the whole parens game to be a bit disorienting, but usually I can counter it by using newlines.

I would write something like

    (reduce + (map (comp inc inc) (range 10)))
as

    (reduce +
            (map (comp inc inc)
                 (range 10)))

comment 11y ago · link · parent

I think he's saying this scumbag will be in the upper class, joining other scumbags who have done the same.

But just because they're a part of the upper class doesn't make everyone in the upper class not "hard working".

Though one could argue about the correlations between effort and results for people in the upper class (mostly born into it) relative to the lower classes, but that's a different debate.

comment 11y ago · link · parent

I agree with the bundling. It's essentially per-user pricing, but it's an easier pill to swallow. The pitch becomes something like "Simple pricing that doesn't break your budget".

My reasoning for the $15 was that that's a fully loaded hour at a bit more than minimum wage. I think it's a good reference point for thinking about how much a company might save with the tool. Though for just vacations you're maybe saving less than an hour.

comment 11y ago · link · parent

Quartz (qz.com) is a prime offender of the last one. They have little "chart of the day"s, and every time the scale is fit so that the graph minimum is at the bottom of the scale, and the max at the top for maximum variation.

comment 11y ago · link · parent

Looks pretty nice, nice and simple. I didn't sign up because I am not managing people's vacations, but I definitely would if I were that person where I work. Value proposition is immediately obvious. Great name too

If you're serious about making money off of this, though, I'd highly recommend some form of per-seat pricing.

Per-seat pricing aligns the usefulness of the app with how much people are paying. Would you really want (for example) a 100 person team to be only giving you 15 pounds a month for what is probably _days_ of saved administrative time per year? Off the top of my head $15/user/year seems like a good price to deal with vacationing. Though ideally that number is MAX_NUMBER_YOU_CAN_CONVINCE_PEOPLE_TO_CHARGE/user/year

comment 11y ago · link · parent

Is this provably safe? I feel like there's been a lot of discussion in the Rust community RE safeness, and my impression from the sidelines is that it's non-trivial.

comment 11y ago · link · parent

That Structured Haskell Mode (https://github.com/chrisdone/structured-haskell-mode) readme has some very interesting gifs to show how things work.

It's pretty powerful, and I use SHM in my Haskell stuff to mostly good effect. I just have some issues involving the default indentation that I need to get round to fixing, and I haven't figured out how to surround a block with square brackets yet. But otherwise, very good stuff.

5112.

A corporate watchdog says Soylent contains unsafe levels of lead and cadmium(qz.com ↗)

7 points · by rtpg · 11y ago · 1 comment

comment 11y ago · link · parent

You do know that the DMCA applies even when you're self-hosting right?

comment 11y ago · link · parent

how does one even begin to figure out the techniques used to write intros or demos like this?

comment 11y ago · link · parent

Technically, that's how it works in Cook County. I imagine the situation is different places

It's so annoying that the system works like this. It takes all of 5 minutes to realize that these should be sliding scales. I bet making these sliding in a revenue neutral way would make a great talking point for the upcoming presidential elections

comment 11y ago · link · parent

I've always heard about things like "entitlements cliff", but what specific things work like that? Most things I've seen work on a sliding scale.

comment 11y ago · link · parent

I don't understand how unpaid internships that involve any form of work (that is to say, anything beyond observing the company) is legal. A company is asking you to do something (what others would call work). Just because you have a Masters degree doesn't make bringing coffee to people not work.

The reason is obvious though: loopholes in minimum wage laws to please industries based around underpaying interns.

A friend of mine did his final internship in a code house that was based entirely on intern work. One head guy was getting contracts, and pulling in local students to do the coding, and cycling the students out after 3 months (right before the French legal limit on unpaid internships). Quite a mess

comment 11y ago · link · parent

I kind of cover it in my other comment, but the issue is that now all char pointers are nullable, so you _have_ to assume that all "char* " are Maybe'd.

But it could just as well be that only some of your strings are nullable, and so you could get rid of certain code paths.

comment 11y ago · link · parent

Just a guess, but maybe chlorine needs a good amount of time to be effective, and the transit time from reservoir to tap might not be enough

comment 11y ago · link · parent

I'm not saying a special string value, but a wrapper object with an "existence" bit. You can then assume, if the existence bit is flipped right, that the char* "exists".

This is functionally equivalent, but forces existence checks when they're needed. And by removing "null" from your vocabulary, an entire class of errors disappears.

With C this is a bit trickier to ensure. But I think the design pattern can still be useful. And it doesn't make code more complicated, but rather it makes the complicated aspects explicit . Instead of testing that name == null, you test that name.exists is False, and if not you use name.value. And you make null a banned word in your codebase.

The result is that you _never_ have to ask "is this char* possibly null?". The answer is always "no". So you remove superfluous checks

I think this pattern works much better when you have stronger type checking, though...

comment 11y ago · link · parent

>Maybe some structure has a "char * " name field, and null indicates "anonymous/has no name". It's an ISO C conformance bug to try to print that with %s, but that's a portability issue. If that's the only problem in the program (everywhere else it checks for null), there is no real issue.

I'll take 'uses of Option/Maybe' for 200 Alex

Some might say it's overkill, but if you can have a char* be null, then for most intents and purposes you have two states to deal with on any usage of that value.

Just because such a design can exist doesn't mean we should hobble our tools to support it.

comment 11y ago · link · parent

>The profit on an average Android phone is about a penny.

This is an exageration right? I know we're giving $10 to MSFT for every phone or whatever, but a penny?

comment 11y ago · link · parent

This could work for approximations. But if you want the exact value, this might not be super effective, as there are values without closed forms (that is to say, that are not expressible simply with the *-+/ and sqrt/log and other usual operations).

So your iteration procedure will probably get to a good approximation, but might not find the "core" expression.

comment 11y ago · link · parent

>This isn't necessarily a problem. As a society, we've decided that we like having amateur capital in the markets more than we want the improved efficiency of allowing use of inside information. It's a tradeoff, and while both options have their merits, society has chosen one way.

I would imagine that information imbalance increases make a market less efficient, not more efficient.

comment 11y ago · link · parent

I'm not in the US, but some people here are.

What about working on some open source projects? I don't think that would fall into the danger zone of immigration law(since you wouldn't be working "for" anyone).

Alternatively, maybe a company here can offer you an internship? The visa requirements could be less.

Does anyone here know an immigration lawyer that could help this person get out of a bad situation?

comment 11y ago · link · parent

Watching the SIGRAPH video... isn't this basically how Flash animation works? Does anyone know the major differences?

comment 11y ago · link · parent

Sure but page views don't equal dollars.

It's very frustrating, because this is being called an experiment in web publishing, but this post shows that he's either not trying to do the footwork in the "publishing" part of web publishing, or maybe he just lacks the knowledge to do so.

Go to the "how to pay"[1] page and count how long it takes for you to figure out how to give the guy $5. _Then_ try to go through the checkout process (which asks me for a shipping address!). The ultimate irony is that that post says my time is expensive, yet does not make it take 10 seconds (Stripe Checkout form) to give him money.

These 1:1000 numbers are being presented as if it's indicative of the state of the web publishing universe, but my guess is these numbers would be much better by spending some time on the "publishing" part of the job. And, unlike what the writer seems to imply with his whole mailing list digression, those changes can make the user experience better as well!

I hope this doesn't become a reference point for people.

[1]http://practicaltypography.com/how-to-pay-for-this-book.html

comment 11y ago · link · parent

I agree with this sentiment. If your policy is to keep all your code PEP8 (ideally by making it part of your test suite), then the amount of commit messages which are "PEP8-ify" will be pretty small.

If you take a blatantly non-compliant codebase and PEP8-ify it, you'll have many "pep8" lines in your git blame for a point, but by integrating it in your process that will disappear pretty clean.

comment 11y ago · link · parent

In my case I am a fan of:

    abort(400,
          message='All order_items must have a quantity_to_ship.')
(not giving the parens an entire line)

I'm not a fan of 80 characters, but I am a fan of less than 120 characters, if simply that there is a point where a line won't fit in a terminal thats in half of a "standard laptop" screen (i.e. the limit to where I could put two files next to each other)

comment 11y ago · link · parent

That's a good point.

The auto industry might not be the best place for where you want to apply protectionism. But one pretty good usage is when the local industry is in its infancy.

It's pretty well accepted that the IMF forcing so many African countries to drop agriculture-related tariffs has been among the biggest failures of modern economics.

1
170171172
225