freenode/#lisp - IRC Chatlog
Search
7:20:51
rme
TMA: Support for running the 32-bit lisp on 64-bit Windows was added (by yours truly) in ccl 1.7.
7:48:32
TMA
rme: oh, I never knew. I have an old 1.6 sitting in a directory transferred from an old 32-bit XP system and I tried to run it.
8:10:30
TMA
schweers: I do not. I ran XP in 32 bit mode, I run everything in 64 bits since. I would return to 32-bit mode on low memory devices like low-end netbooks though.
8:11:56
schweers
okay, that explains. I was wondering how windows 10 would perform with a maximum memory of ... 3GB? I know that 4GB or close to that are possible, but if I remember correctly, windows has a weird limit on 32 bit systems.
8:12:43
schweers
It sure is, but then again, I was thinking about running windows 10, which -- I presume -- needs lots of memory just to boot.
8:13:54
flip214
TMA: but having more registers in 64bit-mode might mean less memory needs (eg. for temporary data) and faster computation as well
8:19:13
TMA
flip214: that's true for arithmetic-intensive workloads. I guess most of what I do is data traversing, not number crunching
8:32:35
aeth
The specifics of Lisp complicate 32v64 bit further. e.g. larger fixnums and unboxed single-floats
8:36:38
jack_rabbit
schweers, windows 32-bit (IIRC) reserved ~1GB of address space for kernel stuff, so only 3GB available to user programs.
8:37:26
schweers
I thought there was something else, but I may be wrong. Not my main platform anyway ;)
9:00:49
flip214
TMA: still, being able to hold much more data (eg. pointers!) in CPU registers might help, not only when doing arithmetic.
9:56:12
hlavaty
hi i have a fileSystems."/var/lib/foo" entry in configuration.nix. the disk failed and now on boot the machine goes into rescue mode. how do i disable the disk so that the machine starts normally again and i can ssh in an upload and activate new configuration?
10:15:09
TMA
flip214: I refuse to take position on that matter when I have no data. I am saying I can pack twice as many conses into the same amount of memory. I do not have performance data to tell, whether it will be faster. the execution speed is nowadays usually severely constrained by the memory access time (that's why beach's generic function dispatch scheme that removes one memory access is so awesome)
10:16:53
TMA
flip214: so I guess, it might be faster for some workloads. your guess of the registers helping might be better or worse than mine. without data there is nothing we can do to tell them appart
10:51:39
makomo
how can i define a function in a different package if i want to do it within a file which has a different package in (in-package ...) on the top?
10:52:04
makomo
i tried using (in-package) right before the defun (and then again to switch back). i've also tried rebinding *package*. none worked
10:53:30
Shinmera
If the symbol is already exported from the other package you can also do foo:bar, of course.
10:55:30
Bike
i don't know how slime decides a package to read code in, it might just look for the first in-package in the file
10:56:15
Shinmera
I'm gonna go ahead and guess it errors because of something that isn't related to the name of the function
10:57:54
Bike
as in, (in-package #:foo) (defun bar () 'foo) (in-package #:foo2) (defun bar () 'foo2), C-c C-c the last, get (foo2::bar) => foo2::foo2
11:01:02
Shinmera
The reader reads only complete forms. By the time it's evaluated, and the package switch would happen, it's already read.
11:01:09
makomo
i remember the same issue i had with quicklisp, loading a library in the same form and using it, but that made sense because reading happens before evaluation
11:03:15
Shinmera
(in-package foo) (progn (in-package bar) (defun baz ..)) is read as: (cl-user::in-package cl-user::foo) (foo::progn (foo::in-package foo::bar) (foo::defun foo::baz ..))
11:04:32
makomo
would there still be a way to create a macro which would temporarily switch packages, evaluate a body and then switch back?
11:05:01
Bike
no, because you read before evaluating/compiling, and macroexpansion happens during evaluation/compilation
11:05:22
Shinmera
A macro could do nasty things with trying to guess what the read form of a symbol was and translate it according to that
11:05:53
Bike
for the purpose of this question, i'm assuming that evil magic is prohibited by the ancient treaty
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