freenode/#lisp - IRC Chatlog
Search
7:03:22
_death
I don't understand the issue they think they solve, but the other day they committed something that may "fix" your issue (though I've not tried it.. I think I just removed the putenv call) so you may want to try it
8:14:58
lieven
since threads aren't mentioned in the standard, surely this is implementation specific?
8:16:40
jackdaniel
lieven: in principle you are right, but in practice it costs too much to make pop atomic by default
8:19:52
_death
knobo: it means the assumption that normally a resource is free for use and otherwise is the exceptional case
8:21:21
pjb
And what atomicity do you want in (pop (aref (give-me-some-vector foo) (incf (elt indices (incf j))) (random 3))) ?
8:22:31
pjb
Perhaps you need one lock per array slot, or per indices, or for the whole expressions; the implementation cannot know: it depends on the semantics of your application.
8:32:39
axion
_death: thanks. I am trying to use 'prove' to run tests on travis-ci, but for some reason failed tests are still exiting cleanly with status code 0 and even though the tests are shown as failed, travis reports everything as passed. anyone know what could be causing this?
9:14:58
aerique
If I find an issue with a library (clsql in this case) loaded through Quicklisp it is not obvious to me from which repo Quicklisp got that library. How do I find that out?
9:20:13
aerique
ah: https://github.com/quicklisp/quicklisp-projects/blob/master/projects/clsql/source.txt
11:05:17
axion
How can I retrieve how an object is printed as a string? I wrote a custom print-unreadable-object form to print an object, and I want to write a test in my test suite to make sure it is exactly equivalent to a particular string. is this feasible?
11:12:37
axion
phoe: this will be a multi-line matrix in a specific order not like the memory layout of the array
11:17:12
phoe
"By default, a structure of type S is printed using #S syntax. This behavior can be customized by (...) or by writing a print-object method that is specialized for objects of type S."
11:18:31
phoe
flip214: yes, but the structures are compiled into vectors. Once they are created, Lisp does not see the instances of that structure as structs, but as vectors.
11:19:48
flip214
phoe: but 22.1.3.12 Printing Structures doesn't talk about the :type of structures... I read that as if it should work for any internal representation
11:20:19
axion
It very well may. I will have to try. The point of this structure is to have native arrays with struct slot accessors
11:20:46
axion
Thanks! Though, how can I retrieve the printed representation of an arbitrary instance in my test suite?
11:21:41
flip214
perhaps the first slot of that "struct" can contain some gensym, which gets recogniced by some user-defined PRINT-OBJECT method or so?!
11:22:12
axion
and by the way, the struct slot accessors on the array compile with the same disassmebly, on at least sbcl. this is nice because this is an efficient math library and makes the code very concise and easy to understand
11:23:46
phoe
flip214: it cannot contain gensyms if the array is specialized, like here - for single-floats.
11:24:11
flip214
phoe: well, then just stuff some "special" single-float value in there... the NaN space is big enough, innit?
11:24:54
flip214
I understand that a struct will need a bit more space... but I don't think there's a performance difference.
11:25:19
axion
much, on at least sbcl. with the type explicitly as a simple-array single-float 3, the assembly is much better
11:26:14
axion
well yeah, that is my friend's library that i linked. i am doing a similar fashion with singles.
11:27:51
axion
i didn't really want to get into the why i did this thing again...it seems to be a monthly question from this channel. we have done extensive tests over the last 3 years regarding this. that's why :)
11:30:07
axion
you'll have to ask psilord on the low level specifics anyway. he is mostly just in #lispgames though
12:07:13
blank_
Is learning the keybinds and using emacs worth it for programming common lisp? I'm more familiar with vim, and use it for most text editing/programming...
12:10:33
blank_
Hmm seems like more work to get it working with vim though... for serious projects I guess it'd be better for emacs then...
12:10:59
axion
I used SLIMV for 7 years before moving to Emacs a couple years ago...SLIMV is very lacking in comparison to SLIME or Sly.
12:16:02
blank_
Haha... yeah, evil looks interesting... I'll try emacs without it first, if it feels off I'll try it out. Thanks. :P
12:18:51
phoe
it's an emacs distro built for vim users and not only - it's built around evil mode/leader key and has SLIME in its common-lisp layer.
12:19:42
phoe
also they do that crazy thing where they have spacemacs running in your browser so you can try it out.
12:43:00
drl
pjb, System "com.informatimago.common-lisp.cesarum" not found [Condition of type QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]
12:52:04
drl
A week or two ago pjb referred me to a website that was supposed to have it, but it seems to have been removed from that website also.
12:52:48
axion
a quick google found this https://gitlab.com/com-informatimago/com-informatimago/tree/master/common-lisp/cesarum
12:55:51
paule32
RET (progn (write-string "Enter an integer: ") (force-output) (read)) RET #.(progn (print 'hi) 42) RET
12:59:10
paule32
00:14:03 - pjb: paule32: type exactly, at a shell: clisp -q -ansi -norc RET (progn (write-string "Enter an integer: ") (force-output) (read)) RET #.(progn (print 'hi) 42) RET
13:08:37
axion
or any other asdf registry location, and also assuming quicklisp was installed in ~/quicklisp
13:23:45
drl
[local-projects]% git clone https://gitlab.com/com-informatimago/com-informatimago/tree/master/common-lisp/cesarum
13:23:46
drl
fatal: repository 'https://gitlab.com/com-informatimago/com-informatimago/tree/master/common-lisp/cesarum/' not found
13:25:25
jackdaniel
pjb keeps all his libraries in single repository as ecosystem - very sane choice imho
13:29:40
jackdaniel
phoe: the point is, that having such ecosystem makes clients of your libraries being clients of your whole ecosystem
13:30:55
dlowe
probably not so bad as long as the ecosystem isn't pulling in private copies of public libaries
13:43:54
attila_lendvai
jackdaniel: to be fair, not all hu.dwim stuff depends on the entire ecosystem. there are parts that only depend on stuff like alexadria
13:47:24
phoe
https://www.reddit.com/r/programming/comments/6e6zwn/i_had_no_idea_common_lisp_had_actually_been_used/
13:47:25
attila_lendvai
I was seriously annoyed by the other test libs when it struck me that they are basically in my way with all that extra mumbo-jumbo... when it struck me that all I want is a few smarter asserts. that's how stefil was born.
13:47:59
jackdaniel
attila_lendvai: yes, and I'm not saying that it's a bad idea to have ecosystem, I have just answered questions about what hungarian lisp is :)
13:50:44
attila_lendvai
fair enough. currently the way I deal with the multiple repo situation is to tag all the repos every once in a while... like for the release of a project that uses many of them. and there's the quicklisp branch in the git repos... yeah, somewhat messy. maybe I should convert everything to git, but I still prefer darcs
14:19:03
thorondor[m]
I didn't know people still used darcs nowadays, and preferred it over git. interesting.
14:46:43
dlowe
that turned out to be more important than just about anything. Also, I will forgive git everything for github and magit on emacs
14:49:18
dlowe
I've seen a bug tracking system that used a separate git branch in the same repository.
14:53:42
jackdaniel
dlowe: I have more problem with it being closed SaaS service really, I just find the "D" comment very funny :-)
14:55:07
dlowe
Seems like you could make a gitlab-like-thing that stored all its metadata in the git repo so that it got replicated with the code.
14:55:40
jackdaniel
when I'm about to pick hosting and it's my call I go with gitlab.common-lisp.net now (if it is CL project)
15:00:44
pjb
flip214: there's no notion of internal representation in CL. Forget this notion, it'll be better for your reasonning about CL programs.
15:01:53
pjb
if a constructor generated by defstruct creates a list or a vector, then it doesn't create an instance of a subclass of structure-object. And therefore you cannot define a print-object method for them, since they're just lists or vectors…
15:02:00
flip214
pjb: excuse me? a defstruct with :type vector has a well-defined internal representation, does it not?
15:02:43
pjb
When you call the constructor for such a "structure" you get a vector. That's all. A pure bona-fide vector.
15:03:13
pjb
(defstruct (point (:type vector)) x y) #| --> point |# (type-of (make-point)) #| --> (simple-vector 2) |#
15:12:48
pjb
paule32: if you insist on putting it in a script, you could use this form: (with-input-from-string (in "#.(progn (print 'hi) 42)") (write-string "Enter an integer: ") (force-output) (read in)) ; but it would defeat the purpose of showing you how what kind of code injection is possible in lisp.
15:13:59
pjb
paule32: you definitely need to drop the scripts, and start using your Common Lisp implementation INTERACTIVELY. And learn emacs and the emacs names for key presses! I already wrote earlier, RET = press the RETURN key (ENTER, ⏎ or whatever).
16:31:35
axion
Is there anything in the standard that would cause PRINC to print differently on some implementations?
16:34:43
beach
axion: See the note: ;; Note that in this example, the precise form of the output ;; is implementation-dependent.
16:38:23
axion
I'm attempting to read and match the aforementioned printed vector object representations with print-unreadable-object definitions across several implementations for a test suite.
16:39:21
pjb
print-unreadable-object is a macro used when implementing print-object -like methods. You don't have multiple definitions of it! You only have the cl:print-unreadable-object definition.
16:39:56
pjb
And since it's namedprint-UNREADABLE-object, you cannot READ those representations! By purpose and by design!
16:41:23
axion
What I am trying to do is write a test ensuring that an arbitrary matrix is printed using column-vector notation.
16:43:17
pjb
You're giving me more work than possibly necessary. Since you don't answer: if you want to print it readably, then you just have to read it back and compare the objects. If you want to print it non-readably, then you cannot use CL:READ, and instead you have to implement your own parser to parse the unreadable data, and validate it.
16:45:54
pjb
But even if you print non-readably, you may choose not to use print-unreadable-object, since this is designed to integrate with the standard I/O stuff, so that when you call CL:READ on that representation, you get an error. But apart from the #< prefix, there are implementation dependent elements (identity, type representation), that as you said, you may want to avoid. So your syntax may differ, not use #< (or still use it, bu
16:45:54
pjb
using print-unreadable-object), and still be unreadable by CL:READ. In any case you need your own parser.
16:46:55
pjb
Note that in most cases, printing readably will involve a custom reader macro (implementing your custom parser). So since you have to implement this parser, you can as well make it printing readably and hook it into your own reader macro.
17:09:51
libreman
Is the handling of nested labels within cl-cont a known bug? I can't find its bugtracker...
17:12:40
libreman
These are the results I'm getting which are obviously wrong: http://paste.lisp.org/display/347802
17:25:35
libreman
It's not a really easy fix though. You would probably need to keep track of the scope. I'm optimizing the library a bit (by only rewriting if necessary) so I'll try to fix it.