IRC channel logs

2017-04-24.log

back to list of logs

<ArneBab>MaliRemorker: there is some doc-snarf support, but AFAIK only specialized for some projects, not yet as generalized tool.
<MaliRemorker>i'll try to abuse it for my purposes then
<ArneBab>MaliRemorker: how to get the docstrings: http://www.draketo.de/proj/guile-basics/#sec-2-4-2
<manumanumanu>Can I use the random procedure to produce arbitrarily large numbers? It seems to work, but that's hard to tell without doing some analysis
<ArneBab>manumanumanu: please let me know when you find out!
<manumanumanu>:D
<manumanumanu>Will do! :)
<ArneBab>thank you ☺
<lloda>manumanumanu: libguile/random.c says yes, as in it takes & handles a bignum
<lloda>that's how I read it
<MaliRemorker>ArneBab: i made a module to generate "modern" Fortran code from Guile Scheme :)
<ArneBab>MaliRemorker: nice!
<MaliRemorker>a bit of polishing and it will be ready for public use
<ArneBab>MaliRemorker: is it actually modern code (2003 or up)?
<ArneBab>⇒ is it nicely readable?
<MaliRemorker>ArneBab: it is using 2003 features, but it's mostly fortran 90/95. The point of using Scheme was to avoid abstractions in Fortran and use it for it's pure numerical power
<MaliRemorker>compilers know how agressively optimize pure array/matrix operations
<ArneBab>MaliRemorker: how do you get data efficiently into the fortran?
<ArneBab>(if you have data in Scheme for example)
<MaliRemorker>but , in my experience , have problems with derived types and Fortran OOP
<MaliRemorker>well both things are well separated
<MaliRemorker>guile produces a fortran code that is self reliant
<ArneBab>so if you had to run some code over data, you’d write out the data from guile, read it from Fortran, process it, and write it out from Fortran so Guile can read it?
<MaliRemorker>actually, the pipeline is more Guile ---> Fortran ---> Python (for plotting) /R (for data analysis)
<ArneBab>ah, that makes sense
<MaliRemorker>i precompute some data in Guile
<ArneBab>I have some Guile code where I actually open a pipe to python and then just write inline-python code (but that’s pretty evil and bad for testability)
<MaliRemorker>hahaha i used to do this with gnuplot
<ArneBab>it does work as long as there’s not too much data
<ArneBab>but falls far short of having an actual plotting framework
<MaliRemorker>exactly what i discovered
<MaliRemorker>pipes are somewhat touchy
<MaliRemorker>or used to be
<MaliRemorker>didn't wingo produce some kind of plotting framework for Guile?
<ArneBab>they worked pretty well for me, but writing code in strings to pass to another language becomes tedious :)
<ArneBab>I only saw the small jpeg-creation stuff
<wingo>i have something that works for me yeah
<MaliRemorker>pyplot work for me although i don't like the structure of it
<wingo>was on gitorious fml
<ArneBab>wingo: is there a reason why it is not in ice-9?
<wingo>b/c it uses cairo
<wingo>hopefully with potluck we will reduce the pressure to move things to ice-9
<wingo>also it is good enough for me but i don't want to support it
<ArneBab>I think that ice-9 will be useful nontheless: To canonicalize those things which have found wide usage and are mostly stable
<MaliRemorker>ArneBab: and to split out the non-portable featuers
<ArneBab>ah, yes. So we have something developers can rely on wherever they have Guile.
<MaliRemorker>it's not like i'm using 20 different Scheme implementations, though :)
<ArneBab>do you mean portability between Schemes or portability between platforms?
<manumanumanu>potluck?
<ArneBab>potluck: https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00250.html
<ArneBab>MaliRemorker: I just stumbled over this — might provide what you want for documentation: http://wingolog.org/projects/guile-present/
<ArneBab>releases: http://wingolog.org/pub/guile-present/
<ArneBab>wingo: could this be useful for Guile (eliminating intermediate lists)? http://homepages.inf.ed.ac.uk/wadler/papers/deforest/deforest.ps.gz
<wingo>deforestation is rarely an option in scheme i think b/c continuations
<wingo>i think we should adopt something like racket's iteration facilities
<ArneBab>are these similar to C++ or Python iterators? (generating new values to be accessed via next()?)
<MaliRemorker>ArneBab: dont you have lazy evaluation for that?
<ArneBab>MaliRemorker: the deforestation paper discusses that as less efficient
<MaliRemorker>use Fortran! :-P
<ArneBab>MaliRemorker: I do that for some things. But I decided to go for Guile because that gives me another quality of freedom as programmer.
<MaliRemorker>True
<ArneBab>MaliRemorker: here’s an example: https://fosdem.org/2017/schedule/event/naturalscriptwritingguile/
<ArneBab>it’s almost unreal where we can go with Guile
<MaliRemorker>if fortran standard writers would focus on actual computational tasks, instead of adding antifeatures like OOP i'd be a happier sci-software engineer
<ArneBab>what’s missing in the computational tasks?
<Petit_Dejeuner>threading and async?
<Petit_Dejeuner>fixed point floating point stuff?
<MaliRemorker>Petit_Dejeuner: just give me a default real and complex :)
<MaliRemorker>precisely what was thrown out from the last discussed standard :-P
<nalaginrut>oh, it's good for the matrix
<nikita1>nalaginrut: concerning Artanis, what do you think about abstraction on top of epoll/kqueue?
<nalaginrut>I think it only uses epoll-wait and epoll-ctl, this could be easy to abstract
<nalaginrut>nikita1: ^^
<nalaginrut>nikita1: are you asking for a proper abstract name?
<nalaginrut>nikita1: but in BSD, I think there's no SO_REUSEPORT, so maybe Artanis can only run in single cpu
<nikita1>nalaginrut: At least FreeBSD 11.0 has SO_REUSEPORT
<nikita1>nalaginrut: I'm asking about proper abstract module which should cover epoll/kqueue difference
<nikita1>(with abstract names of such methods)
<nikita1>f.e. in kqueue there is one method for subscribing/consuming of revents.
<nikita1>concerning SO_REUSEPORT it may behave somehow differenty than on Linux - I've not tested it yet.
<roelj>I'm writing a C lbirary for Guile, and I have the following C function: http://paste.lisp.org/+7E8G
<roelj>Which, when I call it from a Guile prompt causes a segmentation failt.
<roelj>fault*
<roelj>Is there something obvious I am missing?
<roelj>Probably the SCM list = NULL.. right?
<OrangeShark>roelj: looks like it suppose to be SCM_EOL? https://www.gnu.org/software/guile/manual/html_node/Immediate-objects.html#Immediate-objects
<roelj>OrangeShark: Thanks a lot! I was looking for this part of the manual, but only found SCM_UNDEFINED somewhere else in the manual.
<roelj>It is SCM_EOL I need indeed.
<paroneayea>hey davexunit
<paroneayea>davexunit: where's that screenshot you took of the tons of particles bopping around in chickadee?
***tolja_ is now known as tolja
<davexunit>paroneayea: hmm I'll look for it
<davexunit>paroneayea: this? https://files.dthompson.us/random/shmup-test.gif
<paroneayea>davexunit: that may have been it
<davexunit>paroneayea: here's another one with a more impressive number of bullets https://files.dthompson.us/random/shmup-test5.gif
<loko1>guile question: how to use C procedures that take pointer to int variable and set the variable to some value with FFI? Only way i can see from documentation is to create one element struct and parse it after calling into C
<dsmith>Hey hey
<avoine>spk121: thanks for the code
<avoine>spk121: I naively tried (display (list->string '(#\\esc #\\[ #\\D)) %guile-ncurses-shell-write-port) ; cursor left, without success
<spk121>avoine: #\\esc #\\[ #\\D isn't an xterm sequence, as far as I can tell
<spk121>avoine: 'man terminfo' says cursor_left is cub1. 'infocmp xterm' says cub1 is ^H
<spk121>avoine: perhaps you mean "#\\esc #\\D" which is another way of saying cursor_left from VT52
<loko1>to answer my own question: bytevectors are used for that
<spk121>avoine: oh, maybe that does work. This guile one-liner works.
<spk121>guile -c "(display (string-append \\"hello\\" (list->string '(#\\esc #\\[ #\\D)) \\"world\\n\\"))"
<avoine>spk121: I tought it could be because I'm not in raw mode
<avoine>spk121: I think I got it to work with (setupterm) and sending command to (current-output-port)
<spk121>avoine: that's clever. I'll look into why writing to the write port doesn't work as expected, when I have a chance.
<saikyun>hello, how do I get atan2 in guile? I find it here, but not how to import it: https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Primitive-Numerics.html
<saikyun>I see that it is for an old version, has it been moved to a library?
<spk121>avoine: also, note that, without entering ncurses mode, you can always use 'tiget' to look up those escape sequences instead of writing them by hand.
<spk121> (display (string-append "hello " (tiget "bold") "world" (tiget "sgr0") "\\n"))
<avoine>spk121: I'm pretty sure it is because ncurses put the terminal in smcup mode (enter_ca_mode) cursor-positioning mode
<avoine>spk121: cool1
<dsmith>saikyun: Note that guile's atan takes an optional second argument.
<dsmith>sneek: guile help atan
<sneek>`atan' is a procedure in the (guile) module.
<sneek>- Scheme Procedure: atan z [y]
<sneek> With one argument, compute the arc tangent of Z. If Y is present,
<sneek> compute the arc tangent of Z/Y, using the sign of Z and Y to
<sneek> determine the quadrant.
<saikyun>yeah, but it's kind of messy when y is 0
<saikyun>or ohh
<saikyun>sorry, didn't see what you wrote first. thank you!
<dsmith>saikyun: np
<amz3`>io #guile
<amz3`>paroneayea: I can not reply on the mailling list because my mobile has eaten the mail...
<amz3`>anyway, fwiw, I think one should use ? for anything boolean
<OrangeShark>hi amz3
<amz3`>hi OrangeShark
<wingo>good evening
<amz3`>peace!
***ertesx is now known as ertes