Keith Kim’s Blog
Technology, Development, Tech Trends, Tech Team Management
9th
DEC
"erl -man io" doesn’t work?
Posted by Keith under Erlang, Tips, Unix/Linux
While I was playing around with erlang, I found my installation of erlang’s man page does not work:
$ erl -man io No manual entry for io
I have compiled and installed (with configure’s prefix option) in /opt/erlang on Solaris 9, put the man page files just in /opt/erlang/man. Clearly this doesn’t work. So I did some tracking with:
$ truss -o /tmp/output.txt erl -man io
(truss is like strace for Solaris; "strace" on Solaris is completely different thing.)
And found that the "/man" directory should live in /opt/erlang/lib/erlang/man.
"erl -man io" works now. It’s in MANPATH and Windex is created — so just "man io" would work just fine, but I just wanted to fix it anyway.
6th
DEC
Erlang and Java (and Scala too)
Posted by Keith under Development Tools, Erlang, Java
People on the net did many performance testing on Erlang, and it shows that Erlang clearly wins over other environments. And I see that more people are experimenting with it and there are real systems built on it, and performs incredibly. The language is not easy to learn for someone (like myself) who worked in C++ and Java for many years and only touched Prolog (and Lisp) very lightly. I concluded years ago that Prolog and Lisp are dead, but with this monstrous language/system, it intrigued me to learn the damn thing. It’s very fun to play around with it, but it’ll take a while for me to be proficient enough to write a big application in Erlang. I was a bit bored with Java and was looking for something new, so it’s alright.
I started wondering why this (Erlang way of concurrency) can’t be done in Java, and found something: Kilim. (and Scala’s concurrency.) It is too early for me to say anything about them as I don’t know enough, but it’s worth reading a few pages. This page shows Java+Kilim out performs Erlang: http://stephan.reposita.org/archives/2008/06/22/erlang-vs-java-benchmarking-update/
Kilim: http://www.malhar.net/sriram/kilim/index.html
Here is a posting about Erlang and Scala: http://yarivsblog.com/articles/2008/05/18/erlang-vs-scala/ I only read and played around basics with Scala and thought it’s just a way to add FP to Java. After reading above posting, I looked at Scala site and found this article: http://www.scala-lang.org/node/242. Take a look at the example code. It’s very similar to Erlang how concurrency is done.
To Do:
6th
Trying Erlang
Posted by Keith under Development Tools, Erlang, Unix/Linux
I tested DB and Yaws a bit, and found DB access wasn’t working for Solaris version of Erlang. After some digging, I found that iodbc does not work. There are two (open source) flavors for ODBC in Unix. iodbc and unixODBC. I recompiled Erlang with unixODBC, and DB access works — sort of. Still some SQL doesn’t work properly, and I haven’t figured it out yet. But it’s good enough to test Erlang and Yaws for now. For Ubuntu, no problem. Installing Erlang, ODBC, and Yaws were effortless. But I like Sparc Solaris I use at home. :-) It’s quite old, but still have enough disk space, RAM and works extremely well.
unixODBC: http://www.unixodbc.org/
One thing about Yaws on Solaris — while I was building Yaws, I got an error from ‘id’ with option ‘-u’. This is due to Solaris 9’s ‘id’ (located in /usr/bin) doesn’t support -u option. I temporarily changed GNU’s ‘gid’ to ‘id’ and it built correctly.
5th
DEC
vim, emacs, eclipse, NetBeans for Erlang
Posted by Keith under Erlang
I prefer to use GUI IDE such as eclipse and NetBeans, but I do have to work on terminals often.
Here is vim-erlang file: http://www.vim.org/scripts/script.php?script_id=1584
For emacs, read these pages:
http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html
http://www.erlang.org/doc/man/erlang_mode.html
http://code.google.com/p/distel/
And here is GUI IDE plug-ins,
Eclipse: http://erlide.sourceforge.net/
NetBeans: http://sourceforge.net/projects/erlybird
25th
NOV
Erlang
Posted by Keith under Erlang
I’ve been looking at Erlang for some time now to see whether it gains popularity. At that time, I was looking for a new way for programming multi-threading/multi-processor (now multi-core). The existing methods were (and still are) little cumbersome and then I found Erlang after some searching. However the language is very different from other widely used languages, and I wasn’t sure if it worth the time to learn it…until recently. I’m beginning to hear more people are talking about it, and I see more people blogging about it. So I’ve played around with it a bit recently.
I installed Erlang on Sparc Solaris (v9), XP, Vista and Ubuntu. The installation for Windows was just a breeze. Ubuntu needed a couple of apt-get’s and the version doesn’t look like it’s the latest. On Solaris, it was a bit of hassle — the code itself compiles fine, but complained that I need ODBC. I never used ODBC on any Unix flavored OS except Windows — so I was a bit puzzled whether I could get such for my system. With a bit of googling, found that I needed to install libiodbc, and MySQL ODBC.
Erlang is getting a lot of attentions lately and I’m now reading tutorials and studying it — so far, it’s been fun experience. It’s very similar to PROLOG. So it’s not a completely strange language. I’ll keep putting some information on Erlang on my blog. I get bored easily, and lately Erlang makes my days little more exciting. Scala was at the top of my list (for interesting technology), but it’s Erlang (for now).
Btw, I’m toying around with followings these days: Python/Jython, Ruby/JRuby, Scala, PHP framework (Symfony), Android, Java3D, Statistical Learning….although I lost interested in Python and Ruby don’t play around with them much, but I’m still looking at them occasionally.
To Do with Erlang
- Test some web apps with ODBC — some claims Erlang beats Apache pretty badly.
- Find A.I. implementations in Erlang — NN, ML, NLP.
- Distributed file system. Found some software.
Some useful links
- Erlang and ODBC, http://romenlaw.blogspot.com/2008/10/erlang-odbc.html
- MySQL and iODBC, http://www.flatmtn.com/article/setting-mysql-iodbc
- Wikipedia, http://en.wikipedia.org/wiki/Erlang_(programming_language)
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Recent Posts
- Google Go, windows version is out
- Using Clojure in Cygwin
- Editing big text files in Windows
- Try Google Chrome OS
- The surprising science of motivation: Dan Pink on TED.com
Recent Comments
- Keith on Code Review tools
- Jesse Gibbs on Code Review tools
- pdumsproject on MS Project replacement (Desktop apps)
- sparky on EverNote, better than Microsoft OneNote
- Keith on Intro: Java ME and Palm
Categories
- Architecture
- Books
- Clojure
- Cool Apps
- Development Tools
- Erlang
- Fun
- Golang
- J2EE
- J2ME
- Java
- Lisp
- Management
- PDA
- Sites
- Tips
- Unix/Linux
- Windows
Archives
- January 2010
- December 2009
- November 2009
- July 2009
- May 2009
- January 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- April 2007