elflng has quit [Read error: Connection reset by peer]
elflng has joined #lisp
heisig has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
bilegeek has quit [Quit: Leaving]
treflip has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
ralt has joined #lisp
cjb has quit [Read error: Connection reset by peer]
cjb has joined #lisp
jw4 has quit [Quit: tot siens]
jw4 has joined #lisp
lansiir has quit [Ping timeout: 256 seconds]
wxie1 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
nicktick has quit [Ping timeout: 246 seconds]
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
mankaev has quit [Read error: Connection reset by peer]
lansiir has joined #lisp
randomidiot has joined #lisp
nicktick has joined #lisp
randomidiot has quit [Quit: randomidiot]
Oladon has quit [Quit: Leaving.]
eagleflo has quit [Ping timeout: 265 seconds]
oni-on-ion has quit [Ping timeout: 256 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
oni-on-ion has joined #lisp
contrapunctus has left #lisp [#lisp]
contrapunctus has joined #lisp
contrapunctus has left #lisp [#lisp]
contrapunctus has joined #lisp
wxie has quit [Quit: wxie]
oni-on-ion has quit [Ping timeout: 244 seconds]
jeosol has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #lisp
pve has joined #lisp
ajithmk has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
gaqwas has quit [Remote host closed the connection]
<phoe>
aeth: another design pattern is *F for modify macros
<phoe>
Alexandria defines a bunch of those
<beach>
I think it's a stretch to call those conventions "design patterns".
enrio has joined #lisp
<contrapunctus>
edgar-rft: `(incf *anxiety*)`
<phoe>
sure thing I would, since the original term "design pattern" attaches itself to things as petty as the Singleton and the Decorator
<contrapunctus>
edgar-rft: also trailing garbage after expression π
banjiewen has quit [Ping timeout: 244 seconds]
jerme_ has quit [Ping timeout: 244 seconds]
jerme_ has joined #lisp
banjiewen has joined #lisp
jprajzne has joined #lisp
mingus has joined #lisp
cjb has quit [Ping timeout: 245 seconds]
ljavorsk_ has joined #lisp
enrioog has joined #lisp
shifty has joined #lisp
JohnMS_WORK has joined #lisp
Archenoth has joined #lisp
enrio has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
shifty has joined #lisp
liberliver has joined #lisp
yonkunas has quit [Quit: Connection closed for inactivity]
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
Necktwi has quit [Ping timeout: 265 seconds]
Necktwi has joined #lisp
philweb has quit [Ping timeout: 245 seconds]
shifty has quit [Ping timeout: 246 seconds]
dra has joined #lisp
gaqwas has quit [Remote host closed the connection]
pfr has joined #lisp
ofi has joined #lisp
n123456 has joined #lisp
nanoz has joined #lisp
gxt has joined #lisp
n123456 has quit [Client Quit]
gravicappa has quit [Ping timeout: 265 seconds]
enrioog has quit [Ping timeout: 265 seconds]
vaporatorius__ has joined #lisp
vaporatorius has quit [Ping timeout: 240 seconds]
mokulus has joined #lisp
<p_l>
design patterns would fit more towards certain structures of LET/FLET/etc.
<p_l>
phoe: btw, have you read the original Design Patterns (I haven't, it's on The List)? I wonder how Smalltalk version matches up to the C++/Java cargo cult
ljavorsk_ has quit [Remote host closed the connection]
<phoe>
p_l: I haven't read the Smalltalk book
treflip has quit [Quit: WeeChat 2.6]
dra_ has joined #lisp
dra has quit [Read error: Connection reset by peer]
treflip has joined #lisp
enrioog has joined #lisp
nanoz has quit [Ping timeout: 265 seconds]
ldb has joined #lisp
<ldb>
good afternoon
<phoe>
hello ldb
galex-713 has quit [Ping timeout: 272 seconds]
ldb_ has joined #lisp
ajithmk has quit [Quit: Connection closed for inactivity]
ldb has quit [Ping timeout: 256 seconds]
ldb_ has quit [Ping timeout: 256 seconds]
galex-713 has joined #lisp
akoana has left #lisp ["Leaving"]
ldb has joined #lisp
nanoz has joined #lisp
enrioog has quit [Ping timeout: 264 seconds]
nicktick has quit [Ping timeout: 256 seconds]
ldb has quit [Ping timeout: 256 seconds]
nicktick has joined #lisp
<dim>
my understanding (which needs fact checking, conversations, actually reading the book, etc) is that Design Patterns are mostly useful when all you have is Single Dispatch and Single Inheritance ; when you have multiple dispatch and a way to compose methods yourself, I'm not sure you actually need many of the design patterns... you just don't have those problems they're solving...
<p_l>
don't forget dynamic variables
<beach>
dim: Those are the design patters that are mostly described in the book. But that doesn't mean that those are the only useful design patterns, so there maybe others in languages that don't happen to need the ones from the book.
<dim>
I guess that's what I was trying to say, yes
<dim>
(well I said only the first half, it would be more fair to say that I also agree with the other part you're adding)
<dim>
ah yeah I did read that one too, forgot about it though, somehow
<dim>
oh ok I failed to remember that my feeling about design patterns and lisp actually come from that slide deck, thanks for the reminder ;-)
<phoe>
basically, some design patters may disappear as the underlying language becomes actually capable of supporting the concepts behind those patterns in better ways
jello_pudding has quit [Ping timeout: 246 seconds]
igemnace has joined #lisp
<scymtym>
norvig silently generalizes a bit and doesn't say this explicitly, but there is also the fact that OOP design patterns revolve around assigning responsibilities. and by that the OOP people mean assigning responsibilities to classes which doesn't make that much sense in a CL context
<phoe>
scymtym: yes, e.g. one can also assign responsibilities to methods in CL wrt :BEFORE/:AFTER/:AROUND - I think Norvig mentions that example in his slides
<scymtym>
phoe: sure, but i mean that the whole methodology is structured around "packages contain classes, classes contain methods". motivations such as avoiding "god classes" or controlling coupling between and cohesion within classes only make sense in that framework
<jackdaniel>
s/usre/sure/ :)
<phoe>
oh, yes, I understand
<scymtym>
one could say that CL classes take on responsibilities of the "knowing something" kind, but "doing something" is often the more important kind
<jackdaniel>
one could argue, that auxiliary methods introduce unexpected processing steps to a person, who adds their own method, and in this sense they water down resposnibility
<jackdaniel>
even responsibility :)
space_otter has quit [Remote host closed the connection]
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
jello_pudding has joined #lisp
quazimod1 has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
vaporatorius has joined #lisp
vaporatorius__ has quit [Ping timeout: 260 seconds]
<ajithmk>
ralt: (aref) works for vectors and arrays but not on pointers to foreign structs.
hsaziz has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
gaqwas has joined #lisp
terpri_ has joined #lisp
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
terpri has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
galex-713 has quit [Ping timeout: 246 seconds]
galex-713 has joined #lisp
kaftejiman has joined #lisp
ayuce has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
ebrasca has joined #lisp
<flip214>
Can I parse an ALIST with DESTRUCTURING-BIND as well? Or some other CL function? (Yes, I know about ALEXANDRIA:ASSOC-VALUE)
bitmapper has quit [Ping timeout: 265 seconds]
<jackdaniel>
(destructuring-bind ((a . b) (c . d)) (list (cons 1 2) (cons 3 4)) (list a b c d)) ; works
<jackdaniel>
but destructuring-bind does not know anything about keys or values
<jackdaniel>
it is dumb matching
<jackdaniel>
(loop for (a . b) in (list (cons 1 2) (cons 3 4)) collect a collect b) ; also works
<phoe>
d-b won't work on reordered alists though, it can't perform this sort of pattern matching
<jackdaniel>
I'm certain I said that that it does not know anything about keys or values, hence - about the order ,-)
<phoe>
I mean, it *does* work on plists with a proper &KEY
<phoe>
but doesn't work on alists
<jackdaniel>
flip214: you may put CASE in the loop to match keys, or alx:switch if keys have a custom test
<kinope>
Do any of the Common Lisp implementations support assigning threads to run on specific cpu cores?
<flip214>
thanks
<p_l>
kinope: I don't think there's anything explicitly made in Lisp-side APIs, but you can easily use CFFI to call out necessary system-level functions
<p_l>
Unfortunately I think every OS out there has its own different API for that
<Xach>
fortunately there are only three OSs
<phoe>
portalib for that when
<phoe>
Xach: glad that someone finally understands me
<Xach>
sunos, solaris, and A/UX
<phoe>
no one needs OSes other than NetBSD, OpenGenera, and Mezzano
<jackdaniel>
and fortunately one of these three OSs is FreeDOS and does not support threads
<phoe>
oh
<Xach>
i'm glad we all chose different niche OSs
hajovonta has joined #lisp
<hajovonta>
hello
<phoe>
hey hajovonta
<kinope>
Okay, thanks!
<hajovonta>
hi phoe
igemnace has quit [Quit: WeeChat 2.9]
pranair has joined #lisp
pranair has left #lisp [#lisp]
choegusung has joined #lisp
<dim>
lparallel might be able to, kinope, but I've not tried it so I'm not sure
hajovonta has quit [Remote host closed the connection]
nicktick has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
wsinatra has joined #lisp
hendursaga has joined #lisp
kaftejiman has quit [Remote host closed the connection]
enrio has joined #lisp
wxie has joined #lisp
yonkunas has joined #lisp
ebrasca has quit [Remote host closed the connection]
terpri__ has joined #lisp
<luna_is_here>
Can I use the same quicklisp installation folder for two CL implementations or will this cause problems?
ChoHag has quit [Ping timeout: 264 seconds]
<jackdaniel>
luna_is_here: you can use the same installation without any problems
terpri_ has quit [Ping timeout: 240 seconds]
<jackdaniel>
asdf creates different cache directories for different implementations
<jackdaniel>
(in other words, fasl files won't clash whatsoever
<jackdaniel>
)
<luna_is_here>
Thanks... Good to know.
<luna_is_here>
For some reason clisp is not happy...
<jackdaniel>
clisp has bundled asdf version which is quite old, old enough to make libraries not load
<luna_is_here>
I see.
<phoe>
you can clone a fresh ASDF and load that with the old ASDF
<jackdaniel>
either take asdf from upstream repository and load it instead, or use one of more popular implementations, like sbcl
<jackdaniel>
no, don't load it with the old asdf
<phoe>
oh!
<jackdaniel>
simply load new asdf with (load (compile-file "asdf.lisp"))
drl has joined #lisp
<luna_is_here>
I usually use SBCL. I just want something less memory hungry (and faster startup) for some small scripts.
dra_ has quit [Read error: Connection reset by peer]
dra__ has joined #lisp
<jackdaniel>
I know that Fare put a lot of effort into upgradability, but 1. it is still broken, 2. it obfuscates asdf beyond compare :)
<jackdaniel>
probably it works better for upgrades between 3.x to 3.y
<jackdaniel>
but still, it compilicates things enormously, so if you can load desired asdf version upfront - simply do it
<jackdaniel>
sbcl is pretty fast with startup (however it is indeed memory hungry)
<jackdaniel>
ccl has smaller footprint, ecl even smaller (however startup and compilation time may be too big for you)
<luna_is_here>
I'll see, whether I can change the asdf of clisp.
enrio has quit [Quit: Leaving]
<jackdaniel>
last time I've checked all worked fine (-eish, clisp seems to be little neglected by library developers when testing)
<pve>
is there some obvious reason for why upgradeability was considered important in ASDF?
gxt has quit [Quit: WeeChat 2.9]
terpri__ is now known as terpri
<jackdaniel>
the reason is because Fare considered it important -- for system which runs for long time without downtime it may be desireable to be able to upgrade asdf to load some new software
<pve>
I see, hmm
dra__ is now known as dra
<jackdaniel>
my opinion on this matter is that a build system should not be part of the final image (like you do not bundle make with your terminal application), and should be loaded only when it is needed (and unloaded / GCed afterwards)
<terpri>
seconding clozure common lisp (formerly openmcl) as an sbcl alternative. not much experience with ecl, abcl, proprietary CLs, etc.
lucasb has joined #lisp
<dlowe>
jackdaniel: next you're going to say that the compiler you used shouldn't be bundled
<jackdaniel>
otoh, when not bundling it, someone may want to maintain a loaded software registry, so that may be duplicating the effort
drl has quit [Quit: Ex-Chat]
<terpri>
i mostly use sbcl but it is a bit slow to start up and indeed a bit resource-intensive
<jackdaniel>
dlowe: no, that's not a next thing I'm going to say, please do not put words in my mouth
<dlowe>
jackdaniel: it's an idiom
<pve>
jackdaniel: if you were able to unload asdf, would that effectively give you upgradeability as well?
<pve>
just thinking out loud..
<phoe>
pve: kind-of-in-theory, you'd also lose all information about already loaded systems though.
<jackdaniel>
dlowe: it might be, still quite provocative / not especially polite, especially that I've explicitly marked it as my opinion, not the "right thing"
<phoe>
and that's somewhat important info to have.
<terpri>
(and i use clisp, but only for command-line hackery, mostly because it has gnu readline built-in...which is in fact *why* clisp is free software :P)
<phoe>
I use `rlwrap sbcl` for all my readline needs
<dlowe>
jackdaniel: please forgive the unintended offense
<jackdaniel>
sure
<terpri>
that works too
tourjin has joined #lisp
<luna_is_here>
Ahhh. Yes. Putting (load "/path/to/asdf.lisp") into .clisprc.lisp fixes.
<luna_is_here>
jackdaniel: Thanks!
<jackdaniel>
I'm glad it worked for you
<pve>
phoe: maybe the you could serialize/save the state before unloading
<luna_is_here>
I should give ecl a try, though.
<phoe>
pve: you've just reinvented upgrading ASDF
<phoe>
except via explicit state dumping/loading, not via UPDATE-INSTANCE-FOR-REDEFINED-CLASS
<terpri>
someone should write a defsystem successor called aoeu :p
<phoe>
aoeiu
<phoe>
oh no
<pve>
phoe: really? asdf seems to be about in-place upgradeability, not unloading
<pve>
not that I've studied the sources that much
<jackdaniel>
yes, it does upgrade in-place
<phoe>
pve: dumping state, unloading ASDF, loading ASDF, and loading state is equivalent to upgrading ASDF in-place
<phoe>
that's if I understood you correctly
<jackdaniel>
and it tries hard not to drop information which was stored at the "old asdf" runtime
<jackdaniel>
like loaded system and alike
<terpri>
fare was also at one point working on an asdf successor(?) called xcvb, dunno what happened with that
<jackdaniel>
while unloading asdf would drop that information
<jackdaniel>
he implemented most of it in asdf 3.x and left suggestions for future features
<terpri>
ah
<jackdaniel>
so xvcb ideas were partially absorbed by asdf
<terpri>
axsvdcfb :)
<pve>
phoe: well, yeah but I'd be curious about having an unload asdf feature
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
<luna_is_here>
Concerning readline in sbcl. There is linenoise (BSD license). Would it be hard to include that into sbcl, to get autocompletion?
<jackdaniel>
luna_is_here: there is lineedit for sbcl
<jackdaniel>
which works well (however afair it had few quirks)
vidak` has quit [Read error: Connection reset by peer]
<jackdaniel>
sombody somewhere sometime ago mentioned, that this library could use some love, but I don't remember details
ahungry has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
<luna_is_here>
Seems to (mostly) work fine.
<luna_is_here>
Okay, my bad. Just works fine, so far.
<luna_is_here>
You should not just copy+paste code without reading what it does... m)
bumblee_ has joined #lisp
<ajithmk>
Peeps who have worked with cffi, if a structure has a simple array inside it like four floats named vec4, how do I send it like this (setf (foreign-slot-value '(:struct blahblah) :vec4) 'whatcomeshere')?
<ajithmk>
I have tried '(0.0f0 0.0f0 0.0f0 0.0f0), #(0.0f0, 0.0f0, 0.0f0, 0.0f0) and (make-array ...)
<ajithmk>
But no luck
gaqwas has quit [Remote host closed the connection]
bhartrihari has left #lisp ["Disconnected: closed"]
<jackdaniel>
how about using (with-foreign-array (no-u-peep #(0x0f0 β¦) 'single-float) (setf (f-s-v <whatever>) no-u-peep))
tourjin has quit [Ping timeout: 256 seconds]
<jackdaniel>
or did cffi use keywords for types? hm
<jackdaniel>
s/0x/0./
<ajithmk>
give me a minute
<jackdaniel>
either way replace 'single-float with a valid cffi type and you should be golden (hopefully!)
gaqwas has joined #lisp
gaqwas has joined #lisp
jeosol has joined #lisp
bhartrihari has joined #lisp
bumblee_ has quit [Quit: Hello my friends. If you want to discover something just check here. https://bit.ly/33tb5lx]
orivej has quit [Ping timeout: 260 seconds]
ayuce` has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
wxie has quit [Ping timeout: 265 seconds]
bhartrihari has joined #lisp
sjl_ has joined #lisp
ayuce has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
ofi has quit [Quit: ERC (IRC client for Emacs 26.3)]
satousan has quit [Quit: WeeChat 2.3]
terpri_ has joined #lisp
kaftejiman has joined #lisp
terpri has quit [Ping timeout: 244 seconds]
tristero has joined #lisp
Retropikzel has quit [Quit: Vision[0.10.3]: i've been blurred!]
bitmapper has joined #lisp
yonkunas has quit [Quit: Connection closed for inactivity]
bsd4me has joined #lisp
wsinatra has quit [Quit: WeeChat 2.9]
wsinatra has joined #lisp
gaqwas has quit [Remote host closed the connection]
philweb has joined #lisp
EvW has joined #lisp
Bit_MCP has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
jeosol has quit [Remote host closed the connection]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
zigpaw has quit [Ping timeout: 240 seconds]
ayuce` has quit [Remote host closed the connection]
zigpaw has joined #lisp
philweb has quit [Remote host closed the connection]
gko_ has quit [Ping timeout: 256 seconds]
ayuce has joined #lisp
<contrapunctus>
Y'all, what does #. mean here? π€ `(defrule inline #. (cons 'or %inline-rules%))`
<phoe>
looks like it has another use in another file.
<beach>
Yep. That explains it.
treflip has quit [Quit: WeeChat 2.6]
puchacz has joined #lisp
enrio has joined #lisp
mingus has quit [Ping timeout: 240 seconds]
jackdaniel has quit [Remote host closed the connection]
jackdaniel has joined #lisp
bsd4me has left #lisp ["Leaving"]
dra has quit [Remote host closed the connection]
ayuce has quit [Read error: Connection reset by peer]
ayuce has joined #lisp
ukari has joined #lisp
<mokulus>
lisp vs haskall?
<Bike>
technical knockout in round six
<phoe>
mokulus: you're asking this question on #lisp, answers will be naturally biased towards Lisp
<Bike>
i don't think it constitutes a question
<phoe>
hey, it has a question mark at the end
<mokulus>
sorry please don't ban
hiroaki has joined #lisp
<mokulus>
i jsut want to learn, not sure which to pick
<phoe>
asking questions ain't a bannable offense here
<Bike>
learn more than one thing.
<phoe>
^
<phoe>
Haskell is a strictly statically typed strictly functional language, whereas Common Lisp is a dynamically typed interactive multiparadigm language
<Bike>
why do so many people come in here asking what the one language they should learn is
<phoe>
so they're pretty different to work with
<phoe>
so learning both is gonna give you more insight than just one
<mokulus>
do you prefer dynamic typing? why?
<phoe>
it's much better suited for the interactive development style that's prevalent in the CL world
<aeth>
scymtym: You definitely can get god objects in CL. I wouldn't be surprised if some of the #lispgames game engines have them. It tends to be really common in that domain because there's so much going on every frame.
<Bike>
means i don't have to worry so much about niggling crap on my first draft
<mokulus>
I don't like it, because when I run a function I don't know what can I do with the result
<Bike>
okay, sounds like you'd prefer haskell then.
<contrapunctus>
Isn't Lisp gradually typed though? Can add type annotations, tell compiler to type check at compile time?
<aeth>
Xach, phoe: The three OSes are Genera, Mezzano, and Closos
<mokulus>
nword? wtf
<Bike>
technically there's no standard way to make declarations into assertions, but sbcl does it
<Bike>
"niggling": causing slight but persistent annoyance
<phoe>
mokulus: I guess that isn't lack of static typing though, that's poor programming style
<Bike>
nothing to do with the slur
<phoe>
usually a function describes what sort of data it returns in its documentation
<aeth>
ajithmk: If you create the array for the API (so not all APIs) you can use static-vectors to create a "bilingual" array that looks like both a CL array and a C array pointer. I think it requires you to control the allocation, though. https://github.com/sionescu/static-vectors/
<phoe>
a function that can return anything is a function useful for very few things
<phoe>
aeth: static-vectors are allowed to be GCed and not GCed; depends on the implementation
<phoe>
so static-vectors' free function must be called for portability, even if it's a no-op on some implementations
<aeth>
phoe: No, I meant that I think that it requires an API like e.g. OpenGL, where you're providing the arrays.
<phoe>
oh! I beg your pardon
<mokulus>
ok but why not have a type with the description? is this because the language is interpreted, so type mismatch would be an error anyway, that is types are only helpful at compile time?
<phoe>
Lisp is compiled
<aeth>
Common Lisp is actually required to be compiled. Some have an interpreter for the REPL, others just compile to /tmp for each expression in the REPL
<aeth>
(And some compilers are just bytecode compilers for an interpreter)
<aeth>
mokulus: If you're seriously deciding between Lisp and Haskell, though, you might want to consider Typed Racket, which is part of Racket (a Scheme) and is thus off-topic here. https://docs.racket-lang.org/ts-guide/index.html
<aeth>
mokulus: You can ask about it in #racket
<phoe>
or otherwise "why dynamic typing" in your favorite search engine
<p_l>
aeth: there's "minimal compilation" which refers to things like running macros etc.
<p_l>
though if you preserve semantics you can do full AST-level interpretation (LW allows that, among other things, useful for debugging)
<aeth>
p_l: I guess it's possible for a naive interpreter to exist past the macro phase, but does one?
<mokulus>
isn't racket only for learning?
<p_l>
aeth: CMUCL and SBCL both have one, though I don't know how well exercised they are (SBCL for a long time had the code commented out)
<phoe>
nope, it isn't
vaporatorius__ has joined #lisp
<contrapunctus>
mokulus: why not go through a Lisp book, make a moderate sized program in Lisp, and figure out for yourself whether or not you like it? π€
<phoe>
there's people doing research and apps in it.
<phoe>
(same as in CL and Haskell)
<Josh_2>
Ello
<aeth>
mokulus: Another statically typed Lisp is called "Shen". This actually compiles to Common Lisp so it's very marginally on topic here. https://github.com/Shen-Language/shen-sbcl
<fwoaroof[m]>
mokulus: so, since Haskell does type inference whenever it can, the textual representation of the program often lacks return types and stuff
<p_l>
Racket, as all Schemes, has less focus on interactive developement
<fwoaroof[m]>
So, when you're reading the code, it may as well be dynamically typed :P
<puchacz>
aeth: has Shen actually got anything to do with Lisp in addition to using it as a platform? I read about it and it felt like totally different language
<fwoaroof[m]>
Write pure functions with type inference, write everything else with Lisp
<stylewarning>
contrapunctus: I donβt blame you, itβs very alpha quality
<contrapunctus>
stylewarning: oh, I figured it was because I didn't know any ML ._.
<fwoaroof[m]>
Cool, my impression is that typeclasses are the worst part of implementing these sorts of type systems
rippa has joined #lisp
<contrapunctus>
I've made a couple Elisp and Scheme programs, and I'm curious to see if type checking can provide any maintenance/tooling benefits.
<fwoaroof[m]>
Figuring out how to have them fall back to a generic function invocation, where feasible, would be interesting
<phoe>
contrapunctus: heavy use of type proclamations in SBCL can provide benefits thanks to its type inference engine
<phoe>
you can, and most likely will, get compile-time warnings in case the type inference engine figures out that there's a mismatch.
<contrapunctus>
Sounds fun.
natter has quit [Remote host closed the connection]
jas-at-re has quit [Ping timeout: 264 seconds]
<stylewarning>
fwoaroof[m]: the trouble is of course a type class that is parametric on the return type
<fwoaroof[m]>
Yeah
<stylewarning>
Consider a type class Readable t which has a function read :: string -> t
<stylewarning>
Ok u get it
<fwoaroof[m]>
I've tried to figure out how to emulate that in CL a couple times
<fwoaroof[m]>
MAP/CONCATENATE make the return type an argument
<fwoaroof[m]>
Which might be a feasible convention?
<sm2n>
you can just use clos generics
<sm2n>
A typeclass is pretty much the same thing as a clos protocol in essence
<fwoaroof[m]>
sm2n: the issue is that generics are only polymorphic on the types or the function's arguments
<bitmapper>
that's... not really the same thing
<stylewarning>
sm2n: no theyβre not
<fwoaroof[m]>
In Haskell, a typeclass can also dispatch on the return type of a function
<sm2n>
oh I see, mea culpa
treflip has joined #lisp
<aeth>
You could just make the first argument an ignorable variable representing the return type.
<aeth>
I make the first argument a continuation in Airship Scheme.
<stylewarning>
CLOS can only compare EQL and types can be complicated nested structures
<bitmapper>
yeah
<mokulus>
which book would be the best for learning lisp? I'm familar with many programming languages, so it doesn't necessarily need to be simple
<phoe>
minion: tell mokulus about pcl
<minion>
mokulus: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<contrapunctus>
stylewarning: MOP doesn't help?
<fwoaroof[m]>
phoe wins...
gaqwas has joined #lisp
<mokulus>
would that be enought, or something after that? I guess getting familar with the hyper spec?
<stylewarning>
contrapunctus: maybe it does, but itβs too complicated and weird. In my opinion, call a spade a spade. If youβre going to write ML/Haskell, write it as it should, and provide a βforeign functionβ interface between ML and Lisp
<fwoaroof[m]>
mokulus: that was enough to get me going
<fwoaroof[m]>
Although, ignore what it says about setting up an environment
<stylewarning>
(for something like Coalton, the hope is that the ML is embedded, and interacts with the lisp system as cleanly as possible)
<fwoaroof[m]>
Use portacle.github.io instead of Lispbox/Lispstick or whatever
<mokulus>
I'm fine with no completion, just editing text
<fwoaroof[m]>
Or, if you'd rather not use Emacs, the Atom or vim plugins might work, but they're more work to get started with
<fwoaroof[m]>
(I got started using slimv)
<sm2n>
mokulus, the experience isn't complete without a repl
<fwoaroof[m]>
Indentation and parentheses management is also important
<stylewarning>
mokulus: you need to get into slime / derivative as quickly as possible
<phoe>
^
<phoe>
slime is love, slime is life
<mokulus>
nah i don't like emacs
<phoe>
vlime or slimv or slyblime or atom-slime then
<stylewarning>
Not because youβre not a good enough programmer or because we canβt manage barebones setups
<phoe>
programming lisp without an interactive programming environment is pointless
puchacz has quit [Remote host closed the connection]
<fwoaroof[m]>
Lispworks just released a new Personal Edition too
<mokulus>
so is lisp a "meme"?
<fwoaroof[m]>
But, as nice as the commercial versions of Lispworks are, the PE is infuriating
<treflip>
I heard that they are selling "hobby" edition for $500
<fwoaroof[m]>
If you want to deliver applications it's 1500
<fwoaroof[m]>
... I think I'm wrong
<fwoaroof[m]>
I'm right
<stylewarning>
mokulus: Lisp is a fruitful progenitor of memes
<fwoaroof[m]>
Anyways, the prices make sense: it's a small company and they need to pay their employees
<phoe>
mokulus: it partially is
<fwoaroof[m]>
Plus, they're actually pretty low for commercial programming environments
<treflip>
Especialy memes about how bad are all non-lisp languages :)
<fwoaroof[m]>
:)
<phoe>
my personal opinion is that people like PG or ESR contributed to that fact by marketing Lisp as God's programming language that causes spurious enlightenment and is a magic wand and secret sauce and what not
<mokulus>
ok be real with me, am I wasting my time with lisp or not???
<fwoaroof[m]>
no
<phoe>
no
<gaqwas>
mokulus, hell, no
<fwoaroof[m]>
You might not be able to get a job writing Lisp, but it improved how I write other languages
mankaev has joined #lisp
<fwoaroof[m]>
And how I think about programming
<phoe>
it's one amazing programming language that I use wherever I can.
<fwoaroof[m]>
Also, the answer to "Lisp or Haskell?" is "Why not both?"
<philweb>
phoe: in fairness, back when they were evangelizing it... it was, relatively speaking (vs most other languages/environments)
<fwoaroof[m]>
And throw Prolog into the mix too
<phoe>
philweb: could you elaborate a bit more?
Inline has joined #lisp
mankaev has quit [Client Quit]
mankaev has joined #lisp
<stylewarning>
mokulus: I wrote a draft article I hope to publish at some point that talks about what I think about lisp, βtaking a step backβ, and forgoing all the fluff of the 90s
<fwoaroof[m]>
Yeah: also, my impression is that the community today is a lot friendlier than it was 20 years ago
<mokulus>
what fluff?
<philweb>
back in the 90's and earlier, other languages and environments had virtually none of the advantages of dynamic languages like lisp/smalltalk. so the contrast between them was very stark. over the last 20 years, many languages have picked off a lot of the features that used to be exclusive to dynamic languages (granted, they often have to be
<philweb>
implemented in a very ugly way to make it work)
<stylewarning>
mokulus: there are lots of articles written in the 90s-00s, and an ethos more generally, that lisp is this maximal state of enlightenment and everybody else who doesnβt use lisp must be an idiot or lowlife
<fwoaroof[m]>
mokulus: the PG essays are a bit over-exuberant about Lisp
<fwoaroof[m]>
I also agree with philweb
<treflip>
Wow, it's a great qoute for trolling non-lisp programmers...
<stylewarning>
mokulus: explaining why some people thought that (they *did* think that for a variety of reasons) is another topic, but that thinking has poisoned the well for many newcomers
<stylewarning>
happy to receive all forms of feedback (in PM or email though please)
<philweb>
and if you go back to the 80's, lisp/smalltalk were positively magical vs the competition. the problem was the compute/memory requirements greatly exceeded what most of us had available (even working in most businesses)
<mokulus>
what about scheme?
<stylewarning>
Whenever itβs done it probably will be published as an ordinary blog posts not some kooky pdf
<stylewarning>
mokulus: what do you want to know about scheme
<mokulus>
how does it compare with lisp, that is why use cl over scheme?
<stylewarning>
mokulus: scheme is really more of an idea and less of a language. There *is* a scheme standard, but itβs so barebones that every implementation of scheme is mutually incompatible
<phoe>
stylewarning: thanks, will read.
<stylewarning>
mokulus: scheme systems are super opinionated about things that matter when writing big programs: how modules work, how macros work, how you make a program efficient, etc. and everybody decides these things differently
<stylewarning>
mokulus: so at the end you donβt really have a thriving scheme ecosystem, you more have a handful of βself-sufficientβ scheme tribes and dialects
shifty has joined #lisp
<stylewarning>
Common Lisp has one and only one standard, and everybody agrees on it, and the standard is large enough to build useful applications, from tiny utilities to multi-million dollar pieces of enterprise software
<Inline>
the wild bunch
<Inline>
lol
yonkunas has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
<stylewarning>
(There is a subset of Common Lisp and the subset of Scheme that provide the same functionality, and arguably Scheme is much more elegant and prettier. But thereβs also just a million things Scheme canβt do at all.)
<stylewarning>
Maybe a bit of a poor comparison: scheme is like a nice, razor sharp, clean chefβs knife with no patina; Common Lisp is more like a multitool with some scratches, that happens to include a reasonably sharp knife
kaftejiman has quit [Remote host closed the connection]
<aeth>
In particular, the problem with portable Scheme was the lack of a portable library system. It's still there with popular Schemes, of course, but now quite a few support R7RS libraries.
<aeth>
Even ASDF systems among CLs was a hard problem, leading to UIOP. With Scheme it's harder.
<aeth>
As for capabilities, Scheme (well, *a* Scheme) should be able to do everything that Common Lisp does pretty soon.
<aeth>
At about the same speed as SBCL, too. :-)
<phoe>
obviously you mean airship scheme, don'tcha
<contrapunctus>
aeth: "pretty soon" π
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
<phoe>
contrapunctus: no, it's a tricky statement
<phoe>
aeth is working on a Scheme implementation in CL with CL interoperability
<contrapunctus>
I know
<contrapunctus>
Hence the quotes around 'pretty soon', because it rather sounded like the project is some time away from production ready π
vaporatorius__ has quit [Ping timeout: 264 seconds]
VincentVega has joined #lisp
<aeth>
I won't make it 1.0 before R7RS-large because any R7RS-large SRFIs being withdrawn and replaced (one or two already afaik) will break the public API... and that has been in progress since 2010. So if 1.0 is production ready, then it won't be for a long time, but that's not up to me.
gaqwas has quit [Remote host closed the connection]
ajithmk has quit [Quit: Connection closed for inactivity]
<contrapunctus>
Fair
<VincentVega>
Hi all! If I make class B inheriting from A, is there a way to easily initialize a A's slot with some different initial value or do I have to write initialize after for B and setf the value there?
<Bike>
VincentVega: you can do (defclass b (a) ((the-slot :initform whatever)))
<Bike>
all the other aspects of the slot will be inherited as usual
<VincentVega>
Bike: awesome, thanks!
<Bike>
happy to be of service
treflip has joined #lisp
<Xach>
another option is :default-initargs
<Xach>
i try to use that more often than the other way.
<VincentVega>
Xach: I am trying (defclass b (a) () (:default-initargs . (var 2))) but it gives me invalid initialization argument error...
EvW has joined #lisp
<VincentVega>
when I tried to run the code that is
Sauvin has quit [Read error: Connection reset by peer]
sjl_ has quit [Ping timeout: 260 seconds]
treflip has quit [Quit: WeeChat 2.8]
<VincentVega>
Xach: o nvm, it should've been (:default-initargs :var 2), thanks!
<stylewarning>
aeth: just call it 1.0 when it can do good stuff and not break
<stylewarning>
Donβt fall trap to staying in v0.7858 forever
<fwoaroof[m]>
VincentVega: if you go the :initform route, make sure THE-SLOT is a symbol in the right package
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
philweb has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 246 seconds]
<aeth>
stylewarning: that's 0.1, not 1.0
bsd4me has joined #lisp
<stylewarning>
aeth: depends if you want good PR or not
<aeth>
stylewarning: I might skip 1.0 for 2020.x, though :-p
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
gravicappa has quit [Ping timeout: 240 seconds]
<contrapunctus>
Ever since I started writing my first CL program I've been keeping a list of projects I want to improve the documentation for.
<contrapunctus>
It's growing rapidly π
<Josh_2>
yes xD
orivej has joined #lisp
<VincentVega>
fwoaroof[m]: oh, ok, I will keep that in mind
galex-713_ has joined #lisp
galex-713 has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
<jmercouris>
so I have class B that inherits from class A
<jmercouris>
when I redefine class A, I want class B to update too
<jmercouris>
how to do this?
dominic34 has quit [Ping timeout: 240 seconds]
<jmercouris>
is this not possible?
rumbler31 has quit [Ping timeout: 260 seconds]
<fwoaroof[m]>
contrapunctus: it's an unpopular opinion, but I prefer to read code every time :)
<fwoaroof[m]>
High-level documentation is occasionally useful, but I'd usually rather see sample code
<fwoaroof[m]>
And 90% of the time I M-. to learn how to use a library.
<fwoaroof[m]>
(even when there's documentation: unless you have some way to automatically make sure your documentation is correct, I find that most documentation lies about 6 months after it was written)
<jmercouris>
the only documentation I give the benefit of the doubt to is docstrings, and mostly only in our codebase
epony has quit [Ping timeout: 258 seconds]
<fwoaroof[m]>
Yeah, I've been trying to figure out a nice way to specify docstrings in an executable format that can be stringified to something useful
<fwoaroof[m]>
doctests for sample invocations are one way to go, but I'd prefer to avoid parsing code out of docstrings
<jmercouris>
Look at our codebase
Guest84 has joined #lisp
<jmercouris>
we have code samples in our docstrings
<jmercouris>
we just write `(code "lol")'
<fwoaroof[m]>
next browser?
notzmv has joined #lisp
<jmercouris>
Yes, Nyxt
<jmercouris>
new name
<fwoaroof[m]>
cool
<jmercouris>
if you do describe command or something
<jmercouris>
I'll show you one second
dilated_dinosaur has quit [Ping timeout: 244 seconds]
Guest84 has quit [Quit: Connection closed]
VincentVega has quit [Remote host closed the connection]
<jmercouris>
source for the function is embedded within a object that represents the documentation
<jmercouris>
we do also show formatted source in other ways
mfiano has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 260 seconds]
<fwoaroof[m]>
That's sort of cool
<contrapunctus>
fwoaroof[m]: maybe it's because I'm not a professional programmer, but if I come back to my own code a few months later, on a program as small as 2k SLOC, I've often forgotten why certain design decisions were taken, or how a certain functionality works (which is why I write explanation docs), or that I've already written the function I'm writing (...reference docs). Many programs have reference docs b
<contrapunctus>
ut no how-tos, which is a total pain when you just want to get task X done _now._ (...so I write how-to docs).
<fwoaroof[m]>
I'd like a more structured way to express docstrings: something like #.(stringify '(:function (FOO ARG1 ARG2)) :returns ... :params ...))
<fwoaroof[m]>
contrapunctus: I am too, at a company that basically never documents anything
<fwoaroof[m]>
*any code
<fwoaroof[m]>
New people often complain, but we've found that they eventually come around :)
cantstanya has joined #lisp
sjl_ has joined #lisp
<contrapunctus>
I also find reference docs invaluable in helping me improve API design (names, signatures, return values...)
<pve>
fwoaroof[m]: could you programmatically append stuff like function signature to the docstrings?
<fwoaroof[m]>
I think so
<fwoaroof[m]>
If you shadowed DEFUN, you could make the docstring portion much more structured
<jmercouris>
I don't shadow defun, instaed introduce a new constract that emits a defun and a corresponding object relating to its structure
<pve>
or a separate "signature" macro could both declaim ftype and add something to the docstring
<pve>
or was the point here that all that should be inside the docstring?
enrio has quit [Ping timeout: 256 seconds]
jas-at-re has joined #lisp
<fwoaroof[m]>
The point is to generate docstrings
<fwoaroof[m]>
from structured code that can be automatically verified
Tordek has joined #lisp
vert2 has joined #lisp
<pve>
oh, you mean literally generate docstrings, yeah that would be cool
terpri__ has joined #lisp
terpri_ has quit [Ping timeout: 244 seconds]
terpri__ has quit [Remote host closed the connection]
terpri__ has joined #lisp
EvW1 has joined #lisp
mfiano has joined #lisp
C-16 has quit [Quit: leaving]
galex-713_ has quit [Ping timeout: 246 seconds]
galex-713 has joined #lisp
heisig has quit [Quit: Leaving]
wsinatra has quit [Quit: WeeChat 2.9]
theseb has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
Necktwi has joined #lisp
elflng has quit [Read error: Connection reset by peer]
epony has joined #lisp
elflng has joined #lisp
bsd4me has quit [Remote host closed the connection]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
asarch has quit [Quit: Leaving]
v3ga has quit [Ping timeout: 240 seconds]
dra_ has joined #lisp
dra_ is now known as dra
astronavt___ has quit [Quit: ...]
astronavt has joined #lisp
elflng has quit [Ping timeout: 260 seconds]
astronavt has quit [Disconnected by services]
Lord_of_Life has quit [Read error: Connection reset by peer]
Lord_of_Life has joined #lisp
elflng has joined #lisp
gioyik has joined #lisp
gaqwas has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 256 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
quazimod1 has quit [Ping timeout: 260 seconds]
cosimone has quit [Ping timeout: 260 seconds]
bsd4me has joined #lisp
cosimone has joined #lisp
dilated_dinosaur has joined #lisp
sjl_ has quit [Quit: WeeChat 2.3-dev]
<drmeister>
Hey folks. Over in #clasp we are developing a new Common Lisp implementation called 'clasp' and an extended version for computational chemistry called 'cando'.
<bjorkintosh>
is cando also a mix of c++ and commonlisp?
<drmeister>
We are also developing a web based user interface based on common-lisp-jupyter. Tarn Burton, the developer of common-lisp-jupyter has been adding autocompletion of symbols, auto-indenting, and contextual help.
<drmeister>
The jupyterlab kernel is getting me really excited - with the autoindenting (put the cursor on a parenthesis and hit tab) you can actually start to write code in the thing.
ahungry has quit [Remote host closed the connection]
<p_l>
drmeister: cool :)
<bjorkintosh>
drmeister, is there a 101 intro to computational chemistry around? I know zero about the topic.
<fwoaroof[m]>
drmeister: cool, I've tried to build clasp locally several times and always get build errors
<fwoaroof[m]>
But, I like the idea of a lisp that can leverage LLVM for interop
<drmeister>
fwoaroof[m]: Yeah - we struggle with that. There be dragons and dependencies.
<drmeister>
We have Dockerfile(s) and guides if you want to try again.
<drmeister>
New news - we have clasp working with the Memory Pool System copying garbage collector.
<drmeister>
Next I'll be adding image save/load.
<fwoaroof[m]>
Cool, maybe I'll give it a go this weekend
galex-713_ has quit [Remote host closed the connection]
<bjorkintosh>
However, computational chemistry was not generally thought of as its own distinct field of study until 1998, when Walter Kohn and John Pople won the Chemistry Nobel for their work on density functional theory and computational methods in quantum chemistry.
<bjorkintosh>
that's very recent!
<bjorkintosh>
it's in its infancy!
<bjorkintosh>
how neat!
niceplace has quit [Ping timeout: 240 seconds]
<drmeister>
bjorkintosh: Yes - I'm developing a common lisp implementation to do so.
<drmeister>
Because there is a lot of C++, C and Fortran code out there that you want to be able to work with.
niceplace has joined #lisp
<drmeister>
And I didn't want to spend my life writing CFFI bindings.
Bit_MCP has joined #lisp
<drmeister>
So instead I'm spending my life implementing Common Lisp. (sigh)
<bjorkintosh>
oh dear.
<bjorkintosh>
you need assistants!
<drmeister>
I do!
<bjorkintosh>
aren't there grants to pay for MOAR of those?
<drmeister>
Yes - and we have some.
<drmeister>
There are challenges as well. Many in my field have invested heavily in Python for scripting.
<drmeister>
So we are building an entire software stack with a very small team. We are doing everything from low level compiler optimizations to web-based graphical user interfaces.
<drmeister>
And we are developing applications within it. There are several demos in our docker image: thirdlaw/cando
quazimodo has joined #lisp
<fwoaroof[m]>
drmeister: I've experimented with the opposite approach: using https://github.com/froggey/Iota to compile LLVM bitcode to Lisp
<fwoaroof[m]>
It's probably more performant to go your way, though
quazimod1 has joined #lisp
quazimodo has quit [Ping timeout: 264 seconds]
<drmeister>
I dunno about performant - the devil is in the details and there are a lot of details in a full Common Lisp implementation.
<drmeister>
But because we use the LLVM C++ API we can keep up with LLVM changes better than anyone.
<drmeister>
Because the code breaks when they (llvm developers) make changes and they make a lot of changes - and then it behoves me to update our code to keep up to date. I've kept with them from version 3.6 to 9 and I'm anxiously waiting for new changes coming in llvm12 (cross-fingers) that will make it easier to support Common Lisp.
vidak` has quit [Remote host closed the connection]
<drmeister>
The llvm JIT has gone through four vastly different API's since version 3.6.
<drmeister>
The original JIT, MCJIT, ORCV1 and now ORCV2
<drmeister>
It's still very much a C/C++ oriented backend. But new changes that are coming will enable reloading of code in a way that will make it better for a more dynamic language like Common Lisp.
<fwoaroof[m]>
Cool, I like the emscripten-style approach because then CL has more control
<fwoaroof[m]>
So, you can avoid segfaults and similar
quazimod1 has quit [Ping timeout: 240 seconds]
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
Bit_MCP has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
pve has quit [Quit: leaving]
kaftejiman has joined #lisp
torbo has joined #lisp
torbo has quit [Remote host closed the connection]
torbo has joined #lisp
tristero has quit [Quit: WeeChat 2.8]
random-nick has quit [Ping timeout: 240 seconds]
ayuce has quit [Remote host closed the connection]
Oladon has joined #lisp
CrazyEddy has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
mangoicedtea has joined #lisp
Posterdati has quit [Ping timeout: 246 seconds]
kaftejiman has quit [Remote host closed the connection]
yitzi has joined #lisp
dilated_dinosaur has quit [Ping timeout: 260 seconds]
bilegeek has joined #lisp
Posterdati has joined #lisp
cjb has joined #lisp
<dim>
drmeister: do you have a time frame in mind, or a target version number I could check, for clasp image save/load feature? I mean I could then maybe try and compile pgloader with clasp and see if your new GC beats the SBCL one...
<dim>
(we keep having issues with SBCL GC where we exhaust the heap with pgloader, and I don't know if pgloader is putting too much pressure because of bad code or just because of what we do: data processing) (also Clozure has no trouble with pgloader, as a data point)
cosimone has quit [Quit: Quit.]
dra has quit [Remote host closed the connection]
<drmeister>
dim: No time frame but it's a high priority. I would say weeks maybe? Not months.
<drmeister>
Cando takes 25 seconds to start up on my macbook pro and I despise that that is every persons first impression of the system.
ahungry has joined #lisp
<drmeister>
dim: Wait - why do you need image save/load to run pgloader?
<drmeister>
Clasp works with MPS now.
<drmeister>
Clasp just takes 2-3 seconds to startup.
galex-713 has quit [Ping timeout: 246 seconds]
yitzi has quit [Quit: yitzi]
<drmeister>
The image save/load is to shorten the startup time for cando. Cando is a version of clasp that adds lots of C++ chemistry code and a whole lot of quicklisp systems.