freenode/lisp - IRC Chatlog
Search
16:51:21
beach
compro: Not sure what you are asking, but "functional programming" typically means programming without side effects, so that calling a function returns a new object rather than modifying an existing one: https://en.wikipedia.org/wiki/Functional_programming
16:53:09
cromachina
instead of a hash table, you would probably end up using a tree or heap. further reading: https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf
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"