<aeth>
I know a lot of people are proud of being able to use old libraries in Common Lisp, but I'm not sure I'd use a database that hasn't been updated in 10 years.
<aeth>
There's a handful of things that are just inherently really hard to write: operating systems, web browsers, databases, office suites, IDEs (and most content editors in general that are fancier than a basic text editor), game engines, etc.
<aeth>
Databases are pretty important, too, because you don't want your data to be corrupted or lost.
<vms14>
the video is like "ok, enough internet today"
<vms14>
the comic is about the programmers having bugs, and those bugs evolve and end slaving the humanity, only lisp can save us
elderK has joined #lisp
<rtypo>
that would go perfectly with a morning coffee
<aeth>
I thought Ada was about avoiding bugs?
<Nilby>
After watching that video, I now realize I've been writing "Balance weasels on a rake".
<vms14>
xD
vibs29 has quit [Ping timeout: 245 seconds]
<vms14>
when I saw it, I only realized lisp was the language for me
<vms14>
gn guys, and tnx for the hints
<vms14>
<3
vms14 has quit [Quit: WeeChat 2.3]
<rtypo>
gn. cya
vibs29 has joined #lisp
mindCrime has joined #lisp
orivej has quit [Ping timeout: 255 seconds]
Inline has quit [Ping timeout: 264 seconds]
jeosol has joined #lisp
dacoda has joined #lisp
sjl has joined #lisp
saravia has joined #lisp
mooshmoosh has quit [Ping timeout: 246 seconds]
<equwal>
So is there a way to generally reorder arguments to a function at compile time with a macro, based on the type?
<equwal>
(without having to resort to strong typing)
<pjb>
equwal: compiler-macro could do that, but you get only the sources of the arguments.
equwal has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
mooshmoosh has joined #lisp
<Bike>
reording arguments violates normal CL semantics
<Bike>
if you really want to, you can usually get at the declared type information through semiportable mechanisms
<Bike>
but maybe that's what you mean by "strong typing"
karlosz has quit [Quit: karlosz]
torbo has quit [Remote host closed the connection]
longshi has quit [Ping timeout: 258 seconds]
gravicappa has joined #lisp
t58 has quit [Quit: Night]
abhixec has quit [Ping timeout: 246 seconds]
Inline has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
karlosz has joined #lisp
<no-defun-allowed>
You could use a generic function and do something like (defmethod foo ((bar type) baz) (foo baz bar)), but that isn't "compile-time" and may cause fun call loops if baz is also type.
rumbler31 has quit [Remote host closed the connection]
<equwal>
What was the limitation you mentioned pjb?
<beach>
equwal: There is a general rule in programming that you should use the most specific construct that has the desired effect, so instead of (= 0 ,..) it is preferable to use (zerop ...).
<beach>
equwal: I don't see the function GROUP on which you define a compiler macro.
<equwal>
I've never used a compiler macro before, probably did it wrong.
<beach>
equwal: Normally, a compiler macro should return the original form if it can't alter it, so that the normal function is called instead.
beach has quit [Disconnected by services]
beach has joined #lisp
<equwal>
I think it might not be possible to do this in general without strong typing. How can I return the original form by default if the original form has arguments in the wrong order? So when you send something like (group (list 1 2) (+ 1 1)), things break.
<beach>
You have strong typing.
<beach>
Anyway, if you don't respect the compiler-macro protocol, you might as well put the logic in a function.
<beach>
You should definitely not alter the argument order in a compiler macro.
<equwal>
^^ What is your rationale for this?
<equwal>
Because that is what I wanted to do
<beach>
I am sorry to hear that.
<beach>
If you know everything at compile time, just use an ordinary macro.
<beach>
Compiler macros are defined with respect to an ordinary function.
<beach>
They should not alter the semantics of that function.
Oladon has quit [Quit: Leaving.]
<equwal>
OH right! I forgot about that stipulation
oni-on-ion has joined #lisp
<beach>
That is why, if they detect a situation that they can't do anything about, they return the original form so that the function itself is called at run time.
<beach>
I am also puzzled by the fact that your compiler macro returns a form that calls GROUP-AUX.
<beach>
If you know your arguments at compile time, why don't you just compute the result at compile time rather than generating a form that will compute it at run time?
<oni-on-ion>
^ this. needs embezeling
<equwal>
I used it wrongly, I don't think a compliler macro was goint
<equwal>
I am myself also puzzled by my own code
<oni-on-ion>
beach, can we have some signs put up around the internet that says just that pls
<beach>
oni-on-ion: Er, what would they say?
<oni-on-ion>
what you said just now - seems very simple, but is also very profound
<beach>
equwal: Are you aware that you can not use your GROUP function/compile-macro when the arguments are variables, like you can't say (group x y)?
<beach>
oni-on-ion: That seems like a basic truth about programming to me. Every programmer should already know it.
<equwal>
I'm not really aware of anything at the moment with respect to compiler macros
<equwal>
I thing the compiler macros are meant for optimizing stuff at compile time when constraints are met, so should follow your profound advice.
<beach>
equwal: They work at compile time, just like macros do. So your arguments N and SOURCE are unevaluated parameters to the form.
<equwal>
oh right
<equwal>
oops
<beach>
equwal: If you have a call such as (GROUP X Y) then they will both be symbols, so the compiler macro will error.
<beach>
equwal: Therefore, your compiler macro works only when the arguments are known at compile time.
<equwal>
This seems really obvious to me now that you pointed it out
<beach>
So you might as well compute the entire result then, rather than generating code that computes it at run time.
<beach>
Good.
<oni-on-ion>
beach, yeah. exactly =)
sin_clav has joined #lisp
charh has joined #lisp
sin_clav has quit [Quit: ERC (IRC client for Emacs 26.1)]
t-sin has joined #lisp
<p_l>
I wish "memoization" was more common term than "dynamic programming"
<equwal>
beach: what do you mean I have strong typing?
<equwal>
This is what I have:
<equwal>
spensertruex.com/static/group.lisp
<equwal>
But it breaks with (GROUP '(1 2) (+ 1 1))
oni-on-ion has quit [Remote host closed the connection]
sauvin has joined #lisp
<equwal>
Well I have proven to myself that reordering arguments based on type data is way more difficult than I am willing to go for a such a frivilous thing.
reverse_light has joined #lisp
<beach>
equwal: Strong typing means that there is no way an object of a particular type can mistakenly be taken for an object of a different type at run time. Weak typing is the contrary. Static typing means that some of the types are checked at compile time. Dynamic typing means that the types are checked at run time.
<beach>
equwal: Yes, it breaks with (+ 1 1) because that is not a number. It is a list of three elements, a symbol and two numbers.
<beach>
equwal: What you can do in your compiler macro is to return a form that will check the types at run time, and call group-aux differently in each case. But then, there is no point of having a compiler macro. You might as well put that logic in the GROUP function itself.
<beach>
equwal: I think you really need to contemplate what information is available at compile time and what information is only available at run time, and design your code accordingly. Macros and compiler macros deal with information available at compile time.
john2x has quit [Ping timeout: 246 seconds]
<beach>
equwal: The entire idea of reordering argument forms of a function at compile time is bogus. A programmer using your function will rightfully expect the evaluation order of arguments to be respected. Suppose you were able to do what you say, and then the programmer types (GROUP (1+ X) (MAKE-LIST X)).
<beach>
equwal: You definitely do not want to reorder those arguments, because that will alter the intentions of the programmer.
<beach>
So there is basically nothing you can do at compile time, other than for constant arguments.
<beach>
And that is what compiler macros are for. They can identify information available at compile time, and generate alternative code for the form. If no such information is available, then they should return the original form so that the associated function is called as usual at run time.
<beach>
p_l: The "programming" in "dynamic programming" is probably the same as the one in "linear programming", i.e. it has nothing to do with computer programming, but with establishing a "program" in the sense of a sequence of actions to be taken.
<beach>
p_l: But I agree that both those terms are confusing these days when the main use of the word "programming" is "writing computer programs".
vlatkoB has joined #lisp
* beach
has the feeling that the message to equwal is not clear enough.
ricekrispie has joined #lisp
ricekrispie2 has quit [Ping timeout: 250 seconds]
<equwal>
It makes sense to me now. I can't reorder arbitrary arguments at compile time, not sure what I was thinking.
idlus_ has quit [Ping timeout: 256 seconds]
igemnace has quit [Quit: WeeChat 2.4]
<equwal>
I should have been thinking of getting more sleep instead! Goodnight
igemnace has joined #lisp
moldybits has quit [Quit: WeeChat 2.4]
idlus_ has joined #lisp
<aeth>
equwal: I think you could do this with the specialization-store library by having a specialization for ((a foo) (b bar) (c baz)) as well as ((a bar) (b foo) (c baz)) etc. generated by a macro
<aeth>
note that unless you have type declarations (so it's known at compile time) libraries that use these macros (or making them yourself manually with these macros) will be slow
<aeth>
It won't look very idiomatic to use it so you might want to consider another API
aindilis has quit [Remote host closed the connection]
pankajgodbole has quit [Ping timeout: 245 seconds]
fivo has quit [Quit: WeeChat 1.9.1]
orivej has joined #lisp
<no-defun-allowed>
It's a trick to comment exactly one expression.
<no-defun-allowed>
Try #+(or) 1 2
<aeth>
iirc it's beause #+NIL would refer to an implementation called NIL, and not false. (or) is NIL (as in false), though
ggole has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
nowhere_man has joined #lisp
<asarch>
Thank you :-)
<jackdaniel>
it is a shame #; didn't get as a standard way to comment the next form. people usually complain that #+(or) is too many parens and they simply put #+nil
<jackdaniel>
ironic that they say that given they hear the "too many parens" 'argument' over and over again as of why "lisp is not a good language"
manualcrank has quit [Quit: WeeChat 1.9.1]
<beach>
People say so many things.
dacoda has quit [Ping timeout: 276 seconds]
vaporatorius has joined #lisp
asarch has quit [Quit: Leaving]
<fiddlerwoaroof>
jackdaniel: I like #_
<fiddlerwoaroof>
But, it's also a fairly trivial read macro
montxero has joined #lisp
<jackdaniel>
sure, I have no problem with writing #+(or) myself, it just itches me to see #+nil on code written by others
<jackdaniel>
s/itches/ticks a little/
<jackdaniel>
s/on/in/
mooshmoosh has quit [Ping timeout: 245 seconds]
mooshmoosh has joined #lisp
libertyprime has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
knicklux has joined #lisp
ltriant has quit [Quit: leaving]
<aeth>
jackdaniel: so when are you renaming ECL into NIL just to enforce proper CL style?
lavaflow_ has quit [Read error: Connection reset by peer]
lavaflow_ has joined #lisp
Arcaelyx has quit [Ping timeout: 276 seconds]
random-nick has joined #lisp
<jackdaniel>
I'm not a crusader hence never. I'm just pointing out that imho making semantic mistakes and arguing that "it works" is not the most reasonable course of action
<jackdaniel>
just like I would point out that it is not wise to name a variable number when it contains a string
<jackdaniel>
(let ((number "string")) …)
<aeth>
jackdaniel: That's not fun. This is fun: (let ((number "42")) …)
<Nilby>
There was a bug in trivial-features on CLisp a while back where it pushed NIL on features, and then all #+nil commented code all of a sudden activated.
mooshmoosh has quit [Ping timeout: 245 seconds]
mooshmoosh has joined #lisp
libertyprime has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
<pjb>
If you ask users, a lot of numbers have letters in them.
<pjb>
Car numbers are like: NV452PZ
<TMA>
or CH3CH20H
<aeth>
Computer numbers are like: #X9E206CEA
<TMA>
you can be even more #36RADICAL
<jackdaniel>
yes, but not a lot numbers are of type string
<jackdaniel>
unless we speak of C or a custom reader I'd say none
igemnace_ has joined #lisp
igemnace has quit [Ping timeout: 255 seconds]
pierpal has quit [Ping timeout: 268 seconds]
lumm has joined #lisp
Diip has joined #lisp
karlosz has quit [Quit: karlosz]
<Diip>
Hi
<Diip>
I have been looking at lisp/scheme for a few years now
<Diip>
is it fair to say there is a descrepancy between lisp and popular hardware/chips
<Diip>
?
<lieven>
no
montxero has quit [Ping timeout: 246 seconds]
<Diip>
but why does lisp always need an underlying (c-lang) operating system
<lieven>
it doesn't
<Diip>
I know of mezzano and others but there seems to be something missing
<lieven>
there are a few bare metal lisps around
<Diip>
mezzano is the only complete one I know of
<lieven>
anyways, lisp is no different than most other languages in that regard that it runs on an operating system written in another language
<Diip>
the rest start and never pick up steam
<lieven>
and historically there have been OSes written in languages other than C
<Diip>
and os's written in lisp but on different hardware
<erkin>
Latest chips have been engineered for C in specific due to Unix wars of '80s/'90s.
<erkin>
So concepts like hardware-assisted garbage collection were shelved.
<erkin>
We try so hard to make it look like the x86 chip is actually a fast PDP-11.
<lieven>
Diip: http://herpolhode.com/rob/utah2000.pdf # they don't take off because it's a shitload of work to make a new environment with all the tools the user expects
<erkin>
At this point, C is fast because we make it fast with compilers fine-tuned to all hell and back and hardware-level aids for performance.
lumm has quit [Quit: lumm]
<lieven>
one can even argue that the CPU is mostly emulating the ABI in firmware and is architecturally quite different
<lieven>
see erkin's link
<Diip>
That is what I am asking so is there something about modern day chips that makes using lisp harder on bare metal? i.e lack of hardware assisted gabage collection, what else
lumm has joined #lisp
<erkin>
There are various factors, but yes, there's little research done to mitigate this problem to move away from this C-oriented platform.
<pjb>
Diip: depends. For example, SPARC has instructions to deal with tag bits.
<lieven>
no. but if you want to use any of the open source software you're going to have to have a posix layer and these days emulate X/Wayland/Gnome etc
<erkin>
Sun experimented with SPARC chips that have built-in JVM bytecode interpreters.
<erkin>
JavaOS etc
<erkin>
Didn't take off.
<lieven>
same problem as the lispm
<pjb>
Diip: But mostly, the problem is that processors don't attach type to the bits. The type depend on the microinstruction used (not even on the register).
<lieven>
next iteration of the general purpose chip and your advantages are gone
<pjb>
Diip: in lisp, each value has its own type.
<erkin>
Yeah
<lieven>
and fab design is so expensive almost everyone has bowed out of the game
<lieven>
old mainframe stuff like the BS2000 now run emulated on firmware on modern chips and it's fast enough
<pjb>
Diip: for example, 01000001110 may be interpreted as a character, code 65, while 01000001000 will be interpreted as a fixnum, value 65.
<erkin>
It'd be really hard to make a Lisp Machine that performs as well as an x86 chip due to the sheer amount of money, research and manpower poured onto it throughout years. It's extremely complicated, especially since the addition of out-of-order execution stuff.
<Diip>
I would like to get on the mezzano project, but I can't even get it to work
<erkin>
IBM's POWER chips barely hold up to performance parity and it's because they do OoO too.
<lieven>
note that C isn't even particularly good with modern hardware
<pjb>
Diip: then if you try to use a mulfix on 01000001110, a lisp machine processor would produce a trap to signal a type error.
<MichaelRaskin>
I would say the real problem with modern hardware is that all the devices have underdocumented protocols, and whatever documentation there is, it is false
<lieven>
it's very hard to trap int overflow portably etc
<pjb>
Diip: on a normal processor, you're fucked, you've multipled #\A by something, which is meaningless.
<pjb>
Diip: same thing for arrays and bounds, etc.
<erkin>
I wonder how the Lisp-in-your-pocket boards handle low-level stuff.
<lieven>
still, running genera emulated on alpha emulated on amd64 is still the fastest lispm in history :)
<lieven>
sigh. no more than with java, rust, C or whatever language you're comparing with
<Diip>
so does that mean in order to use fully use lisp on a machine, you need to use c or assembly for the kernel?
<beach>
NO.
<erkin>
No
<beach>
Diip: Lisp runs just fine on modern stock hardware.
<Diip>
I mean a modern popular processor
<erkin>
People implement Lisps in C because C is portable (or rather because it's ported a lot).
<MichaelRaskin>
CPU is no problem
<beach>
Diip: Lisp runs just fine on modern popular processors.
<lieven>
you can write your kernel in non standard C with a specific compiler or you can write it in non standard lisp with a specific implementation
<MichaelRaskin>
The problem is _only_ that you need to show something on the display (and video drivers are a huge ton of mess)
<MichaelRaskin>
(and network drivers are a slightly smaller mess)
<lieven>
note that when the intel compiler people wanted to be able to use their C compiler to compile the linux kernel they had to implement a lot of gcc specific stuff
<erkin>
Then again, Torvalds openly admits that he doesn't really care about the C standard. :-)
<beach>
It would also be interesting to see how much undefined (but traditional) C behavior they rely on.
<Diip>
liven: any examples of kernels in lisp on modern hardware?
<Diip>
apart from mezzano?
<lieven>
well, a kernel needs to be aware of stuff life memory barriers etc, inline asm and the like
<TMA>
Diip: in the end, the processor (modern or not) just expects some charges and voltages be present on certain places within its silicon at some times.
<beach>
Diip: Movitz, but it is no longer developed.
<beach>
Diip: The fact that few exist is a consequence of the lack of manpower, now of any imagined discrepancy.
<beach>
s/now/not/
<Diip>
ah yes. can the drivers be written in lisp as well
<Diip>
audio, video etc
<erkin>
Sure, if you're willing to do it. ;-)
<beach>
Of course.
<erkin>
People generally don't want to deal with the mess that is video drivers.
<beach>
Diip: What made you think that would not be possible?
<lieven>
Diip: the problem is not the kernel. you can always target qemu or vmware to limit the drivers. the problem is that in order to use it as a workstation I'd need a browser with all the myriad extensions these have, a video player to watch pr0n and pirated movies, and a ton of other stuff
Kevslinger has quit [Quit: Connection closed for inactivity]
<TMA>
Diip: it does not really matter what was the high (or low) level language used to move the charges there in time. as beach said -- it is the manpower that needs to be allocated to writing the stuff in order for the stuff to be written, there is no inherent mismatch
<lieven>
Diip: and if you want to reuse the open source variants you need a posix/X/gnome layer
<lieven>
Diip: same like most microkernel oses end up with a monolithic posix server
<erkin>
And it's nigh impossible to write a web browser with adequate feature parity with others from scratch this day, even if you do it in, say, C++ on Linux.
<lieven>
hell, even Microsoft threw in the towel
<erkin>
People writing new OSes just port gcc, then port WebKit, then write a browser around that.
<MichaelRaskin>
And then Google intentionally prevents Chromium-based Edge from working with some Google sites correctly
<lieven>
yeah poor microsoft. karma is a bitch.
<Diip>
I am trying to find a project to get on but nothing everything seems to require some C or interface with C at some point
<Diip>
apart from mezzano which I can't get to work
<beach>
Diip: I am sure froggey would be happy to help you out.
<MichaelRaskin>
lieven: well, they also intentionally break Firefox. And Skype also breaks Firefox
montxero has joined #lisp
<lieven>
MichaelRaskin: I am not claiming there are any particular good guys in this play. A plague on all their houses.
<MichaelRaskin>
Well, Mozilla is strictly better than the other Javascript-capable browser vendors, which does have a lot to do with a low bar
<aeth>
erkin: it's not about feature parity, it's bug-for-bug-compatibility
<aeth>
erkin: because in the Web, every bug is a feature
<erkin>
Haha
<erkin>
Bug parity!
<aeth>
It worked for Microsoft (IE6) until it didn't (Chrome)
<erkin>
It turns out there are only two extant graphical web browsers (in useable condition) out there that don't derive from KHTML or Gecko: Dillo and WebSurf.
<MichaelRaskin>
By the way, Google reCAPTCHA penalises anti-tracking measures more than mistakes in recognition
<erkin>
Err, NetSurf*
<MichaelRaskin>
I would actually count links -g
<TMA>
Diip: it's like being stuck on an uninhaited island with sufficient resources. you can live there, but you probably won't be as comfortable as in the city with electricity, air conditioning and whatelse
<erkin>
MichaelRaskin: Can it do CSS?
<montxero>
MichaelRaskin: hear hear
<MichaelRaskin>
I think all three can do some CSS, and neither can do all the modern CSS
<erkin>
Yeah, NetSurf seems to be the best of the bunch.
<MichaelRaskin>
I also think a large subset of websites becomes _more_ useable if CSS is nuked
<TMA>
I knew links -g authors personally
<TMA>
ah, those memories
<MichaelRaskin>
(I also read most of the stuff I read on the Web by dumping to plain text via cl-html5-parser)
makomo has joined #lisp
<makomo>
morning
<MichaelRaskin>
Morning
nowhere_man has quit [Ping timeout: 245 seconds]
cosimone has joined #lisp
margaritamike has joined #lisp
_whitelogger has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
igemnace_ is now known as igemnce
igemnce is now known as igemnace
longshi has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
void_pointer has joined #lisp
t-sin has quit [Remote host closed the connection]
ludston has joined #lisp
knicklux has quit [Ping timeout: 250 seconds]
igemnace has quit [Quit: WeeChat 2.4]
selwyn has joined #lisp
knicklux has joined #lisp
orivej has quit [Ping timeout: 276 seconds]
<iarebatman>
This is absolutely terrible. I just had a night of completely restless sleep, trying to solve some great mystery involving recursive datasets and multiple circular lists. I still have no idea what my brain was doing, but I guarantee it had something to do with CL, so I’m blaming all of you.
<jackdaniel>
recursive datasets and circular lists are not often used in CL, I'm sure you've dreamt about clojure
<jackdaniel>
now I can honestly tell people, that they should use cl because clojure causes bad dreams
<no-defun-allowed>
when you can't be bugged to LOOP: (mapcar #'+ '#1=(2 . #1#) numbers)
<_death>
or (mapcar (lambda (x) (+ x 2)) numbers) .. now, you may different values to be added, say #1=(2 3 . #1#) .. then SERIES may be your friend.. (collect (#M+ (scan t list) (series 2 3)))
<dim>
phoe: no worries, just making sure my head is where it's supposed to be ;-)
<phoe>
dim: sometimes I have issues remembering which symbols are in CL and which are in Alexandria :D
<phoe>
like, some time ago I wondered why WITH-INPUT-FROM-FILE just wasn't there
<dim>
yeah I'm trying to not use Alexandria that much, but maybe I should just accept it as a kind of a CDR that completes the standard
<dim>
read-file-into-string is another one
<phoe>
yes
<dim>
though I tend to use uiop:read-file-lines in (many) cases
<dim>
or uiop:read-file-string when I don't need to then loop over lines
<_death>
sometimes a simple reduce function would do..
<dim>
what I like about uiop is that it's already there in your implementation of choice usually, nothing extra to install on-top of it, one less build-dependency
<phoe>
in most cases alexandria is already there anyway, too ;)
<_death>
instead of slurping files, reduce them record by record to the thing you want
<jackdaniel>
uiop (and asdf) are in a matter of fact quite a dependency if put in the executable
wilfredh has joined #lisp
<dim>
yeah that's where they go as far as I'm concerned
<dim>
_death: slurping is good enough in a minority of cases, I agree with you for the general case
<jackdaniel>
it depends. i.e on sbcl / ccl you ma do concatenate-source-op and then load it in a fresh image. on ecl compilation and runtime environment have better distinction so you can compile system with asdf and have nothing of it in the executable
t58 has joined #lisp
<_death>
dim: yep.. if you have a reducer then sometimes it makes slurping less tempting
kennyheaton has joined #lisp
<_death>
here again SERIES may be your friend, by the way, as it has SCAN-FILE and SCAN-STREAM
LiamH has joined #lisp
rwlisp has joined #lisp
igemnace has joined #lisp
orivej has joined #lisp
<pfdietz>
I'd like to sit down with MichaelRaskin sometime and talk about use cases for code walkers.
v88m has quit [Quit: Quit]
v88m has joined #lisp
<MichaelRaskin>
Sitting down might require nontrivial geographical coordination…
<beach>
Or you wait until ELS 2020 and it will happen automatically.
<pfdietz>
Maybe at ELS next year? I wanted to go this year, but events interfered.
<pfdietz>
Yes
<vms14>
lisp is one of the best languages to obfuscate code
<pfdietz>
Or to make it unobfuscated, moving the complexity off into macros.
<phoe>
there already exist libraries for obfuscating Lisp code up to read-time
<beach>
vms14: It's one of the best languages for just about everything.
<vms14>
pfdietz: right, macros can help you to make clean code, or very dirty code
<vms14>
just add macros to that and no one will understand, even you
<beach>
I hope we are not going to have an obfuscation contest here in #lisp.
<vms14>
who would win?
<pfdietz>
I keep coming up with code where I walk over lisp forms. Unlike macroexpand-all, I don't want to expand the macros. That's not possible in general, but I feel like there's a utility there struggling to get out.
<phoe>
at such contests, everybody loses
* phoe
takes that idea to #lispcafe
<vms14>
xD
<beach>
vms14: I am not interested in knowing.
<MichaelRaskin>
pfdietz: what exactly are you trying to do?
<vms14>
everyone will end with an obfuscated dialect of lisp
<MichaelRaskin>
Because my code-walking paper explains that there are a lot of things that are possible with macrolet that just happen to be underappreciated
<pfdietz>
Currently, I'm working on a mutation testing utility for lisp. This involves walking function definitions and mutating them, then seeing if the test suite catches the mutations.
<pfdietz>
I've used macrolet in the past for passing down information from surrounding scopes at compile time, using ENV as a ghetto symbol table. Very handy.
<MichaelRaskin>
Yep
<pfdietz>
Back to mutation testing: the goal there is to mutate the code without expanding it too much (and you don't want to mutate the glue code in the macroexpansions). Current approach adds methods for walking macro forms.
<pfdietz>
Sufficiently complex macros have to be expanded anyway, but "simple" ones can be handled more cleanly.
<phoe>
wouldn't you need to specify per-macro what can be mutated and where and how?
<pfdietz>
Yes.
<MichaelRaskin>
It all depends; in which side do you prefer to erR?
<pfdietz>
In this situation it's ok to screw up. If the mutated function doesn't compile, toss it out. No big loss.
<pfdietz>
The thing you want to avoid are mutations that leave the code correct.
<pfdietz>
So some analysis during the code walking is useful to detect when a mutation is bad in that sense.
<MichaelRaskin>
I mean, you could enumerate the sub-s-expressions of the macro, then expand, then find the sub-s-expressions eq to some original ones
<phoe>
eq?
<pfdietz>
Yes, that could be done.
<MichaelRaskin>
In the sense of EQ function
<MichaelRaskin>
pfdietz: whatever you do, there are mutations that leave code correct unexpectedly…
<pfdietz>
Another case: in my random tester, I come up with big random lisp forms that expose compiler bugs. After I find them, I want to reduce them to minimal forms that still show the bug. This involves walking.
<MichaelRaskin>
Please please please don't tell me this includes compiler bugs in macroexpansion
<MichaelRaskin>
Because that would be pure pain
<pfdietz>
Right, but you want to try to bias the mutations away from those. Perfect isn't needed.
<pfdietz>
It involves bugs anywhere, potentially. Differential testing.
<MichaelRaskin>
Well, I would start with macroexpand-all, and if the bug is still there, you are in luck
miatomi has quit [Ping timeout: 246 seconds]
<pfdietz>
And yet another case: the old Waters' COVER package. It uses symbol shadowing and macros to implement code coverage annotations. Unfortunately it doesn't work with certain macros, like ITERATE, which also walk.
<MichaelRaskin>
What type of test suite are you interested in? Ultra-unit-test type that call with specific arguments and assert exact equality of output, or property-checking?
<MichaelRaskin>
Oh ITERATE
<MichaelRaskin>
I would say it kind of walks
<pfdietz>
For mutation testing, it doesn't matter what the test suites are. For my random tester, I generate individual functions and look for crashes or behavioral differences between optimize settings (and inline/notinline, type decls no types, etc.)
<pfdietz>
The mutation testing walker would benefit from having some compiler-like information at walk time. For example, knowing that variable X is never assigned to, or that X and Y always have the same value.
<MichaelRaskin>
Well, for property-based test suites there is often a lot of function calls; so if mutated function always returns equal values to unmutated ones it is a different situation from returning different values but somehow passing the test
<pfdietz>
The point of mutation testing is not to test the mutated function, it's to evaluate the adequacy of the test suite. So if the test suite is not checking for the right return values it would be inadequate.
<MichaelRaskin>
I am lazy so I track names, not variable identites
miatomi has joined #lisp
<MichaelRaskin>
pfdietz: it also depends on the task, sometimes you do not want to check for precise output values
<MichaelRaskin>
I know that mutation testing is for coverage estimation; but some structures of test suites are more likely to provide some kinds of information
<pfdietz>
The other thing the mutation tester needs is a way to capture lexical information for reuse when a function is mutated.
<MichaelRaskin>
Just as an optimisation?
<pfdietz>
(let ((x ...)) (defun foo () ...)) ==> you want the X to remain the same when you redefine FOO
<pfdietz>
Better seen if there are several DEFUNs in that same lexical scope, communicating through those lexical variables.
<phoe>
so basically closure information
<pfdietz>
I can hack this, if I can get a list of the lexical variables when DEFUN is macroexpanded.
<pfdietz>
(sb-c::lexical-vars env) does this in sbcl
<MichaelRaskin>
Well, if you walk all that with agnostic-lizard from the top level, you have the list of lexical variables in a portable way
<pfdietz>
I construct thunks that read/write these variables, and store the thunks.
<MichaelRaskin>
Right, the same thing I did for the debugging macros
<pfdietz>
You'd macroexpand the form and look for all its vars, and see which ones are in the top level env?
rtypo has joined #lisp
<MichaelRaskin>
Well, there the task was even more annoying
lucasb has joined #lisp
<MichaelRaskin>
For each form that changes the list of locals, I made sure to stow away the thunks to read/write the new locals
<pfdietz>
Ah, so at each point there's a way, from the symbol, to get/set the value.
<MichaelRaskin>
Yes
<pfdietz>
For the mutator it's just necessary to set up a symbol-macrolet for the lexical vars at the DEFUN (and appropriate FLET functions for reading/setf-ing).
<MichaelRaskin>
If I were doing it, I would just mutate the code of the entire file and reevaluate all the things
<MichaelRaskin>
Then toplevel form by toplevel form as an optimisation
vms14 has quit [Quit: WeeChat 2.3]
<pfdietz>
That's one way to do mutation testing: "supermutants" that are controlled by some special variable. Lots of CASE statement in the code to control which mutant is being activated.
ludston has quit [Remote host closed the connection]
warweasle has joined #lisp
kennyheaton has quit [Ping timeout: 276 seconds]
<MichaelRaskin>
That might actually be reasonably efficient
<MichaelRaskin>
I meant the other direction: just a set of whole-file mutated reloads, maybe living in different packages
Diip has quit [Read error: Connection reset by peer]
Achylles has joined #lisp
nanoz has joined #lisp
<pfdietz>
I wonder how well macroexpand hooks stack (I assume you were using *macroexpand-hook*).
Achylles has quit [Remote host closed the connection]
Achylles has joined #lisp
<pjb>
pfdietz: manually. You need to save the old hook when you bind it.
<pjb>
"Users who put their own function into *macroexpand-hook* should consider saving the previous value of the hook, and calling that value from their own."
dale_ has joined #lisp
dale_ is now known as dale
<pfdietz>
Right.
ludston has joined #lisp
gareppa has joined #lisp
sjl_ has joined #lisp
<MichaelRaskin>
I have actually never used *macroexpand-hook*
<MichaelRaskin>
It is just too easy to break
Achylles has quit [Remote host closed the connection]
Kevslinger has joined #lisp
kajo has quit [Ping timeout: 258 seconds]
kennyheaton has joined #lisp
<selwyn>
i notice the google common lisp style guide advises against with-slots in favour of with-accessors. is this good advice? is this style guide worth consulting in general?
Achylles has joined #lisp
<pfdietz>
Does Google apply their style guidelines to your public repos when they're deciding whether to hire you?
<pfdietz>
The nice thing about *macroexpand-hook* would be that it lets me perturb someone else's software without changing that software.
<ludston>
selwyn: It makes sense for large projects, because it is trivial to refactor and extend the implementation of an accessor, where-as not so with slots.
<_death>
selwyn: I don't think it's good advice.. it may be worth consulting, but unless you're writing CL for Google...
<selwyn>
sure
kennyheaton has quit [Ping timeout: 250 seconds]
<ludston>
_death: Why don't you think this is good advice?
<beach>
selwyn: It is definitely good advice.
<_death>
ludston: because I think with-slots is useful, and I think with-accessors is bad
<ludston>
_death: Yeah I gathered that, I'm wondering why.
<beach>
selwyn: The existence of slots is an implementation detail.
lumm has quit [Quit: lumm]
<beach>
Accessors, on the other hand, are part of the protocol.
<selwyn>
i am interested in improving my coding style, particularly with respect to CLOS. i think that the best way to improve is to read and understand high quality code, but in this case google has put together a style guide consisting of purported best practices, which is certainly quicker to absorb.
kennyheaton has joined #lisp
<beach>
selwyn: I don't think it was put together by "Google", but mainly by Fare.
<beach>
selwyn: There are a few strange things in there, but it is mostly fine.
<beach>
... as I recall. I haven't read it lately.
<_death>
ludston: with-slots is useful when you're the one who is writing the code that's aware of the internal representation.. with-accessors is bad because it's just verbose and ugly.. symbol-macrolet or simple use is more tasteful
<beach>
_death: What makes you think WITH-ACCESSORS is bad?
<pfdietz>
And accessors can be applied to things that aren't even standard objects. Reading the page for with-accessors, I don't think it's limited to standard objects.
<dlowe>
It's almost entirely by Fare
<dlowe>
and was written previously by ITA pre-acquisition
<_death>
beach: it's a pet peeve, I guess.. I think it should've been left out of CL
<beach>
_death: It is very useful to make an internal protocol as well, again making slots an implementation detail.
* Xach
will start publishing guides under "The Quicklisp Consortium"
<_death>
beach: sure.. in that case you wouldn't want to use with-slots, but that doesn't mean you want with-accessors
<beach>
_death: So your problem is specifically about WITH-ACCESSORS as opposed to accessors in general?
<pfdietz>
The Q(uicklisp) Continuum
<_death>
beach: correct
<beach>
I see.
<Posterdati>
hi
<beach>
Hello Posterdati.
<ludston>
_death: I don't disagree that 'with-accessors' gives me RSI after I type it out for the 50th time, but I agree with beach, which is that it is better to abstract away implementation details. (In that it can be refactored later)
<Posterdati>
gsll, antik and cffi are still broken under openbsd :(
<pfdietz>
I have to confess I very rarely use with-accessors.
<pfdietz>
Or with-slots
lumm has joined #lisp
kennyheaton has quit [Remote host closed the connection]
<_death>
many times classes are used as structs-that-can-be-redefined.. in such cases, you don't necessarily think about a CLOS protocol.. then WITH-SLOTS is useful for the handful of functions that implement your external interface
<_death>
for some cases, you may choose not to define accessors (in defclass) at all
<ludston>
In personal projects tend to pretend all of my classes are structs (and follow the same naming conventions structs use for accessors) if only because it means that I can substitute the class for a struct trivially.
bendersteed has joined #lisp
mindCrime has joined #lisp
<ludston>
*I tend
<Posterdati>
gsll won't quickload under sbcl 1.4.13 running on openbsd, probably the c toolchain is badly configured
<_death>
selwyn: I think if you want to learn good CLOS design you should read AMOP and the CLIM spec
<selwyn>
thank you death and everyone else for the advice. i do have a copy of AMOP but have been putting it off finishing it.
<_death>
selwyn: for a (really) good style guide I can recommend http://norvig.com/luv-slides.ps .. but it's not a coding standard.. I guess the most important feature of a coding standard is that it exists, so.. :d
<jmercouris>
I'm just trying to get the text of the first heading
<jmercouris>
doesn't seem like it would be too complex of a thing to do, I start by: (read-org-file #P"/Users/jmercouris/Work/Atlas/Site/articles/why-lisp.org")
<jmercouris>
which works ok, I can then inspect the ORG-FILE object and it has some slots
<jmercouris>
for example I hve a slot CHILD-NODES in this object, that shows up when I inspect it, but it won't let me actually do (child-nodes returned-org-file)
kajo has joined #lisp
<pjb>
ludston: if you type with-accessors a lot, probably you're missing some abstraction, such as (with-person p (with-cat p.cat (print (list p.cat.name 'of p.name)) (incf p.age) (feed p.cat)))
<jmercouris>
I get the expected: The function CL-ORG-MODE::CHILD-NODES is undefined.
cosimone has joined #lisp
hiroaki has joined #lisp
<selwyn>
death: thanks for link. it reminds me somewhat of orwell's style guide for the english language which is reassuring as it is very good
<Bike>
kind of a weird idea of documentation, but whatever
<jmercouris>
Ok, probably should have looked at the documentation better then...
<jmercouris>
I was just trying to jump through the source code and inspect things
<phoe>
Bike: this does look a little bit like literate programming
<ludston>
pjb: You are not wrong. Thanks for the thought food.
ludston has quit [Remote host closed the connection]
<jmercouris>
here's an interesting question though, is it possible to view the accessor for a slot in the slime inspector?
<jmercouris>
in this case it was in the documentation, fine, but otherwise would I have to go to the defclass?
ludston has joined #lisp
<Bike>
um, if you expect the class, maybe? i dono't remember how nice it looks.
<jmercouris>
do you mean "inspect" the class?
<Bike>
doesn't look very nice
<Bike>
i do mean that, yeah
<pjb>
jmercouris: accessors can only be by convention, notably when they're not accessors to standard-object slots.
<Bike>
i suppose this could be prettied up some
<Bike>
i mean the inspector could look at the class slots and get the... wait what's thea ccessor
<_death>
jmercouris: M-. is always nice
<pjb>
Bike: the MOP gives the list of accessors.
<Bike>
clos:slot-definition-readers/writers
<jmercouris>
_death: I did not know that worked in the slime buffer on objects!
<Bike>
or mop: or whatever.
Arcaelyx has joined #lisp
<jmercouris>
okay, M-. in the slime buffer, easiest way to jump to the class
<pjb>
Bike: but only those defined by defclass. You could define them separately: (defgeneric (setf foo) (new obj)) (defgeneric foo (obj))
<jmercouris>
you can also inspect the class as Bike suggested, but it spits out something thats a bit hard to read
<jmercouris>
maybe I am just not used to it, but reading the defclass form was simpler
<Bike>
well obviously, those aren't accessors in the same sense
<Bike>
no, it's not obvious from the inspector window
<Bike>
it's hidden in the slot definitions
<jmercouris>
right so you'd have to iterate through each of em
<jmercouris>
I mean iterate in a non programmatic sense
<jmercouris>
as in clicking on each
<jmercouris>
I must say I don't like these accessors
<jmercouris>
"node.heading"
<jmercouris>
why not node-heading?
<pjb>
As you wish. It's free for your own conventions.
<pjb>
For example, tree-node-heading is it, tree - node-heading, or is it tree-node - heading?
<pjb>
tree-node.heading would be clearer.
<jmercouris>
sure I could also make my Lisp case sensitive and have all my variables lOoK lIkE thIs
<pjb>
Definitely.
<pjb>
I like case sensitivity.
<_death>
jmercouris: you may also want to check out gigamonkey's manifest system or others like it
<jmercouris>
_death: looks interesting, is this what is used in someting like quickdocs?
varjag has joined #lisp
<ludston>
Pressing shift too much hurts my hands :(. Maybe it is worth making () the default and requiring shift for "90". I certainly type () more often.
<jmercouris>
maybe it is easier to make [] type () instead
<ludston>
Good point
<phoe>
$ setxkbmap -option parens:swap_brackets
<phoe>
I cannot imagine writing Lisp without [] and () swapped
<_death>
jmercouris: looks like quickdocs operates differently.. there are many systems that generate documentation using the introspective functions though.. for example sb-texinfo in sbcl (and others)
<jmercouris>
Imagine no more! Buy yourself a Mac!
<phoe>
ludston: ^
<sjl_>
phoe: I don't swap them -- I rebind left and right shift to "shift if held and used with other keys, parens if pressed and released on their own"
<MichaelRaskin>
You want to say that on Mac you cannot swap them back to whatever you prefer?
<sjl_>
so to type () it's leftshift rightshift
<phoe>
sjl_: woah
<phoe>
please teach me
<sjl_>
less of a stretch for my pinkies
<MichaelRaskin>
xcape
<sjl_>
yeah xcape can do it. it's not as nice as karabiner for mac was, but it's good enough
<sjl_>
I do the same with capslock -> ctrl/esc
<jmercouris>
I have a lot to say about using shift key as an actual key and all the problems it cause with programs, but if you are only using emacs, go for it
<mfiano>
On SBCL at least, it seems to be legal to define &allow-other-keys ONLY inthe generic function, and each method using only they &key arguments they need. Is that legal, or must &allow-other-keys be present in the method lambda list?
jmercouris has quit [Ping timeout: 245 seconds]
<phoe>
"The use of &allow-other-keys need not be consistent across lambda lists. If &allow-other-keys is mentioned in the lambda list of any applicable method or of the generic function, any keyword arguments may be mentioned in the call to the generic function."
<phoe>
Why wouldn't the behaviour you describe be legal?
<phoe>
It should be legal to define a generic with &key &allow-other-keys and then a method that only has &key foo
tankf33der has joined #lisp
<phoe>
The programmer may always define a method that has a &rest and therefore captures all the keys supplied to the GF
<phoe>
or define a method that has &key foo bar &allow-other-keys
<beach>
mfiano: It is mentioned somewhere that it is as if the method function is called with :allow-other-keys t.
<beach>
I forget where.
<mfiano>
Ok. That rule to me means only when &allow-other-keys is specified in the method
<phoe>
it doesn't have to me
<phoe>
to be
<phoe>
for a single GF with &a-o-k it is legal to define methods which do not accept other keys
<mfiano>
I always only ever used &allow-other-keys in the GF, but zulu on the other server seems to think that is illegal
<mfiano>
if you want to chime in phoe
<phoe>
lemme chime in
xuxuru has joined #lisp
<dim>
speaking of generic functions I have some code refactoring for pgloaeder that's been pending for a long time, maybe I should consider doing that...
<phoe>
hey show me that
<dim>
oh, sure
<dim>
well not the new code yet but the opportunity for refactoring
<dim>
the functions list-all-columns, list-all-indexes, list-all-fkeys, get-column-sql-expression exist in the packages pgloader.mysql, pgloader.mssql, and pgloader.sqlite, and maybe even in pgloader.pgsql too
<mfiano>
beach: Is this legal? I can't find anything in the spec against it
<dim>
the function create-my-views and drop-my-views exist in all packages for a source database with materialized views support (MS SQL and MySQL at this point IIRC), and could be a generic function API too
<mfiano>
(defgeneric foo (&key bar &allow-other-keys))
<mfiano>
(defmethod foo (&key (baz 42))
<mfiano>
baz)
<dim>
mfiano: I think you have to have bar in the method
<mfiano>
So I should file a bug report to SBCL then?
<dim>
well try it in CCL and maybe some other implementations first?
<dim>
also what I think is not to be taken seriously, all the more in terms of standard
<beach>
mfiano: Yes, like I said, it is as if method functions were called with :allow-other-keys t so it doesn't matter that they don't mention all keyword arguments.
<dim>
phoe: who much are you interested in the generalization of existing internal APIs in pgloader then? should I work on it or leave you some space to hack away?
<beach>
mfiano: Hmm, I think we have a discrepancy between the Common Lisp HyperSpec and the MOP.
<mfiano>
Solved
<mfiano>
"If &allow-other-keys is mentioned in the lambda listof any applicable method or of the generic function, any keyword arguments may be mentioned in the call to the generic function."
<phoe>
dim: I think I won't be able to hack at it straight away - feel free to take it
<dim>
sure, it's quite an effort in terms of refactoring, that said it's all about CL, not much about pgloader's domain
<phoe>
Yes, I see - it's beautifying existing Lisp code
<phoe>
Will need to take it slow this week though, my backlog is a little bit bigger than I thought it would be
<dim>
hehe, I know the feeling...
abhixec has quit [Quit: leaving]
shka_ has joined #lisp
hhdave has quit [Ping timeout: 244 seconds]
cosimone has quit [Quit: WeeChat 2.3]
<katco>
stylewarning: hey, i read some comments you made on reddit about gsll. you mentions magicl was started because gsll was so buggy. would you mind expounding a little on that?
<stylewarning>
katco: couldn’t get it to
<stylewarning>
work with complex floats, for instance
<stylewarning>
(e.g., we needed a complex SVD)
<katco>
what was it doing, segfaulting? or feeding back wrong answers?
<stylewarning>
IIRC, there was either nothing to call, or it was segfaulting
<katco>
ah ok
<selwyn>
i had gsll segfault at times when i used it. magicl and gsll have overlapping but distinct use cases
<katco>
thanks :) as i progress, maybe i'll end up using magicl
knicklux has quit [Ping timeout: 258 seconds]
<katco>
selwyn: good info, thanks. i wonder why the community isn't fixing bugs in gsl? does no one use it any longer?
dacoda has joined #lisp
<stylewarning>
katco: well contributions to it are highly welcome. If you have a better way to organize things, please file an issue sharing your ideas. There are ridiculous functions like MULTIPLY-COMPLEX-MATRICES
<katco>
stylewarning: this is a totally new space for me, so i won't likely have any useful feedback for awhile. i'm not even sure if i can get away with poking at data in lisp yet. the book i'm following uses python, and i'm new enough that it's difficult for me to find the equivalent lisp libs/fns sometimes
oni-on-ion has joined #lisp
<selwyn>
katco: i don't know. i don't know how many people use it, but it does seem to be less maintained which is a major drawback of a library that relies on foreign function calls. i suspect that some bugs i encountered were due to GSL library updates that changed the API
<katco>
it does seem like the lisp community needs to rally around a lib though. lisp is such a good choice for data-munging
<katco>
selwyn: ah that's helpful info
<oni-on-ion>
al-ana ? can i have the link again pls
<selwyn>
katco: concerning poking at data in lisp, if you are ambitious and accept that you occasionally have to roll out your own libraries it can pay off greatly. having said that i can list lisp libraries that are better than the python equivalents. i made the switch from python and didn't look back (i am more in scientific computing than data, though i do some data things)
<katco>
sorry, can you clarify that last statement?
<LiamH>
GSLL doesn't have a lot of updates for GSL 2+. I just don't have the time; I would love to get help doing this.
<katco>
selwyn: i don't even really know python that well, but i do know CL. it seems the obvious choice for me, but it's been a bit of an uphil battle to get going on the CL toolchain
<oni-on-ion>
CL is excellent for collections of (disparate) code like this . someone somewhere brought up the topic of "immortal" software recently, i would say anything written in CL is made out of strong materials
<selwyn>
katco: i understand
<katco>
LiamH: hello again! do you have any opinions on the aforementioned segfaults and whether they're functions of gsl, or gsll bindings?
<katco>
oni-on-ion: i totally agree with that. i am not old, but i am old enough to want to write things once and then use them for the rest of my life
<katco>
this is a major reason i try and bend my work towards CL
<LiamH>
katco: I don't experience any segfaults.
<LiamH>
katco: Have you reported the problem to the mailing list?
<oni-on-ion>
katco, yep. in the youth of my old phase (!) i am learning this, and also learning more that i am making software for myself rather than for everyone-except-me
<oni-on-ion>
(if that makes sense to how it is related )
<katco>
LiamH: it seems selwyn and stylewarning have. i haven't actually used gsll properly yet
<katco>
oni-on-ion: i can appreciate that sentiment as well :) the exception being working on teams :)
<LiamH>
Well whoever is experiencing errors should report them to the mailing list.
<oni-on-ion>
i wanted to say, cl-ana and gsll reminds me of julia, i cant help it
<oni-on-ion>
katco, i would like to say that is one person, if the team is working as a whole unit =) wishful thinking though eh
<katco>
agreed! i'd like to have a high-quality lib to use
ggole has quit [Quit: Leaving]
<katco>
oni-on-ion: yeah for sure. i can't find teams using CL :(
<oni-on-ion>
julia is high quality and high performance for scientific things
<oni-on-ion>
yeah, i've not seen one. maybe pairs some times
<selwyn>
i should clarify i haven't used it in a year, but this is my recollection. i don't use it now since i don't require it at the moment
<katco>
oni-on-ion: but not a lisp, and cannot yet produce immortal code ;p
<stylewarning>
katco: can’t find teams where?
<_death>
there are also libraries like maxima and sapaclisp
<katco>
stylewarning: i work remotely, but i'm in the us
<stylewarning>
katco: I see, well you’re welcome to message me about that, though I can’t guarantee anything
<katco>
stylewarning: i actually had a look at rigetti computing last night. i wasn't aware there was a market yet for cloud quantum computing
<oni-on-ion>
programming is the best 'game'. and games are more fun with others. its just that i dont like to play competitively, but cooperatively. i have a feeling that relates to lisp where it is more single-effort than teams. either that means CL users are evil and selfish, or programming itself is fundamentally competitive. --confused
<stylewarning>
katco: *shrug* I didn’t know there was a market for commercial lisp compilers either, but I guess there is.
<katco>
haha. it would seem we are not imaginitive enough :)
<oni-on-ion>
the key is to convince potential customers that they want to buy *whatever* it is you're selling
<oni-on-ion>
get then sharply aware of their lack of that thing in their lives
svillemot has quit [Quit: ZNC 1.7.2+deb2 - https://znc.in]
svillemot has joined #lisp
<katco>
ty LiamH !
<katco>
selwyn: i'm reading through "Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFLow", and i arrived at a section that was discussing building up your own personal library of functions to munge data. it seems like a large part of this is rolling your own anyway
<selwyn>
katco: you might like to check out melisgl's libraries. i use one of them https://github.com/melisgl/mgl-gpr for differential evolution and can recommend it. he won a kaggle contest a few years back using lisp
<katco>
selwyn: thanks, i've looked at that. unfortunately my team are not also lispers. so anything regarding building the actual models would have to be something more "mainstream". but i have some wiggle-room for stuff i only use personally, i.e. poking at the data prior to building models
<selwyn>
i see
hiroaki has quit [Remote host closed the connection]
selwyn has quit [Remote host closed the connection]
hiroaki has joined #lisp
gareppa has quit [Quit: Leaving]
rtypo has quit [Quit: WeeChat 2.4]
andrei-n has joined #lisp
lumm has quit [Quit: lumm]
lumm has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
bitch has quit [Remote host closed the connection]
Nilby has joined #lisp
Achylles has quit [Quit: Leaving]
lumm has quit [Remote host closed the connection]
bendersteed has quit [Read error: Connection reset by peer]
terpri has joined #lisp
hiroaki has quit [Remote host closed the connection]
cosimone has joined #lisp
hiroaki has joined #lisp
notzmv has quit [Ping timeout: 250 seconds]
nullman` has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #lisp
koenig has joined #lisp
Nilby has quit [Quit: 👽愛🆑]
<koenig>
jackdaniel: I thoroughly enjoyed your post on /r/lisp a week ago called "Fun ECL hack" where you wrote a simple C REPL.
<koenig>
I keep telling myself that I'll write a WeeChat module to integrate ECL into WeeChat but never seem to find the time to do it. But your post may inspire me to follow through and get started!
gravicappa has quit [Ping timeout: 246 seconds]
Diip has joined #lisp
xuxuru has quit [Quit: xuxuru]
Lord_of_Life_ has joined #lisp
hiroaki has quit [Ping timeout: 268 seconds]
anewuser has quit [Ping timeout: 246 seconds]
<p_l>
I don't remember the nick, but someone here used ECL to make (commercial) plugins for MS Office
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<koenig>
I keep thinking that using Common Lisp in general and ECL in specific could be a "secret weapon" in a lot of the work I do.
<koenig>
I guess it'd probably take just diving in and doing it for a few projects and then I'd have my own design patterns for how it works best with my style.
<koenig>
But having an accessible ECL REPL linked to a lot of my C/C++ code would probably be pretty neat.
<jackdaniel>
koenig: wait a few days, I'm going to expand this joke into something hilarious (at least to me)
<katco>
isn't that redefining a method in a package the code doesn't own?
<katco>
or is that defining a method of a generic method, hrm. i hadn't considered that
<Xach>
katco: the general idea is not bad but asdf provides a better way now.
<selwyn>
which part of that are you asking about
<selwyn>
defmethod asdf:perform ?
<katco>
selwyn: i incorrectly jumped to the conclusion that the code here was overwriting the method definition. i guess i haven't worked with clos in awhile
knicklux has quit [Remote host closed the connection]
notzmv has joined #lisp
pierpal has joined #lisp
<katco>
Xach: the preferred way is now a `:in-order-to ((test-op (test-op cl-csv/test)))`, right?
shka_ has quit [Ping timeout: 245 seconds]
Achylles has joined #lisp
Achylles has quit [Quit: ERC (IRC client for Emacs 26.1)]
Achylles has joined #lisp
mooshmoosh has quit [Ping timeout: 246 seconds]
andrei-n has quit [Remote host closed the connection]
mindCrime has quit [Ping timeout: 246 seconds]
ckonstanski has quit [Remote host closed the connection]
mooshmoosh has joined #lisp
anamorphic has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
hiroaki has quit [Quit: Leaving]
cosimone has quit [Quit: WeeChat 2.3]
karlosz has joined #lisp
karlosz has quit [Client Quit]
Bike has quit []
karlosz has joined #lisp
karlosz_ has joined #lisp
karlosz_ has quit [Remote host closed the connection]
<anamorphic>
defunkydrummer: think I got that ccl problem with iup-controls on windows sorted out
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
aindilis has quit [Ping timeout: 250 seconds]
<defunkydrummer>
anamorphic: tell me more, tell me more (sung in Grease-style)
<defunkydrummer>
should I go to the Issues page to see if you put some comments?
<anamorphic>
I think iupcontrol was loaded ahead of iup. SBCL didn't seem mind (and CCL too, on Linux)
<anamorphic>
I dont think I added much in the way of explanation comments sorry
<defunkydrummer>
amazing, I thought the problem was due to some DLL missing
nullman` has quit [Ping timeout: 245 seconds]
mindCrime has joined #lisp
<defunkydrummer>
anamorphic: IUP lovin' had me a blast
<anamorphic>
Yeah it was a joy to wrap in Lisp
<defunkydrummer>
anamorphic: are you lispnik?
<anamorphic>
Yeah on github
<defunkydrummer>
or is lispnik plain spherical ratio
caltelt has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
ltriant has joined #lisp
<defunkydrummer>
anamorphic: i'll have to try on my windows machine then. last time i thought the right version of MS VC runtime DLL was not being present, but upon checking, it was. So i'll have to take a look what was causing the problem. Because i'm not very sure loading iup-controls before iup will cure it.
Achylles has quit [Quit: ERC (IRC client for Emacs 26.1)]
<anamorphic>
I would appreciate you trying it, too. Right now It Works on My Machine (TM)
random-nick has quit [Read error: Connection reset by peer]
<anamorphic>
I started setting up appveyor to catch these kinds of things, but had to rage quite after an hour or so.
<defunkydrummer>
IUP lovin' had me a blast / IUP lovin', happened so fast / I met a GUI crazy for me / Met a framebuffer cute as can be // QT days drifting away / To uh, oh those IUP nights (BRIDGE) Oh well, oh well, oh well oh, uh / Tell me more, tell me more / Did you get very far? / Tell me more, tell me more / in CCL did it start?
mindCrime has quit [Quit: Konversation terminated!]
mindCrime has joined #lisp
Achylles has joined #lisp
<anamorphic>
cells demo + ccl + windows = workie
<defunkydrummer>
anamorphic: I am not convinced of the use of Continuous Integration when you can do interactive development with a repl
<defunkydrummer>
anamorphic: too good to be true. I'm fetching your latest changes now.
<anamorphic>
but I just wanna know if it loads into $impl on $os
<defunkydrummer>
anamorphic: WOW, those screenshots look good
<anamorphic>
Those first ones are the sample.c app redone in lisp
<defunkydrummer>
anamorphic: No. I still have the DLL problem: can't load iupcontrols.dll, and this must be because a missing dll. I need to use those dependency walkers to find out what the f"!/#! is going on
miatomi has quit [Ping timeout: 258 seconds]
Bike has joined #lisp
<phoe>
defunkydrummer: screenshots?
<vms14>
someone have read the On lisp book?
<phoe>
vms14: yes
<edgar-rft>
yes, me and probably many here
<phoe>
make sure that you are *very* comfortable with Practical Common Lisp before you dive into it.
miatomi has joined #lisp
<vms14>
phoe: I'm just starting it, but it seems it will teach very important stuff of lisp than other books won't cover. It's right that assumption?
<phoe>
kind of
<defunkydrummer>
phoe: The error is the same i have on Issues: Error opening shared library <path>iupcontrols.dll : The specified module could not be found. .
<phoe>
it's basically about macros
<vms14>
you agree with what the author says on his webpage about the power of lisp?
<defunkydrummer>
phoe: the "The specified module could not be found" message comes straight from the Windows OS and means "I can't load some DLL that is required by your DLL, so fuck you."
<phoe>
defunkydrummer: are you sure that you have 32bit/64bit sorted out?
<phoe>
32bit DLL for a 32bit impl, 64 for 64
<anamorphic>
You still get that?
<defunkydrummer>
vms14: Lisp (or Scheme) is the most powerful mainstream interactive language
<defunkydrummer>
phoe: When you load a 32-bit DLL under CCL64bits, the error message is different. In any case, I will double-check again
<vms14>
defunkydrummer: yeah, but I want that fucking enlightenment people claim lisp has
<phoe>
vms14: there is no enlightenment whatsoever
* vms14
cries
<vms14>
I think there is kind of
<defunkydrummer>
vms14: You will get the fucking enlightenment. I guarantee you. Lisp: Guaranteed enlightenment or TRIPLE your money back
<phoe>
same as with zen - if you're looking for it, you're unable to find it
<defunkydrummer>
don't listen to phoe, he didn't get the enlightenment yet
<anamorphic>
defunkydrummer: I will take another look tonight. Thanks for trying it out again though.
<vms14>
or at least that you change as a programmer since you're in "higher level"
<vms14>
defunkydrummer: xD
<Bike>
so far i haven't spent any money on lisp. can i get a gift card or something instead.
<anamorphic>
I'm forcing myself to use Windows for this, just so the support is there :D
<phoe>
Lisp doesn't magically give you galactic brain or anything, it just shows you how programming languages are and should be done
sjl_ has quit [Ping timeout: 245 seconds]
<phoe>
and once you understand that, and different layers of that, then you start utilizing that knowledge
<defunkydrummer>
vms14: the best part of using Lisp is that you can increase your smugness levels up to the max, that's when you simultaneously achieve enlightment and turns you into a Smug Lisp Weenie (TM)
<vms14>
but I guess all that stuff it's just the tools you have to create abstractions, and how thanks to having all those tools you learn and improve your knowledge about how to create abstractions
karlosz has joined #lisp
<phoe>
(also don't listen to defunkydrummer, he tries to convert you into /r/lispmemes
<defunkydrummer>
Bike: sorry, restrictions apply
<vms14>
also, you'll get used, so your programs will be very different than what would be with C
<phoe>
on one hand it's abstractions to hide what isn't required, but on the other hand Lisp can bring you all the way to the most basic units of computation - see the SICP lecture videos for that
* defunkydrummer
is recruiting submitters for r/LispMemes. Work compensation plan includes a Space Cadet Keyboard, an autographied copy of the Chine Nual, and a dinner with Conrad Barski
<vms14>
phoe: I have seen some of their lectures
<phoe>
so in a way Lisp is a low-level high-level low-level high-level programming language
<vms14>
I guess until the 3b
<anamorphic>
It's like when zaphod beeblebrox complehended the universe all at once, vms14
<defunkydrummer>
vms14: exactly what Phoe/Herda said
<phoe>
keep on going - one part I really liked is how s&a explain how to implement objects using closures
<vms14>
I saw them when I was just starting to learn lisp, the fibonacci recursive function fucked my mind xD
<vms14>
phoe: I like one of those teachers, the one who has less hair
<vms14>
he says closure is one of his favourites words
<phoe>
also how they first showed you that you don't need mutable hidden state at all, only to end with a conclusion that you actually need to have mutable hidden state
<phoe>
it's just as useful and just as readable as perl
karlosz has quit [Quit: karlosz]
<phoe>
too bad FORMAT is not turing-complete
<vms14>
I love format even if I don't know yet all of it's power
<vms14>
but I love how you can use format to create strings with fill pointer array
<vms14>
how ~v expects a number
<defunkydrummer>
anamorphic: IT SEEMS I OVERCAME THE DLL PROBLEM. Thanks to your updated Readme: "Usually this means setting LD_LIBRARY_PATH on Linux or PATH on Windows."
<defunkydrummer>
anamorphic: i didn't know i need to set the PATH, considering that CFFI was already directed to the correct directory
<vms14>
and I'm missing a lot of stuff like ~: or alike. I don't remember how it was
<vms14>
just made some noob stuff with ~{ ~}
<defunkydrummer>
phoe: Format: IT can sense your fear
<anamorphic>
I was really hoping the (push (asdf:system-relative-thing :tecgraf-libs "lib") cffi:*foreign-directories-somehting*) was going to be the best way
<anamorphic>
lol I saw that on /r/lispmemes recently
<selwyn>
i wonder how much the lisp world would benefit from the contributions small number of windows developers maintaining the sbcl windows port, writing a windows backend form clim etc.
aeth has quit [Read error: Connection reset by peer]
<vms14>
selwyn: portability means more users
aeth has joined #lisp
<vms14>
more users means more benefit
<defunkydrummer>
anamorphic: So it isn't enough. One really needs to set the PATH environment variable. This is counterintuitive because AFAIK when one DLL requests to load another DLL, Windoze should search in the local path too... But perhaps it looks in the local path of the process, not the path where the DLL sits in.
<defunkydrummer>
selwyn: Bill Gates loves us all.
<vms14>
sure not, because we aren't using windows
mooshmoosh has quit [Remote host closed the connection]
<vms14>
but most of computer users and even programmers are windows users
<anamorphic>
the Windows search algorithm for .dlls was interesting to read about
<vms14>
or they added that functionality to the windows port?
<selwyn>
at ELS, christophe rhodes told me that many people requested the warning message on sbcl windows startup be removed
<vms14>
defunkydrummer: in linux,bsd sbcl has no history and no editing features like move between characters if you use sbcl from the terminal
<anamorphic>
It adds emacs navigation like stuff to programs that didn't support it
<defunkydrummer>
vms14: this doesn't matter at all since one would be really crazy to use SBCL directly, instead of doing it through SLIME, SLY, SLIMV etc
<selwyn>
not because it is no longer necessary, but because it puts off users who may see it..
<vms14>
defunkydrummer: I know
<vms14>
xD
<vms14>
but in windows has history
<defunkydrummer>
selwyn: I also want that damn warning message to be removed. Real fact: I had to use CCL instead that SBCL on a production system i made, because I had fear of the customer looking at this message and questioning me.
<defunkydrummer>
the fun fact is that now i use CCL more than SBCL. CCL = motorcycle, SBCL = truck
<defunkydrummer>
trucks are cool though
<vms14>
defunkydrummer: he should question you for using windows
mindthelion has quit [Ping timeout: 258 seconds]
<anamorphic>
I really prefered the exploding kittens warning
<anamorphic>
"kitten of death" SBCL message, rather
miatomi has quit [Ping timeout: 245 seconds]
<selwyn>
apart from windows support, what merits using CCL over SBCL?
<anamorphic>
compilation speed
<vms14>
anamorphic: but not execution?
<anamorphic>
I'd say it's resonable realtive to other lisps, but relative to sbcl it could do better execution wise
<defunkydrummer>
anamorphic: Cells demo and Canvas demo work just fine :) :) :) . Thanks for your awesome lib mr. Lispnik from Austin.
<defunkydrummer>
selwyn: CCL was actually a commercial, production-quality implementation honed through many years, that is now free for the world to enjoy. Execution speed is good, not as fast as SBCL but still faster than many other implementations.
<anamorphic>
Cool! so is that shared library load error thing on CCL /w windows no more?
libertyprime has joined #lisp
<defunkydrummer>
anamorphic: It was all a fault of the PATH environment variable not set. Sadly the Tecgraf page didn't mention one needed to do that (or i'm a bit blind.) But thanks to your wonderful, pimped-out brand new README, no noobie will make my mistake.
<PuercoPop>
The Kitten of death message may be suppressed by passing the --noinform option since quite a while ago, sbcl-1.1.11
mindCrime has quit [Ping timeout: 245 seconds]
<defunkydrummer>
thanks PuercoPop. It was long ago though, when I started entering the world of Lisp. It was a time of excitement and illusion.
miatomi has joined #lisp
<defunkydrummer>
anamorphic: the tecgraf-libs package makes IUP one of the easiest to setup GUI multiplatform libs for CL.
<defunkydrummer>
selwyn: Execution speed among Lisp implementations will vary a lot depending what you're trying to do. For example, it's not the same if you're -say- doing data compression vs something that is IO heavy, vs something that requires lots of CLOS method calls, etc. I was suprised when some math code I made ran quite fast in ABCL, despite ABCL being a
<defunkydrummer>
bit slow for other things.
<defunkydrummer>
selwyn: as for compilation speed, CCL is much faster than SBCL. And ABCL is dramatically slow.
<anamorphic>
Is ultralisp basically where you put publish your git master?
<selwyn>
hm i always thought sbcl compilation speed was outstanding
<PuercoPop>
CCL's CLOS is not derived from PCL right? If so, wonder how it compares performance-wise to PCL-derived CLOS implementations
<PuercoPop>
selwyn: try removing all the FASL caches and loading a system from scratch. Even starting up SL{Y,IME} should take considerable more time
<PuercoPop>
anamorphic: that seems to be my impression. There plans for some information aggregation on top of that though.
<anamorphic>
selwyn: the main thing is as a common lisp coder, you've got all these implementations to pick from when trying to satisfy some criterea. Those poor bastards in other languages, like rust, go, java and node are all stuck with whatever comes down their pipe
<selwyn>
it is nice to have the choice
<defunkydrummer>
selwyn: Not everybody has a fast machine like you sir.
<selwyn>
defunkydrummer: poor souls
<selwyn>
:)
<selwyn>
goodnight all
selwyn has quit [Remote host closed the connection]
karlosz has joined #lisp
<anamorphic>
I too, thought I had a fast machine, until I ran lein repl
<defunkydrummer>
anamorphic: samples.lisp looking good on my machine
<vms14>
guys do you often see lispers being involved in things like pentesting or cracking stuff?
<pjb>
Nope. This is done in private.
<vms14>
I mean, I know it's wrong to generalize, but... lispers are usually advanced programmers
libertyprime has quit [Ping timeout: 246 seconds]
<vms14>
and I want to think they are the kind of programmer who does not like to fuck other people
<pjb>
Also to work for the mob, you have to be able to crach stuff under pressure. I doubt you'd really appreciate it.
<vms14>
or who is enough smart to understand that there is no point to do this stuff
<vms14>
but of course, I cannot generalize
<vms14>
in doing*
libertyprime has joined #lisp
<vms14>
I mean, if I publish my code (bad code, sorry) only lispers will understand the code. Parens obfuscate the code for non lispers
<vms14>
but I cannot rely lispers are good people
<no-defun-allowed>
vms14: I wrote a pentesting program (like a less annoying metasploit), since I wanted to mess with designing one I could actually use
rumbler31 has quit [Remote host closed the connection]
<no-defun-allowed>
I wouldn't try to correlate morality and programming language choice, but...
rumbler31 has joined #lisp
<vms14>
no-defun-allowed: yeah, but that does not mean you like to fuck other's software, or yes..
<no-defun-allowed>
... it's just that in C++ and the like, you don't trust anybody, and in CLOS you basically trust everybody. the practical result is that thieves and bums use C++ and nice people use CLOS.
<vms14>
I mean, usually who attacks servers, or tries to do similar things are lammers
<vms14>
they don't know how to program, but some of them learn and some of those create pentesting software
<no-defun-allowed>
Well...I did that once, using a 0day in a web server. I think it was justified though, and I told the developers after.
wigust has joined #lisp
<vms14>
but I guess once you learn to program, you end by the time doing other things instead
<vms14>
I guess your personality changes, or it could change
angavrilov has quit [Remote host closed the connection]
<no-defun-allowed>
What you're thinking of is a "skiddie". There's not many skiddies that write Lisp, since JS or Python are the usual tools for doing skiddie things.
<vms14>
right, this is why I ask if you often see lispers involved with this kind of stuff
wigust- has quit [Ping timeout: 245 seconds]
<vms14>
since lisp is not usually your first language
<no-defun-allowed>
Sure, there are more exciting things you can do with Lisp.
<vms14>
metaprogramming and ai
<vms14>
those are the things I like the most
<vms14>
but I must learn first
<no-defun-allowed>
Exactly. You could make a fancy scanner using CL if you liked though using those.
<vms14>
I was never interested in security or pentesting/cryptology
<vms14>
but I'll need to learn just because people likes to fuck
<no-defun-allowed>
One idea I had was to automatically analyse a firmware update for a device. You could try to find any compressed archives or file systems, decompress them, and search for hidden passwords or backdoors. It wouldn't be hard to write a declarative DSL for it.
<vms14>
I want to go for dsl, but I should read the onlisp book since I know nothing about macros