freenode/lisp - IRC Chatlog
Search
23:01:35
vtomole
I have this: http://paste.lisp.org/display/349562 (the /public/ directory has a hello.txt). But when I do "(:a :href "html/hello.txt" "hello")" in cl-who, it can't find that text file.
5:16:07
flip214
vtomole: do you have (create-folder-dispatcher-and-handler) to handle static files in html/ ?
5:20:33
vtomole
fli214: Yes. I also had: (setq *dispatch-table* (list 'dispatch-easy-handlers (create-ajax-dispatcher *ajax-processor*))). Later in my code to handle some ajax requests
5:23:53
vtomole
I'm trying to figure out why though. I'm not using the same *dispatch-table* variable
5:41:39
flip214
ie. is the static file searched for in the wrong place, or does the folder-dispatcher not even run?
5:51:06
vtomole
Man this bug has been killing me all day... I should defintely start to use some kind of testing framework.
5:51:38
ebzzry
What the Lisp version of ${BASH_SOURCE[0]}? (uiop:raw-command-line-arguments) returns only the basename of $0
5:54:00
vtomole
flip214: I actually have no idea what caused my bug. It works in the meantime.Maybe it will break again, I don't know.. Only time will tell.
5:55:16
vtomole
I actually had a similar problem with cffi. It could not locate my .so file when i deployed it online. But it worked locally.
6:55:22
slyrus
beach: assert doesn't call itself. I've found that testing frameworks can be very helpful for automatically/periodically running tests. Thins like cl-test-grid are very useful for quicklisp's libraries.
7:10:04
axion
I am trying to write a very simple function but falling short. I've outlined what I am trying to do here: http://paste.lisp.org/display/349572
7:28:50
beach
axion: It is probably better to allocate a new string and more characters over as you traverse the input.
7:33:59
axion
I am trying to not use third party librarie, else I would have used symbol-munger. The reason why is stupid...the other author of this software doesn't want dependencies for one-off functions.
7:35:44
beach
flip214: There is probably no point in taking the string-dowcase first. Might as well loop over the characters in the existing symbol name. It saves an allocation too.
7:48:29
beach
Instead of vector-push-extend, you might pre-allocate by counting the number of #\- in the original string.
9:31:57
dim
is there a known performance impact of doing (setf (aref batch i) new-value) for each array item compared to (make-array ...) then populating the new array and never referencing the previous one?
9:32:51
dim
either all the previous items in the array are individually collectable, or the array as a whole, but I don't have any idea about if there's a simpler case in terms of the GC here
9:38:49
shka
dim: not sure why (perhaps guys at #sbcl would provide better info) but it seems that arrays allocation in sbcl is somewhat cheap
10:18:51
jdz
If array element type is T then the array must be scanned on each GC; specialised arrays don't have to be scanned.
10:53:59
beach
dim: They are much more flexible. For example, you can redefine a class, and the semantics are well defined.
11:00:45
dim
but the main idea is that the program I am writing is then shipped as a binary to its users, and only runs for the task at hand (importing data)