run compiled (*.go) file from command line?

2020-11-17 Thread Tim Meehan
Is it possible to run a compiled file from the command line with "guile"? I'm assuming that it was compiled with something like: guild compile --output=whatever.go whatever.scm Or is it possible to just make an executable file out of "whatever.scm"? Thx

Re: guile-user Digest, Vol 216, Issue 13

2020-11-18 Thread Tim Meehan
-ow...@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of guile-user digest..." > > > Today's Topics: > >1. run compiled (*.go) file from command line? (

getting to know the FFI ...

2020-11-19 Thread Tim Meehan
I figured that I would try and do something simple-ish to see how well I understood the FFI. I found this GTK tutorial, written in Chez Scheme: https://github.com/jhidding/lyonesse/blob/master/gtk-tutorial/window.scm I just tried to replace the Chez FFI calls with Guile FFI calls. I'm not sure how

Guile dynamic FFI, C function expecting pointer

2020-11-22 Thread Tim Meehan
I tried to boil this question down to the most simple thing that represented what I needed to understand. I have had luck getting C functions that expect arguments "by value," but "by reference" has been problematic. The failure mode is "Segmentation Fault," so I gather that I may not be using the

broken link on "Learn" page

2020-11-22 Thread Tim Meehan
There is a broken link to the "Internet Scheme Repository" on the "Learn" page of the GNU Guile website: https://www.gnu.org/software/guile/learn/ I didn't see a contact email on the website, but I figured that someone here might know someone that ran the website ... if not, my apologies.

Re: guile-user Digest, Vol 216, Issue 15

2020-11-23 Thread Tim Meehan
er-ow...@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of guile-user digest..." > > > Today's Topics: > >1. Chickadee 0.6.0 released (Thompson, David) >2. getting to know the FFI ... (Tim Meeh

Re: guile-user Digest, Vol 216, Issue 19

2020-11-24 Thread Tim Meehan
ific > than "Re: Contents of guile-user digest..." > > > Today's Topics: > >1. Re: Question about data structures (Tim Van den Langenbergh) >2. broken link on "Learn" page (Tim Meehan) >3. Re: Guile dynamic FFI, C function expecting point

Re: guile-user Digest, Vol 216, Issue 19

2020-11-25 Thread Tim Meehan
))]) (display b) (newline) (increment (bytevector->pointer b)) (display b) (newline)) On Wed, Nov 25, 2020 at 6:17 AM Adriano Peluso wrote: > Il giorno mar, 24/11/2020 alle 15.26 -0600, Tim Meehan ha scritto: > > Matt - thanks for the help making the FFI poi

trace-calls-to-procedure

2020-12-24 Thread Tim Meehan
I have used ",trace" before and get what it is supposed to do, but I am not sure what "trace-calls-to-procedure" is supposed to do ... ;; Using Guile 3.0.4 (use-modules (system vm trace)) (define (sqr x) (* x x)) (trace-calls-to-procedure sqr) (sqr 3) ;; ... and nothing happens ... is some

Re: trace-calls-to-procedure

2020-12-25 Thread Tim Meehan
heme@(guile-user)> trace-calls-to-procedure sqr) 9))) > $4 = # > scheme@(guile-user)> > > > Not sure if that helps :D > > Regards, > Zelphir > On 12/25/20 5:51 AM, Tim Meehan wrote: > > I have used ",trace" before and get what it is supposed t

Re: broken link on "Learn" page

2020-12-25 Thread Tim Meehan
Great! Thanks for maintaining all of that stuff! On Fri, Dec 25, 2020 at 11:06 AM Amin Bandali wrote: > Hello, > > Tim Meehan writes: > > > There is a broken link to the "Internet Scheme Repository" on the "Learn" > > page of the GNU Guile website:

is there a way to serialize hash tables?

2020-12-25 Thread Tim Meehan
I have a big-ish blob of key-value pairs that I would like to not have to store as text and then convert to a hashtable when I am filtering my data. Right now I am saving it as an alist and then converting back to a hashtable using "alist->hashtable" from SRFI 69. I was just hoping that there was

Re: is there a way to serialize hash tables?

2020-12-26 Thread Tim Meehan
t, 26 Dec 2020, at 05:28, John Cowan wrote: > > I think that's the best bet, although JSON is also a possibility. I'm > > working on a more general text-serialization solution, but it will be > quite > > some time before I have a chance to work on it. > > > > O

Guile OpenGL

2021-01-08 Thread Tim Meehan
I tried to configure Guile OpenGL with Guile 3.0.4 ... and I had to make the following change in order to make it work (included below). Apparently, it wants to be installed in: /usr/local/lib/guile/3.0/ccache Apparently I need to change some configuration. Adding this to "~/.guile" didn't work: (

Re: Guile OpenGL

2021-01-09 Thread Tim Meehan
Aleix and Vladimir - thanks! and yes, this was so that I could eventually tinker with chickadee :-) On Sat, Jan 9, 2021 at 5:03 AM Vladimir Zhbanov wrote: > Hi Tim, > > On Fri, Jan 08, 2021 at 05:19:16PM -0600, Tim Meehan wrote: > > I tried to configure Guile OpenGL with Guile

open-pipe* seems to buffer all of my writes when I don't want it.

2021-01-14 Thread Tim Meehan
I was trying to use Matplotlib to plot some data, through a call to "open-pipe*" ... I'm trying to slowly rewrite some of my tools in Scheme. When I run the program from the shell with "python -i plotter.py" I can send it updates ... but when I run it through Guile, it seems to store up all of my

Re: open-pipe* seems to buffer all of my writes when I don't want it.

2021-01-15 Thread Tim Meehan
2PM -0600, Tim Meehan wrote: >> I was trying to use Matplotlib to plot some data, through a call to >> "open-pipe*" ... I'm trying to slowly rewrite some of my tools in Scheme. >> >> When I run the program from the shell with "python -i plotter.py&qu

C extensions

2021-02-20 Thread Tim Meehan
I'm trying my hand a writing C extensions. I've done this for stuff like Matlab before, and was wondering how you do the usual checking of the arguments that are passed in from Guile. In the manual, 6.13.13.1 "C Support" has a few functions. libguile/numbers.h has a bunch more ... What I have is

Re: C extensions

2021-02-21 Thread Tim Meehan
double (exp (mu + sigma*scm_c_normal01 (SCM_RSTATE(state; } #undef FUNC_NAME On Sun, Feb 21, 2021 at 9:59 AM Olivier Dion wrote: > On Sat, 20 Feb 2021, Tim Meehan wrote: > > I'm trying my hand a writing C extensions. > > I've done this for stuff like Matlab before, an

Re: C extensions

2021-02-21 Thread Tim Meehan
n position 2 (expecting standard deviation): -1 On Sun, Feb 21, 2021 at 3:58 PM Tim Meehan wrote: > Hello Olivier, thanks! > Those functions helped, and now I know where in the source of Guile to > look. > > Is "inexact" the same thing as "floating point number&qu

Re: Guile Potluck 2021: Picture Language

2021-02-22 Thread Tim Meehan
I'll have seconds of that dish! Thanks, Ricardo! On Mon, Feb 22, 2021 at 9:43 AM Ricardo Wurmus wrote: > Hello there, > > here’s my dish for the 2021 potluck: > > https://elephly.net/guile-picture-language/ > > The recent changes include this web presence and an illustrated manual > on the web

dynamic-link sadness

2021-02-22 Thread Tim Meehan
Ok - I think that I am missing something important that will allow me to dynamically load libraries. :( Is this an environment variable or something? me@expensive:/usr$ find . -type f -name "libm\.*" -print ./lib/x86_64-linux-gnu/libm.so ./lib/x86_64-linux-gnu/libm.a me@expensive:/usr$ guile GNU G

Re: dynamic-link sadness

2021-02-23 Thread Tim Meehan
Sorry, I should have said that it was Linux Mint Ulyssa, installed from “apt”. I have another system I can try it on later today. > On Feb 23, 2021, at 06:21, Tim Van den Langenbergh wrote: > > On Tuesday, 23 February 2021 04:49:34 CET you wrote: >> Ok - I think that I am missing something imp

Re: dynamic-link sadness

2021-02-23 Thread Tim Meehan
23, 2021, at 06:45, Tim Meehan wrote: > > Sorry, I should have said that it was Linux Mint Ulyssa, installed from > “apt”. I have another system I can try it on later today. > >>> On Feb 23, 2021, at 06:21, Tim Van den Langenbergh wrote: >>> >>> On

Somehow I have got this "thunk" thing wrong.

2021-03-05 Thread Tim Meehan
I wanted to store a thunk in a hashtable so that I could look up its key and then run it later. Something like this: #! /usr/bin/guile !# (use-modules (ice-9 hash-table)) (define stuff (alist->hash-table '((a . (lambda () (display "event a\n"))) (b . (lambda () (display "event b\n")))

Re: Somehow I have got this "thunk" thing wrong.

2021-03-05 Thread Tim Meehan
Yes, that makes sense. The unquote is a neat way to fix that. One of these days, I will learn my lesson. Thanks Christopher! On Fri, Mar 5, 2021 at 6:26 PM Christopher Baines wrote: > > Tim Meehan writes: > > > I wanted to store a thunk in a hashtable so that I could look up

Re: Somehow I have got this "thunk" thing wrong.

2021-03-05 Thread Tim Meehan
Also thanks Olivier and Aleix, and now I will have to watch that talk as well. On Fri, Mar 5, 2021 at 9:40 PM Tim Meehan wrote: > Yes, that makes sense. The unquote is a neat way to fix that. > One of these days, I will learn my lesson. > Thanks Christopher! > > On Fri, Mar 5,

Re: How to use guile in a development process

2021-04-29 Thread Tim Meehan
Anthony - thanks for asking that question, I always wind up learning something interesting on this mailing list. On Wed, Apr 28, 2021 at 7:57 PM Anthony Quizon wrote: > Hello, > > I'm having trouble finding a good development process with guile. > > I have a file foo.scm and I'm trying to load i

Python's pdb module

2021-04-29 Thread Tim Meehan
Is there something in Guile that is similar to Python's "pdb" module? For instance, sometimes I find it helpful to pause right before something bad happens with: #!/usr/bin/env python3 import pdb; pdb.set_trace() some_function_that_is_going_to_fail_miserably()

Re: Python's pdb module

2021-04-30 Thread Tim Meehan
Thanks for the ideas folks! > On Apr 30, 2021, at 08:24, Matt Wette wrote: > >  >> On 4/29/21 8:26 PM, Tim Meehan wrote: >> Is there something in Guile that is similar to Python's "pdb" module? >> For instance, sometimes I find it helpful to pause

guile-gi

2021-05-03 Thread Tim Meehan
Apologies if this isn't an appropriate place to post this, but I had some trouble building "guile-gi" ... I downloaded it from github today: git clone --depth=1 https://github.com/spk121/guile-gi.git How I started the process: cd guile-gi ./bootstrap ./configure ... lots of configure-y stuff ...

delay and force

2021-06-09 Thread Tim Meehan
Are there any good examples of "medium-sized" programs that use delay and force? I have seen the documentation examples, but I am curious about how it is used by other people in larger projects.

re-writing algorithms in Guile

2021-06-28 Thread Tim Meehan
Say for instance, I have found an algorithm for scalar function minimization on a website, written in C. It is posted with a license for use. If I write something based on this hypothetical code, is it then clearly also licensed in the same manner? Granted, I know that this is guile-user and not g

Re: re-writing algorithms in Guile

2021-06-29 Thread Tim Meehan
Thanks all for the input - I think I have a better understanding of derivative work. I think that I'll look for a paper on the algorithm and work from there. For the curious, the "hypothetical" code in question was from here

Re: Read characters from without newline

2021-08-28 Thread Tim Meehan
Second for guile-termios, I use it and like it very much (saved my bacon with a program I was writing). On Sat, Aug 28, 2021 at 3:56 PM Frank Terbeck wrote: > Mike Gran wrote: > […] > > There is a binding of tcsetattr in the (ncurses extra) library > > in guile-ncurses, but since you just need a

foreign objects and the garbage collector

2021-09-04 Thread Tim Meehan
I was looking at writing something to interact with gpsd. There is a shared memory interface, and a Unix socket interface. The protocol spoken by gpsd is JSON, so I figured that I would just open up a socket and start talking ... however ... really early on in the man page, it says "it is a bad ide

Re: foreign objects and the garbage collector

2021-09-04 Thread Tim Meehan
Thanks Vivien, I had not considered dynamic-wind. I'll look into that a bit more. Cheers, Tim On Sat, Sep 4, 2021 at 8:35 AM Vivien Kraus wrote: > Hello, > > Le samedi 04 septembre 2021 à 07:41 -0500, Tim Meehan a écrit : > > I'd rather not compile anything in C,

Re: Chickadee 0.8.0 released

2021-10-10 Thread Tim Meehan
The docs for Chickadee look really nice, thanks for your hard work on this! On Thu, Oct 7, 2021 at 7:21 PM Thompson, David wrote: > Hello guilers, > > I'm happy to announce that Chickadee 0.8.0 has been released! > > Chickadee is a game development toolkit for Guile. Chickadee aims to > provide

build git version of Guile

2021-11-01 Thread Tim Meehan
So ... building the git version of Guile seems different, I looked around for an INSTALLING file, and it isn't there (and neither is 'configure') ... any hints?

Re: understanding guile-gi

2022-01-16 Thread Tim Meehan
:( Links were not posted to list ... could you please post so the rest of us lurking could benefit? :) On Sun, Jan 16, 2022 at 2:40 PM Zelphir Kaltstahl < zelphirkaltst...@posteo.de> wrote: > Thanks for the example link and the explanations! I'll try to learn from > the > example. > > Best regard

Re: understanding guile-gi

2022-01-16 Thread Tim Meehan
Never mind - I'm blind. Sorry for noise. On Sun, Jan 16, 2022 at 3:19 PM Tim Meehan wrote: > :( > Links were not posted to list ... could you please post so the rest of us > lurking could benefit? > :) > > On Sun, Jan 16, 2022 at 2:40 PM Zelphir Kaltstahl < > zelp

Re: jump-to-debugger (like Python's pdb.set_trace)

2022-03-13 Thread Tim Meehan
Thanks! I can't wait to try it out! On Sun, Mar 13, 2022 at 3:48 PM Matt Wette wrote: > Hi All, > > I've put my "jump to debugger" code on github: > https://github.com/mwette/guile-jtd > > jump-to-debugger is a procedure that, when called, > stops execution and fires up a REPL. It is much like