Live data from Hacker News

Common Lisp Koans

github.com

21–30 of 35 posts

Re: Common Lisp Koans

#21
post #4

Earlier quoted context omitted.

https://google.github.io/styleguide/lispguide.xml

Thanks!, I had not seen the style guide. As someone else said, this probably comes from Google’s purchase of ITA. Common Lisp is stable, well documented, many fine implementations so I find it odd that there are only pockets of developers/companies who use it. Similar situation with Haskell.

It is definitely curious. Whenever I mention Common Lisp is my preferred language people start talking to me as if I'm some wizard from another dimension. That, or stupid parenthesis jokes.

It really has an image problem.

I always try to explain that I like Common Lisp because it is an easy and very practical language, but the people I talk to that have no experience in it think it is very hard and impractical. I think the latter is because of university courses where one is not allowed to use the full power of the language.

Re: Common Lisp Koans

#22
post #6

Earlier quoted context omitted.

Thanks!, I had not seen the style guide. As someone else said, this probably comes from Google’s purchase of ITA. Common Lisp is stable, well documented, many fine implementations so I find it odd that there are only pockets of developers/companies who use it. Similar situation with Haskell.

Low popularity, meaning it's much more difficult to find employees proficient in it, making it a bad proposition for companies... which keeps it unpopular. The vicious cycle of fashion.

If such vicious cycles were true no new programming language would gain adoption; after all even Java was "a new language" at some point of time.

Re: Common Lisp Koans

#23

Currently working through these to learn Common Lisp after being introduced to the language as part of a college CS class, can definitely recommend them along with Practical Common Lisp [0] and Let Over Lambda [1]. 0: http://www.gigamonkeys.com/book/ 1: https://letoverlambda.com/

Although I am far for being a good Lisp programmer, I wouldn't recommend introducing Let Over Lambda (or anything about advanced macro programming) too early in anyone's learning curve.

For a comparable price (at least, when I bought them), Common Lisp Recipes might be a far better companion to PCL for an intermediate Common Lisp programmer.

Re: Common Lisp Koans

#24

Currently working through these to learn Common Lisp after being introduced to the language as part of a college CS class, can definitely recommend them along with Practical Common Lisp [0] and Let Over Lambda [1]. 0: http://www.gigamonkeys.com/book/ 1: https://letoverlambda.com/

Although I am far for being a good Lisp programmer, I wouldn't recommend introducing Let Over Lambda (or anything about advanced macro programming) too early in anyone's learning curve. For a comparable price (at least, when I bought them), Common Lisp Recipes might be a far better companion to PCL for an intermediate Common Lisp programmer.

Also see PAIP: https://github.com/norvig/paip-lisp

Re: Common Lisp Koans

#25
post #6

Earlier quoted context omitted.

Low popularity, meaning it's much more difficult to find employees proficient in it, making it a bad proposition for companies... which keeps it unpopular. The vicious cycle of fashion.

If such vicious cycles were true no new programming language would gain adoption; after all even Java was "a new language" at some point of time.

What Java helped was the big pockets of SUN / later Oracle, because it was their language. Initially for small machines, it then helped them to sell lots of hardware into the 'enterprise' running slow (but portable) Java applications.

Re: Common Lisp Koans

#26

Earlier quoted context omitted.

Not to mention almost all US based carriers and many others use ITA's flight search service to power their own (the carriers') websites. They can't search in the data they created, so they have to pay ITA. The data is complicated and many-sourced. Fares and rules come out of ATPCO. Flights are separate from a different supplier. Seat availability is a massive collection of data morphing at 10 Hz, and it has nothing t…

>"Not to mention almost all US based carriers and many others use ITA's flight search service to power their own (the carriers') websites. They can't search in the data they created, so they have to pay ITA." Can you say why aren't carriers able to search in the data they created without using ITA?

Exactly.

You have to realize the difference between a "pricing search" and a "low fare search", to use ITA terminology.

A "pricing search" knows which specific flights it goes through and you just find the fares (keep in mind the carriers file like 600 fares for planes with 20 seats). The airlines could always do that. Before ITA came along in 2001 or so that is what you were waiting on in the travel agency while the agent tries different flight combinations by hand.

"Low fare search" is also finding the flights. The carriers could not generally do that without ITA. There are exceptions such as Southwest which had a fare structure more like buses that kept the combinatorics down.

But in addition to the immense amounts of fare and rule data that pile on your if you search 400 itineraries out * 400 back you also have the seat availability system. No carrier had (probably has) a system that can answer the amount of "seat" queries that a single low fare search causes.

Keep in mind "seat availability data" has nothing to do with what seats are available. It is a high-frequency (10 Hz or whereabouts) way to turn fares on and off.

Re: Common Lisp Koans

#27
post #9
post #8

Earlier quoted context omitted.

Interesting! I wonder why ITA never offered a search engine themselves, if they had all the data aggregated. And boy do I love dealing with invalid CSVs... (especially ones that contain commas within the fields by accident)

They did! Matrix.itasoftware.com

I want it noted that this thing is really neat — you can provide parameters like min layover of 2 hrs, or 2 weeks, and even search only within a particular airline alliance

Re: Common Lisp Koans

#28

Earlier quoted context omitted.

>"Not to mention almost all US based carriers and many others use ITA's flight search service to power their own (the carriers') websites. They can't search in the data they created, so they have to pay ITA." Can you say why aren't carriers able to search in the data they created without using ITA?

Exactly. You have to realize the difference between a "pricing search" and a "low fare search", to use ITA terminology. A "pricing search" knows which specific flights it goes through and you just find the fares (keep in mind the carriers file like 600 fares for planes with 20 seats). The airlines could always do that. Before ITA came along in 2001 or so that is what you were waiting on in the travel agency while the…

Interesting. Thanks for the reply.

>"A "pricing search" knows which specific flights it goes through and you just find the fares (keep in mind the carriers file like 600 fares for planes with 20 seats)."

Wow why so many? This seems excessive?

Could you elaborate on:

>"But in addition to the immense amounts of fare and rule data that pile on your if you search 400 itineraries out * 400 back you also have the seat availability system. No carrier had (probably has) a system that can answer the amount of "seat" queries that a single low fare search causes."

I didn't understand the "400 itineraries out * 400 back you also have the seat availability system" part. I din't understand the math and how it enables a "seat availability" system.

Lastly are all of the limitation really due the legacy Sabre booking system that the carriers all use? I guess I didn't realize what a huge innovation ITA was.

Re: Common Lisp Koans

#29
post #3

Always curious as to why Google hosted/created these, anyone know why? I wasn't aware of Google using Common Lisp.

ITA Software — the company that wrote the engine behind Orbitz, Kayak, etc. and now runs Google Flights — was acquired by them a while back.

Paul Graham wrote about the advantages ITA had by using Lisp, interestingly enough.

http://www.paulgraham.com/icad.html

Re: Common Lisp Koans

#30

Earlier quoted context omitted.

Exactly. You have to realize the difference between a "pricing search" and a "low fare search", to use ITA terminology. A "pricing search" knows which specific flights it goes through and you just find the fares (keep in mind the carriers file like 600 fares for planes with 20 seats). The airlines could always do that. Before ITA came along in 2001 or so that is what you were waiting on in the travel agency while the…

Interesting. Thanks for the reply. >"A "pricing search" knows which specific flights it goes through and you just find the fares (keep in mind the carriers file like 600 fares for planes with 20 seats)." Wow why so many? This seems excessive? Could you elaborate on: >"But in addition to the immense amounts of fare and rule data that pile on your if you search 400 itineraries out * 400 back you also have the seat avai…

I would say the lack of limitations is the problem.

Quoting from my notes for my 2006 conference talk:

The Easter Island west of Chile has - One flight departing today, one flight arriving today. Friday there was no flight at all. - fares touching Easter Island covering this flight: 1432 published, 160,000 constructed

Apparently I didn't count fare-by-rule fares. Yes they have 2 mechanisms to make up fares during the query.

The rules are complicated. In fact Turing-complete. So you can have unlimited number of fares, too.

"400x400 itineraries" means you construct 400 ways to get to the destination and 400 ways to get back, for a round-trip which is what most people search for. So if you go Boston-Hamburg all the intermediate airports cause variants. The same flight at a different time is different and causes a new itinerary. So this is really not as deep a search as you would think.

When I abused my testing rack at ITA to search for flights home (Hamburg), I used 3500x3500 itineraries (using a specially compiled QPX with limits raised). Rarely but occasionally it would find obscure flights that would make it cheaper, flights not covered by regular limits.

Post reply on HN