HNHacker News
TopNewBestAskShowJobs

spacemanaki

2,544 karma · joined June 15, 2010

http://github.com/spacemanaki
submissionscomments
spacemanaki··on JavaScript is Not Web Assembly
Previously... https://news.ycombinator.com/item?id=2997952
spacemanaki··on JavaScript is Not Web Assembly
No it's not. There are a bunch of language implementations that compile to C, with semantics nothing like C++. Just as there are a bunch of language implementations that compile to JS but have semantics that differ from JS or whatever "JS++" would be.
spacemanaki··on The Ivy League Was Another Planet
Aren't all the ivy league schools (and most if not all prestigious universities) non-profits? I assume they have a bit more to their mission than just investing in alumns who will generate returns in the form of endowments.
spacemanaki··on A new blog dedicated to Emacs
This is what I have at the top of my ~/.emacs.d/init.el:

  (require 'package)
  (add-to-list 'package-archives
               '("marmalade" . "http://marmalade-repo.org/packages/") t)
  (package-initialize)
  (when (not package-archive-contents)
    (package-refresh-contents))
  (defvar my-packages  '(clojure-mode ...)) ; list of packages
  (dolist (p my-packages)
    (when (not (package-installed-p p))
      (package-install p)))
spacemanaki··on Godit - A very religious text editor written in Go
Eclipse is very goofy about this, and it's something I loathed about using it (having recently switched to IntelliJ, which is better but not by an order of magnitude). In my experience, it will sometimes indent according to your settings, spaces or tabs, but at other times, based on some other setting that is in a different place than the first, it will indent based on the line previous to the one you are indenting. This results in a kind of slow creep of badly formatted code entering the codebase, if you have a lot of developers who don't care or don't know to check whitespace upon commit, and don't explicitly share a well-customized settings file.

At least IntelliJ has Emacs-style DWIM tab, but still has a whole host of problems with its better than Eclipse but still subpar editor.

spacemanaki··on ‘Functional Programming Principles in Scala’ starts today
This is something I think Martin Odersky did really well in this class... he spent a decent amount of time discussing tradeoffs between FP and OOP and how one might arrive at choosing the different features of Scala, even going so far as to cover the "expression problem" in Scala. I think it was a superbly tasteful presentation of Scala and FP.
spacemanaki··on ‘Functional Programming Principles in Scala’ starts today
I'll politely offer some dissenting opinion regarding Scala for the Impatient. I found that it really doesn't live up to its name if you have done any FP before, ever, even in Scheme or Lisp, because Horstmann treats functional programming like a somewhat advanced topic, and doesn't really address it in the first dozen chapters, instead covering file IO, regular expressions, and packages before higher order functions and pattern matching. When he gets to it, FP is covered at an introductory level at first. Instead I think it would have been better titled "Scala for the Impatient Java developer", because it doesn't really get to the meat of what makes Scala different from ML and Haskell very quickly.

Even as a beginner text, I think it's a bit lacking due to hurried presentation. This Coursera class is a far, far better presentation of intro FP, and a much better intro to Scala IMHO.

spacemanaki··on Posterous Migration Guide: All known importers compared
Will Posthaven's importer retain the source of Markdown-based posts? The little bit of blogging I did using Posterous was almost all in Markdown, and when I found out that it wasn't possible to pull the original Markdown using the Posterous API I was pretty bummed out. (although in the end Pandoc did a mostly complete job converting it back) Maybe Posthaven has more access than Joe the API user? The source Markdown exists somewhere in their DB since you can go back and edit it on the site, but I couldn't find any way to get at it via the API. Frankly, if it doesn't retain it (understandable, given Posterous's API) I wouldn't call it 100% lossless.

This is one of the bigger reasons I'd be pretty wary of managed blogs again, although I guess I'm probably not the target audience for them since among the alternatives I'm thinking about is a few Emacs Lisp functions calling Org mode, which I admit is a little fringe.

spacemanaki··on Not Lisp again (2009)
It's been proposed a few times, and some people have gone pretty far with it, http://www.dwheeler.com/readable/sweet-expressions.html

It's never really caught on though, I would guess due to inertia. Most Lisp programmers just get used the parens, and maybe those that can't end up not using Lisp.

spacemanaki··on Not Lisp again (2009)
Oops you're right, thanks.
spacemanaki··on Not Lisp again (2009)
In case you don't know about this and you want to scratch your itch... you can experience almost the same class this blogger did, in all its glory, for free. Video lectures with the same professors and authors of the famous book.

http://mitpress.mit.edu/sicp/

spacemanaki··on Clojure's Default Reader is Unsafe
> Sorry, by "gets" I meant gets(3) from C...

Ah ok, that makes much more sense.

I can't really speak to what is clear or not for a first-year Clojure dev. When I first learned Clojure, I had already dabbled in Lisps and Schemes for a while. The very first time I ran across `read`, probably in Scheme, it was obvious to me that it was special. Did I understand and appreciate the security implications? Probably not.

Hopefully the security issues will be clear to a new Clojure dev since at least the ClojureDocs site steers you away from read and towards EDN. Maybe the official docs should be more stern and clear about it, but they do make a note of the security issue: http://clojure.github.com/clojure/clojure.core-api.html#cloj...

spacemanaki··on Clojure's Default Reader is Unsafe
> That seems less like "avoid eval" and more like "avoid gets".

Assuming that by `gets` you mean Ruby's `gets`, this is not quite right. `read` (and `read-string`) are not just generic IO functions. They are parsers for Clojure code. There are plenty of other varied forms of reading input to a string, but `read` does more.

spacemanaki··on Programming Languages Are Simply Not Powerful Enough
> Because any language feature that is objectively good with no downside or trade-off has already been implemented in some popular language somewhere.

This almost implies that there is no opportunity for anything new in programming language research, which I find laughably depressing, especially if you take "some popular language somewhere" to mean the popular industrial languages. It would be rather sad to think that Java (or C++, or C#, or Ruby, or Python, ...) represents the pinacle of programming language design, and we're stuck with it and its ilk from now on, forever, since there are no good language features left that are worth implementing.

spacemanaki··on Why do programming languages use curly braces?
Some languages do support Unicode for things like arrows and other mathematical symbols: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=ReferenceMa...

Languages which support this (including Agda, I believe) usually support some fallback to ASCII, allowing you to type "->" instead of a Unicode arrow, because it's easier to type on the vast majority of keyboards.

Of course, APL also famously uses all kinds of symbolic nonsense.

spacemanaki··on Dwarf Fortress: Ten hours with the most inscrutable video game of all time

  > There are instructions within the game, and without in the form
  > of wikis and forums, but I wanted to begin at the most basic
  > level, if only to come at the game from a recently trendy (if
  > controversial) design paradigm on discoverability that's flowed
  > from mobile apps to many new indie games: "if you see a UI
  > walkthrough, they blew it".
Some of the author's other points are valid, and DF definitely has some (just some!?) problems with the UI (my personal nitpick is that there are multiple ways to draw rectangles) but I get the impression that she set things up planning to fail. Not R-ingTFM isn't really a reasonable way to review this game. DF doesn't have a team of people behind it, and there's no UX designer to figure out how to make things beautiful and intuitive. On the other hand, the game is free, and the developers have supposedly turned down at least one relatively large buyout offer in order to keep working on their dream on their own terms.

It's cliche, but you get out of DF what you put into it. If poring over fan-made wikis, taking notes of all your findings, winning tiny victories like successfully getting your first workshop running, and losing in spectacular fashion only to retell your loss to friends doesn't sound fun, maybe stick to Skyrim.

spacemanaki··on Dwarf Fortress: Ten hours with the most inscrutable video game of all time
If it's too easy, dig deeper.
spacemanaki··on Let's avoid designing like this
You're right, that's really strange though. It looks crappy on my phone, the font size is too small there, but it's too large on the desktop.
spacemanaki··on Let's avoid designing like this
I thought you were just nitpicking, but then I tried to change the font size on TFA and was unable to. Cmd-minus and Cmd-plus in Chrome on OSX does nothing to the body text, just changes the size of the logos and social buttons. What's up with that? I don't think I've ever seen something like that before, is it some CSS gone bad or something worse?
spacemanaki··on "River" detection in text
Not a font-nerd but I'll bite. Is the 'N' in MADISON and SECOND upside down? (but correct in http://www.flickr.com/photos/ryjones/4046758633/)
spacemanaki··on Is Lisp still useful in today's world? (2011)
I don't buy your example from chapter 3 of SICP. You could just as easily serialize Python code and eval it. That would be bad practice in Python and it would be in Lisp.

The power of "code is/as data" means that Lisp macros can manipulate code as easily as other Lisp code manipulates data. It's not really about eval.

spacemanaki··on The Perl Renaissance
My argument was just that it has nothing to do with significant whitespace, which is what you were complaining about. Python could be changed to have non-significant whitespace but retain its crippled lambda.
spacemanaki··on The Perl Renaissance
> There are some problems with the whitespace in Python.

> I wrote some code with lots of nameless functions as input parameters (think JavaScript style or Ruby blocks), which of course was an ugly pain to port to Python with no multi-line lambdas.

As nnq points out elsewhere in this thread, this doesn't have anything to do with significant whitespace. Python only allows you to have a single expression in the body of a lambda, and from what I've read the reason it stays this way is to discourage using a lambda as an argument to map, fold, filter & friends. The usual suggestion from Python programmers is to just use a locally defined, named function, which to be honest is often what I do anyway in languages like ML, because it's clearer.

And anyway, just because it was hard to port some code from language A to language B due to something different about B doesn't really seem like a valid knock against B.

spacemanaki··on Google Go: The Good, the Bad, and the Meh
But it was an article about the merits of one programming language, in which the author made erroneous and ignorant remarks about another programming language, and other ignorant remarks about programming language features (mild ones like associating static typing with verbosity). It's not as if they made some flawed remarks about mathematics or electrical engineering, which truly are different fields. For me, it detracted from the author's credibility, because they apparently don't have a breadth of experience with programming languages, so why should I take their opinions about this one particular language very seriously?
spacemanaki··on Google Go: The Good, the Bad, and the Meh
It doesn't, and I wasn't arguing that... I was suggesting that if one were to prefer reading and writing code without highlighting, one might be more inclined to design a language such that capitalization carries some semantic weight.

I'm just speculating here. I don't really have an opinion one way or the other, although I don't think anyone's an idiot for having an opinion about it, as the OP does.

spacemanaki··on Google Go: The Good, the Bad, and the Meh
Well his personal taste likely informed the design decision to use capitalization to confer some semantics for a variable.
spacemanaki··on Google Go: The Good, the Bad, and the Meh
Your best bet with code in comments is to indent:

  var foo *[]*FooType
http://news.ycombinator.com/formatdoc
spacemanaki··on Google Go: The Good, the Bad, and the Meh
Well Rob Pike did call it "juvenile" and compared it to those colored rods that are used to teach children how to count.

http://news.ycombinator.com/item?id=5125958

spacemanaki··on O-notation considered harmful (use Analytic Combinatorics instead)
Its origins are in an essay by Dijkstra from 1968 called "Go To Statement Considered Harmful"

http://en.wikipedia.org/wiki/Considered_harmful

Plus it's a quick way to write a pithy link-bait title (not commenting on the OP, but in general)

edit Actually according to Wikipedia Dijkstra's original title was different, and Niklaus Wirth changed it. I didn't know that, funny little bit of history.

spacemanaki··on 75-year-old soybean farmer sees Monsanto lawsuit reach U.S. Supreme Court
But the process I assume you're referring to (farmers saving seeds) has changed, and just in the past 50-75 years. Now farms are massive monocultures and are susceptible to pests so they require pesticide resistent crops.

Whether you think that's a good thing or not is another story. Or maybe you think farmers should be able to save GMO seeds. I won't argue with you there, but the process of farming most definitely has changed, and it's not the same as it was thousands of years go.

← PreviousPage 3 of 26Next →