IRC channel logs

2016-10-09.log

back to list of logs

<taylan>amz3`: use uint8 for char. example: http://sprunge.us/NRFX
<ijp>I was actually bitten the other day by the fact that the char allows negative values
<taylan>yeah, it's not necessarily a uint. I don't remember if I had some solution to that in bytestructures...
<taylan>I think it came down to (system foreign) lacking char. if it had it (holding the same value as either uint8 or int8), bytestructures could copy that to offer its own char alias.
<taylan>amz3`: the idea of bytestructures is to imitate C pretty closely w.r.t. arrays, structs, unions, etc., but I suppose a convenience layer could be added that makes it more like record types with field setter/getter procedures
<spauldo>just noticed something: $SCHEME_LIBRARY_PATH is mentioned in only one place in the manual, and that's under the section for installing SLIB
<spauldo>it's not mentioned in the man page, either
<nalaginrut>morning guilers~
<spauldo>Anyone use slib? I get errors with (use-module (ice-9 slib)) - "unknown location: unexpected syntax in form define" when compiling guile.init, using guile 2.0.11 on ubuntu 15.10
<spauldo>guiser says the error occurs in ice-9/psyntax.scm:1274:12, which seems be for expanding an expression, but that's deeply nested in a huge s-expression that's working all kinds of black magic
<spauldo>slib's installed and I've set $SCHEME_LIBRARY_PATH to point to it
<spauldo>oh, well, nevermind I guess. Installed it on my debian laptop and noticed the message "slib does not support Guile-2.0 yet"
<spauldo>pity.
<void-pointer>spauldo: I managed to get SLIB to work with Guile 2.0 and 2.2 effective versions
<void-pointer>The trick is that you don't run guile.init. You need to run guile-2.init instead
<spauldo>I'll look into that, thanks.
<void-pointer>Basically, do (load "PATH_TO_SLIB/guile-2.init")
<void-pointer>If you want access all the time, then put that in your .guile file
<spauldo>I'm wanting to play with the database stuff in slib. I have a project for school and I don't want the same old perl/mysql code I've written a thousand times.
<void-pointer>Once you have that, you can load it with (use-modules (ice-9 slib)) and do the whole (require 'new-catalog) thing (note, I am pulling the command from memory, so I might have the wrong name and it is something other than 'new-catalog)
<void-pointer>It took me quite a while to figure this one out - quite a bit of frustration.
<void-pointer>I think the problem is that guile.init is meant for Guile 1.8 and earlier.
<void-pointer>And it can't hand off to guile-2.init (it looked like it tries, but it doesn't really succeed)
<void-pointer>Probably something worth adding to the documentation since there are now at least two of us with the problem
<void-pointer>I had the problem with using the distro installed versions of guile 2.0 and slib on Fedora 24 and Debian 8, the installed version of guile 2.0 with slib I installed on both of them, and guile 2.2 I installed with both the distro installed slib or my own installed slib on Debian 8
<spauldo>I'm thinking ubuntu doesn't package it. It's not part of the slib package.
<void-pointer>So I think it might be a pervasive issue
<spauldo>not a huge deal to install manually, but that could cause problems for people just trying to use it
<void-pointer>Well, if it is installed by the distro, one just has to make sure one loads the guile-2.init
<void-pointer>About the only thing special that has to be done. But, it can take a while to figure that out
<spauldo>weird. It's in the repository at savannah, and it's three years old. The ubuntu version is way behind.
<spauldo>no maintainer listed, maybe that's the problem.
<spauldo>lemme do a manual install and see if it works. I appreciate you pointing that out.
<void-pointer>ubuntu often just pulls debian packages straight up as is, especially the universe repository
<void-pointer>And debian focuses on stability more than up to dateness
<void-pointer>A lot of the software on Debian 8, for example, is quite old
<void-pointer>Debian isn't nearly as extreme as RHEL/CentOS
<void-pointer>But is decently so
<void-pointer>And while Ubuntu often pulls from Debian stretch and sid (which have newer packages since they are the testing and unstable repos), a lot of stuff is still not from there (and even there can be a bit dated)
<void-pointer>By dated, I mean that the versions are long since released. Many of them do have patches backported to them, especially if there are security issues
<void-pointer>Just, not new features
<spauldo>yeah, I ran sid for years. I use my laptop for school now, though, so I'm on stable. Old packages aren't surprising.
<void-pointer>I just switched from Debian stable to Fedora. Don't get me wrong, out of all the stability distros out there, I prefer Debian, just, that kind of distro is not for me for my personal computer
<void-pointer>Now, work computers, Debian stable, CentOS, and Ubuntu LTS depending on the circumstances are my preferred distros
<spauldo>how's the RPM hell situation these days? I haven't used fedora since FC4, and it still had all kinds of dependency issues any time you wanted to install anything nontrivial.
<spauldo>(and yeah, I know it's not RPM's fault, it's the lack of giant central repository)
<void-pointer>Havent had any issues yet. I do remember a ton back in FC3
<void-pointer>A decade changes a lot
<void-pointer>Though, I did use SL 6, which is RHEL 6 based and it did have a few troubles
<spauldo>that it does.
<void-pointer>But about the same as I ran into on Debian and Ubuntu
<void-pointer>I've managed to Frankenstein all of them and undo it on all of those
<void-pointer>About the same difficulty
<void-pointer>Maybe a bit higher on RPM systems
<spauldo>well, I went from slackware to debian back around 2000 - I tried redhat at the time but tracking down dependencies from random websites just wasn't ideal
<void-pointer>If only because synaptic makes it really easy to force a version while yumex doesn't seem to
<spauldo>no yum back then
<void-pointer>But that is an interface thing
<spauldo>debian's giant repository just made things so easy I went there and stayed with it. I really only use Ubuntu because the video driver situation's a bit better. Otherwise, I prefer debian.
<void-pointer>The main repos have most everything one could want, and they are self contained in that they don't depend on anything outside of them
<void-pointer>And then one can add RPMforge (might got the name wrong) if one wants a few more and the packages in it depend only on other packages in it and in the main repos
<void-pointer>I do miss Debian's huge repository
<spauldo>I could see using RHEL on servers and whatnot - but that lack of a repository is kind of a dealbreaker for me.
<void-pointer>Redhat's is generally comprehensive centered around dev work in the main languages, but lacking in multimedia, dev work in other languages, and a lot of other things
<void-pointer>Oh, and servers, the main repos generally have most things one would want on a server
<spauldo>I need to try it again, just to get back in the game. I'll be back in the job market in a couple years and red hat experience will be a plus.
<void-pointer>Along with better selinux tools from what I have seen
<spauldo>I use free/openbsd for servers here at home, but redhat's a lot more common for that purpose
<void-pointer>CentOS virtual machine is a good thing to try
<void-pointer>Just note, for lisps, the main repos don't have a whole lot
<spauldo>well, it's just time, really. Had to take 17 hours this semester for financial reasons, so I don't have time to play much :(
<void-pointer>Only a couple scheme implementations and almost no common lisp packages (barely has ASDF)
<void-pointer>Debian has them all
<spauldo>I don't expect to run much lisp on servers anyway. As much as I like scheme and elisp, I mostly just use 'em for math-related stuff.
<void-pointer>Yeah, school does that
<spauldo>well, scheme, anyway. I use elisp for all kinds of things.
<void-pointer>So glad I am done
<void-pointer>I would like to transition from python for math/sci stuff to scheme or common lisp
<spauldo>I'm looking forward to being done, but if I might end up going for a master's, so it'll be a while for me.
<spauldo>I never got into python. Took a class on it, used it a bit for UI stuff, but never touched the math stuff. I used to use fortran for math, but scheme works better as long as I'm not doing insane amounts of number crunching.
<void-pointer>Just, in the math/sci places, everyone is using C, Fortran, Python, Matlab, and Julia so there are a lot of packages in those to catch up to. Now, don't get me wrong, I love Python, C, and Fortran and I respect Julia (don't have personal experience with it), but I feel that that group doesn't cover all bases
<void-pointer>I am still primarily a Python developer
<spauldo>I need to pick up a good symbolic math language. I messed around with octave, but it's not quite what I'm looking for. Maybe maxima, I dunno.
<void-pointer>But, I find myself writing lots of boilerplate in it and that it is sometimes clumsy for what I want to do, even with the help of everything that is in numpy and scipy
<void-pointer>Maxima is pretty powerful from what I understand. It is interestingly common lisp based
<spauldo>I've heard good things about numpy, just never tried it. I dunno why, maybe it's because perl was my first serious language, but I never could get into python. It's just not my stule.
<spauldo>er, style.
<void-pointer>Basically, numpy+scipy+matplotlib combo is very powerful. I would say that those with the versatality of Python blow Octave, Matlab, etc. out of the water, and they are only growing in power
<spauldo>the numerical tower is the main thing that drew me to scheme. I've played with clojure, common lisp, and of course elisp, but scheme seems to be a good fit for when numbers start getting weird.
<void-pointer>But, I kind of think that Python is not the best language for that sort of thing. It is good and it has established packages that work well
<void-pointer>Scheme has builtin support for some useful types for doing precise math (big-ints, rationals, high precision floats)
<spauldo>well, maybe someone will port them over to a more appropriate language sometime.
<void-pointer>Though, it seems rather clumsy when one wants to work directly with uintXX, intXX, float/double, etc.
<void-pointer>Well, I am working on that, actually
<spauldo>although I'm sure there are similar libraries that give that functionality to octave and matlab
<void-pointer>I am working on a numpy like package for guile
<spauldo>ooh, nice
<void-pointer>Been busy working on the tools and underlying pieces to build up from
<void-pointer>Hope to eventually get something like the ndarray, with full functionality, working
<void-pointer>With a bit of something that numpy does not have
<void-pointer>Trick is to not design it too pythonlike thereby overlooking the new possibilities that come from expressing similar ideas in scheme
<void-pointer>Right now, I am taking a break from working on the type system for it to work on a unit-testing framework. Without that framework, I am not going to have much of a chance to succeed
<spauldo>well, good luck with that. I'm still a scheme noob in the big scheme of things - the only library I've done any work on is adding some functions to the scheme sdl2 library. I really need to get those finished up and sent on to the maintainer.
<void-pointer>Then, I am going to move onto the underlying backing store problem before going back into the type and indexing stuff
<void-pointer>I am a scheme noob as well
<spauldo>ambitious project for a noob :) I wish you luck
<void-pointer>Just, have learned and done a bit of common lisp, scheme, and clojure off and on for the last few years, but have dived hard into scheme now
<spauldo>I did more or less the same. Started with common lisp, dived into elisp, played with clojure but didn't care for some of it, and wound up here
<void-pointer>It is ambitious. It generally takes ambitious projects to get me to really learn a language. I had an originally more ambitious project, but that one depends on this one, so I decided to step it down a notch and only try to get this done
<void-pointer>Could of course fail
<spauldo>meh
<spauldo>failure is just the universe telling you to try harder
<void-pointer>I've had more than a few projects do that over the last 1.5 decades
<void-pointer>And my ambitious first projects on the last two languages I learned did turn out
<spauldo>my problem is I get sidetracked and never get back to it. I've got a dozen or more unfinished projects on my hard drive, and there's dozens of others I've deleted over the years.
<void-pointer>But Python (and Matlab before it) were more similar to languages I already new (but the libraries were not)
<spauldo>programmer's ADD, I call it
<void-pointer>Yes
<spauldo>anyway, bedtime for me. I did what you said and got slib to load, so tomorrow I start playing around with it.
<spauldo>thanks for the help, and good luck with the numpy port. I look forward to playing with it.
<void-pointer>Goodnight (you must be in the americas, then)
<spauldo>yep
<void-pointer>It might be a while
<spauldo>I like scheme, I'll probably still be using it.
<void-pointer>Got other things in life going on as well, though thankfully, done with school (finished that a year ago as of 5 days from now)
<void-pointer>I'm liking it as well. Very few languages, though, I haven't liked. That is kind of my problem. Project and language jumping
<void-pointer>IDL is about the only one I outright hate
<void-pointer>Scheme has most of the things I want, and enough power to give me many of those it doesn't
<spauldo>I'm picky. I like C, scheme, elisp, and perl... others go from "meh" (java, clojure) to downright hate (javascript)
<void-pointer>Not quite all of them if I want to stay in portable scheme
<void-pointer>I like C, C++, Fortran, Python, Octave, Scheme, C#, assembly on the two architectures I have done it on, Clojure, Common Lisp, and probably a few others I am forgetting. I am kind of ambivalent on Java and Ruby. Don't like IDL
<spauldo>well, nice thing about Linux is guile is usually available.
<void-pointer>yes
<spauldo>anyway, see ya 'round, I'm off to bed
<void-pointer>and it is straightforward to do a mixed C/scheme package
***spauldo is now known as spauldo-afk
<void-pointer>later
<jmd>Is it possible to use map to delete items from a list?
<amz3`>héllo :)
<rekado>jmd: deleting items from the same list you’re mapping over? That’s uncommon.
<jmd>rekado: I used filter instead. Thanks.
***tokage_ is now known as tokage
***tokage_ is now known as tokage
<void-pointer>jmd: how deleting items from a list you are mapping over would work would depend a lot on the order that map is operating on the elements. It would be scheme implementation specific, if it worked at all, since R6RS (and my guess would be R7RS small, R5RS, R4RS, etc. as well) don't define a particular order for map
<jmd>void-pointer: I was actually using map-in-order
<void-pointer>Ah, map-in-order is a very different beast
<wingo>in guile they are the same
<void-pointer>I rather like having that function. A whole lot easier trying to implement cumsum and cumprod with map-in-order than with for-each
<void-pointer>Oh, i was wondering that
<void-pointer>Though, one can never know if it will always stay the same in the future
<amz3`>I use srfi 64, with test-equal, when a the test raise an exception it still mark the test as passed
<void-pointer>I'm trying it out right now and if I get an error, nothing seems to be reported. Going to keep trying
<void-pointer>OK, I get nothing if the error is in the first expression and FAIL if it is in the second, but I have a very strong feeling I am testing very different things than you are, amz3`
<void-pointer>What sort of expression are you trying to do?
<void-pointer>A question for those who do dev work on guile itself. How do you manage to test any changes you make when bootstrapping takes so long (or does not having to compile from scratch really save the day here)?
<ijp>obviously it depends on the size of the change
<ijp>I certainly wouldn't compile it from scratch every time
<amz3`>here an example program https://paste.gnome.org/pwt3gncls
<void-pointer>I confirmed it. My guess is that the code for SRFI-64 does implement error catching, but that it might return #f if an error happens causing a passed test when it should have been marked as FAIL
<void-pointer>amz3`: perhaps you should file a bug report. That definitely counts as a bug
<amz3`>thx
<amz3`>OrangeShark: yesterday the bindings could not be run but today it's fixed I can pass a test x)
<amz3`>OrangeShark: Also I moved to scheme-bytestructures, I made a guix package for it, I made a PR in the project and asked guix-devel to include it
<amz3`>I did not push tho
<jmd>I'm trying to set up i18n in my program. I have called (setlocale LC_ALL "") (textdomain "xyzzy11")(bindtextdomain "xyzzy99" "xyzzy77") but guile doesn't even seem to be looking for any extra .mo files. What have I forgotten.
<jmd>?
<amz3`>guile support i18n?
<jmd>well i18n support in guile I suppose.
<yati>Hello, what is the best way to have Guile execute a scheme expr from C and then get the result of evaluation of the input expr? Looks like I should pass the string to scm_with_guile() and then call scm_eval_string() in guile-mode. How do I convert char* to something scm_eval_string() likes?
<yati>scm_pointer_to_string takes three SCMs
<yati>Nevermind, found scm_c_eval_string(char*)
<wingo>meow
<holomorph>:3
<yati>Is there a C API reference with all functions on one page?
<civodul>artyom-poptsov1: you around?
<artyom-poptsov1>civodul: Hello.
<civodul>hi artyom-poptsov1!
<artyom-poptsov1>yati: I think <https://www.gnu.org/software/guile/manual/html_node/Procedure-Index.html#Procedure-Index_fn_letter-S> may be a good starting point. Look for procedures with names starting with "SCM_" or "scm_".
<civodul>just emailed you: i'm wondering if we can add ssh_channel_send_eof bindings easily enough
<artyom-poptsov1>civodul: Hmm, aren't we able to send the EOF object right from the Guile world by writing it to a Guile-SSH channel?
<civodul>that would need to be translated to an ssh_channel_send_eof call
<civodul>thanks for the release BTW!
<artyom-poptsov1>civodul: You're welcome.
<artyom-poptsov1>civodul: OK, I'll see if I can solve this "EOF problem". This shouldn't be a big deal.