freenode/#clim - IRC Chatlog
Search
21:32:31
slyrus1
I'm once again having trouble grokking presentation-types, present, etc... If I manually specify the type with (present obj 'my-presentation-type) it works as expected. I'd like to be able call (present obj) and have my (presentation-method present) get called.
21:34:05
slyrus1
As a concrete example I'd like (present (make-point 100 100)) to result in my (presentation-method present) (I call it this to distinguish from the function present) with a suitable presentation class.
23:03:28
scymtym
slyrus1: i think CLIM:PRESENTATION-TYPE-OF is called if no presentation type is specified
23:16:02
slyrus1
scymtym: yeah, and I suppose I could make my own method for that, but it seems like the right incantation of define-presentation-type/method/etc... should handle that automatically.
23:22:47
slyrus1
Use the Add Point command to add a point and control click on the point to add new ones, control click on the lines to split them.
1:07:24
slyrus
I can make the hit detection and what not work if I do (preset ... 'line :record-type 'line-presentation). I still have the idea that I can somehow set these to be "default" options such that (present line) will DTRT, or, more to the point (present object) and that I won't have to work up my own dispatching mechanism.
1:13:34
slyrus
Ok, it looks like the present function (not the (presentation-method present)) has built-in smarts to get the type (presentation-type?) of the object to be presented, but not the record-type. If you want a custom record type you have to add that as an argument to present.
1:15:24
slyrus
but I'm using that for the specializer in output-record-refined-position-test and highlight-output-record. Is there another way?
1:24:40
fiddlerwoaroof
Also, is there some way to force an application pane to recalculate its scrollbar?
2:36:36
loke
jackdaniel: Alex got back to me and said LGPL2.1+ is fine. He even offered to do a full copyright transfer if needed.
3:01:10
loke
beach: Do you have a suggestion for how to make it official? Should he just make a merge request of an update of the README? That way it'll be part of the git history.
3:02:27
loke
He sent it to me as a private Mastodon message, which is obviously not very, hmm... “available”.
3:06:51
beach
I suggest you write to him and ask. It would be reasonable for you to do most of the work and for him to just click on a link, like a PR or something. But he needs to understand that we must be careful and get it official.
3:08:24
loke
beach: At first I thought that simply creating a bug report on the CLIM project and have him reply to it would be enough, but comments to bug reports are editeable.
3:48:37
fiddlerwoaroof
So, to make experimenting with my Common Lisp <-> Objective-C bridge easier, I've been making a little tool with CLIM for browsing all the objective-c clases in the system (it depends which framework has been loaded, but this is ~5000 classes). Is there a good way for me to display such a long list in a CLIM app?
3:49:29
fiddlerwoaroof
https://github.com/fiddlerwoaroof/objc-lisp-bridge/blob/master/clim-objc-browser.lisp#L5-L28
3:57:15
fiddlerwoaroof
slyrus: yeah, it does, I've been using CFFI to wrap the objective-c runtime. My hope is to eventually get a native mac backend for CLIM working
3:58:01
fiddlerwoaroof
I've already done a PoC where I've built a (simple) mac gui entirely in common lisp
4:01:32
fiddlerwoaroof
Incidentally, I'm finding my minimalistic Objective-C like readtable to be extremely pleasant to use, compared to other ways of interacting with Cocoa
4:23:35
fiddlerwoaroof
Here's an example of loading and wiring up a nib: https://github.com/fiddlerwoaroof/objc-lisp-bridge#show-me-the-code
4:26:40
fiddlerwoaroof
The only caveat is that I've yet to put much work into making sure there aren't any memory leaks, etc.
4:27:28
fiddlerwoaroof
Also, I haven't quite figured out the right way to handle Objective-C errors without crashing.
5:31:51
jackdaniel
loke: adding a comment in the source file should be good enough. even git history may be modified / forged if you think about it. having him make a pull request if fine of course, but I Think the most transparent way of doing things would be asking him to write to mcclim-devel mailing list
5:41:13
jackdaniel
but of course, you type /topic , go to the mcclim homepage and find it on the linked resources ;-)
5:49:49
jackdaniel
now let me convert freetype's font-text-extents to the new returned values scheme
5:52:43
jackdaniel
I'd like new McCLIM release codename being "Dziady" (Forefather's Eve), are there any objections?
5:55:22
jackdaniel
Dziady is a pre-christian Slavic feast to honor dead (nb: church replaced it with all saints day)
5:57:03
jackdaniel
loke: where does magic number 64 come from in freetype? I see it all over the place as a denominator
6:01:15
jackdaniel
this could be made more readable if it were (defconstant +freetype-units->pixels+ 1/64)
7:10:14
jackdaniel
for instance you could have one port (which is a logical connection to display server) and different toolkits associated with different frame managers
7:10:19
fiddlerwoaroof
So, if I wanted to theme my clim application, I should think about creating swappable theme managers?
7:10:36
jackdaniel
it is responsible for mapping abstract panes (i.e push button) to clx-push-button, or material-push-button whatever
7:11:09
jackdaniel
that said, I have some work started on more elaborate theming (which will utilize frame managers)
7:11:30
jackdaniel
but this effort is temporarily halted - patterns and fonts ate my last few months
7:12:05
jackdaniel
https://files.mastodon.social/media_attachments/files/005/005/502/original/7331eec572c7081d.png
7:12:50
jackdaniel
https://files.mastodon.social/media_attachments/files/005/137/698/original/45323837a6307236.png and more of the same
7:13:31
jackdaniel
good news is that since we now have indirect ink protocol in place I will be able to incorporate it
7:14:09
fiddlerwoaroof
I know everyone is busy, but prioritizing this sort of thing might help attract interest: for some reason, the thing people seem to care about most when it comes to a GUI toolkit is what the outputs look like.
7:14:51
fiddlerwoaroof
I've also been mulling some alternative ports to make it more useful cross-platform
7:15:53
jackdaniel
imho we should wrap a performant and clean sdl backend - that way we are cross-platform with just one additional backend
7:16:34
fiddlerwoaroof
And another option would be a websocket protocol to use CLIM as a web framework :)
7:18:57
fiddlerwoaroof
Yeah, but I've noticed that a lot of people are unwilling to use anything except web apps for some reaosn
7:22:28
fiddlerwoaroof
Back to an older question, if I want to clear and refresh an application pane with a new dataset, what's the right way to do that?
7:23:10
fiddlerwoaroof
Right now, the scroll bar is getting out of sync with the number of lines in the pane
8:01:06
jackdaniel
scymtym: thank you for the merge request, I'll review it when I'm done with font internal protocol (unless someone else does it before that)
8:01:38
scymtym
the documentation string of CLIM-EXTENSIONS::BOX-ADJUSTER-GADGET in gadgets.lisp suggests it is doing basically that. i didn't try it, though
8:04:22
jackdaniel
loke: also you could include infomration, that the concept is called grid fitting in freetype
8:12:46
fiddlerwoaroof
I have a tendency to go overboard when making a proof of concept :) Anyways, here's a utility for CLOS that's somewhat like my objective-c browser: https://gist.github.com/fiddlerwoaroof/444e817f915ad40edcfa50eba5aebe82
8:14:46
fiddlerwoaroof
If you load it, and then use "Filter Classes" to limit the list of classes to only those that match the regex .*-frame, the panel on the top-left ends up having way too much vertical space
8:19:22
fiddlerwoaroof
ok, so we don't have something like the graph-viz algorithms available either?
8:22:58
jackdaniel
oh, I'm wrong, we can layout the edges: http://bauhh.dyndns.org:8000/clim-spec/18-2.html#_995
8:24:27
fiddlerwoaroof
It's great coming back to clim, I forgot how much fun it was to write little gui tools using this