freenode/#lisp - IRC Chatlog
Search
7:51:09
akater
Something I did not realize: change-class will make shared slot unbound if class C_to has no initform for it.
7:51:14
akater
Hence, when superclass has initform and subclass has not, super->sub will retain the value (even though e.g. its type check could fail)
7:51:21
akater
while subclass->super will not (even though type check would never fail in this case).
7:55:23
akater
oops, I transposed it: was talking about the case where superclass has no initform but subclass is more specific
8:03:48
hectorhonn
what are some notable libraries written in common lisp? for example, c++ has opencv
8:11:19
akater
I never used optima. From what I remember, trivia is an almost superset of optima, +enhancements.
8:12:24
shka__
hectorhonn: i think that petalisp can be really cool posterboy of cl libs because of high coolness factor
8:13:14
akater
fare even made some effort for trivia to “officially” supersede optima, as far as this is makes sense in CL.
8:16:52
akater
Does anyone actually understand LIL, besides fare? Only half joking, I never found any write-ups, or libraries which use it.
8:17:10
hectorhonn
maybe i should rephrase.. what are some notable libraries written in common lisp that are de facto libraries in that niche? for example, c++ has opencv which is de facto in the computer vision field
8:19:03
beach
hectorhonn: I suggest you avoid promoting Common Lisp unless you know in detail what you are talking about and what the competition looks like. Otherwise, you will likely get trashed and the result will not be advantageous to Common Lisp.
8:19:15
akater
I don't think there's anything de facto standard in CL, in a way which would be convincing for people who need CL to be promoted to them.
8:20:19
akater
hectorhonn: Well, I'm not sure if this could be described as “de facto standard” but there's a chance there's no alternative.
8:35:18
akater
CL is curiously hard to sell (to “people on the street”, that is). People keep saying something about parenthesis or how lists are stupid (and arrays are not).
8:36:14
akater
It's a riddle, really. I better spend time writing something cool and just telling facts about the standard and the community.
8:39:53
beach
shka__: People stick to what the belief that will make it unnecessary for them to learn something new.
8:42:02
beach
shka__: My (admittedly small) family recently had an exchange with a former colleague who thought Lisp was not used these days. When she pointed out Grammarly, ITA, Roomba, etc., the colleague immediately answered that Haskell would be better. So this professional developer assumed Common Lisp is a functional programming language. Convenient for him.
9:00:59
beach
With respect to applications, I really should get started on Clovetree (a.k.a. Gsharp version 2).
9:01:06
beach
McCLIM is way more mature now and it has facilities that weren't available at the time, in particular for using Truetype fonts.
9:01:14
beach
Now, with display resolutions no longer being a problem, I could use an existing Truetype font which would greatly simplify the code.
9:01:15
beach
It can't be an improvement to Gsharp, because I made a design mistake that I mean to fix in Clovetree.
9:02:21
beach
Together with Climaxima, we would then have two significant applications that are fairly unique.
9:02:54
dim
GuitarPro (not lisp, not Open Source, made by a local French company) has pushed the bar way far for parts editing for the guitar...
9:04:26
dim
I still believe there's an low-handing opportunity for CL in publishing “infrastructure” software rather than interactive software, maybe something that would help taming some of the Cloud offerings, dunno
9:06:40
beach
shka__: Looks can always be fixed by others. I am uniquely well placed to implement the essential data structure for making the editing experience possible.
9:07:36
beach
shka__: Sure, but Gsharp doesn't use McCLIM font rendering at all, because of the environment at our disposal some 18 years ago.
9:09:49
schjetne
beach: that's another one I have to show the product owner here. He got curious by me harping on about Common Lisp all the time, and found Common Music, so I showed him Opus Modus as well.
9:15:44
beach
schjetne: If the product owner and others are ripe, I'll be happy to come give a talk about Common Lisp, or a full-day course or something. :)
9:17:29
schjetne
I've been doing a lot of work with DSLs lately, which might be an argument to look into Common Lisp
9:18:29
schjetne
I've been using Kotlin, which has a neat DSL-building syntax, but I'm constantly bumping my head against the lack of macros: https://proandroiddev.com/writing-dsls-in-kotlin-part-1-7f5d2193f277
9:19:30
beach
So the mistake that most engravers (or score editors) make is to impose a meter on each measure. It's a mistake because it is a pain to edit then. Plus, composers are known not to respect the meter in their written music. That's why Gsharp is much faster when it comes to entering music material.
9:21:36
no-defun-allowed
Oh, I've heard about the "macros" in Kotlin before. From what I've heard, they emulate stuff like WITH-OPEN-FILE with a function that takes a function that takes the managed value, and some prologue and epilogue is handled by the "macro" writer.
9:22:56
no-defun-allowed
This, depending on how many macros you've actually used, is either a hygenic macro system (macros ≈ 0), a horrendous kludge (macros > 0, sad person) or the way Smalltalk and Ruby handle it (macros > 0, maybe not as sad of a person)
9:39:53
schjetne
It's fine for trivial things, for non-trivial cases it becomes all kinds of trouble, when you can't programatically create identifiers.
10:20:56
p_l
I'm not knowledgeable about music enough to do anything with it, but it looks like a nice example of good, end-user oriented Common Lisp applicaiont
10:22:59
p_l
also, from ELS in Cracow or London, there was a talk about some nice OpenCL-based work that was greatly optimized thanks to facilities enabled by CL
10:54:20
jmercouris
So I have a file upload form on my website, and that returns me a object like this: #<FLEXI-STREAMS::VECTOR-INPUT-STREAM {1003014B23}>
10:54:44
jmercouris
one would logically think, based on the documentation of cl-csv https://github.com/AccelerationNet/cl-csv that you would be able to read this input stream
10:56:11
jmercouris
how can I get cl-csv to actually read it? I tried flexi-streams:octets-to-string, but that requires a string
10:56:38
jmercouris
so then I did alexandria:readm-stream-content-into-string first, but then it didn't work
11:00:57
_death
the vector-input-stream is a binary stream, and make-flexi-stream can make a bivalent stream reading from it
15:20:39
beach
Since things are quiet here, ... A few hours ago in the #clim channel, I was inquiring about the possibility of implementing a "desktop environment" in Common Lisp such that it could work both on a GNU/Linux machine running X11 and Gnome and on some ultimate Lisp operating system.
15:20:48
beach
As it turns out, I am pretty ignorant about how such an environment would work. But it seems to me that the basis of such a thing would be a window manager, perhaps coupled with a workspace switcher.
15:20:53
beach
I am aware of Stumpwm, but I am not aware of a recent non-tiling window manager. As it turns out, though, my students wrote such a thing some 15 years ago, called Eclipse, but it hasn't been worked on for the past 8 or so years.
15:20:55
beach
If someone with knowledge about desktop environments would be interested in reviving Eclipse (and perhaps giving it a better name), I would encourage it. :)
15:22:49
beach
I don't know. It might very well work. But I suspect it is not entirely conforming when it comes to all the X11 conventions that a window manager must follow.
15:23:34
beach
I also don't know whether it could just replace the default window manager that I am using on Ubuntu, or what it would take to make that possible.
15:35:56
Josh_2
Any reason why I might be picking up a null character when sending data over the network?
15:36:25
Josh_2
The start of my string which is sent over the network has a #\nul and #\! at the start even though that is not present on the sending side
15:38:25
dim
beach: I was at school with Iban Hatchondo in Bordeaux in 1st year of university eons ago, but then I moved to other places… fun to see his name again ;-)
15:43:46
Josh_2
That gives me the string "\0!{\"resolution\":{\"x\":720,\"y\":1280}}" on the CL side
15:47:17
tempate
this may seem like a very stupid question, but I don't know when I should be using a macro
15:47:43
jackdaniel
tempate: when you have a boilerplate which you want to abstract into a single call
15:52:30
beach
tempate: The advice from jackdaniel is correct, but more general. A function may very well work for some boilerplate code.
15:55:07
tempate
coming from C, I don't really think in those terms, so when coding I think in terms of functions taking arguments and spitting results
15:58:10
phoe
imagine if the C compiler could generate code that looks like loop { for x from 0 to 10; for y = 2 * x; do { printf("%s %s\n", x, y); }; finally return 42; }
15:58:42
phoe
that's more or less what Lisp macros allow you to do with the syntax, since this is exactly how Lisp's LOOP macro works
16:00:38
beach
tempate: Except that Common Lisp macros are sane because they work on code as a data structure instead of text.
16:01:59
beach
tempate: You can think of functions as control abstractions, classes as data abstractions, and macros as syntactic abstractions.
16:02:24
djeis[m]
It's like if you could write C macros in C and they took a datatype more useful for manipulation than just strings.
16:02:34
phoe
C macros are interpreted by the C preprocessor and therefore have very limited abilities; Lisp macros are interpreted by the same Lisp engine that powers the rest of the system and therefore can use all of Lisp functionality to generate Lisp code.
16:03:13
phoe
that allows you to use e.g. functions, classes, other macros, to generate Lisp code inside a macro.
16:21:18
tempate
as an example, I'm trying to solve a couple exercises from L99. My current solution is https://bpaste.net/show/46ce5dc6ed84 but I have the feeling this could be done in a way better way, as the second and third functions are pretty much the same, and the last one, is looping through the list three times, which doesn't seem to be very good
16:24:36
phoe
or use LOOP's COLLECT like beach suggests if you don't want to deal with collection manually
16:26:14
tempate
yeah, it seemed I good place to use COLLECT but I wasn't too sure on how to use it, let me look at it more deeply
16:27:07
tempate
beach: still, even if I use LOOP, wouldn't I be looping through the whole sequence three time if I run the third function?
16:34:07
beach
tempate: Sure, you can combine the three functions, but that's not a question of using macros or not.
16:34:29
tempate
phoe: not sure if the default syntax should be to put the do after the if, i.e. if do, or just have the do in front of the first thing to do
16:35:08
beach
tempate: But you need slime-indentation to get the indentation of conditional loop clauses right.
16:35:19
tempate
beach: couldn't I write a macro that loops through the whole sequence and then add the inside of what to do depending on which function is running it?
16:37:43
beach
tempate: Sure, you can even write a function that does that. There are several, like MAP, MAPCAR, etc.
16:40:07
tempate
beach: as I understand it, if I run the third function, three loops are going to take place
16:40:08
beach
"a macro that loops through the whole sequence and then add the inside of what to do depending on which function is running it" seems like a good description of (LOOP FOR .. IN ...).
16:40:44
beach
tempate: Yes, when you run the third function, the other two are going to run as well.
16:42:26
beach
tempate: I think it will be hard to write any kind of abstraction that takes your three LOOP bodies and combines them so as to avoid creating intermediate lists, if that is what you mean.
16:59:33
nirved
tempate: instead of first and second you could use the loop built-in destructuring - (loop :for (count element) :in ...)
17:03:15
tempate
nirved: if you are referring to the third function, I need to sometimes return the list containing both the first and the second element, so I'm not sure if it's worth it
17:06:45
nirved
tempate: i use keywords with loop for syntax highlighting, and less symbol pollution
17:58:44
jmercouris
Here's the error: https://gist.github.com/jmercouris/11cbd5c2b07986d1ac4e19709fd0cdf7
17:59:57
jmercouris
Ah, my stupidity, didn't realize the ql made the issue, problem solved, thanks rubber duck
18:23:22
dim
I think making a solid choice of a RDMBS and then using as many features it can provide is a good move (the smart one, I'd argue), so my advice is to pick Postgres and Postmodern
18:25:06
dim
in the wild changing from an RDBMS to another usually happens up to one time in a project's lifetime, and it's a major undertaking; unless you *have* to support several RDBMS backends at the same time, being _portable_ in between them is not going to prove interesting ever
18:25:53
dim
it's much harder and way more involved to be SQL-portable that to be compliant with several CL implementations, say, despite both CL and SQL having a standard specification
18:26:55
dlowe
The SLQ spec is more akin to the Scheme spec, where there's bare bones that everyone piles their own stuff onto
18:28:41
emaczen
How do we enable/find the SBCL source code so that emacs can M-. to source locations?
18:30:56
dim
dlowe: the SQL spec is not seriously followed by any other implementation than PostgreSQL, and the SQL spec makes no provision for data types generics the way Postgres does, which sometimes paints us in a corner and forces us not to follow it closely
18:31:57
dim
the SQL spec is a strange political game that happens between 3 proprietary vendors, what they try to achieve is having checkboxes that the other vendors haven't crossed yet so that their sales people have an edge in discussions with buyers
18:36:04
aeth
Even when you're using a mostly portable library you might be interested in non-portable features, e.g. JSON
18:37:41
makomo
emaczen: you have to use a certain SBCL-specific function to tell the SBCL internals where to find its source code
18:38:59
makomo
emaczen: you usually put that in your .sbclrc to make it happen automatically when SBCL is started
18:41:31
makomo
emaczen: but i guess you should watch out that you checkout the right release (so that it matches your package manager's SBCL version), instead of the master