Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
swift
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
271.
▲
by
swift
13y ago
Tear gas canisters are "non-lethal", perhaps, but that's not the bar I think should be set. An example of the kind of thing that can happen: http://gothamist.com/2010/06/01/cooper_union_student_loses_e...
272.
▲
by
swift
13y ago
Apple took care of it for you: http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
273.
▲
by
swift
13y ago
> Living in a suburb/rural area that is more than a half-hour drive from your place of work (in no traffic). That this situation is so common is a symptom of the fact that our cities and towns have been designed around driving. The geog
274.
▲
by
swift
13y ago
I don't see any metaprogramming going on in the original post at all.
275.
▲
by
swift
13y ago
Nice. I like this version!
276.
▲
by
swift
13y ago
Heh, that's actually slightly shorter than this Haskell version: print =<< sum . map read . lines <$> readFile "somefile.txt" Someone can probably golf this shorter, though. =)
277.
▲
by
swift
14y ago
Your categorical statement about rules is an interesting one. I think this is actually a mathematical claim which I'm fairly certain is false. It'd be interesting to explore whether the space of rules that keep everyone on an even keel incl
278.
▲
by
swift
14y ago
I have to agree with the GP here. Haskell is actually an exceptionally simple, easy language to work with, once you get the basic concepts down. I have occasionally suffered some confusion in Haskell because of poorly documented third-party
279.
▲
by
swift
14y ago
I read "safe" differently than you did; now I'm on the same page. With or without a GC, if you want to guarantee safety in that sense no matter what, you're right - you just can't allocate memory. So in the worst case running in a managed e
280.
▲
by
swift
14y ago
Paredit is super great, indeed. Lisp is perfect for this sort of thing.
281.
▲
by
swift
14y ago
This looks really interesting! I look forward to reading through it tonight.
282.
▲
by
swift
14y ago
The idea that really excites me is 'STRUCTURE editor as a language' - that is, the same sort of grammar as Vim, but manipulating semantically meaningful structures like expressions or functions instead of text. I'd love to see an editor ree
283.
▲
by
swift
14y ago
This is actually a really good point. Garbage collection has significant advantages for concurrency because it solves this problem so nicely; avoiding these issues in C++ often isn't just difficult for the programmer but also costs you perf
284.
▲
by
swift
14y ago
Generally garbage collection algorithms more sophisticated than reference counting can handle cycles just fine. Certainly this is the case for Java. Edit: Or perhaps you mean, could cause the garbage collector to run? I don't see why that'd
285.
▲
by
swift
14y ago
Actually I think Haskell does things pretty well on this one. People often complain about the operator-heavy nature of Haskell, but I find that after a while you're familiar with all of the popular operators and they just fade into the back
286.
▲
by
swift
14y ago
Mixins would be great too.
287.
▲
by
swift
14y ago
In my opinion good uses of operator overloading are ones that preserve the mathematical properties of the operator, so that the operator is in some sense "the same operation", just for different types. By this standard "+" for string concat
288.
▲
by
swift
14y ago
A commenter on that page claims that having an array at the top level is not valid JSON, but they're wrong. The RFC (found at http://www.ietf.org/rfc/rfc4627.txt?number=4627 ) defines the root nonterminal in the JSON grammar as: JSON-t
289.
▲
by
swift
14y ago
I don't really feel either of those features are that 'strange'. Most of C++'s features are not bizarre considered in isolation. Their ugliness comes from the fact that they have surprising limitations, unpleasant syntax, and don't compose
290.
▲
by
swift
14y ago
This is a depressing read, honestly. I can't believe it's 2013 and we can't reliably use SVG images.
291.
▲
by
swift
14y ago
vim-patchreview is a bit different, but also of interest: https://github.com/vim-scripts/patchreview.vim I find it really useful in particular for working with Mercurial patch queues. I have a command in my .vimrc that will run ReversePat
292.
▲
by
swift
14y ago
I don't do use hjkl out of concerns about optimality, personally. I do it because I find moving my hand back and forth from the home row to the arrow keys is hard on my wrists, and I get tired sooner. I've found that coding is a lot less ha
293.
▲
by
swift
14y ago
Why all this "you want"? I realize it's just a turn of phrase that you are probably using without thinking, but seriously: don't you think grayrest knows what he/she wants better than you do ? Structure editors are extremely useful and do
294.
▲
by
swift
14y ago
CMake is pretty ugly in its own right, though I will grant it's hard to be worse than GNU make.
295.
▲
by
swift
14y ago
iTerm2, at least, can show underlines where you'd expect squiggly lines in GUI vim. It's not as nice as the squigglies but it's pretty functional in practice.
296.
▲
by
swift
14y ago
It works quite well. The only negative I've found is that using matcher seems to disable CtrlP's usual highlighting of which letters in a search result are matched. In the end, though, I went back to Command-T.
297.
▲
by
swift
14y ago
Yeah, that's a fair assessment - compile time code generation is unnecessarily painful in many popular languages. Often even if there is a facility for it built in (e.g. C preprocessor macros, C++ templates), it's less powerful and more com
298.
▲
by
swift
14y ago
I have some interest in this as well. At least in the case of vim, there are completion plugins based on clang that work quite well, but for some reason they don't support navigation right now. Just being able to "go to definition" is a big
299.
▲
by
swift
14y ago
One of these things is not like the others.
300.
▲
by
swift
14y ago
You should be using const variables as much as possible (and in general preferring immutable data). In that case assignment and declaration _must_ take place at the same location.
More ›