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
genpaku has joined #ruby
BrianJ has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Ping timeout: 260 seconds]
aidalgol has joined #ruby
aidalgol has quit [Remote host closed the connection]
aidalgol has joined #ruby
ur5us has joined #ruby
Sanctus has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 256 seconds]
foption has joined #ruby
AndrewIsHere has joined #ruby
Sanctus has quit [Ping timeout: 268 seconds]
AndrewIsHere has quit [Ping timeout: 258 seconds]
aidalgol has quit [Quit: Using Circe, the loveliest of all IRC clients]
saneax is now known as saneax-_-|AFK
ruid has joined #ruby
aidalgol has joined #ruby
aidalgol is now known as Guest34605
xlegoman has quit [Quit: xlegoman]
Guest34605 is now known as aidalgol
AndrewIsHere has joined #ruby
AndrewIsHere has quit [Client Quit]
foption has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
empty_cup has joined #ruby
hotpancakes has joined #ruby
ruid has quit [Ping timeout: 264 seconds]
Pupeno has joined #ruby
foption has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
<empty_cup> There is a mixture of tabs and spaces in the ruby c source code. Is there a coding style available?
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
foption has quit [Client Quit]
hutch34 has joined #ruby
Pupeno_ has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
pilne has quit [Quit: Quitting!]
braincrash has joined #ruby
Sanctus has joined #ruby
<Mon_Ouie> empty_cup: There's a config file for emacs in misc/ruby-style.el
hotpancakes has quit [Remote host closed the connection]
frozengeek has joined #ruby
hotpancakes has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
<empty_cup> found it Mon_Ouie, thanks!
sepp2k has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
frozengeek_ has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jsyoo5b has joined #ruby
foption has joined #ruby
jsyoo5b has left #ruby ["Leaving..."]
pawnbox has joined #ruby
millerti has joined #ruby
enyo has joined #ruby
Anonymoose2 has joined #ruby
reverberations has quit [Ping timeout: 265 seconds]
Anonymoose2 has quit [Max SendQ exceeded]
Anonymoose2 has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
porfa has quit [Quit: porfa]
xelkarin has quit [Quit: WeeChat 1.4]
foption has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 248 seconds]
braincrash has quit [Ping timeout: 248 seconds]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
hotpancakes has quit [Remote host closed the connection]
empty_cup has quit [Quit: leaving]
foption has joined #ruby
anuxivm has joined #ruby
foption has quit [Client Quit]
foption has joined #ruby
reverberations has joined #ruby
reverberations has quit [Max SendQ exceeded]
Anonymoose2 has quit [Ping timeout: 268 seconds]
reverberations has joined #ruby
reverberations has quit [Max SendQ exceeded]
phoo1234567 has quit [Quit: Gotta go]
reverberations has joined #ruby
harai has joined #ruby
braincrash has joined #ruby
porfa has joined #ruby
porfa has quit [Client Quit]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
xrlk has joined #ruby
oaklndr1 has quit [Ping timeout: 264 seconds]
dnicole has joined #ruby
nadir is now known as nadir|mobile
hutch34 has quit [Ping timeout: 248 seconds]
meadmoon has joined #ruby
dnicole has quit [Ping timeout: 245 seconds]
montanonic has quit [Ping timeout: 258 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
QualityAddict has joined #ruby
ur5us has quit [Remote host closed the connection]
charliesome has joined #ruby
porfa has joined #ruby
bronson has joined #ruby
meadmoon has quit [Quit: ZZZzzz…]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
sspreitz has quit [Ping timeout: 245 seconds]
porfa has quit [Client Quit]
DTZUZU has joined #ruby
meadmoon has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Ping timeout: 258 seconds]
anuxivm has quit [Quit: Leaving.]
sspreitz has joined #ruby
lmc has joined #ruby
pytuger has quit [Ping timeout: 260 seconds]
lmc has quit [Ping timeout: 265 seconds]
jallen123 has joined #ruby
jallen123 has quit [Remote host closed the connection]
jallen123 has joined #ruby
jallen123 has quit [Remote host closed the connection]
jallen123 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anuxivm has joined #ruby
jallen123 has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
frozengeek has quit [Quit: frozengeek]
charliesome has joined #ruby
al2o3-cr_ has joined #ruby
_defk0n_ has joined #ruby
al2o3-cr has quit [Ping timeout: 252 seconds]
_defk0n_ has quit [Read error: Connection reset by peer]
_defk0n_ has joined #ruby
dar123 has joined #ruby
hotpancakes has joined #ruby
jallen123 has joined #ruby
agit0 has quit [Read error: Connection reset by peer]
sspreitz has quit [Ping timeout: 256 seconds]
polysics has quit [Remote host closed the connection]
DTZUZU has quit [Ping timeout: 260 seconds]
dar123 has quit [Ping timeout: 240 seconds]
porfa has joined #ruby
DTZUZU2 has joined #ruby
sspreitz has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
frozengeek has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
porfa has quit [Quit: porfa]
jallen123 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d^sh has quit [Ping timeout: 260 seconds]
d^sh_ has joined #ruby
ur5us has quit [Remote host closed the connection]
_ZerGabriel_ has joined #ruby
dnicole has joined #ruby
hutch34 has joined #ruby
braincrash has quit [Ping timeout: 265 seconds]
frozengeek has quit [Quit: frozengeek]
symm- has quit [Quit: Leaving...]
dnicole has quit [Ping timeout: 258 seconds]
montanonic has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
newbie1 has quit [Ping timeout: 260 seconds]
braincrash has joined #ruby
_ZerGabriel_ has quit []
dminuoso has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
dminuoso has joined #ruby
djbkd2 has joined #ruby
djbkd2 has quit [Client Quit]
djbkd2 has joined #ruby
<havenwood> izaakf: Here's a Crystal implementation of Knuth's Algorithm L that should be a good bit faster: https://gist.github.com/havenwood/828db558f4b5331730d3ddb89b773563
pilne has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
cgibsonmm has joined #ruby
<izaakf> havenwood: I really appreciate it but the rest of my code is in ruby, are you suggesting I create perms in crystal then import them back into my code?
<havenwood> izaakf: I'm not sure why you're doing what you're doing. Say more?
<havenwood> On my machine with ten unique chars it's several times faster than the straightforward Crystal implementation and about twenty times faster than your Ruby example. So if you want speed it's one way.
cgibsonmm has quit [Remote host closed the connection]
nankyokusei has joined #ruby
enyo has joined #ruby
<havenwood> izaakf: What's the point of the exercise?
<havenwood> izaakf: You can write a Crystal extensions for Ruby gems if you want to use it in Ruby.
<havenwood> izaakf: If you're just having fun and want to make it parallel then I'd suggest trying with Elixir's Experimental.Flow: https://hexdocs.pm/gen_stage/Experimental.Flow.html
hippyphysicist has joined #ruby
enyo has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Ping timeout: 268 seconds]
<havenwood> izaakf: Say more about why you're doing it and we can better suggest solutions! :-)
pytuger has joined #ruby
<izaakf> havenwood: sorry I'll send you my code now
libastral has quit [Ping timeout: 258 seconds]
hippyphysicist has quit [Read error: Connection reset by peer]
ltp has quit [Remote host closed the connection]
<elomatreb> If you set the file name (somefile.rb), you get syntax highlighting, much nicer to read ;)
meadmoon has quit [Quit: ZZZzzz…]
<izaakf> it checks if a word is potentially palindromic, palindromic. in a dictionary, anagrams in dictionary
Coldblackice has quit [Ping timeout: 264 seconds]
optiz0r has quit [Ping timeout: 260 seconds]
biberu has quit [Read error: Connection reset by peer]
hanmac has quit [Ping timeout: 258 seconds]
Coldblackice has joined #ruby
nowhere_man has joined #ruby
CloCkWeRX has joined #ruby
polysics has joined #ruby
houhouli_ has joined #ruby
Coldblackice has quit [Ping timeout: 265 seconds]
meadmoon has joined #ruby
Coldblackice_ has joined #ruby
polysics has quit [Ping timeout: 248 seconds]
houhoulis has quit [Ping timeout: 258 seconds]
<izaakf> what does << do in ruby?
<havenwood> >> def << s; s.reverse end; self << 'okay' # izaakf
<ruby[bot]> havenwood: # => private method `<<' called for main:Object (NoMethodError) ...check link for more (https://eval.in/707234)
<havenwood> izaakf: It's a method.
jallen123 has joined #ruby
<havenwood> >> [].public_method(:<<).owner
<ruby[bot]> havenwood: # => Array (https://eval.in/707235)
hanmac has joined #ruby
<havenwood> >> ''.public_method(:<<).owner
<ruby[bot]> havenwood: # => String (https://eval.in/707236)
minimalism has joined #ruby
<izaakf> havenwood: okay thanks, I created a thread about this on reddit, and the answers haven't really sped anything up here's the thread: https://www.reddit.com/r/ruby/comments/5lbx9v/is_there_anyway_to_get_this_code_to_run_quicker/
<havenwood> izaakf: The shovel operator is defined as an instance method on many classes.
braincrash has quit [Ping timeout: 268 seconds]
<izaakf> havenwood: it wont work for me when I try run code containing that
<izaakf> havenwood: I get this in `<<': no implicit conversion of String into Integer (TypeError)
braincrash has joined #ruby
jshjsh has quit [Ping timeout: 258 seconds]
LoneHerm_ has joined #ruby
<havenwood> izaakf: My advise would be to remove unnecessary contortions from your code. Why are you grouping by the first character at all?
LoneHerm_ has quit [Ping timeout: 268 seconds]
<izaakf> to improve search times for words
<havenwood> izaakf: First do it in the most straightforward and simplest manner you can come up with. Then simplify that further. Use that as your baseline.
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has quit [Ping timeout: 248 seconds]
<havenwood> izaakf: i think you could really simplify the #anagram method
houhouli_ has quit [Remote host closed the connection]
<izaakf> havenwood: I am aware but I'm a shitty programmer
houhoulis has joined #ruby
<havenwood> izaakf: having it work at all is a good start! as they say, "red, green, refactor"
enilsen16 has joined #ruby
<izaakf> havenwood: does .group_by(&:chr) slow this process down by much?
<havenwood> izaakf: yes, it does
<havenwood> izaakf: I'd suggest avoiding monkeypatching core classes like String. If you want to do that sort of thing use a refinement. but you might want to define your own class here.
hutch34 has joined #ruby
bronson has joined #ruby
<izaakf> havenwood: what's wrong with monkeypatching core classes? Sorry if it's a dumb question
houhoulis has quit [Ping timeout: 260 seconds]
<izaakf> havenwood: and what exactly does refinement do?
<havenwood> izaakf: The scope of monkeypatched changes is global. So if you define Array#permutation? and a gem does as well they stomp on each other.
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<havenwood> izaakf: Or you can just make your own module or class and not impact core classes at all.
bronson has quit [Ping timeout: 248 seconds]
<izaakf> havenwood: if I create a new class is it possible to be able to call the methods like I am now?
<izaakf> like word.is_palindrome?
<havenwood> izaakf: If you don't have any internal state to track and you just have pure functions then use a module. If there's more than one instance of state use a class. If there's just one instance of state mixin Singleton.
perniciouscaffei has joined #ruby
alan_w has joined #ruby
braincrash has joined #ruby
symm- has joined #ruby
deank has quit [Ping timeout: 265 seconds]
izaakf has quit [Quit: Page closed]
oaklndr1 has joined #ruby
porfa has joined #ruby
montanonic has quit [Ping timeout: 258 seconds]
polysics has joined #ruby
braincrash has quit [Ping timeout: 245 seconds]
mostlybadfly has joined #ruby
mim1k|wo1k has joined #ruby
jallen123 has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
mim1k|work has quit [Ping timeout: 268 seconds]
hotpancakes has joined #ruby
montanonic has joined #ruby
enilsen16 has quit [Quit: enilsen16]
hotpancakes has quit [Ping timeout: 240 seconds]
meadmoon has quit [Quit: I am functioning within established parameters.]
braincrash has joined #ruby
brendan- has joined #ruby
charliesome has joined #ruby
harai has quit [Ping timeout: 260 seconds]
cgibsonmm has joined #ruby
cgibsonmm has quit [Client Quit]
enyo has joined #ruby
gix has quit [Ping timeout: 246 seconds]
optiz0r has joined #ruby
gix has joined #ruby
enyo has quit [Ping timeout: 258 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
charliesome has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
JoshS has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
reaVer has quit [Remote host closed the connection]
sarbs has joined #ruby
nankyokusei has joined #ruby
braincrash has quit [Ping timeout: 258 seconds]
houhoulis has joined #ruby
harai has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
d^sh_ has quit [Ping timeout: 256 seconds]
anuxivm has left #ruby [#ruby]
biox has quit [Quit: brb servers are ded]
biox has joined #ruby
d^sh has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
sarbs has joined #ruby
braincrash has joined #ruby
symm- has quit [Quit: Leaving...]
twistedpixels_ has joined #ruby
hotpancakes has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
testuser1 has joined #ruby
ruby-lang620 has joined #ruby
<ruby-lang620> can anyone give me some explanation on this calculation thing
<ruby-lang620> i can't add it up both the numbers
<ruby-lang620> it's only printing the 1st number
hotpancakes has quit [Ping timeout: 245 seconds]
LoneHermit has joined #ruby
Pisuke has quit [Max SendQ exceeded]
xen0fon1 has joined #ruby
xen0fon has quit [Remote host closed the connection]
xen0fon1 is now known as xen0fon
al2o3-cr_ is now known as al2o3-cr
Pisuke has joined #ruby
conta has joined #ruby
LoneHermit has quit [Ping timeout: 265 seconds]
ruby-lang620 has quit [Quit: Page closed]
nitri-xmas is now known as nitrix
harai has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
zacts has quit [Ping timeout: 258 seconds]
bronson has quit [Ping timeout: 252 seconds]
lmc has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
Tharbakim has quit [Ping timeout: 264 seconds]
braincrash has quit [Ping timeout: 258 seconds]
braincrash has joined #ruby
lmc has quit [Ping timeout: 258 seconds]
kang0 has joined #ruby
solidsnack has joined #ruby
<solidsnack> How do I format a string in quoted form?
<solidsnack> Like with `s = "special\ntext"`
<solidsnack> "#{s}" actually would include a newline instead of showing it with an escape code.
<havenwood> >> 'special\ntext'
<ruby[bot]> havenwood: # => "special\\ntext" (https://eval.in/707242)
jshjsh has joined #ruby
<havenwood> solidsnack: Try single quotes or %q() for no backslashes.
<solidsnack> Oh, I mean the other way.
<solidsnack> I want to _print_ the string.
<solidsnack> With escapes.
<havenwood> >> p 'special\ntext'
<ruby[bot]> havenwood: # => "special\\ntext" ...check link for more (https://eval.in/707243)
<solidsnack> Sorry, I want to _render_ the string.
<solidsnack> Like into another string.
JoshS has quit [Ping timeout: 268 seconds]
<solidsnack> "Value was: #{quoted(s)}"
<elomatreb> As in, you want to replace the newline with \n?
<solidsnack> Right.
<elomatreb> Only for newlines or for all escape sequences?
<solidsnack> I would like to render all escape sequences in their escaped forms, yes.
<solidsnack> It is like %q in shell or %r in Python.
<solidsnack> Or like what ruby does with: "Values were: #{[s]}"
<solidsnack> When it's an array it puts the escapes back in.
<elomatreb> solidsnack: https://eval.in/707244 ?
<havenwood> >> s = "special\ntext"; "other\n#{s}" # solidsnack
<ruby[bot]> havenwood: # => "other\nspecial\ntext" (https://eval.in/707245)
<havenwood> solidsnack: What do you have? What do you want?
Tharbakim has joined #ruby
<solidsnack> havenwood: I don't think what you're showing me actually works when use string interpolation to output to the console.
dviola has quit [Quit: WeeChat 1.6]
<havenwood> solidsnack: In irb or pry try: s = "special\ntext"; puts "other\n#{s}"
<solidsnack> How about from the console?
<solidsnack> ruby <<<'s = "special\ntext"; puts "other\n#{s}"'
<havenwood> solidsnack: ruby -e 's = "special\ntext"; puts "other\n#{s}"'
lxsameer has joined #ruby
<solidsnack> I get three lines that way.
<solidsnack> No escape sequences.
<havenwood> solidsnack: Yup. What do you want?
<solidsnack> elomatreb: Thank you, `.inspect` was the ticket.
<havenwood> solidsnack: p is like puts and inspect combined
pilne has quit [Quit: Quitting!]
<elomatreb> I assume you want to output to some config file, no?
<havenwood> solidsnack: and it returns the receiver instead of nil
<solidsnack> elomatreb: It is for debugging, actually.
<havenwood> solidsnack: p is for debugging
<havenwood> solidsnack: or inspect if you're not printing it
<elomatreb> Ah, in that case `p` is great, as pointed out
<solidsnack> Has to be .inspect in this case.
<elomatreb> It returns its argument, so you can just stick it in almost anywhere
Derperperd has quit [Quit: WeeChat 1.5]
<solidsnack> elomatreb: But it will also print, right?
<solidsnack> `p`, that is?
<solidsnack> In which case my program will act crazy.
<solidsnack> Ruby was supposed to make my life airy and light.
<elomatreb> You're fine using inspect, p is just another really useful thing
<solidsnack> Okay, thanks.
montanonic has quit [Ping timeout: 252 seconds]
enyo has joined #ruby
testuser1 has quit [Quit: Leaving.]
enyo has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
snath has joined #ruby
sharath_ has joined #ruby
Kug3lis has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
Kug3lis is now known as Kug3lis_off
snath has left #ruby [#ruby]
|ifei5g00d has quit []
bronson has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ascarter has joined #ruby
braincrash has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
sharath_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
braincrash has quit [Ping timeout: 265 seconds]
houhoulis has quit [Remote host closed the connection]
scott4000 has quit [Ping timeout: 260 seconds]
houhoulis has joined #ruby
mikeXsh has quit [Quit: Connection closed for inactivity]
nankyokusei has quit [Ping timeout: 258 seconds]
brendan- has joined #ruby
houhoulis has quit [Ping timeout: 265 seconds]
scott4000 has joined #ruby
jcao219 has joined #ruby
jackjackdripper has joined #ruby
blackbombay has joined #ruby
braincrash has joined #ruby
zipace has quit [Ping timeout: 258 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ARCADIVS has joined #ruby
nadir|mobile has quit [Quit: Connection closed for inactivity]
hotpancakes has joined #ruby
_defk0n_ has quit [Quit: Its been real!]
testuser1 has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
braincrash has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
UserJosh has joined #ruby
paradisaeidae has joined #ruby
jshjsh has quit [Ping timeout: 268 seconds]
braincrash has joined #ruby
moei has joined #ruby
bronson has joined #ruby
scott4000 has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
montanonic has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
braincrash has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
djbkd2 has quit [Quit: node-irc says goodbye]
scott4000 has joined #ruby
rippa has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
al2o3-cr has quit [Quit: WeeChat 1.6]
montanonic has quit [Ping timeout: 245 seconds]
LoneHermit has joined #ruby
naprimer_2 has joined #ruby
braincrash has joined #ruby
naprimer has quit [Ping timeout: 252 seconds]
LoneHermit has quit [Ping timeout: 268 seconds]
enyo has joined #ruby
insanedreamer has joined #ruby
milardovich has joined #ruby
enyo has quit [Ping timeout: 258 seconds]
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161208153507]]
jackjackdripper has joined #ruby
jenrzzz has joined #ruby
insanedreamer has quit [Quit: insanedreamer]
CloCkWeRX has quit [Quit: Leaving.]
kang0 has quit [Read error: Connection reset by peer]
cyphase has quit [Ping timeout: 245 seconds]
djbkd has quit [Quit: Leaving...]
cyphase has joined #ruby
flying has joined #ruby
Channel6 has quit [Quit: Leaving]
djbkd has joined #ruby
SpiffTR has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
bronson has joined #ruby
mlehrer has quit [Ping timeout: 260 seconds]
testuser1 has quit [Quit: Leaving.]
hotpancakes has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 268 seconds]
DTZUZU2 has quit [Read error: Connection reset by peer]
Kug3lis_off is now known as Kug3lis
Kug3lis is now known as Kug3lis_off
SpiffTR has quit [Quit: Leaving.]
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
_main_ has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
__main__ has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
SpiffTR has joined #ruby
triangles2 has quit [Quit: Leaving]
milardovich has quit []
djbkd has quit [Ping timeout: 268 seconds]
hutch34 has joined #ruby
mlehrer has joined #ruby
muelleme has joined #ruby
scott4000 has quit [Ping timeout: 260 seconds]
scott4000 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
SpiffTR has joined #ruby
charliesome has joined #ruby
pawnbox has quit [Remote host closed the connection]
tmtwd has joined #ruby
porfa has quit [Quit: porfa]
charliesome has quit [Client Quit]
SpiffTR has quit [Quit: Leaving.]
pawnbox has joined #ruby
bronson has joined #ruby
lmc has joined #ruby
LoneHermit has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
lmc has quit [Ping timeout: 258 seconds]
LoneHermit has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
ur5us has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
reverberations has quit [Ping timeout: 248 seconds]
enyo has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
tmtwd has joined #ruby
<ytti> if i have object1 which referns to instance variable to object2
<ytti> will this prevent whole object2 from being GC'd, or just the instance variable of object2?
<ytti> k = Object1.new
<ytti> foo do
<ytti> i = Object2.new
<ytti> k.foox = i.baz
enyo has quit [Ping timeout: 256 seconds]
<ytti> end
<ytti> would i remain in memory?
<ytti> or just i.baz?
lenwood has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 252 seconds]
lenwood has joined #ruby
hutch34 has quit [Ping timeout: 268 seconds]
kith has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
CloCkWeRX has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Fernando-Basso has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
montanonic has joined #ruby
lenwood has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
DTZUZU2 has joined #ruby
<apeiros> ytti: variables are not gc'ed, objects are. and yes, as long as you have any reference remaining to an object, it'll not be gc'ed
<ytti> apeiros, i.e. i instance, and everything it has, will remain, as long as i.baz remains?
bronson has joined #ruby
<ytti> apeiros, and as long as k remains
<ytti> i guess this should have been obvious
<ytti> but it's not somethin you think when you're accustomed to GC'd language
<apeiros> from your example above?
<ytti> yes
<apeiros> it does not seem like you're having a reference of i in k
<ytti> as k remains in scope, that means i remains fully in scope
<ytti> 12:05 < ytti> k.foox = i.baz
<ytti> ths does not keep i wholly inscope?
<apeiros> yes, i.baz is not necessarily i
<apeiros> but it's impossible to tell since I do not know what i.baz is/does.
<ytti> let's assme i.baz is instance variable containing Time.now of some point in history
<ytti> so something like
<ytti> def baz; @time_stamp; end
<apeiros> but if i.baz returns an object which is not i, and which does not reference i, then k.foox = i.baz does NOT mean k references i.
<apeiros> you're confusing things
<ytti> so in this example, i could be GC'd?
<apeiros> variables are not methods. i.baz never is an instance variable.
<ytti> it returns it
<ytti> and it'll have same object_id
<ytti> and i'm storing that object_id elsewhere
<ytti> so just by having that object_id referred elsewhere, won't cause i itself to remaina in memory?
<ytti> only that object itself?
<apeiros> look, the point is - if an object is still reachable within your program by any means, it can't be gc'ed.
<ytti> well i think in this example, i probably could be GC'd then
bronson has quit [Ping timeout: 264 seconds]
<ytti> because i don't think i is reachable from @time_stamp
nankyokusei has joined #ruby
claw has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
polysics has quit [Remote host closed the connection]
last_staff has joined #ruby
teclator has joined #ruby
last_staff has quit [Client Quit]
claw has joined #ruby
blackbom1 has joined #ruby
pytuger has quit [Ping timeout: 258 seconds]
blackbombay has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 248 seconds]
teclator_ has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby
saneax-_-|AFK is now known as saneax
aidalgol has quit [Quit: zZzZZzzzz]
skweek has joined #ruby
pry0cc has left #ruby [#ruby]
Ishido has quit [Remote host closed the connection]
c355e3b has joined #ruby
ptx0 has quit [Ping timeout: 268 seconds]
porfa has joined #ruby
teclator has joined #ruby
teclator_ has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
phoo1234567 has joined #ruby
grug has quit [Ping timeout: 258 seconds]
grug has joined #ruby
pawnbox has joined #ruby
Ishido has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
bronson has joined #ruby
enyo has joined #ruby
harfangk has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
teclator has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
enyo has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
toretore has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
TomyLobo has joined #ruby
jshjsh has joined #ruby
Ishido has quit [Remote host closed the connection]
UserJosh has quit [Ping timeout: 258 seconds]
montanonic has quit [Ping timeout: 248 seconds]
eizua has joined #ruby
saneax is now known as saneax-_-|AFK
libastral has joined #ruby
aduabu has quit [Ping timeout: 268 seconds]
agit0 has joined #ruby
SpiffTR has joined #ruby
Ishido has joined #ruby
saneax-_-|AFK is now known as saneax
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
Dev_ has joined #ruby
SpiffTR has quit [Quit: Leaving.]
<Dev_> hi is this the correct way to match year from 2009-2011?
<Dev_> year =~ /[2009..2011]/
bronson has joined #ruby
<Zarthus> I don't think so
<Zarthus> regex with ranges generally doesn't work well
<Dev_> any hint ?
jcao219 has quit [Ping timeout: 258 seconds]
<Dev_> that code make sense to me
<Dev_> but doesn't work
<Zarthus> Try (2009..2011).include?(2011)
<Dev_> no i wanted the range from 2009 to 2011
<Zarthus> with 'year =~ /[2009..2011]/' you're combining ranges and regex. In regex, [123] matches either one, two, or three. Not 123.
<Zarthus> yes, that's the range from 2009 to 2011.
<Zarthus> Unless ruby does somrthing really magical with that regex, it will never work like how you intend it to.
hotpancakes has quit [Ping timeout: 245 seconds]
<Dev_> nope
<Zarthus> >> [(2009..2011).include?(2011), (2009..2011).include?(2008)]
<Zarthus> ruby[bot] pls
<ruby[bot]> Zarthus: # => [true, false] (https://eval.in/707282)
nankyokusei has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
milardovich has quit [Remote host closed the connection]
teclator has quit [Quit: No Ping reply in 180 seconds.]
kares has quit [Remote host closed the connection]
SpiffTR has joined #ruby
teclator has joined #ruby
<Dev_> @Zarthus can;t
SpiffTR has quit [Client Quit]
<Zarthus> Can't what?
<Dev_> your work
nankyokusei has quit [Ping timeout: 265 seconds]
<Zarthus> I'm afraid you'll need to use more words than that to describe a problem.
MrBismuth has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdothum has joined #ruby
saneax is now known as saneax-_-|AFK
charliesome has joined #ruby
milardovich has joined #ruby
Dev_ has quit [Ping timeout: 260 seconds]
teclator has quit [Quit: No Ping reply in 180 seconds.]
aries_liuxueyang has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
teclator has joined #ruby
sarbs has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
teclator has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
MrBismuth has joined #ruby
teclator has joined #ruby
DTZUZU2 has quit [Ping timeout: 260 seconds]
Ishido has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 258 seconds]
saneax-_-|AFK is now known as saneax
aries_liuxueyang has quit [Ping timeout: 265 seconds]
milardovich has joined #ruby
aries_liuxueyang has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
saneax is now known as saneax-_-|AFK
milardovich has quit [Ping timeout: 256 seconds]
sarbs has quit [Read error: Connection reset by peer]
sarbs has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
LoneHerm_ has joined #ruby
DoubleMalt has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
aries_liuxueyang has quit [Ping timeout: 256 seconds]
aries_liuxueyang has joined #ruby
LoneHerm_ has quit [Ping timeout: 256 seconds]
enyo has joined #ruby
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 248 seconds]
enyo has quit [Ping timeout: 256 seconds]
17WAAWKRA has joined #ruby
aries_liuxueyang has quit [Ping timeout: 258 seconds]
ishahnaz has joined #ruby
bronson has joined #ruby
milardovich has joined #ruby
aries_liuxueyang has joined #ruby
tk__ has joined #ruby
elementaru has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
sepp2k has quit [Read error: Connection reset by peer]
milardovich has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
reaVer has joined #ruby
aries_liuxueyang has quit [Ping timeout: 248 seconds]
frozengeek has joined #ruby
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
Tempesta has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
ghostlight has quit [Ping timeout: 245 seconds]
DoubleMalt has quit [Ping timeout: 268 seconds]
ghostlight has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
aries_liuxueyang has joined #ruby
zapata has quit [Ping timeout: 258 seconds]
aries_liuxueyang has quit [Ping timeout: 248 seconds]
DTZUZU2 has joined #ruby
brendan- has joined #ruby
zapata has joined #ruby
aries_liuxueyang has joined #ruby
nikivi has joined #ruby
tk__ has quit [Ping timeout: 258 seconds]
saneax-_-|AFK is now known as saneax
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tk__ has joined #ruby
jallen123 has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
tk__ has quit [Client Quit]
saneax is now known as saneax-_-|AFK
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 258 seconds]
aries_liuxueyang has quit [Ping timeout: 258 seconds]
jallen123 has quit [Remote host closed the connection]
Sou|cutter has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
sarbs has quit [Read error: Connection reset by peer]
bitgen has joined #ruby
saneax-_-|AFK is now known as saneax
<bitgen> TRIGGERED! niggers, mexicans, trump trump trump trump trump, people of size, bi-gender-fluid, poly-gender-of-color ET CETERA! jews are horny, exterminate all muslims. TRIGGERED! TRIGGERED! TRIGGERED! TRIGGERED!
AlexRussia has joined #ruby
sarbs has joined #ruby
frozengeek_ has joined #ruby
tk__ has joined #ruby
yardenbar has joined #ruby
Azure has joined #ruby
bronson has joined #ruby
<Mon_Ouie> !troll bitgen
bitgen was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
frozengeek has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
eizua has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
<soahccc> I can workaround my problem but is there a #reject! like method that return the _removed_ entries? It returns the one it keeps but I already have them in the original array :/
al2o3-cr_ has joined #ruby
aryaching has joined #ruby
aries_liuxueyang has joined #ruby
al2o3-cr has quit [Ping timeout: 268 seconds]
<toretore> there is not
Kug3lis has joined #ruby
Kug3lis has quit [Client Quit]
jallen123 has joined #ruby
aries_liuxueyang has quit [Ping timeout: 260 seconds]
jcao219 has joined #ruby
LoneHermit has joined #ruby
jallen123 has quit [Remote host closed the connection]
hotpancakes has joined #ruby
jallen123 has joined #ruby
Sammichmaker has quit [Ping timeout: 246 seconds]
<soahccc> toretore: I just partitioned the array and replaced the old one. Guess that is clean enough :)
LoneHermit has quit [Ping timeout: 252 seconds]
jallen123 has quit [Ping timeout: 258 seconds]
Sammichmaker has joined #ruby
iogf has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
enyo has joined #ruby
rcs_ has joined #ruby
<rcs_> Hello.Can anyone of you tell me how to install metasploit on ubuntu...
enyo has quit [Ping timeout: 246 seconds]
yardenbar has quit [Ping timeout: 258 seconds]
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
ishahnaz has quit []
luckyruby has joined #ruby
houhoulis has joined #ruby
Kug3lis_off is now known as Kug3lis
nadir has joined #ruby
pilne has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
aries_liuxueyang has joined #ruby
xen0fon has quit [Quit: xen0fon]
milardovich has quit [Ping timeout: 252 seconds]
DLSteve has joined #ruby
rcs_ has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
raeoks has joined #ruby
nikivi has quit [Quit: zzz]
Sanctus has quit [Remote host closed the connection]
saneax is now known as saneax-_-|AFK
milardovich has quit [Ping timeout: 248 seconds]
symm- has joined #ruby
bronson has joined #ruby
symm- has quit [Client Quit]
milardovich has joined #ruby
jallen123 has joined #ruby
jmignault has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
symm- has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
jcao219 has quit [Ping timeout: 258 seconds]
saneax-_-|AFK is now known as saneax
jallen123 has quit [Remote host closed the connection]
frozengeek__ has joined #ruby
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
hutch34 has quit [Ping timeout: 264 seconds]
frozengeek_ has quit [Ping timeout: 260 seconds]
Pupeno_ has quit [Remote host closed the connection]
jmignault has quit [Ping timeout: 264 seconds]
jmignault has joined #ruby
hutch34 has joined #ruby
sparab97 has joined #ruby
raeoks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sparab97> I am new to the open source community and have decent knowledge about ruby and rails. Could someone please guide me as what steps should I follow in order to have a chance to be selected for gsoc 17 with ruby. Thank you
sparab97 has quit [Client Quit]
sparab97 has joined #ruby
hotpancakes has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
jhack has joined #ruby
jhack has quit [Client Quit]
jenrzzz has joined #ruby
aries_liuxueyang has quit [Ping timeout: 260 seconds]
tekeli-li has joined #ruby
Fernando-Basso has joined #ruby
gizmore has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
aries_liuxueyang has joined #ruby
doublemalt_ has joined #ruby
conta has quit [Ping timeout: 258 seconds]
dviola has joined #ruby
d0nn1e has quit [Ping timeout: 265 seconds]
nikivi has joined #ruby
SpiffTR has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
Pupeno has joined #ruby
d0nn1e has joined #ruby
DoubleMalt has quit [Ping timeout: 265 seconds]
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
Pupeno has quit [Ping timeout: 248 seconds]
saneax is now known as saneax-_-|AFK
bronson has joined #ruby
nankyokusei has joined #ruby
milardovich has quit []
bronson has quit [Ping timeout: 268 seconds]
luckyruby has quit [Quit: Leaving...]
SpiffTR has quit [Quit: Leaving.]
nankyokusei has quit [Ping timeout: 256 seconds]
dminuoso has quit [Ping timeout: 245 seconds]
jallen123 has joined #ruby
LoneHerm_ has joined #ruby
reverberations has joined #ruby
dminuoso has joined #ruby
vuoto has joined #ruby
LoneHerm_ has quit [Ping timeout: 264 seconds]
enilsen16 has joined #ruby
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
Channel6 has joined #ruby
Ishido has joined #ruby
vuoto has quit [Quit: Lost terminal]
aries_liuxueyang has joined #ruby
enyo has joined #ruby
SpiffTR has joined #ruby
bronson has joined #ruby
conta has joined #ruby
aries_liuxueyang has quit [Ping timeout: 252 seconds]
enyo has quit [Ping timeout: 264 seconds]
aries_liuxueyang has joined #ruby
izaakf has joined #ruby
xen0fon has joined #ruby
Olipro_ has joined #ruby
Kaze_FX has joined #ruby
Kaze_FX has quit [Client Quit]
tvon has joined #ruby
Olipro has quit [Ping timeout: 260 seconds]
Olipro_ is now known as Olipro
teclator has quit [Ping timeout: 258 seconds]
teclator_ has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<izaakf> hey
Kaze_FX has joined #ruby
meadmoon has joined #ruby
hotpancakes has joined #ruby
SpiffTR has quit [Quit: Leaving.]
frozengeek__ has quit [Read error: Connection reset by peer]
tk__ has quit [Quit: ばいばい]
<havenwood> izaakf: hi
hotpancakes has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
frozengeek__ has joined #ruby
jallen123 has quit [Ping timeout: 258 seconds]
<izaakf> havenwood: Before I try to do it for permutations. Do you think Cartesian products would help generate permutations a lot quicker
<izaakf> ?
sparab97 has quit [Ping timeout: 260 seconds]
nikivi has quit [Quit: zzz]
nikivi has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Azure has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has quit [Quit: WeeChat 1.6]
UserJosh has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
Mon_Ouie has joined #ruby
gheegh has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
jshjsh has quit [Ping timeout: 265 seconds]
chadhs has joined #ruby
<izaakf> is it possible to do something like this in ruby? (x -= 1)*=-1
aries_liuxueyang has quit [Ping timeout: 260 seconds]
chadhs has quit [Client Quit]
<tobiasvl> izaakf: it's not possible to do exactly that, but to answer whether you can do something "like" that I need to know what you want to achieve
<matthewd> izaakf: Not like that
aries_liuxueyang has joined #ruby
<izaakf> just toggling a variable between 1 and 0
<izaakf> so I have x -=1; x *= -1 which does what I want I was just wondering if there's a more compact way of doing it
<matthewd> one = [0, 1].cycle; ........; one.next
<izaakf> matthewd: is that really a better way to do what I'm trying to do? surely what I'm doing requires less memory
<tobiasvl> izaakf: do something like matthewd suggests, but for your specific question: x = (x - 1) * -1
muelleme has quit [Ping timeout: 265 seconds]
<izaakf> tobiasvl: I already had your suggestion, and I was trying to upgrade it. I thought x -= 1; x *= -1 would be better but maybe not
<matthewd> If you care about memory to that degree, you're in the wrong language
<matthewd> My real question would be why you want a toggling 0/1, though, I guess
<izaakf> matthewd: Fair enough, maybe I worded what I was trying say incorrectly. I'm trying to say why do .cycle when it's just as easy to do subtract then multiply
<matthewd> Ruby has a lot of higher level functionality in core & stdlib; generally the higher you go in describing the problem you're solving, the shorter your implementation can end up
<izaakf> matthewd: Toggleboard game
<matthewd> One describes what you want, the other describes (arcanely) how to do it
Ishido has quit [Read error: Connection reset by peer]
a1ph4g33k has joined #ruby
<matthewd> If you're just toggling between two arbitrary values, why not true & false?
<izaakf> matthewd: the board is an array
<izaakf> matthewd: 0 = off 1 = on, just thought that was the most logical way to create it
duderonomy has joined #ruby
Ishido has joined #ruby
<tobiasvl> the most logical would likely be true/false, 1 and 0 are after all magical constant values, although they're verrrrry ingrained at this point ;)
<izaakf> tobiasvl: since it's a CLI programme, reading a table of 0's and 1's is surely easier than a table of true's and false's
Pupeno has joined #ruby
<tobiasvl> sure, but you didn't say "easier", you said "most logical". but I have no idea what kind of program you're making, so just use whatever's best for you!
<izaakf> tobiasvl: It's just a light's out game on the command line
<matthewd> I'd be wary of designing the internal data structure in a way that saves you a map call when writing the UI
CloCkWeRX has quit [Ping timeout: 264 seconds]
binaryplease has joined #ruby
<izaakf> matthewd: what do you mean?
Gasher has joined #ruby
<matthewd> > reading a table of 0's and 1's is surely easier than a table of true's and false's
<matthewd> "reading" == the UI
<matthewd> No?
duderonomy has quit [Ping timeout: 240 seconds]
<izaakf> matthewd: Yeah, the user reading it
a1ph4g33k has quit [Read error: Connection reset by peer]
<tobiasvl> yeah don't design your internal data structure around how the data will be represented in a UI, that's bound to burn you later
hotpancakes has quit [Remote host closed the connection]
<tobiasvl> if the only reason you're using 1 and 0 is to print it out as that, just convert it before printing it
sarbs has quit [Read error: Connection reset by peer]
<matthewd> I'd also think more visually distinct characters ("." and "#" or something) would be superior for actual readability, but that's getting a bit off track
conta has quit [Ping timeout: 246 seconds]
ruid has quit [Ping timeout: 268 seconds]
DTZUZU2 has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
sarbs has joined #ruby
braincrash has quit [Ping timeout: 264 seconds]
electrostat has quit [Max SendQ exceeded]
electrostat has joined #ruby
djbkd has joined #ruby
hutch34 has quit [Ping timeout: 265 seconds]
DTZUZU2 has joined #ruby
enilsen16 has quit [Quit: enilsen16]
Fernando-Basso has joined #ruby
hahuang61 has quit [Ping timeout: 268 seconds]
jallen123 has joined #ruby
braincrash has joined #ruby
SpiffTR has joined #ruby
nikivi has quit [Quit: irc]
muelleme has joined #ruby
LoneHermit has joined #ruby
enilsen16 has joined #ruby
enilsen16 has quit [Client Quit]
skweek has quit [Ping timeout: 258 seconds]
LoneHermit has quit [Ping timeout: 246 seconds]
izaakf has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
conta has joined #ruby
enilsen16 has joined #ruby
duderonomy has joined #ruby
gigetoo has quit [Ping timeout: 258 seconds]
Azure has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
mattwildig has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
enyo has joined #ruby
Azure has joined #ruby
Pupeno has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 245 seconds]
enyo has quit [Ping timeout: 245 seconds]
jallen123 has quit [Ping timeout: 245 seconds]
duderonomy has joined #ruby
17WAAWKRA has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
toretore has quit [Ping timeout: 245 seconds]
skweek has joined #ruby
gheegh has joined #ruby
gheegh has quit [Max SendQ exceeded]
gheegh has joined #ruby
hutch34 has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mattwildig has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gheegh has quit [Read error: Connection reset by peer]
Lord_of_Life has quit [Excess Flood]
jallen123 has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 258 seconds]
Lord_of_Life has joined #ruby
xen0fon has quit [Quit: xen0fon]
hahuang61 has joined #ruby
benlieb has joined #ruby
Azure has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
braincrash has quit [Ping timeout: 258 seconds]
binaryplease has quit [Ping timeout: 252 seconds]
dnicole has joined #ruby
enilsen16 has quit [Quit: enilsen16]
jallen123 has quit [Remote host closed the connection]
jphase has quit [Read error: Connection reset by peer]
jphase has joined #ruby
enilsen16 has joined #ruby
benlieb has quit [Quit: benlieb]
conta has quit [Ping timeout: 256 seconds]
binaryplease has joined #ruby
braincrash has joined #ruby
hightower2 has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
hightower3 has quit [Ping timeout: 260 seconds]
hightower3 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
Azure has joined #ruby
jallen123 has joined #ruby
hightower2 has quit [Ping timeout: 258 seconds]
zipace has joined #ruby
Gasher has quit [Quit: Leaving]
SpiffTR has joined #ruby
neoncortex has quit [Quit: WeeChat 1.0.1]
JoshS has joined #ruby
UserJosh has quit [Ping timeout: 268 seconds]
hightower3 has quit [Ping timeout: 264 seconds]
elementaru has quit [Read error: Connection reset by peer]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
jallen123 has quit [Remote host closed the connection]
hightower3 has joined #ruby
jallen123 has joined #ruby
LoneHerm_ has joined #ruby
jshjsh has joined #ruby
jallen123 has quit [Ping timeout: 245 seconds]
JoshS has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
[gmi] has joined #ruby
pawnbox has quit [Client Quit]
ignarps has joined #ruby
djbkd has quit [Remote host closed the connection]
Pupeno has joined #ruby
aidalgol has joined #ruby
aidalgol is now known as Guest27055
Guest27055 is now known as aidalgol
jallen123 has joined #ruby
[gmi] has quit [Quit: Leaving]
Pupeno has quit [Remote host closed the connection]
binaryplease has quit [Quit: binaryplease]
jmignault has quit [Ping timeout: 258 seconds]
jallen123 has quit [Remote host closed the connection]
jallen123 has joined #ruby
xlegoman has joined #ruby
aidalgol has quit [Quit: Using Circe, the loveliest of all IRC clients]
enyo has joined #ruby
jallen123 has quit [Ping timeout: 258 seconds]
LoneHerm_ has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
houhoulis has joined #ruby
porfa has quit [Quit: porfa]
nankyokusei has quit [Ping timeout: 260 seconds]
muelleme has quit [Ping timeout: 258 seconds]
porfa has joined #ruby
meadmoon has quit [Quit: ZZZzzz…]
doublemalt_ has quit [Ping timeout: 256 seconds]
meadmoon has joined #ruby
benlieb has joined #ruby
thadtheman has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<ruby[bot]> thadtheman: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c285d67b99345dd60cbef0b1d63b0287
<ruby[bot]> thadtheman: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
benlieb has quit [Quit: benlieb]
<thadtheman> Why does line 19 generate 500+ simultaneous processes? I thought popen waits untill the process is done.
lolmaus_ has joined #ruby
<chrisseaton> thadtheman: IO.popen is non-blocking - the Ruby process continues to run as the new process does. However it may block later on if you connect the standard IO streams of the child process to something which needs to be drained.
<thadtheman> chrisseaton: can you clarify the however? What do you mean by connect?
<chrisseaton> thadtheman: IO.popen starts a process and gives you an IO object where when you read and write you do so from the process. I'm not entirely sure of the semantics, but I think you are responsible for reading from the process promptly. If it has written a lot and you aren't reading, I think the kernel will pause it until you have read more. The kernel can't
<chrisseaton> infinitely buffer the output of the child process forever, so at some point it needs to block.
hahuang61 has joined #ruby
<chrisseaton> thadtheman: It's similar to Unix pipes, if you're familiar with them.
al2o3-cr has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
mrwn has joined #ruby
porfa has quit [Quit: porfa]
hahuang61 has quit [Ping timeout: 246 seconds]
porfa has joined #ruby
al2o3-cr_ has quit [Ping timeout: 248 seconds]
<wnd> thadtheman, it is probably not the point here, but I just had to. dpkg --get-selections | sed '/deinstall/d; s/\s.*//' | xargs apt-cache show | sed '/^Source: /!d; s/[^ ]* //; s/ .*//' | sort -u | xargs apt-get source (which also fails vcs-sources, and may misbehave with versioned sources)
<wnd> at the very least it's probably a whole lot faster
electrostat has quit [Quit: uwotm8]
harai has joined #ruby
lightstalker has quit [Remote host closed the connection]
electrostat has joined #ruby
hotpancakes has quit [Remote host closed the connection]
sepp2k has quit [Disconnected by services]
sepp2k1 has joined #ruby
foption has quit [Remote host closed the connection]
sepp2k has joined #ruby
lightstalker has joined #ruby
jshjsh has quit [Ping timeout: 268 seconds]
sepp2k1 has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Quit: Konversation terminated!]
zipace has quit [Quit: Leaving]
nowhere_man has joined #ruby
hotpancakes has joined #ruby
hutch34 has joined #ruby
arthurbalfredo has quit [Quit: Connection closed for inactivity]
Azure has joined #ruby
hutch34 has quit [Remote host closed the connection]
teclator_ has quit [Quit: No Ping reply in 180 seconds.]
meadmoon has quit [Quit: I am functioning within established parameters.]
teclator has joined #ruby
hutch34 has joined #ruby
mark[oz] has joined #ruby
<solidsnack> When building a native gem, how does Ruby which build products to include in the resultant installation?
jmignault has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
<chrisseaton> solidsnack: Do you mean which .so files and things?
<solidsnack> Right.
teclator has joined #ruby
<chrisseaton> solidsnack: Do you know about the extconf.rb file? That configures it, but I think there's quite a bit of convention-over-configuration in this part of the system.
<solidsnack> So as far as I can tell, people use that script to generate a Makefile.
<solidsnack> Then further magic calls the Makefile.
<solidsnack> Maybe the name of the extension is used to set some target in the Makefile?
<chrisseaton> It's not too much magic - it's as you described - run extconf.rb, and then run make.
jmignault has quit [Ping timeout: 265 seconds]
<chrisseaton> extconf.rb does most things based on the values in RbConfig
<solidsnack> I see.
<solidsnack> So maybe RbConfig has some defaults like, if the extension is called y, try to copy liby.dylib on Mac, liby.so on Linux, y.dll on Windows and so forth.
LoneHerm_ has joined #ruby
Anonymoose2 has joined #ruby
<chrisseaton> solidsnack: Yes that's exactly it.
<chrisseaton> solidsnack: For example, OBJEXT, DLEXT, CPPFLAGS, LIBEXT are all configuration options in there.
toretore has joined #ruby
izaakf has joined #ruby
xen0fon has joined #ruby
reverberations has quit [Ping timeout: 258 seconds]
binaryplease has joined #ruby
LoneHerm_ has quit [Ping timeout: 264 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
roamingdog has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
hotpancakes has quit [Remote host closed the connection]
xen0fon has quit [Client Quit]
montanonic has joined #ruby
hotpancakes has joined #ruby
porfa has quit [Quit: porfa]
teclator has joined #ruby
<solidsnack> Hmm, okay.
<solidsnack> So what I have is a Ruby file that talks to a Rust library.
<solidsnack> It uses FFI to do so.
<solidsnack> So I don't really need to build an actual extension.
<chrisseaton> solidsnack: You just need to build the standalone Ruby library.
<solidsnack> Oh?
<chrisseaton> solidsnack: I mean - that's just what you need to do, I believe?
<solidsnack> Well, I think I need to make building the Rust code part of installing the Gem.
<chrisseaton> solidsnack: Maybe look at Nokogiri, which builds libxml itself I believe. However I'm sure that's very complicated.
<solidsnack> Ah. They might have a custom Makefile.
<chrisseaton> solidsnack: Well, hopefully just a couple of custom commands in extconf.rb
montanonic has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 245 seconds]
<chrisseaton> solidsnack: There must be simpler examples of what you want to do than Nokogiri, but I'm afraid I'm not sure what they are.
benlieb has joined #ruby
<chrisseaton> solidsnack: FFI is normally used to access system libraries that you manually install using a system package manager. But your usage is also sensible.
teclator has quit [Quit: No Ping reply in 180 seconds.]
Azure has quit [Ping timeout: 264 seconds]
<solidsnack> Trying to generate all the Ruby extension C stuff seemed like trouble :)
teclator has joined #ruby
mrwn has quit [Remote host closed the connection]
<chrisseaton> solidsnack: The FFI is also more compatible with JRuby and Rubinius.
teclator has quit [Client Quit]
bmurt has joined #ruby
teclator has joined #ruby
Azure has joined #ruby
porfa has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
djbkd has joined #ruby
balazs has quit [Read error: Connection reset by peer]
flying has quit []
hotpancakes has joined #ruby
bronson has quit [Remote host closed the connection]
grug has quit [Ping timeout: 258 seconds]
jhack has joined #ruby
_sfiguser has joined #ruby
porfa has quit [Quit: porfa]
sarlalian has quit [Ping timeout: 258 seconds]
teclator has quit [Quit: No Ping reply in 180 seconds.]
enyo has joined #ruby
teclator has joined #ruby
jhack has quit [Client Quit]
ledestin has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
tmtwd has joined #ruby
grug has joined #ruby
enyo has quit [Ping timeout: 258 seconds]
sarlalian has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
<izaakf> Hi I'm trying to group words by chars with this code self.group_by(&:chars)
<izaakf> is there anyway to do this and get words with the same letters grouped together
<Papierkorb> izaakf: could you give an example input with the expected output?
<izaakf> e.g to {["e", "r", "a" => ["era", "are"]}
<izaakf> for that example if input is era
<izaakf> e.g to {["e", "r", "a"] => ["era", "are"]}*
<apeiros> izaakf: sort the letters
teclator has quit [Quit: No Ping reply in 180 seconds.]
maloik48 has quit [Remote host closed the connection]
<Papierkorb> >> %w[era are foo bar].map{|word| [ word.chars.to_a.sort, word ]}.reduce(Hash.new{|h, k| h[k] = []}){|h, (k, v)| h[k] << v; h}
maloik has joined #ruby
<ruby[bot]> Papierkorb: # => {["a", "e", "r"]=>["era", "are"], ["f", "o", "o"]=>["foo"], ["a", "b", "r"]=>["bar"]} (https://eval.in/707376)
<Papierkorb> izaakf: ^ basically, that
benlieb has quit [Ping timeout: 258 seconds]
reverberations has joined #ruby
Azure has joined #ruby
teclator has joined #ruby
newbie1 has joined #ruby
Anonymoose2 has quit [Ping timeout: 268 seconds]
<apeiros> Papierkorb: why so complicated? just use group_by?
<apeiros> >> %w[era are foo bar].group_by {|word| word.chars.to_a }
<ruby[bot]> apeiros: # => {["e", "r", "a"]=>["era"], ["a", "r", "e"]=>["are"], ["f", "o", "o"]=>["foo"], ["b", "a", "r"]=>["ba ...check link for more (https://eval.in/707377)
<Papierkorb> oh, right
<apeiros> whoops
<apeiros> I accidentally a method
<apeiros> >> %w[era are foo bar].group_by {|word| word.chars.sort }
<ruby[bot]> apeiros: # => {["a", "e", "r"]=>["era", "are"], ["f", "o", "o"]=>["foo"], ["a", "b", "r"]=>["bar"]} (https://eval.in/707378)
<Papierkorb> " Adding the #sort is left as an excercise to the reader "
<apeiros> well, I actually deleted the wrong method ;-)
<apeiros> (to_a is not needed)
teclator has quit [Client Quit]
reverberations has quit [Ping timeout: 265 seconds]
teclator has joined #ruby
teclator has quit [Client Quit]
nankyokusei has joined #ruby
reverberations has joined #ruby
reverberations has quit [Max SendQ exceeded]
teclator has joined #ruby
skweek has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
muelleme has joined #ruby
unreal has quit [Read error: Connection reset by peer]
unreal has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
muelleme has quit [Ping timeout: 258 seconds]
porfa has joined #ruby
teclator has joined #ruby
saneax-_-|AFK is now known as saneax
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<izaakf> Papierkorb & apeiros thanks for the help. Sorry I forgot to reply tinkering with it now
<apeiros> that's at least a good reason ;-p
teclator has quit [Client Quit]
teclator has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
markholmes has joined #ruby
foption has joined #ruby
bmurt has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
montanonic has joined #ruby
teclator has joined #ruby
Vile` has joined #ruby
teclator has quit [Client Quit]
teclator has joined #ruby
hahuang61 has joined #ruby
teclator has quit [Client Quit]
bronson has joined #ruby
teclator has joined #ruby
kith has joined #ruby
porfa has quit [Quit: porfa]
ruby-lang500 has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
ruby-lang500 has quit [Ping timeout: 260 seconds]
xen0fon has joined #ruby
porfa has joined #ruby
xen0fon has quit [Client Quit]
canteen4 has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
CloCkWeRX has joined #ruby
newbie1 has quit [Read error: Connection reset by peer]
teclator has quit [Quit: No Ping reply in 180 seconds.]
newbie1 has joined #ruby
newbie1 has quit [Max SendQ exceeded]
mark[oz] has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
newbie1 has joined #ruby
mark[oz] has joined #ruby
mark[oz] has quit [Client Quit]
teclator has joined #ruby
blackbom1 has quit [Ping timeout: 248 seconds]
marr has joined #ruby
teclator has quit [Client Quit]
teclator has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v2.7 Beta Build (2017/01/01-2) 32 Bit]
Tempesta has joined #ruby
teclator has quit [Client Quit]
LoneHermit has joined #ruby
teclator has joined #ruby
brent_ has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]