IRC channel logs

2015-01-23.log

back to list of logs

<wingo>lingering wip-goops-refactor issues, rather...
<wingo>ok, zzz
<wingo>night!
<linas>wigo, mark_weaver, yes, OK, I'm a bit distracted ... I'll try to have somethhing in an hour
<linas>s/wigo/ wingo /
<davexunit>in what cases is par-map more efficient than map?
<mark_weaver>davexunit: well, one requirement is that the procedure passed to 'par-map' needs to be fairly expensive to justify the overheads of thread synchronization.
<davexunit>mark_weaver: thanks, that makes sense.
***karswell` is now known as karswell
<nalaginrut>morning guilers~
***karswell` is now known as karswell
<please_help>There are no utility functions to do generic ({typed-,uniform-}array->pointer) operations?
<please_help>beside bytevector
<mark_weaver>SRFI-4 uniform numeric arrays can be treated as bytevectors. all the bytevector operations work on them.
<mark_weaver>so you can use bytevector->pointer on them.
<wingo>moin
<nalaginrut>heya
<civodul>Hello Guilers!
<nalaginrut>oops, someone is trying to implement java on Racket?
<ArneBab_>nalaginrut: will that make it possible to run all java libraries on Racket?
<ArneBab_>run→use
<taylanub>I, for one, welcome our new Racket-based Freenet builds ;)
<taylanub>(... one day it will be Guile)
<Tsutsukakushi>i2p is also java
<taylanub>Tsutsukakushi: my reference was because Arne is a Freenet dev
<Tsutsukakushi>oh okki
<nalaginrut>ArneBab_: I just saw a parser so far, seems a new project
<nalaginrut>I think it's possible to generate JVM bytecode from Guile
<nalaginrut>I think it's not a good choice to implement Java with Guile bytecode
<taylanub>doesn't JVM bytecode have problems with TCO?
<nalaginrut>anyway, I'll concentrate on guile-lua first, when I got time
<nalaginrut>taylanub: maybe TCO in Guile then generate it?
<nalaginrut>dunno if it's good idea
<taylanub>I still know very little about such things but I think if it was possible without drawbacks then Kawa would have done it already
<taylanub>IIRC Kawa has a "full TCO mode" that can be enabled but it slows all code down a little (maybe all function calls or so)
<nalaginrut>I think it's different, Kawa is to implement Scheme on JVM. But what I meant is to add a backend of JVM bytecode. There's a chance to do things like TCO in Guile's bytecode first. When it's converted to JVM, there's no TCO, but just some jumps (I have to say it's just guessing)
<ArneBab_>nalaginrut: I didn’t know guile can create JVM bytecode…
<ArneBab_>taylanub: Racket-based Freenet builds… ☺
<nalaginrut>ArneBab_: it depends on if people add backend
<ArneBab_>nalaginrut: ah, so there isn’t yet a backend for it?
<ArneBab_>an asm.js backend could be interesting…
<nalaginrut>ArneBab_: backend for JVM, of course no, I think the most important backend is x86...
<ArneBab_>nalaginrut: we have that, right?
<nalaginrut>ArneBab_: we have to wait for 2.2 first, since the AOT have to base on it
<ArneBab_>nalaginrut: ah, you meant native compilation?
<nalaginrut>for now, I think the only backend is Guile bytecode ;-P
<ArneBab_>:)
<nalaginrut>ArneBab_: yes, asm.js is nice, but seems RMS has problem with it, hmm...
<ArneBab_>nalaginrut: do you have a link on the position of RMS?
<ArneBab_>(aside from that the only way I found to compile for it is LLVM)
<nalaginrut>ArneBab_: it's discussed in mails, so no link, I'm sorry
<nalaginrut>but I'm querying mails for clarify what happened...
<ArneBab_>hm, ok…
<ArneBab_>thank you!
<nalaginrut>oh, I think it is: "In principle I see nothing wrong with making GCC output code that
<nalaginrut>could run on asm.js. However, we do NOT want to help anyone support
<nalaginrut>nonfree GCC back ends."
<nalaginrut>but anyway, this sentence is vague, I'm not sure if he don't want to support asm.js as nonfree backend
<nalaginrut>or he just want to say it's not cool to support nonfree backend, not blaming asm.js
<nalaginrut>dunno
<nalaginrut>well, I'll ask him...
<ArneBab_>nalaginrut: I guess asm.js is a free backend, since all mainstream Javascript implementations are Free Software. What he might have meant is that the work to support GCC should not facilitate making other backends.
<ArneBab_>(other nonfree backends)
<ArneBab_>nalaginrut: thanks for asking him for clarification!
<ArneBab_>(it would be great to be able to create asm.js code with GCC - delivery via browser is a major step forward for game programming, since the browser is already there)
<wingo>yo
<alandipert>it's not strictly related to guile, but would anyone here happen to know anything about the fact that traditional lisp macros don't usually receive their arguments expanded?
<alandipert>i would be grateful for any papers or thoughts on the subject, thanks!
<wingo>consider
<wingo>(define-syntax-rule (foo) 42)
<wingo>(define-syntax-rule (kwote x) 'x)
<wingo>(kwote (foo))
<wingo>would you expect that the result to be '(foo) or 42 ?
<please_help>(foo) evaluates to 42 so it should be '42 which is 42, right?
<please_help>nope, it's '(foo)
<please_help>makes sense though: (kwote (foo)) => (kwote x) [x = (foo)] => 'x [= '(foo)]
<ArneBab_>I’d expect that, too. The macros change the code from the outside (or top), then the evaluation goes the other way round.
<taylanub>it's the whole point of macros :)
<ArneBab_>jepp - they are truly orthogonal to functions
<paroneayea>wingo: I saw you make reference to the rees thesis in an old wingolog post
<paroneayea>about adding security features to guile
<paroneayea>curious if that's still on your mind
<paroneayea>(I used to work semi-alongside Jonathan Rees when I worked at Creative Commons, and sadly I had no idea at the time all the fundamental work he's done in lisp... kind of sad that I'm only discovering all that now that I no longer work with him but am now looking into lisp history more and more)
<ArneBab_>paroneayea: just a note (I need to leave): Your comment on py2guile got me to add more polish to the text. I hope it’ll soon be ready in book-form (at least as PDF). Thanks!
<paroneayea>ArneBab_: awesome! :)
<paroneayea>ArneBab_: btw, re: the "templates condemn a language"
<paroneayea> http://hy.readthedocs.org/en/latest/ that very example is why I added a (defmain) macro to Hy :)
<davexunit>paroneayea: context for "templates condemn a language"? :)
<ArneBab_>paroneayea: Cool! ☺
<davexunit>templates in the C++ sense or the HTML sense
<davexunit>?
<ArneBab_>davexunit: http://draketo.de/proj/py2guile/#sec-2-2-2
<davexunit>"If you need a tool to use the language, then it does not do its job."
<davexunit>does this mean that lisp is terrible because we all use paredit? :P
<ArneBab_>paroneayea: I don’t know whether defmain is the name I’d choose, but having something for it is a good thing, I think.
<ArneBab_>davexunit: bluntly: that’s why I wrote wisp ☺
<ArneBab_>(and yes, I know that that’s blunt - paredit is one of the reasons why I kept working on wisp, even though I did not expect to see many schemes take up wisp)
<davexunit>although, having used paredit for awhile now, I want it for all languages
<davexunit>but no other language has syntax that is so regular
<davexunit>javascript kind-of. I can navigate blocks of code easily enough, but I can't do the cool manipulations that paredit can do.
<ArneBab_>^ here I see a difference between manipulating existing stuff and writing new code. When I write prose, I also use transpose-chars for fixing errors, or M-uparrow to select a full paragraph at once. The templates in Python are something different: They are hacks on internal variables - also known as ceremony.
<ArneBab_>“ceremony”: code that is unrelated to the task at hand.
*ArneBab_ now explicitly named ceremony in py2guile
<ArneBab_>bbl
<paroneayea>davexunit: I like the paredit concept
<paroneayea>though
<paroneayea>I use smartparens
<paroneayea>because it's a bit less strict :)
<paroneayea>but same concept tho
<paroneayea>(though there is a strict mode, I think)
<dsmith-work>Happy Friday, Guilers!!
<wingo>happy friday, dsmith-work :)
<wingo>paroneayea: yeah i don't think anything would have to be added to guile; it's something that can be done in a library, seems to me
<wingo>daviid: i fixed the compilation issue on stable-2.0, can you verify?
*wingo landed goops-refactor stuff on master
<daviid>wingo: sure" good news! let me try
<sneek>Welcome back daviid, you have 2 messages.
<sneek>daviid, mark_weaver says: wingo thinks that http://bugs.gnu.org/18570 is fixed on current stable-2.0. can you verify and report back?
<sneek>daviid, wingo says: when you check, please verify that g-wrap's test suite passes for you
<daviid>ok
<wingo>guile-gnome works for me on master also -- but it needed a couple of fixes on guile-gnome master
<wingo>which i also pushed
<wingo>i have a fix pending for the accessor issue as well, but not yet committed
<daviid>wingo: nice [guile-gnome on master]. fixing the accessor issue would be nice, on stable too i mean
<daviid>compiling the latest stable [i had a small git problem...]
<lloda`>unrelated, but master fails to build for me with a segfault in GUILEC language/ecmascript/impl.go
<daviid>sneek: later tell wingo it is all fine and perfect, stable-2.0 and g-wrap pass their tests-suite, guile-gnome and guile-clutter compile fine with the latest stable-2.0 and kisê (guile-gnome) and my guile-clutter examples work fine as well, thank you! now the accessor would be a must, let me know...
<sneek>Got it.
<boxofrox>is there a literal in guile that represents void? something equivalent to (when #f #f).
<boxofrox>just curious
<davexunit>boxofrox: there's *unspecified*
<boxofrox>thanks. i tried that earlier and saw a #f pop up in my repl. #f must have come from somewhere else.
<taylanub>boxofrox: one can also return zero values by calling (values)
<boxofrox>ah. much nicer than (when #f #f) lol
<taylanub>note that it makes a little difference: trying to receive values from that call will error, whereas you *can* get the 'unspecified' value
<taylanub>e.g. (display (my-function)) will work if my-function returns unspecified but errors when it returns zero values
<boxofrox>oh, ok
<taylanub>(though generally you should know how many values a procedure returns before calling it anyway, so it shouldn't really be an issue...)
<boxofrox>true
<taylanub>(i.e. one could even say that this makes bugs surface more explicitly)
<taylanub>when you really don't know how many values you'll get, you have to e.g. (let-values ((the-values (my-function))) ...) and `the-values' will be bound to a variable-length list of values
<boxofrox>makes sense. i'm not familiar with how to return multiple values. best guess I have is something like (lambda () (values '(1 2 3))).
<taylanub>boxofrox: that's one value; the list (1 2 3). you can return multiple values by calling 'values' with many arguments, like (values 1 2 3)
<boxofrox>yep, just figured that out in my repl :D