freenode/#lisp - IRC Chatlog
Search
2:11:15
Xach
in the implementation of parse-integer that parameter is checked and changes how the function behaves.
2:15:57
comborico1611
So far i am pleased with Practical Common Lisp, but i always like to have a backup.
2:36:16
Xach
pfdietz: what kind of incompatibility is most problematic for you? the one that springs first to my mind is package names.
2:39:58
pmc_
Xach: It turns out SBCL prints an error message when comma is entered at the REPL. I guess SLIME and emacs are not expecting that.
2:40:34
Xach
pmc_: the possible problem is that you are not using the "fancy" repl, which was once the default but now is "optional"
2:41:27
Xach
At any rate, M-x slime-repl-<command> will also do whatever ,<command> is described to do.
2:42:31
Xach
pmc_: I'm not sure. possibly the slime manual. i use (slime-setup '(slime-fancy)) to get it
2:43:15
Xach
pfdietz: that specific example stems from the same desire to fake out code that thinks it's on allegro
2:46:50
Xach
pfdietz: I've wished to somehow relate system loading to packages defined, but haven't worked it out yet
2:53:11
pfdietz
I think standarization and usage of local nicknames would help, but all the lisps would have to get together for that.
2:54:54
pfdietz
This came up for me because I'm trying to load as many systems as I can from quicklisp to provide raw material for mutation testing.
4:39:05
whatsupdoc
My function takes as input a list that is always is of the form ((a b)(a c)(a d)) where a is the same number or atom
4:46:32
Zhivago
It appears that you are complaining that recursively processing all but the first element of a list does not process the first element of the list ...
4:49:51
Zhivago
In what regard is the first element not incorporated given that ((1 2) (1 4) (1 6)) outputs (2 4 6)?
4:54:58
whatsupdoc
i try something like this, but this is just dumb https://pastebin.com/raw/8KtkxeZu
4:55:55
Zhivago
Just write two functions -- one to do the whole job, and one to do the recursive bit.
4:56:59
Zhivago
You pretty much had it with your (second (car q)) (undistribute-recursive (cdr q)) except for the stupid bits.
4:57:58
Zhivago
Although if you really want a single function, you can compute it recursively -- you just need to consider the return path.
4:58:58
Zhivago
Think of the solution for ((1 2) (1 4) (1 6)) and the solution for ((1 4) (1 6)), then think of how to get from the latter to the former.
4:59:44
Zhivago
Remember in the recursive approach you are reducing ((1 2) (1 4) (1 6)) to some operation plus the same reduction upon ((1 4) (1 6)) and so on.
5:02:16
Zhivago
They need to start with a class on "Questions: How to ask and answer them intelligently".
5:02:38
aeth
There are two kinds of academic Lisp. Academic Lisp that follows conventions and academic Lisp that does not follow conventions.
5:04:41
beach
whatsupdoc: This is not a channel for newbies. But if your purpose is to learn Common Lisp (CLISP is not an abbreviation for Common Lisp, it is an implementation of Common Lisp) we can help you. But then, you first have to use the conventions and the tools that the people here use.
5:05:42
learning
this is an academic question (ie not building something just trying to understand), can i see all of the generic functions that take a specific class as an argument
5:05:45
beach
whatsupdoc: However, if your purpose is to have someone do your homework for you, so that you don't have to learn Common Lisp, then you might be out of luck.
5:06:45
Zhivago
whatsupdoc: What does undistribute-recursive produce given ((1 2) (1 4) (1 6))? How about for ((1 4) (1 6))?
5:12:10
beach
learning: If you are using SBCL, you could try (sb-mop:specializer-direct-generic-functions (find-class 'character))
5:12:21
Zhivago
So, shouldn't we expect (1 (2 4 6)), (1 (4 6)), (1 (6)) given ((1 2) (1 4) (1 6)), ((1 4) (1 6)), and ((1 6))?
5:16:01
beach
learning: Yes. CLOSER-MOP is one of those wonderful compatibility packages though, so you can use it independently of your implementation.
5:18:12
aeth
whatsupdoc: Consider the problem of doing foo at compile time. Clearly, that's possible in dozens of languages.
5:18:59
beach
whatsupdoc: We can't. Like I said, we are silly people. Quit before it's too late, or you won't want to go back to your current languages ever again.
5:19:40
Zhivago
whatsupdoc: So your thesis is wrong -- become less ignorant and ask a more intelligent question.
5:19:58
learning
i got to a point where i needed to commit to a language if i wanted to get better at programming. so i chose the one that fit my personality type, the one with outlandish promises of how amazing it is. that's why i chose lisp. it took me years before i actually got to the point where i could explain using lisp over other languages. and ive been a slightly less shitty programmer ever since
5:20:14
Zhivago
whatsupdoc: Now, understanding how 'add' works, can you see how your problem has a similar recursive structure?
5:22:03
aeth
(and (typep 10 'number) (typep 10 'real) (typep 10 'rational) (typep 10 'integer) (typep 10 '(signed-byte 64)) (typep 10 'fixnum) (typep 10 '(unsigned-byte 32)) (typep 10 '(integer 0 1000)) (typep 10 '(mod 360))) ; not an exhaustive list
5:22:17
learning
lisp has no types, 2 types, blue types, red types: http://sellout.github.io/media/CL-type-hierarchy.png
5:23:21
Zhivago
whatsupdoc: Just pretend that you're not a completely useless human being and look it up.
5:24:32
learning
the problem with trolling lispers is that we can't wait to talk to anyone about lisp
5:26:06
Zhivago
beach: Eventually some of them unlearn their acquired stupidity sufficiently to be able to learn.
5:28:27
Zhivago
Certainly -- it comes from viewing stupidity as a set of learned skills to help prevent learning.
5:32:36
beach
whatsupdoc: You seem to know nothing about elementary software engineering. If you submitted such non-idiomatic code to me, I would give you a failing grade.
5:33:45
Zhivago
He means that you write code like a retarded monkey might, if given sufficient drugs.
5:33:46
learning
i end all my lisp lines with semicolons just to remind myself that it's my choice not the computer's
5:33:50
beach
whatsupdoc: Your code doesn't even follow the formatting conventions of Common Lisp. Maybe you have not been taught that code is mainly a means of communication between developers and not between a developer and the computer.
5:34:15
beach
whatsupdoc: So the first thing you need to do is to respect the conventions that the people reading your code are used to.
5:34:29
aeth
learning: You can even write C in Lisp if you non-portably use type declarations in declare or portably use check-type and pretend that that's good enough (it usually is)
5:34:55
beach
whatsupdoc: I think if you were to read a few existing Common Lisp programs, you would see how different they look from the code that you show us.
5:35:09
learning
or use a C library in lisp, you'll be writing C code in no time!*** *haven't actually done this
5:35:21
aeth
Zhivago: just have a large array of (unsigned-byte 8)s or something, C doesn't have any types, anyway, just bytes
5:35:36
beach
whatsupdoc: In that respect, programming is like writing novels. You have to read a lot of what other experts write in order to do it the way it is supposed to be done.
5:36:34
aeth
learning: just replace variables with an array representing registers and a larger array representing memory, and do everything in a tagbody, and you're basically there afaik
5:36:49
Zhivago
aeth: If that were true, then arithmetic wouldn't work -- C has types, the bytes are just the underlying representation.
5:37:29
beach
whatsupdoc: The idea of programming as communication is common to all languages. There are lots of incompetent programmers who don't realize that, of course.
5:38:53
beach
whatsupdoc: I suggest you install Portacle. It is a set of tools for Common Lisp that are easy to install.
5:39:45
aeth
I just wish CL had a standard for "inline" assembly. Then we wouldn't ever need to use C, and some better low-level abstration would have been built by now.
5:40:41
vtomole
How would you write C in Lisp with respect to manual memory management? Turn off the GC?
5:43:17
drmeister
ACTION ears are burning - not just because his name was mentioned but the salty language!
5:43:23
vtomole
beach: From my experience, professors are usually not software engineers. They are computer scientists who write proofs all day long basically. Most of them don't program.
5:44:15
learning
i went on a huger rant today about how the people who teach programming don't actually make programs
5:44:37
learning
because someone asked on quora, "if i get a B in my java class does that mean im too incompetent to become a programmer?"
5:45:43
learning
that's just how we write programs in lisp. 1 or 2 lines and then get back to spamming irc.
5:45:58
Zhivago
aeth: Javascript has everything you want -- it is the most successful of the lisps :)
5:51:33
aeth
Zhivago: Common Lisp should copy the way JavaScript handles numbers because the numeric tower is too complicated.
5:58:55
Zhivago
Unfortunately they screwed up bignum and fixnum -- those should be classes, rather than types.
6:00:58
fouric
i haven't heard of a javascript runtime smart enough to optimize strings that happen to be the names of functions into pointers to the functions themselves
6:05:46
fouric
borei: Zhivago is trying to say that you should phrase your question as a proper question
6:06:42
fouric
however, to answer that question: i suggest modifying your macro to take symbols that are used to name the variables that you would like the values bound to
6:07:43
fouric
see that RENDERER-SYM? when the renderer is created, it's assigned to a variable with that symbol as a name
6:08:40
borei
question would be - i don't see that my solution is correct, but it works. Is there proper solution that will not implictly use indexes i and j in my case
6:09:22
fouric
perhaps change that (MATRIX &BODY BODY) to be ((MATRIX ROW-SYM COL-SYM) &BODY BODY), then (LOOP FOR ,ROW-SYM FIXNUM FROM ... and (LOOP FOR COL-SYM FROM ...
6:10:31
fouric
oh, and this isn't the question that you're asking, but that macro should probably bind MATRIX to a variable (named by a gensym, of course)
6:11:39
borei
i was trying to build macros that is doing loop through all matrix elements and apply "something" to elements
6:13:40
fouric
(we should consider putting a link to http://www.catb.org/esr/faqs/smart-questions.html in the topic)
6:14:22
aeth
borei: a potential problem is if someone creates a matrix in the macro instead of passing in a matrix variable
6:32:41
aeth
I think this works (I'm doing the dangerous thing and writing it on the top of my head without testing it first): (let ((matrix-binding (gensym))) `(let* ((,matrix-binding ,matrix) ...) ...))
6:33:26
aeth
although maybe worrying about the edge case isn't useful because the actual macro is apparently useless if the user does this edge case
6:34:43
mfiano
My biggest concern with the code is why the need to reimplement the plethora of mature linear algebra libraries already available for Common Lisp?
6:36:21
aeth
mfiano: nearly every library is 80% complete, which seems to encourage wheel reinvention
6:37:48
borei
well, to learn somebody logic and trying to develop and apply your own - i think it's different
6:38:14
aeth
mfiano: The percentage is made up, but my point was: I'm not aware of any big scary libraries that discourage reinvention in CL except maybe cl-ppcre, although I think there's at least one other regex library.
6:42:16
borei
i don't know - i think if you want to walk at least you need to learn how to make steps, just watching how other peoples are walking - doesn't help a lot
6:42:38
beach
The code at the UC Davis website made me remember a long-term idea that I have had for some time. The background is that 1. Professors don't want to get early to give a lecture, 2. Students don't want to get up early to go to a lecture. 3. Lectures are very inefficient and that is well known. 4. Most professors are incompetent in Common Lisp anyway.
6:43:15
beach
So I would like to put together a site with lots of linked pages, video snippets, talking heads, real-time coding, etc. to replace typical lectures.
6:44:06
beach
It must therefore allow for links to background material that the student may not have, but that is required.
6:45:36
beach
Furthermore, instructors, who are often incompetent in Common Lisp, software engineering, programming and whatnot, can follow the same lectures without embarrassing themselves by sitting in a lecture room.
6:47:10
mfiano
I think we need a learning resource that guides a newcomer towards a proper Common Lisp editing environment. Today I had stumbled upon 2 newcomers using CLISP on _Sublime Editor_ with no SLIME, or anything.
6:47:15
bjorkint0sh
beach, I thought you were gonna write the book to end all books on the subject of common lisp!
6:48:08
beach
bjorkint0sh: I have several book projects. I don't think I can squeeze everything into one book.
6:48:52
beach
1. Intro programming using Common Lisp. 2. Advanced Common Lisp programming. 3. Object-oriented programming in Common Lisp. 4. Common Lisp for language implementers. 5. Common Lisp language reference.
6:49:59
bjorkint0sh
perhaps though, an annotated common lisp code which talks about what's going on and points out common themes?
6:50:16
mfiano
I spent about an hour trying to get them familiar with a proper environment, and about 45 minutes were used up by their persistence to use a "text editor". I don't know of any good resources that explains why one needs a proper editing environment for modern Common Lisp.
6:50:20
beach
bjorkint0sh: Either they are available for free, and I would not get any compensation for my work, or else they are controlled by companies such as Amazon.
6:50:28
bjorkint0sh
that way, one's looking at code immediately, not endless drivel about list manipulation and bindings.
6:52:29
beach
For the "lecture site" project, I am thinking that each video snippet should be short, perhaps max 10 minutes, as opposed to the length of a typical lecture.
6:52:48
beach
That would suit people with an attention span of a gnat, which seems more common these days.
6:53:19
bjorkint0sh
there's lots and lots and lots of 'talking heads'. endless. what I don't see a lot of, is "this is written code. this is what's wrong with it. this is what's right with it".
6:54:17
beach
Since such a site would not have to fit into any particular format, one could have lots of material like that. Material that would typically not be part of a course.
6:54:38
bjorkint0sh
i've got at least 20something books on common lisp alone. the only one which comes close to the code-first approach is land of lisp.
6:55:26
beach
Different people learn very differently, so it would be good to support different styles of learning.
6:56:31
bjorkint0sh
you know what's really hard? knowing why one approach is better or worse than another.
6:56:32
borei
can somebody drop me some input on my code - https://pastebin.com/R1Tc0sgg. i got some feedback from aeth:, but conversation switched direction
6:56:32
shrdlu68
Different authors also phrase things very differently. I find that consulting multiple references when learning something new works best for me.
6:56:35
beach
bjorkint0sh: The table of contents would contain desired video snippets and code examples for every "page". Then we could ask the knowledgeable people here on #lisp to record snippets and make up code examples.
6:58:00
phoe
borei: the fact you don't allow the user to define vars for I and J seems not okay in this scenario.
6:58:56
phoe
I also hope you don't expose this macro externally outside your code. OPTIMIZE decisions should be left to the user.
7:07:14
jackdaniel
beach: regarding publishing: have you considered self-publishing or 'pay what you want' model? leanpub comes to mind as one of platforms making this simple
7:08:36
beach
jackdaniel: But I am using CreateSpace, which is part of Amazon. That way I get access to their network. But it has disadvantages of course.
7:13:11
mfiano
borei: If you are going to be writing macros, you should learn about WITH-GENSYMS and ONCE-ONLY, which are utilities not included in the standard. They are required for a lot of macros, such as this one.
7:17:23
borei
If enduser will use I, J, ROWS nand COLS in the &body - that will cause conflict situation
7:19:03
jackdaniel
borei: double evaluation is when you have symbol a in macro bound to (list 1 2 3), so if you put ,a twice in the body, you will have (list 1 2 3) evaluated twice
7:20:03
mfiano
the matrix argument is evaluated twice. If the user passes in a form which allocates an array, it would allocate 2 arrays just to get the subscripts of 1 intentional array
7:21:03
jackdaniel
(alexandria:once-only ((a '(1 2 3))) a) ;; -> expands to:: (LET ((#:A527 (1 2 3))) #:A527)
7:21:41
jackdaniel
maybe this pictures that better: (alexandria:once-only ((a (list 1 2 3))) (cons a a))
7:22:28
mfiano
borei: consider what would happen if the user passed in (make-array '(1000 1000)) or something stupid. Look at the expansion
7:22:46
jackdaniel
borei: this may be a good lecture for you: http://www.gigamonkeys.com/book/macros-defining-your-own.html
7:24:55
borei
out of topic question - how many years it takes in average to cover lisp ecosystem to start build more or less ok code ?
7:27:18
mfiano
borei: Everyone learns at different paces. I am slow, so I will refuse to answer that question out of embrassment.
7:29:44
mfiano
If you haven't read PCL in its entirety yet, I would start there, making sure you do the practical code-writing chapters, too. Macro writing is something that takes a bit of practice and learning from mistakes to really understand the gotchas involved.
7:30:12
aeth
borei: it always takes years, the amount of years varies because there are too many variables
7:30:26
aeth
although it might be doable in less than a year if you come from a very similar language (a Scheme?)
7:32:12
aeth
There are lots of things that I suddenly realize I can rewrite years-old things to use.
7:32:44
aeth
And once you discover the right abstraction to use, you often find problems with the original.
7:36:05
aeth
(I suppose that the language could also be mastered in a short time if someone had a full time job in it.)
8:02:31
fouric
https://fouric.github.io/update/lisp/2017/11/15/getting-started-with-common-lisp-2017-edition.html
8:03:00
fouric
it's not nearly as complete as what you were probably thinking of, but it's a start, and it can be mutated
8:04:52
mfiano
fouric: While nice, it doesn't solve the problem I am constantly faced with, and that's explaining why it's important not to use an _editor_ to write Common Lisp, and also transitioning a newcomer to Emacs (or Spacemacs, or even Vim with slimv, vlime, etc) is a task and a half.
8:06:02
mfiano
Most people new to Lisp are never even introduced to why it's important. They pick up [insert CL book here] and open their text editor to follow along.
8:07:28
mfiano
Can you name one that explains how to set up SLIME/Sly, paredit/etc, a modern implementation, and Quicklisp?
8:13:09
mfiano
sigjuice: Yes it helps greatly, but there is no book or lecture that mentions it, and it takes persuading users away from their favorite Sublime Text editor, etc, which is difficult...if I even notice they are using them...again, there are too many people that do not know how to start using a Common Lisp environment when they pick up a Common Lisp book or take a Common Lisp course.
8:17:19
shrdlu68
mfiano: Perhaps it's because most authors assume the implementation's RELP will be enough, and don't intend to complicate things too early.
8:18:12
shrdlu68
"The Land of Lisp", for example, seems to assume the the CLISP REPL will be enough for learning purposes, at least initially.
8:20:30
shrdlu68
Of course, once the learner progresses beyond a certain point some effort should be made to creating a suitable environment.
8:22:38
mfiano
I'm not suggestion an in-depth walkthrough of configuring Emacs or setting up Quicklisp. Just a mention that they will not be getting the full language experience by a mile without eventually looking into [list of tools].
8:23:11
mfiano
I see quite a few people decide CL is not right for them, and I wonder if this is part of the reason after my experience helping newcomers.
8:25:11
shrdlu68
I doubt it is - most learners would be smart enough to incrementally adapt their environment to their immediate needs.
8:25:17
sigjuice
if someone is reading PCL today, shouldn't it be possible to just substitute "Lisp in a Box" with Portacle?
8:27:33
mfiano
Assuming they were aware of it, they weren't so attached to [traditional editor], and actually knew why it's needed for the full experience, I don't see any problem.
8:28:02
mfiano
My point is most developers have grown attached to their traditional development editor/IDE which is unsuitable for Common Lisp, but they don't know any better.
8:31:10
mfiano
I've used Vim for CL for about 8 years, switched to Emacs a couple years ago, switched to Spacemacs recently...and now I'm using vim again (in addition to Spacemacs on some devices)
8:33:40
mfiano
fouric: I released this yesterday out of demand. A couple other people found it useful. If you want to try it out and report back, I'd appreciate it :) https://github.com/mfiano/common-lisp-sly
8:36:53
mfiano
This allows for example, deleting a line of a form while keeping parens balanced, etc
8:37:04
sigjuice
mfiano I too switched from vim to emacs from vim nearly 10 years ago. I tried evil, vimpulse etc. in the beginning but grew out of it eventually. I still end up typing j's and k's into my text once in a while.
8:38:58
mfiano
fouric: It's actually builtin to Spacemacs 0.300 (technically not released yet, so you should be on the develop branch for this layer to work)
8:39:28
mfiano
Well builtin, but not enabled by default. You have to follow the README instructions for this layer to set it properly
8:42:06
mfiano
I would encourage you to read the Sly documentation if you are curious about the few features it adds, such as my favorite, "stickers".
8:42:40
mfiano
and they show up in grey. you can add also add a sticker to a form/symbol within a sticker, and it'll show up as a darker shader of grey...
8:42:50
mfiano
then you C-c C-c the defun or wherever they are defined to "arm" them, and they turn to shades of blue.
8:42:59
mfiano
then you run your code, and each sticker captures every value that the stickers have seen, and you can cycle through the replay
8:43:26
mfiano
h and they turn from blue to green when they have captured something during execution
8:47:53
mfiano
There is one thing you may miss from SLIME if you use Sly though...it doesn't have a contrib for SBCL's statistical profiler
8:52:00
mfiano
in vim, you'd use the CL server part with one of the few vim client implementations rather than elisp
9:04:44
spiaggia
jackdaniel: When McCLIM says that it couldn't use fontconfig to configure fonts and that I have to do it manually, does that mean that I have to install a program (named fontconfig)?
9:05:59
jackdaniel
or you may push mcclim-ugly to features (don't remember exact name) to use native Xorg fonts
9:10:18
jackdaniel
and was part of climacs project (don't know what's its status now): https://www.common-lisp.net/project/climacs/images/screenshots/old/swine-ss.png
9:11:46
sigjuice
also just discovered this one #<SYSTEM trivial-swank / trivial-swank-quicklisp-ab90d90f-git / quicklisp 2018-01-31>
9:12:33
jackdaniel
from other interesting bits of information, if you read into swank sources there are hints, that implementing more rich presentations was planned (i.e sending images etc)
9:21:12
sigjuice
jackdaniel were you referring to this? https://github.com/slime/slime/blob/master/contrib/slime-media.el
9:23:19
jackdaniel
sigjuice: close. I was referring to the comment in this empty file: contrib/swank-media.lisp
9:27:45
sigjuice
I don't recall the details, but I remember doing something that produced images in my *slime-repl sbcl* buffer.
10:10:30
Shinmera
Sure, lots of things. Power going off, the process dying or being halted by a debugger
10:11:11
flip214
phoe: so, getting back to my question of yesterday evening, how come the UNWIND-PROTECT in hunchentoots PROCESS-CONNECTION doesn't close the socket?
10:11:38
flip214
Shinmera: in the first two cases the socket wouldn't still be active ON THIS MACHINE
10:12:33
phoe
flip214: are you sure it is executed? can you print something inside that unwind-protect to make sure control flow reaches it, just to be absolutely sure?
10:12:56
phoe
because if the control flow reaches the cleanup forms then the problem is elsewhere and most likely deeper
10:16:58
flip214
jdz: no. the QUUX acceptor stops working (as the child thread returns an unexpected error instead of :handler-done),
10:17:41
flip214
But I'd like to understand what causes the unwind-protect to be skipped... jackdaniel's terminate-thread might be the reason, but I don't know lparallel good enough yet.
10:19:33
thodg
jdz: yes but if he calls close in an unwind protect and be sure about it how would the socket remain open ?
10:20:11
jdz
I don't have the code, and it would be wrong to close the socket oneself because that's Hunchentoot's job.
10:23:17
phoe
if anything, you could try to wrap a finalizer around it, calling close on the associated socket-stream.
10:23:41
phoe
just to make sure that when the GC runs to clean up the usocket, its associated stream is closed.
10:24:07
jdz
The whole point of "thread pooling" is to have a pool of threads and reuse them instead of creating and destroying a thread for each connection.
10:24:38
thodg
jdz: well if the thread is not dead it might also close its socket on unwind-protect its true
10:25:13
phoe
But if the thread is alive and its unwind-protect forms are *not* called, then it means the thread is still inside unwind-protect.
10:26:22
jackdaniel
so having error in such thread, if there is no top-level handler-case is equivalent to crash (or destroy-thread)
10:26:25
pjb
But more seriously, the right CL way to do it, is: (bt:create-thread (lambda () (UNWIND-PROTECT (your-thread-code) (DO-YOUR-CLEANUP-HERE!))))
10:26:35
flip214
phoe: either that, or there's a bug that inhibits UNWIND-PROTECT doing the cleanup.
10:27:09
jackdaniel
pjb: that's not enough, it should be (bt:make-thread (lambda () (handler-case (…)))
10:28:33
jackdaniel
pjb: that's not guaranteed and in fact it doesn't happen on sbcl if you have --disable-debugger option and run standalone binary
10:29:21
jackdaniel
flip214: let me repeat: wrap your body in handler-case to be sure, that unwind-protect cleanup is executed in case of errors
10:29:57
jdz
UNWIND-PROTECT cleanup should always be executed, regardless of the presence of condition handling.
10:30:25
jackdaniel
jdz: that's why we have ups, so unwind-protect will be always executed even on power loss
10:31:00
jackdaniel
schweers: normally no, but if you have debugger disabled, then yes - otherwise such error may basically crash the thread (just as if you had called destroy-thread)
10:31:49
schweers
Oh. What if I only have one thread? Can this still happen? Does the standard say anything about this case?
10:32:48
jackdaniel
schweers: if your application doesn't have a debugger, then I guess it still can happen, yes. but I haven't checked it myself
10:33:42
flip214
when I "disable" the FORMAT via #+(or), the wrong behaviour is back - the socket stays open.
10:33:50
phoe
flip214: are you sure that PROCESS-CONNECTION is not redefined anywhere else in the code?
10:34:09
phoe
I had a similar issue before, and found that I defined a method in two places. The latter redefined the former.
10:34:38
flip214
jdz: can you ever by 100% sure? bit flip on the way to the inferior lisp, and you're defining a different method...
10:35:32
jdz
I've had quite a few non-productive discussions with people who are sure about something without checking their assumptions.
10:38:03
phoe
pjb: but a single FORMAT call should not be the difference on whether U-P cleanup forms are executed or not
10:39:59
flip214
how would I disassemble a method? the GF isn't interesting, and trying the method says
10:40:00
pjb
The questions is whether kill-thread (or pthread_kill) will allow unwind-protect to run?
10:42:27
jdz
flip214: You should show us the code that works as expected (with the FORMAT call), and the code that fails.
10:50:04
flip214
jdz: perhaps I'm completely wrong?! the reproduce pasted above is for sure, please make your own (correct) conclusions.
10:57:02
jdz
There is no reality that tells, there's only perceived reality, and subjects who perceive.
11:00:13
thodg
well interface definitions have that that they let you create virtual implementors and users of an interface
11:17:32
shka
_death: define as: "It is already here use this nice lib", or as "you can write it yourself"
11:21:49
shka
i think it should be extreamly easy (like inherit just input and output in-memory stream)
11:28:55
_death
I posted this some time ago https://gist.github.com/death/2709ae6a9124968a86070bbb760b1629
11:35:53
shka
thodg: it is pretty cool and useful lib, but i need gray stream api, so i stick to flexi-streams
11:50:47
flip214_
In case anyone wants to know the details: the "hanging" socket was a _new_ one, as Firefox helpful retries the request when there's no useful answer. but when QUUX handler crashed, it would just be accepted and then linger around.
12:03:54
Shinmera
Modern browsers like to spam the shit out of servers with requests when one fails.
12:14:13
flip214_
now let's hope that the maintainers merge soon, so that the next QL release already has the fixes, so that I can remove my checkouts
12:47:36
flip214_
beach: you're listed as maintainer for alexandria... would you like to take a look at https://gitlab.common-lisp.net/alexandria/alexandria/merge_requests? A few doc changes with little risk.
13:23:27
MetaYan
beach: I keep getting 'Unknown &KEY argument: :WEAKNESS-MATTERS' when loading clim-listener (SBCL 1.4.4 on OSX); http://termbin.com/lipp (<- it almost got it right... ;)
13:34:01
phoe
https://github.com/trivial-garbage/trivial-garbage/blob/master/trivial-garbage.lisp#L203
13:36:06
phoe
because (trivial-garbage:make-weak-hash-table :weakness :key :weakness-matters :nil) works on my machine
13:43:53
AeroNotix
can someone make the argument for anaphoric macros to me? It seems like unnecessary magic to me
13:44:10
AeroNotix
I get that "omg so rad" but in reality (where most of us should reside) they're annoying and magic
13:46:58
AeroNotix
honestly they seem like one day someone, somewhere realised "huh, that's possible" and here we are
13:46:58
pjb
AeroNotix: I don't know about code. But if "it" exists in natural languages, it must serve some purpose!
13:47:49
AeroNotix
I speak with several people on a daily basis who have different native languages and you wouldn't believe how often anaphora cause issues
13:48:37
pjb
But in a way, references such as "it" will always add some ambiguity, since they're implicit references. Therefore this may be something you want to remove from code. But then, how much implicit referencing do you have in your code really? More than you think in general!
13:49:22
pjb
The thing with implicit vs explicit, is that implicit is something that is hidden thru abstraction. So the question is whether rendering the reference named by "it" implicit is a good abstraction or not.
13:50:18
AeroNotix
lots of editors won't realise that they should jump to the anaphoric macro if you're looking for where `it' is defined.
13:50:30
pjb
If your scope is small and well delimited (as it generally is with lisp macros), then it could work.
13:52:41
AeroNotix
that --map function should be named something which describes how to access the element currently being mapped
13:53:39
pjb
AeroNotix: you can make a good case for binding macros where the user specifies the variable instead of using it.
13:54:23
pjb
(binding-when (foo (expression) (print foo))) -> (let ((foo (expression))) (when foo (print foo)))
13:56:27
shka
Xach: compressing sparse data, works great! If only, i wish I could have grey stream interface for compressor