<FromGitter>
<tenebrousedge> quoting: ⏎ ⏎ > On GitHub, the person who submitted the pull request has the option to allow updates from maintainers. If that is enabled (by default), you will be able to commit to the forked repository (and this change the contents of the pull request)
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<jwoertink> oh nice. I don't see that on this, so I wonder if they never checked that box
<FromGitter>
<Blacksmoke16> id imagine you need write access or something tho
<FromGitter>
<tenebrousedge> it says it's checked by default
<FromGitter>
<jwoertink> Thanks for the help. I'll give these a shot!
<FromGitter>
<Blacksmoke16> ill have to i guess
<FromGitter>
<Blacksmoke16> have to come up with a good way to do that, as would have to support comma/space/period separated, plus period and comma decimal separator
<FromGitter>
<Blacksmoke16> should be doable
<FromGitter>
<Blacksmoke16> worry about that later
<FromGitter>
<Blacksmoke16> would be handy if the string to_x method handled that tho
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @vladfaust is there a better way to do LIKE queries? `Onyx::SQL.query(Type.where("name LIKE '%#{query}%'"))` i tried doing like `Onyx::SQL.query(Type.where("name LIKE '%?%'", query))` but that raises `bind message supplies 1 parameters, but prepared statement "" requires 0`
<FromGitter>
<Blacksmoke16> like obs the first one isnt safe
return0e has quit [Ping timeout: 248 seconds]
return0e has joined #crystal-lang
<FromGitter>
<Nbotz> everything ive tried hasnt worked, how would you update the server time when JS plays a new video?
<FromGitter>
<Blacksmoke16> Send a message to the server via a webhook?
<FromGitter>
<Blacksmoke16> Websocket*
<FromGitter>
<Blacksmoke16> But what do you mean by server time? How does that relate to a video?
<FromGitter>
<tenebrousedge> @Blacksmoke16 you can maybe just use a regex to snag `((\d)[.,])+([.,][0-9]{2})$`
<FromGitter>
<Blacksmoke16> Hmm, is part of a bigger string of variable decimal and digits
<FromGitter>
<Nbotz> @Blacksmoke16 i need it to sync new clients to the server video location. but when a new video is played the sync isnt reset back to 0 it keeps going, which throws everything off
<FromGitter>
<Blacksmoke16> Send a request to the server to reset then?
<FromGitter>
<tenebrousedge> the sync will be off by a little bit no matter what
<FromGitter>
<Blacksmoke16> Whether it's some http request or websocket
<FromGitter>
<tenebrousedge> so keep track of the current position (of whoever clicked play) as best you can, and give that to anyone else joining the stream
<FromGitter>
<Nbotz> thats the thing, the videos autoplays when the server starts, there's no client host
<FromGitter>
<Nbotz> the way i was keeping track of the current position was by subtracting the clients time from the server init time
<FromGitter>
<Nbotz> because that way the current position isn't just reset to 0 when you reload the page
<FromGitter>
<tenebrousedge> what's the big picture here?
<FromGitter>
<tenebrousedge> @Blacksmoke16 any consistent delimiters?
<FromGitter>
<Nbotz> i want every video in a folder to autoplay on the server. and when people join in said server they join in at the time of the server.
<FromGitter>
<Blacksmoke16> use redis to keep track of the place of each video every second?
<FromGitter>
<Blacksmoke16> depends on the country, some use commas some use periods etc
<FromGitter>
<Blacksmoke16> but think i can just count the number of periods or something
<FromGitter>
<tenebrousedge> @Blacksmoke16 sure, and commas and periods can be dealt with. Space separated numbers without any other field delimiter would be a problem
<FromGitter>
<tenebrousedge> is `303 303` one or two numbers?
<FromGitter>
<Blacksmoke16> in my case it would be known to be one
<FromGitter>
<tenebrousedge> @Nbotz so the client loads the page, loads the video, a loadVideo event fires, this queries the server, then sets the playback position of the video
<FromGitter>
<tenebrousedge> I'm pretty sure that there is some sort of video onLoad event
<FromGitter>
<Blacksmoke16> but id be ok with not worrying about it to start and let it be a problem
<FromGitter>
<Blacksmoke16> dot and comma are prob wayy more common
<FromGitter>
<tenebrousedge> @Blacksmoke16 well then, something like that regex should probably work? you might have to be careful about your capture groups
<FromGitter>
<tenebrousedge> probably end up with something like [[["123"],["456"]],["78"]] for 123,456.78
Creatornator has joined #crystal-lang
<FromGitter>
<Nbotz> @tenebrousedge yes, but i cant really wrap my head around it. i guess i would send a socket of the loadvideo?
<FromGitter>
<tenebrousedge> I'm not sure what sort of video player you're using, but I'm pretty sure most of these have an API that allows you to set the starttime
<FromGitter>
<tenebrousedge> the server will have a `seconds` counter and know the length of all the videos
<FromGitter>
<Blacksmoke16> then just need to do the second round of gsub to remove invalid chars from the quantity for example group
<FromGitter>
<Blacksmoke16> anyway imma get to bed o/
<FromGitter>
<tenebrousedge> kk, nighty night
<FromGitter>
<Nbotz> night
<FromGitter>
<Nbotz> im using the basic HTML player. i get having a global seconds counter for the server, and i kinda get jumping people in using that seconds counter, but i dont know of any way to get the length of videos from crystals end
<FromGitter>
<Nbotz> maybe use redis? but i dont know haha
<FromGitter>
<tenebrousedge> there's nothing in Crystal that will do that, you would need ffmpeg or similar
<FromGitter>
<Nbotz> i tried ffmpeg eariler using the `system` function, and it only dumps output in the console
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
Groogy has quit [Quit: WeeChat 2.5]
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Client Quit]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<r00ster91> is there no string method for counting the occurrences of a whole string in a string? `String#count(String)` unfortunately has this really annoying behavior where it counts every char of the string I'm giving
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
alex`` has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.5]
alex`` has joined #crystal-lang
go|dfish has joined #crystal-lang
<FromGitter>
<wwselleck> are there an big obvious holes in the crystal web dev ecosystem? I'm trying to get into crystal and would like to contribute somewhere useful
<FromGitter>
<Blacksmoke16> anything in particular?
<FromGitter>
<watzon> There are plenty of areas that need help
<FromGitter>
<watzon> APIs that need wrappers, social auth systems like passport, a fully functional static site generator, etc
<FromGitter>
<watzon> What would be the Crystal equivalent of `Array#pack('Q<')`?
<FromGitter>
<Blacksmoke16> idk what that does so :shrug:
<FromGitter>
<tenebrousedge> There is no Array#pack
<FromGitter>
<tenebrousedge> or String#unpack
<FromGitter>
<watzon> I'm aware
<FromGitter>
<watzon> Otherwise I'd use that
<FromGitter>
<watzon> In Ruby `[num].pack('Q<')` packs an unsigned little-endian 64-bit integer. So `[200000000].pack('Q<')` would return `"\x00\xC2\xEB\v\x00\x00\x00\x00"`
<FromGitter>
<watzon> I just don't know how to replicate that in Crystal
<FromGitter>
<tenebrousedge> I am also not aware, but I've had occasion to note the lack of these features before, and I would definitely be willing to commit some time to porting the Ruby version
<FromGitter>
<Blacksmoke16> and whats all that supposed to be?
<FromGitter>
<Blacksmoke16> ah
<FromGitter>
<Blacksmoke16> so you just want to convert a number to hex?
<FromGitter>
<Blacksmoke16> is that the jist of this?
<FromGitter>
<watzon> Not quite, really what I need to do is encode a number into a little endian binary string, but I think I figured out how to do it whout pack
<FromGitter>
<watzon> It's just a lot more involved
<FromGitter>
<tenebrousedge> `pack` is a way of being extremely specific about how numbers are represented in memory
<FromGitter>
<tenebrousedge> I mean, computers are good at bit manipulation, right?
moei has quit [Quit: Leaving...]
<FromGitter>
<watzon> That's pretty much all they're good at
<FromGitter>
<watzon> Wow. The IO method is about 35% faster.
<FromGitter>
<Blacksmoke16> nice
<FromGitter>
<watzon> @Blacksmoke16 do you know how to format the string as a hex string instead of unicode? Right now it's a lot of `"\u0001\u0000\u0000\u0000\u0000`