<sneek>I've been running for one minute and 1 second <sneek>This system has been up 6 hours, 44 minutes <Izem>what does the argument look like in guile for `build-uri scheme [#:userinfo=â#fâ] [#:host=â#fâ] ...` ? Is it like (build-uri #:userinfo='http ...) or (build-uri 'http ...)? <Izem>Ah, it is like (build-uri 'http #:userinfo foo ...), the arguments with # are like labels. <flatwhatson>any kind of "foo=bar" syntax would be quite unusual in scheme, atoms are always separated by spaces <drakonis>leoprikler: maybe by extending a language to include some measure of a escape hatch back into guile to embed code from other langs into it? <drakonis>while guile itself can access these implementations, the same might not hold true <drakonis>but the overarching goal would be to have all manners of langs to have interop <drakonis>call out to a shell lang within guile that isnt a scheme dsl <flatwhatson>guile.eval_language("javascript", "console.log(\"hello world\")") <flatwhatson>guile.eval_language("python", "print(\"hello world\")") <flatwhatson>the guile library would be hand-crafted for each language, so it could take advantage of any special syntax features <flatwhatson>the next step after cross-language eval would be the ability to transfer objects/values, that's much harder <drakonis>i was thinking about doing this within the scope of the guile runtime and any langs implemented in it <drakonis>ie: a lang that's built for parsing a text format like yaml and toml that will output the data in s-exps that can be converted to another lang's data structures <flatwhatson>can we rely on strings, integers, hash-tables, records, etc. also being represented cleanly by guile's native types? <flatwhatson>i imagine there might be some conversion needed for accurate implementation of some languages <flatwhatson>vector seems like the lowest-hanging-fruit of cross-language-compatible datastructures <mwette>i stopped working on all this to understand how objects could be implemented cross-language; I now sort-of understand how glib implements gobject; note nyacc has nx-mlang (matlab), nx-javascript, nx-tcl <dsmith>mwette: !! You have matlab, javascript, and tcl in/on Guile? <drakonis>being able to do interop with those langs is important <mwette>nothing is complete; just exploring concepts <mwette>but javascript control structures are there ; just not objects <flatwhatson>javascript objects are a good example where we don't have a neat mapping to a scheme type <flatwhatson>they're not just hashes, you need to be able to traverse the prototype tree <flatwhatson>would they show as #<javascript-object ...> in the repl, and have their own API? <mwette>"nx-" means both "nyacc extension" and "not exactly"; I'm willing to violate lanauge semantics to get things co-operative <dsmith>So a half way thing: Lang "X" syntax but really Scheme. Worst of both I guess. End up losing the benefits of Scheme syntax. And have something that *looks* like "X" but really behaves nothing like it. <mwette>use case is application where you want to let users have options on language for writing extension functions <leoprikler>I think in general something like Elisp's @ works most of the time, except when it comes to macros <leoprikler>where you then have to arrange to (funcall (@ (guile) eval) quoted-guile-code module) <leoprikler>I already like the first paragraph, given that my MT also touched on FFIs <civodul>at first sight it sounds like the original Guile vision <wingo>in a way yeah ;) relies quite heavily on tracing for good perf, of course <apapsch>hello guilers! what is the correct way to reference a datadir file in a guile module? I have a config.scm.in file with (define-public %datadir @datarootdir@) though @datarootdir@ gets expanded to $prefix/share *civodul wonders whether people really want to have one foot on one island, and the other foot on another island, to keep with their metaphor <leoprikler>apapsch: you need to resolve @datarootdir@ on your own <apapsch>leoprikler: thanks a lot, that clears things up <flatwhatson>we use bash a lot as a glue language, tying together a bunch of tools in various languages <flatwhatson>people might like to write their guix configs in python or javascript (heaven forbid) ***dsmith is now known as sneek_
***sneek_ is now known as sneek__
***sneek__ is now known as dsmith
***dsmith is now known as smeek__
***smeek__ is now known as dsmith
***smartin1 is now known as smartin
***sneek_ is now known as sneek
***bsima1 is now known as bsima
***apteryx_ is now known as apteryx
<ArneBab>flatwhatson: you mean in guile --language=ecmascript -c 'display(function () { 1 + 2; }());' <ArneBab>What I see as most useful is tto be able to re-use libraries from different languages. <lampilelo>is this a bug? (match 1 ((not 2 3) 'yes) (_ 'no)) => no <lampilelo>this workaround works: (match 1 ((not (or 2 3)) 'yes) (_ 'no)) <RhodiumToad>so the code and the docs disagree (so at least one of them has a bug): <RhodiumToad>the docs say (not pat_1 ... pat_n), but the code supports only (not pat) <cky>Racket's `match` is very different from Guile's `match` (as I well knew from implementing SRFI-41 for Guile) so I wouldn't use Racket as a exemplar of what correct Guile behaviour is. :-) <leoprikler>(not pat_1 ... pat_n) if all pat_1 thru pat_n don't match <lampilelo>i would lean towards a code bug, even though it's harder to fix ;) <RhodiumToad>annoying that it doesn't return a syntax error rather than just silently failing <RhodiumToad>converting it to handle multiple clauses should not be hard <RhodiumToad>right now it's just one syntax rule for (match-two v (not p) g+s (sk ...) fk i) <RhodiumToad>should add two more rules: one for (match-two v (not) g+s (sk ...) fk i) which should probably succeed, <RhodiumToad>and one for (match-two v (not p ...) g+s (sk ...) fk i) which could just punt to (match-two v (not (or p ...)) g+s (sk ...) fk i) to avoid any need to duplicate the "or" logic <RhodiumToad>(not p ...) will match just (not) and treat it as (not (or)) and (or) already does the right thing <RhodiumToad>so I think just adding ((match-two v (not p ...) g+s (sk ...) fk i) (match-two v (not (or p ...)) g+s (sk ...) fk i)) after the existing clause for not should suffice <RhodiumToad>"Unmodified public domain code by Alex Shinn retrieved from the Chibi-Scheme repository, commit 1206:acd808700e91." <lampilelo>hmm... "The @scheme{not} operator succeeds if the given pattern doesn't match.", so the doc in the file does match the code <RhodiumToad>that comment in the file should probably be changed as well