freenode/#lisp - IRC Chatlog
Search
10:55:26
beach
Is there an appropriate existing error condition that could be signaled if an attempt is made to execute a form that had compilation errors.
10:57:43
phoe_
"if an attempt is made toexecute a form that had compilation errors" - that's a compile-time of condition.
10:59:38
phoe_
and yes, (defun foo () (go 3)) gives me a condition which is a subtype of PROGRAM-ERROR on SBCL
11:05:42
phoe_
"The errors that result from naming a go tag or a block tag that is not lexically apparent are of type program-error. "
11:06:00
shka
beach: i think that signalling same error in exec time as in compilation time is reasonable
11:06:21
phoe_
"The errors that result from giving throw a tag that is not active or from giving go or return-from a tag that is no longer dynamically available are of type control-error."
11:07:09
phoe_
Class precedence-list: SB-INT:COMPILED-PROGRAM-ERROR, PROGRAM-ERROR, ERROR, SERIOUS-CONDITION, CONDITION, SB-PCL::SLOT-OBJECT, T
11:09:06
beach
shka: What SBCL does is that it includes the compile-time error in the run-time error. Nice.
11:09:36
phoe_
I think that when it encounters compile-time erroring code, it actually bakes the found condition in the compiled code and then signals it.
11:10:46
phoe_
Yes, that's what I've been trying to convey. It compiles a call to error that calls the condition that was signaled at compile-time.
11:11:45
beach
It compiles a call to ERROR that signals a condition of type sb-int:compiled-program-error, and that condition contains the instance of the error signaled at compile time.
11:26:57
beach
So the restartable-form I have may signal a compile-time error and I want to store that error condition in the run-time error condition. I came up with this solution: (let (cc) (restart-case (handler-case (form-that-may-signal-an-error) (error (c) (setf cc c) (error c))) (my-restart () (make-condition 'run-time-error :compile-time-error cc))))
11:27:27
beach
I.e. I handle the compile time error by storing it in CC and then signaling it again.
11:39:28
beach
But it is more complicated. I need to create a FORM that, when executed, makes a condition that includes a condition that existed at compile time.
11:41:44
beach
I think I can do something simpler. If this is the file compiler, I just won't attempt to create a FASL, so the compile-time condition does not have to be there.
11:42:04
beach
If it is not the file compiler, I can just include the condition itself in the source code.
11:42:18
phoe_
because SBCL has its own thing called a slot-object, and conditions are slot-objects.
12:02:06
paule32
i tried "fill", but lost by compare, and add zeros to the first list depend on list2
12:32:33
jdz
paule32: you could work as a magician: you keep pulling out variables like rabbits out of a hat.
12:35:49
Shinmera
Sometimes the things that are going on in this channel fill me with such inexplicable, explosive rage and fury that I wonder why I even bother coming here at all.
12:53:06
Shinmera
beach: Sometimes when I see people that give me the impression they're not learning, or not doing their own work, I just get really mad. It's stupid of me, but I can't help it, it seems.
12:54:07
Josh_2
I wouldn't say it is stupid of you to get mad, more a waste of your own energy. It is understandable that you would get frustrated, especially if you are self taught.
12:56:36
Josh_2
Shinmera: I would argue that it isn't stupid to feel that way, because saying it is stupid may lead you to more negative emotion. I say accept and move on without judgement.
13:12:43
Bike
beach: for what it's worth, it looks like sbcl writes the compile-time error to a string, and then signals a generic runtime condition that has that string in a slot, along with a string of the form.
13:13:53
Bike
it feels like there should be an actual condition, but i'm not sure what would really be handling this kind of condition anyway.
14:31:15
kenanb
I have a program that needs to be controlled via various interfaces, most probably through plugins inside other software, I decided it is better to have it be a server and design the interfaces as clients, now my problem is what kind of stack to use for communication
14:34:00
kenanb
I thought protobuf+grpc / flatbuffers+grpc / trift etc but none seems easily applicable to lisp side
14:34:15
Shinmera
If you're on Unix and on the same machine: probably something pipe-based. Otherwise: TCP. If you're on a wide network with unpredictable firewalls, probably HTTP-based.
14:35:25
kenanb
Shinmera: it needs to be cross-platform, but both server and client will always be on same machine so the network is simple
14:36:14
Shinmera
Well, you could do shared memory, though I don't advise it. I'd rather say TCP-based.
14:37:01
kenanb
is there any reason json-rpc would be a bad idea? the data that is transmitted will be really small
14:37:10
Shinmera
Slapping together a simple server/client scheme with a protocol to call stuff doesn't take that much time.
14:38:52
Shinmera
Unless of course you implement a parser library for the other languages like I'm doing for Lichat.
14:40:07
kenanb
I would actually love to work on it normally, but this is a program that I need to make useful by now or it will never finish :)
14:40:45
fe[nl]ix
kenanb: I'd use protobuf+grpc because it's widely supported, though not as widely as JSON, and has built-in support for schemas
14:41:10
kenanb
cool, I initially found xml-rpc, regardless of general xml hate, I was ok with it as long as it worked, but then even wikipedia says xml-rpc is criticized to be mostly stupid :D
14:42:15
dlowe
Even without grpc, protobufs are relatively sane, binary, and have wide language support
14:43:13
kenanb
Shinmera: :) I guess SOAP is also among the pile of deprecated-bad-xml-ideas of the early 2k era?
14:44:35
kenanb
dlowe, fe[nl]ix: I actually have some experience with protobuf, but I don't think there is a readily available grpc binding for lisp?
14:44:54
dlowe
kenanb: there isn't, but that doesn't stop you from just pushing the bytes through a pipe
14:45:56
kenanb
jackdaniel: CL port for Thrift is underway? you working on it? would you recommend adapting it immediately?
14:46:19
dlowe
You want grpc if you have many services that all coordinate with each other, plus services that can operate on generic RPC streams
14:47:47
jackdaniel
kenanb: only brief documentation is provided and cleanup is pending, also it is not merged to main branch yet. so if you are fine with wip which may have some slight changes in the future, you may use it
14:49:08
jackdaniel
https://github.com/TurtleWarePL/thrift here it is, based on James Anderson work from https://github.com/lisp/de.setf.thrift
14:50:00
kenanb
seriously, what I need is a single CL process communicating with another single process that maybe, C/C++, Python, C#, or CL. One is going to send commands, and act upon the response, either by updating the UI, or printing a fresh cli prompt etc. that is mostly it. I don't even expect two clients connect it at the same time.
14:51:16
kenanb
so I guess any networking method will do in my case, the only major need is easy communication and calling commands on the server
14:52:32
jackdaniel
comming up with REST api on top of ningle isn't the worst thing you can do either – if you plan to plug some UI to it frontend guys will know what to do right away
14:54:08
kenanb
jackdaniel: I will definitely check Thrift out as well, since it also seemed like a bundled solution, and as long as it works on CL part, I think the officially supported languages will do for the client side.
14:57:31
kenanb
Shinmera: the API seems really simple, you just make-server, map some string commands to lambdas, and that's it for the client side, but I haven't tested it much yet, so I don't know how it handles error conditions etc.
16:15:39
mfiano
yeah, i had thought it is where i found a particular article, but it turned out to be one of the other domains.
16:17:26
mfiano
XachX: also, i request that sly follow up article, or at an idea of where you are now :)
17:24:53
shka_
you may perhaps try to use some generator like SWIG, but no idea how hard or easy this will be
18:14:52
emaczen
fe[nl]ix: I was getting strange integers and am pretty sure I didn't do it correctly then
18:28:28
emaczen
phoe_: I don't like the idea of writing to a file and then reading from it, but maybe it is fast enough
18:42:46
emaczen
_death: is the idea that I can still write code in terms of files but it will still use RAM?
18:44:55
_death
that's not shared memory, but you can also do that using a tmpfs mount (e.g., /tmp or /var/tmp on some distributions)
19:08:56
phoe_
tell hunchentoot to output whatever proper HTTP headers it should output, give me the socket stream, and just (loop for jpeg in jpegs do (print-sequence jpeg stream))
20:57:32
jmercouris
can someone explain to me the message in the topic: the #1=(programmable . #1#) programming language
20:59:40
pjb
#1=(programmable . #1#) === #1=(programmable . (programmable . #1#)) === (programmable programmable . #1#) === (programmable programmable programmable . #1#)…
20:59:51
phoe_
in (#1=(a . b) (a . b) #1#), the result is an alist that looks like ((a . b) (a . b) (a . b))