From kennethflak at protonmail.com Thu Aug 1 06:58:35 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Thu, 01 Aug 2024 13:58:35 +0000 Subject: [CM] How to create directory programmatically? Message-ID: <87zfpwqr9a.fsf@protonmail.com> Hi, How can I create a directory programmatically? I have this (dir is defined earlier in the code): (if (not (directory? dir)) (make-directory dir)) but make-directory is, unfortunately, not an S7 function. Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab,codeberg}.com/kflak Mastodon: @kf at sonomu.club" From bil at ccrma.Stanford.EDU Thu Aug 1 07:26:40 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Thu, 01 Aug 2024 07:26:40 -0700 Subject: [CM] =?utf-8?q?How_to_create_directory_programmatically=3F?= In-Reply-To: <87zfpwqr9a.fsf@protonmail.com> References: <87zfpwqr9a.fsf@protonmail.com> Message-ID: You can load libc.scm, which ties most of libc into s7, then call mkdir as (*libc* 'mkdir): ((*libc* 'mkdir) "new-dir") From kennethflak at protonmail.com Thu Aug 1 10:27:26 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Thu, 01 Aug 2024 17:27:26 +0000 Subject: [CM] How to create directory programmatically? In-Reply-To: References: <87zfpwqr9a.fsf@protonmail.com> Message-ID: <87o76cqhl0.fsf@protonmail.com> Great, thanks! writes: > You can load libc.scm, which ties most of libc into s7, > then call mkdir as (*libc* 'mkdir): > > ((*libc* 'mkdir) "new-dir") -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab,codeberg}.com/kflak Mastodon: @kf at sonomu.club" From k.s.matheussen at gmail.com Thu Aug 1 11:56:06 2024 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Thu, 1 Aug 2024 20:56:06 +0200 Subject: [CM] How to create directory programmatically? In-Reply-To: <87zfpwqr9a.fsf@protonmail.com> References: <87zfpwqr9a.fsf@protonmail.com> Message-ID: On Thu, Aug 1, 2024 at 4:01?PM Kenneth Flak wrote: > > > Hi, > > How can I create a directory programmatically? I have this (dir is > defined earlier in the code): > > (if (not (directory? dir)) > (make-directory dir)) > > but make-directory is, unfortunately, not an S7 function.? Don't know if it's programmatically enough, but this should work: (system (string-append "mkdir " dir)) From kennethflak at protonmail.com Fri Aug 2 07:00:54 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 02 Aug 2024 14:00:54 +0000 Subject: [CM] How to create directory programmatically? In-Reply-To: References: <87zfpwqr9a.fsf@protonmail.com> Message-ID: <87v80j81ny.fsf@protonmail.com> Very nice! Very useful to be able to call system commands directly from Scheme... Best, Kenneth "Kjetil Matheussen" writes: > On Thu, Aug 1, 2024 at 4:01?PM Kenneth Flak > wrote: >> >> >> Hi, >> >> How can I create a directory programmatically? I have this (dir >> is >> defined earlier in the code): >> >> (if (not (directory? dir)) >> (make-directory dir)) >> >> but make-directory is, unfortunately, not an S7 function.? > > Don't know if it's programmatically enough, but this should > work: > > (system (string-append "mkdir " dir)) -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab,codeberg}.com/kflak Mastodon: @kf at sonomu.club" From bil at ccrma.Stanford.EDU Fri Aug 2 14:12:18 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 02 Aug 2024 14:12:18 -0700 Subject: [CM] Snd 24.6 Message-ID: Snd 24.6: Kjetil Metheussen made a new version of s7webserver that works in Python3 as well as Python2 and updated the s7webserver Makefile johnm donated gsl_vector_size and several helper functions to libgsl.scm s7: dynamic-unwind has changed slightly (unwinder gets the arg list, not just (cadr args)) checked: sbcl 2.4.6|7 Thanks!: Kjetil Matheussen, johnm From da at liii.pro Mon Aug 12 10:53:38 2024 From: da at liii.pro (Da Shen) Date: Tue, 13 Aug 2024 01:53:38 +0800 Subject: [CM] =?utf-8?q?How_to_create_directory_via_S7_Scheme=3F?= Message-ID: Just joined the mail list, and I'm here to answer this question in my way: ``` (import (liii os)) (mkdir "/tmp/dir") ``` The above Scheme code snippet works fine in Goldfish Scheme. And Goldfish Scheme is created by me, it is based on S7 Scheme and tries to provide standard libraries like the Python language. https://github.com/LiiiLabs/goldfish BTW We are using S7 Scheme (since 2022/01/30, the release of Mogan v1.0.0) in the Mogan STEM Suite: https://github.com/XmacsLabs/mogan I was thinking about writing another love letter S7 Scheme like: https://carloscarrasco.com/love-letter-to-s7-scheme/ And Goldfish Scheme is my love letter in code format on git. Darcy Shen, Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Aug 12 13:16:02 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 12 Aug 2024 13:16:02 -0700 Subject: [CM] =?utf-8?q?How_to_create_directory_via_S7_Scheme=3F?= In-Reply-To: References: Message-ID: Good luck with Goldfish Scheme! Massimiliano Gubinelli has been poking me to check out the Mogan project (to deal with an s7 problem), but I never seem to get around to it (he is probably grinding his teeth, causing his dentist to shake his head and mutter).