Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Tarean
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
121.
▲
by
Tarean
9y ago
> it is copying, however other passes that just punch holes into existing cards (to wipe pointers that are not pointed to anymore without moving a lot of memory) have and will be added I have a basic understanding about card tables and p
122.
▲
by
Tarean
9y ago
Can't use the object content since that can change. So you need a unique identifier. Memory position can't be used because the gc moves objects around. Random number it is.
123.
▲
by
Tarean
9y ago
I like fugitive - it feels like cli git without having to leave the editor. GAdd adds the currently file/selected lines, GBlame pulls up git blame information the ability to reblame, GStatus show the status with the ability to jump t
124.
▲
by
Tarean
9y ago
Simon Peyton Jones, one of the driving forces behind GHC, uses braces.
125.
▲
by
Tarean
9y ago
Haskell is also a LOT more lenient. So stuff like if x < 5 then 42 else x + 1 + 2 is legal.
126.
▲
by
Tarean
9y ago
On retrospect I probably want it to be more like lua? f(this, other) -> f.call(this, other) obj.f(other) -> obj.f.call(obj, other) and then replace implicit this with the first argument? It is a tiny but more verbose but
127.
▲
by
Tarean
9y ago
There are some extensions like UndecidableInstances or OverloadableSyntax which are great in specific files but which would be awful in the entire codebase.
128.
▲
by
Tarean
9y ago
> what you really want is a system that lets you mutate something as long as you are the only one with a reference to it You mean like STRef[1]? Because that is exactly what STRef does. It is worth noting that STRef is significantly safe
129.
▲
by
Tarean
9y ago
I kind of wish x.f(y) was the same as f(x, y) in javascript.
130.
▲
by
Tarean
9y ago
I'd argue that even the crazy ghc features are mostly trustable. Virtually every language extension and even a lot of the optimizations are explained in papers - including design tradeoffs, proofs of correctness and interactions with o
131.
▲
by
Tarean
9y ago
Macros are less nice in non-lispy languages. If the language ast and syntax aren't iconomorphic then you add a learning curve and need to insulate users from compiler internal changesy quasy quoting doesn't work everywhere. In a c
132.
▲
by
Tarean
9y ago
Iirc google and facebook decided against using git because it didn't scale to stupidly enormous code bases. Microsoft decided to stick with git but add non-strict fetching to it. On the plus side, still all the advantages of easy branc
133.
▲
by
Tarean
9y ago
callCC is my favorite goto weirdness. import Control.Monad.Cont import Data.Function (fix) main = for 0 (<3) (+1) $ \i -> do liftIO (print i) for z p s body = do (jmp, i) <- label z when
134.
▲
by
Tarean
9y ago
This sort of articles always end up with people doubting that Facebook actually records audio, me included. But somehow it seems even scarier how much information facebook can scrape without having to record audio. They can read chats and e
135.
▲
by
Tarean
9y ago
If the user has given permission for `android.permission.RECORD_AUDIO` then it should be possible to use a MediaRecorder in a background service? My first impression was that an always on microphone would murder battery life. Only recording
136.
▲
by
Tarean
9y ago
Sure, but every field access like Temperature temp = Temperature.fromCelsius(13); ... System.out.println(temp.celsius); would have to be changed to System.out.println(temp.getCelsius()); when the internal represent
137.
▲
by
Tarean
9y ago
If you have a temperature class with a celsius field and change the internal representation to kelvin you have to update all client code to call a conversion method. C#s syntax sugar allows you to slot in the conversion method without a bre
138.
▲
by
Tarean
9y ago
Multi threaded + async isn't a problem if the runtime system supports it. Async + Event driven works transparently with higher order frp with the usual tradeoffs of first order vs higher order frp. Multi threaded + Event driven seems l
139.
▲
by
Tarean
9y ago
I really want to say `text objects are faster than using the mouse anyway` but it is probably worth noting that vim has mouse support, even in most terminals. It should be default in neovim. In vim it is disabled by default and the help say
140.
▲
by
Tarean
9y ago
There are basically three parts to the command > dip Delete in paragraph. Command+text object is probably the most frequent pattern in vim for me. It would also would work with other text objects like `di(`, `di{`, `di[` to delete betwee
141.
▲
by
Tarean
9y ago
That is assuming that you chain promises like a .then(b).catch(bhandle) .then(c).catch(chandle) instead of a .then(aout => b(aout).catch(bhandle)) .then(bout => c(bout).catch(chandle)) which admittedl
142.
▲
by
Tarean
9y ago
Yeah, sorry, forgot the type variable at first.
143.
▲
by
Tarean
9y ago
> type classes are different because type classes are solved at compile time data Nested a = Nest a (Nested [a]) | Done deriving Show build :: Int -> a -> Nested a build 0 a = Done build i a = Nest a $ build (i-
144.
▲
by
Tarean
9y ago
At least on windows and mac it is really easy to replace it with another icon as well. Probably would have to redo it with each update but still easier than compiling from scratch.
145.
▲
by
Tarean
9y ago
That is probably good advice but this style of coding (which comes down to lawless type classes without inherent utility) does make it much more difficult to read unknown code. Usually documentation isn't fleshed out in internal modul
146.
▲
by
Tarean
9y ago
I don't use it as my main browser but it starts basically instantly, is reasonably snappy and uses far less resources than either firefox or chrome. If you don't have your browser open all the time it seems like a reasonable alter
147.
▲
by
Tarean
9y ago
I'd argue that text objects are by far the biggest advantage vim has over other editing models. From my experience they are pretty easy to learn for programmers.
148.
▲
by
Tarean
9y ago
There is Cloud Haskell[1] which is reasonably close to a Haskell version of Erlang. It forces you to run the same code everywhere while in Erlang you could just hope that the code everywhere is compatible, though. [1] http://hask
149.
▲
by
Tarean
9y ago
The point is that each insertion at the start of the file would memcopy the entire buffer, though. With a few hundred mb file that sounds slow even today. Are you sure that they don't keep a buffer of 10k lines or a gap buffer?
150.
▲
by
Tarean
9y ago
Fun thing - list comprehensions could be seen as map/filter and so on but they could also be seen as syntax sugar for monads: [ x + y for x in xs for y in ys] foo = do x <- xs y <- ys
More ›