freenode/#lisp - IRC Chatlog
Search
1:31:40
dtornabene
so am I correct in thinking that Clack only uses roswell for the commandline launching script(s)?
1:37:36
PuercoPop
dtornabene: if you are wondering that if you need to use roswell to use clack, then the answer is no
2:45:09
aeth
(not (mismatch #(1 2 3) #(4 5 6 1 2 3) :start2 3 :end2 6)) will generally be more efficient than this, right? (equalp #(1 2 3) (subseq #(4 5 6 1 2 3) 3 6))
3:04:16
defunkydrummer
aeth: equalp is overkill here, if they are fixnums i think eq would do the job. Also, i'd rather explicitely create simple-vectors of type fixnum, instead of using the #() reader macro.
3:05:35
defunkydrummer
aeth: (eq if you want to loop over the elements yourself.) I might be wrong, though.
7:03:44
xificurC
I'm fighting a weird emacs crash, it just stops with exit code 15. A fresh install on a freshly installed ubuntu 18.04. Pure emacs runs fine but adding spacemacs to it crashes with this weird error. I'm surfing the stacktrace in gdb to find out what's causing it. http://ix.io/1aoa
9:25:08
jmercouris
I prefer to use something in the standard lib more often than inventing something
9:25:29
jmercouris
I guess I could write a hashing function, but then I'll have to consider collisions, etc
9:26:44
jmercouris
so each survey question has a description, I would like to hash this description and treat it as an ID
9:30:40
_death
there's no guarantee of a unique value for each string.. in fact it's quite the opposite, unless you have a bounded set of strings so you can build a perfect hash function for them
9:31:19
jmercouris
I will only have about 10 questions at a time per survey, the liklihood of collision is very low
9:32:14
jmercouris
autoincrement would require me to keep state in between the rendering and receipt of a request
9:32:46
jmercouris
though that could be fixed with some routing so that the submit button contains information about which survey the user is submitting
9:35:04
jmercouris
I just got tunnel vision, should have spent more time thinking about it instead of x-ying myself
9:35:48
_death
if your questions are kept in order, an index into them would make an ID as well.. if you only append questions it could be ok
9:37:19
jmercouris
let me first do a really basic implementation that works for me, and if anyone else ever uses the software, I'll consider making it more robust
9:40:05
jmercouris
shrdlu68: Indeed, but I'll be pursuing a different solution, I hadn't thought about my problem well at all, thanks anyway!