21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions
blog: https://rtpg.co
email: raphael at above domain
comment 12y ago · link · parent
RDB managment is the biggest snorefest in all of software development. There are some times where you have to figure out some crazy select or whatever, but for the most part it's annoying, easy to break, and it takes forever. Django lets me not think about it at all (granted, I'm not writing crazy search things either).
When I started trying out Play Framework (for Scala, because I love type checking) I was absolutely shocked at the lack of an ORM. DB managment is the most boilerplate-y aspect of writing some CRUD, and Play decides not to help you with it.
Their arguments are about "control" and how somehow "SQL is the best DSL" (http://www.playframework.com/documentation/2.0.1/ScalaAnorm).
>val id: Int = SQL("insert into City(name, country) values ({name}, {country}") .on("Cambridge", "New Zealand").executeInsert()
Who could possibly think this "DSL" is 'better' than something like
>City("Cambridge","New Zealand").save()
/endrant
I really like ORMs, and django has the distinction of having the best ORM in my book. I sincerely hope Django would never be reduced to Flask, because I care a lot more about having DB management work without me ripping my hair out than having routes or being able to put everything in one file.
EDIT: for context, I don't ever have to do complicated things with databases, mainly tedious ones, which is probably why my vision of the world might be slightly different than yours.
comment 12y ago · link · parent
Would you rather have mostly short functions with a couple long ones or the opposite?
comment 12y ago · link · parent
French entrepeneurs are relevant maybe to counter the idea that France doesn't know how to innovate. I'm not sure how relevant ebay's guy is as an example. As someone who did something similar (Born in France, went to US for elementary school and middle school, back in france for HS Uni) I feel more american than french.
comment 12y ago · link · parent
EDIT: I'd like to point out that this book covers everything, up to Jobs death, and is about Jobs, not Apple. There's obviously a lot about Apple, but a good amount about Pixar ,NeXT, and Jobs' personal life as well. A great biography IMO, but it's not much about technology.
comment 12y ago · link · parent
BTW the people on #haskell are quite active, and nice :)
(maybe a pointless counter-example, I once went onto #ruby, and asked about an easy way to make a function name refer to a function( to be able to do things like list map f easily, without the superflous do |x| f x end ), and I got yelled at because I was trying to write "non-ruby code".
comment 12y ago · link · parent
On a more meta-level, though, people's political opinions influence their interpretation of statistics, so even if you did prove this ROI, cognitive disonance will fight you extremely hardly. Instead of trying to convince people who are against any form of wealth distribution, it's 1% as difficult to convice the people on the fence (of whom there are also 10x more) , those who are ok with some distribution, that this is a pretty effective replacement/complement for current services.
comment 12y ago · link · parent
Granted, space leak issues are pretty difficult to analyse, so it makes the language seem hard to use in practice, but that's because all the low-hanging fruit like type errors are solved by how the language is designed, so you only end up with the hard bugs.
6194.
Programming Style and Your Brain (2011)(youtube.com ↗)
3 points · by rtpg · 12y ago · discuss
comment 12y ago · link · parent
For a good counter-example, check out a lot of google's JS libs (in all their giant module goodness).
comment 12y ago · link · parent
Let s be a series , with s_n = sum (1 to n, 1) = n if S3 exists (i.e. lim n->infinity s_n exists), then the series (s-s) (where (s-s)_n = s_n - s_n) converges , and it converges towards S3 - S3 (=0).
> = (1 + 1 + 1 + 1 ...) - (0 + 1 + 1 + 1 ...) the series whose sum he's describing here is not (s-s), but another one entirely : u where u_1 = s_1, u_n+1= s_n+1-s_n
These are different series, so it is entirely reasonable for them to converge at different values, 1 doesn't equal 0.
The "real" reason this result isn't what we think it is(apart from "infinite sums are different" argument, which is a non-answer):
>Step 1: Let S = 1 + 2 + 3 + 4 ... What you're doing here firstly, is saying that "I assume that this sum converges, let S be the value it converges to".
So you end up proving (if the other steps weren't also flawed) that S = -1/12, all you're saying is that if the sum exists, then it is -1/12.
The issue here depends on what sort of thing you're working on. The "classic" definition of a limit (convergence of a series) does not work here, because you can prove that for all n, the sum of n numbers will always be at least -1/12 away from -1/12 (on account of it being positive), so it can't converge to -1/12 (hence S not existing).
However, there are techniques for assigning limits to divergent sums. these summability methods will give the same result as the classic analysis for convergent series, but will also give values for some divergent series.
It is similar to analytic continuation( f(x) doesn't exist, but a limit exists in x both from the left and to the right (named y), so we sometimes say that f(x)=y ), in that it allows us to extend the resolution domain slightly. But the classic definition no longer works.
The one used here is zeta function regularization, which consists in the following:
you have a series a , and a function Za(s) = (1/a1^s)+(1/a2^s)+(1/a3^s)+(1/a4^s)+.....
Za is only defined for certain values of s depending on the series. But for a serie representing a convergent sum, we know that Za(-1)= a1+a2+a3+... exists. So this method will give the same limit for convergent sums as the classical method.
For a series with a diverging sum (a_n)=n, Za(-1) doesn't exist, but the limit in -1 exists from both ends (by analytic continuation), so we extend the domain of Za to -1 by the value of this "limit" : -1/12
The article mentions Ramanujan summation, but Zeta regularization is actually a much more useful tool. In
comment 12y ago · link · parent
comment 12y ago · link · parent
Civil rights have definitely gotten worse in the past 15 years, but I'd say they're still better than before 1978 (when FISA was written). Before things like the FISA, the executive was pretty free to do almost anything (and did, see Hoover). As a long term trend, civil rights have been increasing, not decreasing. We've made mistakes that we need to roll back, but acting like this is the fall of the United States as we know it is pretty myopic (people have been predicting the fall of the United State since the 1800s), and not putting much faith into our institutions (which aren't the worst).
comment 12y ago · link · parent
this is the single most dangerous thing about current law enforcement. NSLs completely subvert any recourse to the judiciary without immense risk to yourself. Luckily most judges seem to agree on the ridiculousness of NSLs , and are trying to whittle down the power they have.
comment 12y ago · link · parent
He could ask congress to pass laws, but he's the executive, and considering the executive's contempt for all things from congress, down to the right of congress to check the executive's use of the military (http://en.wikipedia.org/wiki/War_Powers_Resolution#Questions...), one can't hope for too much. At the very least, these executive orders being put into place means that he's signaling Congress that he wouldn't necessarily be against rollbacks of certain points.
If you want a law passed, ask Congress.
comment 12y ago · link · parent
comment 12y ago · link · parent
Hotels are a different matter entirely: firstly, hotels are usually already pretty correctly priced, and services are usually good (in my experience at least). Secondly, the reasons for hotel regulation are still pretty relevant:
- I don't want my neighbor to sublet constantly, and have people run around. The commons (hallways and stuff) will probably get degraded, and my life will be generally shittier (see various stories about subletters).
- On a more maco-level, with things like rent control, subletting makes the supply even more constrained. Between getting rid of subletting and getting rid of rent control, I'd rather get rid of rent control, but in the meantime subletting is also kind of awful.
airbnb's disruption is not uncontroversial