<void_pointer>
no-defun-allowed: some C++ people do know about CLOS, but most don't. There are many features a language can have and everyone has a set they haven't heard about. As for those who have heard about it, there are still reasons to use C++ and as well as many use cases where something like CLOS wouldn't be appropriate or desirable anyways.
<on_ion>
its multiple dispatch i find that they cannot grasp [readily]
<pjb>
aeth: for a finite length, you can (deftype list-of-length (n type) (if (zerop n) `(member nil) `(cons ,type (list-of-length ,(1- n) ,type))))
<void_pointer>
C++'s object model allows slot access without having to do a double indirection (first indirection to the instance's data to ge the pointer for the slot and the second to go from that pointer to the location of the value). A good optimizing CL where the slot is given a type which could be stored in place could avoid the indirection, but tht depends on how smart the implementation is among other things.
<pjb>
aeth: for an unbounded length list, you'd have to use satisfies if you want to check the type of all elements.
elderK has joined #lisp
nirved has quit [Quit: Leaving]
emaczen has joined #lisp
<emaczen>
I'm calling #'sb-ext:run-program and #'ccl:run-program neither work, but SBCL gives the helpful error message of "Permission Denied"
<emaczen>
I can run the program that I want to without any problems from the terminal and am passing the same arguments, so I don't see why I am having trouble executing it from lisp
<cgay>
Paste the full call somewhere?
<no-defun-allowed>
random bad guess: selinux?
<on_ion>
change dir also
<aeth>
pjb: I don't want to have to define a temporary type just for this at all.
<emaczen>
cgay: If I don't rely on $PATH it seems to work
<pjb>
vs. (typep (list 1 2 3) 'list-of-3-integers)
<aeth>
pjb: I don't think any of the presented options are satisfactory for optionally generating a type for type-checking (or type-declaring) a &rest rest in a defun.
<pjb>
That's your problem.
<pjb>
(there's no difference between random data and values bound to &rest parameters.
<pjb>
).
holycow has joined #lisp
<aeth>
pjb: I'd like to be able to do this (which doesn't work, at least in SBCL): (deftype typed-cons (type) `(cons ,type (or null (typed-cons ,type)))) (typep (list 1 2 3 4 5) '(typed-cons fixnum))
<pjb>
aeth: (assert (every (lambda (arg) (typep arg 'fixnum)) arguments) (arguments) "All arguments should be fixnums")
<pjb>
If you define fixnump: (assert (every (function fixnump) arguments) (arguments) "All arguments should be fixnums")
<aeth>
Even that isn't 100% satisfactory. When I have my fake "cons" struct that acts as a typed cons the checking is O(1) (only need to check the car) but that probably is O(n) checking (it's irrelvant for checking a &rest rest, though, because you'd need O(n) checking on creation no matter what)
<emaczen>
(ccl:run-program "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD" '("--render" "/Users/thutmose/openscad/bolt.scad") :wait nil) -- uggh it works with #'sb-ext:run-program on SBCL, but not with CCL...
<emaczen>
with CCL I get a little cocoa window that pops up and says OpenSCAD quit unexpectedly
<aeth>
pjb: That assert (or a satisfies type) gets the validation side of things but it (probably) does not provide the performance advantage of helping the compiler out with type information (I'm guessing it won't know that (CADDR foo) is a fixnum even though we just validated that)
<aeth>
(In my first comment "that" was referring to my hypothetical, not to your reply)
<pjb>
biscut_boy: most implementations provide a lisp API to the network. But for various reasons (including portability of your lisp code), you may prefer to target the POSIX socket API, using CFFI (thru, eg. libraries such as usocket or iolib).
<pjb>
In any case, using either the "high level" lisp API or the basic POSIX API from lisp, is better done knowing well the unix C API described in the manual pages of your unix box, and the UNP book.
<pjb>
Also, there are other books for specific protocols, or for networking on Windows (which may be useful to read if you want to communicate with Windows processes).
Essadon has quit [Quit: Qutting]
<pjb>
Nowadays, you will also need to include cryptographic and other security considerations not mentionned in UNP (unless there's recent editions with additions?). So additionnal knowledge about SSL/TLS, Kerberos, and stuff like that will be useful.
fikka has quit [Ping timeout: 246 seconds]
<pjb>
And higher level protocols such as HTTP, SOAP, OAUTH, etc.
<biscut_boy>
and openflow :p
warweasle has joined #lisp
<pjb>
yes, and any other protocol specifically needed for your application.
<pjb>
So you see, there's matter to collect notes for a big interesting book about Network Programming in Common Lisp.
<biscut_boy>
i suppose the python exercises could be done in lisp
<biscut_boy>
just wondered
<pjb>
biscut_boy: but really, learn CFFI, and you can use any of those books using C libraries.
<pjb>
It might be more difficult to adapt from higher level programming languages since you would have to know well both python and CL to perform a good translation (plus the networking stuff).
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
meepdeew has quit [Read error: No route to host]
fikka has quit [Ping timeout: 244 seconds]
dale has quit [Quit: dale]
AroPan has quit [Remote host closed the connection]
slyrus has quit [Quit: slyrus]
slyrus1 is now known as slyrus
slyrus1 has joined #lisp
Tristam has quit [Remote host closed the connection]
Oladon has joined #lisp
colelyman has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
fikka has joined #lisp
arescorpio has joined #lisp
Tristam has joined #lisp
biscut_boy has quit [Quit: Page closed]
fikka has quit [Ping timeout: 240 seconds]
Mr-Potter has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
jusss has joined #lisp
<jusss>
what is monad?
khisanth_ has quit [Ping timeout: 245 seconds]
<emaczen>
jusss: AFAIK Something to avoid mutability in programming that is used in statically typed functional languages such as Haskell
<emaczen>
jusss: It isn't something you will ever have to worry about in usual commonlisp programming
<pjb>
a method combination.
matzy_ has joined #lisp
<emaczen>
pjb: I thought you usually encouraged against FFI?
<pjb>
That's true. But you also need to be pragmatic sometimes.
<jusss>
emaczen: I think those concepts are common in the most languages, but as you see all the examples are haskell, and I can't understand it
<pjb>
We would need to specify some API that implementations could all provide instead of having their specific variants.
<sjl>
does Drakma not work with ABCL?
<emaczen>
sjl: Let me check
<sjl>
I'm getting an error when trying to (ql:quickload :drakma) but am not sure if I've just borked something on my end
<bike>
monads aren't used much outside of haskell.
<bike>
is there a reason you are asking about them here in #lisp.
<emaczen>
jusss: What other languages? ML variants?
fikka has joined #lisp
<jusss>
bike: emaczen some people say promise is similar with monad in javascript
<emaczen>
sjl: It's loading the dependency packages very slowly...
<no-defun-allowed>
I think Haskell is the only reasonably used language that uses monads.
<bike>
jusss: javascript is also not this channel
<jusss>
I'd like to learn the method
wanz has joined #lisp
<bike>
and monads are a very abstracted concept, they're not promises, although there might be some way to deal with promises in a monadic fashion
<emaczen>
sjl: I just successfully evaluated (drakma:http-request "http://google.com")
<no-defun-allowed>
I also don't know how monads work, so I can't talk about similarities in CL if there are any.
<sjl>
Hmm. I'm getting "Don't know how to REQUIRE ABCL-CONTRIB."
<sjl>
I must have installed it wrong.
<emaczen>
sjl: Yeah I have (require :abcl-contrib) in my .abclrc
<emaczen>
sjl: Give me a second, I have a few short notes on how to install
<jusss>
bike: if I want to learn this concept, I have to learn haskell?
<bike>
probably. why are you asking about it here.
<sjl>
I probably just have to grab the abcl-contrib jar and put it in my classpath
<emaczen>
sjl: My notes are:
<sjl>
I bet I just forgot to do that originally and nothing has needed it til now
<emaczen>
1) wget abcl-src-VERSION.tar.gz
<emaczen>
2) tar xvf abcl-src-VERSION.tar.gz
<jusss>
I just thought it's a common concept in languages
<emaczen>
3) run "ant" in the untarred directory
<jusss>
nothing special
<bike>
well, you were incorrect.
<emaczen>
sjl: That is the extent of my notes
<jusss>
they all have concepts like 'closure' 'thunk' 'callback' 'tail recursive' blabla
fikka has quit [Ping timeout: 246 seconds]
<emaczen>
sjl: Have you ever made an "executable" with ABCL?
<sjl>
emaczen: nope
khisanth_ has joined #lisp
<emaczen>
sjl: I compiled all my lisp files with abcl to .abcl files and then made a Java main function that creates a Lisp Interpreter object that then loads all the compiled files...
<emaczen>
But I was hoping somebody would know something about efficiency and ABCL because my program is using a lot of memory and CPU...
<sjl>
I haven't really messed with it much, except to try to make sure my libraries' unit tests pass in it
<emaczen>
sjl: Have you been on #abcl recently? I've seen nothing.
<sjl>
ah, it might just be that parts of ABCL don't work with java 9+ and I'm running 10
<emaczen>
sjl: Yeah, the main ABCL project page says that it is compatible with java 1.8
<sjl>
I mostly use CCL and SBCL
robotoad has quit [Quit: robotoad]
fikka has joined #lisp
<emaczen>
Anyone have some experience with ABCL that can give me some pointers about efficiency?
jochens has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
fikka has quit [Ping timeout: 272 seconds]
robotoad has joined #lisp
jochens has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
fikka has joined #lisp
<pjb>
emaczen: I would have a look at the code generated by abcl. It's probably close to be as efficient as it can be, on a VM specialized to run java code…
fikka has quit [Ping timeout: 244 seconds]
LooneyTunes has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
ryan_vw has quit [Ping timeout: 252 seconds]
colelyman has quit [Ping timeout: 244 seconds]
<emaczen>
pjb: I've ported the program I've been writing in CCL to ABCL
<emaczen>
I think CCL used 10 threads -- ABCL uses 29
fikka has joined #lisp
<emaczen>
I don't understand that
nydel has quit [Ping timeout: 245 seconds]
<on_ion>
prolog could help us figure out why ABCL and CCL differ numerically considering the "CL" is shared and there is an extra C. AB must be valued around 14-19 total abouts
<no-defun-allowed>
Lol
<no-defun-allowed>
Just put it in Maxima and solve for [a,b,c,l]
fikka has quit [Ping timeout: 252 seconds]
<no-defun-allowed>
Although there's 4 variables and 2 equations which probably means it won't have one solution.
permagreen has quit [Remote host closed the connection]
<no-defun-allowed>
on_ion: here is what Maxima came up with.
<on_ion>
that will take me all night to type sry had several beers
<no-defun-allowed>
I assume %r_n are gensyms and can be substituted for their respective named variables.
fikka has joined #lisp
dale has joined #lisp
<capadoodle>
wouldn't they be free variables
<no-defun-allowed>
They say a=%r_2 and l=%r_1.
<no-defun-allowed>
I should have ratsimp-ed that.
<capadoodle>
ah yeah right. and then a and l are free parameters
<no-defun-allowed>
Yes.
<emaczen>
nvm I think ABCL is fine, it is just some java that I need to dig through..
<emaczen>
in terms of efficiency
<no-defun-allowed>
ratsimp doesn't seem to take systems of equations, but it doesn't look too hard to substitute.
<emaczen>
but I would still like to get the number of threads down...
fikka has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
wusticality has joined #lisp
Roy_Fokker has joined #lisp
wusticality has quit [Ping timeout: 244 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
jusss has quit [Read error: Connection reset by peer]
chipolux has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
matzy_ has quit [Remote host closed the connection]
ealfonso has joined #lisp
matzy_ has joined #lisp
chipolux has joined #lisp
<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
<no-defun-allowed>
You don't really need to...*wink*
<emaczen>
ealfonso: Why?
<emaczen>
ealfonso: What went wrong?
matzy_ has quit [Remote host closed the connection]
matzy_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<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
<ealfonso>
the same problems for DB to lisp. also no assurance that libraries are secure and scalable
<ealfonso>
that is my experience
<ealfonso>
in clojure there is built-in support for maps, so I don't need to worry too much about json -> clojure or back
ryan_vw has joined #lisp
<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
bike has quit [Quit: Lost terminal]
_whitelogger has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<beach>
Good morning everyone!
<LdBeth>
morning, beach
Roy_Fokker has quit [Read error: Connection reset by peer]
<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?
<LdBeth>
why not
<beach>
You can get it to create several functions.
<no-defun-allowed>
yep, just put all the defuns in a progn
<capadoodle>
ah :3
<emaczen>
ealfonso: converting between lisp and json shouldn't be that bad?
<emaczen>
ealfonso: I don't know about parallelism
fikka has joined #lisp
<no-defun-allowed>
ealfonso: i wrote "middleware" for hunchentoot yesterday, in the form of magrathea.
<no-defun-allowed>
you just subclass (easy-)acceptor and do (call-next-method) when you're done.
<no-defun-allowed>
i haven't had problems with cl-json, cl-who, hunchentoot and bordeaux-threads or lparallel.
fikka has quit [Ping timeout: 272 seconds]
<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.
xkapastel has quit [Quit: Connection closed for inactivity]
<no-defun-allowed>
that's really weird, cl-who is really fast for me even on sbcl
<no-defun-allowed>
lparallel provides parallel clones of map, remove-if-(not), reduce and sort and probably some more
<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)
<ealfonso>
no-defun-allowed I'll give it a try. and maybe I should also try a compiler other than sbcl.
fikka has joined #lisp
Oladon has quit [Quit: Leaving.]
megalography has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
shifty has quit [Ping timeout: 252 seconds]
rippa has joined #lisp
cyraxjoe has quit [Ping timeout: 252 seconds]
dale has quit [Quit: dale]
pfdietz has quit [Remote host closed the connection]
pfdietz has joined #lisp
fikka has joined #lisp
<matzy_>
why are '(1 2 3) and (list 1 2 3) equivalent, but (list 'a (+ 1 2) 'c) and '('a (+ 1 2) 'c) not?
<LdBeth>
'(1 2 3) and (list 1 2 3) are not equivalent
<no-defun-allowed>
cause quote quotes everything on the inside
<matzy_>
LdBeth: they're not? the result looks the same in slime
<no-defun-allowed>
LdBeth: pretend they meant they're (TREE-)EQUAL
<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
cyraxjoe has joined #lisp
<matzy_>
yeah equivalent was a bad choice of words
<LdBeth>
(foo) returns different result each time
<LdBeth>
while bar always return (3 2 1)
<matzy_>
whoa
fikka has quit [Ping timeout: 268 seconds]
<matzy_>
LdBeth: slime has given me (3 2 1) for foo 8 times in a row
<matzy_>
(nreverse '(1 2 3)) always gives me (3 2 1) it seems
<LdBeth>
matzy_: you call (foo) instead type (nreverse '(1 2 3)) every time
<LdBeth>
CLisp gives (1 2 3) the third time, and CCL gives (1) the third time
<LdBeth>
and SBCL will warn you when define foo
<matzy_>
ohhh, why does that matter?
<matzy_>
calling foo versus feeding slime its body directly
<LdBeth>
because LIST means contruct the list each time called, while QUOTE means a constant value
<matzy_>
ohhh
<LdBeth>
return the same value doesn't necessarily mean they're equivalent
<matzy_>
so whats happening with foo?
<matzy_>
i dont get why it's different. it's the same list being passed to nreverse
<matzy_>
one's a constant, one's a list, but it's still (1 2 3) to SBCL right?
<matzy_>
or sorry (3 2 1)
<LdBeth>
it's not the same list, bacause (eq '(1 2 3) '(1 2 3)) is NIL
<matzy_>
why?
<LdBeth>
in the sense of computer, they have differet address in the memory
<matzy_>
ah, they're different pointers?
<matzy_>
i see, two separate variables
<matzy_>
and (eq (list 1 2 3) (list 1 2 3)) is also nil, i see
nanoz has joined #lisp
<LdBeth>
yes, so (list ...) returns new address when called, while the QUOTE form return a fixed address
<matzy_>
awesome to know, thanks!
<matzy_>
so that's what's up with (foo) then? the first result is (3 2 1), then it's just (1)
<matzy_>
(bar) is always (3 2 1)
<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
dddddd has quit [Remote host closed the connection]
razzy has joined #lisp
fikka has joined #lisp
<matzy_>
ok, i see now :) thanks!
<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
<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
<matzy_>
now the question is, will macros ever "stick"
<LdBeth>
nope
fikka has quit [Ping timeout: 268 seconds]
<no-defun-allowed>
with enough time, yes
<no-defun-allowed>
double quoting is still way off for me but i can write macros, it's pretty straightforward
shka_ has joined #lisp
esrse has joined #lisp
<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
shakdwipeea has joined #lisp
<capadoodle>
writing a macro for the first time and feeling it click (even temporarily) is the most amazing high *o*
<LdBeth>
nah, macros are just functions that do a expending job
<LdBeth>
first you have ideas on what the code will like after macro expending and then invent code do that for you
<no-defun-allowed>
with several auxiliary functions, macros can be quite friendly
<no-defun-allowed>
also with other macros like once-only and with-gensyms
cyraxjoe has quit [Ping timeout: 246 seconds]
<matzy_>
i finally just got mine working...a rush indeed
vlatkoB has joined #lisp
meepdeew has quit [Remote host closed the connection]
angavrilov has joined #lisp
cyraxjoe has joined #lisp
<capadoodle>
the crash after the high is realizing I use python in my day job 😂
<no-defun-allowed>
yup
<no-defun-allowed>
in today's market you're 95% likely not to use it
<capadoodle>
we have some lisp too though
<beach>
I don't quite understand how people dare use Python in a professional setting.
<no-defun-allowed>
beach: indeed, the odds are highly against python but somehow people use it.
<beach>
Yes, very strange to me.
<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
<beach>
Now THAT I can understand. In fact, I made the decision to use it as the first language here at the university.
nirved has joined #lisp
<beach>
But I can't understand how, in a professional setting, someone would decide to use it for a project.
<shka_>
i am not sure if python is a good language for teaching fundamentals of programming
<shka_>
lack of scopes does not feel right
<beach>
shka_: It depends on the situation.
<shka_>
also, language has tones of weird things in it
<shka_>
for instance you can [1,2][True]
asarch has quit [Quit: Leaving]
<shka_>
and it makes heavy use of operator overloading
<shka_>
so if you wanna create array of size you are using… *
<shka_>
but this is #lisp
<shka_>
so let's forget it
<no-defun-allowed>
however, a more interactive system like pharo or squeak would be much easier for learning in IMO, beach
<no-defun-allowed>
a few years ago when i got IDLE running for the first time it was very underwhelming
<LdBeth>
ha, many lisp systems were that quality, especially some INTERLISP systems from Xerox
<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.
<beach>
And they controlled everything.
<LdBeth>
that's sad
<no-defun-allowed>
ah, alright
<beach>
So I had to come up with a language that was acceptable to my colleagues.
<beach>
I convinced them that Python was not used in CS, but it was used a lot in the sciences.
<beach>
So I was doing them a favor.
<LdBeth>
otherwise there's the choice between fortran and C++
<beach>
Plus, it was only a very short course, and we weren't going to use it anymore.
<no-defun-allowed>
jupyter/python is probably more convenient than matlab in that regard.
<beach>
They would not have had the time to learn Fortran or C++, and I certainly did not want to teach it.
<no-defun-allowed>
hah
<beach>
I am being totally misunderstood her.
<beach>
here
<beach>
So I should be quiet and go back to my work on bootstrapping.
<no-defun-allowed>
i never said it was okay to write code like this btw
<emaczen>
How do I update a system with quicklisp
<shka_>
emaczen: dist upgrade
<emaczen>
shka_: example?
wanz has quit [Quit: wanz]
<emaczen>
I have #'uiop:launch program in SBCL but not CCL
copec has quit [Ping timeout: 240 seconds]
copec has joined #lisp
rozenglass has quit [Remote host closed the connection]
azrazalea has quit [Ping timeout: 244 seconds]
wanz has joined #lisp
ggole has joined #lisp
igemnace has quit [Quit: WeeChat 2.3]
razzy has quit [Ping timeout: 245 seconds]
robotoad has quit [Quit: robotoad]
<zigpaw>
this rps looks like a lot of code I had written ;-)
makomo has joined #lisp
<loke`>
emaczen: (ql:update-all-dists)
random-nick has joined #lisp
marvin2 has quit [Ping timeout: 244 seconds]
koenig has quit [Ping timeout: 252 seconds]
shka_ has quit [Quit: Konversation terminated!]
_whitelogger has joined #lisp
matzy_ has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
after breaking the habit of pressing Q at sldb, i finally hot patched a function
Zaab1t has joined #lisp
q-u-a-n has joined #lisp
q-u-a-n has quit [Remote host closed the connection]
q-u-a-n has joined #lisp
rozenglass has joined #lisp
thiesen has joined #lisp
thiesen has left #lisp [#lisp]
wanz has quit [Quit: wanz]
wanz has joined #lisp
Lycurgus has joined #lisp
<no-defun-allowed>
Instead of pressing Q, select the function you fixed and press R.
shrdlu68 has joined #lisp
nanozz has joined #lisp
nanoz has quit [Ping timeout: 245 seconds]
<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.
<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!"
<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.
shrdlu68 has quit [Quit: WeeChat 2.2]
<beach>
Maybe, but again, I didn't make myself understood. I decided on Python for a very, very short initial course, for several reasons:
<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.
nanozz has quit [Ping timeout: 252 seconds]
<beach>
2. Because Common Lisp or Scheme would not have been acceptable to the scientists, and they would have vetoed it.
<beach>
3. Python is not too bad for an initial language.
<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.
<beach>
5. Python was never going to be used again in the CS curriculum.
<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.
<beach>
All other arguments were totally unimportant for this choice.
varjag has joined #lisp
<pjb>
Why do scientists choose python?
<beach>
I don't know and I don't care.
<pjb>
It's not particularly good at numeric or symbolic computation. It's for the libraries.
n3k0_t has quit [Ping timeout: 268 seconds]
goats_gallore has joined #lisp
<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".
<pjb>
Just look how the conditions of applications of mathematical theorems or physical laws are entirely ignored all the time!
<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!
<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
<pjb>
Indeed. If you want to compete with CL, you will have either to be better on those points, or compete on another plan.
<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).
<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
<pjb>
I save tons of developer time using CL and NOT NEEDING this kind of resources!
<pjb>
And honestly, everytime you ask questions eg. on irc, you will eventually have to find the answer yourself (if not a newbie question).
cage_ has joined #lisp
<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
<pjb>
Exactly.
<pjb>
Better use CFFI to let any implementation use it.
<goats_gallore>
what was the point made there? i didn't follow
<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.
<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.
<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.
<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.
<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
elderK has quit [Quit: Connection closed for inactivity]
Roy_Fokker has joined #lisp
dra has quit [Remote host closed the connection]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
igemnace has joined #lisp
beach has quit [Ping timeout: 250 seconds]
_spm has joined #lisp
<_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.
<Bike>
you want to store the writer function
<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 :/
<Bike>
if you specify ":accessor foo", the reader is #'foo, and the writer is #'(setf foo)
<Bike>
and you call it like (funcall writer val obj)
makomo has quit [Ping timeout: 240 seconds]
lvmbdv has joined #lisp
<_spm>
Thanks, Bike. That makes sense.
beach has joined #lisp
<_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.
<_spm>
Probably better as a macro, but doubting my level of fu.
cage_ has quit [Quit: Leaving]
irdr has quit [Ping timeout: 244 seconds]
asarch has joined #lisp
irdr has joined #lisp
irdr has quit [Remote host closed the connection]
<beach>
_spm: Perhaps you want to show your code?
irdr has joined #lisp
<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
marvin2 has joined #lisp
equwal has joined #lisp
equwal has quit [Remote host closed the connection]
makomo has joined #lisp
equwal has joined #lisp
equwal has quit [Remote host closed the connection]
equwal has joined #lisp
Oladon has joined #lisp
esrse has quit [Ping timeout: 260 seconds]
Lycurgus has quit [Quit: Exeunt]
rozenglass has quit [Remote host closed the connection]
josemanuel has joined #lisp
igemnace has quit [Quit: WeeChat 2.3]
Necktwi has quit [Quit: leaving]
<jcowan>
Where in the CLHS is described the meanings of +, ++, +++, *, **, etc.? I need to cite them.
<jcowan>
Dr. Google not helpful
<jcowan>
Oh, nm, I see they are listed in the symbol index.
igemnace has joined #lisp
dale has joined #lisp
Guest70792 has quit [Ping timeout: 252 seconds]
anamorphic has joined #lisp
meepdeew has joined #lisp
warweasle has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
grumble has quit [Quit: Need to reconnect so here's a random tip: The command "xrandr --output HDMI1 --set 'Broadcast RGB' Full" (you might need to replace HDMI1 with your monitor output name) might significantly improve contrast on external monitors. s/Full/Automatic/ to reset]
joga has quit [Ping timeout: 272 seconds]
Mr-Potter has joined #lisp
grumble has joined #lisp
equwal has quit [Remote host closed the connection]
nly has quit [Read error: Connection reset by peer]
<LdBeth>
Good morning
igemnace has quit [Quit: WeeChat 2.3]
shakdwipeea has quit [Ping timeout: 256 seconds]
dddddd has quit [Remote host closed the connection]
meepdeew has quit [Remote host closed the connection]
equwal has quit [Remote host closed the connection]
anamorphic has quit [Quit: anamorphic]
equwal has joined #lisp
anamorphic has joined #lisp
another-user has joined #lisp
<another-user>
beach: hi
<another-user>
beach: are you around?
<on_ion>
jcowan: also slime hyperspec ref ~
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
frgo has quit []
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
nly has joined #lisp
anamorphic has joined #lisp
frgo has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
themsay has joined #lisp
anamorphic has quit [Client Quit]
frgo has quit [Ping timeout: 240 seconds]
<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
bendersteed has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
themsay has quit [Ping timeout: 252 seconds]
frgo has joined #lisp
sjl has joined #lisp
<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.
<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.
emerson has quit [Remote host closed the connection]
robotoad has joined #lisp
kajo has joined #lisp
josemanuel has quit [Quit: leaving]
<beach>
another-user: Yes.
<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.
<beach>
another-user: There are four operations possible, rotate, scale, move, and bounding-rectangle.
<beach>
Your clients supply more specific classes like polygon, ellipse, etc. And they write methods on the generic functions representing the operations.
<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.
<beach>
another-user: So you cache the result of the bounding-rectangle as follows:
<beach>
another-user: You add slots in the root class to store the information.
<beach>
another-user: You also add a Boolean slots bounding-rectangle-valid-p, initially set to nil.
<beach>
another-user: You write :AFTER methods on rotate, scale, move that set the Boolean slot to nil.
jinkies has joined #lisp
<beach>
Those :AFTER methods have the root class as its specializer.
evilem has joined #lisp
<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.
<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.
<beach>
another-user: You can't do that without auxiliary methods unless you also change the interface.
<beach>
... which you don't want to do because your clients then have to rewrite their code.
<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.
Zaab1t has quit [Quit: bye bye friends]
dkmueller has joined #lisp
slyrus has quit [Quit: slyrus]
slyrus1 is now known as slyrus
slyrus1 has joined #lisp
random-nick has quit [Ping timeout: 244 seconds]
rozenglass has joined #lisp
<another-user>
beach: thank you for great and detailed explanation, it's really nice example!
another-user has quit [Quit: WeeChat 2.3]
kuwze has joined #lisp
ggole has quit [Quit: ggole]
irdr has quit [Ping timeout: 252 seconds]
bobbybrownshoes has joined #lisp
irdr has joined #lisp
bobbybrownshoes has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
<ecraven>
are there typos in the hyperspec? http://clhs.lisp.se/Body/f_getf.htm#getf has ".. or modify of any part, car or cdr ..", which I think contains one too many "of" (.. or modify any part ..)
robotoad has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
scymtym has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kuwze has quit [Quit: Page closed]
pierpal has quit [Ping timeout: 268 seconds]
bendersteed has quit [Remote host closed the connection]
dkmueller has quit [Quit: leaving]
meepdeew has joined #lisp
angavrilov has quit [Remote host closed the connection]
robotoad has joined #lisp
Oladon has quit [Quit: Leaving.]
warweasle has quit [Quit: later]
<TMA>
ecraven: there are typos
stux|RC has quit [Ping timeout: 252 seconds]
varjag has quit [Ping timeout: 252 seconds]
rpg has joined #lisp
orivej_ has quit [Ping timeout: 246 seconds]
pierpal has joined #lisp
<edgar-rft>
All typos in a "standard" doument become the new standard. You're not allowed to use Common Lisp without these typos.
pierpal has quit [Ping timeout: 244 seconds]
<jcowan>
Sure you can, unless they are declared with (declare (typo "of")).
jinkies has quit [Ping timeout: 244 seconds]
<aeth>
Common Lisp is dynamically typoed so the standard document doesn't have typos, but objects in the standard document have typos.
<pfdietz>
Typos get spread through your program by the compiler, during typo propagation.
mejja has joined #lisp
<no-defun-allowed>
compare this to the dependent typos of MLs, where functions can take any typo and produce appropriate typoed results
<jcowan>
Indeed, since the CLHS is not the actual ANS, its typos are not actually standard.
<no-defun-allowed>
yes, you'd have to go by the typos in the ANSI X13J3 standard.
<no-defun-allowed>
might as well implement the typos in CLtL2, those sound useful
<aeth>
Are there any portability libraries for useful typos that aren't part of the standard?
<no-defun-allowed>
there's closer-typo afaik
<no-defun-allowed>
some implementations have implementation specific typos you can use sharpsign plus or sharpsign minus if absolutely neccesary
emaczen has quit [Ping timeout: 260 seconds]
<no-defun-allowed>
for example, see 7.18 in the SBCL manual: Miscellanous Typos
<jcowan>
I think that would be better named typo-closer, for the sake of shed-biking.
<no-defun-allowed>
also if typos aren't powerful enough, trivial-spoonerism yas hou covered
<jcowan>
not to be confused with typo-clozer or typo-clojer
<zigpaw>
typo-clojure?
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
random-nick has quit [Ping timeout: 250 seconds]
<no-defun-allowed>
please take conversation of typos in clojure to #clojure
<aeth>
#lisp is specifically for Common Lisp typos
<no-defun-allowed>
are there any implementations of hindley milner typo inference in CL?
robotoad has quit [Quit: robotoad]
Mr-Potter has quit [Read error: Connection reset by peer]
<LdBeth>
#'no-defun-allowed: Hindley Milner has poor support on subtyping
<no-defun-allowed>
hah, you made a typo, it's subtypoing
<aeth>
not a problem unless you need a submerine
<LdBeth>
GG
<Bike>
or rather it has no support for subtyping
<jcowan>
I misspelled it to avoid that rebuke
<jcowan>
the narcissism of minute differences.
<LdBeth>
Bike: well, someone claims there is subtypeclass