<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__>
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 :)
<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__>
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.
<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: 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
<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.”
<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
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.
<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
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
<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
<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
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.
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')
<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"?
<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