HNHacker News
TopNewBestAskShowJobs

peaton

54 karma · joined June 16, 2014

http://hazelpear.com
submissionscomments
peaton··on ACM and the Professional Programmer
Hmm, I'm getting a 500 error. What's up?
peaton··on Don’t Be Scared Of Functional Programming
I knew I was making a strong assertion when I mentioned function composition. I'm grateful for your feedback, but perhaps you could elaborate? I don't see why they have to be "very different". I think you called me on a certain case, but an example like this demonstrates that they are not so "very different":

    def a(b):
        m = 0
        return b(m)
Or even:

    def a(b):
        m = b(1)
        return m+7
I don't see how these are not a form of function composition. I'm definitely no expert. But I'd really appreciate an elaboration so I can learn from any mistake I'm making.
peaton··on Don’t Be Scared Of Functional Programming
> The literature relies on somewhat foreboding statements like “functions as first-class objects,” and “eliminating side effects.

I personally find this view a little overbearing.

In "lay programmer's" terms, functions as first-class objects can often come down to being able to pass functions to other functions or function composition. Most of us learned about function composition in Algebra 2... So that's pretty straightforward even at its worst.

Eliminating side effects is equally straightforward in that all it means is that any variables outside the scope of a given function are not changed by the function.

peaton··on Dependently Typed Programming
Hmm, I don't believe so. My prof went on about a group at Penn using dependent types to prove the security of server applications. But that is definitely an interesting paper too. Thanks for sharing!
peaton··on Dependently Typed Programming
Ah, I see. That last bit is especially interesting.

I would argue that there are many languages (and no reason they couldn't) act otherwise with regard to that second quote. However, the line between pure functional and not starts to become fuzzy as well.

peaton··on Dependently Typed Programming
UPenn has a ton of really interesting work on extending the Haskell type system to support dependent typing. Some of the coolest pieces I've heard about had to do with guaranteeing the security of a server application through dependent typing.

I never found out what the actual paper or project was that accomplished this. But these two papers[1][2] seems pretty interesting - having to do with guaranteeing safety of database access.

[1] http://www.cis.upenn.edu/%7Eeir/papers/2012/singletons/paper...

[2] http://www.cis.upenn.edu/~ahae/papers/dfuzz-popl2013.pdf

peaton··on Dependently Typed Programming
That's a little vague, I think. Pure functional programming has no side effects. Isn't that as succinct & thorough as it gets?
peaton··on Dependently Typed Programming
> In a functional language, you describe the problem to the computer, and it solves it for you.

Isn't this the definition of a declarative programming paradigm? (I.e. SQL?)

peaton··on A 30-minute Introduction to Rust
I don't mean to sounds skeptic when I say this: could you list some of the software (or teams) that use Erlang?
peaton··on A 30-minute Introduction to Rust
Are there specific implementation models or areas or systems programming that favor (or have come to use more exclusively) Rust or Erlang?
peaton··on A 30-minute Introduction to Rust
As someone fairly new to systems programming, I can still see why you'd want to pick a language like Rust over C. But can someone explain to me the difference between Rust and Erlang? They are both system languages, no? Erlang is much more established. But what are the key differences? And I'd ask, "which should I learn?", but that is generally not a great question...
peaton··on Rest – A Haskell REST framework
I know this was just released, but are there any open source projects that currently use this?
peaton··on An Introduction to Reactive Programming
Will do. Thanks for the pointer. Do you have any suggestions offhand?
peaton··on An Introduction to Reactive Programming
This is super helpful. The example with the multi-click stream is pretty impressive as a demo. Is anyone familiar with the Elm[1] language/library that compiles to JS? Does it facilitate good FRP practice? Or are there any better libraries/languages out there? I've just seen a lot of Elm when I've google FRP in the past. (Followed closely by Haskell.)

[1] http://elm-lang.org/

peaton··on Python 3 Features
I see, great! That is exactly what I was looking for. Thanks!
peaton··on Python 3 Features
Could somebody explain what all the hype is about generators? Why is this better practice? Optimization, readability, what's up?
peaton··on Sandstorm – Personal Cloud Platform
I'm a little confused by the web page. Is there a link to an example of integrating/porting an existing app with this platform?
peaton··on SoundCloud Command-Line Client
The sense of depth in the logo is pretty incredible. In other news, does anyone know if there is a terminal client for Spotify?
peaton··on The Worst Programming Interview Question
Ok, that was poorly worded. What I mean is that a linked list can be thought of as a restrictive graph. I'm just saying I'd prefer to think of it as a graph. I could still be wrong. Is that kosher?
peaton··on The Worst Programming Interview Question
Sure, I stretched that too far. But hopefully the point is made. Then should we expect no students (or anyone) to be able to build a compiler (or os kernel) in any amount of time given the internet and whatnot? While I may be articulating this poorly, I think my fundamental issue with his point is solid.
peaton··on The Worst Programming Interview Question
Nor is the 12 years thing particularly good reasoning... By that thought process, it took humans hundreds/thousands/millions of years to develop a compiler, so how can I be expected to develop one over the course of 4 years in college? Or even over the course of my life?
peaton··on The Worst Programming Interview Question
I could definitely be mistaken, but I don't see a difference between a linked list and a graph. They are two ways to represent the same thing. That being said, if he asked me to find cycles in a linked list, I might determine the adjacency matrix and check for loops:

http://stackoverflow.com/questions/16436165/detecting-cycles...

This is at least very easy to reason about. However, if you are still right my thought process is just very wrong.

peaton··on The Worst Programming Interview Question
I completely disagree that this question is irrelevant. I can imagine this exact situation in compiler design where you have dependent types that can't have infinite loops (in pseudo-code where forward declarations are not needed or implied):

type a = b

type b = a

If a program has a structure like this with cyclic dependencies, then the compiler must be aware of this and break. (At least, I can imagine a situation where this could be a desired attribute.)

peaton··on Paint.Net 4.0 is now available
I'm unfamiliar with Paint.NET. I'm sure this question gets asked a lot, but could someone summarize the main differences between Paint.NET and GIMP?
peaton··on Lisp CPU
FPGAs are definitely the way to go. They are cheap and reprogrammable. One awesome devboard is the Zedboard. It includes 2 (?) ARM cores and a 28nm FPGA.
peaton··on Lisp CPU
I am not an expert, but I am definitely thinking the same thing.
peaton··on Simpsons in CSS
Comic Book Guy looks pretty screwed up on Safari. What browser/os was this guy targeting?
peaton··on How can an introvert Asian engineer like me make friends?
Online language exchanges can be a great way to meet people and work on a language you are not comfortable with. I use mylanguageexchange and I've met a number of Chinese grad students studying in the U.S. who are very shy because of their accent. But I work with them to improve their English accent and grammar and it also helps them build self confidence too! I think it's a really great answer to this kind of issue. But you're welcome to check it out for yourself!
← PreviousPage 2 of 2