IRC channel logs

2016-04-01.log

back to list of logs

<daviid>wingo: I pushed a fix for gtk-tree-path-new-from-string to the devel branch. Fine, but I still fail to understand why we have to have gtk_tree_path_new_from_string in overrides/gtk-customs.defs: indeed, in this [working/tested] patched version, the 'override' version is a 'no op'. but if I comment it all, then trying to use it triggers a gtk-tree-path-new-from-string undefined, despite it is in gtk.defs and not ignored?!? No big deal,
<daviid>but if you could you take a minute to find out/remember why and explain that to me, I'd be happier :)
<daviid>sneek: later tell fhmgufs I pushed a fix for gtk-tree-path-new-from-string to the guile-gnome git repo, devel branch
<sneek>Okay.
<lloda>can't find where PACKAGE_VERSION is defined, anybody?
<rain1>grep -r PACKAGE_VERSION --include='*.scm' in guix/ source tree shows this is never defined
<rain1>it is used in some C++ files like nix/libstore/globals.cc
<rain1>config.status:S["PACKAGE_VERSION"]="0.10.0" # seems to come from auto**** stuff
<rain1>oops!
<rain1>I thought you were asking about guix, not guile
<rain1>I think the answer is the same there though
<lloda>yeah, Guile
<lloda>the thing is that (version) uses PACKAGE_VERSION and I'm having a mismatch between (version) and (string-append (major-version) "."
<lloda> (minor-version) "."
<lloda> (micro-version))
<lloda>like the latter is "2.1.2" and I can see it's defined in GUILE_VERSION, but the former is "2.1.1.125-ae0380-dirty" and I don't know where the micro-version there is coming from
<alezost>lloda: not sure about guile, but usually PACKAGE_VERSION is defined by "config.h" which is autogenerated during "autoreconf" call if there is AC_CONFIG_HEADERS in configure.ac.
<lloda>alezost: might it be this bit in configure.ac?
<lloda>AC_INIT([GNU Guile],
<lloda> m4_esyscmd([build-aux/git-version-gen --match v2.\\[12\\].\\* .tarball-version]),
<lloda> [bug-guile@gnu.org])
<lloda>
<lloda>seems to be git-describe. So I guess version.test is supposed to fail on master?
<jmarciano>string-upcase is for all string, and what is for the first letter?
<C-Keen>string-titlecase ?
<jmarciano>thanks
<jmarciano>how can I dynamically load module? For exampe program-arguments is "package name", but (use-modules (package names)) don't work lie that
<jmarciano>I get "no code for: string on program input")
<civodul>interesting read here: https://modelviewculture.com/pieces/c-is-manly-python-is-for-n00bs-how-false-stereotypes-turn-into-technical-truths
<jmarciano>biases will be there for long time
<rekado_>we use "Snap!" to teach children programming. "Snap!" is definitely not a "real" language, yet feeling comfortable with "Snap!" doesn't say anything about programming ability.
<rain1>what is snap ?
<rekado_>rain1: see http://snap.berkeley.edu/
<rain1>this is good for beginners
<rain1>is it related to scratch?
<rekado_>unlike Scratch it does not need Flash, is free software, and has support for higher order functions
<rain1>that's brilliant :)
<rekado_>I really like it and I would be happy if we could have a graphical REPL for Guile for those who want to move on from Snap to a textual language like Guile.
<davexunit>rekado_: snap looks great!
<davexunit>guile needs picture support
<davexunit>like racket
<civodul>rekado_: one one had things like Snap! help introduce people to programming, but on the other hand, they reinforce the idea that being a "real programmer" is a thing
<rain1>I think it is very very helpful for beginners to have 'templates'
<rekado_>civodul: how so?
<rain1>blank page effect makes it difficult for a newcomer that doesn't know what to type
<rain1>if you have blocks you can take and fill in, or just a menu to select from that helps them know what to put by experimenting
<rekado_>rain1: you can open examples by clicking on the file icon in the top
<civodul>rekado_: because i think Snap! & co. are largely presented as "toy languages"
<civodul>davexunit: agreed!
<rain1>I mean how on the left snap has "Move ____ steps"
<rain1>you can take this and use it in your program, instead of having to know to type: M o v e ....
<davexunit>speaking of graphical things, I am playing with sly https://media.dthompson.us/mgoblin_media/media_entries/50/lowrezjam-2.gif
<rekado_>rain1: right!
<rekado_>that's the main advantage
<davexunit>using the 64x64 resolution limitations set by the "low rez jam" game jam
<rain1>A tool like that could be nice for guix package/system configuration
<rekado_>we have children aged 4 or 5 who made interesting and fun stuff with snap.
<rekado_>civodul: at the coderdojos we organized it's usually parents who think of "Snap!" as a toy language.
<rain1>toy language?
<rekado_>the children just have fun with it.
<civodul>sure
<rekado_>rain1: because it's not Python.
<rekado_>then they encourage their children to use Python instead because they "already did Snap", and then things are just frustrating.
<civodul>i think the perception of "toy language" comes from the fact that people know it's been designed only for education, and that's it's very different from what programmers use daily
<rain1>but aren't you locked into a web browser with snap
<rekado_>rain1: yes, for development. But you can export the code and compile it to a native application AFAIK. (I've never done it, though.)
<rekado_>what they don't know is that "real" programmers *do* things that are quite the same as what children do when doing things in Snap.
<rain1>programming language gets tied to identity too, people can say "I'm a python programming" but nobody says "I'm a pencil writer"
<rain1>programmer*
<rekado_>they do things differently (more keyboard, less mouse), but they still do the same things.
<civodul>rekado_: exactly: it's the same activity, but things look so different that it's "obvious" that it's not a "real" programming language
<civodul>i mean, someone learning with Python or Racket wouldn't have that impression
<rekado_>true
<rekado_>it would be sweet if Snap could be "blender-ized", mapping blocks to Scheme code and allowing to seamlessly switch between block editing and text editing.
<mark_weaver>rekado_: I haven't looked at it, but MIT App Inventor is also supposed to be comparable to Scratch, except it's Scheme underneath, and the project was led by Hal Abelson, one of the co-authors of SICP.
<mark_weaver>it uses Kawa
<civodul>sounds cool
<civodul>the picture language in Racket also looks very nice
<civodul>i wish we could do that with Guile + Geiser
<rekado_>mark_weaver: that's good to know! I was very confused by the App Inventor website when I first encountered it during our coderdojos; looked like it's just an Android App thing, so I didn't look further.
<mark_weaver>jmarciano: to load a module programmatically, use 'resolve-module', and things like 'module-variable' to look up variables, 'variable-ref' and 'variable-set!', etc. See section 6.19 of the Guile manual, and particularly sections 6.19.8 and 6.19.7
<mark_weaver>rekado_: it's true that the built apps run on Android
<mark_weaver>which is not ideal
<jmarciano>mark_weaver: now I have seen your message, thanks
<mark_weaver>although I suppose for kids in practice, that might be an important motivation, so they can show off their cool apps to their friends.
<rekado_>oh, and it seems one needs a Google account to use it :(
<mark_weaver>rekado_: really?
<rekado_>mark_weaver: when I click on "Create apps!" it asks me to log in with or create a Google account.
<mark_weaver>it started out as Google App Inventor, but now it's MIT App Inventor. I've been led to believe it's free software, so things like that could be fixed.
<mark_weaver>but if that's the present state of things, that's a shame.
<mark_weaver>bah
<mark_weaver>well, it should be fixable, anyway.
<mark_weaver>civodul: we should be able to do the picture language easily using Guile + Geiser + Guile-Cairo
<mark_weaver>or we could do something that runs in a web browser, maybe based on IPython Notebook or something like that
<davexunit>mark_weaver: for awhile I've wanted to make a Guile REPL client that was a web application
<civodul>mark_weaver: i'd prefer Emacs over a browser ;-)
<rain1>emacs has webkit gtk in it now!
<rain1>unless that was an april fools? maybe I got pranked
<rain1>I hope so...
<rain1> https://www.emacswiki.org/emacs/WebKit
<mark_weaver>civodul: I'd also prefer Emacs, but I suspect a lot of people, including younger people, would prefer a browser. We could do both.
<mark_weaver>and of course browsers would not only allow static images but fancier things like WebGL or whatever
<mark_weaver>rain1: it's had that for a while. not a joke.
<rekado_>rain1: is this related to the widget embedding branch that was merged a while ago?
<rain1>yeah
<rekado_>"How it works?" looks different from how I remember the embedding stuff to work.
<rekado_>I don't recall any dependency on Python.
<rain1>how would you educate kids to not fall into the programming-language-as-identity trap?
<mark_weaver>rain1: I've been running the Emacs-25 pretest for a while now, and its NEWS file says: "If you have gtk3 and webkitgtk3 installed, and Emacs was built with xwidget support, you can access the embedded webkit browse\\
<mark_weaver>r with `M-x xwidget-webkit-browse-url'. This opens a new buffer with the embedded browser."
<rain1>mark_weaver, I think I will look into disabling it because it is worrying :S
<mark_weaver>well, you can just not use it. emacs comes with everything and the kitchen sink, but I only use a tiny fraction of that stuff
<mark_weaver>I just tried it, and it doesn't work because I didn't compile it with xwidget support. I basically just updated the guix package on my branch without adding any new inputs or configure flags
<mark_weaver>okay, I hae to go afk for most of the day. happy hacking all!
<mark_weaver>*have
<jmarciano>cannot yet load module like (define mymod "module-name") (use-modules (mymod)), if somebody knows how...
<jmarciano>(resolve-module '(gnu-anything)) returns for anything,
<rain1>scheme@(guile-user)> (define z (resolve-module '(zenity zenity)))
<rain1>scheme@(guile-user)> (define e (module-ref z 'zenity-info))
<rain1>scheme@(guile-user)> (e "hello world!")
<rain1>this works
<jmarciano>maybe I don't have zenity installed
<jmarciano>ERROR: No variable named zenity-info in #<directory (zenity zenity) 42f9990>
<rain1>oh I think you do have it,
<rain1>but a sligthly older version
<rain1>try git pull in the guile-zenity repo?
<jmarciano>ok let me try it with gnu
<jmarciano>I wish to load modules, not to access something inside
<jmarciano>by using defined variable, to load module
<rain1>what for?
<jmarciano>like this (define r "readline") (use-modules (ice-9 r))
<jmarciano>what for, is for marketing Guix, but it does not matter now
<rain1>(define r "readline") (use-modules `(ice-9 ,(string->symbol r)))
<rain1>if at all possible you should load modules statically
<rekado_>or use a symbol directly.
<rain1>rekado_, I already showed that
<rekado_>rain1: oh, didn't see.
<jmarciano>cannot know the name of module to load it statically. It is logical in scheme that everything can be re-defined, but here is no go
<jmarciano>rekado_: did you show me something? I logged off, on... did not see.
<jmarciano>aha now I get ti...
<jmarciano>rain1: did that work on your side?
<rain1>I didn't try it
<jmarciano>I did
<rain1>(define r "readline") (resolve-module `(ice-9 ,(string->symbol r)))
<jmarciano>aha let me try
<jmarciano>I think that does something, but it does not load the module
<jmarciano>is there way to load all guix package.scm?
<jmarciano>so that I get package-name, etc. for each of package names...
<rain1>I think you could use the guix module for than instead of dynamically loading modules
<jmarciano>I use it
<jmarciano>if I just (use-modules (guix))
<jmarciano> that does not give me (package-name emacs)
<civodul>the (guix) module gives you the 'package-name' procedure
<civodul>but it does not give you the 'emacs' variable
<civodul>that one is in (gnu packages emacs)
***ruffy is now known as Guest46339
<dsmith-work>Happy Friday, Guilers!!
<rain1>happy friday
<rain1> :)
<civodul>Happy Friday!
<dsmith-work>Hmm. Time to start considering guix
<daviid>Happy Friday!
<dsmith-work> :)
<ArneBab_>rain1: to avoid children falling into the language as identity trap, you’d likely remove part of the incentive for going really deep into a language, so that might not actually be a good idea
<ArneBab_>it helped me a lot to really dive into Python, because many of the things I learned going deep into Python are applicable in other languages, too.
<ArneBab_>I don’t know whether I’d have done that if I hadn’t made Python part of my identity.
<rain1>my module foo.scm and foo.go is in ~/.guix-profile/share/guile/site/2.0/
<rain1>and it does (define-module (foo)
<rain1>but guile can't find it when I true ,use (foo)
<rain1>haven't I done everything correctly?
<wingo>moo
<janneke>meww?
<lokien>hoot hoot