HNHacker News
TopNewBestAskShowJobs

jb55

376 karma · joined December 8, 2009

[ my public key: https://keybase.io/jb55; my proof: https://keybase.io/jb55/sigs/8W5DAsaW2wNlbITPqre0rjR2aVv-h7cRXRpjAwkMv24 ]
submissionscomments
jb55··on Paul Allen: The Singularity Isn't Near (2011)
Well we have at least a hint on how to go about it software-wise. Jürgen Schmidhuber has been working on recursively self improving universal problem solvers for decades now:

http://www.idsia.ch/~juergen/goedelmachine.html

jb55··on Canadian scientists create a functioning, virtual brain
You seem to be claiming that quantum mechanical effects are somehow non-physical? It's not too crazy to speculate the brain leveraging quantum mechanicals effects to do something (although I agree, as a prerequisite for consciousness is a pretty big claim). Considering evolution has already leveraged these effects in smell and photosynthesis, which we do have evidence for.
jb55··on Outlawed by Amazon DRM
I do this, but not with rsync. I put PDFs and books that I want to read into my Dropbox during the day. When I get home I bidirectionally sync to my kindle dx with Unison (http://www.cis.upenn.edu/~bcpierce/unison/). I wouldn't trust my books with Amazon, ever.
jb55··on Reasons to Start a Startup In Canada
You're second point is pretty much the reason why I ended up joining a startup in Canada. I got job offers from Facebook and Google for twice the pay, but I couldn't get a tn visa. According to the Canadian government I am not qualified to work there since I dropped out of College.

But yeah if it weren't for that there wouldn't have been much incentive to stick around.

jb55··on Backbone has made me a better programmer
Chained method calls is analogous to function composition from bQueryView to bQueryView. You could write it this way if you don't like the look of it syntactically:

    bqView = bQuery.view()
    bqView.set(...)
    bqView.on(...)
    MyBackboneView = bqView.make()
jb55··on Backbone has made me a better programmer
When we started using Backbone it was good for awhile until there was so much code duplication all over the place. We decided to build a small declarative API on top of backbone that allows us to easily compose views by mixing in common functionality. It looks something like this:

    AlbumsView =
     bQuery.view()
      .set("el", "#albums-view")
      .init((opts={})->
        @readOnly = opts.readOnly or no
        @app = opts.app
      )
      .use(Mixins.bq.init('albums'))
      .use(Mixins.bq.collection
        tag: "#album-list"
        createView: (m) ->
          AlbumView = Views.AlbumView(readOnly: @readOnly)
          new AlbumView { model: m, app: @app }
      )
      .use(Mixins.bq.filterable
        pred: (album, ftext) -> album.get('title').indexOf(ftext) is 0
        filterTag: "#filter"
        collectionTag: "#album-list"
      )
      .on("click #addNew", ->
        @collection.create
          title: "New Album"
          type: "Album"
      )
      .make()
For example, the Mixins.bq.collection plugin abstracts away the common task of adding and removing subviews when new things are added the collection. The filterable plugin abstracts away the common task of filtering collections. Our custom init plugin sets up all the events common to all of our views. In the end make() just returns a BackboneView with all the events set up properly. It has saved us so much time we figure people may actually want to use this as well, we just have to write the documentation and some plugins now :)

https://github.com/jb55/bquery

jb55··on Blank Keyboards (Das)
I have a blank Das keyboard and after a lot of typing I find the extra pressure very noticeable and even fatiguing. I eventually switched back to my mac keyboard because of this.
jb55··on MIT and Harvard announce edX
I have tried a lot of these new online courses that have been created but I still think they have missed the point, the point that khan academy got right. I don't want to plan my life around weekly assignments. I keep getting emails about about assignment deadlines, causing unneeded anxiety which puts off the whole learning experience.
jb55··on Quadcopter modified to carry machine gun
The lack of shadows in some shots give it away as well
jb55··on Why I prefer scheme to Haskell
This is so true. I managed to covertly teach monads to a coworker who had never heard of monads or functional programming before, all without uttering the word monad. Luckily they were familiar with LINQ notation (which is pretty much do notation) and I used analogies such as wrapping and unwrapping. I used a custom c# maybe type as the concrete example. They were able to intuitively grasp it in a couple of days (whereas it took me about 2 months stumbling through online tutorials learning it myself).
jb55··on Microsoft Censors Pirate Bay Links in Windows Live Messenger
It's kind of sad that most IM clients do not provide OTR out of the box, I would use it all the time but unfortunately most people do not use pidgin or Adium.
jb55··on Clay 0.1.0 - Clay Programming Language
There was an opengl library at one point, I'm not sure of the state of it now though. I think it still works.
jb55··on Clay 0.1.0 - Clay Programming Language
It's an expressive systems language with lambdas. So, anything you would be using C for + the power you get from lambdas and generic types. In a way you could think of it as Go with a more advanced type system, and without the garbage collection.

I'm looking forward to writing a game in Clay to measure its true performance in a realtime system.

jb55··on Coding Skill and the Decline of Stagnation
When watching Notch code I noticed a lot of code smelly habits, relying on inheritance over composition is one example. But my god his level of productivity and ability to get shit done is lightyears ahead of your average programmer, and you got to respect that more than anything.
jb55··on Hidden features of C#
Indeed, it really only simulates the function type constraint aspect of Haskell typeclasses. Fortunately most of the time I have direct access to the implementation, and can throw an interface on a type when I need it. This is effectively the expression problem. You can always solve it by using a wrapper class, although it's a bit inconvenient.
jb55··on Hidden features of C#
https://gist.github.com/1313735

Here's a full example in some production code. I ended up doing it this way to simplify some crazy legacy code. There were a bunch of different classes that provide order items and extended prices in different ways. With this setup as long as those types implement the necessary interfaces, they get those extension methods for free.

jb55··on Hidden features of C#
One powerful feature I don't see being used very often is simulating typeclasses via contraints on generic types:

    public static IEnumerable<CalculatedTax> CalculateTaxes<T>(this T t)
      where T : IOrderItems, IAddress {}
This adds an extension method to any type that implements those interfaces. Using this technique I have been able to make my interfaces much smaller and have generic functions which apply to many different types.

Here's what it would might look like in Haskell:

    calculateTaxes :: (OrderItems a, Address a) => a -> [CalculatedTax]
jb55··on Why Haskell is Kinda Cool
One of the things that I find pleasing when writing Haskell is the idea that I don't have to think about the context in which my code might need to run.

For example, a common pattern that I find myself repeating in many languages is downloading a bunch of webpages asynchronously and collecting the results in a consistent order. To do this in Go I might wire up a channel and collect the results that way. In C# I might use the BeginAsync functions and possibly locks to collect all my results. And what if one of them times out? Throws an exception?

In almost every language I have had to specifically think about all these situations, making sure I have handled all of the exceptions and timeouts properly and by the end of the day I usually end up with a mudball procedure that is really good at asynchronously downloading webpages, but it is far from reusable.

In Haskell, once I'm done writing my function "downloadWebPage", I just lift it into the context of the problem I'm trying to solve. If I'm trying to download a page asynchronously, I'll use "asyncDl = forkAsync downloadWebPage" to make it a function that downloads a page asynchronously. If I need to handle timeouts, I'll use "timeout 200000 . asyncDl" to make a function that returns Nothing after a certain amount of time. What if I wanted to do this for a list of web pages? Well I just use mapM run the asynchronous, timed out webpage download function over a list of websites.

What if I want to use any function instead of one that download websites? Well you make a library: https://github.com/jb55/async-util

What I find in Haskell/Lisp that I have not seen in many other languages is the idea of a combinatoric API. One where combining functions is your main tool for building abstractions rather than more rigid computation paths. The amount of code that you do not have to write when programming this way is something that you just don't see in other languages.

jb55··on AeroFS - File Sync Without Servers
I was using this for awhile but the sync algorithm is retarded. It spent all of its time syncing gigs of meta data and saturating my upload rate. Also be prepared to make room for the 100mb+ process as it does not seem to care about memory efficiency.

I guess I'm still stuck with rsync and cronjobs until they work out the issues.

jb55··on Poll: Have you read SICP?
I'm through about 25% of it, but I decided to do all of the exercises in Haskell rather than Scheme. In a way it improves the experience as a whole, thanks to type errors slowly prodding me in the right direction.
jb55··on Stop hating Java
I used to think this when all I knew was C++ and Java, when I defended them feverishly. Then after using them for 5-10 years I am now in the "why do we torture ourselves with these inexpressive languages" group. These language should be criticized, or else your regular joe won't know any better and waste a large chunk of their life going down a painful path.

That's not to say they still don't have their niche for high performance applications. It's just that in most cases other, more expressive languages are usually a better choice.

jb55··on Why mobile apps suck when you're mobile (TCP over 3G)
We should probably get these long round-trip protocol issues ironed out before we build our galactic internet
jb55··on Lulzsec Declares 'Operation Anti-Security'
Most of these arguments (and most other conspiracy theories) can be shot down as just another instance of the Conjunction fallacy/Occam's Razor. The probability of a single event is always greater or equal to the probability of both events: P(A) >= P(A&B) where event A is 'Rebellious hacker teens' and event A&B is 'Rebellious hacker teens recruited by terrorists'.
jb55··on Why is TeX still used? What are some good, modern alternatives?
This. I do all of my school assignments in markdown + embedded latex. I convert them directly to PDF using the markdown2pdf helper that comes with Pandoc. It has pretty much replaced .doc files and monolithic word processors for me.
jb55··on Ask HN: Python gaining popularity
I was thinking about making a witty comment regarding YouTube or Disqus, but at the time I was so dumbfounded by his statement I ended up just smiling and walking away. Surely Python is not a new concept to most people? Software engineering professors? Come on.
jb55··on Ask HN: Python gaining popularity
Just recently one of my college professors said Python was not a 'production level' language. I just came back from an internship where they wouldn't even install Python on the server and told me to use 'Powershell' instead. The majority of the world is still running mostly on Java and C#, let alone something as 'radical' such as Python or node.js. It's amazing the amount of resistance I came up against in the 'real world' of things which seemed so common place here on hacker news or reddit.

It's possible I just live in the wrong area and I'm going to the wrong schools, but that has been my experience so far.

jb55··on Coming Home to Vim
:b has smart tab completion. You can type any part of the filename and you can tab through the results. This is generally what I find myself doing when I have a lot of buffers open. Otherwise I just use minibufexpl with buffer next/prev keybinds.
jb55··on The warlogs in mongodb
Are there any heat map visualizations for this data set yet? I seems like a natural fit since each event has a gps location associated with it.
jb55··on Bach on a mobius strip
I picked up this book yesterday and I'm starting to worry about what I got myself into.
jb55··on No, really, pi is wrong: The Tau Manifesto (Tau Day, 2010)
These arguments are assuming that tau would be a total replacement for pi in all situations. Why not just keep using pi in situations where you are doing calculations with torque?
← PreviousPage 3 of 4Next →