Thanks!
(Of course, if the code doesn't depend on your Scheme+ but is written in
code only depending on the Guile distribution, and if it doesn't print out
logging information when resizing vectors, then it would be more generally
useful.)
Best regards,
Mikael
On Sat, May 8, 2021 at 11:11 PM Dam
finally finished this Growable Vector class for 1 dimension Vectors, i will
update all for multidimensional arrays
(probably for rectangle arrays and vectors of vectors of different
dimension) but i do not need all this in near future.
it is usable with:
(use-modules (growable-vector))
the code o
hello Mike,
thanks you
our message crossed
i find the same deduction too
On Sun, May 2, 2021 at 12:26 PM Mikael Djurfeldt
wrote:
> make is exported by (oop goops), so yiu always need to do:
>
> (use-modules (oop goops))
>
> to use it.
>
> Also, you should only use use-modules to load proper modu
On Sun, May 02, 2021 at 12:14:37PM +0200, Damien Mattei wrote:
> i use now the good way to loadmodule:
>
> scheme@(guile-user)> (set! %load-path (reverse (cons "." (reverse
> %load-path
Apart from what Mikael says: if you want to modify `%load-path', you
typically want to add your "special" d
juste understood LOL :
scheme@(guile-user)> (use-modules (gvector))
scheme@(guile-user)> (use-modules (oop goops))
scheme@(guile-user)> (define c2 (make ))
needed to load all the modules by hand even if used already by gvector, in
gvector definition, confused
On Sun, May 2, 2021 at 12:1
make is exported by (oop goops), so yiu always need to do:
(use-modules (oop goops))
to use it.
Also, you should only use use-modules to load proper modules (starting with
define-module). If it is plain scheme code, use load.
Den sön 2 maj 2021 12:15Damien Mattei skrev:
> i use now the good w
My template file creates the module (oop gvector). (Probably a bad name for
this module, btw.)
If you load it using load, you will still be in the (guile-user) module, so
you won't see its bindings. To see them, you can do:
(use-modules (oop gvector))
after having loaded the module using load.
i use now the good way to loadmodule:
scheme@(guile-user)> (set! %load-path (reverse (cons "." (reverse
%load-path
scheme@(guile-user)> %load-path
$1 = ("/usr/local/Cellar/guile/2.2.6/share/guile/2.2"
"/usr/local/Cellar/guile/2.2.6/share/guile/site/2.2"
"/usr/local/Cellar/guile/2.2.6/share/g
seems your template isn't working:
scheme@(guile-user)> (load "gvector.scm")
;;; note: source file
/Volumes/Mojave/Users/mattei/Dropbox/git/library-FunctProg/gvector.scm
;;; newer than compiled
/Users/mattei/.cache/guile/ccache/2.2-LE-8-3.A/Volumes/Mojave/Users/mattei/Dropbox/git/library-F
Preferably, the dispatch should be done as much as possible during compile
time such that it takes zero time during runtime.
On Fri, Apr 30, 2021 at 4:50 PM Mikael Djurfeldt
wrote:
> Generic method dispatch is *supposed* to be fast. It was fast once upon a
> time. We should fix that.
>
> On Fri,
Generic method dispatch is *supposed* to be fast. It was fast once upon a
time. We should fix that.
On Fri, Apr 30, 2021 at 2:19 PM Stefan Israelsson Tampe <
stefan.ita...@gmail.com> wrote:
> If performance is important, a goops solution can be slow in vector-ref
> and vector-set! operations due
If performance is important, a goops solution can be slow in vector-ref and
vector-set! operations due
to two reasons. (I have pounder an implementation of resizable python lists
and here is my tips),
1. slot-ref/slot-set! is slow (I try to fix this using the much more
difficult struct-ref/struct-
On Fri, Apr 30, 2021 at 1:11 AM Damien Mattei
wrote:
> for example in the doc there is:
> (define-class () r i #:name "Complex")
>
> seems superclass is of no use
>
Well, it certainly *is* of use in the sense that methods operating on
will immediately start to also accept as an argument.
Tha
The superclass question is a matter of taste.
First note that in CLOS-like objects systems, such as GOOPS, methods are
not components of classes but it is rather the set of operations =
generics/methods around a type which define its behavior. Roughly speaking,
the only things directly tied to the
thank for your answer but my question was just about use of superclass
SRFI implementation is too complex for what i want to do now,
template is 1 dimension gvector, that's neolithic for me :-) and do not
explain use of superclass...
Damien
On Fri, Apr 30, 2021 at 9:57 AM Linus Björnstam
wro
This does not answer your question, but:
There was just a SRFI released for growable vectors. I don't know about any
interest to have it included in guile, but the reference implentation is
probably trivially portable: https://srfi.schemers.org/srfi-214/srfi-214.html
--
Linus Björnstam
On
Hi!
I attach a template which you could build on. Please post your class when
you're done. :)
Best regards,
Mikael
On Fri, Apr 30, 2021 at 1:11 AM Damien Mattei
wrote:
> hi,
> i want to create a growable vector class in Guile,
> such as std::vector or python list,
> first i do not know if it e
Hi Damien,
On April 29, 2021 7:10:12 PM EDT, Damien Mattei wrote:
>hi,
>i want to create a growable vector class in Guile,
>such as std::vector or python list,
>first i do not know if it exist already? seems not
>
Regarding your immediate need for a growable vector type, Guile implements
VLists
18 matches
Mail list logo