Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_halgari
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
121.
▲
by
_halgari
13y ago
In core.async code inside (go) blocks are run via a fixed thread pool (a large one, but still fixed), when you use <! and >! the code after the put/take is turned into a callback that is attached to the channel. The thread is the
122.
▲
by
_halgari
13y ago
Using Thread/sleep inside of a go block is questionable. Using >!! and <!! inside a go block is simply wrong. Please switch to <! and >! and if you aren't simulating actual work, remove Thread/sleep. Failing to do
123.
▲
Make No Promises
(swannodette.github.io)
98 points
by
_halgari
13y ago
|
36 comments
124.
▲
by
_halgari
13y ago
Any chance of getting paredit soon? Still the reason why I never use LT for more than 10 minutes with each release.
125.
▲
by
_halgari
13y ago
QuickCheck (and SimpleCheck) have the ability to narrow the data being tested to attempt to find a problem. So where test.generative will say "This function failed when passed 42", QuickCheck will say "This function failed, w
126.
▲
The State Machines of Core.Async
(hueypetersen.com)
84 points
by
_halgari
13y ago
|
2 comments
127.
▲
by
_halgari
13y ago
not true at all. Quasar uses byte code manipulation, core.async uses Clojure macros to pre-process code. The Quasar code is a re-implementation of the client end api, not the underlying protocols.
128.
▲
by
_halgari
13y ago
can we please get paredit? I would probably use it if it had that feature, but until it does, it's basically useless for my day-to-day work.
129.
▲
by
_halgari
13y ago
you could do it with channels, but also by extending the go macro itself. The mini compiler behind the go macro is designed to be extensible. In the test suite for core.async the compiler is run through a series of tests using a "runne
130.
▲
by
_halgari
13y ago
The channels themselves are a bit hard to understand because there's a careful dance of locks/unlocks to get it all to work correctly, but it shouldn't be hard to figure out. The IOC go macro is huge (about 500/600 loc)
131.
▲
by
_halgari
13y ago
There really aren't any semantic limitations of the go macro. About the only thing that doesn't work, is that you can't use the "binding" macro inside of a go macro (but using one outside the macro will work as expe
132.
▲
by
_halgari
13y ago
I've been solving real-world problems with Clojure for some time now, and haven't had any problems with immutable state or functional programming. Perhaps you haven't used the language enough to really get a handle on how thi