freenode/#lisp - IRC Chatlog
Search
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)
11:02:07
dim
I had lots of discussions here where the spirit usually is that you're in front of SLIME or something equivalent when you run lisp code, whereas my users don't even know the program is written in lisp...
11:03:05
dim
anyway, thanks beach for the rationale, it's one I had heard before and I don't think it applies to my case here --- not I also use classes in other areas of the code
11:03:10
beach
dim: It is not about the end users. It's about being helpful to the developer. But if you don't need or want the help, that's up to you of course.
11:08:18
Bike
you could use the same logic as classes. it says structure redefinition has undefined consequences. so an implementation can define it to work like classes, or not
11:12:30
beach
That's what I mean by "support", i.e. what are the consequences in CCL when a struct is redefined. I didn't mean that C-M-x is allowed.
11:13:30
shka
well, if there is no all-to-familiar dialog from sbcl, i bet it just treats structs and classes the same
11:15:18
beach
shka: I seriously doubt that. Most implementations take advantage of the fact that it undefined in order to avoid the indirection of struct instances that is required for class instances.