freenode/lisp - IRC Chatlog
Search
18:13:27
circ-user-2fvK9
When I'm using the loop macro, is there a way to do a "continue" like in C?
18:16:19
circ-user-2fvK9
no, I mean skip the rest of the processing for this loop iteration and proceed to the next loop
18:19:09
circ-user-2fvK9
e.g. in the body of the "do (block continue ..." I can't use the sum clause from loop because I think loop's macro expansion doesn't follow into there
18:21:27
axion
I agree I don't like this, but a better question might be what you are specifically doing that requires this. It may turn out the DO family is a better fit.
18:33:20
axion
WITH initialized a variable before the first iteration, so IF VALID in each iteration does not seem to make sense to me, nor why WITH is written after iteration bindings
18:42:57
circ-user-2fvK9
so something like "for valid = ... then ..." where ... is the same in both places?
19:03:29
dim
socket in CLOSE_WAIT but SBCL still trying to get more content from it, SB-IMPL::SYSREAD-MAY-BLOCK-P is waiting
19:04:53
dim
it might be that the read shouldn't have been for that many bytes (it wants 67 of them)
20:09:35
dim
btw, I would happily review other project's code in exchange for pgloader's code being reviewed (commit based, happens anywhen people have time, etc)
20:50:42
axion
Hmm, what's the best way to read the full contents of a file at once as an in-memory string?
21:04:41
axion
Looking at the code, it seems to be doing a lot of un-necessary steps. Definitely much more inefficient than my method.
21:08:51
loke___
The function has no way of specifying encoding, which makes it pretty useless for all but specific use cases
21:10:55
axion
The whole buffering. Testing the speed of 10,000 iterations of a small C source code file and it is about 0.5s compared to about 0.3 for mine
21:12:43
axion
Right, I do (with-open-file (in path) (let ((contents (make-string (file-length in)))) (read-sequence contents in) contents)))
21:13:12
loke___
axion: The file size can change between the call to FILE-LENGTH and the actual reading.
21:14:01
loke___
Of course, it's possible to implement a function that attempts to do it that way, and then adjust if the file size changed.
21:15:08
axion
Regardless, people using alexandria probably favor correctness over speed anyway. I know I have made a few contributions to the codebase that favors correctness anyway
21:15:43
loke___
axion: Right. That's definitely what I'd expect from alexandria (after all, “everybody” uses it, so it better be correct :-) )
21:17:07
axion
https://gitlab.common-lisp.net/alexandria/alexandria/commit/926a066611b7b11cb71e26c827a271e500888c30
21:27:15
loke___
axion: You're right. I'm looking at the old version, and your test case gives a really poor value for the old algorithm.
21:30:05
Bike
there's something about :default-component-class cl.source-file.lsp, but then it forgets what :file is
21:33:18
axion
NewLisp tagline, "Puts the fun back in Lisp" couldn't be farther from the truth. Recently had to port some code to CL.
21:34:45
axion
loke___: I ported this https://github.com/hds1/Dual-Quaternion-calculus/blob/master/dualquaternion.lsp
21:42:02
axion
This is why I dislike the language...It has a lot of functions that operate on an implicit argument. In this case I think it is returning the slots of the DQ object, though I could be mistaken.
21:44:23
loke___
axion: What's the implicit argument? Like... I call (foo 1 2 3) and (args) returns '(1 2 3) ?
21:47:54
axion
I really do not know enough. It is confusing to say the least. (args) and (self) always return () and nil respectively for me.
21:48:16
axion
I never said I knew the language...just was able to understand the general algorithms to port it :)
21:48:48
axion
It took me a day of trial and error in its REPL to understand just how a few functions worked.
22:09:10
axion
Meaning I just wanted to push an element to the front without first lexically binding the call to m-v-l
23:40:34
axion
Does anyone know how to convince Xach's salza2 library to compress with a higher level? It seems the default gzip compressor is using the least amount of compression according to FILE(1)
2:35:23
nydel
i haven't updated software in so long.. as a non-root user on a pub unix, is it better to compile slime at $HOME or to use emacs to obtain it via package-install? i'm at an openbsd system that offers both emacs25 and sbcl but no shared slime
2:58:47
beach
holycow: Hmm, I had minion transmit a memo for you, but I don't see that you ever got it.
2:59:57
beach
Anyway, it was "when does summer start for you". Because there was something I was supposed to remind you about that you were planning to do this summer.
3:01:07
holycow
umm .. the answer to the question is hard to know right now. i have a ton of projects overlapping threatening to ruin my plans. how much time should i be setting aside each week (theoretically)?
3:01:55
beach
Oh, I don't want to put pressure on you. You were the one who suggested it. If you no longer have time, don't worry about it.
3:02:39
holycow
naw. if it needs to be done, it needs to be done. i offered, i am standing by the commitment.
3:03:10
holycow
remind me of some of the specifics? i know jackdaniel is supposed to engage me on the graphics side of things for his work
3:03:49
beach
I think the task was vague, something like "design a modern-looking, consistent-looking set of gadgets for McCLIM".
3:04:35
holycow
technically if you guys wanted to start the work in the next two weeks, that would be fine by me
3:05:29
beach
I need to try to stay out of it, because I am very busy with the Concrete Syntax Tree library that is a show-stopper for many other projects if I don't finish it.
3:06:07
holycow
i find mcclim a very exciting project. i would be happy to help jackd while you complete your work
3:06:46
beach
Great! I'll remind him later today. Monday mornings are crazy around here, so I don't know exactly what time I'll get to it.
4:45:25
adlaistevenson
Non-statically-typed langauges considered harmful: "testing can only prove the presence of errors, never their absence"
4:50:30
beach
So you are one of those numerous people who come here to tell us that we have made the wrong choice for so long?
4:52:49
adlaistevenson
At least Lisp seems to be dynamically typed, which seems like far improvement over JS.
4:52:54
beach
adlaistevenson: Well, this channel is dedicated to Common Lisp, so discussions about the relative merit of programming languages with pretty much the opposite design goals from that of Common Lisp are off topic.
4:53:59
pillton
Also, there is nothing stopping you from writing macros which require you to specify types.
4:54:01
beach
adlaistevenson: And, this channel is populated by a lot of very smart and very knowledgeable people. So they probably already know the arguments of the other view.
5:11:04
pillton
Well, I often found it weird in other languages to provide boxed and unboxed classes.
5:11:56
pillton
The system class T and the definition of EQ seem like a way to avoid having the distinction.
5:13:06
Zhivago
Well, only because class-of gives complete coverage and CL does immediates under the hood.
5:13:38
Zhivago
If class-of gave only partial coverage and immediates were exposed, then you'd have the same situation with T.
5:16:03
pillton
Sure. I presume (perhaps erroneously) that the existence of boxed and unboxed classes is for computational efficiency. The definition of EQ seems to be a good premise for the definition of class-of.
5:18:03
Zhivago
If you consider a class to be a description of the implementation of an object, then it's easy to consider that you might well have objects without class -- and these would happily work with EQ.
5:19:17
Zhivago
The idea of class as descriptive is one that I think ought to be interesting to more people, but I think it's hidden by their preconception of what class is.
5:23:26
Zhivago
Rather, what operators would operate on an object without class -- and the answer is, whatever operators operate on such an object.
5:24:41
pillton
Yes. My apologies for the poor writing, but I think it is worth pondering what operators would be defined for such an object.
5:31:54
pillton
It is interesting. If you consider objects as vectors of cells then it is feasible for two classes to have the same underlying structure.
5:33:30
malkss
Anyone think they can break my hashing function? (this is just a fun challenge I made): http://ideone.com/nSJa45 Goal: Determine the plaintext of the following hash: d0c0c93dcff308d1
5:33:32
Zhivago
If you look at the early lisps, you'll see that they don't have class-of, but do have eq.