bea wrote (edited )

A few times a month. Mostly when I need to do something and I'm near my dad's laptop or when I want to play games on my desktop (I still haven't got around to installing GNU/Linux onto it, since it gets used only for gaming and is useless for most other stuff)

Edit: I misread the question, sorry.

I only have to use Windows when helping friends and relatives with computers but this happens only a few times a year.


bea wrote (edited )

Well... I spent the whole night learning basics of Lisp just for this.

I don't regret it though, it's a suprisingly nice language. Probably not for me to use, but I like it as a concept.

(defun my_nth (n list)
  (unless (and (typep n 'integer) (>= n 0))
    (error "~a is not a non-negative integer" n))
  (unless (typep list 'list)
    (error "~a is not a list" n))
  (let ((i 0))
    (loop for item in list do
      (if (= i n)
        (return item)
        (incf i)))))

I actually don't know i how fast it is since I have no idea how to measure time/speed in Common Lisp so you'll have to do that.

Btw, your function didn't work for me. If I put in a list as the second argument it complains on (> n list) that the list isn't a number and If it's a number lower than n it complains on (cdr nl) that it's not a list :)


bea wrote

If you want to create a forum here on Raddle (or other sites running Postmill) do it here.

If you want to setup your own instance then asking in /f/Postmill or Postmill dev channel on Matrix ( might be a better idea. Though you shoud probably read this first and then ask about specific things you have trouble with or don't understand.