HNHacker News
TopNewBestAskShowJobs

nxn

238 karma · joined June 30, 2010

submissionscomments
nxn··on A Step By Step Guide to Transfer Domains Out Of GoDaddy
Anyone familiar with any good registrars that support both .me and .it domains?

EDIT: gandi.net looks like the best bet if anyone else needs both .me and .it.

nxn··on PHP: Cracks in the foundation
necro said pick up the language and syntax -- I took "the language" part to mean the concepts of the language outside of the explicitly mentioned syntax. With that said, I felt addressing his comment was necessary since writing idiomatic code is not something that should be expected from a weeks worth of experience in a language.

In essence, I'm agreeing with everything you said, just wanted to clarify the reason for my post.

nxn··on PHP: Cracks in the foundation
> A real dev can pick up a new language and syntax in a week ...

So am I not a real developer because it took me longer than a week to get a hang of Haskell? Hell, it even took me many months before I understood JavaScript well enough to find the right mix of patterns and practices to write solid code in it.

nxn··on Looking for a Job? Learn Ruby, Python and be a Team Player (infographic)
I can say for certain that the demand for solid .NET devs is really high in the Philadelphia area right now. I am constantly bombarded from recruiters, and now even old employers that are offering me new positions. Beyond this, I've actually gotten a chance to look at some resumes over the last 2-3 months and it seems that the typical applicant who gets at least a decent consideration isn't even all that skilled or experienced.

On the other hand, when I was searching for a new position some 7 to 8 months ago, the few python places here seemed to have unrealistic expectations of their applicants.

nxn··on Functional programming for Object Oriented programmers
My most recent "meh" styled F# script had to parse 16MB of ugly XML that contained values which even unicode did not define. The goal was to create a lookup structure based on this data that could then be used from C#. I used seq expressions for cleaning up the input stream, active patterns for parsing the XML, but felt that I had no other choice than to use classes with dictionary members for the lookup data structure. With well over 100,000 items to organize and store, I did not want the overhead of creating a functional structure that would then have to be converted to nested Dictionaries for C# use. Anyway, at that point it became kind of pointless to try and avoid an imperative approach to populating the data structure.
nxn··on Functional programming for Object Oriented programmers
There are some books that go over using functional programming for "real world" tasks. Two off of the top of my head are Real-World Functional Programming by Tomas Petricek and Jon Skeet (.NET focused, and might be a bit aged now), and Real World Haskell (http://book.realworldhaskell.org/). So indeed, there are resources to help answer this question by walking you through common things like drawing graphs, database querying, working with XML, etc.

I've given F# a try recently for some of those tasks, and while it certainly is very capable of accomplishing them, I've found that using the .NET libraries, or having to expose my own APIs to C# developers in a way that will be natural to them, often leads me to simply writing C# with F#'s syntax. This is certainly no worse than having done so in C# directly, but the core ideas behind functional programming just seem to get diluted. On a side note, I think that with a bit of more design in mind, it should be possible to at least keep the core components 'functional' and then just have a middle layer that defines the classes and handles interop so your code can then be used from C# in an OO way.

nxn··on Show HN: RichestOnTheWeb - my submission to Hacka2thon
Why did the price go up when vowelnoun and netspencer were retweeted? https://twitter.com/richestontheweb
nxn··on Tail calls in F#
Right, I completely see how that would prevent it from qualifying as a tail call, my misunderstanding was still different though. For some reason I thought that even if the recursive function was defined within the try-catch block (as below) it would prevent it from using a tail call:

  try
    let rec func ... =
      ...
      func( ... )

    let result = func( ... )
  with
  | ex -> ...
I don't know exactly how I ended up thinking that, seems a bit silly in retrospect.
nxn··on Tail calls in F#
I was under the impression that the article stated that a CALL to a recursive function inside of the try-* block would prevent it from being done with a tail call, and not that the recursive function contained a wrapping try-* block in its body. I think I may have understood wrong what the article was saying.
nxn··on Tail calls in F#
> For instance, use bindings implicitly generate a try-finally around the code that follows them to ensure that the Dispose method is called on the bound value. This means that no calls following a use binding will be tail calls.

Reading that just kind of made me break out into a cold sweat. I imagine I will be looking at some IL tonight because of this.

I still don't quite get the reason for why try-catch or try-finally blocks cannot have a tail call in them?

nxn··on The Tao of Programming
Hmm, I don't think I ever consciously recognized this about JavaScript before. Even when I focus on the functional sides by using functions for namespacing, constructors (I avoid 'new'), scoping, and limiting external access, objects still cooperate nicely and feel natural. This says a lot, because even in F#, which was designed to work well with OOP, mixing the two doesn't seem to produce a nice blend for me.
nxn··on Why Not Haskell?
My problem seems to be that despite desperately wanting to use Haskell for some decent sized project, it never seems to work out as my best option. Right now I'm interested in writing a metro styled app for win8, and even for the server side portions I feel like I'm better off just using CouchDB instead of any Haskell solution that I've seen so far. Before that it was yet-another-web-based-UI-library so my choices were pretty much coffeescript or javascript. Perhaps it's because I like to have fun with UI, but so far anything I'd like to actually spend time on -- Haskell just doesn't seem like the right tool for. My best use of it so far was solving project euler problems, and considering how much I liked it, it feels like a shame that I have nothing better to use it on.
nxn··on Ask HN: What programming blogs do you read daily?
http://javascriptweblog.wordpress.com/ Updates have gotten sort of rare lately, but it is hands down my favorite JS blog.
nxn··on The Invisible Side of Design
I don't mind high level overviews of concepts if they manage to successfully lead the reader to the core of the idea. However, this slideshow was not effective at communicating anything to me. At some point during the second half of this "presentation" each slide seemed to have some vague phrase or sentence that was followed by 3-5 screenshots with no explanation of what the relationship was to the context the screenshot was given in -- I started to wonder if substituting those screenshots with random ones would have any impact on the value of the presentation.

If anything, I think the awful slideshow "player" UI on this website did a better job at explaining the lack of "invisible design" than the slideshow did. I spent almost a minute trying to find a play button, because from the look of the UI I was expecting a movie. When I hit the fast forward icon I thought it just took me to a preview screen for another unrelated video.

I understand how that may seem like an overreaction given that we're used to losing more time on more meaningless things, but a good UI should only take a split second to understand.

nxn··on Richard Stallman on Steve Jobs
"We can only hope his successors, as they attempt to carry on his legacy, will be less effective."

Or perhaps the hope should be to make more "effective" free software instead of having ill wishes towards your competitors. I mean, Stallman can really preach about free software all he wants, but most people in the consumer world probably wont turn down a superior closed source product based on that merit alone. The biggest factor in deciding winners or losers here is the quality of the products being created by the two methodologies, and I am yet to be convinced that the free software approach consistently creates the better product.

nxn··on Facebook claims it does not track users, but files patent to do same
The big difference is that this application is for tracking what users are doing on other websites outside of facebook.

Read the abstract: http://appft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sec...

nxn··on WinRT demystified
I'm assuming they only chose to use this pattern for the purpose of keeping function/method signatures as uniform across the languages as possible? I can't see another advantage to this in JS. Seems like all it's doing is wrapping the call to the actual async operation within the 'then' function, and then probably using the callback as the last argument or storing it somewhere where it will be accessible to the async operation right before it returns.
nxn··on Microsoft has Abandoned Silverlight and All Other Plugins
Well:

> No it isn't. Instead I would say that the JVM, which took ages to release version 7 (and we'll probably wait another 2 years for version 8), is light-years ahead of .NET

...

> while the DLR is somewhere in limbo

...

> Btw, speaking of Java's garbage collector, it's so kick ass that no other VM comes close.

...

etc

I didn't downvote, but saying stuff like that without a single bit of concrete information to back up the those arguments is pretty useless.

Then you have:

> Personally, I consider it a lot more awesome when some dude I never heard of appears from nowhere with a usable LISP implementation (Clojure).

Which disregards that non Microsoft employed people create languages for .NET too. Nemerle is a great example, and that's how the Iron projects initially started before MS got involved.

and also:

> The fact that .NET is only usable on Windows has been its major flaw since for me ever since I heard about it. It might as well be the most awesome technology in the world (although that would be a stretch of imagination), but it's completely useless if I can't run it wherever I want.

Which is just almost ignorant. I used to be employed writing ASP.NET web apps that ran on linux servers before I switched jobs. Then you have xamarin which lets you develop .NET apps for iOS and Android. Needless to say you get that ability automatically for Windows phones, etc. So all in all to me it seems like .NET's reach is pretty impressive.

nxn··on Never Ask "Does That Make Sense?"
If anyone wants to experience the pinnacle of "Does that make sense?", I highly suggest watching Stanford's "programming paradigm" lectures by Jerry Cain (they're on youtube). He's a fantastic professor, but it almost makes the lectures unbearable after a few hours.
nxn··on Brendan Eich on Ecma TC39, JavaScript.next, and Google Dash
This is sort of what gets me confused:

You say XHR was a good idea, and it's clear now that reverse engineering it and putting it into Mozilla's browser was a good move because it allowed that technology to advance the web -- but at the same time you are showing opposition to taking a similar course of action for a Dart VM because it's not an open standard.

I understand the viewpoint that you would rather have had Google focused on improving JavaScript through Ecma TC39 than creating another language with absolutely no outside influence. I also admit that this is a pretty inconsiderate move for them to make, especially as that email made it sound as this new language aimed to be a "replacement" for JS. But despite the lack of good will behind this action, I would still hate to see something as rare as a new client side language, that has a decent potential of allowing developers to think differently about solving problems on the web, die off because no one wanted to adopt it.

nxn··on Brendan Eich on Ecma TC39, JavaScript.next, and Google Dash
The ironic thing about this scenario of ActiveX being required by Gmail is that XHR sort of has its roots in ActiveX -- that is, before Mozilla and others had to replicate it to remain competitive.
nxn··on Thoughts on Dash/Dart
I agree with practically everything said in the post short of this part:

> It's my hope (for that's all I can do right now...) that some of the great minds at Google actually hashed out some of the issues from js, put down a formal specification and created the new language that's "like js", but better.

I disagree with this mostly because I had hopes for a fast lightweight VM that could at least support multiple languages. Now that it's clear we're not going to get such a VM, I'd at least hope that we get something as far away from JavaScript as possible. If you want "like js", then just use JS as the compilation target for the language like CoffeeScript does, but make it suitable to a different side of JS than CoffeeScript. For example, a language that is better at functional programming, to contrast Coffee's OO favoring approach. It could still be JavaScript like and implemented on top of it without major complications (maybe a lack of tail recursion 'optimization' might be a problem?)

But as for Dart, I'd rather it be something that doesn't translate to JS very well, so that we at least have a broader range of what can easily be done in a browser. Of course I realize that this probably wont be the case since they already claimed it would be a dynamic language with only optional type checking. At this point I'm just hoping it will be re-branded newspeak, because honestly, that would be a pretty interesting language as an option. Plus with Bracha doing Google Tech Talks, his language fitting the description fairly well, and his blog posts talking about a Newspeak -> JS compilers in recent months, Dart might actually have a chance of being Newspeak in disguise.

EDIT: By the way, I don't think Jash Kenas being more familiar with language design would have made CoffeeScript any different/better than it is. A big part of its success is that it's just a more modern day JavaScript, and the core design of JS wasn't really affected very much (scoping being the biggest change I think). This allows the generated code to be easy to read, and makes learning CoffeeScript fairly quick. I think both are major factors in CS getting so popular so quickly.

Oh, and as I recall, he did a great job of taking input from other JS developers through out CS' development process. So it's not really like he locked himself in a basement and created the whole thing by himself. In fact, he probably did a much better job at this than Google did with Dart.

nxn··on More information on Google's new web language, Dash
Just wondering, how do you know it's going to be the next version?
nxn··on More information on Google's new web language, Dash
PNaCl seems like a separate project from NaCl to me, and NaCl itself can't run LLVM IL.

Also, there's really opposition of having it implemented in other browsers, at least Mozilla vocally opposed it. I think that if they managed to do it via a plugin though, that could work.

nxn··on More information on Google's new web language, Dash
How did we learn that lesson when Microsoft did exactly what you're describing when they created XHR, and now almost every website uses it? It took 6 years for it to become standard, and I almost doubt it would have if it wasn't already in every browser by the time it did. My personal opinion is that this type of behavior boosts competition and helps innovation. If it's something clearly useful others will implement it or become obsolete. Waiting for a committee to standardize a feature before implementing it sounds like it would slow the web down to a halt. Mind you I already consider it to be painfully slow just looking at how many years it took to get 20-30 new functions into JS runtimes.
nxn··on Where’s my reply, OkCupid? (Prelude to a lawsuit)
A few people mentioned this already, but if you whois his blog's domain you get his address.
nxn··on Best computer programming languages for the next decade
For some reason this article irritates me on some internal level. It seems to almost completely disregard any language that isn't mainstream at this moment -- essentially making your options for the next 10 years just a rearrangement of the same crap we're stuck with today. The only somewhat exciting thing in that list is F#; but if a rehash of 15 year old language that was based on another 10 year old language is our most "refreshing" option for the future, then screw everything about the next 10 years.

Also, another annoyance: .NET is not a language.

nxn··on Thoughts on Designing a new Web Apps Language
> However, the rendering or parsing in a dynamic language like JavaScript or Python typically takes one line of code. The equivalent in something like Java can be horrible. [...] you still have the problems of how to describe that format.

I'm not familiar with Java, but in the scenario I illustrated it took 0 lines of your own code to receive a JSON structure, and one line to return one. That's outside of defining the structure itself (creating the class; what I think you mean by "the problem of describing the format"), but generally you'd want to do the exact same thing in a dynamic language to make working with the structure easier. Example: you still define model classes in a Django app.

> ... and how to handle errors where the incoming JSON doesn't match your expected format in some way.

I don't see how you wouldn't have the same exact problem in a dynamic language. You can't just receive input and know magically what to do with it, you need to have the input be in a defined/expected form in order to process it. This to me is outside of dilemma of dynamic vs static because it is a problem in both approaches.

> I suppose you could simplify common cases by determining the expected format using reflection if your language supports it, but that's not going to be powerful enough to cope with the general case without providing some sort of metadata as well.

Right, in the scenario I gave the framework looked at the signature of the controller, saw that it expected to receive an object of such and such type, and told the serializer to use the JSON data to create an instance of that type. I'm not sure what more metadata would be needed to make that work? I suppose if you get a parsing error you can just use the exception handler in your client code because the client submitted data in the wrong format, etc.

> In short, I'm still waiting to find a library that can parse arbitrary incoming JSON within a statically typed language without at best requiring the programmer to repeat structural information that is already implicit in the code that uses the resulting object.

Defining a class once and saying you expect to receive an instance of it is not "repeating structural information" in my opinion. I can only see it as being "repeated" if you look at the initial JSON data structure as sort of the type itself. I personally look at the role of JSON to be a "data container" and not a "structure descriptor", but if that's the way you like looking at it, well then yeah, dynamic typing is going to be your best bet right now. The closest I can think of is Haskell's type inference which constrains types based on how they're used in the function, but even then the types have to be defined at compile time, and it will not just create one for you that matches what you're trying to do at run time -- it just accepts already defined ones based on whether they meet the constraints gathered from the code.

nxn··on Thoughts on Designing a new Web Apps Language
> I don't hear a lot of complaints from the Python or Ruby camps about how much they desperately miss static typing.

Perhaps you would if Python or Ruby were used more often for, and I hate to use this term, "Enterprise" type applications -- especially ones that have teams with 50 some developers. They're not though, and they're probably not for the fact that they're dynamically typed and that often causes chaos when there's that many people involved and communicating with them becomes a job in and of itself. The more you have to spell out things in your code the less likely another person will misunderstand its meaning.

Anyway, I personally would still prefer a statically typed language just for the added compile time safety. To me the "save + refresh browser + manually check if change works" process of development is way more tedious than having to work with type constraints that fail to compile if they don't make sense. That and decent type inference really helps in 90% of the cases where static typing seemed tedious to me.

nxn··on Thoughts on Designing a new Web Apps Language
With regards to you saying we're not there when it comes to tools for parsing JSON/XML:

Perhaps I'm not sure what you mean exactly, but I've been using frameworks and tools that handle JSON de/serialization for years now. For example, whenever building applications in ASP.NET MVC and ExtJS on the client side, I would use a project called Ext.Direct.MVC. All that does is set up a handler that automatically grabs specific types of requests, converts the JSON data in the request to an instance of a model, or any data structure that you expect to receive, and passes that created instance over to your controller automatically for you. So on the client you just call the controller with some JSON, and on the server you declare a controller that receives an instance of one of your defined models. That's it, you're done. The only time you'd have to so much as interact with the JSON serializer is when you wanted to return some data like a model -- but all this means is wrapping the model you're returning in a call to the JSON serializer and you're done.

Also, if your selection of languages/frameworks does not offer a tool like this, it likely does offer enough sub-components for you to be able to create a system like that in a day or two. EDIT: (or perhaps I am just making a bold claim here assuming that all language communities have at least one JSON serializer/parser as awesome as Json.NET).

In my personal opinion I'd actually say the opposite of you and claim that often times a language's type inferencing could be better. It's certainly not perfect in C# (not when compared to Haskell, or even F#), and I'm not even sure if it exists for Java.

← PreviousPage 3 of 7Next →