freenode/#lisp - IRC Chatlog
Search
2:13:56
pseudo_sue
problem solved. it was a package-related issue, and I got around it by just using keywords instead of symbols for user input. the menu's just a crude front end to a genetic algo programme I'm writing, to spare someone from interacting with it through the REPL, as I've been doing.
2:17:28
pseudo_sue
this is nice. it's really satisfying watching this thing tear along at top speed, now.
2:29:45
pillton
psuedo_sue: You should get in the habit of binding reader/printer variables when using them for I/O.
2:36:23
pseudo_sue
Thanks, pillton. This is actually the first time I needed to worry about input from a user. I'll look into that.
2:53:37
pseudo_sue
well, there we go. my first ever (post-hello-world) lisp programme. far from finished, messy, and amateurish, but it works. https://github.com/ObliviaSimplex/genetic-exercises/tree/master/genetic-linear
2:55:46
pseudo_sue
basically, what it comes down to is that you're evolving bitvectors of machine code for a virtual, register-based machine, instead of functional trees.
2:57:26
pseudo_sue
i figured it'd be a great excuse to start getting serious with CL, and be as functional as I want to be without making some of the essentially imperative bits of this algorithm pointlessly awkward.
2:58:40
pseudo_sue
(but, as much as I like the idea of FP, it kind of irks me how Clojure forces your hand in that direction. I could see that being as irritating as Java's compulsory OO in 10 yrs time.)
3:29:47
fewdea
Hey all, I'm using postmodern to create my db tables. I don't think i'm able to include all necessary options in the class definition, for instance, an index on my serial column. so I execute the query to create the table, and then another query to add the column. return value for a successful first query is 0, otherwise an error is thrown. I don't want to execute the second query if the first failed. what is the preferred method of ha
3:33:10
fewdea
maybe that's a dumb question. how could the second query execute if the first throws an error? I think what I meant was how do I roll back the first query if the second fails? can I wrap these in a transaction?
9:17:49
shka
i just don't want to write loops for common tasks like: copy these range from here to here
9:29:05
loke_
shka: And why would you think LOOP is slow? (it's the fastest alternative unless you want to do something multuithreaded)
9:35:44
dim
if any SBCL guys are in the room, https://github.com/dimitri/pgloader/issues/327 is another case of "Heap exhausted, game over"
10:00:20
dim
p_l: I though about adding a PG custom format dump source, but failed to find the time and energy to write a parser for the binary format there ; it would be interesting to load just a table from the dump while renaming it or restoring it into another schema, etc
10:11:41
dim
you can define a source as a query to be run rather than a table, or you can also define a set of views on the source database and copy over the FDW the data from the view
10:12:27
dim
define the view, then the fdw that maps against the view, then your ETL is just: insert into target.table select * from source_fdw.exported_view;
10:34:59
dim
typically those custom functions are easy to reduce to SQL expressions, so they are part of the view definition