00:00:00 --- log: started retro/10.12.11 02:57:22 crc: i'm updating the go vm 02:57:53 what are the changes you did to file handling? 03:37:26 --- join: oPless (~oPless@cpc3-cmbg10-0-0-cust867.5-4.cable.virginmedia.com) joined #retro 03:52:11 --- join: ncv (~neceve@unaffiliated/neceve) joined #retro 04:35:48  yiyus: file handles are now stored in an array; the open function takes the file name, mode, and an index into the array, and returns the index instead of a raw file handle 04:36:14 the other functions all stay the same, except that the index is used in place of a raw file handle 04:38:37 I also added a delete file function, which takes a filename to delete 05:51:48 ok, i think it is done 05:51:56 it would be nice to have some kind of test 05:52:29 * crc is planning to write a test application for file i/o soon 06:07:34 A quick test of the major pieces would be to do: 06:07:34 : cp here dup "README" ^files'slurp "foobar" ^files'spew ; 06:07:58 which should copy a text file named README into one named foobar 06:30:53 good morning 06:31:29 hi erider 06:32:05 hey crc are you keeping warm? 06:32:13 yes, sadly 06:33:10 I keep one room in my house around 40 degrees this time of year; the rest is around 70 or so 06:33:24 at work it's tolerable (low 60's and colder) 06:35:39 whews (btw check whisper) 06:43:56 crc: do you know where its is getting its args from 07:06:21 crc: the cp quick test worked 07:06:44 but i don't like too much having a fixed array to store file handlers, what's the reason for that? 07:08:50 pointer size issues, and restrictions due to type differences in some implementations (e.g., C# and Java) 07:10:44 crc: yeah I think what I said was it 07:10:51 ok, but, what would be the problem with the open operation returning the handler? 07:11:08 i have never seen that you pass the handler to open, in any language 07:11:28 you could use a static variable which increments, or something like that 07:12:39 having the vm handle allocation would be easier, though somewhat more complex 07:15:21 well, you have to keep a handler any way. now you have moved that complexity to retro, but you cannot really remove it 07:15:33 true 07:17:52 I could still change it to have the vm track which entries are used/free, but I've not decided if the slight convience gain is actually worth it 07:20:17 the file operations map standard c functions, except that i would never expect having to pass a handler to open, so I'd say is worth it 07:20:27 but I don't have a strong opinion about it 07:21:05 maybe is just better to wait to see how the new network code results, and find a good interface for both files and net connections 07:30:59 I've been thinking about writing a file<->network bridge, running as a separate process, to let me treat sockets as files 07:32:22 sockets are not be used a file handle currently? 07:32:36 erider: no 07:33:07 I've actually removed sockets completely from the c code in the repository 07:33:17 but you can read and write to a socket using read write functions just like with a file 07:33:42 erider: not reliably in retro 07:33:52 oh 07:33:57 reading is fine, but writing character by character had timing problems 07:34:07 fwiw, i have very easy in the go implementation to add network connections as a Reader/Writer (it would be part of the gonga executable, but not of the ngaro package) 07:34:22 but i don't think you can export that idea to the other implementations 08:02:59 I'll see if I can get the open code to handle allocation of file handles after I get home today. Should be doable. 08:03:50 what error code should it return if unable to allocate a file handle? 08:17:12 you could just return a negative number, or 0 08:31:42 ok. I'll use 0 if no handle is available, and -1 if the file could not be opened 08:35:35 great 08:35:55 i will wait until you get those changes in to submit the new go version 08:36:26 i'm starting a repo in bitbucket, because that's the only way it can be used by goinstall 09:00:30 --- quit: oPless (Quit: Leaving.) 09:07:31 yiyus: I added a new query to port 5 (-10), for getting envrironment variables. takes and address and string (TOS), stores the environment variable TOS represents starting at the address, or just 0 at the address if the string does not correspond to an environment variable 09:09:03 ok, that does not difficult to add 09:09:21 s/does not/does not look/ 09:14:17 --- join: oPless (~oPless@cpc14-cmbg15-2-0-cust142.5-4.cable.virginmedia.com) joined #retro 09:16:06 ]if you add that, I'll be able to use the go implementation for the web-related stuff 09:16:46 it's done 09:17:09 that what you say could be interesting 09:17:39 there is the possibility to launch a vm with its output connected to a tcp connection 09:29:54 C and Python implementations now find the file handles automatically 09:38:28 and the ruby and lua are done as well 09:42:47 go is done too, i will setup the repo in bitbucket 09:52:33 http://bitbucket.org/yiyus/ngaro/ 09:54:54 checked a copy into the main fossil repo; thanks 09:56:31 ok, heading afk; will return later 12:01:08 --- quit: docl (Ping timeout: 264 seconds) 12:36:33 home now 13:26:48 updating my go installation 13:55:52 yiyus: possible stack issue; if I do .s immediately after starting it shows <-2> and exits 14:17:55 --- join: docl (~luke@184-100-188-107.ptld.qwest.net) joined #retro 16:15:34 crc: so I have been looking at the code and I guess that the author wanted to create a generic function that he could use to create like functions 23:59:59 --- log: ended retro/10.12.11