jackdaniel 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.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
brett-soric has joined #lisp
Oladon has quit [Ping timeout: 248 seconds]
frgo has joined #lisp
vsync has joined #lisp
<vsync> is there anything already to simplify the situation where one wishes to define a protocol and specify methods which may be readers but without imposing a slot requirement?
<vsync> this may go into the question of protocol declaration which I'm sure has been discussed before
frgo has quit [Ping timeout: 258 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
[mark] has joined #lisp
frgo has joined #lisp
brett-soric has left #lisp [#lisp]
[mark] has quit [Quit: Leaving]
frgo has quit [Ping timeout: 272 seconds]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
Ankhers has joined #lisp
<pjb> vsync: what about having a bunch of defgeneric?
<Ankhers> Hey, I'm just getting started with lisp. Can anyone suggest some books, blog articles, whatever else that they consider to be essential learning materials?
<vsync> pjb: naturally but wondering if there is a nicer way that allows for writers and for grouping with protocol (classes)
<pjb> vsync: there are various macros to deal with the problem of interfaces, with various features, in systems such as asdf and others.
<pjb> vsync: so you may find something you like in some library.
<vsync> something like (defclass foo () ((bar :allocation nil))) modulo of course the redundancy of slot-/accessor-name
<pjb> vsync: or just write your own macros.
<vsync> though I'm realizing this may encompass a larger question so I may write and post that
<vsync> pjb: naturally, more curious if there is such a thing intended generically, or a convention
<Ankhers> pjb: Thanks.
<vsync> this being, of course, both possible strength and weakness in CL-land
<pjb> vsync: notably, there you assume a CLOS class. But a protocol can be implemented with different kinds of objects. (structures, vectors, database backends, etc).
<vsync> pjb: indeed, part of which I hope to avoid
<vsync> I'll try to put this on c.l.l soonish
<vsync> thought I ran into something about protocols some time ago that thought the way I thought about them... and certainly kicked it around here before
<Josh_2> Whats the 'functional' sql library that people have mentioned? For postgres
<no-defun-allowed> Postmodern?
<Josh_2> I don't think so, as postmodern is what I normally use
<Josh_2> phoe was talking about it a few weeks back, I'm will ask him when it is a reasonable time
<vsync> Josh_2: clsql?
akoana has left #lisp ["Leaving"]
notzmv has joined #lisp
dialectic has quit [Ping timeout: 245 seconds]
<Josh_2> hmmm perhaps
<Josh_2> although I'm pretty sure he mentioned something about having to actually write the sql statements and not using a dsl
frgo has joined #lisp
frgo has quit [Ping timeout: 246 seconds]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
Lord_of_Life has joined #lisp
<aeth> Someone should write some multithreaded CL benchmarks so we can compare CPUs and implementations. (Maybe those already exist?)
<oni-on-ion> there always seems to be something about benchmarks they are either not specific enough or too specific
orivej has quit [Ping timeout: 264 seconds]
Prof_Birch has joined #lisp
dialectic has joined #lisp
frgo has joined #lisp
frgo has quit [Ping timeout: 248 seconds]
Prof_Birch has quit [Remote host closed the connection]
frgo has joined #lisp
esrse has joined #lisp
ltriant has quit [Ping timeout: 245 seconds]
frgo has quit [Ping timeout: 246 seconds]
<vsync> I'm trying to (re-)grok the rationale for having both a protocol class and a predicate
wigust has joined #lisp
igemnace has joined #lisp
wigust- has quit [Ping timeout: 258 seconds]
nanoz has joined #lisp
<stacksmith> vsync: keep in mind that generic functions do not require classes... So you can define a 'protocol' as a set of generic functions that do different things depending on type, class, or a check for some parameter being equal to something else...
<vsync> stacksmith: I do understand this
<vsync> I'm talking about the case in which one has a protocol class and/or a predicate
<vsync> as in CLIM
<stacksmith> I see.
<vsync> and not necessarily endorsing that specific setup either
<stacksmith> I find CLIM somewhat complicated. There is probably a good reason for things to be complicated, but I always curse and look for something less complicated before I get to understanding why.
frgo has joined #lisp
ltriant has joined #lisp
frgo has quit [Ping timeout: 248 seconds]
dddddd has quit [Remote host closed the connection]
seok has quit [Remote host closed the connection]
ltriant has quit [Ping timeout: 258 seconds]
rumbler31 has quit [Remote host closed the connection]
torbo has quit [Remote host closed the connection]
ltriant has joined #lisp
frgo has joined #lisp
ltriant has quit [Ping timeout: 258 seconds]
dialectic has quit [Ping timeout: 246 seconds]
frgo has quit [Ping timeout: 272 seconds]
ltriant has joined #lisp
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
martylake has joined #lisp
dialectic has joined #lisp
martylake_ has quit [Ping timeout: 245 seconds]
vlatkoB has joined #lisp
<beach> Good morning everyone!
frgo has joined #lisp
<fiddlerwoaroof> morning, beach
frgo has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 245 seconds]
dale has joined #lisp
rumbler31 has joined #lisp
Arcaelyx has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Ping timeout: 248 seconds]
nanoz has quit [Ping timeout: 246 seconds]
ltriant has quit [Ping timeout: 268 seconds]
rozenglass has quit [Remote host closed the connection]
frgo has joined #lisp
ltriant has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
manualcrank has quit [Quit: WeeChat 1.9.1]
quazimodo has joined #lisp
<stacksmith> Good morning, beach
stacksmith has quit [Ping timeout: 272 seconds]
frgo has joined #lisp
frgo has quit [Ping timeout: 268 seconds]
SaganMan has joined #lisp
frgo has joined #lisp
SaganMan has quit [Ping timeout: 258 seconds]
jprajzne has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
frgo has quit [Ping timeout: 272 seconds]
<vsync> best term for an arg that can be either value to match or predicate to satisfy?
* vsync is thinking filter
<vsync> or qualifier but that seems more dumb
<dialectic> are you calling functionp on the argument and branching on that?
<dialectic> seems odd... if you're going with that, name it selector
v88m has quit [Ping timeout: 258 seconds]
_whitelogger has joined #lisp
JohnMS_WORK has joined #lisp
v88m has joined #lisp
<beach> vsync: "filter" is really bad (for a different reason), because it doesn't tell whether it blocks the objects being filtered, or whether those are the objects that are retained.
<beach> vsync: So how can you tell whether the argument is a value or a predicate, especially since predicates are values too?
dialectic has quit [Ping timeout: 245 seconds]
v88m has quit [Ping timeout: 248 seconds]
keep_learning_M has joined #lisp
orivej has joined #lisp
<no-defun-allowed> If they're rewriting something like remove/remove-if, I would expect it's an abstraction for a sequence containing elements of some specific type.
Inline has quit [Quit: Leaving]
<beach> We may never find out.
dale has quit [Quit: dale]
dialectic has joined #lisp
varjag has joined #lisp
v88m has joined #lisp
MichaelRaskin has quit [Ping timeout: 245 seconds]
<no-defun-allowed> My expectation is that they won't have any values that would look like predicates (so, not symbols or functions).
v88m has quit [Read error: Connection reset by peer]
CloseToZero has joined #lisp
v88m has joined #lisp
schweers has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
donotturnoff has joined #lisp
ggole has joined #lisp
<shka__> fiddlerwoaroof: interesting
<shka__> fiddlerwoaroof: sounds about right
<shka__> will take a look into it later
<jackdaniel> CLIM specification is complicated because it describes at least three things: window manager abstraction, barebones I/O toolkit and CLIM itself
karayan has joined #lisp
nowhereman has quit [Ping timeout: 245 seconds]
<lukego> I'm coming to the pretty-printer late in life. I have a really newbie question. How come this errors in SBCL? (format nil "~<x~_y~>"). I've looked in the debugging and I see that ~_ is not allowed inside ~<~> but I don't get why not? I thought this would straightforwardly mean "put a newline between "x" and "y" if we don't have space on the line for both."
<shka__> lukego: you know about print-unreadable, right?
<shka__> you should not put <> manually
<shka__> as for the actual question, i don't know, i suck at format
<shka__> badly
<lukego> I'm putting in ~< and ~> for PPRINT-LOGICAL-BLOCK rather than for #<object> output.
<beach> Newline is ~%, no?
<lukego> Maybe I am confused and need to read the Waters paper on XP again from the top. I'm hoping that it's only minor confusion.
<lukego> beach: right but I want a conditional newline only if output is pushing close to the right margin, which is why I'm trying to use ~_ in place of ~%
<lukego> and I'm expecting that ~<...~> will keep everything left-aligned in case the newline is needed.
<beach> I see.
<lukego> Maybe I should just assume "deep" confusion and read the docs again from the start :).
<lukego> actually I'll check Edi's fine manual for a recipe first...
<beach> Yeah. I personally find the description of the pretty printer quite hard to understand.
<lukego> I thought it made sense when I read it but I haven't actually been able to write working code based on my "understanding" yet so I may be deluding myself :)
<beach> Heh, I see what you mean.
ltriant has quit [Quit: leaving]
<dialectic> Link to this description?
andrei-n has joined #lisp
karayan has quit [Quit: karayan]
karayan has joined #lisp
<beach> clhs 22.2
<lukego> dialectic: The three best resources I have on the pretty printer are 1989 documentation by Richard Waters (https://dspace.mit.edu/bitstream/handle/1721.1/6503/AIM-1102.pdf), a paper by Waters on printing Lisp with Pascal syntax (https://3e8.org/pub/scheme/doc/lisp-pointers/v5i2/p27-waters.pdf), and Peter Norvig's pretty-printer-driven transpiler from CL to Dylan (https://github.com/dylan-lang/lisp-to-dylan).
CloseToZero has quit [Ping timeout: 276 seconds]
CloseToZero has joined #lisp
<dialectic> Oh, that norvig code will be instructive to read, thank you for linking that.
<dialectic> While I have people's attention, does anyone have any resources for fast and space efficient multimethod dispatching? I've got the following two papers queued up already:
<shka__> dialectic: beach actually designed new algorithm for it
<dialectic> But I also was interested in implementation details for Lisp and SBCL specifically.
<shka__> and it seems to work quickly
<shka__> AFAIK there was even implementation of the said algorithm in the sbcl as a proof of concept
<shka__> and it really speed it up
<shka__> by like 40%
<lukego> Edi to the rescue! "It is important that the closing "~:>" directive contains the colon as shown because otherwise this means something completely different (justification) which doesn't mix with pretty-printing." (p261)
<dialectic> I should compile a comparison of all the different multimethod dispatch implementations in the wild.
<dialectic> Both research and in practice (Lisp, Clojure, Julia, Dylan?)
<shka__> lukego: i am glad that you figured this out, sorry i could not help
<no-defun-allowed> Nice, FORMAT can smile. ~:>
<lukego> So it could be that I have an accurate mental model of the pretty-printer but am just a n00b with the format-string directives and maybe should stick with long form (pprint-newline) etc first.
<lukego> shka__: np :)
<shka__> I have been programing in lisp for years and yet i still don't quite know how to do stuff with format
<shka__> so you are not alone :P
<_death> lukego: long form is best.. otherwise it leads to having to manually decode the control string as in https://adeht.org/casts/new-project.html
<dialectic> format is one of those things that when you first learn about you scorn but grows on you over time.
<lukego> yeah, like LOOP.
<beach> dialectic: My paper takes into account the specific situation of Common Lisp where the classes can be redefined at run time.
<dialectic> I like loop. I ended up preferring iterate, once I learned that. But loop is, still, good.
<lukego> and CLOS, so people tell me, though it hasn't grown on me yet :P
<dialectic> Haha. One of these days I will come up with a good use for metaclasses. Actually, I probably never will.
karayan has quit [Ping timeout: 276 seconds]
<saturn2> i'm using metaclasses, they're pretty neat
<aeth> The only metaclass I've needed is one to enforce type checking.
<beach> dialectic: Any table-based technique is going to lose on modern processors.
<shka__> beach: why table-dased techniques loose on modern cpus?
<dialectic> _death: Is this the same drew that was reviled by Erik Naggum?
<shka__> is it because of they are super scalars?
<_death> lukego: though I guess there could be a format-explain operator that automatically decodes it.. hmm
<beach> shka__: Because they require memory accesses, which are an order of magnitude (or more) slower than register operations.
<no-defun-allowed> Still reading, but the table could get big quickly with multiple-inheritance.
<shka__> ah, ok, this is actually simple
<beach> shka__: Yes. My technique is based on a small number of comparisons with small constants, so it can be done by register operations.
<_death> dialectic: I don't recall strong opinions towards this person from another.. in any case, it's the same Drew that wrote a bunch of Lisp papers, books, software
<dialectic> saturn2: metaclasses for what purpose?
karayan has joined #lisp
<saturn2> i'm working on a web project that involves multiple similar but different sites, i used metaclasses to allow site objects to inherit things other than just slots and methods
<dialectic> oh. neat
<fiddlerwoaroof> dialectic: if youre interested, I have an unoptimized implementation of multiple dispatch inJavascript, that I hope to eventually polish for use in "real" projects
<dialectic> I'm mostly interested in speed for compiled code
<jackdaniel> vm = js.startVM(); vm.shell("sbcl"); vm.out("defmethod …"); ;)
<dialectic> lol
<no-defun-allowed> finally, an AOT compiler for javascript
<beach> dialectic: scymtym has done some work implementing my technique in SBCL.
<fiddlerwoaroof> I've always foubd Clojure's multimethods disappointing: they're more like filtered dispatch than what CLOS has
CloseToZero has quit [Quit: WeeChat 2.5]
<beach> In fact, drmeister seems to be attempting the use of my technique for C++, instead of the usual, vtable-based technique used by most C++ compilers.
<shka__> beach: this is actually pretty cool
<beach> I wonder why C++ still uses vtables. Is it in the standard or something?
<shka__> beach: let me check
<beach> shka__: Sure, I know many people get really excited about C++. I personally don't, but hey.
<lukego> beach: what's your technique, out of curiosity?
<ggole> vtables are very much an implementation detail, but all the compilers do it that way afaik
<lukego> (How simple life would be if one could become excited about C++ or Java...)
<shka__> beach: nah, now i am wondering what's going on, you have opened my eyes for some things that should have been obvious to me
<beach> I am wondering about C++, because the main difficulty in designing my technique was to deal with obsolete instances, but C++ doesn't have that problem, so I am surprised nobody has come up with a technique based on inline caches the way mine is.
<dialectic> beach: I haven't read this paper but are you saying that a generic function using your implementation should be faster than a table of function pointers?
<shka__> dialectic: they actually are
karayan has quit [Ping timeout: 252 seconds]
<ggole> It's possible to defunctionalise, and some C++ compilers are starting to do that (they call it devirtualisation)
<beach> dialectic: Yes, especially for multiple dispatch.
<ggole> That interferes a bit with separate compilation though
<beach> dialectic: C++ can probably be faster when the index of the table entry is known at compile time, but I am interested in dynamic languages like Common Lisp.
frgo has joined #lisp
<lukego> beach: My hot take on fast dispatching - which I realize nobody solicited :-) - is that the big win would be to make it play nice with the CPU branch predictor so that method bodies can be executed speculatively without waiting for loads. Seems like your approach should work really well in that sense based on a quick skim.
frgo has quit [Read error: Connection reset by peer]
<beach> lukego: I suspect you are right.
<lukego> That's the trick that LuaJIT uses anyway.
frgo has joined #lisp
<vsync> dialectic: I'm letting the dispatcher see if it's a function
karayan has joined #lisp
<vsync> beach: good point on the ambivalence
<ggole> lukego: you want to change the table into a decision tree that branches directly to concrete implementations?
<lukego> ggole: yeah.
<vsync> no-defun-allowed: good guess... and you may call me "he" or "it"
<ggole> Yeah, that's close to defunctionalisation
<no-defun-allowed> vsync: alright, gotcha
<vsync> this is all in a rough prototype... model, really
<lukego> LuaJIT basically transforms all the data-dependencies into control-dependencies and then outsources the problem to Intel's billions of dollars of work on branch prediction.
<ggole> There are a number of whole program compilers (for static languages, mostly) that work that way.
<vsync> so none of this really matters heh... just musing conventions
<ggole> It does seem like doing it dynamically (and partially) should work.
karayan has quit [Remote host closed the connection]
zhlyg has joined #lisp
GoldRin has quit [Read error: Connection reset by peer]
seok has joined #lisp
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
<shka__> lukego: actually beach algorithm looks like very friendly approach to the branch prediction to me
<lukego> ggole: Could also be that you don't need to go that far and CPUs can predict indirect branches well too, I don't have much experience with that. Generally I am just in awe of how well branch prediction works in practice.
<shka__> as friendly as possible
<ggole> Mmm. There are advantages beyond just removing indirect branches, though, since you can inline the now direct calls and get the usual benefits.
scymtym has joined #lisp
<ggole> The usual disadvantage is that defunctionalisation is a whole program transformation, but dynamic compilers don't really suffer from that.
<ggole> So I think it is quite attractive.
<aeth> This article talks about some advanced branch prediction. And it points out that it's not even the best known methodology! https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
<shka__> ggole: but you will have to know ahead of time class of the object, right?
<ggole> If you compile strictly AOT, then yes. However a JIT compiler can record which classes/values actually arrive during execution, avoiding that problem.
<seok> How would one access POST parameters with Clack or Caveman2?
<dialectic> ggole: What do you mean "defunctionalization is a WPO, but dynamic compilers don't really suffer from that"?
<seok> Having a hard time trying to figure out the documentation
hhdave has joined #lisp
orivej has joined #lisp
<ggole> A dynamic compiler is presented with all of the code at runtime (although not necessarily all at once). Thus there's no issue of separate compilation.
<dialectic> seok: I haven't used it but isn't this what you're asking for? https://github.com/fukamachi/caveman/blob/master/README.markdown#structured-querypost-parameters
<seok> Yes, I've been trying to figure that out
<dialectic> Looks like _parsed is an association list.
<seok> Yes, but I am getting NIL
<dialectic> In other frameworks the body isn't always parsed until you ask it to be parsed. I wonder if there's a way to do trigger that in caveman2.
<dialectic> Doesn't look like that applies to this, though. I dunno :(
<seok> (defroute ("/login" :method :POST) (&key x)
<seok> So this only puts NIL and done
<dialectic> aeth: Hardware... neural... nets? That's kind of crazy.
martylake has quit [Read error: Connection reset by peer]
<dialectic> seok: No, you're supposed to use (defroute ("/login" :method :POST) (&key _parsed) and then get the values out of _parsed.
quazimodo has quit [Ping timeout: 246 seconds]
<no-defun-allowed> dialectic: The predictor isn't that dense, just one perceptron per register. I think Zen 1 had something like that too.
<phoe> JohnMS_WORK: cl-yesql
<phoe> uh I mean
<phoe> minion: memo for Josh_2: cl-yesql
<minion> Remembered. I'll tell Josh_2 when he/she/it next speaks.
<seok> dialectic: ugh that works
martylake has joined #lisp
<seok> why can't I use my own symbols
orivej has quit [Ping timeout: 245 seconds]
<dialectic> seok: You can tell from the rest of the documentation that the macro uses specific symbols to bind specific features. _splat is another example in the docs.
<seok> Right o
<seok> Been reading the docs few times over for past couple days
<seok> Makes sense now
<dialectic> no-defun-allowed: Only a 10% improvement?
<aeth> dialectic: I guess the next step in advanced compiler writing is reverse engineering exactly how Zen 2's branch prediction works and optimizing for it. (Or deoptimizing it with pathalogical cases if you're writing Intel C's compiler.)
<seok> Thank you
<no-defun-allowed> dialectic: Seems this paper was presented to the IEEE in 2001 if it matters. I wouldn't be scared.
<dialectic> You're welcome. I remember you asking that question yesterday (or the day before) and felt bad when you asked it again
<no-defun-allowed> And well, there's only so much you can do by increasing clock rate. I think CPU manufacturers learnt that at the end of the 00's.
<aeth> no-defun-allowed: A lot of Intel marketing right now is just a giant "5" and then a smaller ".0 GHz"
<no-defun-allowed> aeth: Don't forget the 1HP portable air conditioner used to get the processor to that speed.
<no-defun-allowed> Apparently perceptrons were used for prediction as early as Piledriver (in 2012).
<shka__> no-defun-allowed: 5GHz on silicon translates to 120W of TDP which is a practical limit of air cooling
boeg has joined #lisp
<shka__> so you either pick other semiconductor or stick to lower clock
<no-defun-allowed> shka__: I was referring to a demonstration Intel did where they literally used an air conditioner to cool their processor.
<shka__> oh, that huge industrial cooler?
<shka__> yeah, i remember that
<shka__> it was pathetic
<no-defun-allowed> https://i.redd.it/hqlqm3jkfn211.png is the last I'll say about perceptrons and processor cooling, though I want to write a perceptron now.
<seok> anyone use the access library?
<seok> Is there any drawbacks in using it?
<shka__> it is probabbly the simplest ML algorithm possible, but i wonder how they put it on the silicon
<no-defun-allowed> fixed point quick maths(tm)
<no-defun-allowed> seok: prolly slower if all sequences look the same to the library
<aeth> shka__: Or maybe the next gen Intel CPU's stock coolers will be liquid...
<shka__> aeth: impractical
<shka__> besides, desktop CPUs are not that important to the intel
<aeth> an impractical gimmick is exactly the sort of thing we might see in parts that are stereotyped toward impractical gamers, though
<shka__> or AMD in fact
<aeth> It's all about the servers
<seok> no-defun-allowed: you are right the docs say "it should not be used in code where performance is important"
<shka__> seok: screw performance ;-)
amerlyq has joined #lisp
<seok> shka__: haha, for at least early stages of development I will try this out. I don't imagine accessing slot values will ever be a bottleneck in my web application
<no-defun-allowed> Also I can't tell if it handles multi-dimensional arrays, which is a shame because you don't see them in many languages and I like to brag.
<seok> When I start optimizing I will probably swap it out
<shka__> seok: good idea
<shka__> but chances are, it will be good enough
elwood has quit [Ping timeout: 246 seconds]
<aeth> shka__: Fortunately, even though the important computers are cloud servers, they're not too different from desktop CPUs with lower clock speeds, especially these days with the core wars going on.
dialectic has quit [Ping timeout: 258 seconds]
HDurer has quit [Ping timeout: 272 seconds]
rumbler31 has joined #lisp
alexanderbarbosa has joined #lisp
random-nick has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
HDurer has joined #lisp
alexanderbarbosa has quit [Read error: Connection reset by peer]
martylake_ has joined #lisp
martylake has quit [Ping timeout: 248 seconds]
quazimodo has joined #lisp
piotr has joined #lisp
piotr has left #lisp [#lisp]
piotr has joined #lisp
<piotr> not sure #lisp or ##lisp is betetr for hue heu coomon lisp questions ?
piotr is now known as Filystyn
<jackdaniel> hue heu? if you mean like joking around, then #lispcafe seems to fit the bill
<Filystyn> nah I just never been using lisp channels for support
<Filystyn> so i need to figure out where I can get geenral help
<Filystyn> Are common lisp questions fine here?
<Filystyn> Topic suggests : yes
<jackdaniel> I don't know what is hue heu. yes, common lisp questions belong here
<jackdaniel> there is also #clschool if you have numerous basic questions due to learning the language
<Filystyn> ok. I have this first question. defvar *db* nil <--- I have this example but the clisp complained and I had to remove nil
<Filystyn> I do not knwo which questions are basic in my opinion #languageNOOBS channels are useless and have little support
<Filystyn> I have just chosen to use this channel for every common lisp question
orivej has joined #lisp
<jackdaniel> #languageNOOBS channels are for populated by people who are interested in giving advise. some people hang on irc to spend time with fellow lispers
<jackdaniel> that said it is unlikely that clisp responded to (defvar *db* nil) with a warning
<Filystyn> let me paste
<jackdaniel> and indeed, as I've tried it on my host it just defined *db*
<Filystyn> ehh C ways struck me i think I wrote NIL since yeah NULL
<Filystyn> nil works fine
<Filystyn> New question: what happens to variable if I defien it two times.
<Filystyn> does the first one gets erased?
rumbler31 has joined #lisp
<jackdaniel> minion: please tell Filystyn about pcl
<minion> Filystyn: direct your attention towards 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).
<jackdaniel> defvar won't redefine the variable
varjag has quit [Remote host closed the connection]
<jackdaniel> defparameter (which has similar semantics) would redefine it
<jackdaniel> book I've suggested is a good resource to lead you through language
cosimone has joined #lisp
<Filystyn> already using this http://www.gigamonkeys.com/book/
<jackdaniel> good!
rumbler31 has quit [Ping timeout: 245 seconds]
sindan has joined #lisp
<seok> How do I empty hashtable?
<lukego> clrhash
<seok> Thanks!
<beach> seok: How did you miss that? Section 18.2 onlyh contains a dozen entries or so.
<beach> only
<seok> section 18.2 in clhs?
<beach> Of course.
<beach> Where else?
<seok> I'm still trying to figure out my navigation around CL haha
<seok> Which site do you use? lispworks one?
<beach> Yes.
<seok> ya the only way i look up a symbol atm is when I know it
<beach> Then you look for a chapter called "hash tables".
<beach> Then you look in the "dictionary".
donotturnoff has quit [Ping timeout: 245 seconds]
flyingcellphone has joined #lisp
Lycurgus has joined #lisp
<Filystyn> how to define like in C in lisp ?
<Filystyn> #define var "something"
<no-defun-allowed> (defconstant +var+ "something")
<Filystyn> and I can use it in file.clp and it will swap var with "something" ?
<Filystyn> or we have no preprocess ?
<no-defun-allowed> You can write that into file.lisp, then any references to +var+ will be replaced with that "something".
Lycurgus has quit [Client Quit]
<Filystyn> im checking this right now
<no-defun-allowed> clhs defconstant
flyingcellphone has quit [Remote host closed the connection]
troydm has quit [Ping timeout: 272 seconds]
<Filystyn> llok weird
<Filystyn> looks*
<Filystyn> this fails:
<Filystyn> ( defconstant +DATABASE+ *winedb* )
<no-defun-allowed> Did you define *winedb* before?
<Filystyn> no
<Filystyn> i get *** - LET: variable *WINEDB* has no value
<no-defun-allowed> If you want that symbol to alias *winedb*, you should use define-symbol-macro then.
<no-defun-allowed> clhs define-symbol-macro
<Filystyn> does it create winedb cariable because i get thsi now:
<Filystyn> attempting to turn DATABASE into a SPECIAL variable, but it is
<Filystyn> already a global SYMBOL-MACRO.
<_death> (defun evil-load (file &optional alist) (with-open-file (stream file :direction :input) (loop for form = (read stream nil stream) until (eq form stream) do (eval (sublis alist form)))))
<_death> (evil-load "file.clp" '((*winedb* . *beerdb*)))
troydm has joined #lisp
<no-defun-allowed> _death: didn't know about sublis and always wrote it myself, thanks for pointing it out
dddddd has joined #lisp
<_death> no-defun-allowed: it's an oldie but goodie ;)
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 272 seconds]
hhdave_ is now known as hhdave
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
<Filystyn> ok i got defmacro working that is easy now to the constant thing
rumbler31 has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
rumbler31 has quit [Ping timeout: 268 seconds]
moldybits has quit [Quit: WeeChat 2.4]
v88m has quit [Ping timeout: 268 seconds]
<Filystyn> seems lisp can't simply replace name with name ;-(
troydm has quit [Ping timeout: 272 seconds]
troydm has joined #lisp
<jackdaniel> don't confuse programming language with the programmer
<Filystyn> All the exampels are like making function macros
<Filystyn> which is not I am looking for
<jackdaniel> what do you want to do?
<Filystyn> Simply in all code NAME be replaced with *thisdb*
<jackdaniel> you mean that string name should be replaced with *thisdb* string?
karayan has joined #lisp
<Filystyn> for starting "text" so i can debug it easyly
<Filystyn> yes
<jackdaniel> there is a standard tool called "sed" to do that
troydm has quit [Ping timeout: 248 seconds]
<Filystyn> k, ill just write the name everywhere
<Filystyn> and other magical numbers
<jackdaniel> but I think you want (define-symbol-macro name *thisdb*)
<jackdaniel> there is another question, is the thing you want really the thing you want, or these are just misdirected means to an end we do not know about
<jackdaniel> I'm saying that only because I was scolded once in the past for verbatim answering the question instead of hinting the solution, justfully so ,)
<Filystyn> ok it works
<Filystyn> I thought it was broken but I had else where mistake
<Filystyn> Thank you people for your huge help and sorry for big fuss
troydm has joined #lisp
<Filystyn> when i finish my code I will show so you can give your hints
<Filystyn> but not today. Cya
Filystyn has quit [Quit: Leaving]
troydm has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
frgo_ has joined #lisp
troydm has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
frgo_ has quit [Ping timeout: 272 seconds]
troydm has quit [Ping timeout: 268 seconds]
troydm has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
varjag has joined #lisp
troydm has quit [Ping timeout: 258 seconds]
troydm has joined #lisp
kajo has quit [Ping timeout: 250 seconds]
troydm has quit [Ping timeout: 245 seconds]
troydm has joined #lisp
frgo has joined #lisp
pest-ctrl has quit [Read error: Connection reset by peer]
ochkep has joined #lisp
<ochkep> There is now a way for foreigners to donate to MoveOn PAC without being detected and to help defeat Donald Trump in 2020. We have set up accounts that will take your donation and peg it to the name of someone who hasn't donated the maximum yet. Best of all, this is 100% legal! Help preserve human rights and global governance; donate to MoveOn. “When a community starts to listen to each other, pull together, and work towards
<ochkep> a common goal, then anything is possible.”
<ochkep> — Chuck, MoveOn Mobilizer
<ochkep> URI: bitcoin:bc1qyv7kug65090hq8yhzp76q2kvujt69p9pdxrjd7?amount=0.03000000&label=MoveOn&message=MoveOn%202020
<ochkep> Donation information
<ochkep> Address: bc1qyv7kug65090hq8yhzp76q2kvujt69p9pdxrjd7
<ck_> What the :|
ochkep was banned on #lisp by jackdaniel [*!*tuttles@*.totalplay.net]
ochkep was kicked from #lisp by jackdaniel [ochkep]
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
cosimone has joined #lisp
rumbler31 has joined #lisp
heisig has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
xkapastel has joined #lisp
troydm has quit [Ping timeout: 258 seconds]
mindCrime has joined #lisp
<pfdietz> Yeah, soliciting illegal behavior probably violates channel rules.
<jackdaniel> oh, I've banned him? I totally tried to click "donate on this shady link" button
esrse has quit [Ping timeout: 248 seconds]
<_death> you managed to donate some bancoin
Necktwi has joined #lisp
<pfdietz> Posting on #lisp is proof of wonk
<p_l> and it's not work towards human extinction!
<ck_> I'll add the phrase about legality to my dictionary, next to "... in concordance with the prophecy"
<p_l> (unless you work on missile guidance and post on #lisp, but that's a bit different case)
<pfdietz> Explosive garbage collection, the best kind.
anewuser has joined #lisp
<no-defun-allowed> Takes "GC by process termination" to a new level.
<no-defun-allowed> Not a good one though. Good reason to make sure you always optimize for safety ≥ 1.
<p_l> well, depends on missile specifics
<no-defun-allowed> Nice to hear they only want a $340 donation too.
troydm has joined #lisp
<no-defun-allowed> MAKE-INSTANCE, not -WAR, or something. Night, don't let the spambots bite.
<ck_> no-defun-allowed: sleep well. and don't worry, that's 100% legal!
<p_l> there are many things that are 100% legal that might surprise people
random-nick has quit [Ping timeout: 244 seconds]
<ck_> and you wouldn't believe #3!
<seok> if i store a class as byte stream in file
troydm has quit [Ping timeout: 245 seconds]
<seok> and read from file
<seok> will the class object be the same?
GoldRin has joined #lisp
manualcrank has joined #lisp
<seok> Are there any examples of this
<p_l> ck_: how about "for majority of human population, it might be perfectly legal to shoot to kill many of NSA employees and contractors" ;)
dim has quit [Ping timeout: 244 seconds]
<heisig> p_l: Sounds like a topic for #lispcafe :)
gxt has joined #lisp
<p_l> true dat
<heisig> seok: You cannot serialize arbitrary objects. And what do you mean by 'the same'?
* p_l waits for more official topic coming
Arcaelyx has joined #lisp
jmercouris has joined #lisp
random-nick has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
<pjb> Topic for #lisp: Common Lisp, the #1=(programmable . #1#) programming language
Lord_of_Life has joined #lisp
mindthelion has joined #lisp
rumbler31 has joined #lisp
<p_l> pjb: in terms of actual talk, not reiteration of what is in the topic field :)
techquila has quit [Remote host closed the connection]
<_death> we could move to channel to #1=lisp
warweasle has joined #lisp
<jackdaniel> I'd rather see only on-topic discussion, that saves me scrolling and filtering
<jackdaniel> seok: they won't be eq if that's what you ask about
<seok> ya but will they be equal?
<seok> is it possible?
wxie has joined #lisp
<jackdaniel> it is hard to define what it means for instances to be equal
<seok> just simple context
<jackdaniel> you may create your own predicate which compares them
<seok> i have a clos object (defclass ...)
<seok> I
<jmercouris> can someone actually explain #1=(programmable . #1#)
<jmercouris> what does it mean?
<seok> and make an instance of it
<p_l> jmercouris: infinite list
<jackdaniel> structures are defined to be equalp-comparable,
<seok> (make-instance)..
<p_l> jmercouris: (programmable programmable programmable ...)
<jmercouris> p_l: oh I see, it is making a list of a list
<seok> can I save this instance in a file
<seok> and read it later?
rumbler31 has quit [Ping timeout: 244 seconds]
<jmercouris> seok: yes, there are libs for this
<jackdaniel> you may serialize it i.e with cl-store
<seok> nice
<p_l> jmercouris: essentially it creates a circular list
<seok> cl-store is the library to go for?
<jackdaniel> there is also make-load-value, but I doublt you are looking for that
<jmercouris> p_l: can you explain the syntax of #1?
<p_l> jmercouris: so if you try to find it's end it will never finish
<jmercouris> I have never seen #1= used anywhere in CL
<beach> clhs #=
<p_l> jmercouris: it's an obscure reader macro
<beach> clhs ##
heisig has quit [Quit: Leaving]
<jmercouris> I see, thanks for the links
<beach> Sure.
kajo has joined #lisp
LdBeth has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
saravia has joined #lisp
flamebeard has joined #lisp
wxie has quit [Quit: wxie]
<ck_> It will also come up when printing circular data structures (and *print-circle* is not nil)
cosimone has quit [Ping timeout: 248 seconds]
jmercouris has quit [Ping timeout: 245 seconds]
jmercouris has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
karayan has quit [Ping timeout: 276 seconds]
<pfdietz> Or, more generally, when printing structures that have sharing of things that are not normalized to EQL objects on reading (like lists or uninterned symbols).
femi has quit [Ping timeout: 245 seconds]
karayan has joined #lisp
sjl_ has joined #lisp
smazga has joined #lisp
femi has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
<Xach> submodule support is going to improve in quicklisp today!
<Xach> git submodule, that is
<Xach> this has been a sore spot for me but I recently I can do it all in lisp (like i do everything else). for the longest time i thought i had to use somebody's shell script.
<Xach> "recently realized"
<jdz> Xach: Yay for doing it all in lisp!
<Xach> of course, it's lisp that does a lot of shell-command running, but running commands with control in lisp is nicer to me than running shell commands with control in shell
Necktwi has joined #lisp
<Xach> it's not the most streamlined but it seems to work for me -- https://pastebin.com/BfJptuCU
jprajzne has quit [Quit: Leaving.]
rumbler31 has joined #lisp
Tristam has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
Posterdati has quit [Ping timeout: 244 seconds]
Posterdati has joined #lisp
jmercouris has quit [Remote host closed the connection]
_Posterdati_ has joined #lisp
Posterdati has quit [Ping timeout: 244 seconds]
iovec has joined #lisp
anewuser has quit [Ping timeout: 246 seconds]
varjag has joined #lisp
anewuser has joined #lisp
quazimodo has quit [Ping timeout: 272 seconds]
karayan has quit [Read error: Connection reset by peer]
karayan has joined #lisp
<mfiano> Are there any libraries containing a list of country names, perhaps with a mapping of 2-letter country codes to full names? My use case is a drop-down list for a client's web site I am maintaining.
<pjb> mfiano: sure.
<pjb> :com.informatimago.common-lisp.cesarum.iso3166
<pjb> mfiano: note since it's AGPL, you will have to provide the sources of your web site.
<scymtym> mfiano: there is also https://github.com/Shinmera/language-codes
rumbler31 has joined #lisp
rippa has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
oni-on-ion has quit [Remote host closed the connection]
shka_ has joined #lisp
oni-on-ion has joined #lisp
Necktwi has quit [Ping timeout: 272 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
anewuser has quit [Quit: anewuser]
<sjl_> mfiano: echo '('; curl 'https://pkgstore.datahub.io/core/country-list/data_csv/data/d7c9d7cfb42cb69f4422dec222dbbaa8/data_csv.csv' | tail -n +1 | sed -E 's/"?(.*)"?,(\w\w)/("\2" . "\1")/'; echo ')'
<ober> or just use jq
<mfiano> Thanks everyone. I think I'll go with sjl's since it is a properietary static site
<sjl_> might want to look for the official source and transform that -- I have no idea how reliable "data hub dot i o" is.
mindCrime has quit [Ping timeout: 245 seconds]
gareppa has joined #lisp
<mfiano> sjl_: Yeah there is some bad data in there. Not proper lisp
gareppa has quit [Client Quit]
<mfiano> ("VE" . "Venezuela, Bolivarian Republic of"") for example
<ck_> maybe someone snuck an extra country in there, better be careful
<mfiano> I'm comparing it with geonames anyway
<sjl_> yeah, replace the . in the regex with [^"]
<sjl_> but really that was just a silly way of saying "just find the official list and transform it into sexps somehow"
whartung has joined #lisp
<mfiano> This is as official as I'm going to get I think: https://download.geonames.org/export/dump/countryInfo.txt
<sjl_> curl 'https://raw.githubusercontent.com/MarcoPolo/iso-country-codes/master/src/iso_country_codes/countries.clj' | tail -n +2 | tr '{}[]' '()()' | sed -E 's/\(def countries/\(defparameter \*countries\*/' is almost there, except for the silly commas
flamebeard has quit []
<isoraqathedh> The commas can probably go by replacing '",' with '"'.
<sjl_> That strips commas in strings too, though
<sjl_> Oh, no, I see
<sjl_> Yeah, that would work.
<ck_> I don't know which 'official' you mean, but there's the "CIA World Factbook"
<isoraqathedh> Otherwise I guess you can wrap the whole expression with a ` and just let the commas sort themselves out.
<isoraqathedh> `(list , 4) and `(list, 4) both evaluate to (list 4).
cosimone has joined #lisp
<sjl_> isoraqathedh: horrified_dog.jpg
<sjl_> I mean... it's all strings and keywords so that would work... but damn.
mindCrime has joined #lisp
<isoraqathedh> It's ugly, but you can bung it into a REPL and then copy the output.
<sjl_> incredible: curl 'https://raw.githubusercontent.com/MarcoPolo/iso-country-codes/master/src/iso_country_codes/countries.clj' | tail -n +2 | tr '{}[]' '()()' | sed -E 's/\(def countries/\(pprint `/' | sbcl --script
hhdave has quit [Quit: hhdave]
<mfiano> this works for the official geonames list I linked above. I can't get it to work without a temporary file though: echo '(defparamter *countries* ('; cat file.txt | awk '{ print "(\""$1"\" . \""$5"\")" }'; echo ')';
<mfiano> scratch that. it is only tokenizing words and not columns.
<sjl_> need a -F\t in the awk to split on just tabs
<sjl_> something like curl https://download.geonames.org/export/dump/countryInfo.txt | awk -F\t 'BEGIN { print "(defparameter *countries* \'(" } /^[^#]/ {print "(\"" $1 "\" . \"" $5 "\")" } END { print "))" }'
<sjl_> if you wanna do it all in awk
<sjl_> ok, lunchtime
libre-man has quit [Ping timeout: 248 seconds]
<LdBeth> good midnight time
random-nick has quit [Read error: Connection reset by peer]
v88m has joined #lisp
McParen has joined #lisp
<LdBeth> I find some limitation of the implementation of META on quicklisp which makes it less powerful & flexible compare to the original one presented in that paper
afowler has joined #lisp
<mfiano> sjl_: syntax error in that
stacksmith has joined #lisp
random-nick has joined #lisp
trafaret1 has joined #lisp
<trafaret1> hi there
libre-man has joined #lisp
<trafaret1> need help want to know how to get package info from slime which I can obtain via quicklisp
<pjb> ck_: AFAIK, the iso3166 standard has old codes for old countries in it.
<pjb> ck_: it would be an error to assume that all applications are always working on data describing the present.
<pjb> (an error almost always done by young programmers)
<pjb> They don't work enough on time machine software…
<pjb> now, granted having a package such as com.informatimago.common-lisp.cesarum.iso3166 is not good, since the data is apparently fixed, and if a new version of standard appears, it won't rack it (automatically). It would be better if it downloaded the standard at compilation-time or at load-time, and updated its database accordingly.
<pjb> But expendiency dictated otherwise, one cannot always do whatever he wants.
<ck_> pjb: I'm not exactly sure why you're adressing that to me
<pjb> <ck_> maybe someone snuck an extra country in there, better be careful
<pjb> Indeed.
<ck_> Indeed. What's humor for 600?
<sjl_> mfiano: works for me. I use fish as my shell though, you might need to adjust for bash or whatever
<mfiano> sjl_: I fixed it with: curl -s https://download.geonames.org/export/dump/countryInfo.txt | awk -F$'\t' 'BEGIN {print "(defvar *countries* ("} /^[^#]/ { print "(\""$1"\" . \""$5"\")" } END {print ")"}';
<mfiano> otherwise invalid bash syntax at '('
<ck_> but continuing on this increasingly off-topic branch of conversation, what's the latest country that changed names? Congo comes to mind, but that was a while ago already
<stacksmith> https://en.wikipedia.org/wiki/Geographical_renaming - although #lispcafe is probably a better place for this
cosimone has quit [Quit: WeeChat 2.4]
nydel has joined #lisp
<nydel> good morning all
<stacksmith> g'day
<jackdaniel> stacksmith: you've mentioned CLIM In the morning (probably yours yesterday), in case you didn't see the log I've provided some explanation which you may find useful
<jackdaniel> CLIM specification is complicated because it describes at least three things: window manager abstraction, barebones I/O toolkit and CLIM itself ← this
Posterdati has joined #lisp
_Posterdati_ has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
orivej has quit [Ping timeout: 272 seconds]
random-nick has quit [Remote host closed the connection]
t58 has joined #lisp
random-nick has joined #lisp
amerlyq has quit [Quit: amerlyq]
buffergn0me has joined #lisp
rumbler31 has joined #lisp
nanoz has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
<stacksmith> jackdaniel: I think I was trying to say that a system that is too complicated to fit into the CLOS dispatch mechanism and requires a layer of predicate logic is probably too much for my tiny brain...
<stacksmith> Or whatever organ controls patience and ability contain profanity.
Inline has joined #lisp
Ricchi has joined #lisp
<jackdaniel> presentation-types have more to do with CL types than CL classes per se, that may be the reason
<jackdaniel> i.e integer (0 10), or (sequence integer)
<stacksmith> I understand the need to fine-tune dispatch and even create a protocol layer separate from the general dispatch mechanism, including a meta layers for discovery and versioning negotiation, etc. It just gets tedious after a while to be on the user end of it. If unchecked, it turns coding into something akin to accounting or filling out government forms. At least we have SEXPs, which avoids 'the obvious solution' of usng XML.
cosimone has joined #lisp
nanoz has quit [Ping timeout: 272 seconds]
Ricchi has quit [Remote host closed the connection]
Ricchi has joined #lisp
random-nick has quit [Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number]
random-nick has joined #lisp
karayan has quit [Ping timeout: 248 seconds]
karayan has joined #lisp
Ricchi has quit [Remote host closed the connection]
Ricchi has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
<stacksmith> I am just bitching about complexity of frameworks in general, and my annoyance at having to learn quirky large frameworks that impose large amounts of quirky rules. CLIM is certainly no worse than anything else, and probably better than most. In the ideal world, a framework would remain transparent, allowing you to use as little or as much as you want, without a massive commitment. Kind of the way CLOS lets you pick and choose.
<jackdaniel> CLIM kind of does, the issue is that the lower parts are not properly documented and separated (btw, please see query message)
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
Ricchi has quit [Remote host closed the connection]
Ricchi has joined #lisp
<stacksmith> jackdaniel: I will take a look - I am due for another round of McCLIMming soon. What I would love to see is a non-emacs text environment, in which maybe you can pop up a menu or a dialog box. Or if you wish, open a window and output some stuff into it. And maybe have some presentations bind some keys. So it's a smooth transition from text to a full-blown GUI if needed. I think McCLIM is kind of like that.
<jackdaniel> n.b: https://files.mastodon.social/media_attachments/files/016/413/077/original/6de35a0d65c75548.png log4cl appender (all source code may be seen on the screenshot)
<jackdaniel> just a small demo
sauvin has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 248 seconds]
smazga has quit [Ping timeout: 248 seconds]
ckonstanski has joined #lisp
Ricchi has quit [Remote host closed the connection]
<shka_> that looks quite good
lnostdal has quit [Remote host closed the connection]
Ricchi has joined #lisp
<stacksmith> Huh. Reminds me of https://github.com/stacksmith/subtext , my attempt to wrangle GTK into a Lisp UI... I would just love to get rid of Emacs in the middle screwing everything up.
lnostdal has joined #lisp
<shka_> i think that clim is probably the best option right now
<shka_> at the very least it does not require extra C libs
<shka_> which is huge
<stacksmith> So true.
<dlowe> what's the story with clim and wayland, though
cosimone has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
<jackdaniel> we need to find a person, close them in a room and provide food for 2 months
<jackdaniel> dlowe: ↑
<stacksmith> Does CLX work well with antialiased fonts? I think last time I tried McCLIM jackdaniel talked me through installing an antialiased font that looked good...
slyrus__ has joined #lisp
<jackdaniel> clx supports xrender extension
<jackdaniel> Andy Hefner implemented antialiased fonts over a decade ago, and I've added kerning and transformations this year
<jackdaniel> (all in CL)
<jackdaniel> shka_: it may look good or bad, but what's more important it is much faster than logging to emacs
<jackdaniel> bbl
smazga has joined #lisp
t58 has quit [Ping timeout: 272 seconds]
slyrus_ has quit [Ping timeout: 245 seconds]
Volt_ has joined #lisp
Ricchi has quit [Read error: Connection reset by peer]
dddddd has quit [Ping timeout: 272 seconds]
t58 has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
dddddd has joined #lisp
orivej has joined #lisp
random-nick has joined #lisp
_whitelogger has joined #lisp
McParen has left #lisp [#lisp]
<vsync> Jachy: perhaps you know, what is the reason for requiring both inherit from protocol class and satisfy protocol predicate?
ggole has quit [Quit: Leaving]
<stacksmith> ooh.. demodemo is looking good these days.
<stacksmith> Still no subpixel antialiasing?
<vsync> wait it's class or predicate
<vsync> wait, but "However, simply implementing a method for the predicate that returns true is not necessarily enough to assert that a class supports that protocol; the class must include the protocol class as a superclass."
<jackdaniel> vsync: did you mean me?
<vsync> anyway this seems very oriented around effectively single dispatch
<vsync> jackdaniel: yes, sorry
<jackdaniel> protocol classes are for specializing "default" methods on said protocol classes. predicates are just a syntactic sugar (you could use typep for that for instance where type would be the protocol class name)
vlatkoB has quit [Remote host closed the connection]
<jackdaniel> stacksmith: no subpixel antialiasing. loke has ressurected freetype engine which do support that, but it is disabled by default (we prefer native lisp over ffi). instructions on how to enable it are on the wiki in github
<vsync> ohhhh wait... this describes two approaches one can take in designing a protocol, not a choice of how to implement
<stacksmith> jackdaniel: thanks, it's coming back to me now.
igemnace has quit [Quit: WeeChat 2.5]
fivo has joined #lisp
dddddd has quit [Ping timeout: 244 seconds]
dddddd has joined #lisp
cosimone has joined #lisp
Arcaelyx has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
ebrasca has joined #lisp
dialectic has joined #lisp
random-jellyfish has joined #lisp
<random-jellyfish> what is the recommended way to generate code in another language from common lisp?
<dialectic> The same as usual. Build up an AST and write to a file.
<random-jellyfish> for example let's say I want to convert (def hello (print "hello world")) to def hello: print('hello world')
<housel> The pretty-printer can be helpful for that, see for instance https://github.com/dylan-lang/lisp-to-dylan
<dialectic> are you doing any context sensitive analysis at all? Like making sure variables are really in scope etc.
<aeth> FORMAT goes surprisingly far in macros like that, especially if you're OK with it generating strings at compile time
<aeth> You just walk through parts and write to a string stream or use FORMAT nil.
<random-jellyfish> dialectic at this point I don't need semantic analysis, the compiler of the target language can deal with that
<dialectic> I would just build up an AST and dispatch on the first element in the list, recursively outputing to a stream.
<dialectic> *outputting.
<random-jellyfish> are there examples of how to build an AST?
<aeth> The AST is already there in the example... imo
<dialectic> I presume it would be (def hello () (print "hello world")). So you'd have (case (car form) ((DEF) ...printing-code-for-def...))
<dialectic> This is one of those things where you'll learn faster if you just go forth and try it.
<aeth> DEF tells you to turn (def hello ...) into "def hello: ..."
<dialectic> If you need indenting and readability later, as others pointed out, check out the pretty printer.
<aeth> You can just do indenting yourself by tracking how many levels deep you are
<aeth> And e.g. multiplying it by 2-4 spaces, or a tab
<dialectic> That's probably true.
<vsync> stacksmith: wayland must be opposed so its poor offering is never put forth further as a suitable replacement for X11
* vsync would not feel this way if anything about wayland got anything about the point of what is useful in X11
<aeth> I game on Linux and I use a tiling window manager on Linux and I use the proprietary nvidia drivers on Linux. So I'm basically part of every group that hates Wayland.
<aeth> I also rarely ssh -X with emacs
<vsync> I remote-display xemacs all the time
<aeth> So you're the xemacs user!
<dialectic> lol
* vsync feels attacked
<vsync> LOL
<jackdaniel> please stay on channel topic :)
<vsync> I realize that doesn't exactly lend credence to my opinions on software/network architecture in This Modern Age
Jesin has joined #lisp
dialectic has quit [Remote host closed the connection]
dialectic has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
cosimone has quit [Quit: WeeChat 2.4]
<vsync> huh, so I wonder how I feel like I didn't know about log4cl... it's not new either
<vsync> and now I'm wondering if it might be applicable for a project I'm doing
<jackdaniel> all I can say is that it works and that I do not recommend log4slime when you connect to a remote swank (log4slime is an emacs appender tailored for slime, very nice one at that)
<vsync> well I'm looking to misuse it potentially... wonder how much its core use case is baked into the architecture haha
stepnem has joined #lisp
<vsync> stacksmith: I like your writeup, the paradigm, and the screenshot
<vsync> kinda reminds me of some CLIM stuff though TBH
<vsync> do you have an application in mind? are you going for "intertwingularity"?
<jackdaniel> which writeup?
<jackdaniel> thank you
<vsync> and the bg/motivations page
<vsync> jackdaniel: oh wow there is much more to your log4cl/clim screenshot if I scroll down
<jackdaniel> that remind me, now we support page margins for streams
<jackdaniel> yes, I have these big screens now so I can waste the network bandwidth with tall screenshots :)
fivo has quit [Quit: WeeChat 1.9.1]
<vsync> I need to see if streams are suitable for my concept as well... need to do some reading on streams, series, generators/gatherers
<vsync> I know there are Gray/simple streams, and SERIES library... has anyone implemented generators/gatherers as in cltl2?
<jackdaniel> series library implements them as well
<vsync> ah, wait, are the latter included in SERI... perfect heh
<vsync> anyone have experience with it?
<jackdaniel> it happens that I've used it recently
<jackdaniel> it is very nice but very tedious to use with other parts of the system
<vsync> other parts of which system?
<jackdaniel> of common lisp
<jackdaniel> so you either convert all your sequences to series and use its mapping/iteration facilities
<jackdaniel> or you marshall / demarshall forth and back to be able to i.e loop over something
ebrasca has quit [Remote host closed the connection]
<jackdaniel> or to use map etc
<jackdaniel> sorry, I need to go to sleep, good luck and good night \o
<vsync> hmm I would imagine using them for different purposes
shka_ has quit [Ping timeout: 244 seconds]
<vsync> (or I guess that if you like it you would use it instead of base CL... haven't grokked fully what all it offers though)
<vsync> but I thought it also offered simple views of sequences as series
<vsync> thanks... night
Jesin has quit [Quit: Leaving]
scymtym has joined #lisp
themsay has joined #lisp
karayan has quit [Remote host closed the connection]
martylake has joined #lisp
<dialectic> What's the origin of the name "Swank" anyway? Does it mean anything in particular? I've always wondered this.
lavaflow has quit [Quit: WeeChat 2.4]
martylake_ has quit [Ping timeout: 272 seconds]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
lavaflow has joined #lisp
zotan has quit [Ping timeout: 246 seconds]
<stacksmith> It's a porno magazine.
Jesin has joined #lisp
martylake has quit [Ping timeout: 246 seconds]
zotan has joined #lisp
ym555 has joined #lisp
<dialectic> I doubt that's why the application server was named that way.
Inline has quit [Quit: Leaving]
<stacksmith> It kind of works, especially with SLIME connotations.
mindCrime has quit [Ping timeout: 248 seconds]
andrei-n has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Lycurgus has joined #lisp
Lycurgus has quit [Client Quit]
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
trafaret1 has quit [Ping timeout: 246 seconds]
afowler has quit [Remote host closed the connection]
saravia has quit [Quit: Leaving]
rumbler3_ has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
rumbler3_ has quit [Ping timeout: 245 seconds]
sjl_ has quit [Quit: WeeChat 2.3-dev]
techquila has joined #lisp
FennecCode has joined #lisp
ckonstanski has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
<zhlyg> Alot of CLIM talk today :)
ym555 has quit [Ping timeout: 245 seconds]
dialectic has quit [Ping timeout: 245 seconds]
ym555 has joined #lisp
dialectic has joined #lisp
random-jellyfish has quit [Ping timeout: 260 seconds]
zhlyg has quit [Ping timeout: 245 seconds]
<seok> Are accessors not exported automatically when imported with :use?
<seok> I have this class
<seok> (defclass todo-list ()
<seok> I can use the class in another package but cannot do (todos x)
<no-defun-allowed> Packages always work with symbols, so no.
<no-defun-allowed> Packages don't know what symbols do really, so you need to export the accessors too.
<seok> Ah thank you, got it
uplime is now known as ^
^ is now known as KindOne
random-nick has quit [Read error: Connection reset by peer]
rumbler3_ has joined #lisp
hdasch has joined #lisp
ltriant has joined #lisp
saravia has joined #lisp
saravia has quit [Quit: Leaving]
micro has quit [Ping timeout: 245 seconds]
micro has joined #lisp
smazga has quit [Quit: leaving]
nanoz has joined #lisp
<manualcrank> hey, people
<manualcrank> I need a ordered data structures like c++'s map and multiset. (It can't be a library; I need something I can just cut and paste.)
<manualcrank> Sedgewick's red-black binary search tree @ https://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/RedBlackBST.java.html is perfect for map and can be easily adapted to obtain a multiset (with a count field in each tree node to track duplicates).
<manualcrank> So I tried to translate the Java version into Lisp. It doesn't work :-(
<manualcrank> The minimal Lisp code to illustrate the problem is here: <http://pasted.co/5dd7f925>
<no-defun-allowed> this AVL tree implementation is pretty simple: https://two-wrongs.com/purely-functional-avl-trees-in-common-lisp.html
<manualcrank> The minimal Java code is here: <http://pasted.co/12767a26>
<manualcrank> The logic and structure of both versions is identical, I'm almost certain there's something about Lisp semantics (setf's in particular) that doesn't translate.
quazimodo has joined #lisp
<manualcrank> That AVL version doesn't do queries based on the ranks of the keys in the tree.
Arcaelyx has joined #lisp
scymtym has quit [Remote host closed the connection]
<pjb> manualcrank: red-black trees are particularly difficult to debug. I have an implementation that has been in need of debugging for 10 years…
<pjb> manualcrank: I'm not saying that you will need ten years to do it, but that you should plan to spend your summer, debugging and writing test cases.
dialectic has quit [Ping timeout: 246 seconds]
<manualcrank> I was going to try and adapt the AVL code next (i guess it needs code to at least track the size of each branch)
nanoz has quit [Read error: Connection timed out]
<manualcrank> but i don't know anything about avl trees. red-black trees i learned in sedgewick's coursera course
nanoz has joined #lisp
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
dialectic has joined #lisp
Jesin has quit [Excess Flood]
Jesin has joined #lisp