freenode/lisp - IRC Chatlog
Search
9:24:19
Bike
with :type defstruct turns into a convenient way to define a bunch of thin wrapper functions
9:25:04
Bike
and perfectly implementable in the rest of common lisp, except for boa constructors probs
9:59:07
phoe_
there's a gzip library for CL, you could technically use it to extract files into strings, streamify them and supply them to LOAD.
11:11:28
phoe_
"string-not-equal is just like string/= except that differences in case are ignored; two characters are considered to be the same if char-equal is true of them. "
11:39:38
jackdaniel
slaterr: you'll gather more opinions on #emacs, this channel is about Common Lisp
11:39:43
slaterr
from perspective of vim user who can't get used to emacs keybindings but wants to use some emacs modes, like slime (that i suppose works just as well on spacemacs as on regular emacs?)
11:40:14
jackdaniel
spacemacs works OK for a few people I know. There is also slimv mode for VIM (I don't know anything about its quality though)
11:51:37
slaterr
cool i'll give it a try. just curious, what made you use vim bindings when you don't have experience with vim?
12:03:25
specbot
The Structures Dictionary: http://www.lispworks.com/reference/HyperSpec/Body/c_struct.htm
12:58:44
lieven
heh I never noticed you can only have one :include in defstruct. It's not immediately obvious to me why they added this restriction
13:34:06
Xach
ha! nicolas neuss removed the infix library from his femlisp project. comment: "available in a better way using Quicklisp". but quicklisp's version of infix comes from -- femlisp.
13:35:06
Xach
lieven: I don't know the ultimate reason, but it is much easier to implement in a way that is pretty fast and space efficient.
13:37:25
Xach
lieven: if you have structure type S' that :includes S, instances can look like: [[S slots][S' slots]] and all S accessors can work as though the instance is an S.
13:41:18
malice
Hi all! I am trying to set up Travis CI for my CL project, using Roswell to test different implementations.
13:41:38
malice
I found this article: https://github.com/roswell/roswell/wiki/4.1-Travis-CI and I am trying to set it up for this project: https://github.com/MatthewRock/cl-sandbox/tree/travis-installation
13:42:25
malice
However, when calling roswell, quicklisp does not see my project. However, the template does not seem to include adding it to the ql location or adding anything to asdf:*central-directory*
13:51:45
payphone
I'm fairly certain Roswell uses its own qucklisp folder. I think the local projects folder is located in ~/.roswell/local-projects/
13:58:36
beach
lieven: What Xach said. Multiple inheritance makes it possible for the position of a slot vary from one class to another. This is also why Java has multiple inheritance only for interfaces.
13:59:56
malice
payphone: What should I do then? My system is called cl-sandbox, and I am installing it with "ros install MatthewRock/cl-sandbox". It gets installed properly. However, loading the system with -s argument still does not work.
14:00:05
lieven
beach: yeah. And they would have to deal with the question of multiple includes via different paths
14:02:21
beach
lieven: All those problems are taken care of by standard classes, but they require the accessors to be generic functions.
14:02:58
Colleen
drmeister: frgo said 4 hours, 15 minutes, 18 seconds ago: Strange effect: I changed fli.cc and then did a waf build_cboehm - this results in an infinite loop during build: bclasp building doesn't goe into a link phase but loads the "clasp-builder" again ...
14:03:56
drmeister
Question #2: What does a swank protocol request look like? If I telnet into a swank server - I see the server respond - but how do I formulate input so that swank processes it and returns a result?
14:05:51
payphone
malice: Ah, I see. I misunderstood your problem. Give me a second to check your code.
14:06:45
Xach
drmeister: there is at least one non-slime swank client program, maybe it could provide some insight
14:11:53
payphone
malice: I think your sandbox.asd file should be named cl-sandbox.asd, the same as your package name.
14:15:20
jackdaniel
Xach: (directory "/tmp/") will return only this directory, (directory "/tmp/*") will return all files in directory
14:17:10
slaterr
beach I am not sure if you have to call funcall when calling a function returned by a function? if so I would like that as well
14:18:44
beach
slaterr: You could probably write a macro that would do some of that stuff, but it would be very complicated. It would require a complete code walker. And you still could not do things like ((f x) y).
14:19:29
Xach
If the variables in question are easily enumerated, you can do something much simpler.
14:19:52
jackdaniel
Xach: this name may be a bit misguiding, what resolve-symlinks does is in fact "follow symlinks"
14:20:03
beach
slaterr: But why would you want something like that? Or is this just a theoretical question?
14:21:01
Xach
jackdaniel: so I should expect the same result whether i provide t or nil in this case?
14:22:46
Xach
jackdaniel: i know this is not specified by the spec, so any behavior is fine, but I am trying to calibrate expectations.
14:22:48
slaterr
beach both.. i was wondering if it is theorically possible. and practically I would funcall clutter when programming in a more functional style. I'm sure you get used to it after a while but..
14:23:37
Xach
jackdaniel: for what it's worth, sbcl returns sym/a.txt or real/a.txt depending on :resolve-symlinks nil/t
14:25:28
jackdaniel
I find it natural too. right now it behaves indifferent in the situation you have mentioned, but I wouldn't depend on that behavior
14:29:01
Xach
jackdaniel: I want to make a file, /foo/bar/index.txt, that has a list of all *.asd files under /foo/bar/. And I want to make the pathnames relative to /foo/bar/, so in the case of symlinks, I want the non-resolved name.
14:29:37
Xach
but sometimes /foo/bar/ itself is actually /Barble/Narble/foo/bar/ and that can foul up computing relative pathnames
14:33:53
jackdaniel
Xach: ecl's directory will be rewritten to match more closely other implementations, so resolve-symlinks will get there too. But first I want to write a CDR for pathname unification to have something to refere to
14:35:28
drmeister
Can slime be used to connect to swank servers on remote machines? I'm guessing yes based on what I've heard.
14:35:52
drmeister
jackdaniel: I have the same issue with resolve-symlinks because clasp duplicates ECL's behavior
14:35:58
Xach
drmeister: Yes, but by default it listens only on localhost. there is no authentication in the protocol.
14:36:45
drmeister
I'm running swank within a docker container and there appears to be some initial communication and then:
14:37:37
jackdaniel
note, that M-. won't work unless you have sources at the exact same location as on target machine
14:38:30
jackdaniel
drmeister: 0.0.0.0 is "every network", but you have to connect to the particular ip
14:39:18
drmeister
0.0.0.0 is a docker thing - that's where they provide access to the docker services
14:49:49
drmeister
I'd like to deploy Cando (Clasp+chemistry code) as a Docker image that people run and connect to initially through emacs/slime
14:52:39
drmeister
I see the same immediate shutdown with sbcl/swank running in the docker container
14:52:51
jackdaniel
drmeister: see https://gitlab.common-lisp.net/ecl/ecl-android/blob/master/assets/lisp/etc/user.lisp#L69 start-swank function
14:54:09
eudoxia
and you set the loopback interface in swank to... i don't recall what the correct value would be
14:56:17
antoszka
I'd rather ask the potential users to set up ssh tunnels and leave swank listening on 127.0.0.1:<whatever port>
14:56:26
eudoxia
I guess you could set swank::*loopback-interface* to (uiop:hostname) and let UIOP take the wheel
15:00:05
eudoxia
also, try connecting to the Docker swank with https://github.com/eudoxia0/swank-protocol
15:41:55
slaterr
about my earlier question about turning CL into lisp-1. wouldn't it be relatively simple by walking through the code, and turning every function call into a check whether the symbol refered to a function or a variable, and then either call it directly or via funcall?
15:45:10
beach
So if you have (with-output-to-string (var ...)) you will treat var as a function call?
15:48:20
slaterr
is that a problem? I'm not sure what "enivonment of the implementation" standards for. do you mean code can't be written in CL and it has to be implementation specific?
15:48:39
ogamita
slaterr: yes, it's simple, such a macro has been posted on news:comp.lang.lisp ages ago.
15:50:37
beach
slaterr: For you example of ((f x)), would you turn (let ((x 234) (y 345)) ...) into (let (funcall (x 234) (y 345)) ...)?
15:51:06
ogamita
Theorically, a code walker has to be implementation specific, because the standard doesn't prevent the implementations to provide implementation specific special operators. But in practice IIRC, there's only one such occurence amongst all the common implementations.
15:51:45
ogamita
So in practice you can "easily" write a code walker. Now the "easily" is quoted because to make it easy it is preferable to provide your own implementation of all the CL macros.
15:53:25
ogamita
Yes, new special operators, but the worst is the _extension_ of standard special operators! AFAIK there is only one such occurence amongst the common implementation too. (clisp extends CL:FUNCTION with an additionnal parameter, sbcl has an additionnal special operator (that is not an implementation of a standard macro).
15:54:35
ogamita
https://github.com/informatimago/lisp/blob/master/common-lisp/lisp/stepper.lisp#L266
15:55:27
ogamita
ok, in cl-stepper I have it easy, because I use the underlying implementation for the expansion of the result of the code walker.
15:56:42
ogamita
beach: the trick is to assume a conforming program on a conforming implementation. Then you can substitute any operator of the implementation by equivalent conforming operators, notably for macros. (for functions it is more difficult if you have alternate data types).
16:01:17
drmeister
eudoxia: That swank-protocol thing... that runs within another Common Lisp implementation and talks to swank somewhere else - correct?
16:48:56
jasom
eudoxia: last time I wrote a swank client, the swank service changed to often for it to be useful; is that still the case?
16:49:36
eudoxia
swank-protocol is a very low level client, basically just handles the wire-protocol (length-prefixing and all that crap)
16:50:29
jasom
I looked at the slime history and it's really a case of a single monolithic program that just happens to make some function calls across the wire.
16:51:50
jasom
I don't know if I could convince the slime maintainers to do this, but a nice thing might be to factor out all the various implementation-specific things that slime can do into its own library (generate a backtrace, break, eval compile &c.) then one wouldn't be tied to the swank wire protocol
16:52:29
jasom
b/c the only real reason to use swank is the huge amount of implicit knowledge in the code about how to control and debug various lisp implementations
16:52:38
eudoxia
consider sending `(read)` over to swank and having the lisp process wait for user input
16:53:19
jasom
eudoxia: well that's just accomplished by binding streams, right? It's orthogonal to the debugger specific things
16:54:05
eudoxia
but ideally yeah: there should be an IDE engine core, an IDE engine wire protocol server, and a CL IDE engine client
16:54:24
jasom
I can implement bespoke gray streams fairly easy, and using trivial-gray-streams it's implementation independent. It's all the other stuff that is a PITA to do and needs to be done 6 times.
17:22:01
drmeister
If I have a Dockerfile that clones clasp from github and then builds it - if I change the github repo - is there a way to build a docker image from that point? I guess I start from an image that immediately precedes the git clone and build?
17:22:55
drmeister
Off-topic - I know - sorry. But there are several docker users here interested in Common Lisp.