freenode/#lisp - IRC Chatlog
Search
6:06:10
verisimilitude
The code in DEFCS could be improved, yes, although I'd thought my documentation made up for it. I'll try to get it cleaned by the end of the year so I don't add more years to the copyright notice.
6:07:40
verisimilitude
I'd thought that by showing the macro usage and the code it generates, that was enough to sate most and would be a good aid to anyone wanting to fully understand it. I document the main cases of code generated.
7:51:28
phoe
verisimilitude: sure, your code is standard, but &AUX isn't used in most contemporary code, as agreed by means of an informal consensus of a bunch of lispers that has been perpetuated for some time now. Therefore a newbie who encounters that code might be confused about the features that are rarely used elsewhere. Sure, it's a good training in "this is standard Common Lisp", but it's a poor training in "that's
7:51:34
phoe
what the majority of contemporary Lisp code looks like and therefore what you can expect to see".
7:53:05
phoe
Which is why, to me, &AUX lands in the same place as symbol property lists, rplaca/rplacd, and a bunch of other things I can't recall off the top of my head at the moment - stuff that I won't use in code I write now.
7:53:13
dim
I've mostly seen &aux used for boa constructors in defstruct when handling with inter-dependent slot values being computed at instanciation time
8:13:12
verisimilitude
I've been thinking about what it means for there to be an idiom in Lisp, due to this conversation. I think there really aren't many idioms that are commonly agreed upon. The predicate naming came as one that few disagree with and I recalled a reason why that's the case: It's supported by the language itself through DEFSTRUCT.
8:13:36
verisimilitude
It's not a requirement to name predicates in this way, making doing so a convention, but it is nonetheless reinforced by the language.
8:14:21
jdz
There are also quite a few predicates defined in the language following that convention.
8:14:23
verisimilitude
There really aren't many idioms that qualify for this. Though I do recall one fellow getting rather angry at me when I told him Common Lisp was a language that supported English first, as it has facilities for generating English in FORMAT; that's a thought.
8:15:46
verisimilitude
Yes; I was just listing the sole exception that came to mind immediately, for effect.
8:15:59
verisimilitude
Another idiom would be the WITH- macros. I'd think Lisp has fewer idioms not only due to the freedom permitted, but also because macros eliminate repetitive code.
8:17:15
verisimilitude
But, really, I find it absurd to have people here tell me my code is unidiomatic because it uses things they don't like or weren't even aware of.
8:17:39
verisimilitude
It rubs me the wrong way and I'm glad I made my own understanding of Lisp rather than just asking others for their thoughts.
8:18:24
verisimilitude
As an example, this is #lisp, but there's no official Common Lisp IRC channel.
8:18:40
verisimilitude
Similarly, I just don't get the impression there's much of a set of established idioms.
8:18:55
phoe
There won't be an official Common Lisp channel because there's no one to make it official.
8:19:08
jdz
Some people ignore the commenting conventions (different number of semicolons); I find reading the code painful.
8:19:15
verisimilitude
What I mean is it's not like, say, Rust, where there's an official subreddit, mailing list, and other garbage.
8:19:31
phoe
So social constructs is as close as Lisp can get when it comes to idioms, conventions, and so on.
8:19:45
verisimilitude
Sure, beach, but I used Common Lisp for years, in my own Lisp community, without being aware this one even existed.
8:23:24
beach
verisimilitude: I think you are missing something essential. What is idiomatic and what is not, is rarely decided by some central power. And that goes for natural languages as well as programming languages.
8:23:29
beach
Just as a novelist must follow conventions of typography, of character building, etc, in order to be understood by readers, a programmer must use the conventions established over many years by experienced users in order for the code to be understood and appreciated by others.
8:23:30
beach
There is no central place where there is a list of idioms, not in natural languages and not in programming languages. Instead, you learn these idioms by years of studying what other authors do (something you refuse to do, apparently).
8:25:36
verisimilitude
Unlike Common Lisp, Ada is a language that actually enforces some conventions, at which point they stop being conventions.
8:26:22
verisimilitude
It would be easier to discuss what isn't idiomatic Common Lisp, beach, and the main example that comes to mind is modifying the reader table greatly, since that's very uncommon.
8:27:40
verisimilitude
As for conventions of programming in general, I'm not going to respect the conventions of a field that is less than a century old and still does many things wrong. So, I feel perfectly within my common sense and whatnot to do whatever I want when it comes to programming.
8:28:08
verisimilitude
There is very little in programming, compared to the whole, that is actually worth doing, because there's so many idiots writing software who don't know what they're doing.
8:28:46
verisimilitude
Of the Common Lisp that I do look at, I find that a great deal of it doesn't follow the standard perfectly, by assuming whatever SBCL does is the standard, assuming ASCII or even UTF-8 is the character set, or something else I find stupid.
8:29:24
flip214
verisimilitude: that's the same in every programming language, as far as I can tell.
8:30:06
flip214
verisimilitude: even if the field is not that old, there are still people that have been working in it for 40 or more years - and so they have a bit of experience.
8:30:30
verisimilitude
So, I'd much rather write a program that perfectly adheres to the standard where possible, even if it can get messy, and that seems relatively uncommon, where programmers are content to have it work on three or four implementations and don't care about the rest.
8:30:50
flip214
but when building a house there are still people who don't know what they're doing, and we've been doing _that_ for a few thousand years now ;)
8:30:56
dim
wow, this rant reminds me of my favorite Dilbert of all times: The direction acknowledge that we have a problem of communication in this company, but doesn't want to speak about it.
8:31:05
verisimilitude
It unsettles me when I look at a Common Lisp program and the main comment is ``This works on SBCL. Don't know about the others though.'' for something that has no place being unportable.
8:31:36
flip214
verisimilitude: unless CFFI, SB-* packages, etc. is involved, chances are very good that it's portable.
8:32:12
verisimilitude
The point is that it seems an unfortunate amount of Common Lisp code is only ever tested on SBCL and I'm perfectly happy not following the crowd when it comes to that.
8:33:10
jdz
verisimilitude: I've missed the beginning of this discussion. Can you point me to your code that started this?
8:33:36
flip214
verisimilitude: on the other hand, CL _has_ a standard - and a few implementations claiming to be compatible. so what's the point of testing standard-conforming code on every implementation?
8:34:01
verisimilitude
Well, I meant that people both don't know the standard and also don't test their code on multiple implementations.
8:34:40
verisimilitude
Now, a primary difference between programming and building houses is people actually care when the average house doesn't work, because that usually means someone died; programming has no same level of rigor for the average case.
8:35:27
flip214
verisimilitude: uh, yeah, but a small badness multiplied by a few million times is a big badness again (think smartphone app crashing)
8:37:16
verisimilitude
I have an iteration of a program in Common Lisp, but there's no standard way to recover from a STORAGE-CONDITION, which is one reason it's not quite reliable enough for my tastes.
8:40:13
verisimilitude
That really just means if you want to be able to handle memory exhaustion, your options are using implementation-specific mechanisms or not using Common Lisp.
8:40:46
jdz
verisimilitude: Your code looks very hard to read to me. All-caps, really? If you're going for the old-school terminal feel, why are your lines longer than 80 columns?
8:40:48
verisimilitude
For a C program, the popular handling method is to continue with garbage or die immediately.
8:41:07
flip214
yeah, but you can't do better than to close the file you're writing to, delete it (as it's half-written anyway), log an error, and hope for admin help.
8:41:43
verisimilitude
I have a program design that can handle it, actually, because it only uses unbounded memory consumption for a few things.
8:41:53
jdz
And I'd agree with anybody complaining about using sharpsign equal-sign reader macro in the code.
8:42:48
flip214
well, of course you can use (RUN-PROGRAM "resize2fs" ...) etc., but that might not be a good idea generally. So the options for handling "external" errors are limited anyway.
8:43:47
verisimilitude
What happened was I'd obsessed over a design, mulling over its memory behavior, and decided I should make it resistant to memory exhaustion since it could be made resistant.
8:45:06
flip214
but you won't stop other processes from allocating memory and running the whole _machine_ OOM. so non-consing is all good and nice, but you still have to plan for external interference - not all of which can be handled.
8:46:00
verisimilitude
I understand what you're telling me, flip214, but I don't want to bloviate about my particular program, the design of which can and will account for these things in the Ada reimplementation.
8:46:27
jackdaniel
phoe: aux is a very fine mechanism to avoid whole-body let, I don't buy your argument that some vague lispers consensus deemed it bad
8:51:46
flip214
jackdaniel: but the &aux should be indented quite a bit, which limits its available width for expressions
8:54:56
jackdaniel
you mean a situation where you have a long function name and start arguments in the same line, so when you start newline for &aux variables it is not at the same level as body?
8:55:30
jackdaniel
I'm not saying aux is perfect or any kind of silver bullet, I'm just saying that it is not as obsolete as phoe pictured it
8:57:38
dim
people, if you are interested in a nice design of a C program that knows how to handle both Out Of Memory and File System Is Full conditions, may I direct your study to PostgreSQL? it is very good at handling that (service does not stop, works again as soon as disk space is made or memory is back available)
9:06:00
flip214
jackdaniel: right. my aesthetic question is about the indentation: https://pastebin.com/mj5FkDSp
9:06:39
Cymew
I remember someone said that to study good C for style, tex.c was a good start. Maybe PostgresSQL is also a good study object?
9:10:06
Cymew
I got the crazy idea last week that I might want to try my hand at writing C again. I wonder how fast the wonder fades?
9:10:23
dim
it's one of those few software projects that has been incrementally improved year after year for more than 20 years now, with constant refactoring and new features, so it shows several techniques allowing for long term project maintenance
9:11:33
jackdaniel
writing in C is fine until you start feeling this burning desire to use a closure ;-)
9:12:23
verisimilitude
I had a conversation with a C programmer about how some interfaces are baroque and unamicable to writing software that works correctly in all instances.
9:12:42
verisimilitude
His response was, paraphrasing, ``Who wants to write software that works correctly in every instance?''.
9:13:14
Cymew
dim: That sounds interesting. I might have a friend of mine who write C++ for a living, and mostly does maintenance, what he thinks of the code base.
9:44:37
ogamita
jcowan: But precisely; using portability libraries should be done sparingly. Or at least, orienting the dependencies so that the core of your code doesn't depend on it.
9:47:00
ogamita
sjl: there's com.informatimago.common-lisp.cesarum.array:positions and positions-of-subsequence
9:50:26
Cymew
verisimilitude: "Who wants to write software that works correctly in every instance?" to me sounds like a very sloppy programmer.
9:53:33
flip214
Cymew: well, if "correctly" means eg. "on out-of space, write an error to the console and the syslog, wait for a human to help out, and tell me to recover" vs. "bug out with an error", I'd typically choose the latter ;)
9:56:27
jcowan
Yet if you are writing a network server, just for instance, then nonstandard code is at the very heart of your application. As I said before, this is not about non-portability, as a program can be quite portable without being standard.
10:00:41
ogamita
alandipert: you can use a with-functions macro. https://github.com/informatimago/lisp/blob/10db6f161a49004c814fe8c6ccfb8f196a0d5d79/common-lisp/cesarum/utility.lisp#L176 (let ((f (lambda (x) (list x x)))) (with-functions (f) (f 2))) #| --> (2 2) |#
10:15:56
flip214
phoe: I believe it doesn't. for display purposes I quite happily use the 'jq' utility for that.
10:17:49
aeth
verisimilitude: I assume 64-bit and ASCII or ASCII-compatible Unicode, as well as assuming that optimizing for SBCL doesn't de-optimize for other implementations. This isn't because I'm a bad programmer, it's because you have to make assumptions somewhere and you can't support every possible CL implementation, only the ones you can test on.
10:18:16
ogamita
What's bother me more about cl-ecma-48 (and the same would apply to my own com.informatimago.common-lisp.cesarum.ecma048 and other libraries, when presented as read material to newbies, is the lack of specifications. psq could read and compare both libraries, but it would be rather useless, given that neither give very explicitely and clearly the specifications that led to their structure and implementation choices.
10:18:18
aeth
The thing is, making those assumptions can make things much easier and much more performant, and it's easy to go back and fix it if it causes issues on any actual implementation, rather than a hypothetical standards-conforming one
10:19:45
aeth
verisimilitude: Good Lisp uses libraries like these: https://github.com/Shinmera/float-features/blob/master/float-features.lisp
10:19:50
ogamita
Therefore my advice, would be to read PAIP, since it gives complete examples of code, but explaining where it comes from.
10:20:25
aeth
verisimilitude: The behavior of float-features is completely outside of the CL standard, but it becomes in a sense its own de facto standard by trying to portably run in every possible implementation. And then you just have to worry about a library, not sb-foo, ccl-foo, etc.
10:21:29
ogamita
verisimilitude: your first use of #=/## in cl-ecma-48.lisp is very inefficient, since you will insert in the code a mapcar 3 times, that will have to be evaluated 3 times in each situation listed in the eval-when. Instead you could have just defined a lexical variable!
10:21:29
aeth
Though, yes, lots of libraries use something lazy like #| fast route |# #+sbcl sb-int:with-float-traps-masked #| slow route |# #-sbcl progn
10:22:58
no-defun-allowed
You could also just call the function you define in that let too, and maybe remove the let and make the let values defvars as they seem fairly important.
10:23:31
aeth
verisimilitude: Oh and as long as you never use upper case anywhere, you could just do *print-case* to :downcase when generating your documentation code, if that's what's making it upper case.
10:23:33
ogamita
&AUX should only be used in macros, to add a lexical variable for a body, without having to parse its docstring and declarations to insert the LET.
10:26:20
aeth
In fact, I think I've seen them in defstruct before, and only there, and that's why I was surprised that they weren't just a defstruct thing
10:26:34
shka__
ACTION is frequently using &aux for stuff like (lambda (value &aux (value (funcall key value)))
10:31:41
ogamita
Some conventions are enforced by tools, eg. emacs will indent comments differently according to the number of semicolons. Those convention are better respected.
10:34:09
ogamita
There are dictionaries of idioms for natural languages, eg. https://www.amazon.fr/Essential-Idioms-English-Collocations-published/dp/B00F3ZYLS4/ref=sr_1_11?ie=UTF8&qid=1545042785&sr=8-11&keywords=us+english+idioms
10:34:44
ogamita
But I feel that for formal languages such as programming languages, idioms are very much less essential, because any valid form as a specified semantics.
10:35:29
aeth
"idiomatic" in programming is more about "if I post this to #lisp or /r/lisp or usenet or http://planet.lisp.org/ or wherever can other people read it?"
10:35:42
ogamita
Most of the grammatical natural language sentences are meaningless. Only idioms and conotations may give them some kind of meaning. And when you dig a little, often it's not even much of a meaning anyways.
10:37:47
ogamita
Technical aspects such as readability of #1# vs characters, or efficiency, or risk of errors (#=/## let you build circular sexps, and it's not conforming to give circular code to a CL compiler or interpreter!), are more important (and the only valid basis for "idiomaticity" in programming languages, IMO.
10:39:21
aeth
Imo, all of the cleverness in Common Lisp should be reserved for certain special macros.
10:39:43
aeth
Most of the time where you use #. you can do something similar with a macro at macro time.
10:40:33
aeth
I'm not sure there's much use for any reader cleverness at all, except perhaps for literally embedding another language within CL (and whether or not that's a good idea, that can be debated)
10:42:16
aeth
e.g. Some people use reader macros for literal hash table syntax. I tried a library that used #H for that and it wasn't very good. It's imo better just to have a (hash-table* :foo 42 :bar 43 ...) macro
10:42:45
ogamita
jdz: defconstant is of very limited use in CL. It's just to let the compiler perform a small optimization of inserting fixnum or character literals as immediate data in the binary code.
10:42:46
aeth
(I think you'd only need literal hash table syntax if you wanted to print a hash table readably.)
10:43:46
aeth
ogamita: but most constants are numbers (not just fixnum/single-float) or characters or keywords or symbols, and they tend to work correctly as constants
10:46:47
ogamita
aeth: Actually, for bignums and symbols, some processors allow full addresses as "immediate" values in the instruction codes, but notice that some other processors (usually risc, such as powerpc), need 2 instructions to load an address!
10:47:31
ogamita
In any case, defconstant is specified only for this purpose. For example, it doesn't play well with CASE.
10:48:27
aeth
ogamita: defining your own CASE is so common there should be a DEFINE-CASE-MACRO just like how there's a DEFINE-MODIFY-MACRO
10:49:34
ogamita
verisimilitude: your friend is wise: he's learned not to want what he can't attain (with C).
10:50:50
ogamita
and people, remember there's downcase-lisp and upcase-lisp in https://github.com/informatimago/emacs/blob/9e4fa739e2b6b49cafdb3e14a4b5b01f70c70c0f/pjb-sources.el#L410
12:30:42
dim
I have a backtrace that begins with COPY-LIST, which my code doesn't call, I'm not sure how to see what leads to COPY-LIST?
12:31:39
dim
I mean the backtrace has 0: (COPY-LIST <struct instance>) 1: (PGLOADER.CITUS:CITUS-DISTRIBUTE-SCHEMA ...), and citus-distribute-schema doesn't call copy-list
12:58:10
dim
I've spent some time on a bug that was also triggering a bug in my own print-object methods, which isn't that easy to figure out really
13:13:57
flip214
neirac: like the uppercase first character of german nouns I think it's helpful to get a quick overview.
13:15:05
neirac
beach I agree with that, I prefer highlight-sexp package in emacs instead of full syntax highlighting.
13:15:34
beach
neirac: What would be really useful would be to highlight symbols according to their roles.
13:15:46
specbot
Notes about Style for Semicolon: http://www.lispworks.com/reference/HyperSpec/Body/02_ddb.htm
13:16:24
beach
heisig: So, someone who claims to know the language well has no excuse not to follow it. :)
13:30:48
_death
I think it's OK for newbies to read an eccentric program, if that's not the only program they read..
13:35:45
pfdietz
"Then cry as you realize how beautiful their code is, compared to yours, which is so flawed, you imposter."
13:36:03
beach
Of course, it is not unheard of that inexperienced programmers dismiss the LUV slides because the advice given by these highly experienced programmers is contrary to the personal taste of those inexperienced programmers.
13:37:49
jackdaniel
if someone is strongly opposed to some "rule" then I think they shouldn't apply it. this is just an opinion (even if shared by a lot of people)
13:38:18
jackdaniel
i.e experienced programmers may say, that dynamic typing is slow and unsafe, not necessary something we could agree with
13:38:38
jackdaniel
or even following norvig we could decide to switch to python (since he is more experienced programmer and his language choice *must be good*, right?)
13:38:42
dim
those slides are top-notch advices, but I have not implemented enough discipline to follow them
13:39:16
dim
jackdaniel: he said that Python is a good enough Lisp IIRC... well we might disagree on that?
13:39:32
beach
Sure, there is this other problem that programmers who have programmed a long time are not necessarily experienced. As the saying goes, in software development, many people don't have ten years of experience. They have one year of experience ten times.
13:39:50
jackdaniel
dim: exactly my point, I strongly disagree with that opinion of a hacker known for his experience :)
13:40:27
dim
my reading was more that he had to capitulate at Google and they paid enough for him to switch to Python
13:40:52
pfdietz
Are those like 10x programmers? (which are programmers who create enough technical debt to keep 10 others busy)
13:44:26
dim
shka__: https://github.com/dimitri/sudoku and https://tapoueh.org/blog/2012/07/solving-every-sudoku-puzzle/ cover bits of it IIRC
13:57:35
phoe
I want to print a long list, but the printer inserts # in some places. What does it mean?
14:02:05
dlowe
if you want it printed nicely, you can define a print-object method specialized on your object type
16:54:05
verisimilitude
I can agree if you need nonstandard behavior you should use a library that provides a de-facto standard interface to it.
16:54:46
verisimilitude
If you adhere to the standard perfectly, you don't need to test your code and any implementation it fails on would be defective and so irrelevant.
16:56:01
verisimilitude
I thought my documentation did provide some of the history and design decisions and whatnot, so I'd be interested in more detail as to why someone would think it doesn't.
17:00:07
jmercouris
so I'm trying to print a struct to do what we'd been discussing a few days, serializing the key-chords
17:00:36
jmercouris
rather than like this: "#S(KEY-CHORD :KEY-CODE NIL :KEY-STRING l :MODIFIERS (C))"
17:04:31
beach
But then you have to make sure that NEXT package is current when you load the definition.
17:05:33
jackdaniel
if you read file with your serialized definition and package is not 'next, then it will try to read for instance cl-user::key-chord
17:05:39
beach
Presumably, you are printing this definition because you want to read it again at some point.
17:05:53
jmercouris
beach: I am not going to read it, I am serializing it to make the key to a hash table
17:06:55
jackdaniel
wait, you "serialize" a structure name to string to access the key chord in a hash table?
17:07:40
jmercouris
so what I had was a list of key-chord structs, and I was using that list as a key to a hash table
17:08:09
jackdaniel
I don't (and if you think it was me who advised you to do that I'm sure you misunderstood)
17:08:26
jmercouris
jackdaniel: it was not you, it was Xach, and he didn't advise me on that exactly
17:08:26
verisimilitude
You'd get good results serializing a hash table as a plist or alist, instead.
17:08:43
jackdaniel
structure (not string which looks like its readable representation), may be compared with EQ
17:10:12
jackdaniel
what you do sounds terribly wrong, but maybe I'm missing a context. anyway I was leaving to grocery store
17:10:53
jackdaniel
verisimilitude: it is not using structure as a hash table key, but rather (format nil "~a" structure) as a key
17:10:57
Bike
using a structure as a hash table key is fine, but in this case jmercouris is using string representations of structures instead, i think because equalp would make "e" and "E" equal when they should be distinct.
17:11:28
Bike
using a string representation is very weird, but i don't have any better ideas off the top of my head.
17:11:52
jmercouris
there was another idea of being able to use eq by binding things in keyword package
17:14:09
verisimilitude
At this point, I'd like to see precisely what you're doing for myself, if it's publicly available, jmercouris.
17:15:25
jmercouris
it just internally uses format because I didn't feel like writing an actual function
17:15:56
jmercouris
verisimilitude: https://github.com/atlas-engineer/next/blob/master/source/keymap.lisp
17:23:18
jmercouris
verisimilitude: this might be easier to read: https://github.com/atlas-engineer/next/commit/5b154b5d0bf84be587fa1a93be7c2191f4aeebb6
17:23:28
_death
jmercouris: instead write an actual function that is more careful about defining the serialization
17:24:09
_death
jmercouris: then you don't have to rely on aesthetic printing, consistent slot order, particular package being the current one, etc.
17:25:43
_death
if modifiers is a set, the order of the elements within it may also not be consistent
17:26:54
jmercouris
in the meantime, I would appreciate suggestions on how to write a better serialization function, so far I am just thinking about doing string concatentation of all of the elements into one long string
17:32:01
jmercouris
I'm sorry, I will admit, I am prejudiced, but I don't want to use a google product of any kind
17:32:02
_death
"serialization" isn't the best term here.. it's more about creating a hash-table friendly key
17:34:39
jmercouris
so anyways, anything wrong with going through the slots and just making a big string?
17:37:16
_death
jmercouris: your code indicates that KEY-CODE may also be NIL.. I meant a more detailed description.. e.g., you said that modifiers is always sorted.. I suppose (append (list key-code key-string) modifiers) would work, but there's likely a better representation
17:37:59
jmercouris
key-code is currently unused, its a reserved modifier for people who wish to bind things based on hardware key codes rather than actual characters emitted by the keyboard
17:38:47
jackdaniel
I'm asking for practical purposes (i.e what user will be able/ will want to define)
17:38:52
jmercouris
anyways, we haven't set a hard limit on it, a platform port could potentially generate an infinite amount of types of modifiers
17:38:53
jackdaniel
let's assume 16 distinct keys and all their combinations (and we are being generous here imho)
17:39:45
jackdaniel
then you may have eql key as modifiers having 16 first bits and key-code shifted by that
17:42:07
nitrix
Hi. I'm new to lisp; is the separate namespaces for functions and variables an accident or something that's desirable?
17:42:20
jackdaniel
using strings produced from structures as hashtable keys is unimaginably wrong in my eyes, so basically anything else is a progress
17:43:32
jasom
nitrix: I have a preference for it, but I don't think it's a huge deal either way. In many non-programming languages, words can be verbs or nouns depending on context.
17:44:21
jasom
nitrix: There is an aesthetic argument to being able to name a variable for which nothing is special other than it being a list "list"
17:44:31
nitrix
That's comforting. Just to add onto that, (#double 10) would interpret my 2 from earlier as a function and likely crash, correct??
17:45:45
nitrix
jackdaniel: I've seen REPLs in videos receive some kind of interrupt, nice to know that the runtime's just as cool :)
17:46:02
jmercouris
_death: thank you for the advice: https://github.com/atlas-engineer/next/commit/fc136e0d647a71b91cd59c1021228fb7d63970dc
17:46:12
jackdaniel
I think that a person who suffers most from crashes in CL implementations is pfdietz (but he asks for it himself!:)
17:46:16
jasom
nitrix: in a lisp-1 (let ((double 2)) (double 10)) will signal some sort of error, in a lisp-2 it will call the function named double.
17:47:11
jasom
nitrix: not really levels, lisp-1 vs lisp-2 is just a shorthand for asking if variables and functions have a different namespace
17:47:23
jackdaniel
Xach: didn't you want to highlight jmercouris? it is unfortunate our nicks are of the same length and start with the same letter
17:50:15
jasom
jackdaniel: so if we assume n is 1, then we are fine calling them lisp-1 and lisp-2 :)
17:51:10
jasom
jackdaniel: or arguably the X in lisp-X is answering "How many namespaces do variable bindings and function bindings exist in" in which case 1 and 2 are the correct numbers period.
17:51:18
jmercouris
just out of curiosity, has anyone in this channel tried Next since the latest release? any bugs?
17:51:21
nitrix
Last question for the moment; I get the idea that Lisp programs are themselves modifiable data structures and you're able to create/modify functions during runtime. That seems like an area where JIT compilers would excel at, specifically tracing JITs. Are there implementations that currently do this?
17:51:41
jmercouris
nitrix: I think beach is working on something with regard to optimizing this specifically
17:52:09
jasom
nitrix: that is when you (re)define a function it immediately (re)defines it on the spot, rather than JITing it when it is called.
17:53:26
nitrix
That's a bit overwhelming. The community doesn't have an implementation of choice it seems.
17:53:52
jasom
nitrix: for free implementations, SBCL is more or less on top. (apologies to jackdaniel who maintains a quality implementation that isn't sbcl).
17:54:03
jackdaniel
nitrix: do you make a fuss about that C community can't chose between clang and gcc?
17:54:03
nitrix
Means I have to do some research to know what tradoffs I'm making; or better yet, build my own :P
17:54:20
jmercouris
build your own? you don't know anything about the language yet, why would you build an implementation?
17:57:22
jasom
nitrix: also it is more proper to say that in lisp you can *only* define functions at runtime. There are some non-conforming implementations of most of the standard that compile in the way you think of C programs compiling (CLICC being a well known one), but as the spec is written, functions are defined at runtime.
17:57:33
nitrix
jmercouris: I'm comfortable writing toy compilers, but you're right that I'll be learning the language first, of course.
17:58:27
jmercouris
I don't know if you understand the magnitude of what it takes to write an ansi compliant common lisp implementation
17:58:40
jasom
writing a non-toy lisp implementation is non-trivial; I can write a faux-scheme in a day.
17:59:23
jasom
but even a basic common lisp interpreter is a massive amount of work just because of the size of the standard.
17:59:57
jmercouris
arrogance is the application of ignorance, but you are right, apologies for judging you so harshly, and so quickly
18:02:05
pfdietz
If one wants to contribute to Lisp, curating and perhaps writing libraries is probably the most useful thing one could do. Adding useful capabilities to existing Lisp implementations could also be useful, but is harder to get started on. A new toy lisp implementation? No.