freenode/#lisp - IRC Chatlog
Search
8:53:30
beach
[without a dangling participle:] By doing it that way, I can have the logic for handling new environments, for binding the parameters (lexical or special) in one single place.
9:05:26
beach
Besides, the same problem of emitting good error messages exists already because of macros.
9:24:24
oleo
macro forms cannot expand into declarations. declare expressins must appear as actual subexpressions of the form to which they refer
9:26:56
oleo
if the first macro expression doesn't contain a declare form itself it will be expanded as usual....and when it refers to a second expression (which is another macro somewhere else) that one will be expanded too
9:30:15
oleo
since the code walker isn't required to expand macros before checking for declarations.....
9:31:39
oleo
and when it already checked for declarations before the macro expansion, it is too late for the declarations to get effect
9:33:21
oleo
what does the macro expansion turn into when it checked for declarations already before the expansion ?
9:40:40
oleo
if the code-walker can't walk a macro to check for if it contains declarations, and hence can't distinguish if the expression is a declare-form of a sub-expression or if the declare-form is a result of the expansion of the macro.....
9:41:41
phoe
this implies that forms as simple as IN-PACKAGE, DEFUN, DEFMACRO, DEFVAR cannot be walked
9:45:12
oleo
all i see is the actual declare-form wrapped by a function/special-form in the expansion
12:35:25
didi
I think I finally understood why PCL uses `with-standard-io-syntax' after trying to save a list to a file with `*print-length*' set to 42.
12:58:46
Bike
what is the point of this paste. you just posted this with no context or explanation. do you expect a response
13:13:22
phoe
you just posted a way of telling SBCL that it should shut the fuck up and evaluate whatever you gave it without printing any notes, warnings or errors
13:17:49
jack_rip_vim
hello, I have a question about those lisp that has been shared at ckili, are those modules need to install c library so that I can use it?
13:22:44
jack_rip_vim
hmm, maybe I should figure out those libraries that require c part. I am trying to make a lisp os. so I need to know if those libraries require c part things
13:25:38
jack_rip_vim
I may need to change some of the code on clisp, so that it can be a nice common lisp shell
13:26:52
jack_rip_vim
I know, in 1980s, there are lisp machine, so maybe we can make it popular again
13:27:02
godratio
ooking forward to being part of the community here as lisp will be my second language
13:27:39
didi
jack_rip_vim: I don't doubt your capacity, but implementing "a lisp os" sounds like a daunting task. I would trying finding something smaller to work on.
13:31:32
godratio
I like the idea but dont do it for the language do it for what the advantage of having it done in lisp would be not for the language. THe original concepts of lisp and make it something not about languages but about what is capable with a very flexible system
13:33:28
godratio
no one cares what language the os is in onlyt it capability to the users and the developers.
13:56:51
didi
My debugging so far has been printing forms, evaling functions with C-u C-c C-c and occasionally evaling forms inside the debugger.
13:58:10
Shinmera
Don't forget pressing 'v' on a stack frame to jump to the definition and potentially see the form in the definition that the error is in.
13:58:56
Shinmera
Just using TRACE is also useful a lot of the time to avoid having to write manual print stuff. Otherwise you can also insert (break) at points of interest to explicitly invoke the debugger and see local variables and whatnot.
14:00:04
Shinmera
Occasionally I also use STEP when I already have a rough idea of the error location.
14:05:41
Shinmera
I just remembered that there was this five-part article series on debugging in lisp: http://malisper.me/debugging-lisp-part-1-recompilation/
14:12:15
godratio
i just read that resource not to long ago its very cursory view of the features that are available if your using slime best to read their user manual.
14:25:50
pjb
godratio: programers care if they can modify the OS while running using their favorite programming language.
14:27:06
godratio
Yes i agree this is one of the awesome benefits of having a lisp like OS I am just saying if your goal is t make it a useable OS for users as well also need to have that in mind
14:27:35
godratio
if not no need to worry about it than just a commad line interface is good. I would use it.
14:47:25
minion
Kovalski: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
14:50:11
phoe
Kovalski: anyway, read up on PCL. if you haven't programmed anything before, read gentle.
14:50:15
minion
Kovalski: direct your attention towards gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
14:53:28
phoe
Kovalski: then you'll get to learn lots of new stuff regardless of which Lisp you choose. (:
14:54:23
phoe
Kovalski: well then, you ended up on a Common Lisp channel, so you'll get a lot of "Common Lisp" answers
14:55:19
phoe
right now I'm tweaking a launcher for a game. I wrote the launcher in CL with Qt for graphics. https://i.imgur.com/FxRFDo2.png
14:56:15
phoe
Kovalski: Scheme is much smaller than CL. I personally began by learning the basics of Scheme before jumping onto CL.
14:56:51
phoe
You'll still need to munch on S-expressions, which are (lisp way (of) storing (data (in (list format))))
14:57:29
phoe
and you'll learn operating on these, taking CARs, CDRs, creating new lists, traversing them, doing a few exercises like zipping (1 2 3) and (4 5 6) into ((1 4) (2 5) (3 6)) and so on.
14:59:47
phoe
The game itself is pretty old and run by other people, I'm only writing some utilities for it.
15:02:04
phoe
There are a few lispy IRC channels around here. #lisp for general CL discussion, #lispcafe for everything, #clnoobs for learning Lisp, channels for toolkits, implementations and projects.
15:03:19
phoe
#lisp is the biggest and you'll find everything here: library discussion, random issues with compiling, questions about object systems, random intellectual rants from pjb, newbies asking shy questions, people announcing new releases...
15:12:23
phoe
I don't know. Probably the ones that other people use for some reason because they're doing X which requires language FOO.
15:15:45
Kovalski
I'll start with Practical Common Lisp, I guess. I'll come back and you tell me if I'm the same me.
15:16:30
godratio
Practical common lisp does good in the beginning but after the first 5 chapter its not very pragmatic
15:18:07
godratio
Yeah its good but not like a quick start hmmm well if you want to just jump in with sloppy details so you can try and messaround and then jump into detail as you see fit i like this
15:20:46
godratio
hehe very good one. It can be light or dark i see well i will stay on the side of the light for truth no one can turn me into a schemer!
15:22:38
jack_rip_vim
I try to run some function that suggest in lisp manual, but the function doesn't exit
15:23:52
beach
jack_rip_vim: The only valid "lisp manual" is the standard, usually incarnated as the Common Lisp HyperSpec.
15:25:07
phoe
jack_rip_vim: CLtL2 has some functions that are not in the standard, so that's possible.
15:27:11
random-nick
you can also buy the official version from ANSI, but I don't think the official version is hyperlinked
15:29:37
beach
jack_rip_vim: It is a good book, but it is not the standard, so you run the risk of getting into situations like you described.
15:30:08
phoe
There are community-curated PDFs of a draft standard, that's equivalent to the official one.
15:30:27
phoe
the standard itself exists, even though ANSI sells a very shitty copy of it through its website.
15:30:45
Kovalski
I know I'll need it somewhere along the way, what I'm asking is do I need it Now. I think the best way to find is by diving in, isn't it? So I will.
15:34:34
beach
jack_rip_vim: There is no such thing. There is a dozen different implementations of the standard. Common Lisp is a language and does not have any source code.
15:37:33
beach
Perhaps you are confusing "CLISP" (which is an implementation of the Common Lisp language) and "Common Lisp", the programming language.
15:37:57
beach
CLISP being an implementation does have source code, of course. The Common Lisp language does not.
15:39:11
beach
In particular because CLISP is not even one of the most popular implementations used by people here in #lisp.
15:40:11
pjb
It has unique advantages, such as long floats of any precision you want, good unicode support, small foot-print, and more.
15:43:36
beach
jack_rip_vim: And the implementation of the Common Lisp language is proprietary like the rest of the code. It is not one of the free implementation we deal with here on freenode.
15:47:12
beach
jack_rip_vim: Of course, if you find some conforming Common Lisp code in there, then that particular code could be re-used.
15:47:45
beach
jack_rip_vim: But the Lisp machine(s) existed before the Common Lisp standard was decided upon.
15:52:10
beach
jack_rip_vim: You might also want to check out this attempt at a modern "Lisp OS". It is not quite correct in this case, because there are other languages involved, and the OS itself is Linux, but the user experience might give you some ideas: https://www.reddit.com/r/lisp/comments/6yuajg/lisp_machine_rides_again/
15:53:10
beach
It uses McCLIM, which is an implementation of CLIM, the Common Lisp Interface Manager. CLIM was also available on the Symbolics Lisp machine.
15:53:28
jack_rip_vim
I am thinking to change initrd.gz file at linux, so that it can only load clisp client
15:54:00
godratio
what is a good looping construct that will give you the place rather than the element
15:55:08
godratio
Is docount the only option here pulling the place or cons from the list yourself or is there a looping construct that will give you a reference or place
15:55:13
jack_rip_vim
beach, I may try to buy a iMac PowserPC, someone said openGenera can install on it
15:59:13
White_Flame
places basically exist in source code and are compiled away. That's why macros are required if you want to pass them through a call chain
15:59:23
godratio
Yes thats what im trying to do is get the reference … im a bit of a noob so im not really for sure exacly what the difference between places and references are yet.
16:00:15
White_Flame
(setf ..some-place... 3) is a compile-time decision as to which setter to include there
16:01:46
White_Flame
if you absolutely need dynamic runtime "pointers" to modify, then the term to look for is a "locative", as was used in older Lisps
16:02:06
White_Flame
but generally, there's going to be a different better solution than just relying on C-style coding :)
16:02:54
White_Flame
are you parsing a string? then pass around the offset. are you parsing through a list? then pass the current cons cell
16:03:21
godratio
yeah i understand that but like i said im a bit of a noob long time c programmer i have not got those advanced lisp things down just taking baby steps learning syntax lingo and how to build basic programs
16:05:02
godratio
i guess i have the choice of parsing a string or a char write now i read in teh file as a char list as that seemed the way to do it and yeah going with the offset was my first intution but i though maybe there was a way to pass around thre cons cell around like a reference or pointer
16:05:32
godratio
good to learn these things. I also seen there was a way to recure through the cdr concept hehe
16:06:02
White_Flame
if you're parsing "abcde" then there are no cons cells, but a string which is a type of vector. If you're parsing ("a" "b" "c" "d" "e") [which is strings] or (#\a #\b #\c #\d #\d) [which is chars] then you do have cons cells as part of a list.
16:06:22
godratio
let me cout the ways i can parse this file haha I will be wanting effecience in my lisp programs so good to know how its working underneath the hood.
16:09:37
godratio
what i was surprised was there was no easy way to read in teh file as string which in a higher level language i thought there would be a one liner for that.
16:10:16
godratio
It seems that string in lisp are always unicode no ascii…. which is why i read them in as chars rather than a list of strings …
16:11:07
beach
godratio: When I said "a reference to a CONS cell", I was merely pointing out that Common Lisp uses what I call "uniform reference semantics", which means that, semantically, every object is manipulated through a reference. Places are still not first-class objects in Common Lisp.
16:11:07
jack_rip_vim
I think I need to take a little bit time to read all the old document, so that I can know more about the earlier lisp machine.
16:11:57
beach
jack_rip_vim: Common Lisp is a language, so it can't load anything. Some Common Lisp implementation (most, probably) can load C libraries, though.
16:13:26
beach
jack_rip_vim: Common Lisp being a language is also neither interpreted nor compiled, which is another characteristic of the particular implementation.
16:13:27
godratio
I never use &variable in C it causes more bugs than anything for me. I always just use raw pointers.
16:13:44
beach
jack_rip_vim: Similarly, Common Lisp is neither fast nor slow, another implementation characteristic.
16:14:37
godratio
it all depends. on the context but it is good that lisp has the potential for good enough performance.
16:15:05
beach
godratio: Strings in Common Lisp are neither Unicode nor ASCII. They are vectors of characters.
16:15:15
godratio
Anyways my main reason for picking it up is i want a tools language and wiould like to write an interpreter in it to use it as a scripting language for my in progress engine.
16:16:27
phoe
I know - #lispgames is just a community of people who utilize Lisp in some form in their games
16:16:47
beach
godratio: There have been many projects in the past to do that, and there are many existing Common Lisp implementations suitable as a scripting language. However, why on earth would you write software in a static language and then use a slow interpreter for scripting?
16:18:05
beach
godratio: The combination will be slow, and impossible to debug. I strongly recommend you write the entire program in Common Lisp. Then you need no particular implementation for scripting purposes.
16:18:58
beach
Because people will write more code in the scripting language, simply because they can't modify the static code base.
16:19:27
beach
godratio: What makes you think that using a static language would make your software faster?
16:19:35
godratio
I will write my own custom interpreter im thinking which will compile down to machine code
16:20:12
godratio
hopefully that will work out if not at the least i will be using lisp for offline processign meta programming tools to output c code.
16:20:25
beach
Alternatively, you can use a good existing Common Lisp implementation for the entire thing. See for instance: https://hal.archives-ouvertes.fr/hal-01544135/document
16:21:18
godratio
I will use them if they are good enough if not its my own sub version of lisp of my own design obviously i would not implmenet common-lisp all of it jsut like a lisp like language that has access to the c-api of my game.
16:22:05
jack_rip_vim
I mean if I try to load all the exist modules, will that take too much memories?
16:22:12
godratio
Yes but you cant embed SBCL inside a c-program how is the interfacing and marshalling can i get it to work with my memory allocators?/ etc…
16:23:05
godratio
ok yes i was thinking just a subset of small lisp .. anyways before all that i just need to learn regular lisp like i said i need to be an expert for comomn lisp to write my offline tools and webservers etc…
16:24:57
godratio
Yes i have heard of that… I will check it out someday when its time right now first i want to do some text processing for outputting some c code maybe play around with it helping to generate some shader variants and some fun stuff like webservers etc… its my personal project i can do whatever i want
16:25:00
beach
godratio: That said, most Common Lisp implementations, including SBCL supports some foreign-function interface, typically CFFI.
16:25:31
godratio
beach: Cool i actually really like SBCL so far so would be cool to interface witht that somehow.
16:28:33
godratio
I really enjoying lisp I like it how it came to be and the fundamental nature of it and the building block nature of it its history and its future. I look foward to talking with you gentleman more but for now its late here in Japan I must go to bed.
16:30:24
jack_rip_vim
I mean if I try to load all the exist modules, will that take too much memories?
16:35:15
beach
jack_rip_vim: Yes, very likely too much memory. There are probably hundreds of thousands of modules out there. We only know of a few thousand, so you will have a hard time finding all that exists, but if you do, and then try to load them, you are very likely going to go beyond the amount of main memory a process on your OS will allow.
16:36:39
whoman
loading lisp files is nothing to worry about until you dont have to ask that question
16:36:41
beach
jack_rip_vim: How will you find every person on the planet who ever wrote a Lisp module?
16:37:11
beach
jack_rip_vim: My nephew has written a few too, but I don't think he gives them away. How are you planning to load those?
16:37:54
beach
jack_rip_vim: Whatever ckili is, it is nowhere near "all existing Lisp modules" and probably loading all the ones you find in a particular directory is going to be safe.
16:38:09
jack_rip_vim
i may chnage some of clisp's source code , so that it can support to load all of it
16:39:46
jack_rip_vim
:) , I may try it, but I am not sure if it will burn out my computer's memory or not
16:39:48
whoman
how do you use everything anyway. a fully complete kitchen, but can only make one or two things at a time
16:42:55
whoman
well. storing it on your hard disk for loading when you need it is a similar situation
16:43:22
whoman
if you can save all the lisp on your computer, then you can get a more clear understanding of the task
16:50:16
pjb
Not angry. You already have been told about the difference between a language and an implementation. It has to be drilled into your head.
16:51:53
pjb
jack_rip_vim: read the sources of clisp! https://sourceforge.net/projects/clisp/files/clisp/2.49/clisp-2.49.tar.gz/download
16:52:24
Ober
jack_rip_vim: welcome to #lisp. The same mentally unstable people that rush to a UFO landing, as if they are the ones we want to make first contact...
16:55:30
pjb
jack_rip_vim: the point here is that you should not care about that: eventually your OS will crash, and you will have to reboot all your lisp images, so it will be cleared automatically.
17:08:55
borodust
i desperately need a person who uses windows and lisp (sbcl/ccl) together to see if piece of software works on that platfrom
17:10:11
borodust
it actually works on my win machine, but i have polluted dev environment there (i'm developing on linux myself), so not sure if it will work on other machines
17:11:12
borodust
i actually did want to do that a long time ago, but apparently, i can't use my copy of windows to install into vm and use on the machine at the same time
18:20:25
borodust
it confirmed to work on linux and macos, but it is quite hard to find win-running common lisper :)
18:34:26
borodust
cryptopsy: was there any particular reason to use clisp? would sbcl will work for your case?
18:35:19
cryptopsy
borodust: i am just taking it for stumpwm, i think that will work with sbcl too, but i wasnt able to get sbcl to compile either
18:35:44
cryptopsy
i've been told that stump is only using sbcl nowadays, what happende to clisp is it deprecated?
18:48:16
cryptopsy
i dont understand the sbcl or stumpwm debugging prompt where i have to press a number for [RETRY] [CONTINUE] etc. are those just warnings?
18:51:26
_death
cryptopsy: there was also this recent post.. https://lists.nongnu.org/archive/html/stumpwm-devel/2017-07/msg00002.html
18:55:15
_death
cryptopsy: these options are restarts.. some error has occurred and the debugger was invoked.. you can retry the failed operation or try to ignore it and continue..
18:55:49
cryptopsy
if i leave it alone i see the Load averge fluctuating suggesting maybe its still working?
19:03:49
_death
I suggest trying to manually build it without something that obscures part of the output
19:04:53
cryptopsy
the pkg manager has to build it so i can file a bug if it fails, so it can keep it up to date, etc
19:09:28
cryptopsy
so you can have a mismatch of dep version to the latest stumpwm or sbcl or whatever
19:09:56
cryptopsy
everyone's mindset is fixing bugs because bugs stop them from performing their desired function
19:12:50
cryptopsy
it should fail on its own i presure, if the debugger output are errors and not warnings
19:36:21
phoe
Using fast-io's functions for writing little/big endian unsigned/signed 8/16/32/64bit bytes.
19:44:32
pjb
cryptopsy: unfortunately, I don't remember how well clisp could be emerged, I've not used gentoo for several years. But in any case, I compile my CL implementations myself…
19:44:52
pjb
cryptopsy: I would advise you to download the sources and configure and built it yourself.
19:48:26
pjb
cryptopsy: now, the problem certainly comes from the fact that you're using lisp stuff installed by your linux distribution. This never works well…
19:49:02
pjb
cryptopsy: uninstall all lisp related things with your package manager, and then reinstall stuff manually, following instructions at http://cliki.net/Getting+Started
19:49:56
pjb
cryptopsy: alternatively, you may perhaps go by by removing all reference to gentoo stuff from your rc files.
19:54:05
phoe
What is the simplest way to get a list of all bound class-direct-slots and their values of an instance?
19:55:53
Shinmera
(loop for s in (c2mop:class-direct-slots (class-of o)) for n = (c2mop:slot-definition-name s) when (slot-boundp o n) collect (slot-value o n))