salimma is currently certified at Apprentice level.

Name: Michel Alexandre Salim
Member since: 2002-10-29 01:20:58
Last Login: 2007-09-17 20:51:32

FOAF RDF Share This

Homepage: http://hircus.wordpress.com/

Notes: I'm a Fedora contributor

Recent blog entries by salimma

Syndication: RSS 2.0

4 Dec 2007 »

Programming languages, in a nutshell

Task: List the programming languages you consider important or interesting. Describe each of them in one sentence.
C High-level assembler
Lua Table-based, functional and embeddable
Python Great RAD language crippled by dogma
Scala Java done (almost) right, with Erlang- and Haskell-inspired features

Posting this from the new N810 using its built-in keyboard. Typing those tags was painful, and as a result, more languages will be added to the table tomorrow — from the workstation.

Syndicated 2007-12-04 08:21:22 from Intuitionistically Uncertain » Technology

18 Oct 2007 »

Why you should conditionally promise to buy the upcoming Nokia N810 tablet

Nokia N810 tablet

  • It looks gorgeous
  • It runs Linux, and showcases what can be done with more vertical integration
  • Nokia has been improving their interaction with the developer community
  • Video camera and Skype (no Skype video support yet, though)
  • Rhapsody subscription service
  • New: Now with GPS, spacious internal storage, and sliding keyboard built-in!
  • New: More video codecs, Flash 9, Mozilla-based browser

So commercial software providers (Skype, Real Networks) will provide Linux ports if they judge that the userbase is big enough. Which is good news.

The same thing applies to Nokia itself, naturally, and sadly in this case, they do not think there is demand for Ogg Vorbis playback.

So if, like me, you find the product attractive, but have a personal collection of Ogg Vorbis files (or FLAC, which transcodes seamlessly to Vorbis), then this is what you can do:

  • E-mail Nokia about it
  • Inform outlets that stock the tablet (e.g. Best Buy, CompUSA)
  • Sign this pledge and pass it around

All the software for the new device (minus GPS — though perhaps it’s the same software that comes with the GPS kit for N800? Oh, and the ambient light sensor) will run on the N800, so holding back won’t be that painful.

Syndicated 2007-10-18 03:57:22 from Intuitionistically Uncertain » Technology

17 Oct 2007 »

Wide Finder: OCaml and JoCaml

Spent last night getting a crash course in using OCaml to do non-functional things (hash tables, file I/O, regular expressions) and the result is now up.

The JoCaml version does the file-partitioning trick used in the C++ implementation, with each finder workers being run inside a JoCaml channel; the channels share a single lock so they can update the hash table serially.

Interestingly, current implementation does not get a speed-up from the input file being cached (Ilmari’s wf.ml does). Will have to peruse his to see what’s slowing things down.

Lesson: not all techniques for processing a file line-wise are equally good!

Syndicated 2007-10-17 17:40:48 from Intuitionistically Uncertain » Technology

16 Oct 2007 »

Wide Finder: C++ update

Talked with a colleague about the slow single-threaded performance of my Wide Finder implementation, and we narrowed it down to two possibilities:

  • Boost regular expression is not compiled?
  • C++ strings have higher overhead than null-terminated c_str

First point can be ruled out: Boost compiles regular expressions when you assign them. Second point — well, reading in the file using std::getline turns out to consume the bulk of time.

I’ve reorganized the code a bit, using a multimap rather than a vector to rank the URLs by count, with no effect on speed. With two and four threads on a dual-core Intel notebook, the performance is at least on par with Ruby.

Alastair Rankine has a C++ implementation that is slightly faster, but uses Boost memory-mapped IO that I avoided for the same reason he put as caveat: that it will not scale to files that are too large. Which Tim’s log file might well be. Again, that is not significantly faster than the Ruby code.

Moral of the question: Perl and Ruby can be faster than C++! The C implementations out there are blindingly fast, but the way they do regular expression handling are really painful.

Will turn my (limited) spare time to doing a clean JoCaml implementation — it might not be faster but it definitely will look cleaner!

Syndicated 2007-10-16 21:15:21 from Intuitionistically Uncertain » Technology

16 Oct 2007 »

JoCaml

After turning in the C/C++ monster (cleanest C code I reckon it is possible to write, thus the total lack of memory-mapped I/O and other optimizations), I turned my attention to picking a better implementation language.

Requirements:

  • Functional
  • Good support for threading
  • If possible, support for distributed computing

As it turns out, JoCaml fits the bill perfectly. It’s an extension of Ocaml, so it combines a rich library with a familiar syntax (not to me, but having used both Scheme and Haskell, how different can it be) — and a very nice process calculus!

Example: this is a concurrent stack that blocks if there is no input available

let new_stack () =
def state (s) & push (v) = state (v::s) & reply to push
or state (x::s) & pop () = state s & reply x to pop in
spawn state([]);
pop, push
;;

This defines a private state channel, and then export the pop and push synchronous channels (that to the user behave just like ordinary functions)

and this is how you use it:

let pop, push = new_stack ();;
spawn echo(pop());;
push(1);;

Note that the echo channel will block, since pop can’t return a value until the stack contains something! This value is then pushed into the stack and ‘1′ printed.

More of this at the JoCaml site. And, as it turns out, there already is a JoCaml implementation of the Wide Finder, by Ilmari Heikkinen. Will have to grok the finer details from him.

Syndicated 2007-10-15 23:36:20 from #hircus: semi-reliable brain dumps from the reclusive goat » Technology

24 older entries...

 

salimma certified others as follows:

  • salimma certified salimma as Apprentice
  • salimma certified hadess as Master

Others have certified salimma as follows:

  • salimma certified salimma as Apprentice
  • softkid certified salimma as Apprentice
  • badger certified salimma as Apprentice

[ Certification disabled because you're not logged in. ]

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page