IRC channel logs

2015-05-05.log

back to list of logs

<not_a_tiger>ArneBab_: "a = if(x 1 2)"
<not_a_tiger>why not "a = (x ? 1 : 2)"
<ArneBab_>because python does not have the ? operator
<not_a_tiger>No ternary operation in Python?
<not_a_tiger>Even AWK has it.
<ArneBab_>no
<ArneBab_>it has (1 if x else 2)
<not_a_tiger>That feels kind of inside out.
<ArneBab_>yes
<ArneBab_>but for a pythonista (x ? 1 : 2) looks jarring
<not_a_tiger>How so?
<ArneBab_>it’s not part of the patterns you’re used to
<not_a_tiger>Okay.
<not_a_tiger>It is one of the neatest tricks I ever learned in C.
<not_a_tiger>It feels really functional.
<not_a_tiger>You write English very well by the way.
<ArneBab_>thanks
<not_a_tiger>It would not be an exaggeration to say most native speakers I know don't write so well.
<ArneBab_>native writers can do a lot better - try reading something from C.J. Cherryh
<ArneBab_>or books where they can make you smile while you learn really deep things
<not_a_tiger>Hmm
<not_a_tiger>I don't read much fiction any more.
<ArneBab_>the older I get the more I see how much better I could be
<not_a_tiger>Sometimes I listen to audio books :)
<not_a_tiger>Man, that's how I feel about everything.
<ArneBab_>that’s something I don’t get to ☺ — I have a book in the bathroom
<not_a_tiger>Do you have an ebook reader or tablet?
<ArneBab_>I guess it’s normal - years ago I thought “I’m good at writing”, but as I understand more I see more places I can improve.
<ArneBab_>neither. I mostly read paper books
<dsmith-work>Yeah, the python ? : is really inside out. But is *is* an expression instead of a statement.
<not_a_tiger>I love paper, but I can't keep it all.
<not_a_tiger>Material posessions are like a boat anchor to my spirit.
<ArneBab_>not_a_tiger: but anyway, it feels good to hear that you like my writing
<not_a_tiger>Yep. Best to duck out before I wax metaphysical :P
<ArneBab_>I want stuff I can pass on to my children - keeping the best books
<ArneBab_>
<not_a_tiger>Children are great. Take care of them.
<ArneBab_>I try to. They are great, and a great challenge
<ArneBab_>which reminds me - I need to get up early tomorrow…
<not_a_tiger>:)
<ArneBab_>have a nice night!
<ArneBab_>cu and Happy Hacking
<not_a_tiger>good night :)
<ArneBab_>to you, too!
***karswell` is now known as karswell
<nalaginrut>morning guilers~
<ArneBab>moin nalaginrut
<nalaginrut>ArneBab: heya
<civodul>Hello Guilers!
<paroneayea>hello civodul
<paroneayea>and *
<nalaginrut> https://pbs.twimg.com/media/CEH6guMVIAA2Dur.png
<nalaginrut>this is true each time when I write code...
***michel_mno_afk is now known as michel_mno
<wingo>yo
<sneek>Welcome back wingo, you have 2 messages.
<sneek>wingo, ArneBab says: There I added a footnote to the book just to get lost in the blog post I linked to ☺ (guess which one ☺)
<sneek>wingo, ArneBab says: require("srfi.srfi-1").iota(10, 5, 7); # fhtagn
<dsmith-work>Morning Greetings, Guilers
<dsmith-work>sneek seen wingo
<sneek>wingo was here May 05 at 12:31 pm UTC, saying: yo.
<wingo>heya dsmith-work :)
<dsmith-work>wingo: Heya. Poor old sneek was having some temporal displacement issues.
<wingo>hehe
<dsmith-work>wingo: Your last previous message was weeks into the future
<wingo>amazing
<wingo>time flies dunnit
<ArneBab>hi wingo
<not_a_tiger>I found an error in the Guile manual
<wingo>can you put it in a mail and send to bug-guile@gnu.org ?
<wingo>tia :)
<not_a_tiger>I can try.
<not_a_tiger>It's not anything huge, just a mistaken word replacement. Probably over-zealous spell check
<jmd>not_a_tiger: I'm afraid Guile doesn't offer a bounty like Knuth.
<not_a_tiger>jmd: Why would that matter?
<jmd>I thought perhaps you were expecting something like that.
<not_a_tiger>No, that's actually laughable.
<not_a_tiger>Knuth isn't laughable of course. The assumtion that my character and intentions can be judge based on the little bit I share here is.
<jmd>Are there guile bindings for wxwidgets?
<davexunit>jmd: not that I know of.
<not_a_tiger>I'm not sending the report by email
<not_a_tiger>FWIW the bug is here: http://www.gnu.org/software/guile/manual/guile.html#Lambda-Alternatives
<not_a_tiger>"(It could be argued that the alternative define forms are rather confusing, especially for newcomers to the Scheme language, as they hide both the role of lambda and the fact that procedures are values that are stored in variables in the some way as any other kind of value."
<davexunit>perhaps you could send a patch to guile-devel@gnu.org with the fix?
<not_a_tiger>Why do you insist on email?
<not_a_tiger>"some" -> same
<not_a_tiger>I'll just leave you folks be for now. I'm sure you've got important things to do.
<davexunit>not_a_tiger: because we don't have time to work on it right now, and if there's a bug in our bug tracker or a patch in our mailing list it will be documented for someone to fix/apply later.
***michel_mno is now known as michel_mno_afk
<daviid>hello guilers
<daviid>do we have any sort of support to write biding to C++ library?
<daviid>the lab i'm partially working for would like i write an opencv 3.0 lib binding. opencv 3.0 is C++ 'only, the C [1.0] api was deprecated a while ago and is now unmaintained, so my quizz
<ArneBab>first thought: that sounds great!
<daviid>ArneBab: but impossible :) i'm afraid
<ArneBab>nothing is impossible - if it comes to the worst, you can always do compile-time C-code generation and bind to that.
<daviid>it seems someone tried and abandonned https://github.com/Itseez/opencv_contrib/pull/15
<ArneBab>but I remember some discussions here about C++ some time ago
<ArneBab>daviid: it sems like the pull-request worked, but wasn’t reviewed
<ArneBab>due to time constraints
<daviid>ArneBab: i don't like C++ [at all], but without proper guile support i won't risk it [not saying we should offer C++ support either, just asking]
<ArneBab>“It's been almost entirely time constraints that have prevented me from de-bitrotting this.”
<daviid>ArneBab: my C++ knowledge is zero [thanks god] and i just don't want to learn to write an auto gen wrapper to fnally write the binding...
<ArneBab>I know some C++ (it provides some nice options), but I don’t have time to do this in free time.
<daviid>this is not [would not be] a good way to do things anyway, or i can bind the officially maintained lib, or no binding afaic
<ArneBab>it doesn’t look that complicated - the code generation seems to be in modules/c/src/genc.py
<daviid>ArneBab: you don't understand, unless this code would be maintained by the opencv team itself, i won't use it
<ArneBab>because you don’t want to maintain it?
<daviid>of course i don't want to :)
<ArneBab>fully understood ☺ (I would not want to do it either - if the core project can’t, no one can do it sanely)
<daviid>mark_weaver: any plan do support C++ in the future? I remeber you wrote about that recently, iirc you were opposed to that idea... I need to answer my boss about this opencv 3.0 binding for guile or not
<stis>heaya guilers
<stis>WDYT? https://gitlab.com/gule-log/guile-log/blob/master/ice-9/set/complement.scm
<civodul>daviid: writing FFI bindings to C++ code would be very difficult
<civodul>(if that's what you meant)
<daviid>civodul: i undertand, that's what i ment yes. and frankly i don't think it would even be a good idea for guile anyway, but i wanted to make sure to answer the lab ... thanks civodul
<daviid>it's unfortunate for us, guilers, and for the guile visibility, tht we dont have any graphics advanced, computer vision lib in C
<daviid>clojure is winning the battle because of imagej...
<daviid>and now i have to write clojure for the lab, instead of guile/scheme code...
<civodul>are there bindings to C/C++ libraries in Clojure?
<daviid>civodul: python wraps opencv 3.0 though, i wonder how they do it
<civodul>probably from C++, not the FFI
<civodul>to be clear: one could write bindings to OpenCV, but they'd have to use libguile, not (system foreign)
<daviid>C/C++ libraries in Clojure? not sure i understand your question
<civodul>like, are there Clojure bindings of OpenCV?
<civodul>i guess that's feasible via JNI, but it sounds terrible
<daviid>clojure is java, imagej is written in java, hence the all imagej classes and functions are available from clojure...
<civodul>oh, ok
<civodul>thought "imagej" was a typo ;-)
<daviid>civodul for curiosity, here http://rsb.info.nih.gov/ij/developer/api/index.html
<daviid>and http://imagej.net/Clojure_Scripting
<daviid>Clojure bindings of OpenCV? yes, version 2,4 [also C++, C was deprecated in 1.0
<daviid> http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/clojure_dev_intro/clojure_dev_intro.html
<daviid>so clojure has everything :)
<civodul>heh
<daviid>i guess they can becaue java 'reads/converts' C++ to java? don't know
<daviid>ah no, opencv team provided a full java ... http://docs.opencv.org/java/ for 2.4.11 at least
<daviid>anyway, i don't see any route to even fight, too bad really
<daviid>the 2 biggest advanced image processing libs in the worls are inaccessible to us from guile: imagej and opencv
<civodul>why not try making opencv bindings then? :-)
<daviid>civodul: becuse it's C++ ?
<daviid>guile does not let me bind C++ lib ...
<civodul>it does
<civodul>or do you have any specific issues in mind?
<civodul>exceptions?
<daviid>civodul: i don't, i just don't even know how that would be possible, i'm al ears
<daviid> http://docs.opencv.org/3.0-last-rst/modules/core/doc/basic_structures.html#datatype
<daviid>up to the lowest level data structures used in opencv are C++
<civodul>but that's not a problem
<civodul>you can always write C glue that creates SMOBs that proxy the underlying C++ objects
<daviid>ok, any example how to wrap a C++ lib anywhere?
<daviid>civodul: wouah, ok, but that would be a terrific work right? and suggest to bug, i'd have to write it and i dont have the skill ...
<civodul>LilyPond and TeXmacs
<daviid>lilypond uses guile from C/C++ not the opposite
<please_help>Is there a way to compare syntax object that live in slightly different contexts but might still be the exact same item beyond that?
<daviid>there is no lily lib accessible from guile
<civodul>see also the thread at http://lists.gnu.org/archive/html/guile-user/2015-01/msg00016.html
<daviid>civodul: what i wanted to is guile-opencv, like guile-clutter [for example]
<saul>Is the (ice-9 slib) module no longer supported?
<civodul>please_help: free-identifier=?, if these are identifiers
<daviid>it's too bad C++ exists, as well as C# ... what a sad world :)
<please_help>daviid: C++ is like C, except it only sucks half as much :^)
<daviid>i guess i should do like davexunit for games, write an image processing module(s) but, opencv has 47000 contributors, imagej about as much, then i'd be alone :):)
<davexunit>you should be able to write a guile layer over that
<davexunit>I've seen folks use Guile in C++ applications
<daviid>davexunit: i want to do the opposite
<davexunit>I think that's possible, too.
<daviid>not extend opencv with gule, but, like guile-clutter, using opencv from guile
<davexunit>but I guess I really don't know, I haven't seriously programmed in C++ for years (thankfully)
<daviid>davexunit: civodul just wrote it would be very difficult
<davexunit>daviid: I guess that was before I joined the channel.
<davexunit>now, some C++ libraries have C bindings...
<davexunit>for example, the SFML game library
<davexunit>is C++, but there's a C interface that can be used, or at least there was. not sure of current status.
<daviid>davexunit: unfortunately opencv has no such wrap
<davexunit>figured.
<daviid>see the log, i wrote about that before you joined
<davexunit>and having to write 2 wrappers would be terrible.
<davexunit>:/
<daviid>it's too bad really but i don't see any route
<davexunit>how does the python interface work?
<davexunit>I would expect them to have a similar issue
<daviid>davexunit: see the log i patd links for python...
<daviid>pasted links for...
<davexunit>damn. sorry, I'll read the logs before I say anything else.
<daviid>davexunit: np, it's ust not to 'polute' our nice and friendly channel :)
<saul>davexunit, is this you? http://dthompson.us/category/blog.html
<civodul>daviid: what i wrote is that writing C++ bindings *with the FFI* would be very difficult
<civodul>it's not particularly difficult when using libguile
<civodul>just tedious ;-)
<daviid>civodul: yes i know, but using libgule is exactly the opposite i wna to do...
<daviid>i want to use libopencv :)
<civodul>ah, sure
<davexunit>writing the wrappers in C isn't the end of the world. you'll be able to write pure guile code afterwards.
<civodul>yeah
<civodul>though i fancy a C++ name mangler written in Scheme
<civodul>i've been wanting that for guile-gcc
<davexunit>how hard would that be to write, you think? I don't know what a name mangler implementation looks like.
<daviid>writing the wrappers in C is the end of the world for me :)
<daviid>i mean C wrpping C++
<civodul>davexunit: i haven't really found a clear description of the algo
<civodul>but maybe i haven't search long enough
<davexunit>is the name mangler the only blocker?
<daviid>davexunit: there has been an attempt, abandonned, here https://github.com/Itseez/opencv_contrib/pull/15
<civodul>the problem is that there are structs, classes, methods, static methods, references, etc. etc.
<civodul>name spaces also
<civodul>bah
<civodul>it's terrible
<davexunit>yeah
<daviid>yes terible
<daviid>terrible!
<daviid>but if such code existed, i'd use it :)
<davexunit>static const &terrible
<civodul>bah
<civodul>i've seen too much of that lately
<daviid>have to go afk for a while, bbl, tx all
<davexunit>the permutations for function arguments drove me crazy
<davexunit>hmm should this be a const reference or a const pointer?
<davexunit>or maybe I want to pass by value...
<civodul>heh