HNHacker News
TopNewBestAskShowJobs

doublec

1,389 karma · joined September 11, 2008

submissionscomments
doublec··on A gentle introduction to Prolog (2013)
There's a BSD licensed open source version, all linked from http://shenlanguage.org/download_form.html

That's what I used for my post. There's "Shen Professional" which is a closed source subscription based product getting rapid development http://shenlanguage.org/professional.html

I have not used "Shen Professional" though.

doublec··on A gentle introduction to Prolog (2013)
Mercury is another programming language that combines Prolog plus functional programming that probably doesn't get as much attention as it deserves https://mercurylang.org/
doublec··on A gentle introduction to Prolog (2013)
A system written using SWI Prolog is apparently used in a large number of NZ stock exchange trades https://dtai.cs.kuleuven.be/CHR/files/Elston_SecuritEase.pdf
doublec··on A gentle introduction to Prolog (2013)
It's popular to embed a prolog in Lisp languages. For example Picolisp and Shen. I wrote a post comparing Shen's Prolog support to SWI Prolog recently: https://bluishcoder.co.nz/2016/08/30/kicking-the-tires-of-sh...
doublec··on On the State of Pony
I like this one too as an example of what can be done to make a C FFI safe: https://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-mem...

You end up with a definition that checks at compile time that:

* We don't exceed the memory bounds of the source buffer

* We don't exceed the memory bounds of the destination buffer

* The destination buffer is at least the minimium size required by the function documentation

* We can't treat the destination buffer as a string if the function fails

* We can't treat the destination buffer as an array of bytes if the function succeeds

* Off by one errors due to null terminator handling are removed

* Checking to see if the function call failed is enforced

And there's no overhead at runtime.

doublec··on On the State of Pony
There's a thread here from a previous discussion: https://news.ycombinator.com/item?id=9483071

One nice thing about the Pony GC is it can GC actors that are waiting for messages but will never receive one. In some other languages I've used I end up with processes idling in a receive on channel living forever but never able to exit because nothing is going to put a message in the channel.

doublec··on On the State of Pony
I've used it in a few personal projects. I've written some thing about it here: https://bluishcoder.co.nz/tags/pony/

The two major things that I stumbled on when I first started using Pony was that there is no blocking constructs in the language and dealing with capabilities.

I've had exposure to memory safe languages using types before (ATS, Rust) so the Pony system of capabilities wasn't too difficult to understand once I was able to map them to things I was familiar with. Before that I struggled to understand why things weren't compiling. Now that things have somewhat clicked I'm pretty productive with the language.

Dealing with writing non-blocking code was a matter of thinking in terms of callbacks and promises - something familiar to a lot of Node programmers I suspect.

Once I got past those two things I find the language very nice to write in and easy to reason about the code. Sometimes I hit walls of struggling to work out why things aren't compiling and they eventually end up being the compiler showing me what I was trying to do would be unsafe due to data races, etc.

The language is still young though so definitely something to approach with a bit of understanding that things may break.

doublec··on The lambdaway project, a small and coherent language dedicated to the web
How does Opa compare to Urweb? Both seem to have an ML-style influence http://www.impredicative.com/ur/
doublec··on Passwords for 32M Twitter accounts may have been hacked and leaked
It's possible for an attacker to intercept the SMS based 2FA http://news.softpedia.com/news/ss7-attack-leaves-whatsapp-an...
doublec··on Using Pony for Fintech [video]
I use Pony a bit, and wrote some things here: https://bluishcoder.co.nz/tags/pony/

My list of catches would be:

* Reference capabilities take a while to grasp. No more than Rust's borrowing or ATS viewtypes though.

* Garbage collection occurs between behaviour calls only. If you do something in a loop that allocates a lot in a single behaviour then you'll get memory issues.

* There's no blocking calls. You need to structure your code so that actors receive notifications of things occurring instead.

* Behaviours don't return anything as they are asynchronous. This requires using promises or passing callbacks.

That said, once you grasp these it's nice to program in. Fast, readable, and makes concurrent/parallel code easy to write and safe to pass data around. The C FFI is easy to use. You can package Pony code as a library callable from C too.

doublec··on Stanza: A New Optionally-Typed General Purpose Language from UC Berkeley
Dylan [1] has a very similar type system to Stanza and has been around for a while. Stanza looks a lot like what a modern incarnation of Dylan would look like.

[1] http://opendylan.org/

doublec··on Hackers Claim They Can Read Encrypted WhatsApp and Snapchat Messages
> A tiny app written by McAfee’s team was downloaded onto two brand new Android phones which were used for the message exchange.

Does this mean they installed malware on the devices before the messages were exchanged?

doublec··on A list of command line tools for manipulating structured text data
This is a similar argument used by users of languages like J, K and APL. The language is small and concise - rather than learn libraries or frameworks you use the primitives and the emphasis is on the data being manipulated. Common patterns (like +/%# for average) are recognized rather than named.
doublec··on Our 2016 Open Source Donations
Decentralized microblogging using Sone, the twitter-like system on Freenet. Freemail, the encrypted email system. FMS, the forums. I also use the distributed data store for storing data. Basically anything you'd use IPFS for but more anonymity.

Here's an example of using it for the backing store for my blog: https://bluishcoder.co.nz/2015/09/14/using-freenet-for-stati...

Here's a series of articles on writing dynamic apps for Freenet - in this case chat-like things http://www.draketo.de/light/english/freenet/communication-pr...

doublec··on Seaside – Developing Sophisticated Web Applications in Smalltalk
I think 'Ajax' killed continuation based web servers. See Avi Bryant's thoughts in this area from back then: https://web.archive.org/web/20060610180033/http://smallthoug...

There were client side JavaScript continuation like things. Back in the mid-2000's there was Narrative JavaScript. I used it to implement threads and Alice ML style futures/promises on the client side: https://bluishcoder.co.nz/2006/06/05/more-concurrency-in-nar...

doublec··on Seaside – Developing Sophisticated Web Applications in Smalltalk
It uses continuations to hide the asynchronous nature of web requests and allows the flow between pages of a web app to be written in an imperative style.

"Inverting back the inversion of control" describes the idea (in Scheme) https://pages.lip6.fr/Christian.Queinnec/PDF/www.pdf

Paul Graham used the idea in ViaWeb - and apparently got a patent on some aspect of it https://web.archive.org/web/20060323211251/http://paulgraham...

doublec··on Leaving Mozilla
There were about ten NZ Mozilla employees when I worked there a year ago. Not all at the Auckland office but there were plenty there to keep the office utilized at the time.
doublec··on Rewrite Everything in Rust
There's a port of ATS programming language for the ESP8266. There's some slides on it here:

http://www.slideshare.net/master_q/safer-iot-using-functiona...

ATS is a functional programming language that does not use a garbage collector and uses dependent and linear types to do safe system programming. It provides a similar level of safety to Rust with the ability to drop down to C: http://www.ats-lang.org/

doublec··on Toki Pona: A created language that has only 100 words
There's a subreddit for constructed languages: https://www.reddit.com/r/conlangs/
doublec··on Unicode in SML
I hadn't noticed the original page had gone down. It was up a few days ago so hopefully it's only a temporary thing.

I've used Alice ML on a couple of projects for a while and didn't want to see it die so I got permission from the original authors to host a mirror on github and keep the bitrot away. I forked from work that Gareth Smith did on bitbucket a few years back (with his permission) that fixed some issues and added features. I'm the only one working on it at the moment but hopefully others join in. It's survived this long!

It's great to see you keeping /r/sml active!

doublec··on Unicode in SML
Alice ML works on Mac OS X as well, although there was a build issue with "Resource temporary unavailable" that I had to work around. Build instructions are in the README: https://github.com/aliceml/aliceml
doublec··on Verified Programming in F*: A Tutorial
I wrote some posts on using ATS and interfacing with C if you want to dig further into it https://bluishcoder.co.nz/tags/ats/
doublec··on Pony is an open-source, actor-model, high performance programming language
There's some benchmarking of simple fib type things here [1].

[1] https://cdn.rawgit.com/darach/my_little_pony/master/my-littl...

doublec··on The ATS Programming Language – Unleashing the Potentials of Types and Templates
I've not had to do anything distributed with ATS that involved sharing data. I mostly used zeromq to send information around and controlled access to resources via processes.

It's a fairly steep learning curve for people new to types. Given exposure to SML it's not too hard to just use that side of things plus linear types. Dependent types and proofs add complexity but hopefully you can avoid it while learning.

doublec··on The ATS Programming Language – Unleashing the Potentials of Types and Templates
I can only speak as a user of linear types, not as a type theorist. They are extremely useful in practice. In ATS they enable not just tracking memory but any form of resource that needs to be cleaned up. If you fail to do so you get a compile time error.

This removes much of the burden of wondering if you got the resource management right. Especially when maintaining existing applications. If you refactor things the compiler tells you when you got it wrong.

There is overhead since you are managing resource manually - both syntax-wise and mental though.

For concurrency they enable 'solving' shared state by making it difficult to share state. You really have to pass ownership of the resource to the other thread so it can no longer be accessed anywhere else.

doublec··on The ATS Programming Language – Unleashing the Potentials of Types and Templates
I have some posts on my experiences of using ATS here http://bluishcoder.co.nz/tags/ats/

They're for the previous version of ATS but are still pretty relevant.

doublec··on Rreverrse Debugging
Yes.
doublec··on IPFS Pics
You don't need to do this with Freenet. When you insert data it is pushed to other nodes - a completed upload means other nodes have the data. You can turn off your node and the data is still available.
doublec··on Hosting a simple static site on IPFS
Morphis, ipfs and Freenet all work similarly here - allowing hosting websites in a distributed datastore. It'll be interesting to track the different usages of the systems.

I started off mirroring my blog on Freenet and and now I'm experimenting with storing it there first and using a reverse proxy to make it available on clearnet [1]. This approach would work on IPFS and Morphis too. If the clearnet site gets taken down it's always available on the distributed store and it's simple to spin up a proxy somewhere else to provide clearnet access.

For systems where unpopular data goes away over time the access via the clearnet proxy provides more access to it to make that less likely since clearnet is full of crawlers, bots, search engines etc constantly hitting it.

[1] http://bluishcoder.co.nz/2015/09/14/using-freenet-for-static...

doublec··on The Hardest Places in the World to Visit
Artemy's photos of Pitcairn are great! http://tema.ru/eng/travel/pitcairn/
← PreviousPage 4 of 13Next →