freenode/lisp - IRC Chatlog
Search
21:03:37
v3ga
so how do you go about removing an undefined variable warning. i've tried makunbound and unintern...neither one of those seem to be what I want.
21:10:05
v3ga
phoe: basically i'm getting an undefined variable for a function I mispelled and removed. https://pastebin.com/Nr398e6q
21:15:41
aeth
This is a case where having variables and functions with the same name can lead to confusion because you were thinking the issue was renaming the function, when the issue was related to a typo in a variable name.
21:20:41
v3ga
Jesus It's right there too... I'm coming from clojure and not used to a usable stacktrace. -_-
0:46:24
Bike
i think i found a bug in sbcl's type simplifier but i'd appreciate a sanity check: could someone else compare (let ((c (cons 2 4))) (typep c '(or (cons (integer 0 8) (integer 5 15)) (cons (integer 3 15) (integer 4 15))))) against (let ((c (cons 2 4))) (or (typep c '(cons (integer 0 8) (integer 5 15))) (typep c '(cons (integer 3 15) (integer 4 15)))))
0:59:03
Nilby
Bike: That the second form is T seems like a bug to me. But I hardly every use such specific type checking.
1:05:44
_death
yeah.. a "simpler" case that shows it is (let ((c (cons 'a '0))) (typep c '(or (cons number symbol) (cons symbol number))))
1:16:49
Bike
also i wouldn't be surprised if ccl cribbed logic from sbcl. and the sbcl logic has a comment saying "UGH." so i don't have the greatest confidence in it
1:18:54
Bike
sbcl simplifies the type to (cons (unsigned-byte 4) (integer 4 15)) but i think (or (cons (unsigned-byte 4) (integer 5 15)) (cons (integer 3 15) (integer 4 4))) would be more correct
3:18:41
aeth
charles`: I mean, it's possible that gensym's a nonnegative (or positive? does it start at 0?) fixnum
3:19:57
aeth
Well, no, I don't think that would be conforming for an implementation to do that because you can rebind *gensym-counter* to any integer
3:20:55
aeth
(let ((*gensym-counter* (expt 2 123))) (gensym "FOO")) => #:FOO10633823966279326983230456482242756608
3:21:22
aeth
at least, going off of this: http://www.lispworks.com/documentation/HyperSpec/Body/v_gensym.htm
3:23:00
charles`
I'm not having any issues, I just want to make sure I wont run into any in the future
3:24:18
aeth
well, this seems to work in SBCL... (let ((*gensym-counter* (expt 2 999))) (gensym "FOO"))
8:47:12
asarch
With Datafly I prepare the SQL statement: (insert-into :students (set= :last_name "Uzumaki" :first_name "Naruto" :address "Ever green st #598, Konoha" (returning :id))
8:47:53
asarch
With the database connection: (with-connection (db :school) (execute (insert-into :students (set= ...
8:48:18
asarch
However, neither of those expression actually returns the id of the newly record created
8:49:17
asarch
Reading the issues about the Datafly project, https://github.com/fukamachi/datafly/issues/7, a fellow says there is an expression to get the id using SQLite3: sqlite3:last-insert-rowid