From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Shell commands with output to string Date: Wed, 23 Feb 2022 09:13:48 -0500 Message-ID: <87ee3t657n.fsf@laura> References: <87o82z5636.fsf@laura> <87y222lwn3.fsf@t14.reltub.ca> <87k0dm6etu.fsf@laura> <9a84554c-c2ef-7c9b-ffff-129cb517afca@posteo.de> Reply-To: Olivier Dion Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Zelphir Kaltstahl , Leo Butler Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Feb 23 15:14:50 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMsPp-000AdZ-Dl for guile-user@m.gmane-mx.org; Wed, 23 Feb 2022 15:14:49 +0100 Original-Received: from localhost ([::1]:53496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMsPm-0004JQ-Uq for guile-user@m.gmane-mx.org; Wed, 23 Feb 2022 09:14:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMsPA-0004Fw-1v for guile-user@gnu.org; Wed, 23 Feb 2022 09:14:08 -0500 Original-Received: from smtp.polymtl.ca ([132.207.4.11]:35204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMsOx-000255-KD for guile-user@gnu.org; Wed, 23 Feb 2022 09:14:07 -0500 Original-Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 21NEDm6v019300 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Feb 2022 09:13:53 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 21NEDm6v019300 In-Reply-To: <9a84554c-c2ef-7c9b-ffff-129cb517afca@posteo.de> X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Wed, 23 Feb 2022 14:13:48 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18132 Archived-At: On Wed, 23 Feb 2022, Zelphir Kaltstahl wrote: >> There's ton of missing stuffs in the standard library IMO. On top of my >> head, filesystem paths manipulation (e.g. path-join) is also one that is >> probably getting re-invented a lots. > > I actually made something for that, trying to copy mostly the Python > behavior for os.path.join: > > https://notabug.org/ZelphirKaltstahl/guile-fslib > > Also available as a GNU Guix package, but not updated in a while on > Guix. Repository contains more up to date version. This is great and should be merged into the standard library of Guile. Maybe not at it's (I have not read everything), but this would be trully benifical to all Guile users. By keeping this as an external library such as a Guix package, I fear we're aiming at the 'nodejs syndrome' where everything -- down to the simplest hello world -- is a package dependency. >> I believe that the successful story of Python is not just about its >> pretty syntax, but also dues to its very large standard library. > > I think so too. Although I sometimes have the feeling, that Guile does > things in a cleaner way, once one figures out how to do them in the > first place. One thing I really like are the ports. Stuff like > call-with-output-string. Takes some twisting of the brain, but once > one gets it, it becomes very useful and elegant. Of course Scheme does things better than Python. I wouldn't be hacking with it if it was not the case ^^. Not only the syntax, but the programming paradigms. You want FP, you got it. You want OOP, sure. You prefer procedural, no problem. With Python it's more like just OOP although there's been progress on the FP side. > But yes, Python is very beginner friendly in terms of batteries > included. Although I think that its syntax feels a bit ad-hoc. As in > "Oh we want some syntax for X =E2=80=A6 lets invent this keyword here. or= some > new operators or things like that." Yeah they were late to the FP paradigm so they had to invent something without breaking their OOP echo chamber I guess. IIRC, there's talks about adding patterns matching which Lisp has since the begining. So yeah very late to the game of FP. > I like Guile syntax (or Scheme in general) much more. However, it is > difficult to motivate others in a quick demo to learn the language, > when you cannot take half an hour time to explain, what that for other > people weird looking syntax is actually really cool. I'm not sure if it's only the syntax. Yes we often see "but the parentheses burn my eyes" but I believe that things are more complex than that. What I think is difficult is to explain to someone why they should try to learn new languages in the first place. On top of my head, people ask themself the following question before learning a new language: - Profit -> Can I easily find a good paying job by developing in this language? =20=20=20=20=20=20 - Field -> Can I develop in my field (e.g. video game, mathematic) with this language? Is there a community? - Support -> Can I find solutions to my problems easily online? Are there libraries for common problems that I could encounter? - Prototyping -> How easy is it for me to scratch an idea with this language? and probably other reasons. Now, try to explain to someone that does web developpement in Javascript or Python that Scheme is far more supperior. That person would just ask: Does Guile has support for MongoDB? And proceed to dismiss it. Of course, some hackers like me just like to learn new stuffs. It took me about an one hour into Scheme course of the MIT on youtube to understand that I just found the holy grail of programming language. And yet, I have not find the answer to the `profit` question. --=20 Olivier Dion Polymtl