IRC channel logs

2016-02-12.log

back to list of logs

<eiro>hello
<vanila>hi
<eiro>i'm reading the guix code. can someone tell me what '("foo" . "bar") means ?
<eiro>(the . confuse me)
<vanila>well that's a pair of "foo" and "bar"
<vanila>it's the same as (cons "foo" "bar")
<eiro>nice! thanks
<eiro>so . is an operator? can i write (. 'foo 'bar) ?
<vanila>no
<eiro>ok
<vanila>normally you write lists like: (a b c d)
<eiro>but '('foo . 'bar) works
<vanila>but that is a nil terminated list
<wleslie>which is (a . (b . (c . (d . nil))))
<eiro>ooohhh so this is like the haskell ::
<wleslie>:: is cons
<wleslie>er, :
<eiro>right.. :
<eiro>:)
<eiro>thanks guys
<wleslie>you're welcome
<eiro>about partial applications: the best i found is (define double (cut * 2 <>))
<vanila>i prefer just lambda
<vanila>its much cleare and easier to read
<eiro>nothing like clojure's #(* 2 %) or haskell's (* 2) ?
<eiro>vanila, well ... i think it's subjective
<eiro>but if it is idiomatic to guile, i'll do it
<eiro>back to guix code. thanks
***michaniskin is now known as Guest72415
***Guest72415 is now known as michaniskin
<Jookia>If I'm writing something like "`(("test" 1) ("test" 2))", how would I append to it or automatically generate such an expression?
<mark_weaver>Jookia: automatically generate such an expression? you mean generate (("test" 1) ... ("test" <n>)) for some <n> ?
<mark_weaver>for appending lists, there's 'append'
<Jookia>mark_weaver: I figured it out and forgot about that chat :P I spent some while in the REPL toying and got it
<mark_weaver>or 'cons' to add a new element to the front, which is most efficient.
<mark_weaver>okay
<amz`>héllo :)
<xd1le>o/
<ArneBab_>hi
<ArneBab_>can you suggest an efficient way to treat sets of strings? I need to add a string, if it doesn’t exist in the set, yet, and then get all unique strings.
<ArneBab_>currently I just use alists, but I operate on 13k elements, so these might be too slow.
<amz`>Sets and bags http://srfi.schemers.org/srfi-113/srfi-113.html
<ArneBab_>thank you!
<taylan>ArneBab_: note one can just use hash table keys for sets
<davexunit>is a persistent data structure desired here?
<davexunit>Guile has vhashes, which are decent.
<davexunit>persistent hash tables based on HAMTs would be better, though.
<ArneBab_>I just need something which can do efficient set operations with an easy syntax. I want to edit the set in recursion, so a structure which shares data would be good.
<ArneBab_>“no code for module (srfi srfi-113)”
<ArneBab_>amz`: is srfi-113 not yet included in guile 2.0.11?
<amz`>sorry I just stumbled upon it, though it would be useful
<ArneBab_>it does look like what I’d need
<taylan>ArneBab_: SRFI 113 was written for R7RS-large and is pretty young and I find it questionable whether it will gain adoption
<taylan>ACTION thought we were in #scheme
<taylan>ArneBab_: I'd just go with hash tables (which is also what the SRFI 113 sample implementation uses)
<taylan>now you can choose between Guile, SRFI 69, R6RS, and SRFI 126 hash tables :P (the Guile implementation of the last isn't in Guile upstream though)
<ArneBab_>:)
<taylan>if writing code to share with others, today I'd probably use SRFI 69.
<taylan>(I hope that SRFI 126 will be the go-to choice one day, of course)
<davexunit>taylan: the problem with hash tables is that they are mutable
<davexunit>if ArneBab_ would like an elegant solution to the problem, he won't find it in mutable hash tables. :)
<taylan>indeed, hash tables kind of force imperative style
<ArneBab_>if the table were to share existing keys, it would be efficient
<ArneBab_>I currently just recurse over the tabel…
<ArneBab_>table
<dsmith-work>Happy Friday, Guilers!!
<vanila>happy friday :D
<bavier>I'm working on a new guile language implementation
<bavier>it seems to be only for the brave; the documentation is fairly sparse
<vanila>what's that bavier?
<bavier>vanila: I'm implementing a language on top of guile, but having some difficulties with undocumented corners
<vanila>cool! what language?
<bavier>a minimal implementation of http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language
<vanila>oh that's sound great
<vanila>xyh was doing joy in javascript
<xyh>hi bavier
<bavier>xyh: hi! :)
<xyh>bavier: http://www.kevinalbrecht.com/code/joy-mirror/joy.html
<xyh>bavier: https://en.wikipedia.org/wiki/Joy_%28programming_language%29
<xyh>bavier: https://github.com/xieyuheng/joy
<bavier>xyh: I'm glad you're maintaining a mirror of the reference
<xyh>bavier: this is my impl of joy in coffee, with local variable suppurt :: https://github.com/xieyuheng/sad-coffee/blob/master/sad.coffee
<xyh>bavier: this is better to read :: https://github.com/xieyuheng/sad-coffee/blob/master/sad.org
<bavier>thanks
<xyh>if you care to play, you can try 'coffee sad.coffee'
<calbers_>Just posted this audit of guile modules on google docs (wish there was something more open): https://docs.google.com/spreadsheets/d/1hHAz1xRPlH2K6w_olWE6qej3lL7i4-zKdYAV1xbYHO8/edit?usp=sharing
<amz3>uber nicer!
<amz3>i did not know there is a currier definitions
<bavier>calbers_: could you sent it to the ML?
<calbers_>There's alot of hidden gems in there. Real useful stuff that's missing in the manual.
<calbers_>Who is ML? (I also posted the link on guile-devel mailing list)
<amz3>Mailling list
<amz3>There is also modules that are not documents implemented in C
<calbers_>coole...done.
<amz3>I don't see for instance... the thing used in (web http server)
<calbers_>Yeah, I haven't dived into the C code yet. There most be some there.
<calbers_>See the "ships with guile" tab to look for the non-ice-9 modules.
<calbers_>When you get down there, it's sort of a mess...but a big surprise considering guile's age.
<mark_weaver>calbers_: I can't even view that document without running Google's nonfree javascript. can you please send it in a form that can be read without nonfree software?
<amz3>ok it's there, it's ice-9 pool
<calbers_>Off hand, do you know of any ice-9 modules that are declared in the C code?
<amz3>there is this collaborative table editor https://framacalc.org/=CJtd6gvX5s
<amz3>the UI is only in french on my side
<amz3>it's possible to import csv file
<amz3>The software is Ethercalc
<amz3>this one is in english https://www.ethercalc.org/ycy0nsfor7
<amz3>calbers_: I don't think it's possible to have a guile module without .scm file
<amz3>Also, guile-lib should be taken care too, some stuff don't belongs there. Just my thought.
<calbers_>amz: I'm pretty sure you can create modules at the C level...but only 90% ure. I'll add it.
<calbers_>amz: I agreed that guile-lib should be audited. Some of those are no longer useful, so are really old defmacro stuff. Some of what are consider "modules" could be moved into guile-lib.
<amz3>calbers_: the audit is very nice idea, kuddoz
<calbers_>It all depends on what the project decides. Does guile want to be "batteries included" like emacs, or does it want to be modular? guile-lib is the closet we have to package management.
<amz3>oh! there is several tabs
<amz3>that also an interesting thought
<amz3>I'm wondering how can work a free software with very one or two repositories of libs. I never seen such a project in the wild like that
<amz3>bazaar stuff kind of stuff
<calbers_>Regarding ethercalc, is there a way to prevent people from deleting the whole thing (like version rollback). Deleting it would make me sad.
<davexunit>from what I've gathered, Guile wants to be batteries included.
<davexunit>we'll be adding a JSON module to Guile core at some point, for example.
<calbers_>I don't think that is wise...but I don't set the direction. Even emacs has seen the light and has package management now.
<davexunit>package management is sort of a separate thing.
<davexunit>a lot of us do not like language-specific package managers
<davexunit>but besides, some things are good to keep with Guile itself, others are best kept outside.
<calbers_>Depends. So Ruby has ruby-core and ruby-stdlib. JSON would have made it into ruby-stdlib like RexML...but now it lives better as a packae.
<davexunit>including a JSON module in the standard library is useful.
<davexunit>including OpenGL bindings in the standard module is less useful, for example.
<davexunit>Ruby isn't the best language to draw inspiration from in this regard.
<davexunit>it's a big mess.
<calbers_>I'm also a professional clojure dev. Core is tight, without alot of extras. Some things were in clojure.contrib, but that's being broken apart too IIRC.
<calbers_>Yes, Ruby is a mess, but when I started writing ruby, Ruby stdlib was THE package manager...no gems.
<davexunit>there's a balance to be found, but I personally want Guile to have a rich standard library.
<vanila>one thing that might be nice to be careful is not forcing libraries on people
<calbers_>My vote would be the opposite...for several reasons...but I go with the community.
<vanila>it's wonderful to have all the code available
<vanila>but look at what happened with haskell
<vanila>some guys decided to break all existing code because they wanted to c hange the way the default library worked
<calbers_>not cool. there should be some "holy of holies". how guile deals with vectors should be a "holy of holy" but not JSON...for instance, in ruby, there were like 3 JSON parsers at one point, each keeping for speed. Yeah, waste of engineering effort, but a good piece of code was finally settled on. This was made possible because the json parsers lived in the wild, outside of the core codebase.
<davexunit>Guile should come out-of-the-box with useful things.
<davexunit>it already has SXML modules, which are great.
<davexunit>I'd like Guile to also ship with more data structure implementations.
<calbers_>These are pretty cool: https://github.com/ijp/pfds
<davexunit>yes.
<davexunit>they are written in portable Scheme, which means that they won't perform that well.
<davexunit>I'd like optimized persistent vectors and hash tables in Guile core.
<calbers_>true...it was just an example of cool things to have in core or base.
<calbers_>There are a few here: http://www.nongnu.org/guile-lib/doc/ref/
<vanila>stis__, hello
<stis__>heya vanilla:
<vanila>i wa swondering if you have any tips to get started on attributed vars?
<vanila>some papers or something?
<stis__>The best is to study examples of their use
<stis__>you will get examples in the potluck from me
<vanila>okay ^^
<vanila>il look forward to it
<vanila>when is that?
<vanila>i wonder if it would be a good idea to make a guile logic programming group
<vanila>to help people collab and not duplicate work so much
<amz3>hmm
<stis__>the potluck is before 16/2
<vanila>oh soon!
<stis__>the disches is to write small applications in celebration of guile 2.0 release date
<stis__>check the guile-devel ml
<amz3>really, I thought that anyway would do
<amz3>guile-on-zile is not small
<amz3>or maybe it is
<stis__>well large application is ok as well :-)
<amz3>:)
<stis__>but the anouncement was just a few days ago
<stis__>so I would expect most to be small hacks
<amz3>I think i have another idea, I bake a my hypergraph database a dish
<amz3>I started a while ago, and miss trigram search only IIRC
<amz3>(it miss a query language too (outside stream processing))
<stis__>cool amz3: that would surely taste swell
<amz3>cool some like it already!
<amz3>" miss trigram search only IIRC" I know it miss trigram search
<amz3>aka. fuzzy search
<amz3>at least
<amz3>Another idea: implement earley parser in scheme :)
<amz3>it's supposed to be small..
<amz3>I should probably go for the most safe project to complete at the time