freenode/#lisp - IRC Chatlog
Search
22:59:29
runix_1
Can you have a defmethod be temporary within a function, such that it only exists when the function is "active"?
23:00:40
Bike
you could have the function bind a dynamic variable that the (global) method consults to determine its behavior.
23:06:17
jmercouris
you could have a defmethod at the top of the function body, and at the bottom you could execute remove-method
23:11:08
PuercoPop
jmercouris: Bike's suggestion of the dynamic variable + an :around method sounds like the most sensible approach for what you want to do.
0:32:09
skidd0
anyone using postmodern, how do you handle database migrations and alterations during development?
0:40:20
Thorondor[m]
I think postmodern doesn't have anything for doing that, you will have to do it yourself.
1:21:18
Xach
skidd0: yes, to load the alterations. i like using SQL directly with postgres whenever possible.
1:35:02
Xach
dim wrote a book on postgres. and he wrote a very great <whatever>-to-postgres converter, pgloader.
1:48:05
skidd0
also Xach, and anyone else, do you have anything you remember when first learning lisp that you wish you knew sooner?
1:52:58
Xach
start making stuff, keep trying to do it better, ask for people to look at what you've done and suggest improvements or make you aware of stuff that would make life easier, interact with people and show your work
1:54:44
skidd0
I'm going to put my "learn lisp" to-do program on github once i've got a working version
1:57:18
jeosol
I agree with start to build stuff and refine as you go. I was able to build a very large system follow this, but I have done a lot of refactoring since.
2:02:02
skidd0
I got really into web-dev with Flask (python) because of Miguel's well-structured Flask Mega Tutorial. I've looked at PCL, but are there other examples of project based learning for Common Lisp?
2:21:19
sabrac
skidd0: I expect to be dropping a roadmap for potential postmodern development in another 24 hours or so. Migration support is on the roadmap
2:23:10
jeosol
nice, I wanted to say this. I did benefit from your postmodern tutorials when I started, used that lib and clsql but mostly with postgresql
2:25:58
sabrac
Thank you. I want to find the time to write some tutorials that do not assume the reader already knows sql, but life gets in the way.
2:46:44
jeosol
hahaha, that's funny. The reminders about the library comparison. Those where useful for sure. The ones on Json, time libraries, and csv business
3:54:02
skidd0
sabrac: i see create-all-tables and create-package-tables, but neither seem to create the tables i identify when i (defclass something .. :table-name somethings)
4:10:27
beach
asarch: Yes, the Common Lisp HyperSpec has only minor differences compared to the ANSI standard.
4:13:49
beach
The book is too thin to mention every function, every macro, every class, every special form.
4:15:48
asarch
Since I already know Kung-Fu, I was thinking to get a book about, for example, "how would I parse a file reading only...?" to check those functions related
4:17:02
asarch
The Common Lisp HyperSpec (TM) from LispWorks Ltd. The Common Lisp HyperSpec is a hypertext version of the ANSI Common Lisp
4:18:26
beach
Almost, but not quite. The standard is owned by ANSI and not even LispWorks has the right to create a derived work from it. However, the draft standard is available for everyone to use, and there are only very minor differences between the draft and the final standard.
4:20:11
beach
For all practical purposes, the Common Lisp HyperSpec is the reference. Except if you want to include it in the bibliography of a paper or a book. Then you need to refer to the standard.
4:22:05
asarch
Just the same I did with the PCL web: to get a hard copy and then read it every time I want to know something specific
4:24:36
beach
The contents is identical to that of the Common Lisp HyperSpec, because LispWorks used the draft to create the Common Lisp HyperSpec.
4:51:17
beach
minion: memo for asarch: Here is a site that has a full PDF of the standard: http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html and it contains 1360 pages (rather than the 1000 I was guessing).
5:16:33
LdBeth
The ANSI standard can be obtained for $60, but I don’t see there’s much difference in contents, and it’s a photo scanned PDF.
6:15:55
minion
asarch, memo from beach: Here is a site that has a full PDF of the standard: http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html and it contains 1360 pages (rather than the 1000 I was guessing).
6:17:34
asarch
"Many people apparently use the Common Lisp Hyperspec, but I personally find this document highly confusing and difficult to learn from in any meaningful way." <- I thought I was the only one
6:20:36
beach
The Common Lisp HyperSpec is not meant to be learned from. It is meant for people who implement Common Lisp systems.
6:37:17
asarch
Here is the document in Dropbox: https://www.dropbox.com/s/2swg57jeouwd5w0/The%20Meta%20Class%20System%20MCS-%20A%20Portable%20Object%20System%20for%20Common%20Lisp.pdf?dl=0
9:50:17
puchacz
hi, will sorting be faster if I am only interested in top N elements? and have we got library for it?
9:59:27
_death
if you're interest in the top N elements, then you don't need a full sort.. I'm not sure what a displaced vector has to do with it
10:01:08
_death
beach: suppose you have #(1 3 2 4) and you need the two largest elements.. how would that work?
10:01:49
Guest24137
_death: you would have to implement your own algorithm to drop the elements you don't want.
10:04:14
pjb
Actually, you can collect the N biggest elements in O(M). then sort them in O(N*log(N)).
10:06:31
shka1
puchacz: https://github.com/sirherrbatka/cl-data-structures/blob/6ae7362c0828a2e3eb4e8c9fcff1268e1221d0fc/src/utils/ordered-algorithms.lisp#L18 just limit the number of iterations in the main loop starting at line 44