apeiros changed the topic of #ruby to: Ruby 2.1.3; 2.0.0-p576; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<jhass> you first
havenwood has joined #ruby
<rubie> i was going to split it on all a's or b's
bricker`work has quit [Ping timeout: 250 seconds]
<jhass> regexp is forbidden?
splud has quit [Quit: splud]
<rubie> then if anything was longer than 3 it would return false
krisquigley has joined #ruby
<rubie> im having a hard time with it
<jhass> but it's simple
<jhass> do you you know rubular.com ?
iliketurtles has joined #ruby
<rubie> yes im on it now
Sawbones has quit [Remote host closed the connection]
<rubie> test string = after badly
<rubie> regular expression = /[ab+]/
<rubie> it highlights all the a's and b's
<jhass> yes
<rubie> but when i run the program it only returns a
iliketurtles has quit [Client Quit]
<jhass> [] defines a character class
davasaurous has quit [Remote host closed the connection]
<rubie> z= str.slice(/[ab+]/)
<jhass> a character class is a list of characters that can be matched
Sawbones has joined #ruby
geggam has joined #ruby
<jhass> in this case it matches a or b or +
<rubie> right, so i thought i was telling it to select all a's and b's
davasaurous has joined #ruby
<jhass> why do you slice?
n_blownapart has quit [Remote host closed the connection]
<rubie> a+One or more of a
<jhass> you simply want to test if it matches a certain regex
dx7_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Ankhers has joined #ruby
<jhass> right, but not inside a character class
cherwin has joined #ruby
<jhass> do you understand \w+ ?
justinmburrous has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
jcdesimp has joined #ruby
<rubie> no
<rubie> \w any word character
<jhass> right
<rubie> one or more of any word character?
<jhass> did you read a basic introduction to regular expressions yet?
hiyosi has joined #ruby
skammer1 has joined #ruby
<jhass> yes
<rubie> i did, but it was mostly definitions
<rubie> like on this rubular page
<existensil> /a.{3}b/
<rubie> would you be able to suggest anything
freerobby has quit [Quit: Leaving.]
benzrf|offline is now known as benzrf
dx7 has quit [Ping timeout: 272 seconds]
<havenwood> rubie: a non-regexp solution for fun: each_char.each_cons(5).any? { |a, *_, b| a == 'a' && b == 'b' }
gregf has quit [Quit: WeeChat 1.0]
dx7_ has quit [Ping timeout: 260 seconds]
RichardLitt has quit [Quit: RichardLitt]
nhhagen has joined #ruby
<jhass> will probably be slower than the regexp solution though
<jhass> not that it matters much here
<rubie> ok i will read through this
<jhass> rubie: http://regexcrossword.com/ for a more fun way :)
moritzs has quit [Read error: Connection reset by peer]
moritzschaefer has joined #ruby
<rubie> oh perfect!
Ankhers has quit [Ping timeout: 264 seconds]
<rubie> this will keep me busy for the rest of the night!
Digital-Ghost has quit [Remote host closed the connection]
skammer1 has quit [Ping timeout: 260 seconds]
gtc has joined #ruby
viv- has quit [Ping timeout: 272 seconds]
endash has quit [Quit: endash]
fun has joined #ruby
davasaurous has quit [Remote host closed the connection]
<fun> hey folks :D
nhhagen has quit [Ping timeout: 250 seconds]
startupality has quit [Quit: startupality]
fun is now known as fnt7
<havenwood> hi
davasaurous has joined #ruby
Ankhers has joined #ruby
candle_light_ben has joined #ruby
charliesome has quit [Quit: zzz]
blackdev1l is now known as zz_blackdev1l
ciampix has quit [Ping timeout: 245 seconds]
Digital-Ghost has joined #ruby
<fnt7> :)
<fnt7> hello
<fnt7> who are u?
<fnt7> :D
<fnt7> I am FNT
<fnt7> :D
<fnt7> lol
skolman has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<toretore> lol ;D ;D
candle_light_ben has quit [Quit: leaving]
<fnt7> toretore: this is new top channel!
<fnt7> :D
<toretore> best lol :PPPP
rubyonrailed has quit [Remote host closed the connection]
<fnt7> FifthWall:
<rubie> there is a great community here, thats for sure
<fnt7> yep :D
<fnt7> space of names
isthisreallife has quit [Ping timeout: 245 seconds]
JoshGlzBrk has joined #ruby
davispuh has quit [Ping timeout: 245 seconds]
<fnt7> hi JoshGlzBrk welcome to freedom island
JoshGlzBrk has quit [Client Quit]
Spami has joined #ruby
<fnt7> lol
emocakes__ has joined #ruby
<fnt7> anyway I am happy I made 1 RoR app to run
tkuchiki has joined #ruby
<fnt7> is there some way to double check it runs in production env?
<jhass> fnt7: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<fnt7> cool
mary5030 has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
mary5030 has joined #ruby
Sawbones has joined #ruby
emocakes has quit [Ping timeout: 260 seconds]
lolmaus has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
sanguisdex has joined #ruby
<existensil> you never really know if your app is production ready until its in production
SCHAAP137 has quit [Remote host closed the connection]
<jhass> I'd question you know then
<existensil> in the meantime, though, you can at least run it with rails environment set to production and see if anything obviously breaks
oddalot has quit [Quit: WeeChat 0.4.2]
<existensil> ha. good point jhass
sanguisdex has quit [Client Quit]
maestrojed has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
Sawbones has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
zz_karupa is now known as karupa
fabrice31 has quit [Ping timeout: 244 seconds]
toretore has quit [Quit: This computer has gone to sleep]
gregf has joined #ruby
iliketurtles has joined #ruby
rezzack1 has quit [Quit: Leaving.]
Nieralyte has quit [Quit: Nieralyte]
dc has joined #ruby
oo_ has joined #ruby
coderhs has joined #ruby
dc has quit [Remote host closed the connection]
coderhs has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
banister_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
cndiv has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
jonmorehouse has joined #ruby
thumpba has joined #ruby
thejamespinto has quit [Read error: Connection reset by peer]
rezzack has joined #ruby
justinmburrous has quit [Remote host closed the connection]
dkphenom has joined #ruby
thejamespinto has joined #ruby
oo_ has quit [Remote host closed the connection]
banister has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
Digital-Ghost has quit [Remote host closed the connection]
ghr has joined #ruby
endash has joined #ruby
d4nk has joined #ruby
jasooon has joined #ruby
ursooperduper has joined #ruby
oo_ has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 272 seconds]
mastr_bennett[x] has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
carlyle_ has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
msmith has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jasooon has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
aleatorik has joined #ruby
carlyle_ has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
msmith has quit [Ping timeout: 246 seconds]
lolmaus has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
ValicekB has quit [Ping timeout: 260 seconds]
ffranz has quit [Ping timeout: 260 seconds]
aleatorik is now known as wolves_cs
narcan has joined #ruby
Sawbones has joined #ruby
jobewan has joined #ruby
cndiv has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
sevenseacat has joined #ruby
fnt7 is now known as channelsservver
lampd1 has joined #ruby
channelsservver is now known as fnt7
fnt7 is now known as funt7
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funt7 has quit [Quit: Page closed]
echevemaster has quit [Ping timeout: 245 seconds]
echevemaster has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
nettoweb has joined #ruby
ValicekB has joined #ruby
nettoweb has quit [Max SendQ exceeded]
ffranz has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
havenwood has quit [Remote host closed the connection]
ndrei has joined #ruby
cndiv has quit [Ping timeout: 244 seconds]
mikepack has quit [Remote host closed the connection]
<sevenseacat> looks like code.
slyslick has quit [Ping timeout: 240 seconds]
skammer1 has joined #ruby
<ferr> lol
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
aspires has quit []
nhhagen has joined #ruby
tokik has joined #ruby
boombadaroomba has joined #ruby
Cache_Money has joined #ruby
aspires has joined #ruby
skammer1 has quit [Ping timeout: 260 seconds]
mollitz has joined #ruby
Olipro has quit [Read error: Connection reset by peer]
nhhagen has quit [Ping timeout: 260 seconds]
emmesswhy has joined #ruby
jasooon has joined #ruby
boombadaroomba has quit [Ping timeout: 250 seconds]
Channel6 has joined #ruby
moritzschaefer has quit [Ping timeout: 246 seconds]
Cache_Money has quit [Quit: Cache_Money]
charliesome has joined #ruby
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
modernbob has quit [Quit: Konversation terminated!]
bricker`work has joined #ruby
modernbob has joined #ruby
<jhass> ferr: ancestors includes modules, not only superclasses
aleatorik has joined #ruby
<ferr> I see now
<ferr> So in this case I should use enumerator to find all subclasses?
<ferr> *superclasses
Sawbones has quit [Remote host closed the connection]
Mso150 has joined #ruby
Sawbones has joined #ruby
zeroNones has joined #ruby
<jhass> for finding the first superclass that defines it starting from the passed object something with inject would work I guess, but you should find the first child that defines it starting from BasicObject. So you'll need some iteration and two flags
<jhass> or yeah, build up the whole inheritance chain to look at, reverse it and call find/detect
kobain has joined #ruby
<ferr> Which way would you use?
slyslick has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
<jhass> I'm not sure :)
<jhass> I'd probably code up both and see which feels nicer :P
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
xcv has joined #ruby
Sawbones has quit [Ping timeout: 272 seconds]
agjacome has quit [Quit: leaving]
emmesswhy has quit [Quit: This computer has gone to sleep]
zorak8 has quit [Ping timeout: 272 seconds]
duncannz has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
benzrf is now known as benzrf|offline
emmesswhy has joined #ruby
j_mcnally has quit [Ping timeout: 272 seconds]
benzrf|offline is now known as benzrf
wallerdev has quit [Quit: wallerdev]
bwilson has quit [Quit: bwilson]
mary5030 has quit [Ping timeout: 246 seconds]
emmesswhy has quit [Client Quit]
ghr has joined #ruby
AmBienCeD has quit []
bluehavana has joined #ruby
yfeldblum has quit [Remote host closed the connection]
chrishough has joined #ruby
aspires has quit []
ghr has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
ursooperduper has quit [Quit: Textual IRC Client: www.textualapp.com]
carlyle_ has joined #ruby
VBlizzard has joined #ruby
zn has quit [Ping timeout: 244 seconds]
modernbob has quit [Quit: Konversation terminated!]
zorak8 has joined #ruby
mikepack has joined #ruby
modernbob has joined #ruby
carlyle_ has quit [Ping timeout: 244 seconds]
krisquigley has joined #ruby
Es0teric has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
magic_ is now known as magic
magic has quit [Changing host]
magic has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
justinmburrous has joined #ruby
zn has joined #ruby
zn has joined #ruby
zn has quit [Changing host]
mikepack has quit [Ping timeout: 246 seconds]
geggam has quit [Ping timeout: 260 seconds]
krisquigley has quit [Ping timeout: 246 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yetanotherdave has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
bricker`work has quit [Ping timeout: 250 seconds]
narcan has joined #ruby
rkalfane has joined #ruby
nettoweb has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
geggam has joined #ruby
mofai has quit []
Mso150 has quit [Ping timeout: 244 seconds]
<jhass> mmh, seems okay. Class.class == Class
maestrojed has quit [Quit: Computer has gone to sleep.]
<ferr> K
<jhass> also (public_)method_defined?
badhatter has quit [Read error: Connection reset by peer]
modernbob has quit [Quit: Konversation terminated!]
<ferr> what do you mean?
<jhass> instance_methods.include? -> method_defined? or public_method_defined?
<jhass> avoids allocating an array
<jhass> and is more expressive
<ferr> Oh
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tyll has quit [Ping timeout: 245 seconds]
coderdad has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
<ferr> Thanks a lot for your help
Mia has quit [Read error: Connection reset by peer]
badhatter has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
Soda has quit [Remote host closed the connection]
w09x has joined #ruby
tyll has joined #ruby
modernbob has joined #ruby
modernbob has joined #ruby
modernbob has quit [Changing host]
skammer1 has joined #ruby
AtumT has quit [Remote host closed the connection]
mikepack has joined #ruby
troyready has quit [Ping timeout: 260 seconds]
nhhagen has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benzrf is now known as benzrf|offline
wjimenez_ has quit [Remote host closed the connection]
rubie has quit [Ping timeout: 246 seconds]
wjimenez5271 has joined #ruby
benzrf|offline is now known as benzrf
fabrice31 has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
skammer1 has quit [Ping timeout: 244 seconds]
emocakes__ has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
davasaurous has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 272 seconds]
AndroUser466 has joined #ruby
Ankhers has quit [Ping timeout: 264 seconds]
wjimenez5271 has quit [Ping timeout: 272 seconds]
agrinb has joined #ruby
mikepack has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 244 seconds]
emocakes has joined #ruby
w09x_ has joined #ruby
coderdad has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
skolman has quit [Remote host closed the connection]
w09x_ has quit [Client Quit]
jcdesimp has quit [Quit: Leaving...]
skolman has joined #ruby
Logomachist has joined #ruby
tectonic has joined #ruby
awc737 has joined #ruby
AndroUser466 has quit [Ping timeout: 272 seconds]
w09x has quit [Ping timeout: 244 seconds]
rezzack has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
jackyalcine is now known as jalcine
skolman has quit [Ping timeout: 258 seconds]
cherwin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmburrous has joined #ruby
radic- has joined #ruby
jobewan has quit [Remote host closed the connection]
AlexRussia has joined #ruby
manzo has quit [Ping timeout: 272 seconds]
gsd has joined #ruby
wallerdev has quit [Quit: wallerdev]
radic_ has quit [Ping timeout: 272 seconds]
mikeg has joined #ruby
davasaurous has joined #ruby
aspires has joined #ruby
mollitz has quit [Ping timeout: 272 seconds]
mollitz has joined #ruby
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
davasaurous has quit [Remote host closed the connection]
nonmadden has joined #ruby
one_egg_each has joined #ruby
ghr has joined #ruby
dnordstrom has quit [Read error: Connection reset by peer]
<gizmore> is there a nicer way to write:
<gizmore> def autopaste_message(messages)
<gizmore> text = ''
<gizmore> messages.each{|msg| text += "#{msg.reply_data}\n" }
<gizmore> end
<gizmore> text
aspires has quit []
dnordstrom has joined #ruby
coderdad has joined #ruby
coderdad has quit [Remote host closed the connection]
KC9YDN has quit [Read error: Connection reset by peer]
<jhass> gizmore: messages.map(&:reply_data).join("\n")
ghr has quit [Ping timeout: 258 seconds]
endash has quit [Quit: endash]
<one_egg_each> use join method
emmesswhy has joined #ruby
<one_egg_each> jhass has the right suggestion
<agrinb> jhass: nice
mastr_bennett[x] has joined #ruby
bricker`LA has joined #ruby
mastr_bennett[x] has quit [Client Quit]
<agrinb> I'm testing some code, I see there's a comparison of Time and Date, it yields true. It should yield false.
gerep has quit [Quit: Leaving]
<agrinb> I'm actually surprised that it works all together considering they are two different classes
<gizmore> jhass: thank you very much... i do not understand the map function
carlyle_ has joined #ruby
<agrinb> or is possible to compare the two
<gizmore> agrinb: i guess you can compare the two nicely
<jhass> gizmore: it builds a new array from the return values of the passed block: messages.map {|msg| msg.reply_data }
d4nku_ has quit [Quit: leaving]
<gizmore> aah right... thank you ... and thr &: ??
<jhass> &:reply_data is just a shortand for that block
xcv has quit [Remote host closed the connection]
starless has joined #ruby
<gizmore> "&:" is shorthand for "|x| x" ?
<jhass> not quite
<jhass> the operator is &
<gizmore> well... turning x into self, right
<jhass> you pass it the symbol :reply_data
<gizmore> oh
hamakn_ has quit [Remote host closed the connection]
<jhass> it calls to_proc on it, so Symbol#to_proc
<gizmore> wow, thank you... too much, but thank you a lot
hamakn has joined #ruby
<jhass> Symbol#to_proc returns a proc that calls the method with the symbols name on the first argument passed to it
<gizmore> i will just avoid & inside yielded/called stuff for now :)
<jhass> & takes that proc and passes it as a block
<gizmore> aha
<gizmore> so & turns a proc into a block again?
<jhass> yes
<jhass> in a method call
<jhass> in a method definition it does the inverse actually
<gizmore> i have some code regarding this, i would like you to take a peek... https://github.com/gizmore/ricer2/blob/master/app/models/filewalker.rb
<agrinb> > Time.now
<agrinb> => 2014-10-02 22:48:00 -0400
<agrinb> [13] )> meeting.last_day
<gizmore> it works fine, but i would just like a comment
<agrinb> => Fri, 03 Oct 2014
<agrinb> [14]
<agrinb> )> Time.now >= meeting.last_day
<agrinb> => true
mikepack has joined #ruby
<agrinb> does that make any sense?
<jhass> agrinb: sure
carlyle_ has quit [Ping timeout: 244 seconds]
<agrinb> please explain
<gizmore> agrinb: everything makes sense ... maybe you want time.to_i, date.to_i ?
<jhass> the biggest time in your date is older than the current time
<jhass> thus the current time is newer (bigger) than it
<gizmore> agrinb´s example should return false imho
<agrinb> got it
<jhass> maybe date normalizes to 00:00 of that day, I didn't check
<gizmore> >> Time.now > Time.new(2015)
<eval-in_> gizmore => false (https://eval.in/201323)
<gizmore> but the comparator seems to work! gosh
<jhass> gizmore: don't raise Exception, only raise classes equal to or below StandardError
<gizmore> jhass: indeed, thats what i have spotted too (showing code helps to spot errors thyself!)
hamakn has quit [Ping timeout: 272 seconds]
<gizmore> jhass: no more rants? :]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmburrous has quit [Remote host closed the connection]
chihhsin_wego has joined #ruby
mary5030 has joined #ruby
<jhass> I don't know your patterns but I would consider using **/* as pattern instead of recursion
chihhsin_cloud has joined #ruby
<gizmore> pattern is for filenames
<jhass> and .partition the result into files and directories
<gizmore> so, f.e., i can filewalk all *.yml inside a dir or recursively
chihhsin_wego has quit [Client Quit]
<gizmore> not sure if it could have been done more smartly, but it works
<jhass> **/*.yml
justinmburrous has joined #ruby
<gizmore> yeah, looks more smart to me... didn´t know that
<jhass> docs for File::fnmatch are a good read ;)
<gizmore> what it also does is make sure to call all files first, then the dirwalk
<gizmore> requirement for recursing files in this ricer2 project
<jhass> proc_ seems like a silly name, what does it stand for?
freerobby has quit [Quit: Leaving.]
IrishGringo has quit [Ping timeout: 240 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
emmesswhy has quit [Quit: This computer has gone to sleep]
<gizmore> process?
<gizmore> traverse means process_and_traverse
<gizmore> so proc_ == "work on/with"
<gizmore> agreed "processing" is not a nice description of a task :P
<gizmore> s/nice/accurate
<gizmore> but for such generic stuff, processing is sometimes the best i come up with
arup_r has joined #ruby
hamakn has joined #ruby
braincrash has quit [Quit: bye bye]
<gizmore> jhass: if you wanna see something funny and ruby, i am working on chatbot in #ricergame ... it is a quite pleasuring program :)
j_mcnally has joined #ruby
davasaurous has joined #ruby
russt has joined #ruby
skammer1 has joined #ruby
Relaxation___ has joined #ruby
Relaxation___ is now known as relax
relax is now known as casual
braincrash has joined #ruby
mikeg has quit [Ping timeout: 260 seconds]
davasaurous has quit [Ping timeout: 272 seconds]
cndiv has joined #ruby
Suchit_ has joined #ruby
Suchit_ has quit [Client Quit]
skammer1 has quit [Ping timeout: 258 seconds]
krz has joined #ruby
slyslick has quit [Ping timeout: 240 seconds]
KC9YDN has joined #ruby
Suchit__ has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
Suchit___ has joined #ruby
<jhass> gizmore: http://paste.mrzyx.de/p26aeb5d5/ I think something like that makes for a nicer API :)
<eam> apeiros: when I said rvm was slow as hell, guess what: it was actually due to some crazy instrumentation on bash
govg has quit [Ping timeout: 260 seconds]
<eam> which happened to have a severe impact on rvm's routines
arescorpio has joined #ruby
<eam> now I'm back to a snappy .45ms
<eam> er, 450ms
deric_skibotn has quit [Ping timeout: 246 seconds]
voodoofish has quit [Ping timeout: 258 seconds]
deric_skibotn has joined #ruby
abdulsattar has joined #ruby
icebourg has joined #ruby
govg has joined #ruby
VBlizzard is now known as Blizzyy
Suchit____ has joined #ruby
Blizzyy is now known as VBlizzard
Suchit__ has quit [Ping timeout: 272 seconds]
kinesis has joined #ruby
<jhass> gizmore: er, line 42 should be paths = Dir["#{directory}#{'/**' if recursive}/#{pattern}"] but you get the idea
emocakes has quit [Ping timeout: 244 seconds]
<kinesis> What's the best way to get "Chef Experience" (no jobs on ElanceOdesk have this and most system administrator jobs require 5 years of it)
Suchit___ has quit [Ping timeout: 245 seconds]
<sevenseacat> use chef to administer servers?
voodoofish has joined #ruby
centrx has joined #ruby
krz has quit [Read error: No route to host]
centrx has quit [Remote host closed the connection]
emocakes has joined #ruby
staticshock has quit [Quit: leaving]
krz has joined #ruby
Channel6 has joined #ruby
Suchit____ has quit [Ping timeout: 244 seconds]
pwh has quit []
_maes_ has joined #ruby
jasooon has quit [Ping timeout: 272 seconds]
thomasxie has joined #ruby
coderdad has joined #ruby
coderdad has quit [Remote host closed the connection]
zorak8 has quit [Read error: Connection reset by peer]
chihhsin_wego has joined #ruby
<kinesis> I guess so. SO put $500 into an Amazon EC2 account and just practice scaling a mock infrastructure?
oo_ has quit [Remote host closed the connection]
Kricir has joined #ruby
chihhsin_wego has quit [Client Quit]
oo_ has joined #ruby
Kricir has quit [Remote host closed the connection]
<sevenseacat> well no... either have a developer job that also involves some devops, or actually build your own apps that require deployment, etc.
aleatorik has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
abdulsattar has quit [Ping timeout: 246 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chihhsin_wego has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
oo_ has quit [Ping timeout: 244 seconds]
one_egg_each has left #ruby [#ruby]
Logomachist has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 244 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
jimmyy has joined #ruby
krisquigley has joined #ruby
<kinesis> RIght, you're correct in that approaching companies direct from their online job postings isn't working out. You have to know someone inside.
ghr has joined #ruby
<sevenseacat> i didnt say that :/
gsd has joined #ruby
duncannz has joined #ruby
<kinesis> I don't know what else to do though, Bay Area is expensive and I need some $$$. It's tempting to put up with writing some Ruby / DSL for a decent income
<kinesis> I'm coming from PHP writing, and did some Ruby in the past.
jonr2219 has joined #ruby
KC9YDN has quit [Ping timeout: 244 seconds]
bricker`LA has quit [Quit: leaving]
Photism has joined #ruby
one_egg_each has joined #ruby
<benzrf> kinesis: eewk
jonr2219 has quit [Client Quit]
<dkphenom> this maybe really stupid, but i have a question on substring matching... i have a class that finds the substring im looking for with a regex and in my if statement should return a properly formatted substring instead it prints the original substring im matching on... feel like im going in circles :/
ghr has quit [Ping timeout: 260 seconds]
krisquigley has quit [Ping timeout: 272 seconds]
<jhass> dkphenom: Please share your code on https://gist.github.com
hiyosi has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
KC9YDN has joined #ruby
one_egg_each has quit [Client Quit]
<gizmore> kinesis: i made a very small ruby tut for php migrators... https://www.wechall.net/ruby_tut1.php - it is far from complete
Sawbones has quit [Remote host closed the connection]
carlyle_ has joined #ruby
<jhass> you made it in php instead of ruby? not very convincing :P
<sevenseacat> hah
carlyle_ has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
<dkphenom> @jhass, i did it in pastebin, here it is: http://pastebin.com/jshBvNn2... id like my output to be like it's in the comment at the bottom of the file
Adran has quit [Quit: Este é o fim.]
<dkphenom> any help would be much appreciated
<gizmore> jhass: in fact i use a rewrite rule that calls a brainfuck cgi ;)
<gizmore> This paste has been removed!
<dkphenom> eh?
Sawbones has joined #ruby
Sawbones has quit [Remote host closed the connection]
Adran has joined #ruby
duncannz has quit [Quit: Leaving]
voodoofish has quit [Read error: Connection timed out]
<jhass> dkphenom: you store the result in @ph, puts calls to_s on your object which uses @arg
duncannz has joined #ruby
<jhass> btw use better variable names please
<jhass> also result won't be available that way in your other methods
zorak8 has joined #ruby
<jhass> and I've no idea why you assign that local in to_s
duncannz has quit [Remote host closed the connection]
coderdad has joined #ruby
<dkphenom> still learning ruby probably lots of mistakes
thomasxie has left #ruby [#ruby]
<dkphenom> could you pastebin your suggestion?
abdulsattar has joined #ruby
<jhass> it's no suggestions, it's an explanation for your current behavior
voodoofish has joined #ruby
<jhass> you might need to read up again on the difference between local_variable and @instance_variable
<dkphenom> but im explicityly returning ph
kyb3r_ has joined #ruby
<jhass> where?
<dkphenom> in my if statement
<dkphenom> when it finds a match
<jhass> well, yeah main's return value becomes the rhs side of the assignment since that's the value of that expression and thus it becomes the return value of initialize, but the return value of initialize is ignored
<jhass> new returns a new instance of your class, always
alvaro_o has quit [Quit: Ex-Chat]
<gizmore> dkphenom: line 14 ... @arg = to_s should be @arg = arg.to_s
agrinb has quit [Remote host closed the connection]
<jhass> doesn't matter much as he then isn't using @arg as argument for match
<dkphenom> yeah i fixed that gizmore, i was trying to have a dedicated to_s method, but im still getting the same result
<gizmore> dkphenom: and your pattern makes no sense at all
Logomachist has joined #ruby
<gizmore> unless area code is something without country code
agrinb has joined #ruby
<dkphenom> pattern works for all my test cases
<dkphenom> correct no country code
<gizmore> well... you can do this in 1 line then?
<dkphenom> jhass, im trying to follow what you're saying but getting a bit confused
<dkphenom> which line do i need to change?
<gizmore> so 5 lines for a nice class and clean code
<gizmore> you need to rewrite it in only 5 lines :P
<jhass> dkphenom: again no suggestions, just explanations
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kinesis> thanks Gizmore.
mary5030 has quit [Remote host closed the connection]
coderdad has quit [Remote host closed the connection]
<gizmore> dkphenom: let me check if i can come up with a nice class definition for you :)
<dkphenom> gizmore, im trying to learn not really concerned with elegance right now
<kinesis> I'm not exactly a 'beginner' just someone who stopped using it and can pick back up quickly.
<dkphenom> just stuck on returning the right thing at the moment
<gizmore> is attr_reader a ruby kernel function?
<jhass> dkphenom: what do you think .new does?
chipotle has quit [Quit: cya]
<jhass> gizmore: Module I think
<dkphenom> jhass, instantiates teh class to an object based on that class
davasaurous has joined #ruby
<jhass> dkphenom: and? what does it return?
fabrice31 has joined #ruby
<gizmore> class Phone
<gizmore> attr_reader :area_code, :prefix, :root
<gizmore> def initialize(arg)
<gizmore> end
<dkphenom> should return a phone number
<gizmore> discard, @area_code, @prefix, @root = *(/\(?\b(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})\b/.match(arg.to_s))
<gizmore> end
<jhass> dkphenom: be more precise there
agrinb has quit [Ping timeout: 260 seconds]
<dkphenom> should return whats in main, specifically whats in teh if bloc, if it's successful on matching then it should return a proper phone number otherwasie an exception
<jhass> gizmore: /topic
arup_r has quit [Quit: Leaving.]
duncannz has joined #ruby
tylersmith has quit [Remote host closed the connection]
<jhass> dkphenom: now let me repeat me myself: .new returns an object of your class, always
tylersmith has joined #ruby
<jhass> dkphenom: your assumptions on what new returns are wrong, you should go reread that chapter of whatever tutorial/book you follow ;)
<gizmore> it worked for me... i called Phone.new, and i got a new mobile phone number \o/ *kiddings*
<gizmore> phyiscally ... sry
fabrice31 has quit [Ping timeout: 272 seconds]
<dkphenom> gizmore, so the regex is right :)
x1337807x has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<dkphenom> what abou the rest of the class other than the constructor?
justinmburrous has quit [Remote host closed the connection]
<jhass> we'll come back to that after you understood the current issue ;)
russt has quit [Quit: russt]
<gizmore> in my code above, the instance/member variables @area_code, @prefix and @root are set ... if something does not work, an exception is thrown
tylersmith has quit [Ping timeout: 272 seconds]
justinmburrous has joined #ruby
<gizmore> dkphenom: i use the * to expand the pregmatch result and multi assign all 4 vars
russt has joined #ruby
agrinb has joined #ruby
VBlizzard has quit [Ping timeout: 260 seconds]
skammer1 has joined #ruby
nhhagen has joined #ruby
<gizmore> dkphenom: with the attr_reader above, i create 3 functions: def area_code; return @area_code; end - def prefix; @prefix; end - and the other one
<jhass> dkphenom: no offense but I think you're way over his head right now
<jhass> er, gizmore ^ sorry
<gizmore> jhass: i think learning by doing is best... because practice > books
<dkphenom> thanks gizmore, really appreciate it
<jhass> sure, but you won't help with throwing a bunch of new things at him
<gizmore> but i have to admit, i should read a book first, before i start picking around
hiyosi has joined #ruby
<gizmore> jhass: lets just solve his problem in a way he understands and learns from
<jhass> I see people moving on when "it works" way too often
awong_web has joined #ruby
<gizmore> i think he knows classes and objects a bit... just because he does not get it 100% right does not mean he should solve his problem first
<jhass> well, that's clearly an exercise to learn classes and objects
<jhass> that's the actual problem to solve
<jhass> not parsing phone numbers so much
<gizmore> i don´t see a problem of that kind in his code, but.... yep, classes should be quite well understood, and ruby, additionally, has some quirks (class_variables vs instance_variables)
<dkphenom> gizmore, im getting nils for those values when i try to call it with new(1234567890)
sevvie has quit [Ping timeout: 245 seconds]
<gizmore> not an exception?
<dkphenom> that shouldn't produce an exception
<gizmore> maybe because of your pattern
<gizmore> try an easier pattern, ... your regex is ugly as my face
<dkphenom> no that fits the pattern, it's a 10 digit number
skammer1 has quit [Ping timeout: 240 seconds]
jasooon has joined #ruby
<gizmore> the ugly pattern was the first thing i saw was ugly :P
nhhagen has quit [Ping timeout: 245 seconds]
<gizmore> and getting the parse right, is the raise and fall of your phone numbers ;)
<dkphenom> gizmore, can I pm you?
<gizmore> yes, please :) unless someone else would like regex101 course
<gizmore> else #ricergame :)
hiyosi has quit [Ping timeout: 258 seconds]
abdulsattar has quit [Ping timeout: 272 seconds]
<gizmore> jhass: i have to thank you again for your map and proc help earlier. and very often i am disagreeing with people who do thinks correctly
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
IrishGringo has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
zorak8 has quit [Ping timeout: 244 seconds]
gccostabr has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
jasooon has quit [Ping timeout: 272 seconds]
gccostabr has quit [Client Quit]
lolmaus has joined #ruby
<awong_web> This an okay channel to ask a nokogiri question on?
<jhass> yup
<awong_web> yay!
<awong_web> I'm trying to extend nokogiri-xmlsec for xmlsig signatures with a URI in the References node. The underlying libxmlsec1 library requires a DTD that specifies the ID type for a given document otherwise it fails early.
abdulsattar has joined #ruby
<awong_web> To work around this...I want to get Nokogiri to add a Doctype like <!DOCTYPE Assertion [ <!ELEMENT Assertion (#PCDATA)> <!ATTLIST Assertion ID ID #IMPLIED> ]>. That sounded easy in theory, but I've been pouring over APIs for hours and I can't figure out how to do that.
<awong_web> Anyone know how to modify the Doctype on a nokogiri document?
Guest50373 has joined #ruby
<jhass> that's quite specific :P I don't know the proper answer but I'd consider working around it by rendering the document to a string, do some simple string manipulation and feed it back into Nokogiri
<Guest50373> Any guys here who'd done any SOA ?
<Guest50373> Question being: how is model duplication avoided between services without coupling each service to shared code?
cerberblue has joined #ruby
oo_ has joined #ruby
<awong_web> jhass: Hah...yeah. I've been banging my head at xmlsig/xmlenc for about 3 days now. It's painful. Good idea with the string manipulation. I'll give that a shot.
<Guest50373> The question seems to embed a contradiction, so it seems that either one requirement tends to cede in SOA - or there's an entire paradigm shift that I'm unaware of, going on
<awong_web> I was really just hoping for Nokogiri to have somethin glike document.dtd= [provider your own DTD that you newed here] but it doesn't seem to.
slester has quit [Ping timeout: 240 seconds]
spicerack has joined #ruby
AlexRussia has joined #ruby
carlyle_ has joined #ruby
carlyle_ has quit [Read error: Connection reset by peer]
ffranz has quit [Quit: Leaving]
echevemaster has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
chrishough has joined #ruby
agrinb has quit [Remote host closed the connection]
shadowfios has joined #ruby
agrinb has joined #ruby
ghr has joined #ruby
thomasxie has joined #ruby
<shadowfios> hello, i'm trying to make a web application with ruby, how would one get data from the client's url or GET request?
<shadowfios> for instance the client makes a connection to http://www.foo.bar/myfile.rb?num=1234
<shadowfios> how would the server be able to get the 1234
chihhsin_wego has quit [Quit: leaving]
agrinb has quit [Ping timeout: 260 seconds]
ghr has quit [Ping timeout: 260 seconds]
pagioss has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
<jhass> shadowfios: that depends on the framework you use
<shadowfios> Rack with camping (or maybe sinatra if I have to change)
AlexRussia has quit []
chihhsin_cloud has quit []
chihhsin_znc has joined #ruby
thomasxie has quit [Quit: Leaving.]
nettoweb has joined #ruby
<benzrf> bye
nettoweb has quit [Max SendQ exceeded]
<jhass> shadowfios: quick glance at docs seem to suggest @input
<jhass> "You might also notice that we use @input.content. The @input-hash contains any extra parameters sent, like those in the forms and those in the URL (/posts?page=50)."
benzrf is now known as benzrf|offline
<shadowfios> in camping?
chihhsin_znc has left #ruby [#ruby]
ProLoser has joined #ruby
havenwood has joined #ruby
<shadowfios> ah found it, thank you
<shadowfios> goodbye
shadowfios has quit [Quit: Page closed]
jhass is now known as jhass|off
nrsk has joined #ruby
arescorpio has quit [Excess Flood]
spastorino has quit [Quit: Connection closed for inactivity]
cndiv has quit [Quit: WeeChat 0.4.3]
jonmorehouse has quit [Ping timeout: 272 seconds]
<ProLoser> what do i need to do to get `bundle install` to work in the terminal?
thrasymachus has joined #ruby
havenwood has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
d4nk has quit []
<sevenseacat> depends on why its not working for you now
<ProLoser> it just doesn't recognize the bundle command
<ProLoser> i've never coded ruby
<sevenseacat> do you have bundler installed?
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ProLoser> how do i install it?
ta has quit [Remote host closed the connection]
<sevenseacat> `gem install bundler`
<ProLoser> danke
<Guest50373> i wonder if bundler should just be in core
<Guest50373> why bother having such an integral tool as a rubygem
nonmadden has quit [Remote host closed the connection]
<Guest50373> does it have any realstic competition anyway
<Guest50373> realistic*
grenierm has joined #ruby
nonmadden has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<sevenseacat> some people dont like or use it
nhhagen has joined #ruby
ProLoser has quit []
ClarusCogitatio has quit [Ping timeout: 260 seconds]
skammer1 has joined #ruby
sinkensabe has joined #ruby
<Guest50373> sevenseacat: how do they handle their ruby deps?
<sevenseacat> i have no idea. probably with freat difficulty.
<sevenseacat> *great
<Guest50373> i was going to spout "convention over configuration" but that's Rails rather than Ruby
hiyosi has joined #ruby
boombadaroomba has joined #ruby
ClarusCogitatio has joined #ruby
rubyonrailed has joined #ruby
nonmadden has quit [Ping timeout: 240 seconds]
pagioss has joined #ruby
nhhagen has quit [Ping timeout: 250 seconds]
jhass|off is now known as jhass
jasooon has joined #ruby
skammer1 has quit [Ping timeout: 250 seconds]
hiyosi has quit [Ping timeout: 245 seconds]
boombadaroomba has quit [Ping timeout: 258 seconds]
<jhass> Guest50373: there's work in integrating the core parts of bundler into rubygems, you can already use rubygems to install gems from a Gemfile for example
<sevenseacat> oh really?
<jhass> yeah, gem install -g
<sevenseacat> awesome
nonmadden has joined #ruby
jthomp has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 260 seconds]
Logomachist has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
sevvie has joined #ruby
abdulsattar has quit [Ping timeout: 245 seconds]
lewix has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
lewix has joined #ruby
coderdad has joined #ruby
froggy__ has joined #ruby
IrishGringo has quit [Ping timeout: 272 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nonmadden has quit [Remote host closed the connection]
justinmburrous has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 250 seconds]
froggy_ has quit [Ping timeout: 246 seconds]
Sawbones has joined #ruby
Deele has joined #ruby
rubyonrailed has quit [Remote host closed the connection]
jonmorehouse has joined #ruby
lxsameer has joined #ruby
Sawbones has quit [Remote host closed the connection]
arup_r has joined #ruby
alem0lars has joined #ruby
Sawbones has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
Stranger has joined #ruby
Stranger is now known as Guest50980
ghr has joined #ruby
tylersmith has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
Guest50980 has quit [Client Quit]
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
alem0lars has quit [Ping timeout: 244 seconds]
justinmburrous has joined #ruby
ProLoser has joined #ruby
zeroNones has quit [Quit: Textual IRC Client: www.textualapp.com]
ghr has quit [Ping timeout: 246 seconds]
JohnBat26 has joined #ruby
neoxquick has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
Macaveli has joined #ruby
<sevenseacat> oh i think ive actually read that before
JohnBat26 has quit [Client Quit]
axl_ has joined #ruby
JohnBat26 has joined #ruby
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
fabrice31 has joined #ruby
tagrudev has joined #ruby
zn is now known as jtz
starkhalo has quit [Ping timeout: 258 seconds]
aspires has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
drtn has joined #ruby
Soda has joined #ruby
icebourg_ has joined #ruby
anwar__ has joined #ruby
ProLoser has left #ruby [#ruby]
speaking1ode has joined #ruby
aganov has joined #ruby
klaut has joined #ruby
Georg3 has joined #ruby
kobain has joined #ruby
icebourg has quit [Ping timeout: 250 seconds]
speakingcode has quit [Ping timeout: 250 seconds]
<anwar__> Hi! I learning BDD, Is there any good open source project that use BDD with rails and cucumber ?
sinkensabe has quit [Remote host closed the connection]
icebourg has joined #ruby
icebourg has quit [Client Quit]
icebourg_ has quit [Ping timeout: 245 seconds]
atmosx has joined #ruby
<atmosx> morning
alem0lars has quit [Quit: AFK..]
ocx has quit [Quit: Page closed]
Guest50373 has quit [Ping timeout: 244 seconds]
lolmaus has joined #ruby
drtn has quit [Quit: Leaving]
fnordperfect has joined #ruby
Sawbones has quit [Remote host closed the connection]
nhhagen has joined #ruby
robscormack has joined #ruby
DarthGandalf has quit [Ping timeout: 260 seconds]
atmosx has quit [Read error: Connection reset by peer]
abdulsattar has joined #ruby
bobishh has joined #ruby
lsmola has joined #ruby
atmosx has joined #ruby
Georg3 has quit [Quit: Lingo - http://www.lingoirc.com]
kamilc__ has joined #ruby
atmosx has quit [Read error: Connection reset by peer]
thrasymachus has quit [Quit: leaving]
atmosx has joined #ruby
kamilc__ has quit [Read error: Connection reset by peer]
kamilc__ has joined #ruby
rpag has joined #ruby
skammer1 has joined #ruby
bal has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
hiyosi has joined #ruby
nhhagen has quit [Ping timeout: 258 seconds]
havenwood has joined #ruby
jasooon has joined #ruby
ciampix has joined #ruby
skammer1 has quit [Ping timeout: 245 seconds]
ht__th has joined #ruby
uirusan has joined #ruby
<uirusan> /msg nickserv help
uirusan has left #ruby [#ruby]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has quit [Ping timeout: 260 seconds]
mattyohe has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 264 seconds]
jasooon has quit [Ping timeout: 260 seconds]
rcs has quit [Quit: ZNC - http://znc.in]
troyready has joined #ruby
dc__ has joined #ruby
coderdad has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
uirusan has joined #ruby
apeiros has joined #ruby
DarthGandalf has joined #ruby
uirusan has left #ruby [#ruby]
xcv has joined #ruby
Xeago has joined #ruby
clauswitt has joined #ruby
xcv has quit [Ping timeout: 272 seconds]
arup_r has quit []
apeiros has quit [Remote host closed the connection]
thejamespinto has quit [Remote host closed the connection]
apeiros has joined #ruby
terlar has joined #ruby
goshdarnyou is now known as thetreeonahill
thetreeonahill is now known as goshdarnyou
Xeago has quit [Remote host closed the connection]
maasha has joined #ruby
sevvie has quit [Ping timeout: 250 seconds]
anwar__ has quit [Quit: leaving]
Rx_o has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
Advocation has joined #ruby
<maasha> hi
Advocation has quit [Client Quit]
end_guy has quit [Ping timeout: 264 seconds]
<maasha> HI!
hackeron has quit [Ping timeout: 260 seconds]
end_guy has joined #ruby
clauswitt has quit [Ping timeout: 272 seconds]
hackeron has joined #ruby
rdark has joined #ruby
iceden has quit [Ping timeout: 240 seconds]
tonini has quit [Quit: leaving]
tonini has joined #ruby
<froggy__> What should I learn about first: threads or fibers?
fabrice31 has joined #ruby
sinkensabe has joined #ruby
<jhass> threads
russt has quit [Quit: russt]
<Wolland> mashka
Rx_o has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
clauswitt has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
Sawbones has joined #ruby
Sawbones has quit [Remote host closed the connection]
tectonic has quit []
fnordperfect has joined #ruby
awong_web has quit [Ping timeout: 246 seconds]
ghr has quit [Ping timeout: 245 seconds]
c107 has quit [Read error: Connection reset by peer]
robscormack has quit [Quit: Leaving]
aspires has quit []
willgo has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
bobishh has quit [Ping timeout: 244 seconds]
ephemerian has joined #ruby
jonmorehouse has quit [Ping timeout: 272 seconds]
troyready has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
sevvie has joined #ruby
jack_rabbit has quit [Ping timeout: 272 seconds]
klaut has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
anaeem1 has joined #ruby
DavidDuke has joined #ruby
<DavidDuke> why is this the best programming language?
<sevenseacat> !best
<helpa> "Best" and "better" are subjective. Try to use a different term.
<maasha> Speaking of threads. Is it possible to run these three call() concurrently in threads? https://gist.github.com/maasha/3d1840c6cf71cd584495
mikeg has joined #ruby
synergyz has quit [Remote host closed the connection]
yfeldblum has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
fgo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
tylersmith has quit []
yfeldblum has joined #ruby
<maasha> "Ruby is Perl's younger and prettier sister"
Xeago has joined #ruby
IceDragon has quit [Quit: Space~~~]
havenwood has joined #ruby
apeiros has joined #ruby
jusmyth has joined #ruby
Mso150 has joined #ruby
Darryl has joined #ruby
<Hanmac> maasha: i thought ruby is like pythons evil twin ;P
sevvie has quit [Ping timeout: 245 seconds]
<maasha> Hanmac: The above quote is something I picked up somewhere. Possibly here in #ruby
nhhagen has joined #ruby
nhhagen has quit [Remote host closed the connection]
vcoinminer______ has joined #ruby
nhhagen has joined #ruby
sevvie has joined #ruby
robbyoconnor has joined #ruby
charliesome has quit [Quit: zzz]
Suchit____ has joined #ruby
skammer1 has joined #ruby
mollitz has quit [Ping timeout: 258 seconds]
hiyosi has joined #ruby
Soda has quit [Remote host closed the connection]
jasooon has joined #ruby
arup_r has joined #ruby
sandelius has joined #ruby
jle` has quit [Quit: WeeChat 0.4.2]
krisquigley has joined #ruby
skammer1 has quit [Ping timeout: 272 seconds]
hiyosi has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
davasaurous has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 272 seconds]
Advocation has joined #ruby
jle` has joined #ruby
DavidDuke has quit [Ping timeout: 246 seconds]
<arup_r> I am using HttpParty gem to make request... I am thinking to raise a custom exception when url request results in Page not found.. What should I consider to raise this.. I am thinking to validate the STATUS code...
<arup_r> Am I thinking correct way ?
fnordperfect has quit [Read error: Connection reset by peer]
dawkirst has quit [Remote host closed the connection]
fnordperfect has joined #ruby
nhhagen has quit [Remote host closed the connection]
dawkirst has joined #ruby
zarubin has quit [Quit: Leaving.]
bobishh has joined #ruby
<atmosx> anyone implemented tags? hm, the way my schema works, I have to make a call for each tag associated with a product, usually this must be 3-4 calls per product. DOesn't seem much, but I wonder if this can be made simpler some way
alex88 has joined #ruby
<atmosx> having 3 tables I'm not sure if it can be done (mysql)
HelperW__ has quit [Quit: Computer has gone to sleep.]
<sevenseacat> so... what framework are you using, might be a good starting question
HelperW__ has joined #ruby
<atmosx> sevenseacat: sinatra/sequel
<atmosx> what that has do to with the db scheme?
<sevenseacat> well the ORM usually provides helpers to preload data
<sevenseacat> to stop n+1 problems
<sevenseacat> activerecord does
<atmosx> hm, AR is more advanced when it comes to associations IIRC
<atmosx> whatever, I'll optimize later on. See if this works for now (prototyping anyway)
<atmosx> but I don't wanna pre-load, I wanna make less calls if possible.
<sevenseacat> what?
nhhagen has joined #ruby
starless has quit [Ping timeout: 272 seconds]
<atmosx> sevenseacat: nm, thanks for the link.
<sevenseacat> not sure you understand the problem
<sevenseacat> or maybe you just havent described it correctly
<atmosx> might be
<atmosx> to gatehr tags for a product I use the following expression: Product.first.ptags.each {|x| p Tag.find(id: x.tag_id).tag_name}
HelperW__ has quit [Ping timeout: 245 seconds]
<sevenseacat> yeah okay youre not using sequel associations at all
<sevenseacat> you really should
Mia has joined #ruby
Mia has joined #ruby
<atmosx> I' using them up to ptags, thing is I'm not sure how to associate products to tags through ptags
LiohAu_ has joined #ruby
MewFree has joined #ruby
<sevenseacat> you dont, you associate ptags to tags and then eager load
MewFree has quit [Quit: leaving]
dangerousdave has joined #ruby
ghr has joined #ruby
oponder has quit [Remote host closed the connection]
<atmosx> hm, I'll ask a SO question, there I can put all the code and explain better. It's better to optimize this now probably
<sevenseacat> well i'm trying to help you, but okay
jgrevich has quit [Quit: jgrevich]
ta has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MewFree has joined #ruby
<atmosx> sevenseacat: yeah thanks for that, but I'm not sure if we understand each other :-P
ndrei has joined #ruby
<sevenseacat> i understand what youre saying perfectly
<sevenseacat> whether you're saying the right things, well, thats a different story
<sevenseacat> but i wish you luck
<Wolland> you are too sweet sevenseacat
swartwulf has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 246 seconds]
swartwulf has joined #ruby
rcs has joined #ruby
rcs has quit [Excess Flood]
nonmadden has joined #ruby
rcs has joined #ruby
chthon has joined #ruby
zarubin has joined #ruby
kaspertidemann has quit []
dawkirst has quit [Remote host closed the connection]
jonmorehouse has joined #ruby
* sevenseacat blushes
<apeiros> making all seven seacats blush
rcs has quit [Client Quit]
nonmadden has quit [Remote host closed the connection]
klaut has joined #ruby
qba73 has joined #ruby
jonmorehouse has quit [Ping timeout: 272 seconds]
realDAB has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
fgo has quit [Remote host closed the connection]
Suchit____ has quit [Quit: Computer has gone to sleep.]
rcs has joined #ruby
nonmadden has joined #ruby
<maasha> Do we have some sort of thread-safe fifo buffer?
LekeFly has joined #ruby
Suchit____ has joined #ruby
Suchit____ has quit [Client Quit]
nonmadden has quit [Remote host closed the connection]
<havenwood> maasha: Queue
<maasha> havenwood: is that a standard lib thing?
<havenwood> ya
VBlizzard has joined #ruby
<maasha> havenwood: nice. ty
mikecmpbll has joined #ruby
caveat- has quit [Ping timeout: 272 seconds]
<jle`> thank you havenwood
yokel has quit [Ping timeout: 260 seconds]
caveat- has joined #ruby
hellangel7 has joined #ruby
comma8 has quit [Ping timeout: 272 seconds]
jbueza has joined #ruby
sk87 has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby
Juanchito has joined #ruby
last_staff has joined #ruby
marr has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
bbloom_ has joined #ruby
bbloom has quit [Ping timeout: 244 seconds]
Advocation has quit [Quit: Advocation]
jusmyth has left #ruby [#ruby]
roolo has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
HelperW__ has joined #ruby
skammer1 has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
dumdedum has joined #ruby
yokel has joined #ruby
fnordperfect has joined #ruby
hiyosi has joined #ruby
robustus has joined #ruby
jasooon has joined #ruby
fgo has joined #ruby
Advocation has joined #ruby
GriffinHeart has joined #ruby
oponder has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
realDAB has quit [Quit: realDAB]
skammer1 has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
Wolland has quit [Remote host closed the connection]
Daemonik has quit [Ping timeout: 250 seconds]
Deejay has joined #ruby
hiyosi has quit [Ping timeout: 260 seconds]
Wolland has joined #ruby
oponder has quit [Client Quit]
Deejay is now known as Guest74963
jasooon has quit [Ping timeout: 245 seconds]
anaeem1 has quit [Remote host closed the connection]
lolmaus has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
charliesome has quit [Quit: zzz]
andrewlio has joined #ruby
<mikecmpbll> is there a version of Hash#key that returns all the keys with the matching value?
Suchit____ has joined #ruby
Wolland has quit [Ping timeout: 250 seconds]
ghr has joined #ruby
Guest74963 is now known as Deejay_
Suchit____ has quit [Client Quit]
wallerdev has joined #ruby
arup_r has quit [Remote host closed the connection]
<apeiros> mikecmpbll: no
<mikecmpbll> boo :(
HelperW__ has quit [Quit: Computer has gone to sleep.]
<apeiros> easy enough to write
nhhagen has quit [Remote host closed the connection]
<mikecmpbll> >> { a: 1, b: 1 }.select{|k,v| v == 1}.map(&:first)
<eval-in_> mikecmpbll => [:a, :b] (https://eval.in/201386)
HelperW__ has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<apeiros> even easier. .keys
<apeiros> select returns a hash since 1.9
<mikecmpbll> eh?
<apeiros> your code, instead of map(&:first), just .keys
<apeiros> >> class Hash; def keys_with_value(value); select { |k,v| v == value }.keys; end; end; {a: 1, b: 2, c: 1}.keys_with_value(1)
<eval-in_> apeiros => [:a, :c] (https://eval.in/201387)
<apeiros> bonus points for rewriting it as a refinement :)
wallerdev has quit [Client Quit]
<mikecmpbll> ah, gotcha. thanks :)
x1337807x has joined #ruby
nhhagen_ has joined #ruby
HelperW__ has quit [Ping timeout: 246 seconds]
nhhagen_ has quit [Remote host closed the connection]
xcv has joined #ruby
nhhagen_ has joined #ruby
nhhagen_ has quit [Remote host closed the connection]
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
nhhagen has joined #ruby
jottr_ has joined #ruby
yacks has quit [Read error: Connection reset by peer]
stef_204 has joined #ruby
Aaaal has joined #ruby
jonmorehouse has joined #ruby
agjacome has joined #ruby
stef_204 has quit [Client Quit]
abdulsattar has joined #ruby
einarj has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mso150 has quit [Ping timeout: 244 seconds]
dangerousdave has joined #ruby
cherwin has joined #ruby
tessi_zz is now known as tessi
lxsameer has quit [Read error: Connection reset by peer]
jonmorehouse has quit [Ping timeout: 272 seconds]
jottr_ has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
startupality has joined #ruby
cherwin has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
emmesswhy has joined #ruby
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
cherwin has joined #ruby
jds has joined #ruby
AndChat| has joined #ruby
AFKGeek has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
Wolland has quit [Ping timeout: 258 seconds]
last_staff has quit [Quit: bbl]
GriffinHeart has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Daemonik has joined #ruby
dawkirst has joined #ruby
AndChat| has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
Deejay has joined #ruby
arup_r has joined #ruby
Deejay is now known as Guest30836
<arup_r> mikecmpbll: Hash#select then use #keys.. I don't think any direct method still exist
<mikecmpbll> arup_r: bit late, but thanks ;)
nhhagen has quit [Remote host closed the connection]
<arup_r> Ohh! Sorry. I was away
lkba has joined #ruby
krisquigley has joined #ruby
ahhMichael has joined #ruby
Mia has quit [Read error: Connection reset by peer]
MrBoolean has joined #ruby
joonty has joined #ruby
Hobogrammer_ has quit [Ping timeout: 272 seconds]
Mia has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest30836 has quit [Quit: Computer has gone to sleep.]
LekeFly_ has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
dangerousdave has joined #ruby
lowandslow has joined #ruby
sevenseacat has quit [Quit: Leaving.]
ProLoser has joined #ruby
<ProLoser> hallo
LekeFly has quit [Ping timeout: 244 seconds]
<ProLoser> i'm trying to run someone else's app for the first time and know zilch about ruby
gaussblurinc1 has joined #ruby
Aaaal has left #ruby [#ruby]
<ProLoser> I'm getting errors like this: ERROR: relation "models" does not exist at character 1103
<ProLoser> or character 15
skammer1 has joined #ruby
<ProLoser> how can i figure out what files it's talking about
boombadaroomba has joined #ruby
fgo has quit [Remote host closed the connection]
<ProLoser> nvm
<ProLoser> this is postgres bug
jasooon has joined #ruby
kotk has quit [Read error: Connection reset by peer]
Aaaal has joined #ruby
hiyosi has joined #ruby
startupality has quit [Quit: startupality]
yacks has joined #ruby
teddyp1cker has joined #ruby
kotk has joined #ruby
LekeFly has joined #ruby
LekeFly has quit [Client Quit]
skammer1 has quit [Ping timeout: 245 seconds]
abdulsattar has quit [Ping timeout: 240 seconds]
boombadaroomba has quit [Ping timeout: 272 seconds]
hiyosi has quit [Ping timeout: 240 seconds]
mikepack has quit [Read error: Connection reset by peer]
jasooon has quit [Ping timeout: 245 seconds]
LekeFly_ has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
mikepack has joined #ruby
dawkirst has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
StrangeR has joined #ruby
abdulsattar has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
StrangeR is now known as Guest71663
dawkirst has joined #ruby
Wolland has joined #ruby
sk87 has joined #ruby
jle` has quit [Quit: WeeChat 0.4.3]
ProLoser has left #ruby [#ruby]
jottr_ has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 260 seconds]
yacks has quit [Remote host closed the connection]
fgo has joined #ruby
startupality has joined #ruby
charliesome has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 245 seconds]
cherwin has quit [Ping timeout: 244 seconds]
decoponio has joined #ruby
Aaaal has quit [Quit: Aaaal]
abdulsattar has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
havenwood has quit [Remote host closed the connection]
zz_blackdev1l has quit [Quit: ZNC - http://znc.in]
havenwood has joined #ruby
ddv has quit [Quit: *poof*]
LiohAu_ is now known as LiohAu
cherwin has joined #ruby
nhhagen has joined #ruby
<shevy> havenwood well I solved it yesterday but now I have an even larger problem
workmad3 has joined #ruby
<shevy> I need to find the solution to chemical equations that are not balanced
<shevy> and a computer can not "think", whereas a human brain can easily see what the proper coefficients are
nhhagen has quit [Remote host closed the connection]
nhhagen has joined #ruby
skammer1 has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
<workmad3> shevy: maybe look into the techniques used for symbolic differential-equation solvers?
<shevy> that sounds very complicated
<shevy> my brain stops at complexity levels exceeding 3 apples + 5 bananas
<workmad3> shevy: I doubt a chemical equation checker would need to be as complex as a DE solver... but some of the techniques may be useful (such as how they pull apart a symbolic DE into something usable, normalise it, etc.)
<shevy> yeah
<shevy> there are some constraints
<shevy> a + b = y + z
<shevy> where both sides must be balanced in the amount of net element numbers
sandelius has joined #ruby
<workmad3> yeah, so you're basically looking at splitting it apart on the '=', pulling it apart into terms, then elements and making sure the 'buckets' of each element on each side match
abdulsattar has joined #ruby
Advocation has quit [Quit: Advocation]
nhhagen has quit [Ping timeout: 240 seconds]
nhhagen has joined #ruby
alem0lars has joined #ruby
qba73 has quit [Remote host closed the connection]
Guest71663 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Stranger has joined #ruby
Stranger is now known as Guest36548
nfk has joined #ruby
karupa is now known as zz_karupa
qba73 has joined #ruby
<mwlang> Is anyone aware of a some scripts to facilitiate copying a selected few rows of data and all supporting data from production and saving it into development? Basically, if I wanted to grab a few users and their orders and line items etc. I could just selected_user = User.find(X) and save_to_development(selected_user) and it would save that user and all the associated data for that user.
b00stfr3ak has joined #ruby
<mwlang> ugh, that’s a Rails question — didn’t mean to post it here.
Guest36548 has quit [Client Quit]
JohnBat26 has joined #ruby
{xenomorph} is now known as xenomorph
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
Wolland has joined #ruby
<Hanmac> shevy: you mean balance the molecules or the mol counts ? do you want to check only have a checker or should that also try to solv it ? like you give a + b = y + ? and it does try to guess what might fit the hole?
jespada has joined #ruby
startupality has quit [Quit: startupality]
nonmadden has joined #ruby
ahhMichael has quit [Ping timeout: 256 seconds]
<shevy> I need one to solve it
<workmad3> well, a solver automatically entails a checker ;)
dangerousdave has joined #ruby
abdulsattar has quit [Ping timeout: 260 seconds]
nonmadden has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 240 seconds]
<Hanmac> shevy & workmad like having C + AlO2 = Al + (?) ... then ? might be calculated as CO2 ? or does the program should try to solve the mol count for CO ?
qba73 has joined #ruby
startupality has joined #ruby
moritzs has joined #ruby
sk87 has joined #ruby
<shevy> no
<shevy> input and output is given
<shevy> only the coefficients are missing
<shevy> so on the right side the 2 would be missing
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
<Hanmac> hmm give me a sample
alem0lars has quit [Quit: AFK..]
<workmad3> shevy: the co-efficients are available on the lhs?
<workmad3> shevy: so it would be 'C + AlO2 = Al + CO'?
<shevy> it could be wrong on either side
<shevy> the thing is there is only one logical solution (smallest amount of coefficients that gives a right equation)
<shevy> I think I need to somehow formulate a dependency
<workmad3> shevy: ah, so each 'equation' has 2 possible solutions - one from the LHS being wrong, one from the RHS being wrong
<shevy> e. g. in the above equation, on the right hand side Al is separate, but on the left hand side, Al is tied to O (2x O)
sarkis has quit [Ping timeout: 258 seconds]
Takle has quit [Read error: No route to host]
<workmad3> shevy: so you'd generate both equations, and then pick the 'right' one based on lowest number of co-efficients?
<shevy> so I can change Al freely on the right side, but on the left side when I modify it, I also modify O2 automatically
Takle has joined #ruby
<shevy> yeah workmad3
<workmad3> shevy: sounds like a strategy then ;)
<shevy> I guess a dumb way would be to generate a table with 100 combinations possible for each element
b00stfr3ak has quit [Ping timeout: 260 seconds]
<Hanmac> 'C + AlO2 = Al + CO' might be solved to 'C + AlO2 = Al + CO2' but also to '2C + AlO2 = Al + CO' ... that why i am asking ...
<shevy> yeah well as I said
<shevy> <shevy> no
<shevy> <shevy> input and output is given
<workmad3> Hanmac: wouldn't that then be 'AL + 2CO'?
qba73 has quit [Remote host closed the connection]
<shevy> C + AlO2 = Al + (?) is not a possibility
<Hanmac> workmad3: yeah you are right
VBlizzard has quit [Ping timeout: 260 seconds]
<workmad3> Hanmac: however, 'C + AlO = Al + CO' would be a potential solution to a naive solver too :)
<shevy> yeah
<shevy> it has: 1 + 1 = 1 + 1 as coefficient
<shevy> oh cool
<shevy> there are javascript solvers
<workmad3> shevy: is modifying terms allowable then? as in 'AlO2' could be modified to 'AlO'?
<Hanmac> workmad3: hm ok i need to look if AluminiumMonoOxid is possible ...
<workmad3> shevy: or is it just co-efficients of terms?
qba73 has joined #ruby
<shevy> no, the compounds must stay together
<shevy> well
<workmad3> ok, so the solver can't be that naive :)
<shevy> as part of their respective side
<shevy> of course a compound can dissociate or build a new one on the other side
tyll has quit [Ping timeout: 240 seconds]
<workmad3> shevy: so with the 'C + AlO2 = Al + CO' example, the only real solution you'd consider would be '2C + AlO2 = Al + 2CO'?
<workmad3> shevy: as you wouldn't be allowed to modify CO to CO2
<shevy> let me count lol
<shevy> yeah, that would be the minimal correct solution
tyll has joined #ruby
<shevy> so the wrong coefficients of 1 + 1 = 1 + 1 will become 2 + 1 = 1 + 2
yacks has joined #ruby
<workmad3> shevy: I can envisage methods that should help with that... but they may have issues if the equation is unbalancable
<shevy> well we must assume that these equations are solvable
<workmad3> :)
<shevy> because new matter can not arise from out of nowhere
<maasha> So I am using a Queue that is being written to from one thread and read to from another. How can I ensure that reading waits until something has been written?
fabrice31 has quit [Remote host closed the connection]
<workmad3> shevy: so you're not allowing fusion or fission reactions... or high-energy reactions with subatomic particles ;)
<shevy> you first have to walk before you want to run
jasooon has joined #ruby
<shevy> in order to outcompete Usain Bolt
<workmad3> if you want to outcompete Usain Bolt, you first need to be born with the genetics for brilliant distance running (stamina, long legs, large lung capacity, etc.)
<workmad3> but maybe that's over-analysing things? :)
hiyosi has joined #ruby
<shevy> well he has that advantage due to height
<rdark> Usain bolt is a sprinter?
<workmad3> rdark: I know he runs... that's about it
<shevy> it's interesting though that when he was not in best shape then he could be beat by others
<rdark> you're thinking of the other black guy
<Hanmac> workmad3: rincewind did run too ;P
arup_r_ has joined #ruby
<workmad3> Hanmac: yes. but rincewind is *fictional* :P
<Hanmac> thats your PoV ;P
<workmad3> Hanmac: meaning he isn't constrained by physical reality in the same way as the rest of us :)
ndrei has quit [Ping timeout: 260 seconds]
bigkevmcd has quit [Remote host closed the connection]
jasooon has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
bigkevmcd has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
hiyosi has quit [Ping timeout: 250 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
oo_ has joined #ruby
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
pskosinski has joined #ruby
roolo has quit [Remote host closed the connection]
madzhuga has joined #ruby
<arup_r_> I want to raise a 'PageNotFound" error.. https://gist.github.com/aruprakshit/89d711497cfaa437ac37 .. No idea what are the status codes I need to check to raise it... Any help please ?
roolo has joined #ruby
fabrice31 has joined #ruby
lkba has joined #ruby
oo_ has quit [Ping timeout: 258 seconds]
AndChat| has joined #ruby
Wolland has quit [Ping timeout: 244 seconds]
duncannz has quit [Remote host closed the connection]
<madzhuga> render :status => 404
fgo has quit [Remote host closed the connection]
<arup_r_> 404 is the only status code for that ?
Akagi201 has quit [Remote host closed the connection]
<madzhuga> google for http status codes
<madzhuga> I don't remember if it's the only
Akagi201 has joined #ruby
roolo has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
<workmad3> arup_r_: 404 is the only 'page not found' status code to return
<arup_r_> Ok
lkba has quit [Ping timeout: 246 seconds]
<arup_r_> I thought status_code != 200
<arup_r_> But that approach was incoorect I doubt
sepp2k has joined #ruby
sprihodko has joined #ruby
<workmad3> arup_r_: it sure is
<workmad3> arup_r_: 4xx and 5xx codes are error codes (4xx are client errors, 5xx are server errors)
<workmad3> arup_r_: 2xx are success and 3xx are redirects and similar
<workmad3> arup_r_: see http://httpstatusdogs.com for a list of all codes
<arup_r_> I was seeing http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ( very technical ;) )
lewix has quit [Remote host closed the connection]
grzywacz has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
govg has joined #ruby
hellangel7 has quit [Remote host closed the connection]
Tomme has joined #ruby
oo_ has joined #ruby
<Hanmac> workmad3: best one: I am a TeePot ;P
txdv has quit [Ping timeout: 272 seconds]
<arup_r_> workmad3: Any handy URL to test the 404 error.. I would like to test my code.. I have all good url.. I want a url which can raise 404
mikeg has quit [Ping timeout: 246 seconds]
hellangel7 has joined #ruby
tessi is now known as tessi_zz
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
compuser has joined #ruby
<workmad3> arup_r_: http://httpstat.us/404
<workmad3> arup_r_: can use that for any HTTP status code
oo_ has quit [Remote host closed the connection]
<arup_r_> workmad3: Excellent sir
<workmad3> Hanmac: I do like 416 from the HTCPCP spec :)
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
chipotle has joined #ruby
fgo has joined #ruby
nonmadden has joined #ruby
DrCode has quit [Remote host closed the connection]
nonmadden has quit [Remote host closed the connection]
chipotle has quit [Ping timeout: 250 seconds]
gccostabr has joined #ruby
dangerousdave has joined #ruby
oleo__ has joined #ruby
oleo is now known as Guest82020
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DrCode has joined #ruby
cryptoca has quit [Quit: ZNC - http://znc.in]
chipotle has joined #ruby
Pupeno has joined #ruby
Guest82020 has quit [Ping timeout: 258 seconds]
Akagi201_ has joined #ruby
phutchins has joined #ruby
krisquigley has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
fgo has quit [Remote host closed the connection]
humd1ng3r has joined #ruby
GriffinHeart has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
roolo has joined #ruby
Akagi201 has quit [Ping timeout: 245 seconds]
Aaaal has joined #ruby
chipotle has quit [Quit: cya]
<arup_r_> workmad3: Thanks done! :-)
krisquigley has quit [Ping timeout: 245 seconds]
LiohAu has quit [Quit: LiohAu]
soulcake has quit [Quit: Quack.]
Wolland has quit [Ping timeout: 260 seconds]
nhhagen_ has joined #ruby
fgo has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
soulcake has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
<maasha> Hey, I have trouble with Threads and empty Queues: How can I guarantee that line 7 waits for line 11?: https://gist.github.com/maasha/abeaa9b57e9a57fb179d
nhhagen has quit [Ping timeout: 260 seconds]
clauswitt has joined #ruby
nhhagen_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
yfeldblu_ has joined #ruby
charliesome has joined #ruby
eequ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
thejamespinto has joined #ruby
tokik has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
HelperW__ has joined #ruby
alem0lars has joined #ruby
AFKGeek has quit [Ping timeout: 260 seconds]
fgo has quit [Remote host closed the connection]
sk87 has joined #ruby
yfeldblu_ has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Remote host closed the connection]
<maasha> Actually, it seems like Queue.pop is thread safe: https://gist.github.com/maasha/abeaa9b57e9a57fb179d
thejamespinto has quit [Ping timeout: 258 seconds]
<maasha> Now the problem is: how can I iterate over and Queue? Queue.pop waits nicely, but Queue.empty? don't ...
<maasha> s/and/a
tkuchiki has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
fnordperfect has joined #ruby
iamjarvo has joined #ruby
jasooon has joined #ruby
AlexRussia has joined #ruby
fgo has joined #ruby
Aaaal has quit [Quit: Aaaal]
hiyosi has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
moritzs has quit [Ping timeout: 272 seconds]
alem0lars has quit [Quit: AFK..]
teddyp1cker has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
<maasha> Here is the exact illustration of the problem: https://gist.github.com/maasha/abeaa9b57e9a57fb179d
jasooon has quit [Ping timeout: 258 seconds]
moritzs has joined #ruby
<maasha> line 16 never happens :o(
Xeago has quit [Remote host closed the connection]
threesixes has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 245 seconds]
<canton7> maasha, you probably hit it before t1 gets spun up
W0rmDr1nk has joined #ruby
<maasha> canton7: yes. pop is blocking, but empty? is not. So how can I test if it is blocking?
<canton7> huh?
eequ has quit [Quit: Leaving]
<maasha> i.e how to write a each method for Queue.
Advocation has joined #ruby
<canton7> having a blocking .empty? doesn't make sense. what determines when it woul return?
AFKGeek has joined #ruby
<maasha> canton7: .empty? behaves as expected, but I need some way to iterate over the queue when I dont know the size of it.
pierre1_ has quit [Ping timeout: 245 seconds]
<canton7> maasha, I think there's a wider problem here
<canton7> what are you actually trying to achieve?
<maasha> canton7: to iterate over all elements in the queue
fgo has quit [Remote host closed the connection]
<canton7> maasha, but you've got threads which are asynchronously adding elements to the queue
<canton7> you might iterate the queue until it's empty, but how do you know that a thread won't then add something to it
<maasha> canton7: hm, well.
tmoore has joined #ruby
<maasha> canton7: clever you
<canton7> so, how do you know when the threads will stop adding stuff to the queue?
<canton7> that's more the question
teddyp1cker has joined #ruby
<canton7> and that depends on what problem you're trying to solve
skammer1 has quit [Ping timeout: 260 seconds]
<maasha> canton7: I will put a signal in the Queue
<canton7> that's one way of doing it
<maasha> alternatives?
<Hanmac> shevy did you already begin with your chemical parser?
<canton7> various sorts of synchronization primitives: queue sets a thread-safe flag to indicate when it's finished, etc
<maasha> canton7: can that be tested upon?
MCDev has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
<canton7> tested upone?
<canton7> *tested upon?
<maasha> how can I test if a thread-safe flag is set?
<canton7> if flag_is_set ?
fgo has joined #ruby
<AlexRussia> hey folks.
ldnunes has joined #ruby
<maasha> Ah, I see.
Suchit____ has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
sarkis has joined #ruby
<AlexRussia> I have list of times when i should do something, can i overwrite that without infinity cycle with compare current time?
LiohAu has joined #ruby
<maasha> canton7: thanks
claymore has joined #ruby
willgo has joined #ruby
IrishGringo has joined #ruby
sprihodko has quit [Quit: Lingo - http://www.lingoirc.com]
Takle has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Takle has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xcv has quit [Remote host closed the connection]
madzhuga has quit [Quit: Lingo - http://www.lingoirc.com]
pdais has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
oo__ has joined #ruby
oo__ has quit [Remote host closed the connection]
oo_ has joined #ruby
Takle has quit [Ping timeout: 272 seconds]
fgo has quit [Remote host closed the connection]
fgo has joined #ruby
moritzs has quit [Ping timeout: 258 seconds]
sevenseacat has joined #ruby
<workmad3> maasha: you can't test that a blocking call is definitely blocking in a single-threaded setup
<workmad3> oh wait, I was scrolled back... maasha, ignore that if you're already sorted
fgo has quit [Read error: No route to host]
oo_ has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
sk87 has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> maasha.sorted? # => true
<Hanmac> shevy & workmad3 i did begin with that chemical pasrser ... it does look like that currently: m = Molecule.new; m.add_part([:C, :O, :O, :H],2); m.to_s #=> "[COOH]2" m.to_h #=> {C: 2, O: 4, H: 2} ... but thats only the begin
anaeem1_ has quit [Remote host closed the connection]
anaeem1 has joined #ruby
<maasha> I am good now. It works.
ahhMichael has joined #ruby
GriffinHeart has joined #ruby
MCDev has joined #ruby
HelperW__ has quit [Quit: Computer has gone to sleep.]
HelperW__ has joined #ruby
<maasha> Hanmac: better aim for CH3CH2OH
<Hanmac> maasha: "[COOH]2" was only a sample for grouping ... CH3CH2OH can be the next sample
sandelius has joined #ruby
Wolland has joined #ruby
GriffinHeart has quit [Ping timeout: 250 seconds]
Beoran_ has quit [Ping timeout: 260 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maasha> I once got a random mail by accident. It appeared to be two researchers discussing the formula of some chemical compound. From the structure I could see that it was a dopamine derivative looking a lot like MDMA. So I responded that the mail was sent to the wrong guy and maybe I should sent it to the police. Never heard from them again.
HelperW__ has quit [Ping timeout: 246 seconds]
<maasha> If you are discussing designer drugs via mail don't miss send to a biochemist ...
<maasha> missend
<maasha> ?
yalue has joined #ruby
starkhalo has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
fnordperfect has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
aclearman037 has joined #ruby
lewix has joined #ruby
arup_r_ has quit [Remote host closed the connection]
fgo has quit []
fsapo has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
jottr_ has quit [Ping timeout: 245 seconds]
cocotton has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
spastorino has joined #ruby
arup_r has joined #ruby
agjacome has quit [Quit: leaving]
Takle has joined #ruby
Beoran_ has joined #ruby
Advocation has quit [Quit: Advocation]
nhhagen has joined #ruby
<Hanmac> maasha: hm my parser currently does parse "CH3CH2OH" into "CH3" "CH2" "OH" sections then [[:C, 1],[:H, 3]] [[:C, 1]. [:H, 2]] [[:O, 1],[:H, 1]] and then {:C=>2, :H=>6, :O=>1}
humd1ng3r has quit [Quit: Leaving]
fgo has joined #ruby
<Hanmac> hm yeah that section parsing might not make sense for all molecules but it does make it a bit easier for me
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> Hanmac: I'd have been tempted to parse it out int "C", "H3", "C", "H2", "O", "H" personally
<Hanmac> hm yeah it does in the second step ... but first it does try to parse in groups
toretore has joined #ruby
<workmad3> Hanmac: I'm not sure I see a reason for doing it in two steps is all :)
Advocation has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TieSoul> so I'm using windows and after installing the devkit, the file "dk.rb" that should be there does not exist.
jasooon has joined #ruby
Advocation has quit [Client Quit]
<TieSoul> I downloaded the 64-bits version of Ruby 2.1.3 and the DevKit
* workmad3 wonders what DevKit this is
<TieSoul> from RubyInstaller
Daemonik has quit [Ping timeout: 240 seconds]
<Hanmac> workmad3: if you have groups like "[COOH]2" it does have the part "COOH" with extra multiplicator 2
hiyosi has joined #ruby
andrewbredow has quit [Ping timeout: 240 seconds]
Norrin has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 258 seconds]
ddv has joined #ruby
Macaveli has joined #ruby
Soda has joined #ruby
imjoik has joined #ruby
andrewbredow has joined #ruby
jasooon has quit [Ping timeout: 272 seconds]
klaut has quit [Remote host closed the connection]
dangerousdave has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
<danijoo> Hanmac: for complex molecules like 2 COOHs groups you usually dont define them like that
MCDev has quit [Read error: Connection reset by peer]
<danijoo> or at least chemists dont . Then its just a formula that dont represent the groups
GriffinHeart has joined #ruby
MCDev has joined #ruby
hiyosi has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
<danijoo> for example for glutamic acid which has 2 COOHs any chemist would just write C5H5NO4
<Hanmac> danijoo: okay in my time then learning we learned that both might be okay ... hm yes the group parser might not be detect something like "COOHCOOH" but the groups are currently only for visual repensenation and dont make big difference in the to_h output
Mdgd` has quit [Remote host closed the connection]
<danijoo> studied chemist here :)
<danijoo> but I agree the best solution might be to just filter for common groups
<Hanmac> the current group filter is /\[?([[:alpha:]]+\d*)\]?(\d*)/ ... that does split "CH3CH2OH" into "CH3" "CH2" "OH" ... spliting on the numbers
Norrin has joined #ruby
Xeago has quit [Remote host closed the connection]
St_Marx has joined #ruby
<danijoo> Im not sure if its done with a simple regex..
GriffinHeart has quit [Ping timeout: 258 seconds]
grenierm has quit [Quit: grenierm]
<Hanmac> danijoo: shevy only wanted a reaction solver where you has a × A + b × B = x × X + y × Y where you give them the big ones (ABXY) and it does try to calc the small ones like (abxy)
MCDev has quit [Ping timeout: 250 seconds]
sarkis has quit [Ping timeout: 272 seconds]
<danijoo> For example some chemists tend to write COOH as CO2H
workmad3 is now known as wm3|away
<Hanmac> the grouping was only for me in parsing
qmfnp has joined #ruby
AlexRussia has joined #ruby
<danijoo> Why do you need to parse into CH3 CH2 etc for simple equation solving?
snath has quit [Ping timeout: 245 seconds]
<danijoo> if you know al products and educts, you could just calculate the Hs, Cs, etc of every component and work with that
VBlizzard has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
Aaaal has joined #ruby
codecop has joined #ruby
<danijoo> Once you know all educts and products, calculate the number for each atom (CH3CH2OH would be 2xC, 6xH, 1xO). Then you can put those in a matrix and you get a linear system of equations
<danijoo> this can then be solved with a gaussian algorythm
dangerousdave has joined #ruby
zeroNones has joined #ruby
zeroNones has quit [Max SendQ exceeded]
zeroNones has joined #ruby
spyderman4g63 has joined #ruby
zeroNones has quit [Max SendQ exceeded]
tokik has joined #ruby
<Hanmac> danijoo: like i said the grouping is only for me, and it does already count all values for the molecules, and for the gaussian algorythm i might look later
<danijoo> yeah if its just for representation i think its ok :) thought you might write this for some kind of fancy library or such :)
Tricon has joined #ruby
grenierm has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
nonmadden has joined #ruby
wald0 has joined #ruby
endash has joined #ruby
Tiberias has joined #ruby
AtumT has joined #ruby
pwh has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
noop has joined #ruby
fnordperfect has joined #ruby
krisquigley has joined #ruby
Tiberias has quit [Quit: Tiberias]
cocotton has quit [Remote host closed the connection]
geggam has quit [Ping timeout: 272 seconds]
Tiberias has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
jottr_ has joined #ruby
skammer1 has joined #ruby
rkalfane has joined #ruby
Takle has quit [Remote host closed the connection]
Veidit has quit [Read error: Connection reset by peer]
Veidit has joined #ruby
alem0lars has joined #ruby
Takle has joined #ruby
sdwrage has quit [Ping timeout: 246 seconds]
mastr_bennett[x] has joined #ruby
nettoweb has joined #ruby
PierreRambaud has quit [Remote host closed the connection]
alem0lars has quit [Client Quit]
nettoweb has quit [Max SendQ exceeded]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danijoo has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
jottr_ has quit [Ping timeout: 272 seconds]
nettoweb has quit [Max SendQ exceeded]
Wolland has joined #ruby
danijoo has joined #ruby
nettoweb has joined #ruby
alem0lars has joined #ruby
dangerousdave has joined #ruby
klaut has joined #ruby
Takle has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Remote host closed the connection]
alem0lars has quit [Client Quit]
alem0lars has joined #ruby
sdwrage has joined #ruby
klaut has quit [Remote host closed the connection]
ciampix__ has joined #ruby
ciampix has quit [Quit: Ex-Chat]
jottr_ has joined #ruby
nhhagen_ has joined #ruby
ciampix__ has quit [Client Quit]
ciampix has joined #ruby
Wolland has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
banister has joined #ruby
Heartbroken has quit [Ping timeout: 246 seconds]
ddv has quit [Changing host]
ddv has joined #ruby
nhhagen_ has quit [Read error: Connection reset by peer]
nhhagen__ has joined #ruby
havenwood has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
nhhagen has quit [Ping timeout: 258 seconds]
Xeago has joined #ruby
HelperW__ has joined #ruby
sdwrage has quit [Ping timeout: 260 seconds]
aleatorik has joined #ruby
terlar has quit [Ping timeout: 260 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
wm3|away has quit [Ping timeout: 258 seconds]
Heartbroken has joined #ruby
t_p has joined #ruby
twohlix has joined #ruby
agrinb has joined #ruby
sk87 has joined #ruby
ciampix has quit [Quit: Ex-Chat]
havenwood has quit [Ping timeout: 264 seconds]
nhhagen__ has quit [Ping timeout: 250 seconds]
sandeepdb has joined #ruby
fgo has quit [Remote host closed the connection]
HelperW__ has quit [Ping timeout: 260 seconds]
nhhagen has joined #ruby
agrinb has quit [Ping timeout: 272 seconds]
coderdad has joined #ruby
abdulsattar has joined #ruby
t_p has quit [Ping timeout: 245 seconds]
nhhagen has quit [Remote host closed the connection]
ddv has quit [Quit: *poof*]
IrishGringo has quit [Ping timeout: 244 seconds]
alem0lars_ has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alem0lars has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jasooon has joined #ruby
fgo has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
boombadaroomba has joined #ruby
MewFree has quit [Quit: leaving]
sdwrage has joined #ruby
arup_r has quit []
nettoweb has joined #ruby
alem0lars has joined #ruby
mleone has joined #ruby
alem0lars_ has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
GriffinHeart has joined #ruby
hiyosi has joined #ruby
boombadaroomba has quit [Ping timeout: 258 seconds]
jasooon has quit [Ping timeout: 258 seconds]
GriffinHeart has quit [Ping timeout: 246 seconds]
dumdedum has quit [Quit: foo]
startupality has quit [Quit: startupality]
dblessing has joined #ruby
dblessing has quit [Remote host closed the connection]
twohlix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
abdulsattar has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
sinkensabe has quit [Remote host closed the connection]
t_p has joined #ruby
iamjarvo has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maasha has quit [Quit: Page closed]
rclsilve1 has quit [Quit: leaving]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
twohlix has joined #ruby
cherwin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 245 seconds]
livingstn has joined #ruby
fnordperfect has joined #ruby
ddv has joined #ruby
dblessing has joined #ruby
nettoweb has joined #ruby
mary5030 has joined #ruby
<shevy> danijoo gaussian algorithm?
nettoweb has quit [Max SendQ exceeded]
alem0lars has quit [Quit: alem0lars]
<danijoo> yeah?
<danijoo> whats wrong with gaussian? :)
<shevy> I don't know what that is
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<shevy> I refer to this sentence:
<shevy> danijoo> Once you know all educts and products, calculate the number for each atom (CH3CH2OH would be 2xC, 6xH, 1xO). Then you can put those in a matrix and you get a linear system of equations
<danijoo> its an algorythm to solve linear equation systems
<danijoo> uhmm how do I expain...
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<dblessing> this might be a very specific question for this room, but does anyone know how i might test the options given to HTTParty via rspec? i include httparty in my class and in the rspec i call one of my methods that passes down to httparty. i want to ensure the options hash is passed all the way down
nettoweb has joined #ruby
gsd has joined #ruby
claymore has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
<danijoo> lets say you have this formula: H2 + O2 -> H2O
<danijoo> ok bad example....
<danijoo> :D
ddv has quit [Quit: *poof*]
ddv has joined #ruby
<danijoo> lets say you have this: x C3H5N3O9 -> a CO2 + b H2O + c N2 + d O2
paulfm has joined #ruby
<danijoo> you can dissasemble it into equations for each atom. for C that would be:
abdulsattar has joined #ruby
<danijoo> 3 x = a
<danijoo> for H: 5x = 2b
<danijoo> for O: 9x = 2a + b + 2d
<danijoo> etc.
mary5030 has quit [Remote host closed the connection]
<danijoo> then you have a "linear system of equations" with the factors x,a,b,c,d
mary5030 has joined #ruby
<danijoo> and the mathematical algorythm to solve those systems is called gaussian algorythm
<danijoo> its easy to write function for that algorythm and its how most computer programs solve chemical equations (and how we learned to do it by hand for complex formulas in chemistry)
jottr_ has quit [Ping timeout: 260 seconds]
alem0lars has joined #ruby
<shevy> hmmmm
<danijoo> it looks complex I know ^^;
<shevy> you wrote for H it is 5x
<shevy> but when you modify H, you also modify O
<danijoo> yes.
sdwrage has quit [Ping timeout: 260 seconds]
c107 has joined #ruby
cocotton has joined #ruby
<danijoo> thats the problem with those equations. every factor depends on the other ones. so if you change x for example, this results in a change in a,b,c,d
cocotton has quit [Remote host closed the connection]
<danijoo> what the gaussian algorythm does is setting one vactor to a chosen value.
<danijoo> for example you say: x = 1 at the beginning
cocotton has joined #ruby
startupality has joined #ruby
<danijoo> then it calculates a,b,c,d depending on x=1. You might get odd values for those other parameters
Takle has quit [Remote host closed the connection]
emocakes__ has joined #ruby
<danijoo> then you find the lowest common denominator for all params and you are done
moritzs has joined #ruby
Takle has joined #ruby
alem0lars_ has joined #ruby
snath has joined #ruby
<shevy> hmmmm
<danijoo> since you always get the same amount of unknown variables then you have equations, there are infinite possible solutions for those equations.
<shevy> ok but
klaut has joined #ruby
cherwin has joined #ruby
<danijoo> and the gaussian algorythms solve it and choses the lowest one
<shevy> how does one write something like a Guassian elimination in ruby?
isthisreallife has joined #ruby
alem0lars has quit [Ping timeout: 260 seconds]
abdulsattar has quit [Ping timeout: 250 seconds]
alem0lars_ is now known as alem0lars
<Hanmac> or better question, is there already a gem for it?
<danijoo> : D
<shevy> hehehe
<danijoo> im pretty sure there is
<shevy> danijoo wrote about a matrix
<danijoo> but its not that hard to implement though
j2p2 has joined #ruby
<shevy> well how would I do this?
slester has joined #ruby
<danijoo> basically you have a matrix where each column is a param. so first colum is a, second colum is b ...
<shevy> do I use a hash for those a,b,c,d values?
<danijoo> and each row is one aquation
emocakes has quit [Ping timeout: 258 seconds]
dawkirst has quit [Remote host closed the connection]
msmith has joined #ruby
jerius has joined #ruby
<danijoo> the row for H would look like: 3 1 0 0 0
<danijoo> (3x = 1a + 0b + 0c + 0d)
Ankhers has joined #ruby
<danijoo> and so on for all rows
<danijoo> and then you have three base operations on the matrix. you can swap positions (a and b)
Takle has quit [Ping timeout: 260 seconds]
<danijoo> you can multiply all values in one row
<danijoo> and you cann add one row to another
dawkirst has joined #ruby
MiracleBlue has joined #ruby
Koshian is now known as Koshian
oponder has joined #ruby
<shevy> hmm
<danijoo> and you use those to eliminate values in a row. for H this would not be neccessary. b,c,d are already 0 (eliminated)
<danijoo> so if you said x = 1 you know a = 1/3
<shevy> but what if b c and d are not eliminated?
<danijoo> read the wiki article. its hard to explain but its really easy
<danijoo> then you eliminate them
<danijoo> by those matrix operations
<Hanmac> danijoo: hm no if x = 1 then a = 3 not 1/3
<shevy> I guess I should not have slept during high school math lectures :(
tokik has quit [Ping timeout: 240 seconds]
<shevy> "although it was known to Chinese mathematicians as early as 179 AD"
<shevy> cool
<danijoo> as I said you can combine two columns. so when c,d, are not 0, you try to combine it with another column in a way that the get 0
<shevy> what symbol did they use for 1,2,3,4?
silkfox has joined #ruby
msmith has quit [Ping timeout: 245 seconds]
<shevy> ah well
<shevy> matrices...
<shevy> guess I should read up what they are
freezey has joined #ruby
<shevy> and how to write them in ruby
banister is now known as banisterfiend
hamakn has quit [Remote host closed the connection]
<danijoo> in ruby you would show them as 2 dimensional arrays
<danijoo> one array = [3,1,0,0,0]
dawkirst has quit [Remote host closed the connection]
<danijoo> and a matrix would be an array holding 5 of those arrays
<Hanmac> danijoo: like shown in the link ruby does have a matrix class too ...
<danijoo> oh okay :)
rkalfane has joined #ruby
<danijoo> gaussian algorythm in ruby: https://defuse.ca/blog/gaussian-elimination-in-ruby.html
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<danijoo> but as all those completly mathematical functions it looks like black magic ^^
<shevy> that looks like chinese to me
<danijoo> yeah. ^^
<shevy> I understand Arrays though
Wolland has joined #ruby
<shevy> so a matrix is an Array of Arrays
Takle has joined #ruby
<danijoo> you cant understand that without understanding the algorythm that its based on
<tobiasvl> algorhythm
<shevy> I don't understand algorithms
<shevy> tobiasvl is having fun meanwhile
abdulsattar has joined #ruby
<tobiasvl> hey, it's friday
benzrf|offline is now known as benzrf
djstorm has joined #ruby
msmith has joined #ruby
freerobby has joined #ruby
wm3|away has joined #ruby
jiel has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
jiel has quit [Client Quit]
pagioss has quit [Ping timeout: 272 seconds]
bobishh has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
AFKGeek has quit [Ping timeout: 260 seconds]
<danijoo> for those who are interessted. fool proof explanation :) https://www.youtube.com/watch?v=2j5Ic2V7wq4
<danijoo> not as bad as my one
cocotton_ has joined #ruby
benzrf is now known as benzrf|offline
havenwood has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
bdnelson has joined #ruby
Xeago has joined #ruby
moritzs has quit [Ping timeout: 272 seconds]
AFKGeek has joined #ruby
robustus is now known as robustus|Off
mostlybadfly is now known as ina_garten
cocotto__ has joined #ruby
freezey has quit [Remote host closed the connection]
bdnelson has quit [Client Quit]
cocotton has quit [Ping timeout: 258 seconds]
bdnelson has joined #ruby
cocotton_ has quit [Ping timeout: 260 seconds]
cocotto__ has quit [Remote host closed the connection]
<apeiros> tobiasvl: shake shake shake to the algorhythm ;-)
agrinb has joined #ruby
<shevy> god
<shevy> now apeiros is picking it up
lkba has joined #ruby
<shevy> and it all started with Mr. Hanmac:
<shevy> <Hanmac> danijoo: like i said the grouping is only for me, and it does already count all values for the molecules, and for the gaussian algorythm i might look later
tokik has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
<shevy> at about the time they made futurama, the simpsons started to suck :(
benzrf|offline is now known as benzrf
<danijoo> but he still has to do those gaussian stuff if you tries to build a formula solver for chemistry ;)
<apeiros> danijoo: many native speakers in both german and english write it wrongly too
<danijoo> i dont think there is another implementation that can be written in code
<danijoo> apeiros: german here. thats my problem..
<apeiros> "algorithm is no dancer" was my mnemonic
<shevy> well right now I have zero implementations so
<danijoo> and im usually writing faster then i think <.<
hellangel7 has quit [Read error: Connection reset by peer]
<apeiros> danijoo: well, it's the same in german too. Algorithmus and Rhythmus
<Hanmac> danijoo: german too, good that we both have a long weekend ne? ;P
<danijoo> yeah. and im wasting it with IT : D
<danijoo> i think I once built the exact same program you are trying to build ^^
<danijoo> but no ruby
wm3|away is now known as workmad3
AndChat| has quit [Ping timeout: 246 seconds]
ahhMichael has quit [Ping timeout: 256 seconds]
dangerousdave has joined #ruby
Tiberias has quit [Remote host closed the connection]
skolman_ has joined #ruby
cocotton has joined #ruby
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
kaspergrubbe has joined #ruby
GriffinHeart has joined #ruby
lukevinc has joined #ruby
<shevy> not in ruby?
fnordperfect has quit [Read error: Connection reset by peer]
Sylario has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fnordperfect has joined #ruby
<danijoo> yeah i think i did it in java or sth like that
Tomme has quit [Ping timeout: 245 seconds]
IceDragon has joined #ruby
jasooon has joined #ruby
<danijoo> or python.. mh
<Sylario> If have class foo that include httparty, immediatly after i can call the base_uri() function from the included class httparty. How does "calling a class function at the root of the class" is called? Is it a special namespace? when is it called first?
govg has quit [Ping timeout: 272 seconds]
freezey has joined #ruby
GriffinHeart has quit [Ping timeout: 258 seconds]
ursooperduper has joined #ruby
nerium has joined #ruby
willgo has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
<shevy> wat
<shevy> what is the root of the class?
<jhass> Sylario: not sure what your question is really, you can call base_uri on the class because of https://github.com/jnunemaker/httparty/blob/master/lib/httparty.rb#L32
<Sylario> jhass: yeah i know
<Sylario> but what is that? code at the root of the class
<Sylario> is it called when the scripts is started?
<jhass> oh yeah, it's run as the file is interpreted
jasooon has quit [Ping timeout: 258 seconds]
fmcgeough has joined #ruby
<jhass> stuff like attr_reader and even private are just methods too
<Sylario> jhass: i want to do base_uri Gemname.config.url in a gem i do
<Sylario> jhass: i guess it does not work because the class is read before the gem config is executed
<jhass> then set it after the gem config
coderhs has joined #ruby
<Sylario> but how?
<jhass> Foo.base_uri = Gemname.config.url
yeticry has quit [Read error: Connection reset by peer]
<Sylario> base_uri is a function
<jhass> there are no functions in ruby
<jhass> only methods
treehug88 has joined #ruby
<jhass> and objects wrapping code
<jhass> base_uri is a method
<jhass> ah, no setter method, bummer
<jhass> so Foo.base_uri(Gemname.config.url)
freerobby has quit [Quit: Leaving.]
<Sylario> soo ading the classname will prevent it to be executed before the class is used?
freerobby has joined #ruby
dx7 has joined #ruby
<Sylario> still does not work
<jhass> no
<jhass> you should call that after you're sure your config has been setup
sarkis has joined #ruby
tkuchiki has joined #ruby
lukevinc has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.8.0/20000101000000]]
<jhass> module Gemname; def configure; yield whatever; Foo.base_uri(config.url); end; end
jottr_ has joined #ruby
atmosx has joined #ruby
iamjarvo has joined #ruby
yeticry has joined #ruby
echevemaster has joined #ruby
Suchit____ has quit [Quit: Computer has gone to sleep.]
nhhagen has joined #ruby
govg has joined #ruby
t_p has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 244 seconds]
moritzs has joined #ruby
jobewan has joined #ruby
pagioss has joined #ruby
AFKGeek has quit [Quit: Leaving]
<Sylario> seems the require before the gem module is causing that
tomgavin has quit [Ping timeout: 250 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
Macaveli has quit [Ping timeout: 245 seconds]
alem0lars has quit [Quit: AFK..]
sinkensabe has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
comma8|BNC has joined #ruby
mary5030 has joined #ruby
comma8|BNC is now known as comma8
<jhass> you should avoid your code becoming load order dependent
Digital-Ghost has joined #ruby
Digital-Ghost has quit [Client Quit]
<jhass> too much that is, a certain level usually can't be avoided
krisquigley has joined #ruby
dx7 has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dx7 has joined #ruby
dangerousdave has joined #ruby
<Sylario> jhass: go and tell that to httparty
sinkensabe has quit [Remote host closed the connection]
<jhass> what's wrong with the approach I suggested?
nhhagen has quit [Remote host closed the connection]
<Sylario> jhass: httparty execute base_uri when it is required
axl_ has quit [Quit: axl_]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> what do you mean? where?
<Sylario> at the beginning of the module gem class
grzywacz has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
<jhass> what?
<Sylario> I guess all gem have there module in /lib/
<jhass> "module gem class"? what is that?
<Sylario> i do not know the name
Advocation has joined #ruby
<jhass> then describe or link it
<Sylario> /lib/gemname.rb
<jhass> that's called "file"
<Sylario> containing a module gemname
krisquigley has quit [Ping timeout: 260 seconds]
<jhass> and?
skolman_ has quit [Remote host closed the connection]
last_staff has joined #ruby
<Sylario> and the require trigger th base_uri call
<jhass> which require?
<Sylario> i think
alem0lars has joined #ruby
skolman_ has joined #ruby
<Sylario> well, from what i understand, you need to require all your gems files in this module
<jhass> usually you should, yes
sandeepdb has quit [Quit: Leaving]
oponder has quit []
<jhass> I guess you still have the base_uri call at the class/module level and completely ignored my suggestion
govg has quit [Ping timeout: 258 seconds]
davispuh has joined #ruby
<Sylario> problem is, where do i call it?
ahhMichael has joined #ruby
ArchBeOS-work has joined #ruby
<jhass> after you know the value you want to set it to
ffranz has joined #ruby
<jhass> I can't get more specific since you don't
govg has joined #ruby
ptrrr has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
rubie has joined #ruby
last_staff has joined #ruby
<Sylario> jhass: problem is the gem is "inert"
amundj has quit [Ping timeout: 260 seconds]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
last_staff has quit [Client Quit]
<jhass> ?!
<Sylario> jhass: i would need to call the function from the program using the gem
lolmaus has quit [Quit: Konversation terminated!]
mastr_bennett[x] has joined #ruby
<jhass> a) write a wrapper method that does that b) write a configuration API that allows you to run code after the user has configured the gem
oleo__ is now known as oleo
<Sylario> well by calling it from the gem, initializer, it seems to be working
<Sylario> thx jhass
davispuh has quit [Ping timeout: 245 seconds]
synergyz has joined #ruby
davispuh has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
kadoppe has quit [Quit: WeeChat 0.4.3]
Cache_Money has joined #ruby
DrCode has quit [Remote host closed the connection]
jonmorehouse has joined #ruby
thejamespinto has joined #ruby
abdulsattar has quit [Ping timeout: 250 seconds]
klmlfl has joined #ruby
DrCode has joined #ruby
thejamespinto has quit [Read error: Connection reset by peer]
lampd1 has quit []
thejamespinto has joined #ruby
startupality has quit [Quit: startupality]
nhhagen has joined #ruby
moritzs has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
Wolland has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
aganov has quit [Quit: Leaving]
geggam has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
startupality has quit [Client Quit]
Wolland has quit [Ping timeout: 260 seconds]
fnordperfect has joined #ruby
apeiros has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
apeiros has joined #ruby
Takle has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubie> im getting conflicting outputs from Rubular and what is written in PickAxe, not sure why
<rubie> for example
<shevy> so you must have a regex
<shevy> and you also must say which ruby version you use
<rubie> i thought that could be part of the problem
hamakn has joined #ruby
<rubie> but isn't regex fairly standardized?
<shevy> depends on what you use I guess
<shevy> perl uses the PCRE I think ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
<shevy> oh there is a newer one ... ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
skolman_ has quit [Remote host closed the connection]
Takle has quit [Read error: No route to host]
<workmad3> rubie: there can be annoying edge-cases and discrepencies :)
<rubie> well this is rubular http://www.rubular.com/ so im not sure what version they use
apeiros has quit [Ping timeout: 244 seconds]
ryanleesipes has joined #ruby
<workmad3> rubie: it tells you :P
Takle has joined #ruby
vedis has joined #ruby
<workmad3> rubie: just under the 'test string' box
ixti has joined #ruby
<rubie> ok
fabrice31 has quit [Remote host closed the connection]
<rubie> now i just have to find out what version this book is referencing
GriffinHeart has joined #ruby
comma8 has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
<shevy> simple - look at the date when it was published
<shevy> probably 2.1 or so
<shevy> hmm 2.0.3
<shevy> something like that
<workmad3> if it's an old pickaxe, could be 1.9 or even 1.8
dawkirst has quit [Remote host closed the connection]
<workmad3> rubie: which edition is it?
icarus has joined #ruby
<rubie> is what im looking at now
hamakn has quit [Ping timeout: 250 seconds]
bal has quit [Quit: bal]
Affix has quit [Ping timeout: 260 seconds]
mastr_bennett[x] has quit [Read error: Connection reset by peer]
<workmad3> rubie: eep... that's the first edition, iirc... so it's ruby 1.6
<rubie> i think my PDF is an older version. plus that link is what was on the Rubular site, so i guess i'll start using that book
ptrrr has quit [Ping timeout: 272 seconds]
<workmad3> rubie: yeah, the preface there states 'This book documents Version 1.6 of Ruby, which was released in September 2000.'
<rubie> oh and my pdf is 1.8
<shevy> lol
<shevy> ruby 1.6
zeroNones has joined #ruby
<workmad3> rubie: you really want the 4th edition which covers 2.0
<shevy> rubie is only 14 years late
<rubie> hah but its free!
<shevy> welcome back to the future rubie :)
<workmad3> rubie: free isn't much good if it's entirely wrong :P
Ulrike_Rayne has quit [Ping timeout: 246 seconds]
<rubie> haha relevant point
<workmad3> rubie: or, as is the case with that book, incorrect in many places that an experienced rubyist can spot but a newcomer will have no idea about
<workmad3> as a lot of it will still work
<workmad3> but you won't know which until you know ruby...
roger_rabbit has joined #ruby
Affix has joined #ruby
GriffinHeart has quit [Ping timeout: 246 seconds]
<rubie> the Ruby Paradox
fabrice31 has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
Ulrike_Rayne has joined #ruby
<shevy> in the end, the only way to learn ruby is to write ruby code by yourself
<rubie> yes but its hard to write code if you can't get it do what you want
zarubin has quit []
<rubie> and apparently i need regular expressions
moritzs has joined #ruby
<rubie> so im reading about them
kristofferR has joined #ruby
<rubie> but my reading selection is making that process more difficult
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
twohlix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dawkirst has joined #ruby
jasooon has joined #ruby
rkalfane has joined #ruby
lxsameer has quit [Remote host closed the connection]
ahhMichael has quit [Ping timeout: 256 seconds]
twohlix has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
ciampix has joined #ruby
startupality has joined #ruby
slyslick has joined #ruby
cocotton has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lmickh has joined #ruby
cocotton has joined #ruby
<railis> :)
Xeago has quit [Remote host closed the connection]
<shevy> rubie it's really not so important; if you understood the general concept about regexes then any transition is simple, even into other languages
<shevy> and rubular.com helps build a proper regex online
abdulsattar has joined #ruby
<shevy> I suggest - throw away the ruby 1.6 stuff
icarus has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 244 seconds]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<railis> ruby is designed so that even a newbie can write a code
arup_r has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
kristofferR has joined #ruby
<railis> there is probably no language as easy to learn as ruby
icarus has joined #ruby
icebourg has joined #ruby
<wasamasa> there are actually
phao has joined #ruby
<rubie> regex isn't ruby tho
<phao> Hi, studying ruby, sometimes I see the term "internal encoding". Is that the same as "source code encoding"?
<railis> + as easy to read?
HelperW__ has joined #ruby
<rubie> and i understand the basics of regex and what its suppose to do
Hanmac has quit [Ping timeout: 258 seconds]
b00stfr3ak has joined #ruby
<railis> wasamasa: which one?
fsapo has quit [Remote host closed the connection]
<wasamasa> railis: scheme
<shevy> phao ruby has default encodings for internal and external datasets
<shevy> consider this phao
<wasamasa> railis: ruby has tons of special syntax and allows you to come up with your own coding style
<phao> shevy, internal datasets being what comes after __END__ ?
<shevy> Encoding.default_external = 'ASCII 8bit'
<shevy> phao no, I think it is the defaults when you build a string like: x = 'blaa'
<shevy> you can test it; p x.encoding
<phao> AHhh I see.
<shevy> and some methods like File.readlines() allow you to pass a default encoding in its argument list too
<wasamasa> railis: while it's nice since it allows you to express ruby idioms succinctly, it's not easy to learn :P
<phao> Sure, but what I'd like to know if internal encoding and source code encoding are the same thing. Do you know if they are?
<shevy> I don't know what is source code encoding hehe but you can set that with the line after the shebang line
<phao> =D
<workmad3> phao: the data section will have the same encoding as the source code
benzrf is now known as benzrf|offline
sarkis has joined #ruby
<workmad3> phao: which defaults to ASCII in 1.9 and UTF8 in 2.0, and can be set with the 'encoding' magic comment
<phao> It's the encoding of the source code file. You specify it so ruby knows how to read the file.
<shevy> workmad3 why can I have not more than one __END__ entries in a .rb file btw?
speaking1ode has quit [Remote host closed the connection]
<workmad3> shevy: because after the __END__, the rest of the file is just read in as a text string
<workmad3> shevy: it's not parsed
<phao> workmad3, Ok.
<shevy> yes I like that
`Liberation has joined #ruby
<shevy> I wanna toggle a .rb file in parts that can be parsed and parts that can not be at will :)
<phao> So it seems internal encoding, default external encoding and source code encoding are 3 different concepts. Is that right then?
c107 has quit [Remote host closed the connection]
<shevy> phao I've never heard source code encoding before
dangerousdave has joined #ruby
<workmad3> phao: what are you counting as 'internal encoding'?
<phao> workmad3, it's what you can set with the second argument to the -E option
startupality has quit [Quit: startupality]
<shevy> Encoding has only two setter methods in this regard:
<shevy> Encoding.default_external=
<shevy> Encoding.default_internal=
iamjarvo has joined #ruby
<shevy> I don't see a Encoding.default_source_code=
<phao> Sure.
<phao> The source code encoding you set with the coding comment, like you mentioned.
<workmad3> phao: ah, ok... it's what I generally call 'read encoding' and 'write encoding'
<workmad3> oh wait, no...
Advocation has quit [Quit: Advocation]
<phao> workmad3, they're respectively those shevy mentioned (Encoding.default_external [1st parameter to -E] and Encoding.default_internal [2nd parameter to -E]).
<phao> I'm using "source code encoding" because it's the term the book I'm reading uses.
<workmad3> yeah
<phao> It's the encoding of the source code file.
<shevy> so we can have 3 different encodings?
<workmad3> you can have as many encodings as you like in-play in a ruby program
<phao> shevy, That's how it is in many programming languages.
sarkis has quit [Ping timeout: 260 seconds]
<workmad3> the default internal and external encodings control the behaviour of IO objects... when you read from an IO object, the data is transcoded from external to internal... when you write to it, data is transcoded from internal to external
fsapo has joined #ruby
<phao> I see.
<workmad3> and the source code encoding is the magic 'encoding' comment for the ruby runtime that tells it what character encoding to use when reading the source file (as phao said :) )
oleo has quit [Quit: Verlassend]
ahhMichael has joined #ruby
<workmad3> source encoding can only be ASCII or UTF8 in ruby, but internal and external encodings can be pretty much anything
<shevy> hey
slyslick has quit [Ping timeout: 240 seconds]
<shevy> I use "# Encoding: ASCII-8BIT"
<workmad3> you can specify a specific encoding at any point for IO objects though... you can have a default of UTF8 but then specify that a certain file is read in as cp1252...
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
<workmad3> or decide to store data from a certain file internally as UTF-16 instead of UTF-8... or whatever :)
<workmad3> shevy: I don't think that's valid... it's likely to just be ignored :P
sevvie has joined #ruby
oleo has joined #ruby
skolman_ has joined #ruby
<workmad3> oh wait, seems it *is* valid
robustus|Off is now known as robustus
fsapo has quit [Remote host closed the connection]
<shevy> \o/
<shevy> it's the encoding I call
<shevy> "leave me alone!"
iceden has joined #ruby
<workmad3> shevy: nah, the 'leave me alone' encoding is UTF-8 :P
t0rc has joined #ruby
ptrrr has joined #ruby
nhhagen has quit [Ping timeout: 272 seconds]
<workmad3> shevy: ASCII-8BIT is "I don't give a shit, let's malform your data!"
speakingcode has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justinmburrous has joined #ruby
startupality has joined #ruby
wjimenez5271 has joined #ruby
<shevy> hey my data is ok
compuser_ has joined #ruby
carraroj has joined #ruby
compuser has quit [Ping timeout: 245 seconds]
DrCode has quit [Remote host closed the connection]
fnordperfect has quit [Read error: Connection reset by peer]
compuser_ has quit [Ping timeout: 258 seconds]
fnordperfect has joined #ruby
ALVAN has joined #ruby
charliesome has quit [Quit: zzz]
robustus is now known as robustus|Off
aspires has joined #ruby
DrCode has joined #ruby
go|dfish has quit [Remote host closed the connection]
<gaussblurinc1> is anybody here? how to configure data for POST in faraday?
gsd has joined #ruby
<ALVAN> hi all .. what gem is require for attribute function to work correctly
zarubin has joined #ruby
<ALVAN> i have ruby 1.8.6 and used attribute in a class .. and receive compile error
sarkis has joined #ruby
thejamespinto has quit [Remote host closed the connection]
thejamespinto has joined #ruby
moritzs has quit [Ping timeout: 260 seconds]
jbw has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
<shevy> no ALVAN
sinkensabe has joined #ruby
<shevy> you must show the 100% precise error you get
dawkirst has quit [Remote host closed the connection]
<shevy> not "receive compile error"
<shevy> and the second step is - you must show the code as-is you use, ideally on something like gist github
jamz has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
jbw has joined #ruby
thejamespinto has quit [Ping timeout: 272 seconds]
joonty has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
Wolland has joined #ruby
ghostmoth has joined #ruby
iamjarvo has joined #ruby
iceden has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
zeroXten has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 240 seconds]
j_mcnally has joined #ruby
cocotton has quit [Remote host closed the connection]
Hobogrammer_ has joined #ruby
ciampix has quit [Ping timeout: 240 seconds]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
jonmorehouse has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
GriffinHeart has joined #ruby
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Wolland has quit [Ping timeout: 260 seconds]
Takle_ has quit [Remote host closed the connection]
Takle has joined #ruby
grzywacz has joined #ruby
apeiros has joined #ruby
zorak8 has joined #ruby
icebourg has quit []
zarubin has quit [Quit: Leaving.]
icebourg has joined #ruby
Cache_Money has joined #ruby
nhhagen has joined #ruby
echevemaster has quit [Remote host closed the connection]
michaeldeol has joined #ruby
tokik has quit [Ping timeout: 258 seconds]
TorpedoSkyline has joined #ruby
jonmorehouse has joined #ruby
obscured has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
qba73 has quit [Remote host closed the connection]
t0rc has quit [Quit: WeeChat 1.0.1]
ndrei has joined #ruby
iceden has joined #ruby
rubie has quit [Quit: Page closed]
ptrrr has quit [Quit: ptrrr]
Xeago has joined #ruby
justinmburrous has quit [Remote host closed the connection]
Macaveli has joined #ruby
GriffinHeart has quit [Ping timeout: 272 seconds]
jonmorehouse has quit [Ping timeout: 260 seconds]
ptrrr has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coderhs has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
ghr has quit [Ping timeout: 260 seconds]
justinmburrous has joined #ruby
W0rmDr1nk has quit [Ping timeout: 245 seconds]
jthomp has joined #ruby
jcdesimp has joined #ruby
jottr has joined #ruby
jasooon has joined #ruby
alex88 has quit [Quit: Leaving...]
sinkensa_ has joined #ruby
jottr_ has quit [Ping timeout: 246 seconds]
mikeg has joined #ruby
jthomp_ has joined #ruby
jthomp has quit [Read error: Connection reset by peer]
bricker`work has joined #ruby
sinkensabe has quit [Ping timeout: 260 seconds]
Xeago_ has joined #ruby
jasooon has quit [Ping timeout: 250 seconds]
Cache_Money has quit [Quit: Cache_Money]
russt_ has joined #ruby
russt_ has quit [Client Quit]
benzrf|offline is now known as benzrf
krisquigley has joined #ruby
SCHAAP137 has joined #ruby
dawkirst has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 272 seconds]
Poky has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
DrCode has quit [Remote host closed the connection]
<ericwood> if I had a dollar for every time I typed "bundle exec !!" I'd be a fucking millionaire
DrCode has joined #ruby
<apeiros> ericwood: use rvm - no need to type `bundle exec ` with it
krisquigley has quit [Ping timeout: 272 seconds]
<ericwood> I switched over to chruby
<ericwood> but yeahhhh
<ericwood> that was one nice thing about RVM
qmfnp is now known as qmfnp_lunch
<apeiros> you can probably recreate that functionality without rvm
<ericwood> I'll set up something in bash so that everything is run via bundle exec
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Mia> How to compare two strings ignoring uppercase/lowercase
<ericwood> Mia: uppercase/lowercase both then compare
lkba has joined #ruby
<apeiros> >> "foo".casecmp("FOO")
<eval-in_> apeiros => 0 (https://eval.in/201595)
stunder has joined #ruby
<ericwood> huh. TIL.
<lewix> what would you rather? rails back end developer or javascript backbone dev /why
<apeiros> Mia: beware, ruby doesn't have collations, so it can't properly compare e.g. utf-8 word chars
<ericwood> Lewix: I want both.
<Mia> ericwood, what do you mean
<ericwood> but I'm tired of backbone
<Mia> how about StrInGs lIKe tHIs
<apeiros> >> "föö".casecmp("FÖÖ")
<lewix> ericwood: you have to pick one. give the pros and cons
<apeiros> ah right, eval-in_ has issues with unicode
fnordperfect has quit [Ping timeout: 240 seconds]
<ericwood> Mia: do what apeiros told you
<ericwood> Lewix: I like doing frontend work...gives me something really tangible and I'm really visual
jamto11 has joined #ruby
<Mia> apeiros, what's my option then
<ericwood> but I like my rubies and low level stuff so don't make me pick one :'(
yfeldblum has joined #ruby
<Mia> this is for a chatbot, the text might include foreign letters
<apeiros> Mia: activesupport or unicode gem
<lewix> ericwood: come on man, you're not helping - i mean how's the workload, whats less painfull,etc...
<Mia> apeiros, thanks
<apeiros> there are probably more gems
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ericwood> Lewix: I always found backbone kind of painful, and depending on the project requirements frontend dev can be really painful
<shevy> Lewix given these choices I would opt for instant suicide
<ericwood> but it makes me think really creatively which kinda makes it fun
<ericwood> constraints breed creativity, etc.
Xeago has joined #ruby
<ericwood> Lewix: are you trying to get us to help you make a life decision?
IceDragon has quit [Ping timeout: 272 seconds]
klmlfl has quit [Remote host closed the connection]
Xeago__ has joined #ruby
thoolihan has quit [Ping timeout: 258 seconds]
shredding has joined #ruby
x1337807x has joined #ruby
<Mia> apeiros, ericwood here is my situation
<Mia> on :message, "hello" {}
thoolihan has joined #ruby
hellangel7 has joined #ruby
<Mia> how do I compare in this sense, message can be Hello HELLO HeLLo or anything
<Mia> it should match
yfeldblum has quit [Ping timeout: 258 seconds]
<Mia> :message.downcase doesn't work
Xeago_ has quit [Ping timeout: 245 seconds]
<apeiros> Mia: cinch?
<apeiros> I think it accepts regex too
<Mia> apeiros, yes cinch :)
<apeiros> on :message, /hello/i
<apeiros> also, {} without parens won't work ;-)
<eam> pedantic: /^hello\z/i
skolman__ has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago has quit [Ping timeout: 246 seconds]
skolman_ has quit [Read error: Connection reset by peer]
maestrojed has joined #ruby
wallerdev has joined #ruby
<apeiros> eam: yeah, depends a bit on how cinch uses it
<eam> yeah I don't know either, figured I'd mention
rubyonrailed has joined #ruby
codezomb has joined #ruby
codezomb has quit [Client Quit]
<Mia> well since the string is lowercase, is it possible to make the symbol downcase?
codezomb has joined #ruby
<apeiros> eam: sorry. thanks for bringing it up, it's a valid point :)
<Mia> I still have difficulty to understand ruby notation of things :)
<apeiros> Mia: the symbol is about which events you care about
<apeiros> i.e. :message does not need to be changed.
<shevy> Mia but this is simple, on() is a method. first argument is a symbol, obviously the second can be a regex. and the {} is always available to all methods in ruby as a block Mia
<apeiros> and "hello" (probably) exists to filter down *which* events of type :message you care about
gaussblurinc1 has quit [Quit: Leaving.]
Takle has joined #ruby
freezey has quit [Remote host closed the connection]
<Mia> hm
<Mia> so I need to somehow make the string "comparable"
<Mia> (I should learn what regex is btw, googling)
<apeiros> yes, which is why you should use a regex instead of a string. a regex exists for the purpose of matching strings
<apeiros> and the i in /hello/i says "perform matching case insensitive"
<eam> a regex is a mini-language for representing patterns (instead of an exact string match)
abdulsattar has quit [Ping timeout: 272 seconds]
sdwrage has joined #ruby
<apeiros> >> "HEllo" =~ /hello/i
<eval-in_> apeiros => 0 (https://eval.in/201597)
<apeiros> (remember, 0 is true-ish in ruby)
<Mia> so, how do you know that regex is possible?
<Mia> is regex possible for every string?
<shevy> Mia you have to learn what a regex is only once; it will work in most good programming languages. I learn it from a perl book, but you can also test online at: rubular.com
<apeiros> Mia: by consulting the documentation of `on`
<shevy> Mia yes, go to rubular.com and test strings
<Mia> Yes I'll definitely learn it shevy
<apeiros> it depends on the method you pass it whether it can work with a regex
Xeago__ has quit [Remote host closed the connection]
b00stfr3ak has quit [Ping timeout: 260 seconds]
clocKwize has quit [Disconnected by services]
<shevy> Mia if your regex does not apply to your given string, you will receive nil
<eam> shevy: another example of ruby programmers referring to perl documentation ;-)
sinkensa_ has quit [Remote host closed the connection]
abdulsattar has joined #ruby
<shevy> it's true
<shevy> I bought a perl book
justinmburrous has quit [Remote host closed the connection]
clocKwize_ has joined #ruby
<shevy> in the ancient days
echevemaster has joined #ruby
chthon has quit [Ping timeout: 260 seconds]
<eam> why do I suspect that to you "ancient days" is still post-y2k
<shevy> yeah very early 200x something, I think 2002 or 2003
<eam> sigh
* eam shakes his cane
<apeiros> shevy: get off of eam's lawn!
<shevy> hey I pretend I was not yet born in the 1990es
<rpag> is perl like the reference for regex?
<eam> yes ruby RE is basically a copy of perl regex
<Mia> shevy, apeiros it worked yes
<apeiros> rpag: there's a reason it's called pcre - perl compatible regular expression ;-)
<Mia> however, what if it didn't
<Mia> how would I let ruby read the string ignoring case?
<eam> rpag: there are many regex flavors though. Posix specifies basic RE and extended RE, which are what grep and grep -E use
rippa has joined #ruby
<eam> PCRE is by far the most feature rich
<Mia> like, I'm searching for something similar to "string".ignorecase
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
startupality has joined #ruby
<eam> Mia: typically you would .downcase everything and work in a uniform case
<shevy> Mia can't you use .include?
<twohlix> Mia: dowcase and compare.
<twohlix> damn, beat me to it
justinmburrous has joined #ruby
<shevy> and you can also work on each character
roolo has quit [Quit: AAAAaaaaAAAAAAA]
<shevy> ruby is syntactic sugar over C
<Mia> eam, twohlix becasue I can't downcase a symbol
<eam> Mia: right, so in this case the interface may prevent it
<shevy> Mia ok but you can call .to_s on it
<apeiros> Mia: you can
<apeiros> >> :SYMBOL.downcase
<eval-in_> apeiros => :symbol (https://eval.in/201598)
<Mia> on :message, "hello" do |m|
<Mia> m.reply "Hello, #{m.user.nick}"
<Mia> end
oso|away is now known as oso96_2000
<shevy> >> :foOo.downcase
<eval-in_> shevy => :fooo (https://eval.in/201599)
<Mia> this is the codebit
sarkis_ has joined #ruby
<shevy> oh indeed
b00stfr3ak has joined #ruby
<apeiros> doesn't matter for the case at hand, though
<shevy> Mia your statement that you can not downcase a Symbol is incorrect
<eam> Mia: what you would have to do is capture all messages and do your branching elsewhere
sarkis has quit [Ping timeout: 272 seconds]
<Mia> shevy, yes, I mean, what's "carried" through the symbol
<shevy> symbols are boring
<Mia> check my example above, I tried downcasing it the result didn't change
<eam> on :message, "" { |m| if m.downcase == "hello" ....
jthomp_ has quit [Read error: Connection reset by peer]
<ALVAN> shevy: ok
jthomp has joined #ruby
<eam> Mia: sometimes certain operations aren't well fitted to the supplied interface
<Mia> eam, that's nice!
jcdesimp has quit [Remote host closed the connection]
<shevy> that's disgusting
thagomizer has joined #ruby
<eam> shevy: engineering vs art
<shevy> I don't even think eam's code works
<Mia> oh yeah
<eam> it probably doesn't
<Mia> I just realized it won't wor
<eam> but surely there is a way to capture all messages regardless of content, so you would use that
<Mia> no, it definitely doens't just checked
<shevy> so you must make it even uglier by adding ()
<shevy> it's the perl in his DNA
<rpag> on(:message, /.+/) {} and it'd likely work
<eam> and then you're free to implement your own matching of arbitrary complexity
alem0lars has quit [Ping timeout: 260 seconds]
imjoik has quit [Read error: Connection reset by peer]
<Mia> eam, I don'tk now what's going in the gem, I just use it :) well.. try to
<eam> hopefully /./ would work
<ALVAN> shevy: full error at https://dpaste.de/Dwgo ; recipes/default.rb - https://dpaste.de/Dwgo ; ./libraries/node_provider.rb - https://dpaste.de/ZnFf
<shevy> well Mia does not yet know regexes
<shevy> Mia do you understand what means /.+/
<Mia> rpag, regex worked, I'm just trying to find an alternative solution
<shevy> ALVAN a single pastie would be so much easier
<shevy> undefined method `database_path' for Chef::Resource::CouchbaseNode
<Mia> I can learn, it's ok; regex solution is already in the pocket :)
<shevy> ALVAN you called a method on an object that does not have this method
<Mia> "what if we want to do other way"
<ALVAN> shevy: is defined in ./libraries/node_provider.rb
LiohAu has quit [Quit: LiohAu]
jespada has quit [Quit: Leaving]
<rpag> i don't think there is a way w/o a regex, or just binding for every variation of "hello"
<shevy> then you'd have to load that file first
<Mia> rpag, hm
<shevy> I don't think you properly load up your code, otherwise .node_database would exist
<shevy> I mean .node_database_path
<shevy> Mia go use regex and be done!
<Mia> shevy, looks so yeah
Xeago has joined #ruby
<shevy> I'm gonna train Mia
<ALVAN> shevy: https://dpaste.de/21fZ this is for ./resources/node.rb
* Mia accepts
<shevy> Mia, you have been given this string: x = 'Hello World Mia!'
Wolland has joined #ruby
<Mia> :)
<ALVAN> normally it should be kick up automatcially by chef if i ha ve resources defined
<shevy> Mia come up with a regex that will return only the string "World"
<ALVAN> s/kick/pick/
<Mia> shevy, give me a sec
shredding has quit [Quit: shredding]
<shevy> yeah, it is simple. first you must start with the regex tokens, // - inside comes what you want to match
<eam> >> 'Hello World Mia!'.split[1]
<eval-in_> eam => "World" (https://eval.in/201600)
<shevy> eam you will get a more complicated example with positive look behind your ass
shredding has joined #ruby
jcdesimp has joined #ruby
Xeago_ has joined #ruby
<eam> >> 'Hello World Mia!'[6,5]
<eval-in_> eam => "World" (https://eval.in/201601)
<Mia> shevy, didn't you say regex
<shevy> Mia YES
<Mia> ok eam you lost
* Mia kicks eam out
alem0lars has joined #ruby
<shevy> well Mia did you come up with a regex yet
<rpag> i think you can solve any computer problem with enough regex
<Mia> working on it
<shevy> I heard that sentence with XML rpag
<Mia> like how is it possible to omit the first and the last
niklasb has joined #ruby
St_Marx has quit [Ping timeout: 264 seconds]
<shevy> Mia you simply define on what tokens to capture in your regex
<shevy> Mia what do we want to capture?
iliketurtles has joined #ruby
<eam> >> 'Hello World Mia!' =~ / (.*) /; $1
<eval-in_> eam => "World" (https://eval.in/201602)
<shevy> wasn't eam kicked out already...
<shevy> don't look at his example Mia
St_Marx has joined #ruby
<shevy> :(
bigkevmcd has quit [Quit: Outta here...]
Wolland has quit [Ping timeout: 244 seconds]
<shevy> Mia ok well, why did eam use the () inside the / / ?
<Mia> I have no effing idea
<eam> don't look at my example! but wait, so this is interesting
nettoweb has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
<Mia> because it's jibberish?
<shevy> Mia you can "memorize" what you capture that way
nettoweb has quit [Max SendQ exceeded]
<shevy> he tapped into that by using $1 which is a perlism
ghostmoth has quit [Quit: ghostmoth]
<eam> Mia: () is used to both group and capture a portion of the string
<shevy> if he would use more () then he could use $2 $3 $4 etc...
nettoweb has joined #ruby
<Mia> hm
<eam> a better way to write that is
<eam> >> 'Hello World Mia!'.match(/ (.*) /)[1]
<eval-in_> eam => "World" (https://eval.in/201603)
<shevy> >> 'Hello World Mia!'[/ (.+) /].strip
<eval-in_> shevy => "World" (https://eval.in/201604)
<Mia> hm
hilake has quit [Ping timeout: 246 seconds]
<shevy> Mia you can use [] on strings, and they also accept //
<eam> or that, I keep forgetting [] can take regex
<shevy> but the =~ part is the traditional way to use regexes
awc737 has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
<Mia> .match and .strip
<Mia> they're part of regex?
<shevy> yes perl has trained your brain eam
<shevy> well .match is a method Mia
<shevy> and .strip too, I only used strip because I did not like the " World " result
<Mia> oh so there is no "regex only" solution
<shevy> >> 'Hello World Mia!'[/ (.+) /]
<eval-in_> shevy => " World " (https://eval.in/201605)
<eam> =~ is way easier to read imo
<eam> Mia: a regex is just data. So "foo" == "bar" you have the data "foo" and "bar
<shevy> Mia you can do pretty everything with a regex
<eam> and the method ==
<shevy> Mia you just have to use the right regex for the job
<eam> the same thing with "foo" and /bar/ -- two pieces of data and a method to use them together
<Mia> This is really a new world
<benzrf> >> "foo"['o
<eval-in_> benzrf => /tmp/execpad-3f8836780e0e/source-3f8836780e0e:2: unterminated string meets end of file ... (https://eval.in/201606)
<benzrf> >> "foo"['o']
<eval-in_> benzrf => "o" (https://eval.in/201607)
<shevy> Mia lately I wrote a complicated regex ... in a case menu ... -> when /(\d+\.?\d*)\s*-\s*(\d+\.?\d*)/
<eam> which o was it :(
<shevy> in the comment next to that line I wrote
<shevy> # Match input like: "5.5 -678.3"
shredding has quit [Quit: shredding]
<shevy> I am still not sure if it does :)
<Mia> >> /(\d+\.?\d*)\s*-\s*(\d+\.?\d*)/
<eval-in_> Mia => /(\d+\.?\d*)\s*-\s*(\d+\.?\d*)/ (https://eval.in/201608)
<shevy> Mia you'd have to match input against it
<shevy> >> "5.5 -678.3" =~ /(\d+\.?\d*)\s*-\s*(\d+\.?\d*)/
<eval-in_> shevy => 0 (https://eval.in/201609)
<shevy> Mia this is why eam likes =~
<Mia> what the
mferrier has joined #ruby
<shevy> I don't even know what is =~
<shevy> is that a method?
<benzrf> yez
<shevy> it looks like a strange assignment
<eam> >> 'Hello World Mia!'[Regexp.new(?(*2**16+?)*2**16)]
<shevy> hehe
<shevy> eam is breaking the bot again
<Mia> :D
GriffinHeart has joined #ruby
shredding has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
fabrice31 has joined #ruby
icebourg has quit [Read error: Connection reset by peer]
shredding has quit [Client Quit]
icebourg has joined #ruby
smcstewart has joined #ruby
jherbst has joined #ruby
fsapo has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
fgo has quit []
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deric_skibotn has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
Synthead has joined #ruby
<shevy> ok style question:
<shevy> Who of you breaks the 80 char limit by line for comment sections?
<shevy> *per line
<eam> what 80 char limit?
michaeldeol has joined #ruby
maletor has joined #ruby
<shevy> perl oneliners don't count
GriffinHeart has quit [Ping timeout: 245 seconds]
<shevy> I don't know where else to put some comments
ndrei has joined #ruby
<shevy> above the method there already is enough docu
Mon_Ouie has joined #ruby
nerium has quit [Quit: nerium]
fabrice31 has quit [Ping timeout: 245 seconds]
yeboot has joined #ruby
<shevy> here is that line ... 124 chars
<shevy> " file_mode_to_be_used = FILE_MODE_TO_BE_USED # The file mode to be used. Can also be a Symbol such as :overwrite"
AtumT has quit [Ping timeout: 260 seconds]
klmlfl has joined #ruby
<shevy> oh well
Advocation has joined #ruby
<shevy> comments are like dead weight
<shevy> where is Phrogz
shredding has joined #ruby
jasooon has joined #ruby
Mso150 has joined #ruby
wjimenez5271 has quit []
mattmcclure has joined #ruby
wjimenez5271 has joined #ruby
comma8 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<eam> >> x = 'Hello World Mia!'; puts File.read(__FILE__).split(39.chr)[1][5,6]
<eval-in_> eam => World ... (https://eval.in/201623)
boombadaroomba has joined #ruby
<eam> >> x = 'Hello World Mia!'; File.read(__FILE__).reverse[/dlroW/].reverse
<eval-in_> eam => "World" (https://eval.in/201627)
justinmburrous has quit [Remote host closed the connection]
Stranger has joined #ruby
Stranger is now known as Guest98240
mikepack has quit [Read error: Connection reset by peer]
Guest98240 has quit [Client Quit]
JohnBat26 has joined #ruby
jasooon has quit [Ping timeout: 250 seconds]
skammer1 has quit [Ping timeout: 272 seconds]
<Mia> how can I create a string with quotes
mikepack has joined #ruby
<Mia> like the value should be "something"
<eam> >> ?"?"?"?"
<eval-in_> eam => /tmp/execpad-0eddf488f733/source-0eddf488f733:5: syntax error, unexpected tGVAR, expecting ':' ... (https://eval.in/201628)
<eam> oh right those don't auto-concat
<rpag> '"something"'
<eam> >> %{"something"} # is what I prefer
<eval-in_> eam => "\"something\"" (https://eval.in/201629)
russt_ has joined #ruby
<Mia> >> ""something""
<eval-in_> Mia => /tmp/execpad-06f5f84705de/source-06f5f84705de:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end ... (https://eval.in/201630)
<Mia> >> '"something"'
<eval-in_> Mia => "\"something\"" (https://eval.in/201631)
<yeboot> >> %q{"something"}
<eval-in_> yeboot => "\"something\"" (https://eval.in/201632)
<Mia> What's going on with all those slashes
<yeboot> Mia they're escaped quotes
startupality has quit [Quit: startupality]
<eam> Mia: it's outputing it in escaped double quoted form
tomeara has joined #ruby
boombadaroomba has quit [Ping timeout: 244 seconds]
<yeboot> keeps the quotes from seeping out and killing your syntax
<eam> >> """""""" """""""" """""""" """"""""
<eval-in_> eam => "" (https://eval.in/201633)
AtumT has joined #ruby
<Mia> Ok, the second thing I want to ask is: right now I have a twitter stream (tanks to a gem) on a keyword
skolman__ has quit [Remote host closed the connection]
<Mia> How can I put it to a web page realtime?
ciampix has joined #ruby
<Mia> I expected this to be an easy thing but the page never loads, and I now realized that it's meaningfull since the page is never "complete"
cocotton has joined #ruby
<Mia> so, what's the correct way to establish things like that
ghostmoth has joined #ruby
ldnunes has quit [Quit: Leaving]
sevvie has quit [Remote host closed the connection]
<eam> Mia: that's a pretty complicated question, you'd be best suited to asking in a forum dedicated to web frameworks and mechanics (and you'll be using javascript)
ldnunes has joined #ruby
smcstewart has quit [Quit: Linkinus - http://linkinus.com]
<Mia> hm
ciampix has quit [Client Quit]
<shevy> ewww web stuff
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<eam> I don't get why ?a ?a doesn't concat like "a" "a"
<Mia> I epected this to be an esay thing honestly, when you can do the same in 5 minutes using nodejs - I'm not comparing, don't get me wrong but "this should be simple" is how I felt
<shevy> comes from you having to pick twitter streaming to web pages!!!
<shevy> nodejs can use javascript right
<Mia> shevy, right
<shevy> javascript is a part of browsers
St_Marx has quit [Remote host closed the connection]
<eam> Mia: there likely are simple tools in for example rails -- it's just not a question about the ruby language
<shevy> this all does not feel to be on equal levels like ruby itself
<eam> it's a question about the frameworks on top of them
<shevy> I mean javascript put a lot of stuff into asynchronisation right? so you'd have to use some async stuff in ruby too Mia
<eam> and in all cases, javascript in the browser will be handling the dynamic updates
<Mia> shevy, eam ok got it
cherwin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> they recommend Fibers and EventMachine
mikepack has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
<shevy> but walk in baby steps Mia
<shevy> the world will still be there tomorrow morning
mikepack has joined #ruby
<Mia> this meant to be a baby step :(
<shevy> this is a giant leap for mankind!
ahhMichael has quit [Ping timeout: 256 seconds]
<Mia> :)
cndiv has joined #ruby
<shevy> you are twitterbombing
St_Marx has joined #ruby
troyready has joined #ruby
root3d has joined #ruby
St_Marx has quit [Remote host closed the connection]
<shevy> usually you load a webpage and be done with it right?
<shevy> you could also check into webpage IRC clients too
<eam> I publish more ruby on twitter than on github
<shevy> yeah, you are cursing a lot
iamjarvo has joined #ruby
<Mia> :)
freezey has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mia> well I think I need some sort of socket conenction
<Mia> that's handled in nodejs with sockets.io
cocotton has quit [Remote host closed the connection]
zlude has joined #ruby
<Mia> socket.io I mean
froggy_ has joined #ruby
<shevy> ruby has sockets too
<zlude> Hello guys! I have a route that / and /index go to same controller#view, but i have to lines with get '/' and get '/index'. Can i use just one line to do that? because / and /index go to the same place.
Hobogrammer_ has quit [Ping timeout: 260 seconds]
mikepack has quit [Read error: Connection reset by peer]
<shevy> BasicSocket, IPSocket, TCPSocket, SOCKSSocket, UDPSocket, Socket, UNIXSocket
bmurt has quit []
coderdad has quit [Remote host closed the connection]
<eam> socket.io is websockets, not real sockets
mikepack has joined #ruby
dangerousdave has joined #ruby
bwilson has joined #ruby
tylersmith has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
ciampix has joined #ruby
mikepack has quit [Client Quit]
rdark has quit [Quit: leaving]
<shevy> we need websockets in core ruby
froggy__ has quit [Ping timeout: 258 seconds]
<eam> the story there is pretty rough
sdwrage has quit [Ping timeout: 244 seconds]
robustus|Off is now known as robustus
ciampix has left #ruby [#ruby]
<eam> I was just helping someone debug a descriptor leak in their Celluloid/Reel app
comma8 has quit [Read error: Connection reset by peer]
ahhMichael has joined #ruby
klaut has quit [Remote host closed the connection]
skolman_ has joined #ruby
IrishGringo has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
C0deMaver1ck_ is now known as C0deMaver1ck
awc737 has quit [Ping timeout: 272 seconds]
ahhMichael has quit [Max SendQ exceeded]
wallerdev has joined #ruby
freezey has quit [Remote host closed the connection]
tommylommykins has quit [Remote host closed the connection]
go|dfish has joined #ruby
<shevy> Mia today you learned regexes
aspires has quit []
<Mia> :)
<Mia> well I just heard about the concept
<Mia> I didn't learn it yet
<Mia> but I will
hilake has joined #ruby
hilake has quit [Changing host]
hilake has joined #ruby
ahhMichael has joined #ruby
Ankhers has quit [Remote host closed the connection]
ursooperduper has joined #ruby
Ankhers has joined #ruby
tommylommykins has joined #ruby
<eam> I have a fileno (not a File instance) and I want to close it
<eam> what's the right way? This doesn't seem to work: IO.for_fd(2) { |f| f.close }
ndrei has joined #ruby
ghr has joined #ruby
freezey has joined #ruby
<eam> aah, it doesn't take a block
<eam> IO.for_fd(2).close
<rpag> yups
icarus has quit [Ping timeout: 245 seconds]
cocotton has joined #ruby
tvw has joined #ruby
justinmburrous has joined #ruby
aspires has joined #ruby
agjacome has joined #ruby
v0n has quit [Read error: Connection reset by peer]
freezey has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
pagioss has quit [Ping timeout: 260 seconds]
TorpedoSkyline has joined #ruby
<shevy> that's sad
mrsolo has joined #ruby
cocotton has quit [Ping timeout: 244 seconds]
<eam> especially sad because of the issues around cleaning up descriptors in a gc system
<eam> always use a block or prepare for pain
robustus is now known as robustus|Off
michaeldeol has joined #ruby
jcdesimp has quit [Remote host closed the connection]
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
DrCode has quit [Remote host closed the connection]
sinkensabe has joined #ruby
postmodern has joined #ruby
soulcake has quit [Ping timeout: 260 seconds]
tylersmith has quit [Read error: Connection reset by peer]
TorpedoSkyline has quit [Quit: Textual IRC Client: www.textualapp.com]
MCDev has joined #ruby
tylersmith has joined #ruby
ffranz has quit [Ping timeout: 244 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
larissa has joined #ruby
DrCode has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thumpba has quit [Remote host closed the connection]
Wolland has joined #ruby
thumpba has joined #ruby
havenwood has joined #ruby
Xeago has joined #ruby
soulcake has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
qmfnp_lunch is now known as qmfnp
tylersmi_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
twohlix has quit [Ping timeout: 272 seconds]
Xeago_ has quit [Ping timeout: 260 seconds]
Wolland has quit [Ping timeout: 260 seconds]
thumpba has quit [Ping timeout: 272 seconds]
tylersmith has quit [Ping timeout: 260 seconds]
Avahey has joined #ruby
dnordstrom1 has joined #ruby
dnordstrom has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
endash has quit [Quit: endash]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kamilc__ has quit [Quit: Leaving...]
<eam> this is how I just fixed a socket leak issue:
<eam> %x{lsof -p $$ -i}.split(/\n/).select {|l| l =~ /CLOSE_WAIT/}.map {|l| l.split[3]}.select {|s| s =~ /^\d{2,}u/ }.map {|s| s[/\d+/].to_i}.each { |fileno| IO.for_fd(fileno).close }
rkalfane has joined #ruby
rkalfane has quit [Client Quit]
pagioss has joined #ruby
<wallerdev> looks good
<wallerdev> except teh random regex thats just a string
benzrf is now known as benzrf|offline
mwlang has quit [Quit: mwlang]
soulcake has quit [Ping timeout: 260 seconds]
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
Advocation has quit [Quit: Advocation]
lsmola has quit [Ping timeout: 272 seconds]
HelperW__ has quit [Quit: Computer has gone to sleep.]
GriffinHeart has quit [Ping timeout: 260 seconds]
HelperW__ has joined #ruby
luckyruby has joined #ruby
xenomorph is now known as {xenomorph}
larissa has quit [Ping timeout: 246 seconds]
yetanotherdave has joined #ruby
jcdesimp has joined #ruby
Pupeno has quit [Quit: Leaving...]
startupality has joined #ruby
sevvie has joined #ruby
c107 has joined #ruby
soulcake has joined #ruby
[1]MCDev has joined #ruby
agrinb has quit [Ping timeout: 272 seconds]
MCDev has quit [Ping timeout: 250 seconds]
[1]MCDev is now known as MCDev
shredding has quit [Quit: shredding]
_maes_ has joined #ruby
freezey has joined #ruby
HelperW__ has quit [Ping timeout: 260 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atmosx has joined #ruby
tylersmi_ has quit []
krisquigley has joined #ruby
Hien has quit [Quit: leaving]
justinmburrous has quit [Remote host closed the connection]
haroldwu has quit [Ping timeout: 260 seconds]
justinmburrous has joined #ruby
jasooon has joined #ruby
krisquigley has quit [Ping timeout: 245 seconds]
freezey has quit [Remote host closed the connection]
comma8 has joined #ruby
triple_b has joined #ruby
Hobogrammer has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
HelperW__ has joined #ruby
abdulsattar has quit [Ping timeout: 260 seconds]
nerium has joined #ruby
omosoj has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
jamto11 has quit []
shredding has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
soulcake has quit [Ping timeout: 260 seconds]
tomeara has quit [Quit: Computer has gone to sleep.]
kiki_lam1 is now known as kiki_lamb
entropy has joined #ruby
tomeara has joined #ruby
entropy is now known as Guest80377
<ericwood> anyone here going to Keep Ruby Weird later this month?
IrishGringo has quit [Ping timeout: 244 seconds]
Aaaal has quit [Quit: Aaaal]
soulcake has joined #ruby
lukevinc has joined #ruby
<ericwood> I guess it's just me :'(
chrishough has joined #ruby
<zlude> what is the best way to write these routes? https://gist.github.com/barrosfilipe/1100033d38b4addae4c5 | 4 blocks of 'get route' Can i change it to 2 blocks of 'get route'? because different routes go to same entry.
Guest80377 has quit [Client Quit]
<ericwood> zlude: #rubyonrails
tomeara has quit [Ping timeout: 258 seconds]
hatzopoulos has joined #ruby
rezzack has joined #ruby
[1]MCDev has joined #ruby
tomeara has joined #ruby
carraroj has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noop has quit [Ping timeout: 246 seconds]
noop has joined #ruby
robustus|Off is now known as robustus
MCDev has quit [Ping timeout: 250 seconds]
x1337807x has joined #ruby
[1]MCDev is now known as MCDev
jottr has quit [Ping timeout: 260 seconds]
hatzopoulos_ has joined #ruby
nb_bez___ has joined #ruby
hatzopoulos has quit [Quit: Leaving]
hatzopoulos_ has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
mikeg has quit [Remote host closed the connection]
nhhagen has quit [Remote host closed the connection]
hatzopoulos has joined #ruby
spinx^ has quit [Ping timeout: 245 seconds]
spinx^ has joined #ruby
bobishh has joined #ruby
HelperW__ has quit [Quit: Computer has gone to sleep.]
ghr has joined #ruby
HelperW__ has joined #ruby
robustus is now known as robustus|Off
Axy has joined #ruby
Axy has joined #ruby
startupality has quit [Quit: startupality]
yeboot has quit [Quit: leaving]
deric_skibotn has quit [Ping timeout: 244 seconds]
Axy is now known as Machinu
justinmburrous has quit [Remote host closed the connection]
ndrei has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
noop has quit [Ping timeout: 240 seconds]
HelperW__ has quit [Ping timeout: 244 seconds]
Tricon has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
jthomp_ has joined #ruby
shredding has joined #ruby
jthomp has quit [Read error: Connection reset by peer]
spider-mario has quit [Remote host closed the connection]
Machinu is now known as Axy
jamz has quit []
jamz has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
Axy has quit [Quit: Leaving]
spider-mario has joined #ruby
cocotton has joined #ruby
Tricon has joined #ruby
root3d has quit [Ping timeout: 245 seconds]
thumpba has joined #ruby
IrishGringo has joined #ruby
iliketurtles has joined #ruby
j_mcnally has joined #ruby
bluOxigen has quit [Remote host closed the connection]
bluOxigen has joined #ruby
Wolland has joined #ruby
GriffinHeart has joined #ruby
fabrice31 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larissa has joined #ruby
jottr has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
BTRE has quit [Ping timeout: 272 seconds]
jbueza has joined #ruby
icarus has joined #ruby
iliketurtles has quit [Client Quit]
bluOxigen has joined #ruby
justinmburrous has joined #ruby
ta has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Ping timeout: 244 seconds]
alem0lars has quit [Quit: Bye bye..]
iamjarvo has joined #ruby
startupality has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
pskosinski_ has joined #ruby
coderdad has joined #ruby
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
larissa has quit [Ping timeout: 245 seconds]
<rpag> zlude, ['/', '/index'].each { |r| get(r) { erb :index } }
maletor has joined #ruby
tylersmith has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zlude> rpag, thx! #sinatra channel helped me with it. Thanks anyway ! ;)
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
rubyonrailed has quit [Remote host closed the connection]
pskosinski has quit [Ping timeout: 264 seconds]
fenicks has joined #ruby
<shevy> ericwood dunno, I am doing boring stuff. right now I am rewriting about 15 different .rb files from a project completely, it is so boring... 4 done so far
manzo has joined #ruby
Mso150 has quit [Ping timeout: 260 seconds]
Mso150 has joined #ruby
Wolland has joined #ruby
ffranz has joined #ruby
jthomp has joined #ruby
LekeFly has joined #ruby
jherbst has quit [Quit: Textual IRC Client: www.textualapp.com]
LekeFly has quit [Client Quit]
startupality has quit [Quit: startupality]
nhhagen has joined #ruby
threesixes has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
deric_skibotn has joined #ruby
jthomp_ has quit [Read error: Connection reset by peer]
v0n has joined #ruby
pskosinski_ is now known as pskosinski
larissa has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
kobain has joined #ruby
bluOxigen has quit [Remote host closed the connection]
bluOxigen has joined #ruby
icarus has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
ptrrr has quit [Quit: ptrrr]
omosoj has quit [Quit: leaving]
nhhagen has quit [Ping timeout: 260 seconds]
HelperW__ has joined #ruby
jasooon has joined #ruby
Mso150_a has joined #ruby
pwh has quit []
Ankhers has quit [Ping timeout: 264 seconds]
Mso150 has quit [Ping timeout: 250 seconds]
obscured has quit [Quit: leaving]
tkuchiki has joined #ruby
arup_r has quit [Quit: Leaving.]
jamz has quit []
bluOxigen has quit [Ping timeout: 260 seconds]
HelperW__ has quit [Ping timeout: 260 seconds]
_maes_ has joined #ruby
rubyonrailed has joined #ruby
lukevinc has quit [Quit: ChatZilla 0.9.90.1 [Firefox 24.8.0/20000101000000]]
Takle has quit [Read error: Connection reset by peer]
jasooon has quit [Ping timeout: 245 seconds]
Mso150 has joined #ruby
Mso150_a has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
pwh has joined #ruby
tkuchiki has quit [Ping timeout: 260 seconds]
ina_garten is now known as mostlybadfly
bluOxigen has joined #ruby
yfeldblum has joined #ruby
freerobby has quit [Quit: Leaving.]
<shevy> MERRY X-MAS!
<rpag> you're a bit early X_X
freerobby has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
bluOxigen has quit [Ping timeout: 272 seconds]
HelperW__ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmburrous has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 240 seconds]
<shevy> I can't wait
HelperW__ has quit [Read error: No route to host]
coderdad_ has joined #ruby
HelperW__ has joined #ruby
coderdad has quit [Read error: Connection reset by peer]
endash has joined #ruby
skolman_ has quit [Remote host closed the connection]
Takle has joined #ruby
skolman has joined #ruby
justinmburrous has joined #ruby
n_blownapart has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
HelperW__ has quit [Ping timeout: 260 seconds]
lewix has quit [Remote host closed the connection]
bwilson has quit [Quit: bwilson]
skolman has quit [Ping timeout: 245 seconds]
cpruitt has quit [Quit: cpruitt]
treehug8_ has joined #ruby
HelperW__ has joined #ruby
Poky has quit [Remote host closed the connection]
tesaf has joined #ruby
skolman_ has joined #ruby
freerobby has quit [Quit: Leaving.]
treehug88 has quit [Ping timeout: 272 seconds]
ghr has joined #ruby
echevemaster has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 245 seconds]
anaeem1 has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
Xeago has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 245 seconds]
deric_skibotn has joined #ruby
agjacome has quit [Quit: leaving]
sdwrage has joined #ruby
GriffinHeart has joined #ruby
agjacome has joined #ruby
callenb__ has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
tvw has quit []
jeremy04 has joined #ruby
larissa has quit [Ping timeout: 260 seconds]
jcdesimp has quit [Remote host closed the connection]
tvw has joined #ruby
GriffinHeart has quit [Ping timeout: 250 seconds]
HelperW__ has quit [Quit: Computer has gone to sleep.]
jcdesimp has joined #ruby
kyb3r_ has joined #ruby
HelperW__ has joined #ruby
vt102 has joined #ruby
aspires has quit []
Azure has joined #ruby
jcdesimp has quit [Ping timeout: 240 seconds]
Advocation has joined #ruby
HelperW__ has quit [Ping timeout: 260 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kedare has quit [Remote host closed the connection]
larissa has joined #ruby
tomeara has quit [Quit: Computer has gone to sleep.]
krisquigley has joined #ruby
tomeara has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has joined #ruby
comma8 has quit [Ping timeout: 272 seconds]
lampd1 has joined #ruby
freerobby has joined #ruby
<rubie> hi all: can anyone point me in the right direction trying to write a Run-length encoding algorithm with ruby....i can't find anything online
chrishough has quit [Ping timeout: 258 seconds]
justinmburrous has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
hatzopoulos has quit [Read error: Connection reset by peer]
larissa has quit [Ping timeout: 260 seconds]
tomeara has quit [Ping timeout: 258 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
endash has quit [Quit: endash]
iliketurtles has joined #ruby
jcdesimp has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
wjimenez5271 has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
bluOxigen has joined #ruby
hiyosi has quit [Ping timeout: 244 seconds]
mikeg has joined #ruby
blueOxigen has joined #ruby
ahhMichael has quit [Ping timeout: 256 seconds]
<rubie> yes this
<rubie> its a beginner problem i have no idea where to start
fmcgeough has joined #ruby
ohcibi_ is now known as ohcibi
abdulsattar has joined #ruby
<apeiros> start with example input and output. the easiest possible case. e.g. "WWWWWWWWWW" and [12, "W"]
treehug88 has joined #ruby
ahhMichael has joined #ruby
<apeiros> and then think about how you get from the former to the latter
wjimenez5271 has quit [Ping timeout: 246 seconds]
<shevy> >> "WWWWWWWWWW".count 'W'
<eval-in_> shevy => 10 (https://eval.in/201643)
qmfnp has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> imagine I wrote 12 W's
Soda has quit [Remote host closed the connection]
<rubie> yes but then you would have to write 26 senarios
bluOxigen has quit [Ping timeout: 245 seconds]
<rubie> for each letter of the alphabet
<rubie> .count "a"
<rubie> .count "b"
<rubie> ..etc
treehug8_ has quit [Ping timeout: 245 seconds]
larissa has joined #ruby
<apeiros> rubie: no
<rubie> oh but you can use (a...z).map
<apeiros> still no
<apeiros> there's a better way
<apeiros> do you, as a human, go through a-z to figure out which letter is repeated 12 times?
axl_ has quit [Quit: axl_]
freerobby has quit [Quit: Leaving.]
<rubie> no
<apeiros> so what do you do?
<rubie> only look at the numbers in the string, or array
<apeiros> I don't think that's the first thing you do :)
<rubie> count how many letters there are
<apeiros> first thing you do is you look at the first character, and then count how many times *that character*, which you have seen, occurs
silkfox has quit [Ping timeout: 245 seconds]
justinmburrous has joined #ruby
<apeiros> and now you go and code precisely that as ruby code ;-)
jasooon has joined #ruby
dawkirst has joined #ruby
abdulsattar has quit [Ping timeout: 272 seconds]
michaeldeol has joined #ruby
lewix has joined #ruby
freerobby has joined #ruby
blackoperat has joined #ruby
blackoperat has quit [Client Quit]
benzrf|offline is now known as benzrf
yalue has quit [Quit: Leaving]
hackeron has quit [Ping timeout: 245 seconds]
<dfedde> ls
<dfedde> whoops wrong terminal
hackeron has joined #ruby
manzo has quit [Ping timeout: 272 seconds]
tomgavin has joined #ruby
jasooon has quit [Ping timeout: 258 seconds]
dc__ has quit [Remote host closed the connection]
robbanp has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<robbanp> Sending text over UDP, are there any size limits?
maniacal_ has joined #ruby
oso96_2000 is now known as oso|away
<atmosx> hello
<atmosx> The field size sets a theoretical limit of 65,535 bytes (8 byte header + 65,527 bytes of data) for a UDP datagram.
<atmosx> However it is possible to include IP options which can increase the size of the IP header to as much as 60 bytes.
<atmosx> IPv4 maximum reassembly buffer size is 576, IPv6 has it at 1500. Subtract header sizes from it.
Jinkins has joined #ruby
<atmosx> so there you go...
mikeg has quit [Ping timeout: 258 seconds]
<atmosx> refactoring is a huge pain but feels nice.
<robbanp> thanks
<atmosx> robbanp: np
aleatorik is now known as wolves_cs
<robbanp> trying to push data to graylog2 from sidekiq, but that is hard :/
HelperW__ has joined #ruby
larissa has quit [Ping timeout: 258 seconds]
kamilc__ has joined #ruby
alvaro_o has joined #ruby
nhhagen has joined #ruby
graydot has joined #ruby
nhhagen has quit [Client Quit]
HelperW__ has quit [Read error: Connection reset by peer]
HelperW__ has joined #ruby
chrishough has joined #ruby
kamilc__ has quit [Client Quit]
nonmadden has quit [Remote host closed the connection]
BTRE has joined #ruby
BTRE has quit [Remote host closed the connection]
chrishough has quit [Client Quit]
chrishough has joined #ruby
BTRE has joined #ruby
j2p2 has quit [Ping timeout: 272 seconds]
larissa has joined #ruby
HelperW__ has quit [Ping timeout: 250 seconds]
<shevy> hey atmosx
<atmosx> hey shevy!
<shevy> I am rewriting an old project. that is such a boring task
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
phutchins has joined #ruby
<atmosx> shevy: I'm re-writing a current one :-P (sort of)
dawkirst has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<atmosx> adding translation (i18n) and modifying models... I have to write a large chunk heh
<atmosx> but I stopped now, I think I'm gonna grab my friend Neal Stephenson and head over to bed... see what Jack Shaftoe is going to do with Leibniz!
freerobby has quit [Quit: Leaving.]
|\|370 has joined #ruby
manzo has joined #ruby
Xiti has quit [Quit: Leaving]
j2p2 has joined #ruby
freerobby has joined #ruby
iamjarvo has joined #ruby
ryanleesipes has quit [Quit: Leaving]
gsd has joined #ruby
ducklobster has joined #ruby
silkfox has joined #ruby
tomeara has joined #ruby
tomeara has quit [Remote host closed the connection]
dawkirst has joined #ruby
ghr has joined #ruby
tomeara has joined #ruby
aspires has joined #ruby
GriffinHeart has joined #ruby
slyslick has joined #ruby
nrsk has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
fabrice31 has joined #ruby
AmBienCeD has joined #ruby
justinmburrous has quit [Remote host closed the connection]
ta has joined #ruby
fnordperfect has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 260 seconds]
omosoj has joined #ruby
agjacome_ has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
wjimenez5271 has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 272 seconds]
larissa has quit [Ping timeout: 245 seconds]
mikeg has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skolman_ has quit [Remote host closed the connection]
marr has quit [Read error: Connection reset by peer]
skolman has joined #ruby
maniacal_ has quit [Ping timeout: 250 seconds]
Darryl has quit [Quit: Connection closed for inactivity]
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
fsapo has quit [Remote host closed the connection]
MCDev has quit [Ping timeout: 250 seconds]
jthomp_ has joined #ruby
jthomp has quit [Read error: Connection reset by peer]
skolman has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 272 seconds]
justinmburrous has joined #ruby
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
larissa has joined #ruby
bobishh has quit [Ping timeout: 260 seconds]
jimmyhoughjr has quit [Quit: Textual IRC Client: www.textualapp.com]
mferrier_ has joined #ruby
nettoweb has joined #ruby
paulfm has quit []
sailias has quit [Ping timeout: 245 seconds]
maniacal_ has joined #ruby
aclearman037 has quit []
fnordperfect has quit [Read error: Connection reset by peer]
nettoweb has quit [Max SendQ exceeded]
St_Marx has joined #ruby
nettoweb has joined #ruby
Advocation has quit [Quit: Advocation]
fnordperfect has joined #ruby
mikeg has quit [Ping timeout: 260 seconds]
lewix has quit [Remote host closed the connection]
hilake has quit [Ping timeout: 250 seconds]
mferrier has quit [Ping timeout: 260 seconds]
decoponio has quit [Quit: Leaving...]
larissa has quit [Ping timeout: 250 seconds]
kriskropd has quit [Ping timeout: 245 seconds]
mferrier_ has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
hiyosi has joined #ruby
mferrier has joined #ruby
dawkirst has quit [Remote host closed the connection]
zlude has quit [Quit: Leaving]
jthomp_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb_ has joined #ruby
j416 has quit [Quit: o/]
manzo has quit [Remote host closed the connection]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
{xenomorph} is now known as xenomorph
nettoweb has quit [Ping timeout: 272 seconds]
tesaf has quit [Quit: Lost terminal]
hiyosi has quit [Ping timeout: 272 seconds]
snorkra has left #ruby [#ruby]
freerobby has quit [Quit: Leaving.]
Mia has quit [Read error: Connection reset by peer]
hellangel7 has quit [Remote host closed the connection]
freerobby has joined #ruby
freerobby has quit [Client Quit]
bwilson has joined #ruby
pwh has quit []
jcdesimp has quit [Remote host closed the connection]
jeremy04 has quit [Ping timeout: 244 seconds]
jasooon has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
nerium has quit [Quit: nerium]
larissa has joined #ruby
larissa has quit [Client Quit]
tkuchiki has joined #ruby
mferrier_ has joined #ruby
mferrier_ has quit [Client Quit]
maniacal_ has quit [Remote host closed the connection]
jcdesimp has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
tomgavin has quit [Quit: ircII EPIC5-1.1.2 -- Are we there yet?]
mferrier has quit [Ping timeout: 246 seconds]
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikeg has joined #ruby
jcdesimp has quit [Remote host closed the connection]
HelperW__ has joined #ruby
tkuchiki has quit [Ping timeout: 272 seconds]
slester has quit [Quit: slester]
jerius has quit []
justinmburrous has quit [Remote host closed the connection]
HelperW___ has joined #ruby
HelperW__ has quit [Ping timeout: 260 seconds]
Mohd_ has quit [Ping timeout: 246 seconds]
ldnunes has quit [Quit: Leaving]
Xiti has joined #ruby
silkfox has quit [Ping timeout: 260 seconds]
cocotton has quit [Remote host closed the connection]
Soda has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
jimmyhoughjr has joined #ruby
treehug88 has quit []
HelperW___ has quit [Ping timeout: 260 seconds]
nerium has joined #ruby
Jinkins has quit [Quit: This computer has gone to sleep]
omosoj has quit [Ping timeout: 250 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
vext1 has joined #ruby
<vext1> So I was trying to gem install something and am a little confused by the error I get, hoping someone can shed some light (or shame me into running away):
<vext1> root@hostname ~# /usr/bin/gem install flapjack
<vext1> ERROR: Error installing flapjack:
<vext1> mime-types requires Ruby version >= 1.9.2.
<vext1> ruby 1.9.3p392 (2013-02-22) [x86_64-linux]
<vext1> root@ hostname ~# ruby -v
<vext1> root@ hostname ~# gem env
<vext1> RubyGems Environment:
<vext1> - RUBYGEMS VERSION: 1.8.23
<vext1> - RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-linux]
ahhMichael has quit [Ping timeout: 256 seconds]
msmith has quit [Remote host closed the connection]
j_mcnally has joined #ruby
robbanp has quit [Quit: Page closed]
Hobogrammer has quit [Read error: No route to host]
mengu has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 245 seconds]
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AFKGeek has joined #ruby
ghr has joined #ruby
AFKGeek has quit [Client Quit]
hamakn has joined #ruby
grzywacz has quit [Ping timeout: 258 seconds]
silkfox has joined #ruby
fnordperfect has quit [Read error: Connection reset by peer]
justinmburrous has joined #ruby
fnordperfect has joined #ruby
lewix has joined #ruby
elaptics is now known as elaptics`away
ghr has quit [Ping timeout: 272 seconds]
krisquigley has joined #ruby
agrinb has joined #ruby
klaut has joined #ruby
n_blownapart has quit []
stunder has quit [Remote host closed the connection]
thumpba has quit [Read error: Connection reset by peer]
<rubie> hi all: what does the ;h on the end mean? inject(Hash.new(0)){|h, c| h[c] += 1; h}
thumpba has joined #ruby
thumpba has quit [Read error: Connection reset by peer]
Jinkins has joined #ruby
thumpba has joined #ruby
<crome> it maks the block return h
<crome> makes*
postmodern has quit [Quit: Leaving]
krisquigley has quit [Ping timeout: 260 seconds]
agrinb has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
agrinb has joined #ruby
thumpba_ has joined #ruby
shredding has quit [Quit: shredding]
lmickh has quit [Remote host closed the connection]
echevemaster has joined #ruby
marr has joined #ruby
Mso150 has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 246 seconds]
nerium has quit [Quit: nerium]
<apeiros> it also means somebody doesn't know when not to use inject
agrinb has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
<apeiros> also seeing this come up so very often, I wonder whether ruby should ask Enumerable#count_by
agrinb has joined #ruby
IrishGringo has joined #ruby
tkuchiki has joined #ruby
<vext1> So I guess noone knows about my ruby version question
<vext1> :(
blackmesa has joined #ruby
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has joined #ruby
djstorm has quit [Ping timeout: 260 seconds]
<apeiros> vext1: sorry lad, too late for me
agrinb has quit [Ping timeout: 240 seconds]
Mirubiri has joined #ruby
Mirubiri has quit [Max SendQ exceeded]
mikeg has quit [Ping timeout: 260 seconds]
Mirubiri has joined #ruby
duncannz has joined #ruby
snath has quit [Ping timeout: 260 seconds]
phutchins has quit [Ping timeout: 245 seconds]
<rpag> vext1, /usr/bin/gem install flapjack is probably not the same as 'gem install', try which gem.
dblessing has quit [Ping timeout: 245 seconds]
<vext1> ugh, I knew it would be something dumb
<vext1> sorry for that
<rubie> apeiros: i see count, but i dont see count_by in the documentation
hiyosi has quit [Ping timeout: 258 seconds]
Takle has quit [Remote host closed the connection]
<apeiros> I know. that's why I said I was wondering whether ruby should provide it
agrinb has joined #ruby
jthomp has joined #ruby
j_mcnally has quit [Ping timeout: 272 seconds]
snath has joined #ruby
mary5030 has quit [Remote host closed the connection]
MCDev has joined #ruby
mikecmpbll has joined #ruby
jasooon has joined #ruby
justinmburrous has quit [Remote host closed the connection]
livingstn has quit []
j_mcnally has joined #ruby
troulouliou_dev has joined #ruby
agrinb has quit [Ping timeout: 272 seconds]
Mirubiri has quit []
<crome> >> [1, 1, 2, 3].each_with_object(Hash.new(0)) { |element, hash| hash[element] += 1 }
<eval-in_> crome => {1=>2, 2=>1, 3=>1} (https://eval.in/201714)
<crome> slighty better
Jinkins has quit [Quit: This computer has gone to sleep]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
jobewan has quit [Quit: Leaving]
<rubie> basically the same thing but you dont have to return the element
Nieralyte has joined #ruby
seamon has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
<crome> there is an important difference between the two versions, but yeah. syntax-wise almost the same
Jinkins has joined #ruby
HelperW___ has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
gsd has quit [Ping timeout: 260 seconds]
dopie has quit [Remote host closed the connection]
bobishh has joined #ruby
x1337807x has quit [Client Quit]
ffranz has quit [Quit: Leaving]
IrishGringo has quit [Ping timeout: 260 seconds]
<zenspider> apeiros: I've certainly wanted count_by from time to time
<apeiros> same
jottr has joined #ruby
<apeiros> sometimes count_by and sometimes count_occurrences (== count_by { |e| e })
niklasb has joined #ruby
<jhass> count_by(&:itself) :P
sinkensabe has joined #ruby
iceden has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
HelperW___ has quit [Ping timeout: 260 seconds]
tanath has quit [Remote host closed the connection]
<zenspider> count_by(&:identity)
Jinkins has quit [Quit: Leaving]
<apeiros> jhass: have to wait for 2.2 for that
HelperW___ has joined #ruby
entrenador has joined #ruby
<zenspider> just need to grep through my code for Hash.new 0 and I'll find ALL of them. :P
<jhass> I know, but if you get count_by in it'll be available
<apeiros> jhass: also I don't want to know how much is wasted by the additional block invocation + method call.
tvw has quit []
Avahey has quit [Quit: Connection closed for inactivity]
magic has quit [Killed (holmes.freenode.net (Nickname regained by services))]
emmesswhy has joined #ruby
jimmyhoughjr has quit [Quit: Textual IRC Client: www.textualapp.com]
tanath has joined #ruby
<Nieralyte> is there a better way of doing `Dir.foreach('C:\Windows') {|x| puts(x) if File.directory?("C:\\Windows\\#{x}")}` (to output all the foldes)?
GriffinHeart has joined #ruby
troyready has quit [Quit: Leaving]
aspires has quit []
mary5030 has joined #ruby
kriskropd has joined #ruby
bobishh has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
mary5030_ has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
HelperW___ has quit [Ping timeout: 260 seconds]
spastorino has joined #ruby
fabrice31 has joined #ruby
aspires has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
sevvie has quit [Ping timeout: 258 seconds]
<benzrf> whyy use windows :|
GriffinHeart has quit [Ping timeout: 246 seconds]
pygospa has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 240 seconds]
vedis has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
jimmyhoughjr has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
<rubie> apeiros: how would you get it in 2.2? do you submit something?
Aaaal has joined #ruby
<jimmyhoughjr> anyone know of a place offering courses in Ruby?
<rubie> jimmyhoughjr: what do you mean?
yfeldblum has quit [Ping timeout: 272 seconds]
<jimmyhoughjr> I'm getting some assistence to retrain in my career so I'd like to maybe find a commerical online course to have my benefactors pay for
sevvie has joined #ruby
<rubie> ahh i heard treehouse.com and codeschool.com are both good
<jimmyhoughjr> or if there is something free that is as structured I'd do it on my own time
<rubie> codeacademy is a good place to start
<jimmyhoughjr> ive done a little bit of ruby using frank-cucumber on ios
agrinb has joined #ruby
<rubie> a good book would be "The Pragmatic Programmers' Guide, Fourth Edition"
Deele has quit [Ping timeout: 260 seconds]
agrinb has quit [Remote host closed the connection]
<jimmyhoughjr> i hitnk i might have that one in my kindle library
<jimmyhoughjr> and I have an old print book i got form my old job
<jimmyhoughjr> ive also worked though some of the koans
agrinb has joined #ruby
<rubie> does that help? or were you looking for something different?
<Bish> can somebody help me and tell me what the gem fcgi actually does? i mean it does handle fcgi requests, but how? do i have to spawn a service? do i have to tell my webserver(nginx) to execute the script itself?
wd413 has joined #ruby
<jimmyhoughjr> I think that will help. I'm going to take some java courses probably later this month, so ill ask around there as well
ghr has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<rubie> here are some paid options as well
<jimmyhoughjr> not because I want to learn java, but because it seems in demand
jthomp has quit [Ping timeout: 258 seconds]
justinmburrous has joined #ruby
<jimmyhoughjr> Ideally I could find something from an online college with a professor and assignments and stuff. I'm kinda lazy so structure is good
<jimmyhoughjr> But I htink if I learned ruby on rails, I'd have a good skillset combined with my objc and cocoa
iliketurtles has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
sevvie_ has joined #ruby
sevvie has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
MCDev has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
Aaaal has quit [Quit: Aaaal]
ghr has quit [Ping timeout: 258 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
<jimmyhoughjr> hmm i wonder why exponentiation is ** instead of ^
<benzrf> jimmyhoughjr: ^ was taken by xor
<benzrf> thank C
Avahey has joined #ruby
<rubie> regex uses it too
<eam> regex uses both, it's fine it's a separate grammar
<jimmyhoughjr> I thought it ^ ws exponentiation in c as well
<eam> C doesn't have exponentiation
<eam> you have to call pow()
<jimmyhoughjr> lol good thing I never tried it then lol
<jimmyhoughjr> objc uses it to denote a block pointer
<eam> as does Pascal
sinkensabe has joined #ruby
<eam> that's fine, C uses * both for pointer deref as well as multiplication
<wd413> jimmyhoughjr have you looked at theodinproject.com/ruby-on-rails I am studying tonight. it might be too basic for you
danijoo has quit [Read error: Connection reset by peer]
<jimmyhoughjr> no i havent looked at it , but i will
<jimmyhoughjr> a while ago I had tried to learn rails, but could never get it installed on my mac
<jimmyhoughjr> I plan on running it on one of my raspberry pis
danijoo has joined #ruby
zeroNones has quit [Quit: Textual IRC Client: www.textualapp.com]
<waxjar> did anyone else receive an email from omniref?
<Bish> wow, can anyone help me please before i go nuts?
j2p2 has quit [Ping timeout: 240 seconds]
zeroNones has joined #ruby
zeroNones is now known as NSA
<rubie> hi all: is this a good way of looking at the sort method? ...a.sort { |x,y| y <=> x } .... i imagine that x is the first string, y is the last string, and we are telling ruby to sort the array with the last sting now as the first, and the first string as the last
<Bish> i have installed the fcgi ruby gem, i can start the sample, but how do i tell my webserver to f*** connect to it.
<jimmyhoughjr> is your server using another bundle or seomthing?
<Bish> jimmyhoughjr, bundle?!
<zenspider> rubie: "we are telling ruby to sort the array with the last string now as the first" ?
<jimmyhoughjr> i recall the gems we used at work were in bundler
<jimmyhoughjr> Bish does the gem tell you what port it is running on?
NSA is now known as tictactoe
<rubie> sort the array in reverse
<zenspider> You're reversing x & y args such that they're comparing with `y <=> x`... which just means you're sorting descending
<Bish> it's not running on any port, that is what confuses me
<jimmyhoughjr> you sure? i forget the command to show all open ports
<Bish> yes i am sure.
<jimmyhoughjr> idk much about ruby, and nothing about that gem
<zenspider> Bish: fcgi? any reason why?
<Bish> zenspider, alternatives for running rubyscripts in nginx?
<jimmyhoughjr> sounds like a problem if its not listening on any ports
<Bish> jimmyhoughjr, you're not helping.
<Bish> im going nuts because i am not able to google it.
tictactoe is now known as monkeypatch
<zenspider> I haven't done anything with fcgi is AGES... but the gist was that you configured it similar to regular cgi and it took care of the persistent process / communication.
<Bish> can i connect a program with a unix socket? like when i cannot to it, the program answers/listened?
wd413 has left #ruby ["Textual IRC Client: www.textualapp.com"]
<Bish> s/cannot/connect
<Bish> s/listened/listens
<zenspider> Bish: sure. I do that in minitest-server via drb
fnordperfect has quit [Ping timeout: 260 seconds]
tectonic has joined #ruby
<Bish> how do i do that?
<zenspider> do you mind using drb?
<zenspider> or are you rolling your own?
<jimmyhoughjr> a quick google leads me to think you would need to configure your server to use it
<zenspider> Bish: gem unpack minitest-server
<Bish> i don't know what drb is
<zenspider> drb is a simple distributed ruby system
<zenspider> object-level RPC
<Bish> jimmyhoughjr, and how do i do that, if it doesn't listen to anything but stdin?
hamsterslayer has joined #ruby
<zenspider> look at minitest-server-1.0.0/lib/minitest/server.rb
bwilson has quit [Quit: bwilson]
hamsterslayer has quit [Client Quit]
<jimmyhoughjr> im not sure, you would need to look at ur server docs. I saw articles for using it with Apache
<Bish> so you just described my problem with different words.
<zenspider> yes, he seems to be eager to help, but has nothing to offer. :P
hiyosi has joined #ruby
monkeypatch has quit [Quit: Textual IRC Client: www.textualapp.com]
zeroNones has joined #ruby
zeroNones has quit [Client Quit]
<zenspider> Bish: so. back to drb (dunno if you still want that or not)
RyanV has joined #ruby
<zenspider> self.path declares the unix socket path with the drbunix: prefix
<zenspider> self.run tells DRb to start the server
silkfox has quit [Ping timeout: 250 seconds]
<zenspider> that's called from the client (minitest-bisect or minitest-autotest) like: Minitest::Server.run self
andrewlio has quit [Quit: Leaving.]
<Bish> yes i saw links like that, but my app does not listen to anything, and i have no clue, if i force the fcgi stuff on a socket
<Bish> if it would work
<Bish> this is really driving me nuts
<havenwood> Freya's day! \o/
<zenspider> well... first you need to chill the fuck out.
<havenwood> Bish: What are ya trying to do?
<zenspider> Bish: did you look at the url I pasted above?
<Bish> i just want to execute a ruby script as CGI
agrinb has quit [Remote host closed the connection]
<Bish> zenspider, i just answered to it, i don't have a socket i can tell nginx to go to
<zenspider> it shows a ruby specific config
<zenspider> Bish: then you don't really have an app, do you?
b00stfr3ak has quit [Ping timeout: 260 seconds]
agrinb has joined #ruby
<Bish> no, i have a ruby script. which does SHIT , and i want it to do SHIT on nginx
govg has quit [Ping timeout: 250 seconds]
<zenspider> like, a plain command line script?
<zenspider> or something specifically written for fcgi?
<Bish> well, yes it is, but i want to make it answer in html.
<shevy> Bish well on lighttpd it is trivial
hiyosi has quit [Ping timeout: 260 seconds]
<Bish> or json or whatever
<Bish> im used to nginx...
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> yeah, that works if you can read russian
<shevy> in lightppd it is basically only two lines: (1) server.modules += ( "mod_cgi" )
<shevy> (2) cgi.assign = ( ".rb" => "/System/Executables/ruby" )
<shevy> replace with your path to ruby
<zenspider> it's pretty trivial on nginx too, as I showed above
mayhew has joined #ruby
govg has joined #ruby
<zenspider> I don't see how quips about russian help anyone
<zenspider> the doco is in english
<Bish> it would be trivial, if i would have a simply way, to let my ruby script answer in fcgi
nfk has quit [Quit: yawn]
seamon has quit [Quit: Zzzzzzz]
<Bish> which, i guess, the fcgi gem is for, which seems to be impossible to google, how it works, unless its rails
<Bish> which i do not want
<zenspider> Bish: took me about 0 seconds to find https://github.com/alphallc/ruby-fcgi-ng
<zenspider> which documents the API and gives an example right there
thumpba has joined #ruby
agrinb has quit [Ping timeout: 244 seconds]
<Bish> yeah and it's the fukin script i am running.
<Bish> which does nothing, but listen on stdin
justinmburrous has quit [Remote host closed the connection]
<zenspider> again, I said chill the fuck out
<Bish> i just told you i am using the "fcgi" gem
<Bish> what do you think you just linked to me
<Bish> the fcgi gem.
graydot has quit [Quit: graydot]
mary5030_ has quit [Remote host closed the connection]
<zenspider> ok. we're done you prick. have fun.
oleo is now known as Guest56953
oleo__ has joined #ruby
<Bish> zenspider, yeah i am sad now since you 2 have been so helpful
jasooon has joined #ruby
<Bish> telling me stuff i already knew and told you
sinkensabe has quit [Remote host closed the connection]
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<zenspider> Funny. I thought we were working through your problem. Given that I have fcgi experience and you don't... One might figure you'd want to not be such an ass.
<zenspider> enjoy my /ignore
<havenwood> Rack.
MCDev has joined #ruby
<zenspider> havenwood: then you have two problems :P
vext1 has left #ruby [#ruby]
<zenspider> three if you count regexps :D
thumpba_ has quit [Ping timeout: 250 seconds]
<havenwood> and that's four problems because of the off by one error
justinmb_ has joined #ruby
<Bish> zenspider, yeah i never used fcgi before.
<Bish> i told you a few lines above, that i have, i know exactly how it works, but there does not seem to be an easy way to use it with ruby
Guest56953 has quit [Ping timeout: 272 seconds]
<shevy> Bish and plain .cgi already works?
<Bish> that is something i never used
jhass is now known as jhass|off
<asklov> hello, I'm trying to create a real foreign key using activerecord. I have put the :foreign_key and belongs_to, but when I see how it was created in the database, it is just an int column, not a real foreign key. Is it possible to do such thing ? I'm not using rails
<Bish> last time i tried, i remember it being as frustrating as this.
Soda has quit [Remote host closed the connection]
jasooon has quit [Ping timeout: 272 seconds]
<shevy> plain .cgi?
<shevy> it works perfectly well here
<zenspider> havenwood: hah. touche
<Bish> which webserver?
<shevy> Bish lighttpd and httpd
emmesswhy has joined #ruby
HelperW___ has joined #ruby
<eam> you mean apache
<shevy> but the binary name is httpd! :(
<eam> like the sugar hill gang song
<shevy> So after school I take a dip in the pool,
<shevy> Which is really on the wall,
<shevy> I got a colour TV, so I can see
<shevy> The Knicks play basketball.
<shevy> \o/
GriffinHeart has joined #ruby
<Bish> https://github.com/alphallc/ruby-fcgi-ng/blob/master/lib/fcgi.rb <= could you tell me how this should be working?
<Bish> i mean.. it has sockets, it seems to handle fastcgi requests, why wouldn't you let me decide what socket to use
HelperW___ has quit [Ping timeout: 245 seconds]
<Bish> it makes no sense.. why would u create a socket and only open stdin/stdout, do i have to pipe it? i don't know :(
<shevy> eh it has examples
bobishh has joined #ruby
<shevy> but if you can't even get simple .cgi scripts to run, you will fail with fcgi
HelperW___ has joined #ruby
seamon has joined #ruby
<Bish> i cannot fail with it, because i already succeeded, it's not hard to understand
rubyonrailed has quit [Remote host closed the connection]
IrishGringo has joined #ruby
<shevy> so it works
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<Bish> that sample you link again and again it does not have a SOCKET
GriffinHeart has quit [Ping timeout: 260 seconds]
<shevy> I don't see your cgi script either
<Bish> it does nothing but listen on stdin and write stuff to stderr/out
<shevy> why do you listen to stdin?
<Bish> sigh, i don't.. the script you just linked does it.
<Bish> and it is supposed to be the script which makes fcgi possible, then how does it do it
<shevy> and that script works?
mrsolo has quit [Quit: Leaving]
<Bish> do you even read what i am writing?
j_mcnally has quit [Ping timeout: 240 seconds]
<shevy> sure
<benzrf> >using cgi
<Bish> then tell me, what i wrote 4 texts before this one
<shevy> it works for you
<Bish> so counting is a problem, too.
<shevy> yeah you have many problems
<eam> super unfortunate
<Bish> yeah it has to be me.
bobishh has quit [Ping timeout: 272 seconds]
skolman_ has joined #ruby
<Bish> i told you, the script you linked, does nothing but listen on stdin/stdout, all fastcgi samples of webserver, want a unix / tcp socket
HelperW___ has quit [Ping timeout: 260 seconds]
<eam> Bish: I think your first problem is probably best addressed by this: http://www.catb.org/esr/faqs/smart-questions.html
<eam> fix that first, then focus on cgi/fcgi
<Bish> so edgy i cut myself
<shevy> see, I don't even believe you when you claim that you got it to work
<eam> folks here are happy to help, but not so happy to tolerate your bad attitude
<shevy> how did you install fcgi for instance?
<Bish> shevy, i got it to work with php, which was super easy, which means i used fastcgi
jack_rabbit has joined #ruby
<Bish> which is all i was replying too, and it's simple as fuck, the webserver tells $fcgiservice "go run that script and answer with shitresults"
<shevy> ok so you did not install http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz correct?
<Bish> $fcgiservice is like "ohkay, here you go"
troulouliou_dev has quit [Ping timeout: 245 seconds]
<Bish> that's all, how is that supposed to be hard at all, i could write it by myself, but don't want to, since i was thinking ruby has to have something for it
<shevy> lol
krisquigley has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<eam> Bish: when writing it yourself you will probably develop the skills necessary to debug your current problems
wjimenez5271 has quit [Remote host closed the connection]
<eam> it's not a bad idea and I agree, it's pretty simple
<Bish> eam ack.
<Bish> i think, if i modify that gem, that the fukin socket listens on tcp:8000
<Bish> but i would be even more mad than before, because using sockets only to let it listen on stdin, would be so stupid.
<Bish> let me atleast specify what it listens on
<Bish> sorry that i was annoying. im done now.
<eam> no problem, computers can be pretty frustrating
klaut has quit [Remote host closed the connection]
Tricon has quit [Read error: Connection reset by peer]
coderdad_ has quit [Remote host closed the connection]
<Bish> i have this cool ruby script which is beautiful, and i wanted to make a webservice out of it, and thought to myself "wow that would be cool, if i could simply let it putout json on http"
GinoMan has joined #ruby
Tricon has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
ndrei has quit [Ping timeout: 272 seconds]
<Bish> "alright there is a gem for fastcgi, which is what nginx uses, which i already use, because it is least frustrating"
<Bish> so i thought.
b00stfr3ak has joined #ruby
ghr has joined #ruby
klmlfl has quit [Ping timeout: 244 seconds]
<benzrf> Bish: why are you using cgi.
<eam> benzrf: he's using fastcgi
<benzrf> that, either
blackmesa has quit [Quit: WeeChat 1.0]
<eam> fcgi is good
j_mcnally has joined #ruby
<eam> I use it =/
<Bish> i think so too, if it worked, i could easily transfer stuff to a webpage
IrishGringo has quit [Ping timeout: 240 seconds]
cerberblue has quit [Remote host closed the connection]
slester has joined #ruby
yfeldblum has joined #ruby
justinmb_ has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
ghr has quit [Ping timeout: 272 seconds]
fmcgeough has joined #ruby
lewix has quit [Ping timeout: 272 seconds]
lewix has joined #ruby
<Bish> and i am supercurious, what that fcgi gem is for, like if there is a webserver which allows a pipe as fcgi server?
livingstn has joined #ruby
skolman_ has quit [Remote host closed the connection]
<Bish> am i SUPPOSED to modify it or create a new class
rubyonrailed has joined #ruby
xcv has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 245 seconds]
skolman_ has joined #ruby
<eam> Bish: what do you mean?
deric_skibotn has quit [Ping timeout: 240 seconds]
<mayhew> Bish: is there a reason you don't just use Rack or Sinatra and proxy_pass instead of fcgi_pass from nginx?
justinmburrous has joined #ruby
jcdesimp has joined #ruby
GidorahFedora has joined #ruby
<Bish> mayhew, well i don't know of these solutions
<Bish> that is something i was expecting when asking here
skolman_ has quit [Ping timeout: 272 seconds]
ephemerian has quit [Remote host closed the connection]
tectonic has quit []
icebourg has quit []
<Bish> TDIN.reopen(TCPServer.new(options[:Host], options[:Port]))
<Bish> so rack uses fcgi like this
wjimenez5271 has joined #ruby
<Bish> great, mystery solved