<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]
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)
<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.
<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...
<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
<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