freenode/#lisp - IRC Chatlog
Search
2:47:11
pjb
emacs packages are some kind of (CL) system. There's nothing like CL packages in emacs lisp. (there are obarray which are some low-level stuff that could be used to implement CL packages in emacs lisp, if there was hooks in the reader available).
2:54:02
edgar-rft
My problem is more that I cannot find any documentation about a -*- Package: foo -*- file vaiable. Neither in the Emacs manuals nor in the Slime manual. I just simply have no idea where this variable comes from.
2:58:32
pjb
edgar-rft: slime checks for in-package forms to read and evaluate things in the right package. Without an in-package, I guess it will fall back to the package name bond to package.
3:00:25
edgar-rft
pjb: That's how Common Lisp handles packages, what has nothing to do at all with file local Emacs variables.
3:07:45
devon
pjb, edgar-rft: Emacs *should* downcase all file-local variables but stupidly does it only for those variables where someone complained.
3:09:23
devon
pjb, edgar-rft: Another wheel to re-invent, [rolls eyes] but it beats editing thousands of files starting with -*- base: 10; package: foo; readtable: CL -*-
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