Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
siraben
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
511.
▲
by
siraben
6y ago
Worth noting that this is written by a 15 year old. This looks interesting, nice integration with Elasticsearch as well. However, I see and have tried tools like this several times in the past (tiddlywiki, org-brain, etc.) and haven't
512.
▲
by
siraben
6y ago
They're trivial constructions yes. But the difference is the shift in vocabulary, instead of understanding functor fusion in an ad-hoc way, the concept can be made more precise, also it can lead you to find other "non-trivial"
513.
▲
by
siraben
6y ago
> But it is possible I am just not imaginative enough. Do you have a concrete example of this? Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h
514.
▲
by
siraben
6y ago
This graphical notation for linear algebra isn't like the usual diagram notation category theory at all. > Is category theory a useful organizational tool in certain abstract branches of mathematics? Yes. Abstracting math in a very
515.
▲
by
siraben
6y ago
When I took a course on linear algebra, the professor would introduce the notion of vector spaces and linear transformations first before talking about matrices, and actually one can derive the matrix multiplication algorithm from the speci
516.
▲
by
siraben
6y ago
This was a nice tour of how concise J can be. To see more of this stuff I highly recommend the Concrete Mathematics Companion[0], which uses J as an algebraic tool to reason about the correctness of derivations in that excellent book by Kn
517.
▲
Codata in action, or how to connect FP and OOP
(javiercasas.com)
100 points
by
siraben
6y ago
|
54 comments
518.
▲
by
siraben
6y ago
If you're talking about the inference rules used to specify the type system of a programming language, one of Wikipedia's[0] references is[1] which from a quick skim seems adequate. The main takeaway is that the things above the l
519.
▲
by
siraben
6y ago
There's a reason why a lot of programming language papers use formal math notation, because it's a lot more concise to express the entire typing rules of your language in a dozen or so inference rules rather than a more convoluted
520.
▲
by
siraben
6y ago
Also, these laws are immensely valuable to compilers. The Haskell foldr/build rewrite rule allows for intermediate lists to be eliminated altogether[0], so you can write sum (map square [1..n]) and the compiler will remove the i
521.
▲
by
siraben
6y ago
Having learned FP's design patterns before OOP's, it was amusing to ask questions such as, "what are the laws for visitors/iterators/builders?" In the FP community, the laws for folds/unfolds/functors
522.
▲
by
siraben
6y ago
Yes, overuse of abstractions is a problem, however I'd argue from experience that using recursions schemes in FP allow us to be free from "the goto of FP", that is, direct recursion. You can of course still write programs in
523.
▲
by
siraben
6y ago
Here's a clearer version of the paper[0]. This paper[1] is a good way for object-oriented programmers to understand why functional programmers care about these higher order abstractions. The goal is not so different from OOP, which is
524.
▲
by
siraben
6y ago
Seeing projects like this from time to time always brings renewed interest to the TI graphic calculators. A while back I wrote a Forth-based operating system for the TI-84+[0] which uses the TiLem emulator[1]. I didn't want the softwar
525.
▲
by
siraben
6y ago
The TI-84+ doesn't even have a test mode. You can have data that survives a RAM clear by grouping and ungrouping the data.
526.
▲
by
siraben
6y ago
Contrast Roman numerals with the rod calculus[0] invented in Ancient China. Wikipedia has a list of algorithms for calculating with rods, from the usual arithmetic operations to fractions, division, square and cube roots, Gaussian eliminati
527.
▲
by
siraben
6y ago
While some of the formal notions of type theory can seem daunting, I personally have found it extraordinarily useful in being able to understand the different expressiveness of type systems in programming languages. There are languages that
528.
▲
by
siraben
6y ago
Writing interpreters in Haskell (which is what some of the lessons seem to be about) is a great way to learn the language. It naturally motivates recursion, algebraic data types, strong types, higher-order functions and later, when effects
529.
▲
by
siraben
6y ago
Yes, these techniques have been used to find bases and destroy them. Along with the texture rotation trick, there's also the position of bedrock whose distribution is fixed in every Minecraft world, so if you show exposed bedrock durin
530.
▲
by
siraben
6y ago
I love this project, having done a fair bit of Z80 programming myself. For all it's baroqueness, the Z80 is still in common use in high schools and universities in the form of TI-84 calculator series. Looks like this project has a ZX S
531.
▲
by
siraben
6y ago
I should also follow up with a technique that might be of interest to programmers. Some Minecraft blocks have textures that appear rotated in one of four ways. Turns out this rotation is pseudorandom, the rotation number is a result of seed
532.
▲
by
siraben
6y ago
One recent notable achievement by Minecraft@Home was the discovery[0] of the start screen panorama seed which was seen from Beta 1.8 up to 1.12. Reverse engineering Minecraft seeds is an impressive feat given that the search space is so la
533.
▲
by
siraben
6y ago
This is fascinating. It seems that GPT-3 does well with general, sensible questions that seemingly involve spitting out facts or short answers (prose, code), but does very poorly with tasks specialized programs could do. I wonder what this
534.
▲
Ask HN: How do you stay in the loop with HN threads?
6 points
by
siraben
6y ago
|
1 comments
535.
▲
by
siraben
6y ago
Do you have a link to that video?
536.
▲
by
siraben
6y ago
Optimizing Haskell for performance can be tricky. When I wrote a functional image library (updated at [0]) I tried to get the frame draw rate down by using strictness, unpacked records, and so on, but one of the changes that made the bigges
537.
▲
by
siraben
6y ago
As Simon Peyton-Jones put it[0], Haskell is a language where people work as well as play. Sometimes there's an obvious practical use, sometimes it's not so obvious or may not exist at all. In this case, I as a Haskeller don'
538.
▲
by
siraben
6y ago
If anyone is confused by how the author uses "proof" in this article, they are referring to the Curry-Howard isomorphism that types represent propositions in a constructive logic and well-typed terms inhabiting those types can be
539.
▲
by
siraben
6y ago
Paul Graham wrote a really concise document on the core of Lisp, using only 7 primitives to build the meta-circular evaluator.[0] Here's an implementation of it in core Scheme.[1] [0] http://www.paulgraham.com/rootsofl
540.
▲
by
siraben
6y ago
Writing interpreters in any language is a great exercise. And in Rust you can take advantage of ADTs, traits and unit testing to implement an interpreter of your choice. Plus there's also great parser combinator libraries you can use.
More ›