freenode/#lisp - IRC Chatlog
Search
11:11:11
makomo
so the way DEFUN knows in which package to define the function is by the symbol that names the function? i.e. it doesn't use *package* directly (but this is used by the reader when interning symbols then?)?
11:12:42
Bike
(defun name lambda-list ...body...) expands into `(setf (fdefinition ',name) (lambda ,lambda-list ,@body))
11:16:51
makomo
an unrelated question. i made this spreadsheet-like thing where the cells in the sheet can contain arbitrary lisp code as their formulas. the code gets compiled at runtime and attached to the cell, and is run whenever the cells needs to update its value
11:18:23
makomo
so any (in-package) calls within COMPILE will have no effect (assuming for the moment that somehow i could provide multiple top-level forms within COMPILE)
11:19:25
Bike
anyway, it sounds like you're arranging the compilation yourself, so surely you can just see when you've written it to READ the code
11:22:16
makomo
so if i have a macro which takes lisp code and attaches it to a cell, there's no way to make this code live inside some "cell-user" package because by the time it even gets to COMPILE it has already been READ within the current package
11:23:37
Bike
If you had a, like, graphical spreadsheet application like Excel, the user would input code into a cell or whatever, and then you'd have to READ it yourself
11:23:57
smokeink
but can't one define a symbol in the "cell-user" package that calls that code (no matter from what package) ?
11:24:44
Bike
generally, if the user is writing lisp code themselves though, as normal source, ikt's their responsibility to put it in the right package, you know?
11:25:08
makomo
it's just a toy spreadsheet thingy that we were supposed to make, but i went and made it in lisp and realized i could use anything as the cell's formula
11:26:22
makomo
that wasn't my problem (if i understood what you're saying). i only wanted the code provided within the macro to live within another package
11:26:40
makomo
so i would have a "cell-user" or "cell-user-impl" thingy which would have built-in functions for these cell formulas
11:26:59
makomo
and then you can write a macro without prefixing these built-ins with "cell-user:" constantly
11:27:45
makomo
now of course, if this was a proper application, the user would input a string of lisp and i would READ it myself, etc.
11:28:20
makomo
or perhaps it would happen within a REPL too but just within the "cell-user" package
11:31:27
makomo
another question -- how would you implement something to not allow the user to access any functions that aren't within cell-user, i.e. stop them from using malicious code as formulas for cells?
11:32:16
makomo
what is the general way stuff like this is done? is it even done? a separate lisp image?
11:32:52
smokeink
the "Reader Security" section https://letoverlambda.com/index.cl/guest/chap4.html might be of use to you
11:33:16
theemacsshibe[m]
I'd probably either scan the forms before evaluating them, or have a separate interpreter.
11:33:44
theemacsshibe[m]
Using something like secure-reader helps if you don't want evil reader macros like #.(hose-my-computer)
11:35:14
scymtym
regarding reading untrusted input securely: https://github.com/robert-strandh/Eclector is a portable, customizable reader which is slowly becoming usable as of late
11:35:26
makomo
using a separate lisp image would however break the interaction with the spreadsheet application itself?
11:39:06
smokeink
no need for a separate image, just use a separate reader or scan the forms to check if there are any blacklisted symbols in it,etc
11:42:26
mfiano
#lispgames is hosting the annual Lisp Game Jam which begins in about 10 hours. As of now there are over 100 participants this year. If anyone here wanted to participate, you still have time to sign up: https://itch.io/jam/lisp-game-jam-2018
12:36:55
jcowan
the x32 ABI is designed to deal with low-memory 64-bit systems; you get 32-bit pointers but everything else is like x86_64.
12:37:58
jcowan
AFAIK it exists only in Linux ATM. It can provide improved performance by keeping more things in cache.
13:55:37
schweers
eww ... entering the search term "els 2018" into youtube seems to result in rap battles or something
13:56:29
schweers
nothing from this year (yet?), but the results are related to what I wanted to find \o/
13:59:06
beach
Plus, the most important part is (as usual) the discussions with other participants. Not the talks.
14:00:48
beach
You can count the speakers from the program. I think there might have been 90 or so participants.
14:03:36
schweers
it doesn’t say where it will be next year on the website yet, or am I missing something?
14:16:43
Bike
i still think i was kind of dry, but some people liked it well enough so i guess it's fine
14:17:42
beach
heisig had an interesting evaluation of my inlining talk. Something like "that wasn't too bad, given the boring subject". :)
14:18:15
scymtym
Bike: i watched the recording (last year's, i mean) yesterday and i liked it as well
14:19:30
Bike
people were saying interesting stuff about your talk too. ideas for when to actually be partial
14:21:28
Shinmera
I would have liked some more insightful feedback on my talk, but given that I screwed up I guess I couldn't expect too much
14:22:02
Bike
i really think you're beating yourself up too much about that. "but now, you see, YOU'VE BEEN WATCHING MY SOFTWARE THIS ENTIRE TIME!!" is pretty powerful
14:23:01
Bike
probably there weren't a lot of game programmers in the room, though. i barely know graphics stuff
14:23:36
Shinmera
It's such a dumb thing to happen though. Funnily enough if I had used SAL9000's machine it wouldn't have happened since I did have all the textures on my memory stick copy, but not my local git clone.
14:25:45
Shinmera
Though that makes me wonder what area would have had the most representation in the audience
14:32:02
Xof
lisp implementors present (that I noticed): rme, me, drmeister, dougk, Rajesh Jayaprakash, Kevin Layer
14:36:11
Xof
some of us just implement stuff that other people have already done the hard work of defining :-)
14:40:39
Bike
on the subject of implementing, actual question: i asked didier about his talk and i don't think either of us could come up with a reason a user would want to subclass method-combination or even define methods on compute-effective-method, because the regular method combination mechanism already allows arbitrary code
14:40:53
Bike
he wanted to do that multiple-combos-for-one-gf thing, but that's kind of a different direction
14:42:41
Bike
as one of probably not very many who's actually defined their own long form method combination, i thought it was adequate
14:44:31
flip214
well, how about a method combination that sums up all only _positive_ results of all the methods?
14:47:18
Bike
you'd just have your methods expand into (let ((#:sum 0)) (let ((#:mresult (call-method ...))) (when (plusp #:mresult) (incf #:sum mresult))) ...more methods...)
15:15:09
Bike
i am going to try to fix things so method combination redefinition works cleanly, at least
17:42:42
Araly
hello, I was wondering, how do you run something written in lisp outside of a repl, once compiled for example
17:43:34
Xach
araly: some options involve turning your lisp program into a kind of script that runs like a shell or perl or ruby script.
17:43:45
araly
I see a .fasl next to my .lisp files, I thought that might be the executable or something
17:43:53
Xach
i like the binary file way, if i have to, but prefer to work within the repl whenever feasible.
17:44:08
Xach
araly: .fasl is a compiled file, but one that is meant to quickly load into lisp, rather than run directly.
17:44:43
Xach
repl functions are compiled and fast and have a much richer interactive experience in general.
17:45:03
Xach
you pass objects and return objects, rather than pass strings and stream inputs and receive strings and stream outputs.
17:45:29
Xach
but since i don't want to interact and intercede from e.g. cron, that's when i use a compiled binary.
17:46:20
araly
I'm learning some lisp on my own, and I thought it could be interesting to try and re write a discord.js bot I have in lisp using lispcord, a library I found. I can run the discord.js bot in a server, as it's nodejs, I thought how was I going to make that work in lisp
17:46:47
beach
araly: Creating an executable is something you need to do one single time very late in a project, so you almost never have to do it.
17:47:12
beach
araly: In particular, if you are learning Common Lisp, that is definitely not the way to run the programs you develop.
17:48:42
araly
beach: so should I not write a bot or another program that is supposed to run on a server in common lisp ?
17:49:30
beach
araly: I am saying that it is best to test most of your functions, not the entire program, interactively.
17:50:14
beach
araly: Since you can run incomplete Common Lisp programs, you don't have this idea that you need the full code and link it before you can run it.
17:50:28
araly
beach: oh, while theyt are developed okay. but that would be the way once they are finished, or is there another better way ?
17:51:19
beach
araly: What Xach said I guess. But since you are still learning, you won't need it for some time.
17:52:02
araly
beach: sure okay. While I'm at it, do you know if it's possible to use a bitmap font in emacs ?
17:52:34
beach
araly: I don't, and that would be a question for #emacs rather than #lisp, which is dedicated to Common Lisp.
18:21:29
Ukari
for example, when i input cffi: and TAB, symbols in cffi package will show in another frame
18:25:44
Xach
I am hoping that after perhaps 48 to 72 days of recovery my urge to hack created by ELS will be equaled by my energy to hack
18:31:39
easye
Xach: is there no longer a mailing list to discuss Quicklisp related items? <https://groups.google.com/forum/#!forum/quicklisp> seems to be retired, right?
18:33:09
easye
Alright. I'll try to move along the :DEFSYSTEM-DEPENDS-ON problems via a mesage there.
18:39:35
beach
makomo: That is very hard to say, even for the person in charge of doing it. It depends a lot on the time at their disposal.
18:42:37
makomo
i guess so. i just went to check when it was uploaded in the previous years -- after 20 days in 2016, after almost 2 months in 2017 :^/
18:48:15
Shinmera
A better in some respects and worse in other respects version of my talk has been up for a while at least. https://www.youtube.com/watch?v=od6WI7JIJcQ
19:22:36
Kevslinger
What are the biggest pros and cons of programming in Lisp? Is that a reasonable question to ask?
19:24:19
phoe
I think it had two words of tag or something and then two words for two pointers to its car and cdr
19:26:24
shka_
pros: some decent libs are present, multithreading with system threads (and lparallel), decent performance most of the time, not that many libs written in C
19:27:04
MichaelRaskin
You can mix and match various paradigms in your code; you might not want to have code like that, but you could gain some perspective.
19:27:47
phoe
pros: you end up with a very pleasant hacking&prototyping platform that CL is, when you use it properly (interactive environment like slime, debugger, inspector, stepper)
19:29:23
MichaelRaskin
Weaklings. I once converted a Python job into a Common Lisp job, and afterwards my direct superior sometimes uses Racket for isolated projects.
19:32:53
MichaelRaskin
That means that as long as you produce reliable correct code, nobody dares to discuss style.
19:33:29
MichaelRaskin
Then you show why writing Python as if it were a Lisp makes some part of the system faster to beat into submission in a tense situation
19:40:13
MichaelRaskin
Then it becomes clear that the amount of local libraries needed for a system is high enough that language is the least of the worries…
20:11:19
jmercouris
hi, Shinmera has some package for building binaries IIRC, but I can't remember the name
20:21:31
jmercouris
I just wanted something to make a .app bundle on OSX that wouldn't require any work from myself
20:23:09
jasom
jmercouris: yeah, it's pretty easy and you can drop the executable in the .app bundle that automator makes (I think it's called automator, I stopped using macs much about a year ago)
20:24:41
MichaelRaskin
It seems not random, but carefully planned to inflict the optimal amount of pain
20:25:33
Shinmera
I'm not, but programs randomly break between versions and it fucking pisses me off
20:26:11
jmercouris
I think the compatibility is quite good, I can launch applications from 5-10 years ago
20:27:21
jasom
https://github.com/jasom/plush/blob/master/plush-parser.lisp#L746 that turns a glob into input for cl-ppcre
20:30:17
fourier
yep just to convert wildcards to cl-pprcre regexp i have already, im more interested with proper implementation taking care of whenever it has trailing /, ** for recursive subdirectory search etc
20:31:02
jasom
Ah it doesn't implement ** since that's not in posix and plush was just implementing posix
20:31:53
jasom
and plush splits the path into directories before matching the PCRE, so that implementation is probably useless for you
20:38:41
jasom
It's up on github primarily because it's easier to post links to code than to pastebin bits and pieces when it comes up in conversation
22:08:49
pierpa
I'd think it's an obvious choice for a a macro defining a rule, that it must have been used million of times in unrelated projects