freenode/#lisp - IRC Chatlog
Search
20:42:08
aeth
Oh, I almost forgot. The next CL standard should sneak in a full implementation of Prolog as well. Put it in an appendix as a mandatory thing. Or maybe a long footnote.
20:42:23
mfiano
I consider that worse than just using global nicknames, because you don't know how it will behave from a user standpoint.
20:43:22
aeth
nirved: I'm trying to specifically talk about things where a layer wouldn't be too useful.
20:43:46
aeth
You can implement anything in any turing complete language, but not necessarily efficiently.
20:46:57
aeth
yes, the Prolog was a joke, but actually apparently there are some things an implementation must do in order to coexist with Prolog. iirc dmiles was talking about that a while ago
20:47:33
aeth
the latter would be more of an idea to specify as an extension or something, not actually all of Prolog
20:48:29
aeth
Perhaps the future of a CL environment is as a runtime for many languages. Then there'd be lots of interesting things that could be added.
20:48:34
nirved
if necessary CL can spit out machine code as well, and with CL writing a compiler is relatively easy
20:51:09
White_Flame
nirved: that would be more in the realm of creating a new language separate from CL, not necessarily modifying/extending CL itself
20:51:35
White_Flame
as at that level, you're working with individual implementation specifics, not anything CL-specified
20:52:12
aeth
But there are already lots of constructs in CL that don't really make sense to directly use, like tagbody
20:52:43
White_Flame
and if CL wants to be a modern runtime, it really needs feedback-based recompilation in my opinion
20:53:28
aeth
You might be able to get enough meaningful feedback in a DSL to recompile those DSL functions at runtime, if that's what you mean.
20:55:41
White_Flame
right, that sort of architecture would allow making the base langauge more generic, while still finding location-specific speed decisions
20:56:24
aeth
not sure how you'd do this without first (1) making the MOP standard and then (2) also making what you're talking about standard
20:58:33
aeth
It would be nice if something like specialization-store wasn't necessary for when you wanted generics for e.g. (simple-array single-float (3))s
21:00:18
White_Flame
recompile your code to inline the type decisions that actually occurred the most
21:01:32
White_Flame
for instance, (mapc (lambda (x) ...) list) is unrolled in SBCL to a plain loop, instead of literally calling that function every iteration
21:02:00
White_Flame
but (mapc #'some-other-function list) couldn't be inlined, because that function might be redefined, or be passed in as a variable, or whatever
21:02:19
White_Flame
in theory, if the code notices that the same function is always given to that mapc, it could be recompiled to a loop with that function inlined
21:03:41
White_Flame
the functionality should be maintained throughout its optimization; only the speed should be affected
21:04:37
White_Flame
also, if the invariant that was optimized is violate (ie, you pass in a different function than what was inlined) then it either undoes that optimization or run a separate fallback "slow path" for the more generic case
21:05:38
White_Flame
you can see how it would increase the speed of math operations, and do things like flip from baked-in fixnum to bignum processing automagically
21:06:23
White_Flame
I'm not a fan of Java, and only somewhat of JavaScript, but man I respect the tech they've put in those VMs
21:38:41
comborico1611
Why is "form" also used, and not just "expression". "Expression" does predate "form", correct?
21:41:43
White_Flame
it doesn't evaluate (car foo) first as an expression, it dispatches on the form (car ???)
21:42:11
White_Flame
if foo was (1 . 2), then evaluating the experession would yield (setf 1 3) which doesn't make sense
23:17:13
edgar-rft
comborico1611, the best explanation of Lisp forms vs. s-expressions I found so far is <https://stackoverflow.com/questions/2877371/definition-of-lisp-form>
23:18:07
edgar-rft
In short, Lisp forms can also be self-evaluating atoms like numbers, strings, arrays, etc.
5:01:18
beach
It was for people who have GitHub repositories. They are doing a survey on how API-breaking changes impact the work, and on to what degree those people introduce API-breaking changes.
5:30:04
rme
I've received messages like that before (where someone is doing research based on GitHub repositories); I am afraid that I tend to ignore them.
5:30:39
beach
I do too. But this was an opportunity to mention that 1. I use Common Lisp and 2. There are very few problems of this type with Common Lisp.
5:36:54
loke
What could have happened? (it is triggered some time after loading one of the McCLIM files and an error happens)
5:37:39
loke
beach: Right, but which one? The one in my REPL (both SLIME repl and *inferior-lisp*) are still normal.
5:38:44
loke
It's not really a problem, I actually prefer lower case. It's just unsettling that I have no idea why it happens.
5:39:39
loke
aaaah. wait a second. It only happens for stack traces generated from the CLIM Command Reader.
7:04:23
shrdlu68
Hey, I'm reading online and some guy says that Lisp has two fundamental features: 1. Programs and data being the same 2. nil eq () eq false.
7:05:10
shrdlu68
He says without either of these, a language is not a lisp. In what qay is 2. a fundamental lisp feature?
7:07:47
schweers
I like nil punning and the like, but I don’t think it’s /that/ essential. But hey, maybe
7:10:00
shrdlu68
schweers: In the comments here: http://smuglispweeny.blogspot.co.ke/2008/02/ooh-ooh-my-turn-why-lisp.html
7:10:45
flip214
consider all the problems with eg python, perl, etc, where you have multiple "false"s: "", "0", false, 0, []
7:11:31
schweers
although I’m not so sure anymore if I regard scheme to be a lisp, albeit for different reasons.
7:11:53
flip214
schweers: well, python is called "a lisp without the parenthesis" - I don't understand why. so how many parts of lisp are needed to _get_ a lisp?
7:12:38
schweers
as far as I know, only false and None are non-true in python. Am I wrong? (Not that it matters)
7:15:31
schweers
ugh, I hate python. this indentation stuff really is stupid. And not for the reason most python newbies have.
7:17:08
beach
shrdlu68: There is no widespread agreement about the definition of "Lisp". That's why this channel is dedicated to Common Lisp, which is well defined.
7:18:29
shrdlu68
beach: Ah, so there's no way to validate this gentleman's claim, there being no standard definition.
7:19:26
beach
Therefore it leads to pointless discussions, since every person has his or her prerequisites for some language being "a Lisp".
7:27:56
phoe
somewhat related, http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html
7:29:26
schweers
I actually like most of his writings, but I have to say, what he says about lisp not being an acceptable lisp ... does not seem to be true to me. Just the other day, I thought that this constant talk, that Common Lisp is supposedly some ugly beast ... I don’t get it, and it has stopped me from getting earnest with Common Lisp earlier in my life.
7:30:47
schweers
I don’t get what’s so bad about having CAR and CDR, especially given that there is also FIRST and REST.
7:35:37
flip214
for some more criticism, see also CL21. For example, the argument order differs between AREF and PUSH - container first resp. last argument.
7:35:39
schweers
okay, then I may have misunderstood you, but my question is still: how is CL so ugly as some people claim? I just don’t see it. Yes, you can write horrendous code in a lisp which uses cons cells as its only data-structure, but that style of programming is not tied to lisp.
7:36:23
schweers
okay, now that is something I understand, but still doesn’t disqualify it, especially given that I can see the signature at the bottom of the screen.
7:36:35
flip214
If you use a Lisp for longer, then you don't mind them any more (or even welcome them) - but then you get to see other parts that are not that nice.
7:37:03
schweers
yes, but these “some” people are not those I’m concerned about at the moment. I’m talking about the people who think that LISP is a great idea, but that all current lisps suck
7:37:34
schweers
flip214: I don’t see that as a workaround. I want that, no matter how well the standard library is designed.
7:37:37
flip214
PHP is famous for all the inconsistencies re argument order - so why should be just say "I _LIKE_ that inconsistencies!" when it comes to CL?
7:38:21
schweers
I didn’t say I /like/ them, just that a few inconsistencies in the standard library are not bad enough for me to say that CL as a whole is ugly.
7:38:34
shrdlu68
schweers: I don't see any unpleasantness at all either, in fact I find the uniformity, symmetry, and simplicity very endearing, but I guess it may not seem so at first.
7:38:55
flip214
well, I didn't say that CL is ugly - just that there are not-so-fine parts in that town ;)
7:40:15
schweers
hmmm ... package local nicknames ... that is indeed something I miss in lisp. At least, if they mean the same thing as I do.
7:41:17
jack_rabbit
Are there any libraries you guys know about with implementations of interesting data structures?
7:42:51
loli
https://github.com/mariari/Misc-Lisp-Scripts/blob/master/data-structures/finger-trees.lisp
7:44:37
schweers
okay, I think there may be another thing some people find ugly: that not all sequence functions work on all sequence types. For instance the map family of functions, nth vs elt vs aref, etc.
7:44:51
jack_rabbit
shka, is this something you'd be interested in? https://github.com/knusbaum/cl-sort-seq
7:46:52
shka
so you can write stuff like this if you want: https://github.com/sirherrbatka/cl-data-structures/blob/1a5b837593d9f35cf677b45e7ae08822c9092736/src/dicts/hamt/range-test.lisp#L56
7:48:40
loli
it would be nice to get more generic functions, outside of creating defgenerics, and then implementing them on ones struct
7:50:07
shka
but honestly, i figured that what i really need is just protocol for performing modifications of data structures and separate protocol to perform iteration
7:57:21
loli
I see your library has a HAMT, is there a vector/array specialization of it in your library.
7:57:37
loli
An array/vector is one of the few structures I haven't found a functional counterpart in CL yet
8:02:40
shka
https://github.com/sirherrbatka/cl-data-structures/blob/master/src/sequences/rrb/tests.lisp
8:07:10
loli
okay, sweet, It'll probably be a few months until I reach out for some common lisp. it seems I might be using clojure for the next little while
8:13:14
schweers
beach: I prefer using lisp, obviously, but sometimes you have to use a C library and pass in a function
8:13:52
schweers
Also, that’s the reason I asked: I’d rather write my code in lisp and pass it to C, than to write in C directly
8:14:42
shka
schweers: https://common-lisp.net/project/cffi/manual/html_node/Tutorial_002dCallbacks.html
8:15:16
beach
schweers: yes, but look, this is freenode. We are into free software. When you "duplicate" some existing C code in Common Lisp, you make it safer, and more available to other Lispers.
8:16:40
ZombieChicken
I doubt it will always be 'safer'. Well-tested encryption algorithms in C would be preferable to a relatively untested version in CL
8:16:55
schweers
beach: I’m not sure how things will turn out exactly, but I might need a library callable from lisp and other languages, possibly gauche scheme (written in C, can call C functions)
8:17:48
beach
ZombieChicken: So you are saying, we should just throw in the towel for every case, and abandon the goal of writing Common Lisp code?
8:19:43
shka
schweers: writing bindings sucks for everything that was not designed explicitly to support bindings
8:20:23
beach
ZombieChicken: I am genuinely concerned about the way software is produced today. I think many people, including most of the industry, is doing the wrong thing, wasting a lot of effort using the wrong language, and producing unreliable code.
8:20:49
ecraven
beach: many would agree with you, but start arguing on what actually *is* the right language
8:21:07
edgar-rft
We could write a new earth in Commom Lisp, we'd only be willing to invest 4.5 billion years of work.
8:21:49
loke
Thankfully, RabbitMQ exists, and it's very good, and arguably written in a safe, acceptable language
8:22:03
beach
ecraven: I am totally convinced that Common Lisp, while perhaps not THE RIGHT language (especially not for EVERY situation), is a huge step in the right direction compared to most commonly used languages. And that includes using C or C++ for applications.
8:22:18
shrdlu68
beach: For an industry/profession/trade that automates things, we're doing a poor job of automating ourselves away. That, for me, is the first sign that something is wrong with the way software is produced today.
8:22:54
ecraven
not disputing this, just saying that *that* is where people'so opinions probably differ ;)
8:22:56
schweers
beach: I share your sentiment, and in general agree with what you told me earlier, that I should rather be writing in lisp than in C. That being said, I may be forced to have parts of the code in a way that accepts a C function. I hope I can avoid this, but I wanted to know the state of things beforehand.
8:23:31
loke
beach: I've used it a bit (mostly using Elixir), and it does have many of the same benefits as Lisp.
8:23:34
ZombieChicken
beach: Perhaps, but there are practical concerns in the mean time. I'd rather see someone call known good C in some cases (mainly encryption) than reimplement the code in CL and potentially break something important. Of course, this doesn't apply to people who do know how to write such code and verify that it is indeed right.
8:24:15
beach
schweers: I understand. Though I am always skeptical when it comes to phrases such as "have to", or "forced to". It is a choice after all. In fact it's a choice to even write software in the first place.
8:25:10
shrdlu68
It's a myth - an illusion - that there are some wizards out there who know how to implement crypto correctly.
8:25:45
loke
shka: I'm curious as to what your use case is? For me, as soon as I wanted to do anything beyond the absolute simplest use-case where I was sending simple messages from one place to another, it simply wasn't able to provide the necessary functionality.
8:26:18
beach
ZombieChicken: Sure. I am merely pointing out that we are in #lisp and that I feel that I should encourage people to put in a little extra effort so that we can increase the collectively available amount of Common Lisp code, rather than to solve their own problem that is much harder to share.
8:27:30
loke
beach: You have no idea how many poeople in the Maxima community have adviced me to “just use qxmaxima” or “put your effort in jyupiter for Maxima instead”. Luckily, I'm stubborn and refuse. :-)
8:28:17
beach
ZombieChicken: I am also saddened by the proportion of the traffic in this channel that is dedicated to questions, answers, and discussions about how to use other languages that Common Lisp.
8:28:39
shka
loke: i built distributed system with it, i used zeromq for messeging between machines, monitoring processes and so one
8:28:41
loke
beach: At some point I resign myself to the fact that all needed software won't ever be rewritten in Lisp. Hence by choice to use CFFI to call out to Freetype and Harfbuzz. (I know JD doesn't like that)
8:29:05
loke
shka: My biggest issue with zeromq was that it has no subscription or selection features.
8:30:03
loke
beach: I think that's as close as we're going to get to the proverbial “I hust/have to use C code”.
8:30:20
beach
loke: Maybe propose another project here: http://metamodular.com/Common-Lisp/suggested-projects.html
8:32:04
loke
beach: I think reimplementing harfbuzz is going to be a very complicated project, and also a very tankless one.
8:33:00
ecraven
loke: I'd love to implement harfbuzz, but I don't think a single person can usefully do that :-/
8:34:12
ecraven
also, it has to be rather performant too, there's a lot of hot paths in the font engine
8:34:30
ZombieChicken
Perhaps a silly question, but if it's more complicated than it needs to be, why reimplement it in any language?
8:34:46
shka
loke: i can't find example in acceptable language, but just use pub-sub and setsockopt to subscribe
8:35:19
ecraven
ZombieChicken: I don't think it is more complicated than it needs to be, writing systems are just amazingly complex
8:36:30
loke
shka: I don't think that's enough... My requirements (what I use in Rabbit, and what made me switch) is that I need to be able to include metadata to messages which are broadcast to various channels. The listeners use selectors to pick messages based this metadata (Rabbit calls them “routing keys”)
8:36:58
loke
Another thing I need is the ability to have expiring messgaes, that disappear if they are not picked up in a certain amopunt of time.
8:37:22
ecraven
beach: I understand that, but writing systems are kind of a hobby of mine, and I really do think that people vastly underestimate the complexity to deal with *any* writing system (not just a few specific ones)
8:37:59
loke
shka: Another feature I use is queue timeouts, where a receiver queue (bound to a broadcast source) times out if a client hasn't touched it in some amouint of time.
8:38:39
loke
shka: There is also the concept of a “dead letter” queue where unprocessed messages are routed.
8:39:32
shka
loke: so ok: zmq has subscriptions, but as for the rest of the stuff: it is socket library