***ijp` is now known as ijp
***janneke1 is now known as janneke
<brendyn>Anyone thought of implementing Clojure ontop of Guile? :P? <ijp>actually, come to think of it, technomancy on #emacs suggested it for after guilemacs becomes mainstream <brendyn>I have been reading about Clojure and it seems people think it is very nifty, and will gain popularity. So atleast from a tactical perspective, if it was ontop of guile too that could get guile some more attention <ijp>in three letters M E H <brendyn>Not particularly excited about it? Do you use scheme andor guile for most of your programming? *DerGuteMoritz started a clojure->chicken compiler but didn't get all that far <DerGuteMoritz>some things already work but notably missing are the proper persistent data structures ;-) <DerGuteMoritz>then there is also a project to reimplement emacs in clojure <brendyn>DerGuteMoritz: can that be translated to clojure->guile or is it somehow very chicken dependant? <brendyn>i hardly know how language implementations even work ;p <lloda>Doesn't Clojure depend on the jvm? does it make sense to have Clojure without all the Java libraries. <DerGuteMoritz>brendyn: it should not be too hard to port to guile, I can give you the address of the repo, just a minute <DerGuteMoritz>lloda: it doesn't depend on the jvm, no. e.g. there is also a clojure->js compiler <brendyn>it just means you wont get all the java stuff. but im interested anyway because it seems to make advances as a language alone <brendyn>DerGuteMoritz: seems pretty crazy to try catch up on 30 years of development from scratch. im keen on guileemacs <DerGuteMoritz>it is a bit of a prototype and shows some evolutionary scars I think <brendyn>i would not notice, im still only a beginner really <brendyn>im wondering if scheme or clojure is a better place to start learning <brendyn>yeah i realise clojure is better than java its self <brendyn>I was a bit concerned though that whein I load up a clojure repl, java uses about 700MiB of ram and gets my fan going <brendyn>i hope actual clojure programs dont have to do that by default? <DerGuteMoritz>that was my main motivation for trying to write chicken-clojure actually :-D <brendyn>i have not looked at chicken, only guile <nalaginrut>you plan to write a clojure front-end? or a java bytecode converter? <DerGuteMoritz>nalaginrut: it's a chicken program that reads clojure code, emits chicken code and then compiles that <DerGuteMoritz>so it's not really a chicken compiler frontend in that sense <brendyn>can you do much with it? seems like the lack of librarys in comparison to something like the jvm is problematic? <DerGuteMoritz>brendyn: oh it actually has quite some libraries, and also interfacing with C libs is easy as chicken TRANSPILES to C <wingo>yes, it's not the easiest thing in the world to set up... the wingolog.org/software/tekuti page has all i know about it though <brendyn>im interested in starting a blog, even if i dont show it to anyone. ive discovered that writing about my ideas as if to an audience helps me develop them <brendyn>so im wondering what software might be good for that <brendyn>haha "... will stop growing, and decline as pieces that are now written in C will be written in Python, in JavaScript, in Guile" <ijp>a lot of people write their own blogging software, I know I did <DerGuteMoritz>which is nice as you don't have to worry too much about operations <DerGuteMoritz>ยง 2 b) We are obliged to give a parenthetic shaving to every yak we encounter. *ijp stopped paying party dues <brendyn>what tools do you use for your blog? <DerGuteMoritz>ah damn it, the documentation still claims that there is no native markdown implementation <brendyn>DerGuteMoritz: cool, so basically you never write html or css directly, but type in scheme all day long? <DerGuteMoritz>except the post contents themselves, I currently write them in svnwiki syntax <brendyn>ill have to figure out how to do this begind nginx <brendyn>would you recommend chicken scheme for someones first experience programming? <DerGuteMoritz>brendyn: there is nothing to be had "behind" nginx, you just dump the compiled site into a document root and have it served <DerGuteMoritz>no, I wouldn't particularly recommend chicken for that purpose <brendyn>i remember wingo did wrote something about serving up http with guile but his blog is too big to find it *DerGuteMoritz starts a hadoop job to search wingo's blog <brendyn>his search engine seems weird. "http" or "html" werent particularly useful <brendyn>which makes sense since those words are probably all through any site *civodul reads about Hyde <brendyn>i need to find some good blogs to get design ideas from <wingo>a pretty terrible search engine :P <brendyn>cool blog, although i would narrow the margins since it is known that it makes it easier to read <wingo>it needs quite a lot of design love, but that's always at the bottom of the list <brendyn>well that explains white "http" returns almsot everything <add^_>davexunit: I removed my fork because I fell behind.. Anyway, I'll tell you if I have something I can do. <tupi>mkdir does not have a -p option, is this intentional? <tupi>(mkdir "/tmp/pelota-af08/c") <tupi>ERROR: In procedure mkdir: <tupi>ERROR: In procedure mkdir: No such file or directory <add^_>tupi: maybe you should add that ;-) <ijp>mkdir is the system call, not the shell script <nalaginrut_>seems write-date in (web http) is not suitable for Cookies' expired <ijp>nalaginrut_: probably not, there are far too many different date formats <tupi>ijp: i think the way it is, if i may say so, in guile, is not good [enough] for users. i understand what you say, but would suggest a 'better' mkdir <ijp>tupi: and if we did, the other side of this argument would complain <jao> hi add^_ (and everyone else) <ijp>there's probably a mode for this anyway, check your manpages <tupi>ok, i already wrote 'make-dir' which calls the script, tx <nalaginrut_>ijp: what's the proper way to format a cookie-expired string? how about date->string? <ijp>please $deity let it be ISO 8601 <ijp>correct, HTTP dates are always gmt <ijp>now to check the cookie rfc... <nalaginrut_>but after I set-cookie: (set-cookie . sid=88afd2936797973d153a6d20532c7202;Domain=localhost;Path=/auth;Expires=Wed, 26 Jun 2013 17:58:07 GMT;HttpOnly) <nalaginrut_>that makes artanis always count it as session-cookie <nalaginrut_>say, only (cookie . sid=88afd2936797973d153a6d20532c7202) <ijp>the browser doesn't send the expires date does it? <ijp>that's not really relevant <nalaginrut_>but even in the browser, I checked the cookie, it has no expires <nalaginrut_>but the http header was sent to the browser properly, I think <ijp>the cookie rfc doesn't seem to say anything about timezones <nalaginrut_>OK, that's one of the problems, I can ignore the timezone <ijp>the expectation is utc <ijp>how are you checking? <nalaginrut_>the browser has the function to show all the cookies <ijp>you mean document.cookie ? <ijp>that won't display that information <ijp>I don't even think you can query this info from javascript <nalaginrut_>it's not important, I can use other way to show the cookies <nalaginrut_>and I found there's only sid left, path & domain & expires went away <nalaginrut_>I'm not sure, but is it related to Guile's http header parser? <ijp>write the request out to a string and see <ijp>hehe, spotted the bug <nalaginrut_>(cookie . sid=21b511057203856c950e436a902c9a2b), only this <ijp>nalaginrut_: you realise of course that ; is the scheme comment symbol? <ijp>use a string, not a symbol <ijp>so what you pasted above was not actual code? <ijp>then you've commented it out <ijp>write will escape properly <nalaginrut_>I suspect if it's commented out, the program shouldn't work <ijp>then paste the actual code with some surrounding context <add^_>Hm, is it the line 96 in cookie.scm ? <nalaginrut_>add^_: it's update several lines today, so maybe changed from ithub <add^_>I was actually thinking about using artanis for a project, but maybe I shouldn't? What do you suggest? <add^_>Maybe I should just make my own, for the fun of making stuff :-) <nalaginrut_>add^_: if I solve this cookie problem, I think it could be used for some actual work, at least it's my plan <nalaginrut_>anyway, I'm writing a guile-on-rails alike thing in lisp-in-summer-project, based on artanis <nalaginrut_>named ricecat, which would more easy to use than artanis <nalaginrut_>and I'll invite some friends to give me advices of security <add^_>Unless your using something existent <nalaginrut_>well, following their advices, the work maybe easier <add^_>Bummer, I've wrecked my guile-dbd-sqlite3 thingy... <ijp>so? bug fixed? or am I going to get to see some code? <nalaginrut_>ijp: no, I'm trying to dig something with your advices <nalaginrut_>ijp: when I print it out, I can't tell if it's string or symbol <ijp>so, put a pk in the part where you create the request <ijp>not what I was thinking, but probably works just as well <ijp>^^ roughly means yes <ijp>personally, I would have done it only for the headers alist <nalaginrut_>;;; (#<<response> version: (1 . 1) code: 301 reason-phrase: #f headers: ((server . "Artanis-0.0.1") (date . #<date nanosecond: 0 second: 53 minute: 8 hour: 18 day: 26 month: 6 year: 2013 zone-offset: 0>) (last-modified . #<date nanosecond: 0 second: 53 minute: 8 hour: 18 day: 26 month: 6 year: 2013 zone-offset: 0>) (set-cookie . "sid=c317fdd09569f696824b5c940ef06de4;Domain=localhost;Path=/auth;Expires=Wed, 26 Jun 2013 19:08:53 GMT;HttpOnly") (location <nalaginrut_>. #<<uri> scheme: http userinfo: #f host: "localhost" port: 3000 path: "/admin" query: "sid=c317fdd09569f696824b5c940ef06de4" fragment: #f>) (content-type text/html) (set-cookie . "sid=c317fdd09569f696824b5c940ef06de4;Domain=localhost;Path=/auth;Expires=Wed, 26 Jun 2013 19:08:53 GMT;HttpOnly")) port: #f>) <ijp>okay, so it was a string. That's one thing ruled out <ijp>is that a newline in the string? <ijp>or is it just an artifcat of the posting <ijp>"In computer science, digital artifacts are anomalies introduced into digital signals as a result of digital processing." <ijp>in this case, it was introduced by my irc client <ijp>ooc why are there two identical set-cookie headers? <nalaginrut_>and the http header was generated from some info of the uri <ijp>it isn't in the uri struct <ijp>that would make no sense <ijp>but anyway, it's irrelevant <ijp>hmm, maybe you were right about the date <ijp>hmm, no, I was just confused by some other sites cookies <ijp>it uses a different delimiter, but both seem to be acceptable <nalaginrut_>ijp: how can I display the final http header string? <ijp>(call-with-output-string (lambda (out) (write-response res out))) <nalaginrut_>Set-Cookie: sid=0b109b969d9a649b7860bad4fc987c06 ;Domain=localhost ;Path=/auth ;Expires=Wed, 26 Jun 2013 19:30:52 GMT ;HttpOnly <ijp>one reasonable hypothesis is that chromium just treats all cookies for localhost as session cookies, on the assumption that it was only for development <ijp>but this is just me shooting in the dark <ijp>try on other browsers? <nalaginrut_>ijp: but the strange thing is that the browser didn't receive the cookie anymore <nalaginrut_>ijp: firefox can't deal with 301/302 redirect which is a big problem for Artanis <ijp>more to the point, should you be using nonportable browser features? <ijp>so is DELETE and PUT <ijp>doesn't make them portable <nalaginrut_>artanis do support them, but I never use them for examples <ijp>anyway, I'm out of ideas for now <nalaginrut_>it's so sad that the browser never sent cookie anymore... <nalaginrut_>DerGuteMoritz: sorry I didn't response you this afternoon, since I went home, and I didn't saw the last message ;-) <DerGuteMoritz>nalaginrut_: no problem, what was your question about again? <nalaginrut_>DerGuteMoritz: I'm not concerning the clojure, but cookies <nalaginrut_>DerGuteMoritz: the strange thing is, I format the proper set-cookie in the response, but the browser never store the cookie and never send cookie when GET <DerGuteMoritz>nalaginrut_: then you probably made a mistake in the set-cookie header <youlysses>nalaginrut: 1.) Pre-heat your web-browser to 450 degrees. 2.) ? 3.) Profit! <nalaginrut_>Set-Cookie: sid=ea505b9ce9f9cb531bad5cc32f98b1e0;Domain=localhost;Path=/login;Expires=Wed, 26 Jun 2013 20:21:24 GMT;HttpOnly <DerGuteMoritz>this means the cookie will only be sent for paths beginning with /login <nalaginrut_>well, I removed domain/path/expires, the browser stored the cookie *DerGuteMoritz bets it's the Expires param <nalaginrut_>because browser won't send expires to the server (I guess), so each time response handler returned "cookie: sid=..." which makes the cookie modify to a session cookie <nalaginrut_>the bug is I shared rc-cookie to store both request-cookie and response-set-cookie... <nalaginrut_>well, some guy here, once told me there's no better way except cookie <DerGuteMoritz>yeah it's the only way to do stateful sessions more or less properly <nalaginrut_>but there's another bug left, when I add path/domain, the cookie won't stored by the browser