freenode/#lisp - IRC Chatlog
Search
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))
22:46:00
Colleen
Clhs: standard generic function class-name http://www.lispworks.com/documentation/HyperSpec/Body/f_class_.htm
23:48:27
jmercouris
let's say I have a list of structs and I want to make a new list composed of one of the struct fields. e.g. given a struct list of cars, with attr color, I'd like a list of all of the colors that appear in that list
3:16:56
jmercouris
stylewarning: here is where the struct is defined: https://github.com/nEXT-Browser/nEXT/blob/minibuffer-completion/next/lisp/buffer.lisp
3:17:27
jmercouris
stylewarning: here is where the setf is called in set-url-buffer: https://github.com/nEXT-Browser/nEXT/blob/minibuffer-completion/next/lisp/document-mode.lisp
3:20:44
jmercouris
the reason I'm trying to fix this bug is so i can have an example of fuzzy buffer completion
3:21:47
stylewarning
jmercouris: from these files, SETF BUFFER-NAME looks fine. Is buffer.lisp being compiled and loaded?
3:24:13
mfiano
stylewarning: Did you have a video you did a few years ago about lisp math? Maybe I am confusing you with someone else
3:25:16
mfiano
Oh I just started watching excursions :) I didn't know that was yours, so must be the other one then...where is that?
3:26:20
jmercouris
I just dont understand why I'm getting "The function (SETF NEXT::BUFFER-NAME) is undefined."
3:27:00
jmercouris
especially when a (print buffer-name buffer) statement in that exact spot also works
3:31:30
jmercouris
how can it be that (print (buffer-name buffer)) ;; works (setf (buffer-name new-buffer) "new-name") ;; breaks
3:31:32
stylewarning
jmercouris: I don't have any ideas. It looks like it should work very straightforwardly. Does #'(setf buffer-name) in the REPL give you anything
3:40:30
jmercouris
I'm thinking about starting a screen cast so you can just easily see what's on my screen
3:45:21
stylewarning
jmercouris: can you start with a fresh REPL and just paste everything from start to finish?
3:52:10
jmercouris
I load the file using two things, an asdf, and then I push to the central registry
3:52:41
jmercouris
which loads this definition: https://github.com/nEXT-Browser/nEXT/blob/master/next/next.asd
3:56:30
stylewarning
If it errors, then it's probably a macro. You can be extra sure by checking the SETF expansion, which I don't recall how to do off the top of my head.
3:57:37
stylewarning
Anyway, it seems ECL uses SETF expansions for DEFSTRUCT accessors, not functions named (SETF BUFFER-*)
4:03:20
jmercouris
anyways, after this whole debacle, I'm more convinced that version 0.02 must use clos instead of structs :D
4:57:39
stylewarning
the real question to ask is "what is the difference between CLOS classes and structures?"
4:58:37
stylewarning
The shortest and easiest answer id give is that CLOS classes are much more dynamic and flexible than structures, the latter of which are pretty bare-bones in terms of representing composite data
5:01:35
stylewarning
One might use structures instead of classes if: 1. The data are relatively simple and doesn't need to be extended, 2. The data need to be accessed and stored most efficiently, 3. The data doesn't need to be accessed with any sort of generic function/protocol
5:01:57
stylewarning
I typically like structures for functional programming and classes for object oriented programming.
5:08:34
beach
Technically, there is no such thing as a "CLOS class". All classes are CLOS classes and every Common Lisp object is an instance of some class.
5:10:01
beach
What people sometimes refer to as a "CLOS class" should be referred to as a "standard class".
5:13:38
stylewarning
iqubic: I would take beach's comment positively, like you have something grand waiting for discovery :)
5:16:02
stylewarning
Macro enlightenment took me a few years, to understand what their purpose /really/ is.
5:17:32
stylewarning
I recommend this too: Object-Oriented Programming in COMMON LISP: A Programmer's Guide to CLOS https://www.amazon.com/dp/0201175894/ref=cm_sw_r_cp_api_jRmTzbVTFNSJG
5:27:05
godratio
no need to worrry about types for simple tings like this. which i like but lisp this is also not that bad just have to learn the lisp rules
5:27:43
beach
godratio: Common Lisp uses what I call "uniform reference semantics" which means that, semantically, every object is manipulated through a reference (or pointer) to it.
5:29:13
beach
godratio: NIL in Common Lisp can is used for three things: It can mean the Boolean value false, it can mean the empty list, and it can be a symbol.
5:32:56
jmercouris
then why does the page here: https://github.com/diogoalexandrefranco/cl-strings tell one to do use-package?
5:36:14
jmercouris
I guess too many opportunities for collision of just importing all of the symbols from a package, right?
5:38:21
jmercouris
godratio: I believe you have to specify what you are returning from if you use return-from
5:40:12
godratio
hmm yes but the documentation says default is nil and that if your are in a defun block the first argument of the block name
5:40:48
aeth
godratio: If you're just trying to return something from a defun, you don't need return. It will return the last line's final result.
5:41:01
beach
godratio: You typically don't need RETURN in Common Lisp. The value of the last form is returned by a function.
5:43:40
aeth
CL has a real type system, rather than a type system where everything's ruined by the presence of null like far too many languages.
5:43:42
godratio
well i looping through a list and passing in the current element of the list and then checking if its alpha numberic so anything can get passed in so ilike the idea to check if its char type. and if not return nil
5:44:26
godratio
aeth: Sounds good I have not elipsed my mentaltity to grasp the signifgance of that yet
5:44:30
jmercouris
I still don't understand, how do I use a system i've installed via quicklisp, how can I know what the package is named?
5:51:27
godratio
beach: Thanks yes I could get rid of that return now and just give back true or false in that IsWhiteSpace function now
5:53:38
godratio
not too shabby in this case compared to c and it does actually check if its a really char which means you can pass anything to it and will return false correctly compared to the equilavent c function which wouldnt know about the type
5:54:33
godratio
ok ok i hear you i will adjust i am very pragmatica person. I want to use CamelCase for function names and this_notation for data types
5:56:47
aeth
hyphens don't work in most langauges because lazy programmers want to do "1+1" instead of "1 + 1" or "(+ 1 1)" or "1 1 +"
5:57:34
aeth
Most languages can't tell if foo-bar is foo - bar or the symbol foo-bar. It's not ambiguous in Lisp
5:57:53
godratio
yes I like the polis notation style and its easier to as I have noticed it seems easir to apply say some functionality across a range of operands much simpler in lisp than in c like languages