Skip to main content

Ralsina.Me — Roberto Alsina's website

uRSSus: is that an icon in your pocket?

Yes, some­times I think a fea­ture is much hard­er than it re­al­ly is.

urssus21

So, since re­vi­sion 571, ev­ery once in a while a new fav­i­con will ap­pear in your feed tree when you use uRSSus. No, they won't all ap­pear at once. They will ap­pear when­ev­er:

  1. You ac­­tu­al­­ly fetched new posts from a feed

  2. You restart the app

Once they ap­pear they will nev­er change, ei­ther.

urssus at 27 days old

Af­ter 27 days of de­vel­op­men­t, uRSSus is fi­nal­ly a re­al­ly us­able ap­p. I miss noth­ing from Akre­ga­tor, al­though there are a few unim­ple­ment­ed things. It was bro­ken the alst cou­ple of days, be­cause I was rewrit­ing large chunks of its gut­s, but the new guts work much bet­ter ;-)

The miss­ing pieces (I know about):

  • Fav­i­­cons

  • Save col­umn width in post list

  • Show to­­tal posts in feed list

  • Drag&­­Drop is not re­li­able (weird things hap­pen ev­ery few tries)

  • Metafeeds (ex. your un­read post­s/ your starred post­s) are not up­­­dat­ed au­­to­­mat­i­­cal­­ly

  • Del.i­­cio.us sync is not work­ing at all

  • No help

  • No de­­cent con­­fig di­a­log (but a func­­tion­al re­­place­­men­t!)

  • Very oc­­ca­­sion­al DB lock­­ing.

  • Log­ging is bro­ken

  • Need to im­­ple­­ment back­­up of the DB

That's not re­al­ly more than a day or two of work.

Right now (re­vi­sion 570) it's work­ing pret­ty good, so it's a good re­vi­sion to try, if you feel up to it.

Urssus goes meta!

I have been de­lay­ing this func­tion­al­i­ty be­cause I ex­pect­ed it to be hard to do, then... it was very easy! Now you can cre­ate "metafeed­s" based on queries. Here's the first ex­am­ple: "Post.im­por­tan­t==True".

urssus20

Of course, be­yond a set of stan­dard metafeed­s, a UI to al­low the us­er to cre­ate them will be hard but at least the ba­sic func­tion­al­i­ty is there (BTW, it's 15 (fif­teen!) lines of code)

Pickling can be expensive

When try­ing to se­ri­al­ize python data, of­ten the first thing we look at is pick­le. Well, some­times pick­le can be very ex­pen­sive!

Here Post is an elixir class, which means it's an ob­ject mapped to a re­la­tion­al database, and com­par­ing its prop­er­ties to some­thing is pret­ty much a piece of a SQL WHERE state­men­t.

>>> print Post.important==True
posts.important = ?

What hap­pens when we pick­le it?

>>> print len(pickle.dumps(Post.important==True))
27287
>>> print pickle.loads(s)
posts.important = :important_1

Yikes. What's a bet­ter so­lu­tion?

>>> print eval('Post.important==True')
posts.important = ?

As long as we are sure no weird da­ta will get in­to the eval...