Content AND Presentation

(Note to English-speaking readers: the links entitled Komentarze na tej stronie lead to comment pages.)

2017-01-14 I'm now using the right dictionary

Almost one and half years ago I read an interesting post on Irreal, and – as a great fan of the English language – I immediately went to the original post it mentioned. I did not regret it; I return to that post from time to time, since it is so beautiful, even poetic.

Of course, I started using Webster’s dictionary right away. (Especially with my habit of learning a couple of new English words on a daily basis.) But it being available in a web browser (and somehow eww choked on it), it was rather inconvenient for me, and hence I forgot to use it more and more.

And one day I found it’s gone from the Internet. I hoped that the server was temporarily down or something. Alas, it seemed to be dead. It was no more. It had ceased to be. It was an ex-server. (SCNR.)

Happily, the Somers’ post mentioned a possibility of downloading Webster’s dictionary. I did that, discovered it being in some strange format and promptly forgot about it.

Until a few days ago, when I recalled all that and decided to do something about it. Mind you, Oxford Advanced Learner’s Dictionary is not bad, but it can’t compete with Webster’s. I was quite determined to find a way of accessing the One True Dictionary from within the One True Editor. And so I did.

So, without further ado, here’s how you do it (at least on a GNU/Linux system).

  1. Download the Webster’s dictionary in StarDict format, as Somers tells you to do. (Apparently it’s not “some strange format”, but a standard format for a digital dictionary.)
  2. Unzip the files and put them in ~/.stardict/dic.
  3. Install sdcv, a command-line utility for accessing StarDict dictionaries. (On Arch GNU/Linux with yaourt, it is yaourt -S sdcv.)
  4. Don’t go to Melpa for the sdcv package; it’s usable, but slightly broken. Get sdcv-mode from here instead and load it in Emacs.
  5. Now, with point on a word you want to look up, say M-x sdcv-search and confirm the selection with RET (or just say M-x sdcv-search anywhere and type the word you want to check).
  6. You can press RET on any word in the definition to look that one up. Sorry for destroying at least a few hours of your life with that tip.
  7. Relish thy copy of Webster’s in Emacs.

CategoryEnglish, CategoryBlog, CategoryEmacs

Comments on this page

2017-01-08 Last farewell

I’ve been to a funeral a few days ago. There a few things that always strike me during such ceremonies. One of them is a custom we have here in Poland (maybe it’s more universal, I have no idea) of putting on the grave bunches of flowers tied with a band with some words written on it. The usual choice is “Last farewell”. I really like how this is literally true. It’s really the last farewell – next time we’ll see the one we’re bidding farewell to there will be a welcome, and no more farewells ever

CategoryEnglish, CategoryBlog, CategoryFaith

Comments on this page

2016-12-31 JavaScript head

Some time ago I needed an equivalent of Unix’ head utility in JavaScript. I had a string, spanning many lines, and I wanted to have just the first 10 lines of it. It turned out that this is actually very easy to do so:

s.split('\n').slice(0, 10).join('\n')

It is one of these rare occasions where object orientation is actually useful. And the code above is so nice I’m almost tempted to say it’s Pythonic, except you know, you can’t really pull that off in Python, because join. (In fact, it is a bit unfair to make fun of Python’s join method – there are good reasons for it working the way it does – but it’s funny nevertheless.)

That’s it for today, folks – as I mentioned some time ago, I don’t have too much time for lengthy posts now. This will (hopefully) change in a few weeks. Happy New Year 2017!

CategoryEnglish, CategoryBlog, CategoryJavaScript

Comments on this page

More...

(Więcej means More in Polish; click it to see older entries.)

CategoryEnglish, CategoryBlog