camonz has joined #wallaroo
nisanharamati has joined #wallaroo
t0m has joined #wallaroo
<
SeanTAllen>
t0m i doubt anyone will be able to help you unless you supply the error as well
<
SeanTAllen>
perhaps some information about the data you are sending in as well
<
SeanTAllen>
one thing i see that strikes me as curious
<
SeanTAllen>
why is the header length 5?
<
SeanTAllen>
is it a 5 byte header? that's an odd header size to use, could be completely correct, but its an odd size to pick
<
SeanTAllen>
this seems pretty non-sensical to me: header_length=5, length_fmt=">I"
<
SeanTAllen>
header_length of 5, length_fmt isnt a 5 byte size
<
SeanTAllen>
">I" is 4 bytes
<
t0m>
it's copy pasta from the twitter example
<
SeanTAllen>
so you have a mismatch there
<
SeanTAllen>
i dont think so
<
SeanTAllen>
that isnt the length format from the twitter example
<
SeanTAllen>
can you point me to where you see that in the twitter example?
<
t0m>
i have been changing things so it's probably not exact
<
SeanTAllen>
this is what i see for length_fmt from the twitter example: int(struct.unpack("!5s", bs)[0])
<
SeanTAllen>
which is a little weird unto itself but its how Hannee did it
<
SeanTAllen>
the most straightforward thing would be to have a header_length of 4, leave the length format as is
<
SeanTAllen>
and then not encode the length like it is doing as a 5 character string
<
SeanTAllen>
instead encode the length of the data as an integer
<
SeanTAllen>
using struct.pack in your sender
<
SeanTAllen>
does that make sense?
<
SeanTAllen>
actually with the new api, there isnt a choice, that old thing that Hannee did doesnt translate over
<
t0m>
that was going to be my follow up question, I didn't really know how to approach that piece after reading the API update article
<
SeanTAllen>
what piece?
<
SeanTAllen>
are you asking how you use struct.pack to create what you send?
<
SeanTAllen>
i dont follow what your question is
<
t0m>
i need to define the payload length inside the @wallaroo.decoder above where i defined the decoder as it is in the example, right?
<
SeanTAllen>
sorry, i didnt follow that
<
SeanTAllen>
can you paste an example?
<
SeanTAllen>
code often helps more than words
<
SeanTAllen>
you need to change how you are sending the data
<
SeanTAllen>
to be a 4 byte header of the length of the string and the string
<
SeanTAllen>
struct.pack is the best way to put that together
<
t0m>
okay, i had the decoder right after making the change you suggested. I'll move onto the send_tweets func
<
SeanTAllen>
as an example
<
t0m>
thank you, that helped save me a few stackoverflows
<
SeanTAllen>
beware stackoverflow, the accepted answer is usually wrong in some way.
<
t0m>
that negates like 30% of everything i know. next you'll say lynda.com and youtube are equally reputable
<
SeanTAllen>
i think im too old to know what lynda.com is
<
SeanTAllen>
but now I know!
<
t0m>
think netflix for skills?
<
t0m>
it used to be a lot better, but the content and streaming have kinda gone downhill
<
strmpnk>
I was thinking "youtube for learning" but netflix for skills is exactly what it is.
<
t0m>
nah, youtube is youtube for learning you just have to fight through 10 hours of flat earthers
t0m has quit [Ping timeout: 264 seconds]
nisanharamati has quit []