havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.1, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
ox1eef_ has quit [Quit: Leaving]
DESNUDOPENGUINO has quit [Read error: Connection reset by peer]
DESNUDOPENGUINO has joined #ruby
defectiverobot has joined #ruby
ox1eef_ has joined #ruby
ollysmith has quit [Ping timeout: 265 seconds]
lagash has quit [Quit: ZNC - https://znc.in]
hays has quit [Remote host closed the connection]
defectiverobot has quit [Ping timeout: 265 seconds]
lagash has joined #ruby
hays has joined #ruby
nirvdrum has joined #ruby
rvalue has quit [Quit: ZNC - https://znc.in]
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
DESNUDOPENGUINO1 has joined #ruby
DESNUDOPENGUINO has quit [Ping timeout: 248 seconds]
DESNUDOPENGUINO1 is now known as DESNUDOPENGUINO
markong has quit [Ping timeout: 240 seconds]
hansolo has quit [Ping timeout: 255 seconds]
rvalue has joined #ruby
hansolo has joined #ruby
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
Mikaela has quit [Ping timeout: 255 seconds]
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
ollysmith has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
razetime has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
lagash has quit [Quit: ZNC - https://znc.in]
nirvdrum has joined #ruby
c10l has joined #ruby
lagash has joined #ruby
moldorcoder7 has quit [Ping timeout: 240 seconds]
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
razetime has quit [Ping timeout: 240 seconds]
lagash has joined #ruby
helge has quit [Ping timeout: 240 seconds]
helge has joined #ruby
lagash has quit [Read error: Connection reset by peer]
lagash has joined #ruby
rvalue has quit [Ping timeout: 255 seconds]
rvalue has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
razetime has joined #ruby
lagash has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
kaivai_ has quit [Ping timeout: 268 seconds]
comet23 has joined #ruby
grenierm has joined #ruby
kaivai has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.8]
gr33n7007h has joined #ruby
cnsvc has quit [Quit: %bye%]
cnsvc has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 255 seconds]
quazimodo has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
mexen has joined #ruby
lagash has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
comet23 has quit [Quit: Client closed]
Sankalp has quit [Ping timeout: 264 seconds]
Sankalp- has joined #ruby
Sankalp- is now known as Sankalp
otisolsen70 has joined #ruby
shokohsc has quit [Ping timeout: 250 seconds]
shokohsc5 has joined #ruby
shokohsc5 is now known as shokohsc
lagash has quit [Quit: ZNC - https://znc.in]
nirvdrum has quit [Quit: nirvdrum]
lagash has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
grenierm has quit [Ping timeout: 260 seconds]
lagash has joined #ruby
ur5us has joined #ruby
razetime has quit [Ping timeout: 276 seconds]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
razetime has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
_ht has joined #ruby
legahc has quit [Quit: %bye%]
legahc has joined #ruby
lagash has joined #ruby
hays has quit [Read error: Connection reset by peer]
razetime1 has joined #ruby
razetime has quit [Ping timeout: 246 seconds]
razetime1 is now known as razetime
lagash has quit [Quit: ZNC - https://znc.in]
gr33n7007h has quit [Ping timeout: 265 seconds]
gr33n7007h has joined #ruby
Bish has quit [Ping timeout: 276 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
Bish has joined #ruby
razetime has quit [Quit: See You Space Cowboy]
quazimodo has quit [Ping timeout: 252 seconds]
infinityfye has joined #ruby
hays has joined #ruby
gaping has joined #ruby
gaping has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
niv has joined #ruby
TomyWork has joined #ruby
cybniv has quit [Ping timeout: 264 seconds]
rf has quit [Remote host closed the connection]
rf has joined #ruby
lagash has joined #ruby
bubbler has quit [Remote host closed the connection]
moldorcoder7 has joined #ruby
markong has joined #ruby
bagatur has joined #ruby
<bagatur> hello, I am having issues trying to install 'mysql2' gem on windows 10. I tried supplying the mysql include and lib folders for "mysql server 8.0", "connector c++ 8.0" and "mysql-connector-c-6.1.11"
mexen has quit [Quit: Connection closed for inactivity]
<bagatur> before that I get an error indicating failure of init transaction for "mingw libmariadbclient" and saying pacman failed
bubbler has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
<bubbler> @weaksauce: Was able to get it to work. My problem was, that my specs were wrapped in a Module. Removed the Module and it works perfectly now. Thanks for your hint with the solargraph download-core; yard gems; solargraph bundle; sequence of commands. Something solid to hold on to. :)
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
bagatur_ has joined #ruby
bagatur has quit [Ping timeout: 265 seconds]
bubbler has quit [Quit: WeeChat 3.8]
Tempesta has quit [Quit: See ya!]
<cxl> So I'm still confused how the ruby ecosystem handles semver compliant versions that include a prerelease number. Rubygems recommends 1.0.0.alpha.1, but the semver standard would use 1.0.0-alpha1. What would happen with a semver-compliant version string? Will it still be handled as a prerelease by all the Ruby tools?
bubbler has joined #ruby
mexen has joined #ruby
bubbler has quit [Quit: WeeChat 3.8]
bubbler has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum_ has joined #ruby
Tempesta has joined #ruby
bagatur_ is now known as bagatur
bubbler has quit [Quit: WeeChat 3.8]
nirvdrum_ has quit [Remote host closed the connection]
bubbler has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
rf_ has joined #ruby
rf has quit [Ping timeout: 248 seconds]
razetime has joined #ruby
DESNUDOPENGUINO is now known as desnudopenguino
ht_ has joined #ruby
_ht has quit [Ping timeout: 246 seconds]
ht_ is now known as _ht
defectiverobot has joined #ruby
markong has quit [Ping timeout: 268 seconds]
John_Ivan has joined #ruby
<John_Ivan> does ruby support the separation of declaration and implementation of code in separate files the way .h header files and .c code files work in C?
rf has joined #ruby
rf_ has quit [Quit: Leaving]
razetime has quit [Quit: See You Space Cowboy]
defectiverobot has quit [Ping timeout: 265 seconds]
<adam12> John_Ivan: No.
<John_Ivan> I see. thanks.
<adam12> I mean, you could just define empty method bodies if you wanted...
<adam12> I'm sure it would be fine, but might warn.
<John_Ivan> yeah. cheers.
<adam12> Paired with Ruby 3 endless methods, it might be fairly close.
<adam12> def method()= nil; def other_method()= nil; then in other fine, def method(); implementation.
<adam12> If you're at that point, I'd probably just use RBS. But I am not sure of your ultimate use case.
cek has joined #ruby
<John_Ivan> adam12, what's RBS? my goal is just organization.
bagatur has left #ruby [Leaving]
<John_Ivan> hobby project. I just want to be clean.
<adam12> John_Ivan: It's a file format for Ruby 3 type support that defines the method signatures.
<John_Ivan> oh nice
<adam12> Technically it's use for type checking, but if you wanted to just use it for documentation and ignored the errors it might be OK too.
rvalue has quit [Quit: ZNC - https://znc.in]
rvalue has joined #ruby
__ht has joined #ruby
_ht has quit [Ping timeout: 240 seconds]
__ht is now known as _ht
lagash has joined #ruby
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
markong has joined #ruby
dmn has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
TomyWork has quit [Remote host closed the connection]
markong has quit [Ping timeout: 268 seconds]
mooff has joined #ruby
lagash has joined #ruby
TomyWork has joined #ruby
markong has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
tuelz has joined #ruby
leftylink has quit [Quit: leaving]
leftylink has joined #ruby
shokohsc8 has joined #ruby
shokohsc has quit [Ping timeout: 240 seconds]
shokohsc8 is now known as shokohsc
cek has quit [Quit: Connection closed for inactivity]
crankharder has joined #ruby
markong has quit [Ping timeout: 255 seconds]
dmn has quit [Quit: Client closed]
tuelz has quit [Quit: Client closed]
tuelz has joined #ruby
mexen has quit []
lagash has quit [Quit: ZNC - https://znc.in]
lagash has joined #ruby
rf has quit [Quit: Leaving]
weyhmueller has quit [Quit: ZNC - https://znc.in]
weyhmueller has joined #ruby
Vonter has quit [Ping timeout: 265 seconds]
swaggboi has quit [Ping timeout: 246 seconds]
swaggboi has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
<ox1eef_> John_Ivan: What would be the point of that ? But yeah, RBS would be what's most similar to it.
lagash has quit [Quit: ZNC - https://znc.in]
TomyLobo has joined #ruby
crankharder has joined #ruby
lagash has joined #ruby
TomyWork has quit [Quit: Leaving]
_ht has quit [Quit: _ht]
crankharder has quit [Ping timeout: 268 seconds]
FetidToot has quit [Ping timeout: 255 seconds]
FetidToot has joined #ruby
crankharder has joined #ruby
lagash has quit [Quit: ZNC - https://znc.in]
crankharder has quit [Ping timeout: 276 seconds]
lagash has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
crankharder has joined #ruby
otisolsen70 has quit [Quit: Leaving]
markong has joined #ruby
felipec has joined #ruby
<felipec> If I do `string.unpack(format)` the result would read a certain amount of bytes from the string, for example "LCCCC" would be 8 bytes. Is there a way to find out the size of that packed format?
<felipec> So for example I could do `io.read(sizeof("LCCC"))`
lagash has quit [Quit: ZNC - https://znc.in]
<ox1eef_> felipec: String#bytesize ? You could do it before or after the unpack.
lagash has joined #ruby
<felipec> ox1eef_: that has nothing to do with what I want. I need the size *before* the read. I have no string to do `bytesize` on.
infinityfye has quit [Read error: Connection reset by peer]
<felipec> The documentation of `IO.read()` actually gives an example: `len = f.read(4); len = len.unpack("N")[0]`
<weaksauce> i don't think it's knowable unless you have simple patterns
<weaksauce> you could parse the template and calculate it if you don't have a * modifier
dorian has quit [Ping timeout: 260 seconds]
<felipec> Yeah, that's what I'm doing. Doesn't seem like there's any other way.
<felipec> This seems to do the trick for a small subset of directives: sizes = { L: 4, S: 2, a: 1 }
<felipec> format.scan(/([LSa])(\d+)?/).reduce(0) do |a,(directive,n)|
<felipec> a += sizes[directive.to_sym] * (n ? n.to_i : 1)
<felipec> end
<leftylink> for this purpose I wonder if there's a funny fake string class that tells you how many bytes were read from it
<leftylink> let's see
<ox1eef_> It is only possible to know ahead of time if you're writing to the IO as well, in that case you can keep track of the size of each message.
<leftylink> a shame
<leftylink> and the impl of unpack also doesn't show a way to do it
<leftylink> let me take this moment to remind that reduce(0) { |a, _| a += ... } is always #sum
lagash has quit [Quit: ZNC - https://znc.in]
<ox1eef_> You could use read_nonblock(1) as well. Increment by 1 until it finally blocks, and raises an exception - meaning there's nothing left.
pvalenta_ has joined #ruby
pvalenta has quit [Read error: Connection reset by peer]
<felipec> leftylink: right, I didn't know sum could take a block
<felipec> Here's a simple implementation to read and unpack: https://dpaste.org/0PDXW
lagash has joined #ruby
dactyl34 has joined #ruby
dactyl34 has quit [Max SendQ exceeded]
dactyl34 has joined #ruby
dactyl34 has quit [Max SendQ exceeded]
tomtmym has quit [Quit: Gone.]