IRC channel logs

2017-09-10.log

back to list of logs

<happy_gnu[m]>dustyweb: are you here?
<dustyweb>happy_gnu[m]: I'm here
<happy_gnu[m]>Hi :) you did the land of lisp right?
<dustyweb>happy_gnu[m]: most of it...
<happy_gnu[m]>I have a question maybe you can help me
<dustyweb>I didn't type in all the examples but I read most of it ;)
<dustyweb>I did read all the comics! ;)
<happy_gnu[m]>Apparently the code is outdated for the server
<happy_gnu[m]>So it won't load it on firefox
<happy_gnu[m]>Instead it shows the plain
<dustyweb>oh, for the board game?
<happy_gnu[m]><HTML><form></form></HTML>
<happy_gnu[m]>There is one before
<happy_gnu[m]>But yeah I read that won't work either
<happy_gnu[m]>So I think I need to put this
<dustyweb>happy_gnu[m]: do I remember that you write your own html templating language in that?
<dustyweb>happy_gnu[m]: if that's actually what it's outputting, your code must not be rendering elements? because that looks pretty sparse
<happy_gnu[m]>HTTP/1.1 200 OK
<dustyweb>200 OK is ok :)
<happy_gnu[m]>So Firefox will render
<happy_gnu[m]>But I am not sure how to write the code
<happy_gnu[m]>"HTTP/1.1 200 OK <HTML><form></HTML></form>"
<dustyweb>happy_gnu[m]: sounds like what you should try to do is not render the whole application, but play with trying to get smaller bits of html to spit out
<dustyweb>happy_gnu[m]: this sounds like an opportunity for a REPL debugging session ;)
<happy_gnu[m]>Repl is working and server is working
<dustyweb>great! then you should try to render little html snippets at the repl
<happy_gnu[m]>Is just Firefox doesn't render it just shows plain text and I don't know how the HTTP/1.1 200 OK
<happy_gnu[m]>Works :/
<dustyweb>200 OK is fine
<dustyweb>don't worry about that
<dustyweb>it's just an http response saying that things are not broken
<dustyweb>and "here's your document"
<happy_gnu[m]>Ah what I mean is that the example needs this 200 to work but I don't know where to put it
<happy_gnu[m]>Before the <HTML>? Does it need tags?
<dustyweb>oh I see, it just relies on the extreme forgivingness of web browsers in this
<dustyweb>doesn't even mention how to do a proper response really...
<happy_gnu[m]>Yes :/ but Firefox doesn't work anymore so I went to the forum and there someone had a similar problem and they said to add the 200 OK and a blank line
<dustyweb>happy_gnu[m]: scroll down to HTTP Protocol on https://www.ntu.edu.sg/home/ehchua/programming/webprogramming/HTTP_Basics.html and you'll see an example
<happy_gnu[m]>dustyweb: great thanks :)
<dustyweb>"HTTP/1.1 200 OK" goes on its own line, as do all the other headers. In general, you should end the lines with "\\r\\n" though many browsers let you get away with just "\\n"
<dustyweb>happy_gnu[m]: probably also want Content-Type, and maybe even Content-Length (I don't know if it'll let you get away without that one)
<dustyweb>but there you go, it's an example
<dustyweb>good luck / happy hacking!
<happy_gnu[m]>dustyweb: thanks :) sorry for bothering you, I didn't know who else to ask
<dustyweb>happy_gnu[m]: np! btw you may also want to join #lisp and #scheme
<happy_gnu[m]>Yes you are right dustyweb :)
<happy_gnu[m]>dustyweb: do you have any book suggestion for that type of web/server stuff?
<Ober>for guile?
<happy_gnu[m]>dustyweb: it works :D
<happy_gnu[m]>Thank you so much :)
<dustyweb>happy_gnu[m]: I don't have a book suggestion; Mozilla Dev Network is great though
<happy_gnu[m]>dustyweb: OK I will try to learn there :)
<happy_gnu[m]>Have a good night dustyweb
<dustyweb>gnite happy_gnu[m]
<happy_gnu[m]>:)
<amz3`>o/
<amz3`>does anyone have pure implementation of 'read' and 'write'?
<amz3`>pure scheme
<janneke>amz3`: mes has most of it's read and write in scheme...
<janneke>*its
<amz3`>it's something that is also needed by guile fiber IIRC
<amz3`>oh ok
<amz3`>nice I will have a look at it
<amz3`>janneke: where can I find the source?
<janneke>...but that's not (directly) usable with Guile, of course
<janneke>here's read: https://gitlab.com/janneke/mes/blob/master/module/mes/display.mes
<janneke>eh, write :-)
<janneke>and read: https://gitlab.com/janneke/mes/blob/master/module/mes/read-0.mes
<cmaloney>(tzag)
<amz3`>catonano: what's up?
<amz3`>long time...
<janneke>mwette: congrats on the release!
<amz3`>mwette: !
<mwette>janneke: thanks very much
<mwette>amz3`: thanks again
<janneke>mwette: your 0.81.0 prompted me to see if I could prepare a new Mes release, really happy with your progres!
<stis_>tja guilers!
<stis_>sorry folks for working with a python to scheme compiler, but it's fun and it makes me appriciate scheme the more
<stis_>tonight I will hack in try except I think.
<stis_>if only I could use guile at work, we want to standardize on a functional language on an open platform.
<stis_>but it looks again that programmers in general can't handle the parens - acording to the execs
<amz3`>sad story
<amz3`>a collegue at work, is convinced you can't write a database in guile
<amz3`>why?
<amz3`>because guile is immutable
<stis_>lol
<stis_>sad actually
<amz3`>yeah
<amz3`>I did not even bother try to explain him what was true
<amz3`>I should have, but I lake energy
<amz3`>for that person in particular
<stis_>I tend to say my meaning but in practice have little influence. Scheme is so insanly well designed and not even on the radar of what people see as viable
<amz3`>I love this quote: “inteligence is not what you do when you know, it's what you do when you don't know”
<amz3`>stis_: yes
<amz3`>sadly
<stis_>amz3`: a very good quote!
<amz3`>stis_: yes, in particular this persons knows I am/was working on database in Guile but instead of asking how it was possible he rejected the idea in bulk
<amz3`>using a wrong argument
<amz3`>at the very least, he could have said, that's dynamic language, it will be slow.
<amz3`>that argument I can understand
<stis_>or point to our gc issues
<amz3`>yes
<amz3`>but that doesn't make guile useless
<amz3`>afaict Guile is on a good track, even if it will take time to have all this packaged in a nice box
<amz3`>I mean to have all the thing I want in stable master
<amz3`>like fiber, guile-js and ffi helper
<stis_>Yes, and this is what exciting.
<stis_>I would actually want guile to compile towards the jvm as well in case oracle will open source it
<mwette>stis_: Have you looked at kawa? https://www.gnu.org/software/kawa/
<stis_>mwette: sure I know about kawa, but I tend to like the guile flavor of scheme thiugh and if it can get to jsm why not jvm
<janneke>mwette: supporting Nyacc's new asm-expr alongside the old version is trivial, great!
<mwette>janneke: good news
<janneke>mwette: now mescc compiles tinycc into a somewhat functional C compiler; we're getting real close to a proper C compiler.
<janneke>mwette: sent patch to update nyacc to 0.82.0 to guix!
<mwette>janneke: How about a scheme version of lightning?
<janneke>mwette: yeah, i've been thinking about that...
<janneke>my problem currently is that i want to use a rather minimal Guile feature set for the Scheme C compiler
<janneke>because it needs to run on a Scheme [interpreter/compiler] that can be written in assebly (currently Mes)