HNHacker News
TopNewBestAskShowJobs

mneary

1 karma · joined June 29, 2021

submissionscomments
mneary··on A New Approach to Understanding How Machines Think
atomic bomb?
mneary··on Why Probabilistic Programming Matters
Reading this reminded of a fun quote: "Google uses Bayesian filtering the way Microsoft uses the if statement" [1]. I imagine that having probabilistic values as first class primitives is a step in this direction.

[1]: http://www.joelonsoftware.com/items/2005/10/17.html

mneary··on Don’t Be Scared Of Functional Programming
Function composition is a single, special case of a function accepting functional arguments. You could define the compose operator as below:

    compose : (a -> b) -> (b -> c) -> (a -> c)
    a `compose` b = \x -> b(a(x))
However, there is a whole spectrum of additionally possible functions which can be built to accept functions as arguments. Here's a couple of example:

    partial3 : (Integer -> Integer -> Integer) -> (Integer -> Integer)
    partial3 f = f 3
    map : [a] -> (a -> b) -> [b]
    map [] f = []
    map (x:xs) f = (f x):(map xs f)
The first one takes a function and applies an argument, 3; the next one takes a list and a function and maps the list using the provided function. The idea of functions as arguments is a very powerful one, and from my understanding one with which people sometimes struggle.
mneary··on Don’t Be Scared Of Functional Programming
Function composition is very different from passing one function into another and the latter is definitely a concept that most Algebra 2 students would not be able to grok.
mneary··on Mathematics is full of wonderful but relatively unknown theorems
My first thought when I read this title was that there should be a site like Hoogle for mathematical proofs, where one could search by type signature for existing proofs. I'm not sure if people often think of proofs in terms of their type signature, but by Curry-Howard it would be doable.
mneary··on TDD your API
That's really quite impressive! I hadn't realized that you meant that an endpoint can be referenced "in the abstract" without explicit parameters, which makes for much easier integration.

For some reason, though, I feel like the natural language would actually intimidate me. Where are ideas like "sufficient funds" defined?

mneary··on TDD your API
Yeah, I realized the same thing; this aspect really makes it harder to keep the system simple, naturally. I've thought about different ways of approaching this, considering chained requests as a possibility.
mneary··on TDD your API
Thanks, I will definitely look into that.
mneary··on TDD your API
I had a similar goal, and built a simple shell script[1] that would enable its user to write tests as curl requests.

[1]: http://mattneary.com/Quizzical/

mneary··on Ask HN: Creating a query builder for end users
I think that this can be improved by removing the All and Any operators and instead letting segmentations be nested. So for example:

  All
    a = b
    Any
      All
        c = d
        d = f
      c = e
would be

  a = b
    c = d
      d = f
    c = e
I think that it is more intuitive to segment the set as you go.
mneary··on Systems Past: The software innovations we actually use
Considering the idea of a programming language a fundamental innovation derived from FORTRAN disregards earlier concepts, like Gödel numbering from the year 1931, which exhibit language interpretation. I guess what I'm trying to say is that every good idea is closely related to countless others; pigeon-holing them into the Only 8 categories and naming a "first" doesn't do justice to all of the interesting ideas of computation.
mneary··on How to Get a Job at Google
I think being a valedictorian has a lot more to do with saying goodbye (vale) than it does being validated, but I do think you might be right about Google's bias toward those who seek validation.
mneary··on Learn You The Node.js
A for-loop might be a basic programming construct, but it shouldn't be. Mutation and a control flow construct makes for a much worse outlook to the problem than does recursive application of a function.
mneary··on Learn You The Node.js
A far cleaner solution:

    console.log(process.argv.slice(2).reduce(function(a, x) {
      return a + parseFloat(x) 
    }, 0));
mneary··on How I faced my fears and learned to be good at math
This is generally the case; however, for those truly gifted at math, high-school math, and for the most part college math, is fully understandable by intuition alone.
mneary··on How I faced my fears and learned to be good at math
There are plenty of worthwhile subjects in Math which have no concrete application to the real world. One needs to be able to understand these abstract ideas for what they are, not merely formality surrounding a simple real life phenomenon.
mneary··on Type Checking in JavaScript
I went back and forth with that. I think I went with postfix because there exists another syntax which looks prefix:

    T([Number, Number])(function(x) { return x; })
For this method, a function type is defined and then serves as a constructor that accepts a function as argument.
mneary··on Type Checking in JavaScript
With Typical[1], I took a different approach enforcing types on the functions.

[1]: https://github.com/mattneary/Typical

mneary··on Clojure from the ground up
I do not see how anyone could possibly believe the author is exhibiting misogyny. Perhaps you are confused by the meaning of the word:

Misogyny /mɪˈsɒdʒɪni/ is the hatred or dislike of women or girls.

mneary··on You Can't JavaScript Under Pressure
Just under 3 minutes!
mneary··on How I thought I wanted to become a digital nomad
I think you are making quite a few generalizations. I've on multiple occasions coded for over 12 hours straight. With regard to all-nighters, I've had them stretch to noon.
mneary··on Creative Link Effects - Subtle and modern effects for links or menu items
Although I know these are intended for nav-bars, a nice pattern I remember seeing for body links was use of a diamond prefix, and underline upon hover. It was nicely subtle, yet distinguishable and overall great for bodies of text.
mneary··on Is it too late to be awesome?
Prisoner's Dilemma by William Poundstone traces his development of game theory.
mneary··on Learn Lua in 15 Minutes
Anyone else catch the Gauss reference[1] in the for loop section?

[1] http://en.wikipedia.org/wiki/Carl_Friedrich_Gauss#Anecdotes