Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
121.
▲
by
Peaker
10y ago
It's not really Monads making the language more powerful. It's the taking away of non-pure primitives and libraries -- and replacing those with type-labeled effects. That these effects are composed monadically is a minor detail an
122.
▲
by
Peaker
10y ago
When you gain experience in both C++ and Haskell, the time you spend debugging runtime errors in C++ diminishes somewhat. But the time you spend debugging type errors in Haskell diminishes to almost nil. Experience and practice makes perfec
123.
▲
by
Peaker
10y ago
Folds can be left-associative or right-associative. (l or r suffix). Folds can be eager or lazy (prime suffix for eager). Folds can work with at least 1 element to avoid the empty case ('1' suffix) (e.g: a function like `maximum`)
124.
▲
by
Peaker
10y ago
It is similar to garbage collection, but maybe an order of magnitude worse. The benefits of lazy evaluation are also very nice, though.
125.
▲
by
Peaker
10y ago
Laziness and IO are unrelated. Idris, as you mention, is eager and strict -- and is still pure and uses IO in the same way as Haskell. Evaluation in Haskell does not cause side-effects, including evaluation of IO action values. It is the e
126.
▲
by
Peaker
10y ago
In recent years, I've switched to a Haskell style that is much more "separator-ful". I chain my computations together using the `&`, `<&>` and `>>=` operators. These operators are flipped function applicat
127.
▲
by
Peaker
11y ago
Unfortunately, because of header files, no.
128.
▲
by
Peaker
11y ago
Bummer. Oh well, at least typeof and compound expressions can be blessed?
129.
▲
by
Peaker
11y ago
Software is an area where many more ideas are composed together into a single "product" than other areas. Thus, each single patent tends to affect far more products than other industries. To work around the problem you mentioned,
130.
▲
by
Peaker
11y ago
Yeah, in Yairchu's euler solution, it is called "NonEmpty". Lamdu has a nominal type called "Stream" (nominal types are basically like Haskell's newtypes). You can refer to them via their names in holes. The pu
131.
▲
by
Peaker
11y ago
You misunderstand. Perhaps watch the "inventing on principle" talk (which is an awesome talk, you won't regret it)?
132.
▲
by
Peaker
11y ago
Loading partially incorrect would mean that the invariants are not, in fact, invariants. Encoding the metadata in the text would lose the benefit of using text. At that point you may as well store the code as XML or indeed as we do, in a ke
133.
▲
by
Peaker
11y ago
But what are their advantages? After all, their supposed advantage is their live programming, which you claim you already have with ordinary programming languages.
134.
▲
by
Peaker
11y ago
Do you ever use a spreadsheet?
135.
▲
by
Peaker
11y ago
Do you believe the ux of a spreadsheet used as a program is the same as the ux of writing a similar program textually? Lamdu is partially about bringing the benefits of spreadsheets to general purpose programming.
136.
▲
by
Peaker
11y ago
Not sure what you mean, but there's a config json file in the git repo you can look at and edit while Lamdu is running.
137.
▲
by
Peaker
11y ago
There are numerous benefits that would be lost. In Lamdu, each subexpression has its identity that survives as it is edited, moved, etc. This helps merge changes with far fewer conflicts. Lamdu also allows attaching English names to identif
138.
▲
by
Peaker
11y ago
Of course you can write something incorrect first. But it cannot be syntactically incorrect, because all manipulations are valid ast transformations. You can leave a "hole" in the structure where you're not finished yet. You
139.
▲
by
Peaker
11y ago
It runs the expression you write in the repl, it's as big as you make it. It'll also be sandboxed against thrashing. It's also asynchronous, showing results it computed so far. If example is too big you just get feedback that
140.
▲
by
Peaker
11y ago
Immediate feedback is extremely valuable. This is presented and explained better than I could by Bret Victor's "inventing on principle" talk. We need to get programming out of the "blindly manipulating symbols" phas
141.
▲
by
Peaker
11y ago
There is a built in cons (in the type Stream which is a lazy list). Sum constructors are supported but creating custom ones currently has a very cumbersome ui.
142.
▲
by
Peaker
11y ago
After using apt-get for everything, going back to manually finding an (untrusted) executable, running it, hitting a bunch of next buttons -- seems insane. It is quite bad. External dependencies are also nearly impractical this way, so all
143.
▲
by
Peaker
11y ago
Do note that Haskell is moving forward all the time, and at a rate faster than mainstream is adopting these ideas. Mainstream languages have lambdas, more immutability and stronger types? That's great (non-sarcastically!). Haskell now
144.
▲
by
Peaker
11y ago
For the same reason we want "locate". Except it would be nice to be able to query on many more attributes. And without having the machine be unresponsive for a while every day, only to find that "updatedb" decided to chu
145.
▲
by
Peaker
11y ago
I think when I tried to use it, it enlarged all my stack allocations. When using precise stack allocations (user threads), it causes all the stacks to blow up.
146.
▲
by
Peaker
11y ago
As far as I know, nobody managed to create a comprehensive intrusive data structure library that behaves as optimally as in C, due to the ownership semantic restrictions.
147.
▲
by
Peaker
11y ago
Can a safe interface always be provided?
148.
▲
by
Peaker
11y ago
It's not just stack allocations, it's support for intrusive allocations, pointers not always conforming to simple ownership semantics, etc.
149.
▲
by
Peaker
11y ago
The problem, as I understand it, is that Rust's ownership semantics don't accommodate for the kinds of programming needed by 0 dynamic allocations. Lots of intrusive nodes pointing freely at one another, is an example. I've h
150.
▲
by
Peaker
11y ago
I love the ideas behind Rust. I don't think it can replace C for all use-cases. C has the use-case of zero-dynamic-allocations. AFAIK, Rust is not very compatible with that mode of use.
More ›