IRC channel logs

2016-05-26.log

back to list of logs

<galex-713>Hi, what is the value used for #:optional arguments?
<galex-713>I mean what’s the right way to test if argument is not given and what’s the value to give as an optional argument if you want the default to be used?
<galex-713>It’s really strange because like if I do (define* (digits n #:optional radix) […] (number->string n radix) […]) if I don’t specify RADIX the function does nothing
<mejja>wingo: http://ssabook.gforge.inria.fr/latest/book.pdf
***frofroggy1 is now known as frofroggy
<galex-713>Hi, I compiled guile myself with prefix=~/.local, yet geiser-mode can’t find source for some functions, what should I customize in order to make it find the sources?
<spk121>galex-713 - i don't use geiser, but could it be that you need to update env vars GUILE_LOAD_PATH or GUILE_LOAD_COMPILED_PATH?
<lloda>galex-713: default value for #:optional and #:key is #f
<lloda>ah, I misread
<lloda>you can just say (define* (digits n #:optional (radix the-default)) ...)
<lloda>not sure if that's what you mean
<amz3>héllooooooooooooooo #guile :)
<Walakea>what is the reason for GNU having two lisp dialects? (elisp and guile)
<holomorph>aiui scheme wasn't ready when emacs was being written
<davexunit>Walakea: GNU also hosts 2 common lisp implementations
<civodul>i think Scheme existed back then but lexical scoping was considered "hard to implement efficiently" by some
<civodul>from what i heard
<civodul>it was Steele who pushed hard for lexical scoping in the CL standard, too
<Walakea>two cl implementations? gcl and clisp?
<galex-713>yup
<galex-713>afaik the “main” one is scheme, and elisp is just the emacs’ one for historic reasons
<galex-713>But soon you could as well code emacs in scheme too
<Walakea>i was thinking about beggining with lisp, but i still dont know which one to choose (cl, elisp, guile)
<galex-713>Even if anyway you could still do using elisp, and you could actually use elisp for any application (even if that would a bad idea because elisp has a lot of downside with the only true interest of being the emacs language)
<galex-713>Walakea: depends your needs :)
<galex-713>I’d say to forget cl (essentially because it’s what people said to me, and because now I got with scheme as long with elisp I understand them)
<galex-713>because
<galex-713>*because with current implementation you get no interest in it
<ijp>holomorph: scheme and emacs arose about the same time ~1975
<Walakea>what adds guile to scheme?
<ijp>basically everything in the manual
<galex-713>Interest in a programming language is highly influenced by what you can do with it: guile has a whooooooole set of modules/library and is probably already interfaced with most of what you could need/have the idea to need, while elisp has emacs and a whole set of really different possibilities, also the great advantage of having an great already done UI for everything that you can
<galex-713>use to make interactive applications quite easily in a familiar environment
<Walakea>i would like to avoid emacs for now
<ijp>so avoid it
<galex-713>Walakea: guile implements the main scheme standard, along with some other standards (srfi), and a few implementation-specific things (you got a repl with profiling, backtracing, debugging abilities, as long with a full featured module system)
<galex-713>Walakea: elisp is great if you’re used/like emacs, otherwise go directly to guile, you would get as much benefits
<ijp>I wonder who the people that do real research on the sociology of programming languages are
<Walakea>ok i will look at guile then, probably
<galex-713>ijp: what prog language sociology? :o
<Walakea>btw. on my university, next semester, we will have a subject called "non-imperative programming": 2/3 Haskell, 1/3 Prolog
<ijp>galex-713: well, sociology of programming more generally
<ijp>since obviously there is no society of programming languages to study directly
<Walakea>ijp are there even people that research such things?
<ijp>I assume so
<wleslie>it's an interesting subject
<wleslie>the low hanging fruit is the rift between the dynamically and statically typed camps, and the less desirable programming languages and their users
<Walakea>does gile not like shebangs?
<Walakea>*guile
<ijp>guile shebangs just fine
<wleslie>Walakea: you also need to close the comment with !#
<ijp>oh right, that thing
<Walakea>oh, good to know
<Walakea>how is guile pronounced?
<Walakea>[gil]?
<davexunit>guy uhl
<Walakea>thats weird
<holomorph>it's a word
<davexunit>yeah it's an existing english word
<davexunit>it's not just made up
<Walakea>actually i have just quite recently found out that gnu is that horse thing, then i realised why they chose that logo
<davexunit>it's a wildebeest
<ijp>in fact, it's a gnu
<Walakea>in my language we call it pakôň
<davexunit>;)
<Walakea>pa - pseudo, kôň - horse
<davexunit>pseudohorse
<davexunit>haha
<davexunit>I like it
<davexunit>someone needs to name a gnu project that
<Walakea>does guile retain the good things i heard about cl?
<Walakea>like simple code maintenance
<davexunit>scheme and CL are quite different
<ijp>simple code maintenance?
<ijp>I'm not sure what that means in a CL context. hopefully you don't mean images
<Walakea>no
<Walakea>i am not ure
<Walakea>*sure
<galex-713>ijp: sociology of programming seems quite interesting :o do you have links about it?
<galex-713>oh
<galex-713>brb
<Walakea>when i use guile in terminal, the arrow keys do not move the cursor but print some characters instead, i dont like this
<wleslie>how did you compile it?
<ijp>look for the readline section in the manual
<Walakea>debian repository
<ijp>(and those characters are the escape codes that the arrow keys map to)
<wleslie>oh right, you need ~/.guile
<Walakea>i dont have that file
<Walakea>i see it in manual
<davexunit>Walakea: see https://www.gnu.org/software/guile/manual/html_node/Loading-Readline-Support.html#Loading-Readline-Support
<wleslie>you usually write it yourself
<wleslie>you can put all sorts of things in it, but for readline support you need only two lines
<Walakea>i did what they said in manual and now it works just as i wanted
<wleslie>another option is using geiser
<wleslie>although if you're not an emacs user yet, there's a learning curve involved
<galex-713>Hi, is there a way to know something in another thread/future is done?
<galex-713>Erm, although, when I use ,trace some functions aren’t displayed (typically functions having other functions as args), is there a way to have a more exhaustive ,trace?
<galex-713>while inside of repl, how do you know what’s the current directory?
<daviid>(getcwd)
<galex-713>oh cool thanks :)
<daviid>galex-713: wc! and glad to see you here, guile rocks!
<galex-713>:)
<galex-713>what’s wc! yet?
<daviid>welcome
<galex-713>oh ok I thought to a side-effect procedure xD
<daviid>:)
<avoine>a destructive word counting maybe
<galex-713>x)
<galex-713>How do you use ,break-at-source? guile says me “ERROR: No procedures found at ~a:~a. "ulam.scm" 83” when I try
<galex-713>So does anyone know ,break-at-source?
<galex-713>At least how do you load/interpret/run a .scm/.go from repl?
<ijp>with load or use-modules (,use)
<ijp>include would work too, but that seems weird
<avoine>(compile-and-load "...your_file.scm")
<ijp>compile-and-load isn't in the default environment is it?
<avoine>in Guile 2.0.11 it is
<ijp>not here it isn't
<avoine>I'm using geiser maybe that it
<daviid>galex-713: are you using geiser?
<galex-713>avoine: my version must be anterior, I don’t have compile-and-load by default :/
<galex-713>ijp: it’s not for a module, but a personal program
<ijp>so load
<ijp>mind you, the distinction between module and program is way less important than people think
<galex-713>ijp: also, do you know how to use ,bs/,break-at-source?
<ijp>I've used it, but I couldn't understand when it worked / failed so I stopped using it
<galex-713>argh :/
<galex-713>So how can I debug a scheme programs where the bug resides along in a suit of set!?
<galex-713>*“set!”
<ijp>well, the top-level function breakpoints worked fine
<ijp>,bs probably works fine for inner defines [don't hold me to it]
<galex-713>yeah but I can’t ,br set!, it’s not a procedure :/
<ijp>right, and it would be a silly thing to do anyway
<galex-713>yes
<galex-713>so I don’t know where is my bug :/ isn’t there more documentation/example of it anywhere?
<ijp>part of the problem is your code is (hopefully) going to optimised which muddles with the source info
<ijp>bah, if they come back on I have a workaround for when ,bs fails
<daviid>ijp: tell the bot?
<daviid>I mean ask our bot to tell him ... of course you know