IRC channel logs

2014-06-01.log

back to list of logs

<naboo>could anyone explain me differences between character sets and strings?
<taylanub>naboo: a string is like a vector of characters, a character set is a set of characters
<taylanub>I say *like* a vector of characters because strings don't necessarily guarantee constant-time access to a character at a certain index. (vector-ref vec 3) and (vector-ref vec 30) always take the same time, whereas (string-ref str 3) and (string-ref str 30) might take different times if the underlying implementation doesn't use a fixed-width representation for the characters (e.g. UTF-8). Although Guile strings use
<taylanub>not sure, might also change in the future.
<naboo>i write soft for edit text files (with guile-ncurses) is it better to use strings or character sets?
<taylanub>naboo: a set is unordered, it's just a collection
<naboo>taylanub: so, use say i should use strings
<naboo>taylanub: thanks
<taylanub>naboo: there are better data structures for text editing, but I don't know if Guile supports any
<taylanub>I think there was a library for tries or so, but I don't remember.
*taylanub gotta go
<daviid>sneek: later tell wingo that I've sent a request for inclusion for guile-cairo
<sneek>Got it.
<naboo>sneek: hm?
<naboo>sneek: sorry, not for you
<Soft>Are there any Gentoo users here?
<Soft>I am just wondering what's the best way to install a recent of Guile
<Soft>2.0.0 seems to be masked on portage for some reason and I am little hesitant to unmask it
<Soft>Ideally I would like to use a live ebuild or something
<Soft>there seems to be one in the lisp overlay but I have no idea if it works
<daviid>Soft: I don't but are you familiar with git ?
<Soft>sure
<daviid>then I higly recommand yu clone from git
<daviid>after cloning don't forget to checkout the stable branch
<Soft>I have done that but I would rather not install things outside package manager
<Soft>Maybe I'll just have to do something like --prefix=$HOME/.local
<Soft>at least it won't mess up my whole system or anything
<daviid>ok, then you'll have to wait i assume
<Soft>hopefully
<daviid>we prefix /opt
<daviid>I mean it is common to prefix /opt
<Soft>hmm yeah that sounds reasonable
<daviid>we [almost] all do that
<daviid>once you're done, don't forget to add /opt/lib to /etc/ld.so.conf.d/ and run ldconfig [as root], and you may disconsider msg like "/opt/lib/libguile-2.0.so.22.7.2-gdb.scm is not an ELF file - it has the wrong magic bytes at the start.", which a none problem [and a FAQ]
<daviid>
<Soft>thanks
<daviid>welcome
<daviid>here is the env var I set to compile guile from git: [I am on debian]
<daviid>will paste in a sec
<daviid> http://paste.lisp.org/display/142752
<Soft>By the way how usable is the master branch? I mean will it generally work okay. I am pretty much just playing around and not doing anything too serious, so I don't really need absolute stability or anything like that
<Soft>or should I just go with the stable
<daviid>then i'd 'play' with stable if i was you
<ArneBab>I finished all the content for the draft of py2guile: http://draketo.de/proj/py2guile/
<ArneBab>I’m pondering whether I can spread this to a wider audience by offering it to a GNU/Linux magazine - what do you think about that idea?
<ArneBab>(only missing parts: some summaries and the conclusion)
<civodul>ArneBab: i'd rename "car and cdr: Implementation details in the language" to "The Wonders of Pattern Matching" (say), and remove the bits about car, cdr, & co.
<civodul>it's really historical
<civodul>nowadays one uses 'match'
<artyom-poptsov>Hi Soft
<ArneBab>civodul: you use match to get the first item of the list and its tail when you’re doing simple recursion?
<artyom-poptsov>Have you tried to install Guile from the "lisp" overlay?
<ArneBab>Soft: gentoo user here
<civodul>ArneBab: i usually do, yes
<civodul>and if you don't, there's 'first' etc. from SRFI-1
<ArneBab>I just did `emerge layman; layman -a lisp; emerge ">=dev-scheme/guile-2.0.9"`
<ArneBab>Soft: that breaks lilipond, though.
<ArneBab>civodul: first from SRFI-1 is a good call
<ArneBab>civodul: I should add that
<ArneBab>civodul: what’s the alternative to cdr?
<Soft>hmm I'll try the overlay version
<civodul>ArneBab: i don't know, seems there's none :-)
<civodul>ArneBab: but i think my point is that car and cdr don't deserve a section on their own
<Soft>not sure what lilipond is so I probably wont miss it
<civodul>ArneBab: otherwise vector-ref and vhash-ref will be jealous
<civodul>:-P
<ArneBab>Soft: lilipond is a music engraving software.
<Soft>oh, okay
<ArneBab>Soft: GNU Cash might be affected, too
<ArneBab>civodul: car and cdr are extensively used in the little Schemer, so having no equally convenient alternative means that people have to use car/cdr or switch to a less concise style.
<Soft>it seems that the only things I have that are depending on guile are weechat and autogen
<ArneBab>Soft: then better check weechat - though if it should stop working, it’s trivial to downgrade guile
<ArneBab>civodul: car and cdr are less of an issue of Guile itself, but rather of Scheme, but then, Guile implements Scheme.
<ArneBab>civodul: going from car/cdr to match also is what I show - and it shows a pattern I saw at many points while learning Guile Scheme: A more powerful feature is there, which makes a usage I perceive as very common less convenient than the stuff it replaces.
<civodul>dunno, i feel like it's no big deal
<Soft>Well that went well, everything seems to be working and even weechat compiled with the new version
<ArneBab>Soft: nice!
<ArneBab>civodul: it’s one of the things over which I stumbled when coming from Python, so I think it should be in there.
<civodul>ok, i see
<ArneBab>civodul: note also that I moved the “shortcomings” section before the “beyond Python”-section: I want people to remember the advantages, and the last part is normally the most remembered part.
<civodul>ArneBab: good ;-)
<civodul>ArneBab: i think it's good to list pros and cons, i just didn't realize car/cdr was important
<civodul>or may i was just hoping for it to be unimportant
<civodul>something like that
<ArneBab>civodul: well, you’re used to Scheme, so it’s very likely that you have mental bridges for most stumbling points. Just like I did not see Python’s shortcomings until I started to learn Scheme.
<ArneBab>(or at least similar to that)
<ArneBab>I also hope that this list can help Guile become easier to use for newcomers
<civodul>yes sure, it's a good idea