libera/#commonlisp - IRC Chatlog
Search
5:11:39
beach
There are rumors that recent versions of the software produced by the Muse Group is spyware. Perhaps this is a good time, then, to consider a Common Lisp implementation of an editor for music scores. It is insane anyway to write such a program in C++. We can do much better.
5:18:03
beach
So the idea would be to create a CLIM/McCLIM-based interactive program that uses the new standard for music fonts, and the new (apparently excellent and free) implementation of that standard.
5:19:26
cjb
since it is TeX underneath, you can probably do something like this: https://castel.dev/post/lecture-notes-1/
5:20:04
ldb
I know someone who's writing a PDF lib from scratch, she says the ISO spec for the compression formats used in PDF along costs $9000
5:24:11
edgar-rft
right, lilypond uses GNU Guile as a preprocessor for TeX, plus some C++ hacking to extend Guile
5:26:55
edgar-rft
for example the current lilypond versions are still stuck with Guile 1.8 because all other Guile version afterwards make lilypond unbearably slow
5:29:15
beach
The rules of music engraving are completely different from those of typesetting text, so I don't see what TeX can contribute.
5:31:15
edgar-rft
The lilypond developers mainly work in the music or typesetting/printing business, I think they choosed TeX because they didn't want to write their own typesetting program and choosed Guile because it was said to become the "standard GNU scriptiung language". I can ask on the mailing list if somebody needs details.
5:32:55
beach
I think Common Lisp would be the ideal implementation language for an interactive score editor/engraving program.
5:33:50
beach
I did Gsharp some time ago, but made some wrong design decisions. Also, at the time, McCLIM was not as good as it is now. And the font technology was not available. Now is a good time to do something better.
5:34:35
beach
edgar-rft: I am not entirely ignorant. I have read up on all the rules of music engraving, and I have experience with Gsharp.
5:35:43
ldb
i'm getting interested, is there any reading I can do to start learning music engraving?
5:37:39
edgar-rft
ldb: there are papers from Werner Lemberg (main typesetter and music font designer of lilypond), gimme some seconds to look...
5:37:50
susam
Learnt about Gsharp now. Hadn't heard about it before. I have used LilyPond about 10 years ago and the PDFs it rendered looked very good. The Gsharp screenshots at https://common-lisp.net/project/gsharp/ don't look as good. I think I see a lot of aliasing.
5:37:52
beach
ldb: The trick is to encode those rules in software, while still allowing the user to tweak the layout when necessary.
5:40:00
edgar-rft
ldb: this is a description of the typesetting ideas behind lilypond -> https://lilypond.org/doc/v2.22/Documentation/essay/index.html
5:40:17
moon-child
cjb: side-by-side preview is not really 'interactive', particularly for tex which takes quite a while to render
5:40:22
beach
susam: Like I said, McCLIM is much better now. We also have Common Lisp support for OpenType fonts, and we have a free OpenType music font that is apparently excellent.
5:42:34
susam
beach: Yes. That makes sense. I agree, a very good music score system can be made with CL.
5:43:03
beach
This video is about the design of the new font: https://www.youtube.com/watch?v=XGo4PJd1lng
5:43:42
ldb
Btw, I just mentioned a lot of efforts need to be made to produce PDF. Any ideas on how to work on that with CL
7:27:41
beach
We already have 25 or so issues for WSCL: https://github.com/s-expressionists/wscl/tree/main/wscl-issues/proposed and if anybody feels like adding more, please do so.
8:08:57
pve
Hi, are there any examples of libraries or applications where, in order to compile the code, one needs to load the source code first (i.e. the lisp files) before compiling anything?
8:18:41
flip214
pve: if reader macros are in use, they're needed to read other source files. CL-INTERPOL (used eg. for CL-PPCRE), or NAMED-READTABLES, or similar stuff comes to my mind.
8:18:58
pjb
Well, some old application could have needed that. Basically, in Patchwork, which was developped in part in the image, had files with a lot of circular dependencies. Loading everything before compiling would have helped compiling without error or warning.
8:19:24
pjb
But this is not clear. The first thing I did of course was to sort that out and write an asd file to compile it normally.
8:20:05
beach
flip214: You would do that by making sure the compiled file containing reader macros was loaded before the others.
8:20:06
pjb
So you only need to load (compiled) files before compiling other files when the former contain functions or other definitions needed at read-time or compilation-time of the later (reader-macros, functions used by macros, macros, etc).
8:20:28
pve
yeah, I'm looking at "The Description of Large Systems" by Kent Pitman and get the impression that such code might exist
8:21:23
beach
pve: ASDF typically compiles and loads one file at a time, so as long as the order is respected, there should be no such issues.
8:22:53
pve
So I was curious to see if there's some case where doing things that way would be called for (maybe increased convenience..)
8:37:09
pve
flip214: yeah, i guess you wouldn't need to wrap certain function calls, like (enable-some-reader-syntax ..), with an eval-when
8:37:24
cranium
re: music engraving in Lisp, I think https://opusmodus.com/ should be mentioned in this.
8:37:26
cranium
Also there's been a reddit thread summarizing other prior work: https://www.reddit.com/r/Common_Lisp/comments/lmjt6v/music_notations_in_cl/
8:43:19
lisp123
beach: Will SICL be a powered up version of ANSI CL (i.e. some new functionality that is covered by libraries currently) or is it focused mostly on portability?
8:44:09
moon-child
I do not see why you would put into the implementation functionality which could be put into libraries
8:44:36
moon-child
sicl is rather geared the other way around, with components designed to be reusable by other implementations
8:44:59
lisp123
moon-child: I realised today that the standard doesn't support custom equality tests for hash tables, so was wondering if this was something that could be extended into a new implementation without libraries
8:49:32
lisp123
i just realised how stupid my question was :) ignore me (if a new implementation extended CL then it would no longer be portable)
8:52:20
moon-child
well, there is certain functionality overlooked by spec which must go into the implementation
8:53:13
beach
lisp123: The improvements are mostly in code maintainability and algorithms for various things including bootstrapping and generic dispatch.
8:53:16
moon-child
but the difference there is that threading is (somewhat--see boehm paper on c's (lack of) memory model) orthogonal to other language functionality. Also that such extensions are generally abstracted over by generic libraries such as bordeaux threads
8:55:29
beach
lisp123: If there are good existing libraries, I see no reason to re-implement. But mostly it's the other way around. The SICL project will create new libraries that did not exist before like Clostrum, Trucler, Eclector, etc.
8:59:19
beach
lisp123: The idea here is that these libraries could be used by other implementations to improve modularity and maintainability. However, since we decided some time ago that there can be no "order" between the libraries, to actually use them natively in a Common Lisp implementation, something like SICL bootstrapping is required.
8:59:43
beach
And I haven't (yet) figured out how to make SICL bootstrapping usable in other implementations.
9:48:30
asarch
With Caveman2, you can create a controller for a specific HTML request like: (defroute "/students/:id/information" (&key id) (let ((student (with-connection (db :school) (retrieve-one (select :* (from :student) (where (:= :id id))))))) (render #P"students.html" (list :student student))))
9:50:04
asarch
So, if I do: (setf tacos 10) without previously do a (let (tacos...) ..., SBCL does not complain
9:51:35
moon-child
perhaps the code is not getting compiled? If you actually request a uri served by that controller, does it work?
9:53:35
asarch
This is from Caveman2 output log: [04:52:14] <DB> SELECT * FROM "idioma" ORDER BY "id" () [8 rows] | LACK.UTIL:FUNCALL-WITH-CB
9:54:04
asarch
And then the request: 127.0.0.1 - [22/Jul/2021:04:52:14 -05:00] "POST /expresiones/buscar HTTP/1.1" 200 3867 "http://localhost:5000/expresiones/buscar" "Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
9:54:29
moon-child
are you certain that 'taco' is not defined anywhere dynamically? What if you read from 'taco' without assigning to it? What if you use another name?
9:58:07
asarch
The controller works fine in spite of actually two variables (taco and indice) was not declared before
10:06:09
asarch
No matter how many times I call that controller, it always works: https://pasteboard.co/KckGYVG.png
10:56:24
flip214
what's the easiest library to show a 2D-array of float data in an x11 window as a bitmap (with a color palette)?
11:24:08
flip214
I guess https://sharplispers.github.io/clx/Direct-Image-Transfer.html#Direct-Image-Transfer would be a good starting point
11:33:50
jackdaniel
that said what I've meant is to draw directly on a drawable of the same size as the array
11:35:00
jackdaniel
i.e (draw-design *standard-output* (make-patterny <array> (list +red+ +blue+ +pink+)))
11:35:35
jackdaniel
the above assumes that array elements are either 0, 1 or 2 and they have assigned +red+, +blue+ and +pink+ appropriately
11:36:22
jackdaniel
(this draw-design is expected to be invoked in the context of the running application frame)
11:59:45
flip214
"Invalid initialization arguments: :CURRENT-LAYOUT, :REINITIALIZE-FRAMES in call for class #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS>."
12:07:21
jackdaniel
flip214: here is an example http://turtleware.eu/static/paste/80cf9813-flip214.lisp
12:08:17
flip214
jackdaniel: just did an QL:update-all-dists, so I don't think so. thanks for the example!
12:09:08
jackdaniel
they might be old because asdf did not realize some changes or because mcclim asd definitions are not correct
12:09:40
jackdaniel
because these changes were introduced in the same merge request, so these arguments are valid initialization arguments for the application frame
12:10:44
flip214
jackdaniel: The value 69/68 is not of type (OR (SINGLE-FLOAT 0.0 1.0) (DOUBLE-FLOAT 0.0d0 1.0d0) (RATIONAL 0 1)) [Condition of type TYPE-ERROR]
12:12:13
jackdaniel
replace the last clause in make colors with (colors (make-rgb-color 1.0 1.0 (* i number)))
12:28:00
lotuseater
how do i correctly create a subclass to a built-in class, by providing (:metaclass built-in-class) to DEFCLASS. let's say (defclass safe-vector (vector) () (:metaclass built-in-class))
12:28:40
pjb
That's the point of built-in-classes. If they could be extended by standard methods, they wouldn't be built-in.
12:29:18
pjb
lotuseater: also, note how integer is a built-in-class. What's the meaning of subclassing integers? Make colored integers?
12:30:33
pjb
lotuseater: on the other hand, if you're an implementer, then you can always create more built-in-classes, and possibly deriving one from another, depending on how they're implemented.
12:31:33
pjb
lotuseater: this also mean, that it's possible that some implementation let you do it, at least for some classes, using implementation level APi.
12:32:57
Bike
i don't know if it's disallowed to define a subclass of BUILT-IN-CLASS. defining a subclass of _a_ built in class (vector, number, etc) isn't allowed
12:33:42
jackdaniel
lotuseater: built-in-class is not the standard class so all bets are off regarding how it behaves, what would be a reason to subclass it?
12:34:38
lotuseater
but I was productive up to know and got ecl on raspberry work with quicklisp (as you advised me some days ago using setup.lisp) and compiled ccl, it just needed m4. but it's not obvious to me now how to link ccl for startup correctly
12:35:55
lotuseater
pjb: subclasses of integer could many things be, starting with even or odd integers. ok or using (deftype even-integer () '(and integer (satisfies even-integer-p))) by wrapping #'even-integer-p in an eval-when
12:38:02
jackdaniel
lotuseater: mcclim presentation type system allows you to parametrize cl classes (even built-in ones)
12:41:03
pjb
If we were smalltalk. But even with smalltalk, there are usually optimizations that would break subclassing of integer and similar.
13:07:13
jackdaniel
flip214: if you don't execute new commands then it shouldn't blink. that said - clx-fb backend has double buffering, "native" one has planned feature for that
13:08:08
jackdaniel
(let ((*default-server-path* :clx-fb)) (find-application-frame 'show-array :array the-array :own-process nil))
13:51:15
jmercouris
just making sure I'm not doing something stupid by overriding a package somehwere
14:54:07
jcowan
edgar-rft: Probably no one cares any more, but Guile 3's JIT makes it essentially as fast as Guile 1, so lilypond could be updated. Although it would still run unbearably slowly on a Vax.
15:28:48
beach
Tell me that the phrase "use-package checks for name conflicts between the newly IMPORTED [my emphasis] symbols, and those already accessible in package" is wrong.
15:30:29
beach
The glossary says "import v.t. (a symbol into a package) to make the symbol be present in the package".
15:33:47
beach
Since I am now working on the package system, I am slowly convincing myself that the entire package system could be defined in an external library.
15:34:23
beach
There are some minor interactions with symbols, like changing the home package of those symbols.
15:37:51
beach
Those interactions could be handled by the standard way that we have developed, i.e., the library has a generic function that it calls, and client code has to define a method on it.
15:48:25
Bike
slime-quit-lisp, i think? usually i'd just restart it, and this is assuming C-c C-c isn't working
15:52:22
edgar-rft
jcowan: I's not neccessarily my opinion but the people on the lilypond mailinglist who frequently are running Guile tests say otherwise. As far as I know the main problem is that it's the unneccessary Guile "compile" step that slows everything down. Lilypond passes the Guile results directly to C++ and therefore needs a fast Guile *interpreter*, it throws away the compiled code anyway.
16:13:22
jcowan
use-package imports the exported symbols of the package being used en masse, contra pjb's remark