IRC channel logs


back to list of logs

<zv>is there any small set of macros implementing another OOP system in scheme?
<zv>(small meaning < 150loc)
<daviid>zv: another oop? other then what
<zv>other than goops
<daviid>I don't think so, but why, if I may ask?
<zv>partly because I'm curious how smart people have thought about this problem, but partly because I hate making a message dispatch function, creating functions that call that dispatch function and setting up a 'let' with "member variables"
<daviid>how smart people has ever been is CLOS, and GOOPS is a subset of clos
<zv>I mean, you can do 'data directed programming', but that adds some problems too (like any function not immediately declared is looked up in a vtable-alike)
<daviid>you should learn and use goops for a while
<zv>I feel like I've learned GOOPs as well as I ever will
<zv>I mean, obviously thats an exaggeration
<daviid>and read a bit about why a generic function multi method polimorphic system based op is an order of mag sup to anythig else
<daviid>zv: you should post yout code then
<zv>I mean, the designers of GOOPS have this long set of posts on the guile-devel on how GOOPS has tons of problems, is contrary to the 'vision' of scheme, so on and so forth
<daviid>if you feel you miss something, then, imo, your design is wrong
<zv>daviid: ok, take for example this:
<daviid>dont let you 'poluted' by these 'non scheme' comments, they are all non sense
<zv>(i have a few things in chapter 3 that are traditional inheritance done with GOOPS, the example I posted doesn't use GOOPS at all)
<zv>daviid: One of the tricky problems in converting that 'classical OOP' code to GOOPS is that you no longer call functions on the object with a message, it's all done in the style of C++ functions w/o virtuals
<daviid>which is good, C++ and friends are disasters, java by far the worst ever written by human being :)
<zv>So, for example, in writing this bytecode interpreter and compiler, I want to hook up this machine definition to a GUI I've written in goops
<zv>daviid: If you use a C++ function w/o virtuals it gets converted into the 'equivalent' code in C
<daviid>forget about any C++ and java 'way' of doing things
<zv>That is to say: struct object {} and fns like so_and_so(object* this) { ... }
<zv>daviid: This isn't a question about OOP, this is an implementation question
<zv>If a function is being dispatched via virtual table or with a static function that can be 'relocated' at link-time or by the guile compiler tower
<daviid>zv: design is not easy, it requires learning, experience ... I suggest you read a bit more about CLOS, then the stkos manual (goops manual but a little bit nicer to read), then write something small, then I can look at (or other guilers)
<zv>daviid: So, I guess my question emerges again. If I'm trying to reimplement, say, interrupts or register tracing in GOOPs, I have to make everything a hook and there is no way to get indirection on anything except the definition of the slot-ref etc
<zv>I mean, I've already written a bit of GOOPS, I wrote a circuit simulator and 3SAT solver and used Goops and even explored metaobject, I'm not sure how much more I'm going to get out of it
<zv>I'm eager to learn that I'm totally wrong and that there is a whole 'nother level of depth to GOOPS, but for now I'm looking at more 'traditional' non-CLOS based definitions of OOP (maybe with syntax-case macros)
<daviid>zv: i hve to concentrate on something else. you'll get as much as you can, if you study ...
<daviid>zv this is not a good idea, 'traditional blabla' is just all wrong (wrt oop I mean), but I'm done for today on this, good luck, and if very precise goops quiz, with code snip set, I'm happy to look, anything else I'll get bored in a minte, sorry
<zv>daviid: Ok, here's the precise question: How can I write a performant abstraction around classical software interrupts in an x86 virtualization package while retaining the ability to create functions that can share functionality with other pieces of code
<daviid>don't use 'traditinal' oop, forget about it all and use goops, that is my tip for today
<zv>wow, thanks
<daviid>zv this is a general and design related quiz, no time sorry
<zv>this is a very specific question
<zv>like "how can I get make-hook to not be a slow detour"
<zv>anyway, take it easy
<daviid>'performant abstraction' 'classical interrupt' ... sorry no time for this
<zv>daviid: what if someone asked a question that concerned the implementation details of objects under a particular system and someone asks you to post more and more info about your problem and you spend 10-15 minutes doing so, and then at the end they said "oh lol just use php or cuz lisp 1z stupid"
<zv>anyway, food for thought, have a good night :)
<Bobbejaantje>So is there a way to access Linux' prctl interface from guile?
<rlb>zv: no idea what you're trying to do, but I suspect dynamic behavior is likely to be expensive, especially in the presence of mutation and concurrency, regardless. Though given sufficient constraints or a "sufficiently smart jit" you'll have additional flexibility. For example, I believe the jvm jit *sometimes* wins by rewriting code (method dispatch) at runtime, based on program behavior (and I'd imagine it sometimes loses too).
<amz3>I pushed a copy of my tutorial @
<amz3>btw you can login to framgit using gitlab or github
<wingo>ACTION pushed guile srfi-18 changes
<paroneayea>so, I've hit weird issues with gnutls and the new guile w/ https support *only* when it's wrapped in the custom-binary-input/output-port stuff. It doesn't happen on all sites. I updated the bug with more info.
<paroneayea>so, it could be my fault, or it could be a problem with custom-binary-input/output-port... it's not gnutls, since it works fine before that change.
<paroneayea>I'm not sure what it is. anyway, more info on the bugtracker.
<daviid>so, working on guile-vigra, I'd like to have a way to see/display images from the repl, what would be the easiest way, smallest possible binding I could use to do that, anyone has an idea? something really basic
<paroneayea>daviid: geiser has support for that iirc
<paroneayea>I don't think it has support for guile though, I know it can do it for racket
<daviid>paroneayea: ah, yes, that won't work for guile indeed
<daviid>paroneayea: I'd like something like xcb maybe, or something I'm not aware of ... very simple (not to augment depency for users...
<paroneayea>daviid: CLIM for GOOPS?? ;)
<daviid>paroneayea: :) I wish
<daviid>paroneayea: no, at this moment, it is just to allow users to see the result of processing their image using guile-vigra
<daviid>mmaybe I should just use clutter and provide a mnual binding of the few functions I would need
<daviid>hum, that would be already quite some work, I'd like something easier
<daviid>i think someone worked on guile xcb, or am I wrong?
<paroneayea>I think guile-wm used xcb but maybe I'm wrong.
<paroneayea>maybe it was xlib.
<daviid>paroneayea: clim for goops is guile-gnome. I said 'I wish' but I actually prefer guile-gnome
<daviid>paroneayea: will look
<TMA>guile-gnome is awesome but it is not nearly clim
<paroneayea>yeah I don't think guile-gnome is CLIM
<daviid>guile-wm seems unmaintained
<paroneayea>it is
<jmd>TMA: There is a new attempt a Guile-Gnome binding somewhere.
<daviid>Most CLIM objects are immutable... cool stuff, but a monster to implement, in another life maybe ... (I used clim in the past by the way, wayyy back...)
<artyom-poptsov>Hello davexunit
<artyom-poptsov>There's Guile-SSH bug report created by you earlier this year, could you please review if the report still actual?
<artyom-poptsov>I suspect the bug should be fixed by now; if it turns out to be so, I'll close the bug report.
<daviid>davexunit: how about using sdl?
<daviid>no, not a good idea :)
<linas>mpfr & guile - is there such a thing? or gmp& guile?
<daviid>davexunit: just grabbed guile-sdl2, and ./configure: line 2457: syntax error near unexpected token `2.2'
<daviid>./configure: line 2457: `GUILE_PKG(2.2 2.0)'
<linas>guile is notable in it's absence from
<wingo>linas: guile uses gmp
<wingo>we have talked about mpfr in the past but have done nothing :)
<ArneBab_>linas: do you see a good reason why Guile is absent?
<ArneBab_>we could just copy the Racket entry
<daviid>davexunit: it works if I add m4/guile.m4 (copying the latest from guile) and AC_CONFIG_MACRO_DIR([m4])
<linas>wingo - yes, gmp for ints, but what about floats?
<paroneayea>hey davexunit