HNHacker News
TopNewBestAskShowJobs

doublec

1,389 karma · joined September 11, 2008

submissionscomments
doublec··on An amateur linguist loses control of the language he invented (2012)
Try http://www.reddit.com/r/conlangs for discussion and lists of languages. There are many subreddits for specific languages. For example, Toki Pona [1] and Lojban [2].

[1] http://www.reddit.com/r/tokipona [2] http://www.reddit.com/r/lojban

doublec··on The JSMESS Sound Emergency
> And Opera is dead – it’s essentially a reskinned Firefox.

Opera is not a reskinned Firefox. It uses Chromium as the base, not Gecko.

doublec··on Rust for C++ programmers – Part 8: destructuring
As a general rule, if you don't hear back don't assume permission. While you did this for helpful reasons an author of an article may still prefer not to have things republished so they can control updates, error correction and future republishing of the work. Gitbook does look great though, thanks for pointing it out.
doublec··on Try Idris
> So how does ATS enforce memory safety?

Linear types. Much like unique pointers in Rust, the type system tells you when you fail to consume a linear type. A 'free' call would do this. Same with closing files, etc - you use linear types to track that the resource is consumed.

doublec··on Try Idris
It's interesting looking at the different design decisions of languages. One persons pro is another's con.

ATS2 has no GC as the default mode of working too. The only reason it is more verbose is because you need the call to free. ATS strives to be explicit in what it does so it's easier to read the code and know what is happening.

Languages with destructors or implicit function calls seem to lean towards the C++ downside of "What does this code really do" when looking at it. I dislike hidden code where there is no easily identifiable call to tell you something is happening.

It's not all roses and unicorns with ATS either of course. What I really want is the next generation of dependently typed system languages which has learnt from the current ones.

doublec··on Try Idris
If you use the non-dependently typed parts of ATS it is no more verbose than most ML variants. If you use it without the GC then verbosity increased because you need to add calls to free memory. If you add proofs or dependent types then declaring those adds more. I've used it in moderately sized production programs and it's similar to using OCaml or other ML in terms of productivity. Once you're familiar with the language of course.

If I paraphrase what you said about Haskell it's true for ATS too:

    "but one of the lovely things about ATS is that despite its reputation as a difficult language, once certain key concepts are tackled, it's relatively easy to program rapidly and create real world products (with a considerably higher assurance of correctness than most languages provide)."
The key, like any language, is learning the concepts. I think people assume ATS is more difficult than it is is because much of the documentation and examples for it use a verbose style and heavy proofs. A post I wrote a while back attempts to gently introduce ATS dependent types and you can see that the non-dependently typed examples are very similar to any other ML language:

http://bluishcoder.co.nz/2010/09/01/dependent-types-in-ats.h...

doublec··on Try Idris
I think any language you're not familiar can seem like that - especially if it uses unfamiliar sigils or syntax. I feel similar about Rust for example as I'm not as experienced with it. But with ATS I can put programs together pretty quickly - all because I've learnt it.
doublec··on Preventing heartbleed bugs with safe programming languages
In the example given in the article there are no run time costs. The generated C code is much the same as the original C code from OpenSSL. There is no ATS runtime that gets included either.
doublec··on Preventing heartbleed bugs with safe programming languages
ATS doesn't have a VM. It compiles directly to C. The example given in the article doesn't use a runtime and the resulting C code has no more overhead than the original C.
doublec··on Preventing heartbleed bugs with safe programming languages
The type safety shown in the article doesn't come at a speed cost. The times are erased during code generation. The generated C code is much like hand crafted C but with the safety confirmed via the types.
doublec··on Is Google crippling Firefox?
Interesting! I wonder what the difference is.
doublec··on Is Google crippling Firefox?
For me following these steps using Ubuntu I get the Flash player both times. Did you get a preroll ad both times you tried it? They use flash (except for the MSE player). If you didn't get a preroll you may have got the HTML 5 player.
doublec··on Is Google crippling Firefox?
Google's HTML 5 media player uses Media Source Extensions (MSE) now [1]. This enables them to use adaptive streaming implemented in JavaScript using DASH JS libraries.

Unfortunately MSE support is not complete in Firefox so the MSE using HTML5 YouTube player doesn't work. This will be why Google would be serving Flash. I don't know if they continue to serve the non-MSE HTML 5 player.

MSE support in Firefox is in progress. Nightly builds can enable it by changing the 'media.mediasource.enabled' about:config setting.

Don't do this though because it will definitely degrade your YouTube playing. Due to an incomplete feature it waits for the entire video to download before playing. There's a patch for this that gets playback working but there are still issues with the adaptive streaming itself (because the implementation is incomplete).

Follow bug 881512 [2] if you want to track support in Firefox for the "Get YouTube working with MSE" issue.

I wrote a bit about this [3] a while back and will do an updated post, if someone else doesn't first, once YouTube support is stable.

[1] http://www.w3.org/TR/media-source [2] https://bugzilla.mozilla.org/show_bug.cgi?id=881512 [3] http://bluishcoder.co.nz/2013/08/20/progress-towards-media-s...

doublec··on A 30 minute introduction to Rust
One thing I did when trying to come up with a "What features of language X help safety" article for ATS was to work through a simple example from unsafe, to safer, to safe. This is one such article I did:

http://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-memo...

I think something similar for Rust would make for a great article subject too.

doublec··on New release of Self programming language
I encounter that too. I started writing Self code in a text editor and loading it in the REPL. Some of the code shipped with Self is like this (The Mango parser code for example).

Once I was more familiar I started learning the GUI environment. It took me a while to work out how the object transporter worked to export code back to text files but once I got that Self became a lot more friendly to use.

doublec··on New release of Self programming language
There is actually a basic web server example. It includes a web based object browser. I'm not sure if it's in the 4.5.0 release but it's one of the branches IIRC.
doublec··on New release of Self programming language
There's some interesting Self papers listed in the /r/selflanguage reddit for those that want to do some reading:

http://www.reddit.com/r/selflanguage

This is my attempt at a JSON parser using Self's Mango parser package:

https://gist.github.com/doublec/7132119

doublec··on New release of Self programming language
I have a couple of short screencasts showing Self in action if you're interested:

http://bluishcoder.co.nz/2013/09/16/multiple-users-in-a-self...

http://bluishcoder.co.nz/2009/07/27/displaying-images-with-s...

doublec··on Luje 0.1 – a pure Lua JVM
There's an interesting paper about a similar project that was done using Self [1]. "Design and Implementation of Pep, a Java Just-In-Time Translator written in Self"

It goes through details with benchmarks. The PEP code is available with the Self distribution. They were able to get faster than the Java implementation at the time. Back then Java was interpreted though.

[1] http://bluishcoder.co.nz/self/97-pep.pdf

doublec··on Mozilla bug 923590: Pledge never to implement HTML5 DRM
Any browser that doesn't implement the EME spec won't be able to play content protected using it. So if large video streaming sites were to use it those browser would be locked out. Internet Explorer 11 can play netflix videos using EME without plugins for example [1]. Browsers that don't support EME would need to use plugins for as long as the site supported that.

[1] http://www.afterdawn.com/news/article.cfm/2013/06/27/netflix...

doublec··on GNU APL 1.0
There's some discussion on it from /r/apljk a year ago which stated that it was a research project: http://www.reddit.com/r/apljk/comments/xktud
doublec··on Free Software Foundation issues statement on new iPhone models from Apple
Replicant attempts to remove proprietary binary components (http://redmine.replicant.us/projects/replicant/wiki/HTCDream...) whereas Firefox OS does not.
doublec··on "Chrome-style" Desktop Apps that work today in Firefox
They can be installed in Firefox for Android too. For a while I ran an AOSP version of Android without the Google apps but with Firefox installed and using twitter, facebook, etc installed as 'Apps' from the Mozilla Marketplace. It's not quite a Firefox OS experience but not too bad.
doublec··on It ain't about the callbacks, it's about the flow control
"Concepts, Techniques, and Models of Computer Programming" also covers flow control using similar methods IIRC. They use the dataflow variables of Oz which act like channels.
doublec··on MEGApwn - Bookmarklet to recover your secret MEGA master key
It's more secure than DropBox in that someone seizing MEGA's data can't read it. A MEGA employee can't read your data. To read your data they need to capture the private key. This is possible by virtue of the fact that they're sending you the code to use the private key.
doublec··on MEGApwn - Bookmarklet to recover your secret MEGA master key
This JS code needs to be run on the MEGA domain, right? That's why it's a bookmarklet. Other sites don't have access to the local storage required to extract the key. It does mean that MEGA can get the key and send it back to the site if MEGA was compromised but ultimately the client code needs to get the key to decrypt the MEGA content.

Some way of pinning or signing JavaScript verified by a third party or browser would be useful here. If it could also note what percentage of users was using a particular JS version you'd be more likely to notice if a targeted malicious JS was being sent.

doublec··on The Worst Programming Environment in the World?
Q isn't too bad depending on how it's written. The book "Q for Mortals" is a good read. http://www.amazon.com/For-Mortals-Tutorial-In-Programming/dp...
doublec··on Show HN: Spotify for Independent Music
For Mozilla platforms, MP3 is supported on Firefox OS, some Android devices and Desktop on Windows Vista and up. Support for Windows XP is coming in Firefox 26. It is available on Linux with custom builds and should be in by default soon. For a list of supported audio and video formats in Firefox see http://bluishcoder.co.nz/2013/08/21/html-media-support-in-fi....
doublec··on Go After 2 Years in Production
Inch [1] has an example using complexity annotations, showing that a red-black tree insert/delete are linear in the black height.

ATS [2] is my go-to language for static guarantees with C's efficiency. Not sure if it counts as small but the implementation is not big.

[1] https://github.com/adamgundry/inch [2] http://www.ats-lang.org

doublec··on Google updates Play policies to require games to use its in-app billing service
Windows Phone has this option. Apps have a 'Try' and 'Buy' option. Using 'Try' gets you some form of free trial and users can then upgrade to 'Buy'. This avoids the need to have 'Free' and 'Paid' versions of apps.
← PreviousPage 7 of 13Next →