libera/#commonlisp - IRC Chatlog
Search
17:35:05
atgreen
pretty printer seems OK for now, but it upcases all of the symbols. I'd like them downcase by default.
18:05:34
Bike
the pretty printer is also quite configurable (not just case, but also more complicated stuff like custom print rules for certain operators)
18:12:59
random-nick
VincentVega: regarding the blog post you shared and the discussion two days ago, after reading the fern section of the power of structure article and the mcclim section of the all else is not enough article, I still don't understand why would prototype OO + a constraint resolution system be beneficial to GUI programming compared to class-based OO and maybe a reactive programming paradigm (like the cells library)
18:13:33
random-nick
though I don't know if this is the right channel for discussing that, maybe #lispcafe or #clim instead?
18:24:18
random-nick
pjb: VincentVega's project is apparently based on garnet+kr and something called multi-garnet
19:45:49
jackdaniel
atgreen: lately I'm generating code from xml specification and it turns out nicely thanks to a pretty printer
19:46:07
jackdaniel
atgreen: like this: turtleware.eu/static/paste/803e5a8aeeee09b91b7e2e4823cc18149f994861-xproto.lisp
19:53:32
atgreen
the problem I've just hit with the pretty printer is that package names are a problem... Right now I'm generating a string like "(myfun foo:bar)". I can't read that and print it because it's complaining about package "foo" missing
19:54:43
atgreen
my project is a java source code transpiler.. converting all of the jre source files to lisp
19:58:30
jackdaniel
suppose that you have an instance #<jre-file> that defines a package that has the symbol foo:bar
19:58:45
jackdaniel
in that case the first thing you will pretty print is the package definition (and in-package)
19:59:53
jackdaniel
it may not be seen in the example I gave, but the defpackage in there will have :export clause with all defined symbols
20:00:31
jackdaniel
so if something acesses clx.xcb-proto.xproto:rectangle, then both package and the symbol will be present
20:02:45
atgreen
very basic stuff is working... I just want to change how code is emitted so it is nicely formatted
20:03:32
jackdaniel
I'm not very experienced with pretty printer but I've found it very nice with tasks I'm doing (both with generating common lisp and c99 code)
20:18:12
jackdaniel
it is probably part of the symbol reader, but if you make #\: a macro that is not constitudent then you will read two symbols
20:22:43
jackdaniel
but why can't you define the package with appropriate exports? or put a double colon?
20:28:43
jackdaniel
you have a common lisp code (as text) that you want to print as a common lisp code?
20:29:37
jackdaniel
I thougth that you have some ast representation that you want to print as common lisp (like me :)
20:33:02
atgreen
I'm generating CL source code from an AST. I'm going to try this: https://github.com/yitzchak/cl-indentify