IRC channel logs

2015-11-16.log

back to list of logs

<sleblanc>mark_weaver, I am hacking at lilypond code and thought I could define variables from the lilypond command line (lilypond -dvariable=value) but apparently I can't, so that's resolved
<sleblanc>I wanted to set defaults to undefined variables, but since I can't define them externally, the case is closed
<koz_>OK, my REPL is being seriously weird. I try to load this with C-c C-b with an active Geiser REPL: http://paste.rel4tion.org/94 but then I get this: http://paste.rel4tion.org/95 . What gives?
<mark_weaver>koz_: well, for one thing, macros need to be defined before they are used, and 'define-inlinable' creates macros. in at least a few places, you are using those inlinable procedures before they are used.
<mark_weaver>anyway, after that's taken care of, if the problem still persists, I would load it from a file where you'll hopefully get line number information to help narrow down the location of the problem.
<jpp>hi everyone, i have a basic question if someone has a second
<jpp>i have a text file that is full of a bunch of random characters
<jpp>i ran the expression (read-char (open-input-file *filename*))
<jpp>where *filename* is the path to my file
<jpp>but no matter how many times i run the expression, it keeps showing me the first character of the file. shouldn't it be moving sequentially through each character in the file?
<sepi>jpp: you open the file every time you rerun the expression
<jpp>ok, then what's the correct way to keep moving through the file? my goal is to get the characters into a file into a list
<jpp>(i'm working on the Python challenge, but using Scheme)
<sepi>don't reopen the file all the time you want to read a char
<sepi>jpp: use maybe (define *f* (open-input-file *filename*)) and then repeatedly (read-char *f*)
<mark_weaver>sepi: the result of 'open-input-file' is called a 'port' object, and each port object keeps track of the position in the file. every time you open the file, you get a fresh port at the beginning of the file.
<mark_weaver>oops, I meant to send that to jpp
<jpp>mark_weaver: i understand that part, but I'm confused because I thought calling read-char would read a char, then move to the next char in the port
<mark_weaver>yes, that's what it does, if you had ever read from the same port a second time.
<jpp>mark_weaver: so i thought until i closed the port, using read-char would just keep moving through the file
<mark_weaver>every time you call 'open-input-file', you create a fresh port at the beginning of the file.
<mark_weaver>this works the same way in every programming language I've ever used in my 35 years of programming
<jpp>i know, but i'm new to programming and trying to understand
<mark_weaver>okay, so you can open a file more than once, and that's what your doing here.
<jpp>ok, so let me ask this differently
<mark_weaver>and each time you open the file, you create a port object, and the port object keeps track of its position in the file.
<mark_weaver>so, you can have 5 open ports on the same file, all at different positions.
<jpp>i just wrote (let ((port (open-input-file *filename*))) (begin (display (read-char port)) (display (read-char port)) (display (read-char port)) (close-output-port port)))
<jpp>shouldn't that show me the first 3 characters in the file?
<mark_weaver>yes
<mark_weaver>except that you should use 'close-input-port' because 'port' is an input port, not an output port.
<mark_weaver>but it's possible that guile doesn't complain
<jpp>mark_weaver: it did complain, so i fixed that error
<mark_weaver>okay
<mark_weaver>if you're new to programming, I can recommend "The Little Schemer" and "The Seasoned Schemer" as excellent books to get started programming in Scheme.
<jpp>i did read "The Little Schemer", and it was great, but it doesn't have anything specifically about reading files
<mark_weaver>that's true
<jpp>i thought it was great at conceptual stuff, but it didn't mention anything about ports, so I'm trying to get comfortable with those specific details
<mark_weaver>well, feel free to ask questions here :)
<jpp>thanks!
<jpp>It's really helpful, and I'm trying not to clog up the channel with my questions.
<mark_weaver>that's fine, no clogging apparent yet :)
<mark_weaver>so, the next thing is that if you want to read the entire file, you need to know when you read the end of the file. in scheme, the way that works is that 'read-char' will return what's called the "EOF object", where EOF stands for "End Of File".
<mark_weaver>you test for that using a predicate called 'eof-object?'.
<mark_weaver>s/when you read/when you've reached/
<jpp>right, i got that from Simply Scheme
<mark_weaver>cool
<jpp>what I'm trying to figure out now is how to transform the characters from read-char into a list
<jpp>but i wasn't going to ask how until i'd given it a try :)
<mark_weaver>we provide convenience procedures to do a lot of these things, but it's good to start with the basics and read one character at a time, because that gives you the most flexibility.
<mark_weaver>jpp: the little schemer probably taught you what you need to do that, didn't it? (I confess it's been a while since I looked at it closely)
<mark_weaver>if it didn't, The Seasoned Schemer is probably worth reading next.
<mark_weaver>anyway, it's good to try yourself first, as you say...
<jpp>mark_weaver: yep, i'm pretty sure I can handle that. Most of the list procedures I'm fine with, it's specifically getting info out of a file that I was unclear on.
<mark_weaver>makes sense. okay, happy hacking!
<jpp>mark_weaver: and I could make life easier by just defining the string within the file where the other code is, but like I said I'm specifically trying to get more comfortable with the file operations. That's the weak spot.
<mark_weaver>*nod*
<jpp>mark_weaver: hey last question, since you've been so helpful
<jpp>mark_weaver: if i have an external file, and that file is a list of lists
<jpp>mark_weaver: is there a way that I can append a new list onto the end, without having to read the entire list into memory? or is that not possible.
<mark_weaver>if the file contains data using scheme syntax, you can just use 'read' to read entire datums from the file.
<jpp>but if it's a really big file (like a database) wouldn't that pose a prpoblem from a memory perspective?
<jpp>let's say it's a list with 10,000 records, or something like that
<mark_weaver>yes, you'd want to use a different format for huge data files.
<mark_weaver>but 10000 might not be too much for a modern machine.
<mark_weaver>gotta go afk for a while...
<jpp>ok, thanks!!!!
***NeverDie is now known as slim_shady
***slim_shady is now known as NeverDie
<amz3>héllo
<nalaginrut>afternoon guilers~
<artyom-poptsov>Morning, nalaginrut
<nalaginrut>heya
<koz_>mark_weaver: So if I use define-inlinable, I have to list all those first?
<nalaginrut>mark_weaver: what's the difference between define-inlinable and define-syntax, IMO the latter is always expanded, no?
<koz_>mark_weaver: It doesn't seem to be an issue with define-inline - I've removed them all, and still have the same issue.
<koz_>Could someone help me write an unfold?
<koz_>I basically have (f size max), which should generate every contiguous size-length sequence of natural numbers, such that the first one is 0, 1, 2, ... size-1, and the last is ... max-3, max-2, max-1.
<koz_>I assume unfold is the right tool for this job.
<koz_>But I'm not sure how to write it.
***siel_ is now known as siel
<koz_>Is there any kind of restriction on having let inside a receive body?
<lloda>there shouldn't be
<koz_>lloda: I'm getting weird complaints from my REPL...
<lloda>can you post them?
<lloda>also I don't understand (f size max), the way you put it the size would be max, so you're giving it twice
<koz_>lloda: Code: http://paste.rel4tion.org/96 , message http://paste.rel4tion.org/97 .
<koz_>lloda: (f 3 6) should have yielded ((0 1 2) (1 2 3) (2 3 4) (3 4 5)). My description may have been flawed.
<koz_>The variable 'training' occurs only in that function.
<lloda>have you imported srfi-8? it looks like it doesn't know receive creates a binding
<lloda>(define (f s m) (map (lambda (o) (iota s o)) (iota (- m s -1)))) is how I'd do that. If I had to use unfold I'd use it only on the outer iteration
<koz_>lloda: Seems like the srfi-8 thing was the issue, thanks!
<lloda>yw
<lloda>GNU APL just crashed my box, total lock :-/
<koz_>Fun...
<koz_>Now the REPL is syntax-bitching at me...
<koz_>I just have *zero* luck today...
<taylan>koz_: in the pasted code above, the indentation of the let* bindings is a bit screwed; the variable names should line up, i.e. the non-first ones should have one more space of indentation
<koz_>taylan: I rewrote it: http://paste.rel4tion.org/98 . Is that still off?
<taylan>indentation looks ok now
<taylan>is that what gives a syntax error?
<koz_>taylan: Yup - it complains about the let*.
<taylan>are any of the things you call there macros?
<lloda>what is the complaint
<taylan>oh I see it, in the right-answers line
<taylan>koz_: it looks like you accidentally stripped a pair of parens
<koz_>Oh FFS... nice catch, thanks.
<wingo_>meep
<taylan>moo :)
<koz_>taylan: OK, now it bitches that training might be unbound: http://paste.rel4tion.org/99
<taylan>just as an aside: the word "bitch" in its various forms can be considered offensive
<koz_>taylan: That is true, and I'm sorry. I should know better than that.
<taylan>hmm, do you somehow miss let* in your environment?
<koz_>The only environment-changer is the use-modules at the top.
<koz_>I assume let* is automatically-there.
<taylan>normally yes
<taylan>I don't get such a warning when I paste that into a fresh REPL (though I get warnings for some of the things that are missing in my case)
<koz_>Never mind, found it. It was in a different function where I refactored code into it from there.
<koz_>My bad - thanks for helping me out.
<taylan>happy to help
<lloda>koz_ what is your editor?
<koz_>lloda: Emacs with Geiser.
<lloda>do you use paredit? rainbow-delimiters-mode? C-M-SPC?
<koz_>lloda: I only have it set up to electric-pair-mode and show-paren-mode. Should I be using Paredit or rainbow-delimiters-mode?
<lloda>rainbow-delimiters-mode is just visual, it doesn't interfere with your editing. I'd try and see if I like it
<lloda>paredit is more of an acquired taste
<koz_>I might just do that. I haven't done any hardcore Scheme hacking before, so I am a bit tool-ignorant.
<lloda>I use C-M-u, C-M-p, C-M-n, C-M-SPC a lot in Scheme to travel sexprs
<lloda>you see immediately if something is not matched
<koz_>Are these all scheme-mode commands?
<lloda>they work in the fundamental mode, actually
<koz_>Huh. Well, TIL.
<koz_>I basically am still an Emacs noob.
<lloda>myself I've been an Emacs noob for years ;-p
<koz_>lloda: Who besides RMS isn't an Emacs noob?
<lloda>the developers I imagine, people who write packages
<koz_>Yeah, one would hope so...
<koz_>What would be the easiest way to write a procedure that cuts a list into quarters?
<koz_>(returns a list of lists)
<koz_>Nested split-ats?
<taylan>'partition' maybe?
<taylan> http://srfi.schemers.org/srfi-1/srfi-1.html#FilteringPartitioning
<taylan>oh, that can only split to two
<taylan>I seem to remember having implemented a partition* (split to arbitrarily many) before...
<koz_>taylan: Any chance you have the sauce for that lying around?
<taylan>here it is https://github.com/TaylanUB/r7rs-extras/blob/master/partition.body.scm
<taylan>not sure if it serves your purpose well; takes multiple procedures as arguments to determine what element goes into which list
<koz_>Not sure either - I *think* there's a way to check for the index of any given element somehow...
<koz_>list-index *could* work...
<taylan>it's annoying that list-index takes a predicate and doesn't have a variant that just uses equality
<koz_>Yeah, in my case I'd have to write something like (lambda (x) (equal? foo x)) or whatever.
<taylan>(define (member-index obj list =) (list-index (lambda (x) (= obj x)) list))
<taylan>(member-index '(foo bar) '(qux (foo bar) baz 3) equal?) => 1
<taylan>could make last argument optional
<koz_>taylan: I think I solved it, but it's a point of perverse pride.
<koz_> http://paste.rel4tion.org/100
<koz_>No, that indentation is *not* erroneous. :P
<taylan>heh, it's fairly understandable code, so I wouldn't complain :) it assumes that the length of the list is 4*n for n>=1 though, from what I can tell.
<koz_>It works even when it's not.
<taylan>huh, I would've thought it ends up passing a non-integer to split-at, which I'd think split-at doesn't accept
<koz_>Apparently it does. (quarter (iota 9)) yields ((0 1 2) (3 4) (5 6 7) (8))
<taylan>funny, split-at takes non-integers too in Guile
<taylan>(might not work on other SRFI-1 implementations)
<koz_>taylan: You *do* raise a valid point though.
<koz_>I should probably do some rounding.
<koz_>This one's a bit nicer and has more even splits: http://paste.rel4tion.org/101
<koz_>Seems to force the uneven-ness to the end of the splits.
<taylan>rounded-half-length could be an internal definition, to save a level of indentation
<koz_>So do (define rounded-half-length etc..) rather than a let?
<taylan>yeah. a sequence of 'define' forms may appear at the beginning (and beginning only) of a lambda body (or let body etc.), which gets transformed into an equivalent letrec* form
<koz_>Ah, I see.
<koz_>I guess I'm too used to let, letrec and friends.
<taylan>sometimes it makes code arguably more readable. http://sprunge.us/OJbd
<koz_>Point well made.
<taylan>the fact that it becomes letrec* just means one annoyance, and that's that (define (blah foo) (define foo (modify foo)) ...) doesn't use the old foo to create the new foo, instead it errors because in a letrec* it's forbidden to refer to a variable before its binding is computed (here it cyclically refers to itself)
<koz_>How often does this come up though?
<taylan>(well, it theoretically errors. Guile doesn't necessarily check for that error and instead puts an undefined value into 'foo' in that case)
<taylan>I had it a couple times that I wanted to override an argument with a modified value, and wanted to save a level of indentation, but couldn't do it like that. have to use let or let* instead.
<taylan>but one could say it would have been an abuse of the original intent anyway. it's more meant for defining internal procedures.
<koz_>Yeah, I recall SICP using it all the time.
<koz_>Alrighty, almost got this genetic algorithm ready to run.
<koz_>Overnight, probably.
<dsmith-work>Morning Greetings, Guilers
<ane>considering Guile has a new logo now, should it be added to the wikipedia page? https://en.wikipedia.org/wiki/GNU_Guile
<ane>oh damn, that whole page is terribly out of date
<sepi>What's the usual way for a distribution to make libs available to guile? Are they just installed in a common path? I wonder because I'm using nixos where guile libs are installed in entirely different directories so I currently need -L to use libs.
<wingo>that page is out of date, though I am happy that the 'history' section basically copies the manual now
<wingo>the guile wikipedia page i mean
<wingo>sepi: distros that rely on the FHS install them all to /usr/share/guile and /usr/lib/guile. Otherwise you need wrapper scripts that set GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH
<wingo>i think that's what Guix does; not sure tho
<sepi>wingo: ahh, good to know
<wingo>sepi: you might try asking in #guix fwiw
<sepi>yeah :)
<taylan>ane: I don't see a reason not to update the page for the new logo...
<ane>i can't find a license for it
<ane>oh well, the website is AGPL, so i guess it covers it
<taylan>ane: in what way is the page out of date by the way?
<taylan>or in what ways
<ane>look at the sidebar, latest release
<ane>and then the last section
<ane>the last paragraph is missing the stuff about the recent release with 100% emacs lisp compatibility
<taylan>2.0.11 is the latest stable release, and the "Emacs integration" section seems to just reflect the usual paranoia of emacs-devel. I assume they see the existence of #f and #nil as "not 100% compatible" even if it means all Elisp runs as-is.
<taylan>oh actually, re-reading the quote, it seems to be just misinformation, so I guess we can remove that.
<ane>oh right, yes, it does say stable
<taylan>"...by differentiating nil and false in Emacs Lisp, ..." we don't
<ane>my bad!
<taylan>no harm done
<taylan>I'll remove the 100% compatibility thingy
<taylan>I think I'll also remove mention of concurrency since upstream emacs also has a branch adding that, and the main problem is mostly just Emacs's whole code-base being woefully inadequate/unprepared for concurrency :\\
<taylan>the citation was from a 1996 document O_o http://red-bean.com/guile/notes/emacs-lisp.html
<taylan>whoever edited that Wikipedia page was very very confused
<ane>whoa
<cmhobbs>anyone using emacs for their guile hacking?
<cmhobbs>i just noticed that emacs tried to compile the file i just opened
<taylan>cmhobbs: probably most people here
<cmhobbs>is that normal? if so, can i interact with it in a useful manner other than syntax highlighting?
<taylan>how do you mean Emacs tried to compile the file?
<taylan>what Emacs extensions for Guile hacking are you using?
<cmhobbs>i opened a guile script (?) in emacs and i received a bunch of messages about the script already being compiled in the minibuffer before the file opened
<cmhobbs>re: extensions for guile, i'm not entirely sure i have any
<cmhobbs>if i do, i forgot that i installed them
<cmhobbs>nothing from melpa, anyway
<taylan>well Emacs certainly won't compile any Scheme files upon opening them, by default
<taylan>I'm not aware of Geiser (Emacs extension) doing that either
<cmhobbs>but i'm double checking that
<taylan>Guile will auto-compile files upon loading them though
<cmhobbs>it looks like i have guile-scheme installed
<cmhobbs>and geiser
<taylan>is that the name of an Emacs package?
<cmhobbs>hm
<cmhobbs>yes, from melpa
<taylan>maybe that does it then
<cmhobbs>maybe
<cmhobbs>weird
<cmhobbs>i'll have to dig through the source or try to find some docs
<cmhobbs>that surprised the hell out of me
<ane>can't find that pacvkage on melpa
<cmhobbs>i don't know that it actually did anything when it tried to compile it
<cmhobbs>but yeah
<cmhobbs>maybe it's not from melpa. i know it's in marmalade for sure
<cmhobbs>it shows up in package-list-packages
<taylan>it seems to be from Marmalade
<cmhobbs>yeah
<cmhobbs>sorry
<ane>never used it. only geiser
<cmhobbs>hm
<ane>caveat: i started hacking around in guile about a week ago
<cmhobbs>i have geiser installed as well but i never seem to use it
<cmhobbs>i just keep a repl open and dump stuff into files
<cmhobbs>i should find a more efficient workflow
<ane>um, that's what geiser does
<ane>or you aren't using the repl inside emacs?
<cmhobbs>no
<cmhobbs>just in multi-term
<ane>does it say "Scheme Guile" at the bottom, on the mode line?
<cmhobbs>it does
<cmhobbs>Scheme/Guile/A
<ane>hit C-c C-z in your file
<cmhobbs>WHAT MANNER OF FOUL SORCERY IS THIS?!
<ane>haha
<cmhobbs>ACTION burns his computer at the stake
<ane>that's Geiser doing its magic
<cmhobbs>amazing
<cmhobbs>this is like slime
<cmhobbs>wow
<ane>well. yes, yes it is.
<cmhobbs>thanks for mentioning that
<cmhobbs>how useful
<ane>geiser activates quite easily on its own
<ane>i mean. all you have to do is install it via the package manager and then open a .scm file
<ane>it "takes over" the default scheme major mode
<cmhobbs>interesting
<cmhobbs>how can i get code to and from geiser?
<cmhobbs>i'll just read the docs
<cmhobbs>looks like it's in info
<ane>geiser has a nice tutorial
<ane>if you've used SLIME it should be familiar
<cmhobbs>i can't find any documentationa bout giule-scheme anywhere
<cmhobbs>oddly enough
<cmhobbs>i'm pretty sure that's what did the compilation
<ane>you should probably just uninstall that
<ane>since Geiser does whatever that thing does
<cmhobbs>ok
<cmhobbs>yeah, looking at the code for guile-scheme, it seems like it's a less useful geiser
<cmhobbs>also, undocumentd :/
<ane>the info stuff of geiser is good enough, it also has a menu bar item
<cmhobbs>back in two shakes
<csed>So they killed my internet connection at home.
<csed>And I've been doing PAIP, in Guile, with no internet.
<csed>I now know the face of true suffering.
<cmhobbs>hard mode :D
<amz3>PAIP?
<cmhobbs>paradigms of ai programming, right?
<csed>cmhobbs, amz3: Yep.
<cmhobbs>i thought it was a common lisp book?
<csed>It's in Common Lisp.
<cmhobbs>right
<csed>That's what makes it difficult.
<csed>er.
<csed>Difficulter. Now a word.
<amz3>the book
<amz3>I have a look at modern AI but I think I will try PAIP instead
<amz3>s/have/had
<csed>amz3: I've read the first chapter of AIMA, and it's great. It sort of has a was of concisely explaining difficult ideas.
<csed>You can just do both at once. When you get pissed of at PAIP do AIMA and vice versa.
<csed>off*
<amz3>i'll try
<csed>I like how the first chapter of AIMA has this exercise where it's like. "Define Intelligence."
<csed>Which, you know. Sort of an undertaking by itself.
<amz3>I'm learning minikanren, trying to know it fully by hearth, because
<amz3>I can use it, but don't understand it fuly yet
<amz3>csed: that's what I don't like. I'd like something to code, not philosophy
<davexunit>Geiser is our killer productivity tool
<davexunit>I've been meaning to write a blog post about my Guile workflow
<csed>davexunit: Holy crap, yes. It's badass.
<davexunit>because lots of people can see that Scheme is intellectually interesting, but what about when you need to "get shit done?"
<csed>amz3: I can understand that. But I think that taking a theoretical approach at the subject can help better define the practical approach. Especially in AI. For instance, how to properly describe a rational agent, and all the implications that follow said definition.
<csed>Which is why I'd recommend going through both at the same time. Unless you're in a hurry.
<amz3>csed: thx for the recommendation
<csed>amz3: Yep, hope it works out for you.
<cmhobbs>davexunit: i'm trying to get to a point where guile is practical for me
<cmhobbs>i'm still learning but i'd like to have it be my go-to language
<paroneayea>cmhobbs: \\o/
<cmhobbs>hopefully a workflow will shake out of those attempts
<cmhobbs>i've already snuck it in at the office :D
<davexunit>Geiser + Emacs are what make me productive
<paroneayea>geiser + emacs is an *amazing* combo
<cmhobbs>and i'm using it for all the automation i do on my server
<cmhobbs>yeah, i just need to go through the docs
<cmhobbs>i think i'll probably start tearing into something like sicp to get some of this stuff into muscle memory
<cmhobbs>that's the hard part about picking up a new language, not having to reference the docs every two seconds and breaking your flow
<davexunit>oh and through Paredit in, too.
<csed>cmhobbs: In Geiser (a Geiser enabled buffer) you can do C-c C-d d to reference the docs of the object at point.
<davexunit>yeah, take advantage of built-in info support!
<cmhobbs>csed: thanks!
<csed>Really useful. Like yesterday when I was wondering why (#t ...) doesn't work as final cond clause.
<csed>cmhobbs: Sure.
<turbopape>there is an interesting alternative to paredit that is named smartparens.
<csed>as a final*
<turbopape>Do you guys use it ?
<turbopape>I for one do,...
<turbopape>more customizable and all...
<amz3>I'll try it, I was told is simpler than paredit
<turbopape>yes.
<csed>I uh, I use electric-pair-mode.
<csed>But it's sort of annoying.
<turbopape>Besides, you can use some rainbow-parens to colour our parens pairs !
<paroneayea>I use smartparens
<paroneayea>I like it
<amz3>oh, yes, I should move this to my .emacs at some point
<turbopape>Ah no, paredit and smartparens are must-ahve's in lisp world
<turbopape>be it only for slurping and barfing.
<paroneayea>it's like paredit, but it permits less purity :)
<turbopape>yep
<turbopape>:)
<turbopape>you can tell smartparens if you want it strict or not :)
<paroneayea>I do most of my stuff in paredit-style editing, but sometimes I just want to hack it like text too :)
<paroneayea>ACTION region kills then cleans up after the fact
<turbopape>yes ! smartparens is "gentler" than paredit for that.
<turbopape>I wanted also to talk about rainbow-delimiters. Sweet colored pairs of parens :)
<davexunit>geiser + paredit + rainbow-delimiters
<davexunit>and you're good to go :)
<paroneayea>yeah I use the naquadah theme
<paroneayea>and it looks sooooo goooood with rainbow-delimiters
<turbopape>totally agree !
<paroneayea>the main problem with getting comfortable with guile + geiser and friends type workflow
<paroneayea>then your real life requires that you use non-guile + geiser type things and you're teh sads
<turbopape>one thing I love about guile (that we have more or less now in clojure/cider) is the debugging
<turbopape>soo advanced, compared to the java stacktrace :)
<paroneayea>guile's debugging is great
<turbopape>yes.
<paroneayea>(pk) is nice too, though the manual doesn't mention it anywhere
<paroneayea>hidden gem?
<davexunit>easter egg
<turbopape>we did not had proper debugging in cider up untli lately
<davexunit>this is giving me lots of good ideas for a blog post
<turbopape>and it's still about some instrumentation and getting locals
<turbopape>nothing like getting into frames, etc...
<davexunit>I'd like to run through all of these things and hopefully raise some awareness of the really useful things available with Guile
<paroneayea>davexunit: do you have an okayish microphone at home?
<davexunit>yes
<davexunit>but I don't currently have a good setup for screencasting
<paroneayea>davexunit: we should totally hop on Mumble and I should do an interview on how to maximize Guile hacking for Hacking Public Radio :)
<davexunit>ooh
<davexunit>that would be cool
<davexunit>I anticipated a different sentence :)
<paroneayea>interviews are nice because the content usually is pretty interesting but it doesn't require a lot of planning
<turbopape>you shall also try darktooth-theme
<turbopape>quite cool
<paroneayea> http://emacsthemes.com/themes/darktooth-theme.html looks pretty nice
<davexunit>looks sort of like wombat
<davexunit>ACTION uses wombat
<holomorph>ACTION uses own port of zenburn
<amz3>+1 looks like zenburn
<amz3>but I use naquadah
<amz3>:)
<holomorph>fwiw https://github.com/holomorph/emacs-zenburn
<davexunit>holomorph: what font do you use?
<turbopape>yes, it has the looks of zenburn but is way more "clear"
<davexunit>I'm partial to inconsolata
<holomorph>davexunit: that's Consolas, but atm i'm using Inconsolatazi4
<amz3>I use HACK
<turbopape>Deja vu sans !!
<amz3>turbopape: that no very readable
<turbopape>I am used to it somehow...
<ane>is Guix essentially Guile's "package manager"?
<davexunit>ane: it can be used this way, yes.
<davexunit>it's heavier than language-specific package managers, but has the distinct advantage of being able to precisely describe your project's dependencies.
<taylan>well, it's not so that Guix is to Guile what e.g. ELPA is to Emacs, or what CPAN is to Perl
<ane>yeah
<ane>but it can be, and is, used for that purpose?
<davexunit>yes
<davexunit>for example, my game engine called "Sly" depends on some C libraries
<amz3>yep
<ane>so is there momentum for a separate package manager?
<davexunit>and I keep a package recipe in my git repo: https://git.dthompson.us/sly.git/blob/HEAD:/guix.scm
<taylan>you mean a separate package manager for Guile?
<holomorph>let's not jump on the bandwagon where every language needs its own package manager
<davexunit>ane: there is the "guild hall" package manager
<amz3>ane: there is not much momentum
<davexunit>that has been around, but I haven't used it and it's not really maintained.
<ane>heh, yeah, i wasn't suggesting that ought to be done - these days any new language has its own
<ane>if guix can be used for that purpose it's fantastic
<davexunit>I'd personally prefer to see Guix used for this.
<davexunit>*but*
<davexunit>if someone maintains a Guile-only thing, that's fine too.
<cmhobbs>guix for installing guile modules?
<davexunit>yeah
<cmhobbs>hm
<davexunit>naturally we have all the useful guile things packaged.
<davexunit>and up-to-date
<cmhobbs>but that's just a side effect of it being written in guile, yeah?
<cmhobbs>i'm not sure how i feel about either option. things like rubygems and quicklips are kind of a mess
<taylan>it also has Perl modules, GHC modules, Elisp libraries, ...
<cmhobbs>ha! quicklips...
<cmhobbs>quicklisp*
<paroneayea>I've found it easier for me to just package a guile library for guix whenever I need it
<davexunit>well, a lot of guile hackers also use/hack on guix so of course it gets all the guile packages
<cmhobbs>i wish i could use guixsd as my os these days
<cmhobbs>maybe soon :D
<amz3>kind of the the issue for a guix based package management for Guile, is that it requires a daemon, as long as there is no deb/rpm for guix it will be kind of painful
<davexunit>just use Guix on top of Trisquel for now and play :)
<cmhobbs>that's what i currently do
<davexunit>amz3: the binary installer is rather easy, and *someone* (anyone?) could make a deb/rpm to make it even easier
<csed>Man, smartparens is uh.
<csed>It does things.
<wingo>davexunit: have you been able to test f64 unboxing yet
<davexunit>wingo: no. it's on my list.
<wingo>cool
<davexunit>need to update guile-next in guix to the latest master and try it out :)
<wingo>:)
<davexunit>ultimately, I want to test it in a particle simulation, but I have a second performance issue that I'd like to eliminate first.
<davexunit>once Sly can do batch sprite rendering, the bottleneck should become floating point ops.
<turbopape>I'm not sure I understand, but isnt' guild (in the upcoming 2.2 series) in charge of packaging modules etc... ?
<davexunit>I don't understand that :)
<davexunit>guile isn't going to ship with a package manager, if that's what you mean.
<daviid>wingo: unless you object, I will merge, tag and release Guile-Clutter 1.12.2 tonight [or tomorrow night if something comes in the way that i'm not aware now :)]. It is unfortunate you could not find the time to answer Brandon's message wrt having a specific GNU Guile-Clutter project page, it would have been optimal time to annouce the 'split' now, imo
<daviid>wingo: i still don't have admin privs on Guile-Gnome, @ savannah, which means, like for Guile-Gnome tar and sig themsleves, I won't be able to upload the release files, you'll have to do that...
<turbopape>davexunit, I've red in the manual that guild (in 2.2.X) will help package and release modules, maybe I got it wrong...
<davexunit>I haven't heard of anything like that. has anyone else heard of this?
<davexunit>turbopape: if you have a source I'd like to read it
<daviid>davexunit: here is the last version of the example I cooked at the time ... :) http://paste.lisp.org/+3E6X/3 I fixed a couple of tipos in the license text, unecessary calls to define*, let*, use match for visited dirs and files and fixed an error wrt the treatment of the system procedure returned value
<turbopape>Ok davexunit, let me find this page...
<turbopape>davexunit, https://www.gnu.org/software/guile/manual/html_node/Using-Guile-Tools.html#Using-Guile-Tools
<turbopape>"and in the future, a system to install guile packages from the internet"
<turbopape>that was in the page discussing compilation with guild (formerly guile-tools)
<davexunit>turbopape: that is referring to the "guild hall"
<davexunit> https://github.com/ijp/guildhall
<turbopape>@davexunit : won't this be integrated in the official guild in the 2.2.X releases ?
<davexunit>no
<turbopape>okay, thx !
<davexunit>daviid: thanks!
<daviid>wc!
<dsmith-work>Woo! 121 nicks!
<cmhobbs>in here?
<amz3>i guess
<amz3>actually 115 now :)
<cmhobbs>great!
<turbopape>yes but the last standing 115 are real heroes!
<cmhobbs>haha
<amz3>:)
<cmhobbs>bah, i'm back to writing ruby today 8<
<cmhobbs>s'ok, i can guile tonight
<sepi>Does guile have any decent gui bindings?
<davexunit>guile-gnome is actively being worked on
<amz3>I though it was two different things guile-clutter and guile-gnome
<davexunit>you don't need clutter
<davexunit>to make GUIs with existing components
<davexunit>AFAIK
<amz3>I don't know the state of GTK, I was under the impression that GTK was going to use clutter
<daviid>guile-gnome and guile-clutter are 2 diff beasts indead
<sepi>Yeah I'm not interested in clutter anyway
<sepi>atm
<daviid>sepi: here https://www.gnu.org/software/guile-gnome/index.html
<daviid>sepi: what is your goal, in 2 words if possible ?
<daviid>have to go afk for a little while, be back later
<sepi>daviid: Just knowing what's avaiable and if it would make sense to port a python+pyside application to guile. I guess not but that has to do with other missing libraries.
<daviid>sepi ok, too bad. here is an example anyway: file:///home/david/alto/web-pages/kise/index.html
<daviid>have to run, be back later
<sepi>thx
<amz3>sepi: what other libraries are missing?
<sepi>daviid: nice link :P
<amz3>FWIW I fixed guile-wiredtiger https://git.framasoft.org/a-guile-mind/guile-wiredtiger/commits/master
<turbopape>ah that's an information for me :)
<sepi>amz3: a nice graphing library like matplotlib or pyqtgraph and SGP4
<sepi>amz3: but I'm mostly daydreaming ^^. It wouldn't make sense to port it anyways (except for learning and political reasons )
<davexunit>sepi: there is guile-charting
<davexunit> http://wingolog.org/projects/guile-charting/
<amz3>btw kise is a task manager app written in guile + gtk
<cmhobbs>i'm using guile kind of as a script to automate a few system tasks but it (naturally) executes everything from the directory it started in. short of (system "cd /some/dir && dosomething"), is there a way to get the script to change what directory it's working from?
<davexunit>'chdir'
<davexunit>Guile provides Scheme procedures for many POSIX system calls
<amz3>it would be nice to have a (with-cwd-dir "path/to/some/dir/" e ...)
<davexunit>those are trivial to write
<amz3>or maybe
<davexunit>they are known as "excursions"
<davexunit>and they all follow the same pattern
<amz3>(with-cwd-dir "path/to/some/dir/" thunk) to work around dynamic context switch
<davexunit>save initial state, dynamic wind to protect a thunk, and restore at the end
<amz3>yes
<daviid>sepi: I'm curious, any link to this python app you were maybe thinking porting to guile?
<daviid>amz3: small correction: Kisê is a time keeping app [not a task manager app], which, on purpose, does _not_ use the computer clock to register time...
<amz3>daviid: what the different means?
<daviid>amz3: sorry, very busy, let you find out if you don't mind
<daviid>amz3: i would suggest you look into the free s/w directory, they categorized all these ... time keeping is diff from time tracking ... is very diff from task manager [the way I understand task manager is, for example, gnome-system-monitor...]
<sepi>daviid: It's unfortunately an internal application I've been developing during a kind of internship
<dmiles_akf>amz3: i forget if you are already doing this or not.. but are you studying PAIP or Structure and Interpretation of Computer Programs ?
<dmiles_akf>amz3: why i mention it, is both books walk thru the programmming of a miniKanren like system and show it's use
<dmiles_akf>(They call it prolog instead of MK)
<dmiles_akf>pretty much any AI book does that .. whether they are using lisp or scheme
<dmiles_akf>why i mention it is it seemed like you were wanting to see applicaitons of MK
<dmiles_akf>many books will show that its smart of have a MK like system to enable the programming they teach
<dmiles_akf>the programming style
<dmiles_akf>i find personally at the end of every one of these books that I am feeling like i wish there was a system that lets me integerat ethe data the programs all seemed to share
<dmiles_akf>(which is why I am making a system identical to Cyc)
<dmiles_akf>well also integrate all the examples into one framwork working together
<dmiles_akf>and start converting them into non toy versions
<dmiles_akf>well i decided to actualyl be able to do that sanely i needed one auxilary language that helped make that happen.. that is a Datalog their data to look and be used how each program perferes it transformed, but all not just for data, but a datalog to that describes to me later the interface to those programs
<dmiles_akf>a programs whoes job is to break sentences into parts of speek for instance.. that entre functionallity has to expose itself as one MK predicate (sentence-to-pos ?SentIn ?PosOut)
<dmiles_akf>that is probably almost a common sense way to do things but why i mention, is probly more elaborate programs going to even themselves break down to several MK predicates
<dmiles_akf>and then the MK system and its operations become valuable for contructing the program in a way will flow control into MK
<dmiles_akf>and the brittleness of these programs (most AIish programs are) become easier to bandaid
<dmiles_akf>(that is why Cyc is what it is .. A miniKanrenizing of several AI programs to make them less brittle)
***dje_ is now known as xdje
<amz3>dmiles_akf: I want to read PAIP
<amz3>right now my understanding of MK is fuzzy, i'm not sure how it leads to AI
<amz3>my understading of AI is fuzzy
<mark_weaver>amz3: for MK, I highly recommend "The Reasoned Schemer"
<turbopape>MK is about relational programming.
<dmiles_akf>It leads to a software pattern required proably to ever write a program complex as AI
<turbopape>you specify goals that, when succeeding suggest some possible values for logic variables
<dmiles_akf>(relational programming is that programming pattern)
<turbopape>a typical use case is a sudoku or X queens solvers
<turbopape>...
<dmiles_akf>hehe "use case"
<turbopape>well ... That's the best I could come with...
<turbopape>I could write a little checkers engine with it,
<dmiles_akf>actually though sudoku or X queens solvers are great examples that are better programmed relationally
<turbopape>indeed ! and MK IS relational !
<dmiles_akf>i wrote an english to FOL converter and i needed to do it relationally
<turbopape>what is FOL ?
<dmiles_akf>here is the output https://docs.google.com/document/d/1rdI_f-2YnX0e2RD6rGAY57YAqzLj2xHsk36m5HT6SoM/edit
<dmiles_akf>First order logic.. tyhugh its higher order logic i suppose
<dmiles_akf>now i have to make a solver powerfull enough to use the interpreations
<turbopape>ok I see...
<dmiles_akf>and that again i think is MK + Crack
<dmiles_akf>(the solver)
<dmiles_akf>the programs will fit into a system ran by that same sover i hope
<dmiles_akf>which all turns out to be MK
<dmiles_akf>admittedly theere my be some programs hard to relationalize.. or when you do you create a layer of complexity.. but i think this is not a problem that cant be solved by some represation of the problem
<dmiles_akf>when you do relationalize, you might be creating a layer of complexity, but i think this is solved by using an the external method but controlling the prepresention of the data
<dmiles_akf>i terribly silly example is using predicate calc to do addition or subtraction that via ther successor methods.. so we havk in the + symbol
<dmiles_akf>i terribly silly example: using predicate calc to do addition or subtraction. using succ(succ( 0)) methods.. so instead, we hack in the "+" and "-" symbol
<dmiles_akf>(i am just giving a situaton that relational programming makes a problem harder)
<dmiles_akf>i am writting my MK-like solver in prolog since writing it is very hard
***darthlukan_ is now known as darthlukan
<rlb>I need to define methods that always apply to a small set of classes, at least one of which I don't control (say <foo> and <null>). I know I can just define two methods (directly or via macro) for each type every time, but I wondered if that was the preferred approach.