IRC channel logs

2020-02-19.log

back to list of logs

***daviid is now known as Guest78499
***Guest78499 is now known as daviid
<daviid>rekado: hello! i did ask once, but since you didnt answer, i'm asuming you didnt see the quiz ... how difficult would it be to display the logs dates in reverse order? i was wondering if i'm the only one that would prefer the 'reverse order' as well, wdyt?
<rlb>wingo: maybe a bug in fash-set? i.e. the #('collision array edit) branch doesn't always return 2 values?
<rlb>crashed for me there with
<rlb> In procedure recurse:
<rlb> Wrong number of values returned to continuation (expected 2)
<rlb>(not yet sure what the added? value should be there...)
<rlb>ahh, looks like #t, perhaps.
<rlb>wingo: looks like you might also need a #:use-module (ice-9 threads)
<str1ngs>daviid hello is this expected behavior? <gtk-text-view> evaluates to #<<gobject-class> <gtk-text-view>. see http://paste.debian.net/1131033. I want to precisely check the class type. I guess I could use is-a? just I wanted my tests to be fairly strict here.
<str1ngs>daviid: my test assertion looks like so (assert-equal <gtk-text-view> (make <gtk-text-view>))
<str1ngs>though I'm using a derived type. I'm just using this as an example.
<daviid>str1ngs: there is an example somewhere in the code
<daviid>str1ngs: but i had to reboot, so a few minutes ...
<daviid>./g-golf/hl-api/gobject.scm:(define (gobject-class? val)
<daviid>tell me if this answes your question .. if not we'll dig further
<str1ngs>hmm maybe I should use class-of? I think I had lapse of sanity here? lol
<daviid>yes, you should be able to use class-of on two instances and check ...
<str1ngs>yeas sorry not sure why I was using the object and not the class.
<str1ngs>I'm curious about gobject-class? does it take a class or an object?
<daviid>a class, iirc :)
<daviid>i need to know whe a class is a derived class, in some places ...
<str1ngs>okay that is handy I think I have a use case I might need that with.
<daviid>it's all so complex that i don't always remember 'on the spot', but i can always dig in and remeber reading the code and the log ...
<str1ngs>for most of my application is-a? is more useful due to generic methods etc
<str1ngs>daviid: no worries this was helpful. sorry for the noise
<daviid>str1ngs: is-a? should work though, try to create an instance an use it
<daviid>let me know
<str1ngs>is-a? is fine. but for my tests I wanted to be strict. I just forgot to use class-of? instead. will double check now
<daviid>(eq? (class-of blue) (calls-of fox)) should work, blue and fox behing instances of the same class of course
<daviid>or not, then it returns #f
<daviid>str1ngs: if that works, you could write a strict-is-a? proc or method :)
<daviid>*write your own
<str1ngs>(assert-equal <gtk-text-view> (class-of (make <gtk-text-view>))) does not work
<str1ngs>maybe I should just use is-a? for now?
<str1ngs>wait that does work haha
<daviid>assert/
<daviid>what is assert-equal?
<daviid>id this a test suite proc or so?
<str1ngs>ahh maybe only derived classes are effected by this
<daviid>str1ngs: i am working in argc argv, i can't run gtk-init right now
<daviid>can you try
<str1ngs>daviid: okay all good (assert-equal <widget-text-view> (class-of (buffer-widget scratch))) works as intended
<daviid>(eq? <gtk-text-view> (class-of instance))
<daviid>ok then
<daviid>?
<str1ngs>daviid: its was a pebak issue sorry for the noise
<daviid>it's ok
<str1ngs>I forget to use class-of? and then got confuse because I'm using two generic methods and the gobject detail through me off.
<daviid>str1ngs: (define-class <foo> ())
<daviid> (eq? <foo> (class-of (make <foo>))) -| #t, as expected
<daviid>fwiw ...
<str1ngs>right I wasn't thinking straight lol
<daviid>str1ngs: np! happy and always curious to help, because i also learn while trying to help ...
<str1ngs>daviid: here's my <web-buffer> class http://paste.debian.net/1131034. this is the top level generic definition. the gtk parts provide generic methods for such tasks like (buffer-load-uri buffer "https:/gnu.org")
<str1ngs>daviid: do you know if it's useful to define (define-generic buffer-load-uri) along with the generic class?
<daviid>str1ngs: i's going to be a bit complicated to explain, but you should never call define-generic 'yourself', let being called by define-method
<str1ngs>right that's what I've been doing thanks for the feedback
<str1ngs>(define-method (buffer-load-uri (buffer <web-buffer>) uri)
<str1ngs> (webkit-web-view-load-uri (buffer-widget buffer)
<str1ngs> uri))
<str1ngs>sorry for multi line but that's how the generic methods look
<daviid>however, this being said, you need to track method names accross modules, i suggest you read the code http://git.savannah.gnu.org/cgit/g-golf.git/tree/g-golf/support/g-export.scm?h=devel
<daviid>sounds good to me
<daviid>your code sounds good to me
<str1ngs>my hope is the blunt of nommad we be generic code. and then platform things like gtk ncurses qt can provide the generic methods
<str1ngs>that the plan atleast
<daviid>str1ngs: in your <web-buffer>, the name is superflous, so to speek
<daviid>there is a class-name method for that
<daviid>and, as you wish of course, but i hgihly recommend you adopt the strategy that g-golf uses and jsutifies (in the doc) wrt to slot-names and accessors names ...
<daviid>*speak :):)
<daviid>following the idea, i'd do (keymap #:accessor !keymap #:init-keyword #:keymap
<daviid>there are numerous reasons to adopt such a strategy, described in g-golf's doc
<daviid>but as i said, as you wish of course
<str1ngs>daviid: keymap is actually an override for a <buffer> slot
<str1ngs>I tried !slot prefixes but they don't jive for me. plus I have the emacsy slots which don't use ! which gets even more confusing.
<daviid>jive? :)
<str1ngs>it's not as easy to grok
<str1ngs>if I was not using emacsy I think this would be easier to user. I'll consider adopting it again though.
<daviid>it's a convention, the justification matters, the prefix, i wanted to avoid ., which is the humanity java desaster language, and, because it can be used to set! the slot ... and it preserves the slot-name to be used by users in their let form ... all this is described in g-golf's doc
<daviid>str1ngs: appart from one character, the slt name and accessro name should always be equal
<daviid>always
<daviid>and that character should always be the same, for on or one bilion accesors
<str1ngs>right I read that and it does make sense but in practice using it with emacsy has not be easy. also keep in mind this needs to easy for emacs users to understand.
<daviid>why is it difficult in emacsy? curious here
<str1ngs>I'll consider switching back to that convention
<daviid>you can ue another
<daviid>like _ prefix or postfix, i like very much the ! prefix becaue it is very scheme
<daviid>so to speak
<str1ngs>emacsy does not use the convention. so when I'm using emacys slots there is no ! prefix
<daviid>but i emacsy goops 'intensive¬
<daviid>?
<str1ngs>yes all buffers etc a goops classes
<str1ngs>are*
<daviid>yo mght wana adopt the convention for emacsy (clone) or s ... i'm telling you, i' have 3 decades of clos goops experence, and this is the best convention i came up with
<str1ngs>but I was using short names with ! so maybe !buffer-uri is better then !uri
<daviid>!uri is better becaus it is the slot name prefixed
<daviid>you don't want to change the name
<str1ngs>keep in mind I have widget-uri because of boxing
<daviid>expect fron that one char
<daviid>pre or post fix
<str1ngs>also !uri on the widget is not writable so that caused issues as well
<str1ngs>I'm find with the g-golf convention. just trying to get it to fit with emacys and my abstraction
<daviid>str1ngs: g-golf also has immutable slots, but i kept the convention ... this is all explained in the doc ...
<daviid>trying to set an mmutable slt is a user responsibility
<daviid>anyway, all this is coplicated to explain, it requires decades of experience, that you can't buy in a shop
<str1ngs>what I'm saying is the ! convention reasons better for nomad if I use !buffer-uri vs !uri
<str1ngs>so I think I can get it to work that way.
<daviid>yu may do that, later, for emacsy as well,
<str1ngs>keep in mind there is a boxed widget that would then also have a !uri see the confustion?
<daviid>these ar methods
<daviid>no confusion
<daviid>g-golf has hunderds of !this-verry-same-name-every-where
<daviid>that is exacty why we ue goops
<str1ngs>I can compromise and use !buffer-uri for now this is easier for me to reason. maybe it's my lack of goops experience though
<str1ngs>before I started writing nomad I had zero guile or goops experience lol
<daviid>fine
<daviid>but read the dox and tell me if you don't understand, or if something is not well explained ...
<str1ngs>theoretically I undestand and I don't disagree. is more of practical application on my part.
<daviid>str1ngs: if you se !bufer-uri, the i suggest you name the solt buffer-uri
<str1ngs>in the case of buffer-uri it important I reason I'm working with the buffer and not the widget
<str1ngs>but I will try to use the conversion more. it might just be my lack of experience right now
<daviid>str1ngs: to me, that is irrelevant, the user acesses the uri slot, and the convention tells they should do that using a convention, either !uri, _uri, uri_ ...
<str1ngs>actually it's probably my design was not so great at first. it's gotten much better so that might help
<daviid>str1ngs: with all due respect, buffer-xxx is wronf
<daviid>*wrong/not a good idea
<str1ngs>not when I have widget-uri as well. it's import to know what I'm working with
<daviid>str1ngs: you are trying to make the inheritance 'visible', where you shld try ti hide it ...
<daviid>no it's no
<daviid>but ok, i'm gona work now, good luck
<daviid>str1ngs: what you are workig with is being told by the instance
<daviid>not the slot
<daviid>i'm done
<clodeindustrie>hi there
<clodeindustrie>just starting up with Guile
<clodeindustrie>I have installed guile-dsv with Guix and wanted to use it in a script
<clodeindustrie>but I am getting a "no code for (dsv)"
<clodeindustrie>not sure what to do, is there some sort of classpath? or do I need to specifically load the guile-dsv module file?
<str1ngs>clodeindustrie: hello have you installed guile into your profile as well?
<clodeindustrie>mm
<clodeindustrie>well I have installed guile via guix so I think it's loaded as part of my current profile
<clodeindustrie>I think..
<clodeindustrie>I source my profile in my .bashrc
<str1ngs>you might need to restart your terminal
<str1ngs>check with echo $GUILE_LOAD_PATH
<clodeindustrie>ah
<clodeindustrie>indeed
<clodeindustrie>thanks for that
<str1ngs>working now?
<clodeindustrie>yes but I think must be doing something wrong with the profile anyway
<str1ngs>are you using guix system or foreign distro?
<clodeindustrie>I do source it in my bashrc but I still get the warning when installing stuff
<clodeindustrie>foreign
<clodeindustrie>voidlinux
<str1ngs>what warning do you get?
<clodeindustrie>let me get that for you
<clodeindustrie>hint: Consider setting the necessary environment variables by running:
<clodeindustrie> GUIX_PROFILE="/home/clodeindustrie/.guix-profile"
<clodeindustrie> . "$GUIX_PROFILE/etc/profile"
<clodeindustrie>Alternately, see `guix package --search-paths -p
<clodeindustrie>"/home/clodeindustrie/.guix-profile"'.
<clodeindustrie>sorry for the copy pasta
<str1ngs>clodeindustrie: IIRC that could me you just need to restart your terminal for the variable to take effect.
<str1ngs>some package like guile use search paths to set environment variables in $GUIX_PROFILE/etc/profile
<clodeindustrie>cool thanks
<str1ngs>and the first time it's installed it will warn you need to source the profile
<clodeindustrie>oh right I see
<str1ngs>if the problem persists then it could be your profile sourcing is not setup right.
<clodeindustrie>I thought I was missing something when it's just telling me to do it now
<str1ngs>right
<clodeindustrie>nice
<rlb>wingo: hmm, I take it back, I think maybe #f for the first collision node case and #t for the second one...
***apteryx is now known as Guest32737
***apteryx_ is now known as apteryx
<gour>morning
<gour>i'm considering which langauge to use for writing (multi-platform) desktop app and besides languages like {Eiffel, Nim}, I'm also considering Racket having GUI DSL out-of-the-box, but wonder what is the situation with Guild in regard to 3.0 release which, afaict, does improve performance significantly?
<wingo>moin
<wingo>gour: i think from an out-of-the-box gui POV, the situation in guile is in flux; the most modern support is based on gtk3 and gobject-introspection, but i am not sure how well that works on non-gnu platforms
<wingo>there is pretty ok opengl bindings, but that's much lower-level
<wingo>and you can drive a web browser pretty well also
<wingo>building cross-platform gui apps these days is not obvious :)
*RhodiumToad is planning to try out the newer gobject-introspection projects at some point when they have stabilized a bit
<RhodiumToad>I think Tk is probably the most cross-platform gui toolkit, but (a) the old look is widely disliked (though I personally have no issue with it) and the newer stuff is harder to use, and (b) it means you have to put up with using Tcl
***gour_ is now known as gour
<gour>RhodiumToad: yeah and with Tk, I'd probably have to use C (due to performance) more than I desire, although whatever I choose I'd have to use FFI to bind some required 3rd party C lib
<RhodiumToad>IUP claims to be portable but doesn't (currently?) support macos, only windows and unix
<RhodiumToad>also IUP is the next thing to impossible to actually build
<gour>there are unice issues as well, iirc
<gour>*unicode
<RhodiumToad>I never got as far as trying it, having had two goes at building it and giving up both times
<wingo>if i had to build and ship such a thing these days i think i might use electron :P a very heavyweight solution but it does work well
<wingo>otherwise maybe a local web browser or something
<d4ryus>electron apps kill your battery tho :(
<pinoaffe>hi everyone! when I use "write" to write a list of dates to a file i cannot "read" it back, is that expected behaviour (aka, should I manually be encoding and decoding these dates as strings) or am I doing something else wrong?
<d4ryus>pinoaffe: not sure what those 'dates' are, but some things cant be read (like objects, hashmaps, ...)
<d4ryus>pinoaffe: e.g. everything that prints with #<...> cannot be read
<gour>wingo: i simply do not like js-based solution. my native platform is linux, but it would be nice to be able to have both mac/win versions. what is the status of gtk2(3) & guile?
<gour>otherwise, racket seems as decent option having gui-part abstracted to provide 'native' support
<sirgazil>gour: The status is pre-alpha, as far as I understand. See GNU G-Golf (https://www.gnu.org/software/g-golf/) and guile-gi (https://github.com/spk121/guile-gi).
<gour>sirgazil: ok. thanks. so it seems that atm racket is a better option
<jcowan>IMO the Right Thing nowadays is to do a desktop app as a local HTTP server
<dsmith-work>Wednesday Greetings, Guilers
<apteryx>How can I filter out ANSI escape sequences directly from Guile, from some system* launched application?
<apteryx>I guess I need to connect it to a pipe?
<dsmith-work>apteryx: No success in disabling those at the source then?
<apteryx>nope
<apteryx>I grepped for escape codes in both SeaBIOS and QEMU, but can't find anything.
<dsmith-work>Hmm. I wonder if maybe setting the TERM (think that's the one) env var to someting dumb would help.
<dsmith-work>apteryx: Ya, try TERM=dumb and see how that works.
<dsmith-work>apteryx: If you didn't find escape codes, then they could very well be using curses or something that uses terminfo.
<dsmith-work>dales@debian:~$ clear | hd
<dsmith-work>00000000 1b 5b 48 1b 5b 32 4a 1b 5b 33 4a |.[H.[2J.[3J|
<dsmith-work>0000000b
<dsmith-work>dales@debian:~$ TERM=dumb clear | hd
<dsmith-work>dales@debian:~$
<apteryx>very interesting!
<apteryx>but if Guix is using system* to launch QEMU, that won't be of any help, or will it?
<dsmith-work>There has got to be some way set an env variable for that.
<dsmith-work>IMHO, it's just wrong to assume you can spit out whatever random escape sequence without querying the terminal type.
<apteryx>well, the BIOS is probably a bit like Windows, expecting to be the sole thing running on the machine at the time it executes ;-)
<dsmith-work>apteryx: Oi.
<wingo>woo i found the fibers bug
<wingo>nckx: were you the one that pointed this one out to me?
<chrislck>woot
<wingo>about ready for a 3.0.1 i guess
<jcowan>hopefully with the Cygwin fixes
<wingo>they are already in i think
<wingo>perhaps mike gran has some uncommitted bits
<civodul>wingo: yay for 3.0.1!
<civodul>did you see my comments regarding the AArch64 weak table issue?
<wingo>no i haven't seen them yet :)
<civodul>ah well, i just mentioned here yesterday that that one is a blocker for Guix on AArch64
<civodul>but i have new findings: https://issues.guix.gnu.org/issue/39266
<civodul>basically current master seems to work on AArch64, although that's a bit "by chance"
<wingo>that's... terrible :)
<civodul>yeah
<civodul>another issue is JIT on ARMv7: https://issues.guix.gnu.org/issue/39208
<civodul>though in the meantime we can just --disable-jit
<rlb>civodul: I wonder if that's the debian buildd bug too. Is that armel? https://buildd.debian.org/status/package.php?p=guile%2d3%2e0 i.e. if so, perhaps I need to disable the jit there too for now.
<wingo>o/
<weinholt>\\o
<sneek>\\o//
<nly>how does one go about converting a racket pkg to guile?
<nly> https://pkgs.racket-lang.org/package/graph-lib
<chrislck>(use-modules (blood) (sweat and tears))
<chrislck>:)
<chrislck>or the other popular packacge (use-modules (elbow grease))
*chrislck hopes for a rastache->guile port one day too
<nly>haha
<chrislck>or, if wingo has his way for 5.0, #lang racket
<nly>i'll give rastache a try?
<chrislck>\o/
<nly>looks hard lol
<chrislck>... /o\
<nly>lol, but gotta try to find out :)
<chrislck>they have CL-mustache too...should be easy for some, not for me
<nly>oh nice
<rotty>wingo, civodul: any idea on #39610, and my idea of re-introducing the `flush` operation in `scm_t_port_type`?