freenode/#lisp - IRC Chatlog
Search
11:20:59
frgo
Question (off topic): What kind of API authoring tools (Non-REST) and code generation tools are there that you guys are considering good stuff?
11:46:50
frgo
Shinmera: Some editor that allows me to create and maintain an API spec for functional APIs during design phase and then generate code from that API spec for a set of languages.
11:47:43
Shinmera
Then I can only say that everything I've seen that advertises to do this is a catastrophe in practise.
11:48:26
frgo
Me too, so far. All the tools that are kind of doing the trick are for REST APIs. I don't need that yet.
11:55:22
jackdaniel
what is nice such protocol may be used to interoperate between different languages (i.e Go vs CL)
12:12:04
pjb
frgo: but actually, any generator can be good, for example, cl-ometa. or just your own custom macros.
13:25:01
AeroNotix
Are there any webrtc libraries available? A quick google doesn't turn up anything
14:45:54
loke
Well, remember that the issue I had was to find out a way to extend DEFINE-COMMAND such that it's possible to know the presentation type?
14:53:38
loke
I type the command "Copy to clipboard" and it will prompt me for an object to copy. At this point, all objects become clickable (since the command is specialised on T)
14:54:27
loke
I click the command, then it records the actual object. Once I press return, it simply calls the COM-COPY-TO-CLIPBOARD function with this object as argument.
14:55:01
loke
The issue, I think, is that the knowledge of the presentation type is lost at the point of clicking on the object. Everything after that only deals with the object.
14:59:46
loke
I was wondering why when I clicked on a Maxima equation, the copy-to-clipboard thing decided to copy the Lisp Sexp form... Turns out that since i have multiple presentaton-translators, once of which being the Maxima-expression-to-CLIM:EXPRESSION (so that I can insert maxima equations into the Lisp REPL), it decided to apply that translator when I clicked on the object.
15:04:41
loke
What if instead of specialising on T, I let com-copy-to-copy-to-clipboard specialise on some speaicl object, let's call it CLIPBOARD-OBJECT-WRAPPER or something like that. I can then have a single translator that translates any object T into a CLIPBOARD-OBJECT-WRAPPER byt simply instnatiating it like so: (make-instance clipboard-bject-wrapper :object OBJ)
15:06:17
beach
How will that solve the problem? It seems to me you still lose the presentation type. No?
15:06:55
loke
At least the unwanted call to the translator will be avoided. So that's one problem solved.
15:07:32
loke
But what if there is a way (by adding a feature, perhaps) to have the presentation-translator function know what the original presentation type was?
15:20:51
loke
The translator is called with the actual presentation object as one of its keyword arguments
15:24:36
loke
All I had to do was to add a second argument to the arglist in the translator named PRESENTATION
15:26:55
loke
Now that I know what to look for, it's actually documented in the entry for DEFINE-PRESENTATION-TRANSLATOR
15:27:09
loke
"arglist, tester-arglist, and doc-arglist are each an argument list that must "match" the following "canonical" argument list.
15:27:09
loke
In order to "match" the canonical argument list, there must be a single positional argument that corresponds to the presentation's object, and several named arguments that must match the canonical names above (using string-equal to do the comparison)."
16:00:01
Bike
sxhash has to work ont he level of EQUAL, but two distinct standard-objects are never equal, so
16:01:39
shrdlu68
I wish to sxhash the subsequence of a sequence without subseq'ing, any idea how I can do this?
16:02:30
pjb
shrdlu68: you can use just the two or three first elements, or the first the middle and the last one, etc.
16:04:23
Bike
you mean you want the hash code to be an array index? and you want two distinct EQUAL objects to have the same index
16:05:23
Bike
if you really want to avoid subseq, i suppose i'd just use my own hash function, and mix up the elmeents
18:17:09
shrdlu68
Haha, and I stopped inlining, which was messing profiling results. Found a major bottleck, now down to 5s with my 35kb test-file.
18:26:55
shrdlu68
shka_: sb-sprof results without inlining make much more sense: https://gist.github.com/shrdlu68/081a78c6196b676395ca518a268d9119
21:31:47
k-hos
any ideas why calling (compile-file "test.lisp" :system-p t) in ECLs repl would emit a .fasc file instead of an .o
21:54:45
k-hos
their examples on the site say :system-p t is supposed to make it emit .o files by invoking gcc
22:10:51
k-hos
but I can't find any information about how to manually specify the compiler, or get it to emit just .c files