Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
<CodeBitCookie[m]> sorry for all of my questions, its just that I'm kind of annoyed there isn't much material online for this kind of stuff
<mfiano> a:copy-array will preserve those properties
<CodeBitCookie[m]> I mean like for generating infinite sequences you can use this: https://github.com/cbeo/gtwiwtg
<lotuseater> mfiano: we had that some days ago
<mfiano> i cant remember what i ate for breakfast today
<lotuseater> Sorry with that I can't help much. :)
<lotuseater> CodeBitCookie[m]: with what goes your prior experience with FP?
<mfiano> I think CL's big benefit is being able to intermix several paradigms in the same program
<mfiano> Well one of them, anyway
<CodeBitCookie[m]> not much but I have used Haskell, OCaml and Clojure (Only after common lisp ;))
<lotuseater> or even being capable of having paradigms that are not experienced yet
<lotuseater> CodeBitCookie[m]: ah I thought so ^^
<CodeBitCookie[m]> @lotuseater yeah but I think the whole point of FP is to restrict yourself for freedom
<CodeBitCookie[m]> or somethin
<CodeBitCookie[m]> g*
<lotuseater> it's about reducing unneccessary side-effects, having good compatibility and writing things as real functions, so with the same inputs always returning the same outputs
Nilby has quit [Ping timeout: 264 seconds]
<CodeBitCookie[m]> yeah, so how can I get something like that with common lisp?
<lotuseater> do you really have to overfocus on that so much?
<CodeBitCookie[m]> what do you mean?
<CodeBitCookie[m]> you mean like not do functional programming and just live a normal life? I haven't though of that.
<lotuseater> no I like it too very much, before CL I was into Haskell at most
<CodeBitCookie[m]> I am into both languages right now.
<CodeBitCookie[m]> So what happened to Haskell?
<lotuseater> and maybe too much topics are bound to FP that not really are like static typing, lazy lists, wrapping a subset of category theory over your things or even dependent types
<lotuseater> what do you mean happened? I think they have a foundation or so since last year.
<mfiano> FP is not very well defined. The one we are talking about now is usually called referential transparency
<lotuseater> you could look into that bundle of libs: https://github.com/vseloved/rutils
<CodeBitCookie[m]> I meant what happened to your interest in Haskell.
<mfiano> FP could just as well mean having first-class functions, in which case Common Lisp is a very functional (among other paradigms) language
<CodeBitCookie[m]> "referential transparency" Oh so thats what it meant.
<lotuseater> CodeBitCookie[m]: I'm of course interested in this, also more than just using the language, but combining fundamental ideas (that stand the test of time), that's also good. :)
<White_Flame> one might rename the older definition of FP as "function-oriented programming"
<lotuseater> White_Flame: so restricting to the basic idea would be for first not too wibbly-wobbly
<CodeBitCookie[m]> lotuseater: So even drop the recursion!
<CodeBitCookie[m]> ?
<lotuseater> CodeBitCookie[m]: but I also learned (for myself) that static typing can stand in your way easily in more than one sense
<CodeBitCookie[m]> wdym?
<lotuseater> it can get a mess and break your legs
<mfiano> Types can change at runtime. The compiler can even be invoked at runtime.
recordgroovy has quit [Quit: leaving]
<CodeBitCookie[m]> really? I mean I never heard or seen that one before
<mfiano> static anything in such a dynamic language makes for lots amputations
<lotuseater> CodeBitCookie[m]: recursion would be another mathematical idea coming across :)
<mfiano> It is much more common to iterate than to recurse in common lisp
<mfiano> BEcause it is often faster and produces much more readable code
<CodeBitCookie[m]> so basically all this time using FP and now its not good anymore?
<mfiano> there is no silver bullet in computing
<lotuseater> I didn't say so.
<mfiano> With CL we can mix and match anything and everything and get the benefits of them all
<CodeBitCookie[m]> lotuseater: not AS good?
<mfiano> "good" is subjective
<mfiano> It depends on what you are doing and what language you are using :)
<CodeBitCookie[m]> mfiano: Okay that looks like an interesting aproach. How?
<mfiano> How what?
<lotuseater> even no silver bullet for hunting down crabs ^^
<CodeBitCookie[m]> How do you mix and match anything and everything and get the benefits of thema ll
<lotuseater> practice
<CodeBitCookie[m]> lotuseater: what does that mean? :)
<CodeBitCookie[m]> okay
<lotuseater> talking to people and developing your theory background
<White_Flame> and just getting used to having such flexibility
<lotuseater> CodeBitCookie[m]: something like an insider: crabs -> rust
<lotuseater> not fearing freedom :)
<mfiano> By being a software engineer and making your own decisions on data structures, algorithms, and architecture, as opposed to the guided path Clojure forces you down
<White_Flame> I think the hardest is to integrate both pure functional & mutatey code correctly. It needs a hard boundary where only pure stuff exists, that the mutatey stuff can call from the outside
<White_Flame> but everything else style-wise tends to integrate quite easily, without a lot of hard discipline
<CodeBitCookie[m]> so now I don't use FP as rigorously as haskell or even as lightly as clojure. Focus more on imperative and just do whatever I want?
<mfiano> Common Lisp's killer tool is CLOS...it's an integral part of the language. OOP should be at the top of your thoughts, but not that class-centric OOP crap from other languages
<lotuseater> be specific would be another advise
<CodeBitCookie[m]> "but not that class-centric OOP crap from other languages" My former-java brain can't understand this aside from the fact that I think OOP is bad now. Now I half know that not all OOP is bad but still can't tell apart the difference
<CodeBitCookie[m]> "be specific would be another advise" Can you give me an example?
<CodeBitCookie[m]> :)
<mfiano> Instead of inheritance being the main form of polymorphism, we have generic functions to define protocols.
<mfiano> We also have a meta-object protocol, so we can redefine how OOP behaves without requiring language implementors to do this for us.
<mfiano> OOP is very bad when everything belongs in a class.
<CodeBitCookie[m]> Okay guys I have to sleep but thanks for all the help. Will think it through :D. I really appreciate your efforts in helping me. I will be back tommorrow inshallah.
<mfiano> and the OOP system cannot be extended
<CodeBitCookie[m]> thats interesting
<mfiano> methods are not members of classes in Common Lisp.
<CodeBitCookie[m]> whaaaaat?
<CodeBitCookie[m]> how?
<lotuseater> CodeBitCookie[m]: hm one example could be when you know "oh at this point we have a simple-bit-vector" then using SBIT for access can be more specific by reading the code than using AREF
<mfiano> Class-centric OOP languages have single-dispatch. We have multi-dispatch
<lotuseater> please com back CodeBitCookie[m] if you want
<mfiano> A method is applicable if all of its specialized arguments are of the correct class or instance
<lotuseater> haha i knew this question was coming
random-nick has quit [Ping timeout: 264 seconds]
<White_Flame> consder ye olde two-object collison, (collide <ball> <wall>). When forced to put that method in a singular class, do you put it in Ball or Wall? In CLOS, you just have the "collide" generic function, which _takes_ class instances as parameters
<lotuseater> it's even not really better when having for example this "impl" stuff for structs in rust
<mfiano> Notice how I said "or instance". That comes in handy often too
<mfiano> Well if he left...
<CodeBitCookie[m]> lotuseater: definitely will come back :)
<CodeBitCookie[m]> all of this look interesting but tbh I pulled an all nighter and its 6 am and I can barely understand anything you guys are saying.
<CodeBitCookie[m]> Till tommorow.
<mfiano> minion: tell CodeBitCookie[m] about pcl
<minion> CodeBitCookie[m]: 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).
<CodeBitCookie[m]> bye
<lotuseater> good, i know it can be a bit too much at once and for staying motivated, but you will benefit, even if just your viewpoint and thinking about things changes/widens
Inline has quit [Remote host closed the connection]
<CodeBitCookie[m]> Yeah that book got me into COmmon Lisp
<CodeBitCookie[m]> Didn't read it in full but is planned
Inline has joined #commonlisp
<mfiano> Once you get used to CL's object system, you too will see why OOP is often called "bad"
<lotuseater> ah so you're 4 time zones wider than me
<White_Flame> eh, it's very easy to get to "OO is bad" with just java-ish OO :-P
<mfiano> Yeah
<mfiano> Very few languages have CL-like object systems.
<mfiano> Clojure has multimethods which are sort of like generic functions but with custom dispatchers, which we can emulate in CL with filtered-functions and the like
<lotuseater> Dylan would be an example, or not?
<mfiano> Julia have overloading of types and arity and lets the JIT work out the code when a method is first called
<lotuseater> ah right and its other metaprogramming capabilities
cuz has quit [Ping timeout: 264 seconds]
<mfiano> anything with decoupled methods from classes/multi-dispatch would be a decent object system. To go the extra mile, you need th extensibility classes allow via the MOP...generic functions are just funcallable standard objects
CptKirk20 has joined #commonlisp
CptKirk20 is now known as cptjimkirk
cptjimkirk is now known as CptJimKirk
<mfiano> or well can be
CptKirk has quit [Ping timeout: 256 seconds]
<mfiano> Most newer languages think of meta-programming as having macros. Not reader macros, symbol macros, or compiler macros. Just macros, usually very awkward to use due to not being homoiconic, or when easy (like in Crystal), is not using the full subset of the host language and is not much different from a C preprocessor.
<mfiano> But whern I think of metaprogramming, I also think of the MOP :)
* White_Flame does the trendy thing and starts selling OOaaS
<mfiano> Regarding compatability of different use-cases and performance of a language, the authors of AMOP say
<mfiano> "The unavoidable conclusion is that no single language will ever be universally appropriate, no matter how clever its design. So we adopted a different solution. Rather than supplying the user with a fixed, single point in the space of all language designs and implementations, we would instead support a region of possible designs within that overall space. This is the essence of the
<mfiano> metaobject protocol approach"
<mfiano> So I treat it as a tool to give me performance or flexibility or both
attila_lendvai has quit [Ping timeout: 268 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
gioyik has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
brettgilio has quit [Quit: Leaving...]
brettgilio has joined #commonlisp
Inline has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
akoana has joined #commonlisp
azimut_ has quit [Ping timeout: 276 seconds]
tyson2 has joined #commonlisp
azimut has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<White_Flame> what's an idiomatic way to convert #p"foo.bar" to #p"foo.bar.bak" ?
<White_Flame> also with a full directory in the pathname
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
gioyik has joined #commonlisp
<CptJimKirk> has anyone had a chance to use sb-md5?
<CptJimKirk> I'm not really sure what the functions do, but I don't seem to be getting the results I expect
<beach> Good morning everyone!
igemnace has quit [Ping timeout: 252 seconds]
pranavats has left #commonlisp [#commonlisp]
recordgroovy has joined #commonlisp
<raeda> Morning beach
<lotuseater> CptJimKirk: you may want to look into ironclad
cjb41988 has joined #commonlisp
cjb41988 has quit [Client Quit]
<CptJimKirk> ironclad md5 expects a buffer
cjb84397 has joined #commonlisp
cjb is now known as Guest2446
cjb84397 is now known as cjb
Guest2446 has quit [Ping timeout: 260 seconds]
<CptJimKirk> i cannot seem to call ironclad from within the `with-input-from-string` macro
<CptJimKirk> I have it quickloaded, it exists and I "required" it, but the exports of ironclad don't seem to exist when I call it within the macro
<CptJimKirk> I'm finding all kinds of documentation but nothing is defined
<CptJimKirk> I have no idea what I'm meant to be looking for trying to convert a string to an 8 bit buffer
<hayley> White_Flame: metaobject.io
<hayley> (Just try not to get sued by metaobject.com or metamodular.com)
srhm has quit [Quit: Konversation terminated!]
taiju has quit [Ping timeout: 246 seconds]
semz has quit [Ping timeout: 252 seconds]
nature has quit [Ping timeout: 264 seconds]
selwyn has joined #commonlisp
pranavats has joined #commonlisp
<Bike> CptJimKirk: "call it within the macro"? what are you doing, exactly? with-input-from-string isn't going to affect symbols in your code.
semz has joined #commonlisp
<CptJimKirk> I had (ql:quickload 'ironclad), then something like (with-input-from-string (ironclad:something ....))
igemnace has joined #commonlisp
<CptJimKirk> then something is not part of ironclad or some such
<CptJimKirk> but I've completely changed everything since then
<CptJimKirk> and now I'm using uiop
<Bike> um, okay. it sounds like something went wrong with the loading, i guess.
taiju has joined #commonlisp
<CptJimKirk> I have a new issue
<CptJimKirk> in my asd my depend-on contains #:uiop
<CptJimKirk> in my package I :use #:uiop
<CptJimKirk> but I'm getting a name error on load-system
<CptJimKirk> "uiop/driver causes name conflicts"
<CptJimKirk> even after a slime-restart
<Bike> does it tell you what symbols or packages are involved
<CptJimKirk> I can resolve it
<CptJimKirk> but I dont want this every time
<Bike> you can use shadowing import in your package definition
<Bike> e.g. if you want e.g. if you want str:emptyp, throw in (:shadowing-import "STR" "EMPTYP")
<Bike> wow awesome typing bike
<Bike> :shadowing-import-from, rather
<Bike> what this error means, if you can't tell, is that str and uiop both export a symbol called "EMPTYP"
<Bike> so your package can't use both packages without an ambiguity
<Bike> (which is why restarting doesn't help - there's an actual problem)
nature has joined #commonlisp
<CptJimKirk> so how do I disambiguate?
akoana has left #commonlisp [#commonlisp]
<Bike> shadowing-import-from, like i said
<Bike> tells it to import the symbol from whichever package, which overrides the general package use
jealousmonk has quit [Remote host closed the connection]
CptJimKirk has quit [Quit: Client closed]
CptKirk has joined #commonlisp
<CptKirk> bike I've lost my chat history
<CptKirk> :shadowing something or other?
gioyik has quit [Ping timeout: 276 seconds]
<lotuseater> are you still using the webclient CptKirk ?
<CptKirk> yes
<lotuseater> seems to be not so stable
doyougnu has quit [Ping timeout: 264 seconds]
<Bike> the topic has logs
<Bike> it's shadowing-import-from
<Bike> clhs shadowing-import
<Bike> well, this page by itself isn't going to help too much if you don't already understand the package system
khrbt has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
khrbt has joined #commonlisp
Bike has quit [Quit: sleep]
nature has quit [Ping timeout: 264 seconds]
<lukego> How does one do an FFI binding to a C library in Lisp/SBCL nowadays? are there particularly recommended tools for extracting datatypes and function signatures from C header files?
<hayley> CFFI has a groveler from memory.
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<White_Flame> and one from files, too
* hayley groans
CptKirk has quit [Ping timeout: 256 seconds]
<recordgroovy> cl-autowrap: https://github.com/rpav/cl-autowrap
gioyik has joined #commonlisp
ad-absurdum has joined #commonlisp
shka has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
cjb has quit []
Cymew has joined #commonlisp
rgherdt has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
gaqwas has joined #commonlisp
Wairu_Goodman has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
_Posterdati_ is now known as Posterdati
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
<pjb> CodeBitCookie[m]: you can add material online on http://cliki.net/
<pjb> CodeBitCookie[m]: it's a wiki: a web site you can edit yourself!
pve has joined #commonlisp
<pjb> White_Flame: (merge-pathnames (make-pathname :version "bak") #P";some;dir;foo.bar") #| --> #P";some;dir;foo.bar.bak" |#
<pjb> White_Flame: on the other hand, it's not too useful because implementers refused to map versions to a naming scheme on posix system. Using .~n~ like emacs does would have been nice.
<White_Flame> well conceptually it's not a version, it's adding "another" type, which makes sense to human-reading semantics, forcing to promote the old type into the name
<White_Flame> same thing if you're going to add, say, .gz to a .tar file
<White_Flame> I just did a string operation on it and (pathname <string>)'d it back, which works but certainly bypasses all the idiomatics of pathnames
<White_Flame> (or idioms, I guess)
<hayley> Is there a good way to find all the "unique" type descriptors for arrays which could hold some element type, say a character? I mean "unique" in that the upgraded array element type would not be the same as some other element type.
<hayley> On SBCL, I might find the combinations (<a> <e> 1) for <a> in {ARRAY, SIMPLE-ARRAY} and <e> in {BASE-CHAR, CHARACTER, T} or something like that.
<hayley> I guess it could be brute forced with SUBTYPEP or UPGRADED-ARRAY-ELEMENT-TYPE, as I only have to handle characters and bytes really.
gaqwas has quit [Ping timeout: 252 seconds]
<pjb> White_Flame: doing that is more problematic. Having more than one dot in a file name is highly implementation dependent. This goes also for dotted files…
<pjb> White_Flame: I would do: (let ((path #P";some;dir;foo.bar")) (make-pathname :name (file-namestring path) :type "bak" :defaults path)) #| --> #P";some;dir;foo.bar.bak" |#
<pjb> hayley: it's not possible in general: the standard impose only a few specialized arrays. Almost all arrays can have an upgraded-array-element-type of T.
<pjb> IIRC, only bit-array and character arrays are mandatory.
<hayley> pjb: Sure. But that tends to not happen.
<White_Flame> yeah, it has nothing to do with CL implementation & specs, it has to do with concatenative file extension semantics in broader use which unfortunately aren't modeled there
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
<White_Flame> but yeah, that's a more reasonable form than a string concatenation
pranavats has joined #commonlisp
<hayley> I could do two tests: is ARRAY SUBTYPEP to SIMPLE-ARRAY? (If so, then ARRAY <= SIMPLE-ARRAY and SIMPLE-ARRAY <= ARRAY, so they must be the same) and then use U-A-E-T to pick the element types that the implementation specializes on.
CrashTestDummy has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 246 seconds]
<pjb> White_Flame: well, this can only be done sanely with physical pathnames, so, working with namestrings, instead of pathnames.
<pjb> White_Flame: my example is entirely non-conforming, because 2 dots in a logical filename is not conforming.
amb007 has quit [Read error: Connection reset by peer]
<pjb> White_Flame: multiple dots in a physical filename can be allowed by an implementation, but don't expect any conforming result using pathname-name and pathname-type on them. Instead, you should use the namestring, and parse and process it as any posix or other path.
cosimone has joined #commonlisp
amb007 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
gioyik has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
selwyn has joined #commonlisp
hendursa1 has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
elderK has quit [Quit: Connection closed for inactivity]
jeosol has quit [Quit: Ping timeout (120 seconds)]
hendursaga has quit [Ping timeout: 276 seconds]
<Duuqnd[m]1> So, I think I've said before that I was thinking of making a coffee pot controlled by giving TYPEP an invalid type specifier (since that's undefined behavior allowing the implementation to do anything, including making coffee). If I do end up making that, should I bring it to ELS next year as a little fun thing?
<Duuqnd[m]1> (assuming ELS will be an on location event next year)
<lotuseater> now that reminds me about this quote with coffee
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 246 seconds]
<Duuqnd[m]1> Is that a yes?
<beach> Please do!
<Duuqnd[m]1> Alright, I will
<Alfr> Seems like someone is planing on abusing that ub.
<lotuseater> Duuqnd[m]1: maybe you know it "A mathematician is a machine which turns coffee into theorems."
<Duuqnd[m]1> I've heard something similar said about programmers
recordgroovy has quit [Ping timeout: 264 seconds]
recordgroovy has joined #commonlisp
jasom has quit [Ping timeout: 252 seconds]
ad-absurdum has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
scymtym has quit [Ping timeout: 252 seconds]
<jackdaniel> coffee machine is a machine that turns coffee into coffee
recordgroovy has quit [Ping timeout: 246 seconds]
ahlk has quit [Ping timeout: 252 seconds]
recordgroovy has joined #commonlisp
<pve> beach: Hi, is eclector.reader:interpret-symbol allowed to return something other than a symbol? (like a list, for example)
<pve> I've made a small example that works nicely, but I'm not sure if doing something like that is bending the rules too much.
lottaquestions has joined #commonlisp
<pjb> Duuqnd[m]1: definitely. Undefined behavior at last put to good use: making coffee!
<pjb> (instead of nasal daemons, and missiles hitting your hosue).
<pjb> jackdaniel: coffee machines turn solid coffee (that can be eaten) into liquid coffee (that can be drank or injected intravenously).
<hayley> pjb: If injection is an option for liquid coffee, what about inhalation?
<pjb> hayley: this should be tried, indeed.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
scymtym has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Qwnavery has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.2.1]
<scymtym> pve: that area is a bit in flow at the moment, but the general direction definitely is towards allowing things that are not of type CL:SYMBOL in all places that deal with symbols
jealousmonk has joined #commonlisp
<pve> scymtym: ok that's great to hear
<pve> thanks
Everything has joined #commonlisp
<scymtym> pve: sure. for example, https://techfak.de/~jmoringe/semantic-highlighting-2.png does not intern anything as you can probably tell form the #<SYMBOL ..> objects in the syntax tree. if i recall correctly, the parts that may still assume symbols to be of type CL:SYMBOL are error reporting, structure literals and maybe reader conditionals
<pve> scymtym: Right, I'm just playing around at the moment to see what can be done with it. It's really impressive.
<pve> scymtym: so far, I have:
Nilby has joined #commonlisp
<pve> whether anything of "good taste" emerges, remains to be seen :)
<scymtym> pve: are you implementing package-local nicknames as a "user" extension?
<pve> scymtym: well just as a test, not actually implementing
<scymtym> i see
<pve> hmm or those are actually file-local nicknames, but still
<beach> pve: scymtym is the maintainer, and the main creator, of Eclector, so he is the right one to ask.
<pve> beach: yep, my mistake, sorry
random-nick has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
selwyn has joined #commonlisp
<beach> pve: Nothing to apologize for. I guess I came up with the idea for a configurable reader, the initial embryonic implementation, and the name. But scymtym took it much further and turned it into a stable library with a test suite and documentation.
CrashTestDummy has quit [Ping timeout: 252 seconds]
<scymtym> yeah, no worries
<beach> But now I need a scymtym clone to make me a better pretty printer, with better coding style, test suite, documentation, etc. Any candidates?
<hayley> I think you need a mytmycs for a backwards reader.
<beach> Sure, do you know of one?
<hayley> Sadly no.
<hayley> Perhaps you think I'd know one, living in the southern hemisphere, but this is a common misconception. We do have a large ɯʎʇɯʎɔs population though.
<beach> How on earth did you do that?
<yitzi> beach: is the pretty printer in SICL implemented yet or just stubbed out?
<beach> yitzi: It is not implemented. My initial plan was to use XP, but then I looked at the code, and it is totally awful.
<Nilby> I think Eclector is great, and I've used it. But unfortunately for my project I need something that does more than just CL and has explict and enduring parse state.
<beach> yitzi: And since that was the initial plan, I haven't studied the problem, but I wouldn't be surprised if the same kind of client configuration would be desirable for the pretty printer as for the reader.
<hayley> Me? I have a website bookmarked which picks the right Unicode characters. No idea why those characters exist, still.
<beach> There are Unicode code points for upside-down characters? Wow!
<yitzi> beach: I might be interested in pitching in.
<hayley> Reminds me, I do want to parse a S-expression language which has constructs of the form (foo: bar baz). Could Eclector be extended to parse the "foo:"?
<beach> hayley: When I lived in Aotearoa I bought two copies of the "Kiwi upside-down world map". It is great!
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> yitzi: Oh, that would be great!
attila_lendvai has joined #commonlisp
<beach> hayley: Definitely.
<beach> hayley: I had an argument with the poor salesperson. I claimed that the map is not upside down, and she insisted it is. :)
<yitzi> Since I am reading about the printer right now an contemplating rewriting my indenter using Eclector and that is tangentially related.
<beach> I see. How does your "indenter" work?
<jmercouris> beach: what is “XP”?
<beach> The initial implementation of the pretty printer.
<jmercouris> I see
<Gnuxie> *no-defun-allowed*: it's a bit more problematic since the `:` isn't really part of the symbol and when `foo:` is read I don't think want to return a symbol either
<hayley> Following the jokes made in Melbourne, it would have to be the case that only New Zealand is present on the map, rather than it being missing from the map.
<hayley> We say the same thing about Tasmania.
<yitzi> We talked about before. It is a scanner and not sufficient for your editor (yet)
<hayley> Gnuxie: Yeah, FOO: should read to (SEND FOO) or something wrangleable like that. But I think pve got to more or less the same problem with reading symbols.
<Gnuxie> yeah it sounded similar
<beach> yitzi: Oh, I forgot. Sorry.
<yitzi> No worries
<hayley> ((send foo) bar baz) would be a perfectly fine form to compile. It also means we could have such a SEND form which is not in message position evaluate to some function which sends the message.
<hayley> But now this is not a Common Lisp discussion. Oops.
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
doyougnu has joined #commonlisp
Bike has joined #commonlisp
<Bike> hayley: i don't think there's any portable and comprehensive way to get a list of upgraded array element types. closest i can think of would be the brute force, but that couldn't handle e.g. structure types, if any implementation had those
waleee has joined #commonlisp
<hayley> Yes, I'm planning to brute force it for now. Thanks.
<Bike> there's implementation stuff you can do, like looking through sbcl's SAETP lists, but i'm guessing that's not how you wanna do it
<hayley> Though I'm getting ahead of myself with my new regular expression compiler. What if I inlined the matching loop into the caller? What about linting regexes? Probably helps to have a working compiler first.
ad-absurdum has joined #commonlisp
<Nilby> TIL Lisp machines had a separate array type for pixels, because row col looks bad instead of x y
<hayley> You mean (aref bitmap y x) and (aref bitmap x y)?
<Nilby> yes
<Nilby> also perhaps data locality
<pjb> Waht's wrong with: (defmacro pref (b y x) `(aref ,b ,x ,y)) (pref bitmap y x) ?
<hayley> Makes sense. Though they could have wired the CRT to scan left to right slowest, rather than top to bottom, to fit the data layout.
<Nilby> I would bet there were other things special about the pixel array type too
<pjb> Also, indeed, some bitmap crt monitors were rotated 90 degree, so it was actually scanning vertically…
<Nilby> that would make just macro-ing around it not effienct enough
<hayley> But I'd agree that (y, x) looks strange. Worse was attempting to decode a three dimensional bitmap when I didn't know the order of the axes.
<Nilby> hayley: Exactly. I think they probably eventually had 3d texture array types too.
<hayley> Still, you would want to choose carefully to get better locality. But, say, filling a word at a time could be feasible with either layout.
<Nilby> I think the hardware framebuffer layout was a consideration
ad_absurdum has joined #commonlisp
ad-absurdum has quit [Ping timeout: 246 seconds]
ad_absurdum has quit [Client Quit]
<Nilby> There's a lot of fascinating discussion of arrays in http://cl-su-ai.lisp.se
<mfiano> I believe they had TV planes
<Nilby> yes
<mfiano> Which let you change microcontrollers iirc
<mfiano> so i guess 3d in a way :)
<Nilby> It seems like some of the issues of CL arrays are because we are using "Fortan Machines".
<lotuseater> Nilby: what are possible examples for some array issues?
<Nilby> That many times an array element is forced to be of type T, which might come for free on LispMs, when it's could be more efficient to be a smaller direct type.
<Nilby> on our Fortran Machines
<Nilby> or probably by now C machines
<Bike> free?
<lotuseater> Linux is a perfect C VM :)
<Nilby> Free as in part the hardware memory
<Nilby> or microcode level at least
<lotuseater> Nilby: okay I see what you mean, so for example when you have a struct with well typed slots.
<Bike> i don't understand. what would be in the microcode? procedures for accessing elements?
<Bike> are you saying elements wouldn't have to be boxed?
<Nilby> bike: yes, wheres boxing on a lispm was at a lower level
<Bike> that doesn't seem free? something is still doing all the complicated stuff
<Bike> what cost exactly would be defrayed?
<Nilby> I suppose it would be like if the SDRAM handled boxing and had explict room for the bits
<Nilby> the cost of boxing unboxing etrax bits etc. is still somewhere of course
gioyik has joined #commonlisp
<Nilby> and when the memory is showing up on a screen, you can't have those extra bits and it has to be layed out right
<Nilby> Like if we weren't using fortran machines, we might have 68 bit registers and memory bus, like the 36 bit pdp10.
selwyn has quit [Read error: Connection reset by peer]
<Bike> laid out?
<Bike> it's just like, something is still doing the work if you keep the usual design of tagging
<Nilby> right, but from the software level, it's for free if the cpu isn't doing it and you don't have to write code for it, and almost all other memory has the same overhead
<Nilby> In other words your element-type T, won't have different performance from element-type fixnum or maybe even character.
ahlk has joined #commonlisp
nature has joined #commonlisp
<Bike> well, what performance are you talking about
<Bike> indexing into arrays is cheap wherever, it's boxing where you start needing to cons
<Bike> something would still be consing, doing type tests, following pointers
<Bike> with a wider bus you could maybe avoid some untagging shifting type stuff, but i don't understand how that relates to arrays, and anyway that kind of arithmetic stuff doesn't really take that much time
asarch has joined #commonlisp
<Nilby> I agree something still has to do such things, alithough a lot of consing can be avoided, I'm probably too ignorant of the low level design to explain it.
jasom has joined #commonlisp
flip214 has quit [Ping timeout: 265 seconds]
<Bike> i don't understand how some property of the machine could let you avoid consing. consing is part of the algorithms here.
flip214 has joined #commonlisp
<Bike> well, other than again, if you had a wider bus you might be able to skip boxing doubles
aeth has quit [Ping timeout: 246 seconds]
aeth has joined #commonlisp
<CodeBitCookie[m]> Hello everyone, I came in yesterday and people were helping me change my mind about common lisp
<CodeBitCookie[m]> I mean I liked it but was trying to turn it into a programming language its not
ec has joined #commonlisp
<CodeBitCookie[m]> I still don't understand when to use a functional approach and when to just use common lisp imperatively
tyson2 has joined #commonlisp
<CodeBitCookie[m]> I found that a functional approach boosts my productivity by getting less bugs
asarch has quit [Quit: Leaving]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
<lotuseater> "And what did it cost you?" "Everything." :)
gioyik has quit [Ping timeout: 276 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<beach> CodeBitCookie[m]: Feel free to use a functional style with Common Lisp if you are more productive that way. Otherwise, in modern Common Lisp code, you will find the functional style used mostly in macro expanders.
<beach> CodeBitCookie[m]: Otherwise, modern Common Lisp code frequently use the very different style of "object-oriented programming" made possible with CLOS.
<beach> CodeBitCookie[m]: But if you are going to use functional programming exclusively, there might be better alternatives than Common Lisp. What is it with Common Lisp that you like?
gioyik has joined #commonlisp
waleee has quit [Ping timeout: 246 seconds]
<tyson2> Is typical modern Scheme code more functional than Common Lisp?
waleee has joined #commonlisp
jeosol has joined #commonlisp
<pve> hayley: I'm learning about eclector now. I tried doing the "foo:" thing:
eddof13 has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
Inline has joined #commonlisp
<jeosol> Good morning guys!
ec has joined #commonlisp
<lotuseater> Hi there jeosol.
<jeosol> Hi lotuseater, howdy
gioyik has quit [Ping timeout: 276 seconds]
<jeosol> I have a question. Say I have two systems A and B that can be loaded with (ql:quickload :A) and (ql:quickload :B) (each also starts on a port). I can then send computations there via swank-client from another lisp process
<CodeBitCookie[m]> beach Yes but I like common lisp because I could get stuff done within 2 weeks of learning it.
<CodeBitCookie[m]> lotuseater heyyy you came
<CodeBitCookie[m]> How are you?
<jeosol> For now, I launch the A and B lisp process manual, but I want to be able to do this automatically, e.g., when a user clicks a button. It's like starting a container (I did try docker, had some issues, but I want to reduce dependencies)
<jeosol> s/manual/manually
<beach> CodeBitCookie[m]: So maybe your increased productivity with functional programming is just because you have been using a language other than Common Lisp, which is not terribly adapted to other paradigms?
<lotuseater> I'm fine, and you're right, one doesn't have to master everything for doing great things with it. That would take much longer.
<Bike> jeosol: do you want to fork?
<jeosol> Bike: hahaha
<jeosol> I am thinking along those lines. but now sure how to go about it. I guess I will have to run things in the background. Then when done, I just send a form to quit it
<jeosol> Bike: I don't mind doing that. I just want something that works. I did look into docker-swarm a bit, but wanted to stay away from having other tools to worry about
<CodeBitCookie[m]> beach lotuseater I actually like to use more pure languages like Haskell
<jackdaniel> do you mean pure like "innocent"?
<jeosol> jackdaniel: thanks for the laugh
<jackdaniel> i.e not stained with crude stuff like practical applications? ,)
<jackdaniel> sure thing
<lotuseater> CodeBitCookie[m]: At one point Simon Peyton-Jones made a joke and called Haskell "the most imperative language" :)
<jeosol> Bike: so fork is the way to go?
<CodeBitCookie[m]> Okay I like Haskell and have made many practical applications. That's besides the point and anyways I was looking at OCaml and thinking of switching because it doesn't force you as much but just sets a preferred path and still has good types and OOP etc
<jeosol> better way
<jackdaniel> CodeBitCookie[m]: if haskell works better for you then go for it. as beach mentioned, prevailing style in modern cl applications is object orientation
<jackdaniel> you may write functional code in common lisp because its specification is not partial towards any particular style though
<jackdaniel> regarding lack of practical applications it was a silly joke but you were the person who triggered it: saying that some language is "pure", and something is "hygienic" is so purposefully biased phrasing that it forces me to make such jokes
<CodeBitCookie[m]> Its doesn't though. No language works as good as CL for me. I just find functional programming fun.
<CodeBitCookie[m]> Okay I have to go eat will come back
<lotuseater> CodeBitCookie[m]: Combining powerful ideas makes things often even more powerful.
<Bike> jeosol: i don't know, that's just what came to mind. you could also use run-program
aeth has quit [Ping timeout: 260 seconds]
<jeosol> Bike: thanks. I will look into it more. I want to simulate start one, sending a computation, and then stopping it
<jeosol> s/start/starting
aeth has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
gioyik has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
contrapunctus has joined #commonlisp
molson has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
attila_lendvai has quit [Ping timeout: 246 seconds]
gioyik has joined #commonlisp
pjb has quit [Ping timeout: 268 seconds]
selwyn has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
CptKirk has joined #commonlisp
CptKirk has quit [Client Quit]
doyougnu has quit [Remote host closed the connection]
doyougnu has joined #commonlisp
CptKirk has joined #commonlisp
gioyik has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
CptKirk has quit [Quit: ERC (IRC client for Emacs 26.3)]
CptKirk has joined #commonlisp
gioyik has joined #commonlisp
aeth has quit [Ping timeout: 246 seconds]
pjb has joined #commonlisp
aeth has joined #commonlisp
CptKirk has quit [Quit: WeeChat 2.8]
CptKirk has joined #commonlisp
CptKirk has quit [Client Quit]
CptKirk has joined #commonlisp
yewscion has joined #commonlisp
CptKirk has quit [Quit: WeeChat 2.8]
CptKirk has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sterni has quit [Ping timeout: 240 seconds]
sterni has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
eddof13 has joined #commonlisp
amb007 has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
Cymew has quit [Ping timeout: 264 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
gioyik has joined #commonlisp
gaqwas has joined #commonlisp
<lukego> Hey CFFI n00b question - is there a good example somewhere showing how to to the CFFI-GROVEL syntax for bitfields in structs and also anonymous unions in structs? example of both that I'm trying to specify at the moment here: https://github.com/torvalds/linux/blob/master/include/uapi/linux/perf_event.h#L363-L417
gioyik has quit [Ping timeout: 276 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
gioyik has joined #commonlisp
<semz> CodeBitCookie[m]: There is nothing wrong with using CL functionally even if that's not the most popular usage. If it works, it works, and ime Haskell knowledge is pretty useful when working with CL since the language is so flexible that you can easily go on really questionable design paths without some guiding principle.
<semz> But when it would be really nice to stray off that path, CL will still have your back.
<semz> ...that ended up a bit wonky. The "path" in the second post refers to what the principle suggests.
cosimone` has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
CptKirk has quit [Quit: WeeChat 2.8]
amb007 has joined #commonlisp
CptKirk has joined #commonlisp
CptKirk has quit [Client Quit]
CptKirk has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
X-Scale has quit [Ping timeout: 246 seconds]
X-Scale` has joined #commonlisp
gioyik has joined #commonlisp
X-Scale` is now known as X-Scale
rgherdt_ has joined #commonlisp
yewscion has quit [Remote host closed the connection]
rgherdt has quit [Ping timeout: 264 seconds]
tophullyte has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
Mandus has quit [Ping timeout: 268 seconds]
Mandus has joined #commonlisp
yewscion has joined #commonlisp
CptKirk has quit [Quit: ERC (IRC client for Emacs 26.3)]
CptKirk has joined #commonlisp
Mandus has quit [Ping timeout: 246 seconds]
<CptKirk> /names
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gioyik has joined #commonlisp
gioyik has quit [Ping timeout: 276 seconds]
Mandus has joined #commonlisp
eddof13 has joined #commonlisp
cosimone has joined #commonlisp
tophullyte has quit [Ping timeout: 252 seconds]
yewscion has quit [Ping timeout: 246 seconds]
shka has quit [Ping timeout: 252 seconds]
asarch has joined #commonlisp
<borodust> Xach: where should i look first if quickloading after installing new dist takes too long?
scymtym has quit [Ping timeout: 264 seconds]
gioyik has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
kakuhen has joined #commonlisp
ec has joined #commonlisp
aeth has quit [Ping timeout: 265 seconds]
aeth has joined #commonlisp
yewscion has joined #commonlisp
<CptKirk> How can I tell slime what directory it should be in?
<CptKirk> or asdf?
<lisp123> ASDF or Slime?
<CptKirk> I wnat to say slime
<CptKirk> I don't think I want that
<CptKirk> I have a running slime repl, I want to tell slime what directory its operating in
<CptKirk> because it can't find "../myfolder/myfile.txt"
<lisp123> ah
<CptKirk> because its looking in the wrong direcoty
<lisp123> I usually type the full path
<CptKirk> its in the source code?
<CptKirk> it has to be relative
<lisp123> I'll let someone else answer, the best I can think of is a hack
<lisp123> set a variable to the directory
<lisp123> then appen your relative path to it
<Posterdati> CptKirk: where are spock and bones?
<CptKirk> Spock is too logical for programming. He conjures programs into being with his mind
<CptKirk> And bones wouldn't be here, dammit, he's a doctor not a programmer
<CptKirk> Whereas I, I'm the Captain of the Enterprise design patterns
<CptKirk> Scotty is in charge of writing the core engine though.
ec has quit [Ping timeout: 276 seconds]
<CptKirk> @lisp123 I answered my own question. In the comma commands list there is a cd function which calls swank to update the running directory
<lisp123> CptKirk: Great. You know you are becoming a lisp wizard once you start answering your own questions ;)
<lotuseater> CptKirk: or he likes using Prolog
ec has joined #commonlisp
cosimone has quit [Ping timeout: 264 seconds]
kevingal has joined #commonlisp
Lord_of_Life has quit [Read error: Connection reset by peer]
Lord_of_Life has joined #commonlisp
<CptKirk> /query lotuseater
<CptKirk>
<CptKirk> hah
<lotuseater> hm but i can see that you typed this command ^^
kevingal has quit [Remote host closed the connection]
<CptKirk> yeah, idk how that happened
<CptKirk> maybe there's a leading space?
gioyik has quit [Ping timeout: 276 seconds]
ec has quit [Ping timeout: 276 seconds]
Lord_of_Life_ has joined #commonlisp
aeth_ has joined #commonlisp
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
ec has joined #commonlisp
CrashTestDummy3 has joined #commonlisp
elderK has joined #commonlisp
Everything has quit [Quit: leaving]
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
asarch has quit [Quit: Leaving]
pve has quit [Quit: leaving]
gioyik has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
greyrat has quit [Ping timeout: 260 seconds]
Lycurgus has joined #commonlisp
lucerne has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
molson_ has joined #commonlisp
molson has quit [Ping timeout: 264 seconds]
ec has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 264 seconds]
rgherdt_ has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
ec has quit [Ping timeout: 276 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
ec has joined #commonlisp
scymtym has joined #commonlisp
lisp123 has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
igemnace has quit [Remote host closed the connection]
Nilby has quit [Ping timeout: 252 seconds]
lisp123 has quit [Ping timeout: 246 seconds]
lottaquestions has quit [Ping timeout: 246 seconds]
ec has quit [Ping timeout: 276 seconds]
<Xach> borodust: hmm, that can happen if it's scanning for local-projects directories.
<Xach> borodust: sometimes interrupting and looking at the backtrace is illuminating
<random-nick> slime has a slime-cd command to change the inferior lisp's cwd
<random-nick> oh, I was scrolled up
ec has joined #commonlisp
Qwnavery has joined #commonlisp