freenode/#lisp - IRC Chatlog
Search
9:23:27
iissaacc
has anyone else noticed issues with postmodern's with-connection macro seemingly not releasing a connection?
9:27:24
phoe
https://github.com/marijnh/Postmodern/blob/8a44fd6d27dfa44be321bd647fc1d6ca6a2b8c9f/postmodern/connect.lisp#L96-L101
9:29:05
iissaacc
well, I used a couple of functions with a with-connection in them, they ended, but then i go to try and drop the test database that i created and i get an error telling me it is in use
9:29:49
iissaacc
checking pg_stat_activity shows 2 idle connections from the user i specified in the with-connection parameters
9:30:42
no-defun-allowed
Could there be another meaning of "in use", like that the table is being used by a view or something? I haven't gotten deep into SQL to say anything for sure.
9:31:08
phoe
can you try to reproduce it? are you sure that you did not do any toplevel connections from the REPL, or that you reassigned the value of POSTMODERN:*DATABASE*?
9:32:41
phoe
docstring for method DISCONNECT (DATABASE-CONNECTION): "Disconnects a normal database connection, or moves a pooled connection into the pool."
9:33:46
no-defun-allowed
But I still wonder if that's the problem; if the connections aren't being used for anything, why would they prevent a table from being dropped?
9:34:31
phoe
you connect to a particular database, so you can't destroy the database while there's still something connected to it
9:39:32
pve
iissaacc: in case your wondering about the quality of postmodern, I've used it quite a bit and found it very reliable
9:40:16
iissaacc
it's the first time i've done any sql really so im working on the theory that any problems are probably the result of my own ignorance
9:41:11
pve
when it comes to postmodern (and postgresql for that matter), any weirdness has always been my own fault
14:09:29
treflip
mseddon_: Hi! You was right, it looks like semantic grammar is what I need. Do you know any software that uses this approach or maybe publications that have any code examples? I found only 2 kinds of publications on this topic. The first one is academic stuff that takes a lot of time to grok, and the other one is super simple articles on medium that give only vague understanding of this concept and
14:12:47
mseddon_
treflip, as a general rule you basically just need a parser. The Earley parser is quite popular: https://en.wikipedia.org/wiki/Earley_parser but for insanely fast parses, do check out Tomita's https://en.wikipedia.org/wiki/GLR_parser
17:49:57
warweasle
Can I use drakma to fill out a login form? I have to access a vendor site (with permission) to check for new data daily.
18:14:50
aeth
warweasle: Depends on what you want with the alist. The alist is actually (foo . bar) to store bar while (foo bar) stores (bar) but you often see that.