SMuFL: Standard Music Font Layout - <AUTHOR> http://www.smufl.org/ <comment><USER2> Something I never understood: music notation is a text based notation system, well established with hundreds of years of standardization. We can't I render sheet music the way I render text in the browser? I mean with support for copy/paste/etc. MusicXML was a great step, but I still need non-standard, non- open browser plugins for some reason.

<comment><USER3> I'm not sure what you mean by "a text-based notation system"? It can be represented as text (MusicXML, "ABC File" and LilyPond source come to mind), but actual engraved music is its own format, and not any more textual than an SVG drawing is.

Music notation is excruciatingly complex, especially when it comes to edge cases and more esoteric notations, and the artistic intents of the engravers. It's not just about "copy these notes from here to there" there's actually a ton of other aesthetic information that should be captured as well, that both makes the score more readable, and informs the performers about how to play the music.

Asking to cut & paste sections of music is basically like asking to support cut & paste for sub-fragments of SVG objects. It's "possible" but both technically difficult to implement, and of questionable utility.

To get a feel for even some "regular" cases of complex music notation take a look at the LilyPond snippet repository here: [http://lsr.di.unimi.it/LSR/Browse](http://lsr.di.unimi.it/LSR/Browse) or even at the LilyPond documentation itself: [http://lilypond.org/doc/v2.19/Documentation/notation/pitches](http://lilypond.org/doc/v2.19/Documentation/notation/pitches)

</comment></comment><comment><USER4> It seems this really is just yet another notation standard proposal oriented towards western european music, and from the strictly pre-modern era to boot.

So if you are soundly entrenched in the european art idiom of 1750-1900, this proposal must sound great, along with all the other countless standards and proposals oriented around this exceptionally narrow and historically nearly irrelevant slice of music history.

<comment><USER3> Other than the extremely avante garde New Music and some traditional micro tonal music (Indian Classical comes to mind), I'm not sure why you think this doesn't work for almost all music from ~1400 to the present day.

Even early choral scores, (~1200-1600) can be typeset by LilyPond using SMuFL compatible fonts in their traditional styles. (For examples, see the "Ancient Music" section of the documentation [http://lilypond.org/doc/v2.18/Documentation/notation/ancient...](http://lilypond.org/doc/v2.18/Documentation/notation/ancient- notation))

Prior to that, there's not much written music, and that which is written is done so in a form so specific or esoteric that it will needs to be re-engraved into the traditional staff form for performance by modern day musicians.

There are some local variations that SMuFL doesn't really "handle" per-say, take Jianpu notation as one example. ([https://en.wikipedia.org/wiki/Numbered_musical_notation](https://en.wikipedia.org/wiki/Numbered_musical_notation)) but those forms can typically be handled well by a standard text editing program.</comment></comment>


Ask HN: If your life would hang on code you've written today, would you survive? - <AUTHOR> Imagine that the code you've written today would be running on a critical life support system. Would it work flawlessly or hit a "setOxigenLevel is undefined" error and kill you?
How much would you trust the code you've written today? <comment><USER2> I wouldn't trust my code for something it wasn't designed to do i.e. operate a critical life support system. As they say, "Price, Quality, Speed: pick two." Perfect code is expensive and isn't worth it to the client.

</comment><comment><USER3> I am working on critical medical code. I don't necessarily trust my code more that any other places where I used to work, but I trust the overall organization with proper QA, testing, robustness tests, HW tests, etc.

It is not like I could write some code and it would run tomorrow on a real patient.

</comment><comment><USER4> I'd never trust my own code, as safe as it can be.

Mistakes and crashes happens, and I'd prefer to always be ready to handle and fix stuff instead of trusting that my own code would perfectly work.

</comment><comment><USER5> The code I wrote worked fine, but when published it didn't work fine, because of some missing dependencies.

Sometimes it's not just your own code that's going to kill you.</comment>


Sort by reputation – what's the most reputable iOS news site? - <AUTHOR> Where do you get your iOS news? Please rank these 10 in the order of authority from highest to lowest. Thanks for your help/opinions!<p>http://cultofmac.com http://iclarified.com http://idropnews.com http://imore.com http://iphonehacks.com http://macrumors.com http://appleinsider.com http://iphonelife.com http://9to5mac.com http://macworld.com <comment><AUTHOR> Here is my rank:

1) [http://cultofmac.com](http://cultofmac.com) 2) [http://iclarified.com](http://iclarified.com) 3) [http://9to5mac.com](http://9to5mac.com) 4) [http://macworld.com](http://macworld.com) 5) [http://appleinsider.com](http://appleinsider.com) 6) [http://idropnews.com](http://idropnews.com) 7) [http://imore.com](http://imore.com) 8) [http://iphonehacks.com](http://iphonehacks.com) 9) [http://macrumors.com](http://macrumors.com) 10)[http://iphonelife.com](http://iphonelife.com)</comment>


Show HN: A 65$ hardware wallet to keep your Bitcoins/ethers safe - <AUTHOR> https://www.ledgerwallet.com/products/12-ledger-nano-s <comment><USER2> With the recent multi-million dollar bitcoin breach ([http://money.cnn.com/2016/08/03/technology/bitcoin- exchange-...](http://money.cnn.com/2016/08/03/technology/bitcoin-exchange- bitfinex-hacked/index.html)), this $65 wallet seems to be worth. Good timing on the post.

</comment><comment><USER3> I'll have to sell all my bitcoins to buy this.</comment>


A Battle of Ideologies: Bitcoin vs. Bitcoin Cash - <AUTHOR> https://www.mycryptopedia.com/opinion-piece-bitcoin-cash/ <comment><USER2> I get a SEC_ERROR_UNKNOWN_ISSUER on that site.</comment>


Coming Home to Vim - <AUTHOR> http://stevelosh.com/blog/2010/09/coming-home-to-vim/ <comment><USER3> What annoys me about a lot of tech blog posts like this one is that they're essentially voodoo. People like the author write instructions about what you should do without even understanding the instructions themselves.

        "I'm not entirely sure what the filetype lines do. I've read that they're necessary and so far I haven't had problems."

His example .vimrc has filetype listed twice, which is redundant. This in itself isn't a big deal, but the problem these lines illustrate is.

Sentences like these are the reason for billions of blog posts about setting up an OpenSSL certificate authority all repeating the same example which the documentation explicitly mentions is the wrong way of doing things.

In fact I find that these voodoo instructions often crowd out any actual _proper_ tech guides in the search results, all for the sake of drawing traffic to some blog...

Don't write tech guides if you can't be bothered to do the research and explain to your readers why they should do what you do and _what_ exactly they're doing!

<comment><USER4> I'm not a vim guru by any stretch of the imagination, but I still don't take what he says at face value. I don't trust ANYTHING I see on the internet just because it's there!

Your criticism seems to be due to the belief that, in a world where the only information on the internet could be treated as gospel, that would allow the experts opinion to come through easily. Unfortunately, that sets up the circumstance where the experts get granted much more exposure and trust than they necessarily deserve, and it inevitably gets subverted and abused.

I personally prefer the current system - treat all information as suspect until you can verify it. It leaves MUCH less room for exploitation than all of our other "trust by default" mediums.

\-- Ayjay on Fedang

<comment><USER3> Oh, I agree that not trusting information on the internet is the sensible default. However, there are plenty of people who will be copying his examples directly without any investigation.

Some will probably post the exact same stuff on their own blogs or link to this post. Before you know it this example will drown out any serious search results for "vim filetype", effectively stopping new people from learning how to do things properly.

Now obviously this post is a bit hyperbole in this instance. But these things do happen because people can't be arsed to treat the things they write/publish with the care it deserves.

</comment></comment></comment><comment><USER5> One of the things I love about Vim is that every time I read though a post like this or look at someone's .vimrc I learn something new about what it can do or get another insight about how its features can make my life easier.

My (semi-commented) .vimrc is on GitHub if anyone wants another example: <http://github.com/samdk/vimconf/blob/master/dotvimrc>

I've also found StackOverflow's list of most-voted questions tagged _vim_ to be a very useful source of little tidbits: [http://stackoverflow.com/questions/tagged/vim?sort=votes&...](http://stackoverflow.com/questions/tagged/vim?sort=votes&pagesize=15)

And there've been several HN .vimrc posts that I also found very useful. This is one of the best: <http://news.ycombinator.com/item?id=856051>

This is another excellently commented and extensive .vimrc that (I think) is mentioned in one of the above links, but deserves its own specific mention here: <http://www.vi-improved.org/vimrc.php>

And this is another I found completely by accident a while ago that includes some excellent examples of vimscript macros: <http://fingelrest.silent- blade.org/uploads/Main/vimrc.html>

<comment><AUTHOR> Exactly.

Case in point: I just found out about ending the backupdir with two slashes to include the full path in the filename by reading your .vimrc. Thanks!

<comment><AUTHOR> Replying to myself because I can't seem to reply to sigzero:

Yeah, I definitely need to get around to reading :h filetype.

I mentioned Snipmate in the article, so I know about it :)

<comment><USER5> This is not vim-related, but the reason you couldn't reply is that HN doesn't let you reply to a comment until after a certain amount of time has passed. This amount of time depends on how deep the comment is in the tree. (I believe the restriction is there to help prevent excessively deep comment trees that are just people arguing back and forth.)

<comment><AUTHOR> Cool, thanks!

It would be helpful if it mentioned that somewhere...

<comment><AUTHOR> Addendum: ugh, it's not even in the damn FAQ.

<comment><USER6> It was announced here: <http://ycombinator.com/newsnews.html>

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> > _Some people use a mapping that turns search highlighting off and on, but I > don't like that solution. It means I have to remember to turn it back on > later once I've probably already forgotten about the original search._

:nohlsearch removes highlighting, doesn't modify search history, and also doesn't _disable_ highlighted search. It will still highlight matches for the next search.

      > nnoremap <leader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:let @/=''<CR>

I'm curious why not just use `ViB:sort`?

> _When I press return, create a new line at the same indentation level as the > current one. Don't try to be clever and adjust the indent of new line in any > fashion._

      set autoindent nosmartindent nocindent

Wrap it in a filetype line if you like.

<comment><AUTHOR> > _I'm curious why not just use `ViB:sort`?_

Because we use LessCSS[1] which lets you nest selectors:

        body {
            color: #151515;
            background-color: white;

            a {
                color: red;
            }
        }

When I sort the "body" properties I don't want it to break up the stuff nested under it.

I'll give the indent settings a try, thanks!

[1]: <http://lesscss.org/>

</comment></comment><comment><USER8> For a free, cross-platform (and excellent) alternative to PeepOpen, try Command-T

I used to use FuzzyFinder_TextMate, but that's stopped development, and the creator recommends you use Command-T instead.

<https://wincent.com/products/command-t>

<comment><USER9> LustyExplorer is good. One feature that I really like is that I can start exploring from the current directory or the directory of the current file. This way I can keep vim's current directory at the root of my source tree, and not have to deal with turning on 'acd' and all of the incompatibilities that can arise.

<comment><USER10> +1 for LustyExplorer. Use that every day at work and at home.

</comment></comment></comment><comment><USER11> I dont see the appeal of nerdtree and the like. For me they are clumsy and too much information.

I'm very adept at unix cmd line, find, ack, locate, CDPATH, cmd history, and friends. I spend 10-20% of my editing time at the bash prompt. So much so i aliased :e to vim

Having never got the "gui" file managemnet tools i cant say for certain but i wonder if power and productivity gains one sees from truly learning vim can be reproduced by truly learning cmd line.

<comment><USER12> Could you please share how exactly you do the "jump to file foo.bar" functionality? That is the only part of vim I still find a bit laborious, probably because I haven't found a good workflow for it.

<comment><USER13> :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.

<comment><USER12> But what about files that you haven't already opened?

<comment><USER14> :e also has tab completion.

I also use ctags. Usually I want to look things up by symbol name, not filename, though it's trivially easy to make a script that generates a tags file of just filenames too. (And :tag also supports tab completion.)

</comment></comment></comment></comment></comment><comment><USER15> A little off-topic: I love how in the side panel of the page the sub-title fades in and out as you scroll.

<comment><USER16> that's proportional to how much of the actual headline is still visible. scroll slowly and you'll notice.

</comment></comment><comment><USER17> Entirely agree on the aesthetics, one of the things holding me back from switching is that I love vibrant ink in textmate. I just can't seem to find a theme that is quite as bright (vividchalk was pretty close). Any suggestions?

<comment><USER18> Convert your textmate theme to vim: <http://coloration.sickill.net/>

<comment><USER17> Thanks! macvim here I come :)

edit: Many of the most popular textmate schemes have already been converted and can be found at <http://github.com/squil/vim_colors>

<comment><USER19> Some are even "improved". I love molokai <http://winterdom.com/2008/08/molokaiforvim> .

<comment><USER20> The issue I had with Molokai (and it may be my screen) is that the comments were barely readable. The colours were just too close to the background.

My favourite is earendel (<http://www.vim.org/scripts/script.php?script_id=2188>)

</comment></comment></comment></comment></comment><comment><USER21> Since the blog isn't taking comments, posting it here.

> doesn't work very well with is Python, because it preserves whitespace when > it moves the code over the REPL.

If that's the only issue, it's easy to fix it. All you need to do is to replace multiple new lines with single new line.

        let s:foo_text = substitute(a:text, '\n\s*\n\+', '\n', 'g') . "\n"

Here is my slightly modified slime.vim: <http://gist.github.com/589934>

I have been using it on Ubuntu with vim and IPython and it seems to work fine. When I started using slime.vim for Python, I ran into whitespace issue and Jonathan(slime.vim developer) resolved it when I asked him on his blog. [http://technotales.wordpress.com/2007/10/03/like-slime- for-v...](http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/)

You can search for Rahul in the comments.

</comment><comment><USER22> After a few months of vim use, I did part of the vim tutorial using both vim and a click-and-type editor (gedit) and timed myself. Gedit was _significantly_ faster. Can't say I understand you vim fanatics.

<comment><AUTHOR> If you say _why_ Gedit was faster perhaps us vim fanatics can help you understand us.

<comment><USER22> Let's say I need to change a word. With Gedit, I double-click the word and retype it the right way. With Vim, I press j until I'm on the line where the word is, then I press w until I'm at the beginning of the word, then I press cw to change the word, retype it the right way, and press escape to go back to command mode.

Triple-clicking in Gedit highlights a line. Triple-clicking and dragging highlights a contiguous group of lines. In Vim, I'd need to move to the line I want to begin my selection on ([number]G or jjj), then press V, then press jjj until everything is selected. And I don't have to deal with the fact that the default way of deleting things overwrites the default clipboard either.

I do use Vim when I need to process lines in a text document (with macros), when I'm editing files on a server, or when I'm writing a git commit message. I suppose I could use Vim in much the same way as Gedit through its mouse capability, but I dislike the lack of interface between my system clipboard and Vim's, and the fact that when I paste code in to a Vim document, the indentation gets all screwed up.

<comment><AUTHOR> "With Vim, I press j until I'm on the line where the word is, then I press w until I'm at the beginning of the word, then I press cw to change the word, retype it the right way, and press escape to go back to command mode."

OK, this is something Vim people need to work on. Using j/k to move more than one or two lines is the wrong way to do things.

I know, I know, we extoll the virtues of hjkl constantly, but really they're _barely_ more effective than the arrow keys.

There are better ways to move around in Vim, such as [f]orward, '[t]il and searching. In your case (changing word XYZ to something else) I would search for the word with /XY… and press return to get there, then edit as you described.

"Triple-clicking in Gedit highlights a line. Triple-clicking and dragging highlights a contiguous group of lines. In Vim, I'd need to move to the line I want to begin my selection on ([number]G or jjj), then press V, then press jjj until everything is selected."

See my previous comment about movement. You'd move to the line you want by using a search (or '{', which moves to empty lines), start your selection with V, and move to the end with another search (or some kind of movement command that gets you where you want to go quickly).

We Vim users need to stop touting our Nethack-honed hjkl skills and start talking about Vim's better movement commands.

"And I don't have to deal with the fact that the default way of deleting things overwrites the default clipboard either."

Yeah, this is dumb. YankRing helps a lot by letting you 'Ctrl+P' to the right text, but I really think Vim should have a "clipboard register" that only gets overwritten when you mean it (and have other registers for the last yanked elements).

"when I paste code in to a Vim document, the indentation gets all screwed up."

If you're using a graphical Vim like gvim or MacVim this simply shouldn't happen. It's a bug and you could report it.

If you're using the command line Vim you might need to do a bit more work to launch Vim and tell it to talk to X. It's a few extra minutes up front, but such is the price of using a terminal-based editor in a graphical environment.

<comment><USER22> "There are better ways to move around in Vim, such as [f]orward, '[t]il and searching. In your case (changing word XYZ to something else) I would search for the word with /XY… and press return to get there, then edit as you described."

That is both slower and has the disadvantage that any intermediary occurrences of the word between my cursor and the one I want to edit will be accessed first.

"See my previous comment about movement. You'd move to the line you want by using a search (or '{', which moves to empty lines), start your selection with V, and move to the end with another search (or some kind of movement command that gets you where you want to go quickly)."

I invented the following task for myself: With the cursor on a blank line above 4 lines of text followed by a blank line, copy the 4 lines and paste them so that there is a buffer of 2 blank lines between the 4 lines of text and their duplicates. I did the task 4 times in both gedit and vim, restarting whenever I screwed up (which was quite often). Here are my results.

vim: 18.28s gedit: 14.45s

I discarded an earlier task that I think Vim might have been doing better on because the task ended with the buffer back where it started, and I wasn't sure I was able to count accurately while performing the task. However, I had practiced with Vim on that task to the point where my movements were purely mechanical, and I was typing characters nearly as fast as I'm typing these words now.

It's probably a better idea to relax while doing these tasks instead of racing through them, as I'm generally relaxed when I code, but I still don't see much promise in Vim at this point.

As a side note, why is it that I'm the only one doing tests on myself? It's almost as though you guys don't actually want to know which editor is faster.

<comment><USER23> I tried your test, and was slightly faster at doing it vim than gedit (assuming my fingers were on the keyboard to begin with). How exactly did you do it in vim? I used the following:

y4j5jp -- yank down to 4 lines, move down to the blank line, paste after it.

I appreciate that there's an awful lot to learn before you can edit quickly in vim, and that the difference (if any) between that and gedit(or any other editor) may not be worth it.

I prefer vim for reasons other than speed, though -- the composable commands "feel" right to me, and the macro system makes short work of repetitive tasks. I'm essentially making lots of small programs to write the larger program for me.

<comment><USER22> I did V}y}p.

</comment></comment></comment></comment></comment></comment></comment><comment><USER24> This is an excellent vim tutorial. Unlike others I've read, it makes me want to be vim power user by clearly spelling out the benefits of various tricks and commands.

</comment><comment><USER11>
      "Many people like to remove any extra whitespace from the
      " ends of lines. Here is one way to do it automatically
      " when saving file.
      fun! <SID>StripTrailingWhitespaces()
        let l = line(".")
        let c = col(".")
        %s/\s\+$//e
        call cursor(l, c)
      endfun
      autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()

      " When editing a file, always jump to the last known cursor position.
      au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif

      " This function determines, wether we are on the start of the line text (then tab indents)
      " or if we want to try autocompletion
      function InsertTabWrapper()
        let col = col('.') - <USER2>
        if !col || getline('.')[col - 1] !~ '\k'
            return "\<tab>"
        else
            return "\<c-p>"
        endif
      endfunction
      " Remap the tab key to select action with InsertTabWrapper
      inoremap <tab> <c-r>=InsertTabWrapper()<cr>

</comment><comment><USER25> Great read. Among other things it made me dig deep into the heart of my Vista machine and find whatever font was making your site (and others) utterly unreadable. The answer is shitty Palatino fonts installed by HP, presumably as part of a printer driver.

So there you go, if Steve's site makes your eyes bleed then go and kill the HP Palatino fonts on your machine.

<comment><AUTHOR> Hmm, perhaps I should change the font stack.

Is your shitty HP font named "Palatino" or "Palatino Linotype"?

If it's "Palatino" I'll need to insert a Windows-only font at the front of the list.

If it's "Palatino Linotype" I'll need to insert a Windows-only font as the second element in the list.

<comment><USER25> Hi Steve - it's "Palatino". I also have "Palatino Linotype" and it looks fine now that I've knocked off Palatino.

It's a problem I've come across previously on Windows, I think Sun's Java was also installing some horrible version of Palatino a while back. Pity, as it's a wonderful typeface and looks nice on your site.

</comment></comment></comment><comment><USER26> On a side note, the Gundo feature (<http://stevelosh.com/blog/2010/09/coming- home-to-vim/#gundo>) is available for Emacs (<http://briancarper.net/blog/568/emacs-undo-trees>).

</comment><comment><USER27> I am quite proud of my vimrc. It took me a while to build it. By default, it's just a text editor without settings required for development. Use dev to enable devmode and nodev to go back to normal text editing mode.

<http://github.com/SpookyET/dotfiles/blob/master/vimrc>

</comment><comment><USER28> If anybody is curious, or just wanted to steal his .vimrc (like myself), here it is [I'm surprised he didn't provide it at the end of the article...]

<http://paste.pocoo.org/show/265338/>

<comment><AUTHOR> Here's the BitBucket link, which will stay current as I push more updates in the future: <http://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc>

I did link it in the "Important .vimrc Lines" section, but perhaps I should add it at the bottom as well.

</comment></comment><comment><USER29> A litte off topic. Much that I like vim I haven't found any plugin than can indent Javascript properly. To be honest whenever I write Javascript I just open up emacs. Is there something close to js-mode in vim?

<comment><USER30> (ITYM js2-mode) No.

I use this to indent my JS: <http://www.vim.org/scripts/script.php?script_id=1936>

You could use JSLint plugin to get more of the features, but I've never gotten it to feel like js2-mode.

</comment></comment><comment><USER31> A bit off the topic but a couple of doubts regarding pathogen. I installed pathogen and am a bit confused regarding the organisation of the plugins within pathogen. Say I have plugin called foo.vim, inside the bundles folder do I directly drop it or do I create a folder called foo and then drop foo.vim within it? Also say a plugin has syntax files and an ftplugin folder then do I just drop the plugin in pathogen and it is supposed to work? Is there any good doc out there explaining how to configure with pathogen?

<comment><USER32> "Say I have plugin called foo.vim, inside the bundles folder do I directly drop it or do I create a folder called foo and then drop foo.vim within it?

You need to create the folder foo with a folder called plugin and then foo.vim inside it -> foo/plugin/foo.vim

" Also say a plugin has syntax files and an ftplugin folder then do I just drop the plugin in pathogen and it is supposed to work?

Yep. Normally vim plugins are shipped in zip files that contain the structure and are meant to be installed on top of your .vim directory. All you do is instead install them into .bundles/pluginName instead. Also, since a lot of vim plugins are kept in source control anyways, a lot on github, you can simply use git submodules to version your plugins as well making updating them a cinch.

<comment><USER31> Thank you.

</comment></comment></comment><comment><USER33> I can't get snipMate to work. Downloaded a brand-new gVim (windows 64, btw) dropped a pathogen.vim file straight from github into my vimfiles/autoload folder and copied the snipMate's files to vimfiles/bundle/snipMate.vim

I'm using the article's _vimrc.

:scriptnames lists the "plugin/snipMate.vim" files from both the "snipmate.vim/" and "snipmate.vim/after"

But when I type some snippet (like a "for" in a *.c file) and press tab, a single space (not a tab) is inserted. Pressing tabs on non-snippets inserts a tab like expected.

Am I missing something here?

</comment><comment><USER34> I disagree with everything that he starts with 'I almost never do X so I...'

But other than that, I think this is a great list of addons and I already use a few of them myself.

<comment><USER11> yeah i rely on replacing first pattern all the time!

</comment></comment><comment><USER35> TextMate doesn't have split windows?!

<comment><USER36> Nope. It's one of the biggest complaints about Textmate, and one of the things that led me to (mostly) switch to vim.

A lot of people are pretty upset with the author because rather than choosing to release an incremental update that adds smaller features like this, he decided on a total rewrite and got bogged down with no release in sight.

That said, Textmate still feels remarkably current despite the fact that its last major update was more than 4 years ago.

</comment></comment><comment><USER37> Couple tricks:

        " this splits a netrw window in the directory of the current file, :Vexplore for vsplit.
        nnoremap - :Sexplore<CR>

        " I use surround.vim all the time. The default mapping for s is terrible.
        nmap s ysi
        nmap S ysa

</comment><comment><USER38> Interesting article. I found it a bit strange that he didn't link to or reference this: <http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim>

which shares the exact same title.

<comment><AUTHOR> Yeah, I didn't realize that post had the same title, even though I read it and it's a fantastic post.

I'll add a link to it now.

</comment></comment><comment><USER39> I have nothing constructive to add beyond-- thank you Steve, what a fantastically informative post. It clearly took a lot of time and effort to put together and it is very much appreciated.

</comment><comment><USER40> Don't lose another four years before blogging about how you finally switched to emacs from vim and bite the bullet now. Emacs is to vim as vim is to textmate IF you are a hard core software developer. Vim is best for sysadmins, simple, quick non-complex editing.

I know, I know... But when you were newly in "love" with textmate I'm sure if I said you need to switch to vim you'd say no way. Skip vim and go right to the best there is, Emacs.

<comment><USER41> ...and once your fingers are raw, bloody stumps from typing with three modifier keys held down, then you can write about coming home to vim again! Bonus!

Seriously, can we not start yet another Emacs vs. vi argument? Neither is perfect, they both have ardent fans, pick either, get really proficient with it, and don't look back.

(Emacs user who loves Emacs's extensibility and multi-buffer design but prefers vi's modal keyboard ui. And yes, I know about viper, etc.)

<comment><USER42> Have you noticed that all of the recent press seems to be for vim? It seems like every month there's a new "I switched to vim!" post, but never a similar emacs version, or even a mention of emacs in the switch article.

Note: I am not attempting to argue emacs vs. vim.

<comment><USER41> If I'm not mistaken, they're usually switching to vim specifically _from textmate_. The Mac + Ruby community seems to be disproportionately well- represented in blogs, probably due to a high concentration of web developers.

Some high-profile Ruby people (e.g. Yehuda Katz) wrote about switching to vim about two months ago ([http://yehudakatz.com/2010/07/29/everyone-who-tried-to- convi...](http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convince-me- to-use-vim-was-wrong/)), and it probably set off a chain reaction.

</comment></comment></comment></comment><comment><USER19> I was getting a bit tired of seeing/reading a blog post by a random convert to vim/emacs every week but this one is very good.

</comment><comment><USER43> I feel the same way about Emacs. I use IDEs for specific development tasks (I don't generally code Java in Emacs, for example, since Netbeans, Eclipse, Idea are all much better in that context) but where content is all over the place as it often is with net development, I use Emacs.

</comment><comment><USER44> If you're a vim user on a mac, try ViKing. It lets you use vi-like navigation throughout OSX. It's still in beta and I would love some feedback.

<http://vikingapp.com> @vikingapp

<comment><USER45> The kevincolyar account does nothing but spam HN with links to his application. I am sick of seeing him post spam each time a VIM article hits the homepage.

<comment><AUTHOR> I'm the author and submitter of the post and for what it's worth I don't mind his comment at all.

It's relevant because OS X Vim users would probably like to use Vim movement everywhere. I know I would.

It's certainly more relevant than the "use emacs lol" comments that inevitably show up.

<comment><USER46> Yeah, the whole vim/emacs war is so 1995.</comment></comment></comment></comment>


Formlabs: High Resolution 3D Printer - <AUTHOR> http://www.formlabs.com/ <comment><USER3> The call to action link says: "Pre-Order on Kickstarter"

They must have not gotten the "Kickstarter is not a store" memo. They appear to be ready to pull the trigger on their manufacturing partners, so this is sort of a "how big should we make the first run?" type of kickstarter rather than a "let's create something awesome".

Details…

• Stereolithography printer (laser, not extruder)

• Much nicer than extruder style printers

• $2300-2700 for the machine depending on your precedence

• $140/liter for liquid resin

<comment><USER4> This might be a kind of dumb idea, but I would love it if somebody created a Kickstarter project to create a manufacturing and distribution plant for Kickstarter projects...(obviously, would require a huge investment for all of the machining equipment).

<comment><USER5> I don't think it would work in exactly the same way you are describing but there may be alternatives. Manufacturing equipment is very expensive and the only way to justify the cost is to keep it running daily, sometimes 24/7/365. The change parts for each unique product are also quite expensive (easily $10k+). If I want to open a KickManufacturing plant, I have to buy/maintain/service hundreds of different kinds of equipment which includes the cost of the hardware, software, and technicians. On top of that, each new product will barely have 10k - 100k units ordered if I'm lucky. After that the change parts are useless. The other problem with this is the manufacturing equipment that can do lots of different configurations is slower, error-prone, and more expensive than specialized equipment that does just one thing. So if one of the Kickstarter products does become a success and they want 100m units, you need to buy new equipment or source a better large-scale manufacturer. And worst of all, most of the equipment will be collecting dust 95% of the time unless someone has just the right Kickstarter project for them.

What most entrepreneurs spend their time between getting funded and beginning shipment is finding the right manufacturer who can allocate runtime on their lines. The manufacturers lose money when the lines aren't running. The entrepreneurs get delayed when the lines are busy. This is a very complex B2B market that has no current solution. If someone solves this problem, we can have significantly better fulfillment of Kickstarter orders.

Such a site would have manufacturers periodically uploading capacities and capabilities of their equipment, warehouse/distribution resources, and costs associated with each line/product-type by time/quality. The entrepreneurs would be able to book the best-fit manufacturer (be it in US, China, or Norway) and pay a reservation-fee to the manufacturer which sits in escrow pending successful contract. The reservation-fee would be high enough to deter fake orders and be credited towards the actual product order. The site could fund itself by collecting interest on the escrow or charging per new B2B relation.

<comment><USER6> > And worst of all, most of the equipment will be collecting dust 95% of the > time unless someone has just the right Kickstarter project for them.

Cloud manufacturing?

<comment><USER7> If Kickstarter crowdsources funding, why not crowdsource manufacturing, too? Especially considering the increasing proliferation of 3D printing and the like.

I'm sure that many DIYers, hackerspaces, etc., have the ability to manufacture small batches of a wide variety of products; QA and final assembly could be done further up the chain, as a component of distribution.

</comment></comment></comment></comment></comment><comment><AUTHOR> It will be interesting to watch 3D Systems share price today. JP Morgan issued a statement yesterday that they thought Formlabs might pose a significant risk to them.

[https://www.google.com/finance?client=ob&q=NYSE:DDD](https://www.google.com/finance?client=ob&q=NYSE:DDD)

Down 2% already in just 5 min!

<comment><USER8> I don't think you get how the stock market works - short term linear news announcements do not indicate market translations. The stock market is the instantaneous auction price of ~100 market participants at any point in time - it can go in any direction for any reason.

For the vast majority of the time the stock market is stable until such a time as a whale moves markets and the feedback loop begins.

<comment><USER9> While I understand the gist your comment, you probably didn't read the link. This is _exactly_ how the market works: traders don't have time to follow closely all the markets of all companies they are trading, so they will eat whatever canned news they get -- provided it came from a reputable source.

So when JP Morgan issues a memo saying _"Formlabs ... could be a threat to incumbent 3D printer solutions at the low-end of the market in the near- term... First take: potential negative for DDD"_ \- and in the exact same week that Wired published a cover page with Bre Pettis and his good-looking MakerBot Replicator 2... well, maybe it's time to lock in the 110% gains you had this year with DDD and move on...

<comment><USER8> Traders really don't trade that many companies a year - they specialise - <USER2> if they did so many that they followed canned news - well lets just say they wouldn't be in business very long.

</comment></comment></comment></comment><comment><USER10> Sad prediction: the future of 3D printing will be cheap printers [that require/are subsidized by] proprietary resins.

<comment><USER11> I actually think it could be more extreme. The printer industry is the way it is because most people don't really need one, so customers skimp instead of optimizing for long-term usage. I predict even fewer people will need devoted 3D printers in their homes - especially if there are local versions at a place like staples/kinkos.

<comment><USER12> that is, until we're printing food. The French Culinary Institute has been working on 3D food printers for years.

<comment><USER13> <http://burritob0t.com/>

</comment></comment></comment></comment><comment><USER14> I found this about 2 months ago: [http://www.instructables.com/id/Build-a- Laser-3D-Printer-Ste...](http://www.instructables.com/id/Build-a- Laser-3D-Printer-Stereolithography-at-Ho/)

It looks to be the same technology without the refinements.

I got pretty excited and bought several of the components, but have yet to assemble them.

</comment><comment><USER15> Can an expert in 3D printing compare this with, say, the MakerBot Replicator 2? How does the extruder technology compare with SL on resolution, hardness, speed of printing, etc?

<comment><USER16> Lithography printing from what I've seen so far is significantly better than extruder tech. We have a Projet 1500 and an original Makerbot at my hackerspace (Columbus Idea Foundry). The Projet absolutely kills the makerbot for resolution and jitter. If you made a sphere on the projet, it will be pretty damn smooth. On the Makerbot (original) it will have a strong texture to it. No experience with Replicator 2.

Yet, its also around 10x as expensive to run (ABS is cheap, whereas the liquid stuff is expensive). It also takes a lot more room (there's separate machines for a drying/curing thing). The resolution on the Projet 1500 (which isnt the best one in the world, just what we have) is pretty limited at like 1024x768 since it uses a projector instead of a laser. I'm thinking the laser might allow for finer resolution, but I'm not sure.

Also, our Projet machine won't operate (like, at all) if its above 75F. Most of our hackerspace is un-airconditioned in a warehouse, so that just doesn't work. We had to get an AC and put it in an office. Extruder machines just don't care.

I haven't used the Replicator 2, but the replicator looks promising. At the same time, if the Formlabs ones does as it says, then its a HUGE move forward as its around 1/10th the price of something like our Projet 1500.

This looks pretty exciting initially. If I had the money- I'd consider buying one.

<comment><USER17> I've been putting off going to Columbus Idea Foundry, but with all the cool tech there I might just have to get my membership.

<comment><USER16> I'd highly encourage you to come by for a tour, and sign up for a class before jumping into membership. Not that membership just right away is bad, but doing this will give you a better idea of if the place is a good fit for you and your needs. Send me a PM if you'd like a tour or hit up our contact info on the main website.

</comment></comment></comment></comment><comment><USER10> Inspiration? <http://3dhomemade.blogspot.ca/>

Open hardware kit for similar:

<http://b9creator.com/>

</comment><comment><USER18> It looks like it fills up a tray to do the print. Does it reuse what it doesn't solidify for future prints? (It would seem like a waste otherwise)

<comment><USER19> The tray is large enough to contain enough resin for roughly 12 hours of printing and all of the uncured resin can be reused for the next print.

</comment></comment><comment><USER20> It would be really nice if they laid out how far they are on the road to making this 3D printer into an actual product.

When you pre-order something the money that you spend should go to manufacturing, the bill of materials, shipping, handling, warranty and so on. It should definitely _not_ go into product development and process development. The reason for that is that those are very long phases with plenty of opportunity for trouble which may cause delays, price increases, large changes to the product and even aborted runs.

Pre-ordering a device from a company without a history of shipping product is a risky business.

</comment><comment><USER18> Does anyone know how a photopolymer works chemically/molecularly? What is it about the UV light that makes it solidify?

<comment><USER21> OK this literally is quantum physics and the discovery was Nobel-prize material but it's not that hard to grasp so here's how it works :)

If you have a chemical reaction that requires a certain energy level, shining lots of light on it won't help much if each _individual_ photon is below that energy level. Even if you have a really bright reddish light, each photon still only has a relatively low energy. On the other hand each UV photon has more energy than a red one, so they can add enough energy to cause a chemical reaction.

<comment><USER18> So it just needs energy to solidify? Would heat also work?

So the molecules that it's made of up combine into new molecules that are solid? Do you know what the chemical reaction is?

<comment><USER22> Watch this movie for a brief introduction on quantum states. <http://www.youtube.com/watch?v=kJBcXFsFa7Y>

I've also googled around and found this picture explaining what is called uv curing. [http://www.signindustry.com/flatbed_UV/articles/images/2008-...](http://www.signindustry.com/flatbed_UV/articles/images/2008-11-UV_Ink_Reaction_to_.gif)

So basically the uv light is kicking the electrons up multiple levels in the "photoinitiators", the "photoinitiators" stabilize by dropping levels and giving off photons. These photons excite the "Monomers" and "Oligomers" between which electrons can freely flow (radicals) making it possible to form new bonds, creating longer chains of atoms (a polymer) /amateurexplenation

</comment></comment></comment></comment><comment><USER18> Any chance the resin/polymer will come down in price if this catches on?

<comment><USER23> I'd say that's almost inevitable.

<comment><USER24> Why do programmers always assume every field is just like computing? Not everything gets cheaper.

Chemistry is a mature industry. Photopolymers are 50+ years old, and unpatented. There's no real reason to believe UV-cure resin will ever get much below $100/litre, which is a solid 10 times more expensive than ABS.

<comment><USER23> And what's their market size? Why are you assuming there will be no economies of scale?

</comment></comment></comment></comment><comment><USER25> About what I paid for my first inkjet printer (because I couldn't afford a LaserWriter). Or another way of thinking about it -- rather than upgrading to an FX digital camera this generation, I can skip a generation, live with my insanely-good-but-not-that-insanely-good DX camera and get one of these.

Obviously, the whole "giving $3000 to someone and trusting them to deliver" thing is a bit of an issue, but presumably this means _something_ like this is viable at _something_ like the price of a good printer in 1992.

Hmmm.

<comment><USER26> I wonder if calling it a 'Pre-order', on their site, gives customers a better case if they don't deliver.

</comment></comment><comment><USER27> Slightly off-topic, but does anyone know anything about the 3D printing tech used by <http://www.shapeways.com/> ? Limited materials are the one thing holding me back from picking up a desktop 3D printer, so I'd like to learn more about their tech and what might be holding it back on the desktop. Their material selection is seriously impressive.

The Formlabs one looks promising and I love the design, but I just don't have any interest in printing PLA/resin.

<comment><USER28> The materials pages discuss the various processes they use:

<http://www.shapeways.com/materials>

A lot of the processes involve replacing a temporary binder.

</comment></comment><comment><USER29> <http://3dhomemade.blogspot.com/>

Any relation between the two projects? The design is quite similar.

<comment><USER30> UV resin printers have been a popular research area in the DIY 3D printing community for the last year or two. There are a few more too. Most are based on DLP projectors with some hackery to remove the color filters (e.g. carefully snap off a hundred little pieces of glass from a rotating wheel) as I understand it, which makes them expensive and fragile for a individual. This is a situation where volume assembly of a complete device makes more sense than garage experimentation, so Formlabs' work looks promising to me.

</comment></comment><comment><USER31> Great looking printer. I'm an owner of a B9, it seems the only disadvantage of the Formlabs if you can call it that is that the feature size can't be smaller than 300 microns. For any square, structural shapes the B9 has an advantage here as it can render x/y pixels down to 50 microns at the smaller build size and 100 micron pixels at the 4"x3"x8" envelope. In every other situation however, the laser of the Formlabs I'd think would have the ability to trace around any curved features with a higher level of precision as it's not limited by pixel density. SLA is a slower process as the laser has to fill in each layer until it can transfer to the next layer, whereas DLP projector- based tech cures an entire layer with each projection cycle. I think the B9 can do about an inch per hour depending on the properties of the resin formulation. Great to see you guys giving the monopolies some competition, don't sell out!

</comment><comment><USER32> Similar price and technology of B9creator <http://b9creator.com/> (also funded on kickstarter a few months ago), more info on the technology here <https://code.google.com/p/lemoncurry/wiki/main>

<comment><USER33> It seems the B9 is a tad more expensive and also requires self assembly. I'm not sure why but their site is also incredibly slow and a pain to use in some cases. With that said it does appear to have a higher resolution in the Z plane than the Form 1.

</comment></comment><comment><USER34> In the comparison photos, is the poor quality one from something like a MakerBot? Maybe I've never seen a close-up photo before, but I always thought they created higher quality than that.

<comment><USER3> Yes it is. Extruded pieces can be pretty gnarly. This is exacerbated at small feature sizes, which is what you see here, especially on the birdcage which is about 3cm tall. To be fair, most people would clean that birdcage up a bit before showing it to anyone.

Most of the objects you see on the page have been cleaned up. For instance, over the "Accessories - Form Finish kit:" heading you see a part that hasn't had its temporary supports removed. The bracelet is a little furry on the bottom. It looks much better near the top of the page where it shows in a montage after cleaning.

<comment><USER35> That birdcage was actually pre-cleaned to make it look as good as possible.

</comment></comment></comment><comment><USER18> So has the FDM process hit it's resolution limits in something like Makerbot or is there still room for improvement? (I'm curious which process to bet on)

<comment><USER36> With FDM, the fundamental limit (right now) is the viscosity and surface tension of the molten plastic. From memory, the Replicator 2 and the Ultimaker are hovering around that limit - you can make smaller motions with the print head, but the feature size you get won't really benefit.

With optical cure systems, in theory I think the limit is optical. In practice, there'll be unavoidable scattering at the focal point which will blur things a little, but I don't know exactly how much of a problem that is.

</comment></comment><comment><USER37> Anyone know the state of 3d printing tech in China?

Is it popular among hackers there? Any cheap clones at market? Are they up to speed with US consumer 3d printing tech?

</comment><comment><USER38> I don't know about you but I'm extremely excited about this printer. I currently have a RepRap Prusa but it really is hard to match the quality of these kinds of printers. The only problem I see is that it sounds like they are also selling the resin for it and somehow figured out a way to make it cheaper than most. I'd worry about how long they'd be able to keep up with selling enough resin for everyone.

</comment><comment><USER39> This makes the Dimension 768 SST we just bought look like a dinosaur. Can't wait to get one of these on my desk.

</comment><comment><USER40> There is also this project: [http://www.kickstarter.com/projects/b9creations/b9creator-a-...](http://www.kickstarter.com/projects/b9creations/b9creator- a-high-resolution-3d-printer)

they also seem to make an optical 3d printer and seem to have actually shipped some of them already.

</comment><comment><USER41> What types of small businesses can be created using portable 3D printers ?

few comes to mind: 1\. Custom toys

2\. 3D self sculptures

3\. Invention classes for kids

<comment><USER42> I know of at least two groups doing custom sex toys with 3D printers.

</comment></comment><comment><USER43> What 'regulatory approval' does it take to ship a printer to e.g. Europe? Is this to do with CE marks, or shipping chemicals or something? $300 per customer extra seems rather a lot.

<comment><USER44> I'm guessing has to do with the laser. From their FAQ: "Unfortunately, it is not safe to run the laser without the enclosure." Presumably it's powerful enough to fall under differing regulation in each country.

</comment></comment><comment><USER18> I think it would be cool if future models included a FDM head too. That way you could build in circuits or use ABS as a cheap filler.

<comment><USER18> After watching the video that may not be feasible. It looks like it's building the model top down, so extruded plastic would just fall? I was picturing it building from the bottom up so extruded plastic could rest on the previous layer.

Is there a chance that conductive resin could be used in the future for circuits?

</comment></comment><comment><USER18> Would you guys say this is a game changer?

<comment><USER35> Yep - My company bought a $50K printer 6 years ago - this one is much better performance wise. The annual service contract for that one is $10K, so I could burn through a Form 1 per quarter and come out ahead.

This will change product development the way CMSs changed publishing.

<comment><USER20> You've been telling people to hold off buying a 3D printer from other manufacturers until this one was unveiled. But I don't get the impression this is in the product phase yet. There are some slick pictures and a nice presentation but nothing at all that indicates the thing actually exists in an about to ship state.

What exactly is the state of development of the formlabs product?

<comment><USER36> If it's not in the product phase, it's one hell of a prototype. Just from the video, they've got custom PCBs built, a custom case, and a whole shelf full of older prototypes.

<comment><USER20> From prototype to product is a (sometimes very) long road, I find it a bit strange that someone would say 'don't buy 'x' where 'x' is available today because there exists a prototype from a company that has not yet shipped in volume.

Maybe my expectations were not realistic but I expected something a lot closer to production. Tons of things that are prototyped never make it to production or end up costing substantially more than envisioned at the prototype stage and I'm pretty wary of pre-ordering things that are not yet in the production pipeline. Pre-ordering is great if you've ramped up to volume production and items are about to be shipped. Pre-order money should go the BOM of the device that will be shipped to you, to shipping, warranty issues and assembly, not to process/product development. See 'wakemate'.

</comment></comment></comment></comment></comment><comment><USER45> This looks amazing. I have been waiting for this... the quality is top notch! What a deal too :)

</comment><comment><USER46> Good job guys! The results look amazing and the device itself looks beautiful.

</comment><comment><USER47> "Windows or Mac"

No thanks.</comment>


Curators of Sweden - <AUTHOR> http://curatorsofsweden.com/ <comment><USER2> Not sure what happened in this thread and how it became about Islamophobia, racism or Sweden being a modern DDR.

<comment><USER3> The '#svpol' people showed up and poisoned the thread. They're the people you generally avoid by not having idiots added on Facebook and not following media celebrities on Twitter. Apparently they're inescapable now, even on HN. Fortunately this link is most likely impopular, so the embarrassment is fairly limited.

<comment><USER4> Essentially anyone who doesn't share your opinion is an idiot.

"I like discussion, debate, and reasoned criticism. But a lot of arguments aren't any of those things. They're the style I describe as ethnic tension, where you try to associate something you don't like with negative affect so that other people have an instinctive disgust reaction to it.

There are endless sources of negative affect you can use. You can accuse them of being "arrogant", "fanatical", "hateful", "cultish" or "refusing to tolerate alternative opinions". You can accuse them of condoning terrorism, or bullying, or violence, or rape. You can call them racist or sexist, you can call them neckbeards or fanboys. You can accuse them of being pseudoscientific denialist crackpots.

If you do this enough, the group gradually becomes disreputable. If you really do it enough, the group becomes so toxic that it becomes somewhere between a joke and a bogeyman. Their supporters will be banned on site from all decent online venues. News media will write hit pieces on them and refuse to ask for their side of the story because 'we don't want to give people like that a platform'. Their concerns will be turned into bingo cards for easy dismissal. People will make Facebook memes strawmanning them, and everyone will laugh in unison and say that yep, they're totally like that. Anyone trying to correct the record will be met with an "Ew, gross, this place has gone so downhill that the [GROUP] is coming out of the woodwork!" and totally ignored."

Sorry that your safe space and bubble bursted.

<comment><USER3> No, actually, anyone who comes into a HN thread immediately derailing it into a pointless regional political debate is an idiot. That's pretty much it. I'm sorry to burst your very long rant where you over-analyze and completely miss the mark, but people are simply embarrassed by you because you've taken this HN thread and run it into the ground without it receiving even one on-topic reply.

> The discussion in these comments is embarrassing (and I'm not even Swedish).

> Apparently the mere mention of Sweden was enough to make local politics > spill over here. It's like watching a post about a weather app getting > overrun by climate change denialists.

That's the entirety of it.

</comment></comment></comment></comment><comment><USER5> I'd imagine most other countries haven't thought of doing this, because most others countries don't have such a rigidly enforced group-think as does Sweden.

 _Did you know that Sweden 's main export is not lumber or steel but in fact white guys with beards who think they are hilarious?_

Sweden is also among the world leaders in exporting ISIS terrorists. Believe it or not. [http://swedenreport.org/2015/02/04/more-isis-fighters- from-o...](http://swedenreport.org/2015/02/04/more-isis-fighters-from-one- swedish-town-than-entire-usa/)

In fact a native Swede "Islamophobia Expert" joined ISIS and is attempting to recruit others. wtf?

[http://www.thelocal.se/20150203/swedish-islamist-convert- in-...](http://www.thelocal.se/20150203/swedish-islamist-convert-in-isis- video-row)

[http://www.frontpagemag.com/point/251905/swedens- multicultur...](http://www.frontpagemag.com/point/251905/swedens- multicultural-center-expert-islamophobia-daniel-greenfield)

I don't have time to look through many of these tweets, but I imagine there are a number of things the authors refrain from mentioning.

I've found this blog [http://swedenreport.org](http://swedenreport.org) to detail some shocking things that have transpired in Sweden in the past years that those tweets probably bypass.

From the author's About page:

 _[...]

The purpose of this blog is to highlight some of the news stories that don't show up under the International News-section of your newspaper, yet might be of interest for your investment decisions, understanding of politics in the Nordic region, or perhaps just your vacation plans.

[...]

About me: I was born and raised in Sweden, but moved to USA as a young adult in 1999. I acquired naturalized American citizenship 2007. In recent years I had to relocate back to Sweden for family reasons, only to discover that much had changed in my absence.

I am not affiliated with any political party in either country. I hold a B.S. in Finance and an A.S. in Accounting from Excelsior College, New York._

(I have no connection with that blog, or the author, other than having read some of it with astonishment)

<comment><USER6> Wouldn't it be the other way around? Giving the account to an _individual_ , one week at a time, seems like a pretty liberal solution to me. The group- think, authoritarian version would be to make it centralized and heavily filtered.

      The rules of Curators of Sweden stipulate that the
      curators are free to write whatever they want. Tweets
      will only be deleted if:

      they violate Swedish law;
      they promote a commercial brand;
      they are a security threat.

As for the rest of your post: while I'm sure that you've a point, I don't really see what it has to do with Curators of Sweden.

<comment><USER5> _I don 't really see what it has to do with Curators of Sweden._

Curators of Sweden, has to do with _Sweden,_ specifically the curation or portrayal of Sweden. i.e. "The big picture."

My post also has to do with _Sweden,_ specifically the fact that there is a lot going on in Sweden that is rarely mentioned in official channels and also unlikely to be found in Curators of Sweden, but it is vitally important that more people become aware of.

</comment></comment></comment><comment><USER7> [https://twitter.com/sweden/status/640601633332850688](https://twitter.com/sweden/status/640601633332850688)

"Take care and remember to not have sex with racists, sexists or LGBTQ- phobes!"

That has got to be worth at least 100 goodness points and should score him some young, cute and immature leftist girls. Welcome to the social do goodie economy.

<comment><USER4> You're probably getting down-voted because you're not adding anything, though I'd argue it's really hard to add anything to the discussion.

Curators of Sweden are essentially hive-mind of the same types of people over and over except only at one point, we had a person who was liberal (not left- wing) and people shat their pants.

Another thing to add is the most vile racist Swedes I've grown to meet are usually left-wing extreme (mainstream today) "anti-racists". You're approved as long as you agree with their narratives, until you don't and branded as an uncle Tom (though they use a different word that starts with house) and more often not also called "fascist".

A perfect example of this actually happened today as a politician from Folkpartiet (The Liberal Party) got booed as she was talking on an event about supporting refugees. Her name is Birgitta Ohlsson and has fought a lot for LGBTs, refugees and to even open the borders.

Swedes really watered down the word racist. Sorta like how everyone in Soviet was a fascist. Kinda funny how I've grown to tolerate the Swedish Democrats in comparison.

Seeing people like Nalin Pekgul, Sakine Madon, Hanna Gadban, Sarah Mohammed and Alice Teodorescu being called racist pretty much did it for me.

<comment><USER7> Sweden certainly is in the forefront of building a modern DDR. I guess we'll see a Swedish movie similar to that of "Das Leben der Anderen" in a decade or two.

Just this week the largest daily newspaper (Dagens Nyheter) decided to out the identity of an anonymous high-profile blogger (a 70 year old woman) who was critical of the current immigration scheme. The main reason they did it was as a form of punishment. This was made clear in their reporting.

<comment><USER8> High profile blogger, author, and former journalist. I can't say that I am giving this all too much of my attention, but I think that you are leaving out a few things. They did state that they outed her after she posted the name and phone number of two journalists claiming that they had been stalking her [1]. They also argued that the political influence wielded by the blogger rivalled that of an established journalist and that it justified publishing her name. Whether or not this really justifies publishing her name, well, that is a different matter entirely.

Also, I am not sure if "critical of the current immigration scheme" is an appropriate label for someone that has stated that "Those that allow this to happen to Sweden should not have a single moment of peace. Those that with open eyes and at a steady pace are betraying our country. Those that not only allow but encourage and carry out the import of unidentified murderers, war criminals, and terrorists - thus making Swedes potential victims of murder, rape, and other violence." [2] (my translation). She has the right to express those opinions, but I think that "critical", in this case, may be an understatement and that she may deserve another label.

[1]: [http://www.svd.se/expressen-rojer-anonym- bloggare](http://www.svd.se/expressen-rojer-anonym-bloggare) (Swedish)

[2]: [http://www.expressen.se/kultur/hon-ar-julia- caesar/](http://www.expressen.se/kultur/hon-ar-julia-caesar/) (Swedish)

<comment><USER4> Biggest indicator of their lie would be that she put out their phone numbers. Their phone numbers were already public and usually posted when they wanted to be contacted. In fact, not just once, but several times.

Lets not kid ourselves here that that she wasn't being silenced with a hit- job. The things they did against her would have been harassment against any other person.

She's also somewhat right. Sweden let the gas-maker for Saddam stay [0], has yet to prosecute any of the returning ISIS rapists. Not to mention lied about the numbers. SÄPO said 100, but hospital records claims of over 300 - some has gone back again after som R&R.[1]

She's right to be angry at the decision makers. I don't care about her opinion itself, but she's not wrong in terms of Sweden letting murderers, war criminals and terrorists come back.

Last week it turns out someone responsible for Rwanda has been living in Sweden for 13 years without any issues.[2] He got prosecuted because they won't piss off any voters by doing so.

I will personally never forgive Sweden and the people in charge betraying innocent lives abroad, for not pissing off certain groups of voting cattle here. [3]

I stand with Caesar even though I don't agree with her as much as you'd like to think. You have to agree she was being silenced by the 'elite'.

[0]: [http://www.expressen.se/nyheter/jag-jobbade-at- saddam/](http://www.expressen.se/nyheter/jag-jobbade-at-saddam/) (Swedish)

[1]: [http://www.svt.se/nyheter/regionalt/vast/hundratals- svenskar...](http://www.svt.se/nyheter/regionalt/vast/hundratals-svenskar-har- skadats-i-krig) (Swedish)

[2]: [http://www.expressen.se/nyheter/man-i-mellansverige- gripen-f...](http://www.expressen.se/nyheter/man-i-mellansverige-gripen-for- folkmord/) (Swedish)

[3]: [http://www.thelocal.se/20140702/green- mp](http://www.thelocal.se/20140702/green-mp)

<comment><USER5> _I will personally never forgive Sweden and the people in charge betraying innocent lives abroad_

The people just as betrayed or more so by the people making these decisions are these people's fellow Swedish countrymen. What these governments and people pushing this agenda of what I assume they believe is big-heartedness or something, but with a willful blindness to the consequences have done is just ghastly and absurd.

There are frequent bombings in Malmö, often directed at Jews. The bombings appear to be spreading, just last month apparently, there was a blast in Billesholm in northern Skåne. [https://themuslimissue.wordpress.com/2015/08/01/sweden- musli...](https://themuslimissue.wordpress.com/2015/08/01/sweden-muslim-bomb- violence-spread-from-malmo-to-skane/) I'm fairly certain these things didn't occur say 30 years ago, much less frequently.

Then also in the past 30 years, Sweden has skyrocketed up the charts to lead the world in rape and school arson attacks.

Great job Swedish Government!

</comment></comment></comment></comment></comment></comment><comment><USER3> If the website itself wasn't cringeworthy enough, the '#svpol' crowd showed up in the HN comments to make damn sure no one could leave with even the slightest doubt that everyone in Sweden is a complete tool.

<comment><USER9> The discussion in these comments is embarrassing (and I'm not even Swedish).

Apparently the mere mention of Sweden was enough to make local politics spill over here. It's like watching a post about a weather app getting overrun by climate change denialists.

<comment><USER10> It's because the local politics are rather intense in Sweden right now. The whole country is rather emotional at the moment, has been for the last couple of days.

For a while now the racist parts of the population has been rather outspoken. I guess feeling that their opinions has finally been legitimized with a far- right party winning seats in parliament and all that.

At the same time the rest of the population has been rather quiet. I guess not knowing exactly what to make of it. No one seems to have been prepared for it. After all, the official, and somewhat internalized, image of Swedish culture and identity has been that those opinions had no place in civilized society, and thus shouldn't be dignified with actual response.

The last few days, the refugee situation seems to have been a rallying point around taking back this identity. Resulting in a few days with more then usual activity of emotional manifestations.

That said, I was rather surprised to have to witness this on HN and must say I feel rather ashamed my self.

On behalf of Sweden: I'm sorry you had to witness that.

Edit: Down vote? Guess I should expect that for letting my own opinions on the matter shine through. But really, I was just trying to provide some context for interpreting the other posts in this thread.

</comment></comment></comment><comment><USER11> Sweden Yes

</comment><comment><USER12> Get the head of the Swedish bar association to talk about Assange's case. Until then, I'm not reading.

(Reply to below: It is precisely the fact that the head of the bar association is prepared to speak openly about the abuse of process that I requested her. Until Sweden comes to terms with its totalitarian changes, of which the Assange abuses are but one, it wins no time or empathy from me.)

(Reply to second: If you consider the outright illegality and abuse of process that has been used against Assange 'a pop issue', your worldview is twisted. As for 'another issue', I hardly think twitter flourishes earn the title, which traditionally implies some ounce of gravity.)

<comment><USER13> I think you might be overestimating the clout and importance of the head of the Swedish bar association. Why is this such a dealbreaker to you?

In any case, she has actually made some comments regarding the case. Primarily in Swedish media, but a quick search yielded a few articles such as this one: [http://www.theguardian.com/media/2015/feb/25/julian- assange-...](http://www.theguardian.com/media/2015/feb/25/julian-assange- appeals-sweden-supreme-court-arrest-warrant)

> Swedish legal opinion at a senior level has swung against the prosecutor's > decision not to travel to London to interview Assange, with Anne Ramberg, > head of the Bar Association, calling the current impasse a "circus".

> "It would of course after such a long time be sensible for the prosecutor to > determine whether to prosecute," she said. "The Assange story has become a > less than flattering adventure not only for the English courts' handling of > the case, but also for the Swedish prosecutor."</comment></comment>


Amazon launches a dedicated shop for items featured on Product Hunt - <AUTHOR> https://techcrunch.com/2016/08/17/amazon-launches-a-dedicated-shop-for-items-featured-on-product-hunt/ <comment><USER2> Didnt product hunt close down due to legal problems? Or am I thinking of something else.</comment>


SeaHash: A fast, portable hash function in Rust - <AUTHOR> https://docs.rs/seahash/2.0.0/seahash/ <comment><USER2> Looks like a pretty straightforward 64-bit block hash unrolled 4 times. I'd prefer a bit more assymetry in the diffuse() method, but since it passes SMHasher it's probably OK.

I wonder how the Rust version compares with plain-jane C.

-Austin (murmurhash guy).

<comment><USER2> Actually, just noticed a minor issue - since there's no intermixing between the four lanes and the diffuse() function is the same for all of them, if any of the IVs match then I can swap all the blocks in those lanes and get the same hash out.

For example, if IV1 and IV2 match and the block pattern is ABCDABCDABCD, then BACDBACDBACD will produce the same hash value.

A minor finalizer change would fix it for any IV (pseudocode as I don't actually know Rust) -

vec[0] ^= diffuse(vec[1]); vec[1] ^= diffuse(vec[0]); vec[2] ^= diffuse(vec[3]); vec[3] ^= diffuse(vec[2]);

u64 result = diffuse(vec[1] ^ diffuse(vec[3]));

that's probably overkill but should work.

<comment><USER3> I'm not a "hash guy" by any means - what impact would that have on its performance?

<comment><USER4> None for large strings and you'd have to benchmark small strings.

</comment></comment></comment></comment><comment><USER5> This is is not a knock against SeaHash, but I was looking at buffer.rs [0] and noticed pretty much all the code is wrapped in unsafe {} blocks. How much advantage is there to rust implementation vs c++ if unsafe is used so liberally? I ask this in ernest.

[0] [https://docs.rs/crate/seahash/2.0.0/source/src/buffer.rs](https://docs.rs/crate/seahash/2.0.0/source/src/buffer.rs)

<comment><USER6> This code is C code written as unsafe Rust:

        let mut ptr = buf.as_ptr();
        let end_ptr = buf.as_ptr().offset(buf.len() as isize & !0x1F) as usize;
        while end_ptr > ptr as usize {
            a = a ^ read_u64(ptr);
            ptr = ptr.offset(8);
            b = b ^ read_u64(ptr);
            ptr = ptr.offset(8);
            c = c ^ read_u64(ptr);
            ptr = ptr.offset(8);
            d = d ^ read_u64(ptr);
            ptr = ptr.offset(8);

            ....
            match excessive {
                0 => {},
                1...7 => {
                    a = a ^ read_int(slice::from_raw_parts(ptr as *const u8, excessive));
                    a = diffuse(a);
                },
                8 => {
                    a = a ^ read_u64(ptr);
                    a = diffuse(a);
                },
                9...15 => {
                    a = a ^ read_u64(ptr);
                    ptr = ptr.offset(8);
                    excessive = excessive - 8;
            ....

This bothers me about Rust. There's too much "unsafe" code in libraries. The language is unable to express some essential concepts. Known areas of trouble include partial initialization of an array, needed to implement growable collections, and single ownership doubly linked lists. Neither of those is expressible within Rust, which leads to unsafe code to implement them. Here, though, it's purely a performance issue. That's disturbing. If you can't do fast big-banging in safe Rust, there's a problem somewhere.

If Rust let you access a slice of bytes as an slice of ints, alignment and length permitting, the code above could be much more straightforward. That's what I mean about expressive power. The hack to do that used here:

        let end_ptr = buf.as_ptr().offset(buf.len() as isize & !0x1F) as usize;

is iffy. Why is there an "isize" (a signed quantity) in there? They want to align with a 32-bit cache line, yes, but why the signed quantity? The documentation for Rust's "std::ops::BitAnd" doesn't say what the semantics are for signed numbers. What would happen on a 32-bit machine if someone allocated a buffer bigger than 2GB? Exploitable?

<comment><USER7> > There's too much "unsafe" code in libraries.

Which libraries? I see very few that do this, and all of them are safe abstractions containing some unsafe code.

You keep repeating this claim but I haven't seen any evidence to back it up.

> If Rust let you access a slice of bytes as an slice of ints, alignment and > length permitting, the code above could be much more straightforward. That's > what I mean about expressive power. The hack to do that used here:

The byteorder crate lets you do this. Of course, it uses unsafe code, but that's safely encapsulated away (and easy to verify). This crate doesn't use it, but it could. Not every operation needs to be baked into the language semantics.

<comment><USER8> While I mostly agree with you, I'd like to play devil's advocate:

The Rust core team is relatively relaxed about the community's usage of `unsafe`. I say this because they do not seem to be interested in actively discouraging it's usage. i.e. `unsafe` is discouraged in documentation, not via tools.

"Hey please don't use `unsafe` unless you know what you're doing". Is like writing a comment in Javascript, `function(x /* int */) {`.

Ideally, the usage of `unsafe` should be discouraged by the compiler via friction. The compiler should, at the least, spit out some metrics after a compile cycle about the percentage of `unsafe` lines/instructions. Even more ideal, when the compiler detects an `unsafe` it would pause and ask, "Is Crate Z trusted [y/N]?". Cargo can then make this easy in Cargo.toml.

All of a sudden Crate writers need to think twice about their usage of `unsafe`, will users be willing to trust my code? is using `unsafe` here really worth the risk of adopting fewer users? is there already a library that solves this which is generally trusted?

<comment><USER7> Nobody is putting effort into propaganda about unsafe because the community is already very strongly averse to this, and is careful about writing unsafe code. It's not a problem. If it becomes a problem (I doubt it) we can put effort into it. People learn about the language through discussion or documentation, and both of these venues actively discourage unsafe. The one resource out there that teaches unsafe code in depth (the Rustonomicon) is very heavy on warning the reader about unsafe code pitfalls and in general discouraging the reader from writing unsafe code.

A tool for tracking unsafe dependencies has been talked about before, though. Sounds like a good idea to me. Like I said I don't think there's a particular need for it, but it would be nice to have.

<comment><USER9> Have you ever been bitten by unsafe code?

IMHO any metrics would be gamed and prioritized above actually quality. As actual quality isn't suffering, why add the unsafe metric in at all? Seems like paranoia not born out of experience.

<comment><USER7> > Have you ever been bitten by unsafe code?

Yeah. Most often in FFI code (when the invariants are much harder to uphold). Rarely when writing unsafe abstractions. The few times I remember this happening with abstractions is due to really old code that broke in a compiler upgrade (pre-1.0).

> IMHO any metrics would be gamed and prioritized above actually quality.

Yeah, there have been discussions in the past about a "safe code" badge for crates and stuff like this, and the conclusion is that it might discourage people from using unsafe code where they actually should be.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> I was trying to figure out how this is so much faster than FNV [https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo...](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1_hash) Is it only because of the parallelism? Or are the operations really that much cheaper somehow?

<comment><USER11> Both.

The pseudocode for FNV looks like this:

       hash = FNV_offset_value
       for each byte_of_data to be hashed
       {
            hash = hash XOR byte_of_data
            hash = hash × FNV_prime
       }
       return hash

The pseudocode for seahash looks like this (with '×' as the wrapping multplier operator, and some simplification for padding if the data length in bytes is not a multiple of 8 bytes per word × 4 words in the hash state):

        hash = {offset_1, offset_2, offset_3, offset_4}

        for (int data_index = 0;
                 data_index < data.length_in_64_bit_words;
                 data_index = data_index + 4_words_in_hash)
        {
            for (int hash_index = 0; hash_index < 4; hash_index++)
            {
                // Mix in data
                hash[hash_index] = hash[hash_index] XOR data[data_index + hash_index]
                // Diffuse
                hash[hash_index] = hash[hash_index] XOR (hash[hash_index] RSHIFT 32)
                hash[hash_index] = hash[hash_index] × seahash_prime
                hash[hash_index] = hash[hash_index] XOR (hash[hash_index] RSHIFT 32)
                hash[hash_index] = hash[hash_index] × seahash_prime
                hash[hash_index] = hash[hash_index] XOR (hash[hash_index] RSHIFT 32)
            }
        }

        result = hash[0] XOR hash[1] XOR hash[2] XOR hash[3] XOR data.length_in_bytes

        result = result XOR (result RSHIFT 32)
        result = result × seahash_prime
        result = result XOR (result RSHIFT 32)
        result = result × seahash_prime
        result = result XOR (result RSHIFT 32)

        return result

FNV is operating on bytes of data, while seahash is operating on 64-bit words. A modern processor will be able to handle 64 bits at once. True, it can probably handle 8 bits independently in one instruction without having to create a temporary value, but it still needs to do more operations.

FNV is completely sequential. Until the first byte is hashed, no work can be done on the second byte. In seahash, as you observed, parallelism can be exploited. The second, third, and fourth bytes are all completely independent of the first byte, as bytes 6, 7, and 8 are independent of byte 5, and so on. You can have four independent threads each do a quarter of the work, and then put the result back together at the end.

<comment> irq-1 Hardware threads, just to clarify.

> SeaHash achieves the performance by heavily exploiting Instruction-Level > Parallelism.

> This means that almost always the CPU will be able to run the instructions > in parallel.

<comment><USER12> Execution units, to be precise. Separate threads of execution are not involved, hardware or software.

</comment></comment></comment></comment><comment><USER13> How does it perform on short strings (e.g. <= 16 bytes)? We've seen several new hash functions lately with great throughput numbers, but unfortunately they often end up being slower than FNV when used e.g. on keys in hash maps, which are often short strings.

</comment><comment><USER14> I was unsure how to read the diffusion function's description, so I went to the source.

The first line, "x ← x ≫ 32", might have a typo? It's actually assigning (x XOR (x >> 32)).

With "x ← px", p is a fixed prime number being multiplied by x.

</comment><comment><USER15> Great to see another piece of code written in Rust. That said, how do you make claims of something being blazingly fast without any comparisons to implementations in other languages such as C or C++?

<comment><USER16> The claim is that it is a blazingly fast hash function _compared with other hash functions_ , and it is also written in Rust. Rust is an enabling technology, but not able to be dramatically faster than a comparable C/C++ implementation, as a general rule.

<comment><USER15> The title is confusing. If it tries to compete with other hash functions, why does the title have to bear "in Rust"?

<comment><AUTHOR> Because it's probably the most notable/unusual part of this hash function. Virtually all other hash functions for at least a decade have had their reference implementations written in C or C++.

</comment></comment></comment></comment><comment><USER17> Very cool!

BTW, the hyperlink for "reference" in the "Specification" section is broken.

</comment><comment><USER18> Great. But keep in mind that this is not a keyed hash function.

<comment><AUTHOR> You can use it as a keyed hash function by adjusting the IV. See: [https://docs.rs/seahash/2.0.0/src/seahash/.cargo/registry/sr...](https://docs.rs/seahash/2.0.0/src/seahash/.cargo/registry/src/github.com-1ecc6299db9ec823/seahash-2.0.0/src/reference.rs.html#94)

<comment><USER19> It seems to already be implemented in [https://docs.rs/seahash/2.1.1/src/seahash/.cargo/registry/sr...](https://docs.rs/seahash/2.1.1/src/seahash/.cargo/registry/src/github.com-1ecc6299db9ec823/seahash-2.1.1/src/buffer.rs.html#102)

But it only seeds one of the lanes, so you can still make collisions trivially in one of the other lanes. I guess it could still be useful for namespacing.

</comment></comment></comment><comment><USER20> What's the matter with this stupid word "blazingly" in the Rust community?</comment>