nicferrier / elmarmalade

emacs-lisp version of the marmalade package repository
111 stars 21 forks source link

Where's the searchbox? #30

Open mcandre opened 10 years ago

mcandre commented 10 years ago

I like the site redesign, but how do I search for packages now?

nicferrier commented 10 years ago

"Cooming soon"

Wanna help?

bostonaholic commented 10 years ago

:thumbsup:

nicferrier commented 10 years ago

What's holding this back is really the async stuff. Marmalade is run in a single thread right now. It's not hard to solve this by just making another Emacs process to handle searches, but I just haven't got a lot of time to do work like that when there are lots of boring but important problems.

I will implement search. I'll try and get a simple search working soon... but it's likely to be a while before it's very useful.

mcandre commented 10 years ago

Here's a neat suggestion: MELPA hacks this by presenting a list of package names in JavaScript, so the search form amounts to filtering the list. Eh?

nicferrier commented 10 years ago

I've considered using js on the marmalade website, js doesn't bother me at all (indeed elnode has good support for doing browser side js) but many emacs hackers have it turned off.

I think marmalade and js is probably a non-starter.

The simplest thing is to run a find or an ls on the package-dir. Elnode could very easily make that find into an async http call that would be efficient. That would only search on package names though. But it would be simple.

I'd love someone to offer to tackle that. It's not really hard (unlike fixing really wierd bugs) and whoever does it is probably going to learn something, even if it's only another level of zen lisp-ness.

nicferrier commented 10 years ago

Oh. Another suggestion would be to search the marmalade/archive-cache. That would probably be slower again though:

(let ((search-term "eln"))
  (--filter
   (let ((k (car it))
         (v (cdr it)))
     (or
      (string-match-p search-term k)
      (string-match-p search-term (elt (cdr v) 2))))
   (kvhash->alist marmalade/archive-cache)))
nicferrier commented 10 years ago

Even better:

(let ((search-term "eln"))
  (->> (kvhash->alist marmalade/archive-cache)
    (--filter
     (let ((k (car it))
           (v (cdr it)))
       (or
        (string-match-p search-term k)
        (string-match-p search-term (elt (cdr v) 2)))))
    (--map (car it))))
bostonaholic commented 9 years ago

Any timeline to when we're able to search for packages hosted on marmalade?