freenode/lisp - IRC Chatlog
Search
3:56:23
no-defun-allowed
Although there's 4 variables and 2 equations which probably means it won't have one solution.
3:58:55
no-defun-allowed
ACTION uploaded an image: Screenshot_2018-11-10-14-58-17-1.png (34KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/QsMnLRylzfeImROlCRbGsrRU >
4:00:28
no-defun-allowed
I assume %r_n are gensyms and can be substituted for their respective named variables.
4:04:43
no-defun-allowed
ratsimp doesn't seem to take systems of equations, but it doesn't look too hard to substitute.
5:08:11
ealfonso
I feel sad that in the end, after giving CL a try for web application development, I need to go back and re-learn clojure again
5:19:01
ealfonso
too many JSON libraries and spending too much time trying out different ones and figuring out json=>lisp problems. no built in support for parallelism. hunchentoot's default dispatcher/handler approach doesn't make it very easy to introduce web app middleware or compose apps
5:20:42
ealfonso
the same problems for DB to lisp. also no assurance that libraries are secure and scalable
5:23:30
ealfonso
in clojure there is built-in support for maps, so I don't need to worry too much about json -> clojure or back
5:27:28
ealfonso
all of this could theoretically be solved in CL with equivalent libraries, frameworks, and a community around them, but I feel the momentum is not there. clojure is opinionated but most of the time this means I don't have to create web development infrastructure from scratch and can just learn and adapt to the "right" way of doing things
5:48:53
capadoodle
can I get a macro to create multiple functions at once? or do I have to write a macro to write each variation of the macro?
5:54:16
no-defun-allowed
ealfonso: i wrote "middleware" for hunchentoot yesterday, in the form of magrathea.
5:55:00
no-defun-allowed
you just subclass (easy-)acceptor and do (call-next-method) when you're done.
5:56:05
no-defun-allowed
i haven't had problems with cl-json, cl-who, hunchentoot and bordeaux-threads or lparallel.
6:04:27
ealfonso
in clojure I can use the built-in mapc, but when I look at this I have no idea where to start: https://www.cliki.net/concurrency and may have to spend time evaluating things. I guess lparallel is the most popuplar one, but it's hard to tell. but with clojure I can just rely on concurrency primitives with confidence. with cl-who I was having problems with excessive compilation time and had to switch to static html + JS.
6:08:02
no-defun-allowed
lparallel provides parallel clones of map, remove-if-(not), reduce and sort and probably some more
6:08:42
no-defun-allowed
bt has locks and threads and is a bit more bare but works when lparallel doesn't expose the primitives you need (eg working with generators)
6:09:41
ealfonso
no-defun-allowed I'll give it a try. and maybe I should also try a compiler other than sbcl.
6:36:43
matzy_
why are '(1 2 3) and (list 1 2 3) equivalent, but (list 'a (+ 1 2) 'c) and '('a (+ 1 2) 'c) not?
6:38:15
no-defun-allowed
there's some intrinsics about which can be mutated but that's not too useful right now if that's something on your mind
6:44:43
LdBeth
because LIST means contruct the list each time called, while QUOTE means a constant value
6:50:23
LdBeth
yes, so (list ...) returns new address when called, while the QUOTE form return a fixed address
6:53:22
LdBeth
yes, in foo the same address is passed to nreverse, and in bar each time a new list is constructed with its address passed to nreverse
6:56:22
LdBeth
It may be confusing to see the difference of items that printed the same but in slime you can click the item and usually the address of that item can be seen in the popup window
6:57:43
matzy_
it's funny, cause i was just thinking to myself, learning macros are really weird, because you think you get it one second, then you dont the next, and the only other time i felt like that was when learning pointers for the first time
7:00:18
no-defun-allowed
double quoting is still way off for me but i can write macros, it's pretty straightforward
7:02:11
matzy_
see i always think that, but then you get into double parens, and weird situations where it's confusing...i dont know. it seems so clear and then i try and build a function and i can't get anything right
7:04:04
capadoodle
writing a macro for the first time and feeling it click (even temporarily) is the most amazing high *o*
7:08:03
LdBeth
first you have ideas on what the code will like after macro expending and then invent code do that for you
7:25:11
no-defun-allowed
beach: indeed, the odds are highly against python but somehow people use it.
7:25:37
no-defun-allowed
it's not compiled, it can't make use of posix threads but somehow it's a good teaching tool or something
7:26:08
beach
Now THAT I can understand. In fact, I made the decision to use it as the first language here at the university.
7:26:44
beach
But I can't understand how, in a professional setting, someone would decide to use it for a project.
7:32:38
no-defun-allowed
however, a more interactive system like pharo or squeak would be much easier for learning in IMO, beach
7:33:02
no-defun-allowed
a few years ago when i got IDLE running for the first time it was very underwhelming
7:33:55
LdBeth
ha, many lisp systems were that quality, especially some INTERLISP systems from Xerox
7:34:09
beach
My situation was extremely particular. Here, first-year students have not yet chosen between physics, chemistry, math, or computer science. Also at the time, the scientists (physics, chemistry) were in control and despised anything CS.
7:35:06
beach
I convinced them that Python was not used in CS, but it was used a lot in the sciences.
7:36:13
beach
They would not have had the time to learn Fortran or C++, and I certainly did not want to teach it.
7:46:49
no-defun-allowed
shka_: though you could probably golf it more, i did this in a boring computing class: https://twitter.com/theemacsshibe/status/1034584788470915072
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