IRC channel logs

2016-09-11.log

back to list of logs

<amz3>ijp: is the javascript runtime an implementation of vm primitives?
<ijp>basically
<ijp>plus most of boot-9
<ijp>I got as far as the module system
<amz3>ijp: did you implement source maps?
<ijp>I did not
<amz3>then that's what I will do tomorrow
<amz3>I mean at least port the mozilla library to guile to generate source map files
<amz3>how do you execute guile compiled from git in place?
<amz3>do you provide --prefix=/path/to/git/meta/ to configure?
<amz3>wingo: how cps does help to compile to javascript?
<amz3>what's the advantage of using cps output instead of raw scheme?
<ijp>the same way it helps compiling to whatever we're using for the lowest level now, rtl or whatever
<amz3>rtl? right-to-left?
<ijp>the most important properties of cps are that *all* results of computations are named and all control flow is made explicit
<ijp>I think it's supposed to be register transfer language, but my guile internals knowledge is about a year out of date
<ijp>also by this point it's been through a bunch of translations designed to simplify the code anyway. All macros are expanded, letrec gets fixed, peval gets run, etc.
<amz3>ah yes you are correct
<amz3>I was missing that
<ijp>going straight from scheme would be a waste of time when we already have this nice architecture
<ijp>cps was the right level to hook into
<amz3>I understand now
<ijp>it contained enough of the high level features to make translation straightforward
<ijp>I've spent a lot of time thinking about this :)
<amz3>the issue I have will reading some debug output of cps, is that there is *a lot* of kargs for 2 scheme statments
<paroneayea>for those curious about my Pubstrate hacking, here's a little blogpost https://identi.ca/cwebber/note/z5wCQEArRE63Wk6LS9Z5Sg
<ijp>amz3: yes, that's why I implemented the inliner
<ijp>wait, nvm, wrong thing
<paroneayea>ijp: I guess a transformation from CPS to ASM would probably also be possible? except that doing an FFI to JS might be hard, as would having to deal with no "freebie" garbage collection
<paroneayea>ijp: I'm still very interested in your guile->js work! :)
<paroneayea>er
<paroneayea>s/ASM/webassembly/
<ijp>I so no reason why it wouldn't
<ijp>see
<ijp>ffi to js can probably be accomplished by a special purpose module similar to (system foreign) [presumably (system foreign js)]
<ijp>a special syntax for inlined js would be even more interesting, but that requires a lot more thought
<amz3>it seems like every cps should not be a javascript function
<amz3>it seems like cps output must be interpreted somehow
<ijp>ideally you don't add any extra functions
<ijp>right now, I think I add them for argument parsing, and join points for conditionals
<ijp>and obviously the wrapper for the module
<amz3>here the debug output I have http://hastebin.com/akapuxucec.scheme
<ijp>straight from cps?
<ijp>then that's fine
<ijp>continuations are kept separate from functions proper, so you can eliminate them later once you've done all your translations
<ijp>e.g. you'd never want to emit functions for 8, that's just setting a variable to a constant
<ijp>and 11 is just the tail continuation for the module
<ijp>assuming I can still read (language cps)
<ijp>I don't have a version of guile built with js to show you the real output right now, but here is an example from last year http://shift-reset.com/pastes/merge.html / http://shift-reset.com/pastes/mergesort_new_inliner.html
<ijp>you can see that for decent stretches, it's just one function call after another in a row
<amz3>TBH, this looks very complex to me right now
<amz3>I took the time to decypher cps code i pasted
<amz3>I think I get it
<ijp>well, you are looking at the sixth or so translation level from scheme
<amz3>but the flow of the program is different from scheme
<amz3>yeah
<mark_weaver>amz3: to run 'guile' directly from a built source tree, run ./meta/guile
<mark_weaver>the value of prefix doesn't matter, and it needn't be installed
<amz3>mark_weaver: it's guild that I want to run
<ijp>the current cps representation is weird because it's not nested like the previous one. wingo has his reasons, but it makes reading something of an experience
<ijp>like reading the matrix of a graph rather than its picture
<mark_weaver>amz3: then ./meta/uninstalled-env guild ...
<amz3>thx mark
<mark_weaver>np!
<ijp>and of course all the names are numbers
<amz3>yes, but they have a debug name tho
<amz3>the strange thing kind of, is that the evaluation of term is passed to the next call
<mark_weaver>it would probably be useful to have something that presented the cps in a nicer form for humans to read
<amz3>next cps*
<ijp>it should be possible to get something like the previous version without too much work
<amz3>except cps 4, where there is 'primcall define!' as term which pass nothing to continuation
<amz3>also I was looking for `free' calls, I assume that GC does the right thing
<amz3>it seems to me that the debug output from the paste should be read as somekind of big `compose'
<amz3>does the old output of cps look like this :http://git.savannah.gnu.org/cgit/guile.git/tree/doc/ref/compiler.texi?h=v2.1.3&id=3bea4c6970775e33a8fd2d316a6e597343e4a3c4#n586
<amz3>meh that fat link doesn't work in my irc client
<amz3>ttp://hastebin.com/cafexazuca.scheme
<amz3> http://hastebin.com/cafexazuca.scheme
<ijp>and still it doesn't work in my firefox
<amz3> http://paste.debian.net/816296/
<ijp>but yeah, there was a klet that let you nest
<amz3>klet?
<ijp>just what the 'let' was called
<amz3>ok
<amz3>ACTION goes to bed
<ijp>night
<mark_weaver>sleep well, amz3!
<spauldo>"hey, why don't I make an <angle> class to store angles? I can do automatic conversions!"
<spauldo><900 define-methods later>
<spauldo>there's gotta be a better way
<spauldo>so, would it be considered poor style to use a macro to convert something like (add-binary-operator '+) to three define-method calls (for two angles, angle then number, and number then angle)?
<spauldo>probably more like (add-binary-operator '+ <angle> <number>)
<AppAraat>hello everyone. I'm not sure where I should report this, but it looks like the <acronym> tags aren't working in this doc - https://www.gnu.org/software/guile/manual/html_node/Guile-and-Scheme.html#Guile-and-Scheme
<AppAraat>I tried it on Chromium Version 52.0.2743.116 as well as FF 48
<guile-guest4>hello, where can i get the manual from latest snapshot build ?
<spauldo>guile-guest4: http://git.savannah.gnu.org/cgit/guile.git/tree/doc
<spauldo>although it'd probably be easier to just download the latest tree and build it
<spauldo>it might be other places too, I dunno
<guile-guest4>spauldo: i'm looking at https://www.gnu.org/software/guile/download/
<guile-guest4>there is snapshot section for dev branch
<guile-guest4>I click on it it keep telling 404 not found
<spauldo>ah, OK. I have no idea who manages that, sorry. Someone else on here probably does.
<guile-guest4>spauldo: thanks for helping, i'm looking for alternative before I have to build it myself
<spauldo>you'd have better luck at a different time. It's pretty dead in here right now.
<WojciechK>guile-guest4: you don't have to build everything. 'make info' shoud do it
<guile-guest4>WojciechK: thanks, I did a successful build, manual didn't mention have to run autogen.sh
<mark_weaver>you only have to run autogen.sh when building from a git checkout. the source tarballs include the outputs of that step.
<mark_weaver>see the file HACKING in the source for developer information, including how to build from git
<mark_weaver>guile-guest4: ^^
<mark_weaver>thanks for letting us know that those snapshot tarballs report 404. strange.
<amz3>héllo
<amz3>This was posted on HN today: http://readscheme.org/
<amz3>so I ported my small search engine to the graphdb
<amz3>but I think I will leave it alone some time, as concept search is fuzzy concept and I'm not sure what I should be doing
<amz3>I added a comment to concept search wikipedia saying it's science fiction :p
<amz3>I spammed a few mailling list
<amz3>and IRC
<amz3>and I have only two articles to read
<amz3>I should probably read them
<amz3>the most interesting article about the subject is US patent https://www.google.com/patents/US6675159 :(
<quigonjinn>In which path does dynamic-link look for libraries?
<quigonjinn>Documentation only mentions /usr/lib and /usr/local/lib, but no environmental variable.
<mark_weaver>quigonjinn: guile uses libltdl to dynamically load shared libraries. it searches some hardcoded paths based on the system, and also searches in the entries of LTDL_LIBRARY_PATH
<mark_weaver>or, you can provide an absolute file name to 'dynamic-link'
<quigonjinn>mark_weaver: thanks, exporting LTDL_LIBRARY_PATH worked. I had been trying with LIBRARY_PATH.
<mark_weaver>LIBRARY_PATH is consulted by the linker, when linking programs
<quigonjinn>good to know
<mark_weaver>LD_LIBRARY_PATH is consulted by the dynamic linker at run-time.
<paroneayea>amz3: it' snot a good idea to link publicly to software patents... your liability, in the US at least, is increased with higher awareness
<paroneayea>just fyi
<paroneayea>ACTION didn't look at what the patent was specifically for
<amz3>I don't like to lie
<amz3>thx anyway
***heroux_ is now known as heroux
<paroneayea>amz3: it's not an issue of lying, it's an issue of exposing others to information about what patents exist :)
<amz3>hmmm, so if they are aware a patent exists they won't work in the field?
<amz3>hmmm, so if they are aware a patent exists they won't work *on the subject*?
<amz3>paroneayea: there is basically patents about everything, I'm not sure it's wise to avoid reading about patents, since even if you are now aware you infringe a patent your are still liable for knowing, no?
<amz3>you still need to know
<janneke>amz3: do some reading on the subject. it may not be wise to discuss it here.
<amz3>oh
<paroneayea>amz3: yeah, I don't want to discuss it further.
<paroneayea>amz3: but the advice I'm giving you is the general advice given by many who know much better about the legal situation of patents than I do, even
<amz3>ah ok
<paroneayea>software patents are a strange thing. In many places, knowledge is power. When it comes to software patents, knowledge is more dangerous.
<paroneayea>at least in the united states.
<amz3>oh!
<amz3>seems like a complicated thing
<davexunit>I found a super useless patent the other day. not software related, but supremely stupid.
<amz3>thsorry
<amz3>sorry
<paroneayea>amz3: it's okay. it's confusing stuff!
<paroneayea>amz3: a bit outdated, but https://www.softwarefreedom.org/podcast/2009/apr/28/0x0C/ I think was pretty good for an intro to concepts
<paroneayea>anyway
<paroneayea>back to standards stuff...
<drichards>I've been trying to get guile to build for 2 days now, I hope it's worth it
<amz3>drichards: are you building from master or a release tarball?
<drichards>latest release
<amz3>drichards: what error do you have?
<davexunit>programming microcontrollers in C has made me yearn for a Guile DSL that compiles to the AVR instruction set.
<davexunit>microscheme seems neat but ultimately unsatisfying.
<joolean>Hey Guilers! I'm playing around with Guile's ECMAscript implementation in 2.0.12, and I notice that when I do `new Object();' I get `ERROR: unrecognized tree-il ((toplevel Object))'. I've traced it as far as I think I'm able - that seems to be a form that `parse-tree-il' should understand. Any ideas?