IRC channel logs

2015-04-07.log

back to list of logs

<dsmith-work>to go cloud tripping you have to crouch REAL low first... --- ttn
<zanta>Hello all
<zanta>anyone familiar with guile-gtk, that could help me understand some source code?
<wleslie>don't ask to ask (:
<mark_weaver>zanta: guile-gnome is recommended for new code, btw. guile-gtk is deprecated
<zanta>Y?es, that is what I meant
<zanta>yes*
<mark_weaver>daviid is a good person to ask about guile-gnome. alas, he just left
<zanta>I have it all installed, and I want to create a program that can display packages and their info from the guix package manager. Sadly, I have no clue where to start
<zanta>Daviid help me a lot last time.
<zanta>He is a really cool person
<zanta>she(?)
<mark_weaver>he
<ijp>it
<zanta>lol
<wleslie>they.
<zanta>we
<wleslie>oui
<zanta>Nous
***karswell` is now known as karswell
<zanta>Quand il est un oui
<davexunit>zanta: ooh, cool project. :)
<davexunit>from what I know, guile-gnome doesn't yet support GTK3
<davexunit>daviid took the project over after a long time of it being unmaintained
<davexunit>so he's trying to catch up with the present day
<zanta>It is supposed to be small, and for GSOC. I am not sure if I can do it fast enough.
<zanta>I didn't know he was in charge.
<zanta>that's cool
<cmhobbs>are there any test runners for guile or are there examples of unit tested guile for me to gawk at? i'm struggling to lay out this project
<mark_weaver>cmhobbs: GNU Guix uses SRFI-64 for tests
<cmhobbs>right
<cmhobbs>you pointed me at that the other day
<cmhobbs>i'm speaking more to appropriate file locations
<cmhobbs>and test runners
<cmhobbs>if they exist
<mark_weaver>you want an example of a custom test runner?
<cmhobbs>sure
<cmhobbs>didn't know if there was a standard
<cmhobbs>i was about to write my own
<cmhobbs>but i figured i'd ask first
<mark_weaver>SRFI-64 comes with a default test runner. Guix uses that one.
<mark_weaver>I wrote a very simple test runner to run SRFI-64's own test suite (written using SRFI-64) to report the results to Guile's built-in legacy test framework.
<mark_weaver>it's in test-suite/tests/srfi-64.test
<mark_weaver>I'm not sure it will be of much use to you though
<mark_weaver>if you don't like SRFI-64, other people have written other test frameworks for guile
<mark_weaver>I guess I'm confused what you are looking for
<cmhobbs>i didn't notice it came with a test runner, i must've glossed over that
<cmhobbs>i'm sorry
<cmhobbs>it'll do just fine
<mark_weaver>okay
<cmhobbs>i glanced through the docs
<cmhobbs>well, through the srfi
<cmhobbs>i'm a little excited to get to use guile on a "real" project, so i'm doing things probably too quickly
<cmhobbs>in my haste to write cleaner code
<mark_weaver>I don't know if you're doing it too quickly
<mark_weaver>seems reasonable to get the ball rolling sooner rather than later
<cmhobbs>sure
<cmhobbs>just trying to grasp onto whatever standards are out there as most of the guile i've written is poor
<cmhobbs>i figured i had common lisp down, this should be a breeze
<cmhobbs>and i just cut a bunch of corners
<mark_weaver>guix is a good project to look at
<cmhobbs>absolutely
<cmhobbs>i've been browsing the source
<paroneayea>hm
<paroneayea>I thought I remembered something like
<paroneayea>(get-keyword '(#:foo bar) 'foo) that didn't require a full on (let-keywords)
<paroneayea>but maybe I'm wrong...
<mark_weaver>paroneayea: do you know about 'lambda*' and 'define*' support for keywords?
<mark_weaver>I don't recall ever using 'get-keyword' or 'let-keywords'
<paroneayea>mark_weaver: yeah I'm familiar
<cmhobbs>is srfi-78 available in guile?
<mark_weaver>cmhobbs: it doesn't come with guile, but guile has all the prerequisites for its reference implementation, so you should be able to use http://srfi.schemers.org/srfi-78/check.scm
<cmhobbs>great
<cmhobbs>also, sorry for the dozens of questions
<mark_weaver>no worries
<mark_weaver>was SRFI-64 not to your liking? :)
<cmhobbs>srfi-64 is working just fine
<nalaginrut>morning guilers~
<cmhobbs>i just thought 78 looked interesting
<cmhobbs>evening, nalaginrut :D
<nalaginrut>;-)
<cmhobbs>now that i've got tests sorted, i need to wrap my head around modules, ensuring that my project pulls the right files, and the build process
<cmhobbs>given that guix is using make, i guess that's the direction i should be looking
<cmhobbs>i've not used make from the ground up in the past
<cmhobbs>only used pre-existing makefiles
<mark_weaver>it's not strictly necessary for a pure scheme project
<mark_weaver>but it's one way to compile all scheme code in advance. otherwise, each module will be automatically compiled the first time it's run
<mark_weaver>s/run/loaded/
<cmhobbs>at this point, i'd like to figure out how to have my code under src/, my tests under tests/ and have a runner that's able to pull in both. i'm going to need to study up on modules for that right now i think
<cmhobbs>i can figure out how to use make to compile everything at once after that
<mark_weaver>it's fairly simple
<cmhobbs>i imagine it is :D
<mark_weaver>module (foo bar baz) should be located in DIR/foo/bar/baz.scm
<mark_weaver>where DIR is some directory in the guile load path
<mark_weaver>within guile, the load path is specified in %load-path and %load-compiled-path
<mark_weaver>those are initialized based on the GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH environment variables, plus the compiled-in paths to guile's own modules and the modules located in guile's site directory
<mark_weaver>I would recommend choosing a prefix for your project in the guile module names
<mark_weaver>e.g. the 'foo' in my example module name above might be the name of your project
<mark_weaver>and then all of your project's code would be within one directory
<cmhobbs>wow, thanks
<cmhobbs>i'll give that a go
<mark_weaver>one option it to install it in $PREFIX/share/guile/site/2.0/foo/
<mark_weaver>s/it/is
<mark_weaver>where $PREFIX is the --prefix that guile was configured to use
<mark_weaver>within guile, (%site-dir) returns the location of the site module directory
<mark_weaver>normally $PREFIX/share/guile/site/2.0
<cmhobbs>outstanding
<cmhobbs>i'll just symlink the appropriate location in my ~/src
<mark_weaver>alternatively, you could install somewhere else and then arrange to add the needed directory to guile's load path
<cmhobbs>i tend to work out of subdirectories there
<cmhobbs>i'm not used to having things i'm building be a living part of the system, for lack of better words
<mark_weaver>another way to add to the load path is to use the -L and -C command-line options.
<mark_weaver>so, it's important that the module name (as specified in the 'define-module' form) matches its location in the filesystem relative to some DIR in the load path
<mark_weaver>to enable running tests before running 'make install', you would normally set the load path to include directories within the source directory
<mark_weaver>s/directories/a directory/
<mark_weaver>anyway, those are the basics
<cmhobbs>man, thanks a ton
<mark_weaver>np!
<{}grant>Ask fhksk any examples of 'Skribilo' in action, outside of the site itself? I've not been able to find any thusfar.
<{}grant>Are there*
*{}grant really needs to figure out colemak as a definable option for Guix...
<mark_weaver>that's probably a question for civodul
<mark_weaver>{}grant: https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00014.html
<cmhobbs>that moment when you want to keep hacking but there's work to be done in the morning...
<mark_weaver>{}grant: within X, use 'setxkbmap'. colemak is available in the default set of keymaps
<mark_weaver>{}grant: but this is the wrong channel for this discussion
<{}grant>mark_weaver: Yeah, I have it set via xorg -- not console, in any case though rading link; ty.
<cmhobbs>mark_weaver, thanks again for the help!
<cmhobbs>g'night, channel
*cmhobbs &
<mark_weaver>good night!
<zacts>well, I've realized that lisps / scheme / any language other than java is not the wave of the future.
<zacts> https://www.oracle.com/java/index.html
<zacts>"Java is the worlds #1 programming language"
<zacts>^ well, I mean there you go.
<zacts>:-D
<zacts>lol
<zacts>(kidding kidding)
<civodul>Hello Guilers!
<nalaginrut>hey
<nalaginrut>heya
<{}grant>civodul: Hey, are you aware of any projects using Skribilo besides the site itself?
*{}grant has been looking into the whole thing a bit more, and is likely going to translate his blog to it.
<civodul>{}grant: hmm... my web page!
<civodul>i think that's a clear measure of popularity :-)
<civodul>i know that a few people have been using it, but yeah, it's not Wordpress™
<{}grant>civodul: Can I get a link to your page, maybe? :^)
<civodul> http://people.bordeaux.inria.fr/lcourtes/ and http://www.fdn.fr/~lcourtes/
<{}grant>Neat, ty!
<{}grant>civodul: Do you have the source for the inria.fr link up anywhere?
*{}grant wonders how hard it would be to somefactor of 'pipe' (I'm sure that is the wrong word for this context) Skribilo to work with something like "Bootstrap".
<civodul>{}grant: i don't have the source here but you can check that of Skribilo's web site
<civodul>it wouldn't be difficult to use the CSS of Bootstrap, if that's what you mean
<{}grant>civodul: Well yeah, I meant more-so there is JS that ships with such a thing iirc and I don't really know how/if that fits in generally. :^P
<{}grant>In any case, it's certainly on my list to play with more. :^)
<civodul>{}grant: JS is another story; it's possible to insert/use it, but it's more work, i think
***michel_mno_afk is now known as michel_mno
*{}grant wonders how "worth it" would be to write a system and in-turn a theme that writes from Guile to CSS.
<{}grant>Guile obviously seems somewhat capable of this anyways, due to being able to color text for example.
<civodul> http://www.nongnu.org/scss/ might be of interest
<{}grant>civodul: Oh, very neat! Ty, added to my list of interest(s)!
<{}grant>Do we (whether Guile, nor Scheme generally (though I reason the latter to be more likely) have a wiki somewhere of to collect projects of interest? common-lisp.net via cliki has been a pretty good source for me to find relevant and/or self-percieved "cool" bits/bytes of softwar ... I don't believe Scheme is that rare to come by, just harder to (or at least for me) to find.
<{}grant>rather, "and/or Scheme"*
<civodul>there's a page under gnu.org/s/guile but it's somewhat outdated
<{}grant>civodul: Oh yeah, I recall now. Yeah, there's a fair amount of stuff missing there.
<{}grant>At least, last I've checked.
<{}grant>civodul: Oh, backstepping back towards Skribilo -- why is the website being hosted via nongnu? Does is to "savannah.gnu.org/skribilo" too unpleaseant and/or does GNU's official Savane node not support hosting for Webpages?
<civodul>nongnu.org is Savannah's site for web pages of non-GNU projects
<{}grant>Ah, is Skribilo a non-GNU project?
<civodul>yes
<civodul>rather, it's not a GNU project ;-)
<{}grant>Am I imaginging that it had a GNU page?
<civodul>it never had one
<{}grant>civodul: Hm, odd, I had/have a vague feeling of recalling such a thing.
*{}grant wonders if there's a directory on alpha.gnu.org he remembers ... but if it's not a gnu project, he doesn't find it likely.
<{}grant>civodul: Is this due to licensing issuses, or just generally not caring at this point? :^P
<{}grant>Yeah, just checked, no it's (pretty obviously) not ... weird, I wonder why I had such a strong leaning that it did.
<civodul>{}grant: initially because i didn't consider mature enough and somewhat redundant with Texinfo
*{}grant doesn't know if it's just because he's young enough where he never had to mess with texinfo to a non-trivial degree ... but man, does he hate it. I can deal with LaTex under certain contstrains, but as strictly a documentation language ... I find it very near esoteric.
<{}grant>civodul: Well, I wouldn't say redudant besides nebulous function; They both are meant as somefactor of 'documentation systems' -- but the ways both accomplish this is different as so far as I can tell. Namely that Skribilo writes to a translator mechanism, that poops out said result into an existing system like texinfo. That's distinctly different enough (for me at least) to merit the title of 'non-redundant goals'. :^P
<{}grant>I'm probably rambling though, it's already 4am here...
<{}grant>Okay, anyways, as said, I'll look into. I'm going to assure that this is not going to end up as yet-another-all-nighter and head to bed for a few; Peace. o/
<cmhobbs_>good morning #guile!
<davexunit>morning cmhobbs_!
<cmhobbs_>o/
<ArneBab>moin cmhobbs_ ☺
<cmhobbs_>:D
<dsmith-work>Tuesday Greetings, Guilers
<cmhobbs_>welcome dsmith-work
<cmhobbs_>i, too, am stuck at work
<cmhobbs_>heh
<cmhobbs_>trying to find a use for guile in my day job
<cmhobbs_>at least my skunkworks are run by guile
<davexunit>cmhobbs_: that's awesome
<davexunit>how did you work it in?
<davexunit>you do Ruby and stuff?
<paroneayea>hello, *!
<cmhobbs_>i ruby all day
<cmhobbs_>as for the skunkworks, i just said "we're using guile for this part"
<cmhobbs_>and my team responded with "ok."
<davexunit>that's cool :)
<cmhobbs_>but that's not a paid gig (yet)
<davexunit>I would like to get Guile in the door at a day job
<cmhobbs_>once i get the base application sketched out, i'm going to gpl it and throw it over the wall
<cmhobbs_>i'm in a position in my day job where i can impose guile
<cmhobbs_>we just don't have a nail for that hammer
<paroneayea>cmhobbs o/
<paroneayea>cmhobbs_: you started hacking guile recently too, yeah?
<paroneayea>cmhobbs_: sounds like you're having fun?
<davexunit>cmhobbs_: no resistance because other devs don't know it?
<cmhobbs_>paroneayea, well sort of. just started focusing on writing not garbage guile because i'm going to be developing part of a commercial application with it
<cmhobbs_>davexunit, no resistance in the skunkworks because they know other lisps and guile really fit the bill for the part i'm working on right now
<cmhobbs_>i'd meet resistance at my day job but i'm the last say in tech decisions here
<cmhobbs_>i'm not going to impose it if we don't have a use for it though
<cmhobbs_>ruby is getting the job done
<davexunit>cool
<davexunit>I'm wondering if I could work Guile into anything as I become a more "senior" developer
<davexunit>but it seems hard to overcome the "no devs know this" part
<davexunit>I could fight the "no libraries" battle by pointing to the FFI, at least.
<cmhobbs_>i'm the director of technology here :(
<cmhobbs_>would rather be just senior again
<cmhobbs_>end goal is to make skunkworks a real business with my pals so i can do free software for a living
<cmhobbs_>i could go back to freelancing but i have no self control with that
<cmhobbs_>i just work all the time
<paroneayea>free software labs inc
<paroneayea>(everyone's dream)
<cmhobbs_>ha
<cmhobbs_>well, we may just pull it off
<cmhobbs_>the focus isn't free software
<cmhobbs_>but the software we're building will likely be gpl'ed
<cmhobbs_>i'm waiting to make my part cleaner before i put it out publicly
<cmhobbs_>it's a useless mess right now
<cmhobbs_>but hey, three or four tests run!
<cmhobbs_>rejoice!
<paroneayea>:)
<paroneayea>ooh, thanks orgmode, I was going to ask #guile how to do mock stuff in guile, then I found in my orgmode file that davexunit already showed me how :)
<paroneayea>orgmode: a good secondary memory for those of us with poor primary ones
<davexunit>:)
<davexunit>paroneayea: I've been meaning to start a small little project to collect testing tools like that
<davexunit>I'd like to write some more extensive macros for this stuff
<paroneayea>davexunit: guile coudl use a nice set of testing stuff
<paroneayea>also a nicer test runner
<davexunit>yeah
<paroneayea>it's so much clearer *where* things fail when my python tests fail
<davexunit>so this would be a companion to srfi-64
<paroneayea>definitely possible to build in guile, but I don't have to open up .log files ;p
<paroneayea>yeah
<paroneayea>that's the way to go I think
<davexunit>agreed, a better test runner would be awesome
<paroneayea>davexunit: I think an (ice-9 test-utils) would be nice
<cmhobbs_>paroneayea, mock stuff? like mock objects in tests?
<paroneayea>cmhobbs_: yes
<cmhobbs_>let me know if you find anything. i'd like to mock some things
<cmhobbs_>i'm using SRFI-64 right now
<cmhobbs_>would like to try 70-whatever.. the check- one
<cmhobbs_>73?
<cmhobbs_>i forget
<cmhobbs_>i was up late
<cmhobbs_>exhaustion is a thing
<taylanub>78
<cmhobbs_>yeah
<paroneayea>cmhobbs_: http://pamrel.lu/ca0b9/
*paroneayea M-x open-srfi 78
<taylanub>64 is much more powerful though. 78 is kind of rudimentary.
<taylanub>well, it has check-ec
<davexunit>that mock macro is for procedures
<cmhobbs_>i'm just testing both
<cmhobbs_>64 is baked into guile, so i've been leaning on that
<davexunit>I once expanded 'mock' to accept more than one procedure to mock
<davexunit>a stub macro could be built on top of this
<davexunit>where instead of a new procedure, you just supply a return value
<cmhobbs_>clever
<taylanub>paroneayea: FYI Circe buttonizes SRFI references ;-)
<davexunit>I find that these tools aren't as important in lisp programs
<paroneayea>taylanub: I don't know what Circe is...
<davexunit>or rather, functional programs, as opposed to OOP
<taylanub>paroneayea: Emacs IRC client
<paroneayea>ah :)
<taylanub>SRFI 78 <- this text in the channel is a link for me
<paroneayea>cool
<paroneayea>davexunit: so I got the printer/output system working in opstimal yesterday
<paroneayea>I started a little bit on it in the morning and then before I knew it I had spent the whole day on it :X
<paroneayea>but it works and is awesome
<davexunit>woo!
<paroneayea>the way it works is there's a parameter for a port that gets updated on every task run for that task specifically, as a soft port where the user can dump data into
<paroneayea>and it both logs it into data returned into the result and also prints it to stdout
<davexunit>sauce?
<paroneayea>but you can use normal format, display, and friends
<paroneayea>davexunit: some stuff is still needed, but you can see the main code before it (there's just a couple of things to be filled in here) https://gitlab.com/dustyweb/opstimal/blob/master/opstimal/statuslog.scm ... that's the "imperative" part of the codebase since it's IO
<paroneayea>but then in the core file:
<cmhobbs_>i'm going to need mocks because i'm going to be working with ZMQ and a couple of MTAs
<cmhobbs_>i'd rather not have my test suite talk to those things
<cmhobbs_>or spin up a ZMQ instance just for the tests
<dsmith-work>cmhobbs_: Oh that's great re: guile on the day job
<cmhobbs_>well, we're not using it in the day job
<cmhobbs_>only in skunkworks
<dsmith-work>Ya, what I meant
<dsmith-work>I've been looking for things like that too.
<paroneayea>davexunit: anyway, it looks like this
<paroneayea> https://gitlab.com/dustyweb/opstimal/blob/master/tests/test-core.scm#L42
<paroneayea>see that
<paroneayea>(display "foo\\n" (statuslog))
<paroneayea>the statuslog is a port wrapped in a parameter that's set up specifically for that task
<paroneayea>so each task gets a different port to write to, but they get combined together byt the printer structure
<paroneayea>but all the heavy lifting underneath is hidden from the task writer
<davexunit>paroneayea: what's the big benefit of this technique? sorry if this is a silly question, trying to grok it.
<paroneayea>davexunit: so to support different types of printers: one is to print flat to stdout
<paroneayea>so that might look like
<paroneayea>= Copying over config files
<paroneayea>== Copy /tmp/foo.tmpl to /tmp/foo
<paroneayea>== Copy /tmp/bar.tmpl to /tmp/bar
<paroneayea>= Checking the snorzikator
<paroneayea>snorzikator is enraged!
<paroneayea>= blah blah
<paroneayea>so the only one there is the snorzikator check gave some output
<paroneayea>that's simple in a plaintext thing
<paroneayea>but I'm planning for a web interface also
<paroneayea>what if you want to wrap those in nested <div>s?
*dsmith-work needs to get a snorzikator
<paroneayea>each task can write to a soft port, and you can have a printer which actually updates certain divs as they're printed
<civodul>paroneayea: you should be using Guix for opstimal :-P
<civodul>otherwise davexunit will have to compete with you ;-)
<davexunit>hehe
<paroneayea>civodul: in #sly yesterday:
<davexunit>civodul: paroneayea sees his software as a tool that can be used for the distros in the mainstream
<paroneayea><paroneayea> I'll have an FAQ item in opstimal's docs
<paroneayea><paroneayea> "but shouldn't we all use something functional, like guix?"
<paroneayea><paroneayea> "If you can use something like Guix, use that! Not all of us are able to move to a beautiful fully-functional world yet. Opstimal exists in the meanwhile!"
<davexunit>it will be a friendly competition :)
<paroneayea>civodul: opstimal is the "make" of deployment systems; has a few small functional aspects for living in an imperative world
<paroneayea>or such is the aim :)
<civodul>yeah, just kidding, i can understand why one would want to handle several distros
<civodul>davexunit: another approach is to make Guix mainstream ;-)
<paroneayea>civodul: ideally opstimal will have a (opstimal tasks guix) module, which just kicks off guix's process :)
<civodul>:-)
<davexunit>civodul: that's the angle I'm working on.
<civodul>heheh
<davexunit>I really want to have enough tools to do a talk titled "From development to production with guix" :)
<civodul>that's ambitious :-)
<paroneayea>civodul: at any rate, guix and opstimal can rally together to destroy the imperative container non-solutions that are so popular :)
<civodul>indeed!
<paroneayea>"it's hard to update distributions, so we installed 30 mini-distributions that you'll never bother to update"
<davexunit>hahahaha
<civodul>:-)
<civodul>at work i hear more and more people interested in reproducible build environments
<civodul>and then they mention how Docker will surely save them
<civodul>which is true in a way
<paroneayea>there is one place in which I think maybe containers can help, but maybe if we keep enough archive stuff around in guix it can help too
<davexunit>yes, it improves the situation some.
<davexunit>but we can do better!
<paroneayea>my friend is a Blender animator, and he had to port some old files over to a new version
<paroneayea>from like a decade old version of blender
<paroneayea>he couldn't get the old version to blender to compile anymore, even the static binaries didn't work
<davexunit>I want guix to have container support, because they are useful.
<paroneayea>so he had to run the windows binary in wine!
<davexunit>I'm not anti-container, I'm anti-docker
<paroneayea>davexunit: yes, I think the thing is, there should be a *generic* way to build containers that also works *outside* of containers
<civodul>heh
<paroneayea>why docker needs its own deployment dsl is beyond me
<davexunit>paroneayea: exactly!
<davexunit>which is why I like guix!
<paroneayea>:)
<paroneayea>I am rooting for guix!
<davexunit>same OS config system can be used to build a VM or install to a physical host!
<paroneayea>(in the meanwhile, in the world I live in, I am working on opstimal :))
<davexunit>please keep working on it!
<paroneayea>I would like to work on guix too actually
<paroneayea>I still think a great path to guix frog-boiling the world
<paroneayea>is to get guix packages in various distros
<davexunit>I welcome someone in the debian community to package guix
<davexunit>that would really make it easy for folks to use guix as a supplement to your host Debian system
<paroneayea>yeah
<paroneayea>that'd be so nice.
<davexunit>s/your/their/
<hellekin>dear guilers, Devuan decided to ship guile 2 by default with the stable release, does anyone want to maintain guile package for Devuan?
<hellekin>Devuan is the Debian fork that ships with sysvinit and no hard dependency on systemd.
<hellekin>We think that shipping guile by default will encourage people working with it.
<hellekin>if you're interested, please /join #devuan to talk about it
<ArneBab>hellekin: that’s cool!
<hellekin>ArneBab: free software developers need to help each other, right?
<dsmith-work>hellekin: Yey
<dsmith-work>hellekin: Where did they get the "devaun" name from?
<hellekin>dsmith-work: dev - one, Italian style
<hellekin>dsmith-work: it came from an Italian forum, the Veteran Unix Admins
***michel_mno is now known as michel_mno_afk
<davexunit>I have a feeling that Guile can make use of this: http://developerblog.redhat.com/2015/04/07/jit-compilation-using-gcc-5-2/
<davexunit>and in any case, this article shows off Python bindings to libgccjit. we must add guile bindings!
<davexunit>but perhaps we cannot use this because we use the LGPL?
<paroneayea>wow nice