Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
winterlight
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
winterlight
9y ago
Nope, that works just fine. >>> def f(*x): print(x[-1]) >>> f(range(300)) 299 And surprisingly, in python 2.7, I was able to define a function that takes more than 255 arguments. But perhaps this only worked bec
2.
▲
How a Polymath Transformed Our Understanding of Information
(aeon.co)
1 points
by
winterlight
9y ago
|
0 comments
3.
▲
by
winterlight
9y ago
The lookup method just checks whether an element exists in a collection or not. List and HashSet implement non-indexable collections, which have no notion of key. The Collection interface is very thin, and it's mostly used when you nee
4.
▲
by
winterlight
9y ago
Ironically, in that situation, using a list might end up being more efficient due to cache locality. Or not. That's why measuring is so important, since performance can be a very counterintuitive subject. Hard-data should always prevai
5.
▲
by
winterlight
9y ago
The interface is the same. For example, in C# you have an interface Collection, which offers a lookup method, and which both HashSet and Lists implement. The point of the OP is that among different implementations for the same interface, ch
6.
▲
by
winterlight
9y ago
I tried this feature when it was available only in pilot mode. It was very nice and fitted quite well my uses. But the UX back then could use some improvements. For example, opening a new tab in a specific container took way too many clicks
7.
▲
by
winterlight
9y ago
It's creative approach to content monetization that solves some of the problems associated with ads, such as visual clutter. But mining is a computationally intensive process. So, in a world where this became commonplace, I can't
8.
▲
by
winterlight
9y ago
I don't know about Flow, but in Typescript you can still fire up a REPL and play around. The difference is that the typechecker validates every command you run. This is enough for small experiences, e.g., when you want to validate an a
9.
▲
by
winterlight
9y ago
My browsing experience on a mobile phone stepped up greatly since I started using Firefox Focus. You don't even need to mess around with plugins because ad blocking is already a built-in core feature.
10.
▲
by
winterlight
9y ago
Modern web development is already hard by itself, specially when it comes to security. A saner runtime language is needed to replace the sub par standard that is javascript. One with a robust type-system and coherent semantics. It won'
11.
▲
by
winterlight
10y ago
What bothers me most about clojure is the abstraction leak when it comes to errors. When something goes wrong (say you passed a value of wrong datatype to a function), it just spits a java error stack. I'd like to have feedback closer
12.
▲
by
winterlight
11y ago
There's a typo in the "What is sodocan.js" lane, right at the bottom of the 2nd paragraph. natuarally => naturally
13.
▲
by
winterlight
11y ago
Thank you. This is a lot of information to digest! But I think it helped me to see the beauty of this. When we map our programs into these well understood abstractions (monads, functors and stuff), we get for free means of combining them an
14.
▲
by
winterlight
11y ago
Thank you. I've just finished the first chapter and it has been a pleasant reading so far. The mapping of "real world" onto Category Theory surely makes the matter more approachable.
15.
▲
by
winterlight
11y ago
What is the value of Category Theory for programming? I'm genuinely interested, as my knowledge about this subject is little to none.