IRC channel logs


back to list of logs

***moshe is now known as please_help
<please_help>is array-copy! more efficient than a loop of array-set! ?
<please_help>I have a float that is actually guaranteed to be an int, but make-typed-array really wants an actual int. Is there a way to cast the value?
<please_help>right, thanks
***please_help is now known as moshe
<nalaginrut>morning guilers~
<civodul>Hello Guilers!
<wingo>moin :)
<lloda`>wingo, do we really need -Wmissing-prototypes? it requires a lot of pointless declarations (of internal stuff) and I don't see what error it could possibly detect.
<wingo>lloda`: it can catch accidentally exported functions
<wingo>it's only for non-static functions iirc
<wingo>static foo(int blah) {} won't trigger it afaik
<ota>I'm perhaps jumping in inappropriately, but in C prototypes can avoid bugs when passing non-int values to functions. So if the function takes foo(char flags), but is called without a prototype, it will receive and int instead.
<lloda`>sure. my thought was to lay blame on the caller (as in, the caller should require a prototype), but static is fine.
<wingo>there is also SCM_DEFINE_STATIC if that's where the problem originates
*wingo writes a gdb backtrace printer in guile, la la
<wingo>xdje: do you know of any work to add frame filter support to gdb?
*wingo working on it, if not
<wleslie>davexunit, wingo: global code in python is treated very differently to code within a function
<wleslie>code at module level is assumed to be set-up code, so it's not privy to the same kinds of optimisation
<wingo>wleslie: differences in benchmarks? :)
<wingo>i.e. do you have the numbers? :)
<wleslie>oh, will run them now.
<wleslie>counting to a billion was it?
<wingo>i think so, either via for or while
<davexunit>using for with a range was *much* faster
<davexunit>on python 3.3.5
<wingo>maybe that was because you were assigning to a global variable otherwise
<wingo>davexunit: were your loops in functions or at the top level?
<davexunit>wingo: top level
<wingo>there you go
<wleslie>it doesn't make that much of a difference for the for loop case
<wleslie>15.15 vs 15.33 seconds
<daviid>hello guilers. wingo yesterday i did make and make check master, though you'd be happy to know ... and then pasted the wrong guile version :) here is GNU Guile ...
<daviid>i just ran ./benchmark-guile in stable-2.0 and got a bug
<daviid>what is the option to add "-2.1" to what ever will be installed... ?
<daviid>the configure option i mean
<daviid> ./benchmark-guile in master report the same error, fyi
<wleslie>that really illustrates the difference between dictionary lookup and indexing the locals vector
<wleslie>and indexing once vs indexing a bunch of times.
***moshe is now known as please_help
<please_help>define-module's #:use-module and (use-modules ) look in different paths to load modules?
<wleslie>unfortunately I don't have a working, standard pypy, and the release isn't working here.
<please_help>if I have a local module and two files that rely on it, one using (use-modules) and the other using (define-module ... #:use-module), then the second file will not find the local module. -L and -l don't help.
<lloda`> tbh I never use #:use-module, but I wouldn't expect that difference
<wingo>xdje: btw i think there might have been some confusion in gdb; () is not #f
<wingo>and so gdbscm_is_false is unneeded
<please_help>so, should I be using (use-modules) instead of #:use-module?
<daviid>please_help: i don't think so
<lloda`>other Guilers here seem to favor #:use-modules, but I cannot tell you why. maybe it's just because it looks more 'declarative'. you should be fine with (use-modules).
<daviid>maybe a tipo in your 'other' approach...
<lloda`>but it should really be the same
<please_help>right, I forgot I was explicitly loading the files first
<please_help>but then, that means -L and -l don't seem to work for me, is "guile the_file.scm -L ." not a valid invocation?
<lloda`>options first files after?
<please_help>that works with -l but not -L
<wleslie>davexunit, wingo: not quite v8, but
<wingo>nice :)
<davexunit>but that's pypy!
<wleslie>er, function_while may be an outlier
<wleslie>davexunit: I pasted cpython results earlier
<davexunit>those results are what I would expect
<davexunit>so a for loop in a function was the best method
<davexunit>I should run on my laptop to see how it stacks up with my guile 2.1 measurement
<please_help>is array-copy well-behaved when src and dst don't have the same type?
<lloda`>yes, as long as the types are compatible
<lloda`>so you can dump anything into #t, but not into 'b or 's32, say
<lloda`>I take you mean array-copy!
<wleslie>davexunit: use this pypy if you run something other than ubuntu
<davexunit>wleslie: I run GuixSD :)
<wleslie>I will try running GSD in qemu soon
<wleslie>I use debian stable but it has been problematic for many reasons so will move to guix for many things
*davexunit goes afk
<mark_weaver>we're not using the term GSD, but rather GuixSD
<wleslie>it's a good distinction to make
<mark_weaver>wingo: oooh, a gdb backtrace printer sounds great! :)
<wingo>mark_weaver: it is surprisingly irritating :)
<mark_weaver>wleslie: I ran Debian for over 15 years, but now am using GuixSD on my primary systems and it works for me :)
<mark_weaver>although it has meant giving up some of my preferred software for now, e.g. GNOME.
<daviid>i wonder what would be an ideal setup to live with 2.0, 2.1[2.2 until i can abandon 2.0. so i thought maybe the best would bw to create a /opt2 instead of trying to make things [guile, cairo, colg, clutter, g-wrap, guile-gnome ...] livinag aside, anyone has a good experience and tips for me?
<wleslie>I use stumpwm rather than ratpoison, but I could probably deal with it. or package it.
<mark_weaver>wleslie: I recently added libffcall, so I guess maybe clisp is the last missing prerequisite, or at least the last non-trivial one, based on what I've heard.
<mark_weaver>(I haven't looked closely myself)
<wleslie>cool, clisp is my preferred runtime for stumpwm
<mark_weaver>and it might not even be hard
<mark_weaver>we might also be able to bootstrap sbcl from source code using clisp. apparently it has worked in the past anyway.
<paroneayea>mark_weaver: wow, running GuixSD as your primary distro already, way to dogfood! :)
<pecg>mark_weaver: I would prefer calling Guix System Distribution as GuixSD, but even the official USB images are called gsd:
<mark_weaver>paroneayea: heh, thanks :) I've been running it for many months actually.
<civodul>pecg: that's from the "early days" of the name
<civodul>transition period, you know ;-)
<pecg>civodul: I guess
<mark_weaver>pecg: we hadn't settled on GuixSD until after 0.8.1 was released.
<dsmith-work>Wednesday Greetings, Guilers
<xdje>wingo: I know () is not #f in Scheme. But Guile has this lisp compatibility thing ...
<xdje>boolean.h:#define scm_is_false(x) (scm_is_false_or_nil (x))
<xdje>So one could argue it is Guile that is confused ... :-)
<xdje>wingo: re: frame filter support: tis on the todo list, I doubt anyone is working on it at the moment.
<wingo_>xdje: hehe, ok :) just checking to make sure that you knew that scm_is_false is only true for #f and the lisp nil value which is not the scheme end-of-list value
<taylanub>xdje: Guile has nil *and* null :) null is the empty list; nil is the special object invented for Elisp compat which responds both to the null? predicate and has a boolean false value, but is not eq? to either of #f or ().
<wingo_>mark_weaver: sent a mail re port locking and such
<xdje>taylanub: Yep.
<xdje>I'm being just a bit conservative here. It's easier to relax restrictions than impose them after the fact.
***karswell` is now known as karswell