freenode/#lisp - IRC Chatlog
Search
15:12:59
fitzsim
I'm hoping you can paste the clone && run one-liner and it'll work for you, if you already have your operating system's SBCL or CLISP installed
15:15:27
srandon111
hello all, can somebody explain to me why by default lisp is case insensitive for functions ?
15:16:14
jcowan
srandon111: BECAUSE LISP GOES BACK TO THE TIME WHEN COMPUTERS OFTEN COULDN'T DO LOWER CASE.
15:16:15
beach
srandon111: And it has nothing to do with functions. It has to do with how the reader creates symbols.
15:17:03
jackdaniel
if you care about how symbols are printed, just (setf *print-case* :downcase) in the repl
15:18:07
jackdaniel
srandon111: i.e you could set the readtable case to :preserve, but that's not a good idea
15:18:23
beach
srandon111: And, as I often explain, it is usually pretty pointless to ask "why" Lisp is the way it is, because the explanation is often just historical.
15:18:52
jcowan
It's an extremely common performance error: our poor monkey brains don't seem to be good at how many negations there are in a sentence.
15:19:57
jcowan
In the end all explanations are historical, and it seemed to me that srandon111 was asking for one: "Why is this the default?"
15:21:14
phoe
"it used to work in the past, if it still works then it means that the folks who got this the first time reproduced well enough"
15:23:14
phoe
conscious evolution of software systems is a little bit better than blind evolution because we can actually anticipate meteors and program defensively around them
15:23:30
phoe
so if we're lucky our Lisp programs may survive longer than us in case of another cataclysmic event
15:24:49
jcowan
There's a tendency for people outside the CL community to look at the 1500+ pages of weirdness and think "Oh, this is a research system where everything and the kitchen sink was put in because why not."
15:25:32
jcowan
And then (being in the grip of Geek Explainer Syndrome) I have to explain that no, everything is there because it once served a severely practical purpose. Except the Roman numerals.
15:29:02
fitzsim
"nearly all implementations produce Roman numerals only for integers in the range 1 to 3999, inclusive."
15:35:17
fitzsim
oh, I was joking, but, https://stackoverflow.com/questions/45844555/how-to-print-roman-numerals-greater-than-3-999
15:40:53
jcowan
CIↃ isn't that great either, because the C is in modern style and the Ↄ is in archaic style.
15:41:21
ecraven
hm.. maybe it's time to go and look for another font, patching bitmap terminus for everything isn't fun any longer, even if it is the best font I've found... are there outline fonts that are as crisp as proper bitmap fonts on normal dpi displays?
15:48:40
TMA
(the pattern is even more prevalent... V is half od X; all told, the roman numerals consist of letters IVXLΨDΦ or more commonly IVXLCDM)
15:49:00
Nilby
It's nice that (= (+ ೧೨೩೪ ५६७८) (+ 1234 5678)) , but a little sad that (+ ⅠⅡⅢⅣ 5678) doesn't work.
15:49:56
jcowan
In general, Unicode distinguishes between digits and decimal digits, and place-value arithmetic only works on the decimal digits.
15:54:26
jcowan
Traditional Tamil numbers used the "3 100 4 10 5" pattern, but later a proper zero was added.
16:32:19
matryoshka
jcowan: lisp images are not just a dump of the environment table and the state of running processes to disk?
16:32:36
matryoshka
where/how did you find out about this? I've been trying to figure out the workings of lisp images for a while.
16:36:04
beach
matryoshka: I think jcowan is saying that by "Lisp image" it is often meant the live execution environment when the Common Lisp system is running.
16:37:15
phoe
then what do we call the "frozen" form of the image, created via things like save-lisp-and-die?
16:38:03
beach
matryoshka: Though, if you have any questions about how a running Common Lisp system works, please do not hesitate to ask.
16:39:09
phoe
the docstring for uiop:dump-image says, "Dump an image of the current Lisp environment at pathname FILENAME, with various options."
16:39:37
phoe
Rainer states at https://stackoverflow.com/questions/480083/what-is-a-lisp-image that an image is usually a file which is a memory dump of a Lisp system
16:40:10
fitzsim
cl-launch uses the term "dumped image" and tries to support many Common Lisp implementations
16:41:30
jcowan
That is not, however, necessarily the correct definition in contexts other than the CLHS.
16:43:18
Odin-
I'm fairly sure I've seen references in modern documentation to "loading a system into the image" in the "an image is a live thing" sense.
16:43:19
phoe
so I'd say that around #lisp, an image, depending on context, can mean either the complete live state of a running Lisp system or its file-dumped form that can be restored back into a live Lisp system
16:44:02
phoe
and whenever clarification is needed, "live image" and "dumped image" work well I guess
16:44:07
jcowan
When I loosely used the term "raise an exception" instead of "signal a condition" the other day, you (correctly but somewhat pedantically) corrected me. That got me to wondering: definitely "signal" is better than "raise" in the Lisp context, but I am not sure that the divergence between "condition (object)" and "exception (object)" carries any special meaning.
16:44:08
Odin-
The thing is, the _obvious_ thing to do is to consider a file that can be loaded to (more or less) restore a given image to effectively _be_ that image...
16:44:44
Odin-
jcowan: I think in that case the issue is that Common Lisp doesn't have anything it calls exceptions.
16:46:06
phoe
signaling a CL condition winds the stack further, raising/throwing an exception usually unwinds the stack
16:47:00
Odin-
jcowan: True, but the fact that it doesn't immediately unwind it is the difference in question....
16:48:08
beach
phoe: My point is that you made up the difference and named it. I like it, but you did make it up. We do that all the time. Be proud of it.
16:49:37
Odin-
beach: I get where you're coming from, but I also get why someone wouldn't think of it as having invented something.
16:50:15
jcowan
Scheme has exactly the the same resumption semantics as CL, but uses "exception handler" vs. "condition object".
16:55:25
Bike
does scheme use continuations to resume? i mean, if there's an error, and the handler resumes to somewhere, does that unwind and rewind the stack in a way dynamic-wind deals with?
16:58:05
phoe
yes, that's one thing - it's not standard C++ though, it's a Windows sort of extension
17:10:42
phoe
if you execute a function named FOO then you reach the actual code through the symbol FOO
17:11:34
phoe
so if you modify the place that the symbol FOO points you to, bam, you have just redefined that code for all pieces of code that reach that code through the symbol FOO
17:16:38
phoe
make yourself a hash table from strings to structs, ensure that one of those struct fields is a function pointer, replace it via standard assignment of struct fields
17:18:28
phoe
as long as all callers go through this struct indirection, you can atomically replace function pointers for all of your system
17:20:07
phoe
if you only need functions then sure; I was thinking of structs that have things like variable/function/class bindings and such
17:23:07
MrtnDk[m]
I have been considering what it would take to implement a really basic Lisp-like thing in C.
17:25:32
jackdaniel
you'll see lisp-in-c, lisp in less than 200 lines of c, learn c - build your own lisp yada yada ,)
17:27:07
phadthai
and of course https://en.wikipedia.org/wiki/Kyoto_Common_Lisp and derivatives are C implementations (including ECL)
17:44:04
Odin-
The more interesting question, in my view, is whether you can build a useful Lisp system on some of the more constrained systems that are in use nowadays.
17:49:42
ecraven
mfiano: just tried that with antialias=false, it's atrocious ;) like all non-bitmap fonts
18:31:13
White_Flame
when RAM is measured in KB, the footprint of just the CL symbols can be challenging
18:38:28
_death
Odin-: I played with ulisp a month ago or so (on an m5stickc), but indeed it's a bit limited (no compilation/macros).. I think something like a vm running clisp's bytecode or a subset of it could be nice
20:54:44
MrtnDk[m]
phoe: I'm on Matrix. I'm not sure how to join an IRC room, even if it is bridged and has no invitation requirement.
20:56:05
phoe
hmmm, https://gist.github.com/fstab/ce805d3001600ac147b79d413668770d says, "join the room #freenode_##lisp:matrix.org"
21:01:13
phoe
a person who can find a solution in ten seconds can sometimes save someone ten minutes
21:01:17
MrtnDk[m]
Sorry, I often suck at searchxing. Even at coming up with the idea to do it some times.
21:01:37
Odin-
I'm glad. Because it actually seems to be getting rarer and rarer that searching works like it should. :p
21:20:26
mason
Anyone know if https://gitlab.common-lisp.net/vsedach/cliki2 is suffering a temporary error, or some more permanent state?
21:35:21
MrtnDk[m]
* On the matrix it might be room #freenode_#common-lisp.net I'm guessing, if it be bridged.
21:40:44
etimmons
Mrtn Dk: yes (coming from a fellow Matrix user on that channel). Also, my understanding is that all of Freenode is "bridged"
22:02:22
nij
Hello! I recently started writing a personal project using emacs-lisp. It crashed me on performence so I wonder if I should switch back to common lisp.
22:02:57
nij
For now, my database is just a folder with ~7500 files. Each file contains one lisp list.
22:03:50
nij
I have never dealt with a database before, so I must be doing something wrong. But in any case, the performence is very bad. It is not clear in my head when I should read/write from/to the database, or when I should just use the variable to hold things.
22:04:30
nij
I wonder if switching back to common-lisp would solve this problem. I've heard of the power of CLOS, but have never experienced it in depth. That's my situation. So.. any advice would be appreciated.
22:18:05
phoe
also, yes, sqlite - unless you'd like to try a pure-CL solution of sorts, or try to reinvent the wheel for some personal learning
22:27:10
phoe
do you know what is a relational database, and how its data differs from object-oriented data?
22:27:27
phoe
if not, you should - and then you'll know that ORM is a toolkit that attempts to bridge that difference
22:28:22
nij
relational dbs are based on spreadsheets, and oo data are lots of classes,instances, and slots?
22:29:11
moon-child
data representation is slightly similar, and problem domain has some overlap, but the two have wildly different roles
22:29:53
moon-child
spreadsheet is end-user data flow & analysis. Relational db is relational algebra (=academia goodness) + long-term data storage & representation
22:45:16
White_Flame
nij: for something that's going to stay under 10MB for years from now, a simple persistence to log file and keeping all of it in RAM would be fine :-P
22:57:51
markasoftware
the simplest thing to do is just maintain it all in memory under a single top level variable, then use cl-marshal or similar to serialize it to a single file on disk periodically
23:26:43
jcowan
The main advantage of SQLite in this context is that it works very hard to either persist your data or fail.
23:29:25
jcowan
If you have an easy sqlite setup, then "INSERT INTO log VALUES (?)" with ? bound to the line to be logged is just about as easy as writing to a file.
23:41:46
Xach
yes, it would be much safer and more reliable. but if you go the diy route, a log is an easy step beyond stashing all the data from memory periodically.
23:43:15
Xach
and by log, i don't mean syslog things, i mean writing out data records, as in "write-ahead logs" or "commit logs"
0:00:33
White_Flame
and again, this is only if SQL is not worth learning for the scale of your project
2:07:34
aeth
postmodern (for postgresql) was the general recommendation back in the day. Idk if it still holds
2:08:59
copec
That's what I was looking at, and then looking at Mito since it is high on all my searches