IRC channel logs


back to list of logs

***adhoc is now known as adhop
***adhoc_ is now known as adhoc
<ArneBab_>I run into problems with guile 2.0.11 and (www http)
<ArneBab_>(use-modules (www http) (www url)) (http:request 'GET (url:parse ""))
<ArneBab_>www/crlf:11:198: In procedure read-headers/get-body:
<ArneBab_>www/crlf:11:198: Throw to key `vm-error' with args `(vm-run "Too few values returned to continuation" ())'.
<ArneBab_>here’s a paste:
<ArneBab_>how can I fix that?
<ArneBab_>better use this?
<ArneBab_>does not work either: http redirects to https and https fails:
<civodul>Hello Guilers!
<ArneBab_>moin civodul!
***wleslie is now known as verte
***verte is now known as verte-{ncytea}
***verte-{ncytea} is now known as verte-{nyctea}
<nalaginrut>(integer? 12312312312313221.3) ==> #t
<nalaginrut>(integer? 1.2) ==> #f
<nalaginrut>interesting, the same result in Racket
<nalaginrut>maybe I miss something?
<mark_weaver>nalaginrut: the 0.3 portion of 12312312312313221.3 is lost when it's converted to floating-point, and then it's an integer in the sense that floor(x) == x
<mark_weaver>12312312312313221.3 => 12312312312313222.0
<nalaginrut>mark_weaver: I found it happens when it's larger than 16bit integer
<nalaginrut>hmm...16 bit is misguiding here...
<mark_weaver>heh, yeah
<nalaginrut>mark_weaver: what's the maximum number not overflow?
<nalaginrut>in such case
<nalaginrut>I mean the upper limit
<mark_weaver>IEEE doubles have 52 bits of precision. (- (expt 2 53) 1) is the largest odd integer that can be represented.
<nalaginrut>mark_weaver: thanks for the explain! ;-)
***verte-{nyctea} is now known as wleslie
<mark_weaver>hi civodul!
<mark_weaver>civodul: btw, the workaround I suggested on the ML for running Guix on top of another system is to leave LOCPATH unset and make /run/current-system/locale a symlink to glibc-2.22 locales.
<mark_weaver>oops, wrong channel
<davexunit>ACTION reads wingo's CPS docs
<davexunit>interesting stuff
<davexunit>very cool to have a compiler implemented in Scheme that can use (ice-9 match) and such.
<davexunit>really interesting Sussman lecture from 2004 entitled "Legacy of Computers"
<amz3>ACTION published the first article of serie that aims at mocking a search engine
<davexunit>the classic mechanics stuff is over my head, but it's also not really the point of the lecture.
<amz3>feedback welcome :)
<davexunit>amz3: neat :)
<amz3>davexunit: it use haunt ;)
<amz3>I should add it to the footer
<davexunit>oh really? cool!
<amz3>I'm using a javascript program to highlight code
<amz3>the thing is that scheme was added a few pecks after I download the thing, I'm too lazy to update x)
<amz3>and I use a markdown parser that've written based on my combinator library. I considered using your combinator library but I need to better understand how it works
<davexunit>amz3: is that markdown parser written in Scheme?
<amz3>I'll probably study it closely when I will implement gremlin graph traversal language which is a combinator library
<amz3>both combinator library yours and mine look a like, except the lift procedure
<amz3>and the related return proc
<amz3>I watched the "monad gonad" presentation of crockforg (I think) which explains that jQuery use a monad aka. the ajax monad
<amz3>and gremlin use a similar pattern, channing methods to execute the traversal
<amz3>and you can also nest "methods" to match patterns before "consuming" the stream
<amz3>the difference between gremlin and parser combinators is that the latter operate on linear datastructure aka. streams, gremlin operate on graphical datastructure, so the "consume next token" is also part of the user API since it's not obvious which is the next element to consider in a graph
<amz3>Also Marko Rodriguez, gremlin creator, insist in calling gremlin functional or at least declarative but IMO it's not
<amz3>instead of having something similar to the parser combinator `many`, they use a 'loop' method which is actually a goto e.g.'MY-LOOP-START').edge('rating').out_vertices.loop('MY-LOOP-START')
<amz3>tl;dr: it try hard to create a turing complete language using chained methods and passing function as argument
<amz3>it manage it's own "virtual machine" with variable and stuff
<davexunit>haven't heard of gremlin before
<amz3>if you are interested by the subject this dense article explain the state of the art of gremlin stack
<amz3>davexunit: in graph world there is 2 query API: neo4j cypher which is some kind of SQL+pattern matching
<davexunit>thanks for the links
<amz3>and Gremlin language which has it's roots in functional programming and the nothing of composing steps of operations to *walk* the graph
<amz3>s/the nothing of//
<amz3>it's *dense*
<amz3>it's written as fictional history of gremlin people...
<amz3>There is also Arango Query Language which is also SQL based but focus multi-model database model which basicly states that all data stuffs should be in a single ACID database
<ArneBab_>amz3: reading your article: won’t reading the full file into a string kill your memory if the file is a bit too big?
<ArneBab_>(though that might not matter for files you actually want to index…)
<ArneBab_>amz3: the more I look at your text, the more I love the background :)
<amz3>lazyness in scheme is something that remains to be explored
<mark_weaver>amz3: why do you say that? Scheme has had 'delay' and 'force' for a very long time, and SICP includes a lot of material on using lazy streams, and a section on how to modify its meta-circular interpreter to be lazy by default.
<zacts>do any of you guys know if there is a guile interface into the processing programming language?
<davexunit>maybe he means that he hasn't yet explored laziness in Scheme.
<davexunit>zacts: no.
<davexunit>nothing that I know of.
<zacts>ah ok
<davexunit>I've looked at Processing before, it's the language used in the Arduino IDE for writing programs that compile to firmware that can run on the devices
<davexunit>it's your typical imperative programming language.
<zacts>I think its for artistic visual code poetry
<davexunit>it doesn't read like poetry.
<davexunit>it's too C/Java like.
<zacts>well of course
<zacts>but I think its for visual processing
<zacts>the tutorials section has better pictures
<zacts>although, for exploratory programming I think imperative may be cool
<davexunit>something akin to SICP's picture language would provide a much nicer environment
<zacts>but I don't know
<davexunit>like Racket's pict2d stuff
<zacts>ah yeah? :-)
<zacts>oh how is your 2d game library?
<davexunit>it does 3d, too. :)
<zacts>oh really? O_O that sounds awesome!
<davexunit>it's going okay, I recently commited my first stab at "render combinators", a functional approach to building rendering routines
<zacts>oh nice
<davexunit>(which hides the hideous imperative code that is involved with writing OpenGL applications)
<davexunit>it's much more low-level than SICP's picture language, but it could serve as the foundation for such a language.
<zacts>so, how do you interface into imperative code libraries in a functional style program?
<davexunit>here's an example of the simplest sly program, which draws a sprite (2d image) to the center of the application window:
<davexunit>zacts: it's a matter of establishing two layers of abstraction: the low-level imperative one, and the the high-level functional one.
<zacts>ah ok, but how do you keep the layers separate, and how do they communicate with each other? via an API?
<davexunit>in Sly, procedures like 'with-camera', 'move', and 'render-sprite' do not draw to the screen
<davexunit>they return procedures that draw to the screen when called.
<davexunit>so with this technique, the act of composing drawing routines is separated from the act of actually drawing the scene.
<davexunit>as the user, you hand off such a procedure to the game engine and it will draw for you.
<davexunit>does that make sense?
<davexunit>my drawing language isn't as pretty and concise as the SICP picture language because there's a lot of OpenGL state that can be tweaked, and I provide access to as much as possible.
<zacts>I think it does make sense to me a bit
<davexunit>so there's a large number of primitive operations.
<paroneayea>is there an instance of sirgazil's guile logo that's a non-png version?
<paroneayea>eg, svg :)
<paroneayea>I want to use it in my talk without the background
<davexunit>paroneayea: check his bitbucket
<paroneayea>davexunit: good call
<davexunit>zacts: I could demonstrate the same type of system using, say, writing text to a file, which might provide a simpler example.
<paroneayea>don't see it there... oh well, I'll just leave the background on the svg
<davexunit>paroneayea: bummer
<zacts>davexunit: cool
<zacts>you don't have to go into full detail now
<zacts>but, I definitely may want to focus on your sly more seriously as something to do some projects with
<zacts>and to just play around with
<davexunit>cool :)
<zacts>but I'm still learning scheme and SICP concepts
<davexunit>Sly is fun once you get it running
<zacts>but I often have found in the past that games or things that are ultra creative have helped me to learn abstract concepts
<davexunit>yeah, games or other visuals are helpful
<davexunit>racket's introductory tutorial uses their picture language and I think that's just awesome
<davexunit>would love to have an equivalent for Guile
<zacts>oh I should try that one
<amz3>talking about declarative code, I was amazed by
<zacts>oh that's really neat though amz3
<zacts>amz3: can it translate between various programming languages?
<zacts>or is it just pure codegen?
<zacts>I was kind of inspired by emacs org-mode and babel, along with pandoc, in terms of source to source code translation
<amz3>I don't remember. The ideal of Model Programming is very interesting which boils down to "build the high enough abstractions to make you work on the long run easier"
<amz3>I think zeromq is an incarnation of that goal, a set of composable high level network pattern that allow to create distributed software written in multiple languages
<davexunit>has anyone seen/written a number system in scheme that attaches units to quantities?
<davexunit>I thought it might be a fun toy project to poke at
<mark_weaver>I vaguely remember seeing such a thing somewhere
<mark_weaver>but I'm not sure
<mark_weaver>slib maybe?
<davexunit>I'll take a look
<davexunit>wow there's a lot of stuff in slib
<mark_weaver>davexunit: check the commutative rings module
<davexunit>mark_weaver: thanks!
<davexunit>will do
<davexunit>gotta run!
<ft> — Guile gets a small mention.