freenode/#lisp - IRC Chatlog
Search
1:38:32
skeuomorf
PuercoPop: It would be cool if the links to CSS files, images, ...etc are relative to the root instead of being tied directly to the domain
2:02:57
skeuomorf
PuercoPop: e.g. https://hackage.haskell.org/package/hakyll-3.2.7.1/docs/Hakyll-Web-Urls-Relativize.html
2:03:53
PuercoPop
skeuomorf: The themes are hardcoding the ${config.domain} as the prefix. You could set the domain in the .coleslawrc as the root URL of your blog
2:05:40
skeuomorf
PuercoPop: put another way, given index, I want to be able to navigate to everywhere else from it without being tied to the domain name, so that all the URLs are relative to index
2:07:24
jason_m
Hello, I recently discovered snooze (https://github.com/joaotavora/snooze). This is a small issue, but the defroute indentation does not work for me as shown in the readme. Can I change how that works? (emacs / slime)
2:07:48
PuercoPop
For the posts content you can use the relative URL, or are you asking for something else?
2:09:37
PuercoPop
skeuomorf: I'm guessing the the easiest way is to just copy the theme to a new dir a modify the templates directly. I know there is PAGE-URL but I'm not seeing a way to achieve what you want easily. Then again I haven't read the codebase in quite a while. I still have to incorporate the docs on using Roswell
2:11:09
skeuomorf
PuercoPop: say I have a .coleslawrc with domain name as "http://example.com", and I have 2 posts, post1.md and post2.md, when I open index.html locally and try to navigate to post1, i get redirected to "example.com/post1" instead of "/root/post1"
2:11:58
skeuomorf
PuercoPop: I have a custom theme already, but this behavior is the same across my theme and hyde
2:16:41
PuercoPop
COMPUTE-URL is a function unfortunately. Maybe if we change it to a generic function you could specialize the method according the 'content-type' you wish?
2:18:25
skeuomorf
PuercoPop: Sorry, I don't think I understand what this has to do with content types
2:20:13
PuercoPop
skeuomorf: If I'm understanding you correctly you want to change the URL of Posts. Or do you want to change the URL of Post in a particular page?
2:22:02
PuercoPop
So URLs belong to the content itself and they are determined by COMPUTE-URL :after initializing the instance of the content (tag/post/etc). So you'd have to modify that if you want to change the URL of a content-type, like POSTS.
2:23:58
skeuomorf
PuercoPop: https://hackage.haskell.org/package/hakyll-3.2.7.1/docs/Hakyll-Web-Urls-Relativize.html
2:29:29
PuercoPop
skeuomorf: Ah ok. Yeah no, that is not something that Coleslaw can easily do. URLs are property of the content itself not something that is dynamically computed in relation to the 'current' content
2:36:41
PuercoPop
skeuomorf: I don't really have a good answer short of come up with a 'URL protocol' similar to the 'Document Protocol' and replace the URL reader of content with it? The post templates are receive the currently post as an argument so in theory you should be able to to use that as the current 'context/base'
2:39:20
skeuomorf
PuercoPop: The gh-pages plugin doesn't seem to work, neither when using (gh-pages :cname t) nor (gh-pages :cname "http://example.com")
2:45:12
PuercoPop
skeuomorf: Weird the last one should work. In fact Im not sure how the otherwise clause should be reachable because t should catch everything. Including nil
2:46:52
PuercoPop
skeuomorf: Yeah, and it was written before the 'new gh-pages'. Let me try to run use it locally
2:55:39
PuercoPop
skeuomorf: it does, after I remove the truename call in the initial (let ((blog (truename ..)))
2:59:26
skeuomorf
PuercoPop: Awesome, trying to find out where quicklisp installs packages so that I can edit my Coleslaw and not have to wait for a release :)
3:02:23
skeuomorf
PuercoPop: Nice on the `where-is`, it's actually `where-is-system`, still new to Common Lisp
3:07:26
skeuomorf
PuercoPop: Do I need to do anything after editing the file other than reloading coleslaw?
3:08:27
PuercoPop
skeuomorf: no, you don't even need to reload coleslaw, just C-c C-c over the function to compile it again
3:17:48
PuercoPop
skeuomorf: yeah. I haven't seen them in quite a while. You could @ them at twitter or shoot them an email
3:23:11
skeuomorf
PuercoPop: Found these though, where you commented https://github.com/kingcons/coleslaw/issues/84 and https://github.com/kingcons/coleslaw/issues/142
3:27:52
skeuomorf
I noticed that a user had sent a patch but you objected to it for some reason, do you have an idea of how we can fix it properly?
3:30:17
PuercoPop
skeuomorf: do you have the link handy? I only remember rejecting the djula plugin but only because I could come up with a way to handle both the render from the 'outside to the inside' of closure-templates and djul'as from the 'inside to the outside'
3:30:58
skeuomorf
PuercoPop: oh, I meant your comment here https://github.com/kingcons/coleslaw/issues/142#issuecomment-335061002
3:33:00
PuercoPop
I meant that the sitemap is conceptually an index and not content (and the link at the end should be https://github.com/kingcons/coleslaw/commit/78f1fc9fa05c4134e8fe9cd2069350da8ebf6458)
3:37:23
skeuomorf
PuercoPop: when I generate a blog to a deploy-dir, it overwrites the .git repo, is there a way currently to preserve this?
9:05:39
dim
sometimes I wish I had the time and skills to have a look at the SBCL GC, more often I'm just so grateful that we have CCL around
9:18:27
jackdaniel
it might be very well allocation technique which requires cleverer gc, or sbcl simply allocates more (in order to have faster code for example) etc etc
9:20:00
beach
shka: I suppose it was written a few decades ago, and then it has been patched to allow for non-moving objects and such.
9:24:57
beach
shka: I would like to turn your remark around like this: There is no reason to believe that ANY free Common Lisp implementation uses modern GC technology, simply because they were all initially created several decades ago.
9:25:08
dim
fe[nl]ix: I can always try, but well, SBCL actually uses way more memory than CCL at the same task with pgloader
9:28:27
beach
A precise collector requires help from the compiler to know what is in all registers and stack locations in every stack frame.
9:29:10
beach
One way to make sure that is trues, is to divide the registers into two sets, registers containing Common Lisp objects and registers that contain binary stuff not to be traced.
9:30:10
beach
Another way is to make sure the compiler emits information for each value of the program counter, stating what register contains what.
9:31:35
beach
But, this technique has some restrictions. You can't move objects around arbitrarily, because if was really a raw integer, you will modify it, violating the semantics of your code.
9:31:43
dim
also let's note that SBCL is *way* faster than CCL, but only until it crashes because of heap exhaustion
9:33:05
beach
dim: Generational collectors depend on the generational hypothesis: Most objects die young, and the longer an object is live, the more likely it is to stay that way.
9:33:47
dim
we have a buffer eviction policy done that way in PostgreSQL, with a kind of a generation increment from 1 to 5, and 5 means forever, basically
9:33:47
beach
dim: So objects are divided into generations. It is typically done by splitting the heap into independent generations, but there are other techniques.
9:34:38
dim
as a mere CL programmer/user, how can you hint SBCL GC into doing a better job? or as a general approach, how to track what conses and how to cons less?
9:34:51
beach
Typically, the age is measured by the fact that they survived a collection of their generation.
9:35:24
dim
sometimes I'm thinking I should get myself a personal training on CL consing avoidance techniques which would include a review and improvement of the pgloader code
9:35:33
beach
dim: That's to SBCL-specific for me to know. Maybe #sbcl would be a better place for that question.
9:37:58
beach
dim: It is not clear that avoiding consing is going to make performance better, nor is it clear that it will solve the heap-exhaustion problem.
9:40:14
beach
If you reuse CONS cells, you might create pointers from older objects to younger objects. Then the memory manager may have to record those pointers specially when a GC of a young generation is performed.
9:40:25
dim
that would explain why I can't seem to be able to fix that problem, no matter how much time and energy I've spent on trying to have pgloader cons less
9:40:30
beach
Such pointers are assumed to be rare, and of you have a lot of them, performance may suffer.
9:41:54
beach
Just so you know that you need to know the details of the GC in order to know how to optimize for it.
9:42:44
dim
the main thing I do is receive bytes from the network (typically a database driver gets that for me), then I push the data (vector of strings) into a lparallel queue (pointers, no copy), then another thread pops from the queue and transform the data into another vector of (unsigned-byte 8) this time (utf-8 representation ready for pg copy protocol), and then we send that up the network again to pg
9:43:35
dim
I also have a “batch” notion that happens after the transform and before pushing in the network to pg, where I keep around everything that is going to be sent in vectors of 25000 elements, so that in case of error I can replay the vector and skip erroneous lines
9:43:50
beach
dim: Maybe the SBCL maintainers can draw some conclusion from that use case. I certainly can't.