freenode/#lisp - IRC Chatlog
Search
10:44:55
phoe
https://github.com/jrm-code-project/LISP-Machine seems like a trove of valuable source code
11:48:40
phoe
the non-#' form is preferable to use because some places in Lisp code do not accept the #' form
11:51:19
phoe
daphnis: it is not macroexpanded again because the FUNCTION special operator, here hidden behind the #' reader macro, treats LAMBDA expressions speially
11:51:50
phoe
when you write (function (lambda ...)) then the LAMBDA expression is not evaluated or macroexpanded
11:53:06
phoe
the symbol LAMBDA itself names a macro, but lambda expressions have special meaning in two contexts
11:53:34
phoe
first context, you can evaluate ((lambda (x) (* x x)) 3) where the lambda expression is the first element of that list
11:54:27
jackdaniel
I think that these "cases" fall in the same category when you pass multiple-value-list instead of #'multiple-value-list to some macros
11:54:32
phoe
the second context, it is understood in its own unique way by the special operator FUNCTION and the function COERCE when you try to coerce a lambda expression to a function object
11:55:42
phoe
jackdaniel: my approach is that if you generally write (lambda ...) you get stung 0% of the time, whereas if you generally write #'(lambda ...) then you get stung >0% of the time
11:56:16
jackdaniel
if you treat (lambda …) as any other function, then you don't need to make mental exceptions
11:56:24
phoe
so if I want to focus on more important tasks than remebering which variant to use, then I can safely always write (lambda ...)
11:58:37
jackdaniel
my point is that if you treat (lambda …) as any other function, then you put #' where you put #' before the symbol, and you're not putting it when you are not putting it before a symbol
13:44:17
iarebatman
I'm about to pitch using common lisp to my boss. I plan to demo the whole code is data and data is code concept, with the emphasis on the fact that once you can manipulate lists - your knowledge is applicable in many situations (akin to how SQL has a 'standard way' of manipulating data sets).. I also plan to demo the magic of hot-swapping functions while an application is running because that always seems magical.. Does a
13:44:17
iarebatman
any other recommendations of features/demos that would appeal to a technically-savvy boss that I show off ?
13:48:55
phoe
play with the REPL while the debugger is still up and while the error was still not handled
13:49:18
phoe
bonus points if you fix the error in the REPL while the debugger is still up and then you just hit that CONTINUE or RETRY restart and things work
13:50:01
iarebatman
I like that one. I'll add a step in my demo to 'break' the program while it's running before I hot-swap the function
13:54:43
phoe
I know you're pretty disenchanted when it comes to the industry and I kinda share the feeling, but IMO it doesn't make these lispy attempts futile or unworthy in general
13:55:18
beach
iarebatman: Also, if it *does* work, you will have a huge responsibility to make sure Common Lisp is a success where you work.
13:56:10
beach
phoe: I didn't say that. Just that there are strong forces against changes like that, so iarebatman should not be disappointed if it doesn't work.
13:57:41
beach
iarebatman: When I worked in industry (briefly), the way I did it was to show real results even before even mentioning the word "Lisp".
13:58:41
iarebatman
beach: Yeah no worries, I'm not expecting him to fall over himself to let me use lisp or anything.
13:59:40
iarebatman
We just went through a rather large and painful project where we used the wrong tool for the job - so I think I have an opening to at least have him hear me out though.
14:01:08
Xach
I had some success when I was able to prototype a working solution in the time allocated to simply do some research into options.
14:02:32
beach
iarebatman: Good luck. Like they say, it is easier to get forgiveness afterwards than permission beforehand.
14:02:38
Xach
If there is a library to do it already in npm or pip or something, it's a harder sell.
14:03:00
iarebatman
Yeah - there's a decent chance I'll be able to get some time for experimentation.
14:07:19
beach
iarebatman: The other advantage of not asking beforehand is that, since you never were refused permission, it is OK to actually use it, but if you ask and permission is refused, using it anyway would be to disobey.
14:25:16
iarebatman
eh, I understand the concept - but that's not what I'm going to do. It's not my intention to put the company in a bad spot just because I want to do something. I like my job and am friends with my boss (have been for 10+ years) - so I won't try to go behind his back like that.
14:26:16
iarebatman
I've got a good pitch and a decent demo - hopefully that'll sell it enough for an experiment
14:34:57
beach
iarebatman: Can we assume that you know that Common Lisp is not an "interpreted language" and that automatic memory management is not slower than manual memory management. And of course that automatic memory management is a prerequisite for modularity?
14:37:07
iarebatman
beach: Thanks for checking. We're mainly a SQL Server and C# shop at the moment, so pitching that aspect wouldn't really come across as an 'improvement' if you know what I mean.
14:38:55
beach
Then, instead, you might talk about the confusion between representation and encapsulation in languages like C#. With CLOS, encapsulation is handled an orthogonal mechanism called "packages", which makes the entire thing more flexible.
14:39:48
iarebatman
A couple of questions that I would like to have ready answers for are: How hard is it to deploy and keep a CL app up-to-date on internal employee computers? As well as: How can we take advantage of the fact that we can hot-patch systems in production to reduce down-time during updates?
14:42:54
iarebatman
To be honest, CLOS is something I need to obtain more experience with myself - so I can't talk about it with confidence yet. My demo consists of showing me bring in the same dataset with json, csv, xml, excel, and from a database - all to demonstrate they all are lists. Then at the end, I show that these lists of data can be evaluated as code as well. During that whole talk, I plan to go into detail how in c# I'd have to
14:44:09
phoe
re employee computers: you can piggyback on top of Quicklisp and compile-and-load your applications from source on employee machines
14:44:51
phoe
if you create your own internal quicklisp dist, then people can do (ql:update-all-dists) to fetch the newest sources
14:45:16
phoe
or you can distribute ready executable binaries just like you would do for many other languages
14:47:21
pve
iarebatman: I also think CL for quick prototyping and exploring data and databases in the REPL is the way to go.
14:47:21
phoe
as for hotpatching, if you know which forms to send to your live images to evaluate then you send them and they're in the image, working - zero downtime in the happiest case, minimal downtime when you pause the application for the duration of patching
14:47:28
phoe
I'll also do a shameless plug - see https://github.com/Apress/common-lisp-condition-system/raw/master/Appendix%20E/Appendix%20E.pdf for some examples that involve the CL condition system and live debugging
14:53:58
pve
iarebatman: it is probably an easier sell if you present CL as an interactive data exploration tool to be used alongside whatever else you're using, as opposed to saying "let's replace C# with CL"
14:57:48
daphnis
what's the best way to avoid having to confirm the redefinition of every single constant when reevaluating something in sbcl/slime?