freenode/#lisp - IRC Chatlog
Search
18:00:24
aaaaaa
Hi all. how do you serialize data to file? I just want (1.2) to be stored like the "(1.2)" string. and read it back then. I saw this in some lisp/scheme textbooks, but forgot.
19:15:29
Harag
is there any statistics available for projects in quicklisp, specifically how many downloads of it?
19:18:11
Harag
the newest ones I can find is http://blog.quicklisp.org/2018/02/download-stats-for-january-2018.html
19:21:13
Harag
Xach: is it a big job? I am considering trashing api compatibility for my project, and it should be ok since I dont think anybody but me uses it, I just wanted to be sure before I spoil some ones day.
21:47:54
fe[nl]ix
Xach: I'm in the process of rewriting Bordeaux-threads. the two implementations will coexist in different packages until I switch everybody to the new one
22:02:09
Harag
Xach: yes I know that it would be the right thing to do but I really want to change some stuff, and really really dont want to start a new project :(
23:19:30
theseb
Is it possible to use defvar, defparameter, or let multiple times with the SAME variable/symbol? even in the same function? you'll just keep creating a new variable right?
23:20:22
Bike
if you have a let inside another let, any names in the inner let will shadow those in the outer let.
23:23:11
theseb
Bike: what motivated this question is that it seems you can get by with never mutating....just declaring new variables
23:23:51
Bike
you don't need to mutate bindigns, sure. it's more like tail calls for control flow than nested bindings, though.
23:44:06
White_Flame
mutation is a way to pass information to another piece of code irrespective of flow control
23:44:36
White_Flame
if your information passage is always well-known, then parameters & local variables/bindings can do it all
23:48:02
|3b|
also note that DEFVAR won't change an existing variable, and DEFPARAMETER is effectively mutation when the variable already exists
23:48:28
|3b|
ACTION wonders if defparameter inside the scope of a dynamic binding of that variable modifies that binding or the global value
0:15:13
|3b|
if other people want to use it, they might not have QL, or might not have a network connection
0:17:31
|3b|
ACTION frequently has a ql:quickload form in a comment or #- in new projects so i can manually evaluate it to easily load the dependencies before i get around to writing an .asd file though
0:19:54
White_Flame
|3b|: the defparameter would basically perform a setf if it already exists, so affecting the current binding makes sense
0:21:14
|3b|
if it did setf of symbol-value it would affect the global binding, setf of name directly would be local, i guessed global since i think of it in terms of global variables, but spec says name
0:35:00
White_Flame
the biggest problem with trying to read backwards is the stupid CRLF that some files use
0:35:13
White_Flame
if you can guarantee a LF character, then you could scan backwards for X number of those
0:36:20
White_Flame
if you're sorting strings, then it's up to you to do the zero padding or conversion to numbers
0:37:20
White_Flame
but if you're not sorting it yourself, then you cannot rely on the ordering of files being consistent
0:41:30
seok
What's the best library for storing simple lisp objects, no functions or clos, into files?
0:49:57
White_Flame
printers of FP numbers have generated ascii representations that can be read back in bit-for-bit matching for decades now
0:51:07
|3b|
just make sure you include type in the ascii (1f0 or 1d0 instead of 1.0 etc) or READ with same default float format
0:55:01
|3b|
might also look at WITH-STANDARD-IO-SYNTAX when using write/read for data files, so you can try to have a consistent state more easily