IRC channel logs

2018-03-06.log

back to list of logs

<amz3>o/
<civodul>hello!
<jeko>Hello guilers
<jeko> !
<civodul>hello jeko!
<jeko>Happy hacking :)
<jeko>I would like to ask a question. I am writing todo list manager in guile
<jeko>tasks are stored in a file
<jeko>What is the right way to modify my tasks ? (set task as done for example)
<jeko>is it better to edit the file anytime I modify a task ?
<jeko>Or is it better to load the file in ram ?
<jeko>I mean, is there some practice "forbidden" here ?
<hugo>jeko: Is there any reason you don't have a "proper" database?
<jeko>hugo: I just thought it could be fun to have it that way in a readable text file and also thought it could be more portable if tomorrow I decide to have a smartphone application that synchronize and share the same todo-list content
<jeko>and moreover : I am not familiar with database haha
<hugo>Fair enough.
<hugo>My recomendation when working with text files:
<hugo>If it's a one shot application (start, do something, close) save directly
<hugo>If it's more of a text editor, save when the user requests it
<jeko>I agree with that, so I'll keep one shoting ;)
<jeko>hugo: Thank you !
<hugo>no problem :)
<lloda>wingo: I have a couple patches for guile-cairo, they are in the freedesktop bug tracker. I'll push them myself if you give me commit rights
<amz3>I am trying to setup test coverage for my project
<amz3>and lcov genhtml output 0% coverage
<amz3>even the test file appears as not covered
<alezost>hm, I'm not sure what to use: "string=" or string=?". Is there any difference (if I want to compare 2 strings)?
<amz3>Here is the program I use to generate the coverage .info https://dpaste.de/K07e
<amz3>I do '(load "my-test-module.scm")' inside with-code-coverage
<amz3>just like guile does
<spk121>Hello Guilers.
<spk121>I'll be at the Southern California Linux Expo this week.
<chrislck>amz3: I think you'll need to run the tests within the with-code-coverage lambda https://dpaste.de/fVq3#L16
<chrislck>amz3 you're currently coverage testing the (load) only :)
<chrislck>not much use :)
<chrislck>well my reply iwll not work but you get th idea
<amz3>chrislck: I am running the tests within with-code-coverage via 'load'
<amz3>that's how it's done in guile proper
<alezost>if anyone knows something about my question ("string=" vs string=?"), please answer, I will read the log, thanks
<spk121>alezost: string= can take additional parameters to match substrings
<Labu>Hello !
<Labu>Is there a mean to deal with third parties dependencies in guile ?
<OrangeShark>Labu: do you mean like a C library?
<OrangeShark>or a library written in Guile?
<Labu>Hi OrangeShark
<Labu>library written in guile
<Labu>I make a lib which needs a library
<OrangeShark>some people have been using GNU Guix for that
<Labu>ok
<Labu>good
<Labu>I am looking
<Labu>thx
<OrangeShark>there isn't a language specific package manager
<Labu>yes
<Labu>I thought a thing like gem in ruby or pip in python
<Labu>but ok no problem
<Labu>in fact this kind of tools needs a centralized repository, standar ay to install package etc...
<Labu>I will makesome codes which do the thing
<Labu>guix is very interesting anyway
<OrangeShark>there is also Guildhall
<OrangeShark> https://github.com/guildhall/guildhall
<Labu>thx OrangeShark
<Labu>interesting
<Labu>I think I will create a lib which can install a lib from a public CVS
<Labu>with a system of recipes perhaps...
<spk121>Labu: many have tried to make a generic package manager. Guix is winning. Guildhall is functional but never gained popularity. wingo began a package manager based on guix tech, but, never finished it, I think.
<Labu>spk121: guix seems to be a complete distribution
<Labu>I don't see I can use it for deploy an app
<spk121>Labu: yes and no. It can be a distro, or run on a distro.
<spk121>but if you just want to distribute your own packages for you own app, then do what you like
<Labu>spk121: ok, but the packages are binaries or lib, like apt or yum do. it seems "system oriented"
<Labu>yes I will
<Labu>I thought perhaps there is a standard way to do it (I would not reinvent the wheel)
<spk121>Labu: yeah, no standard.
<spk121>In practice, you just need to get your packages copied into the user's /usr/share/guile/site/2.2 directory somehow.
<Labu>ok it's interesting in certain way. I can do everything I want
<Labu>yes that's right
<Labu>I could handle another location for lib too (for user install)
<Labu>the lib I use in my lib http://git.savannah.nongnu.org/cgit/guile-json.git/tree/README.org
<Labu>there is a Makefile and we could use autoconf with a prefix to change location
<spk121>This was my last attempt at doing autoconf on a pure Guile package. https://github.com/spk121/guile-aspell
<Labu>spk121: you do all of your libs like that ? Or is it just an attempt ?
<spk121>Labu: this was the only pure Guile module I ever made public
<spk121>previous versions had some C parts, so you can see some leftover junk
<Labu>ok
<Labu>I am not very expert with autoconf
<Labu>it seems very powerfull
<Labu>I will try it
<spk121>autoconf is difficult. No one understands it all.
<Labu>ok
<amz3>^^'
<Labu>hi amz3
<amz3>Labu: I tried myself, to write a package manager ^^'
<amz3>basically, there is no easy way to handle pure guile packages
<amz3>guix is the best tho
<amz3>they will gladly accept your contribution
<amz3>once you know guile, it's not hard to create a pacakge definition for a pure guile package also they are examples of that in the guix repository
<amz3>that is a pure guile package that has no autotools
<amz3>pure guile packages with autotools are trivial to package
<OrangeShark>mostly cause they follow the GNU Build System
<Labu>ok amz3
<Labu>I saw there is guile-json in repository
<Labu>that's good
<amz3>what are you trying to do? if that's not too much curiousity..
<Labu>amz3 at now a json serializer/deserailizer
<Labu>deserializer
<Labu>it's not easy
<amz3>there is one floating around
<amz3>that you might take as inspiration
<amz3>it's called ice-9 json but it's not included in guile proper
<Labu>ok I am looking thx amz3
<Labu>what is guile version where ice9-json was implemented ?
<Labu>I am on 2.0.14 currently
<amz3>it's not in guile yet
<amz3> https://lists.gnu.org/archive/html/guile-devel/2015-08/msg00003.html
<Labu>oh ok
<OrangeShark>there is a couple of json implementations floating around
<Labu>yes in guix I found two
<Labu>but I done somethings with guile-json
<Labu>I want make possible to specify fields with attribute (required, type, name) and validate a json against this specifications
<Labu>like json-schema do by example
<Labu>but I want do this specifcation with scheme and not a json
<Labu>scheme is nice for that because we can oass function to validate a specific field
<Labu>*pass
<OrangeShark>Labu: oh, that sounds cool
<Labu>thx OrangeShark I show you some sample when I have some material