Recent Content
Progress report #7
posted on 2017-04-26 10:30
Dear Community,
During this iteration I have worked on the Debugger (system
clim-debugger) to bring it closer to sldb
:
More work on the module is planned with a final goal to integrate it
with the Listener
and to have it as a default debugger for McCLIM
applications. Suggestions on how to improve the interface, testing and
help with coding are appreciated. Preliminary documentation has been
written and put in
the
McCLIM manual draft.
I've started working on a library called Slim[1] the goal of which is
to provide some of the CLIM interfaces in easy to learn and write
manner (i.e more context dependent, less verbose names, unified
abstractions etc.). For now it is only a skeleton having barely four
macros, but I'd love to hear suggestions, what should it contain, in
what form etc. A sketch may be found in the source code
Libraries/Slim/
. If you think it is a bad idea to have such library
shipped with McCLIM – let me know about that too!
The documentation was extended in some places. Also building the
info
document works now (long standing issue). An updated version of
manual draft may be found on the McCLIM website. The Drei
documentation has been put in
a
separate document due
to its size and independent scope from the rest of McCLIM.
Nisar Ahmad has solved one of the bounties related to menus and command tables. He also submitted documentation for the menu functionality, thereby earning $150. Congratulations!
Speaking of finances - all money is now accumulated solely for bounties and development tasks, none is withdrawn by me since the beginning of year 2017.
Currently we have $1226 at our disposal and active bounties worth $700. Declared monthly donations at the moment equal $297. Additionally one-time contributions come every month. That means that we can post two or three bounties a month without draining the current resources, or spawn a bunch of worthwhile tasks and keep going as money comes. This is fantastic news. Thank you all for your support to the project!
At the moment we have five active bounties worth $700 which may be found here:
https://www.bountysource.com/teams/mcclim/bounties
New bounties have a time limit assigned to them (six months) – thanks to that we are able to reclaim money from unresolved issues and propose it somewhere else (or repost the same bounty).
To improve the visibility of the issues which have bounties on them
I've added a label to GitHub issue tracker: bounty
.
Suggestions as to which other issues should have a bounty on them are appreciated and welcome. Please note that Bountysource has a functionality "Suggest an Issue" which may be found on the bounties page. If you feel that you may solve some problem, but there is no bounty on it, feel free to suggest it too.
If you have any questions, doubts or suggestions – please contact me
either by email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
We are very happy that the number of McCLIM users grows, which may be infered from number of questions on the IRC channel, bug reports and pull requests.
Sincerely yours,
Daniel Kochmański
[1] Simplified Lisp Interface Manager.
Progress report #6
posted on 2017-03-14 19:00
Dear Community,
I owe you apologies for skipping reports in the meantime. Since January I'm not withdrawing money from our fundraiser thanks to other paid work, which means we have budget for more bounties. Keep in mind, that doesn't mean any work has ceased from my side.
During this iteration I was preparing a paper^1 for the upcoming European Lisp Symposium^2. Unfortunately it wasn't good enough to be accepted.
I'm still working on a tutorial and demo application mentioned in the paper proposal. During that bugs and incompatibilities get fixed and pull requests are accepted. When questions arise on IRC or mailing list I try to answer them.
As a reminder: we have two active bounties at the moment:
Suggestions which other issues should have a bounty on them are appreciated and welcome.
If you have any questions, doubts or suggestions – please contact me
either by email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
Sincerely yours,
Daniel Kochmański
Progress report #5
posted on 2016-12-28 16:00
Dear Community,
During this iteration I have continued working on the tutorial, fixing the issues and assuring CLIM II specification compatibility.
The most notable change is standard-application-frame
implementation
refactor which simplifies the code and moves some computation to
creation time (until now we have searched through sheet hierarchy at
each iteration of command loop and at various other occasions at
runtime).
The rest of the time was spent on peer review of the contributions, merging pull requests, development discussions, questions on IRC and other maintenance tasks.
Alessandro Serra has created a Framebuffer Backend
– a working proof
of concept that McCLIM may work on top of a frame buffer. Albeit a bit
slow you may find instructions how to run it here:
https://github.com/robert-strandh/McCLIM/wiki/CLX-backend(s)
A detailed report is available at:
https://common-lisp.net/project/mcclim/static/documents/status-reports.org
If you have any questions, doubts or suggestions – please contact me
either by email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
Happy new year!
Sincerely yours,
Daniel Kochmański
Progress report #4
posted on 2016-12-02 12:00
Dear Community,
During this iteration I have continued to work on the tutorial, improving documentation, working on issues and assuring CLIM II specification compatibility.
Most notable change is that argument type in define-command
is not
evaluated (but if it is quoted it still works for backward
compatibility reasons). I've also started some refactoring of the
frames
module implementation.
The tutorial work takes some time because I try to fix bugs when I encounter them to make the walkthrough as flawless as possible. While I'm not overly satisfied with the tutorial writing progress and its current shape, this work results in benefit of improving the code and the documentation.
The documentation chapter named "Demos and applications" has been
updated to reflect the current state of the code base. Some additional
clarifications about the pane order and pane names have been added to
it. I've updated the website to include the external tutorials and
include the Guided Tour
in the Resources
section. The manual has
been updated as well.
The rest of the time was spent on peer review of the contributions, merging pull requests, development discussions, questions on IRC and other maintenance tasks.
Alessandro Serra has created a Raster Image Backend
– a backend
similar to PostScript
, but having png
as its output. See "Drawing
Tests" in clim-examples
and the chapter "Raster Image backend" in
the Manual.
A detailed report is available at:
https://common-lisp.net/project/mcclim/static/documents/status-reports.org
If you have any questions, doubts or suggestions – please contact me
either by email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
Sincerely yours,
Daniel Kochmański
Progress report #3
posted on 2016-11-02 14:30
Dear Community,
During this iteration I was working on a tutorial about how to create
an application from scratch with McCLIM used as a GUI toolkit with a
detailed description of each step. This is targeted at beginners who
want to write their own project with a CLIM
interface. The tutorial
isn't finished yet, but I expect to publish it soon.
The font-autoconfigure
branch was successfully merged to the master
branch and various issues were closed thanks to that. One of them is
bounty issue #65. Since I don't know how to cancel the bounty, I'm
claiming it ($100), and I'm withdrawing from the McCLIM account the
usual amount with this $100 subtracted.
I have replaced the clim-listener
non-portable utilities with the
osicat
portability layer and the alexandria
library. Changes are
present in the develop
branch (not merged yet).
The rest of the time was spent on peer review of the contributions, merging pull requests, development discussions, questions on IRC and other maintenance tasks.
A detailed report is available at:
https://common-lisp.net/project/mcclim/static/documents/status-reports.org
If you have any questions, doubts or suggestions – please contact me
either with email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
Sincerely yours,
Daniel Kochmański
Progress report #2
posted on 2016-10-03 14:30
Dear Community,
During this iteration my main focus was targeted towards refactoring
font implementation for McCLIM. Major changes were applied to both the
CLX backend and the TrueType extension - fixing issues and improving
functionality. A brief description of the TrueType extension is added
in the corresponding system mcclim-fonts/truetype
(in the form of
README.md
file).
The branch with mentioned changes waits for a peer review and will be hopefully merged soon. Since it is a vast change any critical feedback is very welcome:
https://github.com/robert-strandh/McCLIM/pull/97
In the meantime I've worked a bit on issue #55 (without great success), answered questions on IRC, responded to reported issues and merged some pull requests. I'm very pleased that we have a modest, yet constant stream of contributions - many thanks to all contributors.
Posted bounties have not been claimed yet and unfortunately we haven't found a second developer for the agreed price so far.
A detailed report is available at:
https://common-lisp.net/project/mcclim/static/documents/status-reports.org
If you have any questions, doubts or suggestions – please contact me
either with email (daniel@turtleware.eu) or on IRC (my nick is
jackdaniel
).
Sincerely yours,
Daniel Kochmański
Progress report #1
posted on 2016-08-30 09:00
Dear Supporters,
I'm publishing a progress report for month August with detailed timelog and brief description of undertakings performed each day. This file also contains report for the previous iteration sponsored by Professor Robert Strandh.
https://common-lisp.net/project/mcclim/static/documents/status-reports.org
The most important achievement was securing funds for a few months of
work with the Bountysource
crowdfunding campaign. We've created some
bounties to attract new developers. #clim
channel on Freenode
is
active and we seem to regain the user base what results in interesting
discussions, knowledge sharing and increased awareness about the
project among non-clim users.
We have also gained valuable feedback about user expectations regarding the further development and issues which are the most inconvenient for them. We've added a new section on the website https://common-lisp.net/project/mcclim/involve which addresses some common questions and doubts and we have created a wiki on GitHub (not very useful yet https://github.com/robert-strandh/McCLIM/wiki).
During this time we are constantly working on identifying and fixing issues, cleaning up the code base and thinking about potential improvements. Curious reader may consult the git repository log, IRC log and read the logbook.
As a side note, I've exceeded time meant for this iteration by four hours, but I'm treating it as my free time. Additionally people may have noticed that I did some works on CLX not specifically related to McCLIM – this development was done on my own time as well.
Also, to address a few questions regarding our agenda – our roadmap is listed here: https://common-lisp.net/project/mcclim/involve. That means among other things, that we are concentrated on finishing and polishing the CLX backend and we are currently not working on any other backends.
If you have any questions, doubts or suggestions – please contact me either with email (daniel@turtleware.eu) or on IRC (my nick is jackdaniel).
Sincerely yours,
Daniel Kochmański
Fundraiser success
posted on 2016-08-16 11:00
Dear Lispers,
We are delighted and overwhelmed by the support that many of you have shown for our effort to crowdfund the maintenance and continued development of McCLIM. Never in our wildest dreams had we imagined that we would reach our highest monthly goal of 2000 USD in only a few days.
In addition to our regular maintenance and programmed improvements, at this level of funding, we will be able to post so-called "bounties", i.e., specific sums of cash for solving specific problems. Once posted, they will be available at this URL:
https://www.bountysource.com/teams/mcclim/bounties
Like we mentioned in our initial appeal for contributions, this campaign has an important side-effect, beyond that of providing a budget for improvements, namely that of creating new excitement around McCLIM. This excitement will ultimately result in contributions in the form of code, thereby multiplying the importance of the direct monetary support.
In order to make our work on this project as transparent as possible, we will do our utmost to provide monthly reports on our progress, and we will provide details on how the cash was put to work.
We sincerely hope to make sufficient progress, sufficiently fast, that you will consider additional contributions, in the form of cash or code, in the future.
Sincerely,
Robert Strandh and Daniel Kochmański
Crowdfunding McCLIM maintenance and development
posted on 2016-08-12 15:00
McCLIM is currently the only free native toolkit for developing GUI applications in Common Lisp. A while ago, I took over the maintenance, because I did not want to see McCLIM abandoned.
But since I have many other projects going, I decided to hire Daniel Kochmański part time (25%) to do some of the urgent work. This experience turned out so well that I would like for him to continue this work. Not only am I very pleased with the quality of Daniel's work, but I was also very surprised about the additional excitement that his work generated.
While I could continue funding Daniel myself for a while, I can not do so indefinitely. For that reason, I decided that we should try crowdfunding. Steady funding at the 25% level for a year or more would allow us to address some of the issues that often come up, such as the numerous remaining defects, the lack of modern visual appearance, and more.
If you are interested in seeing this happen, I strongly urge you to consider contributing to this project. Our target is modest. We would like to obtain at least 600 USD per month for at least one year. Even a small monthly contribution from a significant number of people can make this happen.
To contribute, please visit https://salt.bountysource.com/teams/mcclim and follow the instructions.
Sincerely,
Robert Strandh
CLIM, the galaxy's most advanced graphics toolkit
posted on 2016-08-11 17:00
Setting up the basic environment
We assume that you already have configured the Common Lisp environment
(including Quicklisp) and that you know the basics of the Common Lisp
programming. The necessary systems to load are mcclim
and
clim-listener
, you may load them with the Quicklisp. After that
launch the listener in a separate thread:
(ql:quickload '(mcclim clim-listener))
(clim-listener:run-listener :new-process t)
Finding your way around CLIM
CLIM is the global minimum in graphics toolkits. Geometry, and means
of abstracting it. Switch the listener into the CLIM-INTERNALS package
to get started. Type (in-package climi)
in the Listener REPL
.
Animations
Evaluate the 4 following forms in Slime REPL
, then call
(cos-animation)
in the Listener REPL
to demonstrate CLIM's
animation capabilities. You cannot evaluate (cos-animation) in the
Slime REPL
, as *standard-output*
is bound to the its output stream
which isn't a sheet
, and thus cannot be drawn on.
(in-package climi)
(defparameter *scale-multiplier* 150
"try modifying me while running!")
(defparameter *sleep-time* 0.0001
"modify and eval to speed or slow the animation, set to `nil' to stop")
(defun cos-animation ()
(let* ((range (loop for k from 0 to (* 2 pi) by 0.1 collect k)) ; length of 62
(idx 0)
(record
(updating-output (*standard-output*)
(loop for x from (nth idx range) to (+ (nth idx range) (* 2 pi)) by 0.01
with y-offset = 150
for x-offset = (- 10 (* *scale-multiplier* (nth idx range)))
for y-value = (+ y-offset (* *scale-multiplier* (cos x)))
for x-value = (+ x-offset (* *scale-multiplier* x))
do (draw-point* *standard-output*
x-value
y-value
:ink +green+
:line-thickness 3)))))
(loop while *sleep-time*
do (progn (sleep *sleep-time*)
(if (= 61 idx) (setq idx 0) (incf idx))
(redisplay record *standard-output*)))))
If you want to stop the animation, issue in the Slime REPL
:
(setf *sleep-time* nil)
If it wasn't already obvious, you can plot w/e.
(CLIM-LISTENER::DRAW-FUNCTION-FILLED-GRAPH
#'tanh :min-x (- 0 pi pi) :max-x pi :min-y -1.1 :max-y 1.5 :ink +blue+)
Drawning class hierarchy
Type ,clear output history
in the Listener REPL
and RET to clear
the screen.
"," indicates that you are activating a command. Try typing comma, then C-/ to activate completion. C-c C-c to dismiss.
Children of the class CLIMI::SHEET
can be drawn on using arbitrary
geometry. Try (clim-listener::com-show-class-subclasses 'sheet)
in
the Listener REPL
to view the subclasses of it.
Commands and presentations
The name COM-whatever indicates that the function in question is a
clim command, which you can define in the Slime REPL
like so,
(in-package clim-listener)
;;; Runme! We will need these in a moment.
(dolist (image-name '("mp-avatar.png"
"vulpes-avatar.png"
"stas-avatar.png"
"suit-avatar.png"
"rainbow-dash-avatar.png"
"chaos-lord-avatar.png"))
(uiop:run-program (format nil "curl https://common-lisp.net/project/mcclim/static/media/tutorial-1/~A --output /tmp/~A"
image-name image-name)))
(define-listener-command (com-ls :name t)
((path 'string))
(clim-listener::com-show-directory path))
try ,ls /tmp/
-- then ,display image <SPACE>
and click on one of
the displayed paths to supply it as an argument. At the core of CLIM
is the notion of a presentation. Objects have presentation methods,
ie, some arbitrary rendering geometry, and when PRESENT'd on the
screen CLIM remembers the type. Thus one can supply objects of the
appropriate types as arguments to a command simply by clicking on
them. Read about CLIMI::DEFINE-COMMAND
in the specification to learn
more. Let's define our first presentation method.
Intermixing S-expressions with the presentation types
Evaluate the forms below in the Slime REPL
:
(in-package climi)
(defvar lords '("mircea_popescu" "asciilifeform" "ben_vulpes"))
(defclass wot-identity ()
((name :accessor name :initarg :name :initform nil)
(avatar :accessor avatar :initarg :avatar :initform nil)))
(defmethod lord? ((i wot-identity))
(member (name i) lords :test #'string=))
(define-presentation-type wot-identity ())
(defun make-identity (name avatar-pathname)
(make-instance 'wot-identity
:name name
:avatar avatar-pathname))
(defparameter *identities*
(mapcar (lambda (l) (apply #'make-identity l))
'(("mircea_popescu" #P"/tmp/mp-avatar.png")
("ben_vulpes" #P"/tmp/vulpes-avatar.png")
("asciilifeform" #P"/tmp/stas-avatar.png")
("Suit" #P"/tmp/suit-avatar.png")
("RainbowDash" #P"/tmp/rainbow-dash-avatar.png")
("ChaosLord" #P"/tmp/chaos-lord-avatar.png"))))
(define-presentation-method present (object (type wot-identity)
stream
(view textual-view)
&key acceptably)
(declare (ignorable acceptably))
(multiple-value-bind (x y)
(stream-cursor-position stream)
(with-slots (name avatar) object
(draw-pattern* stream
(climi::make-pattern-from-bitmap-file avatar :format :png)
(+ 150 x)
(+ 30 y))
(draw-text* stream name (+ 153 x) (+ 167 y)
:ink +black+
:text-size 20)
(draw-text* stream name (+ 152 x) (+ 166 y)
:ink (if (lord? object)
+gold+
+blue+)
:text-size 20))
(setf (stream-cursor-position stream)
(values x (+ 200 y)))
object))
(defun eval-and-then-call-me-in-the-listener ()
(let* ((n 8)
(sheet *standard-output*))
(labels ((gen (i)
(let* ((out-and-start '(f x)))
(loop
for k from 0 to i
do (setq out-and-start
(apply #'append
(mapcar
(lambda (s)
(case s
;; (x '(y f + f f + + x))
;; (y '(y f + f f x - - f f x))
(x '(+ y f + f f + y y +))
(y '(f - y f f x f f))
)) out-and-start))))
(remove-if (lambda (sym)
(member sym '(x y) :test 'eq))
out-and-start))))
(let* ((x 300) (y 300) (new-x x) (new-y y) (a 1) (step 15))
(loop
for r in (gen n)
do (progn (cond ((= a 1) (setq new-y (+ step y)))
((= a 2) (setq new-x (- x step)))
((= a 3) (setq new-y (- y step)))
((= a 4) (setq new-x (+ step x))))
(case r
(f (clim:draw-line* sheet x y new-x new-y
:ink clim:+blue+
:line-thickness 6
:line-cap-shape :round)
(setq x new-x y new-y))
(- (setq a (if (= 1 a) 4 (1- a))))
(+ (setq a (if (= 4 a) 1 (1+ a))))
(t nil)))))
(let* ((x 300) (y 300) (new-x x) (new-y y) (a 1) (step 15))
(loop
for r in (gen n)
do (progn (cond ((= a 1) (setq new-y (+ step y)))
((= a 2) (setq new-x (- x step)))
((= a 3) (setq new-y (- y step)))
((= a 4) (setq new-x (+ step x))))
(case r
(f (clim:draw-line* sheet x y new-x new-y
:ink clim:+white+
:line-thickness 2
:line-cap-shape :round)
(setq x new-x y new-y))
(- (setq a (if (= 1 a) 4 (1- a))))
(+ (setq a (if (= 4 a) 1 (1+ a))))
(t nil))))))))
Now type (dolist (i *identities*) (present i))
at the CLIM Listener.
Try typing (lord?
at the listener and then clicking on one of the
identities. Add a closing paren and RET. Notice how objects can be
seamlessly intermixed with S-expressions. If this example fails for
you it may be that you have not recent enough version of McCLIM.
Notes
Unripe fruits. The future isn't what it used to be - some assembly required.
(CLIM-DEMO::DEMODEMO)
(available with systemclim-examples
)The essential machinery of a 'live' GUI builder
Navigator (essentially an extended `apropos')