newLISP Fan Club

Forum => newLISP in the real world => Topic started by: hilti on May 08, 2013, 04:49:15 AM

Title: newLISP and big data?
Post by: hilti on May 08, 2013, 04:49:15 AM
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



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
Title: Re: newLISP and big data?
Post by: cormullion on May 08, 2013, 07:58:39 AM
Don't think so - the #f is Scheme/Lisp isn't it?
Title: Re: newLISP and big data?
Post by: jopython on May 09, 2013, 10:39:28 AM
The function definition tells me it is not newlisp



(define string-row *stream*)
Title: Re: newLISP and big data?
Post by: cormullion on May 09, 2013, 10:46:26 AM
That could be a symbol definition though...?
Title: Re: newLISP and big data?
Post by: rickyboy on May 09, 2013, 11:18:11 AM
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.
Title: Re: newLISP and big data?
Post by: rickyboy on May 09, 2013, 12:08:49 PM
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

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