wottis
2018-8-31 09:00:56

@wottis has joined the channel


wottis
2018-8-31 09:02:33

greetings


soegaard2
2018-8-31 09:03:23

hi - quiet here at this time


wottis
2018-8-31 09:04:22

thought so. probably most people located in the states or europe.


mark.warren
2018-8-31 09:08:19

Yeah, I’m in the UK and it doesn’t really get busy until my afternoon.


wottis
2018-8-31 11:32:54

maybe should ask the question also here


wottis
2018-8-31 11:33:31

i got some troubles with FFI and can’t figure out why there’s a pointer value returned instead of an enum. the following pastebin provides the code and the error: https://pastebin.com/bk5RSrvu


markx
2018-8-31 15:52:50

Nice! Thanks.


markx
2018-8-31 15:53:24

@notjack back to the previous discussion, > Not quite sure what I’d do for responding to user input and sending messages to the server.


markx
2018-8-31 15:54:22

maybe I’ll just do them in the impure way then.


markx
2018-8-31 15:57:05

OK now there’s one more step. Let’s say, we want the ability to allow the user to write the triggers, and we load all scripts in a certain path in run time. How do we do this?


markx
2018-8-31 15:58:49

It’s like a scripting system. Usually, a mud client would be written in C, and then it embeds a Lua vm for scripting, and allows users to write scripts in lua. In my case, I want to write the client in Racket, but also use Racket for scripting.


pierrebaille
2018-8-31 17:05:54

@pierrebaille has joined the channel


leif
2018-8-31 18:40:06

@wottis That probably means that the enum value 203448384 is not in your _TCOD_keycode_t enum definition.


leif
2018-8-31 18:40:51

You can test this by using the #:unknown flag for your enum.


leif
2018-8-31 18:41:37

Giving you something like: (define _TCOD_keycode_t (_enum '(...) #:unknown (lambda (x) x))


plotnus
2018-8-31 22:08:16

What is a good environment for working with .rkt? Currently I’m using a mix of visual studio and dr racket and I’m getting the feeling that for serious racket programming using emacs is a must.


markx
2018-8-31 22:14:02

Is there a way to write a GUI app in a declarative way?


greg
2018-8-31 22:59:53

@plotnus Many people do serious Racket programming using DrRacket. It has excellent support for custom #langs, the best macro stepper, and more. Some probably use it exclusively or nearly exclusively. Some people use it alongside some other editor/env, such as Emacs. (I’m in this category.)


greg
2018-8-31 23:01:15

I’m mostly in Emacs, but from time to time fire up DrRacket for specific things.


greg
2018-8-31 23:03:00

For Racket in Emacs your two main choices these days are Geiser and racket-mode. Since I wrote the latter, I won’t recommend one. :slightly_smiling_face: I think it’s safe to say that you might prefer Geiser if you work with other Schemes as well as Racket, whereas racket-mode focuses only on Racket and so sometimes has deeper support. ¯_(ツ)_/¯


notjack
2018-8-31 23:37:08

For scripting, I’d try to avoid runtime code loading and instead make a #lang my-mud that expands to a program that launches the MUD client. Users would write a file in this lang, where a file that contains nothing but the #lang my-mud line runs the client with default settings. Then they can add scripts and custom code and whatnot by adding code to their file. This eliminates the need for any sort of runtime code loading, plugin architecture, or script execution mechanism.

I personally haven’t tried that approach with any programs yet, but it’s worth noting that’s basically how the Racket package server works. The package server’s “config file” is basically just a program that calls a main function provided by the server with a bunch of keyword arguments. It’s much more manageable than dynamic code loading, enables optimizations and reduced loading times via ahead-of-time compilation, and is much easier to implement and extend.


notjack
2018-8-31 23:39:02

Oh and I just remembered that the frog static blog generator does this too and there’s some public discussion about how it made the switch from a dynamically loaded config file to a #lang frog program file.


notjack
2018-8-31 23:48:39

hjtimmer
2018-9-1 00:07:56

@hjtimmer has joined the channel


andreiformiga
2018-9-1 00:16:11

I mostly use emacs + racket-mode but also DrRacket sometimes


markx
2018-9-1 03:30:33

Is there a way to query a child of top-level gui window?


markx
2018-9-1 03:31:14

like, if I have a frame, and I want to find a canvas with a certain label under the frame.


alexharsanyi
2018-9-1 06:18:55

@markx A frame% has a get-children method, which returns all the direct child windows of the frame, you can test which child window is an area-container<%> and call get-children on it recursively. However, it might be better to keep a reference to the canvas outside the window hierarchy.