IRC channel logs


back to list of logs

<sapientech>hi all, figured out how to do what i asked above! im going to implement it now, but there are two distinct styles, one using (with-syntax ...
<sapientech>and another, more lisp macro styled quasisyntax route with (let (( ...)) #` ... #,...))) stuff
<sapientech>i assume with-syntax is more standard nowaday?
<sapientech>the guile manual is pretty great btw :)
<nalaginrut>morning guilers~
<janneke>morning nalaginrut!
***darthlukan_ is now known as darthlukan
***Fuuzetsu_ is now known as Fuuzetsu
***fitzgen_ is now known as fitzgen
***hatfolk is now known as tenq
***tenq is now known as hatfolk
***DeeEff_ is now known as DeeEff
***amz31 is now known as amz3
***profan_ is now known as profan
<paroneayea>hello, *!
<paroneayea>I'm in London.
<paroneayea>I'm also #x20 years old today :)
<davexunit>paroneayea: happy birthday!
<paroneayea>thanks davexunit :)
<OrangeShark>Happy birthday paroneayea! Enjoy London!
<paroneayea>thanks OrangeShark :)
<iyzsong>paroneayea: wow, happy birthday!
<paroneayea>thanks iyzsong :)
<paroneayea>btw, if anyone wants to give me a birthday present, to get to the next stage, our federation standard needs external review :)
<paroneayea>you can file issues on the linked issue tracker (at the top of the document) or email me at cwebber AT dustycloud DOT org... if you email me, please put "ActivityPub" in the subject, and be aware I'll be posting it publicly on the wiki :)
<paroneayea>davexunit: rekado: I wonder if you two have thought much about url pattern matching
<paroneayea>currently I do ice-9 match, which is stellar for matching
<paroneayea>but it would be nice if I could do something where I could also *generate* urls from the same patterns I match from
<paroneayea>this isn't important now, it's just on my mind
<paroneayea>I like the non-stringly-typed aspects of ice-9 match
<paroneayea>but it lacks a good constructor side.
<davexunit>paroneayea: well, pattern matching is just that: matching
<davexunit>so I don't find it lacking anything
<davexunit>I think that URL routing deserves its own language
<davexunit>and the pattern matcher would be an implementation detail
<davexunit>paroneayea: have you seen the url matcher for 'guix publish'?
<OrangeShark>paroneayea: check out miniKanren from the Reasoned Schemer. I remember watching a video where you can use it to generate things that match the patterns. I think the example I saw was generating programs that matched the pattern.
<amz3`>hélllo #guile :)
<janneke`>hi amz3`!
<amz3`>kuddoz janneke` for you last release
<amz3`>I am not sure I understand why you need to create a vm
<amz3`>is it because to have LALR parser it's easier?
<amz3`>janneke`: ^
<janneke`>amz3: virtual machine + bytecode should solve performance issues...
<janneke`>one minute to compile hello world is dramatic ;-)
<janneke`>but possibly my interpreter does something really stupid and i can avoid a vm
<amz3`>ah yes, there is 1 minute delay
<janneke`>and i tried moving quasiquote out from C into works but becomes much much slower again...something's not good
<amz3`>at the same time, you need to compile gcc only twice...
<amz3`>it may be ok to be slow?
<amz3`>I mean the first time you compile gcc with mes and the recompile gcc using gcc
<amz3`>and then* recompile
<janneke`>yes...i'm even hoping to compile tiny-c and use that to compile gcc
<janneke`>gcc is quite a beast
<amz3`>yes I imagine... I did not know about tiny-c
<amz3`>janneke`: since you know about match
<amz3`>janneke`: are you familiar with url routing?
<janneke`>possibly...but not exactly with that name for it...
<janneke`>and not sure what the relation with match could be...
<janneke`>ACTION could have said: no, what is url routing amz3?
<amz3`>sorry I was disconnected
***zetavolt is now known as zv
<amz3`>what the difference between a fluid and paramter?
<janneke>aiui fluid is thread-local-storage and parameterers are standardized interface implented on top of that
<amz3`>ah ok thx I wasn't sure they were related
<amz3`>here is talk about racket for clojurian
<amz3`>here is talk about racket for clojurian
<janneke>amz3 i was disconnected too...not sure about your question about match
<janneke>match is `just a very convenient way' of writing if or cond
<amz3`>In it used in the context of url dispatch in place of regex
<amz3`>for instancec you can reverse a regex, given a regex you can precompute a string to submit to format to generate a given url with parameters
<amz3`>so the same "template" is used to generate and recognize urls
<amz3`>in the case of regex based url dispatching, the "template" is a regex
<amz3`>since in guile I'm using 'match' I'd like to do the same with 'match' patterns
<amz3`>does it make sens?
<janneke>dynamic matching? yes, that could make sense
<amz3`>I'm not sure what dynamic would mean in this context
<amz3`>maybe paroneayea can chime in magically
<janneke>i meant to reflect your words: you match using regexp'ses that you generate
<amz3`>in a pure regex based url router, regex don't have to be generated
<amz3`>that the template for the equivalent of format (eg. print) that is generated
<amz3`>one can parse a regex, to generate a format string so that you generate urls for the urls matched by the regex
<amz3`>in 'match' terms it could be translated as follow:
<amz3`>(match path-components (("path" "to" "ressource" uid) (handle-path-to-ressource uid)))
<amz3`>one could parse '("path" "to" "ressource" uid) to generate the following procedure
<amz3`>(define (link-to-path-to-ressource uid) (format #f "/path/to/ressource/~a" uid)))
<amz3`>so that when you want to link, to "/path/to/ressource/~a" you have to call `link-otpath-to-ressource' instead of "hardcoding" the url path...
<amz3`>it introduce a level of indirection
<amz3`>now I recall that I'm not very fond of this level of indirection
<amz3`>I never encountered the case where it makes sens, that said a lot of web framework do it
<amz3`>s/it makes sens/it's useful/
<amz3`>IIRC django does even better/worse, they use a one deep namespace to split the urls
<amz3`>the django 'reverse-url' procedure takes two arguments 'app' and 'url-name' so the above 'link-to-path-to-ressource' is called by some '(reverse-url "some-app" "some-url-name")'
<amz3`>because regex (hence urls) are associated with both an app and url name...
<amz3`>then I remember something useful about that
<amz3`>in Django there is a concept of "app" which is basically a bunch of urls with backend code
<amz3`>one can hook a set of urls for an "app" multiple times in multiple places... so actually it makes sens to have that indirection
<amz3`>because of this "app" concept which leads to generic libraries, a given generic "app" can link to another "app" without knowing where is hooked
<amz3`>s/generic libraries/generic app/
<amz3`>where it is hooked in the url hierarchy only by using (reverse-url "some-app" "some-url-name-aka-some-view")
<amz3`>this is revelant Django doc:
<amz3`>(you can actually hook a given generic app (if it's correctly written) multiple times, an example is the django administration)