Page 1 of 1

newLISP and big data?

Posted: Wed May 08, 2013 11:49 am
by hilti
Hi!

I've just come across this blog post and wondered if the Gist shown there is newLISP? Because the use of (nth) looks pretty familiar to me.

http://blog.bugsense.com/post/499247554 ... me-android

What Do You think?

Code: Select all

(load "stdlib.lql")
(load "dblib.lql")
 
(timespace "day")
 
(define string-row *stream*)
 
(let ((row (reverse
            (string-split (str string-row) ":"))))
  (if (= (length row) 4)
    (begin
      (let ((os-ver (nth row 0))
            (phone-model (nth row 1))
            (error-class (nth row 2)))
      (incdb "sessions" 1)
      (incdb (session-by "osver" os-ver) 1)
      (incdb (session-by "device" phone-model) 1)
      (incdb (session-by "error" error-class) 1)
      (incdb (session-by-crash "os_ver_class" os-ver error-class) 1)
      (incdb (session-by-crash "device_class" phone-model error-class) 1)
 
      (push! (unique "os_ver") os-ver)
      (push! (unique "device") phone-model)
      (push! (unique "error_class") error-class)))
      #f))

Update:
A full blown custom LISP language written in C to implement queries, which is many times faster that having a VM (with a garbage collector) online all the time
http://highscalability.com/blog/2012/11 ... -mobi.html

Re: newLISP and big data?

Posted: Wed May 08, 2013 2:58 pm
by cormullion
Don't think so - the #f is Scheme/Lisp isn't it?

Re: newLISP and big data?

Posted: Thu May 09, 2013 5:39 pm
by jopython
The function definition tells me it is not newlisp

(define string-row *stream*)

Re: newLISP and big data?

Posted: Thu May 09, 2013 5:46 pm
by cormullion
That could be a symbol definition though...?

Re: newLISP and big data?

Posted: Thu May 09, 2013 6:18 pm
by rickyboy
There are some "tells" in the code that says it's not newLISP.

1. Their nth has its arguments reversed as compared to newLISP's nth.

2. They're using #f for boolean false (ostensibly).

3. Their push! is newLISP's push (ostensibly).

4. Their string-split is newLISP's parse (probably).

5. Their str is newLISP's string (ostensibly).

There could be more.

Re: newLISP and big data?

Posted: Thu May 09, 2013 7:08 pm
by rickyboy
hilti wrote:Update:
A full blown custom LISP language written in C to implement queries, which is many times faster that having a VM (with a garbage collector) online all the time
http://highscalability.com/blog/2012/11 ... -mobi.html
Nice article, Marc! Their solution is even more badass given the fact that they pursued such an economical but still very powerful way to store and query their data. Thanks for sharing! --Rick