Fantasdic 1.0-beta1

I’m pleased to announce the first release of Fantasdic, a client for the DICT protocol (a dictionary network protocol, RFC 2229).

You can connect to DICT servers such as dictd or serpento. You can find more informations about that protocol here and a list of servers you can connect to here. We can find quite a wide range of different dictionaries including freedict.org dictionaries and copies of Wikipedia and Wiktionary. For those who prefer not to have to connect to internet, it’s possible to install your own server on your local machine of course.

Compared to other DICT clients, the great advantage of Fantasdict is the capability of connecting to multiple servers and filtering databases : with gnome-dict and kdict, you can only use one server at a time. Fantasdic also includes a simple vocabulary learning tool. And finally, that’s a matter of taste but I think the user interface is cleaner and more usable.

I developed it in Ruby and Ruby/GNOME2. As I’m getting more and more experienced with it, it has been quite fast to develop, only a couple of hours everyday for one week. I think it would have been slower if I had tried to improve gnome-dict. As for the network aspects of the application, Ruby has a really nice Socket API and reading the RFC turned out to be surprisingly quite fun and interesting!

It’s possible to compile your own data for dictd (see the man page). For the little challenge (but it should not be too hard), I plan to write a tiny DICT server in Ruby which would be easily extendable to support new dictionary formats. I’m planning to support dictionaries in EPWING and Stardict format. That can possibly make Nihongo Benkyo useless though I don’t know yet whether I’ll abandon it or not.

I’m willing to submit Fantasdict to GNOME in order to get a web page and an account on their CVS. I think GNOME, as a desktop, is sorely lacking a decent DICT client but as far as I know, there’s no Ruby application in the CVS yet. GNOME people seem to prefer Python and Mono ;) Wait & see ^^”

Screenshots : 1, 2, 3 and 4.

Download : Fantasdic 1.0-beta1.1

24 Responses to “Fantasdic 1.0-beta1”

  1. Masao Says:

    Yeah, great !

  2. Ralph Says:

    I’m using ubuntu dapper and get the following error when starting up:
    rwabel@RALPH:~/Desktop/fantasdic-1.0-beta1$ fantasdic
    /usr/bin/fantasdic:9:in `require’: no such file to load — gettext (LoadError)
    from /usr/bin/fantasdic:9
    rwabel@RALPH:~/Desktop/fantasdic-1.0-beta1$

  3. William Rea Says:

    Ralph, you need ruby-gettext

  4. Ralph Says:

    thakns for the info. I had to install sqlite3 too. But with now I get:
    /usr/local/lib/site_ruby/1.8/fantasdic/ui.rb:22:in `require’: no such file to load — gtktrayicon (LoadError)
    from /usr/local/lib/site_ruby/1.8/fantasdic/ui.rb:22
    from /usr/local/lib/site_ruby/1.8/fantasdic.rb:52
    from /usr/bin/fantasdic:10

    even tough I’ve installed libgtk-trayicon-ruby1.8

  5. William Rea Says:

    That error is caused by you not having ruby-gtktrayicon installed

  6. Mathieu Says:

    This message means gtktrayicon is not properly installed. I think this is quite useful but if your problem persists try the beta 1.1 (gtktrayicon becomes optional with this release). Go here.

    I think I’ll also make Sqlite3/Ruby and Ruby/Gettext optional later. The former would disable the learning tool and the latter would disable the translations of the user interface.

  7. William Rea Says:

    fyi theres a fantasdic package for Archlinux: http://aur.archlinux.org/packages.php?do_Details=1&ID=3522

  8. Emmanuele Bassi Says:

    as the author of the gnome dictionary application (included in the gnome-utils package of the desktop platform), I feel a little puzzled by this sentence of yours: I think GNOME, as a desktop, is sorely lacking a decent DICT client. after all, the dictionary application has been there since Gnome 1.x, and has been completely re-written (by me) in the last couple of months to support more than the DICT protocol and servers.

    by looking at the screenshots, I feel little to no difference from the previous “feel” of the dictionary (which will be fully reinstated on the new code base in the next development cycle).

    please note that the dictionary application exports all the source definition and the dictionary source query objects in a shared library (libgdict) which uses gtk and gobject and, thus, should be fairly simple to be wrapped in ruby; I’d say that sharing the sources meta-data and some of the widgetry could be well in order.

    anyway, keep up the good work: we might even share solutions. :-)

  9. Mathieu Says:

    I had the feeling that gnome-dictionary was just an unmaintained little tool among the other gnome-utils. But I’m happy to hear that I was wrong and you have completely rewritten it. I’ll give it a try very soon.

    Our two projects can live together. People should have the choice to use the client they prefer as people choose their prefered mail client.

    What I said was about gnome-dictionary 2.12.1. I can’t tell for the latest releases. The main problems for me were :
    - The numerous crashes.
    - It wasn’t possible to define more than one server at a time and filter databases. The DICT protocol is not dict.org! As I pointed out in my post, there are many possible servers with differents databases. I myself plan to run a public DICT server with some Japanese and Chinese dictionaries.
    - No vocabulary learning tool.

  10. Ralph Says:

    @Mathieu
    thanks for the new version. works fine now. don’t know why the there was problems with gtktray. :-)

  11. Dennis Craven Says:

    Nice little tool. Any chance you could make it accept a word from the command line and display the results for that word once the UI is shown?

    I had a look at the code, but figured you could do it much quicker if you wanted to than I could since I’d need to learn Ruby first :)

    Thanks for the tool regardless!

  12. Mathieu Says:

    Yep, good idea.

  13. Emmanuele Bassi Says:

    you were right: the old dictionary was basically unmaintained and bit-rotting (I had to rewrite it in order to save it).

    with the new dictionart, the crashes have been hopefully fixed - at least, the code base is much more stable, clean and extensible; as for multiple dictionary sources: the support is now present, even though you can query one at a time.

    all in all, the new dictionary inside gnome-utils is not the free-for-all dictionary: many features are possible, and surely some of those features can be shared between applications.

    as I said, keep up the good work!

  14. Leslie Polzer Says:

    Bug when adding a dictionary (right after pressing the “OK” button in the “Add” dialogue):

    [sky@wintermute ~]$ fantasdic
    /usr/lib/ruby/site_ruby/1.8/fantasdic/ui/add_dictionary_dialog.rb:106: [BUG] Segmentation fault
    ruby 1.8.4 (2005-12-24) [i686-linux]

    Aborted

    [sky@wintermute ~]$ uname -a
    Linux wintermute 2.6.15-archck #1 SMP PREEMPT Sun Mar 12 12:27:36 EST 2006 i686 AMD Athlon(tm) XP 2400+ AuthenticAMD GNU/Linux

    [sky@wintermute ~]$ cat /etc/arch-release
    Arch Linux 0.7.1 (Noodle)

  15. Mathieu Says:

    Hi Leslie,

    Thanks for the bug report. I think that it is a bug that is already fixed in the CVS.

    patch

  16. parr Says:

    I’m love this great website. Many thanks guy

  17. antono Says:

    Really great tool! Thank you.

    Do You plan to make lexicon training tool more complex?
    I want to create Esperanto learning tool in Ruby and it would be great to have something like ForWinSuite.new(”rdictd”, “fantasdic”, “gEsperanto”, “some kind of complex lecsicon learning tool”). So I am interested in complexization of the tool… It also would be great to make integration with such programs as granule.sf.net and so on… Really interesting and usable feauture.

    I could take it on me.
    Please, give me to know about your plans :)

    Thank You!

  18. Mathieu Says:

    I would like to keep Fantasdic a multi-purpose dictionary. But I am willing to implement a plugin system for language specific features. Especially, I may make Nihongo Benkyo (another program of mine for Japanese language) such a plugin. I think interactions with other programs should also be made available via plugins.

    If you have any idea how to implement a clean and flexible plugin system, I am interested.

  19. antono Says:

    Hi!

    Yes! Plugins is good idea. But i haven’t any idea about plugin system for fantasdic. I have no much expirience in app architecture. I will think about it.

    And I would like to use parts of your code in my program. Is it possible under GPL v3?

    http://gesperanto.rubyforge.org

  20. Mathieu Says:

    Hi,

    If I can reuse your GPL v3 code in my GPL v2 code, yes, go ahead.

    BTW, can you give more details about your project ? Is it network-based or file-based ?

  21. antono Says:

    I have to closely discover gpl3.

    my app will:
    1) take multimedia files from disc
    2) take contacts and may be inbox from lernu.net

  22. rodney Says:

    hi! i tried to install fantasdic beta1-1 and i got this error everytime i try to start the application..

    /usr/local/lib/site_ruby/1.8/fantasdic/database.rb:18:in `require’: no such file to load — sqlite3 (LoadError)
    from /usr/local/lib/site_ruby/1.8/fantasdic/database.rb:18
    from /usr/local/lib/site_ruby/1.8/fantasdic.rb:50
    from /usr/bin/fantasdic:10

    i think it says that theres no sqlite3 installed but im pretty sure i have it installed. actually, i installed it prior to fantasdic installation..pls help..

  23. rodney Says:

    hi! i got it working already.. just had to install libsqlite3-ruby :-)

  24. Mathieu Says:

    Hi Rodney. You ‘d better install the beta2 I have just released yesterday ;-)

    See
    http://www.mblondel.org/journal/2006/11/21/fantasdic-10-beta-2-released/

Leave a Reply