HNHacker News
TopNewBestAskShowJobs

calebmpeterson

381 karma · joined November 2, 2010

Started programming at 15 by accidentally signing up for a CS class in C/C++ (yes, both, it was an amalgam of C syntax with C++ standard libraries) which I though was keyboarding. I was totally freaked out until "Hello World" and then I loved it - you could say programming had me at "hello". Got a BS in EE/CS at a state university. I've done a lot a thick client UI and server work, but have also done web, embedded, and DSP. Java pays the bills; FP and Clojure bring the thrills. Bottom line: like many HN'ers, I love programming.
submissionscomments
calebmpeterson··on Forth Inventor Chuck Moore's $20 144 core CPU now in full production
That wasn't a "try" - that was a success. Thank you!

If I may attempt a paraphrase: CPU caches stop being a bandage for slow access to RAM and become a valuable first class citizen for each core of the CPU when coupled with the actor model.

Did I understand you correctly? Again, thank you.

calebmpeterson··on Forth Inventor Chuck Moore's $20 144 core CPU now in full production
You've piqued my curiosity; could you elaborate please?
calebmpeterson··on Stephen Hawking: Human Survival Depends on Space Exploration
A good point. The question then is "does civilization change human nature itself or just the contract between members of said society?" Extreme circumstances seem to break the social contract of a civilization and reveal that human nature didn't change much if at all.
calebmpeterson··on Clojure & Python, Side by Side
Clojure has no GIL and the concurrency API has few rivals
calebmpeterson··on Portrait of a N00b
> Basically, that function is too big, and it uses too many mutable variables.

An interesting statement that; particularly the part about mutable variables. Mutability implies state, and state seems to be something we, as programmers, often struggle with. Keeping the those state transitions within our mental model seems to be the hard part.

I've been studying Clojure a lot over the past 12 months; it's approach is quite different from the 9-to-5 Java I write. Rich Hickey's notion of disentangling state into value and identity has been so very helpful to me in dealing with the 'problem' of mutability and state transitions in how I write my own code.

Lisp, whatever the dialect, doesn't strike me as the sort of thing that most Java shops (particularly the large corporate variety) are going to swallow, but the ideas of Clojure... Perhaps I need to get out more, but it's the only language I've seen that proudly embraces a deeply functional paradigm without punting on State (or destroying my brain with monads).

I have no deep love for Java, but once Java 8 arrives with lambdas, all I'll really want is a good implementation of persistent data structures.

PS nothing against monads (or Haskell) - I just haven't gotten there in my Perlis journey.

calebmpeterson··on The mobile app is going the way of the CD-ROM: To the dustbin of history
I realize you're referring to Swing Java apps, and I won't argue on their behalf for a second. However the SWT library is a dream of a native toolkit experience if you're writing a client app in Java. It's fast, does a good job of working across a wide variety of platforms (Win32, Cocoa, GTK, and I think Motif), and is extremely well documented.
calebmpeterson··on Enabling rich(er) interactions in the Clojure REPL
Now I'm really looking forward to the next release of CCW...
calebmpeterson··on Japanese engineers develop flying robotic orb
Yes, please do!
calebmpeterson··on Japanese engineers develop flying robotic orb
So what is different from the flying orb (other than the chassis)? avionics software? Why $200 vs $1400?
calebmpeterson··on Japanese engineers develop flying robotic orb
If I wanted to build one, what off-the-shelf components would I use (electronics and controller especially)? What pieces of hardware and software would I have to implement?

Bottom line: this is cool, how would I build one in my garage with as little wheel-reinvention as possible?

calebmpeterson··on Dear John Carmack.
Half-Life
calebmpeterson··on Dart Bashing
Certainly.

First, the actor model need not imply a separate thread/process for each actor. It's quite possible and in fact common (in Scala's built-in actor library and various Java actor libraries) to run a very large 100k pool of actors in a pool of well under 100 threads. [1] So, the typical notion of having a single UI thread can mesh quite well with actors (just have the UI event loop pump each actor's event loop during idle).

Second, since actors process messages - which are conceptually the same as events - an actor has messages pushed to it by widget(s) upon user interaction. (If this sounds identical to the observer pattern, it's because it is). There's nothing interesting about this step other than the "an event is a message" concept.

Third, and this is the really neat part, actors often involve some concept of blocking on a receive() call - which is an inversion of control from the observer pattern. That is to say an observer/listener is invoked by the UI framework when an event occurs, but an actor, which conceptually has its own message/event loop, can consume events at will. Thus the inversion of control.

So your classic listener looks like this:

  // Added via $("#foo").click() or some such...
  function onClick(e) {
    // do something ... any state must be stored external to this callback
  }
But an actor looks like this:

  // The event loop is started up and pumps indefinitely...
  function loop() {
    // any state is local
    while (running) {
      switch (receive()) {
        case ....
      }
    }
  }
The event loop in an actor can easily turn into a very tight and explicit state machine. [2] My event loop here is pretty boring, but consider, if after receiving event A, you explicitly block on receive for event B.

I posted [2] a while back and there was a decent discussion at http://news.ycombinator.com/item?id=2972581. The section 5 of [2] really describe the idea neatly.

Hope that helps. Please let me know where I left things fuzzy.

1. Actors That Unify Threads and Events - http://lamp.epfl.ch/~phaller/doc/haller07coord.pdf

2. Deprecating The Observer Pattern - http://lamp.epfl.ch/~imaier/pub/DeprecatingObserversTR2010.p...

calebmpeterson··on Dart Bashing
I’ve said this numerous times, and will do again, GUI is the next killer-app for actor programming.

As a full-time GUI developer (Java/SWT) this is so true it hurts. I would love to see the actor model and/or functional reactive programming become main-stream in this space. The observer pattern alone is insufficient...

calebmpeterson··on Dart language
Sounds like Java's anonymous classes. Quite a useful feature, actually.

It's only useful because Java lacks first class functions and syntax for lambdas. This is the single most irritating thing about Java to me. When this is fixed with the release of 8, the only thing Java will be missing is a really good implementation of persistent data structures a la Clojure.

calebmpeterson··on HP plans to release first memristor, alternative to flash and SSDs in 18 months
So how would this affect what languages we use? How different data structures perform? etc. Will this amplify the end of the free lunch?

I'm especially curious how Rich Hickey's approach to state, time, and identity in a functional language fit in?

calebmpeterson··on Is the Anonymous Threat to 'Erase' the NYSE Legit?
where is my mind?
calebmpeterson··on The State of the Art is Terrible
But many folks do not live in that world.

I would venture that anyone who works in a large corporation is not in this world. Which is a loss; large established corporations have some of the most interesting problem spaces...

calebmpeterson··on The State of the Art is Terrible
We've complicated the plumbing to the point nobody knows how to work the damn shower any more.

This is probably the single most irritating thing to me as a developer. And, the most frustrating part is that this aspect often turns a simple project or a curious dive into a new technology into a knock-down, drag-out brawl with configuration files and dependencies that in the end produces frustration instead of working code.

calebmpeterson··on RIM reportedly bails on PlayBook, considers exiting tablet market
I very much agree with this. The interesting effect is platform lockin because of unportable data. In the 90s and 00s plaftform lockin was a function of the availability of software on specific platforms. Now it's data...

Will there be services for porting data between platforms?

calebmpeterson··on I want to pay for TextMate 2
I've never used it; is it really /just/ a text editor?

Edit: to clarify, my use of "just" wasn't meant to be dismissive or diminutive in any way...

calebmpeterson··on The Disconnected Niche
I stay a mile away from FB due to their lack of respect for privacy. I'm selective about Google (Gmail=yes, search history and Plus=no)
calebmpeterson··on All of life has been utterly, profoundly changed thanks to Facebook...
I'm in that same boat...
calebmpeterson··on Why Good Visualization Matters: Rethinking the Food Label
> Secondly, these are simple examples. What do you do with, say, a can of chicken and vegetable and noodle soup, which could easily have thirty ingredients before you even start counting the potentially-nasty additives down in a tiny box in the corner.

How about inverting the tree-map such that the smaller the amount, the greater the portion of the tree-map taken up? You're going to need all of that space anyway for the names of those potentially-nasty additives to be printed in a legible font size...

calebmpeterson··on Metro
Thanks. Does a crossover give (most of) the benefits of an SUV without the bad gas mileage and environmentally unfriendly vibe?
calebmpeterson··on Metro
Or a member of the more en vogue crossover family?
calebmpeterson··on Show HN: Smozzy (for Android/T-Mobile) - browse the web without a data plan
That's even more horribly wonderful than I expected! I suspect you'd get a 4.0 if you went for a degree in Southern Engineering.
calebmpeterson··on Show HN: Smozzy (for Android/T-Mobile) - browse the web without a data plan
Do you use compression at all or is it straight uncompressed HTTP via SMS? Or something else entirely? This is wonderful for it's creative (mis)use of texting...
calebmpeterson··on Java 8 lambda syntax decided - same as C# and Scala
Please tell me how you got it formatted like code. I tried a block quote and got italics instead.
calebmpeterson··on Java 8 lambda syntax decided - same as C# and Scala
try { // for a really long time } finally { // made a decision }
calebmpeterson··on Deprecating the Observer Pattern
I found this and given the usual interest in all things Scala and functional programming on HN, thought I'd share it.

tl;dr - functional reactive programming is a nice abstraction which addresses many of the flaws in the observer pattern, especially as it is often employed in UIs, and can be implemented quite nicely in Scala.

← PreviousPage 2 of 6Next →