tag:blogger.com,1999:blog-6508797467947601724.post6101353996848059915..comments2023-09-16T11:35:50.154-04:00Comments on smuglispweeny: Ooh! Ooh! My turn! Why Lisp?Kenny Tiltonhttp://www.blogger.com/profile/17430816457662806163noreply@blogger.comBlogger46125tag:blogger.com,1999:blog-6508797467947601724.post-39145554145594313752016-08-01T11:22:28.882-04:002016-08-01T11:22:28.882-04:00I'm writing this comment a bit late, but there...I'm writing this comment a bit late, but there is a language, started around ~2000, and revisited recently, which operates it's own code as data (called `block`) and vice versa. It's called REBOL, and modern reincarnation is Red.Anonymoushttps://www.blogger.com/profile/17830188390738462013noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-26672636108217102432008-03-03T01:38:00.000-05:002008-03-03T01:38:00.000-05:00Thanks for the link!Thanks for the link!Dysmashttps://www.blogger.com/profile/06234046154576035909noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-62807129221352290302008-03-02T15:04:00.000-05:002008-03-02T15:04:00.000-05:00Using Eric Marsden's (link: http://www.chez.com/em...Using Eric Marsden's (link: http://www.chez.com/emarsden/downloads/) postgres library, connecting to a database looks like this:<BR/><BR/>(with-pg-connection (conn "testdb" "login" :host "dbhost" :password "secret")<BR/> (with-pg-transaction conn<BR/> (when (member "test_date" (pg-tables conn) :test #'string=)<BR/> (pg-exec "DROP TABLE test_date"))<BR/> (pg-exec conn "CREATE TABLE test_date(a timestamp, b abstime, c time, d date)")<BR/> (pg-exec conn "INSERT INTO test_date VALUES "<BR/> "(current_timestamp, 'now', 'now', 'now')")))Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-82102652195843464732008-03-01T15:34:00.000-05:002008-03-01T15:34:00.000-05:00I wish discussions on practicality of Lisp came wi...<I>I wish discussions on practicality of Lisp came with more practical examples and tutorials. And since we have a Lisp application programmer...</I><BR/><BR/>Right, but the post to which you are responding says the first thing to understand is that Lisp works like any other language, so I have a couple hundred KLOC to offer.<BR/><BR/>You may need to be more specific. :)<BR/><BR/>Or check out this on-line book (you might like the title):<BR/><BR/>http://www.gigamonkeys.com/book/Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-65894448926475891972008-03-01T14:09:00.000-05:002008-03-01T14:09:00.000-05:00Did my last replay go through?Anyway, I'm sorry, I...Did my last replay go through?<BR/><BR/>Anyway, I'm sorry, I didn't want to appear hostile. I'm in the process of learning Lisp and MythMoth's post clicked with how I'm currently feeling: I wish discussions on practicality of Lisp came with more practical examples and tutorials. And since we have a Lisp application programmer, I just had to bring it up :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-60669916693160021352008-02-29T03:18:00.000-05:002008-02-29T03:18:00.000-05:00T, I do not mean to be unresponsive, but MythMoth ...T, I do not mean to be unresponsive, but MythMoth asked about practical stuff like libraries for Web apps and SQL access and I answered him.<BR/><BR/>Er, come again?<BR/><BR/>Had you not confused me thus, I would have said great minds think alike because I gots to get back to work on my Algebra software and it occurred to me I could keep this blog going by chatting about issues (code) as they came up.<BR/><BR/>Just remember, you still have to deconfuse me. :)Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-72633322985772717912008-02-29T03:01:00.000-05:002008-02-29T03:01:00.000-05:00MythMoth makes a good point. If the Lisp advocates...MythMoth makes a good point. If the Lisp advocates want to convince non-Lispers that Lisp is practical, they should offer more practical examples and tutorials.<BR/><BR/>Do you think you can squeeze in a few snippets of your application code? I'd be very interested to see what real-life Lisp looks like.<BR/><BR/>Thanks!Dysmashttps://www.blogger.com/profile/06234046154576035909noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-49695900502165612972008-02-28T18:36:00.000-05:002008-02-28T18:36:00.000-05:00Ok. Show me? Well, actually I don't care about the...<I>Ok. Show me? Well, actually I don't care about the GUI. But I do care about web apps and I do care about databases.</I><BR/><BR/>I will refer you to comp.lang.lisp since I am a dinosaur (and I prefer OODBs and now RDF to relational). The commercial apps all have interfaces to SQL, and CL-SQL is a popular open version. I am actually using Amazon S3 as my database, and if I was not using AllegroCL with its ODB AllegroCache and RDF AllegroGraph I would use CFFI to get to Redland RDF.<BR/><BR/>AllegroCL also has a Webserver (AllegroServe, not sure how they thought of the name) and they made it open source so there is a Portable Aserve, but something code named Hunchentoot (open source) seems to be the open way to go: http://www.weitz.de/hunchentoot/Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-6895665630549233042008-02-28T18:24:00.000-05:002008-02-28T18:24:00.000-05:00re: niftyness of macros, this article tries to con...<I>re: niftyness of macros, this article tries to convey their power: http://www.defmacro.org/ramblings/lisp.html<BR/></I><BR/><BR/>Ha-ha, I started my post on macros (which I probably will not finish cuz it will take like three days to write and everyone wants me back at work on the Algebra software) I began with some C preprocessor macros, the point being, "Why do I even have to <I>explain</I> the need for macros?!!!". :)<BR/><BR/>It also occurred to me that it would be a lot faster to just link everyone to Graham's On Lisp (which I do in just about every post) or other such sites so thanks for the link. But it is a little scary to see someone so enamored of XML. :)Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-9058045405065491422008-02-28T17:26:00.000-05:002008-02-28T17:26:00.000-05:00So where can I find out how to build a really simp...<I>So where can I find out how to build a really simple database backed Lisp web application?<BR/><BR/>I hear a lot about language syntax, clever algorithms, macros, and the like. But I almost never hear someone say how you connect a Lisp app to SQL Server or PostgreSQL and the like.<BR/><BR/>I take you at your word, but I'd love to see some short and sweet explanations of how to achieve this sort of stuff.</I><BR/><BR/>http://www.paragent.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-83391573906496072892008-02-28T11:18:00.000-05:002008-02-28T11:18:00.000-05:00Can you use Lisp for conventional programming? Can...<I>Can you use Lisp for conventional programming? Can it read a database? Can it run a GUI?</I><BR/><BR/>Ok. Show me? Well, actually I don't care about the GUI. But I do care about web apps and I do care about databases.<BR/><BR/>So where can I find out how to build a really simple database backed Lisp web application?<BR/><BR/>I hear a lot about language syntax, clever algorithms, macros, and the like. But I almost never hear someone say how you connect a Lisp app to SQL Server or PostgreSQL and the like.<BR/><BR/>I take you at your word, but I'd love to see some short and sweet explanations of how to achieve this sort of stuff.Davehttps://www.blogger.com/profile/07387139105636752606noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-36595453878803083522008-02-28T08:28:00.000-05:002008-02-28T08:28:00.000-05:00i'm not familiar with ruby but i know it doesn't d...i'm not familiar with ruby but i know it doesn't differentiate between statements and expressions (syntactically at least) which i'm certain is lisp-inspired. no idea about python<BR/><BR/>re: niftyness of macros, this article tries to convey their power: http://www.defmacro.org/ramblings/lisp.html<BR/><BR/>does it succeed? i dunno. it might for some peopleAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-55454494863299450872008-02-28T05:30:00.000-05:002008-02-28T05:30:00.000-05:00btw, while we are waiting for my Ode to Macros one...btw, while we are waiting for my Ode to Macros one could search comp.lang.python for a long thread on "why macros?" several years back involving yours truly and others. Lotsa good groundwork in there.Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-81780538126747750462008-02-27T20:49:00.000-05:002008-02-27T20:49:00.000-05:00The interviewer nodded and JM noticed it.You parse...<I>The interviewer nodded and JM noticed it.</I><BR/><BR/>You parsed it wrong. :) That is not what happened. Think about trials, where witnesses sometimes do what comes naturally and respond by nodding or shaking their heads, then reparse.Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-14768793156290673012008-02-27T20:11:00.000-05:002008-02-27T20:11:00.000-05:00Ok, so maybe I'm an idiot. "He nodded"? Could som...Ok, so maybe I'm an idiot. "He nodded"? Could someone explain why that is so monumental? The interviewer nodded and JM noticed it. What's the big deal?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-4300405137842417392008-02-27T18:32:00.000-05:002008-02-27T18:32:00.000-05:00Python as a language and community is very welcomi...<I>Python as a language and community is very welcoming to newcomers: it's incredibly easy to find, install and get started with. You can create all kinds of applications with it right out of the box. There is no shortage of good documentation, help and community resources.</I><BR/><BR/>You are saying nothing about the language itself, and nothing in principle impossible for another language (like Lisp) as its community grows.<BR/><BR/>In brief, those are commodity advantages. Please note that I am not saying they are not advantages, I am saying they are commodity advantages. Hell, COBOL used to have them.<BR/><BR/><I>Advanced language features like code as data are nice, but they appeal to a subset of potential users.</I><BR/><BR/>There you go again, dissing advantages you do not even understand. See below for my proposed cease fire pending rectification of this gap. <BR/><BR/>Meanwhile, I have an objection: I doubt we can brush "nice advanced features" under the "select few" rug like that. There is no such animal, I submit, no nice feature that only a few will appreciate. <BR/><BR/>There may be heights of abstraction lesser lights may not be able to reach (I once found someone cutting and pasting code because they did not know how to make a function in VAX Basic (an industrial-strength Basic)) but I hope those programmers do not count. :)<BR/><BR/>And there may be <I>disputed</I> nice features such as strong static typing of variables, but where we agree on a feature, a language without must have a deficit compared to one that does, and a deficit for any user.<BR/><BR/><I> Most people just want to get moving on making something.</I><BR/><BR/>And I made clear in my post that getting things made is my bottom line, too.<BR/><BR/>Let's agree to continue after my post on "The Joy of Macros" so we are not talking past each other so badly.<BR/><BR/>ps. As for Ruby vs. Python, fine, but why did Ruby get all those Java/PHP developers when Python if anything was the more established alternative?<BR/><BR/>pps. Yes, I have heard the backlash on Rails, it kinda makes my point that that got Ruby in the mindshare door but something more fundamental kept it there. Why do you think so many of them bypassed Python's more established camp?Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-37369712273915039242008-02-27T18:02:00.000-05:002008-02-27T18:02:00.000-05:00What left you in awe????!"He nodded" Bingo!<I>What left you in awe????!<BR/><BR/>"He nodded" </I><BR/><BR/>Bingo!Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-64143545592475278482008-02-27T17:59:00.000-05:002008-02-27T17:59:00.000-05:00What left you in awe????!"He nodded"What left you in awe????!<BR/><BR/>"He nodded"tynhttps://www.blogger.com/profile/16751755322527738729noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-68410440272970425282008-02-27T16:21:00.000-05:002008-02-27T16:21:00.000-05:00>>(setf open-source 1)1>>(eql (not open-source) ni...>>(setf open-source 1)<BR/><BR/>1<BR/>>>(eql (not open-source) nil)<BR/><BR/>T<BR/>>>Tzury Bar Yochayhttps://www.blogger.com/profile/02659647903545342956noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-70344975765074513612008-02-27T15:50:00.000-05:002008-02-27T15:50:00.000-05:00"OK, fair distinction, but then you have to retrac..."OK, fair distinction, but then you have to retract the "app count" metric as an issue. I mean, it was your metric."<BR/><BR/>People who work in languages that they love languages can't write apps?<BR/><BR/>"Admit it, you have no idea how macros change the programming process."<BR/><BR/>I have seen plenty of people get religious about them yet fail to show people the actual value by using rediculous examples that are solved in an easy manner in other languages. Maybe you could change that?<BR/><BR/>"the concepts "five" and "Michael Jordan" cannot be combined."<BR/><BR/>Sorry--it's an obscure basketball reference. I figured you might know it since you brought His Airness up.<BR/><BR/>"Are you referring to all the space freed up by the exodus to Ruby?"<BR/><BR/>The only exodus I've seen regarding Ruby is from Java and PHP web programmers to Rails. Nobody likes those divas anyway. <BR/><BR/>You must not be paying very close attention: Ruby and Rails has been getting slammed left and right lately.<BR/><BR/>On the contrary, Python usage is on the rise, particularly with the web frameworks. <BR/><BR/>"See? Language features do matter."<BR/><BR/>I agree that they do to an extent, but I don't think the code as data argument is as important as Lispers like to believe.<BR/><BR/>Python as a language and community is very welcoming to newcomers: it's incredibly easy to find, install and get started with. You can create all kinds of applications with it right out of the box. There is no shortage of good documentation, help and community resources. <BR/><BR/>Advanced language features like code as data are nice, but they appeal to a subset of potential users. Most people just want to get moving on making something.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-69388194018756026262008-02-27T15:02:00.000-05:002008-02-27T15:02:00.000-05:00How's that Algebra software coming?Looks like I sh...<I>How's that Algebra software coming?</I><BR/><BR/>Looks like I should make it a blog post of its own, definitely entitled "A Cautionary Whale" with full cred to Diablo. But it is going amazingly well, I am just not working on it though I keep promising myself to resume work tomorrow.<BR/><BR/>I am currently allowing myself to wallow in the perfect solution to creating random Algebra problems. I might have to punt on that to get it out the door. If only I had a deadline to impose some discipline!<BR/><BR/>Hell, today I start work on Eek, an implementation of McCarthy's Elephant 2000. As my one of my fortune cookies says, find another job, program for fun again. <BR/><BR/>The Algebra software is fun, but it <I>has</I> been for a long time and the idea of working on E2K is fresh and fresh always distracts me from boring things like not going broke.Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-6373083243876484842008-02-27T14:51:00.000-05:002008-02-27T14:51:00.000-05:00Java and C++ are/were for people who follow the jo...<I>Java and C++ are/were for people who follow the job trends: people *love* Python and Common Lisp.</I><BR/><BR/>OK, fair distinction, but then you have to retract the "app count" metric as an issue. I mean, it was <I>your</I> metric.<BR/><BR/><I> I'll take "batteries included", a BDFL who aides in keeping the language modern, and terse readable syntax productivity over multiple implentations of abandoned libraries and scattered efforts any day.</I><BR/><BR/>Admit it, you have no idea how macros change the programming process.<BR/><BR/><I>5 Michael Jordans...</I><BR/><BR/>I think you are getting a little too worked up, the concepts "five" and "Michael Jordan" cannot be combined.<BR/><BR/><I> People have voted with their feet and Python has reaped the rewards. </I><BR/><BR/>Are you referring to all the space freed up by the exodus to Ruby?<BR/><BR/>I think Rails started the exodus, but the superiority of Ruby blocks over the joke Python calls lambda sealed the deal.<BR/><BR/>See? Language features do matter.Kenny Tiltonhttps://www.blogger.com/profile/17430816457662806163noreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-4162977261048435972008-02-27T14:40:00.000-05:002008-02-27T14:40:00.000-05:00"I tried to point out in the post to which you hav..."I tried to point out in the post to which you have responded that I am nothing but an application programmer."<BR/><BR/>How's that Algebra software coming? Lisp attracts people that like to talk about telescopes rather than look through them. There's no shortage of people that would rather tell you how they feel than actually accomplish something. Those types of folks are right at home with Lisp.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-47110844324793209572008-02-27T14:32:00.000-05:002008-02-27T14:32:00.000-05:00"And Java and maybe C++ apps outnumber Python apps..."And Java and maybe C++ apps outnumber Python apps even though Python is much better for programming than both. Wrong metric."<BR/><BR/>Java and C++ are/were for people who follow the job trends: people *love* Python and Common Lisp. <BR/><BR/>"When I rave on a language feature such as every form returning a value, it is because it translates into programmer productivity."<BR/><BR/>I'll take "batteries included", a BDFL who aides in keeping the language modern, and terse readable syntax productivity over multiple implentations of abandoned libraries and scattered efforts any day.<BR/><BR/>5 Michael Jordans using Python will best 5 Michael Jordans using Common Lisp on a project built from scratch in just about any problem domain. People have voted with their feet and Python has reaped the rewards.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6508797467947601724.post-39665379819803530192008-02-27T14:12:00.000-05:002008-02-27T14:12:00.000-05:00eh, that stuff about (values) was mine ;) I just w...eh, that stuff about (values) was mine ;) I just wrote reply (repl), but after a while I realized that you got it (oopsed). I'm posting my example anyway because I spend a couple minutes writing it ;)<BR/>CL-USER> (let (list)<BR/> (loop (format t "~& feed-me > ")<BR/> (if (setq list (multiple-value-list (eval (read))))<BR/> (dolist (el list) (print el))<BR/> (format t "~&; No value"))))<BR/><BR/> feed-me > (values 1 2 3)<BR/><BR/>1 <BR/>2 <BR/>3 <BR/> feed-me > (values nil)<BR/><BR/>NIL <BR/> feed-me > nil<BR/><BR/>NIL <BR/> feed-me > (values)<BR/><BR/>; No value<BR/> feed-me > (defun foo () (values))<BR/><BR/>FOO <BR/> feed-me > (foo)<BR/><BR/>; No valueAnonymousnoreply@blogger.com