HNHacker News
TopNewBestAskShowJobs

doublec

1,389 karma · joined September 11, 2008

submissionscomments
doublec··on Nimrod: C + Macros + GC
For an interesting systems programming language try ATS [1]. It's an ML style functional programming language with dependent types, linear types, macros, generics and compiles to C giving reasonable portability.

[1] http://www.ats-lang.org/

doublec··on 8bit.js: Write music using 8bit oscillation sounds
That's a little unfair. The spec was presented when it was already implemented in the browser by the spec authors. That's why they are so far ahead of the curve. Mozilla had a spec and implementation of another approach that predates the Web Audio API. Once the working group settled on what spec to go for then implementation started.
doublec··on A Week with Mozilla's Rust
I agree not much is heard about it. I blog about it a fair amount on [1]. There's also /r/ats [2]. I use it in production. The backend of my bitcoin mining pool [3] is written in ATS and has about 1% of the total bitcoin mining capacity and has been operating for a couple of years. The front end of the pool is written in Ur/Web.

[1] http://bluishcoder.co.nz/tags/ats/ [2] http://www.reddit.com/r/ATS/ [3] http://mmpool.bitparking.com

doublec··on A Week with Mozilla's Rust
There are some languages heading towards this. ATS [1] provides a restricted form of dependent types [2] that allows you to do what you want and is designed for systems programming. You can do safe pointer arithmetic for example.

Idris [3] is another language with dependent types (and is more Rust-like) designed for systems programming. I don't think Idris has type level presberger arithmetic though making some things a bit verbose.

[1] http://www.ats-lang.org/ [2] http://bluishcoder.co.nz/2010/09/01/dependent-types-in-ats.h... [3] http://www.idris-lang.org/

doublec··on Google blocks Windows Phone YouTube app again, for “manufactured” reasons
Blackberry's BB10 OS uses the Web interface. It actually works quite well. Firefox OS also uses the web interface.

Microsoft's YouTube app on Windows phone is actually really nice. It's a pity Google keep trying to stop it.

doublec··on Phantom Types in Rust
I've updated the article to try to make it clearer about what types are inferred and how to make it infer the correct types.
doublec··on Phantom Types in Rust
I think it's for familiarity for C++ programmers:

    enum Day {
      Monday, Tuesday, Wednesday, ...
    }
You can assign values too:

    enum Color { 
      Red = 0xff0000,
      Green = 0x00ff00,
      Blue = 0x0000ff
    }
doublec··on Phantom Types in Rust
Yes, it's unfortunate that I lost a bunch of articles in a drive corruption on linode: http://bluishcoder.co.nz/2013/04/03/parts-of-this-site-tempo...

I've been going through archive.org recovering posts when I can. I do have a bunch of the factor articles in my project that produces a PDF from them: https://github.com/doublec/factor-articles

doublec··on Git commit allegedly from Satoshi embedded inside a Bitcoin transaction
v_64, nesting is too deep to reply directly, but it doesn't need to be a merged miner for it to accept non standard transactions. Transactions are coded in a mini scripting language. A 'standard' transaction is one using opcodes in a particular format for normal transactions. 'non-standard' transactions allow for a number of different things but because bitcoin developers are cautious they're not relayed between peers by default.

They are accepted and valid in blocks though. So any miner can include them in their blocks. What Eligius, and some other pools do, is they allow accepting the transaction directly. So you connect your node to it directly and send the transaction as normal. It won't be relayed to other peers as they reject it. But those running a modified client will and can include it in a block.

doublec··on Git commit allegedly from Satoshi embedded inside a Bitcoin transaction
The block containing the transaction was mined by Eligius. The Eligius pool allows non standard transactions if the transation is relayed to it directly (plus a fee for the service I think).
doublec··on Git commit allegedly from Satoshi embedded inside a Bitcoin transaction
It's always been possible to embed messages in transactions and the blockchain in general. It's full of stuff if you look.
doublec··on Yesterday I Wrote My First Firefox OS App
An android phone without 'Google Apps' does not offer much more than FxOS in my opinion. I test drove an AOSP build of android for some time, without Google Play and other 'non-free' Google apps, and there's not much you can do.

Very few application vendors provide .apk's to install outside of Google Play and they don't provide them from other markets available internationally. f-droid has some applications but not a huge amount.

Basic functionality like Facebook, Twitter, 'sharing' photo's to social media,etc don't work if you can't install those apps.

What I ended up doing was installing Firefox (Mozilla provides apk's and it's available from f-droid) and using web apps.

Firefox OS on the other hand provides all this functionality out of the box.

doublec··on APL in JavaScript
Ken Iverson wrote an interesting document, "Notation as a tool of thought", which covers his thoughts on what a concise/efficient notation provides: http://www.jsoftware.com/papers/tot.htm
doublec··on Mozilla CTO: "Maybe we should just adopt, support, and bundle Tor in Firefox..."
The bundle available at the time included the fix. This post on June 26 says it's based on Firefox 17.0.7esr.

https://blog.torproject.org/blog/new-tor-browser-bundles-and...

The number of affected users must be due to not upgrading. Does the tor bundle automatically update?

doublec··on ZeroMQ instead of HTTP, for internal services
I wrote an ATS binding which I use in a number of projects: https://github.com/doublec/ats-libzmq

I attempted to use ATS features to make sure resources are cleaned up and msg data usage is statically checked for correct sizes, etc.

doublec··on Conrad Barski's Haskell Tutorial
roconnor was working on one. There are git mirrors of the darcs repository on github. For example: https://github.com/laanwj/Purecoin

I don't know the current status of it.

doublec··on Mozilla and Partners Prepare to Launch First Firefox OS Smartphones
There's a writable interface to IndexedDB files as well: https://developer.mozilla.org/en-US/docs/WebAPI/FileHandle
doublec··on Mozilla and Partners Prepare to Launch First Firefox OS Smartphones
IndexedDB allows direct access to the blobs like a file: https://developer.mozilla.org/en-US/docs/Web/API/FileReader
doublec··on Mozilla and Partners Prepare to Launch First Firefox OS Smartphones
You could download the routing data into IndexedDB and use that for your file system.
doublec··on Dynamic Languages are Unmaintainable
Some languages can detect this at compile time. For example, ATS - a dependently typed language:

   fun square {m:int} (a: int m): int (m*m) = a + 2
This won't compile because in the type we've said the result must be the square of the input. I've written some more about using dependent types [1] and proofs [2,3] for this sort of thing.

The difference between writing proofs and writing tests is subtle though and serve similar purposes. Tests can make you feel confident that things are right but proofs should make you certain of it.

[1] http://bluishcoder.co.nz/2010/09/01/dependent-types-in-ats.h... [2] http://bluishcoder.co.nz/2013/07/01/constructing-proofs-with... [3] http://bluishcoder.co.nz/2012/10/04/implementing-a-stack-wit...

doublec··on Write Android apps in Google Go
You can also use ATS with a few patches to the compiler:

http://sourceforge.net/mailarchive/message.php?msg_id=290363...

Quite a few languages are available for Android development now that the NDK allows native code.

doublec··on “Practical Artificial Intelligence Programming With Java” by Mark Watson
Have you seen gmaxwell's thoughts on a similar subject? https://bitcointalk.org/index.php?topic=53855.msg642768#msg6...
doublec··on A Google Reader Replacement written in Haskell and Ur
I'm not sure exactly what you mean. Clojure is a programming language. Ur/Web is a web application development system. You'd have to compare Clojure+database library+web library.
doublec··on A Google Reader Replacement written in Haskell and Ur
I'm not the author but have written a couple of production web applications using Ur/Web and have found it pretty nice. The enforced purity took a little getting used too. If an error occurs during a request all side effecting changes during that request are rolled back. This is nice for the database side of things but dealing with other interfaces with the world (eg. payments, sending mail) required some work arounds. Nothing impossible to deal with though.

The FFI of Ur/Web is low level and easy to use. This made interfacing with existing C routines easy. When I couldn't work out how to do something in Ur, I just wrote it in C (well, actually I wrote it in ATS which compiles to C) and called it from Ur.

I did have some interesting issues in an application that had fairly heavy load. If one transaction is in process and it relies on data that gets changed in another transaction then one of them is rolled back and retried once the other has succeeded. Under very heavy load, where transactions required some semi-global state in the database, and all those transactions modified that state then these rollbacks would happen a lot and cause performance issues. Fixed with better data design in the app of course to avoid the contention on the global state.

All in all though Ur/Web has held up very well for me and makes it pretty quick to put things together.

doublec··on Next Generation Video: Introducing Daala
And Firefox OS. And Android. With Linux being enabled soon. Mac is being worked on.
doublec··on Distributed data structures with Coq
There's also the "Featherweight Firefox" browser model in Coq http://www.the-inconsistency-principle.com/upenn//browser-mo...
doublec··on EFF now accepting Bitcoin again
The faucet funds, presumably including the EFF donations, were used to refund pools that had blocks orphaned in the recent blockchain fork: https://bitcointalk.org/index.php?topic=156641.0
doublec··on DRM in HTML5 is a victory for the open Web, not a defeat
Have you got the wrong browser there? Chrome supports H.264 fine.
doublec··on Diablo III Economy Broken by an Integer Overflow Bug
Bitcoin has also suffered from an overflow bug, requiring a fork to fix it: https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposu...
doublec··on Diablo III Economy Broken by an Integer Overflow Bug
Another approach is to have compile time checking of overflow or bounded numbers. There's been discussion about the utility of this on the Rust list recently and I wrote up some of my experience with languages that let you do checking: http://bluishcoder.co.nz/2013/05/07/ranged-integer-types-and...
← PreviousPage 8 of 13Next →