<jcowan>If there is a way to get a pipe on the child's stderr, I don't know what it is. <ThomasAlbers>I mean something to avoid (open-pipe "echo test | cat" OPEN_READ) where i have to build a string and use a shell <alextee[m]>btw, what does scm_call_0 () return? i found this: ret = vm_engines[vp->engine](thread); <alextee[m]>according to %p it returns "0x804" when it succeeds <str1ngs>alextee[m]: can be any scheme type, so depends what proc you call. say (define (bar) "baz") if you call bar it return SCM which you can get with scm_to_locale_string *alextee[m] is basically looking for a way to detect if there were any errors (and hopefully get the error message) when running scm_call_0() <str1ngs>well you can wrap it in a C exception <str1ngs>but that can be tedious from C. I try to just check the return types. and let scheme throw it's exceptions <str1ngs>alextee[m]: maybe have one toplevel scm_c_catch. probaby you are using eval for user stripts so I make that eval safe. <alextee[m]>str1ngs: oh this looks like what im looking for, thanks! <str1ngs>alextee[m]: also I find only write C defines for the most minimal use case. and use scheme modules scripts everywhere else. <alextee[m]>i guess it runs things sequentially so as long as there's no syntax errors before the catch it will catch any syntax errors inside.. probably <str1ngs>I'm still quite new to scheme to comment on that. other can explain unwind etc <str1ngs>alextee[m]: I'd probably have some top level scheme that calls the SCM_DEFINE with a catch. <str1ngs>so something like (define (eval-user-input text) (catch #t ....)) you get the idea. <str1ngs>alextee[m]: then you don't need to use scm_c_catch because it's tedious :) *alextee[m] found an example in nomad *alextee[m] seems M4/GObject/QT in a single project and tries to calculate how this could possibly work <str1ngs>don't show this the the GTK folks they will hate this idea haha <str1ngs>I think I can avoid this though. I only need the qtwebengine control <str1ngs>though giqt would be fun for others to use I guess. <str1ngs>alextee[m]: GOBject is not so bad. its deriving GtkWidget which is probably not the best. <alextee[m]>str1ngs: i think that's the other way around. GtkWidget inherits from GObject <str1ngs>right, but but I derive from GtkWidget since it gets things working faster. notice I can do gtk_container_add <str1ngs>probably can derive from GObject and then have a QTContainer. <alextee[m]>oh yeah if you're doing custom widgets you're supposed to inherit GtkWidget afaik <str1ngs>this is just proof of concept anyways. <alextee[m]>or whatever's similar to the widget you're doing, but for just drawing with c airo the gtk devs said you should use GtkWidget <str1ngs>for this I QtWidget derives from GtkContainer. due to how QT works. all controls are containers <alextee[m]>i'm amazed how you can do that. i'm aware of some other kind of hack to run qt in gtk using C, but just inheriting widgets to do it is new to me <alextee[m]>GtkPort or something like that, where you get the X11 window of the qt thing and embed it in a gtk container, or something like that <str1ngs>alextee[m]: that's the approach I'm going to probably use for nomad <str1ngs>this way I only need to emmbed qtwebengine the rest can stay GTK <alextee[m]>it's a library that allows a host to embed widgets from other toolkits <str1ngs>I think for nomad the X11 embedding would be better. less code <str1ngs>though theoretically if a designed it right you can use more then one backend <str1ngs>right, I'm going to write a typelib that proveds a qtwebengine control. then I can use it from scheme with g-golf <str1ngs>will be awhile before I get there though. webkit is pretty good IHMHO <str1ngs>also my buffer use generic methods so. load-uri would work on any web buffer class <str1ngs>alextee[m]: does your program support midi? <str1ngs>I'll have to try it with my midi keyboard :) <str1ngs>I hear ya, nomad is still pretty alpha too. though it's come along way. the g-golf branch is about 300 revision ahead of master now. ***rekado_ is now known as rekado
*guix-vits Hi there; *afk* <d4ryus>hi, i would like to save the current module, evaluate something and then switch back to it. (current-module) returns the current module, but i cannot find a function to switch back to it, is there one? <rekado>d4ryus: you can use save-module-excursion <rekado>I use it with set-current-module to evaluate some user-provided code in a configured environment without affecting the current module. <phoe>Hey! I have a design question. What is the reason that some vector operations in Guile have only destructive variants in standard (vector-set! for example)? I just ran into a use case where I could use a copying/non-destructive vector-set, but I would need to define it manually via copying the original and then mutating it. <brendyyn>phoe: perhaps we should create a batteries included bytevectors libarary. I've been using them in my current project and found there isnt everything i need in (rnrs bytevectors). I've written bytevector-reverse, bytevector->number, bytevector-append, and used guix's base16-string->bytevector. <civodul>phoe: i don't see the gnunet.org URL in the topic <phoe>civodul: oh right! sorry, it was in the ChanServ autojoin message <phoe>brendyyn: my issue is that Guile is a functional programming language by definition, and yet it doesn't really provide functional operators for vector access. One needs to construct it oneselves, or - as you mentioned - use a library from an external source. <phoe>(I don't mean just bytevectors though - general vectors are affected, too.) <daviid>phoe: there is a fectors (functional vectors) library somwhere <sneek>Welcome back daviid, you have 1 message! <sneek>daviid, str1ngs says: can you confirm for me that changing the test 'test-g-value-get-pointer to use /dev/null is okay. guix build environement does not have /dev/tty. I'm pretty confident /dev/null is okay WDYT? I can substitute this so no need to change it. <brendyyn>the amound of javascript required just to display that text page... <phoe>much less javascript required <phoe>and it seems it's more fresh than the BB version <phoe>Drew's orthodox minimalism has its upsides, yes <d4ryus>rekado: save-module-excursion is exactly what i was looking for, thank you! <alextee[m]>str1ngs: well, i still can't figure out how to get the "what went wrong" message from catch, but scm_c_catch worked in detecting if an error occurred! ^ <chrislck>alextee[m]: you can always (define last-catch-error "") ... (catch etc (set! last-catch-error "error explanation")) then from C, you can call scm_c_eval_string ("last-catch-error") to retrieve the error message <alextee[m]>i want the scheme to be as simple as possible so it's easy to get into for users with no programming experience <alextee[m]>unless you mean running that scheme code from C before running this script <chrislck>you can wrap your user-supplied guile script with a catch <alextee[m]>chrislck: interesting, thanks! i will try this now <chrislck>the functional way would be for (catch) to run the script, and will return (list 'success output) or (list 'failure error-message) then process the 2-element list in C <alextee[m]>are display-backtrace and print-exception standard scheme procedures that return the actual errors? <alextee[m]>i mean, can't i just run those in my catch handler in C? <chrislck>levelling up in scheme means you unlock more chapters in the book ^_^ <alextee[m]>i guess just format string on that example and put my script code in an %s <alextee[m]>i will format the string in C before calling the whole thing with scm_call :-) <dsmith-work>srandon111: Several good books on Scheme, but nothing Guile specific that I know of. <luni>Hi all i would like to ask information regarding OOP in Guile. I'm looking at the available online documentation and all is fine, anyway there is any introductory resource for interfaces/protocols to be used in the context of OOP with GOOPS? Thank you in advance <rekado>luni: is there something specific you are missing from the Guile reference manual on GOOPS? <luni>thank you for the answer, i will try to explain my situation to be more precise for what is possible <alextee[m]>searching for "print_exception" doesn't bring up something in the guile docs <luni>(premise) I'm new of OOP.... i have few classes and a lot of generic methods so inheritance is working well. But since generic methods are a lot i would like to have an efficient way to look at my code <luni>and classes are not explicitly describing the methods that are related to them <luni>so for me ok... all is working, but is a mess to read my own code. <luni>so i'm searching some reference about good practice to follow in OOP even from a stylistic point of view <luni> perhaps some examples from which to draw inspiration would be fine ***dozzie is now known as dozzie_
***dozzie_ is now known as dozzie
<manumanumanu>Is there a reason we don't have define-inlinable* with keyword and optional arguments? Looking at define-inlinable I think I could maybe make it work... <civodul>manumanumanu: no good reason i guess! <manumanumanu>define-inlinable could trivially be implemented using define-inlinable*: you could just validate that all the formals are identifiers and dispatch to lambda* which "downgrades" to lambda when there are no keywords ***rubdos_ is now known as rubdos
<manumanumanu>civodul: would there be any interest in such a patch? I understand adding things to boot-9 isn't really anything anybody wants to do, but I know I have not been alone in trying and being frustrated that it did not work. <civodul>manumanumanu: why not, worth discussing <str1ngs>hello, when using a public parameter is it advisable to use the % naming prefix?