IRC channel logs

2022-02-18.log

back to list of logs

<theruran>hmmm I think for my purposes, making a simple parser of the marked-up comments will do fine.
<silasfox>good morning, guilers!
<wingo>good morning :)
<wingo>robin: i had a thought yesterday! wrt conservative immix, one thing about moving gc's is you need some story for hashq
<wingo>the usual story is, embed the hash value in the object. takes at least 30 bits
<wingo>guile doesn't have extensible hashq tho (a good thing) and so just uses hash(addressOf(obj))
<wingo>so no additional field needed
<wingo>breaks of course if addressOf(obj) changes!
<wingo>so: with conservative immix (i.e. immix + pinning), keep a per-line "is pinned" state persistently (i.e. not just as part of mark phase)
<wingo>if addressOf(obj) is ever exposed to scheme, i.e. via hashq, then pin the line the object is on, for as long as the line is live
<wingo>the state needed is small (one bit per line), and the fragmentation impact is low (because we can still allocate into blocks with pinned lines, and because we can still move the vast majority of objects that were never hashq'd)
<wingo>and we avoid per-object overhead for hash codes.
<robin>wingo, ooh, tricky but sounds like it could work
<robin>wingo, what about gengc? maybe move objects into oldspace immediately if their hash is taken? (i've thought about this for like ten seconds so that may or may not make any sense whatsoever)
<robin>and lines are what, 128 bytes so overhead should be low
<robin>(dunno about allocation patterns but i'd sort of assume objects stuffed into hash tables are usually relatively long-lived)
<wingo>re gengc i don't know. the "gen immix" collector uses a semispace nursery and immix oldspace iiuc. but, you could use immix on both sides -- would allow nursery objects to get pinned. or, if ever a nursery block has a pinned line, it could be promoted directly to oldspace
<wingo>if hashq's effect is just premature tenuring, that's not so bad
<robin>yeah
<robin>gen immix = mmtk's version?
<wingo>i think so, though i'm not quite clear on what mmtk does -- referring more to the papers here
<robin>ah, yes, 32KiB blocks, 128B lines, not bad
<wingo>robin: https://twitter.com/cfbolz/status/1494593185246494720
<wingo>in general though i don't know how to mitigate conservative references to nursery objects (hashq or otherwise)
<wingo>i think we could consider using sticky mark bits
<wingo>as in https://www.cs.utexas.edu/~mckinley/papers/conservative-gc-oopsla-2014.pdf
<wingo>that would probably be the least-resistance way. lets any line get pinned (nursery or not)
<wingo>so we would just need to solve the write-barrier issue (i.e. ensure all post-initialization writes call out to a write barrier)
<wingo>and that would could be done separately after replacing bdw-gc with a new in-tree stop-the-world single-generation immix
***Guest2562 is now known as roptat
<singpolyma>Anyone know how (macro-binding) works? I have it working, but I don't quite understand. If you see https://paste.sr.ht/~singpolyma/4cde2beca8c427eeec1895c272024fd1e497af67#wrap.scm-L8 I'm not sure why I need that (cons '()
<blacked>what is guile programming language?
<blacked>If i learn it , what can i built?
<blacked>although learning is not waste of time, but
<blacked>what should i choose racket or scheme or guile?
<blacked>or common lisp
<blacked>(elisp is only for emacs so i'll not add)
<blacked>Is guile programming language mature language?
<blacked>why everybody silent, I know we are usually silent and unsocial, but i think it shouldnt be when nobody knows who is
<blacked>like
<blacked>If i made like
<blacked> calculator with guile
<blacked> calculator with python
<blacked>what do you think would be faster guile or python
<blacked>does guile support parallel processing?
<civodul>hi blacked!
<civodul>there's (ice-9 threads) and (ice-9 futures) for parallel processing
<civodul>there's also the Fibers library
<civodul>as to what is Guile, please check out the web site at https://gnu.org/s/guile
<pinoaffe>blacked: whether the calculator is faster depends mostly on the software design rather than on the language it is written in
<dsmith-work>Happy Friday, Guilers!!
<pinoaffe>blacked: guile does make certain things more easy though, writing a calculator with support for basic symbolic computation is less complicated in guile and takes less boilerplate code than it would in python
<pinoaffe>blacked: if you're writing code for performance-critical applications, you'll probably wind up offloading part of the computation to native binaries, both python and guile allow you to do so
<dsmith-work>blacked: Also, the channel is slow. People are often busy at work or whatever. Some people reply hours or even days later!
<pinoaffe>I personally prefer programming in guile over programming in python, but that's mostly a matter of taste
<blacked>As a guile programming , what do you think of common-lisp, what it does and doesnt do?
<pinoaffe>and I guess that lately I've been writing more python than guile, but that's because the project I've been spending most time on is in python
<blacked>:)  how are you finding it and feels using python , as a guile developer?
<blacked>How are there breaking changes does it comes to guile 2 to guile 3 or even guile 4?
<blacked>i mean like it feels python stupid changing whole to python2 to python3 , which feels immature,
<blacked>I was thinking whats this case in guile?
<blacked>can i do hacking , penetration testing in guile?
<pinoaffe>blacked: I think python is a fairly nice language, but I much prefer guile's maps, filters and folds over python's list comprehension, I feel like guile is more "consistent" than python and I've run into some limitations of python's object/class system that would not be an issue in guile
<blacked>are there any gui packages like tkinter in guile ?
<blacked>built in
<blacked>or even thirdparty which is as good as qt :)
<pinoaffe>blacked: as far as I know, there have been no such breaking changes in guile
<pinoaffe>blacked: you can do hacking and penetration testing in guile, as in most other languages
<dsmith-work>blacked: Long long years ago (20?) tkinter was in Guile. Today, people are using Gnome interfaces. Still being actively developed.
<dsmith-work>blacked: For example: https://www.gnu.org/software/g-golf/
***form_feed is now known as \f
<apteryx>I forgot: how can I query the type of an object?
<dsmith-work>apteryx: In general, you apply a sequnce of tests. There is no function that returns a "type".
<dsmith-work>apteryx: Like: number? vector? symbol? string? pair?
<apteryx>I see. I thought perhaps there was something general like Python's 'type' -> type(2) -> int
<singpolyma>apteryx: try (class-name) maybe
<singpolyma>There's a way to do it but I'm not at a console right now
<dsmith>Ya, I think if you load goops you get something. But it might only apply to classes?
<dsmith>(class-of <thing>)
<daviid>dsmith: it works for instances
<daviid>scheme@(guile-user)> (class-of 1)
<daviid>$2 = #<<class> <integer> 7fa4f5e08d80>
<daviid>if you ,use (oop goops) that is ...
<dsmith>Nice
<dsmith>ISTR something about "primitive-generics". Like loading or importing or something..