<HyFlex>
What I'm trying to do is output the keystream before it is XORd with the plaintext to produce the cyphertext. From my understanding this happens on line 14 of the code. I've tried returning the value in @state but I only get 256 integers returned regardless of text length. What is it about the .setbye and getbyte that makes it behave differently?
BSaboia has joined #ruby
dfucci has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
somazero has quit [Quit: Leaving]
ruurd has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
somazero has joined #ruby
somazero has quit [Client Quit]
drincruz has joined #ruby
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 260 seconds]
lucidreamachine has quit [Read error: Connection reset by peer]
lucidreamachine has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
dionysus69 has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
Garb0 has joined #ruby
TCZ has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
BSaboia has joined #ruby
<nakilon>
what is the simplest/cleanest/shortest way to take a 2-dimensional array with lines of different length and add a predefined value to each line enough times to make all the lines to be the same length, effectively making the initial array rectangular?
BSaboia has quit [Quit: This computer has gone to sleep]
<nakilon>
nvm
<nakilon>
btw about my yesterday's question about splitting
<nakilon>
there is also some special case about the end of the string
<leftylink>
> Similarly, \&, \', \`, and + correspond to special variables, $&, $', $`, and $+, respectively. (See regexp.rdoc for details.)
<leftylink>
that line specifically.
<leftylink>
I thank them for finally adding documentation for this fact in... 2.7 it looks like
<leftylink>
before them having documented that, there was almost no way to know that
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 258 seconds]
dfucci has quit [Ping timeout: 272 seconds]
Technodrome has joined #ruby
GodFather has joined #ruby
<akem>
Yay, thanks leftylink :)
aremaref has joined #ruby
GodFather_ has joined #ruby
austin880625 has joined #ruby
drincruz has quit [Ping timeout: 264 seconds]
austin880625 has left #ruby [#ruby]
impermanence has joined #ruby
aremaref has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
umjisus has quit [Quit: Lost terminal]
umjisus has joined #ruby
leftylink has quit [Remote host closed the connection]
leftylink has joined #ruby
Furai has quit [Quit: WeeChat 3.0]
Furai has joined #ruby
drincruz has joined #ruby
ellcs has joined #ruby
naftilos76 has joined #ruby
drincruz has quit [Ping timeout: 258 seconds]
<naftilos76>
Hi, i am trying to put together a website that i could save mqtt messages which during publishing are captured by the code in the link and are stored in a database table
<naftilos76>
I am thinking that if too many messages are sent to the broker the client.get("#") block code must be really fast so that it will not delay the block
<adam12>
naftilos76: I'd be inclined to introduce some sort of queue that just pops messages and writes them to the database.
<adam12>
naftilos76: Inside client.get, just push to the queue.
<naftilos76>
So i thought that if i could create a thread everytime a new mqtt message is captured that would introduce minimal delay to the client.get block
<naftilos76>
adam12: i have been reading during the last days about threads and also queue. So do you beleive that queue is the best approach?
<adam12>
naftilos76: Well it doesn't have to be `Queue` from stdlib explicitly, but maybe it's a Suckerpunch instance. Depends on if you need durability at all.
<naftilos76>
well i was thinking that under production conditions the stress would be imence so yes the solution has to be solid
<adam12>
naftilos76: If you're OK with no durability, you could use Suckerpunch, which has an inmemory queue. If you need durability, you'd need to persist the operations to disk.
<adam12>
naftilos76: But a lot of this is going to be "it depends". In reality, how much of a backlog would you end up with. If you had Suckerpunch running with 2-3 workers, would you ever have a backlog? You might only lose a single message upon restart, which might be acceptable.
drincruz has joined #ruby
<naftilos76>
i am facing an issue with retrieving lets say 15k of records. doing that takes over a second on a 10-core vps that i rented a few days ago so it has to be a type of cache unltimately located in ram
<naftilos76>
that is the only way to get that data fast
<naftilos76>
mysql is not fast enough especially when the data you are asking for is not the same with the previous query
<adam12>
Well you're probably going to be IO bound, so either you take the chance by queuing and writing, or you write immediately but is slower. If you queue and want to prevent IO, you're risking durability.
<naftilos76>
ok thanks for your time - i will have a look and run some tests
<adam12>
I don't think ActiveRecord supports multi-INSERT but that would be an option to explore for speed.
<adam12>
Sequel does if you'e problem is self-contained and you could use Sequel instead of AR here.
<naftilos76>
i have to do that with mysql2 gem or something
<naftilos76>
insert by writing raw sql
<naftilos76>
multiple records
somazero has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
hiroaki has quit [Ping timeout: 272 seconds]
<akem>
Hey, in Dir.glob("**/*") to list all files and directories, why is it "**/*" and not just "*/*"?
<akem>
I've read that on stackoverflow, but i try with just "*/*" and it looks like it works too, but there is maybe a difference, need to check.
<akem>
Hm no it's not the same.
<adam12>
akem: I'm not sure I've ever looked too deeply into it, but generally `**` is a recursive match.
<akem>
Yeah it does not include first level dir files with only one *.
<adam12>
It's the same in a shell. */* will match single level, **/* will match everything.
<akem>
adam12, I don't know. But trying it with "ls", i got the same output for both on Ubuntu.
<akem>
List all subfolders and content, but not regular files at 1st level './'
hiroaki has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem_ has joined #ruby
akem has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 256 seconds]
naftilos76 has quit [Quit: Leaving]
blackmesa1 has quit [Ping timeout: 272 seconds]
drincruz has quit [Ping timeout: 256 seconds]
BenDover has joined #ruby
blackmesa1 has joined #ruby
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 258 seconds]
weaksauce has joined #ruby
dhollinger has quit [Ping timeout: 272 seconds]
dhollinger has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
leftylink has quit [Quit: Lost terminal]
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
leftylink has joined #ruby
ChmEarl has quit [Quit: Leaving]
ChmEarl has joined #ruby
somazero has joined #ruby
Technodrome has joined #ruby
lucidreamachine has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
mohsen_in has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
mohsen_in has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 240 seconds]
lucidreamachine has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
BenDover has quit [Quit: BenDover]
lucidreamachine has joined #ruby
bambanx has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
duderonomy has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
lucidreamachine has quit [Ping timeout: 260 seconds]