[SLUG] Erlang and Concurrency talk slides

2006-08-05 Thread André Pang

Hi all,

I've finally posted the slides and links for my talk on Erlang last  
Friday online.  You can grab the info from here:


  http://www.algorithm.com.au/mt/talks/erlang_and_concurrency.html

For those who missed the talk, it's about a programming language  
named Erlang and also about concurrency.  Here's a short abstract:


For those who haven't heard of it, Erlang is a programming language  
based on the functional programming paradigm that's targeted at  
solving one major problem: concurrency.  It has a number of very  
cool features that makes it extremely compelling for writing large  
servers that are required to be high-performing, have ridiculous  
availability (99.999% uptime or better), can scale well to deal  
with huge load, and can be distributed (even geographically).  In  
addition, since it has an industrial focus, it has quite a  
reasonable standard library that a lot of other more academic  
languages lack (such as Ocaml and Haskell), including things such  
as a full SSH implementation.


I'll also be covering issues about concurrency and why it's going  
to be a massive problem for programmers in the next ten to twenty  
years, and briefly cover some issues about the Jabber and XMPP  
instant messaging protocols and how you can use Jabber chat clients  
and servers as an application platform.


Cheers, and please feel free to email back the coders list or email  
me privately if you have any questions at all!  (I'm not on the main  
SLUG mailing list at the moment.)



--
Andre Pang
Software Engineer
---
m. +61 411 882299 [Sydney, Australia]
[EMAIL PROTECTED]
---
Rising Sun Research
p. +61 2 9338 6478 - f. +61 2 9338 6401
www.risingsunresearch.com



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Writing Mozilla extensions to handle a MIME type

2004-11-08 Thread André Pang
Hi guys,
If any of you have experience writing Mozilla extensions 
(XUL/JavaScript/XBL/XPCOM and all that), I'd be grateful for a bit of 
help -- I'm wondering if it's possible write an extension which can be 
registered as the main way to interpret a particular MIME type 
downloaded from a web server.

An example scenario: say I have a new MIME type, text/x-rot13-html, 
(with an extension of .htmlr13 or something).  What I'd like is to be 
able to write a Mozilla extension whose, say, JavaScript gets triggered 
when the browser detects that particular MIME type, and perhaps the 
JavaScript can un-rot13 the HTML and display it to the screen.  It's 
very much similar to a classic Netscape plugin in that the extension is 
designed to work on particular MIME types, except that I really don't 
want to dive into writing native-code in C or C++, since it's orders of 
magnitude harder than it needs to be.

Does anyone know if this is possible to do with a Mozilla extension?  
All the research I've done so far looks like I'll have to go the 
native-code route with a proper plugin, rather than a lightweight 
extension.

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Win4Lin or Wine?

2004-07-15 Thread André Pang
On 15/07/2004, at 5:03 PM, Howard Lowndes wrote:
I'm desparately trying not to run Windows, just Windows apps,
specifically MYOB, and even single user at that.  I don't want to take 
a
chance on the user seeing anything else that Windows has other than  
the
specific app.
If your application works in Windows 98, I highly recommend Win4Lin: 
I've used it to run plenty of Windows applications (such as MS Office 
two/three years ago, when wine and StarOffice were both pretty crap).  
It does require you to use a custom kernel, but they provide patches if 
you're one of the many people who compile their own kernel.  I can't 
speak for wine.

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Win4Lin or Wine?

2004-07-15 Thread André Pang
On 15/07/2004, at 10:53 PM, James Gregory wrote:
I just had another thought -- there's a version of MYOB for OSX. If
it's just Windows you're trying to avoid, you could install OSX inside
pearpc to do what you want. There might even be someone on this list
who could help you setup OSX to just start MYOB (There's gotta be a way
to do that, right?)
If your idea of running MYOB involves an hour waiting for the window to 
open, spending money on Mac OS X (because, you know, it's not free as 
in beer), waiting for the Mac OS X Finder booting up successfully 
around 50% of the time (which only takes a whole 10 minutes or so), and 
buying a copy of MYOB for Mac OS X, then sure, that might be a 
solution.  For everyone else who just want to run MYOB, then Win4Lin, 
wine, or VMWware is a slightly less insane option.

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Slides for my Beyond C, C++, Perl and Python talk

2004-07-04 Thread André Pang
On 04/07/2004, at 2:15 PM, Rick Welykochy wrote:
I've put up slides for my Beyond C, C++, Perl and Python talk at:
http://www.algorithm.com.au/mt/archives/talks/ 
beyond_c_c_perl_and_python.html
I'm happy to discuss any aspects of it on-list or off-list.  I was  
actually intending to write up some additional references and  
discussion on that page, especially for topics that I wanted to cover 
 but didn't have time for (e.g. garbage collection and  
meta-programming), but I figured that if people are actually 
interested  in all that, they can ask me and I'll add to the page 
later :).
Simply fascinating. As a programmer who's been through C then C++
(still a fave!) then on through scriptors like perl, I found the
paper very enlightening. I've dabbled in Haskell and found out my
onw programming limitations ... need more work in the ML/functional
area. I could probably do with a good dose of Lisp as well.
Thanks for the feedback Rick.  Unfortunately the presentation didn't 
cover anywhere near as much as I really wanted to cover: I basically 
spent the entirety of the talk going on about type systems, which 
wasn't my original intent, but I think it worked out OK.  I guess I can 
cover everything else in a future talk, if people are so inclined ...

Any references you have on these topics most appreciated.
References, hmmm ... a big, big problem with Haskell is that most of 
the references you can find are papers; not books or easy-to-learn 
tutorials.  That wouldn't be too bad, but the papers are usually 
targeted at people who already know the language: a lot of Haskell 
development right now is involved with advancing the language, and is 
no use to the beginner and is completely overwhelming.  I've found that 
any introductory books on Haskell are usually targeted at somebody 
who's completely new to programming, or assumes that you have a 
functional programming mindset already.  (Keep in mind that a lot of 
the Haskell language designers and implemenators are _really_ smart, 
and they tend to live in ivory towers rather than try to figure out 
what the masses are up to :).

I don't think the language is actually that hard to learn, but I 
haven't yet found a book or tutorial that presents the ideas in a 
digestible way to someone who's new to the language, but is already an 
experienced programmer using imperative or object-oriented languages.  
That said, probably the best bet for learning Haskell is Hal Daume's 
Yet Another Haskell Tutorial:

http://www.isi.edu/~hdaume/htut/
I find that the start's pretty slow, and presents things in an order I 
wouldn't choose if I were to help someone understand the language, but 
lots of other people have liked it, so hopefully you might too.

Another tutorial you may find useful is Tom Moertel's Haskell for Perl 
Hackers talk:


http://community.moertel.com/ss/space/Talk+-+Haskell+for+Perl+Hackers

Which covers the basics quite well, but unfortunately doesn't have the 
time to dive into why the basics are the way they are, and IMHO doesn't 
really whet the appetite for functional programming.  e.g. he explains 
what higher-order functions are and gives an introduction to Haskell's 
very powerful type classes, but doesn't explain how make programmer 
better by showing real, concrete advantages over similar ideas in OO 
languages.  Still, it's a good talk, and most likely he couldn't get 
deeper into those topics because of time constraints.

One tutorial I can highly recommend is Merjis's one for learning O'Caml:
http://www.merjis.com/developers/ocaml_tutorial/ch1/
which guides you through the language from the viewpoint of someone 
reasonably familiar with C++, and even goes into fun stuff like walking 
through an O'Caml compiler's generated assembly code to show you what's 
happening underneath the hood, and how it can compete so well with 
imperative languages like C.

I don't know Lisp very well apart from it has macros, and macros are 
schweeet, so I can't really recommend anything to do with that.  
Lisp/Scheme are on my list of things to learn more thoroughly by the 
end of the year :).

P.S. I don't mean to sound like an armchair critic and throw stones at 
the functional language community for the lack of tutorials, but it 
_is_ hard to get into it if you're already an experienced programmer 
and don't have three months to learn slowly by osmosis.  For me, the 
reward was more than worth it: hopefully I'll sit down some time and 
write a tutorial of my own which everybody else can criticise ;).

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Slides for my Beyond C, C++, Perl and Python talk

2004-07-04 Thread André Pang
On 04/07/2004, at 6:40 PM, Erik de Castro Lopo wrote:
On Sun, 4 Jul 2004 18:24:57 +1000
André Pang [EMAIL PROTECTED] wrote:
which guides you through the language from the viewpoint of someone
reasonably familiar with C++, and even goes into fun stuff like 
walking
through an O'Caml compiler's generated assembly code to show you 
what's
Does O'Caml compile to a native binary or are you talking about the
assembly language for some sort of O'caml VM?
O'Caml actually does both.  You can compile to a portable bytecode 
format if you want to (like Java/Perl/Python) with ocamlc, or you can 
compile to native code with ocamlopt (but only on platforms where 
ocamlopt is available: I think x86, PPC, and Alpha).

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Slides for my Beyond C, C++, Perl and Python talk

2004-07-04 Thread André Pang
On 04/07/2004, at 7:49 PM, Erik de Castro Lopo wrote:
On Sun, 4 Jul 2004 19:45:31 +1000
André Pang [EMAIL PROTECTED] wrote:
O'Caml actually does both.  You can compile to a portable bytecode
format if you want to (like Java/Perl/Python) with ocamlc, or you can
compile to native code with ocamlopt (but only on platforms where
ocamlopt is available: I think x86, PPC, and Alpha).
So which one is it that was winning the (so called) language speed
shootouts?
According to http://shootout.alioth.debian.org/craps.php, O'Caml 
optimised to native code placed 4th (score of 40.9063, implementation 
name is ocaml), and O'Caml compiled to bytecode placed 16th (score of 
16.2858, implementation name is ocamlb).  Note that that's a pure 
speed comparison: no memory usage or lines of code factored in.

One interesting thing I didn't expect is that Clean, a very close 
relative of Haskell which implements the linear types thing I touched 
on briefly in my talk, is quite fast (placed 5th, just after O'Caml): I 
guess it goes to show that even a purely functional language (which 
O'Caml isn't) can be pretty damn quick.  I'm fairly convinced that 
linear types alone account for a huge part of that speed increase vs 
Haskell's performance given in the ghc benchmarks; it really makes me 
wish linear types were implemented in a Haskell compiler.  There's also 
been quite a few posts to the Clean mailing lists in the past week 
which point to some patches to Clean that gives greatly improved 
performance in some tests; e.g. they claim a 8x speed-up on the Reverse 
File test after enabling that buffering thing on stdio :-).

For what it's worth, I think that language shootouts are a load of 
crap: see http://xrl.us/cada on a post I made about why.

--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Slides for my Beyond C, C++, Perl and Python talk

2004-07-03 Thread André Pang
Hi all,
I've put up slides for my Beyond C, C++, Perl and Python talk at:
http://www.algorithm.com.au/mt/archives/talks/ 
beyond_c_c_perl_and_python.html

I'm happy to discuss any aspects of it on-list or off-list.  I was  
actually intending to write up some additional references and  
discussion on that page, especially for topics that I wanted to cover  
but didn't have time for (e.g. garbage collection and  
meta-programming), but I figured that if people are actually interested  
in all that, they can ask me and I'll add to the page later :).

Enjoy!
--
% Andre Pang : trust.in.love.to.save
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html