freenode/#lisp - IRC Chatlog
Search
7:56:20
otwieracz
https://youtu.be/KTdyp8VbuUw?t=41 - do you know *something* like that possible with SLIME and SBCL?
7:59:47
otwieracz
I mean, I know that I am able to step in BREAK, but experience is completely different.
8:26:43
beach
otwieracz: I think that, despite many statements to the contrary, our best development and debugging tools are really not that good. You are going to either have to pitch in or wait until the planned software has been developed. For example Clordane: http://metamodular.com/clordane.pdf
8:27:52
beach
Now here is the catch: Something like Clordane can not be implemented without significant support from the implementation, and that is probably not going to happen for SBCL.
8:56:27
beach
otwieracz: Not much is going to change as long as people believe that our current tools are the best, all languages considered.
9:00:16
beach
Oh, and for the record, I think it would be way more productive to work on improving our tools than to attempt to change the standard to include the fad of the day.
9:21:16
dim
so pgloader didn't use to catch this error, and users would see: debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread #<THREAD "lparallel" RUNNING {100975FE43}>: error opening #P"/tmp/pgloader/pgloader.log": Permission denied
9:22:40
dim
just because it's Common Lisp doesn't mean you don't have to read error messages, I guess. I can't. Mm. Maybe I should switch away from CL if I want to have users... or maybe pgloader has way too much success and now I have to deal with people who don't know what they are doing? sorry for the rant.
9:24:43
jdz
dim: You also get people depend on some [obscure] features/bugs, and then when you fix/improve your software people complain.
9:26:08
Shinmera
beach: FWIW The SBCL folks are aware that the current debugging environment is pretty bad and would like to add stuff like out-of-process debugging.
9:37:39
loke
dim: Having a top-level condition handler that prints the message from the error before exiting would cover all the cases, yes?
9:42:39
dim
well I don't, I have https://github.com/dimitri/pgloader/blob/master/src/main.lisp#L295 but the main entry point is at https://github.com/dimitri/pgloader/blob/master/src/main.lisp#L181, that's true
9:43:45
beach
Shinmera: Despite that fact, I often see messages such as "yes, but that is not going to happen".
9:46:40
Shinmera
beach: I remember from the last time it came up (which was not long ago) the consensus was that they'd like to have it, but there's several roadblocks in the way that make it difficult.
10:45:25
megachombasss
hello, could someone explain me this function? (defun is-indir (e) (eql (car e) :*) )
10:46:24
phoe
so (IS-INDIR '(1 2 3)) will evaluate to NIL, but (IS-INDIR '(:* :+ :-)) will evaluate to T
10:51:16
megachombasss
i have a working virtual machine, trying to edit it, but its hard as fk when i dunnot master the language
10:52:15
megachombasss
if you're interested in making some money , i can pay you like right now for help on this
10:55:21
Guest96407
megachombasss: have a look at http://www.informatimago.com/articles/usenet.html#Compilation
11:01:58
phoe
megachombasss: I'm willing to answer your Lisp question, but unwilling to do your homework for you.
11:13:30
megachombasss
does this returns the position of adr in :memtab or it returns the contenant of adr in :memtab ? (defun get-mem (mv adr) (aref (get mv :memtab) adr) )
11:20:48
pjb
Sure, but then you have to switch to another emacs window… /msg can be typed in here, in your erc buffer.
11:21:07
aeth
l1sp also has PCL in the search results, which can be more helpful than the specification
11:41:05
pjb
megachombasss: it returns what's in the vector obtained with (get mv :memtab), in its slot at the index ADR.
11:47:53
pjb
megachombasss: you can draw little diagrams to better understand: http://sprunge.us/EOND
12:40:50
otwieracz
Do you have any idea how can I, without `osicat`, check if I don't have access to specific file or it does not exist?
12:45:28
Xach
otwieracz: Are you looking for a "portable" way, or a "works for me on my implementation/OS combo" way?
12:56:27
jackdaniel
(and the error is all the same for file which doesn't exist and for file which you don't have permission to access)
12:56:29
otwieracz
Actually, for *open* it raises *no such file or directory* condition for ENOACCESS.
12:59:08
Shinmera
Probably could if I was motivated to, but currently I got other things to attend to.
13:00:14
pjb
megachombasss: (defun load-machine (mv asm) (let ((exp asm) ) (inst (car asm)) ; is not a form, since it's missing closing parentheses.
13:00:48
pjb
megachombasss: (defun load-machine (mv asm) (let ((exp asm) ) (inst (car asm)))) ; is a form, in which the variable exp is unused. Therefore a lisp compiler may remove it altogether.
13:03:44
pjb
megachombasss: (gethash key table) is called a place; it's a form that can be read or written with setf.
13:04:12
pjb
megachombasss: it less brain burden to use such places, rather than having different functions to read and write.
13:05:12
pjb
megachombasss: they all contain the symbol CL:QUOTE. Only the first clause would be evaluated if (car inst) returned CL:QUOTE…
13:05:54
pjb
megachombasss: said otherwise, CASE clauses are not evaluated; you should not quote them. (case (car inst) ((@) (case-adr…)) ((varg) …) …)
13:07:12
pjb
megachombasss: you can write instead (loop with etiqloc = (make-hash-table …) with etiqlocnr = … for inst on asm do (case (car inst) …))
13:07:32
Xach
paule32: it is pretty easy to extend a list from the front by adding another cons there. it is a little less easy to do the same at the end (but not too hard)
13:07:44
pjb
megachombasss: oh: (loop with etiqloc = (make-hash-table …) with etiqlocnr = … initially (setf (gethash 'nb etiqlocnr) 0) for inst on asm do (case (car inst) …))
13:11:30
pjb
megachombasss: notice that the initially clause is written after the for, but it's actually executed before (but after the for variables are created).
13:12:24
pjb
megachombasss: what I like to do when I create and initialize objects, is to do it in the same place with a LET like in: http://sprunge.us/HGLi
13:12:31
paule32
Xach: i have a "defvar" , that should be a word catalog, that can be extend at runtime, when user type in "cat", then the program shall search: "if cat exists" => if not => add the word
13:12:35
megachombasss
so if i coppy pasta this it does exactly the same function, but without useless clauses
13:13:04
pjb
megachombasss: yes. The LOOP macro is sophisticated; it will expand to the equivalent let and assignments.
13:13:50
Xach
wxie: it might be in an implementation but is not specified to be by the standard (so you shouldn't rely on its classiness)
13:13:58
windblow
is there any implementation that allows integration with C? i am thinking of starting to dive into AI, and figured that both makes a fairly good combo.
13:14:47
Xach
windblow: most/all of them integrate with C, and CFFI is a library that presents a consistent interface for doing so.
13:24:13
jackdaniel
wxie: on some implementations make it a builtin-class, but assuming that is not portable
13:29:02
megachombasss
pjb i got an error with your code. it says GETHASH: argument 0 is not a hash table
13:44:58
clarkema
Supposing I define a class in one package, and want to use (slot-value obj 'slot) in another package, is there anyway to do so without having to export symbols for each of the slot names?
13:48:26
clarkema
I've played around with a function that takes the slot-value symbol name and converts it to a symbol in the package in which the class is defined, but that seems like quite a bit of overhead for every access
13:48:45
phoe
:: means that you are using a package's internal symbols and not its external interface.
13:48:45
Colleen
Unknown command. Possible matches: 8, time, set, say, mop, get, login, grant, tell, roll,
13:48:50
Colleen
Unknown command. Possible matches: 8, clhs, set, say, mop, get, time, tell, roll, help,
13:49:46
Colleen
Colleen: Unknown command. Possible matches: 8, tell, roll, mop, time, set, say, get, login, hello,
13:51:49
clarkema
I'm tring to build a 'friendly' DSL for a certain task, so I already have a function that wraps around slot-value. In the DSL you call (attr OBJ 'slot) ATTR is mainly there to automatically handle the case of OBJ being nil in a sensible way, but it could be co-opted to do other munging if required
13:56:26
Xach
clarkema: You could be cheeky and do it in SLOT-MISSING, so there's no overhead if there isn't a package issue involved.
13:58:08
clarkema
Xach: ah, that's an interesting idea! I need a SLOT-MISSING anyway, so could add some extra magic to it
13:58:23
tfb
clarkema: if the slot names are part of the public interface of the class, then they should be exported
13:59:10
clarkema
tfb: I guess it just feels like I'm polluting the name space that uses the class with some very common symbols, and I'm not sure whether that might bite me further down the road
13:59:15
pjb
I use a pjb-cl-expor-definition-at-point bound to H-e (or A-e when H- is not available) to do that easily. http://sprunge.us/bThV
13:59:58
tfb
beach: then there should be accessors, which are, or something. My point was that if there's a public interface, that should be exported
14:00:06
pjb
clarkema: no polution, since you can always NOT use the package, and instead write (your-package:attr obj 'your-package:slot)
14:00:29
clarkema
beach: they aren't, directly. The user never calls slot-value; they call a method called ATTR and supply the name of the attribute that they want
14:01:00
tfb
well those attribute names (which are slot names, right?) are the part of the public interface
14:01:32
pjb
Bow of course the advantage of using accessors, is that you can easily decorate them (have :around, :before, :after methods), and the accessor itself can be implemented to do more than reading or writing the slot (it can ensure consistency, updating other slots, or do some other computation or signaling, eg. in an observer pattern, etc).
14:55:33
phoe
How can I access a slot's :INITFORM without instantiating a class which has that slot?
15:35:13
phoe
Does any utility library provide something similar to WITH-ACCESSORS that simplifies things if the variable and the accessor name are the same?
15:35:43
phoe
I don't want to (with-accessors ((x x) (y y) (z z)) foo ...) where I can (with-accessors* (x y z) foo ...)
15:41:24
phoe
Bike: almost everything is a two line definition in Lisp. I want to avoid following the NIH syndrome.
15:49:08
phoe
sounds like a wrapper around WITH-ACCESSORS but I can bet $5 that someone has already written and published it.
15:49:50
Xach
For what little it's worth, I tend to think of using with-accessors as a wrong approach, falling into the "objects are buckets of slots" thinking I don't really like.
15:51:14
phoe
Xach: I'm defining a macro that will need some variables bound inside its body. I want with-accessors for that, since it uses symbol macros, which is good enough because the actual accessors will be called.
16:03:34
pjb
phoe: minor syntactical annoyances are not to be complained about, they're to be avoided with DEFMACRO!
16:52:26
warweasle
I just solved a problem using lisp. I needed multiple "virtual channels" through a serial port. I can use lisp on the server side to parse out (channel . data).
16:56:46
warweasle
__rumbler31: I will shortly. I can't be on two networks at once becuase the IT department will shut the second one down. So I'm going to bypass it with a serial port.
17:00:15
__rumbler31
one thing thats always been a mystery to me is how to correctly set serial speed settings without writing c code, and it seems to be different all the time. Does the terminal that will be talking to the device need "its" speed set with stty? or does stty configure the speed of a /dev/tty for which all other accesses will be correct?
17:07:08
sjl
warweasle: these struct slots are of type double-float, but whatever lisp xach is running the tests in has *read-default-float-format* as something else (e.g. by default SBCL is SINGLE-FLOAT I think)
17:14:30
Xach
warweasle: the topic is squirl demo 2 does not build because of float and integer literals in the code that don't match the declared types.
17:14:44
sjl
warweasle: the bug Xach mentioned 15 minutes ago, and you asked what you needed to fix.
17:19:14
phoe
pjb: right. on ##c, I would complain about minor syntactical annoyances. on #lisp, I complain about me having to write the DEFMACRO myself and contributing to the global NIH.
17:22:46
warweasle
I haven't looked at this in forever. I don't think anyone uses it. Cl-chipmunk has replaced it.
17:23:57
warweasle
I'll see what I can do tonight to get is working again...but it's strange this suddenly broke. Or was this the first time in quicklisp?
17:37:26
Xach
warweasle: there are a ton of demo, test, and ancillary system failures that I have mostly ignored
17:39:06
warweasle
Xach: I don't think it's used. You can remove it if you like. CL-chipmunk does the same thing faster.
17:40:04
warweasle
Xach: I'm out of open source development for now. I don't know how long that will last. But I've been swamped with other projects. I miss lisp however.
19:07:31
|3b|
warweasle: not sure "use ffi to do 2d physics" is exactly a replacement for "do 2d physics without using ffi" :)
19:11:26
warweasle
|3b|: It is when I have never understood the code. Mostly I just fiddled with things until squirl worked.
19:14:31
|3b|
maybe lispgames could take over if you no longer have time, though not sure anyone else there has all that much extra time either