freenode/#lisp - IRC Chatlog
Search
21:12:56
akkad
I was recommending (ql:quickload :pgloader) as it will do the right thing, and give better errors on missing dependencies
21:16:07
pjb
desperek: don't suffer. If you've got a lisp job, resign. Stop using lisp. There are a lot of other nice programming languages.
21:19:16
desperek
pjb, well, the thing is that i couldnt really find anything to convert db (or w/e i should call it) and pgloader looked really promising
21:19:54
pjb
I thought dimitri was providing commercial support for his pgloader. You may try to contact him directly.
21:22:35
aeth
Depends on the distro. I think the only non-implementation CL thing in Fedora is maxima
4:41:46
phoe
theemacsshibe[m]: (cond ((acquire-lock lock :wait-p nil) (release-lock lock) t) (t nil))
4:42:33
theemacsshibe[m]
didn't think about using acquire like that, thought there'd be an acquired-lock-p or something
4:43:48
phoe
The state of the lock can change betweeen evaluating the condition and one of (FOO) (BAR)
6:14:27
flip214
phoe: also, the state of the lock might change while your COND is returning T ... or at any later point as well, so IMO a LOCK-ACQUIRED-P would be okay.
6:14:53
flip214
after all, your COND can just be put in a (DEFUN LOCK-ACQUIRED-P (lock) ... ), right?
7:55:17
minion
dadabidet: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
7:55:40
jackdaniel
fact that something has a compiler doesn't mean you can't use it interactively with REPL
7:56:06
jackdaniel
the distinction is that compiler takes your code, performs some optimizations and outputs target bytecode (be it binary or some bytecode)
8:03:25
jackdaniel
kuribas: I don't know basic, so I can't tell. but you may check out tagbody/go syntax and decide yourself
8:04:10
jackdaniel
kuribas: tagbody/go is usually used in macros which implement better abstraction on top of this
8:07:04
jackdaniel
dadabidet: in lisp form is either an atom or a list. some atom examples: `3 "string" symbol nil #(1 2 3) T', some list examples: (1 2 3) (foo 1 2) nil
8:08:04
jackdaniel
for the evaluation rule I'd suggest looking into some basic tutorial or a book (SICP is a good one, targetting scheme though)
8:08:34
jackdaniel
but in code ` means backquote, which has some special characteristics, while ' means just quote
8:08:56
jackdaniel
that's why reading short tutorial is a good idea, you don't expect to learn basic from stranger on irc, do you? :-)
8:09:51
jackdaniel
because random strangers usually are busy with their own endavours, that's why they end up with writing tutorials eventually
8:10:29
jackdaniel
chapter or two from PCL should take you around an hour or two. after doing it you should have basics grasped
8:10:52
jackdaniel
book "ANSI Common Lisp" by Paul Graham is another book which introduces you to the basics in first chapter
8:12:22
jackdaniel
this looks not-so-bad, though the author got some indentation wrong: https://maxtimkovich.com/lisp_tutorial
8:17:17
jackdaniel
bear in mind that I'd still recommend reading first chapter or two of the mentioned books instead of going through that
8:19:14
shrdlu68
dadabidet: You could check out examples on rosettacode and compare c/c++ to CL examples. But you'll still have to look up explanations for things you don't understand.
8:33:58
beach
dadabidet: Did you have any reasons to believe that Common Lisp could not be used for high-performance programs?
8:35:55
dadabidet
well it was not about lisp, weirdly, but about functional programming... https://en.wikipedia.org/wiki/Functional_programming#Efficiency_issues
8:38:38
beach
kuribas: Yes, because if it were, I could not use the excellent object-oriented capabilities that I have gotten so used to.
8:39:05
dadabidet
https://en.wikipedia.org/wiki/Lisp_(programming_language) wikipedia says it's functional
8:39:35
beach
kuribas: I am using "functional programming language" in the sense that mutation is not allowed.
8:40:03
dadabidet
although language classification are not very precise. and the paragraph about functional not being fast sounds weird
8:40:41
dadabidet
kuribas, not in pure functional, which is used in multithreaded? or high performance?
8:41:27
kuribas
dadabidet: it is controlled, and pure functions are separated from side-effecting procedures.
8:43:48
shrdlu68
By wikipedia's definition, almost all languages are support the "functional" style.
8:44:19
beach
kuribas: That makes absolutely no sense. If you mutate something, then by definition it is not unmodified.
8:47:03
dadabidet
My brain has trouble with lisp because since the brace is the mostly used separator, my brain has to build a hierarchy which is visually harder to see
8:47:44
kuribas
dadabidet: the idea is that you can look at a function signatures, and know if it does side effects or not.
8:48:23
shrdlu68
dadabidet: You're not alone in that, but you'll get used to it, if you give it a try. Not "used to it" in the "put up with it" sense but "get it".
8:49:40
shrdlu68
dadabidet: There's a symmetry and uniformity to lisp syntax that makes it one of the language's most endearing features for me.
8:50:21
beach
kuribas: We write it "Lisp" these days. If you write "LISP", people will think of 1960s dialects.
8:52:48
jackdaniel
kuribas: copying argument first and mutating it gives you referential transparency, not a "pure" function
8:54:44
shrdlu68
dadabidet: Compare: https://gist.github.com/shrdlu68/f13ffcfb25f34e4aea960854c7537ada
8:56:55
kuribas
jackdaniel: the type system ensures that the "mutated" array cannot escape the function.
8:58:30
shrdlu68
dadabidet: It gets especially ugly when the the or statements don't fit on the same line in C-style syntax.
9:01:31
shrdlu68
dadabidet: Certainly, but observe what happens: https://gist.github.com/shrdlu68/22bcc02e164199f90febe70b5eadebc5
9:02:53
jackdaniel
I've checked some sources. given wikipedia definition you are right, given haskell, ANSI CL (book), hackernoon and fpcomplete.com description you are not
9:04:06
jackdaniel
(that is, wikipedia seems to make both therm "pure function" and "referentially transparent function" semantically the same, while other sources claim, that "pure function" doesn't have side effects *at all* in its definition in opposition to referentially transparent function, which may mutate some copied variables)
9:05:56
jackdaniel
there is also interesting discussion in SICP about side effects in languages which are compiled and executed on a computer - under the hood (but really under the hood) function execution takes time, makes processor warmer etc, so you can't really claim side-effect fee
9:06:15
shrdlu68
dadabidet: But because most people are not introduced to s-expressions until they have throroughly adapted to parsing C-style code, they find it jarring.