Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
swift
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
211.
▲
by
swift
12y ago
Ptr is exactly the same thing as a C pointer. Critically, if you have a Ptr to some value, that Ptr could become invalid if the value gets moved by the garbage collector, just like a C pointer would. That's why you'd never use Ptr
212.
▲
by
swift
12y ago
Definitely the best variant of Threes/2048 I've seen so far. Really nice work!
213.
▲
by
swift
12y ago
That's true, but personally I still don't find this model ideal because the synchronization points are implicit. The cleanest concept I know of for dealing with synchronization is transactions.
214.
▲
by
swift
13y ago
I don't recall ever being excited about a compiler release before, but this has got me excited. Typed holes, overloaded lists, pattern synonyms, new IO manager, new code generator, interruptible FFI calls, parallel compilation, and ton
215.
▲
by
swift
13y ago
The second point brings up an issue that confused me when I was first learning Haskell; maybe I can help others that are similarly confused. Coming from OO languages, the lack of heterogeneous containers seems painful in Haskell - after all
216.
▲
by
swift
13y ago
It's fair to say that it's laziness, in my view. That sort of thing is just a manual implementation of what laziness would do in a particular situation. The closure that the thunk would hold is essentially diffused into the object
217.
▲
by
swift
13y ago
Yup, same here. Just tested it. I don't understand what's new here; can anyone explain?
218.
▲
by
swift
13y ago
Crockford's explanation is pretty absurd, though.
219.
▲
by
swift
13y ago
I never asked for anything; perhaps you are confusing me with luikore. Namespaces and modules do not prevent name clashes, at least in any language that I'm aware of. Even with a more sophisticated system like Haskell's, you'
220.
▲
by
swift
13y ago
I think the key words here are "look like". This is an article written for people without much knowledge of Objective-C.
221.
▲
by
swift
13y ago
The whole problem is that namespaces are open, and you can add to them from anywhere. This means a namespace alias is useless in this situation. There's no distinction between things put in namespace std by library A and things put the
222.
▲
by
swift
13y ago
Heh, true, though it requires that the function you want to call be in a dynamic library.
223.
▲
by
swift
13y ago
Visual Studio doesn't exactly treat T4 as a first-class language, which is a shame. Debugging it is much harder than it should be. I've found that it's frankly easier just to write your code generation in C# itself as an extr
224.
▲
by
swift
13y ago
I realize that vimscript or elisp may not be your cup of tea, but you can already have exactly this "hot reload" experience with both vim and emacs.
225.
▲
by
swift
13y ago
I think you're selling Clojure short. Its emphasis on purity, STM, and persistent data structures is quite different from most other Lisp-like languages, and indeed most other languages period. Those ideas have certain been tried elsew
226.
▲
by
swift
13y ago
They're actually pretty good. Sit/stand electric desks all around, and lots of great spaces throughout the building if you get tired of your desk and want a change of pace. I was spoiled in previous jobs by having my own office, b
227.
▲
by
swift
13y ago
Using multiple single-threaded processes still counts as parallelism, sure, but please don't set a precedent for using the term "multithreading" to mean something other than "using multiple threads". Nobody who work
228.
▲
by
swift
13y ago
There are some novels (Gravity's Rainbow comes to mind) where I frequently had to look up various events and people that were mentioned in the text. I can see this being helpful, but I'd probably prefer an "annotated edition&
229.
▲
by
swift
13y ago
IMO that article doesn't really say anything interesting. There is no clear dividing line between the lexer, the parser, and semantic analysis. You have a great deal of freedom to move work between these phases, and what the grammar yo
230.
▲
by
swift
13y ago
I understood what you were saying. My point is that the "simple solution" you propose is not really a solution at all. If that's the best solution we have for implementing a "basic job guarantee", then such a thing
231.
▲
by
swift
13y ago
These are human beings we're talking about, with ideas and dreams and goals. I find the idea of wasting their lives with 'make-work' morally reprehensible. We should be trying to free them up to focus on their dreams and big
232.
▲
by
swift
13y ago
Yeah, my gut feeling is that this sort of social safety net will allow more people to take on risky projects that have low probability of success but big potential payoff. This seems likely to be a net win for society even if most people do
233.
▲
by
swift
13y ago
If you're working in an organization that employs pre-merge code review, you may have to modify your topic branch several times before it's ready to be merged into the main development branch. Creating a new branch every time so t
234.
▲
by
swift
13y ago
I'm not sure a "problem" exists here. Keeping your personal topic branch rebased on top of the main development branch is a perfectly reasonable workflow, and quite comparable to what you'd do with Mercurial patch queues
235.
▲
by
swift
13y ago
This seems like a good idea. (With a setting to turn it off, of course.) Ideally git itself should record this information somewhere, though.
236.
▲
by
swift
13y ago
Haskell also has a library for doctests, though I don't see them used that frequently: https://github.com/sol/doctest-haskell#readme
237.
▲
by
swift
13y ago
Indentation is also significant in Haskell, for example.
238.
▲
by
swift
13y ago
This probably has something to do with your network setup. I've been able to get the lag down sufficiently that some games are playable, though I'd never recommend playing a twitch-based FPS over Airplay. For me what really made a
239.
▲
by
swift
13y ago
Some people hoard these things to a degree which is completely out of hand.
240.
▲
by
swift
13y ago
Comments are appropriate in JSON which is written by humans. If it's written by a machine, of course comments are irrelevant. Situations where you need to automatically make changes to JSON which is primarily maintained by humans are a
More ›