<amz3>sirgazil and all, I started a tutorial <amz3>my markdown parser doesn't render bullets, so the introduction and conclusion are not formatted correctly <amz3>also this is a draft(!) I just wrote <amz3>many mistakes, typos ahead <amz3>also now it's clear that one tutorial is not enough <amz3>I did not even have time to introduce let and lambda <amz3>nothing about goops and records yet <amz3>but I think it's the correct size for a tutorial <amz3>It's true, I've hit stream-null in terms of jokes :o) <ArneBab_>amz3: I think you need a note on activating readline <amz3>I did follow hy tutorial... <amz3>see you later i got to sleep <ArneBab_>amz3: (define (ruse) ruse) ← nice! (I just realized that this actually works in Python, too. I did not expect that) <ArneBab_>you could add that (list ("apple" . 1)) can also be used to construct (list (cons "apple" 1)) <ArneBab_>… I guess that already becomes too complex ***adhoc_ is now known as adhoc
<nilg>is there an easy way to repeat a function call n times? <taylan>(for-each (lambda (i) (my-function)) (iota n)) <nilg>excellent (took me a while to get it), thanks! <rekado>note that "for-each" throws away the returned value. If you want to get a list of all values returned by each call to my-function use "map" instead. <lloda>it's probably more idiomatic to do (let loop ((i n)) (unless (zero? i) stuff (loop (- n 1)))) <lloda>(iota n) builds a list you don't really need <lloda>there's also (do) that no one uses <lloda>(do ((i 0 (+ i 1))) ((= i n)) stuff ...) <amz3>lloda: does do return something? <amz3>there is trick to avoid the use of named let, sometime instead of (define (rec ruse fox) ...) and use a named let inside <lloda>that was (loop (- i 1) ofc :/ <lloda> ((_ n e0 ...) (do ((i 0 (+ i 1))) ((= i n)) e0 ...)))) <lloda>which I use for benchmarks etc <amz3>you can do (define* (rec ruse fox #:optional out) ...) <amz3>lloda: instead of (- i 1) I used (1- i) <rekado>I avoid "1-" because it looks wrong. <rekado>you're saving one space character only. <lloda>(- i 1) is my choice, but if you're in a golfing mood, one character less is one character less :D <amz3>I'm still trying to get used to guile code layout... well this 1- thing is minor. What I mean, is that still don't really know what's beautiful guile or not <amz3>Also, know I remember how difficult it is to learn a really new language <amz3>getting the code in the editor, is by far the easiest part of coding. Sadly it's not the only thing about coding. <amz3>let's start the second part of my tutorial <lloda>there's not a lot of Guile code out there, it's true. Most of it is bindings! <amz3>lloda: hey, my guile code is bindings! <amz3>recently i've been thinking a lot about something like jupyter <amz3>except jupyter itself doesn't work with my library <amz3>so outside my current project which sort of an NLP framework. I'd like to have/code a graphical REPL like jupyter, or a replacement for weasyprint aka. sxml->pdf <rekado>(I only know jupyter from trying to package it for Guix. The dependencies are quite messy.) <amz3>I think guile REPL does most of it already <amz3>it's quite popular in scientific computing <rekado>... which is why I'm packaging it ;) <amz3>it got an opensource award <rekado>it's like org-babel but browser-based, isn't it? <amz3>I'd don't know org-babel. Wait. I look at it right now <amz3>it looks like it, but it's interactive like texmacs <amz3>hence it looks more like texmacs, but it's focused on programming not typesetting <amz3>also one notebook (aka. document) accept a single language <rekado>with org-babel you can also ask for a snippet to be evaluated and the result be printed in the buffer. <amz3>it's backed by an REPL, if you type `15 + 27` in a python notebook, it will evalute it and display the result <rekado>with babel you can do that even with C code, using GCC to compile the stuff in the background and then import the result, all in one go. <rekado>I haven't used it before but it was demonstrated in an FSFE meeting I attended recently. <amz3>rekado: with org-mode, can I display the REPL UI? <rekado>the syntax to demark code blocks is pretty ugly, but it's pretty cool anyway. <amz3>because i'm writing a tutorial, and I'd like to avoid the reader 'getting lost' <amz3>if I only display the scheme code instead of the REPL UI + scheme code <amz3>it looks like jupyter is fully inspired from org-babel <rekado>there is no built-in way to print also the REPL UI along with the code and the result, but you might be able to do this by customizing the exported HTML+CSS. <rekado>e.g. to always prefix examples with the REPL prompt and results with more REPL output. <rekado>(export to HTML with C-c C-e h h) <amz3>thanks a lot, I'll try that right away <rekado>BTW you can write these "#+BEGIN_SRC scheme ... #+END_SRC" blocks with by typing "<sTAB" (without the quotes) when you are in an org-mode buffer. <ArneBab>is there any ETA on releasing 2.0.12? <civodul>seriously though, the main blocker is that we need to come to an agreement on a new SMOB-replacement API <civodul>the new web site is likely to be on-line before 2.0.12 is out :-) <ArneBab>civodul: I would really, really like to see a 2.0.12 release — AFAIK it contains REPL changes which make wisp much nicer to use :) <kristofer>I'd like to use the (ice-9 json) module. I can't seem to find the right git repository. Can someone give me some direction? <amz3>maybe it's patch on guile-dev mailling list <amz3>but it's not in its public repo <amz3>usually he is already in the channel at this time <ArneBab>it doesn’t look like it’s already merged <lloda>we should think about the release of 2.2, too :D <amz3>yes, the only bug I know i solved by the 2.2 branch (it's about GC). Problem is I can't reproduce the bug for 2.0 <amz3>I mean I can reproduce the bug with 2.0, but not in a simple way <ArneBab>civodul: why does 2.0.12 need a SMOB-replacement API? <ArneBab>(sorry for the ignorance on the topic…) <civodul>but wingo added one, with the hope that it would allow users to start migrating <civodul>such that 2.4 can remove the SMOB API <paroneayea>ArneBab: guile-next is in guix and has the bleeding edge version of guile <paroneayea>hey nice, John Wiegley mentioned guile-emacs on the list again in talking about emacs' future <paroneayea>I guess there's still the ongoing discussion about whether John can reconcile his short-term-pragmatism-centric version of freedom with the gnu project's long-term-purity-centric verison of freedom to be the emacs maintainer <paroneayea>but i think from a technical perspective, john would serve emacs really well, and at least has some interest in guile powered emacs, which is good for #guile <civodul>from what i heard it's not just "short-term pragmatism" <civodul>rather something like indifference or hostility towards free software <paroneayea>though he likes proprietary software, and is more than happy to see proprietary software advance also. He's also grown skeptical of copyleft <paroneayea>however, he does release all his emacs extensions as GPL'ed <paroneayea>but is more than willing to express that copyleft is a losing strategy <civodul>the question is more whether GNU can afford to have maintainers whose view are opposite to GNU's goals <civodul>well maybe not "opposite", but definitely not aligned <paroneayea>john is saying that he'd support emacs and the fsf/gnu's positions as maintainer <paroneayea>but that doesn't mean he'd take on those positions <civodul>the FSF has nothing to do with GNU software, as you know :-) <paroneayea>welllllllllllllll... I think that's yes and no :) <paroneayea>so I think saying it has nothing to do with it is false <paroneayea>also a lot of the work that comes out of the fsf informs gnu <paroneayea>I think FSF and GNU are, as the Django folks would say, "loosely coupled" <paroneayea>civodul: and you're also right to push for clarity that they aren't the same <paroneayea>since that's a common source of public confusion <civodul>yeah, i think confusion between the two is unhelpful <amz3>srfi-99 would be very nice to introduce records <amz3>I did not know that FSF and GNU was not the same thing <taylan>I also like SRFI-99 quite a bit. subtyping of record types is sometimes quite desirable, and SRFI-99 adds it to SRFI-9 relatively cleanly. <taylan>though it pains me that it lacks R6RS's protocols/constructors feature. (I haven't had an actual use-case for that feature yet because I limit myself to SRFI-9 in first place, but it's a fundamental feature that really cannot be imitated sanely when not built into the record type system.) <amz3>I'm not sure we talk about the same srfi <amz3>I'm thinking about (define-record-type* <my-record> field-one field-two) <amz3>in the version i use, there is no support for subtyping <amz3>tho i never had any need of subtyping fwiw <taylan>amz3: that's not SRFI-99 you're thinking of. I think you have a Guile-specific or Guix-specific extension of SRFI-9 in mind. <taylan>SRFI-99 extends the 'define-record-type' from SRFI-9 (with the same name) with additional semantics ***Guest29682 is now known as Fuuzetsu
<davexunit>rekado: I've been working on some CSS for my new Haunt-based blog and I took a lot of inspiration from your site's minimal design. <sneek>davexunit, you have 1 message. <sneek>davexunit, rekado says: The proposed skribe document syntax looks good to me! Re indentation: I was using a mix of scheme-mode and manual indentation for my blog posts. <davexunit>I'm still deciding if I want to go forward with converting everything to use skribe or not. <amz3>I'm going crazy in the tutorial. Soon enough there will be a panda colony on the moon <amz3>davexunit: seems like you json library has some success! <amz3>hmm, your guile-json repository on github is not ice-9 json <davexunit>guile-json predates (ice-9 json) by quite awhile <davexunit>I wrote (ice-9 json) to address the implementation issues of guile-json. <amz3>I'm look for an application to illustrate <records> that is easy to implement and can be fun to play with in the REPL <amz3>I was thinking about "hanoi tower", but it doesn't play well with the tutorial story which happens at a 'guiler hackfest' <amz3>that's where things go waco <amz3>guilers are supposed to be hacking on the "earth software system" which is supposed to big a super project of guix/guile/gnunet <amz3>Since I was annoyed by the hanoi towers, I though to use the 'Hyper Continental' illustration, HC is basicaly the hyperloop <amz3>and solve some kind of train problem with it <amz3>like the good old days of LISP <amz3>The first example is dealing with breakfast box <amz3>well, for sure this is more than a little tutorial <amz3>maybe I should not use illustration, or smaller ones, but how? that is the question <amz3>I'm looking for something futurist, but simple <amz3>breakfast is futurist, for me at least ;) <amz3>and this is futurist for me too :) <amz3>I'll use a immutable todo list :) <amz3>right now i did not introduce anything mutable in the tutorial... <amz3>3 month ago I was wondering how it was possible to do such thing <amz3>the only example I was given is VCS, datomic and "undo" feature <jao>civodul, you're welcome :) <civodul>it's one of the things that make us live beautiful lives <civodul>(you should add a "testimonials" section on the web page :-)) <paroneayea>jao: I'll happily give you a testimonial if you want one :) <amz3>«Since I use geiser, I do my guile REPL dreams in color» amz3 2015/10/12 <jao>ACTION is tempted :)