freenode/lisp - IRC Chatlog
Search
4:26:57
krwq
hello, I'm trying to port my app to windows, when running it, it tries to do something with gcc and says that it can't find it - i have installed mingw hoping it will discover it after but it didn't - anyone has done that before?
4:30:45
krwq
Thank you pillton - i still am getting errors but ill try to figure it out myself first
4:44:45
krwq
is there any way to tell what error did the grovel process exit with? when i run that manually from command line i get different error depending if im in mingw/bin or not
4:52:54
pillton
From what I recall the 64bit version of mingw had to be downloaded and installed separately.
5:32:57
axion
Given that the recommended style for predicates is foop/some-foo-p, how should a defstruct slot be defined? Should it be ex: foo-p such that the concatenated accessor is some-foo-p? Or some other way?
5:34:59
loke
Since I pretty much always use DEFCLASS rather than DEFSTRUCT, that's a natural thing anyway.
5:38:01
axion
Not just that, but for type defining structs as arrays and such: http://paste.lisp.org/display/336028
5:40:18
Bike
i mean the defstruct is completely different, it doesn't define a type, it defines a copy function, like five other functions
5:42:33
axion
It doesn't have to be. This way I get an array that can be uploaded to OpenGL and be able to access it like an object, and declare the input of all functions as a specific type of array.
5:45:45
axion
Because the :type on the struct allows SBCL to treat it purely like a vector type, so the optimization can work very nicely on it.
5:46:14
axion
Also, I can know exactly the size of the structure in memory, since it is a real array of a certain type, but it is harder to know for defclass instance.
6:05:13
jackdaniel
I'm not sure if I understand, even spec says explicitly "defstruct defines a structured type, named structure-type (...). "
6:06:21
Bike
"If no :type option is involved, then the structure name of the including structure definition becomes the name of a data type"
6:06:45
Bike
er, wrong bit. "For structures defined with a :type option, type-of returns a type specifier such as list or (vector t), depending on the type supplied to the :type option. The structure name does not become a valid type specifier. "
6:08:40
axion
That's where deftype comes in, so I don't have to (declaim (ftype (function (some-long-array-type ..))))
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.