jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
Al2O3 has joined #ruby
grokify has joined #ruby
tdcw has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
moldorcoder7 has quit [Ping timeout: 252 seconds]
tdcw has quit [Ping timeout: 248 seconds]
perrierjouet has joined #ruby
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m_antis has quit [Read error: Connection reset by peer]
tdcw has joined #ruby
m_antis has joined #ruby
tdcw has quit [Ping timeout: 264 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 264 seconds]
Sankalp- has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
Sankalp has quit [Ping timeout: 250 seconds]
Sankalp- is now known as Sankalp
_aeris_ is now known as aeris
jhawthorn has quit [Ping timeout: 250 seconds]
jhawthorn has joined #ruby
tdcw has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
nirvdrum has joined #ruby
Guest55 has joined #ruby
Guest55 has left #ruby [#ruby]
plujon has quit [Ping timeout: 264 seconds]
<Al2O3> is matz around these years?
tdcw has joined #ruby
tdcw has quit [Ping timeout: 246 seconds]
<libsys> hello gals... question... do you have an idea of how can I run only certain tests on each file by default with minitest?
<libsys> I'd like to mark slow tests, so I run these only when needed, while the others run every time
<Al2O3> maybe a time ruleset, mark time when entered, and exit/finish?
<Al2O3> with a threshold set for various levels?
<Al2O3> and each test has a level assigned to it regarding timeout?
<libsys> no, I want to literally mark tests on the function name... by default all functions that end with _test are run, I'd like to name slow tests _slow_test and only run those that don't include _slow in their names
<libsys> .. or something like that
<libsys> the timeout isn't a bad idea neither, but might hide some errors
<libsys> (test_ is actually a prefix on function names)
<libsys> ok... test_ is actually hardcoded :/ any idea on how to sole this? I don't like the idea of moving slow tests to different files, but probably is what I will end up doing
<libsys> s/sole/solve
tdcw has joined #ruby
tdcw has quit [Ping timeout: 248 seconds]
Sheilong has quit []
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
Vonter has joined #ruby
grokify has joined #ruby
drainpipe has joined #ruby
tdcw has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
drainpipe has quit [Ping timeout: 268 seconds]
tdcw has quit [Ping timeout: 264 seconds]
D_A_N has quit [Quit: leaving]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 246 seconds]
<leftylink> it looks like https://stackoverflow.com/questions/28609208/minitest-a-test-suite-with-method-level-granularity is a leading canidate for how to do this
ur5us has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
tdcw has joined #ruby
tdcw has quit [Ping timeout: 248 seconds]
desnudopenguino has quit [Remote host closed the connection]
svdasein_ has quit [Quit: Leaving]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 260 seconds]
drainpipe has joined #ruby
drainpipe has quit [Ping timeout: 246 seconds]
nirvdrum has quit [Quit: nirvdrum]
teclator has joined #ruby
svdasein has quit [Ping timeout: 260 seconds]
tdcw has joined #ruby
<sam113101> what to do when floats don't have enough precision?
tdcw has quit [Ping timeout: 260 seconds]
nirvdrum has joined #ruby
svdasein has joined #ruby
Rounin has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 258 seconds]
_aeris_ is now known as aeris
Guest376 has joined #ruby
stomper2 has joined #ruby
tdcw has joined #ruby
<Guest376> Hey guys, is this chat mainly communicated in english or in german?
cuntor2 has joined #ruby
tdcw has quit [Ping timeout: 246 seconds]
stomper2 has quit [Ping timeout: 268 seconds]
balo has quit [Changing host]
balo has joined #ruby
stomper2 has joined #ruby
stomper2 has quit [Client Quit]
CrazyEddy has quit [Ping timeout: 260 seconds]
cuntor2 has quit [Ping timeout: 268 seconds]
stomper2 has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
Vonter has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 246 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
<sam113101> Guest376: English
dionysus69 has joined #ruby
<Guest376> sam113101 thank you
acosta6 is now known as acosta
reset has quit [Quit: reset]
TomyWork has joined #ruby
tdcw has joined #ruby
Vonter has joined #ruby
tdcw has quit [Ping timeout: 264 seconds]
conrad has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
m_antis has quit [Ping timeout: 268 seconds]
conrad has quit [Quit: Leaving]
conrad has joined #ruby
Guest376 has quit [Quit: Client closed]
ur5us has joined #ruby
tdcw has joined #ruby
tdcw has quit [Ping timeout: 264 seconds]
walez has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 246 seconds]
tdcw has joined #ruby
Leo25 has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
rvalue has quit [Quit: ZNC - https://znc.in]
Leo25 has quit [Quit: Client closed]
moldorcoder7 has joined #ruby
cuntor2 has joined #ruby
stomper2 has quit [Ping timeout: 252 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 248 seconds]
drainpipe has joined #ruby
drainpipe has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 260 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 248 seconds]
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
Vonter has joined #ruby
rvalue has joined #ruby
stomper2 has joined #ruby
Stoffel has joined #ruby
cuntor2 has quit [Ping timeout: 268 seconds]
cuntor2 has joined #ruby
stomper2 has quit [Ping timeout: 260 seconds]
Vonter has quit [Ping timeout: 252 seconds]
tdcw has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
stomper2 has joined #ruby
Vonter has joined #ruby
cuntor2 has quit [Ping timeout: 268 seconds]
tdcw has joined #ruby
sagax has quit [Remote host closed the connection]
tdcw has quit [Ping timeout: 268 seconds]
lightstalker has quit [Quit: Bridge terminating on SIGTERM]
DenKn[m] has quit [Quit: Bridge terminating on SIGTERM]
jollyrogue[m] has quit [Quit: Bridge terminating on SIGTERM]
andrea[m] has quit [Quit: Bridge terminating on SIGTERM]
sixecho has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
m_antis has joined #ruby
leah2 has quit [Ping timeout: 264 seconds]
jhass[m] has joined #ruby
m_antis has quit [Ping timeout: 252 seconds]
some14u has joined #ruby
grokify has joined #ruby
Vonter has quit [Ping timeout: 246 seconds]
Vonter has joined #ruby
cuntor2 has joined #ruby
stomper2 has quit [Ping timeout: 252 seconds]
tdcw has joined #ruby
sixecho has joined #ruby
jollyrogue[m] has joined #ruby
DenKn[m] has joined #ruby
andrea[m] has joined #ruby
lightstalker has joined #ruby
tdcw has quit [Ping timeout: 268 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leah2 has joined #ruby
<libsys> Al2O3: leftylink: turns out there is an -e option on the minetest command, which allows me to exclude tests based on patterns
RougeR has joined #ruby
<libsys> simply adding --exclude='/_slow$/' does the job
<libsys> thanks for the help!
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Vonter has quit [Ping timeout: 252 seconds]
tdcw has joined #ruby
RougeR has quit [Ping timeout: 264 seconds]
tdcw has quit [Ping timeout: 268 seconds]
Vonter has joined #ruby
sagax has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
Guimauve has joined #ruby
svdasein has quit [Remote host closed the connection]
nirvdrum has joined #ruby
Guimauve has quit [Client Quit]
D_A_N has joined #ruby
RougeR has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
RougeR has quit [Read error: Connection reset by peer]
jetchisel has quit [Ping timeout: 250 seconds]
jetchisel has joined #ruby
tdcw has joined #ruby
cuntor2 has quit [Remote host closed the connection]
drainpipe has joined #ruby
drainpipe has quit [Client Quit]
Fleeno has joined #ruby
stomper2 has joined #ruby
cuntor2 has joined #ruby
stomper2 has quit [Ping timeout: 248 seconds]
tdcw has quit [Ping timeout: 264 seconds]
cuntor2 has quit [Remote host closed the connection]
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fleeno has joined #ruby
some14u has joined #ruby
moldorcoder7 has quit [Ping timeout: 252 seconds]
moldorcoder7 has joined #ruby
m_antis has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
<adam12> libsys: You could also add a slow method that skips unless ENV["SLOW"] is set or something.
<adam12> def slow; skip "Ignoring slow test" unless ENV["SLOW"]; end; def test_foo; slow; assert sleep 120; end;
<adam12> sam113101: Maybe BigDecimal? How much precision do you need?
Tempesta has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
<aestheti1> UnbelievablyLargeDecimal
Vonter has quit [Ping timeout: 268 seconds]
<adam12> :P
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nirvdrum has joined #ruby
jollyrogue[m] has quit [*.net *.split]
marahin has quit [*.net *.split]
Bounga has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
frodl has quit [*.net *.split]
Awoobis has quit [*.net *.split]
r3m has quit [*.net *.split]
oz has quit [*.net *.split]
Xeago has quit [*.net *.split]
depesz has quit [*.net *.split]
Bounga has joined #ruby
marahin has joined #ruby
frodl has joined #ruby
nyuszika7h has joined #ruby
Xeago has joined #ruby
nyuszika7h has joined #ruby
nyuszika7h has quit [Signing in (nyuszika7h)]
ox has joined #ruby
tdcw has joined #ruby
depesz has joined #ruby
r3m has joined #ruby
A_Dragon has joined #ruby
jollyrogue[m] has joined #ruby
sagax has quit [Remote host closed the connection]
tdcw has quit [Quit: WeeChat 3.7]
Fleeno has joined #ruby
<aestheti1> libsys you should check out https://github.com/indydevs/flutter possibly
nirvdrum has quit [Quit: nirvdrum]
some14u has joined #ruby
desnudopenguino has joined #ruby
stomper2 has joined #ruby
stomper2 has quit [Client Quit]
stomper2 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grokify has quit [Remote host closed the connection]
plujon has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
A_Dragon is now known as Awoobis
grokify has quit [Remote host closed the connection]
walez has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
lagash has quit [Remote host closed the connection]
marahin has quit [Changing host]
marahin has joined #ruby
grokify has quit [Remote host closed the connection]
_ht has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
Vonter has joined #ruby
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grokify has joined #ruby
drainpipe has joined #ruby
grokify has quit [Ping timeout: 268 seconds]
wand_ is now known as wand
stomper2 has quit [Ping timeout: 268 seconds]
Fleeno has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
lagash has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
delsol has joined #ruby
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
<delsol> I am working with TCP socket with ruby, but it seems it is sending TCP options values, and there isn't much documentation on disabling that, or on not sending ACK until I send next write (and send as 1 packet)
<adam12> delsol: Share code?
stomper2 has joined #ruby
stomper2 has quit [Ping timeout: 250 seconds]
<delsol> yeah, gimme a sec.
<delsol> so, using wireshark to look at packets, the packets the ruby code shits out have 12 bytes of TCP options... whereas the packets I'm trying to copy have none. Additionally, when I get the 1 byte 0x06 response packet, the ruby code sends an ACK, where the communication I'm trying to duplicate doesn't ACK it, until it sends the next chunk of data (10 byes), and sends the ACK with the next row of data in same packet.
<delsol> ok... so adding sock.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NOOPT, 1) fixes the 12 bytes of TCP options issue. Getting closer.
conrad has quit [Quit: Leaving]
drainpipe has quit [Ping timeout: 268 seconds]
<adam12> hmm
<delsol> its talking to a deli scale, that has no communications documentation other than what I can get out of wireshark with its windows app....
Sheilong has joined #ruby
<delsol> and most of the PLU/product data is an absolute mess. Some stuff saved as decimal digits encoded in hex, some stuff saved as ASCII, some 3 digit numbers encoded into 2 bytes of hex, but with the byte order reversed...
<delsol> I've gotten through all of that.
<delsol> but to set the hotkeys, I have to write ALL 56 hotkeys of page1, page2, page3.... in order, one key per packet....
<delsol> or at least thats what it seems like...
<Al2O3> libsys: glad at some level what I thought was there, or should be there, is there :)
stomper2 has joined #ruby
some14u has joined #ruby
Fleeno has joined #ruby
Fleeno has quit [Client Quit]
<weaksauce> delsol sounds fun
<delsol> not so much.
Fleeno has joined #ruby
drainpipe has joined #ruby
<weaksauce> how sure are you that the plu data is that chaotic?
drainpipe has quit [Ping timeout: 248 seconds]
delsol has quit [Remote host closed the connection]
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drainpipe has joined #ruby
dionysus69 has joined #ruby
Vonter has quit [Ping timeout: 268 seconds]
reset has joined #ruby
TomyWork has quit [Remote host closed the connection]
delsol has joined #ruby
<delsol> weaksauce: very sure. I'm able to write PLU data manually already, as well as read it back out of the scale.
<delsol> I went through and configured PLU's with multiple values of every data field in the windows software, and wireshark'd it to read the bytecode.
<sam113101> "1020304050607080900" =~ /1?2?3?4?5?6?7?8?9?0/
<sam113101> how is that not matching
<weaksauce> interesting any idea why?
<weaksauce> sam113101 it does?
<delsol> I believe this isn't gen1 of the scale... and that this is generation umpteen, and that the original scale was likely serial only, microcontroller based, and maybe mid-80s
<delsol> and that as extra fields were required, and more space was required, they did the "new" thing, on the newer fields.
<weaksauce> i wonder if the format changes based on the length?
<delsol> for example, fields that contain a string, like "itemname" or "ribeye"
<delsol> change the length of the overall PLU string, and first encode the number of characters of the string.
<delsol> followed by those characters, one per byte, in ASCII
<delsol> So that portion of the PLU, "[6, 82, 105, 98, 101, 121, 101]" (Decimal byte values) 6 = 6 chars long, followed by those 6 chars
<weaksauce> reasonable
<delsol> want to make it ribeyee?, change first byte to 7, add another 101 in there.
<delsol> so, if you have a mostly empty PLU, its shorter, lots of 0's
<delsol> but, since that whole conversation isn't much back and forth, its basically say hello, wait for the response, send header, send PLU.... and it works.
<delsol> but the PLU hotkey settings... is all 168 keys (56 keys, 3 pages...)
<weaksauce> what deli slicer is it?
<delsol> deli scale
<delsol> US-DL9000
* delsol is mostly away right now, onsite at service call, away from the stupid scale for an hour or so...
<sam113101> weaksauce: it doesn't?
<weaksauce> sam113101 it certainly does
<weaksauce> 0th position
<adam12> >> true
eddof13 has quit [Ping timeout: 268 seconds]
eron has joined #ruby
eron has quit [Client Quit]
<sam113101> now how is that not matching
<sam113101> "1020304050607080900" =~ /^1?2?3?4?5?6?7?8?9?0$/
<adam12> sam113101: What's your goal here?
<adam12> I think you want `.` and not `?` in your regexp, but it's hard to know without what you're looking to do.
<sam113101> make sure I match against the entire string instead of only part of it
<adam12> "1020304050607080900".match?(/\A1.2.3.4.5.6.7.8.9.0\z/)
<sam113101> why is that matching? '1020304052423222121' =~ /1?2?3?4?5?6?7?8?9?0/
<sam113101> I hate regexes lmao
<sam113101> wait
<sam113101> yeah I think I'm mixing regex and shell globing here lmao
walez has joined #ruby
ur5us has joined #ruby
_ht has quit [Remote host closed the connection]
delsol has quit [Remote host closed the connection]
walez has quit [Ping timeout: 264 seconds]
stomper2 has quit [Ping timeout: 268 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fleeno has joined #ruby
Fleeno has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drainpipe has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
<sam113101> wow
<sam113101> range.sum is a lot faster than range.inject(&:+), I wonder why
<leftylink> pandabot: rdoc Range#sum
<leftylink> pandabot: ri Range#sum
<leftylink> pandabot: ri Enumerable#sum
<leftylink> that's already explained why
<leftylink> so, no longer need to wonder after reading that
drainpipe has joined #ruby
<havenwood> TL;DR: Gauss’s summation formula
mikecmpbll has joined #ruby
drainpipe has quit [Ping timeout: 246 seconds]
<havenwood> You can do similar for `range.inject(&:*)` if you want to get Mathy.
zoknert has joined #ruby
<havenwood> (1..5).reduce(:*) == Integer(Math.gamma(5.succ))
<havenwood> It gets faster implemented in C, but even in Ruby the mathy version should be a few times faster.
mikecmpbll has quit [Ping timeout: 268 seconds]
<havenwood> Oddly, in C I'm seeing gamma slower than manual iteration. ¯\_(ツ)_/¯ In Ruby the opposite.
grokify has joined #ruby
<sam113101> I don't know what the Gauss summation formula is nor what gamma is
mikecmpbll has joined #ruby
<leftylink> that sounds like an easy problem to fix
<sam113101> nah I'm good
<sam113101> now explain something to me you nerds
<leftylink> pandabot: tell sam113101 gg
<pandabot> sam113101: goodgrief is: https://i.imgur.com/bf0ZlcD.jpg
<leftylink> pandabot: tell sam113101 spoonfeed
<pandabot> sam113101: spoonfeed is: idk you figure that out i'm not gonna spoonfeed you something you signed up for lmao
<sam113101> how come number.prime? is much much faster than Prime.prime?(number)
dionysus69 has quit [Ping timeout: 252 seconds]
grokify has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
<leftylink> dang, I would have thought they do the same thing. how am I supposed to remember which one is the correct one to use now, if they are different?
<sam113101> I have replaced all of my uses of Prime.prime?(number) for number.prime?
<sam113101> sped my programs like 100 folds maybe more
thecliguy has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
<havenwood> Strange indeed they're implemented differently. https://gist.github.com/havenwood/c1931cec804c09fd28193606d42a6c51
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
thecliguy has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
<jidar> which one was faster? the Int one havenwood linked?
mikecmpbll has joined #ruby
<sam113101> I don't understand this generator thing honestly
<sam113101> like it's supposed to prune numbers that aren't divisble by or 2 or 3, by default?
<sam113101> not prune
<sam113101> select
<jidar> how big are the numbers you're checking for prime?
<sam113101> jidar: 7 digits
<sam113101> with Prime.prime? it would have taken forever
<sam113101> with number.prime? it's doable
<sam113101> it's giving me hope
mikecmpbll has quit [Ping timeout: 252 seconds]
<jidar> there's lots of tricks to make this sort of check faster, and I'm not sure what's the currently most computationally efficient way to check either
zoknert has quit [Ping timeout: 248 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<sam113101> sometimes my pry sessions break and my keyboard shortcuts stop working
<sam113101> like ctrl+a and ctrl+e
mikecmpbll has joined #ruby
drainpipe has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
drainpipe has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
<sam113101> is there a shorter way of doing array.map { |n| n&.prime? }
thecliguy has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
eddof13 has joined #ruby
thecliguy has joined #ruby
eddof13 has quit [Client Quit]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]