freenode/#lisp - IRC Chatlog
Search
7:56:25
beach
moore33: So I am thinking I should re-read the description of the drawing primitives of the CLIM II spec. It might be possible to re-phrase everything in terms of a compositing anti-aliased drawing model that could then be common for McCLIM and CLIMatis.
7:57:14
moore33
beach: Yes, along with ditching things that just don't work anymore, like highlighting ink.
7:58:43
beach
I have not looked at those. But I understand SVG is somewhat like PostScript, which I have used quite a bit.
7:59:34
moore33
beach: SVG is completely declarative, IIUC; it's basically xml. OpenVG is an API that never really took off.
8:00:27
moore33
beach: I ask because their path/stroke/fill model might be a good source of ideas for you.
10:40:58
beach
Is there any standard terminology that allows me to distinguish between a pixel with only color and a pixel with both color and opacity?
10:41:42
beach
Followup question: Is there any standard terminology that allows me to distinguish areas of pixels of one type and areas of pixels of the other type (image vs picture, for instance)?
10:43:14
beach
XRender uses `pixel' to mean something that has only color and `color' to mean something that has both color and opacity. But I would like to improve on that if possible.
10:44:06
Shinmera
I don't recall ever hearing specific terminology for it. Usually it's just "with or without alpha/transparency/opacity"
10:44:49
Shinmera
Though if you're dealing with one specific colour space, you can use RGB vs RGBA and so forth.
10:45:18
beach
moore33: I am writing up some thoughts about this "common backend". I will submit something soon. But since I don't really know what I am talking about here, I will need plenty of feedback.
10:46:23
Shinmera
Also note that if you do have alpha you need to distinguish whether you're dealing with premultiplied colours or not.
10:54:38
moore33
Premultiplied alpha is preferable as the rep for the texture / pixmap just before it is sampled and composited with the background. But I'm not really sure what's most convenient for users.
10:56:31
beach
Presumably, one can "unmultiply" those values before giving them to the user if that should be required, no?
11:24:54
beach
Anyway, that is at a much more detailed level of abstraction than what I am currently contemplating.
11:26:33
beach
The premultiplication issue is one of performance only, or also of precision? I can't remember now.
11:41:10
moore33
beach: Also filtering, if the source pixmap is scaled or distorted before being applied.
11:44:30
beach
I am definitely not planning to write a specification that allows the user to do everything that OpenGL can do. I am thinking that client code can use backend-specific operations for more sophisticated applications that require more detailed processing or higher performance.
11:45:04
beach
Otherwise, I will be able to make no progress whatsoever and we are back to square 1 (or 0?).
11:48:03
beach
Maybe I'll just can the entire idea. It is subversive activity anyway, so probably nobody will care.
11:52:43
moore33
My personal plan is to use lpsg for OpenGL stuff, CLIMatis for interface stuff, but do the OpenGL rendering to a "layer" that lives under the interface layer. This layering could be as simple as drawing the OpenGL stuff first, or we might render the two to seperate targets (pixmaps on the GPU) and then composite them. But no need for OpenGL in CLIMatis.
15:05:21
sigjuice
is there a way to get slime autodoc to tell me what type of symbol I am looking at? I am most interested in knowing whether a symbol is a function or not.
15:08:52
Shinmera
Symbols don't have types and a symbol is not a function. A function can be bound by a symbol.
15:10:16
Shinmera
According to the docs ( https://www.common-lisp.net/project/slime/doc/html/slime_002dautodoc_002dmode.html ) the autodoc mode should show you the arglist if it binds a function.
15:18:35
sigjuice
I think that is what I really want autodoc to tell me. Half the time I can't tell if I need to quote an argument or not.
15:45:01
sigjuice
if I evaluate #'if and #'defun, sbcl says #<CLOSURE (:SPECIAL IF) {100142770B}> and #<CLOSURE (:MACRO DEFUN) {1000C36FFB}>. What does CLOSURE mean in this context?
15:48:10
ggole_
Simplifying a little, it's a representation of a function that refers to variables bound outside its body
15:53:31
ggole_
By the way, this should suggest that whether something is a closure or not is not important for the meaning of a CL program
15:53:31
sigjuice
(defun foo (x) (lambda () x)) (foo 42) => #<CLOSURE (LAMBDA () :IN FOO) {1004797C4B}>
15:54:25
ggole_
In looking for the difference between an object printed by SBCL #<function ...> and one printed #<closure ...>, you are looking under the covers
15:55:03
ggole_
(Which is all very well, and in fact great fun, but be aware that is what you are doing.)
16:57:31
Shinmera
You can write everything in CL that you could in any other turing complete language.
17:02:22
ggole_
State machines by tail calls are idiomatic in languages with guaranteed tail call elimination, but perhaps not the best idea in CL
17:04:30
mtl_
ggole_: depends on whether he's trying to write production software or just explore a particular method of doing something
17:08:32
John[Lisbeth]
The advantages I am exploring are the efficiency in memory when written in an imperative language, and the speed of the algorithms
17:08:53
John[Lisbeth]
One could argue this is due to modern hardware design though, and that hardware could be designed for immutable languages instead
17:11:17
John[Lisbeth]
Could you do lamda calculus with a sate machine if tail recursion was solved for?
17:13:43
Bike
no, being able to run lambda calculus on a turing machine is much weaker and more certainly true a proposition than that
17:15:02
Bike
you need infinite states, or memory, or whatever you want to call it, for any turing-complete thing. if it was finite you could detect loops, at least in theory.
17:15:34
John[Lisbeth]
Why is lamda recursion better than the recursion you can do in a finite state machine?
17:16:40
John[Lisbeth]
Would it make a difference if I did functional programming in a syntactically ugly way in a set of finite state machines in c?
17:17:36
John[Lisbeth]
My current understanding is that it could not do everything that lisp could do because it does not have lamdas, but I don't know the details of that.
17:20:18
John[Lisbeth]
Like how data flows into one end of a unix pipe onliner and out the other end, or like how data flows through a chain of objects.
17:22:14
John[Lisbeth]
My thought is a state machine is such a precice logical construct that you could design a state machine in such away that mathematically it has the same output as a purely functional function even though state changes internally
17:25:54
Shinmera
Once I got the IRC client part fixed back up again I can move on to a minimal REPL UI. Maybe that can serve as a starting point for you if you're still interested.
17:28:06
Shinmera
Here's something to feast your eyes on in the meantime: https://twitter.com/Shinmera/status/702570317382811649 https://twitter.com/Shinmera/status/706122138877599744
17:31:09
mtl_
cause I can do all the nasty curses stuff(still working on that, it's so much of a pain it's disinspiring)
17:43:26
mtl_
I find myself rewriting a lot of code because "oh shit I didn't consider that" right after running into it
17:46:28
mtl_
Shinmera: also, curses has lots of neat stuff on top of it like panel(3) etc, that there are no ffi bindings for
17:47:09
Shinmera
Well, I hope you'll still be convinced that this was a good idea by the end of it.
17:48:59
mtl_
trying to find it, because it seemed to be in active development, and way more complete than cl-charms is
18:28:58
phoe_krk
Jladkhglsjghlfkgdf. I'd use a hash table, but I have to be able to search both by the key and the value.
19:29:24
mtl_
Shinmera: I might retire my self-written irc bot very soon, yours just seems more complete, and does everything I implemented in mine
19:29:49
Shinmera
mtl_: Well right now it's not much of a bot at all yet. It can only do basic IRC client connection and event handling.
19:30:13
Shinmera
But now that most of the fundamentals are hammered out the API should be more stable. https://github.com/Shinmera/colleen/tree/v3
19:31:10
mtl_
Shinmera: my bot has the stumpwm command system with all the interactive stuff tore out and user permission added in