[ANN] nyacc-2.00.1 released

2024-09-21 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile S

Re: [ANN] nyacc-2.00.0 released

2024-09-20 Thread Matt Wette
On 9/20/24 10:47 AM, Matt Wette wrote: Hi All, I've generated a new release of nyacc.  Due to major change in the ffi-helper I'm calling this nyacc-2.00.0. One key item I wanted to mention is that the `set!' procedure from the new cdata module expects the value after the c

[ANN] nyacc-2.00.0 released

2024-09-20 Thread Matt Wette
Hi All, I've generated a new release of nyacc.  Due to major change in the ffi-helper I'm calling this nyacc-2.00.0. Thanks to @lechner on #guile for dicussions of pointers and functions. At the time of this discussion I was also working on extending gtk2+ in Guile to make a tkinter like module.

Re: Custom foreign types

2024-06-20 Thread Matt Wette
On 6/19/24 5:11 PM, Matt Wette wrote: On 6/16/24 7:13 PM, Ryan Raymond wrote: Hello, all. I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the

Re: Custom foreign types

2024-06-19 Thread Matt Wette
On 6/16/24 7:13 PM, Ryan Raymond wrote: Hello, all. I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the size to that of the struct, but when it is time

Re: [bug nyacc] C99 parser crashes on #warning

2024-06-08 Thread Matt Wette
quick fix (bug #65849) --- a/module/nyacc/lang/c99/parser.scm +++ b/module/nyacc/lang/c99/parser.scm @@ -591,7 +591,7 @@   ;; If decl mode, only defines and includes outside {}   ;; @end itemize   (define (pass-cpp-stmt stmt) -   (if (eq? 'pragma (car stmt)) + 

[ANN] nyacc version 1.09.4 released

2024-04-19 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers. It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile S

Re: Shelling

2024-04-18 Thread Matt Wette
On 4/18/24 9:44 AM, Tom Whitcomb via General Guile related discussions wrote: Hi. I need to write a set of shell scripts and I would really like to do it with a lisp.  Is that a use case for guile or should I move towards scheme/scsh? Tom You may be interested in gash: https://savannah.nongnu.

Re: Quiet compilation for scripting

2024-03-18 Thread Matt Wette
On 3/18/24 6:40 AM, Matt Wette wrote: On 3/15/24 1:52 PM, Matt Wette wrote: As mentioned on another topic (start=up message) I had once hacked guile to have a info-port, with initial welcome message and compile messages going to (current-info-port). Adding a command arg to set that to a file

Re: Quiet compilation for scripting

2024-03-18 Thread Matt Wette
On 3/15/24 1:52 PM, Matt Wette wrote: As mentioned on another topic (start=up message) I had once hacked guile to have a info-port, with initial welcome message and compile messages going to (current-info-port). Adding a command arg to set that to a file or /dev/null would fix both issues

Re: Quiet compilation for scripting

2024-03-15 Thread Matt Wette
On 3/15/24 1:52 PM, Matt Wette wrote: On 3/15/24 1:47 PM, Marc Chantreux wrote: On Fri, Mar 15, 2024 at 08:00:09PM +0100, to...@tuxteam.de wrote: I think most of Guile user actually want this feature for a long time. I can understand. I agree. so do I. As mentioned on another topic (start

Re: Quiet compilation for scripting

2024-03-15 Thread Matt Wette
On 3/15/24 1:47 PM, Marc Chantreux wrote: On Fri, Mar 15, 2024 at 08:00:09PM +0100, to...@tuxteam.de wrote: I think most of Guile user actually want this feature for a long time. I can understand. I agree. so do I. As mentioned on another topic (start=up message) I had once hacked guile to

Re: Getting all symbols in a Scheme file as a list

2024-02-04 Thread Matt Wette
On 2/4/24 11:50 AM, Christina O'Donnell wrote: I'm trying to write a Guile script to trace symbol definition and reference between modules in a large Guile repo (GNU/Guix), for the purposes of large scale refactoring. ? Seems a little bit baroque to me, I'd expect a simpler way of doing it.

[ANN] scheme-texi minor mode for emacs

2023-08-13 Thread Matt Wette
Hi All, I have created a minor mode for emacs that generates docstrings for procedures from comments provided in the code.   I announced this a few years ago, but the version released then was not very robust.   I have reworked this and it is more robust.   (It probably needs graceful failure

Re: 2 macros in one expression

2023-04-15 Thread Matt Wette
Did you try using the following? (define-syntax $nfx$ (syntax-rules (<-) ((... On 4/14/23 4:02 AM, Damien Mattei wrote: hello, i have 2 macros used in one expression like this: scheme@(guile-user)> (define i 2) scheme@(guile-user)> {i <- i + 1} and i got this error: While compiling expr

Re: fun with wayland

2023-02-12 Thread Matt Wette
was a simple compositor. I'll try to dig in in the near future, exciting to see someone implementing Wayland in guile. Perhaps a guix window manager would be be a good GSoC project suggestion 👀 On Sun, Feb 12, 2023, 04:51 Matt Wette wrote: So, you are looking to implement a compositor?

Re: fun with wayland

2023-02-11 Thread Matt Wette
yland now :) Looking forward to play with this, cheers On Mon, Feb 6, 2023, 20:31 Matt Wette wrote: On 2/5/23 11:25 PM, Sascha Ziemann wrote: Am So., 5. Feb. 2023 um 20:05 Uhr schrieb Matt Wette < matt.we...@gmail.com>: 2) I am using my proposed mmap wrapper for Guile, in C, to cre

Re: fun with wayland

2023-02-06 Thread Matt Wette
On 2/5/23 11:25 PM, Sascha Ziemann wrote: Am So., 5. Feb. 2023 um 20:05 Uhr schrieb Matt Wette : 2) I am using my proposed mmap wrapper for Guile, in C, to create a file- mapped shared drawing. What is a "file-mapped shared drawing"? "file-mapped shared drawing buffer&

fun with wayland

2023-02-05 Thread Matt Wette
I finally got my Wayland demo in guile working.  I thought I'd share some bits. (I started with creating FFI to libwayland, but with all the callbacks it was not worth it.) Wayland is a display server for Linux (and others?), meant to replace X11. It uses UNIX socket I/O between the "compositor

Re: bytevector seems to be missing in Guile

2023-01-07 Thread Matt Wette
On 1/7/23 8:34 AM, Sascha Ziemann wrote: Is the procedure "bytevector" missing in Guile? I tried this: guile --r7rs -c '(write (bytevector 1 2 3))' R7RS defines it on page 49. maybe you need (import (rnrs bytevectors))

[ANN] nyacc 1.08.1 released

2022-12-31 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile S

Re: Fibers 1.2.0 released

2022-12-22 Thread Matt Wette
On 12/22/22 12:33 PM, Aleix Conchillo Flaqué wrote: Hi, On behalf of the Fibers team, I am excited to announce Fibers 1.2.0. Thanks much for the hard work!

Re: repl-server from fibers task

2022-12-21 Thread Matt Wette
On 12/19/22 1:30 PM, Matt Wette wrote: Hi All, I'm trying to get fibers to run in "pure asynchronous" style with a repl-server. By "pure asynchronous" style I mean #:hz 0 and possibly #:suspendable-ports #f. My only guess is that maybe the repl-server has a continu

repl-server from fibers task

2022-12-19 Thread Matt Wette
Hi All, I'm trying to get fibers to run in "pure asynchronous" style with a repl-server. By "pure asynchronous" style I mean #:hz 0 and possibly #:suspendable-ports #f. My only guess is that maybe the repl-server has a continuation barrier in the way. Either the other task runs, and I get no

Re: bytevector-string-ref

2022-12-18 Thread Matt Wette
On 12/18/22 4:12 AM, Sascha Ziemann wrote: I am wondering if something like bytevector-string-ref is missing in the API. Or is there any other way to extract a string from a byte vector, without copying the data twice? I sympathize with the struggle here.   I wonder if rlb is aware. I believe

[ANN] nyacc-1.08.0 released

2022-11-27 Thread Matt Wette
Hi All, nyacc 1.08.0 has been released. Matt NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C pars

Re: wayland client in Guile without libwayland-client

2022-11-19 Thread Matt Wette
On 11/18/22 8:26 PM, Damien Mattei wrote: hello, it is just a question about semantic and aside the subject of project, and related to another subject of internal definitions that Linus is talking about: On Fri, Nov 18, 2022 at 5:55 PM Matt Wette wrote: Here is an example of an auto-coded

Re: wayland client in Guile without libwayland-client

2022-11-18 Thread Matt Wette
On 11/18/22 2:34 PM, Maxime Devos wrote: On 18-11-2022 17:54, Matt Wette wrote: cm-buf is a bytevector of control messages (`man cmsg`).  To deal with control messages I have generated these procedures:    (cmsg-list->bytevector cmsg-list) => bytevector    (bytevector->cmsg-list b

Re: wayland client in Guile without libwayland-client

2022-11-18 Thread Matt Wette
Oops: Please substitute "object code" with "opcode". On 11/18/22 8:54 AM, Matt Wette wrote: Hi All, Just for fun, I'm working on an "all" Guile client-side program to use with Wayland.   I'm just getting started, but I thought you all might be intereste

wayland client in Guile without libwayland-client

2022-11-18 Thread Matt Wette
Hi All, Just for fun, I'm working on an "all" Guile client-side program to use with Wayland. I'm just getting started, but I thought you all might be interested to see what I'm doing. Wayland is the apparent replacement for X11. My reading is that it provides a client software tighter intergr

Re: mmap for guile

2022-07-04 Thread Matt Wette
On 7/4/22 3:09 AM, Ludovic Courtès wrote: greed. I was wondering about offering an explicit ‘munmap’ interface: it would be useful for fine-grain OS resource management, just like ‘close-fdes’. Sorry, missed the munmap. scheme@(guile-user)> ,d munmap - Scheme Procedure: munmap bvec See

Re: Scripting for installing a module

2022-07-02 Thread Matt Wette
Another option is some variant of     $ sudo cp xyz/file.scm `guile -c '(display (%global-site-dir))'`/xyz/file.scm On 7/1/22 10:15 AM, James Crake-Merani wrote: guile -c '(display (%global-site-dir))'Hello, I was just wondering what approach people tend to take when writing a script which

Re: mmap for guile

2022-06-26 Thread Matt Wette
Appologies: link is https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/mmap-api.patch On 6/26/22 8:37 AM, Matt Wette wrote: I have a candidate mmap implementation for guile (3.0.8) in github.com/mwette/guile-contrib/patch/3.0.8/mmap-api.patch It probably needs some review and

mmap for guile

2022-06-26 Thread Matt Wette
I have a candidate mmap implementation for guile (3.0.8) in github.com/mwette/guile-contrib/patch/3.0.8/mmap-api.patch It probably needs some review and update. Maybe windows mmap-file would be nice. I'm not sure I updated the configure correctly but --disable-mmap-api should remove.

Re: [ANN] nyacc 1.07.0 released

2022-05-31 Thread Matt Wette
On 5/30/22 11:50 AM, Vivien Kraus wrote: Could you update it in guix also?  I don't use guix (anymore).   However, I post a guix.scm file in the ftp directory. I believe others have been updating in guix. Matt

[ANN] nyacc 1.07.0 released

2022-05-30 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile S

Re: guile under gdb crashing on Unbuntu 22.04

2022-05-06 Thread Matt Wette
On 5/6/22 1:47 AM, Andrew Burgess wrote: Matt Wette writes: Hi All, I have no clue what is going on here but wondering if others are seeing it. I recently installed Ubuntu 22.04, then recompiled guile-3.0.8. It crashes running withing gdb, runs fine otherwise:    from /lib/x86_64-linux

Re: guile under gdb crashing on Unbuntu 22.04

2022-05-05 Thread Matt Wette
4-linux-gnu/libc.so.6 #11 0x77c63e40 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #12 0x5225 in ?? () On Thu, May 5, 2022 at 5:48 AM Matt Wette wrote: Hi All, I have no clue what is going on here but wondering if others are seeing it. I recently installed Ubun

guile under gdb crashing on Unbuntu 22.04

2022-05-05 Thread Matt Wette
Hi All, I have no clue what is going on here but wondering if others are seeing it. I recently installed Ubuntu 22.04, then recompiled guile-3.0.8. It crashes running withing gdb, runs fine otherwise: $ meta/gdb-uninstalled-guile GNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90 Copyright (C) 2022 Free

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

2022-03-19 Thread Matt Wette
On 3/13/22 1:47 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 Python's pdb.set_trace() function.

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

2022-03-13 Thread Matt Wette
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 Python's pdb.set_trace() function. Matt

Re: good papers on graphics in scheme/lisp?

2022-03-03 Thread Matt Wette
On 3/3/22 11:29 AM, Blake Shaw wrote: writes: On Wed, Mar 02, 2022 at 12:34:32PM -0500, Olivier Dion via General Guile related discussions wrote: On Wed, 02 Mar 2022, Blake Shaw wrote: [...] Also, one last thing, I'm considering attempting to create a DSL that compiles to a subset of GLSL

Re: bytestructures 2.0.0

2022-02-20 Thread Matt Wette
On 2/20/22 11:51 AM, Taylan Kammer wrote: I'd like to announce the release of bytestructures 2.0.0 for Scheme and Guile in particular. Don't be fooled by the major version bump, there's nothing radically new in this release. :-) https://github.com/TaylanUB/scheme-bytestructures Thanks fo

can't get http-get w/ accept header working

2022-01-26 Thread Matt Wette
Hi All, Does someone have example of using the Accept header with http-get? I'm basically calling     (http-get url #:headers (list auth (parse-header 'accept "*/*") ...) and getting back error from web/request.scm:     (validate-headers (((*/*)) ... ) header name not a symbol (*/*) Thanks, M

Re: guile_gi-0.3.2 released

2021-12-30 Thread Matt Wette
Thanks for the effort, Mike et al. I'll be digging in, curious to see how you worked the GObject system in. I've spent some time trying to understand how GObject is laid out, as the use of C macros makes it quite obtuse and I could not find a lot on it.  If you are interested in my perspective le

[ANN] nyacc 1.06.0 released

2021-12-03 Thread Matt Wette
Hi All, I've released nyacc-1.06.0. I hope it is an improvement! Matt NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers. It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It

[ANN] nyacc 1.05.1 released

2021-11-24 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile S

Re: Questions about PEG parsing

2021-11-02 Thread Matt Wette
On 10/23/21 4:25 PM, Vivien Kraus via General Guile related discussions wrote: Dear guile users, There are two ways to make a parser with guile: the undocumented LALR(1) parser generator, for which I don’t know how to reuse grammar elements, and the PEG parser. I'm not sure what your needs are

source tracking for nyacc parser is coming

2021-10-22 Thread Matt Wette
Hi All, I just wanted to give an update on this requested feature for nyacc. I've been working on adding source location tracking to nyacc's parser. I believe I have a working implementation. It should appear in future release 1.06.0 (vs latest release 1.05.0). If you want to work with it it's

Re: Double-precision floating point arithmetics behaves differently in Guile and in C

2021-09-26 Thread Matt Wette
Your post is a little vague.  Are you comparing singular values vectors of A vs eigenvalues, eigenvectors of A'*A ?  Also, SVD is iterative and different algorithms may yield different results (and some of the SVD algorithms out there are not great).  Are you using the exact same algorithm but n

Re: Fwd: new function

2021-09-19 Thread Matt Wette
On 9/19/21 3:38 AM, Maxime Devos wrote: Damien Mattei schreef op zo 19-09-2021 om 11:18 [+0200]: -- Forwarded message - From: Damien Mattei Date: Sun, Sep 19, 2021 at 9:54 AM Subject: new function To: hello, i'm developing an extension to Scheme and i need a procedure or m

Re: backing out of debugger

2021-09-15 Thread Matt Wette
On 9/15/21 5:49 AM, Matt Wette wrote: On 9/14/21 5:50 AM, Mortimer Cladwell wrote: Hi, Let's say I made a lot of mistakes. I look at my repl and see: scheme@(guile-user) [10]> Any way to back out to scheme@(guile-user)> without typing ,q ten times? Thanks Mortimer Try binding a

Re: backing out of debugger

2021-09-15 Thread Matt Wette
On 9/14/21 5:50 AM, Mortimer Cladwell wrote: Hi, Let's say I made a lot of mistakes. I look at my repl and see: scheme@(guile-user) [10]> Any way to back out to scheme@(guile-user)> without typing ,q ten times? Thanks Mortimer Try binding a command to: (while (pair? (cdr (fluid-ref *repl-sta

Re: Trouble creating SRFI-9 Record in C

2021-09-11 Thread Matt Wette
maybe add (define (make-foo-x a b) (make-foo a b)) then call make-foo-x (or reverse names) On 9/10/21 7:27 PM, paul wrote: Good day guile-users, I am having a struggle with SRFI-9 records.  They look very convenient, so i'd like to use them in my Guile scripts.  However, i'm not sure how to

[ANN] nyacc 1.05.0 released

2021-09-05 Thread Matt Wette
NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers. It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper' tool to help create Guile

Re: Guile 3.0.7 compile cache messages

2021-06-02 Thread Matt Wette
I believe there was an issue on one of the releases where a shared object library was misnamed.  Check the installed .so's. I'd try deleting your cache (~/.cache/guile/...) and checking your environment variables.   It looks to me like maybe Guile is checking in one place and installing in anot

[ANN] nyacc 1.04.1 released

2021-05-30 Thread Matt Wette
fixed bus 60697 and 60684 NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers. It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent C parser and a `FFI Helper'

Re: #guile libera.chat

2021-05-29 Thread Matt Wette
Thanks.   Now I did REGISTER but had typo in my email address. I'm not sure I can recover from that.  I may need a new nick, right? On 5/29/21 10:10 AM, dsm...@roadrunner.com wrote: Greetings Matt, You also must register your nick with nickserv before you can speak in the channel. -Dale

#guile libera.chat

2021-05-29 Thread Matt Wette
Hi All, I gather there a move afoot from freenode to libera. I'd appreciate is someone who has moved sucessfully could post help here. In emacs I have a function set to execute  (erc :server "irc.libera.chat" :port "6667"     :nick "mwette") and (setq erc-autojoin-channels-alist '(("libera.ch

[ANN] nyacc 1.04.0 released

2021-05-28 Thread Matt Wette
Hi All, I have released nyacc-1.04.0, which provides union support in the FFI Helper. I have not thoroughly tested (as FFI Helper tests are not yet automated). Also, I have been uploading a guix.scm file in the release directory. I have not been using guix lately so any feedback to clean it up w

[ANN] nyacc-1.03.7 released

2021-05-23 Thread Matt Wette
This is a quick release of nyacc 1.03.7 to fix a bug introduced in 1.03.5 that would stop constant definitions from being emitted in the symbol dict. NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parser

Re: Python's pdb module

2021-04-30 Thread Matt Wette
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 right before something bad happens with: #!/usr/bin/env python3 import pdb; pdb.set_trace() some_function_that_is_going_to_fail_miserab

Re: [ANN] Guile-DRMAA 0.1.0

2021-04-28 Thread Matt Wette
On 4/28/21 2:39 AM, Ricardo Wurmus wrote: Hi there, I’m writing this to unceremoniously announce the first release (0.1.0) of Guile DRMAA.  Guile DRMAA provides Guile bindings to version 1 of the DRMAA library, a library to interact with different HPC schedulers.  It uses Matt Wette’s most

Re: [ANN] GNU Guile State Machine Compiler (Guile-SMC)

2021-04-25 Thread Matt Wette
On 4/24/21 11:43 AM, Artyom V. Poptsov wrote: Hello Guilers! I heard some of you like finite state machines. If you love FSM as much as I do, you may want to take a look on my Guile state machine compiler (Guile-SMC): https://github.com/artyom-poptsov/guile-smc With Guile-SMC, you can gen

Re: Python-on-guile

2021-04-23 Thread Matt Wette
On 4/23/21 8:00 AM, Mikael Djurfeldt wrote: Hi, Yesterday, Andy committed new code to the compiler, some of which concerned skipping some arity checking. Also, Stefan meanwhile committed something called "reworked object system" to his python-on-guile. Sorry for coming with unspecific informat

Re: excpetion printing

2021-04-20 Thread Matt Wette
On 4/20/21 5:43 PM, Matt Wette wrote: Is there any error I can throw in Guile that I don't catch myself but will result in a user-friendly error message at the top?  Not this: Throw to key `misc' with args `("read-yaml-file" "file not found: ~S" ("de

excpetion printing

2021-04-20 Thread Matt Wette
Is there any error I can throw in Guile that I don't catch myself but will result in a user-friendly error message at the top?  Not this: Throw to key `misc' with args `("read-yaml-file" "file not found: ~S" ("demo1x.yml") #f)'.

Re: Lepton EDA 1.9.14 announce and misc questions

2021-04-20 Thread Matt Wette
On 4/20/21 4:36 PM, Vladimir Zhbanov wrote: Hi Matt, On Tue, Apr 20, 2021 at 06:46:27AM -0700, Matt Wette wrote: On 4/20/21 5:47 AM, Matt Wette wrote: On 4/20/21 2:29 AM, Vladimir Zhbanov wrote: Hi Guile users and devs, I'm the current maintainer of Lepton EDA suite, an about five

Re: Lepton EDA 1.9.14 announce and misc questions

2021-04-20 Thread Matt Wette
On 4/20/21 5:47 AM, Matt Wette wrote: On 4/20/21 2:29 AM, Vladimir Zhbanov wrote: Hi Guile users and devs, I'm the current maintainer of Lepton EDA suite, an about five year old fork of geda-gaf with accent to moving more functionality to Scheme code.  I'm not sure if it is acc

Re: Lepton EDA 1.9.14 announce and misc questions

2021-04-20 Thread Matt Wette
On 4/20/21 2:29 AM, Vladimir Zhbanov wrote: Hi Guile users and devs, I'm the current maintainer of Lepton EDA suite, an about five year old fork of geda-gaf with accent to moving more functionality to Scheme code. I'm not sure if it is acceptable to advertise it here, please let me know if n

Re: Guile + SWIG

2021-04-05 Thread Matt Wette
When scripts with load-extension are compiled, the compiler does not know what symbols are defined in the extension so you may get warnings. Are you getting an error or just the warning? On 4/5/21 10:44 AM, Paul Emsley wrote: Hi Linas, Thanks for your reply. Let me clarify if I can. I have man

csv module site?

2021-01-27 Thread Matt Wette
Hi All, Where is csv.scm maintained these days?  I'm running into a bug or feature where a line with only separators has N-1 entries where I'm expecting N. Example. abc 123 gives (#("a" "b" "c") #("1" "2" "3") #("" "")) Matt

Re: no scm_foreign_object_p ?

2021-01-23 Thread Matt Wette
On 1/23/21 12:04 PM, divoplade wrote: Hello, Le samedi 23 janvier 2021 à 14:29 -0500, olivier.dion--- via General Guile related discussions a écrit : On Sat, 23 Jan 2021, Matt Wette wrote: I started using foreign objects but want something akin to number?, string? etc. Is there something

no scm_foreign_object_p ?

2021-01-23 Thread Matt Wette
I started using foreign objects but want something akin to number?, string? etc. Is there something that works here? I was hoping to see scm_foreign_object_p(type, object).

SXML example showing diff between node-reduce and node-join

2021-01-11 Thread Matt Wette
Hi All, I'm going through the (sxml xpath) low-level routines to try to get a solid understanding of what they do. I just can't come up with an example to show how node-reduce and node-join differ. If someone could provide such an example I would really appreciate it. Takers? My end goal is

Re: Guile dynamic FFI, C function expecting pointer

2020-11-22 Thread Matt Wette
On 11/22/20 2:50 PM, Tim Meehan wrote: 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 Fau

Re: getting to know the FFI ...

2020-11-22 Thread Matt Wette
On 11/19/20 7:02 PM, Tim Meehan wrote: 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 c

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

2020-11-17 Thread Matt Wette
On 11/17/20 4:08 PM, Tim Meehan wrote: 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

[ANN] nyacc v 1.03.1 released

2020-10-20 Thread Matt Wette
Hi All, I have released nyacc-1.03.1.   Enjoy. Matt NYACC, for Not Yet Another Compiler Compiler, is set of guile modules for generating parsers and lexical analyzers.  It also provides sample parsers and pretty-printers using SXML trees as an intermediate representation. It provides a decent

Re: Starting a GNU Guile awesome list

2020-10-10 Thread Matt Wette
On 10/10/20 5:31 AM, Zelphir Kaltstahl wrote: #!/usr/bin/make -f SHELL := emacs .SHELLFLAGS := --quick --batch --eval Maybe try this:     #!/usr/bin/make -f - with the added dash.

Re: get absolute path of given path

2020-09-06 Thread Matt Wette
On 9/6/20 8:04 AM, Zelphir Kaltstahl wrote: Hi Guile Users! In my explorations into making examples for web development, I came across the question of how to get an absolute path from any given path. This is useful for example when checking, whether a path points to something inside a static a

Re: Multi-language scripts

2020-08-22 Thread Matt Wette
On 8/22/20 7:53 AM, Stephen Scheck wrote: Matt Wette wrote: maybe this? (use-modules (system base language)) (current-language (lookup-language 'ecmascript)) It doesn’t work: scheme@(guile-user)> (use-modules (system base language)) scheme@(guile-user)> (look

Re: Multi-language scripts

2020-08-21 Thread Matt Wette
On 8/21/20 12:17 PM, Stephen Scheck wrote: Matt Wette wrote: Did you try `guile --language=emacscript’? mwette$ cat zz.js display("hello\n”); mwette$ guile --language=ecmascript zz.js hello The intent is that I want it to change language in the middle of the script. maybe this?

Re: Multi-language scripts

2020-08-21 Thread Matt Wette
On 8/21/20 11:22 AM, Stephen Scheck wrote: I'm trying to invoke `guile -s script` where script contains something like this: ,language ecmascript display("Hello JavaScript!\n"); ,language scheme (display "Hello Guile!\n") However, REPL meta-commands do not seem to be avai

Re: define-language

2020-08-07 Thread Matt Wette
On 8/7/20 12:31 PM, Stephen Scheck wrote: What is the right way to use `define-language`? The Guile manual says that when using this form "the language will be added to the global language set." I interpret that to mean that the `,language` meta-command switches the REPL to use the newly-defin

Re: define-language

2020-08-07 Thread Matt Wette
On 8/7/20 12:31 PM, Stephen Scheck wrote: What is the right way to use `define-language`? The Guile manual says that when using this form "the language will be added to the global language set." I interpret that to mean that the `,language` meta-command switches the REPL to use the newly-defined

Re: Nyacc question: where are the actions bound?

2020-08-03 Thread Matt Wette
On 8/3/20 1:42 PM, to...@tuxteam.de wrote: On Thu, Jul 30, 2020 at 06:50:08AM -0700, Matt Wette wrote: On 3/8/20 3:14 AM, to...@tuxteam.de wrote: Hi, I'm playing around with Nyacc: I found a first little use case [...] So I defined some function =collect= which will be called from ac

Re: Nyacc question: where are the actions bound?

2020-07-30 Thread Matt Wette
On 3/8/20 3:14 AM, to...@tuxteam.de wrote: Hi, I'm playing around with Nyacc: I found a first little use case to get my feet wet. First of all, than you, Matt, for this impressive package. Shamelessly stolen from the minimal example, playground looks roughly like this: #+begin_source scheme

Re: NYACC: getting source location info?

2020-07-10 Thread Matt Wette
On 7/10/20 1:37 PM, to...@tuxteam.de wrote: Hi, I'm having some fun with NYACC (thanks, Matt!). To help debugging things and for errors and warnings, it'd be nice to "know" where the current LHS non-terminal starts in the source. Its endpoint is (is it?) (port-line (current-input-port) [and

Re: C programs in Scheme syntax

2020-05-29 Thread Matt Wette
The other solutions look closer to what you want but     https://savannah.nongnu.org/projects/nyacc has a C parser written in Guile which outputs SXML and a pretty-printer which converts the SXML to C code. On 5/28/20 8:23 PM, Keith Wright wrote: I am thinkging about a project that uses Scheme

Re: Running guile single-threaded?

2020-05-17 Thread Matt Wette
On 5/17/20 8:27 AM, Caleb Ristvedt wrote: I'm trying to use unshare() with the CLONE_NEWUSER flag, but this requires that the process be single-threaded (otherwise I always get EINVAL). /proc//task has 6 entries when I launch guile, 5 after disabling automatic finalization. I can't seem to find a

Re: FFI questions

2020-05-15 Thread Matt Wette
On 5/15/20 4:52 PM, Matt Wette wrote: On 5/15/20 1:09 PM, Taylan Kammer wrote: The FFI Helper is by Matt Wette who also hangs around on this mailing list I believe. I think Taylan's suggestion on your first part is probably correct. Bytestructures allows you to access and c

Re: FFI questions

2020-05-15 Thread Matt Wette
On 5/15/20 1:09 PM, Taylan Kammer wrote: The FFI Helper is by Matt Wette who also hangs around on this mailing list I believe. I think Taylan's suggestion on your first part is probably correct. Bytestructures allows you to access and change structure members by name. Matt

[ANN] nyacc-next.scm Guix package spec

2020-04-24 Thread Matt Wette
Hi All, I wanted to let you know the Guix pacakge spec for the latest NYACC release is available from https://download.savannah.gnu.org/releases/nyacc/nyacc-next.scm Examples will appear installed under $HOME/.guix-profile/share/doc/nyacc/examples/ About NYACC: https://www.nongnu.org/nyac

Re: [ANN] nyacc 1.02.0 released

2020-04-10 Thread Matt Wette
On 4/8/20 6:27 AM, Matt Wette wrote: Hi All, I have released version 1.02.0 of NYACC. version 1.02.1 is released to fix a critical bug cxeval.scm(sizeof-mtail) where code to skip comments in struct and union def's was actually skipping the good code and trying to find size of comments. 

[ANN] nyacc 1.02.0 released

2020-04-08 Thread Matt Wette
Hi All, I have released version 1.02.0 of NYACC. This release reflects a lot of work on the C99 munger, the constant expression evaluator, and the FFI helper. The munger does things like expanding use of C typedefs. This helps in being able to evaluate C expressions like sizeof(foo_t) where fo

Re: How best to produce a standalone executable with Guile?

2020-04-05 Thread Matt Wette
On 4/4/20 10:28 PM, James Cooper wrote: Hi Guile folks, I am currently experimenting with a handful of languages that include modern implementations of Concurrent ML, to determine which one appears best able to handle computationally- and message-heavy workloads (at least for my purposes, Comput

Re: syntax taste: use of unquote in macros

2020-03-30 Thread Matt Wette
On 3/30/20 3:34 AM, to...@tuxteam.de wrote: On Mon, Mar 30, 2020 at 12:07:07AM +0200, Zelphir Kaltstahl wrote: On 3/29/20 5:11 PM, Matt Wette wrote: Hi All, I'm not sure if you know about this, but there is a discrepancy in the way some folks define macros to use unquote (aka ,). 

syntax taste: use of unquote in macros

2020-03-29 Thread Matt Wette
Hi All, I'm not sure if you know about this, but there is a discrepancy in the way some folks define macros to use unquote (aka ,).   For example, > (use-modules (system base pmatch)) > (pmatch '(foo "bar")  ((foo ,val)  (write val) (newline))) => "bar" > (use-modules (ice-9 match)) > (match '(

Re: YAML parser?

2020-03-24 Thread Matt Wette
On 3/4/20 6:21 AM, Matt Wette wrote: On 2/23/20 7:29 AM, Matt Wette wrote: On 2/21/20 8:12 PM, Aleix Conchillo Flaqué wrote: Hi, does anyone know if there's any YAML parser for Guile? Haven't been able to find any. Thanks! Aleix Hi Aleix, I don't know of a YAML parser fo

  1   2   3   4   5   >