Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sold
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
sold
10y ago
Since Django 1.10 you can simply use get_random_secret_key in django.core.management.utils. This will not work: if python3: print (SECRET_KEY) else: print SECRET_KEY because it's a syntax error in Python 3. Instead, you can jus
2.
▲
by
sold
10y ago
No, that's 1.11 (a LTS release)
3.
▲
by
sold
10y ago
"Monad" in English and "Monade" in German are the same, they can both mean the functional programming concept or the philosophical concept. You can just ignore the philosophical concept, it's not relevant to mathema
4.
▲
by
sold
10y ago
It's Python - you can do a lot of meta-programming with it, though unlike Lisp and Mathematica there's a division between expressions and statements.
5.
▲
by
sold
11y ago
Earlier version was wrong https://cstheory.stackexchange.com/questions/1064/polynomial... , I doubt the current version has any substance.
6.
▲
by
sold
11y ago
The algorithm is only of theoretical interest, the situation is similar to primality testing. In practice programs such as nauty are good enough.
7.
▲
by
sold
11y ago
I set up an alarm clock for "detox" every day. I turn off my computer, silence the mobile phone and do nothing but read for hour or two. Resist any temptation to check email. I've enjoyed this article that was recently on HN
8.
▲
by
sold
11y ago
I'd like to add this scenario actually happened during the Cold War. Soviets were reusing one time pads and the US army decrypted some of the messages, among other things this lead to discovery of Soviet spies targeting the US nuclear
9.
▲
by
sold
11y ago
Alias often used commands, I have g = git, sl = ls (common typo). Git: set up aliases. I can type "g co = git checkout", "g st = git status". Git configuration: pull.ff only (then "git pull" does not cause an a
10.
▲
by
sold
11y ago
Yes, ff-only will fail. If C,D are independent and simple, I would go ahead and rebase, otherwise do a proper merge. Remember you can play a lot with git; if you are not sure how it will turn out, checkout a commit (e.g. git checkout origin
11.
▲
by
sold
11y ago
I recommend git config --global pull.ff only instead, then you can use "git pull" without worries. Or, git pull --ff-only
12.
▲
by
sold
11y ago
See also http://www.quora.com/What-is-an-intuitive-way-of-explaining-...
13.
▲
by
sold
11y ago
> in fact, I think it's better than what languages with far richer type systems offer Can you explain why? I don't know Kotlin, but from this page it seems to divide types into nullable and non-nullable (correct me if I'm
14.
▲
by
sold
11y ago
> this can lead to unexpected conflicts and can be relatively counter-intuitive to undo. git merge --abort. Perhaps not intuitive, but it's a single command.
15.
▲
by
sold
12y ago
See other threads e.g. https://news.ycombinator.com/item?id=9053552
16.
▲
by
sold
12y ago
I see, thanks.
17.
▲
by
sold
12y ago
What is the difference between x ?: y and x || y?
18.
▲
by
sold
12y ago
Unary representation is useless when speaking about complexity in number theory. If you take a number N given in unary, convert it to binary and do trial division up to the square root, it will take O(N log N) time for conversion to binary
19.
▲
by
sold
12y ago
Flux https://justgetflux.com/ or redshift http://jonls.dk/redshift/ . Try setting it to the smallest temperature possible for 30 minutes and then turn it off to see the difference. I have it on all the
20.
▲
by
sold
12y ago
Note it's not a pull request; it's an issue in the tracker. Had it been a prepared patch, I would have more sympathy towards the reporter.
21.
▲
by
sold
12y ago
If you ask Mathematica whether x^n + y^n = z^n has solutions for n>2 and x,y,z>0, the system will simplify it to "False", displaying knowledge of Fermat's last theorem. This is taken from documentation (last example in
22.
▲
by
sold
12y ago
A harder quiz: http://helloworldquiz.com/
23.
▲
by
sold
12y ago
That's exactly the point of monads - see http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba... . Such a system is still pure, btw.
24.
▲
by
sold
12y ago
When I write a program, I don't want it to be just correct (true); I want it to be _provably_ correct; I want to be able to be convinced that it is correct, at least in principle, given enough time and whole specification of the system
25.
▲
by
sold
12y ago
I'd like to add x^y is also used other contexts - e.g. for cardinal numbers and ordinal numbers.
26.
▲
by
sold
12y ago
The standard deviation is a poor example IMO, in many languages you can get much closer to mathematical notation. def stddev(x): avg = sum(x)/len(x) return sqrt(sum((xi-avg)**2 for xi in x) / len(x)) std
27.
▲
by
sold
12y ago
To be clear: [] can refer to two different entities, a data constructor (empty list) and a type constructor (the list type).
28.
▲
by
sold
13y ago
Video: http://sms.cam.ac.uk/media/1464870 See also http://research.microsoft.com/en-us/um/people/simonpj/papers...
29.
▲
by
sold
13y ago
Here's a wikipedia link; maybe someone else will give a better description http://en.wikipedia.org/wiki/General-purpose_computing_on_gr...
30.
▲
by
sold
13y ago
Not really; discounting extremely simple programs like print "Hello world", there are many possible stylistic differences and people will write things differently. One person will write for, another while; one i=0;j=0, another j=0
More ›