deng_cn has quit [Read error: Connection reset by peer]
<johnnymacs>
So you can say (defun make-object () (make-hash-table))
deng_cn has joined #lisp
<johnnymacs>
and (defun . (x y) (gethash x y))
<Bike>
you have to escape the dot, since it means something for lisp syntax
<Bike>
but otherwise s ure
Louge has joined #lisp
<johnnymacs>
does lisp have something like vocabularies in forth?
<johnnymacs>
It basically lets you have multiple namespaces so you can re-use symbol names for shorter code
<jasom>
johnnymacs: they are called packages
somewun has quit [Remote host closed the connection]
failproofshark has quit [Ping timeout: 264 seconds]
<jasom>
johnnymacs: variable and function names are actually not strings in lisp, but rather symbols. You can create a unique symbol with a given name in any package, you can import symbols from one package to another, and you can even create symbols that are not in any package at all.
<jasom>
The last one is useful for writing macros; you can create brand new symbols with readable names that are guaranteed to not be used anywhere else in the code.
<fouric>
Does anyone know of a Common Lisp project in a GitLab repository with successfully running CI that I might be able to take a look at?
<jasom>
johnnymacs: all of the symbols defined in the common lisp standard are in the "COMMON-LISP" package, which has an alias of "CL" so e.g. "cl:print" will always refer to the standard print, while "print" will refer to whatever symbol is named print in the current package.
zacts has quit [Quit: WeeChat 1.9.1]
damke has joined #lisp
comborico1611 has quit [Quit: Konversation terminated!]
mareskeg has quit [Ping timeout: 256 seconds]
oxo1o1o1o has joined #lisp
<johnnymacs>
fouric: CI?
Naergon has joined #lisp
<Bike>
continuous integration testing.
tempestnox has joined #lisp
tomsen has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
EvW1 has joined #lisp
mishoo_ has quit [Ping timeout: 248 seconds]
<fouric>
Yes.
<fouric>
...and, while I technically have CI set up, roswell appears to be segfaulting.
<fouric>
...which I assume is not normally supposed to happen
<johnnymacs>
that link does not contain the answer to my question unfortunately
<Bike>
uh, it kinda does.
<Bike>
what did you have in mind?
<johnnymacs>
I think what you are trying to say is that lisp handles the reference passing automatically
<Bike>
what i'm saying is the semantics of lisp involve no "references".
<johnnymacs>
Oh well you kind of sort of answered my question
<Bike>
it's not like C where you can have things and then you can have pointers to things, and so on.
<johnnymacs>
well you "can" you just wouldn't unless you were writing optimizations
<Bike>
no, you can't. there is no analogous concept.
<onion>
ohh
<johnnymacs>
so it is impossble to implement malloc in lisp?
<Bike>
you could make a struct or something that contains another object, i guess.
vtomole has joined #lisp
<onion>
well, the 'keys' of the hash table are implementation-specific arent they ?
<onion>
but one could convert dict/plist/alist/etc to such
<Bike>
standard lisp has no understanding of memory at all
<johnnymacs>
a key is just a series of bytes
<didi>
onion: What do you mean?
<Bike>
extensions could do it, if they want
<Bike>
keys of hash tables are objects
<didi>
A key just need to be comparable by eq/eql/equal/equalp.
<onion>
i think he is just looking for how to 'reference' an entry of a hash table ? why complicate?
<Bike>
because that doesn't mean anything
<Bike>
a hash table is a mapping of keys to values, obviously
<johnnymacs>
No I can use common lisp hash tables alreaqdy
<Bike>
you can pull out the keys and values as you like
<onion>
not in lisp world. he is in his world, however.
<Bike>
they're just objects
<johnnymacs>
I just didnt understand how pointers were obfuscated
<onion>
there arent any pointers , then ?
<Bike>
Okay, if you want implementation details, here's the thing. Common garbage collection strategies rule out the use of pointers by the programmer.
<fouric>
johnnymacs: what would the *purpose* of implementing malloc() in Common Lisp be?
<onion>
i would just tell him that every "variable" is a pointer
<Bike>
"copying" GCs move objects around in memory, which means pointers would stop working fast.
<johnnymacs>
fouric: I dunno man mayb ea foreign functions interface
<Bike>
no! not every variable is a pointer! there are no pointers!
<didi>
Hihi.
<onion>
well they arent the objects themselves, and i think that is what he is getting at =)
<onion>
ie not passing a "whole object structure" to functions as what we can do with C without pointers
<pillton>
Bike: What is the phrase beach uses?
<Bike>
trying to understand lisp as if it was C will just make it more confusing
<onion>
but just a reference to it (which is obfuscated that we dont have to worry about it)
<Bike>
beach useds a lot of phrases
<fouric>
johnnymacs: Yeah, but there's already an FFI (actually, several - to C, C++, Python, and maybe a few more), and none of them needed malloc() written - modern implementations provide ways to do that.
<Bike>
or they just use the system malloc
<Bike>
like, why not
<fouric>
"do that" being "interface with foreign code"
<Bike>
got an ffi already and all
<pillton>
beach says 'Common Lisp uses what I call "Uniform reference semantics"'. [02:30]
<onion>
=/
<Bike>
eh, i dunno about that
<Bike>
objects are objects
<Bike>
you pass objects to functions, which can modify the objects
Fare has joined #lisp
<onion>
terminology
<Bike>
it's really pretty simple until you start concerning yourself with pointers
<pillton>
But you have to understand what is meant by a variable being bound to an object.
<onion>
what was the original question
<Bike>
"What is the type system type of a reference to a hash table"
<johnnymacs>
Other people are getting confused about my support question when my question is already answered
<onion>
another day in the life of a lisper
<onion>
i would definately ask "whats a ref to a hshtbl" but we like to talk about lisp also, so =)
<didi>
Incidentally, an object can have multiple types.
<onion>
record scratch
<onion>
wait wait
<didi>
"In Common Lisp, a data type is a (possibly infinite) set of Lisp objects. Many Lisp objects belong to more than one such set, and so it doesn't always make sense to ask what is the type of an object; instead, one usually asks only whether an object belongs to a given type. The predicate typep may be used to ask whether an object belongs to a given type, and the function type-of returns a type to which a given object belongs. "
<onion>
ahh deftype ?
<onion>
how is that not like haskell typeclasses? or rust traits? or generics..? hmmmm
<Bike>
how is it like type classes?
<Bike>
a type class expresses an interface, right?
xrash has joined #lisp
<onion>
like java interface? objective-c protocol ? all pretty much the same thing
<Bike>
i mean lisp types don't express an interface
<onion>
where an "object" can fill in or belong to a class or set of traits
<Bike>
(member foo 17) is a type
fisxoj has joined #lisp
<onion>
hmm, type classes is like generics mostly, with some operator overloading stuff
<onion>
the variable foo is unbound
<Bike>
(typep 4 '(member foo 17))
<vtomole>
clhs object
<specbot>
Couldn't find anything for object.
safe has joined #lisp
<Bike>
clhs object/g
<specbot>
Couldn't find anything for object/g.
<Bike>
hum
<Bike>
well it's in the glossary
<onion>
Bike: nil ?
<Bike>
yeah 4 is not foo and it's not 17
<Bike>
so it's not of that type
<Bike>
obviously
<onion>
oh now i want to ask, what is a lisp "object" ? CLOS ?
<Bike>
anything
<Bike>
4 is an object
<onion>
are atoms objects? or when are atoms not objects or vice versa ?
<Bike>
atoms are objects
<Bike>
non atoms are objects
<Bike>
anything you can pass to a function is an object
<vtomole>
I thought only cons cells are objects. Well, you learn new things everyday.
Kevslinger has joined #lisp
<onion>
i felt that objects were instances of classes, at the least
<vtomole>
Oh wait. That actually makes a lot of sense.
<Bike>
everything is an instance of a class
<Bike>
(class-of 4) => #<BUILT-IN-CLASS INTEGER> or so
<vtomole>
Bike: objects are data?
<Bike>
don't overthink it
<onion>
hehe
<onion>
i read that objects were types but types werent objects. or somethign like this
<onion>
that is, hmm... not sure how to say it , but it was one-way
<onion>
oh it was about not being able to defmethod on a non-CLOS type
<Bike>
clos deals in classes, not types
<Bike>
classes are also types, but there are types that are not classes
<onion>
=/ hmmm
<onion>
how are there types that are not classes, if 'everything is an instance of a class' ??
<sjl>
The thing that helped me most with types was when I started thinking about them as sets of values.
EvW1 has quit [Ping timeout: 276 seconds]
<pillton>
onion: (typep 1 '(integer -10 -1))
<sjl>
E.g. the type designated by `(integer 1 10)` is the set of integers from 1 to 10. The type designated by `(or integer list)` is the set of all integers unioned with the set of all lists.
<rme>
Yes, a CL type is a set of objects. It is very useful to keep that in mind.
szmer has quit [Ping timeout: 264 seconds]
<sjl>
When you make a class, Lisp also helpfully defines a type for you with the name of the class, which means "the set of objects that are instances of this class (or a subclass of it)"
<sjl>
But it does muddy the waters if you're not used to thinking of types as sets of objects.
<Bike>
also conveniently explains why you can't specialize methods on types, because types don't have enough structure for ordering.
<didi>
Bike: Ah, nice.
<sjl>
Thinking of them as sets also makes subtypes and supertypes easier to understand. E.g. bit is a subtype of integer because the set {0 1} is a subset of the set of all integers.
<Zhivago>
Beyond which, as I finally realized, specializing on type is fundamentally wrong.
<sjl>
Right, how do you order the sets {0 1} and {1 2}? Which is "more specific"?
<onion>
sjl: yeah, i ve been mentioning deftype a few times this week. i didnt know CL had that !
<Bike>
sjl: not that cl function types have subtyping...
pagnol has quit [Ping timeout: 265 seconds]
<sjl>
Bike: I mean, they *have* it, the language just can't *tell* you they have it :)
didi has quit [Read error: Connection reset by peer]
<Bike>
the way function types are defined, they're not like other types in referring to a set of objects
<Bike>
so, you know. that's confusing
wigust has joined #lisp
<sjl>
(function (vector) integer) is a subtype of (function (string) number) because it accepts a superset of the arguments, and returns a subset of the results
<sjl>
Is (function (vector) integer) not "the set of all functions that accept a single argument, which is a vector, and return an integer result"?
<Bike>
no
<Bike>
a function type just says that calls to this thing have so and so types
<Bike>
like if foo is declared to be a (function (vector) integer), that's like rewriting (foo bar) as (the integer (foo (the vector bar)))
<sjl>
> list form of the function type-specifier can be used only for declaration and not for discrimination. Every element of this type is a function that accepts arguments of the types specified by the argj-types and returns values that are members of the types specified by value-type.
<Bike>
which means, say, that (except package restrictions) you could locally declare CAR to be of type (function (cons) t), even though (function (cons) t) is not a subtype of (function (list) t)
<Bike>
well, okay, it does phrase it in terms of set membership there
<Bike>
but the actual semantics don't involve set membership at all
<sjl>
CAR *is* a member of "the set of all functions that accept cons arguments and return t elements"
<sjl>
It also accepts things that aren't conses
<sjl>
well, one thing
oxo1o1o1o_ has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<sjl>
I think it hinges on whether you consider "accepts an argument of type X" to mean "accepts an argument of EXACTLY type X"
<Bike>
yeah.
<sjl>
Which, I don't think it does
<Zhivago>
Ah, not because of ordering, but because specializing on type gives you fundamentally incoherent semantics.
<Bike>
well, since you obviously can't actually use function types as a membership thing, it doesn't matter so much to me.
<onion>
..
<Bike>
one time i thought too hard about this and decided that lisp types mean at least three different things that are mildly incompatible, which is why it's confusing.
<Zhivago>
It means that your operation is really multiple operations with different semantics which are conflated.
<sjl>
sure, yeah, whether the computer can actually *figure this stuff out* is a different story, and unfortunately the answer is usually no
<onion>
two things would be enough
<onion>
=/
<Bike>
i don't mean the compiler. i mean you can't do (typep foo '(function ...)). i'm not even sure what that would mean.
<Zhivago>
In contrast, if your function takes a single type, and dispatches based on implementation (i.e., class) then it should have coherent semantics.
oxo1o1o1o has quit [Ping timeout: 276 seconds]
<sjl>
I said "computer", which should cover calling typep :)
<pillton>
Zhivago: Then you have issue with generic functions as well.
<Bike>
oops. i read "compiler".
<Zhivago>
Well, generic functions dispatch on class, which is good.
<pillton>
You are talking about semantics.
<Bike>
this entire channel has been talking about semantics for like an hour
<Zhivago>
They don't enforce coherent semantics, which is tricky.
<pillton>
The generic function name may return a symbol for a set of objects, or it could return a string for others.
<sjl>
(typep foo '(function (x) y)) would mean "is foo a function that accepts a single argument of type x, and returns a result of type y"
<pillton>
"name" sorry.
<Zhivago>
But they can be used well with a little discipline.
szmer has quit [Ping timeout: 248 seconds]
dented42 has joined #lisp
<pillton>
Why can't dispatching on type then?
<sjl>
Which probably no current lisp can reliably answer. But I don't think it's an unclear *question*.
<Bike>
well there's a question of what "accepts" means.
<sjl>
clhs accepts
<specbot>
Couldn't find anything for accepts.
<Zhivago>
You can certainly dispatch on type -- the problem is that if you're dispatching on type, you're doing bad things to semantics, so you probably shouldn't.
<sjl>
damn
<Bike>
welp pack it in out of ideas now
<Bike>
like you can have functions that do a few things and then later signal a type error
<sjl>
hm
<sjl>
> Every element of this type is a function that accepts arguments of the types specified by the argj-types and returns values that are members of the types specified by value-type.
szmer has joined #lisp
<sjl>
Wouldn't that mean that if it decided to signal an error, it wouldn't qualify?
<sjl>
Because if you signal an error you don't return a values that is a member of blah blah
<Bike>
well that just means it's returning a value of type nil, which
<Zhivago>
Probably mean 'non-local transfer' since signaling doesn't exit the function.
thermo has left #lisp [#lisp]
<onion>
may as well make a class in order to dispatch on a 'type' ?
<Zhivago>
In which case, you're not returning anything since you skipped the return bit.
<Zhivago>
onion: Why do you want to dispatch on a type?
<onion>
ppl been asking, just doing my part in the discussion
<Bike>
and yeah, you can have restartable errors and stuff
<Bike>
function types... are a social construct
<sjl>
Yeah, if you start thinking about conditions things get tricky
<Zhivago>
I don't think it does -- that's all just under non-local transfer.
<Zhivago>
Since it doesn't return, the return type doesn't apply.
<sjl>
But what is the type of OPEN?
<sjl>
For any given inputs, it can fail (e.g. if you don't have permission to open the file)
dieggsy has joined #lisp
<sjl>
You could just ignore any case that fails, and say "those don't contribute to the type". I suppose that's fairly reasonable.
<Zhivago>
It returns a stream or nil.
<Zhivago>
Or does not return.
<Zhivago>
The does not return obviously doesn't affect the return type.
<Bike>
the concern is the argument types, yeah? return type is doable
<sjl>
Right, "does not return" isn't really captured in the current CL function type. Maybe we need an extra parameter
<Bike>
usually that's what nil means
<sjl>
Well
<Bike>
cl:error is a (function junk nil) on sbcl
<sjl>
"might not return"
Kaisyu has joined #lisp
<sjl>
Yeah
<sjl>
But OPEN sometimes returns things
<sjl>
so it can't have a return type of nil
<Zhivago>
All functions might not return, generally.
<sjl>
It's probably reasonable to say "any code path that doesn't return anything has no effect on the type of the function"
<Bike>
well, what do you want to use the type for?
<Zhivago>
I think it's clear if you say 'return type'.
<sjl>
It would be nice to be able to run subtypep on function types.
<Bike>
for what?
<Bike>
i'm not disagreeing, just asking
<Bike>
right now, function types are only used for optimization
<sjl>
adding `(check-type fn (function (t) t)` to something like mapcar, for example
<sjl>
so you could check that the person actually passed a function that takes one parameter and returns something
fikka has joined #lisp
<sjl>
mapcar is a ridiculous example, but hey
<Bike>
you could also pass a function with a rest parameter or something, no?
<Bike>
guess you could consider (function (&optional t)) a subtype of (function (t)), cos it accepts more argument (lists)
<sjl>
sure. (function (t &rest) t) is a subtype of (function (t) t) because it accepts one parameter (and also possibly mroe)
<sjl>
Right, now we're back to "accepts" :)
Oladon has joined #lisp
<sjl>
Or, e.g. I have a function in my project Euler repo called SUMMATION that takes a sequence and sums it, and it takes a :key argument. That :key function should be a subtype of (function (t) number).
<Bike>
well this limited accepts is easier, it's whether the argument list is accepted by the lambda list, in the sense of acceptability defined by the lambda list rules etc
<sjl>
Though I suppose checking the return type is a bit restrictive.
<sjl>
Because #'car is a perfectly valid key when you know all the elements start with a number, but its return type isn't a subtype of number.
pagnol has joined #lisp
<smokeink>
(= (+ 37 (sb-vm::get-lisp-obj-address #'car)) (sb-vm::function-raw-address 'CAR)) ;==> T . In sbcl what's the difference between get-lisp-obj-address and function-raw-address ?
fikka has quit [Ping timeout: 240 seconds]
<Bike>
obviously the type of car should be understood as null -> null | forall A (cons A T) -> A instead
<onion>
..
Kundry_Wag has joined #lisp
<Bike>
smokeink: this seems like an #sbcl question. but it looks like function-raw-address is used for static linking, so it might be the actual entry point and not the closure words or whatever the hell
fisxoj has quit [Quit: fisxoj]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #lisp
Fare has quit [Ping timeout: 246 seconds]
smokeink has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 246 seconds]
dented42 has joined #lisp
fikka has joined #lisp
smokeink has joined #lisp
Pixel_Outlaw has joined #lisp
<parjanya>
the fright lisp sometimes gives me reminds me of when I was learning Latin, but it’s a little worse ; )
damke_ has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke has quit [Ping timeout: 264 seconds]
z3t0 has joined #lisp
<rme>
crede quod habes, et habes
<parjanya>
nescio eam sententiam... quis sic scripsit?
dieggsy has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
Louge has quit [Quit: Louge]
asarch has joined #lisp
fikka has joined #lisp
<Zhivago>
Well, it's understandable when you consider that most other languages have been evolving toward a common consensus on code appearance.
<Zhivago>
Lisp has ignored that in order to emphasize ad hoc macros, which other languages have also been evolving away from.
<onion>
hrrm
<Zhivago>
So in that regard it can be considered a large step backward.
fikka has quit [Ping timeout: 264 seconds]
Fare has joined #lisp
rotty has quit [Ping timeout: 240 seconds]
rotty has joined #lisp
shifty has joined #lisp
Fare has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
Kundry_Wag has joined #lisp
zooey has quit [Remote host closed the connection]
mareskeg has joined #lisp
zooey has joined #lisp
dddddd has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
oxo1o1o1o has joined #lisp
oxo1o1o1o_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
z3t0 has quit [Quit: Leaving...]
oxo1o1o1o_ has joined #lisp
oxo1o1o1o has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
z3t0 has joined #lisp
oxo1o1o1o_ has quit [Ping timeout: 268 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
igemnace has joined #lisp
<johnnymacs>
So lets say I have a package called foo and in foo I have a funtion called car and cdr. And I have another package which uses common-lisp and uses bar. I want to use the bar package with car and cdr but my foo package only uses cl.
d4ryus2 has joined #lisp
<johnnymacs>
So I want to pass data between packages and layer a hierarchy of namespace priority
loginoob has joined #lisp
pagnol has quit [Ping timeout: 240 seconds]
nika has joined #lisp
d4ryus1 has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 264 seconds]
BlueRavenGT has joined #lisp
<Bike>
what is bar
<Zhivago>
Shadowing import?
<johnnymacs>
(defun bar () (turtle))
<johnnymacs>
(defun turtle () (turtle2))
<smokeink>
(in-package :foo) (bars_package::bar)
dented42 has joined #lisp
<johnnymacs>
What does :: do
pierpa has joined #lisp
<smokeink>
package_name::symbol_in_that_package
<smokeink>
with :: you can access any symbol from any package
fikka has joined #lisp
<parjanya>
Zhivago: a step outside, I would say
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dented42 has joined #lisp
dmiles has quit [Ping timeout: 256 seconds]
<smokeink>
(cl::car (cl::list 1 2)) ==>1 , and since 'car and 'list are external to the package CL you can use : instead of ::
orivej has quit [Ping timeout: 260 seconds]
vtomole has quit [Ping timeout: 260 seconds]
vtomole has joined #lisp
mareskeg has quit [Quit: mareskeg]
vtomole has quit [Ping timeout: 260 seconds]
__rumbler31 has quit [Remote host closed the connection]
broccolistem has joined #lisp
vtomole has joined #lisp
Chream_2 has quit [Ping timeout: 256 seconds]
oxo1o1o1o has joined #lisp
Kundry_Wag has joined #lisp
Chream_ has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<johnnymacs>
Yeah I get it now
<johnnymacs>
Took me a minute
<johnnymacs>
The reason I wanted to use packages is to get away with short function names but then you end up having a long package name
Kundry_Wag has quit [Ping timeout: 256 seconds]
<pierpa>
if long function names bother you, then maybe you are not using a good editor?
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kini has quit [Quit: No Ping reply in 180 seconds.]
Kundry_Wag has joined #lisp
Mutex7 has quit [Quit: Leaving]
fikka has quit [Ping timeout: 240 seconds]
<johnnymacs>
When writing object oriented code one needs to get sub objects very often which is why getting a subobject is just . in most object oriented languages
<johnnymacs>
no w8 I figured out how 2 do it
Kundry_Wag has quit [Ping timeout: 260 seconds]
<pierpa>
do you know about WITH-SLOTS and WITH-ACCESSORS ?
<loginoob>
also in my emacs when i type 'this 'this 'true it return last input i.e TRUE . Shouldn't it return all three
dmiles has joined #lisp
<pierpa>
hmmm
<loginoob>
SBCL in termianl returns all three input
fikka has quit [Ping timeout: 276 seconds]
<pierpa>
as far as I remember, yes, it should print all three results. At the moment I cannot check.
<loginoob>
ok
<Bike>
probably just a quirk of how emacs interprets input
<Bike>
it executes all three but only returns the last, it seems
Pixel_Outlaw has quit [Quit: Leaving]
kini has quit [Quit: No Ping reply in 180 seconds.]
<onion>
*** IELM error *** More than one sexp in input
fikka has joined #lisp
mikecheck has joined #lisp
<pierpa>
ielm is for elisp, no?
fikka has quit [Ping timeout: 264 seconds]
shka_ has joined #lisp
damke has joined #lisp
<loke>
pierpa: Yes.
deng_cn has quit [Read error: Connection reset by peer]
damke_ has quit [Ping timeout: 264 seconds]
deng_cn has joined #lisp
kini has joined #lisp
Chream_ has quit [Ping timeout: 256 seconds]
Oladon has quit [Quit: Leaving.]
surya_ has joined #lisp
doesthiswork has quit [Quit: Leaving.]
ghard` has joined #lisp
ghard has quit [Remote host closed the connection]
Chream_ has joined #lisp
fikka has joined #lisp
BlueRavenGT has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
Chream_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Ping timeout: 264 seconds]
broccolistem has quit [Ping timeout: 264 seconds]
<beach>
Good morning everyone!
<beach>
johnnymacs: If you often want to the slots ("subobject"s) of an object, then your code is badly structured. Slots are an implementation detail that should be used (if at all) only by the module that defines the class. Instead, such details should be hidden behind a consistent "protocol" (an extension of the concept of an "interface" in other languages) consisting of classes and (often generic) functions.
fluke`` has joined #lisp
Fare has joined #lisp
Chream has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fluke``` has joined #lisp
fluke` has quit [Ping timeout: 248 seconds]
fluke`` has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 246 seconds]
Chream_ has joined #lisp
fikka has joined #lisp
nopolitica has quit [Ping timeout: 246 seconds]
fikka has quit [Ping timeout: 256 seconds]
surya_ has quit [Quit: Leaving]
nowhere_man has joined #lisp
surya_ has joined #lisp
fikka has joined #lisp
nowhereman_ has quit [Ping timeout: 240 seconds]
sjl__ has joined #lisp
schoppenhauer has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 256 seconds]
asarch has quit [Read error: Connection reset by peer]
schoppenhauer has joined #lisp
sjl__ has quit [Ping timeout: 264 seconds]
surya_ has quit [Ping timeout: 256 seconds]
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DataLinkDroid has joined #lisp
fikka has joined #lisp
Kundry_Wag has joined #lisp
vtomole has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 256 seconds]
mikecheck has quit [Remote host closed the connection]
Kevslinger has quit [Quit: Connection closed for inactivity]
xrash has quit [Ping timeout: 260 seconds]
myrkraverk has joined #lisp
mishoo_ has joined #lisp
xrash has joined #lisp
xrash has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
damke has quit [Ping timeout: 265 seconds]
safe has quit [Read error: Connection reset by peer]
arbv has quit [Ping timeout: 276 seconds]
Louge has joined #lisp
arbv has joined #lisp
Louge has quit [Quit: Louge]
tempestnox has quit [Quit: WeeChat 1.6]
sjl__ has joined #lisp
chens has quit [Remote host closed the connection]
sjl__ has quit [Ping timeout: 240 seconds]
Karl_Dscc has joined #lisp
<johnnymacs>
What is wrong with this? (defun gethashes (x &rest y) (loop while y do (setf x (gethash (pop y) x))))
sauvin_ is now known as bocaneri
JuanDaugherty has joined #lisp
Chream_ has joined #lisp
igemnace has joined #lisp
vlatkoB has joined #lisp
<Pierpa_>
johnnymacs: please describe in plain English what are you trying to accomplish
milanj has joined #lisp
<Pierpa_>
We can't say what's wrong without knowing what's "right" to you
<beach>
johnnymacs: Perhaps you are confused about how Common Lisp passes arguments. Did you expect the first argument in the call to your function to be modified as a result of the call?
<johnnymacs>
well I want to take a set of nested hash tables and search through them with keys
<Pierpa_>
Maybe you just forgot to return x?
fikka has quit [Ping timeout: 260 seconds]
<johnnymacs>
only way I know how to return on a loop is with progn but sure
<Pierpa_>
Put "x" after the loop
<beach>
johnnymacs: What did you expect to happen to the values that you give to X in this function?
szmer has quit [Quit: WeeChat 2.0.1]
<Pierpa_>
or equivalently, add a "finally (return x)" clause to the loop
<beach>
johnnymacs: Did you see my remark you your desire for a compact syntax for accessing slots (what you call "subobject"s)?
<beach>
remark about your.
fikka has joined #lisp
mishoo_ has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
<jackdaniel>
you define variables with DEFVAR, like that: (defvar *foo* (lambda () (make-hash-table)))
<jackdaniel>
or DEFPARAMETER
<jackdaniel>
to know the difference check out clhs or read pcl
<jackdaniel>
you may look for these symbols in l1sp.org
kammd[m] has joined #lisp
dirb has joined #lisp
pagnol has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
sjl__ has joined #lisp
fikka has joined #lisp
rumbler31 has joined #lisp
<Pierpa_>
Why write (lambda () (make-hash-table)) instead of simply #'make-hash-table ? Ok, there's a small difference, but does it matters in this case?
sjl__ has quit [Ping timeout: 276 seconds]
doesthiswork has quit [Quit: Leaving.]
<johnnymacs>
(defun gethashes (x &rest y) (loop while y do (setf x (gethash (pop y) x)) (return x)))
<johnnymacs>
what I should really do is a flatmap
<Pierpa_>
No. I wrote above what to do
<johnnymacs>
which was?
<Pierpa_>
Scroll up. I have not written a lot it's easy to finf
rumbler31 has quit [Ping timeout: 276 seconds]
<Pierpa_>
*find
<johnnymacs>
I think you were wrong.
<Pierpa_>
Ok
<Pierpa_>
It's your right
varjag has joined #lisp
<beach>
johnnymacs: You don't listen much to advice, do you?
Pierpa_ is now known as pierpa
<johnnymacs>
If the advice seems to be a corret way to solve my problem that I can understand then I follow it
<johnnymacs>
Somtimes people have the correct answer but they refuse to explain it in simple terms
<johnnymacs>
or for example some people want to have a conversation with you before they will tell you what they think the answer is
<beach>
johnnymacs: It would be very helpful if you acknowledged that you received the advice, and if you don't intend to following, indicate why.
<pierpa>
Simpler than "add x after the loop"?
<beach>
johnnymacs: "WHILE Y" indicates to the reader that Y is a Boolean variable. In reality, here it is a list. The expectations of the reader are thus violated.
<jackdaniel>
johnnymacs: if you are not willing to listen to advices you get (without saying why), then you simply waste people time by asking questions.
<beach>
johnnymacs: It would be much better to use LOOP FOR ELEMENT IN Y ...
<beach>
johnnymacs: This solution has the additional advantage that you won't modify the parameter Y, which makes debugging easier.
<beach>
johnnymacs: I am attempting a few more times to give you advice. But, pretty soon, I'll give up unless I see some reaction.
<johnnymacs>
(defun gethashes (x &rest y)(loop for z in y (setf x (gethash z x)) x))
oxo1o1o1o has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
<beach>
johnnymacs: That would probably give you syntax errors for LOOP clauses.
<|3b|>
probably should handle missing values better, instead of continuing search with nil
fikka has quit [Ping timeout: 265 seconds]
<pierpa>
That's not after the loop, if you changed your mind about my advice
<|3b|>
or maybe it errors anyway, nevermind
<johnnymacs>
I donpt see how I can put it after the loop if defun takes three arguments
<pierpa>
It doesn't
<johnnymacs>
oh
<beach>
johnnymacs: Who told you it does.
<pierpa>
Why you think so?
<beach>
johnnymacs: You need to read the Common Lisp HyperSpec.
<johnnymacs>
nobody told me
<johnnymacs>
It is illegible
<beach>
johnnymacs: It is not because nobody told you that it isn't true.
<johnnymacs>
I might as well try and read reformed chinese
<johnnymacs>
It would take me years to parse is what I am saying
<beach>
johnnymacs: If you can't read a specification, perhaps you should choose some other activity.
<johnnymacs>
not very good documentation. more of a specification
<johnnymacs>
(defun gethashes (x &rest y)(loop for z in y (setf x (gethash z x))) x)
fikka has joined #lisp
<pierpa>
I concur with Johnny in this case
pagnol has quit [Ping timeout: 240 seconds]
<johnnymacs>
I will probably never read the common lisp hyperspec as long as I live
kark has joined #lisp
<johnnymacs>
nor practical common lisp
<johnnymacs>
nor gentle introduction to lisp
<pierpa>
Ok. Then beach was right
<jackdaniel>
then helping you is not worth our time (at least mine)
<johnnymacs>
I've learned alot from your help so far
<beach>
johnnymacs: Some of us help in the hopes that you will become autonomous one day. What you are saying now is that it will never happen.
<johnnymacs>
What does this mean "autonomous"
<beach>
Being able to read the specification yourself, rather than having people here read it for you.
<jackdaniel>
that doesn't mean you deserve help. if you need tutor who will explain things to you (without doing your homework), you probably need to hire somebody
d4ryus2 is now known as d4ryus
<johnnymacs>
The common lisp hyperspec is like a cheap rag compared to a document like gentle introduction to lisp
<antoszka>
erm wat
<beach>
johnnymacs: Good luck to you.
<antoszka>
the hyperspec is a wonderful document, just looks a little 90-s
<johnnymacs>
I think the hyperspec is the single worst piece of documentation I've read. I've read documentation ten lines long that taught more.
<pierpa>
It is a spec. Not a manual for learning, though.
<johnnymacs>
Precicely, which is why you shoudn't linkt o it as a teaching tool
crsc has quit [Quit: leaving]
damke_ has joined #lisp
<antoszka>
Does anybody suggests it as a *teaching* tool?
<antoszka>
It's a reference for expected behaviour (including unspecified behaviour).
<antoszka>
And it does that very well.
damke has quit [Ping timeout: 264 seconds]
<johnnymacs>
I think you're just playing with words there.
fikka has quit [Ping timeout: 276 seconds]
<johnnymacs>
You clearly use the hyperspec as a tool to teach lisp.
crsc has joined #lisp
<jackdaniel>
no, we use it as a reference, so people can learn what they nead to know
<jackdaniel>
you see, nobody here is a teacher (at least doesn't spend time on IRC to fulfill teaching duties, just to hang around with people with similar interests)
<beach>
jackdaniel: Very well put.
<jackdaniel>
thanks
<johnnymacs>
if you didn't want to answer my question then why would you half assedly participate in answering them
<antoszka>
johnnymacs: I'm sure you had suggestions on *teaching* books (since you mention Gentle Intro and PCL which are both excellent books).
<Shinmera>
beach: Fwiw in my experience people that don't start out autonomous hardly ever become autonomous.
<beach>
Shinmera: Interesting observation.
<Shinmera>
At least when it comes to learning, rather than just performing routine.
<antoszka>
johnnymacs: I only just look at the channel, I'm not in-any-part-assedly participating, I'm not in fact participating at all. Just wrote my opinion on the Hyperspec.
<jackdaniel>
1) being polite is something many people do; 2) we want to help if someone is willing to help himself - more lisp hackers = better; 3) I'm 100% sure you haven't read http://catb.org/~esr/faqs/smart-questions.html
<antoszka>
just looked*
<beach>
Shinmera: I think I know of some exceptions, but that doesn't falsify the general statement, of course. I still think it is an interesting observation, and I'll think about it myself.
<johnnymacs>
jackdaniel: that seems like alot of preparation simply to type some characters and then put a question mark at the end.
<jackdaniel>
yes, respecting other people is not an easy task
<johnnymacs>
I don't know I just feel like you guys have a high success rate at convincing people not to use the common lisp variant of a turing machine.
<pierpa>
It's a desperate case
<Shinmera>
I feel like you're very disrespectful about the courtesy people have given you here.
<johnnymacs>
I think most of the people in here are very courteous to me.
schweers has joined #lisp
_cosmonaut_ has joined #lisp
Cymew has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
igemnace has quit [Quit: WeeChat 2.1]
Inoperable has quit [Quit: ZNC 1.6.6 - http://znc.in]
Kundry_Wag has quit [Ping timeout: 256 seconds]
EvW1 has joined #lisp
igemnace has joined #lisp
tomlukeywood has joined #lisp
EvW1 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
EvW has joined #lisp
Cymew has joined #lisp
hhdave has joined #lisp
Inoperable has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
<johnnymacs>
(defun gethashes (x &rest y)(loop for z in y do (setf x (gethash z x))) x)
<johnnymacs>
I keep getting an error that says undefined function
heisig has joined #lisp
DataLinkDroid has quit [Quit: Ex-Chat]
<pierpa>
I'm sure the error you get says more than this
Kundry_Wag has quit [Ping timeout: 248 seconds]
_cosmonaut_ has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
pagnol has joined #lisp
nika has quit [Read error: Connection reset by peer]
nika has joined #lisp
EvW has quit [Ping timeout: 276 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 265 seconds]
_cosmonaut_ has joined #lisp
smokeink has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
sjl__ has joined #lisp
bl1nd has quit [Quit: WeeChat 1.4]
EvW has joined #lisp
<myrkraverk>
How do I check my asdf version?
<easye>
(asdf:asdf-version)
sjl__ has quit [Ping timeout: 264 seconds]
tomlukeywood has quit [Quit: tomlukeywood]
<myrkraverk>
thanks -- and how did I miss that while grepping for version in the manual?
<myrkraverk>
Probably did not grep enough.
oldtopman has quit [Ping timeout: 276 seconds]
rumbler31 has joined #lisp
<easye>
I am not sure that this function is in the ASDF manual. I probably found it by inspecting the exported symbols of the ASDF package via M-x slime-apropos-package
<myrkraverk>
I see.
<myrkraverk>
I have another question now;
<myrkraverk>
what does
<myrkraverk>
Just performed compiling #<MADEIRA-PORT "linedit" "ports" "ccl"> but failed to mark it done
<myrkraverk>
mean?
<myrkraverk>
When I try to start sbcl with linedit in my .sbclrc
oldtopman has joined #lisp
<easye>
It seems to indicate that ASDF attempted the compilation of the "ccl.lisp" source unit, but failed in some way. If you are running under SBCL, it is probably difficult to compile the presumably CCL specific code in that file.
rumbler31 has quit [Ping timeout: 248 seconds]
<myrkraverk>
Yeah, I'm running SBCL and trying to use linedit.
<myrkraverk>
Why would it try to compile the CCL code in the first place?
<easye>
I have no experience with linedit, so I cannot help you on that. You have the source: examine the ASDF system definitions. Look for assumptions about what feature conditionals are active under different implementations.
<jackdaniel>
myrkraverk: I've witnessed ASDF3's :if-feature being buggy, so if thre is :if-feature "ccl" you may try replacing it with good old #+ccl before (:file …)
<myrkraverk>
jackdaniel: ok, I'll try that later, when my primary task is done.
<antoszka>
I think linedit has been broken with recent sbcls.
<antoszka>
Hasn't worked for me for the past 2 or 3 releases.
<antoszka>
I hadn't had the time to investigate the root cause.
<antoszka>
myrkraverk: ^
<myrkraverk>
thanks.
nika has quit [Remote host closed the connection]
nika has joined #lisp
<antoszka>
I'd be happy myself to know if somebody has investigated broken linedit on recent sbcl and has a solution :)
<scymtym>
iirc, linedit uses madeira-port to conditionally include certain files based on the lisp implementation (it probably predates :if-feature). madeira-port doesn't work right with recent ASDF versions. i seem to recall that somebody is already working in this, though
<antoszka>
ah, okay
<antoszka>
that'd be cool, I really like using linedit as a quick handy alternative to firing up emacs + slime
Naergon has joined #lisp
nika has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
_cosmonaut_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 276 seconds]
_cosmonaut_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
panji has joined #lisp
nowhere_man has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
dddddd has joined #lisp
<myrkraverk>
I'm actually a bit more likely to make a new frontend with cffi and libtecla than fix linedit; at least if fixing linedit is hard.
fikka has quit [Ping timeout: 264 seconds]
shrdlu68 has joined #lisp
m00natic has joined #lisp
fikka has joined #lisp
patrixl has joined #lisp
rumbler31 has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
patrixl has quit [Client Quit]
patrixl has joined #lisp
patrixl has quit [Client Quit]
rumbler31 has quit [Ping timeout: 240 seconds]
JuanDaugherty has quit [Ping timeout: 240 seconds]
patrixl has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
_cosmonaut_ has quit [Ping timeout: 276 seconds]
* jackdaniel
've seen libecl.a :-)
fikka has joined #lisp
doesthiswork has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
_cosmonaut_ has joined #lisp
fikka has joined #lisp
<myrkraverk>
jackdaniel: you mean the innards of it? I haven't dared to look at them, myself.
EvW has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 268 seconds]
Fare has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
SaganMan has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
panji has left #lisp [#lisp]
fikka has joined #lisp
<jackdaniel>
no, just libtecla looks *similar* to libecl.a
<jackdaniel>
completely unrelated projects
fikka has quit [Ping timeout: 276 seconds]
wxie has quit [Remote host closed the connection]
fikka has joined #lisp
Bike has joined #lisp
zbir has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
hiroaki has joined #lisp
_cosmonaut_1 has joined #lisp
_cosmonaut_ has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
wheelsucker has quit [Quit: Client Quit]
fikka has joined #lisp
himmAllRight17 has quit [Ping timeout: 240 seconds]
JuanDaugherty has joined #lisp
himmAllRight17 has joined #lisp
EvW2 has joined #lisp
dieggsy has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
EvW has quit [Remote host closed the connection]
EvW2 is now known as EvW
rumbler31 has joined #lisp
Chream has joined #lisp
fikka has joined #lisp
nullniverse has joined #lisp
tomsen has joined #lisp
tomlukeywood has joined #lisp
EvW1 has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
sjl__ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Arcaelyx has joined #lisp
BlueRavenGT has joined #lisp
EvW has quit [Ping timeout: 276 seconds]
EvW1 is now known as EvW
EvW1 has joined #lisp
fikka has joined #lisp
eschatologist has quit [Ping timeout: 276 seconds]
eschatologist has joined #lisp
JuanDaugherty has quit [Ping timeout: 276 seconds]
deng_cn has quit [Read error: Connection reset by peer]
smokeink has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
deng_cn has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
EvW1 is now known as EvW
fikka has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
damke has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
scymtym has joined #lisp
damke_ has quit [Ping timeout: 265 seconds]
_cosmonaut_1 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
broccolistem has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
damke_ has joined #lisp
rippa has joined #lisp
damke has quit [Ping timeout: 264 seconds]
glv has joined #lisp
warweasle has joined #lisp
fisxoj has joined #lisp
onceagain has joined #lisp
Louge has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
Chream has quit [Ping timeout: 248 seconds]
dieggsy has quit [Ping timeout: 276 seconds]
deng_cn has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
tomlukeywood has quit [Remote host closed the connection]
nowhere_man has joined #lisp
damke has joined #lisp
Bike_ has joined #lisp
mishoo has quit [Ping timeout: 252 seconds]
Bike has quit [Disconnected by services]
papachan has joined #lisp
Bike_ is now known as Bike
damke_ has quit [Ping timeout: 264 seconds]
Louge has quit [Quit: Louge]
EvW has quit [Quit: EvW]
broccolistem has quit [Ping timeout: 264 seconds]
nullniverse has quit [Quit: Leaving]
Chream has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
_cosmonaut_ has joined #lisp
scymtym_ has joined #lisp
deng_cn has joined #lisp
EvW1 has joined #lisp
scymtym has quit [Ping timeout: 276 seconds]
Chream has quit [Ping timeout: 240 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
fluke``` has quit [Read error: Connection reset by peer]
raynold has quit [Quit: Connection closed for inactivity]
fisxoj has quit [Quit: fisxoj]
orivej has joined #lisp
fikka has joined #lisp
EvW1 has quit [Ping timeout: 268 seconds]
al-damiri has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
sjl__ is now known as sjl
bigfondue has quit [Read error: Connection reset by peer]
markong has joined #lisp
oleo has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
<khrbt>
yes, clone it into ~/quicklisp/local-projects and try it out
<antoszka>
cool, I'll do that later today, thx
Posterdati has joined #lisp
nowhereman_ has joined #lisp
_whitelogger has joined #lisp
trocado has quit [Ping timeout: 276 seconds]
flamebeard has quit [Quit: Leaving]
Kundry_Wag has quit [Remote host closed the connection]
comborico1611 has joined #lisp
Kundry_Wag has joined #lisp
nika has joined #lisp
Posterdati has joined #lisp
jibanes has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Remote host closed the connection]
jibanes has joined #lisp
Posterdati has quit [Ping timeout: 240 seconds]
pierpa has quit [Ping timeout: 260 seconds]
delf_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
fikka has joined #lisp
wheelsucker has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Posterdati has joined #lisp
pierpa has joined #lisp
damke_ has joined #lisp
heisig has quit [Quit: Leaving]
Cymew has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
earl-ducaine has quit [Read error: Connection reset by peer]
Chream has joined #lisp
Murii|osx has joined #lisp
earl-ducaine has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
failproofshark has joined #lisp
ksool has quit [Ping timeout: 260 seconds]
comborico1611 has quit [Quit: Konversation terminated!]
frgo has joined #lisp
Murii|osx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 276 seconds]
yeticry has quit [Ping timeout: 256 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
frgo has quit [Ping timeout: 265 seconds]
rumbler31 has joined #lisp
yeticry has joined #lisp
onion has quit [Quit: WeeChat 1.9.1]
onion has joined #lisp
onion is now known as whoman
whoman is now known as onion
EvW1 has joined #lisp
EvW has quit [Remote host closed the connection]
EvW1 is now known as EvW
FreeBirdLjj has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #lisp
hiroaki has joined #lisp
Chream has quit [Ping timeout: 240 seconds]
Murii|osx has joined #lisp
rotty has quit [Ping timeout: 256 seconds]
rotty has joined #lisp
mareskeg has joined #lisp
delf_ has quit [Remote host closed the connection]
SaganMan has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
mflem has joined #lisp
LiamH has joined #lisp
Kundry_Wag has joined #lisp
vaporatorius has quit [Ping timeout: 264 seconds]
mareskeg has quit [Quit: mareskeg]
tomlukeywood has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
nika has quit [Quit: Leaving...]
vaporatorius has joined #lisp
vap1 has joined #lisp
vaporatorius has quit [Client Quit]
orivej has quit [Ping timeout: 264 seconds]
damke_ has quit [Quit: quit]
Mat4 has joined #lisp
Lelilianth has quit [Remote host closed the connection]
energizer has joined #lisp
comborico1611 has joined #lisp
murasame has joined #lisp
Karl_Dscc has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
_cosmonaut_ has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
nowhereman_ has quit [Ping timeout: 256 seconds]
Aritheanie has joined #lisp
Murii|os_ has joined #lisp
damke has joined #lisp
Murii|osx has quit [Ping timeout: 240 seconds]
foom2 has joined #lisp
foom has quit [Read error: Connection reset by peer]
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #lisp
shka_ has joined #lisp
<stacksmith>
Greetings. Need advice: at the end of my function I call a function that returns multiple values. I need to add an extra value at the end. Is there a way of doing that without m-v-b and a new values form?
<sjl>
A macro that expands into what Bike said would be what I'd do
<onion>
(defmacro m-v-l (&rest ..
<stacksmith>
I was hoping that I missed something simple. Yeah, I can macro like a big boy.
<Shinmera>
Values are immutable, so there's nothing you can do except unpack and repack.
<Shinmera>
values aren't even first-class!
<stacksmith>
Since all this is happening at the end of the function, I thought there may be some magic way to append more...
Satou has joined #lisp
<stacksmith>
Thanks y'all.
* stacksmith
tips his 256-gallon hat
khisanth__ has quit [Ping timeout: 265 seconds]
schweers has quit [Ping timeout: 276 seconds]
varjag has joined #lisp
vtomole has joined #lisp
Mat4 has left #lisp [#lisp]
epony has quit [Quit: QUIT]
FreeBirdLjj has joined #lisp
epony has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
Cymew has joined #lisp
damke has quit [Ping timeout: 264 seconds]
khisanth__ has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 276 seconds]
svillemot has quit [Quit: Lost terminal]
svillemot has joined #lisp
SaganMan has quit [Quit: wabbalabbadubdub]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
mareskeg has joined #lisp
nsrahmad has joined #lisp
bocaneri has quit [Remote host closed the connection]
dmilez_ has joined #lisp
roca has joined #lisp
jdz has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
fluke` has joined #lisp
jdz has joined #lisp
Mutex7 has joined #lisp
nsrahmad has quit [Ping timeout: 276 seconds]
thodg has joined #lisp
sbat has quit [Quit: WeeChat 1.6]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
comborico1611 has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #lisp
wigust has quit [Ping timeout: 264 seconds]
murasame has quit [Quit: Page closed]
zacts has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Satou has quit [Quit: Cya soon guys!]
fikka has joined #lisp
Chream has joined #lisp
makomo has joined #lisp
comborico1611 has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
Kundry_Wag has joined #lisp
mareskeg has quit [Remote host closed the connection]
mareskeg has joined #lisp
whyNOP has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
fourier has joined #lisp
fourier has quit [Changing host]
fourier has joined #lisp
onceagain has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
roca has quit [Quit: roca]
tomlukeywood has quit [Quit: tomlukeywood]
mareskeg has quit [Remote host closed the connection]
mareskeg has joined #lisp
<fourier>
how to use keywords defined in trivial-features in asd file?
<fourier>
*features*
mareskeg has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 263 seconds]
<fourier>
also a question about asdf and quicklisp: if I have a system specified in defsystem-depends-on, and perform ql:quickload of my system, the system defined in defsystem-depends-on by some reason is not downloaded by ql
<Xach>
That is a known limitation of quicklisp.
<Xach>
It does not automatically fetch things during the loading of a system definition.
<fourier>
ahha I see
<Bike>
is (defstruct foo foos1 (foos2 foos1)) legal? i thought it was but now i think i was mistaken
<sjl>
> The symbols which name the slots must not be used by the implementation as the names for the lambda variables in the constructor function, since one or more of those symbols might have been proclaimed special or might be defined as the name of a constant variable.
<sjl>
If you're expecting foos2 to have an initform of foos1, and that that would evaluate to the keyword you passed for foos1, I think that bit of the spec explicitly forbids that
<sjl>
interestingly, sbcl and ccl DO use the symbols as the parameter names if you specify a BOA constructor
<sjl>
(defstruct (foo (:constructor f (slot))) slot)
<sjl>
Which I think violates that bit of the spec.
JuanDaugherty has quit [Ping timeout: 268 seconds]
<sjl>
well, maybe not. The BOA lambda list page goes into a lot more detail.
remi`bd has joined #lisp
bms_ has joined #lisp
varjag has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<fourier>
please recommend some simple documentation generation system from CL sources. I need something what can extract docstrings from functions and generate github markdown document. could write something myself but maybe something exists already
<rme>
I think there are about a dozen such systems.
<sjl>
Shinmera has something. I rolled my own like most people.
<fourier>
yep thats why i'm asking for recommendations :)
<Bike>
sjl: foos1 as initform is what i meant, yes
<rme>
I'm not trying to tell you what to do, but one option would be to write actual documentation, rather than fiddling around trying to generate it from docstrings and introspection.
<rme>
A radical notion, I know.
<fourier>
i have it already
<fourier>
i want to extract it and to place to readme
<Bike>
the page on defstruct says the initforms are to be evaluated in the lxeical environment of the defstruct, which pretty much forbids that
varjag has joined #lisp
<Bike>
just wanted to sanity check
<sjl>
Bike: yeah, I don't think that can work for the keyword constructors because they're supposed to use other symbols as the lambda arguments
<Bike>
i guess not doing that explains why my code has worked when i tried it
<Bike>
i should fix it i spose
<sjl>
Bike: It apparently works fine if you use a boa constructor though
<sjl>
(defstruct (foo (:constructor f (slot1))) slot1 (slot2 (1- slot1)))
<Bike>
well, i can just moave the initform into the lambda list anyway, since i use a boa
<Bike>
except that adds the wrinkle that i have :type function and no other default
<Bike>
bleh
<sjl>
> If no default value is supplied for an aux variable variable, the consequences are undefined if an attempt is later made to read the corresponding slot's value before a value is explicitly assigned. If such a slot has a :type option specified, this suppressed initialization does not imply a type mismatch situation; the declared type is only required to apply when the slot is finally assigned.
glv has quit [Quit: Leaving]
<Bike>
so confusing.
orivej has joined #lisp
dmilez_ has quit [Ping timeout: 260 seconds]
warweasle has quit [Quit: steam whistle]
pierpa has quit [Ping timeout: 260 seconds]
<Bike>
new question. if the clhs defines a function can an implementation have it be a generic function instead?
<Bike>
i mean, it's still a function, so not "instead"
<_death>
yes.. for example Gray stream protocol defines CLOSE as a generic function
fikka has quit [Ping timeout: 240 seconds]
<Bike>
oh yeah.
<Bike>
thanks. sjl too
mareskeg has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Remote host closed the connection]
dtornabene has quit [Read error: Connection reset by peer]
FreeBird_ has quit [Ping timeout: 256 seconds]
comborico1611 has quit [Quit: Konversation terminated!]
k-stz has joined #lisp
pierpa has joined #lisp
fikka has joined #lisp
FreeBirdLjj has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
vlatkoB has quit [Remote host closed the connection]
<k-stz>
hey, I try to parse a formula like !A and generate ==> (not A). I'm stuck on how to approach this, do I use READ-CHAR or just convert it to a string? Problem arose when trying to parse formulas like: !(a -> b)
<Bike>
convert what to a string?
scymtym_ has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 240 seconds]
fourier has quit [Ping timeout: 260 seconds]
<k-stz>
The Formula '!A' or '!(a -> b)' etc.
<Bike>
i mean, what kind of object is it.
<Bike>
i would think it would already be a string, and you're trying to parse it.
<oleo>
no
<oleo>
he obviously is unaware !a is just an unbound variable on the top-level repl
<oleo>
and otherwise '!a is an atom and a symbol
<oleo>
so he can't dissect the ! from it
<k-stz>
currently I read it in as a quoted list: '(a -> !b)
<Bike>
okay, yeah, probably don't do that.
nydel has quit [Read error: Connection reset by peer]
<oleo>
with "!a" he at least would have a chance....
<k-stz>
ok so I try this (prefixing "(a -> !b)"), yeah I see '!(a -> b) already fails
pierpa_ has joined #lisp
mareskeg has joined #lisp
dented42 has joined #lisp
mareskeg has quit [Ping timeout: 240 seconds]
nowhereman_ has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
Mutex7 has quit [Quit: Leaving]
whyNOP has joined #lisp
<stacksmith>
k-stz: suggestion: make sure you understand Lisp pretty well before attempting to implement a compiler for another language. Otherwise you will be in a world of pain. You must pay special attention to the CL reader and its limitations, symbols and packages (in terms of how your syntax maps to CL)...
nuxdie has joined #lisp
<stacksmith>
It is essential to understand how macros and reader macros work.
<stacksmith>
Once you do, you may find your task trivial. Or impossible.
<stacksmith>
Another suggestion: unless you really need a different syntax, stick with Lisp and save yourself a lot of trouble.
<stacksmith>
As in (not A) instead of !A.
JuanDaugherty has joined #lisp
pierpa has quit [Ping timeout: 260 seconds]
<k-stz>
stacksmith: thanks, I wanted to try a simple parser in lisp because I never tried it and hope to learn something. That felt like a good starting point
sjl has quit [Ping timeout: 256 seconds]
<stacksmith>
k-stz: I do not mean to discourage, but I speak from personal experience of trying to do something similar when I started with Lisp. It seemed like an easy enough task, but led to a serious smack-in-the-face realization of just how pathetically ignorant I was at the time. It was a great experience but your appreciation of such things may be different.
wheelsucker has quit [Remote host closed the connection]
citron has joined #lisp
bms_ has quit [Quit: Leaving]
mareskeg has joined #lisp
mareskeg has quit [Remote host closed the connection]
<k-stz>
stacksmith: I think I see your point, this already isn't as easy as a thought. No damage done, though. Seeing the first few problems makes me attentive to solutions, and I just might know where to look next
deng_cn has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
deng_cn has joined #lisp
<stacksmith>
k-stz: Another observation is that you can do it in a Lispy way, by using the Lisp reader, macros, etc. or by parsing text, the way you'd probably do it in C or whatnot. You will learn entirely different things. Lisp is great for writing DSLs, but it is not a task for a novice.
roca has joined #lisp
<stacksmith>
k-stz: Read 'On Lisp' - it is full of useful information about doing things like that, including an entire Prolog implementation in a few pages of code, and information about reader macros and regular macros.
remi`bd has quit [Quit: leaving]
rumbler31 has joined #lisp
<dim>
just published an article where I quote Erik Naggum a lot
damke_ has joined #lisp
<k-stz>
stacksmith: I have this book on my radar, I should also encounter this topic again in SICP soon. Thanks again o/
<dim>
is that considered ranting? harmful? I must admit I like reading his rants...
rumbler31 has quit [Ping timeout: 276 seconds]
<k-stz>
dim: are you asking if quoting rants is considered ranting?
damke has quit [Ping timeout: 264 seconds]
<k-stz>
I found what I read about Erik Naggum enjoyable as well, I'd say because he can articulate his opinions well and he touches on many things. It doesn't appear shallow
Bike has quit [Ping timeout: 260 seconds]
<Shinmera>
While his writings are very insightful, they definitely often are inflammatory as well though.
earl-ducaine has quit [Ping timeout: 268 seconds]
earl-ducaine_ has joined #lisp
earl-ducaine_ has quit [Read error: Connection reset by peer]
<stacksmith>
I learned a tremendous amount when I started out - by reading Naggum transcripts. It was never boring, although somewhat painful on occasions.