IRC channel logs

2018-07-06.log

back to list of logs

<brettgilio>Hi, all.
<mwette>greetings
<zv>sneek: what is inject
<zv>sneek: what is python
<lavaflow>I made a thing in guile: https://gitlab.com/jgreco/zipweb/blob/master/zipweb.scm
<lavaflow>webserver that serves straight out of a zip file, in under 100 loc
<mwette>lavaflow: clean -- that's nice
<lavaflow>thanks, I'm pretty pleased with how straight forward it was
<amz3>OrangeShark: hi
<amz3>OrangeShark: congrats for the release of guile-git
<amz3>OrangeShark: why a release?
<amz3>I will make a mail to the mailling list
<amz3>let's try to put together a paper for scheme 2018
<amz3>actually, the experience report _limit_ is 14 pages but there is no minimum apparently
<OrangeShark>hello amz3. I was asked by civodul to make a release. We have enough working that it makes sense to at least to an initial release.
<civodul>"asked" is a bit of a strong word
<civodul>i'd say i merely suggested it ;-)
<OrangeShark>sorry :P
<civodul>heh :-)
<civodul>hey there!  
<civodul> https://www.gnu.org/software/guix/blog/2018/gnu-guix-and-guixsd-0.15.0-released/
<manumanumanu> Wohoo!
<manumanumanu>civodul: congrats
<OrangeShark>ooo, faster guix pull and it has rollbacks
<dsmith-work>Happy Friday, Guilers!!
<mwette>dsmith-work: same to you
<manumanumanu>mwette: you should have a look at when Rich Hickey introduced transducers to the clojure crowd. I think it is probably the best overview
<manumanumanu>How efficien is keyword argument handling in guile?
<manumanumanu>optional arguments should be fast (at least if case-lambda is fast), but... keyword args... I'm curious!
<rekado>Sometimes I daydream about extending Guile to support the R language.
<civodul>is "dream" the right term though?
<rekado>a nightmare is also a kind of dream
<civodul>true :-)
<rekado>another common approach that appears to be popular is to embed R and tape over the differences and to shuffle data back and forth.
<rekado>this seems to be what rpy2 does.
<rekado>it allows people to use R features from within Python.
<civodul>yes and Jupyter's Xeus does that with R, Julia, and Python
<civodul>so you can pass matrices around those 3
<mwette>nyacc has a partial parser for MATLAB
<OrangeShark>happy friday
<civodul>happy Friday!
<civodul>mwette: that sounds fun!
<civodul>we could "dream" of an M language front-end for the compiler
<OrangeShark>I've been wanting to try to write a language for guile
<mwette>manumanumanu: look at ,compile (lambda* (a #:key (b 2) (c 3)) (+ a b c)) vs (lambda* (a #:optional (b 2) (c 3)) (+ a b c))
<mwette>check nyacc/examples/nyacc/lang/matlab,javascript,... the javascript has a compiler using tree-il. some simple examples should work
<rekado>people have many complaints about R as a language and about the implementation. What keeps many people from moving to other languages is CRAN and Bioconductor.
<mwette>gotta go for appt ...
<rekado>I was wondering if it would be feasible to use this opportunity to introduce the long prophesied Lispy language for bioinformatics and statistics.
<dsmith-work>Speaking of javascript, how broken is the current ecmascript support in guile?
<civodul>rekado: that'd be a decade-long effort i suppose
<hugo>Is there a way to set the current module from a file sourced?
<hugo>I have tried (set-current-module (resolve-module '(gamesh)))
<hugo>But nothing happens from the file, in the repl it works
<mwette>hugo: can you be more explicit? This works: http://paste.debian.net/1032616/
<mwette>What is the use-case for supporting other languages in Guile? integration w/ scheme, fast interpreter, new language development?
<OrangeShark>mwette: I think the original idea was by rms, some people prefer an imperative language for things
<mwette>OrangeShark: But why use JS in Guile when node.js is freely available? And so for R, Octave, Lua, etc.
<OrangeShark>you can embed Guile into a program and then extend it with various languages
<janneke>mwette: not sure, but node.js almost implicitly means npm, which means: unmaintainable bootstrapping nightmare
<davexunit>mwette: have you seen how Racket allows a bunch of languages? it's a really powerful thing.
<davexunit>Typed Racket, etc.
<janneke>my client jumped on the nmp/node bandwagon and has a pretty difficult road to move away from that, towards Guile
<mwette>OrangeShark: Got it. Have seen some programs use scheme for extension and then python gets added eventually
<janneke>so the biggest reason may be in culture/philosophy rather than technical
<davexunit>I don't think we'll have a really capable javascript implementation. world moves too fast.
<OrangeShark>mwette: what davexunit says about racket is also a good point
<davexunit>I think the multi-language feature is interesting for other reasons than implementing more mainstream languages.
<davexunit>I always point to guile-xcb as an example of this.
<davexunit>it provides an interface to the X server by compiling an XML spec into Scheme code which is then compiled into Guile bytecode.
<dsmith-work>Ah that's cool.
<OrangeShark>mwette: davexunit: here is an article they wrote about racket recently https://cacm.acm.org/magazines/2018/3/225475-a-programmable-programming-language/fulltext
<hugo>mwette: I want the repl I boot into to be in a different module that guile-user
<hugo>the current-module gets set in my file, but it goes back to guile-user once I get into the repl
<mwette>hugo: Are you using load? If so, did you try using include?
<mwette>OrangeShark: thanks for the reference : reading it
<mwette>By the way, nyacc provides parser generator, lex builder. I started working on javascript but my skills with tree-il generation need honing.
<hugo>mwette: use-module
<hugo> https://github.com/HugoNikanor/GuileGamesh/blob/camera/scheme/main.scm
<hugo>Here is my main, which is "load"-ed from a C file.
<mwette>Using `(include "/path/to/main.scm")' will work I think. Another option to try is to provide a procedure that calls set-current-module.
<mwette>scheme@(guile-user)> (load "yyy.scm")
<mwette>$2 = #<directory (guile-user) 14eb140>
<mwette>scheme@(guile-user)> (include "/tmp/yyy.scm")
<mwette>$3 = #<directory (guile-user) 14eb140>
<mwette>scheme@(htmlprag)>
<mwette>back to making guile multi-lingual ...
<mwette>I get providing support for embedded domain specific languages (eDSL). But these are typically "small, simple" and not things like javascript, lua
<mwette>maybe a contribution is to provide tools for users to generate domain specific languages. That is, for users who don't want to use scheme macros.
<mwette>I create a lot of domain-specific languages in Guile. The language spec starts with `define-syntax'.
<mwette>So maybe a mini-MATLAB would be good candidate for this. I think Guile still needs a method to associate files with languages, like `#lang' used by Racket.
<daviid>mwette: octave?
<OrangeShark>mwette: why not extensions like .scm?
<OrangeShark>.wisp
<OrangeShark>.js
<mwette>OrangeShark: extensions are fine by me, but Guile does not yet support them; I believe there is a debbugs on that
<mwette>davidd: octave is GNU MATLAB https://www.gnu.org/software/octave ; very popular
<mwette>many, if not most, engineers coming from universities have learned only MATLAB
<daviid>mwette: t's been decades I'm fighting universities teaching student to ue non free s/w, in particular matlab
<daviid>teaching a student to use non free s/w is, imo, a crime
<daviid>it's like you give them drugs, then they become dependent, and can't live witout it anymore ... I've seen this all my carrer ... then they reproduce this lack of responsability in other domain, sart to use fb, insta, twitter .. and participate to the ttal destrution of the fundamental principles of our deocracy
<daviid>and then the world cries, democracies are under threat, because of non free s/w and banks ... terrible
<daviid>someone wrote a book (or a skeleton for a book I d'ont remember) about Guile Scheme is btter then R (or something like that...) but I can't find the link anymore, anyone has it?
<OrangeShark>daviid: oh I recall seeing that book.
<daviid>OrangeShark: I was trying to find the link to paste for rekado
<OrangeShark>I can't seem to find it either
<daviid>I'm not very good at ducduckgoing, so far I can't find it either (I thought I bookmarked it, but ...)
<OrangeShark>found it https://panicz.github.io/pamphlet/
<daviid>OrangeShark: oh, super! rekado ^^
<OrangeShark>think I will gather a list of the various books I have seen of Guile
<dsmith-work>ISTR that the octave maintainer/developer was asking about embedded guile in octave. Did that ever happen?
<OrangeShark>ACTION found a mailing list thread talking about guile's history
<OrangeShark>down I go
<daviid>dsmith-work: in the early days, rms asked for octave be written in guile proper
<dsmith-work> https://lists.gnu.org/archive/html/guile-user/2000-09/msg00071.html
<daviid>it has been a terrible mistake that they choose C++ instead
<daviid>but ... voilà!
<mwette>dsmith-work: Thanks. Interesting read from Sep 2000. Python now has scipy and numpy which provide a lot of numerical hooks. STSCI used that stuff primarily (for processing Hubble images)
<mwette>Octave might still gain something from Guile, because Guile has an optimizing compiler. Core Octave is written primarily in C++ so I don't know how well an integration would work, depending on how much C++ exception handling is used.
<daviid>mwette: one has to write a C wrapper, a la vigra_c, or open-cv-c (2.x only, it's unfortunately been abandonned, no open-cv-c for 3.x), which is ... boring and time consuming
<daviid>so many libs are written in C++, that it might be interesting one of us work on a general approach, I wonder if it is pssible though
<OrangeShark>someone wrote guile bindings in C++
<OrangeShark>daviid: https://github.com/arximboldi/schmutz
<mwette>I have written FFI generator for C; but C++ is so much harder.
<daviid>OrangeShark: tx, but i think it requires to write C++ code before to FFI it ... then I prefer the vigra_c approach
<daviid>mwette: that's what I keep hearing ... I guess otherwise we'd habe a C++ ffi already
<dsmith-work>The exception handling of C++ and the continuations of Guile would be very tricky to integrate.
<daviid>what do you think about schmutz?
<daviid>OrangeShark mwette dsmith-work ... ^^
<dsmith-work>Never heard of it.
<rekado>ACTION likes the name
<dsmith-work>Ah!
<dsmith-work>ACTION sees the link above
<mwette>schmutz still required hand coding all the interface code, and not sure how it handles weird stuff like references. Some how you need to manage the boxing in Scheme.
<dsmith-work>Interesting!
<daviid>mwette: ok, do you think it's s tep in the right direction though? or would you use a totally diff approach?
<mwette>I don't know C++ and schmutz well enough to know how well it will work. I think in the long run a C++ header parser and auto-coder is the best chance, because hand writing the API code is labor intensive.
<dsmith-work>Looks kind of like the Guile snarf interface.