snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
jokke1 has quit [Ping timeout: 250 seconds]
jokke1 has joined #crystal-lang
<hightower2>
I asked above about the sample code to use macros to fill a buffer and dump it into a location later. I found that referenced code at https://play.crystal-lang.org/#/r/3npv
<FromGitter>
<bew> I know the mapping is wrong, I fixed it with a nilable type for `device` in `SingleModelMobile`, but it shouldn't just go to an infinite loop!
<FromGitter>
<bew> RX14: hmm it seems to time out only in carc.in, works instantly (I get a YAML parsing error)
<FromGitter>
<girng> is there something more lightweight than json for client->server communication for gaming? can't use msgpack cause godot doesn't have a module. im doing something like ⏎ https://play.crystal-lang.org/#/r/428i/edit ⏎ ⏎ and in benchmarks, it does 5million iterations per second, compared to a struct using from_json (which is around 370,000 per second) [https://gitter.i
<FromGitter>
<girng> but, for example, if i do `cmd:message`. how do i split the message into their own values? for example, sending `x` and `y` values in there
<FromGitter>
<bew> what? you can make your own protocol, but cannot use msgpack? what's the logic?
<FromGitter>
<girng> cmd, new_message = message.split(':') only accounts for the second split, what if there is x,y in the `message`. i want to do ⏎ `cmd, new_message, x, y = message.split(':')` or something
<FromGitter>
<bew> or is this `a:b, c:d` 'protocol' already handled by godot
<FromGitter>
<girng> nope, just something i made up t hat's way faster than json
<FromGitter>
<girng> using crystal's built in .split method
<FromGitter>
<bew> so, will it work with godot?
<FromGitter>
<bew> if there is no module for it
<FromGitter>
<girng> yeah, for sure godot has split n similar methods in crystal, actuallly
<FromGitter>
<girng> i need to get it done in crystal first just not sure how
<FromGitter>
<girng> let me make an example with comments, 1 second :)
<pn-max>
oh! sorry, only read a bit of the conversation but are you using godot w/ crystal ?
<FromGitter>
<girng> yah
<pn-max>
nice, using GDNative somehow ? wanted to get into it
<FromGitter>
<girng> the stream data from godot is coming in, and working nice. but if sent at an interval, it hiccups. im not sure if i'm reading the stream data correctly
<FromGitter>
<girng> nah im just using gdscript lol
<FromGitter>
<girng> i am not getting myself involved with c++, im too stupid
<pn-max>
Oh, alright! I was saying gdnative because apparently it can be used to create bindings to any language with C FFI
<pn-max>
there are already bindings for D, apprently
<pn-max>
how are you sending the stream ? curious if you don't mind
<FromGitter>
<girng> from godot, i just use: `streampeer.put_utf8_string(JSONDATA)`
<FromGitter>
<girng> happens even when sleep is 0.1
pn-max has quit [Ping timeout: 256 seconds]
<Groogy>
you mean the messages? Can't that just be the terminal?
<FromGitter>
<girng> @groogy what ithought, but its not. something internal is going on i think. if you see my gif on my github issue, the left terminal is what its supposed to look like
<FromGitter>
<girng> iuno how to investigate it further >_<
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
hightower2 has joined #crystal-lang
Groogy has quit [Quit: WeeChat 2.1]
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter>
<girng> i think something inside read_bytes, is bugging it out on WSL only
DTZUZO_ has joined #crystal-lang
braidn[m] has quit [*.net *.split]
Renich has quit [Ping timeout: 255 seconds]
kixune[m] has quit [Ping timeout: 246 seconds]
fifr[m] has quit [Ping timeout: 246 seconds]
byteflame has quit [Ping timeout: 255 seconds]
kp666[m] has quit [Ping timeout: 255 seconds]
cptaffe has quit [Ping timeout: 256 seconds]
olbat[m] has quit [Ping timeout: 276 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
olbat[m] has joined #crystal-lang
ssvb has joined #crystal-lang
pn-max_ has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
byteflame has joined #crystal-lang
fifr[m] has joined #crystal-lang
braidn[m] has joined #crystal-lang
kp666[m] has joined #crystal-lang
Renich has joined #crystal-lang
cptaffe has joined #crystal-lang
kixune[m] has joined #crystal-lang
<pn-max_>
p sure this is just what the windows terminal does
<pn-max_>
have you tried with another terminal
<pn-max_>
on windows I mean
<pn-max_>
To investigate further, I suggest you actually use the values to render something graphical and see if you do see a hiccup there instead
<FromGitter>
<KINGSABRI> hello guys, do you have a plan to migrate the official doc (https://crystal-lang.org/docs/) to the new gitbook ?
olbat has quit [Ping timeout: 260 seconds]
alex has quit [Quit: WeeChat 2.1]
<FromGitter>
<fridgerator> Someone mentioned in here the other day, I don't remember the outcome
wrq has joined #crystal-lang
<oprypin>
KINGSABRI, anyone can do it, including you
pn-max_ has quit [Remote host closed the connection]
pn-max has quit [Remote host closed the connection]
<FromGitter>
<wrq> can macros throw compile time errors?
<oprypin>
{%raise
<oprypin>
"string"
<FromGitter>
<wrq> also, can macros look into a declared enum and see the different variants? I want a reason to get my hands dirty with macros, and I was thinking a very simple pattern matching macro for enums only might be a neat little thing to do
<FromGitter>
<wrq> but I don't see EnumLiteral in Crystal::Macros
<FromGitter>
<wrq> and the TypeDeclaration section doesnt seem to mention it
<oprypin>
variants?
<oprypin>
enum is not a literal but a language construct