freenode/#lisp - IRC Chatlog
Search
9:45:55
no-defun-allowed
after breaking the habit of pressing Q at sldb, i finally hot patched a function
10:49:35
pjb
beach: the use of python is mostly promoted by the existance of a lot of libraries that people want to use (like, say, tensorflow). What's a shame is that most of those libraries are not even written in python, but in C or C++, and python only provides a FFI to them.
10:50:42
pjb
So, professionaly, people don't go "I'll use python". They go "I'll use tensorflow; what language can I use it with? C++ or Python? ok, Python!"
10:51:33
pjb
Of course, after a while, they will regret python. And either they're locked in for legacy code or other depenendencies, or they switch with horror to C++, because they have to.
10:57:44
beach
Maybe, but again, I didn't make myself understood. I decided on Python for a very, very short initial course, for several reasons:
10:57:48
beach
1. Because any traditional language such as C, C++, or Fortran would have been impossible to cover in that short a period of time.
10:57:54
beach
2. Because Common Lisp or Scheme would not have been acceptable to the scientists, and they would have vetoed it.
10:58:03
beach
4. The initial course was meant to inform the students (who had not yet chosen their domain) what it could be like to choose CS.
10:59:21
beach
6. I told the scientists that this choice was not ideal for CS, but Python is used by scientists, so I made the choice for them.
11:05:17
pjb
And it's dangerous to use it as initial programming language, because 90% of the people won't learn anything else, 99% of the people don't understand or remember conditions such as: "initial formation, use something else for CS learning or professional work".
11:05:56
pjb
Just look how the conditions of applications of mathematical theorems or physical laws are entirely ignored all the time!
11:06:50
pjb
"Free energy cannot exist because of thermodynamics!" But there is no closed system in this universe! We are not even sure the universe itself is not a closed system!
11:07:58
goats_gallore
pjb: because it has lots of very useful libraries to save time from rewriting them in lisp. it also has c-bindings to tensorflow, and is probably on the path to becoming somewhat homoiconic
11:08:42
pjb
Indeed. If you want to compete with CL, you will have either to be better on those points, or compete on another plan.
11:09:41
pjb
Python clearly benefits from the same effect as C: it's so bad, that to make it work you need a lot of community resources (the PIP, the libraries, the tutorials, the pitfalls lists, etc).
11:10:41
goats_gallore
those resources save tons of developer time and allow said developer to get to the heart of their actual problem quicker. i would call that a positive
11:11:41
pjb
And honestly, everytime you ask questions eg. on irc, you will eventually have to find the answer yourself (if not a newbie question).
11:13:49
goats_gallore
if someone made a binding to tensorflow for SBCL or some often used implementation of lisp, i imagine there would maybe be a small surge in lisp users
11:15:17
pjb
The only problem here, is that library authors have developped the python binding themselves (and they're people like Google, so they don't lack resources to do it), while the CL bindings will have to be developed by ourselves without any resource.
11:15:44
pjb
goats_gallore: the point is 1- to explain why python is "popular", and 2- give a hint on how CL could become more popular.
11:16:42
pjb
goats_gallore: basically, step 1: earn a lot of money, step 2: hire a lot of lispers to develop libraries or interfaces to libraries, and killer applications.
11:17:22
pjb
Take for example ubuntu. It's become more popular than debian. Easy, when you have a South African billionnaire backing a corporation to develop it paying an army of programmers.
11:17:27
goats_gallore
i believe there are languages communities that have made a library for binding to tensorflow successfully. not sure why the common lisp community hasn't
11:21:04
goats_gallore
other than macros though, what is left for python to overcome to be at parity or, in some regards, superior to lisp by now
11:21:50
pjb
scopes, closures, multi-line anonymous functions, reader macros, compiler macros, a lot of things.
11:22:34
goats_gallore
would macropy not cover your macro category there https://github.com/lihaoyi/macropy
11:24:03
pjb
There's no read-time in python. You cannot do something like (defparameter *foo* '( #.(+ 1 2) 3)) *foo* #| --> (3 3) |#
11:56:37
zigpaw
global interpreter lock is I think one very serious python limitation also; it is not only about language features I think.
12:01:51
random-nick
yeah, python will never overcome CL because it has tons of unfixable design mistakes
14:17:32
dim
it's funny you mention python2/3, that thing drove me to using Common Lisp and rewriting pgloader, back then a Python 2 software, into CL
15:58:06
_spm
Hi all. Trying to clear up a little fuzzy thinking on my part. I'm trying to store an accessor in a variable so I can later call it, but I'm not sure exactly how to pull this off. Trying to (setf (funcall my-accessor obj) val) gives me "(setf funcall) is undefined". I'm sure there is a way to do this, and am hoping someone can straighten me out.
15:59:53
dim
/Users/dim/dev/yesql/src//tools/bin/sqli book.md build/book.md -- sigreturn returned ; that's still the CCL bugs in OSX Mojave :/
16:07:33
_spm
I tried to get cute and store some comparators and accessors in variable to prevent duplicating code, but the result is pretty messy from a readability standpoint.
16:28:47
dim
uiop from asdf made it easy for this little tool of mine to work with SBCL too, so at least I'm not stucked
17:13:54
jcowan
Where in the CLHS is described the meanings of +, ++, +++, *, **, etc.? I need to cite them.
18:25:44
emaczen
jcowan: If you use emacs, it is pretty nice to install the info pages for GCL (which is just the same as the hypersepc AFAIK) then you can C-s and C-r through the documentation
18:34:31
jcowan
I don't use emacs (I am an `ex` troglodyte, not to be confused with an ex-troglodyte), but I can use the stand-alone info client, more or less.
18:35:11
pjb
_spm: congratulation: you've discovered that accessors are not first class objects in CL. readers and writers are; they are functions. Accessors are informal pairs of functions. not lisp object.
19:08:29
beach
another-user: Imagine that you are the supplier of a library for manipulating geometric figures. You supply the root class geometric-figure and perhaps a few special cases like circle and square.
19:08:53
beach
another-user: There are four operations possible, rotate, scale, move, and bounding-rectangle.
19:09:27
beach
Your clients supply more specific classes like polygon, ellipse, etc. And they write methods on the generic functions representing the operations.
19:10:12
beach
another-user: In version 2, you want to take advantage of the fact that the bounding-rectangle operations is WAY more often used than the others.
19:11:28
beach
another-user: You also add a Boolean slots bounding-rectangle-valid-p, initially set to nil.
19:11:57
beach
another-user: You write :AFTER methods on rotate, scale, move that set the Boolean slot to nil.
19:12:54
beach
another-user: You add an :AROUND method, also with the root class as a specializer. It checks the Boolean slot, and if it is TRUE, it returns the cached value.
19:13:35
beach
If it is NIL, you invoke (CALL-NEXT-METHOD) to compute the bounding rectangle, you store the result and set the Boolean slot to TRUE.
19:14:12
beach
another-user: You can't do that without auxiliary methods unless you also change the interface.
19:15:08
beach
another-user: I am usually not here after 19:00 UTC+1, so I am off to spend time with my (admittedly small) family.
19:51:39
another-user
beach: thank you for great and detailed explanation, it's really nice example!