ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
Guest1261 has joined #crystal-lang
Guest1261 has quit [Quit: Client closed]
Guest1220 has joined #crystal-lang
<Guest1220> Hi all. I'm trying to troubleshoot an issue regarding structs and pointers to structs for libraries. I created the struct to be passed to the library in crystal using libgen, but when I call the library function passing the pointer of the struct I created, the struct is filled with meaningless data. For example an ID value which should be a
<Guest1220> reasonable number below 1000 is set to a number in the billions. I've seen such behaviour before when working in C where padding or alignment issues of the structure contents is miss aligned. Is there a lower level way without hooking up a debugger to view what's going on. Can I view how the crystal compiler is creating or accessing this structure
<Guest1220> after its returned from the library call?
<Guest1220> There are some char[] arrays and INTs of various sizes, so I'm wondering if crystal is optimizing the layout of the struct causing these results perhaps
ur5us has joined #crystal-lang
<Guest1220> Nvm figured it out, just needed a rubber duck to talk to I suppose. I forgot to allocate the strict on the stack before passing it to the function
Guest1220 has quit [Quit: Client closed]
Starfoxxes has quit [Ping timeout: 252 seconds]
Starfoxxes has joined #crystal-lang
void09 has quit [Quit: void09]
void09 has joined #crystal-lang
notzmv has quit [Ping timeout: 240 seconds]
waleee has quit [Ping timeout: 250 seconds]
notzmv has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ejjfunky has quit [Remote host closed the connection]
<FromGitter> <postmodern:matrix.org> moe (https://matrix.to/#/@moe:busyloop.net): is there a method like read_string, but one that doesn't require a fixed length? I just want to read the whole stream.
<FromGitter> <Blacksmoke16> `gets_to_end`
ur5us has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us has quit [Read error: Connection reset by peer]
<FromGitter> <postmodern:matrix.org> nice!
ur5us_ has quit [Ping timeout: 272 seconds]
ejjfunky has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Quit: taupiqueur]
taupiqueur has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.4]
sorcus has joined #crystal-lang
ejjfunky2 has quit [Ping timeout: 240 seconds]
ejjfunky2 has joined #crystal-lang
taupiqueur has quit [Ping timeout: 240 seconds]
taupiqueur has joined #crystal-lang
f1refly has quit [Ping timeout: 260 seconds]
waleee has joined #crystal-lang
f1refly has joined #crystal-lang
ejjfunky has quit [Read error: Connection reset by peer]
ejjfunky2 has quit [Ping timeout: 256 seconds]
sorcus has quit [Quit: WeeChat 3.4]
ur5us_ has joined #crystal-lang
taupiqueur has quit [Ping timeout: 268 seconds]
ur5us_ has quit [Remote host closed the connection]
postmodern has joined #crystal-lang
<postmodern> i wonder if there is a crystal equivalent of faktory https://github.com/contribsys/faktory because i would totally use the crystal version
<riza> postmodern: faktory is designed to be language agnostic, but maybe this is what you're looking for? https://mosquito-cr.github.io/
<riza> I'm unclear what you actually want though
<postmodern> a generic job server like faktory, but written in Crystal instead of Go. i would totally use it in order to promote Crystal.
<FromGitter> <Blacksmoke16> id just use rabbitmq or kafka
<FromGitter> <Blacksmoke16> imo, are just some things that would be *very* hard to top