<aeth>
How do people generally structure their conditions? Would it make sense to have them in one central file to simplify the flow of things in case they're later needed elsewhere, or do people generally put them in the file that they are designed for, if they're only currently used in one place?
saravia has joined #lisp
pierpal has joined #lisp
vms14 has quit [Quit: WeeChat 2.3]
pierpal has quit [Ping timeout: 245 seconds]
<splittist>
aeth: one possible benefit of putting them all in the same file is that you can abstract common functionality into 'internal' functions. Of course, source files are either an awful mechanism, or irrelevant in the face of M-. and friends, depending on my mood (:
Bike has quit [Ping timeout: 258 seconds]
Bike has joined #lisp
Oladon has joined #lisp
t58 has quit [Quit: Night]
gum3n has joined #lisp
gum3n has quit [Remote host closed the connection]
saravia has quit [Remote host closed the connection]
igemnace has quit [Ping timeout: 246 seconds]
Volt_ has quit [Quit: exit();]
varjag has joined #lisp
igemnace has joined #lisp
gbiesiad has joined #lisp
defunkydrummer has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Read error: No route to host]
Kundry_Wag has joined #lisp
Arcaelyx has quit [Ping timeout: 245 seconds]
<pjb>
aeth: conditions are classes (and with multiple-inheritance too) and you will have whole hierarchies of conditions just like you have hierarchies of normal classes. You would organize them the same way.
<pjb>
aeth: in CL, you're free to organize things as you wish, you're not constrained by equivalences such as class = namespace etc.
gbiesiad has quit [Quit: gbiesiad]
torbo has joined #lisp
pankajgodbole has quit [Ping timeout: 246 seconds]
<defunkydrummer>
pjb: i think conditions aren't classes. Or in any case, their slots aren't easily accesible.There was something on the clhs
<defunkydrummer>
there it is, the condition system predates CLOS. on some implementations probably conditions are classes, but dunno which does and which doesn't
khisanth_ has quit [Ping timeout: 268 seconds]
<defunkydrummer>
on sbcl i wanted to access slots of a conditon and i couldn't, despite appearing as a class from the point of view of slime, with slots
<defunkydrummer>
but those slots weren't accesible unless i used the mop. "Direct-slots" of the condition class were nil.
<pjb>
defunkydrummer: you can define accessors for condition slots, just like any slot in CLOS classes.
<defunkydrummer>
probably. in this case the class was defined by a lib, and you couldn't access the slots using slot-value, etc.
<pjb>
Using with-slots or slot-value is not a good idea anyways, because slot-value accesses the slot directly, without the mediation of the accessor methods that could be overriden for subclasses.
<defunkydrummer>
it baffled.me
<defunkydrummer>
pjb: agree
orivej has quit [Ping timeout: 258 seconds]
cyberoctopi has quit [Ping timeout: 246 seconds]
macdavid313 has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
khisanth_ has joined #lisp
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 246 seconds]
pierpal has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
pierpal has quit [Ping timeout: 258 seconds]
nightwater has quit [Ping timeout: 255 seconds]
cyberoctopi has joined #lisp
Aruseus has joined #lisp
krwq has joined #lisp
defunkydrummer has quit [Ping timeout: 258 seconds]
Oladon has quit [Ping timeout: 255 seconds]
mcdonji has quit [Remote host closed the connection]
<krwq>
hey, i got around 2M strings which have assigned id - is there some library which would allow me to lookup quickly? when I've tried hash-table it exhausted heap
<krwq>
strings are urls and prefixes are reasonably similar - perhaps some prefix tree or something?
gbiesiad has joined #lisp
neeasade has joined #lisp
<neeasade>
hi again all. I'm using a lib with some cffi and when I load it in quicklisp, I get a failure building grovel types? https://pastebin.com/raw/u6vNT0y5
<neeasade>
ah, libffi was not in my ld search path.
<neeasade>
just nixos things
<beach>
Good morning everyone!
<beach>
krwq: Is this SBCL? Increase the size of the heap.
<krwq>
beach: I've (setq inferior-lisp-program "sbcl") (setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "4096")))) - but (sb-ext:dynamic-space-size) still shows 1GB, am I doing something wrong?
<beach>
krwq: How about "sbcl --dynamic-space-size ..." rather than 2 strings.
<beach>
krwq: I use that with size 10000 and it seems to work.
<krwq>
pjb: will try ccl if can't get it to work with sbcl (although expecting couple of things to break since I've never tried it before)
<krwq>
beach: just inferior-lisp-program or in slime-lisp-implementations?
<beach>
inferior-lisp-program
<krwq>
works, thanks beach, will check if the hash-table works this time
<beach>
Great!
<krwq>
beach: everything works now :)
<beach>
Congratulations.
<White_Flame>
How can I have quicklisp show compile-time warnings when loading a local-project?
<White_Flame>
(or just enable it globally I guess)
<White_Flame>
just got finished debugging a nasty compilation order bug, where first-time load would have shown compilation warnings
<beach>
I just use ASDF directly for my own projects.
<aeth>
White_Flame: I use this: (ql:quickload :uiop) (ql:quickload :some-project :verbose t)
<aeth>
It's verbose for *every* project so if there's something that's really noisy (like UIOP) you have to manually load it first, not verbose, just to silence it
<aeth>
(UIOP gives a lot of redefinition warnings because of its with-upgradeability and similar macros)
<krwq>
hash-table in sbcl is not thread safe, right?
Aruseus has quit [Remote host closed the connection]
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
<White_Flame>
aeth: cool, I'll give it a whorl
elderK has quit [Quit: Connection closed for inactivity]
macdavid313 has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<pjb>
White_Flame: loading a project is not compiling it. It cannot provide compile-time warnings, because it doesn't save them!
<White_Flame>
um, QL "loads" via ASDF, which does compile it
<White_Flame>
into fasls
<pjb>
White_Flame: if you want to compile the project, then note that ql:quickload does not have a :force-compile option. I usually just rm -rf ~/.cache/common-lisp …
<pjb>
White_Flame: I would find it a nice feature, if indeed, ql did save the compilation error and warnings, and produced them each time the system is loaded…
<pjb>
White_Flame: nope.
<pjb>
White_Flame: it compiles only if it has not already been compiled.
<White_Flame>
right, and as you develop it recompiles
<pjb>
Only what needs to be recompiled!
<White_Flame>
I guess the proper solution is for QL to distinguish "I am using this as a library" vs "I am developing this" roles under local-projects
<pjb>
Well, just don't use quicklisp.
<White_Flame>
or maybe an indicator in an .asd for "debug mode" that doesn't muffle the output
<pjb>
(asdf:oos 'asdf:compile-op <your-system>)
<pjb>
White_Flame: you don't understand. It doesn't muffle anything. It doesn't compile at all!
<pjb>
It just loads the fasl that have been cached!
<White_Flame>
well, probably "developer mode", not debug
<White_Flame>
pjb: I guess your development cycle is not mine, if you never have compiles invoked by ql
<pjb>
I have. The first time.
<White_Flame>
but not after any edit, apparenlty
<pjb>
Or you need to modify a root file in your dependency graph. But most system have rather flat dependency graphs.
<pjb>
The point of the asdf dependency graph is to make sure you compile only ONE file after you modify it.
<pjb>
Or perhaps a few other, but certainly not the whole system.
<pjb>
(depending on the DEPENDENCIES).
jruchti has quit [Ping timeout: 252 seconds]
gbiesiad has quit [Quit: gbiesiad]
lavaflow_ has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
macdavid313 has joined #lisp
<aeth>
pjb: For recompiling, it's easier/faster just to modify a "base" file that everything else depends on (obviously it will depend on the structure of the project in question), triggering a full recompilation of the project in question (though probably not its dependencies)
<aeth>
for me, that's usually utils
<pjb>
Easier, I don't know. But you could write a lisp function to search all the root files of an asdf system and do that. Call it (recompile-system :foo)…
nanoz has joined #lisp
macdavid313 has quit [Ping timeout: 245 seconds]
macdavid313 has joined #lisp
<aeth>
I guess I structure things very differently, which is why I probably will wind up having a core/conditions.lisp just like I have a core/constants.lisp and a core/settings.lisp and you can probably even count utils/utils.lisp (and the other utils)
macdavid313 has quit [Client Quit]
dddddd has quit [Remote host closed the connection]
v88m has quit [Read error: Connection reset by peer]
macdavid313 has joined #lisp
v88m has joined #lisp
pankajgodbole has joined #lisp
pankajgodbole has left #lisp [#lisp]
Arcaelyx has joined #lisp
cyberoctopi has quit [Ping timeout: 246 seconds]
cyberoctopi has joined #lisp
Oladon has joined #lisp
_whitelogger has joined #lisp
SaganMan has joined #lisp
macdavid313 has quit [Quit: macdavid313]
_whitelogger has joined #lisp
Arcaelyx has quit [Ping timeout: 246 seconds]
_whitelogger has joined #lisp
_whitelogger has joined #lisp
krwq has quit [Remote host closed the connection]
ricekrispie2 has joined #lisp
torbo has quit [Remote host closed the connection]
ricekrispie has quit [Ping timeout: 245 seconds]
kajo has quit [Ping timeout: 258 seconds]
kajo has joined #lisp
makomo has joined #lisp
defunkydrummer has joined #lisp
<jackdaniel>
drmeister: unused functions are garbage collected
<jackdaniel>
that includes functions compiled with C compiler
pankajgodbole has joined #lisp
shka_ has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
TheWild has joined #lisp
_whitelogger has joined #lisp
Lord_of_Life has joined #lisp
defunkydrummer has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
Posterdati has quit [Remote host closed the connection]
ricekrispie has joined #lisp
ricekrispie2 has quit [Ping timeout: 244 seconds]
fanta1 has quit [Quit: fanta1]
cyberoctopi has quit [Quit: WeeChat 1.9]
<flip214>
White_Flame: you can always just touch the .asd file, this causes recompilation - and will give you all the warnings anew
v88m has quit [Ping timeout: 244 seconds]
catchme has joined #lisp
<White_Flame>
flip214: the main thing was what :verbose t gave me, not actually triggering the recompile
Posterdati has joined #lisp
orivej has joined #lisp
deng_cn has joined #lisp
fanta1 has joined #lisp
varjag has joined #lisp
moldybits has joined #lisp
TheWild has quit [Ping timeout: 245 seconds]
zotan has joined #lisp
dale has quit [Quit: dale]
v88m has joined #lisp
v88m has quit [Read error: Connection reset by peer]
milanj has joined #lisp
v88m has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
McParen has joined #lisp
McParen has quit [Client Quit]
McParen has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
v88m has quit [Quit: Quit]
v88m has joined #lisp
ricekrispie2 has joined #lisp
lumm has joined #lisp
ricekrispie has quit [Ping timeout: 244 seconds]
_whitelogger has joined #lisp
TheWild has joined #lisp
orivej has joined #lisp
lnostdal has joined #lisp
Zaab1t has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
orivej has joined #lisp
fivo has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
orivej has quit [Ping timeout: 258 seconds]
izh_ has joined #lisp
cosimone has joined #lisp
Achylles has joined #lisp
cosimone has quit [Client Quit]
p9fn has quit [Ping timeout: 268 seconds]
catchme has quit [Quit: Connection closed for inactivity]
lnostdal has quit [Remote host closed the connection]
izh_ has quit [Quit: Leaving.]
izh_ has joined #lisp
<TheWild>
#' just gives a reference to function/macro instead of executing it or using as variable. Can the #' itself be referenced?
<Xach>
TheWild: it is reader syntax. #'... expands into (FUNCTION ...)
<TheWild>
ahh, therefore #'function
<TheWild>
meh, that doesn't work. 'function' is likely a bare fundamental
<phoe>
"special operators" are something you could call "bare fundamentals"
<phoe>
they behave like macros, as in, they don't necessarily evaluate their arguments
<phoe>
but they don't expand into code like macros - in a way, they are the implementation's primitives
<phoe>
(it is permitted for an implementation to define a special operator as a macro, but it's not common to see an implementation that does this - I am not even aware of one)
izh_ has joined #lisp
hugotty has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
<TheWild>
okay, I learned how to make a list without evaluating it: '(+ 1 2)
<TheWild>
and how to evaluate part of the list: `(+ 1 ,(+ 2 3))
<makomo>
phoe: i think HANDLER-BIND is one example in some implementations
<TheWild>
also, how to evaluate a list: (eval '(+ 1 2))
<makomo>
but iirc it just expands into a non-standard special operator %HANDLER-BIND or something
<makomo>
i'm not 100% though
<TheWild>
now there comes a question: how to put comma so it's inside a list?
<Inline>
?
<no-defun-allowed>
'(#,)
<makomo>
TheWild: every comma has to have its matching backquote. you can't have a "lonely comma". further, the backquote is just a reader macro that expands into an *implementation-defined* form which upon evaluation constructs the list according to the template
<makomo>
Bike's (list '+ 1 (+ 2 3) evaluates to the same thing that `(+ 1 ,(+ 2 3)) evaluates to
random-nick has joined #lisp
<Bike>
yes. the ` syntax can be a bit confusing if you're just starting out, though.
<Bike>
also later.
<makomo>
indeed
<makomo>
the backquote syntax is just a shorthand for "list-building expressions"
<makomo>
evaluating the "backquote form" gives you a list, built according to your template
<makomo>
since the backquote syntax (reader macro) just stands for (expands to) some implementation-defined form, it is a Lisp form like any other, and can be quoted
izh_ has quit [Quit: Using Circe, the loveliest of all IRC clients]
<phoe>
do you really want to construct symbols from strings instead of using literal symbols
<Xach>
it is fun!
<phoe>
but yes, evaluating the above will give you 25
<phoe>
Xach: well, certainly it is
<phoe>
I also thought for a moment that I am reading code from the 1960s
<Xach>
the 60s were fun for lisp!
<phoe>
touché
miatomi has joined #lisp
<TheWild>
ah, (QUOTE LET) serves too
<phoe>
yes, that's the way it was originally used
<phoe>
before the reader macro on ' became a thing
specbot has quit [Ping timeout: 258 seconds]
<phoe>
quote is the most basic Lisp operator ever if you ever want to use raw literal data in Lisp
<phoe>
because all of the above is equivalent to (QUOTE (LET ((X 5)) (* X X)))
ggole has joined #lisp
minion has quit [Ping timeout: 245 seconds]
<TheWild>
hah
<TheWild>
I keep forgetting that when a list is quoted like here: '(((1 2) (3 4)) ((5 6) (7 8))) all the sublists are automaticallly quoted too
random-nick has quit [Read error: Connection reset by peer]
random-nick has joined #lisp
<_death>
QUOTE just returns its operand unevaluated
TheWild has left #lisp [#lisp]
TheWild has joined #lisp
deng_cn has quit [Ping timeout: 246 seconds]
flazh has quit [Quit: flazh]
rippa has joined #lisp
sakalli has joined #lisp
deng_cn has joined #lisp
nirved_ has joined #lisp
miatomi has quit [Ping timeout: 258 seconds]
<pjb>
TheWild: the thing is that lisp syntax is not lisp. backquote and comma, but also parentheses, spaces, double-quotes, etc, are not lisp things.
<pjb>
TheWild: for example, (first '(a b c)) #| --> a |# shows that there's no parenthesis here!
<pjb>
TheWild: similarly, backquotes and comma don't exist in lisp. They're characters that are used by the lisp reader to build a lisp sexp, ie. a tree of conscells and atoms.
<pjb>
TheWild: the characters are in the source text; the conses and atoms are in lisp, they're lisp objects. The readers creates the lisp objects from the characters.
nirved has quit [Ping timeout: 258 seconds]
miatomi has joined #lisp
<pjb>
TheWild: now, this may be a little confusing, because some reader macro and translated to some specific lisp expressions. For example 'x is read as (CL:QUOTE x) #'x is read as (CL:FUNCTION x) But ' is not CL:QUOTE. ' is actually the character #\' in the source text; CL:QUOTE is a symbol in the lisp image.
flazh has joined #lisp
TeMPOraL has joined #lisp
nirved has joined #lisp
<pjb>
TheWild: you cannot have a comma alone in the source text, because it will signal an error when read outside of the context of a backquote.
<pjb>
TheWild: You could override the reader macro for the comma, and make it read as something.
<pjb>
TheWild: or you can read a comma character #\, a comma string ",", or a symbol named ",": \, or |,|.
nirved_ has quit [Ping timeout: 258 seconds]
<TeMPOraL>
a question: is there a portable-ish CL way to ensure an array of data has items contiguously in memory (as opposed to getting an array of pointers to objects)?
<TeMPOraL>
i.e. I'm looking for CL equivalent of C: struct foobar { some stuff }; foobar array[123];
<Xach>
TeMPOraL: i don't think anything is specified about memory layout of arrays in that way
<TeMPOraL>
Xach: a portability layer over specific implementations (SBCL and CCL) would work too; I wonder if anything like this exists
<TeMPOraL>
I see that in SBCL one could abuse the "alien" interface to do that, but I worry that bookkeeping will kill performance gains if I wanted processing of the data to happen on Lisp side
<p_l>
TeMPOraL: you might need to implement Symbolics CL extensions to defstruct for that
<p_l>
(and modify the array code)
Arcaelyx has joined #lisp
<_death>
if the items are octets/words/floats, it's possible that a specialized simple-array would work
random-nick has quit [Read error: Connection reset by peer]
<TheWild>
this one is interesting:
<TheWild>
(let ((x "Works!")) x)) ; works
<TheWild>
(let ((x "Works!")) (eval 'x)) ; doesn't work - eval doesn't know about variable x
<beach>
TheWild: Common Lisp was designed so that it could be compiled to fast native code, unlike some modern so called "scripting languages" designed by people who don't have a clue about language design or compilation techniques.
<loke`>
"special" bindings must be the worst name for a concept in lisp. ever.
<beach>
TheWild: If EVAL could make use of lexical variables that way, there would be very little a compiler could do to optimize the code.
elderK has joined #lisp
SpikeMaster has joined #lisp
nanoz has joined #lisp
q3d has joined #lisp
catchme has quit [Quit: Connection closed for inactivity]
atgreen has joined #lisp
catchme has joined #lisp
nowhere_man has joined #lisp
flazh has quit [Quit: flazh]
lumm_ has joined #lisp
<TheWild>
'(1 2) this is a list
<TheWild>
''(1 2) this is not a list (this becomes a list when eval'd). How do we call it?
<beach>
TheWild: See my advice in #clschool.
<beach>
TheWild: You need to be careful with the word "is".
<beach>
TheWild: At the lowest level, they are sequences of characters.
<beach>
TheWild: When processed by READ, these things turn into lists.
<TheWild>
(length ''(1 (+ 2 3)))
<TheWild>
2
<TheWild>
haha, got it. Thanks
<beach>
Please pay attention.
<beach>
TheWild: The first list returned by READ is (quote (1 2)).
lumm has quit [Ping timeout: 276 seconds]
lumm_ is now known as lumm
<beach>
The second is (quote (quote (1 2))).
<beach>
TheWild: Now, when evaluated, the first one evaluates to the list (1 2).
<beach>
TheWild: And the second one evaluates to (quote (1 2)).
<beach>
TheWild: So "is" is ambiguous. Do you mean "as typed" "as read", or "as evaluated after being read".
<beach>
You need to be clear about that.
<TheWild>
now I see. I have to read about those phases.
<Nilby>
but beware looking behind the curtain: (write '`(x ,x) :pretty nil)
igemnace has joined #lisp
<TeMPOraL>
p_l: I figure that, knowing the expected lengths of arrays of structs, I could make my own "defstruct" and "with-slots" equivalents that paper over the whole thing being expanded into a set of arrays, one per each structure slot...
fanta1 has quit [Quit: fanta1]
<TheWild>
discovered (describe ...). Now I don't have to ask what monster I just have spawned ;)
v88m has quit [Quit: Quit]
v88m has joined #lisp
nowhere_man has quit [Ping timeout: 250 seconds]
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
<TheWild>
beach, so tell me if I'm wrong. READ traverses the whole tree and evaluates the nodes, unless it hits the QUOTE - if so, strips QUOTE but leaves all subnodes untouched.
nowhere_man has joined #lisp
<beach>
You are wrong.
<beach>
READ takes a sequence of characters and returns an expression.
q3d has quit [Quit: Page closed]
<beach>
Noting is evaluated.
<beach>
Nothing.
<TheWild>
ah, READ converts character into S-expression. Okay.
<ludston>
(expression, not s-expression)
rozenglass has joined #lisp
<pjb>
Well, unless #. or a similar reader macro is used, of course.
<beach>
*sigh*.
<ludston>
I would argue that a reader-macro is not part of evaluation?
<beach>
TheWild: When READ sees '<mumble>, it returns the list (quote <mumble>).
<pjb>
It's important to know it. For example #P calls PATHNAME at read-time, but #' doesn't call FUNCTION at read-time.
<beach>
pjb: It is NOT important for TheWild to know at this point in the learning phase.
<pjb>
ok
X-Scale has quit [Ping timeout: 246 seconds]
trebor_home has joined #lisp
sjl has joined #lisp
<beach>
It is impossible to teach someone Common Lisp if the requirement is that the person must know everything from the start. For example, you can say "unless #. is used", but then you have to say that #. can be redefined as well, and you have to tell the person about readtables as well.
<ludston>
Looks like common-lisp.net is down.
<beach>
And of course, '<mumble> only return (quote <mumble>) when ' has not been redefined, and <mumble> does not contain any spaces, etc, etc, etc. It never stops.
vms14 has joined #lisp
<ludston>
Does anyone have a suggestion on which graph library to use? I think I must have used 4 or 5 of the different libs from quicklisp. Most seem optimised for space (in that they store edges and vertices in lists) rather than speed.
<vms14>
ludston: graphic library or library for make graphs?
<ludston>
vms14: The latter
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
<vms14>
In the land of lisp book they show how to use graphviz and lisp only creates the files graphviz needs
<beach>
ludston: "graph" is one of the toughest data structures around, because the representation will vary a lot according to the operations you need.
<vms14>
maybe graphviz it's fine for what you want and you could let lisp create the file and execute that program
<ludston>
Generally when I am using graphs it is for some dynamic programming problem, and I'm looking for O(1) on "does this edge exist"
<vms14>
oh lol, it's not for graph representation
<vms14>
xD
<vms14>
nvm then
<ludston>
Hehe ty anyway
* loke`
is back at working on the Climaxima maths rendering
<loke`>
I think I've made my custom output records sufficiently clever now
<beach>
loke`: Great! Where have you been?
<vms14>
I've decided to learn emacs and forget vi
<vms14>
the pragmatic programmer book told me to use emacs indirectly xD
<vms14>
very nice book, I recommend it to every guy who wants to be a programmer
Arcaelyx has quit [Ping timeout: 245 seconds]
TheWild has quit [Quit: TheWild]
<vms14>
It tells things that make me understand why lisp gives you that "enlightenment" everyone hears lisp will give you
TheWild has joined #lisp
<ludston>
vms14: Use evil mode and have both. Vim is worth the investment imho, because you can get a vim mode plugin in pretty much any IDE worth using and therefor avoid re-learning shortcuts.
<vms14>
I like vi, but that book tells you what you should expect from a text editor
<vms14>
and is like it's saying "use emacs"
<vms14>
I really trust this book, so I'll forget vi and go for emacs, I didn't want to learn emacs, because it requires time
<vms14>
but I knew if you learn it's worth
<vms14>
and there is no limit with emacs since it's lisp who gives that extensibility
<vms14>
no other editor in the world could have that feature
<vms14>
yeah I know, there is the evil mode
<vms14>
tried to install it time ago and failed the undo-three dependency
<vms14>
tree*
<vms14>
but nvm, I'll learn the keys of emacs
X-Scale has joined #lisp
<loke`>
beach: I have been around
<loke`>
just working
<loke`>
and not having much ispiration
<beach>
loke`: Ah, that sucks (both working and not having inspiration).
<beach>
loke`: But I know the feeling.
<loke`>
The horrific parenthesis rendering in climaxima annoyed me greatly but the thought of fixing it just took all my inspiration away. It's kinda like design work, and I hate design work :-)
<TheWild>
beach: some time ago I said "I choose Lisp because it seems to be the most easily parseable higher-than-assembly programming language if one had to write parser entirely from scratch, but seems that I will likely end up with my own dialect.", so really what I want to do is to know the inner workings of Lisp, what decisions were made and why and by chance learn some Lisp.
<beach>
loke`: Again, I fully understand.
<beach>
TheWild: I see.
<beach>
TheWild: Oh, you are the one who wants a scripting language?
<TheWild>
yes
<beach>
I would use ECL if you absolutely have to do that.
<loke`>
Anyway, I finally decided to add some capabilities to the output records so that they can carry rendering hints (something along the lines of: "this part here should not be considered part of the bounding rectangle when computing the size of surrounding parenthesis
<beach>
TheWild: But if you are programming from scratch, there is no particular reason to use a static programming language at all.
<beach>
loke`: Seems like a workable solution.
<loke`>
beach: Yeah, it works. The dimensions still don't come out right, but that's a matter of tuning the dimensions :-)
SpikeMaster has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
<beach>
TheWild: I take it you intend to ignore this advice, which is your right, of course.
<beach>
TheWild: Perhaps you just like to design programming languages.
<beach>
TheWild: And that is fine too. Just beware that it is a very very tough task.
<TheWild>
a couple of year ago I wanted to write assembler for ARM processors which could offer a bunch of higher level constructs. I didn't have experience in compiler design though so I eventually gave up. Bah, I still don't have an experience, but writing a parser and evaluator for limited dialect of Lisp seems a good attempt to build something that works.
<loke`>
TheWild: you might want to look at PDP-10 assembly
<loke`>
it has some seriously neat features
<p_l>
instruction-level, or MIDAS and MACRO-10 assemblers?
<p_l>
also of note is that MACRO line of assemblers were continued till at least Alpha
<p_l>
(with VAX-oriented MACRO-32 turned into a compiler that generated Alpha code from VAX assembly)
<TheWild>
wait, wasn't it the time where one had to load the boot-loader *by hand*?
<vms14>
I would recommend common lisp (mostly sbcl) since it has support for more things, like backend with hunchentoot
Achylles has quit [Ping timeout: 258 seconds]
<beach>
TheWild: I wish you good luck with your task.
<loke`>
p_l: MIDAS, I think
<vms14>
but for what you aim, maybe scheme is nice
<vms14>
also there is racket which has some sort of metaprogramming stuff
liambrown has joined #lisp
<p_l>
TheWild: well, KA-10 and KI-10 as well as PDP-6 I think all required writing the early bootstrap code into memory by hand, but that was in limited cases AFAIK
<beach>
vms14: What do you recommend it for? A scripting language as TheWild wants?
<p_l>
TheWild: the code was essentially few instructions that would loop over reading from paper tape
<vms14>
beach: to have a general purpose language, for scripting scheme is a better option
<vms14>
and scheme+cffi seems nice
<vms14>
It's likely that you'll end writing more stuff with lisp that what you intended when you "entered" to the lisp world
Oladon has quit [Read error: Connection reset by peer]
<p_l>
loke`: MIDAS is interesting too
<beach>
vms14: I think TheWild has decided that it is fun to design a programming language. This is my conclusion because no advice about existing languages or other techniques seem to get across.
<loke`>
time to go to sleep
Oladon has joined #lisp
<beach>
'night loke`.
<vms14>
see you loke`
<p_l>
loke`: though I will have to hunt down how exactly certain people made it so that programs built with early MIDAS worked while MACRO-1 didn't
<p_l>
loke`: 'night
<vms14>
and for writing a language there is a difference between scheme and common lisp?
<vms14>
I guess it depends on the features of that language
<vms14>
but with scheme you'll need cffi sooner or later I think
<vms14>
I cannot say that really, but I guess if I use scheme would be as an embedded language rather than a standalone
<vms14>
and C + scheme sounds interesting
liambrown[m]1 has joined #lisp
<beach>
It sounds like a nightmare to me.
cosimone has quit [Quit: WeeChat 2.3]
<jackdaniel>
fwiw guile is an official gnu extension language
<vms14>
beach: why beach?
<vms14>
the C part? or mix c and scheme?
<vms14>
would be better just use scheme+ffi than c+scheme?
<beach>
I advocate using only Common Lisp.
<vms14>
right
<neeasade>
hi all -- what is the mechanism by which asdf finds ffi .so files? -- I ask because i'm on nixos where a dynamic ld wrapper gets set that just adds many rpath params and I'm trying to connect some things in a non-nix way probably.
lnostdal has joined #lisp
<jackdaniel>
cffi looks at the standard locations, I don't know anything about asdf looking for so files (nor having anything to do with ffi)
<liambrown[m]1>
Sorry if this question comes across as noise. I've just started picking up LISP to work better with Emacs, and I've realized I probably want to do a lot more with it than that. Question is this: Node has NPM, PHP has Composer, Python has Pip, etc.; do equivalent facilities exist for LISP where I can write a program with dependencies and have them imported? From my searches since yesterday, it looks like Quicklisp might
<liambrown[m]1>
fit the bill, but I don't know.
<jackdaniel>
liambrown[m]1: common lisp has quicklisp
<jackdaniel>
check out quicklisp.org
<vms14>
liambrown[m]1: quicklisp
<jackdaniel>
also, if you are interested in learning the language, then
<jackdaniel>
minion not here?
<jackdaniel>
check out "practical common lisp" (available to read online)
terpri has joined #lisp
<jackdaniel>
and "paradigms of artificial intelligence programming" (likewise)
<neeasade>
jackdaniel: thanks -- I think I was thinking asd gets in the mix because the reference is coming from the 'components' part of a definition -- https://github.com/swaywm/cl-wlroots/blob/master/cl-wlroots.asd#L21 -- so the issue is the .so can't be found while building that component
catchme has quit [Quit: Connection closed for inactivity]
<jackdaniel>
ok, this definition is using cffi-groveller extension for asdf
<liambrown[m]1>
I just read that LISP is used for AI, as well as a lot of other things. Not the silly little scripting language I've been led to believe it was, I guess.
<jackdaniel>
I don't know much about it, but I'd guess it also looks exactly where cffi does look
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<jackdaniel>
liambrown[m]1: LISP is an ancestor of Common Lisp
<neeasade>
jackdaniel: kk, thank
<jackdaniel>
I don't think anyone uses LISP in 2019
<jackdaniel>
Common Lisp is a general purpose programming language
<jackdaniel>
sure, you may use it for AI if you want
<liambrown[m]1>
@jackdaniel sorry, I'm conflating names. I take it CL is a good place to start for professional use?
cyberoctopi has quit [Ping timeout: 255 seconds]
<beach>
liambrown[m]1: Yes, very good.
<jackdaniel>
yes, Common Lisp is a result of standarization of various dialects being LISP descendants
<vms14>
liambrown[m]1: lisp is strongly related with ai since its creator was an ai teacher
<p_l>
it's quite powerful, if forgotten language
<p_l>
vms14: more like the creator of Lisp created the term AI :)
<pjb>
Loading the boot code by hand made for computers you could trust. Nowadays, you don't know what code boots your computers!
<jackdaniel>
liambrown[m]1: I'd start from "Practical Common Lisp"
<vms14>
one of their students was reading a paper from his teacher and thought he could write the eval function in asm
<jackdaniel>
it gives a nice overview of language features
<liambrown[m]1>
That'll be my next read.
<jackdaniel>
then, for ones delight, read PAIP, which is a profound lecture with case studies of Common Lisp code
<vms14>
the paper was trying to prove that lisp was turing complete
Zaab1t has quit [Quit: bye bye friends]
<p_l>
to be honest, a lot of very early foundational work in Computing Science can be divided into "numerical processing" and "AI" with growing side of "programming language theory"
<vms14>
and when that student created eval, the first lisp interpreter was born
<p_l>
and LISP counts as *very* early language
<liambrown[m]1>
It's an interesting experience, coming from years of JS, PHP, and Python. I decided to go back to extreme basics this time around; that's been a helpful approach for me before.
<vms14>
prolog is also strongly related with ai
<liambrown[m]1>
I messed with Prolog in college, but never got anywhere with it.
<vms14>
and this is why prolog and lisp have some relation, just because they're known to be used for ai
<p_l>
well, Lisp arguably makes it quite easy to write the kind of object oriented code common in symbolic AI
<beach>
liambrown[m]1: I think you will find that Common Lisp is an extremely powerful language, and that there are some excellent implementations out there, capable of generating fast native code.
<liambrown[m]1>
Some of the ML/AI folks harp on the importance of GPUs for app performance. Any good starting points for that in CL, or should I even worry about it?
<vms14>
the most recommended is sbcl
<p_l>
liambrown[m]1: don't worry about GPUs unless you're into statistics or similar pure numerics
cyberoctopi has joined #lisp
<liambrown[m]1>
So if I just want to write my own classifiers, forget the GPU.
<p_l>
well, depends what you really want to make
<liambrown[m]1>
Right now I'm only interested in text analysis.
<beach>
liambrown[m]1: Common Lisp is not the language used by AI and such these days.
<p_l>
I'd say that MATLAB is easier options for writing classifiers
<p_l>
and with TensorFlow and the like you're mostly stringing together abstract commands in a pipeline
<p_l>
and the actual language matters less
Nilby has quit [Read error: Connection reset by peer]
<liambrown[m]1>
You guys have been helpful, thanks.
actuallybatman has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
izh_ has joined #lisp
<pjb>
beach: you don't mean "AI", you mean stockastic machine learning ;-) Hofstadter wouldn't call that AI…
v88m has quit [Ping timeout: 255 seconds]
<vms14>
our "ai" sucks atm
<vms14>
it's not able to learn
nanozz has joined #lisp
<vms14>
for me what we achieved it's not real ai
nanoz has quit [Ping timeout: 250 seconds]
<vms14>
unless a program is able to investigate and analize in order to create new knowledge
<vms14>
analyze
scymtym has quit [Ping timeout: 268 seconds]
bars0 has joined #lisp
<flip214>
Is there a function to convert a 2-dimensional array to 1-dimensional, like ROW-MAJOR-AREF then addresses it?
<flip214>
Or can I get a whole row from an array?
pankajgodbole has joined #lisp
nanozz has quit [Quit: Leaving]
test1600 has joined #lisp
<beach>
pjb: Fair enough.
rumbler31 has joined #lisp
<flip214>
when given a function like #'=, is there a way to get back to the symbol? (doesn't work for anonymous functions or closures, of course)
<flip214>
sb-kernel:%fun-name looks like a good guess
sciamano has joined #lisp
pankajgodbole has quit [Ping timeout: 258 seconds]
brundleticks has joined #lisp
<TheWild>
(setq x '(1)) ; yay, now it has little wider scope
<TheWild>
(push 2 x) ; (2 1)
<TheWild>
darn, what's the operation that adds to the end of list?
sciamano has quit [Quit: issued !quit command]
<TheWild>
(push 5 (cdr (last x)))
<TheWild>
(push x (cdr (last x)))
<TheWild>
*** - Lisp stack overflow. RESET
<flip214>
TheWild: '(1) potentially gives you an immutable list - it could be stored in ROM, for example. So changing the CDR of that CONS is not allowed.
<flip214>
(SETQ x (list 1)) gives you what you want.
v88m has joined #lisp
v88m has quit [Read error: Connection reset by peer]
<TheWild>
yeah, subtle difference but thanks for noting it