havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
gusrub has quit []
gusrub has joined #ruby
despai has joined #ruby
xaviergmail has joined #ruby
Kug3lis has joined #ruby
AndrewIsHere has joined #ruby
<xaviergmail> I keep wanting to use hash.key instead of hash[:key] from my Lua habits
<xaviergmail> Is there a cure
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
_Mon_Ouie_ is now known as Mon_Ouie
hotpancakes has quit [Remote host closed the connection]
marr has quit [Ping timeout: 245 seconds]
lmc has joined #ruby
cdg has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
xlegoman has quit [Quit: xlegoman]
pawnbox has joined #ruby
bronson has joined #ruby
lmc has quit [Ping timeout: 268 seconds]
jhack has quit [Quit: jhack]
c355e3b has quit [Quit: Connection closed for inactivity]
diamondhash has joined #ruby
xlegoman has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
bronson has quit [Ping timeout: 246 seconds]
gusrub has quit []
<apeiros> xaviergmail: openstruct
jottr has quit [Ping timeout: 260 seconds]
<apeiros> alternatively I heard hammers work well
hotpancakes has joined #ruby
jottr has joined #ruby
pwnd_nsfw has joined #ruby
hotpancakes has quit [Remote host closed the connection]
ruid has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
braincrash has quit [Ping timeout: 245 seconds]
nankyokusei has joined #ruby
Asher has quit [Quit: Leaving.]
nankyokusei has quit [Ping timeout: 264 seconds]
despai has quit [Quit: This computer has gone to sleep]
hotpanca_ has joined #ruby
milardovich has quit []
splud has quit [Quit: splud]
pwnd_nsfw` has joined #ruby
jshjsh has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
pwnd_nsfw has quit [Ping timeout: 258 seconds]
JoshS has quit [Ping timeout: 268 seconds]
braincrash has joined #ruby
felltir has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
newbie1 has quit [Ping timeout: 264 seconds]
xlegoman has quit [Quit: xlegoman]
polysics has joined #ruby
DLSteve has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
hotpancakes has joined #ruby
DTZUZU has joined #ruby
lmc has joined #ruby
ruid has quit [Ping timeout: 265 seconds]
Asher has joined #ruby
xaviergmail has quit [Ping timeout: 248 seconds]
lmc has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
last_staff has quit [Quit: last_staff]
bronson has quit [Ping timeout: 256 seconds]
testuser1 has joined #ruby
sarbs_ is now known as sarbs
felltir has quit []
hotpancakes has quit [Remote host closed the connection]
jshjsh has quit [Ping timeout: 248 seconds]
jhack has joined #ruby
benlieb has joined #ruby
hotpancakes has joined #ruby
Asher has quit [Quit: Leaving.]
enyo has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
benlieb has quit [Quit: benlieb]
diamondhash has quit [Ping timeout: 260 seconds]
enyo has quit [Ping timeout: 252 seconds]
jottr has quit [Quit: WeeChat 1.5]
Azure has joined #ruby
bmurt has joined #ruby
_whitelogger has joined #ruby
polysics has quit [Remote host closed the connection]
bronson has joined #ruby
AndrewIsHere has joined #ruby
matp has quit [Quit: Bye!]
matp has joined #ruby
minimalism has quit [Quit: minimalism]
AndrewIsHere has quit [Ping timeout: 245 seconds]
bronson has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
tvon has joined #ruby
mwlang has quit [Quit: mwlang]
tvw has joined #ruby
xaviergmail has joined #ruby
nankyokusei has joined #ruby
tvon has quit [Ping timeout: 265 seconds]
<manveru> ytti: also check out railsexpress patches, they improve the GC queryability
nankyokusei has quit [Ping timeout: 246 seconds]
despai has quit [Quit: Leaving]
dar123 has joined #ruby
<ytti> manveru, i'm not running rails app, does it still apply?
<manveru> yes, it's a patch for MRI
jhack has joined #ruby
enilsen16 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
genpaku has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
<hanmac> xD from eclipse there is a build-version named "Eierlegende Wollmilchsau" XD
jhack has quit [Quit: jhack]
muelleme has joined #ruby
jenrzzz has joined #ruby
houhoulis has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
xrlk has joined #ruby
dn` has quit [Ping timeout: 245 seconds]
xrlk has quit [Remote host closed the connection]
blackbombay has quit [Ping timeout: 268 seconds]
hotpancakes has joined #ruby
maattdd has joined #ruby
blackbom1 has joined #ruby
blackbom1 has quit [Client Quit]
hotpancakes has quit [Ping timeout: 245 seconds]
dn` has joined #ruby
frozengeek has joined #ruby
matp_ has joined #ruby
kayla has joined #ruby
JoshS has joined #ruby
<kayla> sorry -- basic question for noob -- do variables persist through iterations of blocks
matp has quit [Ping timeout: 246 seconds]
<lupine> soahccc: yup, that's happening
<kayla> i'll try to write an example
<lupine> it'd be completely unbearable otherwise, rather than merely embarrassing
hotpancakes has joined #ruby
polysics has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
jshjsh has quit [Ping timeout: 268 seconds]
<kayla> ah -- if i define a beforehand it works
bronson has joined #ruby
matp_ is now known as matp
porfa has joined #ruby
polysics has quit [Ping timeout: 258 seconds]
frozengeek_ has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
maattdd has quit [Remote host closed the connection]
frozengeek has quit [Ping timeout: 246 seconds]
maattdd has joined #ruby
frozengeek_ has quit [Ping timeout: 248 seconds]
kayla has quit [Ping timeout: 260 seconds]
<PaulePanter> Hi.
<PaulePanter> W = ["a", "b", "c", "d"]
<PaulePanter> M = ["e", "f", "g", "h"]
<PaulePanter> I’d like to get all combinations of four pairs (no doubles).
<PaulePanter> I know about `product()`, but that doesn’t help here.
<PaulePanter> [[[a, f], [b, e], [c, h], [d, g]], […], …]
xrlk has joined #ruby
<lupine> so you want Array#combination ?
<manveru> all combinations of the 8 elements?
<manveru> is order important?
<manveru> is [a,b] == [b,a]?
<PaulePanter> manveru: No, only between the two array elements.
<manveru> so many questions :)
<PaulePanter> The first place should be an element from W, and the second from M.
<PaulePanter> lupine: I don’t see how.
<manveru> then just use map
<hanmac> PaulePanter: he wants pairs, so doing W.product(M) ... then he wants combinations of 4 pairs ... so combination(4) ... that is a Enumerator, so he probably wants to_a
<lupine> (W + M).combination(2) ?
<manveru> W.map{|w| M.map{|m| [w,m] }}
<lupine> ah, I guess that's not quite right
<PaulePanter> lupine: No. [a, b] is not allowed in there.
<PaulePanter> manveru: That’s also not it.
* PaulePanter is sorry for apparently being unable to explain.
<manveru> can you write a test for it? :)
<hanmac> PaulePanter: did you try my way?
dviola has joined #ruby
<PaulePanter> W.product(M).combination(4).to_a
<PaulePanter> … that’s also not it.
<PaulePanter> [["d", "e"], ["d", "f"], ["d", "g"], ["d", "h"]]
<hanmac> whot? what is wrong with that?
<PaulePanter> … is not allowed in there.
<PaulePanter> Maybe I just give the model.
<PaulePanter> W contains the first letter of women names, and M the first letters of men names.
xrlk has quit [Quit: HEIL HITLER]
<PaulePanter> They want to play table tennis, and I want to get all pairings, when everyone plays exactly one game.
<manveru> so... why is my code wrong then?
<hanmac> >> W.product(M).permutation(4).reject {|d| d.map(&:first).uniq! || d.map(&:last).uniq!}.size
<ruby[bot]> hanmac: # => uninitialized constant W (NameError) ...check link for more (https://eval.in/707160)
kareelee has joined #ruby
<PaulePanter> manveru: In [["d", "e"], ["d", "f"], ["d", "g"], ["d", "h"]] the woman d plays four times.
<hanmac> >> ["a", "b", "c", "d"].product(["e", "f", "g", "h"]).permutation(4).reject {|d| d.map(&:first).uniq! || d.map(&:last).uniq!}.size
<ruby[bot]> hanmac: # => 576 (https://eval.in/707161)
hotpanca_ has quit [Remote host closed the connection]
<manveru> PaulePanter: she wants to play against everybody of the men, no?
<hanmac> >> ["a", "b", "c", "d"].product(["e", "f", "g", "h"]).combination(4).reject {|d| d.map(&:first).uniq! || d.map(&:last).uniq!}.size
<ruby[bot]> hanmac: # => 24 (https://eval.in/707162)
<manveru> >> %w[a b c d].map{|x| %w[l m n o].map{|y| [x, y] }}.flatten(1)
<ruby[bot]> manveru: # => [["a", "l"], ["a", "m"], ["a", "n"], ["a", "o"], ["b", "l"], ["b", "m"], ["b", "n"], ["b", "o"], ["c ...check link for more (https://eval.in/707163)
<PaulePanter> hanmac: Looks promising.
<Papierkorb> use #flat_map instead of .map{}.flatten(1)
<PaulePanter> manveru: No, everyone just plays one game.
<manveru> so you have a total of 4 matches?
<PaulePanter> manveru: Yes.
<Papierkorb> PaulePanter: %w[a b c d].zip(%w[e f g h])
<manveru> 4 x 1v1
<PaulePanter> hanmac: The order in the four pairs doesn’t matter.
<PaulePanter> [["d", "h"], ["c", "g"], ["b", "f"], ["a", "e"]]
enyo has joined #ruby
<manveru> so yeah, what Papierkorb said
<Papierkorb> PaulePanter: if you want to randomize it a bit, just use Array#shuffle on both
<PaulePanter> [["a", "e"], ["b", "g"], ["c", "f"], ["d", "h"]]
<PaulePanter> Sorry, wrong paste.
<PaulePanter> Here is the right one: [["a", "e"], ["b", "f"], ["d", "h"], ["c", "g"]]
<hanmac> hey check out this:
<hanmac> >> w=("a".."d").to_a; m=("e".."h").to_a; w.size.times.map {|i| w.rotate(i).zip(m) }.flatten(1)
<ruby[bot]> hanmac: # => [["a", "e"], ["b", "f"], ["c", "g"], ["d", "h"], ["b", "e"], ["c", "f"], ["d", "g"], ["a", "h"], ["c ...check link for more (https://eval.in/707164)
<PaulePanter> Papierkorb: %w[a b c d].zip(%w[e f g h]) that’s just one possibility. I like to have all of the possible combinations of these.
phoo1234567 has joined #ruby
<Papierkorb> PaulePanter: what hanmac wrote
postmodern has quit [Quit: Leaving]
<hanmac> hm okay maybe without flatten at the end
<hanmac> do you guys like my use of rotate there? XD
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<PaulePanter> w=("a".."d").to_a; m=("e".."h").to_a; w.size.times.map {|i| w.rotate(i).zip(m) } that’s not all possible pairings.
enyo has quit [Ping timeout: 246 seconds]
<Papierkorb> PaulePanter: Please give the complete listing of the input and expected output
<PaulePanter> [[a, f], [b, e], [c, h], [d, g]] is not in there for example.
agit0 has joined #ruby
<PaulePanter> ["a", "b", "c", "d"].product(["e", "f", "g", "h"]).permutation(4).reject {|d| d.map(&:first).uniq! || d.map(&:last).uniq!} contains more pairings than necessary.
<PaulePanter> … as there are four table tennis tables (courts) four games will be in parallel.
prestorium has quit [Quit: Leaving]
<hanmac> PaulePanter: use the variant with combination
<PaulePanter> hanmac: I missed the variant with `combination()`. That’s indeed it.
<PaulePanter> Thank you everyone!
<hanmac> i had this too:
<hanmac> >> w=("a".."d").to_a; m=("e".."h").to_a; w.size.times.flat_map {|i| m.size.times.map {|j| w.rotate(i).zip(m.rotate(j)) } }
<ruby[bot]> hanmac: # => [[["a", "e"], ["b", "f"], ["c", "g"], ["d", "h"]], [["a", "f"], ["b", "g"], ["c", "h"], ["d", "e"]], ...check link for more (https://eval.in/707175)
<hanmac> but compared to combination ther are a few missing but i don't know why
<hanmac> hm and it has duplicates too :/
symm- has quit [Ping timeout: 248 seconds]
<PaulePanter> hanmac: My brain hurts just trying to understand it. So, I won’t probably find the error.
lightstalker has quit [Ping timeout: 246 seconds]
unreal_ has quit [Ping timeout: 245 seconds]
DylanJ has quit [Quit: ggwp]
xaviergmail has quit [Read error: Connection reset by peer]
conta has joined #ruby
xaviergmail has joined #ruby
unreal has joined #ruby
polysics has joined #ruby
<PaulePanter> So to select the pairing, where woman "a" plays, I’d do `.select{|a| a[0] == "a"}.first`
<PaulePanter> `.select{|pairing| pairing[0] == "a"}.first`
<PaulePanter> … is probably better readable.
bronson has joined #ruby
gajus has joined #ruby
kareelee has quit [Ping timeout: 252 seconds]
xrlk has joined #ruby
polysics has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 260 seconds]
anuxivm has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
tvon has joined #ruby
lightstalker has joined #ruby
zipace has joined #ruby
byte512 has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
pwnd_nsfw` has joined #ruby
tvon has quit [Ping timeout: 260 seconds]
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
enilsen16 has quit [Quit: enilsen16]
pwnd_nsfw has quit [Ping timeout: 268 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
marr has quit [Remote host closed the connection]
enilsen16 has joined #ruby
DLSteve has joined #ruby
fromidal has joined #ruby
Pupeno has quit [Remote host closed the connection]
enilsen16 has quit [Quit: enilsen16]
fromidal has quit [Client Quit]
jenrzzz has joined #ruby
Morrolan has quit [Quit: Goodbye]
Morrolan has joined #ruby
shakycode has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 256 seconds]
pwnd_nsfw` has quit [Quit: Leaving]
hotpancakes has quit [Remote host closed the connection]
Vile` has joined #ruby
hotpancakes has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Puffball has quit [Remote host closed the connection]
testuser1 has joined #ruby
Puffball has joined #ruby
solocshaw has joined #ruby
polysics has joined #ruby
harai has joined #ruby
bronson has joined #ruby
solocshaw has quit [Client Quit]
Pupeno has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Remote host closed the connection]
oaklndr1 has joined #ruby
shayan_ has joined #ruby
lenwood has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
hotpancakes has joined #ruby
mase-chatter has joined #ruby
shayan_ has quit [Client Quit]
cibs has quit [Ping timeout: 268 seconds]
tvon has joined #ruby
cibs has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Kug3lis has joined #ruby
tvon has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
enyo has joined #ruby
astrobunny has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
enyo has quit [Ping timeout: 256 seconds]
marcoecc has joined #ruby
cibs has joined #ruby
ruid has quit [Ping timeout: 265 seconds]
aryaching has joined #ruby
astrobunny has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 256 seconds]
cdg has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
marcoecc has quit [Ping timeout: 258 seconds]
anuxivm has left #ruby [#ruby]
braincrash has quit [Ping timeout: 246 seconds]
jhack has joined #ruby
jenrzzz has joined #ruby
jhack has quit [Quit: jhack]
porfa has quit [Quit: porfa]
jenrzzz has quit [Ping timeout: 265 seconds]
catphish has quit [Quit: Leaving]
porfa has joined #ruby
braincrash has joined #ruby
lmc has joined #ruby
hotpancakes has quit [Remote host closed the connection]
tvon has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
lmc has quit [Ping timeout: 260 seconds]
muelleme has quit [Ping timeout: 245 seconds]
siddart has joined #ruby
polysics has joined #ruby
djbkd has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
bronson has joined #ruby
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics_ has quit [Read error: Connection reset by peer]
braincrash has quit [Ping timeout: 246 seconds]
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
polysics_ has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics_ has quit [Read error: Connection reset by peer]
siddart has quit [Quit: WeeChat 1.4]
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
polysics has quit [Ping timeout: 245 seconds]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
jallen123 has joined #ruby
<ljarvis> select { }.first == find
xrlk has quit [Remote host closed the connection]
jallen123 has quit [Remote host closed the connection]
jallen123 has joined #ruby
cdg has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
jallen123 has quit [Ping timeout: 245 seconds]
<baweaver> ljarvis: not strictly, find will break out early
<ljarvis> right, I shouldn't have used ==
<baweaver> === ? :P
<ljarvis> I meant, you should use find and not select {} because of that reason
<ljarvis> that was obviously too much to type
<ljarvis> perhaps, find > select.first would have been enough
gigetoo has quit [Ping timeout: 245 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
gigetoo has joined #ruby
xrlk has joined #ruby
djbkd has quit [Ping timeout: 268 seconds]
djbkd has joined #ruby
gizmore|2 has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
hutch34 has joined #ruby
LoneHerm_ has joined #ruby
mic_e has quit [Ping timeout: 258 seconds]
matp has quit [Remote host closed the connection]
matp has joined #ruby
mic_e has joined #ruby
xaviergmail has quit [Read error: Connection reset by peer]
perniciouscaffei has joined #ruby
xaviergmail has joined #ruby
izaakf has joined #ruby
<izaakf> Hi is there anyway to make this code run quicker?
<izaakf> self.chars.permutation.map(&:join).uniq.group_by(&:chr)
<izaakf> would using Parallel work on it? Or chunks?
DTZUZU has quit [Ping timeout: 268 seconds]
voldemort is now known as nchambers
symm- has joined #ruby
porfa has quit [Quit: porfa]
marcoecc has joined #ruby
bronson has joined #ruby
Azure has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
enyo has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
enyo has quit [Ping timeout: 246 seconds]
mic_e has quit [Ping timeout: 256 seconds]
polysics has joined #ruby
polysics_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
howdoi has quit [Quit: Connection closed for inactivity]
jshjsh has joined #ruby
polysics_ has quit [Read error: Connection reset by peer]
dunpeal has quit [Quit: leaving]
polysics has joined #ruby
nadir has joined #ruby
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
Pupeno has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 268 seconds]
polysics has quit [Ping timeout: 265 seconds]
jackjackdripper has quit [Quit: Leaving.]
<havenwood> izaac: Take a look at Algorithm L: http://www.cs.utsa.edu/~wagner/knuth/fasc2b.pdf
<havenwood> izaac: Oops, misstell - sorry.
<havenwood> izaakf: ^
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
braincrash has quit [Ping timeout: 258 seconds]
tvw has quit []
<izaakf> havenwood: thanks ill have a look
jhack has joined #ruby
<havenwood> izaakf: If you'd like to use someone else's implementation in Ruby try the unique_permutation gem.
jenrzzz has quit [Ping timeout: 264 seconds]
jhack has quit [Quit: jhack]
skweek has joined #ruby
jhack has joined #ruby
camilasann has quit [Remote host closed the connection]
DTZUZU has joined #ruby
jhack has quit [Client Quit]
braincrash has joined #ruby
<havenwood> izaakf: Or you could modify it more specifically for your purposes.
enterprisey has joined #ruby
lmc has joined #ruby
brendan- has joined #ruby
benlieb has joined #ruby
<havenwood> izaakf: Improve your algorithm before even considering a multithreaded or multiprocess approach.
benlieb has quit [Client Quit]
cdg has quit [Remote host closed the connection]
<havenwood> izaakf: I think you mentioned the other day that you're on Windows with CRuby, which precludes both forking (Windows) and multiple threads using the processor at the same time (CRuby global VM lock).
lmc has quit [Ping timeout: 260 seconds]
<havenwood> izaakf: So gems like Parallel will be no help.
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> izaakf: You can use JRuby on Windows if you want parallel processing with threads.
benlieb has joined #ruby
<havenwood> izaakf: Take a look at the unique_permutation gem implementation. It's just a few lines of Ruby. Then consider how you might change it slightly to achieve your goal.
Jackneill has quit [Read error: Connection timed out]
Jackneill has joined #ruby
xaviergmail has quit [Ping timeout: 260 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Jackneill has quit [Max SendQ exceeded]
mase-chatter has quit [Quit: Leaving]
bronson has joined #ruby
Azure has joined #ruby
jallen123 has joined #ruby
AHemlocksLie has left #ruby [#ruby]
bronson has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
jenrzzz has joined #ruby
nankyokusei has joined #ruby
shayan_ has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 256 seconds]
<izaakf> havenwood: Thanks so much. I was just having dinner will try it now
Channel6 has joined #ruby
Azure has joined #ruby
jshjsh has quit [Ping timeout: 248 seconds]
last_staff has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
testuser1 has quit [Quit: Leaving.]
testuser1 has joined #ruby
testuser1 has quit [Client Quit]
thoolihan has quit [Ping timeout: 260 seconds]
testuser1 has joined #ruby
Mr_Pancake has quit [Ping timeout: 268 seconds]
testuser1 has quit [Client Quit]
testuser1 has joined #ruby
JoshS has joined #ruby
testuser1 has quit [Client Quit]
Mr_Pancake has joined #ruby
jshjsh has joined #ruby
shayan_ has quit [Quit: shayan_]
shayan_ has joined #ruby
<izaakf> havenwood: The permutation gem seems to be just as slow as the standard permutation method unfortunately :(
jallen123 has quit [Remote host closed the connection]
thoolihan has joined #ruby
jallen123 has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshS has quit [Ping timeout: 268 seconds]
polysics has joined #ruby
troulouliou_dev has joined #ruby
jallen12_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
polysics has joined #ruby
jallen123 has quit [Ping timeout: 258 seconds]
polysics has quit [Read error: Connection reset by peer]
polysics_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
polysics_ has quit [Read error: Connection reset by peer]
polysics has joined #ruby
pawnbox has joined #ruby
polysics has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
polysics has joined #ruby
GGMethos has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
<havenwood> izaakf: Give me a minute and I'll give it a stab.
<izaakf> havenwood: Thanks a lot. Finding it frustrating
frozengeek_ has joined #ruby
harai has quit [Ping timeout: 260 seconds]
polysics has quit [Ping timeout: 268 seconds]
Guest20511 has quit [K-Lined]
conta has quit [Ping timeout: 252 seconds]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enyo has joined #ruby
Azure has joined #ruby
jallen12_ has quit [Remote host closed the connection]
jallen123 has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
azby has joined #ruby
enyo has quit [Ping timeout: 264 seconds]
gajus has quit [Quit: Connection closed for inactivity]
harfangk has joined #ruby
jallen123 has quit [Ping timeout: 245 seconds]
porfa has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
<Mon_Ouie> What's the size of the arrays that you're computing the premutations of?
bronson has joined #ruby
sarbs has joined #ruby
JoshS has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 258 seconds]
GGMethos has joined #ruby
aidalgol has joined #ruby
jshjsh has quit [Ping timeout: 258 seconds]
harai has joined #ruby
<azby> I receive 300K(on one processor and because of Linux networking stack) packets over UDP socket. I need to receive all these packets, parse them, and store them somewhere. The length of received data is around 1500 bytes. EventMachine seems the right choice since it's a high scalable application. What's the right way to parse data received(receive_data) in handler associated to EventMachine? I mean how can I have work thread that upon receive of data
<azby> in received_data, work thread parse data?
jenrzzz has quit [Ping timeout: 252 seconds]
deank has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
Azure has joined #ruby
LoneHerm_ has joined #ruby
jallen123 has joined #ruby
jallen123 has quit [Remote host closed the connection]
Pupeno has joined #ruby
jallen123 has joined #ruby
<porfa> Hey my Rubedo gansters… Happy new year for y’all!
LoneHerm_ has quit [Ping timeout: 258 seconds]
montanonic has joined #ruby
jallen123 has quit [Ping timeout: 245 seconds]
harai has quit [Ping timeout: 256 seconds]
jshjsh has joined #ruby
Pupeno has quit [Ping timeout: 264 seconds]
DoctorMo_ has joined #ruby
JoshS has quit [Ping timeout: 248 seconds]
<DoctorMo_> having a fucky problem with class variables: https://gist.github.com/PeteMichaud/805b42d8d5c4e4c5674b5e7fdb65b6ff -- I'm making a person model that has traits, and the traits that are generated sometimes have prereqs. In the example linked above, I'm trying to generate an Adult Height trait, which depends on a different trait called Gender. When I call my `prereq` method, the class variable is nil for reasons I ca
<DoctorMo_> n't figure out
xen0fon1 has joined #ruby
xen0fon has quit [Ping timeout: 248 seconds]
xen0fon1 is now known as xen0fon
hotpancakes has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
<Mon_Ouie> You don't use class variables anywhere in the code that you linked
<Mon_Ouie> @_prereqs is an instance variable, on an object which happens to be a class. Those are different from class variables e.g. @@_prereqs.
jshjsh has quit [Ping timeout: 268 seconds]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<Mon_Ouie> And here the problem seems to be that you expect the Module#extended hook is not called for Trait::AdultHeight, which is not the case
Vile` has quit [Ping timeout: 245 seconds]
<Mon_Ouie> (Trait::Base's @_prereq is [] after the call to extend, but Trait::AdultHeight's @_prereq is nil)
<Mon_Ouie> You could just define def prereqs; @_prereqs ||= []; end to avoid needing the extended hook altogether
<izaakf> Mon_Ouie: however long the users string is factorial
<DoctorMo_> yeah, I think you're right, I thought extend would work for Trait::AdultHeight
JoshS has joined #ruby
gheegh has joined #ruby
matp_ has joined #ruby
matp has quit [Ping timeout: 245 seconds]
polysics has joined #ruby
last_staff has quit [Quit: last_staff]
<DoctorMo_> ok, got it working now, thanks so much for your help Mon_Ouie :)
matp_ has quit [Read error: Connection reset by peer]
polysics has quit [Read error: Connection reset by peer]
<havenwood> izaakf: I got distracted and have to leave now but it seems to be about twice as fast in Crystal-lang for ten characters: "ten chars!".chars.each_permutation.uniq.map(&.join).group_by(&.[0])
polysics has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 260 seconds]
<havenwood> izaakf: I'll try more ways when I have some time!
jallen123 has joined #ruby
jsyoo5b has joined #ruby
polysics has quit [Ping timeout: 264 seconds]
shayan_ has quit [Quit: shayan_]
matp has joined #ruby
ruid has quit [Ping timeout: 246 seconds]
polysics has joined #ruby
camilasan has joined #ruby
sarbs has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
azby has quit [Ping timeout: 268 seconds]
maloik has quit [Remote host closed the connection]
maloik48 has joined #ruby
shayan_ has joined #ruby
montanonic has quit [Ping timeout: 258 seconds]
|ifei5g00d has joined #ruby
<Yonk_> Anyone here really good with the pg_search gem?
<Yonk_> I have User with many locations. I am querying against name and location but I want it only to return the matching location but the user with all of it's locations.
_whitelogger has joined #ruby
jallen123 has quit [Remote host closed the connection]
jeffreylevesque has joined #ruby
camilasan has quit [Remote host closed the connection]
jallen123 has joined #ruby
arian__ has joined #ruby
bronson has joined #ruby
<arian__> hey guys i have a great idea who is good with perl here?
LoneHerm_ has joined #ruby
<tobiasvl> arian__: probably better to just state your idea, or question, or whatever it is
<tobiasvl> and then someone will answer if they can
<arian__> im trying to start the first website that deals with connecting with people
Sanctus has joined #ruby
<tobiasvl> web 2.0
<arian__> like adding friends, talking to people online things like that
<tobiasvl> sounds great
<tobiasvl> innovative
<tobiasvl> revolutionary
<arian__> thanks man im from india so sorry for my english
chino has joined #ruby
camilasan has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
reverberations has quit [Ping timeout: 268 seconds]
xrlk has quit [Ping timeout: 258 seconds]
jeffreylevesque has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
reverberations has joined #ruby
hotpancakes has joined #ruby
jallen123 has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
<arian__> tobiasvl you don't seem that bright i just looked on google and found facebook
<tobiasvl> ;)
<arian__> why would u lie to me
<arian__> im just trying to learn english and here you are slowing me down #alllivesmatter
nankyokusei has joined #ruby
<tobiasvl> learning sarcasm is a big part of learning a language
<arian__> so did you know i was being sarcastic when i asked who was good with perl in a different chatroom?
pytuger has joined #ruby
<Mon_Ouie> Facetiousness is not sarcasm
nankyokusei has quit [Ping timeout: 258 seconds]
<pytuger> with python, they have 'pip' where I can 'pip install python_module' is there equivalent with ruby for installing modules?
<arian__> its not like their synonyms
<Mon_Ouie> pytuger: Yes, it is called `gem', and is part of the standard library.
dnicole has quit []
<pytuger> Mon_Ouie, thanks
dnicole has joined #ruby
<arian__> treating serious issues with deliberately inappropriate humor; theres the definition for it; so you're basically saying that I was discussing "a serious issue" such as when i was sarcastic about starting the next facebook, and that my humor was "innapropriate"; go back to school kid using big words doesn't make you
<arian__> seem intelligent
al2o3-cr has joined #ruby
ledestin has joined #ruby
ledestin has quit [Client Quit]
ledestin has joined #ruby
<Yonk_> O_o
toretore has joined #ruby
arian__ is now known as bibblue
<bibblue> what r u guys talkin boot
<reaVer> HAPPY NEW YEAR!!!
<tobiasvl> happy new year!
<tobiasvl> thick fog here, can't see any fireworks. rip
<pytuger> make fireworks your screensaver
<bibblue> happy new year!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!y!!!!!!!!a!!!!!!!!stu!!!!!!!!!!!!!!!!!!!!pid!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!c!!!!!!!!!!!!!!!!!!!!!!!!!!!!u!!!!!!!!!!!!!!!!!!!!!!!!!!n!!!!!!!!!!!!!!!!!!!!!!!!t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!s!!!!!!!!!!!!
<tobiasvl> bibblue: that's not very nice
<Mon_Ouie> !ban bibblue Happy new year
shayan_ was kicked from #ruby by ruby[bot] [Happy new year]
bibblue was kicked from #ruby by ruby[bot] [Happy new year]
<pytuger> Mon_Ouie: Thanks
agit0 has quit [Quit: zzzZZZ….]
cgibsonmm has joined #ruby
cgibsonmm has quit [Client Quit]
enyo has joined #ruby
frozengeek_ has quit [Quit: frozengeek_]
jsyoo5b has quit [Remote host closed the connection]
newbie1 has joined #ruby
jsyoo5b has joined #ruby
jsyoo5b has quit [Client Quit]
enyo has quit [Ping timeout: 246 seconds]
saneax-_-|AFK is now known as saneax
QualityAddict has quit [Ping timeout: 248 seconds]
foption has joined #ruby
agit0 has joined #ruby
_sfiguser has quit [Quit: Leaving]
agit0 has quit [Client Quit]
dnicole has quit [Remote host closed the connection]
DoctorMo_ has quit [Remote host closed the connection]
montanonic has joined #ruby
dar123 has quit [Read error: Connection reset by peer]
bronson has joined #ruby
unreal has quit [Read error: Connection reset by peer]
foption has quit [Quit: Leaving]
podman is now known as podman[USC]
unreal has joined #ruby
Asher has quit [Quit: Leaving.]
bronson has quit [Ping timeout: 256 seconds]
frozengeek_ has joined #ruby
Asher has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
podman[USC] is now known as podman
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
sarbs has quit [Read error: Connection reset by peer]
sarbs has joined #ruby
Pupeno has joined #ruby
frozengeek_ has quit [Quit: frozengeek_]
frozengeek_ has joined #ruby
millerti has joined #ruby
tvon has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 246 seconds]
agit0 has joined #ruby
jshjsh has joined #ruby
arescorpio has joined #ruby
Sanctus has quit [Quit: leaving]
pawnbox has quit [Remote host closed the connection]
aidalgol has quit [Quit: Restarting Emacs...]
pawnbox has joined #ruby
xelkarin has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]