Re: define-typed: checking values on proc entry and exit

2024-05-20 Thread Linas Vepstas
One of my old interests has been storing data as s-expressions. But just "storing" data is kind of useless, unless you can also search through it, query it. And, from experience, search/query is mostly useless without typing. Is `(foo (bar baz))` of type `(surname (given-name occupation))` or is it

Re: Some issues with guile

2024-04-27 Thread Linas Vepstas
On Sat, Apr 27, 2024 at 2:47 AM Nikolaos Chatzikonstantinou < nchatz...@gmail.com> wrote: > On Fri, Apr 26, 2024 at 4:39 PM Tomas Volf <~@wolfsden.cz> wrote: > > > > What you want is: > > > > (set-object-property! foo 'documentation "Contains a @code{'bar}.") > > Okay, so this can document obj

Re: Guile + SWIG

2021-04-07 Thread Linas Vepstas
Hi Paul, Conventionally, a guile module would look something like (define-module (test-embedding)) (use-modules (srfi srfi-1)) ; .. etc (define (enahanced-ligand-coot-p) #t) ; etc. (export enahanced-ligand-coot-p) In your example, you never explained how "enahanced-ligand-coot-p" magical

Re: Guile + SWIG

2021-04-05 Thread Linas Vepstas
Hi Paul, Conventionally, a guile module would look something like (define-module (test-embedding)) (use-modules (srfi srfi-1)) ; .. etc (define (enahanced-ligand-coot-p) #t) ; etc. (export enahanced-ligand-coot-p) In your example, you never explained how "enahanced-ligand-coot-p" magical

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
To answer my own question, I've now got a glimmer as to how to do most of this, using syntax-case and quasi-syntax, as described in https://www.gnu.org/software/guile/manual/html_node/Syntax-Case.html#Syntax-Case with the display-compile-timestamp example, and then cleverly reworking that. ...Basi

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
Hi Taylan, Our emails are crossing in the ether... On Sat, Jan 11, 2020 at 9:21 PM Taylan Kammer wrote: > > It might be possible to create a sort of "compile-time memoization" Yes, that's what I'm looking for... So the following: > > (display (f-memo 42)) > (display (f-memo 66)) >

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
Thank you Taylan! So let me seize on this statement: On Sat, Jan 11, 2020 at 3:56 PM Taylan Kammer wrote: > On 11.01.2020 19:52, Linas Vepstas wrote: > > When you compile the code, all that actually ends up in the program is > "(display ...)" with no trace of the or

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
Thanks Taylan, gmail is on the fritz lately and doesn't show replies until after I post; let me read what you wrote and ponder. ~~~ On Sat, Jan 11, 2020 at 3:56 PM Taylan Kammer wrote: > On 11.01.2020 19:52, Linas Vepstas wrote: > > Or, thinking aloud a bit: boxes and symbols.

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
ables on to the c++ function. Now if I could just memoize-in-place, without the hash table ... --linas On Sat, Jan 11, 2020 at 12:52 PM Linas Vepstas wrote: > Or, thinking aloud a bit: boxes and symbols > > So, for example, if I was able to tell apart calls (f 42) from calls (f x)

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
l apart "42" from "y" ? -- Linas On Sat, Jan 11, 2020 at 12:11 PM Linas Vepstas wrote: > Hmm Thanks. Perhaps I should have been more clear. I'm talking about a > handful of values that behave like constants, and NOT about memoization. > > So here's a

Re: Pure (side-effect-free) calls into c/c++?

2020-01-11 Thread Linas Vepstas
(f 42) (f x) (f 43)) into (define c42 (f 42)) (define c43 (f 43)) (define (foo x) (g c42 (f x) c43)) so that guild can treat c42 and c43 as constants (boxes, I guess). -- Linas On Sat, Jan 11, 2020 at 8:39 AM Matt Wette wrote: > On 1/10/20 2:36 PM, Linas Vepstas wrote: > > So, I

Pure (side-effect-free) calls into c/c++?

2020-01-10 Thread Linas Vepstas
So, I've got lots of C code wrapped up in guile, and I'd like to declare many of these functions to be pure functions, side-effect-free, thus hopefully garnering some optimizations. Is this possible? How would I do it? A cursory google-search reveals no clues. To recap, I've got functions f and g

Re: Now crashing [was Re: guile-2.9.2 and threading

2019-07-17 Thread Linas Vepstas
x7efcd152baa0 sp_min=0x7efcd152b888 stack_lim=0x7efcd152b000 duuude wrong type to apply! The addresses all look healthy. I also added a guard-word, looking for memory corruption, but none was found. Next up: decoding the SCM by hand, and figuring out why it's there. -- Linas On Sun, Jul 14,

Re: Now crashing [was Re: guile-2.9.2 and threading

2019-07-14 Thread Linas Vepstas
=0x2965ca0) at ../../libguile/symbols.c:244 The parallelism is low because of this one lock. This appears to be the primary bottleneck for my workload. -- Linas On Sun, Jul 14, 2019 at 5:03 PM Linas Vepstas wrote: > Below was for > guile (GNU Guile) 2.9.2.14-1fb399 > > --linas >

Re: Now crashing [was Re: guile-2.9.2 and threading

2019-07-14 Thread Linas Vepstas
Below was for guile (GNU Guile) 2.9.2.14-1fb399 --linas On Sun, Jul 14, 2019 at 4:59 PM Linas Vepstas wrote: > > So, here's my next installment on using guile-2.9.2. The first installment > said that I'd piled up CPU-months of guile 2.9.2 experience without any >

Now crashing [was Re: guile-2.9.2 and threading

2019-07-14 Thread Linas Vepstas
So, here's my next installment on using guile-2.9.2. The first installment said that I'd piled up CPU-months of guile 2.9.2 experience without any crashes. Well, now, a different workload crashes in minutes. Below is a highly simplified, edited gdb session -- it crashes because it unexpectedly abo

Re: guile-2.9.2 and threading

2019-07-09 Thread Linas Vepstas
Hi Mark, Sorry for the late reply; my email client mananged to hide your email where I won't see it. I need to fix this. On Thu, Jun 6, 2019 at 11:28 PM Mark H Weaver wrote: > > You'll need to look at the stack frames on the Scheme stack. It can be > done from GDB if necessary, but it might be

guile-2.9.2 and threading

2019-06-02 Thread Linas Vepstas
I'm trying to understand how scm_jit_enter_mcode leads to scm_timed_lock_mutex ... I want to know who is attempting to lock, and why ... and how to work around this... Background: par-for-each works poorly for my app, I want to understand why. Specifically, how par-for-each and n-par-for-each work

Re: Matrix or array operations library

2019-06-02 Thread Linas Vepstas
Me too. With one significant difference: I have extremely sparse arrays. Like, only one-in-a-million array entries are non-zero. And my arrays are hug -- say 2M by 2M, for a total of 4 tera-entries, of which only one in a million are non-zero, so in fact, my data might fit in a gigabyte or less.

Re: On the Guile-SSH future

2019-06-02 Thread Linas Vepstas
FYI, I've written a guile telnet server; unfortunately it is deeply buried in another project and would be hard to abstract. Why do this? Well, because the default guile-2.2 network REPL server was slow, would crash, deadlock, have terrible response times, etc. making it embarrassingly unusable.

Re: guile-2.9.1 impressions

2018-12-05 Thread Linas Vepstas
ses of hacks and ick and needless complexity and confusing confusion.) -- Linas On Wed, Dec 5, 2018 at 9:56 PM Linas Vepstas wrote: > > So I pulled guile-2.9.1(beta) today, and gave it a spin. Looks > good/great! One bug -- some crazy multithreading bug, > reported as #33641 > >

guile-2.9.1 impressions

2018-12-05 Thread Linas Vepstas
So I pulled guile-2.9.1(beta) today, and gave it a spin. Looks good/great! One bug -- some crazy multithreading bug, reported as #33641 My use case: guile calling C++ code, which calls guile, which calls C, ad nauseum. I have some 133 unit tests, of which maybe 3/4ths tweak guile in some way. All

ANNOUNCE: guille kernel for Jupyter

2018-01-25 Thread Linas Vepstas
I've just been pointed at this: https://github.com/jerry40/guile-kernel Recall that Jupyter is a web-based interactive framework meant for collaborative creation of research diaries, journals, presentations & etc. where the researcher/author can embed snippets of code that graph stuff, do stuff,

Re: GC thread performance

2017-12-01 Thread Linas Vepstas
On Mon, Nov 27, 2017 at 5:44 PM, Hans Åberg wrote: > > > > On 28 Nov 2017, at 00:23, Marko Rauhamaa wrote: > > > > Hans Åberg : > >> I saw overhead also for the small allocations, 20-30% maybe. This is > >> in a program that makes a lot of allocations relative other > >> computations. So that ma

Re: Guile bugs

2017-09-19 Thread Linas Vepstas
Hi Ludo, On Fri, Sep 15, 2017 at 3:56 PM, Ludovic Courtès wrote: > Linas Vepstas skribis: > > > On Mon, Sep 11, 2017 at 2:26 AM, Ludovic Courtès wrote: > > > >> Hello, > >> > >> Linas Vepstas skribis: > >> > >> > The

Re: out-of-control GC

2017-09-14 Thread Linas Vepstas
Tomas, Hans, Mark, Thanks looking at it now. --linas On Mon, Sep 11, 2017 at 3:22 AM, wrote: > > To just add one more: total memory usage (gc and non-gc) seems to enter > the gc triggering heuristics [1] (I couldn't follow in detail how, and I > don't know whether this is still valid in the 2

Re: out-of-control GC

2017-09-14 Thread Linas Vepstas
Hi Marko, long off-topic reply about the nature of programming languages. On Thu, Sep 14, 2017 at 1:58 PM, Marko Rauhamaa wrote: > Linas Vepstas : > > > Well that's a can of worms. Aside from static typing to benefit the > > compiler, there's static typing to help th

Re: out-of-control GC

2017-09-14 Thread Linas Vepstas
Hi Mark, Thanks... I'm not sure how to reply. So below I write "Yes, but...". My alternative was to ignore your email, but that seems rude. On Tue, Sep 12, 2017 at 9:24 PM, Mark H Weaver wrote: > Hi Linas, > > Linas Vepstas writes: > > > A few o

Re: out-of-control GC

2017-09-14 Thread Linas Vepstas
On Mon, Sep 11, 2017 at 2:42 AM, Kjetil Matheussen wrote: > > > This is probably not the reason, but could it be that your program has a > lot of global/static data, > or that you are dynamically loading more and more libraries that has > global/static data? > (global/static data are scanned by b

Re: out-of-control GC

2017-09-14 Thread Linas Vepstas
Hi Marko, A casual reply, then ... On Sun, Sep 10, 2017 at 5:38 PM, Marko Rauhamaa wrote: > Linas Vepstas : > > > On Sun, Sep 10, 2017 at 3:36 PM, Marko Rauhamaa > wrote: > > > > Not everything in the world is done for performance. The #1 purpose for > a pr

Re: Guile bugs

2017-09-14 Thread Linas Vepstas
On Mon, Sep 11, 2017 at 2:26 AM, Ludovic Courtès wrote: > Hello, > > Linas Vepstas skribis: > > > The stuff coming over the network sockets are bytes, not s-exps. Since > none > > of the bytes are ever zero, they are effectively C/C++ strings, and are > > han

Re: out-of-control GC

2017-09-10 Thread Linas Vepstas
On Sun, Sep 10, 2017 at 3:36 PM, Marko Rauhamaa wrote: > Linas Vepstas : > > which suggests that the vast majority of time is spent in GC, and not > > in either scheme/guile, or my wrapped c++ code. > > That may well be normal. > It might be "normal", but its

Re: out-of-control GC

2017-09-10 Thread Linas Vepstas
Hi Arne, On Sun, Sep 10, 2017 at 11:50 AM, Arne Babenhauserheide wrote: > Hi Linas, > > > Linas Vepstas writes: > > > To make this conversation less crazy, and more down-to-earth, here is a > > demo that seems to spend most of its time in GC. Hard for me to to sa

Re: Guile bugs

2017-09-10 Thread Linas Vepstas
g python from a file. Not my fault; its built into the python language definition. Idiots. --linas On Sun, Sep 10, 2017 at 8:11 AM, Ludovic Courtès wrote: > Hi, > > Linas Vepstas skribis: > > > 1) There is a need to pass messages between subsystems running on > differen

Re: out-of-control GC

2017-09-09 Thread Linas Vepstas
a while. (if (eq? 0 cnt) lis (make-bgl longer (- cnt 1 ; (define foo (make-bgl '() (* 1235 1000 1000))) On Sat, Sep 9, 2017 at 2:47 PM, Linas Vepstas wrote: > > I've been experiencing problems with guile GC for a while now, that I've > mostly been able t

Re: Guile bugs

2017-09-09 Thread Linas Vepstas
Hi Marko, On Sat, Sep 9, 2017 at 5:31 PM, Marko Rauhamaa wrote: > Linas Vepstas : > > So if you used GC_malloc_atomic() in your code, then gc will NOT scan > > that region for pointers. guile-2.2 does this correctly for strings (I > > checked) because strings will never con

Re: Guile bugs

2017-09-09 Thread Linas Vepstas
Stale reply to old message, but maybe its still helpful: On Fri, Jul 21, 2017 at 1:15 AM, Marko Rauhamaa wrote: > Mark H Weaver : > > > Marko Rauhamaa writes: > > > >> l...@gnu.org (Ludovic Courtès): > >> > >>> libgc knows which regions it must scan and mmap’d regions like this > >>> are not am

Re: Guile bugs

2017-09-09 Thread Linas Vepstas
Hi Ludo, a very late reply... On Thu, Jul 20, 2017 at 10:28 AM, Ludovic Courtès wrote: > > > String handling in guile is a disaster area: If I give it a > > 10-megabyte-long string in utf8, it promptly tries to convert all of that > > string in utf32, for utterly pointless reasons. This just mak

out-of-control GC

2017-09-09 Thread Linas Vepstas
I've been experiencing problems with guile GC for a while now, that I've mostly been able to ignore, but that are becoming debilitating, and I need help, or need to find some solution. Background: I have a C++ library that has guile bindings; it is wrapped up as a guile module. It manages a lot of

Re: How to make GNU Guile more successful

2017-07-14 Thread Linas Vepstas
On Mon, Feb 13, 2017 at 2:28 PM, Panicz Maciej Godek wrote: > > someone > responded critically: "are there out of the box libraries to estimate a > zero inflated negative > binomial regression model in guile". Of course, if I knew what a > zero-inflated > negative binomial regression model, I cou

Re: guile-dbi: Use libltdl and prefer GUILE_DBD_PATH.

2017-07-10 Thread Linas Vepstas
Sorry for the very late reply. I applied these patches to https://github.com/opencog/guile-dbi which will have to serve as the official repo for guile-dbi, since gna.org is now dead. Maurizio Boriani, I was surprised to see you answer -- do you have some other repo somwhere that contains the gu

Re: Prevent SQL Injection in DBI

2017-07-10 Thread Linas Vepstas
I don't think guile-dbi does this safety check. You are welcome to add it. Since gna.org is dead, I moved everything over to https://github.com/opencog/guile-dbi --linas On Mon, Mar 27, 2017 at 1:24 PM, Christopher Allan Webber < cweb...@dustycloud.org> wrote: > Jakub Jankiewicz writes: > > >

Re: guile can't find a chinese named file

2017-02-14 Thread Linas Vepstas
On Mon, Jan 30, 2017 at 1:27 PM, David Kastrup wrote: > Marko Rauhamaa writes: >> David Kastrup : >>> Marko Rauhamaa writes: Guile's mistake was to move to Unicode strings in the operating system interface. >>> >>> Emacs uses an UTF-8 based encoding internally [...] >> >> C uses 8-bit

Re: guile can't find a chinese named file

2017-02-14 Thread Linas Vepstas
On Mon, Jan 30, 2017 at 11:58 AM, Marko Rauhamaa wrote: > David Kastrup : > >> But at any rate, this cannot easily be fixed since Guile uses libraries >> for encoding/decoding that cannot deal reproducibly with improper byte >> patterns. > > Guile's mistake was to move to Unicode strings in the op

Re: How to make GNU Guile more successful

2017-02-14 Thread Linas Vepstas
Hey, On Mon, Feb 13, 2017 at 11:59 PM, Marko Rauhamaa wrote: > > Arne Babenhauserheide : > > > Marko Rauhamaa writes: > >> Then, there's GOOPS, which in my opinion is simply an unnatural way > >> to go about object-oriented programming. It does violence both to > >> ordinary OO way of thinking a

Re: Guile benchmark

2017-01-26 Thread Linas Vepstas
On Thu, Jan 26, 2017 at 3:56 PM, Mike Gran wrote: > > On Thursday, January 26, 2017 7:31 AM, Rchar wrote: > > >> Is Guile slow or fast, comparing to others? > > Guile is about average compared to the others. But it depends > on the specific task. It is usually not the fastest or slowest. FWIW,

Re: guile can't find a chinese named file

2017-01-26 Thread Linas Vepstas
It's a bug. There have been bugs on and off with guile utf8 handling. One of the guile-2.0 versions does almost everything right, but utf8 is semi-broken, again in 2.2 -- some things work, but various things that used to work great are now broken (again). I'm guessing that guile has a weak/non-ex

extension paths

2017-01-26 Thread Linas Vepstas
I'd like to ask for help/clarification (and maybe even volunteer to write the required code) to resolve this extension-loading problem. I have almost a dozen C++ shared libs that implement guile modules, and regularly struggle to get them loaded correctly. First, they need to be installed into o

Re: [guile-dbi][PATCH] Make installation directory of the dbi.scm configurable.

2015-08-01 Thread Linas Vepstas
Sorry for the very late reply, I just applied these patches, and hope to upload a new version today, if all goes well. --linas On Tue, Apr 28, 2015 at 8:23 AM, 宋文武 wrote: > Hi, Guilers! > > I'd like to package guile-dbi and guile-dbd-* and artanis finally for > GNU Guix. What's the state of gu

Re: vacuum_weak_hash_table error

2014-12-03 Thread Linas Vepstas
Anand Mohanadoss gmail.com> writes: > hashtab.c:137: vacuum_weak_hash_table: Assertion `removed <= len' failed.  FWIW, me too. guile --version guile (GNU Guile) 2.0.9 on stock Linux Mint Qiana 17 Right now, I am seeing it on a unit test that explicitly tests multi- threading, and I see it

Re: guile user base

2011-11-28 Thread Linas Vepstas
On 28 November 2011 03:42, wrote: > > - but > that's not my intent for many reasons (mostly, I think guile is more > useful as a free software extension tool than as a general programming > learning tool, but this is of topic). Well, not really. People get involved in stages, steps, ladders. For

Re: guile user base

2011-11-27 Thread Linas Vepstas
On 27 November 2011 16:23, Ludovic Courtès wrote: > Hi! > > I don’t have any data to answer your question. It also seems to me that > the Racket and Chicken communities are very active, and have good tools > for that, such as PLaneT and Eggs. The guile projects page is skimpy, because its not ma

Re: A bit further toward the flamewar

2011-10-14 Thread Linas Vepstas
On 14 October 2011 03:28, Andy Wingo wrote: > On Thu 13 Oct 2011 23:42, Linas Vepstas writes: > >> In the code that I work on, in (func a b), its rarely the case that a >> and b are merely strings or lists; they're usually some fairly complex >> structure, where e.g

Re: A bit further toward the flamewar

2011-10-14 Thread Linas Vepstas
On 13 October 2011 20:07, Ian Price wrote: > Linas Vepstas writes: > >> I have no clue why it never occurred to me to use the above paradigm, >> I will definitely start experimenting with it. >> >> Any clue on how to indicate that func returns type 'X' ?

Re: A bit further toward the flamewar

2011-10-13 Thread Linas Vepstas
On 13 October 2011 13:37, Mike Gran wrote: > >>>  Anyway this second, proof side of types, is the side that Scheme does >>>  not have.  C has a stronger story in that regard. >> >> Lack of types in scheme has made me day-dream about learning >> ocaml or haskell.  My pet peeve about scheme is that,

Re: A bit further toward the flamewar

2011-10-13 Thread Linas Vepstas
On 13 October 2011 10:20, Andy Wingo wrote: > On Thu 13 Oct 2011 16:26, l...@gnu.org (Ludovic Courtès) writes: > > Anyway this second, proof side of types, is the side that Scheme does > not have.  C has a stronger story in that regard. Lack of types in scheme has made me day-dream about learning

Re: Pattern matching issues

2011-07-23 Thread Linas Vepstas
On 12 July 2011 16:05, Panicz Maciej Godek wrote: > As we all know, The guile module (ice-9 match) includes an > implementation for a pattern matcher as specified by Andrew K. Wright. > I've recently been reading a book by Peter Norvig, where he came up > with the following notation for what he c

Re: "unbound variable"

2011-06-27 Thread Linas Vepstas
On 27 June 2011 04:41, Peter Brett wrote: > "Tomas By" writes: > >> I have an extended Guile interpreter with a C function "get-map", >> defined by "scm_c_define_gsubr", that I then try to use in the >> (pure Scheme) module "mapdisplay", with the following result: >> >> [snip] >> >> Any ideas wha

Re: Bug in Guile DBI Makefile.am

2011-05-27 Thread Linas Vepstas
Hi, On 26 May 2011 17:14, wrote: > > I think I found a bug in Guile DBI 2.1.4 > > It's in the src/test/Makefile.am file at line 32. The lib "-lguile" should > be removed to successfuly compile under Guile 2.0 Thanks, I'll try to look at this 'real soon now'. --linas

Re: Backtraces in Guile 2.0

2011-02-22 Thread Linas Vepstas
Hi, On 22 February 2011 13:13, Andy Wingo wrote: > On Tue 22 Feb 2011 18:53, Mike Gran writes: > >> So, the specific line on which the error occurred will always read >> "in unknown file" because source data is a property of procedures.  And, >> when procedure A tail-calls procedure B, the backt

Re: [SOLVED] Re: Problems building GNU Greg testing framework

2011-01-10 Thread Linas Vepstas
Hi, On 10 January 2011 19:24, wrote: > Thanks Ludovic, > > I delete config.guess and config.sub, then regenerate them and voila. > > I see Greg it's very old, Does have Guile DBI project a plan to remove > this dependency or to give some maintenance to Greg? Just curious. I maintain guile-dbi,

Re: Functional language syntax

2010-12-22 Thread Linas Vepstas
Hi, On 22 December 2010 05:30, Hans Aberg wrote: > I have put up the source code of the standard functional language syntax > program on top of Guile mentioned in earlier posts. One can see that Guile > already has a combined imperative/functional syntax, but to go further, it > would need to be

Re: Hangup in regexp-matching

2010-12-20 Thread Linas Vepstas
Wild guess: a unicode/utf-8 problem? Which version of guile is this? --linas 2010/12/18 Marek Kubica : > Hi, > > I do a bit regexp-matching in my log analyzer but found out that the > Regexp engine chokes on some input (see attached file). It just takes > 100% CPU time and never returns. > > I

Re: new sqlite binding

2010-12-06 Thread Linas Vepstas
On 3 December 2010 12:35, Neil Jerram wrote: > Andy Wingo writes: > >> But I would like to mention the downside of the dynamic FFI >> approach: with the static FFI you get typechecking by the C >> compiler, but with the dynamic FFI you're on your own. > > Interesting point, thanks. > >> I suppose

Re: Help needed debugging segfault with Guile 1.8.7

2010-11-28 Thread Linas Vepstas
do this one one's own requires a lot of tenacity. For the record, I've attched the code I wrote to do the above (and to multi-thread, which someone later on disabled :-( Its in C++, sorry about that, don't blame me.) --linas /* * SchemeEval.h * * Simple scheme expression e

Re: new sqlite binding

2010-11-28 Thread Linas Vepstas
On 28 November 2010 05:51, Neil Jerram wrote: > Linas Vepstas writes: > >> Hi, >> >> On 25 November 2010 08:12, Andy Wingo wrote: >>> >>> I just hacked up a new binding to sqlite. It works with sqlite3 and >>> Guile 1.9/2.0. Check it out at: &g

Re: new sqlite binding

2010-11-26 Thread Linas Vepstas
Hi, On 25 November 2010 08:12, Andy Wingo wrote: > > I just hacked up a new binding to sqlite. It works with sqlite3 and > Guile 1.9/2.0. Check it out at: > >  http://gitorious.org/guile-sqlite3 I'd like to horn in on Andy's glory by advertising guile-dbi http://home.gna.org/guile-dbi/ whic

Re: Give up Guile

2010-09-04 Thread Linas Vepstas
On 2 September 2010 10:44, Shenli Zhu wrote: > > Everyone knows a good debugger is very important, PLT-scheme have one-click > "Debug", Can someone describe what it is that the PLT/MIT scheme debuggers do? Are any of these portable to guile? If not, why not .. license incompatibility? Or are the

Re: My Project: Guile Hypertext Preprocessor

2010-08-11 Thread Linas Vepstas
On 11 August 2010 19:12, Luiji Maryo wrote: > Hello, >   (define title "My Title") >   (define user "CoolDude1024") > ?> > > > > > How are you doing today, > I was wondering if anybody had any suggestions on this concept before I get > too far through coding it. For what its worth, there

Re: Guile, C++, and Mac OS X 10.4 (powerpc)

2010-07-29 Thread Linas Vepstas
On 29 July 2010 03:04, Mike Solomon wrote: > > Hope this helps the fledgling C++ programmer using guile! If anyone is interested, I have a C++ template class that is analogous to scm_c_define_gsubr for object methods (and calls scm_c_define_gsubr under the covers) One just says: MyTestClas

Re: Plotting in Guile

2010-07-28 Thread Linas Vepstas
On 28 July 2010 12:54, Joel James Adamson wrote: > Hans Aberg writes: >> >> GNUPLOT seems to require pipes, if not using a file. > > The question from the IPC newbie (myself): is there something wrong with > pipes?  I've read a basic tutorial and they seem to do what I would > need, but the autho

Re: Thread and guile environment

2010-07-12 Thread Linas Vepstas
Hi, On 10 July 2010 03:22, Andy Wingo wrote: > Hi, > > On Fri 09 Jul 2010 22:23, Neil Jerram writes: > >> Andy Wingo writes: >> >>> Interestingly, the first thread has you in (guile-user), but the second >>> has you in (guile). So you don't see the full definition of format, nor >>> do you see

Re: Trying guile as an extention language for a 'real world' product

2010-07-03 Thread Linas Vepstas
On 3 July 2010 00:36, wrote: > Hi list ! > > At work, I recently pushed the idea to use an extention language for our > main product, which is a middle sized program written in C with many > threads, that must run quickly without without interruption 24/7, and > that have little memory nor CPU to

Re: Question about how to get the value of function

2010-05-31 Thread Linas Vepstas
2010/5/31 Hsiu-Hao Tsao : > Hello plt-scheme users , > > I am new to scheme and sorry to ask a newbie question. > > I want to let function return the value , for example , in Drscheme : > >>(define add2 (lambda (i) (+ i i))) >>(add2 2) > 4 > > I type (add2 2) in command line and it will return a va

Fwd: Lazybots

2010-05-29 Thread Linas Vepstas
FYI, don't know which scheme this was, but it was certainly fun! --linas -- Forwarded message -- From: Joel Pitt Date: 26 April 2010 16:19 Subject: [OpenCog] Lazybots To: opencog Lazy bots - this is just too cool: http://blip.tv/file/3537232 live coding with Scheme to design

Re: Web services on guile

2010-05-23 Thread Linas Vepstas
On 23 May 2010 16:16, Andy Wingo wrote: > On Sun 23 May 2010 11:25, Sascha Ziemann writes:. > > I would agree, FWIW. I wanted to implement XML-RPC at one point in > tekuti, but decided not to after looking at the spec. An s-expression > serializer/unserializer is fairly simply to write, you avoid

Re: [SOLVED] Guile module for sqlite

2010-05-21 Thread Linas Vepstas
Hi, On 21 May 2010 06:06, Andy Wingo wrote: > Hi, > > On Tue 18 May 2010 21:26, "Romel R. Sandoval Palomo" > writes: > >> The only issue was with LIBADD. I edited Makefiles to use -lguile-2.0 >> instead of -lguile > > Linas would you mind looking into this? If you want to maintain back > compat

Re: Guile module for sqlite

2010-05-18 Thread Linas Vepstas
On 17 May 2010 20:57, Romel R. Sandoval Palomo wrote: > Thank you, its great, unfortunately to me, I'm targeting > guile 2.0 (1.9.10) and the released guile-dbi (2.1.2) use the > deprecated guile/gh.h I removed the guile/gh.h years ago, and should have published version 2.1.3 when I did, but forg

Re: Guile module for sqlite

2010-05-18 Thread Linas Vepstas
Hi, On 15 May 2010 18:57, tantalum wrote: > Hi, > > I did write a guile-dbi module for sqlite3. > I am using it everyday successfully for basic queries. > > You can find it under: http://thaseph.de/ande/guile-dbd-sqlite3.html I've just repackaged and released it as http://download.gna.org/guile-

Re: Guile module for sqlite

2010-05-17 Thread Linas Vepstas
On 17 May 2010 20:57, Romel R. Sandoval Palomo wrote: > Thank you, its great, unfortunately to me, I'm targeting > guile 2.0 (1.9.10) and the released guile-dbi (2.1.2) use the > deprecated guile/gh.h The only thing using this is the test case; you can use the test case from svn, copy it to the 2

Re: [guile-user] Ideas for Documentation

2010-05-17 Thread Linas Vepstas
On 16 May 2010 11:06, Keith Wright wrote: > > On the other hand, while I have no idea what you know > or how it can be described, I can prove by algebra[1] > that all computer programs are discrete math. If I knew how to describe what I know, I'd put it on my resume. http://en.wikipedia.org/wiki/

Re: [guile-user] Ideas for Documentation

2010-05-15 Thread Linas Vepstas
Hi, On 15 May 2010 16:35, Karl Winterling wrote: > Hi, > > I've thought about writing an "official tutorial" for Guile directed > at application users who have no programming experience. I thought > it's best to see what the community thinks given that educational > approaches are so politically

Re: Guile module for sqlite

2010-05-15 Thread Linas Vepstas
On 15 May 2010 15:24, Romel R. Sandoval Palomo wrote: > Hello. > > I'm starting to write a guile module for sqlite3 API. I'm progressing > slowly because I'm new in guile. > > I send this mail just to know if there is anybody working on the same > task. So we don't duplicate work. > > Also I have

Re: Strange behavior with delayed objects

2010-05-10 Thread Linas Vepstas
On 10 May 2010 16:36, user8472 wrote: > Is it possible that you first typed the (define y ...) and (define dy ...) > things at the REPL (thereby defining them in the global environment)? Yes. Stupid me. I admit, I just cut-n-pasted your code into the terminal, without really thinking about what

Re: Strange behavior with delayed objects

2010-05-10 Thread Linas Vepstas
BTW, this is guile version 1.8.7, for me. --linas On 10 May 2010 11:26, Linas Vepstas wrote: > On 7 May 2010 03:09, user8472 wrote: >> >> Please find the code for streams and the integration below. >> ;; The troublesome procedure >> (define (solve f y0 dt) >>  

Re: Strange behavior with delayed objects

2010-05-10 Thread Linas Vepstas
On 7 May 2010 03:09, user8472 wrote: > > Please find the code for streams and the integration below. > ;; The troublesome procedure > (define (solve f y0 dt) >  (define y (integral (delay dy) y0 dt)) >  (define dy (stream-map f y)) >  y) > > ;; This works > (define y (integral (delay dy) 1 0.001))

Re: Strange behavior with delayed objects

2010-05-05 Thread Linas Vepstas
On 4 May 2010 11:59, user8472 wrote: > > becomes > streams.scm:601:14: While evaluating arguments to stream-map in expression > (stream-map f y): > streams.scm:601:14: Variable used before given a value: y > ABORT: (unbound-variable) > > So something is still not quite right. My bad, I completel

Re: Strange behavior with delayed objects

2010-05-04 Thread Linas Vepstas
On 4 May 2010 01:32, user8472 wrote: > > I am currently working through SICP using Guile. I have found some strange > behavior when doing the exercises in chapter 3.5. I am running Guile 1.4 > installed via Fink on Mac OS X 10.6, all latest patches installed. The > problem also exists in Guile 1.8

Re: guile-gnome-0 - guile-1.6.8-6.3 - random crash

2010-04-08 Thread Linas Vepstas
On 8 April 2010 13:06, David Pirotte wrote: > > But I have had another type of bug, which I beleive is not related to the > one > you looked at, which rarely appears and occurred today, so here it is: > >*** glibc detected *** guile: corrupted double-linked list: > 0x08a1ca60 *** >

Re: Resigning from Guile maintainership

2010-04-05 Thread Linas Vepstas
Thanks Neil ! --linas

Re: locale-dependent number parsing?

2010-04-05 Thread Linas Vepstas
On 5 April 2010 12:19, Mike Gran wrote: > >From: Linas Vepstas > > > >I've found the following bug/feature with guile-1.8.7 and would like to > solicit for comments. > >Is this a guile bug? What's the proper work-around? > > > >I've got a

locale-dependent number parsing?

2010-04-05 Thread Linas Vepstas
I've found the following bug/feature with guile-1.8.7 and would like to solicit for comments. Is this a guile bug? What's the proper work-around? I've got a C program that does a setlocale (LC_ALL, ""); printf ("%f", 0.2000); In the de_DE.utf8 locale, the result of the print is 0,2000 using a

Re: Reconsideration of MinGW work

2010-03-22 Thread Linas Vepstas
On 22 March 2010 14:00, Andy Wingo wrote: > Hi Peter (& Neil & co), > > On Mon 22 Mar 2010 09:10, Peter Brett writes: >> >> We get people coming to the gEDA user mailing list on a regular basis >> saying, "Where can I find a version of gEDA for Windows?" and the >> Windows builds we've put out ha

Re: hackery (was: dynamic linking)

2010-02-16 Thread Linas Vepstas
On 15 February 2010 11:43, Tomas By wrote: > Hello again everybody, Just a wild guess -- i'm focusing on the "file not found" aspect of the error message: what does ldd libguile-mytest.so show? Are all dependencies resolved? If you compile the following, will it run? #include "mylibrary.h" #i

Re: strange behaviour of (floor .)

2010-01-03 Thread Linas Vepstas
2010/1/3 Keith Wright : > > CFO: What happened to the $12,345.67? > You: Well, you see sir, IEEE floating point... Heh. Common misconception. The core problem, in accounting, is that some divisions and multiplications are allowed, and others are not. So for example, you are allowed to divide cos

Re: request: libguile to wrap getsid(2)

2009-12-27 Thread Linas Vepstas
2009/12/27 Thien-Thi Nguyen : > As years go by, i have come to venerate old code per se less and > less. Heh. As the years go by, I have come to venerate any code, old or new, less and less. It's always broken, and never actually does what you want, anyways. >  I think it would be cool to write

Re: A minor name improvement suggestion to Guile API

2009-12-19 Thread Linas Vepstas
2009/12/18 Yi DAI : > (maybe not, according to Linas Vepstas) Sorry, I had misunderstood the nature of your email. Please disregard my earlier comments. -linas

Re: A minor name improvement suggestion to Guile API

2009-12-17 Thread Linas Vepstas
2009/12/17 Ludovic Courtès : > Hi, > > Yi DAI writes: > >> I'd like to suggest the following name convention which complies to names >> commonly found in assembly languages. >> >> >>    - Replace < (less than) with *_lt*. >>    - Replace > (greater than) with *_gt*. > > Changing conventions would

Re: GNU Guile 1.9.6 released (alpha)

2009-12-16 Thread Linas Vepstas
2009/12/16 Ludovic Courtès : > Hi Linas, > > Linas Vepstas writes: > >> I have a new feature request -- it would be useful, in a variety of >> situations, >> to be able to provide an opaque (void *) pointer when calling make_gsubr, >> and then getting

Re: GNU Guile 1.9.6 released (alpha)

2009-12-16 Thread Linas Vepstas
2009/12/16 Thien-Thi Nguyen : > () Linas Vepstas > () Tue, 15 Dec 2009 18:19:21 -0600 > >   I have a new feature request -- it would be useful, in a >   variety of situations, to be able to provide an opaque (void *) >   pointer when calling make_gsubr, and then getting tha

  1   2   >