newLISP and big data?

Started by hilti, May 08, 2013, 04:49:15 AM

Previous topic - Next topic

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/49924755479/bigdata-in-motion-building-a-real-time-android">//http://blog.bugsense.com/post/49924755479/bigdata-in-motion-building-a-real-time-android



What Do You think?



(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:
QuoteA 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/26/bigdata-using-erlang-c-and-lisp-to-fight-the-tsunami-of-mobi.html">//http://highscalability.com/blog/2012/11/26/bigdata-using-erlang-c-and-lisp-to-fight-the-tsunami-of-mobi.html
--()o Dragonfly web framework for newLISP

http://dragonfly.apptruck.de\">http://dragonfly.apptruck.de

cormullion

#1
Don't think so - the #f is Scheme/Lisp isn't it?

jopython

#2
The function definition tells me it is not newlisp



(define string-row *stream*)

cormullion

#3
That could be a symbol definition though...?

rickyboy

#4
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.
(λx. x x) (λx. x x)

rickyboy

#5
Quote from: "hilti"Update:
QuoteA 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/26/bigdata-using-erlang-c-and-lisp-to-fight-the-tsunami-of-mobi.html">//http://highscalability.com/blog/2012/11/26/bigdata-using-erlang-c-and-lisp-to-fight-the-tsunami-of-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
(λx. x x) (λx. x x)