steveh2009
2019-7-24 15:07:06

In racket/gui, I have 2 vertical panels that I would like to stack, each height determined by the total height of the widgetd drawn within them. By default though each vertical panel seems to take up 50% of the height of the initialized frame height. How can I get the behavior I want? Thanks!


steveh2009
2019-7-24 15:15:13

Playing with min-height on the panel definition doesn’t do what I want. The top panel I want to have a dynamically changeable height through mouse vertical window resizing and I’d like the bottom panel to always have a fixed height.


ryanc
2019-7-24 15:28:33

@steveh2009 I think you want to set stretchable-height on the bottom panel to false.


nma.arvydas.silanskas
2019-7-24 16:43:34

can I include a native lib (ie .so or .dll) with the package?


spdegabrielle
2019-7-24 16:57:14

I’d really like to work this out too. I was looking at how #lang video packaged native libs but I couldn’t get it to work (.dylib for macOS) I want to work out how to package up binaries for Linux and Windows too.


markus.pfeiffer
2019-7-24 17:59:30

It’s not entirely clear to me why this would be desirable


markus.pfeiffer
2019-7-24 18:00:13

I asked a couple of months ago how to bundle some C code to compile into an .so, and the verdict was that I shld rather rely on that .so being installed by other means


markus.pfeiffer
2019-7-24 18:00:19

which I can entirely see the point of


nma.arvydas.silanskas
2019-7-24 18:45:55

well in my case I want to make FFI to a lib that a) seems to not prioritize backwards compatibility and thus breaks old code often, and b) I’m only interested in a rather small subset, so I’d be compiling those dlls myself (and omitting good chunk in the process)


nma.arvydas.silanskas
2019-7-24 18:47:06

plus that lib isn’t even close to mainstream, likely nobody would have it on their system by accident


mjo
2019-7-24 18:58:54

@mjo has joined the channel


xinhuang.abc
2019-7-24 20:12:08

How can I create a c array of c string? I defined the type as (define the-type (make-array-type _bytes/nul-terminated 2)), but there isn’t a make-the-type binding like for a c struct.


ben
2019-7-24 21:27:49

you can write a small package that provides/installs the lib, and have your main package depend on it

here’s an example small package: https://pkgs.racket-lang.org/package/ffmpeg-x86_64-macosx


soegaard2
2019-7-24 21:28:37

@xinhuang.abc Regarding the last comment, have you seen make-cstruct-type ?


xinhuang.abc
2019-7-25 00:38:47

I checked the document, but don’t quite understand it. Now I am trying with (_list i _bytes/nul-terminated)


philip.mcgrath
2019-7-25 05:27:01

@xinhuang.abc Someone asked a variant of this question on Stack Overflow recently: https://stackoverflow.com/questions/56759569/racket-ffi-example-of-c-array-array-usage/56760192 Probably I should try to add an example to the docs …


nma.arvydas.silanskas
2019-7-25 06:58:55

heh that’s funny. That someone was me, and the answer was the reason I’ve joined this slack.. :smile: