21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions
blog: https://rtpg.co
email: raphael at above domain
5101.
Number Munchers ( for young desperadoes)(youtube.com ↗)
1 points · by rtpg · 11y ago · discuss
comment 11y ago · link · parent
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
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
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
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
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
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
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
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
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
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
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
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
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
So your iteration procedure will probably get to a good approximation, but might not find the "core" expression.
comment 11y ago · link · parent
I would imagine that information imbalance increases make a market less efficient, not more efficient.
comment 11y ago · link · parent
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
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
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
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
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.