IRC channel logs

2017-09-14.log

back to list of logs

<manumanumanu>Good morning guilers!
<wingo>i removed the indirection in structs, yay
<wingo>can proceed to instruction explosion i think
<amz3>o/
<amz3>I stumbled upon a difficult bug while coding 2048 in guile js
<civodul>wingo: indirection in structs?
<wingo>civodul: that whole mess that was in struct.h
<wingo>that structs pointed to their vtables' data, that their data was indirected through a pointer in word 1, etc
<civodul>oh right!
<wingo>before: [ vtable data pointer + struct tc3 | data pointer initially pointing to slot 0 | initial slot 0 | slot 1 | ... ]
<wingo>now [ vtable pointer + struct tc3 | slot 0 | slot 1 ... ]
<civodul>yeah struct.h in stable-2.2 has a nice diagram
<civodul>the 2nd version looks much nicer :-)
<wingo>:)
<wingo>i was thinking also, probably we can just reserve goops slots in all vtables, so that all vtables can be classes
<wingo>already when you make vtables there's a hook call into goops (if it's loaded, otherwise the vtable is put on a queue for processing in case goops is loaded)
<wingo>dunno, a thought for later
<wingo>for now i just wanted to make it so that struct-ref / struct-vtable could be open-coded efficiently to low level assembly
<civodul>i'm not clear on what's needed from structs to support GOOPS
<civodul>class redefinition is complex
<civodul>heh, i see :-)
<wingo>well, we used that redirection trick to allow for class redefinition -- redefinition in general can chagne the number of slots in an object
<wingo>so we used that indirection to allow an old instance to point to new slots, if needed.
<wingo>but it was too expensive i think. so instead i lifted that indirection into goops, and into only a subset of goops classes
<wingo>the down-side (but also partly an up-side) is that now only a subset of goops classes can be redefined and have their instances migrate automagically
<wingo>to that i say, "oh well" :)
<civodul>ok
<civodul>might be frustrating to those who want to have fun with the MOP though
<civodul>(that's how i got into Guile :-))
<blancmange>hello, does anybody know how to overcome the issue with TLS and HTTP headers with incorrect dates causing requests to fail?
<blancmange>e.g. (http-get "https://google.com/")
<OrangeShark>post about guile on emacs subreddit https://www.reddit.com/r/emacs/comments/701v90/guile_needs_a_community_elispemacs_needs_a/
<dsmith-work>Thursday Greetings, Guilers
<manumanumanu>good afternoon!
<manumanumanu>OrangeShark: hmmm... I am not sure what I think. I would love to be able to extend emacs in guile scheme, but a new editor?
<manumanumanu>not really: I am pretty sure what I think: it ill never work.
<manumanumanu>A new editor would not be similar to emacs. You would probably use something like a rope, and even though most things could be abstracted away, making a port easy from emacs is probably too hard.
<manumanumanu>I have though thought about at taking arximboldi's ewig editor and build something proper using it :)
<OrangeShark>manumanumanu: seems the OP wants a modern lisp environment rather than just an editor.
<amz3`>o/
<manumanumanu>ahoy!
<amz3`>ah!
<amz3`>I think I found the nasty bug I have
<amz3`>yep that's it, it was my totaly my fault
<amz3`>now I can continue on the road to 2048
<amz3`>(I won't finish the game just show that it's doable)
<amz3`>(no animations also)
<amz3`>(gaming doesn't pay the bills)
<amz3`>(at least not 2048 games)
<ecraven>is there a high-level socket library? something that opens a tcp listener on some port, then gives me a normal Scheme i/o port for communication?
<amz3`>normal Scheme i/o port?
<amz3`>what you describe looks like read/write over socket
<ecraven>amz3`: yes, something like (let ((x (tcp-listen 123))) (read (tcp-accept x)))
<amz3`>AFAIK you don't need a higher level abstraction on top of read/write and socket ports
<amz3`>that said, read and write IIRC is not guaranteed to be safe
<ecraven>hm.. I'd need read-bytevector (or read-string) and the same for writing
<amz3`>I am not sure I understand what you need, i let others chime in
<ecraven>well, I want to open a socket, and then read/write bytevectors or strings from/to it
<amz3`>you want a port where what you read from it are scheme values that can be any scheme primitive datatypes?
<amz3`>when you write a scheme value to the port it does serialize it for you and on the other end of the port it's deserialized automatically to the correct datatype?
<ecraven>amz3`: no, I just want to write/read bytes to the network
<ecraven>sorry for not making that clear
<amz3`>ah ok
<ecraven>but I don't want a specific sendto / rcvfrom, but just use general read/write bytes procedures
<amz3`>I think people use get-u8 and put-u8 to do that
<ecraven>yea, but what do I use to actually open the socket port?
<amz3`>I think there is an example of that in guile-websocket
<amz3`> https://git.dthompson.us/guile-websocket.git/blob_plain/HEAD:/web/socket/server.scm
<amz3`>look at make-server-socket
<ecraven>great, thank you!
<ecraven>that looks exactly like what I wanted ;)
<amz3`>there is an example for doing the client, client.scm
<amz3`>cool
<dustyweb><wingo> i was thinking also, probably we can just reserve goops slots in all vtables, so that all vtables can be classes
<dustyweb><wingo> the down-side (but also partly an up-side) is that now only a subset of goops classes can be redefined and have their instances migrate automagically
<dustyweb>wingo: I think we talked about this not so long ago
<dustyweb>I think having more unity between GOOPS and records-as-classes is a good idea, though we shouldn't drop the ability to redefine classes in GOOPS. Though I think when we talked about it last time I raised that I'd be willing to keep a cost penalty in GOOPS, even have it be slightly more costly if that meant that redefinition was possible but expensive and GOOPS / records share the same underlying structure
<reed_>Hi all. I am trying to make a very basic multi-file project. I am having trouble defining my own module. I am getting an error that says 'no code for module (foo)'
<reed_>I have read through the documentation on creating and using modules, but I'm not quite sure what is happening. I think I need to tell scheme where to look for foo.scm?
<daviid>reed_: in the manual, see this section 6.18.7 Load Paths
<reed_>daviid: Thank you, that helped a lot!
<guile-guest7>how to write literal unicode caracter in guile 1 ?
<daviid>guile 1?
<guile-guest7>(string #\\x8599) does not work
<guile-guest7>yes guile 1.xx
<guile-guest7>(not guile 2.x)