HNHacker News
TopNewBestAskShowJobs

cohomologo

117 karma · joined August 11, 2014

submissionscomments
cohomologo··on An integer formula for Fibonacci numbers
He says that this is an inefficient way to generate the nth Fibonacci number, but since it actually gives you the first n Fibonacci numbers, thats not the fairest comparison. (Especially since the fastest methods for finding the nth Fibonacci number don't generate all the intermediates.) Just for curiosity sake, how does using this formula to generate all of the first n Fibonacci numbers compare to other ways of doing that?

(You get all n with the same formula by replacing the mod 2^(n+1) (or reading the last n+1 bits) by splitting the whole integer that is generated into n+1 bit chunks.

cohomologo··on LLVM based Just-in-Time-Compiler for C++
How about the %save magic for ipython?

For example "%save mycode.py 1-10" saves the code input on lines 1 through 10 of the session to the file "mycode.py".

cohomologo··on U.S. Moves to Thwart Use of Foreign Acquisitions to Dodge Taxes
Foreign taxes are effectively a business expense for corporations in the US, since the foreign tax credit allows them to not pay taxes on the taxes paid to foreign countries.

I think this makes sense. If I live in the US and make some product and sell it in Germany, then whatever profit I bring home from Germany (less German taxes) is still an income that was effectively earned in the US, since I am living and working here. The business transactions occurred in Germany, but the income was 'earned' by my labor in the US.

From this point of view, a territorial tax system is a subsidy designed to make goods more competitive in foreign markets. (Since I don't have to pay taxes on foreign profits, I can lower the price I charge overseas.)

cohomologo··on Asana
The very first version of Asana I encountered was pretty intuitive, and the UI made it easy to just glide through editing my tasklist.

I stopped using it for something else, and when I came back a couple years later it was the opposite - kind of clunky, had to poke around a lot to try to do something.

I don't know what happened, but I'd love to have that first version back.

cohomologo··on Canvas: Notes for teams of nerds
Whenever I see some new markdown thing, the first thing I do is check to see if math is supported, since most of my writing/collaboration uses math. Even my personal todo list needs math from time to time.

I think its pretty easy to add math support by adding MathJax to your HTML template (e.g. as used in the markdown implementations of StackExchange, Jupyter Notebook, Quiver and such.)

cohomologo··on Reasons to consider a cartogram
The best I've seen is from the NPR article at http://www.npr.org/sections/itsallpolitics/2012/11/01/163632... .

One of these cartograms is a electoral vote cartogram of the US 2008 presidential election. Unlike the above examples, it uses a continuous color spectrum from red to blue (going through purple at 50/50) to represent the popular vote - which does a much better job of conveying voter proportions than the standard color every state red or blue. On the other hand, the map is geographically coarse grained on the state level - every state is shown in one averaged color. I have yet to find one that has both continuous color spectrum and is continous (ish) in space.

cohomologo··on Static, Ahead of Time Compiled Julia
Mathematica is actually 0-based - but with the zero index spot reserved. A list {1, 2, 3}=List[1, 2, 3] could be read as (List 1 2 3) in Lisp style; one can check if you have Mathematica that {1, 2, 3}[[0]] = List.

But I think that's neither here nor there. Whenever the index has more use than as a label, mathematics starts at zero. Modular arithmetic, polynomials, discrete fourier transformations - for that matter, any discrete approximation of continuous math - all naturally start at zero, and generate lots of -1s in one-based indexing.

cohomologo··on Quiver: Programmer's Notebook for OS X
The author made a ShowHN post (https://news.ycombinator.com/item?id=8683597) about this previously, where they commented (https://news.ycombinator.com/item?id=8684082) that he had no plans for a Windows or Linux port - but they wouldn't mind if someone else used the same design and format to do so.

There seems to be a lot of similar interest, so maybe someone with the right skills could start a community developed open source linux and/or windows port.

cohomologo··on Show HN: Pythonpy – the swiss army knife of the command line
I attempted to install on Windows - it doesn't work due to the lack of os.geteuid(), which is called in the setup.py file to check for root. With a little bit of finagling I could get around that and make it install, but not work due to undefined SIGPIPE in the signal module. It makes sense that this could be UNIX only, but that wasn't stated anywhere on the webpage. Perhaps that should be mentioned somewhere.
← PreviousPage 2 of 2