Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
munro
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
211.
▲
by
munro
12y ago
> Parser generators are a great help in writing parsers, but they all have one major drawback--they are based on grammars. So what's wrong with grammars? Well ... nothing as an expository tool. When you want to diagram a complex rul
212.
▲
by
munro
12y ago
Where have they been found? This doesn't prove your claim that Tetris teaches geometry, or anything really, there's no data. I'm sure it does have some affect though, like playing a lot of Tetris improves your ability to pl
213.
▲
by
munro
12y ago
You can write a function to do partial updates, and it wouldn't be any different than if it was in core. If you're using Amazon RDS they include PLV8 to make it even easier. :D Here's someone building functions for a MongoDB
214.
▲
by
munro
12y ago
Postgres could already index JSON fields since it can index arbitrary functions! create index on invoice_docs((body->> 'created_at')::timestamptz) Love hearing new Postgres features though :) -- jsonb for less space,
215.
▲
by
munro
12y ago
PEG.js is definitely fun to prototype ideas in the browser. My new love is Parsec [1] + doctest [2]. You start building simple little parsers, and build on top of them, plus inline testing makes it easy to write the parsers correctly. Als
216.
▲
by
munro
12y ago
That's how I find functions in Haskell! [1] Most of the time searching the type will give you the function you need. [1] https://www.haskell.org/hoogle/?hoogle=%28a+-%3E+b%29+-%3E+%...
217.
▲
by
munro
12y ago
Yea, I really like GADT too much to give it up. With Swift/Haxe/Rust/Haskell/F# all having them. You may find this interesting, someone implemented a parsec-like library in Go [1]. I haven't wrapped my head around
218.
▲
by
munro
12y ago
Nice optimization for rerendering HTML, I wonder if React uses this technique. Also, sometimes I wonder if it's worth pulling out separate concepts from a data structure ... I usually just embed them, but I always consider building a p
219.
▲
by
munro
12y ago
Nice, I've been wanting this, except for online things. Like when I hit a road block with Idris/Haskell, I wish I could just talk to someone about what I'm thinking. And I also enjoy offering up my expertise, usually in #ja
220.
▲
by
munro
12y ago
#1 -- Separating by concerns is much preferable to me, organizing by controllers/directives/services/... is a separation of technology, not the high level concept. There's a great React video on this concept, as well as
221.
▲
by
munro
12y ago
Haxe would be a perfect language to express shared algorithms in. Grab an algorithm, and transcompile it to your favorite language.
222.
▲
by
munro
12y ago
I've used Parsec + Doctest and it was a dream. > I'd recommend writing a lot of unit tests for your parser. It's easy to play around in the REPL and test things out ... Doctest feels like a REPL in your source, making it e
223.
▲
by
munro
12y ago
Half baked thought.. more looking for discussion. :) I've checked out Rust a bit, and their approach to memory safety seems pretty novel, by statically tracking where a piece of memory is being used in computation and only allowing it
224.
▲
by
munro
12y ago
Looks similar to Haxe, in that they're targeting interoperability. But with less platform support. I personally have yet to use Haxe, but the people I know who use it love it. I'm keeping it in mind for a good use case! Such as
225.
▲
by
munro
12y ago
> There are no grocery stores within city limits because of lack of customers and local crime rates. First one that came to mind was the Whole Foods [1] next to the hospital. They look to be doing very well from the hospital employees.
226.
▲
by
munro
12y ago
Not sure about the implementation, like is .train() auto scaling the network size? I'm guessing there isn't enough neurons to do 3-bit xor logic. Try adding more hidden layers! Also keep in mind that there needs to be neurons to
227.
▲
by
munro
12y ago
It's hard for me to submit to a philosophy for reasons like that it's beautiful, and that you will reach zen. Level 3 enlightenment sounds very cultish to me. :) I've dropped the notion of REST and been very happy with simpl
228.
▲
by
munro
12y ago
Is this, or could, LED gardens be more efficient per sqft than leaving crops directly in the sunlight? Since a lot of spectrum is unused for photosythesis [1][2], the conversion of {full spectrum -> electricity -> required spectrum}
229.
▲
by
munro
12y ago
I can definitely hit the API from the websocket server, but I just didn't even bother! :D I just wrote the websocket server to do publishing events, and left syncing issues to the API
230.
▲
by
munro
12y ago
I used Socket.io for my site, so I don't care what the implementation. I just needed a way to push realtime events to the user. Side note: Thinking about switching to SockJS since I use 1% of Socket.io features, but it's working
231.
▲
by
munro
12y ago
While adding chat to a site, I realized the same conclusions. I started adding browser->server commands to my WebSocket instance, but then I realized I had everything already setup to do that in my API, and I was just splaying browser-&
232.
▲
by
munro
12y ago
Actually, they could of borrowed from Python 3's type annotation syntax! [1] def hello(name : String) -> io String: [1] http://legacy.python.org/dev/peps/pep-3107/
233.
▲
by
munro
12y ago
You're conflating the term "side effect", in functional programming it only describes purity. That is all. [1] [1] http://en.wikipedia.org/wiki/Side_effect_(computer_science)
234.
▲
by
munro
12y ago
It makes more sense if you think of your program as schematics for building a machine. Following that metaphor, the type system can help you find flaws in your design. When you build your schematics, you're still constrained by the r
235.
▲
by
munro
12y ago
Wouldn't the proposed function then just not compile for the instances were it would be impossible to test, as desired? It would still be useful for where it does work, like in the code you provided. Seems like a lack of meta program
236.
▲
by
munro
12y ago
Is it possible with Idris to programmatically create the `decideValidity` function? Conceptually it seems trivial to do, I could imagine building it with meta programming. My crazy pseudo code-- :D decideValidity : (p : Proof) ->
237.
▲
by
munro
12y ago
Anyone know how runtime IO errors would be handle with dependent types? You can't prove that an outside source is going to return what you expect. Would you just prove that it essentially returns a "Maybe" ? Haskell exceptio
238.
▲
by
munro
12y ago
I had the same thought, seemed off. What I think of "functional programming", and how it seems to be used, is that a function has to be pure.
239.
▲
by
munro
12y ago
Seeing a site blatantly cop their style makes me distrust them, since they put very little time into their company. It doesn't convey seriousness. I think there is room for a company that simplifies nootropics though, it's a wild
240.
▲
by
munro
12y ago
Actually the Soylent community is well aware of the alternatives, still none of them are up to Soylent's nutrition level! But you can see people using those things as bases in their DIY recipes [1]. You will start experience joint pa
More ›