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
10:28:47
johnnymacs
Then the satement "lisp is not suitable for kernel writing because it has garbage collection" iis objectively false.
10:29:10
johnnymacs
However if you said "sbcl is..." then it is techincally true unless you edit sbcl to not have garbage collection
10:29:32
beach
Yes, the person who uttered that would have to come up with a reason why kernels could not have garbage collectors as well.
10:30:19
johnnymacs
One could argue because it is so expensive to port all linux software to a new and radically different kernel and because it is also so expensive to add garbage collection to the linux that they refuse to accept it
10:31:08
jackdaniel
johnnymacs: I think that what the claim really is (as in sense - means) is that language without manual memory managament is not suitable to write kernels. I don't have opinion on that, just pointing out that taking causal claims verbatim and 'disproving' them is not especially ahrd
10:31:30
johnnymacs
thoughough that particular argument has to do with real world logistics thus making it more complicated than abstract things like the hyperspec
10:31:37
beach
johnnymacs: While garbage collection is not in the specification, in practice you must have it.
10:32:58
johnnymacs
What would you say to someone who thinks a kernel should not have garbage collection
10:33:33
beach
johnnymacs: That he or she would have to make an argument for it, and that argument would be easy to poke holes in.
10:33:33
johnnymacs
Well I don't know why they think that because I am not a kernel writer. I was hoping you would have a guess as to why they think that
10:34:10
beach
johnnymacs: Many people think that GC is slower than manual memory management, or that it must have long pauses. Neither is true.
10:34:25
jackdaniel
johnnymacs: one argument could be GC pauses; another could be overhead (and kernel must be as fast as it can) etc. of course these are arguable
10:35:04
johnnymacs
True but when I argue with them they will call me ignorant and their friends will be convinced they are right and all gang up on me asking me for evidence
10:35:55
johnnymacs
The thing is i am really strongly convinced that SBCL is a superior language than most languages but it is hard to convince others of it.
10:35:57
jackdaniel
beach: could be, I'm not familiar with the subject enough to argue. I could guess, that some tradeoff exists, i.e long pauses OR moderate overhead
10:36:51
johnnymacs
I still do not think I am at the point where no matter what answer they give I will have a comeback demonstrating gc is just as suited
10:37:14
johnnymacs
You can ask that question because you possess the knowledge to poke holes in their argument
10:37:22
pjb
Basically, it's like you're comparing two 400 m runners. They argue whether you're taking the inside lane or the outside line, and whether you have crocheted shoes or not. But lisp just cut straight thru the grass toward the finish line.