freenode/#lisp - IRC Chatlog
Search
6:43:40
flip214
when using the access library, can I tell it to do NTHCAR? (access:accesses ...) gives me a list, but with 0 as additional path specifier I only get NIL.
8:02:50
shka__
is coercing adjustable array of characters to simple-string guaranteed to work on a standard CL implementation?
8:48:18
beach
asdf_asdf_asdf: I am reading your questions in the channel logs, and I don't quite understand why you program in Common Lisp, given that you seem to want to treat it as just another language in the C family, where you can take the address of variables, and manipulate pointers explicitly.
8:48:18
beach
I think you would be much better off using a language in that family, rather than trying to twist Common Lisp into something it really is not in the first place.
8:49:53
beach
Perhaps you are under the impression that Common Lisp is just another language in the same family, only with a different syntax. That is not the case. It is fundamentally different with automatic memory management and uniform reference semantics.
8:52:11
beach
Well, I am afraid that asdf_asdf_asdf is wasting time because of a fundamental misunderstanding about what Common Lisp is.
8:52:45
beach
And I don't understand this desire of simultaneously using Common Lisp and treating is at something it is not.
8:55:59
asdf_asdf_asdf
Some lack me theory, so that not understand that probably reference not exists in CL.
8:57:46
beach
asdf_asdf_asdf: I understand you might not quite understand the semantics, but why are you using Common Lisp in the first place if you want to program as if you are using C, and, as I recall, also accessing C code from Common Lisp?
8:58:40
beach
asdf_asdf_asdf: If you are using Common Lisp in order to learn how to program in it, I strongly recommend you not try to interface to C in the beginning.
9:00:04
beach
asdf_asdf_asdf: If you use Common Lisp that way, the code you are going to end up with (if you succeed at all) is going to be very ugly.
9:05:06
beach
asdf_asdf_asdf: It is a *huge* mistake to think that all programming languages are fundamentally the same and that you can translate code from one to the other while preserving the overall organization of that code.
9:06:18
beach
asdf_asdf_asdf: To make things worse, C is often used in ways that the standard says is undefined behavior, but which is traditional behavior of C compilers. Such code is even less possible to translate to Common Lisp directly than conforming C code.
9:08:07
saturn2
even if you succeed, you would just end up with the same program but slower and incomprehensible to anyone but you
9:10:18
beach
asdf_asdf_asdf: So, it is highly likely that your questions such as "what is the equivalent in Common Lisp of the C construct <mumble>" will be answered by "there is no equivalent". I therefore advise you to learn Common Lisp as a language in its own right.
9:11:46
beach
asdf_asdf_asdf: You will learn more about idiomatic Common Lisp, and you will annoy people here a lot less that your current questions result in.
9:12:33
asdf_asdf_asdf
@beach; I know not must be equivalent, code in different languages another is written.
9:17:08
beach
asdf_asdf_asdf: Then quit trying to interface to C as part of your learning Common Lisp, and start using Common Lisp as a language in its own right, so that you can learn how it works, what the idioms are, and how you structure Common Lisp code.
9:20:16
aeth
The main line, I'd say, is garbage collected vs. not. But of the non GCed languages, C is about as far fron CL as you get. Even C++ has a lambda now!
9:21:23
aeth
Your code still wouldn't be idiomatic if you translated Ruby or Python or JavaScript, but at least it'd be easier to find equivalents.
9:23:21
Shinmera
You can port C code to Lisp just fine, as long as you don't try to do pointer arithmetic or other crap they like to do. In order to be able to do such a port you need a good grasp on both languages and understand how concepts translate.
9:23:50
aeth
C's all about using stuff not exposed in CL to implement stuff that practically everyone else gives you as part of the language.
9:24:22
aeth
You can translate stuff from C if it's something that can be written in any language, of course.
9:26:51
aeth
You can also do fun hacks to e.g. fake foo(&x) in CL by e.g. using 0-dimensional arrays or other fun obscure corners of the language, but as you said, you need to know both languages well first.
9:28:13
beach
My point is that I am quite convinced that asdf_asdf_asdf does not currently have the required knowledge to port C code to Common Lisp code, not to do any sophisticated emulation of the C runtime environment in Common Lisp.
10:12:38
minion
rigidus: have a look at onlisp: An advanced textbook on Common Lisp, with special focus on macros. at http://www.cliki.net/On%20Lisp
10:12:46
minion
rigidus: paip: Paradigms of Artificial Intelligence Programming. More about Common Lisp than Artificial Intelligence. Now freely available at https://github.com/norvig/paip-lisp
10:17:02
jackdaniel
like: graphics, algorithms, integrated development environments, some paticular kind of applications?
10:18:34
jackdaniel
for the last part I could recommend studying source code of cl-ppcre which implements regular expressions for Common Lisp
10:19:09
jackdaniel
regarding robots and expert systems I'm not familiar with libraries concerned with these topics
10:20:54
rigidus
jackdaniel: I was able to write the FORT in assembler 86, but I had difficulty trying to write a lisp on this FORT
11:02:51
shka__
rigidus: i made basic prolog implementation in CL, I am trying to optimize list unification right now
11:12:29
no-defun-allowed
Just saying, Hugin (with one N) is the name of an image-stitching program I've used before, but I don't think a Prolog and an image tool are easily conflatable.
11:16:46
shka__
or perhaps even better https://github.com/sirherrbatka/huginn/blob/master/src/machine/operations/unfolding.lisp
11:17:09
shka__
this is unfolding implementation with shared representation for code and data on the heap
13:21:27
dlowe
I use the one from quicklisp, since it's guaranteed to be in synch with the swank version
14:25:56
Shinmera
Dunno what you mean with out of sync either, slime from melpa bundles swank just as the one from ql does.
14:42:02
sukaeto
I think dlowe is referring to situations where you run your own Lisp image outside of Emacs and then slime-connect to that
14:42:46
shka__
i do that quite often, usually swank and slime are at most 1 version apart and so far it worked for me without a problem
14:42:53
sukaeto
in that case, if you've got the melpa SLIME package installed, you'll get a version mismatch if you're ql:quickload'ing swank from your Lisp image
14:43:36
sukaeto
you get a warning on connect that there's a version mismatch, you tell it OK, and it connects and works
14:44:51
sukaeto
fwiw, I only do it this way because when I set it up I didn't know about quicklisp-slime-helper
14:45:46
sukaeto
yeah, I mean, if you're using swank<->slime communications in a production system maybe you'd want to extensively test before doing this?
14:51:06
Shinmera
sukaeto: Even in that situation you'd have to guarantee that you're running the same QL dist version locally, too.
14:55:47
sukaeto
Shinmera: oh yes, of course. If you're juggling multiple systems all pinned to different QL dists, I can believe you'll run into this problem all the time
15:02:22
remexre
weird behavior: I'm trying to do :perform (test-op (o c) (symbol-call :fiveam '#:run! :foobar)) in an asd file I'm loading with ABCL, but I'm getting "There is no class named TEST-OP."
15:07:52
Bike
yes, and in that case you're treading in dangerous territory by using things the developer doesn't expect you to use and may change without warning