HNHacker News
TopNewBestAskShowJobs

doublec

1,389 karma · joined September 11, 2008

submissionscomments
doublec··on Coinbase Nabs $5M in Biggest Funding for Bitcoin Startup
It doesn't matter how many confirmations you wait for if the attacker has >=51%. The attack looks like this:

1) Attacker starts mining a fork offline (ie. doesn't publish blocks)

2) Attacker sends payment to merchant but does not include payment in fork in (1)

3) Attacker waits 6 confirmations then receives goods.

4) Attacker double spends the money in the fork (1).

5) Attacker releases fork when it is longer than the main chain.

If they have greater than 51% they will always be able to do (5) because at some point they'll be longer than the main chain. It doesn't matter how many confirmations the merchant waits for.

doublec··on Mozilla Launches Firefox OS Simulator 3.0
It runs ok on a Nexus S http://bluishcoder.co.nz/2013/04/22/running-firefox-os-on-ne...
doublec··on Factor 0.96 now available – over 1,100 commits
You wouldn't write a conditional like that, you'd do:

    10 < [ "less than 10" ] [ "greater than 10" ] if
This is pretty easy to read. If the boolean condition is true, run the first quotation, if it is false, run the second.

The unusual names lke 'dip', 'bi', etc are just common names that once learned make code easier to read. 'dip' is from Joy IIRC.

I do agree that combinator heaviness can make things difficult for a beginner. Especially if code uses a combinator that isn't common it requires time to look up and see what it does. You really need to immerse in Factor development for a while to get familiar with them.

Stack effect declarations exist to make refactoring safer. Prior to having them enforced by the compiler it was common to change a words stack effect only to find it broke random code using it elsewhere. Making the check enforced provided a safety check that you hadn't forgotten to change word usage elsewhere.

doublec··on Factor 0.96 now available – over 1,100 commits
For those looking for "Why Factor" material you might like to look at some of Manfred von Thun's writings on the Joy programming language [1]. Joy is similar to Factor and Manfred wrote a lot of theory on the "why" of concatenative programming languages.

[1] http://www.latrobe.edu.au/humanities/research/research-proje...

doublec··on Factor 0.96 now available – over 1,100 commits
Factor used to run on ARM [1]. Back then Windows Mobile only had 64MB of ram and it wasn't quite enough to do anything useful in Factor.

I used to run a video sharing website written in Factor [2], sadly the server crashed a few weeks ago and I haven't recovered the data from the disk yet.

Factor feels more like a Scheme than a Forth to me when programming.

[1] http://web.archive.org/web/20111117015025/http://www.bluishc... [2] http://web.archive.org/web/20130118204336/http://tinyvid.tv/

doublec··on Factor 0.96 now available – over 1,100 commits
The 'extra' directory basically acts as a package manager. The "Batteries Included" approach Factor uses here makes it much more likely that libraries work out of the box.

This was very useful in the early days of Factor when language and base library changes caused bitrot in contributions. If the contributed library wasn't updated it was moved to an 'unmaintained' directory for later correction.

doublec··on Show HN: Transfer files between computers using WebRTC
The FileHandle API does what you want - read/write access to an IndexedDB file at any location. https://developer.mozilla.org/en-US/docs/WebAPI/FileHandle
doublec··on BitInstant hacked: What and how it happened
Maybe Site5 should ask better security questions then. If they want users to enter what is effectively a password for "Mother's maiden name" they should just ask for a security password.
doublec··on Flash vs HTML - Waste Invaders
Nightly builds of Firefox are starting to get support for the Web Audio API, hidden behind a pref 'media.webaudio.enabled', which can be set in 'about:config'. At some point when it's considered more useable someone will blog about it and the state it's in.
doublec··on Mega update: Dotcom's service now accepts Bitcoin
Mega only de-dup the encrypted result of the file. This means only files from the same user are de-duped. Given that this is likely to be rare, in practice de-dup doesn't happen.
doublec··on The Web Is Becoming Smalltalk
Oh, very nice, thanks!
doublec··on Why Mozilla Matters
The main point of the web audio api is for procedural generation of sounds rather than playing of pre-computed buffers or files. This is why "new Audio('effect.wav')" isn't a real alternative to it.
doublec··on Why Mozilla Matters
The Google proposal was more full featured than the Mozilla Audio Data API. It provided more functionality baked in vs having to implement it in JS. This was considered important for mobile devices.

Mozilla countered with another proposal, the Stream Processing API (https://dvcs.w3.org/hg/audio/raw-file/tip/streams/StreamProc...) but this was a bit too late.

Another advantage of the Google proposal was they had a spec and implementation from the start. The Mozilla proposal had a wiki page write up and an implementation and I don't think there was as much effort put into promoting it as Google did into theirs.

doublec··on The Web Is Becoming Smalltalk
Clamato, also from Avi Bryant, is an interesting approach to in browser development: https://bitbucket.org/avibryant/clamato/wiki/Home
doublec··on Why don't websites immediately display their text these days?
Webapps can look at using some of the newer HTML features for offline capability and caching. There's the HTML App Cache [1] and IndexedDB [2] for example.

[1] https://developer.mozilla.org/en-US/docs/HTML/Using_the_appl... [2] https://hacks.mozilla.org/2012/02/storing-images-and-files-i...

doublec··on Firefox to block content based on Java, Reader, and Silverlight
Netflix, along with Google and Microsoft, are working on a specification to enable playback of encrypted and protected content. I'd imagine this is what they're hoping will come about to work around the anti-flash/silverlight/java technologies: https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-med...
doublec··on First mega.co.nz indexer and search engine
Mega are using the file-system-api: http://www.w3.org/TR/file-system-api/

It hasn't been widely implemented and may be due for change: http://lists.w3.org/Archives/Public/public-webapps/2012OctDe...

doublec··on Amazon Elastic Transcoder
Chrome still supports MP4 as far as I know. They mentioned dropping support a couple of years ago but didn't.

Firefox is getting MP4 support. Firefox OS and Firefox for Android on some devices has it already. Support on some versions of Windows is in nightly builds hidden behind a preference setting. Linux support is hidden behind a build switch. At some point when these backends are stable they'll be in normal builds.

doublec··on Building Firefox OS
The reality is that with the time pressures to get Firefox OS running and working on the devices intended to be released there has been very little resource to supported other hardware. At some point this may change but it's really up to those interested in that hardware putting the effort in from the looks of things.

Mozilla can't provide an image to flash due to licensing restrictions on binary blobs for the hardware (graphics drivers, video decoders, etc).

doublec··on H.265 Is Approved
The defined subset included the particular codecs that would only be supported. Implementers who got on the WebM train agreed to VP8 and Vorbis. They may not be keen to do VP9 or Opus. There's no "have to be implemented" for these two formats. This means there will be fragmentation which WebM was supposed to avoid.
doublec··on H.265 Is Approved
Integrating Opus and/or VP9 into WebM removes one of the selling points they used to promote the format. WebM wasn't supposed to be a generic container format holding different codecs. It was specifically tied to Vorbis/VP8 to ensure everyone advertising WebM support would be able to play the files.

If they decide to add these additional codecs then there will be some players that can play some WebM files but not others. If that was the direction they wanted to head then they could have just stuck with Matroska for the container format.

doublec··on The Firefox OS marketplace is brilliant
MP3 and H.264 should play fine on Firefox OS if the device vendor includes hardware support for it. The initial devices do support this as far as I know.

Firefox for Android for some devices also supports MP3 and H.264 now.

Desktop support is in progress with Windows and Linux being the furthest along.

doublec··on Microsoft goes its own way with Web audio/video spec, despite W3C rebuff
As far as I know you are correct. Mozilla released the Audio Data API and produced a number of demos based on that. A W3C group was formed to work on Web Audio standardisation and in that group Google announced the work on their API.

Mozilla then followed with a "Media Processing" API: http://robert.ocallahan.org/2011/06/media-processing_15.html

It's possible that person you are responding to is thinking of that.

doublec··on Mega has launched
Mega uses features from a draft W3C spec called "file-system-api": http://www.w3.org/TR/file-system-api/

Chrome supports this, Firefox does not. See my comments in the Mozilla bugzilla bug about this:

https://bugzilla.mozilla.org/show_bug.cgi?id=704128#c22

doublec··on Lego's Mindstorms EV3 robots are here
The Transterpreter VM was ported to RCX if I recall correctly. It uses Occam-pi for the development language: http://transterpreter.org/

Not Go, but go-like.

doublec··on HTML5Wow
> For example, Firefox and Chrome have different Audio APIs. How that's standard?

This came about because both browsers implemented an experimental audio API to start discussion on what an audio API should look like. Since then a W3C group has been pounding out a standard API and browsers are working towards it.

doublec··on Google "working to remove" the redirect from Google Maps on Windows Phone
What limitations are those? Windows Phone 8 allows native code which was a stumbling block in WP 7.
doublec··on Deconstructing K&R C (2010)
Rust may be more successful but at this time ATS is a better C replacement. Mainly because Rust is currently tied to a runtime and garbage collector. But also because ATS has better features for describing the API boundaries when calling into C and back (ie. FFI).

Rust will grow into these areas I'm sure because Mozilla will need them for Servo and safer programming.

doublec··on Deconstructing K&R C (2010)
Here's an example of how ATS makes a C API safer, similar to the API in the K&R example (it deals with memory/string copying): http://www.bluishcoder.co.nz/2012/08/30/safer-handling-of-c-...

ATS provides all the low level hackery that C can do but allows more information to be encoded in types to ensure that is safe. It also provides high level features from functional programming languages like higher order functions, pattern matching, etc.

doublec··on The state of low-level system programming
If you start off treating ATS like an ML variant interfacing with C without using any of the type annotations for safety you can go far. Then you can tighten the types up for safety as you get more experienced or find you need it.

You could write tests as needed and when a test fails write types that make that failure as close to compile time as possible.

Another approach is to just write C code, either embedded in ATS files or in C files that are linked into ATS. Then slowly convert C to ATS as you feel comfortable.

← PreviousPage 9 of 13Next →