If only Jid & jq could get married <3 :)
Jid – Drill down JSON data incrementally
41–50 of 55 posts
Re: Jid – Drill down JSON data incrementally
#42Earlier quoted context omitted.
If LISP had a widely-accepted standard, non-turing-complete subset to represent the equivalent persisted data structures JSON does, it would still be less readable than JSON. There are reasons JSON is the lingua franca of modern API interaction and LISP is not.
Whatever example I give you're just going to complain that it's not widely accepted because it's not JSON/YAML/XML. Since just about every scripting language uses similar syntax to JSON there's an argument to be made that familiarity is the most important characteristic. However, that doesn't mean that LISP is unfit for the job from a technical perspective. If we're going to start evaluating JSON as code then there's…
Don't rely on first and last names. Also, the age keeps changing, store a date (unless the age is what the user inputs, and is later converted to a date).
(#1=(person ...)
#2=(person ...)
(person
:names ("John Smith")
:date-of-birth @1993-10-04T05:03:00.000000+01:00
:parents (#1# #2#)))Re: Jid – Drill down JSON data incrementally
#43The JSON crowd is re-inventing LISP. Originally, JSON was a subset of what you could pass to "eval()". Yesterday, state machine programming in JSON. Today, an inspector.
Except JSON has a huge advantage Lisp doesn't: it's close to, or in some cases identical to, the data-structure syntax of several popular programming languages. Lisp's particular s-expression syntax is not close to or identical to any programming language other than Lisp. In other words: once you decide you don't want to program in Lisp, Lisp's way of representing data stops being a useful syntax for representing you…
It's close to the Lisps, Scheme, Racket, Clojure, and many others.
You are correct that the popularity of Ruby, Python, and JavaScript has eclipsed the popularity of these languages, and so the popularity of JSON has eclipsed that of s-expressions.
Re: Jid – Drill down JSON data incrementally
#44Ok, I've just hacked a version of this that uses jq[0] underneath, so you can do all the sorts of fancy queries jid originally doesn't support: https://github.com/fiatjaf/jiq [0]: https://stedolan.github.io/jq/manual/
Re: Jid – Drill down JSON data incrementally
#45Earlier quoted context omitted.
Except JSON has a huge advantage Lisp doesn't: it's close to, or in some cases identical to, the data-structure syntax of several popular programming languages. Lisp's particular s-expression syntax is not close to or identical to any programming language other than Lisp. In other words: once you decide you don't want to program in Lisp, Lisp's way of representing data stops being a useful syntax for representing you…
> not close to or identical to any programming language other than Lisp. It's close to the Lisps, Scheme, Racket, Clojure, and many others. You are correct that the popularity of Ruby, Python, and JavaScript has eclipsed the popularity of these languages, and so the popularity of JSON has eclipsed that of s-expressions.
Re: Jid – Drill down JSON data incrementally
#46Earlier quoted context omitted.
As I said: if I wanted to write Lisp I'd write Lisp . I've already chosen not to write Lisp. I have no incentive to make my language parse Lisp when something much closer to my preferred language's data structure syntax is available. The mere fact that a solution exists for a problem does not mean it is the best possible solution for all possible people in all possible cases, nor that there can never be a reason to d…
I didn't say it is the best solution in all possible cases. Just that even if you choose not to write Lisp, using a data format that follows Lisp's approach is not a stupid thing to do. > Undervaluing this realization (and worse, reacting smugly when interacting with people who don't share your undervaluing of this) is a big part of the gulf between Lispers and the rest of the world. You are the one setting the tone…
Except this is basically how Lisp people react to things. "Oh, why didn't they use Lisp's version of this, it's existed for decades" is a common -- and, let's face it, "Smug Lisp Weenie" exists as a phrase for a reason -- reaction. Lisp people believe Lisp is the greatest thing since sliced bread. It works for them. And that's not a bad thing!
What is a bad thing is the endless haranguing of everyone else about why we won't just do everything the Lisp way. Data serialization formats tend to bring this tendency out pretty badly, as the Lispers show up to essentially ask why anyone bothered to invent anything else after s-expressions.
Re: Jid – Drill down JSON data incrementally
#47Earlier quoted context omitted.
> not close to or identical to any programming language other than Lisp. It's close to the Lisps, Scheme, Racket, Clojure, and many others. You are correct that the popularity of Ruby, Python, and JavaScript has eclipsed the popularity of these languages, and so the popularity of JSON has eclipsed that of s-expressions.
Scheme, Racket and Clojure are all Lisp-family languages if not arguably Lisps in and of themselves.
https://en.wikipedia.org/wiki/List_of_C-family_programming_l...
I don't see where checkbox ticking will get us.
Re: Jid – Drill down JSON data incrementally
#48Earlier quoted context omitted.
Scheme, Racket and Clojure are all Lisp-family languages if not arguably Lisps in and of themselves.
By that token, JavaScript and PHP are C-family languages https://en.wikipedia.org/wiki/List_of_C-family_programming_l... I don't see where checkbox ticking will get us.
It should be unsurprising that languages which have adopted Lisp's syntax/programming model to a larger degree will also naturally find Lisp's syntax/programming model to work for them, while languages that haven't... won't.
Re: Jid – Drill down JSON data incrementally
#49Earlier quoted context omitted.
By that token, JavaScript and PHP are C-family languages https://en.wikipedia.org/wiki/List_of_C-family_programming_l... I don't see where checkbox ticking will get us.
They are C-family languages. It should be unsurprising that languages which have adopted Lisp's syntax/programming model to a larger degree will also naturally find Lisp's syntax/programming model to work for them, while languages that haven't... won't.
Re: Jid – Drill down JSON data incrementally
#50Ok, I've just hacked a version of this that uses jq[0] underneath, so you can do all the sorts of fancy queries jid originally doesn't support: https://github.com/fiatjaf/jiq [0]: https://stedolan.github.io/jq/manual/