freenode/#lisp - IRC Chatlog
Search
17:00:52
sjl_
mfiano: works for me. I use fish as my shell though, you might need to adjust for bash or whatever
17:01:10
mfiano
sjl_: I fixed it with: curl -s https://download.geonames.org/export/dump/countryInfo.txt | awk -F$'\t' 'BEGIN {print "(defvar *countries* ("} /^[^#]/ { print "(\""$1"\" . \""$5"\")" } END {print ")"}';
17:02:49
ck_
but continuing on this increasingly off-topic branch of conversation, what's the latest country that changed names? Congo comes to mind, but that was a while ago already
17:04:52
stacksmith
https://en.wikipedia.org/wiki/Geographical_renaming - although #lispcafe is probably a better place for this
17:13:23
jackdaniel
stacksmith: you've mentioned CLIM In the morning (probably yours yesterday), in case you didn't see the log I've provided some explanation which you may find useful
17:16:00
jackdaniel
CLIM specification is complicated because it describes at least three things: window manager abstraction, barebones I/O toolkit and CLIM itself ← this
17:52:25
stacksmith
jackdaniel: I think I was trying to say that a system that is too complicated to fit into the CLOS dispatch mechanism and requires a layer of predicate logic is probably too much for my tiny brain...
17:56:08
jackdaniel
presentation-types have more to do with CL types than CL classes per se, that may be the reason
18:04:35
stacksmith
I understand the need to fine-tune dispatch and even create a protocol layer separate from the general dispatch mechanism, including a meta layers for discovery and versioning negotiation, etc. It just gets tedious after a while to be on the user end of it. If unchecked, it turns coding into something akin to accounting or filling out government forms. At least we have SEXPs, which avoids 'the obvious solution' of usng XML.
18:16:28
stacksmith
I am just bitching about complexity of frameworks in general, and my annoyance at having to learn quirky large frameworks that impose large amounts of quirky rules. CLIM is certainly no worse than anything else, and probably better than most. In the ideal world, a framework would remain transparent, allowing you to use as little or as much as you want, without a massive commitment. Kind of the way CLOS lets you pick and choose.
18:17:30
jackdaniel
CLIM kind of does, the issue is that the lower parts are not properly documented and separated (btw, please see query message)
18:25:21
stacksmith
jackdaniel: I will take a look - I am due for another round of McCLIMming soon. What I would love to see is a non-emacs text environment, in which maybe you can pop up a menu or a dialog box. Or if you wish, open a window and output some stuff into it. And maybe have some presentations bind some keys. So it's a smooth transition from text to a full-blown GUI if needed. I think McCLIM is kind of like that.
18:27:35
jackdaniel
n.b: https://files.mastodon.social/media_attachments/files/016/413/077/original/6de35a0d65c75548.png log4cl appender (all source code may be seen on the screenshot)
18:42:12
stacksmith
Huh. Reminds me of https://github.com/stacksmith/subtext , my attempt to wrangle GTK into a Lisp UI... I would just love to get rid of Emacs in the middle screwing everything up.
18:48:06
stacksmith
Does CLX work well with antialiased fonts? I think last time I tried McCLIM jackdaniel talked me through installing an antialiased font that looked good...
18:48:57
jackdaniel
Andy Hefner implemented antialiased fonts over a decade ago, and I've added kerning and transformations this year
18:49:22
jackdaniel
shka_: it may look good or bad, but what's more important it is much faster than logging to emacs
19:18:36
vsync
Jachy: perhaps you know, what is the reason for requiring both inherit from protocol class and satisfy protocol predicate?
19:23:39
vsync
wait, but "However, simply implementing a method for the predicate that returns true is not necessarily enough to assert that a class supports that protocol; the class must include the protocol class as a superclass."
19:25:33
jackdaniel
protocol classes are for specializing "default" methods on said protocol classes. predicates are just a syntactic sugar (you could use typep for that for instance where type would be the protocol class name)
19:26:19
jackdaniel
stacksmith: no subpixel antialiasing. loke has ressurected freetype engine which do support that, but it is disabled by default (we prefer native lisp over ffi). instructions on how to enable it are on the wiki in github
19:26:51
vsync
ohhhh wait... this describes two approaches one can take in designing a protocol, not a choice of how to implement
20:09:43
random-jellyfish
what is the recommended way to generate code in another language from common lisp?
20:10:55
random-jellyfish
for example let's say I want to convert (def hello (print "hello world")) to def hello: print('hello world')
20:11:39
housel
The pretty-printer can be helpful for that, see for instance https://github.com/dylan-lang/lisp-to-dylan
20:11:40
dialectic
are you doing any context sensitive analysis at all? Like making sure variables are really in scope etc.
20:11:43
aeth
FORMAT goes surprisingly far in macros like that, especially if you're OK with it generating strings at compile time
20:12:42
random-jellyfish
dialectic at this point I don't need semantic analysis, the compiler of the target language can deal with that
20:13:33
dialectic
I would just build up an AST and dispatch on the first element in the list, recursively outputing to a stream.
20:14:57
dialectic
I presume it would be (def hello () (print "hello world")). So you'd have (case (car form) ((DEF) ...printing-code-for-def...))
20:15:17
dialectic
This is one of those things where you'll learn faster if you just go forth and try it.
20:15:48
dialectic
If you need indenting and readability later, as others pointed out, check out the pretty printer.
20:16:37
vsync
stacksmith: wayland must be opposed so its poor offering is never put forth further as a suitable replacement for X11
20:16:56
vsync
ACTION would not feel this way if anything about wayland got anything about the point of what is useful in X11
20:17:42
aeth
I game on Linux and I use a tiling window manager on Linux and I use the proprietary nvidia drivers on Linux. So I'm basically part of every group that hates Wayland.
20:19:38
vsync
I realize that doesn't exactly lend credence to my opinions on software/network architecture in This Modern Age
20:26:36
jackdaniel
all I can say is that it works and that I do not recommend log4slime when you connect to a remote swank (log4slime is an emacs appender tailored for slime, very nice one at that)
20:27:21
vsync
well I'm looking to misuse it potentially... wonder how much its core use case is baked into the architecture haha
20:37:30
vsync
jackdaniel: oh wow there is much more to your log4cl/clim screenshot if I scroll down
20:38:36
jackdaniel
yes, I have these big screens now so I can waste the network bandwidth with tall screenshots :)
20:38:44
vsync
I need to see if streams are suitable for my concept as well... need to do some reading on streams, series, generators/gatherers
20:39:45
vsync
I know there are Gray/simple streams, and SERIES library... has anyone implemented generators/gatherers as in cltl2?
20:41:32
jackdaniel
so you either convert all your sequences to series and use its mapping/iteration facilities
20:41:47
jackdaniel
or you marshall / demarshall forth and back to be able to i.e loop over something
20:42:45
vsync
(or I guess that if you like it you would use it instead of base CL... haven't grokked fully what all it offers though)
20:56:38
dialectic
What's the origin of the name "Swank" anyway? Does it mean anything in particular? I've always wondered this.
22:39:38
no-defun-allowed
Packages don't know what symbols do really, so you need to export the accessors too.
23:38:26
manualcrank
I need a ordered data structures like c++'s map and multiset. (It can't be a library; I need something I can just cut and paste.)
23:39:11
manualcrank
Sedgewick's red-black binary search tree @ https://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/RedBlackBST.java.html is perfect for map and can be easily adapted to obtain a multiset (with a count field in each tree node to track duplicates).
23:39:47
manualcrank
The minimal Lisp code to illustrate the problem is here: <http://pasted.co/5dd7f925>
23:39:50
no-defun-allowed
this AVL tree implementation is pretty simple: https://two-wrongs.com/purely-functional-avl-trees-in-common-lisp.html
23:40:56
manualcrank
The logic and structure of both versions is identical, I'm almost certain there's something about Lisp semantics (setf's in particular) that doesn't translate.
23:41:34
manualcrank
That AVL version doesn't do queries based on the ranks of the keys in the tree.
23:48:43
pjb
manualcrank: red-black trees are particularly difficult to debug. I have an implementation that has been in need of debugging for 10 years…
23:49:16
pjb
manualcrank: I'm not saying that you will need ten years to do it, but that you should plan to spend your summer, debugging and writing test cases.
23:49:49
manualcrank
I was going to try and adapt the AVL code next (i guess it needs code to at least track the size of each branch)
23:50:10
manualcrank
but i don't know anything about avl trees. red-black trees i learned in sedgewick's coursera course
0:03:23
stacksmith
Personally, I prefer skiplists. It only takes a couple of years to debug a skiplist implementation.
0:54:48
loke
stacksmith: The freetype engine is more than just subpixel AA. It also uses Harfbuzz for layout, meaning that complex scripts are rendered correctly (such as Hindi or Arabic)
0:56:28
loke
stacksmith: Another benefit is that it uses fontconfig, which means that your system font configuration is honoured.
3:13:09
stacksmith
LdBeth: checkout https://github.com/stacksmith/cl-with I wrote it exactly for that reason. And a few others.
3:15:13
stacksmith
It figures out and rebinds all slots by default. Or you can fine-tune which slots and how to name them. Same syntax for CFFI objects.
3:53:09
aeth
LdBeth: I think there can be issues with automatically exporting instead of exporting in defpackage, though
4:22:50
dialectic
beach: You should know, the link to your paper on generic dispatch seems to be broken now.
4:28:15
dialectic
I read the cached google on Google already (I guess monopolies are good for some things...) so no hurry, just thought I'd let you know in case you didn't already.
4:29:34
beach
I have been asked to provide an index for all the SICL-related papers, and as part of that work, I am putting them in a sub-directory.