HNHacker News
TopNewBestAskShowJobs

mcaruso

165 karma · joined November 12, 2009

submissionscomments
mcaruso··on Apple is now a privacy-as-a-service company
> They're pretty far behind with software and had no real cloud offering besides iCloud.

Uh, what? iCloud is the umbrella term for all their cloud services. So they offer "no real cloud offering" besides all their cloud offerings?

mcaruso··on BigInt Shipping in Firefox
JSON serialization does not seem to be supported yet. `JSON.serialize(42n)` gives me a TypeError "Do not know how to serialize a BigInt" in Chrome. Deserialization support also doesn't exist as far as I'm aware. Would be great to be able to choose to decode integer JSON literals as BigInt, but I'm not holding my breath.
mcaruso··on What's next for SemVer
> When I see projects like React where they've released 16 major versions in 5 years

They haven't really, they just jumped from 0.14 to v15, because people were referring to 0.x releases as "version x". v15 is basically v1.x and v16 is v2.x

mcaruso··on A Simple Compiler in JavaScript
> Compilers often use graphs as intermediate representation, and functional languages often are not a good fit for dealing with them.

Why is that?

mcaruso··on Linear types can change the world (1990) [pdf]
In your f2 example, could you ever use/inspect the preProof argument? If the proof calculation is erased, I assume preProof could never be used in any way. Although depending on what the type PRE really is it might not be something you could do anything useful with in the first place.

I should probably learn Idris already, that would probably clear up these questions. :)

mcaruso··on Linear types can change the world (1990) [pdf]
Interesting! Thanks
mcaruso··on Linear types can change the world (1990) [pdf]
> True linear types are far less common in practice, because in order to prove that a value is actually consumed, you have to prove that the program doesn't go into an infinite loop first. Which, y'know, good luck with that.

I don't know much about the subject, but I just read the GHC proposal and it seems they don't consider this an issue:

https://ghc.haskell.org/trac/ghc/wiki/LinearTypes (see: "Isn't a linear function that diverges unsound?")

mcaruso··on Use a Render Prop
"Higher order" sounds pretty functional to me. Higher order functions and all. Although I guess the term higher order function is hardly even spoken of in real functional languages because they're taken for granted.
mcaruso··on Encourage 'Dutch reach' to stop cyclists' car-door deaths
I have a driving theory book in front of me at the moment. It does actually teach you to open the door with the right hand:

https://i.imgur.com/9Aq9WQN.jpg

Though it isn't mentioned further, and there's no explanation given.

mcaruso··on 21% of Windows users plan to switch to Mac, says survey, vs. 2% Mac to Windows
How so?

Just curious. I'm a Mac user, so I haven't gotten the chance to try it yet. But I've got some coworkers on Windows, so I'm hopeful the subsystem will help relieve some frustration setting up developer environments.

mcaruso··on Ask HN: How do you organize your files
One thing I do that I've found to be pretty helpful is to prefix files/directories with a number or date, for sorting. Some things are naturally ordered by date, for example events. So I might have a directory "my-company/archive", where each item is named "20170621_some-event".

Other things are better sorted by category or topic. For tools or programming languages I'm researching I might have a directory with items "01_some-language", "02_setup", "10_type-system", "20_ecosystem", etc.

mcaruso··on Helping a Million Developers Exit Vim
My own personal top hit is:

https://stackoverflow.com/questions/2003505/how-do-i-delete-...

Pretty sure I've got the command down by now, but it's embarassing how many times I forgot the exact syntax. It was especially bad before the "--delete" syntax was introduced.

mcaruso··on The Logic Behind Japanese Sentence Structure
It wouldn't type-check, since `object` is expected to be a noun and not a verb. :)
mcaruso··on The Logic Behind Japanese Sentence Structure
I've made the analogy of function calls before, it's a pretty cool way to think about it. But I think your example is slightly off. The verb is the head of the phrase, and would thus be the function (or command) itself:

    miru --topic=Taro --object=Noriko # Taro sees Noriko
This uses "miru", the plain non-past form of "to see". Conjugating the verb is a little trickier to translate, but I think it would be analogous to higher-order functions, functions that modify the verb to create a new verb. Using a Python-like syntax:

    formal(past(miru))(topic="Taro", object="Noriko")
    # Taro wa Noriko wo mimashita
I'm trying to think of a way to include relative clauses in this analogy, but it's a little harder. A relative clause is of the form "[verb-phrase] [noun]", e.g. "doresu wo kiru Noriko" (Noriko who wears a dress). Maybe we could use positional arguments for this:

    formal(past(miru))(topic="Taro", object=kiru(object="doresu", "Noriko"))
    # Taro wa doresu wo kiru Noriko wo mimashita ??
EDIT: or maybe currying would be a nice way to solve this. So each verb would be a function that takes arguments, and returns a new function that takes a noun to apply that verb to:

    formal(past(miru))(topic="Taro", object=kiru(object="doresu")("Noriko"))
    # Taro wa doresu wo kiru Noriko wo mimashita
mcaruso··on Markdown.css – Make HTML look like plain-text markdown
Could be wrong here, but I don't think it did. I remember when the feature was first implemented, and I thought that the fact that you could not select pseudotext was just a temporary thing while they finished their implementation. Unfortunately it never happened.
mcaruso··on Why Unicode Won’t Work on the Internet (2001)
More like, "Why UCS-2 Won’t Work on the Internet".
mcaruso··on A shell command to create JSON: jo
Thanks!
mcaruso··on A shell command to create JSON: jo
Looks nice. I kind of like the allure of using this alongside `jq` as a kind of read/write combo.

Is it possible to create entire hierarchies with this tool or just flat lists? I imagine something like `jo x=$(jo y=...)`, but then you run into the problem of differentiating between regular strings and subcommands.

mcaruso··on Learn to read a sentence of Chinese in 3 minutes
> How long did it take?

About a year (~2000 kanji). That's casual study though, and I restarted once after an idle period.

> How well can you read?

I can recognize and write just about any of the general use characters. But kanji is not vocabulary. Instead, going through RTK has made studying vocabulary tremendously easier. It's given each character a kind of "identity" in my head. I can also guess the meaning of many compounds by the keywords given in the book, but this is just a bonus, real reading comprehension should be attained with vocab study.

I'm not sure if you've actually read the book, but it's no snake oil. It makes no claims to the amount of time or effort you'll need to finish it. It's simply a method to learning kanji that tries to make the most out of your memorization capabilities. It does this by presenting them in a more convenient order (progressively building up the characters), and throwing etymology (to some extent) out of the window in favor of your own personal mnemonic stories.

mcaruso··on Ditch Caps Lock on Your Mac
Super annoying. Very first thing I did when I got my MacBook was install KeyRemap4MacBook (http://pqrs.org/macosx/keyremap4macbook) to switch Control and Fn.
mcaruso··on Ditch Caps Lock on Your Mac
I used mine as an extra control for awhile. Currently I use it to switch to Japanese input mode.

It's unfortunate that you can't set it to Escape (without some dodgy hack at least), would be great for vim.

mcaruso··on Adobe Illustrator → HTML5 Canvas. Free.
From the site:

> The purpose of Ai->Canvas is to accelerate your HTML5 canvas development.

I can see this being useful for, for example, <canvas> game development where you don't want to code all the graphics by hand.

mcaruso··on Tell HN: Tokyo de Hacker boshuuchuu
The project itself is still undecided. All I know is that there's an opportunity for me to do my final project in Osaka coming april, so I applied.
mcaruso··on Tell HN: Tokyo de Hacker boshuuchuu
Man, this would be absolutely perfect for me... in about three years. I'm in college (Dutch) and have been doing web development for about five years. Currently applying to do a three-month Bachelor-project at Osaka university. Also recently started studying Japanese.

So yeah, look for me in your inbox around 2013. :)

mcaruso··on Will Steve Ballmer show up at the WWDC keynote?
> Visual Studio [...] is, pretty much, just better than XCode.

How so? (Genuinely curious, I have too little experience with either platform to judge.)

mcaruso··on Comprehensive PHP Security Checklist
"Use a “safe” encoding for your page (such as ISO-8859-1) or otherwise verify that the content of inputted data to see if it valid (including if you use UTF-8). This is because certain invalid character sequences can cause the next character(like < (!)) to be ignored in some encodings."

Could anyone elaborate on this? What are the 'dangers' of UTF-8 exactly? The author suggests that certain UTF-8 characters can mess with the markup. How?

mcaruso··on Forget Aeron, here's the best programmer's chair in the world
That's a pretty brilliant idea. Currently I just pace up and down my office.
← PreviousPage 2 of 2