IRC channel logs

2015-08-20.log

back to list of logs

<daviid>% has been used sometimes for variables, like %load-path, sometimes for procedures, like %global-site-dir: what is the logic behind using it for procedures?
<fds>AFAIK it's a stylistic convention used for "internal variables" that are intended for the implementation.
<daviid>fds, quite a lot of the names using % are [and quite a lot are documented] procedures, see 6.23.1. I'm curious, naming is so difficult when you reach a certain project size...
<fds>daviid: AFAIK procedures are bound to variables just like any other data. http://community.schemewiki.org/?variable-naming-convention says prepending or appending % to a variable name indicates it names a low-level procedure, I reckon Guile just adopted this convention for other kinds of data too, like load-path.
<fds>Of course, I'm not an expert, so feel free to ignore me. :-)
<daviid>fds: yep, but as I did pointed in the first quiz, %load-path, for example, is a global, mutable variable, not a low-level procedure ... there must have been some logic, maybe :) just curious, relax
<adhoc>lloda`: this little project is porting octave code to C or Guile
<adhoc>so what i am after is a reasonably simple library or module that takes arrays and does +.x on the respective elements
<adhoc>if there isn't one, i might just write it =)
<adhoc>i'd like it to be as potable as possible, so pure guile would be ideal, but i need to create a C library also, so two implementations to compare is probably a good idea =)
<nalaginrut>morning guilers~
<paroneayea>o/
<mark_weaver>adhoc: if you only need a few simple vector operations, and performance is not important, they are trivial to write when vectors are implemented as lists.
<mark_weaver>(define (vec+ a b) (map + a b))
<mark_weaver>(define (dot-product a b) (apply + (map * a b)))
<mark_weaver>etc
<adhoc>mark_weaver: performance on a peecee isn't important in the short term
<adhoc>proving correctness and providing an alternative implementation is my main interest
<adhoc>at this time,
<adhoc>as i turns out i need to make a C implemenation for an embedded version
<adhoc>mark_weaver: after reading through; https://www.gnu.org/software/guile/manual/html_node/List-Mapping.html
<adhoc>that looks an ideal starting place =)
<nalaginrut>well, I realized that 1+ is unreasonable since it's postfix, shouldn't it be +1? ;-P
<mark_weaver>I've never liked those shortcut procedures. I write (+ 1 ...)
<mark_weaver>1- is especially bad, because (1- n) looks like 1-n, when it fact it's n-1.
<nalaginrut>yeah ;-D
***michel_mno_afk is now known as michel_mno
<adhoc>nalaginrut: whats the reason for +1 versus 1+ ?
<lloda`>+1 is a number. 1+ is a symbol so it can be used to name procedures.
<adhoc>ah
<adhoc>so 1+ is used to increment?
<lloda`>(+ 1 ...) is clearer. 1+ is an old lisp wart, like car and cdr
<nalaginrut>adhoc: I'm kidding, +1 is prefix and 1+ is postfix, and lispers love prefix in general ;-)
<adhoc>lloda`: i remembe rseeing it years ago
<dsmith-work>Morning Greetings, Guilers
<lloda`>actually I think it's terrible that 1+ is in (guile)
***michel_mno is now known as michel_mno_afk
<remi`bd>hi! is there a in-Guile equivalent of `pwd` and `cd`?
<daviid>getcwd chdir ...
<daviid>remi`bd: look for 7.2.7 Processes in the manual
<daviid>civodul: nice, you're back!
<remi`bd>thanks!
<stis>evening folks!
<paroneayea> http://malisper.me/2015/08/19/debugging-lisp-part-5-miscellaneous/ is a nice article
<paroneayea>sbcl but food for thought