The Backbone of the Internet of Things - <AUTHOR> https://backchannel.com/the-surprising-backbone-of-the-internet-of-things-4330301084b0#.e6hixwq0b <comment><USER2> This is something that comes up once in a while as a technoutopian future where our spectrum is free and there is fiber to every blade of grass on the planet. There are way bigger problems than the access and ownership things mentioned here. The frequencies used by 4G and 5G will not benefit from the low heights of telephone poles...radios don't work the way this person think they work. We need spectrum reform and wideband radios before we even think about something like lightpole-based Internets.

<comment><USER3> Actually, the problem is not the height of the poles, because those cellular base stations will become progressively cheaper over time, so you can simply do more deployments. I may be missing something...what kind of spectrum reform are you referring to specifically?

</comment></comment><comment><USER4> It's been done. Ricochet had street-light based nodes in the mid-1990s.[1] I used to have a transceiver for that service. Speed was about 30Kb/s, which is why the service went out of business by 2001. One of the neat, but not too useful, features was that you could make connections to peers on the same set of street light nodes without going through the headend.

Street light WiFi nodes are deployed in some areas.

Most useful IoT things need very minimal bandwidth, which they can get over 2-way pager networks or cellular modems. Thousands of commercial refrigerators, HVAC systems, sewerage lift pumps, and other boring but important items of infrastructure phone home that way right now. But there's not enough bandwidth for the "always listening and watching" boxes that have become popular.

[1] [https://en.wikipedia.org/wiki/Ricochet_(Internet_service)](https://en.wikipedia.org/wiki/Ricochet_\(Internet_service\))

<comment><USER5> Wow, blast from the past.

I had one of those too. It was useful for its time.

</comment></comment><comment><USER3> So what she's saying in this article is that the physical poles on which street lights reside represent what will soon become valuable real estate.

She's probably right. But what I worry about regarding street lighting and anything municipal-IoT related, at least in America, is that a lot of IoT business models seem to be along the lines of, "we're not selling you an LED light, we're selling you a monthly lighting plan! It's a whole new paradigm!"

That may work for the corporate world, where timeframes tend to go in quarterly, yearly or three-year cycles, but in the municipal world, timeframes for equipment could be up to, perhaps 50 years or more. The sentiment in this scenario would be, "we need that manhole cover to continue to work."

If you have smart LED lighting (which was not discussed in this article), in a municipality, being sold on a monthly plan, and then the city has a down year, or a Detroit-style downturn or whatever, and the city tries to negotiate with the LED lighting company providing that service, that LED lighting service company can threaten to, "turn off the lights," which would lead to all sorts of bad press for the city workers, who ultimately are just trying to live safe, protected lives working in guaranteed government jobs.

So I guess my contribution to this discussion is - I speculate or worry that companies may try to barter for that real estate by offering highly discounted smart lighting systems, because, "hey, we're already there...we might as well help you control the light, and provide you a huge discount!" For cities who don't have smart CIOs and CFOs who understand this stuff, they are going to end up getting screwed.

Mind you, my perspective is totally American...could be different in other countries depending upon how these government functions are organized.

<comment><USER6> This is definitely off-topic to the linked article, but to your point re: selling an LED vs a lighting plan: I think this is largely a failure on the part of companies to transition to a service-based model in light of decreasing emphasis on consumerism and the greater importance of sustainability.

More explicitly (and with fewer buzzwords), since WWII the USA has been pushing consumption as a cultural value to fuel the economy. Everything has been treated as "this equipment is disposable, with a service life of X". Arguably, goods producers still use the same process during design (since it provides a good optimization constraint), but the service life of consumables has been increasing. The LED vs incandescent transition is a perfect example, because you've gone from a consumable with a service life that is dependably short enough for the bulb producer to rely upon repeat sales, to an equivalent consumable with a service life that is so long that the bulb producer can't keep its own business running sustainably. As far as I can tell, consumer-side economic pressures have encouraged this trend for pretty much every market in existence, though each individual market may have a starkly different rate of change (the medical consumables market being perhaps the slowest, at least that comes to my mind).

When you're faced with that transition, as a company your best hope for survival is to transition to a service-based economy. In the mobile phone market (and to a degree, in the computer market), the service being sold has, essentially, been innovation itself: "we'll release a new phone every so often, and in exchange for your yearly contribution to our coffers, we'll make sure it's an improvement over your last model". But I think the phone market also offers cautionary advice: this strategy saturates once consumers realize they've hit the point of diminishing returns. Furthermore, efforts to do something equivalent with LED bulbs are rightly met with skepticism, because those diminishing returns are immediately and clearly evident. So even that is clearly not a sustainable solution in the long term.

So where do you go from there? Market contraction? As a company, that means you're playing roulette. You're going to try and find some other offerable service to maximize your odds of survival. But at the end of the day, I think it's that discord between consumer interests and supply-side economics that have created this brave new world of LED lighting plans and iPhones on demand. Call it what you will -- perhaps another indication of the upcoming technological unemployment crisis -- but given the degree to which we're developing these kinds of long-service-life consumables, I think the trend is only going to get stronger.

<comment><USER3> I agree with you that there is a trend of, "the service being sold has, essentially, been innovation itself," but respectfully, I don't agree with your characterization of the driver behind that trend. Widely held, "common sense," a term which I loathe to use, is that the service life of consumables has been decreasing, not increasing. There's the whole anecdote of how things like vacuum cleaners in the 50's would, "last forever," because the belt they used was thick, whereas as manufacturing techniques became more sophisticated, they figured out how to optimize the thickness of that belt so that it would break exactly after the warranty wore out.

Not to disagree with you for the sake of online argument, but I believe the driving forces behind, "innovation is the product," include, 1) Greater ubiquity of manufacturing knowledge, which is arguably a function of time vs. improved information transfer technologies, and 2) Increased ubiquity of digital services, which is also a function of time vs. improved information transfer technologies.

So basically, throughout the 20th Century, Bille Bob gets a hold of some files which show him how to manufacture vacuum belts, and so he opens up a vacuum belt plant down in Alabama. Then Jackie Wu over in Hong Kong gets a hold of a similar plan about 10 years later, and opens up a factory in Shenzhen, and then the same happens in Vietnam, and so on. So now what you have is basically a global economy of vacuum belts, which are basically a complete commodity - all because successive information-lacking regions gained more access to more information over time. So now we're at that, "paradigm shift," where Billie Bob is realizing that he's competing against the entire world, so he either needs to leverage nepotism (a short term strategy), protectionism (e.g. vote for Trump) or a third, innovative strategy, which may include the best value vacuum belts...kind of hard to build value...or turn those vacuum belts into a service, because building a service brand is not a function of intellectual property protection, and he can continue to hold a competitive advantage with a service business, indefinitely, as long as he can maintain that level of service. That's why we're going to see vacuums coming out with sensors that tell you when the belt goes out and automatically sends you a new one via Amazon or whatever - it's a huge competitive advantage over Jackie Wu back in Hong Kong.

Where do you go from there? Well, using a 1980s mentality, you start going into other markets, you use your vacuum belt platform software that you built and you gobble up other, weaker companies in Alabama who can't figure it out. Or, using a late 1990s mentality, you create vacuum belt derivatives of some sort, and sell that data to rubber hedge fund managers to show how often vacuum belts are going out of service, so they can forecast and create short / long positions on commodity markets. Or you create a community forum on vacuums and talk directly to the consumer, reaching around the vacuum manufacturer, etc. There are tons of different ideas and it is only limited to your imagination. We are not necessarily living in a world of inevitable, "technological unemployment crisis."

</comment></comment></comment><comment><USER7> If I've sifted through the hyperbolic language correctly... I still don't see how this relates to IoT products at all. Can anyone explain the connection to me?

<comment><USER8> Key paragraphs:

> Here's why poles are generally important: for the advanced wireless > transmissions (whatever 5G turns out to be) that will be central to our > shared digital future, you need access to fiber optic cables at frequent > geographic intervals. That fiber, in turn, needs to be "dark" — meaning that > it's unlit by lasers and is just a passive transmission medium that can be > traversed by a tsunami of 5G data. And access to that dark fiber needs to be > available at a reasonable price.

> [...] With streetlights and signal poles, a city stands a chance of pushing > along a competitive and innovative world of Internet of Things and sensors > and data transmission, as long as it acts decisively to open those street > lights and signal poles on a standard technical basis — again, like an > electrical outlet.

The street lights will transmit 5G data so that IoT devices that rely on cellular networks (vs WiFi) can remain connected anywhere and for free or for cheap.

<comment><USER9> She's confused about what 'dark fiber' is. Dark fiber is fiber that's be laid/strung, but currently doesn't have lasers connected at the ends. That is, someone speculatively ran the fiber but currently isn't using it. Dark fiber is useless until it's lit with (somewhat) expensive transceivers.</comment></comment></comment>


MN approves $50m tax credit for early stage investment in high tech startups - <AUTHOR> http://tech.mn/news/2010/03/29/minnesota-legislature-passes-historic-angel-tax-credit/

<comment><USER2> I'm surprised I haven't heard of any seed accelerator programs in the Twin Cities yet. It's a great area to live in, and MN has some of the sanest governance to be found in the U.S.

<comment><AUTHOR> There are a few things going on here; I just submitted another story about a very micro seed capital program (minnespark) that was just launched by part of the local tech community: <http://news.ycombinator.com/item?id=1230144>

There's also the Minnesota Cup; I haven't heard many success stories emerging from it, but I haven't looked into it very hard, either: <http://breakthroughideas.org/>

There's a great tech community in & around the Twin Cities, and definitely more and more interest and activity toward building a startup culture in this area. Cool stuff is going on.

<comment><USER3> It helps that we now boast three YC companies: SocialBrowse, FanChatter and Zencoder.

</comment></comment></comment><comment><USER4> Great if you want to freeze your arse off. When I was there it was 30 below. But still, the people are nice.

<comment><USER5> In a weird twist, today it was 70 degree Fahrenheit in the Twin Cities.

</comment></comment><comment><USER6> Great, now if Duluth gets picked for the Google Fiber trial (which so many people here are rooting for!) we'll be all set!

</comment><comment><USER7> Great!</comment>


Hyped Cine Guide Movie App with React Native and Expo - <AUTHOR> https://github.com/murillo94/cine-the-guide-movie <comment><AUTHOR> One year ago I decided to build a guide movie app with RN and Expo just to learn more about theses technologies, the result was awesome. Everything was easy to install and run with Expo (fantastic tooling). After that some time passed and I do not touched in the project anymore until 3 weeks ago that i decided refactored the app and the results was great again, expo and RN are improving constantly, each release better and better with tooling, perfomance and code. It was a great choice to learn more about theses technologies.

Ask me anything that I will try to help you :)

If you want learn more about and see the code, check the repo:

[https://github.com/murillo94/cine-the-guide- movie](https://github.com/murillo94/cine-the-guide-movie)</comment>


DuckDuckGo adds date filters to Web search - <AUTHOR> https://plus.google.com/104092656004159577193/posts/YWbgm4zxrjs <comment><AUTHOR> Submitter here. This appears new. I find no mention on DDG's blog or subreddit. Nor does it appear in search results --- using filter-by-date on both DDG and Google ;-)

Values are "Today", "This Week", and "This Month" only. More options and flexiblity as well as exclusions would be useful but this is a big step and good start.

</comment><comment><AUTHOR> Updating: the capability apparently came with the switch to Yahoo search, though it wasn't rolled out immediately.

(I'm still not sure when it went live.)

There's an announcement of the Yahoo search switch, undated, on the DDG blog.</comment>


ZIRX Drops Its Consumer Valet Service To Focus On The Enterprise - <AUTHOR> http://techcrunch.com/2016/02/05/zirx-is-shutting-down-its-consumer-valet-service-to-focus-on-its-enterprise-business/ <comment><USER2> It is a sensible thing to do. Company clients are profitable, but B2C bussiness is very tough.</comment>


Modern-day 'Yellow Peril' of Google's Chinese links is just the same old racism - <AUTHOR> https://www.theguardian.com/world/2019/jul/17/google-peter-thiel-yellow-peril-racism-tech <comment><USER2> More fascist propaganda from the far right extremists in power in the USA. The situation has nothing to do with treason nor goes much beyond racist demands to "go back to Asia where you belong."</comment>


Functional programming in C++ (2012) - <AUTHOR> http://www.gamasutra.com/view/news/169296/Indepth_Functional_programming_in_C.php <comment> W-Stool This guy helped invent the FPS genre and all the technology it took to make it, back in the MSDOS days - which is pretty incredible if you knew what he had to work with in terms of CPU and memory back in those days. Like Dave Cutler, never a guy to toot his own horn much either. Well done John, thank you for all your contributions to the tech and the craft.

<comment><USER2> > This guy helped invent the FPS genre

I find it curious, but perhaps inevitable, that someone like John Carmack requires this introduction. If you played videogames in the 90s / early 00s or were at all interested in 3D programming, it was impossible not to have heard of him. He was (is?) probably one of the cleverest programmers of his time.

This article of his gets reposted time and time again to HN, which makes sense because it's very interesting. This is the first time I've noticed people not knowing who the author was.

I wonder if a few decades from now, tech-minded people will wonder who Linus Torvalds, Brian Kernighan or Dennis Ritchie were. I suppose they will!

<comment><USER3> I don't think it's uncommon for people to learn from the top down and after some time and a bit if passion find themselves digging into the roots of it.

It came across as a tad condescending although I can easily believe it wasn't meant that way and you are just open mindedly sharing perspective as is the point of all this.

I reply not to just make that comment but actually to recommend a book (that many may have possibly already read) which gives a rich history well worth it.

[https://www.amazon.com/Hackers-Computer-Revolution-Steven- Le...](https://www.amazon.com/Hackers-Computer-Revolution-Steven- Levy/dp/1449388396)

They dive into East and West coast history as well as the influences of gaming which I think ties to this threads closest.

Its long, engaging, and the audiobook is just a kick.

If you are on that cusp of wanting to learn a bit more of where we come from with an Americana feel, they have done a fantastic job here.

</comment></comment></comment><comment><USER4> Quote > The factors that allow programs in functional languages to sometimes be more concise than imperative implementations are pretty much orthogonal to the use of pure functions — garbage collection, powerful built-in types, pattern matching, list comprehensions, function composition, various bits of syntactic sugar, etc. For the most part, these size reducers don't have much to do with being functional, and can also be found in some imperative languages.

—

Amen. I think people new to functional programming are thrown by this, and I think some long time adherents of functional programming have adopted these "factors" as part of the definition.

Definitions change, that's fine, but the confusion of ideas isn't good.

Anyway, are there functional data structures widely available to c++? I assume there are. Without them, functional programming has a heavy cost.

Clojure, for one, would not be very attractive without having adopted Bagwell's data structure concepts.

<comment><USER5> The challenge then, as with essentially every language that doesn't use persistent data structures _as the default_, is having to recursively convert to and from those persistent data structures at the edges of your system where you need to interact with third party libraries that likely won't be consuming/producing those data structures natively.

Unfortunately this is where the value proposition of a non-standard data structure library usually breaks down for general usage. That recursive translation layer sitting at the edge of your system is generally enough to completely blow up your performance budget and many times leave you worse off than if you had just used the default mutable data structures and made naive shallow copies everywhere in the first place.

The best case study for this is JavaScript, which by now has a fairly substantial following of functional programmers, and has an excellent persistent data structures library in ImmutableJS, but the vast majority of functional codebases in JS just end up doing shallow-copy-on-write using the default mutable data structures regardless, because of the difficulty of taking proper advantage of the performance benefits of persistent data structures in an ecosystem that overwhelmingly deals in mutable data structures. That said, the fact that C++ is not a garbage collected language and the associated developer ergonomics costs of having to manually clean up your own shallow copies might skew the value proposition a bit, but given that if you're writing in C++ you're probably in it for the raw performance in the first place, it's unlikely to be enough to tip the scales.

</comment></comment><comment><USER6> The key points he makes:

"My pragmatic summary: A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible.

"No matter what language you work in, programming in a functional style provides benefits. You should do it whenever it is convenient, and you should think hard about the decision when it isn't convenient."

</comment><comment><USER7> Excellent read, I still remember a lot of it. There is also the accompanying Quakecon presentation where John Carmack talks at length about all this: [https://www.youtube.com/watch?v=1PhArSujR_A](https://www.youtube.com/watch?v=1PhArSujR_A)

</comment><comment><USER8> Ivan Čukić wrote a book about this last year.

[https://www.manning.com/books/functional-programming-in-c- pl...](https://www.manning.com/books/functional-programming-in-c-plus-plus)

The book is well written and it has useful techniques for if you want to do mostly functional programming and want to stick to C++.

</comment><comment><USER9> Wow, I never saw this. I independently migrated to functional programming once exposed many years back and definitely couldn't imagine doing software any other way at this point, awesome to see my childhood hero endorse it though none the less.

</comment><comment><USER10> I saw this when it was originally written back in 2012. This article is amazing, and had a larger impact on me than anything else I've ever read about software engineering.

</comment><comment><USER11> One tiny baby step towards functional programming in C++ is to avoid assignment statements as much as possible and instead use const initialization:

         const type foo = value;

Assignment statements mutate state, whereas 'foo' above is an alias or cached value which can not mutate state. This is much like the 'let' keyword in Lisp or Swift. It is much easier for both the programmer and the compiler to reason about non-mutating expressions. Many compiler suites (e.g., LLVM) use static single assignment (SSA) for their intermediate form which opens the door for a lot of optimization. Anyway, it is a small thing and can act as a "canary in the mine" if you find you can not refactor your code into this form.

<comment><USER6> There are some corner-cases where immutable data still fails algorithmically... for example I do not know of a performant quicksort that is written in an immutable language (but please, someone correct me if I'm wrong!). It's so wrong, too, because the code for functional quicksort is so beautiful... here it is in Haskell

        quicksort [] = []
        quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
            where (lesser, greater) = partition (< p) xs

and here it is in Elixir

        defmodule QuickSort do
          def qsort([]), do: []
          def qsort([pivot | rest]) do
            { left, right } = Enum.partition(rest, fn(x) -> x < pivot end)
            qsort(left) ++ [pivot] ++ qsort(right)
          end
        end

<comment><USER12> You can write the imperative quicksort in haskell and wrap the mutation so it can't escape.

This forces you to copy of the incoming array but optimizations can remove intermediate copies. This is similar to r-values in c++, for instance

        quicksort (fromList [10, 9..1])

would only do one allocation with optimizations.

        freeze . quicksortMutable . copy . new . New.unstream $ Bundle.fromList [10,9..1]
        new . modify quicksortMutable . New.unstream $ Bundle.enumFromStepN 10 (-1) 10

Also, what you posted is tree sort not quick sort.

<comment><USER6> Isn't quicksort a type of tree sort? (having just googled both, but not finding said statement)

</comment></comment></comment></comment><comment><USER13> Out of interest:

Has anyone made anything non-trivial in an FP style in C++ ?

If so, what frameworks did you use? What would you recommend?

Have you tried easyLambda, or used it in production?

Also, is a dynamic data structure library you'd recommend for C++? Something that makes on the fly maps and things like that easy to implement?

</comment><comment><USER14> He advises to use more copy by value, fine, but C++ is not the right language to do that. It is even by far the worst language to that.

Better functional languages do have the optimizations needed to work in such a style, such as a generational GC, safe stack allocation, an optimizing compiler (for that problem, not C++ problems) and a proper type system. Good functional languages outperform C++ with OpenMP in performance, readability, maintainability and safety. And they explicitly disallow all the problems which do come with C++.

</comment><comment><USER15> I am by no means an expert, but I find this article to be very superficial, and not very useful for people new to this in terms of learning the core concepts. For instance there is no mention of the Interpreter, Visitor and Composite GoF design patterns, which are crucial to doing functional programming in OO languages. If you are curious about this, it is very well explained in some of the lectures (10, 11, 13, 14, 15) of the OCW MIT course "Elements of Software Construction" 2008 version [1].

For a much more in depth and accurate discussion of the trade offs between functional and OO programming, I recommend the book "Concepts, Techniques, Models of Computer Programming". For instance, this book explains the technique of Impedance Matching to deal with programs where different components have different degrees of what the article's author (very losely) calls "purity".

[1] [https://ocw.mit.edu/courses/electrical-engineering-and- compu...](https://ocw.mit.edu/courses/electrical-engineering-and-computer- science/6-005-elements-of-software-construction-fall-2008/lecture-notes/)

<comment><USER16> DoF design patterns is Java bollocks IMO.

It's only Java developers and to a lesser extent C# developers that really go nuts for this stuff. Visitor is clearly a framework for expressing multimethods - thus one can say Visitor is merely a workaround for the constriction of expressiveness of a given language - which is a claim made about many of the GoF patterns.

Singletons as a pattern? How is that different to global variables? It isn't.

<comment><USER15> Design patterns are just a convention; I would be as uncomfortable overusing them as jumping on the current pattern bashing fad.

The Interpreter pattern is just a technique for doing what amounts to pattern matching but in an OO language, the Visitor is its dual, and Composite is handy to represent arbitrary arity trees.

They allow you to represent algebraic types in an OO language, and I guess that they are design patterns because they can be applied systematically in any domain without having to reinvent the wheel, given that designing with them is driven by the information's structure only, just like in regular FP languages.

Abusing them is just as bad as abusing any other design technique, but when applied correctly they greatly improve program structure and maintainability.

Visitors have nothing to do with multimethods. Their purpose, in this context, is to improve maintainability when in a given functional program written in an OO language you would be more likely to add new functions rather than data type variants; Interpreter would be preferable when the opposite is the case.

Do you know of better ways of systematically doing FP design in C++? The article doesn't mention any.

<comment><USER17> The article isn't about design patterns, it is about using the new functional programming primitives which C++ relatively recently acquired through the standardization process.

Suggesting to use a syntax for lambda or currying or transferring closure parameters or making copies of data in order to avoid thread problems is not remotely within the same category as "visitor pattern".

<comment><USER15> > it is about using the new functional programming primitives which C++ > relatively recently acquired through the standardization process.

Sorry, I couldn't find any mention of such new primitives in the article. Which are they?

<comment><USER17> I understand `constexprs`, returning deep copies, `[]()()`s, std::bind, simd and OMP when he talks about purity, lambdas, currying and parallelization. What do you understand?

<comment><USER15> Thank you</comment></comment></comment></comment></comment></comment></comment>


Not Just Big Brother, but Lots of Little Brothers Too (2004) - <AUTHOR> http://www.j-bradford-delong.net/movable_type/2004_archives/000843.html <comment><AUTHOR> The big-data / surveillance thing ... has been going on for a while.

And scale (and costs) matter.</comment>


Transparent Logs for Skeptical Clients - <AUTHOR> https://research.swtch.com/tlog <comment><USER2> The hypercore[1] signed append-only log which is the heart of the Dat protocol[2] is an implementation of very similar ideas. The data structure consists of an append-only log, a Merkle tree (stored in the "inorder storage layout" described in Appendix B), and signatures for each of the root hashes of the Merkle tree. The public key ("read key") of the key pair which is used to sign the tree roots can be used as a unique identifier of the contents of the log, eg. for looking up peers in a DHT which can serve the contents. It features a replication protocol which is similar to the one described in the article (if you squint hard enough). A fantastic in-depth explainer of the data structure and the protocol is available at [3].

The current implementation is in Node.js, but a Rust port is under way. [4]

[1]: [https://github.com/mafintosh/hypercore](https://github.com/mafintosh/hypercore) [2]: [https://www.datprotocol.com/](https://www.datprotocol.com/) [3]: [https://datprotocol.github.io/how-dat- works/](https://datprotocol.github.io/how-dat-works/) [4]: [https://github.com/datrs/hypercore](https://github.com/datrs/hypercore)

<comment><USER3> I wish other protocols were described in "How Dat Works"-style. Very nicely done.

</comment></comment><comment><USER4> For fun, I tried to find a simpler formula for seq(0,K) in Appendix A, but I didn't check if it's computationally faster and I doubt it is. The formula I found was: seq(0,K) = 2(K+1) - Hamming(K+1) - ffs(K+1)

Explanation: When the newest hash is at position K (zero-indexed), there are K+1 level 0 hashes being stored.

The stored permanent hashes form a set of perfect binary trees. There is either 0 or 1 of each size of perfect tree. To determine if a tree of a given size exists when there are K+1 hashes, you can check the corresponding binary digit in K+1. For instance, if the eights place in K+1 is set, then there is a perfect tree with eight level 0 hashes.

Each perfect tree contains 2N - 1 hashes, where N is the number of level 0 hashes in it. To calculate the total number of permanent hashes, we can sum the totals for the individual trees. The sum of N for all of the trees is just the total number of level 0 hashes, K+1, so the 2N term becomes 2(K+1). The total number of trees is equal to the number of set bits in the binary representation of K+1, which is the hamming weight[1]. So -1 becomes -Hamming(K+1).

We now know that when the last record is at position K (zero-indexed), there are 2(K+1) - Hamming(K+1) permanent hashes stored.

Unfortunately, the last level 0 hash might not be at the end of the file, so we need to subtract the number of hashes that come after it. The number of hashes after it is the height (L, zero-indexed) of the smallest perfect tree, which is the position of the first set bit (one-indexed)[2] of K+1, less 1: ffs(K+1) - 1. We then subtract 1 to convert the number of records to the zero- indexed position. The -(-1) and -1 cancel out.

[1] [https://en.wikipedia.org/wiki/Hamming_weight#Efficient_imple...](https://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation) [2] [https://en.wikipedia.org/wiki/Find_first_set#CTZ](https://en.wikipedia.org/wiki/Find_first_set#CTZ)

</comment><comment><USER5> What are the applications for this?

</comment><comment><USER6> Literally just a usecase for a blockchain, reinvented..

<comment><USER7> It's a hashchain. They predate blockchains. I used them a long time as just signed, text files full of hashes. Trusted Timestamping used them. Blockchains were a highly-wasteful modification of hashchains for a different purpose. Databases, logs, and hashchains are still better for most things. Centralized services with decentralized checking of a signed log is still more efficient since centralized tech is itself more efficient.

<comment><USER8> I was hoping this would be more informative...

[https://en.wikipedia.org/wiki/Hash_chain#Hash_chain_vs._bloc...](https://en.wikipedia.org/wiki/Hash_chain#Hash_chain_vs._blockchain)

<comment><USER9> A blockchain is a modification of a hash chain to make it usable in cases where different transactions conflict with each other. In the case of TLS certificate transparency, Go packages, etc., a log entry "This object with this hash was published" does not conflict with a log entry "That object with that hash was published." You can append them to the chain in either order and it's fine. For a financial ledger, "This money was moved from A to B" conflicts with "This money was moved from A to C," and so one needs to be applied first so that the other can be rejected. If both transactions are signed it doesn't matter which one (for the correctness of the system, at least), but all users have to come to consensus about which of the two is accepted. Otherwise you have the "double-spend" problem.

Bitcoin's blockchain solves this problem with "proof-of-work," i.e., making it computationally difficult to add another entry to the hash chain. Because it's difficult, it's unlikely that both transactions will be accepted at the same time, which serves as a publicly-verifiable way to arbitrarily pick one. There is a small financial incentive for the network entity that successfully solved the computational problem, hopefully offsetting their expense in "mining" the "block." (As a further means of making sure only one is accepted, even if both are mined in quick succession, it's common practice in Bitcoin to wait for a few more blocks to be mined before B or C accept the transaction, which forces the network to accept one chain or the other.)

Satoshi's innovation was that proof-of-work can be used to allow arbitrary / anonymous entities to participate in this system without risking someone creating several thousand anonymous entities voting in their favor, or creating one view of the hash chain for B and another for C to convince them both to accept the transaction. (Satoshi's innovation was _not_ the append- only cryptographically-verifiable store; that's just a hash chain. It was securing updates to that store without a central trusted coordinator.)

There are other ways to arbitrarily pick one transaction or the other, e.g., using a distributed consensus algorithm and admitting participants based on "proof of stake." Or you can redefine the problem to allow double-spend to a limited extent and make A responsible for paying out both B and C - this is roughly Stellar's approach.

But if you don't have a double-spend problem (or if you have a central trusted coordinator), you just need a boring old hash chain, which can be implemented much more efficiently - and possibly expanded to a hash tree, as described in this article.</comment></comment></comment></comment>


Ask HN: Why no hardware virtualisation of a dual OS boot? - <AUTHOR> I need to use windows for work and like to dualboot into a gnu/linux for everything else.
Why do i have to reboot the machine to switch the operating system?
Software virtualisation is not an option.
Couldn't there be a bios level implementation of some real dualboot function, that assigns half of my cpu cores to each os, splits the available ram in half for each os, and then boots them both at the same time, so after that i can switch between them near instantaneously with a simple buttonpress, like i would be running 2 computers.
What's the big technical challenge here? Or is this just a fringe desire? <comment><USER2> Accessing all of the hardware simultaneously from both systems without conflicts would prove to be a big challenge (there is more than just CPU and RAM on a box). Effectively you'd have to implement a complex mechanism or resource sharing and a way to manage it. Such a thing already exists: it is called a hypervisor.

</comment><comment><USER3> Yes, your desire to not use virtualization is pretty fringe. Modern hypervisors easily achieve performance almost equivalent to bare-metal. And virtualization comes with numerous benefits making it outright preferable to bare-metal for many use cases.

I think you'd be perfectly happy using something like KVM if you have the right hardware and are willing to figure a few things out.

</comment><comment><USER4> Apart from the technical problems (who gets mouse or keyboard input? What prevents OS#1 from low-level formatting a drive that is mounted on OS#2? Etc): do you really want a setup where, if one OS and its applications uses a quarter of your RAM and CPUs, the other OS still is limited to half of both, with a quarter of it lying idle?

You need some kind of hypervisor to solve the hardware sharing problems. Why not use it for memory and CPU, too?

</comment><comment><USER5> This is totally possible and is very similar to how I have my desktop currently setup. Check out this subreddit[0] and this Arch wiki page [1] for a step by step tutorial.

The tricky thing is for optimal performance you have to give a guest OS exclusive access to a graphics card. This means you need two graphics cards, one for the host (or a Linux vm) and one for Windows. However, many CPUs have integrated graphics that can be controlled by Linux while a discrete graphics card can be given to the Windows guest. Additionally, you need to have some sort of KVM switch as two graphics cards means two (or more) display outputs, but there is another option[2].

In my case, my processor (Ryzen 2700X) does not have integrated graphics and I don't have a spare video card to dedicate to the host system. I solve this with the following setup:

Host (H) - Arch Linux installation running KVM hypervisor

Guest (A) - Primary Linux Install

Guest (B) - Windows Install

On boot I pass kernel arguments[3] to H to instruct it not to touch the graphics card. This gives me a completely headless boot and leaves my screen frozen on whatever the bootloader last had displayed. Once H boots up, it autostarts a VM for A, with the GPU passed in as well as the sound card and a USB controller. From A I can use my Linux install as normal. The interesting part is when I want to switch to Windows, I can ssh into H and kick off a script[4] that will tell A to suspend to disk (aka hibernate), which for all the GPU and other HW cares is the same as powering off, then to start B with all the same devices passed through. I can then do the same process to go back to my Linux guest.

I haven't done this yet but I'm planning to put the swap/hibernate drives for both guests on an NVMe SSD so the suspend/resume should be super fast.

The reason I have my main system as the Linux guest instead of just using the hypervisor is that loading and unloading the drivers for the GPU on the host is kinda wonky and has resulted in kernel panics for me (that I can't debug without a display). Additionally as far as I can tell there's no way to hotswap GPUs with display outputs in X so I'd have to restart all my desktop programs anyways.

If you have an nVidia GPU you also might run into issues installing the drivers[5] inside the VM, and have to change some settings in the hypervisor to get around them.

Let me know if you have any questions, I'm happy to help or provide more information. Ask here or see email in bio.

[0] [https://reddit.com/r/vfio](https://reddit.com/r/vfio)

[1] [https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM...](https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF)

[2] [https://github.com/gnif/LookingGlass](https://github.com/gnif/LookingGlass)

[3] video=efifb:off I don't have a good source on this, different systems may need different args

[4] this script is not yet written, I have been using SSH from my laptop until now, I've only had this set up for like a week

[5] search error code 43, it's also mentioned in [1]

<comment><USER2> This is the right answer and definitely what the OP should do, but it isn't a "hardware virtualization" the way the original question was asked, IMHO. Still, totally the way to go for what the OP asked; great answer.

</comment></comment><comment><USER6> This is kind of similar to the Jailhouse hypervisor, but you still need to virtualize all the I/O and for desktop usage I doubt it would be better than normal virtualization.

</comment><comment><USER7> Why is software virtualization not an option?</comment>


Reverse Engineering for Beginners - <AUTHOR> https://www.begin.re/ <comment><USER2> Completely over-engineered UX, it is almost as I have to reverse engineer the "app" to read the content.

I am always lost as to what kind of thought goes into creating this kind of bloated abominations to display static content.

<comment><USER3> why not? it's working properly and it's better structured

<comment><USER4> Not on Firefox mobile it works but elements do not feel like they display right. And you can scroll down to see hover answers, which had no questions.

I found out what those were exactly since I jumped into desktop mode, which had even more noticeable issues.

I hate mobile first design choices for adaptive interfaces, since they in a lot of cases, aren't suited for either platform

</comment></comment></comment><comment><USER5> In a similar vein,

A free and open access book (libre) on reverse engineering by Dennis Yurichev. [https://beginners.re/](https://beginners.re/)

Link to the english PDF : [https://beginners.re/RE4B-EN.pdf](https://beginners.re/RE4B-EN.pdf) (This is a 1000+ page mammoth!)

<comment><USER6> Ahh this guy put a hell of a ton of work into making this. Unfortunately he discontinued his more condensed version of the document (which I believe was about 300+ pages or so?), but he does it all for free and takes care of several different language editions so I don't blame him.

</comment></comment><comment><USER7> Skimming through the materials, this looks interesting. It takes the approach of slides and exercises. I actually expected to see another site with the same name: [https://beginners.re/](https://beginners.re/) which provides a PDF book.

But the best resource I've found to learn reversing is liveoverflow's videos on YouTube. Any other suggestions?

<comment><USER8> The book Secrets of Reverse Engineering is still the best for me even after all those years.

</comment></comment><comment><USER9> The site is horrible and broken.

</comment><comment><USER10> I wish it wasn't based on IDA.

<comment><USER11> For better or worse, IDA is the standard tool.

<comment><USER12> Yes but no begginer is going to buy IDA. This would be much better with Radare2.

<comment><USER13> There are free versions though..

<comment><USER14> The free version doesn't have 64 bit support - to be fair though this tutorial doesn't seem to either.

That's too bad because almost everything is 64 bit now, even arm.

<comment><USER13> They do have x64 ever since they updated the freeware from 5.7 to 7.0..

<comment><USER14> Amazing! The website still says they don't. [https://www.hex- rays.com/products/ida/order.shtml](https://www.hex- rays.com/products/ida/order.shtml) "IDA starter does not support 64 bit files"

If this is the case, they should update that! I will be trying for myself now.

<comment><USER15> IDA starter sadly is not the same as the free trial version...

It boggles my mind that the paid version is less powerful in some aspect than the free version

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> The email prep Q/A CSS is broken. The answer boxes cover up the questions. (Firefox Nightly 63.0a1)</comment>


Google fails at Google - <AUTHOR> http://i.imgur.com/pEGWCR9.jpg

<comment><USER2> This is not a bug. Is a feature. google wants to learn you HTML :)</comment>


Google's mysterious new Fuchsia OS has a UI now - <AUTHOR> https://www.theverge.com/circuitbreaker/2017/5/8/15579846/google-fuchsia-os-magenta-armadillo-first-look-ui <comment><USER2> See discussion here: [https://news.ycombinator.com/item?id=14292651](https://news.ycombinator.com/item?id=14292651)

</comment><comment><USER3> Looks very similar to Android to me!</comment>


WeParty Like It's 1999 - <AUTHOR> http://www.theawl.com/2015/10/weparty-like-its-1999 <comment><AUTHOR> _"This is the center of the world. The people, the beer, the energy. It all comes from here. It's the Brooklynization of the world." The crowd cheered. Adam ordered that more shots be handed out. The crowd cheered again. "Whatever you want to do, the world will help you do it. You will raise investors. Whatever you want to do, whatever God wants you to do, whatever the world needs you to do, you will do it, because each and every one of you," (here, he pointed to his shirt) "is a creator."_

Time to burn everything down, guys.</comment>


Learning Advanced JavaScript - <AUTHOR> http://ejohn.org/apps/learn

<comment><USER2> I'm really glad that everyone is enjoying the tutorial! As mentioned below this is from a workshop that I gave at the Web 2.0 Expo in NYC.

You can find more information about it here: <http://ejohn.org/blog/adv- javascript-and-processingjs/>

Most of this tutorial is taken from my upcoming book 'Secrets of the JavaScript Ninja' which can be found here: <http://jsninja.com/>

I don't think this was explicitly stated on the slides but you can double click the code slides and you'll be able to edit and re-run them. I tossed this tutorial up after the talk and haven't really had a chance to improve upon it.

Sort of related: Remy Sharp built <http://jsbin.com/> which is based off of the construction of this tutorial (using the run-and-show style together with double-click-to-edit).

<comment><AUTHOR> So...If this was from a workshop, is there an audio track?

<comment><USER2> Nope. In all honesty, it was one of the worst-targeted talks that I've ever given. I had given a similar talk at OSCON (highly technical crowd, audience) and was asked to give it again at Web 2.0 Expo. If you're not familiar with that conference it's highly not technical - lots of social media experts and managers. I was given a room that could've housed 300+ and there was maybe 20-30 attending - and that number rapidly decreased as I worked to explain the complicated aspects of JavaScript. In the audience were people who had, obviously, never coded JavaScript before (based upon the questions they were asking - this talk is not designed for that). By the end there was maybe a dozen people left and they came up and told me how much they enjoyed my talk and how informative it was - so at least it wasn't for naught. I know that the content is good and that I'm able to deliver it effectively but I won't be giving it again until I know that I'll have an audience that appreciates the content.

<comment> brown9-2 I was at this talk, and loved it, but you are definitely right about the audience of the conference. I was disappointed as I was hoping it would be a highly technical conference, but instead of it was filled with social media "experts" as you said and lots of buzzwords and hype.

</comment></comment></comment></comment><comment><USER3> Great (best I can remember but I have bad memory) machine assisted teaching.

I could see many textbooks/subjects maths, physics, anything that fits the pattern "look at this" -> "what do you think will happen" -> "this! is what happens and why".

</comment><comment><USER4> These are slides from a presentation I believe. Does anyone have the original audio or video?

Nevertheless, they are fantastic. If anyone has links to similar presentations for other languages, I'd love to take a look.

<comment><USER5> I found where it's from: Web 2.0 Expo in NYC (9/2008) - maybe someone has the audio?

<http://ejohn.org/blog/adv-javascript-and-processingjs/>

He also has it as a download: <http://ejohn.org/files/learn.zip>

Definitely going to look at his books now...

Oh his work here looks good too: <http://jspro.org/code/>

</comment></comment><comment><USER6> #67 "Prototyped properties affect all objects of the same constructor, simultaneously, even if they already exist"

This is only true for properties created as new properties on the existing prototype (Ninja.prototype.swingSword = ...). It is not true if you assign a new object to the prototype (Ninja.prototype = { 'swingSword' : ...}).

The existing objects will only see new properties added to the object which was constructor's prototype at their creation time.

<comment><USER7> _This is only true for properties created as new properties on the existing prototype_

Which is what #67 says.

 _It is not true if you assign a new object to the prototype_

Which is a completely different thing.

<comment><USER6> "Which is what #67 says."

Nope, it says exactly what I quoted ("prototyped properties"). It also provides an example that happens to be of the later kind (properties set on existing prototype.)

" _It is not true if you assign a new object to the prototype_

Which is a completely different thing."

Completely different from everything that falls under "prototyped properties"? I disagree.

All in all, my point is that if you don't know exactly how it works then there is a chance you might be misled by this #67. I am not arguing that it is "wrong".

<comment><USER7> It says "all objects of the same constructor", which can be losslessly translated to "all objects with the same prototype that were created using JavaScript's retarded way of trying to look kind of like a class-based OO language when really it's not at all".

If you change an object's prototype, that object is no longer "of the same constructor". "Ninja.prototype = { 'swingSword' : ...}" is, in fact, a completely different, far more dramatic action than "Ninja.prototype.swingSword = ..." You shouldn't at all have the expectation that the two are anything alike.

<comment><USER6> _It says "all objects of the same constructor", which can be losslessly translated to "all objects with the same prototype that were created using JavaScript's retarded way of trying to look kind of like a class-based OO language when really it's not at all"._

It's rather "expanded using knowledge about Javascript object model plus subjective opinion about JS being retarded" than "losslesly translated".

Given that said knowledge is the knowledge that the slides are meant to convey, we have some circular reasoning here.

<comment><USER7> I didn't say JS was retarded, I said the particular way it tries to look like a class-based OO language even though it isn't was retarded.

Given that you were critiquing #67 as though you thought you already understood the information, I felt it was fair game to call you out for being wrong about it. Apologies.

</comment></comment></comment></comment></comment></comment><comment><USER8> <http://ejohn.org/apps/learn/#13>

This is exactly the kind of thing that makes Javascript so disappointing. ninja is an object, that has a slot yell. yell refers to a function/closure. Samurai is a _new_ object, with a _new_ slot, that _independently_ refers to the same function that yell in ninja refers to.

And yet, when ninja is deleted/collected the function yell disappears. This is insanity. In javascript

        function(n) { blah }

should be a simple expression that creates a heap object, and heap objects should live until it becomes unreachable, at which point it may be collected. So unless _function_ is not an ordinary expression that creates a first class object, this cannot _possibly_ go wrong.

And yet it does.

Can anybody think of a justification for this absurd behavior?

<comment><USER6> I believe you misunderstood the behaviour of the code. The ninja.yell function _is_ a proper object, it _does not_ disappear and samurai.yell refers to it all the time.

What goes wrong is this: when it tries to call itself recurively by using ninja.yell, ninja already refers to null. That's when it fails.

The moral of this slide is "If you want a function to call itself, better give it a name and refer to it by the name instead of relying on bindings that are outside the scope of the function." This has a followup in the next slide, where exactly this happens.

<comment><USER9> >> "If you want a function to call itself..."

Or just use the arguments.callee property which allows you to call the function from itself without worrying about names.

edit: oops, just seen that's on a later slide.

<comment><USER10> Except in ES5 strict mode :-/

<comment><USER11> You can still do it, and without a Y combinator or anything like that too:

      var ninja = {
      	yell: function () {
      		var yellLocal = function(n) {
      			return n > 0 ? yellLocal(n-1) + "a" : "hiy";
      		}
      		return yellLocal;
      	}()
      }

</comment></comment></comment></comment></comment><comment><USER12> Weird. Every time I hit "run" it would flash something and then go back to the homepage. I turned on Firebug and broke on next command (once it got out of stupid jQuery interval) it seemed to work. Refreshing again and again and it seems to work, but now it's broken again.

Firefox 3.5.3, Firebug 1.4.2

</comment><comment><USER13> After reading the tutorial, I took pleasure in reading the source code of that page. A great tutorial and a very nice UI implementation with JavaScript - Resig is a js hacker indeed.

</comment><comment><USER14> this was great. exactly what I have been looking for. I still have a few questions though...

function largest(){ return Math.max.apply( Math, arguments ); } <\-- why is it necessary to run this function in the context of "Math". I don't get this...

<comment><USER15> I would guess that it's just good programming practice to feed a function the context in which it would normally be called -- which for the Math.max function is the Math namespace object.

It probably makes no difference what context the Math functions are executed in, since they are probably backed by native code implementations that don't rely on context, but one could imagine some JavaScript implementation taking a shortcut and doing something like:

      Math.exp = function(p) {
        return this.pow(this.E, p);
      }

That function wouldn't work correctly unless it was executed in the Math context:

      assert(Math.exp(1), "Works");
      assert(Math.exp.apply(Math, [1]), "Works");
      var obj = {};
      try {
        Math.exp.apply(obj, [1]);
      } catch(e) {
        assert(false, "Doesn't work.");
      }

<comment><USER14> thank you. i suppose this makes sense, i guess i don't understand objects / functions as well as I thought. I thought that Math was like a static thing from other languages, where you wouldn't ever create a new Math() and therefore the this operator wouldn't make sense...

</comment></comment></comment><comment><USER16> IE7 doesn't wrap the code in the textboxes. It's displayed on a single line making it hard to read.

<comment><AUTHOR> Except if you double-click the slides (for editing). Then the formatting is fixed. But yeah, it's a drag if you happen to be using IE7.

</comment></comment><comment><USER17> John, you rock

</comment><comment><USER5> Not only is this a great read, it's easy on the eyes, excellent contrast and font size.

<comment><USER18> white or coloured font on a black background is never easy on the eyes

<comment><USER19> Yellow on black is the most visible combination of colors.

<comment><USER20> Is this a preference? I've tried in the past to dig up research actually proving the "most visible combination" through experimentation. I've always assumed that road signs are the combination of colors they are because some empirical research proves it. Never found anything though.

</comment></comment></comment></comment><comment><USER21> Java's Script - a new language?

<comment><USER10> Is that a joke? I really can't tell...

<comment><USER22> It's the longhand version of Java. You have to feed it into OCR, but it generally works provided your handwriting isn't too messy.

</comment></comment></comment><comment><USER23> This is a great big collection of surprising things you can do with javascript. I'm not so sure it's a good thing it's being released.

These are probably idioms you want to avoid writing in code if possible. Learning how to read them is probably useful some times.

<comment><USER24> A 'bind' function is very useful for callbacks. It's awkward to write object oriented javascript without it. So it's quite useful to understand how binding works.

</comment></comment><comment><USER25> A prime example of useless JavaScript. Why not simply use HTML for a simple website like this? I did not see any benefit from JavaScript on that page.

<comment><USER26> The examples are all interactive, and there are segments where you are invited to complete solutions, and the code is then eval'd and tested.

I'm finding it a wonderfully interactive way to learn.

<comment><USER25> Ah, nevermind then. I only gave a quick look and what I saw was all text.</comment></comment></comment>


New approach to making software - <AUTHOR> http://www.1060research.com/netkernel/roc/ this appears to be a radically new approach, making "software like the web". does anyone have any experience with Resource Oriented Computing. They claim it's based on REST and UNIX: <comment><AUTHOR> So they call this Resource Oriented Programming. This approach to making software seems ideal for start-ups. It's software as a miniature word wide web. Takes a while getting used to this concept, but once you do, it's pretty amazing.

You can get up and running fast, and what's more, once you build out your application you can re-use a lot of the infrastructure you put in place in the beginning.

You may even be faster in putting together a MVP (minimum viable product) than using traditional tools of the trade like Ruby on Rails.

Once you grow your company and have to think about stuff like architecture, services, layers and endpoints this system will do most of the work for you.

Remember Paul Graham wrote a post about how LISP gave him an edge in his first start-up company. He was able to develop features faster than the competition.

To me ROC is a hidden gem, a really useful tool for a start-up.</comment>


OpenBSD Is C Documentation - <AUTHOR> https://dev.to/apotheon/openbsd-is-c-documentation-3gd1 <comment><USER2> I agree, OpenBSD has excellent security oriented APIs for writing programs in C. However I wouldn't rely too heavily on it if I were trying to make my software as portable as possible. Some security functions like malloc/calloc_conceal, pledge() and unveil() will appear in their man-pages but not on FreeBSD, Linux or Mac man-pages since they are not part of POSIX, so I would have to place #if defined(__OpenBSD__) on it.

For secure POSIX guidelines, I'd prefer OpenBSD's version over the Open Groups documentation [0].

[0] - [http://pubs.opengroup.org/onlinepubs/9699919799/](http://pubs.opengroup.org/onlinepubs/9699919799/)</comment>


JSON is not object notation - <AUTHOR> http://tel.github.io/2014/08/22/JSON_is_not_object_notation/

<comment><AUTHOR> I suppose it's worth mentioning that this post has little to do with JSON and more to do with the Expression Problem.</comment>


What3words announces backing from Daimler and integration with Mercedes-Benz - <AUTHOR> http://tech.eu/brief/what3words-funding-2/ <comment><USER2> I hadn't heard of this startup, but it's a really cool idea that seems simple to implement. Those are my favorite kinds of ideas.</comment>


A coffee machine that knows when you wake up - <AUTHOR> http://blog.nezarechafni.com/post/156563337046/imagine-a-coffee-machine-that-knows-when-you-wake <comment><USER2> I was hoping for a few more years before the machines started telling me what to do.

</comment><comment><USER3> Maybe I'm a curmudgeon but I like my dumb coffee machine with a single on/off switch</comment>


Storing and Sending Bitcoins Directly from Your Brain using BrainControl - <AUTHOR> http://braincontrol.me

<comment><USER2> This thing is so experimental that it may just make your head explode... Especially if you forget your password, as that is the only way to recover any stored Bitcoins!</comment>


The Future Of Media: Facebook, Ustream, The Jonas Brothers And 974,000 Tweens - <AUTHOR> http://www.businessinsider.com/the-future-of-media-facebook-ustream-the-jonas-brothers-and-974000-tweens-2009-6 <comment><USER2> I don't think it's the future of media. Just content that works for the online medium. Fans having the ability to interact directly with celebrities is something people want to do.</comment>


PayPal president David Marcus: Bitcoin is good, NFC is bad - <AUTHOR> http://news.cnet.com/8301-1023_3-57615080-93/paypal-president-david-marcus-bitcoin-is-good-nfc-is-bad/ <comment><USER2> _" I really like Bitcoin. I own bitcoins."_ \- David Marcus, President, PayPal

He adds: _" People are confused. They think because it's called cryptocurrency it's a currency. I don't think it is a currency. It's a store of value, a distributed ledger. It's a great place to put assets, especially in places like Argentina with 40 percent inflation, where $1 today is worth 60 cents in a year, and a government's currency does not hold value. It's also a good investment vehicle if you have an appetite for risk. But it won't be a currency until volatility slows down. Whenever the regulatory framework is clearer, and the volatility comes down, then we'll consider it."_

I agree with him that Bitcoin is a ready-made solution for people living in _less stable economies_ who want to diversify away from their (risky) local currency, particularly if they find it difficult or impossible to buy US dollars or euros through their local financial system.

Would you rather own (a) savings in a bank account denominated in a "soft" currency (whether Argentine pesos, Bolivian bolivianos, Libyan dinars, North Korean wons, Syrian pounds, Venezuelan bolivares, or some other one), or (b) bitcoins, which, despite their recent volatility, are used globally[1] and do not require trusting a third party?

\--

[1] [http://getaddr.bitnodes.io/251/](http://getaddr.bitnodes.io/251/)

<comment><USER3> I would rather have bitcoins than any other currency for my savings. For spending, you just need the local currency, since Bitcoin isn't accepted in most places yet.

<comment><USER4> Really? For your _savings_? Bitcoin is many things, but a low-risk investment is not one of them.

<comment><USER5> People have varying risk tolerance. For someone who is young, travels a lot and has several sources of income, Bitcoin is an attractive option.

<comment><USER6> If your risk tolerance is having vastly different amounts of wealth over the course of the day...then sure.

<comment><USER5> On a day to day basis sure, but over weeks and months, the trend has been positive. As long as you purchase bitcoins well in advance of when you need to spend them, they have historically preformed very well even with all the volatility. Assuming you buy into the idea of network effect creating a positive price feedback loop, it's a reasonable place to stash cash that you may need on short notice or when traveling abroad.

For reference: [http://bitcoincharts.com/charts/bitstampUSD#rg1460ztgSzm1g40...](http://bitcoincharts.com/charts/bitstampUSD#rg1460ztgSzm1g40zm2g25zvzl)

</comment></comment></comment></comment></comment></comment><comment><USER7> And taking 14% of every sale on ebay must be awesome for them.

Was kinda hoping Bitcoin would finally be the micropayment system that kneecaps them.

<comment><USER8> All ebay has to do is accept bitcoins.

What is stopping something like this? If Ebay uses a service to convert directly from BTC to dollars, there's no volatility risk. Is it fear of bad press? Fear of angering existing players like Paypal? Is it logistics? I'm biased, but why wouldn't Ebay accept an additional form of payment for free?

<comment><USER9> Why not use 'litecoins' or create their own virtual cryptocurrency? That is the achilles heel to bitcoin - bitcoin 2.0 an infinitum.

<comment><USER8> Sure, accept all of them. Why not? It's trivial to accept them, the only difficulty is the volatility compared to dollars, which for Bitcoin is a solved problem.

<comment><USER10> Confused; Bitcoin remains totally volatile. What was solved?

<comment><USER8> Merchants don't have to hold Bitcoins to accept them as payment. Several services exist that convert Bitcoin payments directly into local currency, allowing merchants to accept Bitcoin without exposing themselves to its volatility.

See: [https://bitpay.com/](https://bitpay.com/)

<comment><USER11> Someone has to want them, with sufficient reliability.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> I think NFC payment is more compelling in countries like the UK where you cannot swipe a card, you have to insert it and then enter your PIN (all or nearly UK bank cards are two-factor). For payments smaller than ~£15 though, you can just use NFC, which is a lot quick, especially for crowded pubs.

<comment><USER13> You can do this with bank cards[1][2] in the UK. I've seen them used in Gregg's.

[1]: [https://en.wikipedia.org/wiki/Contactless_smart_card](https://en.wikipedia.org/wiki/Contactless_smart_card) [2]: [http://www.bbc.co.uk/news/business-18265388](http://www.bbc.co.uk/news/business-18265388)

</comment></comment><comment><USER14> Um, what? He makes NFC sound inconvenient to customers - how can you be more minimalistic in approach other than just pressing two devices together and having the transaction complete seconds later?

I think he may be on to something - there is the current development of presenting cards by an NFC enabled device, like a phone. This is a huge process to get the virtual card to the customer securely - one of the abstract approaches, which I don't think is really being taken seriously, is virtualizing the card communication in a cloud, so the card is never downloaded or emulated on the device, like an Android phone. This is kind of leaning towards an "invisible" transaction he speaks of, where a secure payment could be done as an after thought without an actual device or interaction?

<comment><USER15> "It's not a question of whether people at a payment terminal would prefer to tap or swipe, he said, but a reality that people don't want to go to a payment terminal at all."

I think this is right. The amazing future doesn't change what I get out of my pocket. The amazing future lets me walk into a store and just walk out with things without stopping, while some computers in the background just make sure all accounts are settled.

<comment><USER14> Truth be told, merchants don't want that risk. Merchants don't even want NFC - they want payment to be made securely and not have negative impact on their customers.

<comment><USER16> Apple Stores allow you to walk in, scan an item with your phone's camera, pay, put the item in your backpack, then walk out without talking to anybody.

There's a limit ($200 max on phone self-checkout), but they don't seem concerned with shrink.

<comment><USER14> I work in the smart card payment industry for a large north american bank. I've been in conferences with actual merchants voicing their concerns. I didn't make my observations sitting at Starbucks.

<comment><USER16> Starbucks is a great example of another company that allows payment without a card or NFC, though you still go through the checkout person.

<comment><USER14> And also more secure than traditional payment methods since it is prepaid and the merchant is guaranteed not to be frauded.

What merchants don't want, typically, is added customer convenience to payment methods IF it adds additional risk for fraud. EMV Chip has been a huge success, and NFC is kind of a step backward because anyone can steal a NFC chip card and make small purchases, which means merchants still need to dispute fraud charges.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> Reason: they can assimilate bit and become the major exchange because they are already a mane brand.

While with nfc the phone manufacturers have full control and they will be dead in the water while Apple/Google process all the transactions.

</comment><comment><USER18> David Marcus basically wants the IBM RFID payment solution:

[https://www.youtube.com/watch?v=eob532iEpqk](https://www.youtube.com/watch?v=eob532iEpqk)

</comment><comment><USER19> Erm, it is forbidden to buy Bitcoins with paypal btw...by paypal

<comment><USER20> Yes, it's a shame that Mr Marcus didn't discuss how he bought his Bitcoins.

Did he have to play the two-step bank account shuffle like the rest of us?

</comment></comment><comment><USER21> Or, you know, BTC transactions via NFC..

<comment><USER22> I thought about this and it would be a great idea. Today's solutions typically involve scanning a QR code and the Bitcoin wallet sends the transaction over the Internet. But when you have poor signal, this does not work well.

Instead, a Bitcoin wallet could send the transaction (a few hundred bytes) over NFC. This gives an extra advantage: the point-of-sale would broadcast the transaction to hundreds of Bitcoin p2p nodes itself, hence reducing the risk of accepting a zero-confirmation transaction!

<comment><USER23> If it takes approximately 10 minutes to confirm a transaction, it seems like you would be putting merchants at risk. Perhaps some sort of bitcoin insurance would mitigate this risk for a small monthly fee.

</comment></comment></comment><comment><USER24> Of course the president of PayPal would prefer a digital method of payments that he can capitalize on to one that works in physical shops. I use NFC as often as possible because it is so much faster and more convenient, especially for small purchases.

<comment><USER25> Care to elaborate on how it's faster and more convenient than swiping?

<comment><USER26> _tap_ done.

No handing cards, picking up terminals, signing receipts, checking signatures or any other nonsense.

It's also secure--tapping is chip compliant.

You can also have more than one card on your phone.

</comment></comment></comment><comment><USER27> The goal of NFC seems to be profit off mistakes.

Whoops finger slipped and that went on the corporate card; well, there's a $25 charge to transfer an accidental charge.

Or

Whoops finger slipped and that spouse christmas gift went on the shared expenses card. Well, if you don't want her to find out early, there's a simple $25 convenience fee to transfer to a different account.

Or

Whoops paid for the new snowblower in "cash" using direct debit from the checking account instead of the credit card. Woo hoo thats ten bounced checks at $50 pure profit, err, I mean, "fee", each!

<comment><USER28> I've been using NFC to make various purchases for some time and have not made one single mistake. Even if I did, where exactly do these $25 charges come from? Who charges them?

I've not been charged any extra charges for using NFC.

The goal of NFC seems to be to make it easier to spend small amounts of money.

<comment><USER29> I agree. In the event I did make a mistake I can log on to online banking (or open the app on my phone) and make a almost instant transfer the money to another account using faster payments for free.

Even if these fees were assessed, it strikes me as an incredibly inefficient way to generate revenue.

</comment></comment></comment><comment><USER30> Uhm f& _k paypal, they regularly screw over sellers and businesses no matter how long you sell with them using paypal (or on ebay) or how low your chargeback rate is or how high your rating is.

f_*k em, paypal are driving themselves to irrelevancy

On bright side 2 years ago when paypal screwed me and my company it pushed me to look at alternatives and i bought a pile of bitcoins when testing how it works, this turned out to be the best decision ever, thanks paypal for making me $$$</comment>


Thailand Hacker House  - <AUTHOR>

I wanted to gauge interest in starting a Hacker House in Thailand. A Hacker House is a co-working and/or co-habiting space for hackers.
I've been living in Thailand for a year now and its an ideal location for development. The cost of living is low, or a relatively high standard of living is available at a low cost. Peaceful locations are abundant and western comforts are not far away.
There aren't a lot of startup or tech-oriented people around though so an integral part of the idea is to create a small community of smart and creative people.
If it sounds like it might be interesting to you, you can post comments here, or contact me at my gmail address (thailandstartup) - if there's enough interest I'll start fleshing out a more concrete idea and putting a plan together. <comment><USER2> Sounds cool!</comment>


WTF GCC, why pad my structs? - <AUTHOR> http://kahlonel.io/c-struct-packing-explained/ <comment><USER2>
      struct fields {
        uint8_t f1;
        uint16_t f2;
        uint8_t f3;
      }

> What do you think the size of this structure is? It should be 4 bytes, > right?

Of course not! Ever heard of this "memory alignment" thing? There even were architectures where accessing an unaligned int would get you SIGBUS (Solaris/SPARC was one, from what I remember). Have you never wondered where all the unix signals came from?

<comment><USER3> Yep memory alignment a terrible cancerous idea[1] left over from 80's/90's era RISC machines.

[1] Hey lets make the memory layout look like Swiss Cheeze and increase the pressure on the cache! It'll totally be faster!!!

</comment></comment><comment><USER4> I guess there are people who do not know about #pragma pack.</comment>


Postmodernism Generator - <AUTHOR> http://www.elsewhere.org/pomo/ <comment><USER2> Postmodernism and postmodernity describe very complex intellectual and artistic practices. The periodic belittling of these cultural formations by people who do not well understand them is unbecoming and tiresome.

The Sokal affair gets mentioned in threads such as this. But anyone who has studied the Sokal hoax knows very well that _Social Text_'s editors were bullied into relaxing their peer-reviewed standards at Sokal's insistence.

It puzzles and saddens me that so many intelligent scientists and empiricists repeatedly point to such instances of "postmodernity" as proof that the postmodern emperor has no clothes because such a broad statement is simply untrue. The work of many of late Twentieth Century philosophy by figures such as Jacques Derrida, Luce Irigary, Julia Kristeva, Jean Baudrillard, and many many more deserve serious studied contemplation. Their work is not easy to understand and, yes, they can be interpreted in many different ways.

They are not randomized strings of insider shibboleths.

Occasionally propagating "postmodern" meme generators is a childish form of territorial demarcation and we would all--humanists, scientists, and intellectuals of all kinds--be better off and richer if they stopped serving as propaganda that postmodernity has no cultural or intellectual value.

EDIT: grammar, readability, spelling. Added penultimate, single-sentence paragraph.

<comment><USER3> Gotta say, this comment itself reads like it was written by the postmodern generator

<comment><USER4> No it doesn't. Come on, that's not a constructive response to a perfectly articulate comment.

<comment><USER5> To people who don't know anything about postmodernism (i.e. me), it certainly does.

<comment><USER4> The comment doesn't say anything about the content of postmodernist thought, so I can't see why you would say that. It's completely intelligible, and it's a bit childish to pretend otherwise.

</comment></comment></comment></comment></comment><comment><USER6> Pertinent Twitter account:

@RealPeerReview posts papers published in peer-reviewed journals of questionable scientific merit.

[https://twitter.com/RealPeerReview](https://twitter.com/RealPeerReview)

</comment><comment><USER7> Yes. I studied literature in school, and I was very guilty of writing papers like these, once upon a time. If someone gave me this and told me it was real, I would believe. Hits the mark.

</comment><comment><USER8> I wonder what people with literary theory degrees make of RFCs. Much the same I imagine.

<comment><USER9> RFCs are templates for tangible products. They don't exist for their own sake, and can be judged by their artifacts.

What does postmodernism accomplish?

<comment><USER8> It attempts to describe certain aspects of human cultural interaction, broadly defined.

I'm not defending it, I share the opinions of many of it's detractors, my point is only that to describe a technical subject you don't understand as incomprehensible nonsense is silly.

</comment></comment></comment><comment><USER10> Automation putting more people out of jobs.

</comment><comment><USER11> Generated:

If one examines textual theory, one is faced with a choice: either reject Marxism or conclude that the raison d'etre of the reader is deconstruction. It could be said that the subject is interpolated into a postsemantic nationalism that includes language as a paradox. Lyotard uses the term 'Marxism' to denote the failure of neoconceptualist class.

<comment><USER12> Pretty sure you could get at least a passing grade from an average humanities course by just copying and pasting sentences like this, depending on the school. I say that as a philosophy/political science grad.

<comment><USER13> People often say that sort of thing, but I wonder if those claims were ever rigorously tested. Did someone ever try to test what kind of grades they got at humanities courses with made up gibberish answers like this?

<comment><USER14> Depends on the skill level of the grader, I suppose, but phrases like "postsemantic nationalism" are a red flag to me as an armchair philosopher with some knowledge of the history of postmodernist thought.

<comment><USER15> I just love that phrase _postsemantic nationalism_.

So I Googled it and found one _legit_ hit and I can't really tell if it's legit.

[http://blacky2poe.w.interiowo.pl/realismandneost/theabsurdit...](http://blacky2poe.w.interiowo.pl/realismandneost/theabsurdityofn.html)

But it reminds me of what in chess is called a _computer move_ , something which is contrary to the way even super-gm's think but nevertheless a good move.

</comment></comment></comment></comment></comment><comment><USER16> I'm not the best at English, tried understanding this for a good 5 minutes before I remembered what "generator" means. Oh, well.

<comment><USER17> Your comment mirrors an observation of mine (although I am a native English speaker):

Trying to read the generated article gave me a very similar feeling compared to the feeling I get when trying to read an article that's much too difficult for me. I read a sentence or two and try to grasp at the meaning of the sentences and how they relate to each other. I reread these words a few times, and eventually draw out a little bit of understanding and move on to the next sentences.

In this case with the generated text though, eventually my mind concludes that it's all nonsense and gives up on finding any meaning. With a real text, hopefully, I'd derive more meaning little by little as I struggled on.

What's interesting to me here is that a nonsensical text can produce the same "in over my head" feeling as a highly intellectual and difficult text. It seems to imply that we could be fooling ourselves when reading difficult texts - perhaps a text is all nonsense, or perhaps it's brilliant, but we have little way to tell.

</comment></comment><comment><USER18> From 1996

For details

[https://en.m.wikipedia.org/wiki/Postmodernism_Generator](https://en.m.wikipedia.org/wiki/Postmodernism_Generator)

</comment><comment><USER19> Tangential, but can anyone eli5 this field of philosophy (the non generated form)? I recognize names like Lacan and Zizek but can't get far enough through the verbal cruft to interpret anything.

<comment><USER8> As I understand it, you could sum it up as: categorizations and abstractions are primarily instruments of power and control, rather than tools to further understanding. The true purpose of categories or classifications is to place people or concepts outside of them, and thus to denigrate and dominate them. Categories or labels have no "real" meaning except to serve this malign purpose.

Part of the reason why these people originally wrote in such a strange way was because they wanted to try and write without applying the traditional categories and modes of thought we've all been raised with.

Disclaimer: I'm not qualified to tell you this and you shouldn't listen to me. I'd welcome correction from someone who actually knows what they're talking about.

<comment><USER19> I listened anyway... if that's in any way accurate it's the best explanation I've heard yet!

</comment></comment></comment><comment><USER20> I love this. Someone please try and get one published!!

also... [https://en.wikipedia.org/wiki/Sokal_affair](https://en.wikipedia.org/wiki/Sokal_affair)

</comment><comment><USER21> Related reading: "Fools, frauds and firebrands: Thinkers of the New Left".

</comment><comment><USER22> This is hilarious!</comment>


Voyager: Still dancing 17 billion km from Earth - <AUTHOR> http://www.bbc.co.uk/news/science-environment-12688246

<comment><USER2> There's something inspiring about this robot we built careening on the edge of the solar system. We should be launching another one today, with even more ambitious exploration goals.

<comment><USER3> That would be great. However, we just spent a trillion dollars to destroy a few cities in some desert in the Middle East, killing some 100k people on the way. For some reason that seemed to be a better idea than exploring space. :(

>> in the next few years, leave the space dominated by the influence >> of our Sun and enter the province between the stars - interstellar >> space.

That sounds just awesome.

</comment></comment><comment><USER4> Its astonishing how good the engineers built this device and such other devices like the land rovers.

Anyone know the specs of Voyager? What sensors it actually has on it?

<comment><USER5> <http://voyager.jpl.nasa.gov/spacecraft/instruments.html>

<comment><USER6> Thanks for that link. I just spent 20 minutes playing 'alien' and trying to figure out who, where and what we are from these images:

<http://voyager.jpl.nasa.gov/spacecraft/sceneearth.html>

I love the premise.

<comment><USER7> "Please note that these images are copyright protected. Reproduction without permission of the copyright holder is prohibited."

So the Aliens first have to come to earth to ask permission to make copies for analysis :) ? Smart NASA, smart!

</comment></comment></comment></comment><comment><USER8> Hmm, 32 hour ping time.

I wonder if they can do another photo of the earth or if it would be pointless.

<http://en.wikipedia.org/wiki/Pale_Blue_Dot>

("only" 6 billion km away in 1990)

<comment><USER9> The earth takes up only one pixel on that image, that's kinda its significance.

Now they're 11 billion km further away, the earth is obviously never going to be detectable using that camera.

Maybe they could do "Pale Blue Dot II" when it's sufficiently far from neptune.

<comment><USER10> Depending on which side Neptune & Voyager is on, the Earth might be closer than Neptune... ;-)

<comment><USER11> But it's almost four times bigger than Earth...

</comment></comment></comment></comment><comment><USER12> I've posted this before but it's relevant again now and might interest those who missed it the first time. Please, no need for upvotes because I got them last time.

\---

I hear you. I actually managed to wrangle Voyager 1 into a brief nerd-out component of my wedding speech:

"Like me, the space probe Voyager 1 launched in 1977. Unlike me, it is one of the pinnacles of human achievement. It is currently the farthest man-made object from the Earth but it could not have achieved its speed and distance to date without gravity assists from Saturn and Jupiter. When space probes are launched, their path is often planned to get a gravitational slingshot from the most significant entities in our planetary family, to take them further than their launch alone might do. That boost is something invaluable, natural and efficient."

"I don't want to call my parents, (mother's name) and (father's name), giant balls of gas, but the boost, the impact they have had on my life, on my sister's life, my brother's life and now the lives of our partners, is huge."

[And then, later on] "Everybody, wish me luck that in our future together, there are only a few occasions where (bride's name) wishes I was the farthest made-made object from Earth."

</comment><comment><USER13> How does it get powered?

<comment><USER14> Here's some more about the RTGs:

<http://voyager.jpl.nasa.gov/spacecraft/spacecraftlife.html>

They used to provide about 470W, now it is down to the mid-200s.

<comment><USER15> Could one of these ("nuclear batteries") be used to power one of those exoskeletons from Lockheed or Raytheon?

<comment><USER16> It's been a while since I worked the numbers, but I believe that humans regularly put out more power than that during daily activities. Assuming the exoskeleton was extremely efficient, it wouldn't really get you all that much advantage.

<comment><USER17> A cyclist working hard will put out 300ish watts, so, during daily activities, unless you are talking extremely short bursts like lifting/jumping, we put out much less. Store a good amount of power in some capacitor system and that would be enough to power an exoskeleton I bet.

</comment></comment></comment></comment></comment><comment><USER18> When will Voyager encounter the machine planet and become self-aware, though?

<comment><USER19> wasn't it something like 300 years from now? 24th century.</comment></comment>


RSS Is Dead, So Is The RSS Fund - <AUTHOR> http://www.pehub.com/49053/rss-is-dead-so-is-the-rss-fund/

<comment><USER2> When I discover someone saying "Twitter is a replacement for RSS" what I actually hear is "I'm a bleeding-edge-fanboy who can't be bothered with thinking about actual use-cases". Twitter and RSS are completely different approaches to content distribution and are suited to solving different parts of the problem.

There are some good ideas behind Twitter, but the actual implementation they've chosen is only really good for stream-of-consciousness content. That will never be a replacement for RSS.

</comment><comment><USER3> That a VC firm created to focus solely on RSS-based applications has closed doesn't mean that RSS is dead, it means that a venture built on pure hype (not RSS itself, but the idea it can be immediately translated to cash) is dead.

Opening with 'Three months ago, Steve Gillmor wrote that "it's time to get completely off RSS and switch to Twitter."' (in about the same way cars replace wheels, I suppose), the article demonstrates how some people have learned nothing at all.

The little RSS icon appears next to almost every URL you browse to (with notable exception of HN..). It's become a basic, discoverable, read-only XML API for most online content. That a couple of VCs didn't manage to make money off some technology they read about in Wired doesn't mean it's useless.

</comment><comment><USER4> Saying RSS is dead is like saying XML is dead, even if you wish it was the case, it still works for a lot of people, and drives a lot of things. I also like my twitter search RSS feeds, fwiw.

</comment><comment><USER5> RSS is dead because some VC firm couldn't capitalise on it, yet _Twitter_ is the way forward?

</comment><comment><USER6> RSS * IS NOT * dead, in fact I would even go so far as to say... I'd rather have RSS subscribers in my pocket than twitter followers.

</comment><comment><USER7> Am I just insecure if crank bloggers claiming that "RSS is dead" make me feel crotchety and out of touch? I still love my NetNewsWire.

</comment><comment><USER8> I myself have long wished people on Twitter would stop writing interesting slice of life comments, and instead link to every single blog post they write.

</comment><comment><USER9> RSS as a mainstream content delivery platform for the average user is a concept that is probably dying. People are getting more accustomed to feeds more in the form of Facebook and Twitter streams which use concepts that are easier to understand and use.

RSS for power users (somewhere between Joe Schmoe and Scoble) is definitely not dead or dying. There's a lot of room to improve the end user experience too. Hopefully Google Reader's popularity doesn't detract others from trying to do better.

RSS as a standardized content delivery mechanism for interoperability between systems is alive and well and not going anywhere any time soon. Having a standardized format makes interoperability so much easier. I should disclose that I work for a company that's heavily using RSS in this manor, so my viewpoints may be skewed.

</comment><comment><USER10> News stories that conflate underlying technologies with the application of those technologies are dead. Time to switch to a better news source.

</comment><comment><USER11> Here I get my twitter feed via rss.

Do people that write articles like that understands the things they write about?

<comment><USER12> No, no they don't.</comment></comment>