phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
catchme has joined #lisp
<no-defun-allowed> ML in python would be slow without C extensions
<no-defun-allowed> there's some ML libraries in CL without C, I am finishing up a deep network library with Petalisp, and GPU programming can be done in "Lisp" using oclcl
<aeth> Isn't ML just essentially running CUDA or OpenCL (nothing to do with CL as in Common Lisp) or similar?
Fare has quit [Ping timeout: 246 seconds]
<aeth> I'd be interested in seeing a proper abstraction over SPIR-V so Lisp-like GPU-oriented languages can compile down to it.
<Bike> what do you mean "proper abstraction"
<no-defun-allowed> yeah, but most people abstract the GPU (or TPU i guess?) as a machine that does matrix multiplication and element-wise sigmoids, adds and multiplies
<verisimilitude> That would be amusing, at the least, using a Lisp for that idiotic idea of ``machine learning'', when it's more suited to proper symbolic manipulation.
<aeth> Bike: I was being intentionally vague because there are several ways to do it.
<Bike> mostly i mean what's wrong with spir-v
<aeth> Bike: SPIR-V would be the target, yes.
<no-defun-allowed> indeed, but symbol manipulation doesn't make much sense in a high performance matrix library, and you can't get the kids hooked on calculating derivatives unfortunately unless they're maxima users
<no-defun-allowed> well, the IR is SSA like LLVM which isn't very lispy (i have a library that converts trees to LLVM IR/SSA for that reason)
<Bike> why does there have to be an abstraction over it
<Bike> say something concrete
<no-defun-allowed> cause who the hell would want to write lisp in SSA form
<aeth> no-defun-allowed: In CL, you have far more abstractions available to you than in most other languages for dealing with things like e.g. GPU shaders. This is because you can transform arbitrary s-expressions into just about anything you want. Other approaches would probably be string-to-string or heavily object-oriented (not too unlike a database ORM) or similar messes.
<Bike> obviously you woulc ompile the lisp like language to ssa
<aeth> verisimilitude: Common Lisp has been an acceptable FORTRAN for years at this point, especially SBCL. It's not just symbolic.
<no-defun-allowed> of course, which is what i believe the abstraction part is
<Bike> why a proper abstraction being compiled down to, then
<aeth> Bike: At the moment, most SPIR-V tools are LLVM and/or C++ oriented. Targeting SPIR-V properly from CL involves a lot more than e.g. targeting GLSL properly (really, that can just be generating a valid source string). Just look at https://www.khronos.org/spir/ and then https://www.khronos.org/assets/uploads/apis/2018-spir-api-ecosystem.jpg
<Bike> i kind of doubt spir-v is going to be separate from llvm
<verisimilitude> I was simply attacking the idea of ``machine learning'' itself, Bike.
<verisimilitude> It's a misguided approach.
<Bike> er, what? i wasn't talking to you
<aeth> verisimilitude: The way you harmonize symbolic behavior with numeric behavior is by writing some pretty low level CL. (SBCL works pretty well with the structs-of-arrays low-level pattern, and nothing is stopping other implementations from similarly optimizing.) You then abstract over these low-level details, including via macros, getting something pretty high level, as if you wrote your own programming language to solve the problem.
<verisimilitude> Oh, I meant to address aeth. That's my mistake, Bike.
<Bike> ah
<aeth> Not really a particularly good solution for ML in particular, though, because afaik serious ML is done on GPUs, so you'd need to write your own GPU-mini-Lisp.
<no-defun-allowed> yeah, ML is a mess of (mostly) linear algebra which usually works
Oladon has joined #lisp
<no-defun-allowed> though, i wonder how hard writing a petalisp backend is, probably too hard for me, but running it on a GPU should be possible i think if you can copy over all the GPU-used functions too
<aeth> You wouldn't want to put a proper Lisp on the GPU because proper GPU programming is all about knowing when to do things on the CPU and when to do things on the CPU. Implementing it as a DSL in CL means you can do all the macros, list processing (probably for the macros), etc., on the CPU in CL.
<no-defun-allowed> of course, i'm suggesting a backend for a matrix processing library that offloads work to the GPU
<aeth> I'm not sure about GPU compute, but GPU graphics shaders definitely have a "program" metaphor that imo is unnecessary. Why not just define-shader-function etc.?
<aeth> The whole thing is structured for familiarity for C programmers, but it's pretty far from PDP-11 so it's imo pretty weird imo to see things like a main()
grewal has quit [Quit: leaving]
<no-defun-allowed> makes the C++ people feel fuzzy inside, and makes the interface fuzzy for everyone else
<no-defun-allowed> *first fuzzy => warm and fuzzy
Lord_of_Life_ has joined #lisp
<aeth> More "UNIX philosophy" than C++. It's pretending you're doing something Unixy with independent programs like: head -n 42 foo.txt | grep bar
Quasus has joined #lisp
<no-defun-allowed> sure, guess i was thinking of the rest of OpenCL syntax more
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
lumm has quit [Quit: lumm]
<aeth> GLSL for GPU shaders is kind of strange. Every shader stage has its own main() but then you link them. But you'd just get a multiple main()s issue if you tried that with GCC and C... so it's inconsistent in its C-like behavior. Shaders aren't programs!
<tsizz> common lisp is newer than scheme
<tsizz> i thought it was the other way
<aeth> tsizz: Common Lisp is mostly compatible with the historic Lisps, so it seems more archaic than Scheme, which broke compatibility with historic Lisps and even itself.
<Josh_2> How can I check if a variable is unbound?
<aeth> tsizz: Common Lisp is a primarily a replacement for Maclisp and Interlisp, which predate Scheme, and Lisp Machine Lisp, which apparently came out in the same year as Scheme. See the timeline at https://en.wikipedia.org/wiki/Maclisp#History
<verisimilitude> Use BOUNDP, Josh_2.
<aeth> (actually that timeline only goes 5 years at a time so I'm not sure which is first)
<Josh_2> verisimilitude: thanks :)
<aeth> tsizz: So there's a lot of that 1966 Maclisp heritage in Common Lisp.
<tsizz> but i live in america and newer is always better!
<Josh_2> its (declare (ignore <var>)) right?
<Josh_2> hmm verisimilitude even with (boundp I still get an unbound-variable condition
<Josh_2> I am checking if the variable is bound before I do anything to it
<verisimilitude> QUOTE it.
<Josh_2> ah
<Josh_2> Perfect thanks
<aeth> tsizz: Newer is definitely always better for programming languages... because that way you can't use anyone else's code and have to write all of the key libraries yourself!
TMA has quit [Ping timeout: 244 seconds]
<tsizz> aeth: hahha oh no
<tsizz> aeth: since ur saying that tho, i feel like current languages do have way better support, but im not sure
<aeth> tsizz: Current languages? Most new languages either have nothing or they're backed by Google, Apple, Microsoft, etc. Many are built on the JVM so they can just use Java libraries.
TMA has joined #lisp
<tsizz> well not new but newer like python/js
<tsizz> both have shit ton of libaries
<aeth> Python is from 1990.
<aeth> JavaScript has a ton of libraries because its bar for "library" is much lower. A single function can be a library in JS land.
<aeth> (Okay, CL has one popular library that comes close to that: split-sequence, but it's very non-trivial and it has three functions.)
<Josh_2> xD
<verisimilitude> Common Lisp wasn't designed in a week and wasn't designed solely by people who had no place designing a language.
<verisimilitude> Not counting Ada revisions, I'm not aware of a single new language that is worthwhile.
aautcsh has joined #lisp
<tsizz> Josh_2: discord bot easier than i thought
<Josh_2> Nice
<tsizz> at least for commands lol
<aeth> verisimilitude: The ML family of languages (and influenced languages like Haskell) have some interesting ideas. There are also some specific language features that might be interesting, such as async.
<verisimilitude> Those qualify as new?
aautcsh has quit [Quit: Textual IRC Client: www.textualapp.com]
<aeth> In #lisp yes MLs qualify as new :-p
<aeth> Looks like Standard ML is 1983 so it predates CL by a year, though. Haskell is 1990, OCaml is 1996.
<aeth> But their way of thinking wasn't fashionable until well after the 90s.
<aeth> Another language of potential interest for proglang design features is Erlang (1986). I'm probably missing a few more, but quite a few interesting languages are pre-1984 languages.
igemnace has quit [Quit: WeeChat 2.4]
<verisimilitude> If we're just listing neat languages now, don't forget about Forth and APL.
<aeth> The 1990s were mostly about web-oriented Unix scripting languages... exactly the sort of thing you'd probably not call interesting, e.g. most of the ones here: https://en.wikipedia.org/wiki/History_of_programming_languages#1990s:_the_Internet_age
<aeth> s/not call interesting/call not interesting/
<verisimilitude> s/not interesting/uninteresting/
<aeth> verisimilitude: Just looking at that history page... Forth is 1970, APL is 1962, Smalltalk is 1972, Prolog is 1972, SQL is 1978... all of which might be interesting even to a CL programmer. I was trying to exclude languages that weren't "new", relatively speaking.
<verisimilitude> Okay.
<aeth> Julia seems to be the only really new (released this decade, specifically in 2012) major language that interests Lispers.
<aeth> I don't really see what others seem to see in it, though. It's dynamically typed but the fast numerical code that does well in benchmarks uses type declarations... exactly like SBCL.
Fare has joined #lisp
<xristos> Julia is not a lisp so how could it interest lispers? ;p
Achylles has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 246 seconds]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #lisp
Oladon has quit [Quit: Leaving.]
Hexstream has joined #lisp
<Hexstream> Check out the Common Lispers list! Discover Common Lisp open-source contributors and their best contributions! Add yourself! Gone are the days of toiling in obscurity, now everyone has a chance! We're ushering in a new era of unprecedented discoverability!
MightyJoe has quit [Ping timeout: 245 seconds]
cyraxjoe has joined #lisp
ricekrispie has joined #lisp
__jrjsmrtn__ has joined #lisp
<pjb> Hexstream: thanks.
<pjb> Once we've done (ql-dist:install-dist "http://dist.ultralisp.org/" :prompt nil), how can we select it as default distribution for ql:quickload?
<Hexstream> No problem!
<stylewarning> Hexstream: neat website
<Hexstream> Thanks!
Aruseus has quit [Remote host closed the connection]
<Josh_2> agreed looks good
Fare has quit [Ping timeout: 250 seconds]
<xristos> Hexstream: the MOP page is an assault on the eyes, too much visual noise for me
<xristos> is there a simpler view?
<Hexstream> The "barren" setting is a planned feature, but unfortunately won't happen soon. My version has always contained 148 "RS" links to easily get to the corresponding section in Robert Strandh's more barren version.
voidlily has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
Essadon has quit [Quit: Qutting]
voidlily has joined #lisp
<LdBeth> Good evening
Quasus has quit [Ping timeout: 245 seconds]
dale has joined #lisp
Fare has joined #lisp
notzmv has quit [Ping timeout: 250 seconds]
__jrjsmrtn__ has quit [Quit: ZZZzzz…]
catchme has quit [Quit: Connection closed for inactivity]
pierpal has quit [Quit: Poof]
patrixl has joined #lisp
pierpal has joined #lisp
joaj has quit [Ping timeout: 272 seconds]
<patrixl> hi everyone
rumbler31 has quit [Remote host closed the connection]
<LdBeth> Hi patrixl
<patrixl> hi LdBeth
ricekrispie2 has joined #lisp
<patrixl> I'm trying to use cl-sqlite on my Mac, as part of using Radiance. So Radiance + cl-sqlite needs regex support in sqlite, which is fine I can install it, however.....
<patrixl> the default macos installation of sqlite does not support load_extension
ricekrispie has quit [Ping timeout: 245 seconds]
<patrixl> so I installed one with brew which supports it, and compiled regex support for that one and it works
<patrixl> but it seems like cl-sqlite still uses the default sqlite and not the one compiled with brew. Not sure if I can somehow make it use the newer one?
<patrixl> hopefully someone here has similar experience and can help... otherwise I'll have to dig in and figure it out ;)
Hexstream has left #lisp [#lisp]
<LdBeth> patrixl: make sure PATH has been setup properly
<patrixl> right, well as far as I can see, cl-sqlite is usinf cffi, so I would assume that it would need to find the correct libraries when cl-sqlite is being compiled?
<jackdaniel> Hexstream: is there exclusion policy? while I appreciate the effort I have mixed feelings about such data aggregation and public release without my consent
<xristos> patrixl: cffi:*foreign-library-directories*
<patrixl> ohhh ok let me have a look at that
<LdBeth> I think if you’ve install brew into /usr/local there should not be a problem
<patrixl> ah it is, because brew refuses to "replace" the system's sqlite with its own
<LdBeth> Maybe u want to clean ~/.cache and try reload
<patrixl> becuase it doesn't want to break xcode or whatever reason brew does what it does
equwal has joined #lisp
<patrixl> ok let me try to clear the cache ,and try what brew is suggesting, see if cl-sqlite can find the correct libs this time
<patrixl> if not, then you would recommend adding brew's sqlite lib path to cffi:*foreign-library-directories*?
<patrixl> oh wow ok that worked without messing with that variable
<patrixl> so what I was forgetting yesterday was clearing the cache.. duh.. thanks LdBeth
<LdBeth> That’s good
<patrixl> yeah!!! now I am actually hitting bugs in Radiance, so at least I can move forward lol
<Josh_2> anyone know how to send a mouse click event with Xlib? am using (xlib:send-event :pointer-window :button-press 256 :display display) but I get no-applicable-method :O
<Josh_2> I'm looking at docs but I don't understand xD
<patrixl> oh and thanks xristos sorry I wasn't looking at individual names for every message
Bike has quit [Quit: Lost terminal]
caltelt_ has joined #lisp
wigust- has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
wigust has quit [Ping timeout: 246 seconds]
<equwal> Is is possible to have an immutable variable? So (and (setf *five* 5) (setf *five* 6)) will give an error? I can make immutable structures with defstruct, but I can't store them.
<equwal> So (defstruct immutable (value nil :read-only t)) does about half of what I need.
<xristos> defconstant
<equwal> Ah yes, thanks.
sauvin_ has joined #lisp
sauvin has quit [Ping timeout: 250 seconds]
sauvin_ has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
mange has joined #lisp
caltelt_ has quit [Ping timeout: 246 seconds]
_whitelogger has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
<pjb> equwal: well, defconstant defines a constant variable, which is a variable with a constant binding. However this constant binding can be made to a mutable object!
<pjb> equwal: (defconstant +cell+ (cons nil nil)) (setf (car +cell+) 42) +cell+ #| --> (42) |#
<stylewarning> Coalton now has basic pattern matching. (Not as expressive as a full fledged ML or Haskell but it’s getting there.) https://github.com/stylewarning/coalton/blob/master/src/library.lisp
<stylewarning> COALTON:IF can now be defined as a macro which is cool.
sauvin has quit [Ping timeout: 255 seconds]
sauvin has joined #lisp
patrixl has quit [Remote host closed the connection]
patrixl has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
dale has quit [Quit: dale]
<equwal> pjb: I was thinking of using the defstructs to solve that issue.
<stylewarning> absolutely forcing something to be immutable is pretty futile
<stylewarning> it's better to just design an API that discourages mutability, e.g. by making copies, not exposing accessors, etc.
<equwal> stylewarning: I agree.
patrixl has quit [Remote host closed the connection]
beach has joined #lisp
<beach> Good morning everyone!
nanoz has joined #lisp
<MichaelRaskin> Good morning.
<beach> MichaelRaskin: I assume you will be at ELS, yes?
<MichaelRaskin> Yes
<beach> Great!
<Josh_2> beach: do you know how to send a mouse button click event with xlib?
<beach> Not by heart. But there should be some send-event equivalent I think.
<MichaelRaskin> Josh_2: I would look at xdotool source
Arcaelyx has quit [Ping timeout: 250 seconds]
<MichaelRaskin> beach: well, if I were _not_ coming it would mean I managed to get a committment to Lisp out of my coauthor. Which would also be great.
<Josh_2> beach: it is send event I have (xlib:send-event :pointer-window :button-press 256 :display display) but that is very much not working
<beach> MichaelRaskin: Heh. Who is your coauthor?
<MichaelRaskin> Josh_2: I would start with button <128
<Josh_2> I just get no-applicable-method-error
<beach> Josh_2: Oh, I see. Sorry to hear that. Not sure what the problem might be.
<beach> Are you sure about the signature of that function?
<gilberth> Is that really ":pointer-window"?
<beach> Yes, exactly my question.
<Josh_2> i don't know
<MichaelRaskin> beach: a PhD student here in Munich, he was given some projects about verifying mutex algorithms in various settings, and I had some code for playing with first order proofs, and so we decided to start with having a formal spec and a formal proof (and gradually reducing the part of proof we do manually)
<MichaelRaskin> John_2: maybe `describe` could help
<beach> MichaelRaskin: I see.
<Josh_2> Yes its a constant
<Josh_2> I'm reading that
<gilberth> Oh! I see. You can actually pass :POINTER-WINDOW. I didn't knew that.
<beach> "know". "I didn't know" :)
<beach> Me neither.
<gilberth> beach: Thanks.
<beach> Anytime.
<Josh_2> Well I'm lost
<Josh_2> o well, I'll do it later :O
nowhere_man has joined #lisp
Arcaelyx has joined #lisp
<pjb> equwal: furthermore, using constant variable goes against the grain of monads.
Arcaelyx has quit [Ping timeout: 250 seconds]
vlatkoB has joined #lisp
_whitelogger has joined #lisp
stux|RC-only has quit [Remote host closed the connection]
<makomo> morning
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
FreeBirdLjj has joined #lisp
<beach> Hello makomo.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Read error: Connection reset by peer]
rippa has joined #lisp
Fare has quit [Ping timeout: 245 seconds]
<gilberth> I was watching my tongue as I said to myself 'what' and some German words like "Wasser", "Wand", "war" etc. And I feel the difference.
tsizz has quit [Quit: Page closed]
<MichaelRaskin> Hello makomo
<makomo> hello :-)
dddddd has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
gigetoo has quit [Ping timeout: 244 seconds]
gigetoo has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
skelic2 has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
lumm has joined #lisp
patrixl has joined #lisp
nowhere_man has joined #lisp
q9929t has joined #lisp
q9929t has quit [Client Quit]
__jrjsmrtn__ has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
lumm has quit [Ping timeout: 258 seconds]
lumm has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
stux|RC-only has joined #lisp
<moldybits> is there a reason you can't (push 1 (last x)) where x is a list? other than the standard not saying you should be able to.
<_death> what if X is NIL?
<_death> if LAST were a macro, then it'd be possible
lumm has quit [Ping timeout: 250 seconds]
<_death> but then it would also require a place
<moldybits> but it's possible to (push 1 (cdr x)). what's the difference?
<_death> well, there's (setf cdr) but not (setf last)
<moldybits> right, i just wondered if there was a particular reason for that being that case :o
ltx128 has joined #lisp
<Inline> last is a list
<Inline> you should use (car (last x)) at least
<Inline> if you intend to replace the last list element
<Inline> (last '(a b c d)) => (d)
<MichaelRaskin> Well, the initial question was about pushing
stux|RC-only has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<Inline> ok
<phoe> alexandria:lastcar
<phoe> anyway
<phoe> moldybits: LAST is only defined as a "reader", not as an accessor
lumm has joined #lisp
<phoe> with an accessor, you can also SETF it; with just a "function", you cannot
<moldybits> i see. i was just surprised it didn't work.
<phoe> as for why it's that way - hm
<phoe> probably since LAST wouldn't make good sense as a place
<phoe> you can setf (car (last x)) and (cdr (last x))
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<MichaelRaskin> Indeed, both the case of empty list and the case of setting non-list are a bit undesirable
<_death> it would also not do for (single-element), since it would need to change the binding of X so that it be (1 single-element).. (cdr (last x 2)) can work in other cases
<no-defun-allowed> yeah, to replace the last cons in a list, you would need to back up a cons if the list has conses before it, or replace the variable if there is only one cons
<phoe> hey guys guys I just wanted to say all of that
lumm has quit [Remote host closed the connection]
<MichaelRaskin> parallel typing!
<no-defun-allowed> well type faster smh
<MichaelRaskin> efficient!
<moldybits> :)
<phoe> but yeah, (let ((x (list 1))) (setf (last x) (list 2))) wouldn't work very well
<no-defun-allowed> [*** Several people are typing...]
<phoe> because the compiler would have to figure out that the place for (last x) in this case would be the variable binding
<phoe> and I don't think the compiler has the ability to know that at compile-time, especially if X is not constant but provided at run-time
lumm has joined #lisp
<phoe> so it has no idea whether it will have to set a CDR of some cons or if it will have to modify a variable binding
<phoe> and that is already trouble.
<phoe> so, yes, it makes sense to me that it isn't a place.
nowhere_man has quit [Remote host closed the connection]
<no-defun-allowed> yeah, it doesn't sound trivial to write an expander for (setf last)
<moldybits> hm, yes.
themsay has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
<phoe> you'd need to close over the variable I guess, and, at runtime, check if you need to setq that variable or if you need to setf some cdr
<phoe> and that is kind of ugly
themsay has joined #lisp
orivej has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
hiroaki has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
vms14 has joined #lisp
nowhere_man has quit [Remote host closed the connection]
<vms14> wanted to ask, Why quicklisp stills being beta if it's used even in production stuff?
Ukari has quit [Ping timeout: 268 seconds]
<vms14> and is like no lisper uses any other method to load libraries and/or frameworks
<MichaelRaskin> (looks away while using two deployment systems in addition to Quicklisp)
<vms14> xD
<vms14> it's "beta" just a part of the name?
<vms14> or it's really in beta state?
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
skelic2 has quit [Quit: Leaving]
Ukari has joined #lisp
random-nick has joined #lisp
<MichaelRaskin> vms14: what observable decisions are you going to make based on this information?
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
<vms14> I'm going to make nothing at all
<dtw> Quicklisp has always been beta.
<dtw> Years and years.
<vms14> just that it's strange to see "beta" in a software that has this time of life
<vms14> and usage
<dtw> Yes. It's strange.
<vms14> so it's like we should expect new features?
<aeth> I'd expect at least encryption before it left beta
__jrjsmrtn__ has quit [Quit: __jrjsmrtn__]
tEsTNAmE has joined #lisp
tEsTNAmE has quit [Remote host closed the connection]
trafaret1 has joined #lisp
<trafaret1> just wondering about is there tool for linux by which I can manager packages like ranger?
vms14 has quit [Quit: WeeChat 2.3]
<phoe> what kind of packages?
stux|RC-only has joined #lisp
Inline has quit [Quit: Leaving]
JohnMS_WORK has joined #lisp
Inline has joined #lisp
hiroaki has quit [Ping timeout: 245 seconds]
shka_ has joined #lisp
trafaret1 has quit [Remote host closed the connection]
mingus has quit [*.net *.split]
zigpaw has quit [*.net *.split]
CrazyEddy has quit [*.net *.split]
tsandstr has quit [*.net *.split]
flip214 has quit [*.net *.split]
mrcom has quit [*.net *.split]
drot has quit [*.net *.split]
hvxgr has quit [*.net *.split]
tumdum has quit [*.net *.split]
ltx128 has quit [*.net *.split]
zcid has quit [*.net *.split]
APic has quit [*.net *.split]
jackdaniel has quit [*.net *.split]
hvxgr has joined #lisp
ltx128 has joined #lisp
drot has joined #lisp
CrazyEddy has joined #lisp
<pjb> aeth: and signature
vibs29 has quit [Ping timeout: 246 seconds]
nckx has quit [Ping timeout: 255 seconds]
nckx has joined #lisp
zcid has joined #lisp
copec has quit [Ping timeout: 255 seconds]
vibs29 has joined #lisp
Achylles has joined #lisp
APic has joined #lisp
ggole has joined #lisp
copec has joined #lisp
wxie has joined #lisp
fengshaun has quit [Ping timeout: 250 seconds]
fengshaun has joined #lisp
nanoz has quit [Ping timeout: 245 seconds]
mrcom has joined #lisp
Bike has joined #lisp
stux|RC-only has quit [Quit: Aloha!]
traplol has quit [Quit: Leaving]
jackdaniel has joined #lisp
rumbler31 has joined #lisp
random-nick has quit [Ping timeout: 246 seconds]
scymtym has joined #lisp
grewal has joined #lisp
random-nick has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
tEsTNAmE has joined #lisp
vms14 has joined #lisp
<vms14> there is a hint while writing your own library? like a set of functions you'll generally use
<vms14> in common lisp I mean
<vms14> better if I make a package instead of just a bunch of functions
<vms14> but sure you have more hints about how a library in common lisp "should" be implemented
<vms14> like what I should avoid ?
stux|RC-only has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
q3d has joined #lisp
<phoe> make your own package
<phoe> and export your own stuff from there
<phoe> make sure your stuff is ASDF-loadable
<phoe> you can use quickproject:make-project to start off
Essadon has joined #lisp
<MichaelRaskin> Also, remember that docstrings exist
mange has quit [Remote host closed the connection]
tEsTNAmE has quit [Remote host closed the connection]
aindilis has quit [Read error: Connection reset by peer]
<vms14> thanks for the hints guys
<vms14> I'll note them
<vms14> specially docstrings xD
<vms14> what I do not know in any language is how a library should be structured
<vms14> I know data representation is important
<phoe> vms14: read source code of a few libs
<MichaelRaskin> beach:
<vms14> I've read in some book that data is more important than algorithms, and the algorithm is easier if the data is well represented
<MichaelRaskin> Does your WSCL plan include allowing generic Common-lisp: symbols?
<phoe> generic? what do you mean?
<vms14> so if the data is not well represented the code tends to be more difficult to write
<MichaelRaskin> I mean, functions named by Common-Lisp: package symbols to be generic functions.
<MichaelRaskin> (If implementation so desires, at least)
<vms14> phoe: yeah, I'll look for some well known libraries and look at their source code
<phoe> vms14: I'll do a shameless plug and offer you https://github.com/phoe-trash/split-sequence
<vms14> but when I'll understand lisp
<vms14> xD
<phoe> I consider that fork of mine to be somewhat decently structured
<grewal> vms14: A good way to think about it is to write a sample program that uses the library, and then figure out what the library actually has to do
<vms14> grewal: and I start to see that Lisp is a very nice language to work this way
<vms14> I mean, you start like "using" those functions, and defining them later step by step
<vms14> usually in programming the way to use a function is first define the function, then use it
<vms14> I suppose this is part of bottom up design
patrixl has quit [Remote host closed the connection]
patrixl has joined #lisp
patrixl has quit [Remote host closed the connection]
q3d has quit [Ping timeout: 256 seconds]
aindilis has joined #lisp
aindilis has quit [Remote host closed the connection]
Quasus has joined #lisp
selwyn has joined #lisp
aindilis has joined #lisp
Fare has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
selwyn has quit [Remote host closed the connection]
dddddd has joined #lisp
igemnace has joined #lisp
Zaab1t has joined #lisp
Josh_2 has joined #lisp
jmercouris has joined #lisp
<jmercouris> so this Hextream guy, causing quite a negative reaction in the community
<jmercouris> does anyone have any background on why he is doing this?
<loke> jmercouris: Who? Where?
<jmercouris> Also I feel like the name octetstream would be more appropriate for a lisper, but oh well
<Bike> i don't think we ought to gossip
<jmercouris> It's not gossip, this channel is publicly logged, he is free to read it
<Bike> i mean, does it matter why
<phoe> jmercouris: actually no it's not
<jmercouris> however, talking about someone when they are not present and able to defend their position is something else, and that I can agree with
<phoe> the logging machine broke around 2018-10
<phoe> and no one has fixed it ever since
<Bike> whitequark's log is still operable
<jmercouris> I think the whitequark one still works
<phoe> oh? where is it? I don't know about it
<jmercouris> there is also one that Nicholas wrote that works
<Bike> also shinmera's, which isn't in the topic
<Bike> phoe: topic
<phoe> oh right!
<Bike> https://irclog.tymoon.eu/ here are shinmera's logs
<phoe> I was thinking ccl logs were the only ones active. I'm glad to be wrong.
<djeis[m]> irclog.tymoon is working.
<djeis[m]> And those are actually linked in the topic now, btw.
<jmercouris> the CCL logs were definitely the best kind, just a simple text file
<jmercouris> the other log services are lacklustre and difficult to grep IMO
<phoe> djeis[m]: yes, I forgot to look at the topic. Silly me.
<jmercouris> and the CCL logs broke 2018-10, but I contacted RME, and he fixed them for a time
<jmercouris> he wasn't aware of the issue IIRC
<jmercouris> phoe: so now that we have ultralisp, when are we going to get the ultraspec ;)?
<jmercouris> is there a repository for it that you are working on?
<phoe> jmercouris: I'm not actively working on it right now and haven't been for a long time
<jmercouris> phoe: I'm aware, I'm asking is there a repository for it? and when might we get it?
<phoe> I've actually been wondering if it's really necessary and valuable
<jmercouris> why the change of heart?
<jmercouris> due to the license granted within the hyperspec? it is okay with you? or?
<phoe> nah, license isn't an issue
<jmercouris> what were the goals of the ultraspec project?
<phoe> I'm not using CLHS, I'm using dpANS3 which is public domain
<jmercouris> that was never really clear to me, because the hyperspec seemed quite extensive
<phoe> for the specification, clhs seems to be good enough™
<phoe> and the new Lisp cookbook is doing the most of what I thought ultraspec should achieve with regard to libraries
<phoe> so I right now have no idea if spending time on the ultraspec is going to achieve much
<phoe> I'd rather extend the Lisp cookbook with non-standard stuff.
<jmercouris> aha, so the lisp cookbook
<jmercouris> I would like the lisp cookbook dir structure to be organized better
<jmercouris> I did work a little bit on it, and everything is a bit messy
<phoe> jmercouris: file an issue
<jmercouris> its been done
<jmercouris> I made a request to compose a single PDF of the cookbook
<phoe> good, now someone needs to turn it into code
<jmercouris> and pointed out a bunch of errors in composing the PDF due to the dir structure
<jmercouris> no need to turn it into code, it's already in MD
<jmercouris> I wrote a little script to make the PDF
<jmercouris> anyways vindarel has been working on it, and we will talk again this Monday
wxie has quit [Ping timeout: 250 seconds]
<jmercouris> he has made a lot of good work on it, and it is getting be a very good resource
<jmercouris> I just wish it were either org mode, or tex, but not markdown, oh well
<jmercouris> s/getting be/getting to be
<loke> OK, I've made the mistake of reading some of the things this guy is syaing.
<loke> What the hell...
<jmercouris> loke: That's why I brought it up, just wondering why, and what the best course of action is
<MichaelRaskin> Which one?
<jmercouris> poision like this is not so good in the community, however small we are...
<djeis[m]> I'm not sure there really is a course of action to be taken 🤷
<Bike> by yelling at everyone, he is rather auto marginalizing
<jmercouris> even not acting is a course of action, i.e. ignoring
<djeis[m]> Apart from more or mess ignoring him.
<vms14> no-defun-allowed: which was the wrapper software you told me to use with sbcl?
<djeis[m]> *less
<vms14> I remember something like rlwraper but it's not that name xD
<MichaelRaskin> rlwrap
<phoe> rlwrapper: wraps something in rl (real life)
<loke> jmercouris: The only course of action is ignoring. What he wants is attention.
<djeis[m]> Wouldn't that be irlwrapper? 😛
<phoe> right
<vms14> thanks
<vms14> rlwrap
Nilby has joined #lisp
<gilberth> loke: Yes, poor guy. I almost feel sorry.
rumbler31 has quit [Remote host closed the connection]
ltx128 has left #lisp [#lisp]
<loke> gilberth: Yes, I know what you mean.
<jmercouris> Why "almost"? and not feeling sorry?
<gilberth> jmercouris: I suffer from depression and thus don't feel much in general. :-/
<loke> gilberth: Sorry to hear that. I have friends who also suffer from the same.
<gilberth> loke: It seems to be pretty common amoung hackers. I know quite a few hacker, who also had similiar issues once.
<loke> gilberth: various types of mental health issues, yes. I certainly hame my fair share, although thanfully not depression, which sounds like a huge bummer.
<gilberth> loke: I'd rather trade a leg for it, sure. But most of the time I am fine these days. Thanks.
<loke> gilberth: I believe it's because a perfectly "normal" person is probably not able to spend the ridiculous amount of time hacking that is needed to learn everything needed to be a good hacker. That's why you end up with lots of people on the autism spectrum, or with other types non non-mainstream people :-)
<jmercouris> loke: I would like your statement to be false, but I am afraid you are probably right
<gilberth> loke: This sounds about right. Also I have the tendency to think a lot of things through. And not only CS related stuff.
<gilberth> loke: Most of the time I come to the conclusion that the world around us is just completly nuts. :-(
<jmercouris> gilberth: depression has nothing to do with how thoroughly you investigate topics
<loke> gilberth: I don't think one's meta state has anything to do with that. The world _is_ nuts :-)
<gilberth> It is a chemical imbalance in the brain.
<jmercouris> the world simply is
<jmercouris> we would have to first axiomatically agree on what a "normal"/"valid" state is to conclude that the earth is "nuts"
<jmercouris> depression is more than a chemical imbalance in the brain, it may be cause, it may be a symptom, but it cannot be so neatly classified by this single dimension
<jmercouris> I believe depression also changes the structure of the brain through repeated thinking of depressive thoughts, much in the same way thinking any thought over and over again will form different neural pathways in the mind
<gilberth> *Sigh* Actually this is a rather complicated topic.
<jmercouris> then don't simplify it
<gilberth> Well. I will not abuse #lisp for therapy.
<jmercouris> feel free to abuse #lispcafe for therapy, if you need to talk, I'll be there
<gilberth> I just decided to no longer hide the fact, that I am having trouble.
<gilberth> That's all.
<jmercouris> there is nothing to be ashamed of, you just are
<jmercouris> we all just are, and the world just is :)
<loke> gilberth: I have noticed a tendency for people to be more open about it in the last decade or so.
hhdave has joined #lisp
<loke> I think that's a good thing, and it may have saved quite a few people.
<jmercouris> Yes, openness and the sharing of knowledge is power
<jmercouris> when we make things taboo we weaken ourselves to ignorance, and many suffer because of it
* phoe cough #lispcafe #cough
<phoe> sorry for the coughing, pneumonia
<jmercouris> a great example is that of sexual education which is very poorly taught, and the consequences are dire
<jmercouris> phoe: get that checked out! be well my friend, I saw you cannot attend ELS, neither can I
<jmercouris> even though I wanted to so badly, oh well :(
<loke> I really wanted to go too
<gilberth> I hope, I could attend next year.
<jmercouris> I would say "there is always next time", but nothing in life is a guarantee, not even tomorrow
jeosol has joined #lisp
<jmercouris> There are many things I regret *not* doing, few I regret doing
<phoe> well, I'd rather regret tending to myself and pollenating half of ELS with my bacteria rather than not doing that
<jmercouris> phoe: Yes, your case makes sense, just how sick people should not go to work and get their co-workers and the public sick
cuso4 has joined #lisp
<gilberth> Well, if half the CL community would die from that, that would be very bad.
<phoe> exactly my thinking
Arcaelyx has joined #lisp
<jeosol> morning guys
<phoe> morning
<jeosol> is there a name for this phenomena, where you build a software it is a bit slower as build the components, base libraries, but later you get to develop things much faster as you reuse the components,
<dtw> By defaul ASDF writes fasl files to ~/.cache/common-lisp/... I think it is ugly in program's build directory situation when user would probably expect that all the temporary build files are created in program's directory. I have called (asdf:disable-output-translations) in right places. Has any of you worried about these things?
<dtw> jeosol: And good afternoon (17:03 here).
<phoe> jeosol: caching
<jeosol> because of contraints, I had to use python jupyter notebook , updating different cells, as I made changes, going back and forth on the notebook. Too me several hours to even test a simple class I was writing.
<shka_> i hate jupyter
<jeosol> Frustrated, I switched to CL (SBCL+slime+emacs), and got it done in a way less time
<shka_> it is backwards as fuck
<jeosol> I mean, significantly less
Zaab1t has quit [Ping timeout: 255 seconds]
<jeosol> one of my colleagues, looked at me as if I was nuts. I had to write something complex to combine different analysis from different files, etc. A few defclass here and there, some methods, it was done
<jeosol> shka_: it was frustrating have to track which cells, I need to update, where I can just compile in a change and it will be integrated.
<shka_> jeosol: nice to hear that i am not the only person in this world using common lisp for data analysis
<jeosol> exactly, shka_, I am using CL for data analysis
<shka_> i am even making data frame lib
<jeosol> data analysis, cleaning files,
<djeis[m]> A jupyer notebook is not a library dev environment at all- it's specifically for maintaining short scripts with lots of rich output and generating nice PDFs from the result. Trying to use it for more than that is... painful.
<jeosol> really,, I thought having something like Panda for CL
<djeis[m]> Jupyterlab is a bit better.
<jeosol> djeis[m]: that is fair.
<jeosol> my proficiency may also be because I know CL more than python.
<shka_> python is pretty poor as far as interactive development goes, though
<djeis[m]> Yea...
<djeis[m]> Wayyy too file and line oriented.
<djeis[m]> And the default stacktrace printer doesn't print the values of arguments to functions...
<shka_> also does not support redefining stuff easily
FreeBirdLjj has joined #lisp
<djeis[m]> Actually reloading modules mostly works.
<djeis[m]> It's definitely no CL tho.
<jeosol> I processed a 60GB file with SBCL (open, read, and perform some regex with cl-ppcre) and not issues. doing the regex change with awk and sed on the command line (then pipe to a file was taking over a day).
<shka_> also, those python libs usually produce seriously cryptic error messages if you are doing things wrong
<shka_> which is yeah, my fault
<shka_> but keeps learning hard
<beach> MichaelRaskin: That is already allowed by the standard.
<jeosol> phoe: by caching, not sure if that's was for me.
<jeosol> I was referring more to the fact, that reusability was easier with the CL libs, I could perform a fairly complex analysis quicker with CL
<phoe> jeosol: I confused myself, ignore me
<shka_> jeosol: cl-data-structures (my lib) offers ranges (D style) and aggregation operations that can run on those
<jmercouris> shka_: redefining almost *ALWAYS* fails in python
<jmercouris> absolute joke of a feature to send a defun to the REPL
<shka_> so you can save a little bit of time when working with text files by using line-by-line range, on-each, distinct, group-by and to-vector
<jmercouris> and the messages are cryptic of course because usually they are just a poor, non pythonic, non idiomatic cython wrapper across some C library
<shka_> jeosol: it is a little bit raw and needs some more time in the oven but it helps me, maybe it can help you as well
<jmercouris> shka_: did you see the post on r/lisp about implementing a numpy equivalent in Cl...
<shka_> no?
<jmercouris> not a feature equivalent library, but literally making the exact same API so that documentation would not have to be written
<jmercouris> let me get the link
<shka_> thanks :-)
<jmercouris> absolutely stunned me
vms14 has quit [Quit: WeeChat 2.3]
<jeosol> jmercoursis: thanks for the link, read the comments.
<jeosol> I must say it hasn't been easy working numpy and pandas, because of non-uniformity in the function signatures, things are done in many different ways, and it can be hard to keep track of.
<jeosol> following np API is probably not the best route, imagine
<jeosol> shka_, what CL tools do you use for your analyses?
<jmercouris> jeosol: I too imagine
Khisanth has quit [Ping timeout: 268 seconds]
<shka_> jmercouris: well, ar already stated, i wrote this https://github.com/sirherrbatka/cl-data-structures and this https://github.com/sirherrbatka/cl-data-frames
<MichaelRaskin> beach: Hm, I wonder if any implementation actually has generic functions for everything…
<shka_> as long as input has the correct interface
<shka_> does not include numeric stuff other than those that i needed at the moment
ian_0xF has joined #lisp
<shka_> but not a substitute for numpy in any way
ian_0xF has quit [Quit: leaving]
<jeosol> shka_: that's cool. I imagine you are aware of clml libraries. With some effort (perhaps lots) with that clml, gabor's utilities, and other related work, some good DS tools could be had
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<phoe> MichaelRaskin: I doubt, it's a performance killer
<shka_> yes, i know of the clml, i attempted to pimp it up but after a week i discovered that petalisp exists
<MichaelRaskin> phoe: well, SBCL already does inference to omit type checks on +, already complains if it cannot, …
<phoe> MichaelRaskin: SBCL is currently the most advanced free implementation when it comes to optimizing like that, and it still doesn't have GFs for everything
<seok> how big was the biggest hash table you've ever made?
ian_0xF has joined #lisp
<shka_> jeosol: if you ever want to use cl-ds and have any questions, i am always on this channel :-)
<MichaelRaskin> I think SBCL does't have GFs for anything standard which is not required to be generic
Khisanth has joined #lisp
<phoe> yep
<jeosol> shka_: ok dokie. I am working with some homegrown array package (md-array),not terribly optimized, but works for my needs. As I look to use CL more for some DS tasks, I started looking at other tools and came across clml and gabor's NN libraries
<shka_> cool
nowhere_man has joined #lisp
<jeosol> shka_: thanks I checked the cl-ds link above. It's documented, so will give it a look
<shka_> it is not nearly well enough documented sadly
Oladon has joined #lisp
jmercouris has quit [Ping timeout: 245 seconds]
cuso4 has quit [Quit: WeeChat 2.4]
okeg has joined #lisp
ian_0xF has quit [Remote host closed the connection]
Lycurgus has joined #lisp
Ukari has quit [Ping timeout: 246 seconds]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
evanpeterjones has joined #lisp
tharugrim has joined #lisp
notzmv has joined #lisp
Ukari has joined #lisp
evanpeterjones has quit [Remote host closed the connection]
Zaab1t has joined #lisp
<stylewarning> I heard ramblings of numpy. I hope we can have a numpy in Lisp !
catchme has joined #lisp
<beach> MichaelRaskin: As others pointed out, no and for reasons of performance. But some could be, like the sequence functions.
ym555 has joined #lisp
Fare has quit [Ping timeout: 245 seconds]
<beach> MichaelRaskin: You would need something like sealing. And you would have to be able to inline generic functions in some circumstances.
<beach> MichaelRaskin: WSCL is just about removing much of what is unspecified or undefined in the standard.
Aruseus has joined #lisp
dale has joined #lisp
<phoe> beach: sealing?\
<MichaelRaskin> Sealing the entire GF or just a subset of methods?
<djeis[m]> To seal a subset of methods you'd also need to be able to seal classes against subclassing.
<shka_> djeis[m]: that is correct
<djeis[m]> At a minimum.
<shka_> djeis[m]: as it turns out heiseig works on that
<shka_> and it works
<shka_> and i have no idea how :(
<djeis[m]> Huh, interesting
<shka_> indeed
<shka_> wanna link?
FreeBirdLjj has quit [Remote host closed the connection]
<djeis[m]> Sure
<shka_> the simple fact that this is possible to implement in portable CL is quite amazing
<shka_> jeosol: docs in cl-ds are SERIOUSLY outdated and there is a lot of stuff is missing, I will be working on that so i can put this into quicklisp, but be patient please
<shka_> phoe: also, please follow the link, it is the good stuff
<shka_> ;-)
<phoe> shka_: I am
Lycurgus has quit [Quit: Exeunt]
<stylewarning> shka_: I am looking at CL-DS and it seems sort of oddly architected. Do you have examples of solving problems using it? (It gives me similar feelings to LIL or the latest MATLISP. Lots of classes, lots of mixins, lots of inheritance.)
<shka_> stylewarning: it has slightly complicated architecture in few places, but it is actually very simple to use
<shka_> you have containers, ranges (iterators) and functions that work on those
<stylewarning> I see
<shka_> containers can be modified either destructive manner or by creating copy (functional)
<shka_> but destructive stuff works only on mutable objects and all mutable objects are instances of mutable class
<shka_> and functional stuff works only on functional objects
Nilby has quit [Ping timeout: 255 seconds]
<shka_> you can convert between those, but you kinda shouldn't
<beach> MichaelRaskin: Since I haven't thought much about it, I don't know exactly what the requirements would be to guarantee the performance aspect of things.
<beach> Again, heisig has given it much more thought.
<Krystof> anyone in genova?
<verisimilitude> Is the creator of awesome-cl.com here?
<verisimilitude> Yes, him.
<phoe> hmmm, no idea
<MichaelRaskin> beach: I see, thanks
themsay has quit [Ping timeout: 250 seconds]
themsay has joined #lisp
Fare has joined #lisp
<beach> MichaelRaskin: One standard trick is to define a function as an ordinary function that handles all or most of the standard classes, and only when different arguments are given, does it then call a generic function.
<beach> That gives the best of both worlds in some situations. For example, that's how the sequence function extensions work in SBCL.
Zaab1t has quit [Ping timeout: 246 seconds]
<beach> Then the ordinary function can be inlined as usual, and no particular trick is needed in order to inline the generic function.
<beach> I am not even sure that such a solution would be less powerful than sealing.
<beach> I mean, there is a general rule that client code can not define methods on standard generic functions when only arguments of standard classes are given.
FreeBirdLjj has joined #lisp
<beach> And I am thinking that such a restriction can have the same net result as the trick I just mentioned.
<beach> But I would have to think about that some more.
<makomo> shka_: sealable-metaobjects uses closer-mop to implement its stuff, so it's not absolutely portable, but it is quite portable i guess
<beach> makomo: Did you arrive in Genoa?
<phoe> closer-mop is cross-implementation enough
<makomo> phoe: yeah, exactly my thought :-)
<phoe> if anything, if something is supported by closer-mop, I'd say it runs on any sane implementation
<makomo> beach: my friend and me are leaving for the bus in ~2 hours
<beach> OK.
<makomo> it'll be a ~13-14 hour drive though :-)
<beach> Ouch.
<makomo> heh yeah, but i'll load my phone with some music, books and papers so it should be ok
<makomo> re locatives from the other day: here's another resource that mentions locatives, http://www.cawtech.demon.co.uk
<phoe> yes, that's a locative implementation
andrei-n has joined #lisp
<beach> MichaelRaskin: Of course, that "trick" doesn't make it possible to have the "methods" on the ordinary function distributed in different files. So it doesn't have the same nice modularity and maintainability properties as a solution based on generic functions overall.
<MichaelRaskin> beach: I guess it would be conforming to use this approach as an optimisation while pretending that + is a normal generic function.
<beach> Yes, I think it is conforming.
<beach> The Common Lisp HyperSpec is usually silent about what happens when arguments of the wrong type are given to standard functions. I don't know for sure about the arithmetic functions, though.
<beach> So you would not make + generic anyway.
lucasb has joined #lisp
<beach> A better idea is to do what Dylan does. it defines + to call binary-+ or something like that, and binary-+ is then generic.
<beach> You can't make + generic because of the variable number of arguments.
<verisimilitude> Isn't it mandated you get a TYPE-ERROR, beach?
<Bike> + "Might signal type-error if some argument is not a number. Might signal arithmetic-error. "
<Bike> which means the consequences are undefined, but if it does signal an error, it has to be a type error.
<beach> I forget what "might" means.
<beach> I see.
<Bike> it's in 1.4.2
<beach> That answers verisimilitude's question.
<beach> verisimilitude: The reason I planned the WSCL project is that many more things are unspecified than what people think.
<pjb> The thing is that CL allows extensions, and this can involve supporting new or different types.
<verisimilitude> Well, the best way to avoid it is to simply write code you know is correct, rather than tread the edges.
<pjb> (+ "XI" "I") --> "XII" ; could be an extension.
<beach> Yes, there is the entire thing about "potential numbers" or what it's called again.
<verisimilitude> If I wanted a TYPE-ERROR, I'd be using SIGNAL or ERROR, not giving a bad argument to +, anyway.
<beach> verisimilitude: Interesting advice there. Very little code would then ever be written I would think.
<verisimilitude> Would you rather have quantity or quality?
<beach> In the beginning of a project, I can't say I am sure the code I am writing is correct.
<beach> I very much rely on the system to tell me when it is not.
<MichaelRaskin> It is also a good question how much _hardware_ would be produced with such approach…
<verisimilitude> I tend to put my program in several different implementations for these purposes.
<beach> So with that advice, I would probably never start anything.
<Bike> well, none.
<Bike> processor verification is kind of hard.
<beach> verisimilitude: Why would you have to do that if you know it is correct?
<verisimilitude> You get more warnings or other things that way, beach; it's just a good idea, in any case.
<beach> verisimilitude: If you get a warning, your implementation must be buggy then. Since by definition, your code is correct.
<verisimilitude> There's a difference between knowing your program is correct at the beginning and simply avoiding parts of the language you know are like what was mentioned.
<MichaelRaskin> Bike: well, maybe some low-level adders could survive
<Bike> but do you really know how doped that silicon is...?
<verisimilitude> You know exactly what I meant by ``correct'' earlier, beach, and I meant avoiding undefined behavior in the language, if that wasn't clear enough.
<MichaelRaskin> Bike: producer _can_ find out — we were discussing that those who produce X should know if it works, right?
<beach> verisimilitude: And I am telling you that there is so much undefined behavior in the Common Lisp specification, that I felt compelled to start WSCL.
karlosz has joined #lisp
<verisimilitude> Alright, beach. There's more than I was acutely aware of, but it's still not so bad, I'd think.
<verisimilitude> I hold disdain for those who claim we can't know things are correct. I can write a fizzbuzz or ``hello world'', but apparently you can't, then.
<beach> Much worse than I would like. The good news is that implementations generally do the right thing.
zotan has quit [Ping timeout: 259 seconds]
zotan has joined #lisp
<pjb> beach: what is WSCL?
<MichaelRaskin> Well-Specified Common Lisp
<pjb> I'd prefer to have a FSCL Formally Specified CL.
Josh_2 has quit [Read error: Connection reset by peer]
<MichaelRaskin> FSCL will only run on FSCPUs with FSOS, though
<pjb> no, but when a bug occurs in a verified FSCL, we'll know it's thef ault of the system or the hardware…
<Bike> foolishly specified common lisp?
<verisimilitude> This WSCL seems more like a certification than anything.
Achylles has quit [Ping timeout: 258 seconds]
<pjb> That said, even a formal specification could leave undefined behavior. We we'd want, is a specification that excludes all undefined behavior. And I say that nowadays we have computers powerful enough that we can define a specification of an UTM without any undefined behavior.
<verisimilitude> Brainfuck already exists.
<pjb> For example, integers. We don't know what happens when the integers overflow the memory. We'd have to specify a condition in that case. OUr processors are fast enough to perform a little check on the length before computing on half the memory!
<MichaelRaskin> We definitely can define. Obtaining an implementation that abstracts away RowHammer might be harder
<verisimilitude> You get a STORAGE-CONDITION in Common Lisp, pjb.
<pjb> Also, most CL doesn't define the conditions that are signaled (and the circumstances where they're signaled). This should be defined.
<pjb> verisimilitude: it's actuall implementation dependent.
scymtym has quit [Ping timeout: 268 seconds]
<verisimilitude> That's only because what allocates and what doesn't isn't defined, pjb.
hhdave has quit [Quit: hhdave]
<verisimilitude> When SBCL gives up rather than signal it, I'm disgusted.
<edgar-rft> error: not enough memory to display the error message
<beach> I have the greatest respect for the people who maintain a program as complex as SBCL or any of the other Common Lisp implementations, for that matter. With the manpower at their disposal, and the amount of work it takes to keep up the maintenance, it is amazing that it works as well as it does.
<phoe> Yes
<beach> So I can say that i am sometimes "disappointed" by the way things work, but I would not use the word "disgusted" myself.
<verisimilitude> You allocate that memory beforehand, then, edgar-rft.
karlosz has quit [Quit: karlosz]
<edgar-rft> verisimilitude: but then we can't find out if the memory was exhausted by an integer overflow or by premature memory allocation
<verisimilitude> You bake it into the executable so if it loads at all it works, then.
<verisimilitude> This isn't an intractable or even particularly thought-provoking issue, edgar-rft.
<edgar-rft> What if we bake so much code into the executable that it exhausts the memory *before* any integer overflow can happen. Then we *exactly* know where the problem is.
<pjb> edgar-rft: do we?
<edgar-rft> we always do
<pjb> edgar-rft: who would report the error? The loader? Would the image start? In this case, would it signal a condition?
<pjb> Is too much code dependant on the host?
<verisimilitude> I think if the dozens of megabytes of SBCL already fit in memory, than a tiny bit more wouldn't be an issue, edgar-rft.
<edgar-rft> pjb: To go for sure you could pull out the plug of your computer before tying to start the program.
<MichaelRaskin> For the record, I in my life have worked with a device that had no battery but did not fully stop working when plug was pulled
<pjb> What I'd really like, is when the sun goes supernova, or if Earth is eaten by a travelling black hole, we'd get some specific condition signaled so myh program could do something about it…
vlatkoB has quit [Remote host closed the connection]
<verisimilitude> Why are you all pretending correctness and whatnot is some intractable issue?
<verisimilitude> Have you never written a correct program in your lives?
<pjb> correctness is an absolute.
<pjb> you're not 99% correct.
<verisimilitude> I've written absolutely correct software, pjb, and it wasn't even difficult.
<verisimilitude> If you haven't, then have my pity.
<pjb> See the history of https://en.wikipedia.org/wiki/IEFBR14 or /bin/true…
Achylles has joined #lisp
Oladon has quit [Quit: Leaving.]
<edgar-rft> The point is that it's not possible to write an FSCL without taking all possibilities into account, where many of them lie outside of the computer.
<verisimilitude> A non-networked program isn't going to properly handle dropping the machine into a volcano, so it's irrelevant.
<verisimilitude> You're acting as if it's impossible to have a machine that works correctly, though.
Zaab1t has joined #lisp
<edgar-rft> verisimilitude: no machine I know is protected against asteroid impacts for example
hhdave has joined #lisp
<verisimilitude> Well, maybe someday someone will make one.
<verisimilitude> In any case, hardware destruction isn't a concern of the program, in general.
<MichaelRaskin> I am not sure where to get a machine which doesn't bitflip storage at random.
<pjb> Well, there are memory systems with ECC.
<verisimilitude> Do you believe the force of gravity can fail, MichaelRaskin?
<edgar-rft> Programs should always take hardware problems into acount. We all know the cases where computers refused to boot only beause the clock battery was empty.
<MichaelRaskin> Not realistically (false vacuum collapse is unlikely), because it was there _before_ 21-st century manufacturing
hhdave has quit [Ping timeout: 250 seconds]
<pjb> verisimilitude: quantum entanglement implies that we cannot discard exceptions even to gravityh.
<verisimilitude> Well, if you believe in fundamental forces of nature, then you also believe perfect mechanisms can exist, so a perfect machine can exst.
<MichaelRaskin> No
Oladon has joined #lisp
<pjb> but not if you believe in God.
<verisimilitude> If gravity can't fail, then you could build a mechanism that only depends on gravity, as an example.
<MichaelRaskin> Force of gravity is too analogue to produce perfect digital machines
<MichaelRaskin> And there is quantum tunneling and thermal noise
<verisimilitude> Well, have fun believing imperfection is absolute.
<MichaelRaskin> Note that what I said is that modern manufacturing goes full speed away from the zone where limits to perfection are meaningful
<TMA> well, there is one perfect machine in the universe -- the universe itself. it is currently busy simulating the universe though :)
hhdave has joined #lisp
elderK has joined #lisp
<phoe> so, basically, executing?
<phoe> like, doing what it's supposed to do?
<nirved> recently I finally figured out why quantum computers won't really work
<pjb> nirved: well, I'd think small ones could work.
<nirved> pjb: small ones are kinda useless
<pjb> definitely.
<edgar-rft> I'm afraid we can only judge if the universe is perfect or not at a time when it's over, but not before.
<pjb> Also, light cones don't let us have a complete picture of the universe.
hhdave has quit [Client Quit]
<edgar-rft> maybe FSCL could signal a condition before the universe is over
nicdev has quit [Quit: ERC (IRC client for Emacs 26.1)]
nicdev has joined #lisp
<verisimilitude> That could be difficult, edgar-rft. What if it only signals a condition whenever someone writes something stupid in IRC?
Josh_2 has joined #lisp
skelic2 has joined #lisp
<skelic2> how to translate this simple Clojure macro into CL macro?
<phoe> skelic2: throw the source at pastebin
<verisimilitude> Describe what it does, instead, skelic2.
dale has quit [Ping timeout: 255 seconds]
<Bike> replace [infixed] with (infixed), move it up before the docstring, and replace LAST with THIRD
nicdev has quit [Quit: ERC (IRC client for Emacs 26.1)]
dale has joined #lisp
pierpal has quit [Remote host closed the connection]
gareppa has joined #lisp
<skelic2> thanks Bike and phoe. it works. I didn't know they are pretty similar
<Bike> this is a pretty simple macro. with more complicated code it would be more involved.
<phoe> (defmacro infix ((x y z)) `(,y ,x ,z))
<phoe> (infix (2 + 2)) ;=> 4
skelic2 has quit [Quit: Leaving]
<phoe> that's the way a common lisper would do it methinks
<Bike> i admit i don't usually destructure like that.
<pjb> actually, not, you would do: (defmacro infix (&rest infix-expression) (generate-sexp (parse-infix-expression infix-expression)))
<phoe> Bike: what would you do then? use destructuring-bind with a single argument in the lambda list?
<phoe> pjb: I'm describing a scenario as trivial as linked in the pastebin, not a fully-fledged infix converter.
<Bike> well, most likely i wouldn't write this macro at all, but that would probably be next up, yes
themsay has quit [Read error: Connection reset by peer]
<stylewarning> phoe: I prefer https://github.com/rigetti/cmu-infix
themsay has joined #lisp
<phoe> stylewarning: course you prefer it, you're the author
<phoe> (;
<phoe> or rather, wait, you are not - you're just the uploader
<stylewarning> (:
<stylewarning> It’s old code!
<phoe> yes, I see
<phoe> it allows one to embed pascal-like syntax into Lisp
<phoe> horrib^Wnice
<aeth> moldybits: (define-modify-macro pushf (obj) (lambda (place obj) (push obj place))) ; if push wasn't an "old" function API with the "wrong" order the lambda to reverse the order would be unnecessary and we could just say push
<aeth> moldybits: in general, for some reason, the standard wants you to define a lot of trivial modify macros yourself instead of providing them, e.g. there is a += equivalent but no *=, and you do that with http://www.lispworks.com/documentation/HyperSpec/Body/m_defi_2.htm
<aeth> moldybits: then you get what you expected: (let ((x (list))) (pushf x 1) (pushf x 2)) => (2 1)
<pjb> thre's no sin= but there's a sinf!
<phoe> pjb: where is the sinf you are talking of
<pjb> (define-modify-macro sinf () sin) (let ((x 0.5)) (sinf x) x) #| --> 0.47942555 |#
<phoe> oh gods
<pjb> (loop repeat 5 with x = 0.5 do (sinf x) finally (return x)) #| --> 0.41735694 |#
themsay has quit [Ping timeout: 245 seconds]
<pjb> (define-modify-macro timef (times) *) (let ((x 2)) (timef x 6) x) #| --> 12 |#
<phoe> pjb: there's no times function in CL
<pjb> Easy: (define-modify-macro *f (times) *) or (defun times (x y) (* x y))
random-nick has quit [Ping timeout: 246 seconds]
fschuindt has joined #lisp
<aeth> nah, make it named Scheme-syle
<aeth> because then you have *!
okeg has quit [Quit: WeeChat 1.6]
<fschuindt> Hi there, folks! I'm trying to learn the basics of Scheme here. I made this 'hello world' snippet: https://gist.github.com/fschuindt/cf8d4c843caa00e26284e075c25bbc4d but I'm wondering why it's not displaying the output. Any clue? I'm using Racked SICP btw. Thanks! :)
<fschuindt> Racket*
<phoe> fschuindt: #lisp is Common Lisp, #scheme is Scheme
<phoe> and likely #racket is Racket
<aeth> fschuindt: #scheme and #racket are probably what you're looking for
gareppa has quit [Quit: Leaving]
<fschuindt> phoe, aeth: whoa, I'm more clueless than I thought haha. Using (require sicp) in Racket brings Scheme I believe. So I'm going to look into #scheme. Thanks a lot!
<sjas> ragged
<phoe> fschuindt: it seems to work though, https://tio.run/##TYy7DgIhFET7/YorxggkfoOtvYWNzazcdYk8DGCxzf46ConRcmbOnITbg0utW4dwp9TTMEhj89NhIXGZUfaZlvhKFOD5eA1CNYAnG5i0bqXWJBPDqL9lZufi4fMj6eBHA5INVSSnmDwKiVMjaMWG1p3octUFv@fXrmo984hcLMIb
<fschuindt> phoe: hmm, odd. I'm probably making something wrong, I'll take a look. Thanks again.
gareppa has joined #lisp
Fare has quit [Ping timeout: 245 seconds]
heisig has joined #lisp
gravicappa has joined #lisp
caltelt_ has joined #lisp
ggole has quit [Quit: Leaving]
<heisig> Greetings from Genoa!
Zaab1t has quit [Remote host closed the connection]
themsay has joined #lisp
<MichaelRaskin> Good evening
<phoe> heisig: good luck and enjoy yourself!
gareppa has quit [Quit: Leaving]
random-nick has joined #lisp
<_death> currently sipping wine in Genova as well
angavrilov has quit [Read error: Connection reset by peer]
heisig has quit [Remote host closed the connection]
skidd0 has joined #lisp
<skidd0> (cond ((equal str "nop")) (t (print str)))
<skidd0> ^- this basically "skips" strings that are "nop", right?
<skidd0> you know what i can test this
<skidd0> nvm
<Bike> i would write that as (unless (equal str "nop") (print str)), little more obvious
<Bike> (but basi cally identicall)
<skidd0> right, but i'm going to have more conds
<Bike> ah
<skidd0> and also, yes, the nop functions as i expected
<aeth> Depending on what you're doing, you might want to use string= instead. I think the only difference here is that string= will error if it's not a string.
<skidd0> that's handy
<skidd0> how often "should" i be defining restarts and signals?
<skidd0> > "it depends"
<Bike> it depends
<LdBeth> Good morning
gravicappa has quit [Ping timeout: 246 seconds]
<aeth> skidd0: Usually I just do (error "foobar") and plan on some day making that more fancy
<aeth> It is the middle ground
<skidd0> my beginner thinking is that, when i want to build up a large-scale app, building in restarts is doing myself a favor
<skidd0> as part of the incremental development design pattern
<skidd0> but for smaller things, it's not as likely to have a high return on investment
scymtym has joined #lisp
<aeth> skidd0: error supports format strings so it gets you most of what you want for a simple program where you don't expect someone to handle it. e.g. (error "Foo bar should have been 42 but was ~D~%" 11)
<aeth> It's pretty easy to put that in an (unless (= foo-bar 42) ...)
<skidd0> i see
<phoe> woo
<aeth> And for that particular example (has to be a number with certain properties), you can do an assert, which is a bit more complicated... or even check-type
<phoe> I'm bridging postmodern and pgloader
<phoe> (by copying pgloader code into postmodern)
<aeth> phoe: with object oriented programming no one needs to copy and paste anymore
FreeBirdLjj has quit [Remote host closed the connection]
<aeth> (remember that claim? :-)
<phoe> aeth: I had a choice
<skidd0> who made that claim?
FreeBirdLjj has joined #lisp
<phoe> either I started depending on all of the God damn pgloader with all of its foreign dependencies
<phoe> or I copypasted two pages of code into postmodern
<aeth> skidd0: I'm not going to be able to find that in a search engine in 2019...
<phoe> I kind of liked the second option you know
<aeth> skidd0: ask me 10 years ago
<skidd0> aeth: will dp
<skidd0> will have did?
<skidd0> have done?
<aeth> skidd0: but back to being on topic, I think you'll find that most of your simple errors/error-like-things can probably fit under ASSERT, CHECK-TYPE, or ERROR.
<skidd0> i will look into those, thank you
<skidd0> but is my thinking somewhat right in that restarts are more of a 'help yourself down the road' tool?
<phoe> it's an ugly link, but
<skidd0> i thought classes could have doc-strings?
<aeth> phoe: how did you find that in under 40 minutes?
<aeth> phoe: did you start with Google Books?
<skidd0> oh or are they the one you have to do (documentation "stuff")
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<phoe> the fourth result
<LdBeth> :documentation
<phoe> I read your "I'm not going to be able to find that in a search engine in 2019" and thought "well uh maybe I can"
<skidd0> thanks LdBeth
<aeth> phoe: ah, I guess search engines are actually better at inexact matches like this. I'm just used to them being way worse for programming queries
<skidd0> i've got a professor that keeps one PC exclusively for code queries to google to "train it"
<phoe> I see that machine learning is advancing
<skidd0> what's sad is he's an ML researcher
<aeth> so the claim was made in 1996, apparently.
<skidd0> yes, thank you LdBeth
andrei-n has quit [Ping timeout: 255 seconds]
themsay has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
lucasb has quit [Quit: Connection closed for inactivity]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 245 seconds]
holycow has joined #lisp
__oliverSwift has joined #lisp
<__oliverSwift> hey, does anyone know of lisp libraries for text-to-speech?
<MichaelRaskin> Are you sure you don't want just to shell out to espeak?
<__oliverSwift> espeak?
<MichaelRaskin> (If I knew of pure Lisp libraries, I would recommend them)
<MichaelRaskin> There are a few free/open source TTS engines with more or less usable command-line interface
<MichaelRaskin> espeak is the one I used at some point
<__oliverSwift> have you ever used ctti? I found a C library called "Festival", but have no experience with interop between lisp and C
<__oliverSwift> cffi *
slyrus_ has joined #lisp
nicdev has joined #lisp
<MichaelRaskin> CFFI is fine. You have to translate function definitions by hand, or use c2ffi, or use SWIG.
slyrus__ has quit [Ping timeout: 246 seconds]
<MichaelRaskin> What CFFI does, it does well. (it doesn't translate function definitions on its own)
<LdBeth> __oliverSwift: afaik festival uses RSR4 scheme
varjag has joined #lisp
<LdBeth> As a script language
<__oliverSwift> I saw they listed scheme on their github!
<__oliverSwift> but I wanted to use CL and I assumed there'd be conflict there.
equwal has quit [Ping timeout: 245 seconds]
<LdBeth> It depends what you want
amerlyq has joined #lisp
<__oliverSwift> how do you mean?
<LdBeth> If you want something capable translate text to sound, running festival as a server does well
Nilby has joined #lisp
<LdBeth> But if you want to building synthetic sound, I guess you have to figure out how CFFI works
Josh_2 has quit [Ping timeout: 268 seconds]
<LdBeth> In this case Flite might be more suitable since it’s pure C so relatively easier to work with than C++
dale has quit [Quit: dale]
ebrasca has joined #lisp
Fare has joined #lisp
__oliverSwift has quit [Remote host closed the connection]
lumm_ has joined #lisp
lumm has quit [Ping timeout: 258 seconds]
lumm_ is now known as lumm
khisanth_ has joined #lisp
Khisanth has quit [Ping timeout: 246 seconds]
khisanth_ has quit [Ping timeout: 245 seconds]
khisanth_ has joined #lisp
Fare has quit [Ping timeout: 268 seconds]
aindilis has joined #lisp
lumm has quit [Quit: lumm]
lumm_ has joined #lisp
Fare has joined #lisp
lumm_ has quit [Remote host closed the connection]
lumm_ has joined #lisp
klltkr has quit [Remote host closed the connection]
lumm_ is now known as lumm
Arcaelyx has quit [Read error: Connection reset by peer]
<no-defun-allowed> (sb-ext:run-program '("espeak" "Daisy, daisy, give me your answer doo")) ; laziest solution
Arcaelyx has joined #lisp
Achylles has quit [Remote host closed the connection]
voidlily has quit [Remote host closed the connection]
voidlily has joined #lisp
varjag has quit [Ping timeout: 255 seconds]
Achylles has joined #lisp
shka_ has quit [Ping timeout: 250 seconds]
<aeth> no-defun-allowed: correct syntax: (defun speak (input) (sb-ext:run-program #P"/usr/bin/espeak" '("I'm sorry, Dave. I'm afraid I can't do that"))) (speak "Open the pod bay doors, HAL.")
<aeth> Of course, your path might be different. It's probably best to use uiop:launch-program instead.
<grewal> If you plan to use sb-ext:run-program, you can use :search t and it will search in $PATH for the executable
<aeth> ah, that's probably what UIOP does automatically, then
tharugrim has quit [Quit: WeeChat 2.4]
skidd0 has quit [Quit: WeeChat 2.4]
orivej has joined #lisp
<no-defun-allowed> oh, it is (PROGRAM ARGS) not (ARGS)
libertyprime has joined #lisp
holycow has quit [Quit: Lost terminal]
<phoe> Is there anything like WITH-OUTPUT-TO-BYTE-VECTOR?
<phoe> I only have WITH-OUTPUT-TO-STRING but I cannot use WRITE-BYTE there
<aeth> the closest thing I know of is alexandria:read-file-into-byte-vector. It looks like this uses read-stream-content-into-byte-vector internally... and it's exported, so maybe that works for you?
<gilberth> IIRC flexistreams has something like this. But I am not sure.
<aeth> (you would need a stream you can both read from and write to)
random-nick has quit [Ping timeout: 246 seconds]
<phoe> aeth: yes, flex:with-output-to-sequence. Thanks!