Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


A member registered Nov 24, 2019

Recent community posts

(7 edits)

When I do the

curl http://localhost:8001

I see it my webrick access_log but

p 1
x ||= $gtk.http_get "http://localhost:8001/"
p 2

prints lots of 1 and 2 but nothing in access_log. Maybe because http_get does not accept port? Or what else can be wrong here?

Also the x is nil all the time.


dragonruby-macos/samples/24_http_example also shows just black window after the warning text disappears

$ ./dragonruby-macos/samples/24_http_example/run

and the `` is similarly `NilClass` before and after the `= $gtk.http_get` line.

UPD: updated to git SHA -- a2ea0c036fe67a406a654fd8e40abd167e3b6ac7

Same black window.

(11 edits)


I would like to use the DragonRuby as a renderer for games/programs that are running on real Ruby in another process. The "main" process should send updates when needed (and should potentially be allowed to die and start later) to the "second" process that is the DragonRuby renderer. The problem I see here is that DragonRuby wants me to repeat the loop again and again instead of doing nothing while waiting for data. I wanted to use for communication where if you open it as a file the `gets` waits for data but here it seems that I can't wait. Another option would be make the 3rd (!) proxy updates-accumulating process with something like webrick and use `$gtk.http_get` but that seems to be overkill.

Or... I just didn't really try to run the DragonRuby yet -- maybe it's ok to stuck and not return from the `tick` iteration in time? But then I don't see where are docs on the `gtk` object to check if it can work with fifo -- grep gives me `gtk.read_file` examples but not `gets`.