IRC channel logs

2015-10-12.log

back to list of logs

<amz3>sirgazil and all, I started a tutorial
<amz3> http://hypermove.net/learn-scheme-guile.html
<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>s/time/space
<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
<ArneBab_>otherwise: cool!
<amz3>thx, ok
<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_>sleep well!
<ArneBab_>amz3: last note
<ArneBab_>you could add that (list ("apple" . 1)) can also be used to construct (list (cons "apple" 1))
<ArneBab_>“looks like its result”
<ArneBab_>uh… (quote (("apple" . 1)))
<ArneBab_>… I guess that already becomes too complex
<ArneBab_>quote wasn’t introduced yet
<ArneBab_>amz3: better ignore what I said ☺
<ArneBab_>good night!
***adhoc_ is now known as adhoc
<nalaginrut>morning guilers~
<artyom-poptsov>Good morning, nalaginrut
<nalaginrut>heya
<amz3>héllo :)
<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>I can try, sorry
<amz3>it returns nothing
<lloda>it doesn't
<amz3>i use named let a lot!
<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>I have
<lloda>(define-syntax repeat
<lloda> (syntax-rules ()
<lloda> ((_ n e0 ...) (do ((i 0 (+ i 1))) ((= i n)) e0 ...))))
<lloda>
<lloda>which I use for benchmarks etc
<amz3>you can do (define* (rec ruse fox #:optional out) ...)
<lloda>rare in normal code
<amz3>lloda: instead of (- i 1) I used (1- i)
<amz3>this cosmetic
<rekado>I avoid "1-" because it looks wrong.
<amz3>#true
<amz3>but it's terse :D
<rekado>you're saving one space character only.
<rekado>I'd rather (define dec 1-)
<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>artanis is not bindings
<amz3>recently i've been thinking a lot about something like jupyter
<amz3>it's very useful
<amz3>I mean I like it
<amz3>except jupyter itself doesn't work with my library
<amz3>(python lib)
<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>tornado, zmq IIRC
<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
<rekado>for Emacs.
<amz3>based on the introduction material http://orgmode.org/worg/org-contrib/babel/intro.html
<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>"interactive"?
<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
<amz3>on the fly
<amz3>ah really
<amz3>nice
<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.
<rekado>re REPL UI: I don't know.
<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
<rekado>let me try that
<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.
<amz3>:)
<rekado>s/with by/by/
<civodul>Hello Guilers!
<ArneBab>is there any ETA on releasing 2.0.12?
<civodul>ArneBab: 6 months ago :-)
<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 :-)
<kristofer>good morning!
<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 :)
<ArneBab>moin kristofer
<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>i can't find it either
<ArneBab>is it this? https://github.com/aconchillo/guile-json
<amz3>maybe it's patch on guile-dev mailling list
<taylan>wasn't it by davexunit?
<amz3>yes
<amz3>but it's not in its public repo
<kristofer>no, it's relate to this mailing list post: https://lists.gnu.org/archive/html/guile-devel/2015-08/msg00003.html
<amz3>usually he is already in the channel at this time
<ArneBab>it doesn’t look like it’s already merged
<taylan>David Thompson is indeed davexunit (unless I have a very long-lasting misconception :P). his GitHub repo of guile-json seems forked from aconchillo's though, dunno if it's that one: https://github.com/davexunit/guile-json
<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>arf
<amz3>I mean I can reproduce the bug with 2.0, but not in a simple way
<amz3>and it's fixed in 2.2
<ArneBab>civodul: why does 2.0.12 need a SMOB-replacement API?
<ArneBab>(sorry for the ignorance on the topic…)
<civodul>ArneBab: well it doesn't *need* it
<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
<civodul>(very roughly)
<paroneayea>ArneBab: guile-next is in guix and has the bleeding edge version of guile
<paroneayea>if you want to test wisp with it
<ArneBab>paroneayea: sounds good
<ArneBab>thank you!
<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
<civodul>no?
<paroneayea>I don't think John is hostile to 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>he doesn't have a choice
<paroneayea>right
<civodul>the question is more whether GNU can afford to have maintainers whose view are opposite to GNU's goals
<paroneayea>right
<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>but yes
<paroneayea>gnu policy
<civodul>yeah
<paroneayea>fsf is the gnu project steward
<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>eg analysis that the fsf licensing team does
<civodul>that's not specific to GNU
<paroneayea>from a pure analysis standpoint, yes :)
<paroneayea>I think FSF and GNU are, as the Django folks would say, "loosely coupled"
<paroneayea>but yes technically FSF is just the steward
<civodul>yeah
<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>ACTION hides
<amz3>:)
<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>then we need srfi-999
<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
<amz3>yet
<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
<taylan>ACTION goes AFK
***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>thanks!
<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>a TODO LIST!
<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
<davexunit>geiser 0.8 is out! https://github.com/jaor/geiser/releases/tag/0.8
<daviid>cool!
<civodul>yay!
<civodul>thanks jao et al. :-)
<jao>civodul, you're welcome :)
<paroneayea>yes thank you jao :)
<paroneayea>geiser is amazing.
<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 :)