freenode/#lisp - IRC Chatlog
Search
22:20:23
ig88th
Xach: after deleting everything and running (quickproject:make-project "~/quicklisp/local-projects/test/" :depends-on '(vecto)) it generated a folder called test in ~\AppData\Roaming\quicklisp\local-projects but not in ~\quicklisp\local-projects
22:21:48
ig88th
Xach: ~\AppData\Roaming\quicklisp\local-projects does not have a system-index.txt, and the one in ~\quicklisp\local-projects is empty (just an empty text file)
22:25:14
ig88th
Xach: I mean that SBCl creates projects inside of ~\AppData\Roaming\quicklisp\local-projects instead of ~/quicklisp/ocal-projects\
22:25:34
ig88th
Xach: I mean that SBCl creates projects inside of ~\AppData\Roaming\quicklisp\local-projects instead of ~\quicklisp\local-projects\ (sorry, hit enter by accident)
22:26:52
Xach
ig88th: what version of sbcl are you using? (lisp-implementation-version) will tell you...
22:36:01
ig88th
Xach: the ql:add-to-init-file which adds this: https://gist.github.com/ig88th/e8c618fbae7e02ef5726456886c46215
22:38:45
dim
after a day of Python and C (and make) hacking some lisp at night feels pretty good, just saying ;-)
22:40:54
Xach
ig88th: what do you get from (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)) ?
22:48:09
Xach
ig88th: well, quicklisp is (somehow) getting loaded from C:/users/ig88t/quicklisp/setup.lisp. It would help to dig around and see how.
22:48:46
rumbler31
windows and emacs disagree about where the home directory is, i've been bitten by that before
22:48:51
Xach
Where is your .sbclrc? Is there more to it you didn't paste? Is there more than one .sbclrc? How did you get sbcl?
22:49:12
ig88th
I am using slime provided by (load (expand-file-name (concat default-directory "/quicklisp/slime-helper.el"))) from quicklisp-slime-helper
22:50:33
ig88th
Xach: my .sbclrc is located at ~\. I got sbcl through this link: https://sourceforge.net/projects/sbcl/files/sbcl/1.4.2/sbcl-1.4.2-x86-64-windows-binary.msi/download?use_mirror=svwh
22:53:24
ig88th
Xach: it also contains a file called .sbclrc that has these contents: https://gist.github.com/ig88th/1b6b058a1c05d08af04031ed4555436f
22:55:23
Xach
ig88th: quicklisp's home is in /Users/ig88t/quicklisp/ which is not what sbcl thinks of as ~/quicklisp/. So when you work with ~/quicklisp/local-projects/ in sbcl it is not the one that is known to quicklisp automagically.
22:55:48
Xach
ig88th: you would have better quickproject luck by using (quickproject:make-project "/Users/ig88t/quicklisp/local-projects/myproject/")
22:58:37
Xach
So there are some ways out of the hassle. If you stick with ccl (which is good) you could just not use quickproject until the fix is released later this month. It's not too hard to just make .asd and other files directly.
22:58:57
Xach
If you switch to sbcl it would help to move the quicklisp installation into what quicklisp thinks of as ~/quicklisp/
22:59:46
ig88th
Xach: that fix works! I can now load projects created previous to the current session
23:08:27
drmeister
Hey folks - does anyone do Javascript programming for developing interactive web based apps? I'd like to talk to someone about developing the browser side (Javascript code) to implement some new jupyter widgets that would work with our cl-jupyter kernel.
23:10:27
Shinmera
drmeister: I do, but I like to do as little of it as I possibly can, so probably not the right person for this.
23:14:02
iqubic
Shinmera: I want to work on making a neural network with perceptrons and such, but that is too advanced
23:15:14
Shinmera
Afaiu neural nets and perceptrons are well defined, so just implement the algorithms
23:15:42
Bike
yeah, perceptrons are simple. teaching them is less simple, but it's still not too bad
23:16:55
Shinmera
As with anything in neural nets, getting them to actually learn anything useful is the hard part.
23:20:47
whoman
i wonder if there is a lisp diff. but diffing the source files will reveal the precise and accurate by science differences between the two, every byte of their existence
23:21:04
iqubic
Is one of them better than the other. I notice that lispy has evil bindings via evil-lispy. I use evil, so I am more inclined to use that,
23:21:15
whoman
there is also "lisp at the speed of thought". i tried lispy and that one but, i returned to paredit because i didnt feel like learning somethuing new
23:21:44
whoman
paredit might have evil bindings, but that would be a good criteria for choosing lispy
23:22:26
Ukari
the symbol is weird, i use a temp variable in function but why the symbol could found in package
23:26:56
didi
Ukari: This is an interesting question. Lexical variables are different than global ones. There is a cool excerpt about it in PAIP.
23:27:46
Ukari
if a define a function test2 like test1, there still only one symbol "TEMP" but it don't tell any detail meaningful information
23:28:12
didi
Ukari: I don't have the necessary skills to explain it to you, unfortunately. Maybe someone else can jump in.
2:06:50
sjl
if you're an ACM member you can get a PDF of it https://dl.acm.org/citation.cfm?id=530559
2:08:55
iqubic
I don't think I want to read the book, because I don't have a good way to access the book.
2:55:33
Bike
(setf x 7) is modifying the binding of x, and that binding is created when the function is called
2:56:08
iqubic
Is see. Is there a way to make the first example actually change the value of x outside the function?
3:42:53
Bike
what operations are you doing? how sparse are the matrices? do you have guarantees on your form? what's the precision? how big are they? bla bla bla
4:06:49
iqubic
It is morning for you, night for me, but I'm not sure it can be considered good. I have been battling sickness all day.
4:15:50
iqubic
Can I overload simple functions like + to work differently if I pass in a CLOS object of my own creation?
4:17:59
Zhivago
You can always make your own version of + which is, but then you need to convince other code to use it.
4:18:37
iqubic
So most matrix libraries provide their own version of the addition function, instead of piggybacking on the existing symbol function name?
4:20:01
Zhivago
It was originally intended to allow code from lisp-system A to run on lisp-system B.
4:20:34
Zhivago
So they tried to avoid doing anything that would require hard work on the underlying implementation.
4:22:17
iqubic
yeah. I somehow assumed that CL's (+) function was a generic function that was specialized to numbers.
4:22:41
beach
iqubic: If you had bothered to look at the Common Lisp HyperSpec page for +, you would have seen that it is NOT a generic function.
4:24:24
beach
You keep forgetting location of the document defining the language you are using? Wow.
4:26:26
iqubic
beach: I'm sorry. It's just that I use the emacs lisp documentation way more often than I use CLHS.
4:34:24
stylewarning
iqubic: there’s CL-GENERIC-ARITHMETIC and LOOM, the former making arithmetic generic, the latter making almost all of CL generic
5:21:40
pjb
and assuming by quote you mean COMMON-LISP:QUOTE and by function you mean COMMON-LISP:FUNCTION
5:28:21
pjb
iqubic: first it should be noted that APPLY and FUNCALL take function designators, so if the symbol and the function designate the same function, quote and function will be equivalent in the sense that the same function will be called.
5:28:42
pjb
iqubic: and in the case of functions from the CL package, they will always designate the same function!
5:29:01
pjb
iqubic: however, for other symbols, (not from CL), they may deisgnate different functions!
5:29:33
pjb
iqubic: a symbol will always designate the global function binding, ie. the function obtained by (symbol-function symbol).
5:30:07
pjb
iqubic: however, the function special operator is the (only) closure creator operator, and it may create closures of locally bound functions.
5:30:41
pjb
iqubic: therefore: (defun foo () 'global) (mapcar 'funcall (flet ((foo () 'local)) (list (quote foo) (function foo)))) #| --> (global local) |#
5:31:24
pjb
and also: (flet ((foo () 'local)) (mapcar 'funcall (list (quote foo) (function foo)))) #| --> (global local) |#
5:31:38
pjb
In such cases, you would have to choose between quote and function depending on WHAT YOU MEAN!
5:33:31
pjb
iqubic: other characteristic properties of symbols and functions, is that since symbols, as function designators, are resolved only when used, when the function needs to be called, if the function is redefined (at run-time), then the symbol will designate the new version. While function returns the actual closure object, if the fbinding is redefined, the function object will still be the old one.
5:34:20
pjb
(let ((funs (list (quote foo) (function foo)))) (list (mapcar 'funcall funs) (setf (symbol-function 'foo) (lambda () 'redefined)) (mapcar 'funcall funs) )) #| --> ((global global) #<Anonymous Function #x30200499B92F> (redefined global)) |#
5:34:37
pjb
So again, choose between the symbol and the function, depending on the meaning you mean!
6:02:48
iqubic
Isn't there a difference between the literal value of a symbol, and the function-value?
6:05:05
beach
iqubic: Try it out at the REPL. I don't know what you mean by "literal value", so I can't try it out for you, but you must know what you mean yourself, so just type the form (EQ ? ?) and see the result.
6:08:17
emaczen`
(sb-ext:run-program "prog-name" (list "name" "--dynamic-space-size" "4096")) -- is this the correct way to pass command line arguments?
6:18:39
emaczen`
I'm printing out the dynamic-space-size from the external program and it is the default 1 GB...
6:25:37
jackdaniel
emaczen`: compare `sbcl --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))"` in the repl with `sbcl foo --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))"` (likewise)
6:26:25
jackdaniel
`sbcl --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))" program-name ` should work though
6:27:26
jackdaniel
http://www.lispworks.com/documentation/HyperSpec/Body/f_set.htm, http://www.lispworks.com/documentation/HyperSpec/Body/a_setf.htm
6:28:36
emaczen`
jackdaniel: I see... that is kinda lame, I would have never figured that out myself
6:31:53
jackdaniel
iqubic: if it is qouted in the linked example, then why not? I highly recommend reading both linked pages and if you still have questions *after that* asking them here :)
6:39:41
beach
iqubic: Do you know what the quote character means? If not, you definitely need to take a break and go read a book.
6:41:26
iqubic
('symbol) is the syntax. ' is a reader macro that expands to the function (quote symbol) which returns the symbol exactly as it is, with out evaluation
6:42:54
iqubic
It returns symbol, exactly as it is. No evaluation is done at all. ('symbol) => symbol.
6:44:29
emaczen`
I'm running (sb-ext:run-program ...) but when the external sbcl program's heap becomes exhausted I am dropped into ldb. I just want to exit from this and for my main program to continue.
6:44:45
beach
iqubic: If the reader return (quote <something>) when it sees '<something>, then what does it return when it sees ('<something>)?
6:45:47
iqubic
Or wait, I was reading the input as if it were the output. When the reader sees ('symbol) it returns ((quote symbol))
6:47:43
jackdaniel
maybe wrapping your program in handler-case and catchin heap exhausted (and exitting application) would do what you want
6:49:33
minion
iqubic: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
6:49:34
beach
That I have figured out. What I haven't figured out is why you prefer asking trivial questions in #lisp (which is not a Common Lisp support channel) rather than reading a book.
6:51:50
beach
emaczen`: Such a condition would be hard to implement. I mean, if the heap is exhausted, how does it allocate space for the condition instance? And what would you do when it is signaled? Examine the stack? That requires form evaluation, taking up even more heap space.
6:55:56
emaczen`
jackdaniel: Yep! thanks, now I can go to bed and my program should run all night, and I don't have to be here to restart it when it drops into ldb!
7:01:26
pjb
iqubic: if the symbol designates a lexical variable, then its value will be different from (symbol-value symbol).
7:01:51
pjb
iqubic: on the other hand, if it designates a dynamic variable, then its value will be that of (symbol-value symbol).
7:02:31
pjb
(let ((foo 42)) (declare (special foo)) (list foo (and (boundp 'foo) (symbol-value 'foo)))) #| --> (42 42) |#
7:05:33
z3t0
I have some code and am wondering what is the best way to return the object at data from this function
7:05:56
z3t0
I understand that let returns the value of its final form, except the final form in this case must be closing the file
8:57:42
jackdaniel
johnnymacs: if there is gcc which can produce webassembly binaries, you could compile ecl or clisp
8:58:48
Shinmera
Anyway, good luck shipping like 10-20mb of wasm CL runtime or whatnot to run your few kilobytes of actual CL code.
8:58:55
jackdaniel
for instance there were builds of ECL to NaCL and pNaCL (obsolete chrome runtimes)
8:59:41
Shinmera
didi: (or symbol function), if you're talking about any function, and not specifically eq.
8:59:45
jackdaniel
Shinmera: given wasm binaries are not much bigger than linux ones, ecl should fit in around 1mb, what is comparable to some js scripts I saw in production
8:59:50
lerax
If someone have interest in Propositional Logic, I've been written this library with some efforts: https://github.com/ryukinix/lisp-inference
9:00:26
didi
Shinmera: Thanks, but I'm specifically talking about eq. Actually, eq, eql, equal, and equalp.
9:02:46
jackdaniel
then if you have time and resolve try compiling ecl and clisp and see how far you can get ;)
9:05:19
Shinmera
Anyway, checking a value for a certain... well, value, with a type, seems just plain wrong to me
9:05:52
didi
Shinmera: Use case: I have a data structure that uses only eq, eql, equal, or equalp as a test.
9:10:11
heisig
lerax: This is a nice little project. Since you decided to represent statements as lists, have you considered using DEFSTRUCT with (:type list)? Then you get accessors and predicates for free.
9:12:15
lerax
This a old project that I'm re-touching this again now. Probably I'll define later better data-structures for this. On those days, I just was trying getting fun with propositional logic and Lisp. Later that I read some books... well, things changed. Yes, I need review that.
9:13:11
beach
johnnymacs: Even if you manage to translate Common Lisp to webassembly, you still need a complete Common Lisp system in the target (I assume a browswer), including all the "library" functions, the memory manager, etc.
9:13:49
lerax
But I don't have sure if defstruct for this specific problem is a good idea because in general manipulating lists sometimes is basic always I need to parsing logic statements... but well, maybe with defstruct I can reduce the verbosity.
9:15:29
heisig
lerax: Unless you are under severe performance constraints and know what you are doing, represent your data with CLOS.