apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 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
JoshGlzBrk has joined #ruby
SubSignal has joined #ruby
<AntelopeSalad> Newman: a little
zorak8 has quit [Read error: No route to host]
<Newman> AntelopeSalad: I have a job that I want performed every 10 minutes (makes an api call to see which users are online - checking every user)
lw has quit [Quit: s]
<Newman> If I put this in my user controller in def index - will it be added to the queue everytime someone visits the index?
zorak has joined #ruby
<Newman> My controller is players_controller and in def index I have this: SteamsWorker.perform_in(1.minute, Player.all(:select => :id).collect(&:id))
<AntelopeSalad> Newman: have you ever used the whenever gem?
<Newman> I have not
<AntelopeSalad> check this example out for doing scheduled jobs https://github.com/mperham/sidekiq/blob/master/examples/scheduling.rb
aantix has quit [Quit: aantix]
<Newman> Ah
shvelo has quit [Ping timeout: 245 seconds]
<Newman> That looks like a much better solution thanks!
<AntelopeSalad> np
SubSignal has quit [Ping timeout: 245 seconds]
Deele has quit [Ping timeout: 260 seconds]
bmurt has quit []
<Newman> AntelopeSalad yep! exactly what I was looking for; fantastic :)
binaryhat has joined #ruby
onewheelskyward has left #ruby ["Textual IRC Client: www.textualapp.com"]
<AntelopeSalad> yeah both of those gems together make scheduled jobs quite nice
jeregrine has quit [Quit: Connection closed for inactivity]
<codydh> Hello! Trying to install mysql2 on Mavericks, and getting Could not create Makefile due to some reason, probably lack of necessary
<codydh> ... etc. common? Solutions?
yubrew has joined #ruby
combusean has joined #ruby
<mitt3ns> Need the errors preez
Deele has joined #ruby
mary5030 has joined #ruby
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
toastynerd has joined #ruby
mikepack has joined #ruby
djbkd has quit [Remote host closed the connection]
Uranio has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
<shevy> codydh in such a situation you must post the full error message on a pastie site
<shevy> I assume you lack dev-headers
<codydh> Sorry about that, turns out I didn't have mysql installed locally, so I had to do that
<shevy> and your error report here in #ruby is useless, sorry ;)
<wallerdev_> doubt it
<shevy> \o/
<wallerdev_> probably realted to clang
<wallerdev_> every ruby on mavericks build issue is clang
<wallerdev_> lol
blackmesa has quit [Ping timeout: 265 seconds]
<shevy> don't insult apple man
<wallerdev_> not really an insult to apple
<wallerdev_> their solution makes sense, error on unknown options passed to clang
mikesplain has quit [Ping timeout: 240 seconds]
<wallerdev_> just is a pain for some devs to update things haha
djbkd has joined #ruby
mania has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
dik_dak has joined #ruby
Uranio has quit [Ping timeout: 264 seconds]
<happytux> shevy: First one although it is more a binding: https://github.com/rmagick/rmagick
codezomb has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<happytux> shevy: This one gives a good picture: https://www.ruby-toolbox.com/categories/image_processing
Valesk_ has joined #ruby
timonv has joined #ruby
chipotle has joined #ruby
bricker`work has quit [Quit: leaving]
b00stfr3ak has quit [Ping timeout: 265 seconds]
chipotle has quit [Client Quit]
timonv has quit [Ping timeout: 252 seconds]
CaioTSan has quit [Quit: CaioTSan]
Deele has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
Lwhite has joined #ruby
Lwhite has left #ruby [#ruby]
ffranz has quit [Quit: Leaving]
<happytux> require 'bundler/setup'
<happytux> This will change the default task to :help
<happytux> really, I tried it
benzrf is now known as benzrf|offline
zz_karupa is now known as karupa
kireevco has quit [Quit: Leaving.]
tyfighter has quit [Quit: <3]
terrellt has quit [Quit: Leaving...]
b1205 has quit [Ping timeout: 252 seconds]
Deele has joined #ruby
benzrf|offline is now known as benzrf
b1205 has joined #ruby
gkra has joined #ruby
hermanmunster has quit [Remote host closed the connection]
endash has quit [Quit: endash]
hermanmunster has joined #ruby
binaryhat has quit [Quit: Leaving]
Asher has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
i_s has quit [Remote host closed the connection]
testcore has quit [Quit: [BX] Occifer, I'm not as think as you stoned I am!]
EminenceHC has quit [Remote host closed the connection]
linojon has quit [Quit: linojon]
ddv has quit [Ping timeout: 245 seconds]
Ankhers has joined #ruby
chipotle has quit [Quit: cya]
linojon has joined #ruby
toastynerd has quit [Remote host closed the connection]
Slavox is now known as Slavox|AFK
codydh has quit [Quit: Computer has gone to sleep.]
codydh has joined #ruby
kireevco has joined #ruby
chipotle has joined #ruby
ddv has joined #ruby
djbkd has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
djbkd has joined #ruby
bradhe has joined #ruby
slacko60671 has quit [Remote host closed the connection]
mercwith1mouth has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
ahofmann has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
JoshGlzBrk has joined #ruby
cpruitt has joined #ruby
hpoydar has quit [Remote host closed the connection]
nyamx2 has joined #ruby
cpruitt has left #ruby [#ruby]
mikepack has quit [Ping timeout: 265 seconds]
sevenseacat has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
brain_shim has joined #ruby
GriffinHeart has joined #ruby
ecksit has joined #ruby
mitt3ns has quit [Read error: Connection reset by peer]
mitt3ns has joined #ruby
mitt3ns has quit [Client Quit]
jeregrine has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
chipotle has quit [Quit: cya]
Hobogrammer has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 0.3.8]
teddyp1cker has joined #ruby
Guest95638 has joined #ruby
Guest95638 has left #ruby [#ruby]
parduse has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
parduse has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
parduse is now known as Guest3484
charliesome has joined #ruby
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
yubrew has joined #ruby
benzrf is now known as benzrf|offline
ixti has quit [Ping timeout: 252 seconds]
teddyp1cker has quit [Ping timeout: 245 seconds]
benzrf|offline is now known as benzrf
PanPan has joined #ruby
Valesk_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
redondos has quit [Excess Flood]
havenwood has quit [Remote host closed the connection]
redondos has joined #ruby
amargherio has joined #ruby
meatherly has joined #ruby
meatherly has quit [Client Quit]
yubrew has quit [Ping timeout: 245 seconds]
aantix has joined #ruby
graspee has quit [Quit: Leaving]
pietr0 has joined #ruby
jottr_ has quit [Ping timeout: 260 seconds]
aantix has quit [Client Quit]
ahofmann has quit [Quit: Computer has gone to sleep.]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
foobarbaz_ has joined #ruby
<foobarbaz_> Hi guys, just a quick question
<foobarbaz_> I've learning ruby and I noticed there's active record
<foobarbaz_> If i do things like model.all.map { |model| model.property }.sum
cashnguns has joined #ruby
<foobarbaz_> Is that lazily evaluated to know that I'm basically doing `select count(property) from model`
<Soliah> foobarbaz_ you're iterating over the array in memory there.
<foobarbaz_> or is it doing `select * from model`
<sevenseacat> no, it isnt
<foobarbaz_> then in memory
<foobarbaz_> yeahh
<foobarbaz_> Is there a way to stop that?
robbyoconnor has quit [Excess Flood]
<foobarbaz_> I come from a background like C# where LINQ would give a good query for that
sputnik13 has joined #ruby
ecksit has quit [Quit: Computer has gone to sleep.]
<Soliah> model.sum(:property)
<sevenseacat> if you're using AR i would just do model.select('sum(property)').all or something similar
robbyoconnor has joined #ruby
<sevenseacat> or that
blackgoat has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
<foobarbaz_> is it normal to be using active record like that?
<foobarbaz_> I don't know how to write idiomatic ruby unfortunately :P
<Soliah> foobarbaz_ just keep going at it. Maybe look at some open source projects to see idoimatic code.
<Soliah> foobarbaz_ also read the docs. The AR API is pretty large so chances are there's an API for the common cases.
tkuchiki has joined #ruby
sputnik13 has quit [Client Quit]
<Soliah> foobarbaz_ actually with LINQ i recall there being cases where if you used an expression instead of a lambda you might get undesired behaviour with EF. Though my memory is hazy.
<codydh> Hello! Question, if I currently have a view that currently prints <%= @user.name %>, but my model actually has like 15 variables, is there a way to programmatically just loop through and print all items in @user?
zombie__ has joined #ruby
<foobarbaz_> Soliah: Yeah there's a bunch of edge cases, but pretty solid
<foobarbaz_> Scala's doing similiar thing stoo
<foobarbaz_> things too*
<foobarbaz_> Obviously i'm in the wrong channel to ask this; But is Ruby worth learning? :)
<Soliah> codydh you could iterate over the @user.attributes hash.
<foobarbaz_> Does map.default = { ... }
<foobarbaz_> Have a mutable version?
jonathanwallace has joined #ruby
<codydh> Soliah: Aah, ok, thanks!
Lingo_ has joined #ruby
hpoydar has joined #ruby
<foobarbaz_> such that; map = { }; map.default = {"foo" => 0}; map["a"]["foo"] += 1; map["a"]["foo"] += 1;
Dekade has quit [Read error: Connection reset by peer]
<foobarbaz_> Will give map = { "a" => {"foo" => 2 } }
<Soliah> calling the variable map makes it confusing.
lw has joined #ruby
lw has quit [Max SendQ exceeded]
lw has joined #ruby
<codydh> Another question, what's the easiest way to get the ZURB Foundation framework (or Bootstrap) in Rails? Should I just include the assets where I need them, or is there a "better" way?
<foobarbaz_> or would you have to say, if !map.key? "a" then map["a"] = map["a"] end
<foobarbaz_> or something weird
robustus has quit [Ping timeout: 264 seconds]
<Soliah> codydh for bootstrap there's an official SASS implementation of the framework https://github.com/twbs/bootstrap-sass
<Soliah> Not sure about the ZURB framework but there's probably a gem out there that bundles it.
codezomb has joined #ruby
<codydh> Ooh, yes: gem 'foundation-rails'
<Soliah> foobarbaz_ what are you trying to do exactly?
<codydh> Thanks for helping with my newbie questions!
hpoydar has quit [Ping timeout: 240 seconds]
robustus has joined #ruby
<foobarbaz_> Soliah: If you access a key that doesn't exist, create it
<foobarbaz_> So you can keep working with it
<foobarbaz_> Without checking manually if it exists, then adding a default value
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mania has quit [Remote host closed the connection]
Valesk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kaspergrubbe has quit [Remote host closed the connection]
mania has joined #ruby
<Soliah> foobarbaz_ hash.fetch(key, "default")
<Soliah> that doesn't set the value though.
<Soliah> hrm
robbyoconnor has joined #ruby
<foobarbaz_> No does setting myMap.default = {"count" => 0}
<wallerdev_> o.o
<foobarbaz_> and accessing an invalid key, which makes sense.
freerobby has joined #ruby
<foobarbaz_> s/No/Nor/
<wallerdev_> Hash.new { {"count" => 0} } ?
<foobarbaz_> Was wondering if there was a piece of sugar or something in ruby maybe
<foobarbaz_> because i think ruby guys use a lot of maps everywhere?
Kricir has joined #ruby
ramblinpeck has quit [Quit: Connection closed for inactivity]
mary5030 has quit [Remote host closed the connection]
<foobarbaz_> myMap = Hash.new { {"count" => 0} }; myMap["a"]["count"] += 1; myMap["a"]["count"] += 1; myMap["a"]["count"] += 1
<foobarbaz_> Would expect myMap["a"]["count"] to be 3 now
mania has quit [Ping timeout: 240 seconds]
<wallerdev_> oh i see what you want
<foobarbaz_> But
<foobarbaz_> myMap = Hash.new { {"count" => 0} }; myMap["a"] = myMap["a"]; ...
<foobarbaz_> would be weird :P
<foobarbaz_> Likewise checking, unless myMap.key? "a" myMap["a"] = myMap["a"]
<wallerdev_> i think its like...
<foobarbaz_> myMap["a"] = myMap.default("a"); is slightly better, i guess
<wallerdev_> >> hash = Hash.new { |h, k| h[k] = {"count" => 0} }; hash['a']['count'] += 1; hash['a']['count'] += 1; hash['a']['count'] += 1; hash['a']['count']
<eval-in> wallerdev_ => 3 (https://eval.in/160823)
<wallerdev_> brb
<foobarbaz_> ohhh
<foobarbaz_> >> x = 1
jottr_ has joined #ruby
<foobarbaz_> >> x = 1
codydh has quit [Quit: Lingo - http://www.lingoirc.com]
cpruitt has joined #ruby
<foobarbaz_> thanks wallerdev_
aspires has quit []
ghr has joined #ruby
troyready has quit [Ping timeout: 260 seconds]
thesheff17 has joined #ruby
Hanmac1 has joined #ruby
aspires has joined #ruby
Hobogrammer has joined #ruby
bradhe has joined #ruby
Lingo_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
Lingo_ has joined #ruby
northfurr has joined #ruby
northfurr has quit [Client Quit]
northfurr has joined #ruby
linojon has quit [Quit: linojon]
Hanmac has quit [Ping timeout: 245 seconds]
aspires has quit [Ping timeout: 260 seconds]
ghr has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 252 seconds]
phoo1234567 has quit [Quit: Leaving]
codeurge has joined #ruby
lyanchih_ has joined #ruby
<ProLoser> okay either i'm brainfarting or if i use compass compile all compass mixins should be available right?
<wallerdev_> might have better luck in #rubyonrails
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<sevenseacat> or in #compass
<foobarbaz_> Is there a nice way to access lots of nested maps which might not exist in ruby?
<foobarbaz_> Like a null-safe operator?
<ProLoser> i think #compass is dead
<foobarbaz_> myMap?["a"]?["b"]?["c"]
<foobarbaz_> or something
<foobarbaz_> And for it not to throw up if b doesn't exist
<wallerdev_> you can create a recursive hash to make everything exist when you access it
<foobarbaz_> is rescue bad?
<foobarbaz_> myMap["a"]["b"]["c"] rescue "default"
<wallerdev_> depends on the use case
<foobarbaz_> what would be an example of where it's bad? :)
<sevenseacat> i recently ripped functionality to do that *out* of the project im working on
kaspergrubbe has joined #ruby
<wallerdev_> well if your data representation might have random multilevel hash items defined and might not
<wallerdev_> its probably not the best data structure for your data lol
<sevenseacat> exactly, if you have no idea about the data structure you're working with... something is likely wrong
<foobarbaz_> What about optional values from a json web request though?
<sevenseacat> optionally super nested values?
<foobarbaz_> Not > 3 values deep
Emmanuel_Chanel has quit [Read error: No route to host]
<wallerdev_> are they optional at every level? lol
<foobarbaz_> At the top levle
<foobarbaz_> level*
<foobarbaz_> So, a might exist
<wallerdev_> then just check the top level first
<foobarbaz_> ah
toretore has quit [Ping timeout: 240 seconds]
<foobarbaz_> Does the ruby intepreter bother with any sort of optimizations of map access?
<foobarbaz_> Like, if i'm always doing myMap["a"]["etc1"] ... myMap["a"]["etc2"] ... myMap["a"]["etc3"]
<foobarbaz_> Will it try to put myMap["a"] into an intermediate variable to help the access time?
cpruitt has quit [Quit: cpruitt]
<wallerdev_> probably not
<foobarbaz_> Or is that something i should do myself in my code?
hamakn has quit [Remote host closed the connection]
<wallerdev_> as that could break things lol
<foobarbaz_> Or should i not care anyway
<wallerdev_> usually you dont care about performance until it becomes an issue
reset has quit [Quit: Leaving...]
<foobarbaz_> ah
<wallerdev_> at least i dont
reset has joined #ruby
<foobarbaz_> I just wondered because of DRY, myMap["a"] is repeated... a lot
djbkd has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
<wallerdev_> well it really depends what youre doing haha
<wallerdev_> like maybe you want to do mymap["a"].each { |k, v| do something with each key }
mikeric has joined #ruby
<foobarbaz_> ah
<foobarbaz_> awesome then
<foobarbaz_> Thanks for your time, much appreciated :)
<wallerdev_> np
codezomb has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mjsmith2 has joined #ruby
StevenNunez has joined #ruby
Emmanuel_Chanel has joined #ruby
stantona has joined #ruby
aantix has joined #ruby
Soliah has quit [Quit: Soliah]
reset has quit [Ping timeout: 260 seconds]
yubrew has joined #ruby
aantix has quit [Client Quit]
<shevy> in a class, what is the simplest way to write a method that can be used both as a class method but also as an instance method
deric_skibotn has quit [Ping timeout: 265 seconds]
b1205 has quit [Ping timeout: 265 seconds]
<wallerdev_> class Alligator; def self.cool; end; def cool; Alligator.cool; end end
<wallerdev_> lol
codezomb has joined #ruby
Kricir has joined #ruby
stantona has quit [Ping timeout: 240 seconds]
b1205 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Arkaniad has joined #ruby
andrewjanssen has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
SubSignal has joined #ruby
wallerdev_ has quit [Quit: wallerdev_]
x1337807x has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
foobarbaz_ has quit [Quit: Page closed]
Lingo_ has quit [Quit: Lingo - http://www.lingoirc.com]
SubSignal has quit [Ping timeout: 245 seconds]
<shevy> hmm
PanPan has quit [Remote host closed the connection]
<shevy> ok
ndrei has quit [Ping timeout: 260 seconds]
<shevy> then that is what I am already doing, thanks
hamakn has joined #ruby
PanPan has joined #ruby
lw has quit [Quit: s]
timonv has joined #ruby
Takle has joined #ruby
codeFiend has joined #ruby
Kricir has quit [Remote host closed the connection]
StevenNunez has quit [Remote host closed the connection]
oorst has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
lw has joined #ruby
pietr0 has quit [Quit: pietr0]
pietr0 has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
Takle has quit [Ping timeout: 245 seconds]
pietr0 has quit [Client Quit]
Cache_Money has joined #ruby
michael_lee has joined #ruby
Burgestrand has joined #ruby
elabs-developer has joined #ruby
My_Hearing has joined #ruby
zombie__ has quit [Quit: leaving]
frem__ has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
charliesome has quit [Read error: Connection reset by peer]
gruz0[russia] has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
jrhe has quit [Quit: Connection closed for inactivity]
ecksit has joined #ruby
codeFiend has quit [Quit: codeFiend]
ramblinpeck has joined #ruby
ftj has joined #ruby
Cache_Money has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
ftj has quit [Client Quit]
Cache_Money has joined #ruby
codeFiend has joined #ruby
atraylen has quit [Ping timeout: 240 seconds]
cjk101010 has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
jxf has joined #ruby
sdwrage_ has joined #ruby
andrewjanssen has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
heftig has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
ghr has joined #ruby
Spami has joined #ruby
lw has quit [Quit: s]
andrewjanssen has quit [Quit: Leaving...]
charliesome has joined #ruby
kireevco has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
kireevco has joined #ruby
codeFiend has quit [Quit: codeFiend]
Spami has quit [Client Quit]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 276 seconds]
lw has joined #ruby
skysploit has joined #ruby
GriffinHeart has joined #ruby
benzrf is now known as benzrf|offline
mercwithamouth has quit [Ping timeout: 260 seconds]
mikepack has joined #ruby
kireevco has quit [Quit: Leaving.]
musashi1 has joined #ruby
__class__ has quit [Read error: Connection reset by peer]
oorst has quit [Quit: oorst]
brunops has quit [Ping timeout: 265 seconds]
aantix has joined #ruby
GriffinHeart has quit [Ping timeout: 276 seconds]
yubrew has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
freezey has joined #ruby
x1337807x has joined #ruby
brunops has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
oorst has joined #ruby
subraminion has joined #ruby
__class__ has joined #ruby
mary5030 has joined #ruby
mjsmith2 has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
aantix has quit [Quit: aantix]
oorst has quit [Quit: oorst]
scx has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
lw has quit [Quit: s]
tungd has quit [Ping timeout: 260 seconds]
vali has quit [Ping timeout: 240 seconds]
LACP has quit [Ping timeout: 240 seconds]
scx_ has quit [Ping timeout: 245 seconds]
stnly has quit [Ping timeout: 240 seconds]
chrishough has quit [Quit: chrishough]
sivoais has quit [Ping timeout: 265 seconds]
teddyp1cker has quit [Ping timeout: 260 seconds]
braincrash has quit [Quit: bye bye]
phinfonet has quit []
freerobby has quit [Quit: Leaving.]
Newman has quit [Quit: Textual IRC Client: www.textualapp.com]
subraminion has quit [Quit: Computer has gone to sleep.]
musashi1 has quit [Quit: Musashi1]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
subraminion has joined #ruby
braincrash has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
b1205 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has joined #ruby
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
frem__ has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
cashnguns has quit [Remote host closed the connection]
lyanchih_ has quit [Quit: lyanchih_]
kireevco has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
mgorbach has quit [Read error: Connection reset by peer]
lw has quit [Quit: s]
karmatr0n has joined #ruby
hpoydar has joined #ruby
mikepack has joined #ruby
lyanchih_ has joined #ruby
hpoydar has quit [Remote host closed the connection]
bradhe has joined #ruby
freezey has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgorbach has joined #ruby
sivoais has joined #ruby
vali has joined #ruby
stnly has joined #ruby
oorst has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
bradleyprice has joined #ruby
ari-_-e has joined #ruby
amclain has joined #ruby
_GoodTimes has quit [Ping timeout: 265 seconds]
oorst has quit [Quit: oorst]
sgen has joined #ruby
__JokerDoom has quit [Quit: Leaving]
LACP has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oorst has joined #ruby
x1337807x has joined #ruby
sdwrage_ has quit [Quit: Leaving]
yubrew has joined #ruby
x1337807x has quit [Client Quit]
yubrew has quit [Ping timeout: 260 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
oorst has quit [Quit: oorst]
mary5030 has quit [Remote host closed the connection]
lw has joined #ruby
zkay11 has quit [Quit: Leaving.]
benlieb has joined #ruby
kireevco has quit [Quit: Leaving.]
karmatr0n has quit [Remote host closed the connection]
newUser1234 has joined #ruby
timonv has joined #ruby
subraminion has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Remote host closed the connection]
ponga has quit []
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
Spami has joined #ruby
SubSignal has joined #ruby
djbkd has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
mary5030 has joined #ruby
kireevco has joined #ruby
tectonic has joined #ruby
SubSignal has quit [Ping timeout: 276 seconds]
jd has joined #ruby
jd is now known as Guest1744
mattmcclure has joined #ruby
aspires has joined #ruby
j75 has quit [Ping timeout: 240 seconds]
kenneth has joined #ruby
oo_ has quit [Remote host closed the connection]
amargherio has quit [Remote host closed the connection]
Bira has quit []
datafirm has quit [Quit: Computer has gone to sleep.]
datafirm has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
kies has quit [Quit: baaaaiiiiiiiiiii~]
datafirm has quit [Ping timeout: 245 seconds]
anaeem1_ has joined #ruby
bradhe has joined #ruby
djbkd has quit [Quit: My people need me...]
gimpygoo has joined #ruby
djbkd has joined #ruby
BAMbanda has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<BAMbanda> what's the proper way to represent something like the length of a song?
<BAMbanda> I know we use Time, but i don't want like a utc or a date or anything
<BAMbanda> just mm:ss
karmatr0n has joined #ruby
<sevenseacat> i'd probably just use an integer for seconds.
kies has joined #ruby
<BAMbanda> sevenseacat, is there anyway I can keep that ':' in there?
bradhe has quit [Ping timeout: 265 seconds]
<sevenseacat> that seems like a presentation issue to me, i wouldnt store it.
jkline has quit [Quit: jkline]
hpoydar has joined #ruby
<BAMbanda> sevenseacat, Boohbah, thanks
hpoydar has quit [Remote host closed the connection]
hpoydar has joined #ruby
skysploit has quit [Remote host closed the connection]
hpoydar has quit [Remote host closed the connection]
mikepack has joined #ruby
NukePuppy has joined #ruby
aantix has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
Cache_Money has quit [Quit: Cache_Money]
GriffinHeart has joined #ruby
aspires has quit []
lxsameer has joined #ruby
kireevco has quit [Quit: Leaving.]
andrewjanssen has joined #ruby
kireevco has joined #ruby
mikepack has quit [Ping timeout: 276 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has quit [Quit: s]
edogawaconan has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
oorst has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
yubrew has joined #ruby
Channel6 has joined #ruby
oorst has quit [Client Quit]
b1205 has quit [Ping timeout: 276 seconds]
NukePuppy has quit [Read error: Connection reset by peer]
andrewjanssen has quit [Quit: Leaving...]
newUser1234 has quit [Remote host closed the connection]
NukePuppy has joined #ruby
Cache_Money has joined #ruby
subraminion has joined #ruby
yubrew has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
ProLoser has quit [Remote host closed the connection]
subraminion has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
codeFiend has joined #ruby
oorst has joined #ruby
alexju has joined #ruby
phansch has joined #ruby
Shidash has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has joined #ruby
oorst has quit [Client Quit]
charliesome has quit [Ping timeout: 245 seconds]
Valesk has joined #ruby
codeFiend has quit [Quit: codeFiend]
sevenseacat has quit [Remote host closed the connection]
<seitensei> Is there any means to get somethining similar to the MongoDB API for an embedded db
sevenseacat has joined #ruby
northfurr has quit [Quit: northfurr]
oorst has joined #ruby
phansch has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
BlakeRG has joined #ruby
charliesome has joined #ruby
<BlakeRG> i am checking if something is.nil? but i want to evaluate it in the reverse, whats the ruby way to do that?
<BlakeRG> !is.nil? seems odd
Soliah has joined #ruby
tungd has joined #ruby
mradmacher has joined #ruby
MZAWeb has joined #ruby
<drizz> you can use unless is.nil? if it's an if statement
<drizz> or "not is.nil?" for verbosity if not
<mozzarella> unless is.nil?
<drizz> or "something if is" will evaluate something if “is” is either false, 0 or nil
oorst has quit [Quit: oorst]
<drizz> if “is” is *not* false, 0 or nil
<mozzarella> uh, I'm not sure about 0
<drizz> > 1 if 0
<drizz> >> 1 if 0
<eval-in> drizz => 1 (https://eval.in/160902)
<mozzarella> see, 0 is true
<Sigma00> >> a= 0; puts "yup, it works" if a
<eval-in> Sigma00 => yup, it works ... (https://eval.in/160903)
<drizz> true
djbkd has joined #ruby
<BlakeRG> so something like: if profile.is_a?(Hash) && unless profile['id'].nil?
<BlakeRG> i am making sure the id index on the profile hash exists
<Sigma00> BlakeRG: s/unless/not/
<Sigma00> unless is the opposite of if
<Sigma00> and you only use it where you'd use if
<BlakeRG> oh got ya
Kricir has joined #ruby
<drizz> BlakeRG: if profile is a hash you could use if profile.is_a?(Hash) && profile.key? 'id'
<drizz> unless id is explicitly nil for some reason
<mozzarella> also I'd use
<mozzarella> >> {}.respond_to?(:[])
<eval-in> mozzarella => true (https://eval.in/160904)
oorst has joined #ruby
<mozzarella> so profile could respond to [] and not be a hash
Lingo_ has joined #ruby
codeFiend has joined #ruby
x1337807x has joined #ruby
NukePuppy has quit [Ping timeout: 245 seconds]
sgen has quit [Quit: Leaving]
Lingo_ has quit [Quit: Lingo - http://www.lingoirc.com]
Soliah has quit [Quit: Soliah]
frem__ has joined #ruby
lyanchih_ has joined #ruby
Kricir has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
Channel6 has quit [Quit: Leaving]
bradhe has joined #ruby
garndt has quit [Quit: Connection closed for inactivity]
mikeric has quit []
Cache_Money has joined #ruby
Cache_Money has quit [Client Quit]
r0bby has joined #ruby
sinkensabe has joined #ruby
robbyoconnor has quit [Ping timeout: 276 seconds]
frem__ has quit [Ping timeout: 240 seconds]
r0bby is now known as robbyoconnor
alem0lars has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Remote host closed the connection]
dik_dak has quit [Remote host closed the connection]
newUser1234 has joined #ruby
sinkensabe has joined #ruby
tobago has joined #ruby
sinkensabe has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Ping timeout: 252 seconds]
Asher has joined #ruby
alexju has quit [Remote host closed the connection]
havenwood has joined #ruby
phansch has joined #ruby
tkuchiki_ has joined #ruby
tungd has quit [Ping timeout: 252 seconds]
bascht has joined #ruby
nfk has joined #ruby
yubrew has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
why_away has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
redondos has quit [Excess Flood]
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
teddyp1cker has quit [Remote host closed the connection]
why_away has quit [Read error: Connection reset by peer]
why_away has joined #ruby
yubrew has quit [Ping timeout: 276 seconds]
teddyp1cker has joined #ruby
ra4king has quit [Remote host closed the connection]
whyy has joined #ruby
ra4king has joined #ruby
ghr has joined #ruby
oorst has quit [Quit: oorst]
tagrudev has joined #ruby
pontiki has joined #ruby
mercwithamouth has joined #ruby
aganov has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
Royalb15 has joined #ruby
codezomb has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
claymore has joined #ruby
amclain has quit [Quit: Leaving]
why_away has quit [Ping timeout: 276 seconds]
cjk101010 has joined #ruby
toastynerd has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
happytux has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
codeFiend has quit [Quit: codeFiend]
Spami has quit [Quit: This computer has gone to sleep]
dc has quit [Remote host closed the connection]
karmatr0n has quit [Remote host closed the connection]
Valesk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codeFiend has joined #ruby
toastynerd has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 276 seconds]
Royalb15 has quit [Quit: Leaving]
Macaveli has joined #ruby
Gil_ has joined #ruby
kireevco has quit [Quit: Leaving.]
riceandbeans has joined #ruby
heftig has quit [Quit: Quitting]
<riceandbeans> if I want to do ruby for a web site, with no rails or sinatra, can I just use ruby in cgi-bin or just point to a .rb file?
kireevco has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
n0n3 has joined #ruby
kaleido has quit [Ping timeout: 265 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BlakeRG has quit []
sepp2k1 has quit [Quit: Leaving.]
codeFiend has quit [Quit: codeFiend]
combusean has quit [Quit: Leaving.]
jeregrine has quit [Quit: Connection closed for inactivity]
M-Technic has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
ndrei has joined #ruby
Macaveli has quit [Quit: Leaving]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
combusean has joined #ruby
kaspergrubbe has quit [Ping timeout: 260 seconds]
M-Technic has joined #ruby
timonv has joined #ruby
hakunin_ has joined #ruby
hakunin has quit [Ping timeout: 265 seconds]
kiri has joined #ruby
bradhe has joined #ruby
kilk_ has joined #ruby
TripTastic has left #ruby ["Leaving"]
sepp2k has joined #ruby
alem0lars has quit [Quit: Going AFK...]
djbkd has quit [Remote host closed the connection]
kilk_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<riceandbeans> atmosx: I don't think my webhost supports that
<riceandbeans> I made a .rb file and my browser wanted to download it, so clearly it wasn't interpreted
bradhe has quit [Ping timeout: 265 seconds]
<pontiki> use the .cgi extension instead
klaut has joined #ruby
<pontiki> also make sure the first line is '#!/usr/bin/env ruby' or '#!/usr/bin/ruby'
<pontiki> this does require your host to have ruby installed
n0n3 has quit []
<riceandbeans> they do have ruby installed, they allow for rails v2 stuff supposedly, but I couldn't get rails to work on their server
schaary|afk is now known as schaary
<riceandbeans> I'd use heroku but I want to have a postgres db and this place will let me host as many postgres dbs as I want
<pontiki> can you shell in to the host?
<riceandbeans> hah no
<pontiki> rats
<riceandbeans> if I had shell access I could figure out a lot of my own problems
<pontiki> s'truth
chipotle has joined #ruby
<sevenseacat> well heroku uses postgres by default
newUser1234 has joined #ruby
IceDragon has quit [Quit: Space~~~]
BAMbanda has quit [Remote host closed the connection]
<pontiki> try renaming it and make sure of the first line
klaut has quit [Ping timeout: 265 seconds]
krz has joined #ruby
<riceandbeans> sevenseacat: are you sure? I thought heroku had you use sqlite
dayepa has quit [Remote host closed the connection]
<riceandbeans> I haven't touched heroku in about 2 years though
<sevenseacat> quite positive.
michael_lee has quit [Remote host closed the connection]
newUser1234 has quit [Ping timeout: 265 seconds]
GriffinHeart has joined #ruby
klaut has joined #ruby
<riceandbeans> hmmm, I may be going back to heroku then
JoshGlzBrk has joined #ruby
relix has joined #ruby
zorak has quit [Read error: Connection reset by peer]
sinkensabe has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
codeFiend has quit [Client Quit]
sinkensabe has joined #ruby
<riceandbeans> insane...
yubrew has joined #ruby
<riceandbeans> if I deck out heroku for an app I can make it cost 116,000/mo to operate...
<riceandbeans> for one app
Kricir has joined #ruby
<sevenseacat> doesnt surprise me... its convenient, not cheap
alem0lars has joined #ruby
My_Hearing is now known as Mon_Ouie
bascht has left #ruby [#ruby]
bluOxigen has joined #ruby
exgf has quit [Remote host closed the connection]
exgf has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Asher has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
claymore has quit [Ping timeout: 245 seconds]
zorak has joined #ruby
<pontiki> presumably, with such an app, you'd have already figured out how to monetize it
<riceandbeans> heh if it were that big yeah
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<riceandbeans> right now I have ~40 lines of python that I want to move to ruby and put somewhere
aantix has quit [Quit: aantix]
yubrew has quit [Ping timeout: 276 seconds]
<riceandbeans> does anyone here use twitter?
Asher has joined #ruby
claymore has joined #ruby
redondos has quit [Excess Flood]
redondos has joined #ruby
<riceandbeans> can I deploy ruby to heroku without it necessarily being rails?
mary5030 has quit [Remote host closed the connection]
<pontiki> i don't use heroku, so sadly cannot answer your question
<riceandbeans> pontiki: what about twitter?
<pontiki> what about twitter?
<sevenseacat> i dont use heroku either
<riceandbeans> do you use it?
<pontiki> yes
kireevco has quit [Quit: Leaving.]
<pontiki> but not to host apps...
<riceandbeans> I have twitter questions as well
<riceandbeans> right, I didn't think you did...
<pontiki> i don't use twitter's api
<riceandbeans> so, from my understanding of twitter, if you put #foo and I put #foo, then we're linked together in a way
<pontiki> no
<sevenseacat> no
<riceandbeans> everyone who puts #foo is mentioned or something
<riceandbeans> no?
<sevenseacat> definitely not
<pontiki> someone can find both our posts by searching for the hashtag #foo
<pontiki> but there is no linkage between those posts
<riceandbeans> is there not a 'trending hashtag'?
<riceandbeans> or something like that
yfeldblu_ has joined #ruby
<pontiki> that doesn't link them
<pontiki> it just counts them
kireevco has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
<riceandbeans> I have no account so I'm mostly ignorant on this
<riceandbeans> so let's say I get everyone in the world to make an account and we all make a twitter post of #foo
<riceandbeans> there will be a thing somewhere saying #foo is the most twittered thing right now?
Macaveli has joined #ruby
<pontiki> yes
<sevenseacat> yeah, typically in the sidebar
akonny has joined #ruby
<riceandbeans> perfect
<sevenseacat> and on the 45000000000 sites dedicates to twitter trends
<riceandbeans> I had an idea regarding that I wanted to try out
noop has joined #ruby
anarang has joined #ruby
oo_ has quit [Remote host closed the connection]
<atmosx> riceandbeans: you can sinatra
<atmosx> riceandbeans: you can deploy any rack-up on heroku, with pgsql support.
<riceandbeans> so it has to be a rack app?
<atmosx> why, what did yu had in mind? a cli app?
Xeago has joined #ruby
<riceandbeans> atmosx: a very stripped down app, like a hand build cgi type deal
Gil_ has quit [Remote host closed the connection]
ddv has quit [Changing host]
ddv has joined #ruby
alem0lars has quit [Quit: Going AFK...]
diegoviola has joined #ruby
Morkel has joined #ruby
timonv has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
VinceThePrince has joined #ruby
<atmosx> riceandbeans: http://camping.io/
Macaveli has quit [Ping timeout: 252 seconds]
<atmosx> don't know if you could use any other way to fire up cgi or if heroku supports that, I think not.
KLVTZ has joined #ruby
Kricir has quit [Remote host closed the connection]
kilk_ has joined #ruby
<benlieb> what is the easiest way to check if a network resource "exists"? In this case it is on S3.
tesuji has joined #ruby
<benlieb> I could use aws sdk, but is there some kind of network ping or head request I could use?
<pontiki> i use s3cmd from the command line, would that be what you need?
<atmosx> benlieb: depends on what you wanna do
fabrice31 has joined #ruby
<atmosx> benlieb: IMHO an http request might faster/more reliable. Ping requests might be blocked, etc.
sdouglas has joined #ruby
kireevco has quit [Quit: Leaving.]
<benlieb> pontiki: I'm writing an "integrity" checker for my web app, which checks for the integrity of the database, relationships, and the existence of certain resources, in this case thousands of video in multiple formats, thumbnails images, and other related resources.
C0deMaver1ck has quit [Ping timeout: 252 seconds]
gbchaosmaster has quit [Ping timeout: 265 seconds]
<benlieb> I upload new content periodically and the files are big, the batches take overnight to upload and things get wonky with network hiccups
<benlieb> Some resources slip through the cracks
<pontiki> maybe look at the fog gem?
Takle has joined #ruby
<benlieb> I also want to verify that certain resources are public, others are private. It's a bit of a headache.
<pontiki> i'm assuming you build manifests so you can verify things are where they should be?
<benlieb> pontiki: how so?
andikr has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest88881
<atmosx> benlieb: how do you upload the content? what protocol? http, ftp, rsync?
blaxter has quit [Ping timeout: 265 seconds]
zorak has quit [Read error: Connection reset by peer]
<pontiki> you know what files should be where, and what permissions they should have; this should be capturable in a manifest, possibly in json or such, which you can run through to ensure everything is in order
<benlieb> atmosx: I'm using a gui: S3hub
<pontiki> chef uses something similar to that
sdouglas has quit [Ping timeout: 240 seconds]
<benlieb> I tried via a rake task once and that was a disaster...
<pontiki> you could also keep the manifest in a table in your app
<atmosx> benlieb: I don't now but your problem seems possible to tackle at a lower level. But since I don't know the specific, I can't really guess. There are many protocols that are extremely tolerant to network deficiencies (rsync, bittorent, etc.).
<pontiki> or pull it from other tables if need be
Xeago has quit [Read error: Connection reset by peer]
<atmosx> anyway I'm off to the library, cya later
zorak has joined #ruby
Xeago has joined #ruby
<riceandbeans> I think I'm going to use camping
Xeago has quit [Read error: Connection reset by peer]
Asher2 has joined #ruby
Asher has quit [Read error: Connection reset by peer]
<pontiki> or, write a rack application directly
newUser1234 has joined #ruby
combusean has quit [Quit: Leaving.]
<riceandbeans> how?
<riceandbeans> thing is I kinda had specific ideas about how I wanted my DB to be
MZAWeb has quit [Ping timeout: 276 seconds]
<pontiki> rack doesn't even have anything to do with persistance
<pontiki> so you can do whatever you'd like
<pontiki> same with sinatra, for that matter
edmellum has joined #ruby
<pontiki> sinatra is basically router and views
blinkdesign has joined #ruby
<riceandbeans> why seems very anti sinatra
<riceandbeans> and I respect his word
<pontiki> whatever isn't
<riceandbeans> anyway, isn't rack the part that interfaces to the DB?
<pontiki> no
<riceandbeans> what am I thinking of?
<pontiki> not at all, infact
timonv has joined #ruby
<pontiki> sinatra also does not interface to a DB
<pontiki> camping does
newUser1234 has quit [Ping timeout: 260 seconds]
danijoo has quit [Read error: Connection reset by peer]
<riceandbeans> ok well this is mostly going to be a DB with a UI
<riceandbeans> some tasks to run
Kricir has joined #ruby
<pontiki> the UI is http-based?
danijoo has joined #ruby
blaxter has joined #ruby
<pontiki> also, is it a specific DBMS?
<pontiki> or a generic thing?
<pontiki> and is it ORM or ... ?
timonv_ has joined #ruby
<riceandbeans> pontiki: I just thought this thing up like 2 days ago, give me a break man
ndrei has quit [Ping timeout: 265 seconds]
<pontiki> lighten up, man
<riceandbeans> I would be the one creating and using it, not making it as an open source thing, I like postgres, I'd be doing postgres
yacks has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
<pontiki> the questions i asked are pretty fundamental, before you even choose an implementation structure
<riceandbeans> if I had a say, I'd skip an ORM and do straight DBI type stuff
<pontiki> you have a say, you can do that
MrDoctor has joined #ruby
<riceandbeans> the UI I'd figure would be http based
diegoviola has quit [Ping timeout: 276 seconds]
timonv has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
railzForDaiz has joined #ruby
akonny has quit [Quit: akonny]
KLVTZ has quit [Quit: {K}angaroo {L}eague on a {V}endetta for {T}errifying {Z}ebras]
railzFor_ has joined #ruby
brunops has quit [Quit: leaving]
jprovazn has joined #ruby
akonny has joined #ruby
<pontiki> look at this two tuts:
yubrew has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
railzForDaiz has quit [Ping timeout: 252 seconds]
<pontiki> and for doing DBI stuff, you just work directly with the pg gem: https://bitbucket.org/ged/ruby-pg/wiki/Home
tungd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tris has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
jimbauds has joined #ruby
hpoydar has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
rdark has joined #ruby
teddyp1cker has joined #ruby
diegoviola has joined #ruby
shime has joined #ruby
hpoydar has quit [Ping timeout: 260 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
qba73 has joined #ruby
bradleyprice has quit [Ping timeout: 265 seconds]
moritzs has joined #ruby
yacks has joined #ruby
teddyp1cker has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
joonty has joined #ruby
ephemerian has joined #ruby
JohnBat26 has joined #ruby
Kricir has quit [Remote host closed the connection]
JBreit has joined #ruby
K3dare has joined #ruby
ghr has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
elabs-developer has quit [Quit: elabs-developer]
phansch has quit [Quit: WeeChat 0.4.3]
charliesome has quit [Client Quit]
K3dare is now known as Kedare
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer has quit [Ping timeout: 240 seconds]
akonny has quit [Quit: akonny]
ecksit has quit [Quit: Computer has gone to sleep.]
andrewlio has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
wallerdev has quit [Quit: wallerdev]
JBreit has left #ruby ["Leaving"]
timonv_ has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
elaptics`away is now known as elaptics
ktun has joined #ruby
tectonic has quit []
teddyp1cker has quit [Ping timeout: 260 seconds]
vali has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
mercerist has joined #ruby
Takle has quit [Remote host closed the connection]
sk87 has joined #ruby
SubSignal has joined #ruby
vali has joined #ruby
<ddv> pontiki: but does it teach basis MVC concepts?
newUser1234 has joined #ruby
obs_ has joined #ruby
sdouglas has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
<pontiki> ddv, does what teach basic MVC concepts?
SubSignal has quit [Ping timeout: 240 seconds]
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
teddyp1cker has joined #ruby
newUser1234 has quit [Ping timeout: 276 seconds]
GriffinHeart has joined #ruby
himsin has joined #ruby
hermanmunster has quit [Remote host closed the connection]
MrDoctor has quit [Remote host closed the connection]
ctp has joined #ruby
benlieb has quit [Quit: benlieb]
hermanmunster has joined #ruby
papercode has joined #ruby
tungd has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
teddyp1cker has quit [Ping timeout: 260 seconds]
GriffinHeart has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
<atmosx> riceandbeans: go with sinatra. If you wanna deploy on heroku, use ORM (sequel) and postgreQL, it's the only DB supported by heroku.
mg^ has quit [Ping timeout: 260 seconds]
mg^^ has joined #ruby
SOLID000 has joined #ruby
<riceandbeans> atmosx: good, I wanted to use postgres in the first place
jxf has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Ping timeout: 265 seconds]
<riceandbeans> how different is activerecord from sequel?
Burgestrand has joined #ruby
<pontiki> ttfn, must go to sleeps
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
boris has joined #ruby
timonv has joined #ruby
dangerousdave has joined #ruby
<mikecmpbll> thought it was thursday when i woke up.
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has quit [Ping timeout: 245 seconds]
virtualize has quit []
<sevenseacat> not yet - in 8 hours
<mikecmpbll> damn you people in the future.
<sevenseacat> :)
<sevenseacat> and tomorrow's lotto numbers are....
<mikecmpbll> :D
klaut has quit [Remote host closed the connection]
Atttwww has quit []
Doppp has quit [Quit: leaving]
Doppp has joined #ruby
rdark has quit [Quit: leaving]
JasmeetQA has joined #ruby
olivier_bK has joined #ruby
atraylen has joined #ruby
marr has joined #ruby
rdark has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
GriffinHeart has joined #ruby
rdark has quit [Client Quit]
teejar has quit [Ping timeout: 240 seconds]
teejar has joined #ruby
Spami has joined #ruby
benlieb has joined #ruby
blackmesa has joined #ruby
kenndel_ has joined #ruby
kenndel has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
rdark has joined #ruby
rdark has quit [Client Quit]
AlSquire has joined #ruby
rdark has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
bradhe has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
Ningen_UA has joined #ruby
why_away has joined #ruby
whyy has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
whyy has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
why_away has quit [Ping timeout: 260 seconds]
rdark has quit [Quit: leaving]
newUser1234 has joined #ruby
rdark has joined #ruby
andikr has quit [Remote host closed the connection]
robmiller has joined #ruby
robmiller has left #ruby [#ruby]
rdark has quit [Client Quit]
rdark has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
bluenemo has joined #ruby
newUser1234 has quit [Ping timeout: 265 seconds]
teddyp1cker has joined #ruby
Azulinho has joined #ruby
byteoverfl0w has joined #ruby
echevemaster has quit [Remote host closed the connection]
juco has quit [Read error: Connection reset by peer]
mehlah has joined #ruby
toordog has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
teddyp1cker has quit [Ping timeout: 265 seconds]
yubrew has joined #ruby
kwd has joined #ruby
end_guy has quit [Ping timeout: 264 seconds]
end_guy has joined #ruby
dreamchaser has quit [Quit: ZNC - http://znc.in]
Takle has joined #ruby
mercerist has quit [Ping timeout: 252 seconds]
klaut has joined #ruby
yubrew has quit [Ping timeout: 260 seconds]
mercerist has joined #ruby
workmad3 has joined #ruby
klaut has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 252 seconds]
kaspergrubbe has joined #ruby
klaut has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
claymore has quit [Quit: Leaving]
r0bby has quit [Excess Flood]
Joulse has joined #ruby
r0bby has joined #ruby
rdark has quit [Quit: leaving]
rdark has joined #ruby
Takle has joined #ruby
TripTastic has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
TripTastic is now known as JBreit2
sevenseacat has quit [Remote host closed the connection]
rdark has quit [Client Quit]
rdark has joined #ruby
karupa is now known as zz_karupa
charliesome has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
mania has joined #ruby
rdark has quit [Quit: leaving]
kyb3r_ has quit [Read error: Connection reset by peer]
rdark has joined #ruby
mania has quit [Ping timeout: 245 seconds]
atmosx has quit [Ping timeout: 264 seconds]
BizarreCake has joined #ruby
JBreit2 is now known as JBreit
mijicd has joined #ruby
Darryl has quit [Quit: Connection closed for inactivity]
mijicd_ has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
mijicd has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
<jokke> hey
<jokke> rvm ist doing something, but apparently not compiling ruby
JBreit has left #ruby ["Leaving"]
<jokke> it just hangs at Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
teddyp1cker has joined #ruby
decoponio has joined #ruby
atmosx has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
shredding has joined #ruby
teddyp1cker has quit [Ping timeout: 276 seconds]
cbreeze has joined #ruby
newUser1234 has joined #ruby
mercwithamouth has joined #ruby
akonny has joined #ruby
lkba has joined #ruby
MrDoctor has joined #ruby
newUser1234 has quit [Ping timeout: 265 seconds]
nvmme has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
yubrew has joined #ruby
SubSignal has joined #ruby
merceris_ has joined #ruby
kith has quit [Ping timeout: 252 seconds]
yubrew has quit [Ping timeout: 245 seconds]
derebos has joined #ruby
Zebroid has joined #ruby
SubSignal has quit [Ping timeout: 265 seconds]
mercwithamouth has joined #ruby
Matip has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
Matip has joined #ruby
mercerist has quit [Ping timeout: 276 seconds]
derebos has quit [Client Quit]
derebos has joined #ruby
alem0lars has quit [Ping timeout: 260 seconds]
scx_ has joined #ruby
mrgrieves has joined #ruby
kwd_ has joined #ruby
scx has quit [Ping timeout: 265 seconds]
derebos has quit [Client Quit]
kwd has quit [Ping timeout: 252 seconds]
kwd_ is now known as kwd
nyamx2 has quit []
rdark has quit [Quit: leaving]
rdark has joined #ruby
kith has joined #ruby
matrixis1 is now known as matrixise
jackneill has joined #ruby
kiri has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
fabrice31 has joined #ruby
kiri has joined #ruby
<riceandbeans> holy crap
<riceandbeans> my heroku app is sharing a DB server with 4668 DBs
vifino has joined #ruby
<workmad3> riceandbeans: free db plan?
<riceandbeans> workmad3: of course
<workmad3> riceandbeans: sounds about right then :)
<riceandbeans> when I see money coming in, I'll have money going back out
Takle has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
<riceandbeans> I'm not paying until I can get at least one person to pay
nvmu has joined #ruby
platzhirsch has joined #ruby
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
flops has joined #ruby
ndrei has joined #ruby
cbreeze has quit [Quit: Textual IRC Client: www.textualapp.com]
akonny has quit [Quit: akonny]
taybin has joined #ruby
bradhe has joined #ruby
shredding has quit [Read error: No route to host]
taybin has quit [Client Quit]
bradhe has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
DEA7TH has joined #ruby
djdb has joined #ruby
<DEA7TH> Is it conventional to use """[text]""" for comments in Ruby, like I do in Python?
newUser1234 has joined #ruby
<canton7> no
<flops> DEA7TH: use # text
<DEA7TH> flops: but I need multi-line
<flops> there is none
phansch has joined #ruby
<flops> just start every line with #
<DEA7TH> hm ok
<canton7> there =begin and =end, but they're ultra-rare
<canton7> just use #'s
jottr_ has joined #ruby
AlHafoudh has left #ruby ["Leaving"]
vinleod has joined #ruby
mikepack has quit [Ping timeout: 276 seconds]
newUser1234 has quit [Ping timeout: 252 seconds]
tobago has quit [Remote host closed the connection]
aagdbl has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yubrew has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
emsilva has joined #ruby
AlHafoudh has joined #ruby
<AlHafoudh> hi
<AlHafoudh> rubyists, how do you monitor wal-e archiving?
riotjones has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 265 seconds]
predator117 has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
ItsYoda has quit [Ping timeout: 265 seconds]
ohcibi has quit [Ping timeout: 265 seconds]
Yoda- has joined #ruby
ohcibi has joined #ruby
Takle has quit [Remote host closed the connection]
sdouglas has joined #ruby
ohcibi has quit [Excess Flood]
morinap has joined #ruby
kaspergrubbe has quit [Ping timeout: 265 seconds]
forcefsck has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
sdouglas has quit [Ping timeout: 260 seconds]
holmser_ has joined #ruby
mumblet has joined #ruby
postmodern has quit [Quit: Leaving]
oo_ has joined #ruby
Photism_ has joined #ruby
gazarsgo_ has joined #ruby
ClarusCogitatio_ has joined #ruby
andikr has joined #ruby
SegFaultAX_ has joined #ruby
mahlon_ has joined #ruby
cnj has quit [Quit: Quit]
haroldwu_ has joined #ruby
qpok_ has joined #ruby
Yoda- has quit [Ping timeout: 265 seconds]
mumblerit has quit [Ping timeout: 265 seconds]
holmser has quit [Ping timeout: 265 seconds]
phrozen77 has quit [Ping timeout: 265 seconds]
tiguser has quit [Ping timeout: 265 seconds]
ClarusCogitatio has quit [Ping timeout: 265 seconds]
gazarsgo has quit [Ping timeout: 265 seconds]
Yoda- has joined #ruby
Photism has quit [Ping timeout: 265 seconds]
haroldwu has quit [Ping timeout: 265 seconds]
SegFaultAX has quit [Ping timeout: 265 seconds]
tiguser has joined #ruby
DefV has quit [Ping timeout: 265 seconds]
qpok has quit [Ping timeout: 265 seconds]
DefV has joined #ruby
mahlon has quit [Ping timeout: 265 seconds]
boris has quit [Ping timeout: 265 seconds]
Rickmasta has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Ping timeout: 265 seconds]
Rylee_ has quit [Ping timeout: 265 seconds]
SegFaultAX_ is now known as SegFaultAX
MindfulMonk has quit [Ping timeout: 265 seconds]
phrozen77 has joined #ruby
Striki has quit [Ping timeout: 265 seconds]
sumark has quit [Ping timeout: 265 seconds]
LostDatagram has quit [Ping timeout: 265 seconds]
oddalot has quit [Ping timeout: 265 seconds]
supermat has quit [Ping timeout: 265 seconds]
mumblet is now known as mumblerit
ohcibi_ has joined #ruby
gazarsgo_ is now known as gazarsgo
GoodTimes has joined #ruby
sumark has joined #ruby
eguim_ has quit [Ping timeout: 265 seconds]
knigitz has quit [Ping timeout: 265 seconds]
Rylee_ has joined #ruby
mumblerit is now known as Guest79836
phoo1234567 has joined #ruby
LostDatagram has joined #ruby
Striki has joined #ruby
vlad_starkov has joined #ruby
eguim has joined #ruby
telling has quit [Ping timeout: 265 seconds]
dioms_ has quit [Ping timeout: 265 seconds]
knigitz has joined #ruby
dioms_ has joined #ruby
GreekFreak has joined #ruby
<GreekFreak> hi all
boris has joined #ruby
thesheff17 has quit [Ping timeout: 265 seconds]
LiquidInsect has quit [Ping timeout: 265 seconds]
LiquidInsect has joined #ruby
DouweM has joined #ruby
Yoda- has quit [Ping timeout: 265 seconds]
<matti> Hi
telling has joined #ruby
Rickmasta has joined #ruby
MindfulMonk has joined #ruby
ohcibi_ is now known as ohcibi
<GreekFreak> I have the following line: ["bob", "jump"].any? { |term| "jump is high".downcase.include?(term) } This returns TRUE. .any? does an OR operation. Is there an equivalent method that does an AND operation so that my statement returns FALSE?
WillAmes has quit [Ping timeout: 265 seconds]
lele has quit [Ping timeout: 265 seconds]
DefV has quit [Ping timeout: 265 seconds]
[42] has quit [Ping timeout: 265 seconds]
jxport has quit [Ping timeout: 265 seconds]
DefV has joined #ruby
Yoda- has joined #ruby
toordog has quit [Ping timeout: 265 seconds]
jxport has joined #ruby
cnj has joined #ruby
antonishen has quit [Ping timeout: 265 seconds]
Dr3amc0dz has quit [Ping timeout: 252 seconds]
toordog has joined #ruby
forcefsck has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
antonishen has joined #ruby
BizarreCake has quit [Ping timeout: 276 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Hanmac1> GreekFreak: "all?"
[42] has joined #ruby
Hanmac1 is now known as Hanmac
<DouweM> GreekFreak: if the .any? method checks if the block is true for any element, what method would check if the block is true for all elements?
axilla has quit [Ping timeout: 265 seconds]
shenk has quit [Ping timeout: 265 seconds]
synfin has quit [Ping timeout: 265 seconds]
ejnahc has quit [Ping timeout: 265 seconds]
ejnahc has joined #ruby
synfin has joined #ruby
shvelo has joined #ruby
<GreekFreak> Hanmac, oh wow!! I didn't even think of guessing that.
shvelo has quit [Changing host]
shvelo has joined #ruby
<GreekFreak> Now I really feel small lol
axilla has joined #ruby
<GreekFreak> thanks
benzrf|offline is now known as benzrf
shenk has joined #ruby
<GreekFreak> DouweM, ya well. clearly I had a dumb moment and I obviously missed it in the API
Dr3amc0d3r|away has joined #ruby
<DouweM> :)
Lingo__ has joined #ruby
charliesome has quit [Ping timeout: 265 seconds]
cout has quit [Ping timeout: 265 seconds]
jinie has joined #ruby
monkegjinni has joined #ruby
tiguser has quit [Ping timeout: 265 seconds]
lele has joined #ruby
cout has joined #ruby
bean has quit [Ping timeout: 265 seconds]
jtz has quit [Ping timeout: 265 seconds]
<GreekFreak> DouweM, I'll console myself knowing that it happens to us all every once in a while lol
<DouweM> for sure
Yoda- has quit [Ping timeout: 265 seconds]
benzrf is now known as benzrf|offline
bean has joined #ruby
tiguser has joined #ruby
cqql has joined #ruby
Guest48777 has quit [Ping timeout: 265 seconds]
moritzs has quit [Ping timeout: 245 seconds]
thesheff17 has joined #ruby
kaspergrubbe has joined #ruby
charliesome has joined #ruby
aganov has quit [Ping timeout: 265 seconds]
nszceta has joined #ruby
Takle has joined #ruby
Yoda- has joined #ruby
EvanR has joined #ruby
LostDatagram has quit [Ping timeout: 265 seconds]
kalleth has quit [Ping timeout: 265 seconds]
phrozen77 has quit [Max SendQ exceeded]
cout has quit [Ping timeout: 265 seconds]
destructure has quit [Ping timeout: 265 seconds]
lele has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
cout has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
ndrei has joined #ruby
GreekFreak has quit [Quit: Leaving]
kalleth has joined #ruby
phrozen77 has joined #ruby
lele has joined #ruby
molaino8 has joined #ruby
Lingo__ has quit [Quit: Lingo - http://www.lingoirc.com]
EvanR is now known as Guest9026
yfeldblu_ has joined #ruby
shredding has joined #ruby
forcefsck has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
M-Technic has quit [Ping timeout: 265 seconds]
bradhe has joined #ruby
destructure has joined #ruby
Guest9026 has quit [Ping timeout: 265 seconds]
M-Technic has joined #ruby
Tamae has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
Yoda- has quit [Ping timeout: 265 seconds]
EvanR_ has joined #ruby
hamakn has quit [Remote host closed the connection]
Xeago_ has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
phrozen77 has quit [Ping timeout: 265 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LostDatagram has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<molaino8> could not execute rspec or gem. what can I do? http://pastebin.com/meg0FhC0
yfeldblu_ has quit [Ping timeout: 240 seconds]
mijicd_ has quit [Remote host closed the connection]
supermat has joined #ruby
lw has joined #ruby
Yoda- has joined #ruby
cina has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
phrozen77 has joined #ruby
molaino8 has quit [Ping timeout: 246 seconds]
mostlybadfly has joined #ruby
newUser1234 has joined #ruby
lyanchih_ has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
forcefsck has joined #ruby
Emmanuel_Chanel has quit [Read error: No route to host]
newUser1234 has quit [Ping timeout: 245 seconds]
haroldwu_ is now known as haroldwu
teddyp1cker has joined #ruby
haroldwu has quit [Changing host]
haroldwu has joined #ruby
mercwithamouth has joined #ruby
cjk101010 has quit [Ping timeout: 265 seconds]
jtz has joined #ruby
jtz has quit [Changing host]
jtz has joined #ruby
Takle has quit [Remote host closed the connection]
ldnunes has joined #ruby
jackneill has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 265 seconds]
phrozen77 has quit [Ping timeout: 265 seconds]
holden247 has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
nvmu has quit [Remote host closed the connection]
nvmme has quit [Remote host closed the connection]
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
yubrew has joined #ruby
emsilva has joined #ruby
Rahul_Roy has joined #ruby
csfranci1 has joined #ruby
Takle has joined #ruby
cjk101010 has joined #ruby
jackneill has joined #ruby
riotjones has joined #ruby
Emmanuel_Chanel has joined #ruby
adammcarth has joined #ruby
<adammcarth> Does anyone else think this algorithm is ignorant?
hamakn has joined #ruby
LostDatagram has quit [Ping timeout: 265 seconds]
aagdbl has quit [Ping timeout: 265 seconds]
Xuerian has quit [Quit: No Ping reply in 180 seconds.]
LostDatagram has joined #ruby
csfrancis has quit [Ping timeout: 265 seconds]
aagdbl has joined #ruby
canton7 has quit [Ping timeout: 265 seconds]
aagdbl has quit [Changing host]
aagdbl has joined #ruby
ryotarai has quit [Ping timeout: 265 seconds]
canton7 has joined #ruby
ryotarai has joined #ruby
Xuerian has joined #ruby
phutchins has joined #ruby
krz has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 276 seconds]
riotjones has quit [Read error: Connection reset by peer]
riotjones has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
lkba has joined #ruby
<tobiasvl> ignorant how?
<Hanmac> adammcarth: hm it could be written better but what do you mean with "ignorant" ?
anaeem1_ has quit [Ping timeout: 265 seconds]
supermat has quit [Ping timeout: 265 seconds]
phrozen77 has joined #ruby
<adammcarth> tobiasvl: Hanmac: It just seems like it's written poorly (like I'm not going about it the best way).
thesheff17 has quit [Ping timeout: 260 seconds]
phansch has quit [Quit: WeeChat 0.4.3]
LostDatagram has quit [Ping timeout: 265 seconds]
<adammcarth> tobiasvl: Hanmac: Checking if `id`.is_a?(Integer), (Array), (Hash) or (Symbol) get's a bit ridiculous when it's repeated in up to 5 or 6 files... could something be put in a function to prevent code duplication?
banister has joined #ruby
banister has quit [Max SendQ exceeded]
tobago has joined #ruby
<Hanmac> adammcarth: the " if id.is_a?(Hash)" should be replaced with a "case ... when ... ", and some ".each" methods should be replaced with ".map"
anaeem1_ has joined #ruby
sk87 has joined #ruby
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lw has quit [Quit: s]
<adammcarth> Is the purpose of using `case`...`when` to improve readability or are there some performance benefits?
<Hanmac> both
SubSignal has joined #ruby
supermat has joined #ruby
sdouglas has joined #ruby
<adammcarth> I need to read into cases more - I haven't really had much to do with it in the past
MissionCritical has joined #ruby
spider-mario has joined #ruby
cqql has quit [Ping timeout: 276 seconds]
<Hanmac> adammcarth: and "method.to_sym == :first" might a problem when method is user-input
LostDatagram has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
whyy has quit [Ping timeout: 276 seconds]
SubSignal has quit [Ping timeout: 252 seconds]
sdouglas has quit [Ping timeout: 252 seconds]
mary5030 has quit [Ping timeout: 265 seconds]
paulfm has quit []
<adammcarth> Hanmac: Why's that?
tobago has quit [Ping timeout: 265 seconds]
tobago has joined #ruby
kartouch has quit [Ping timeout: 265 seconds]
kartouch has joined #ruby
paulfm has joined #ruby
LostDatagram has quit [Ping timeout: 265 seconds]
lkba has quit [Ping timeout: 265 seconds]
fumduq has quit [Ping timeout: 265 seconds]
lkba has joined #ruby
supermat has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Remote host closed the connection]
fumduq has joined #ruby
<Hanmac> adammcarth: symbols cant be deleted ...
davidask has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
<DouweM> adammcarth: meaning users can completely fill up your machine's memory by getting you to allocate as many symbols as they like, if you call user_input.to_sym
<adammcarth> headius: DouweM: Woah.
<DouweM> yeah
predator117 has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
Avahey_ has joined #ruby
banister has joined #ruby
phrozen77 has quit [Ping timeout: 265 seconds]
jcarouth has joined #ruby
Darryl has joined #ruby
<DouweM> do you understand why this is the case, from what you know of symbols? it helps to understand a danger rather than just be aware of it
platzhirsch has left #ruby [#ruby]
LostDatagram has joined #ruby
jemendja has joined #ruby
catepillar has quit [Ping timeout: 265 seconds]
krz has joined #ruby
jemendja has quit [Client Quit]
catepillar has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
ktun has quit [Quit: Textual IRC Client: www.textualapp.com]
mark_locklear has joined #ruby
freannrak has quit [Ping timeout: 265 seconds]
jcarouth has quit [Ping timeout: 265 seconds]
freannrak has joined #ruby
supermat has joined #ruby
dblessing has joined #ruby
aagdbl has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
aagdbl has joined #ruby
ringarin has joined #ruby
benzrf|offline is now known as benzrf
bradhe has joined #ruby
supermat has quit [Excess Flood]
davidask has quit [Quit: Lost terminal]
supermat has joined #ruby
gruz0[russia] has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 240 seconds]
Zebroid has quit [Remote host closed the connection]
<adammcarth> DouweM: Sorry I was just talking in the rails irc and got sidetracked
<DouweM> np
<adammcarth> DouweM: No I actually don't, why is it?
<adammcarth> I'm a little shocked actually
Yoda- has quit [Ping timeout: 265 seconds]
himsin has quit [Quit: himsin]
canton7 has quit [Read error: Connection reset by peer]
Yoda- has joined #ruby
canton7 has joined #ruby
<DouweM> well, the point of symbols is that a symbol by a specific name is only once in memory, so :whatever now and :whatever at any point in the future refer to the same memory, for the singleton :whatever. strings "whatever" and "whatever" *are* different objects, because they are mutable etc. This means that when a string is no longer needed, because (say) the method it's used in is finished, the string can just be removed from memory.
<DouweM> but because the memory for symbol :whatever may be needed at any point in the future to be used when :whatever is used again, symbols can *never be deleted from memory*
Mattias has quit [Ping timeout: 245 seconds]
M-Technic has quit [Ping timeout: 265 seconds]
<DouweM> so every symbol you use gets put into memory and will stay there for the duration of the program. so if your users can get you to build an infinite (or very large) number of symbols, by "a".to_sym, "b".to_sym etc, they can completely fill up your memory because all of those symbols need to be stored and can never be deleted
newUser1234 has joined #ruby
phrozen77 has joined #ruby
M-Technic has joined #ruby
<adammcarth> DouweM: Nice explanation, thank you very much.
<adammcarth> That's really interesting
<benzrf> DouweM: not to mention, if you go over INT_MAX symbols, your program expload
<DouweM> so what you should take away from this is that you should never make symbols out of user input
<DouweM> benzrf: interesting didn't know that!
<benzrf> well
<benzrf> iirc
<DouweM> benzrf: makes sense, and makes this even more dangerous
<adammcarth> I only called .to_sym incase they specified the hash as a string "first" => 5 instead of :first => 5
<adammcarth> so the better way to go about that would just be to use .to_s?
<DouweM> yup. if you want to support both on the input side, use to_s and compare to a string
<DouweM> but if you're sure it's only ever gonna be called by you, #to_sym can be fine too. just beware of the danger
<DouweM> (called by you with your :first or "first", of course, not with any user's method)
GriffinH_ has joined #ruby
supermat has quit [Ping timeout: 265 seconds]
<adammcarth> Yeah cool, gotcha
<adammcarth> I take it you've been a rubyist a long time?
supermat has joined #ruby
bmurt has joined #ruby
<DouweM> about 3 years now
newUser1234 has quit [Ping timeout: 240 seconds]
jrhe has joined #ruby
<DouweM> but this is something you pick up pretty soon when you're in channels like these :P
GriffinHeart has quit [Ping timeout: 276 seconds]
hermanmunster has joined #ruby
Su7 has quit [Read error: Connection reset by peer]
Su7 has joined #ruby
<adammcarth> Oh nice. I'm sure the intellect is very high here... I've only been programming for the better part of 3 months so I tend to shy away from this hahaha
merceris_ has quit [Read error: Connection reset by peer]
garndt has joined #ruby
mercerist has joined #ruby
<bmurt> morning
<DouweM> experience and knowledge more than intellect probably :P but by all means, stay around and you'll learn stuff like this
gregf has quit [Ping timeout: 265 seconds]
teddyp1cker has joined #ruby
<benzrf> adammcarth: no worries m8
<benzrf> adammcarth: its a question of experience far more than inherent knowledge
<benzrf> assuming you have programming aptitude to begin with ;p
Asher has joined #ruby
yubrew has joined #ruby
<adammcarth> html css and js got boring, what can I say
schaary has quit [Ping timeout: 260 seconds]
olleromo_ has quit [Ping timeout: 260 seconds]
merceris_ has joined #ruby
<benzrf> adammcarth: ;)
<adammcarth> off to computer science at uni next year though, should be fun
<benzrf> coo
<DouweM> if JS gets boring you're doing JS wrong, but for HTML and CSS and can see what you mean :P
<DouweM> nice
<DouweM> where are you goin?
mikepack has joined #ruby
<benzrf> DouweM: if js gets boring it means that youre doing js
<benzrf> oh snap
<adammcarth> Trying for Melbourne University
<DouweM> shad ahp benzrf, JS is not that bad :P
SubSignal has joined #ruby
<adammcarth> hahaa - correction - JS got too messy and I couldn't be bothered learning backbone
mercerist has quit [Ping timeout: 240 seconds]
<benzrf> adammcarth: anyway if u get overwhelmed by the seeming expertise of other programmers, just remember that you too could be there and the only difference is TIME
schaary|afk has joined #ruby
<DouweM> hehe, JS without a framework isn't much
olleromo_ has joined #ruby
<benzrf> adammcarth: i was violently reminded of this fact a while back when i started doing haskell
timonv_ has joined #ruby
<benzrf> but now i too can figure out ELEGANT MONADIC SOLUTIONS
<benzrf> :^D
Asher2 has quit [Ping timeout: 265 seconds]
phrozen77 has quit [Ping timeout: 265 seconds]
<benzrf> adammcarth: it's all practice
<adammcarth> benzrf: Got no idea what that means, but it sounds badass. Slap those solutions right on your resume
kalleth has quit [Ping timeout: 265 seconds]
timonv has quit [Remote host closed the connection]
kalleth has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
LostDatagram has quit [Ping timeout: 265 seconds]
<DouweM> benzrf is like the religious guy on the market place yelling about repentence. but with haskell
<ddv> compare a backbone model with a ruby model, js is very verbose
<benzrf> ;)
<adammcarth> verbose, anyone?
LostDatagram has joined #ruby
jinie has joined #ruby
yalue has joined #ruby
noocode has quit [Ping timeout: 265 seconds]
jrhe has quit [Ping timeout: 265 seconds]
ocher has quit [Ping timeout: 260 seconds]
mikepack has quit [Ping timeout: 245 seconds]
<DouweM> adammcarth: either way, Ruby is good choice for a language to learn after basic web dev :)
yubrew has quit [Ping timeout: 264 seconds]
<DouweM> wish I'd started with Ruby rather than PHP
Darryl has quit [Ping timeout: 260 seconds]
mostlybadfly has quit [Ping timeout: 260 seconds]
dioms_ has quit [Ping timeout: 260 seconds]
SegFaultAX has quit [Ping timeout: 260 seconds]
dnyy has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 245 seconds]
Liothen has quit [Ping timeout: 245 seconds]
relix has joined #ruby
<adammcarth> I tried php for a month
Yoda- has quit [Ping timeout: 265 seconds]
metadave has quit [Ping timeout: 245 seconds]
<adammcarth> hated sql
<adammcarth> so I moved onto cakephp
<adammcarth> which wasn't actually that bad
<DouweM> that's hardly PHP's fault
dioms_ has joined #ruby
<adammcarth> CakePHP is strikingly similar to rails
timonv_ has quit [Ping timeout: 245 seconds]
<adammcarth> but I fell in love with Sinatra
sambao21 has joined #ruby
mostlybadfly has joined #ruby
im0b has joined #ruby
Darryl has joined #ruby
metadave has joined #ruby
blaxter has quit [Ping timeout: 276 seconds]
dnyy has joined #ruby
<adammcarth> (the dsl not the actual guy, although I hear he has a nice voice)
<DouweM> hehe
Takle has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
Liothen has joined #ruby
noocode has joined #ruby
alex88 has joined #ruby
Yoda- has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
jrhe has joined #ruby
<benzrf> php is a clusterfuck of awful
teddyp1cker has quit []
LostDatagram has quit [Ping timeout: 265 seconds]
catepillar has quit [Ping timeout: 265 seconds]
<benzrf> centrx is not here q.q
jinie has joined #ruby
<bmurt> if you guys are loading a yaml into a ruby CLI for configuration settings, would you put that into its own method?
anaeem1_ has quit [Remote host closed the connection]
<DouweM> bmurt: sure
<bmurt> i think im running into a scope issue, but i haven't found a complete walkthrough online covering that aspect
wald0 has joined #ruby
catepillar has joined #ruby
<adammcarth> I hear charlie somerville gives a good talk on why php sucks so bad
<adammcarth> ironic how he made his website favicon the php logo
timonv has joined #ruby
<DouweM> adammcarth: never seen his talk, got a link or smth?
<benzrf> isnt he like 20
<bmurt> i'm trying to store the smtp settings in a config.yaml and simply import & use
LostDatagram has joined #ruby
<benzrf> howd he manage to get a talk >:o
<adammcarth> benzrf: I've known him online since he was 15
<benzrf> cool
<adammcarth> The kid got a talk when he was 17 at railsconf
<DouweM> benzrf: yeah he young but he's pretty big in the community, of course het gets to talk :P
phrozen77 has joined #ruby
<benzrf> im jelly
<benzrf> why cant *I* get a talk
<DouweM> benzrf: same here :P
<benzrf> im likemike
<benzrf> *like
<adammcarth> Yeah where's my talk
<benzrf> HUGE in the community
<benzrf> just look at how much i post here
<adammcarth> I could talk about symbols now
<benzrf> god damn
<DouweM> adammcarth: I'm 20 btw, benzrf probably somewhere around that too
<benzrf> nah im 17
<DouweM> benzrf: hehe
byteoverfl0w has quit [Remote host closed the connection]
Takle has joined #ruby
<adammcarth> people would be like dayumm - adam your symbol security talk rocks
lyanchih has joined #ruby
Yoda- has quit [Ping timeout: 265 seconds]
<DouweM> benzrf: when are you going off to college?
<adammcarth> Oh cool guys, yeah I'm 17 too benzrf
<DouweM> adammcarth: haha
<benzrf> implying i have any idea
oo_ has quit [Remote host closed the connection]
<adammcarth> benzrf: Are you turning 18 this year?
<Takumo> Anyone here use faraday, and if so, how do you change the timeout? (noob question probably)
oo_ has joined #ruby
<benzrf> adammcarth: next
whyy has joined #ruby
<adammcarth> benzrf: Damn - how long have you been programming for?
oo_ has quit [Remote host closed the connection]
<benzrf> adammcarth: about 10 years
<DouweM> adammcarth: since I was 9, benzrf beat me by 2 years :P
<adammcarth> That's crazy
<benzrf> DouweM: u jelly m8
<railzFor_> dayum gusy so early
<adammcarth> im jelly of both of you
<railzFor_> how i wish
<DouweM> benzrf: meh, I can drink legally
olleromo_ has quit [Ping timeout: 260 seconds]
nifty has quit [Ping timeout: 260 seconds]
bjeanes has quit [Ping timeout: 260 seconds]
<DouweM> benzrf: where are you from anyway
<adammcarth> hahahahaha
<benzrf> DouweM: implying i intend to consume alcohol
<adammcarth> He's got you there.
<DouweM> benzrf: fair enough :P
<benzrf> my body is like a jenga tower
<benzrf> if i drank alcohol id probably vomit immediately and wake up with the worlds worst hangover
<benzrf> DouweM: maine
<DouweM> how so
rezzack has quit [Ping timeout: 265 seconds]
<adammcarth> 17 and still haven't had a beer?
<adammcarth> he aint Australian
<adammcarth> ill tell you that much
bjeanes has joined #ruby
nifty has joined #ruby
<railzFor_> lol
Yoda- has joined #ruby
noocode has quit [Ping timeout: 265 seconds]
olleromo__ has joined #ruby
<benzrf> DouweM: as previously mentioned my body is like a jenga tower
<DouweM> beznrf: all right, on the off chance you were in the LA area we could meet up in October or so when I go over there. but alas
<DouweM> adammcarth: cheers
<benzrf> DouweM: lol
<benzrf> i might be going to lambdajam
nszceta has quit []
rezzack has joined #ruby
<adammcarth> DouweM: What did I get cheers'd for?
<DouweM> adammcarth: love of beer?
byteoverfl0w has joined #ruby
<adammcarth> Oh, I'll drink to that.
noocode has joined #ruby
<DouweM> hence my cheers
lw has joined #ruby
<adammcarth> benzrf, in all your 17 years - what's the coolest project you've worked on
shvelo has quit [Quit: Leaving]
lele has quit [Ping timeout: 265 seconds]
<benzrf> adammcarth: fuck if i kno
qwyeth has joined #ruby
<adammcarth> well that sucks
<benzrf> quick was pretty neat but it was ultimately suck
<adammcarth> even I've made something
<benzrf> atm im makin a thing for haskell
<DouweM> benzrf: why'dya give up on quick?
dnyy has quit [Ping timeout: 260 seconds]
olleromo__ is now known as olleromo_
lele has joined #ruby
<benzrf> DouweM: it was brittle and crashed easily and i couldnt add the features i wanted without it messin up
<DouweM> aw
whyy has quit []
<benzrf> ultimately i got sick of all the shit
<DouweM> I saw no use for it but it was neat :P
<bmurt> what was it?
<bmurt> or its main features?
<benzrf> i could try starting over without using FUSE but i dont know how else i could make a generic unixy interface
<benzrf> which was the whole point
dnyy has joined #ruby
<benzrf> bmurt: check the README.md
phrozen77 has quit [Max SendQ exceeded]
<adammcarth> It was his stab guys
<benzrf> DouweM: u see i could make some kind of program-specific interface for what im talking about
<benzrf> DouweM: but i think that kind of thing already existed for emacs and so on
<bmurt> gotcha
<benzrf> i was trying to make something that would naturally interface with any tool you like
<benzrf> so a filesystem was the obvious choice
<benzrf> since almost any unix tool can work with files
<DouweM> right
<DouweM> but fuse was too hard to work with?
<adammcarth> benzrf do you not have school today?
LostDatagram has quit [Ping timeout: 265 seconds]
<benzrf> DouweM: it was a butt
<benzrf> adammcarth: im slackin off in class ;3
<DouweM> benzrf: haha
kpshek has joined #ruby
<adammcarth> benzrf: Good stuff. What class?
<DouweM> benzrf: what class?
<benzrf> engineering or something
<adammcarth> Oh man - don't even bother
<benzrf> DouweM: the last straw was when it turned out it got trapped in an unkillable hang if you tried to eval code that accessed files in the FS
<DouweM> lol
Yoda- has quit [Ping timeout: 265 seconds]
jottr_ has joined #ruby
LostDatagram has joined #ruby
<benzrf> DouweM: i.e. 'quick pry' => 'File.read "foo.rb"' => oopsie guess kill -9 doesnt work on this opne
<benzrf> *one
taybin has joined #ruby
robertodecurnex has joined #ruby
ringarin has quit [Ping timeout: 265 seconds]
<benzrf> i might start over if i had any other ideas as to how to provide a uniform interface
<benzrf> :\
olleromo_ has quit [Ping timeout: 265 seconds]
<DouweM> afraid I got no great ideas for you there :P
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
olleromo__ has joined #ruby
gregf has joined #ruby
cocotton has joined #ruby
Yoda- has joined #ruby
ringarin has joined #ruby
phrozen77 has joined #ruby
LnL_ has joined #ruby
atmosx has quit [Ping timeout: 264 seconds]
LnL has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
oddalot has joined #ruby
ndrei has joined #ruby
<dangerousdave> Can someone tell me why this YAML does not validate please? https://gist.github.com/deathwishdave/b37061eeb958d2e564d1
eka has joined #ruby
<deepy> dangerousdave: doesn't line 25-26 look fishy to you?
<DouweM> sure looks fishy to me
dnyy has quit [Ping timeout: 260 seconds]
MZAWeb has joined #ruby
<deepy> Like, if you compare them with line 2-3
<dangerousdave> ah, indent!
<dangerousdave> I was focusing on line 2
mary5030 has joined #ruby
atmosx has joined #ruby
shredding has quit [Quit: shredding]
lw has quit [Ping timeout: 240 seconds]
dnyy has joined #ruby
adammcarth has quit []
<dangerousdave> thanks
kaichanvong has quit [Quit: _]
TheKruex has joined #ruby
linojon has joined #ruby
sailias has joined #ruby
eka has quit [Client Quit]
almostwhitehat has joined #ruby
lw has joined #ruby
TheKruex has quit []
TheKruex has joined #ruby
doodlehaus has joined #ruby
toretore has joined #ruby
yfeldblum has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
djcp has joined #ruby
djcp has left #ruby [#ruby]
Yoda- has quit [Ping timeout: 265 seconds]
kaichanvong has joined #ruby
tungd has joined #ruby
karmatr0n has joined #ruby
Yoda- has joined #ruby
<AlHafoudh> wal
codeurge has joined #ruby
Butcho has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
aganov has joined #ruby
marr has quit [Ping timeout: 240 seconds]
JokerDoom has joined #ruby
lw has quit [Ping timeout: 264 seconds]
sski has joined #ruby
kevind has joined #ruby
<benzrf> yo RubyPanther
adantj has joined #ruby
<benzrf> RubyPanther: do u know somebody named david johnston
Butcho has quit [Client Quit]
lw has joined #ruby
Butcho has joined #ruby
Butcho has quit [Max SendQ exceeded]
northfurr has joined #ruby
ascarter has joined #ruby
<railzFor_> does the indent really make that much of differnce in Yaml ?
Yoda- has quit [Ping timeout: 265 seconds]
lxsameer has quit [Quit: Leaving]
ascarter has quit [Max SendQ exceeded]
lw has quit [Max SendQ exceeded]
<railzFor_> looked odd but wasnt sure ?
ascarter has joined #ruby
phrozen77 has quit [Ping timeout: 265 seconds]
lw has joined #ruby
mania has joined #ruby
mary5030 has joined #ruby
jheg has joined #ruby
Yoda- has joined #ruby
jerius has joined #ruby
alexju has joined #ruby
tungd has quit [Ping timeout: 264 seconds]
mjsmith2 has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Remote host closed the connection]
kwd_ has joined #ruby
kwd has quit [Read error: Connection reset by peer]
kwd_ is now known as kwd
mania has quit [Ping timeout: 240 seconds]
Zebroid has joined #ruby
MZAWeb has quit [Ping timeout: 272 seconds]
Uranio has joined #ruby
SubSignal has quit [Remote host closed the connection]
vinleod has joined #ruby
kaspergrubbe has joined #ruby
LostDatagram has quit [Ping timeout: 265 seconds]
lele has quit [Ping timeout: 265 seconds]
jespada has joined #ruby
jinie has quit [Ping timeout: 265 seconds]
StevenNunez has joined #ruby
snath has quit [Ping timeout: 240 seconds]
SubSignal has joined #ruby
yubrew has joined #ruby
LostDatagram has joined #ruby
JBreit has joined #ruby
lele has joined #ruby
jinie has joined #ruby
karmatr0_ has joined #ruby
Uranio has quit [Ping timeout: 264 seconds]
gfunc has joined #ruby
tkuchiki_ has joined #ruby
phrozen77 has joined #ruby
Uranio has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
karmatr0n has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has quit [Ping timeout: 240 seconds]
jeregrine has joined #ruby
kitak has quit [Read error: Connection reset by peer]
markmarkmark has left #ruby ["parting is such sweet sorrow"]
kitak has joined #ruby
pontiki has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
tkuchiki_ has quit [Ping timeout: 264 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mattstratton has joined #ruby
Morkel_ has joined #ruby
Uranio has quit [Ping timeout: 264 seconds]
mrgrieves has quit [Quit: Lost terminal]
TheKruex has quit []
Takle has quit [Remote host closed the connection]
TheKruex has joined #ruby
Takle has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 276 seconds]
Morkel_ is now known as Morkel
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
<benzrf> h
sk87 has joined #ruby
<GeorgesLeYeti> I have a text with a sometimes a space at the begining of each line.
<benzrf> strip
horrror has joined #ruby
<benzrf> * lstrip
<GeorgesLeYeti> And i want to remove it
<benzrf> >> " foo bar".lstrip
Port3M5[Work] has quit [Read error: Connection reset by peer]
<benzrf> >> " foo bar".lstrip
* benzrf smacks eval-in
kilk_ has quit [Ping timeout: 260 seconds]
<GeorgesLeYeti> 'l' mean line
<GeorgesLeYeti> ?
<benzrf> >> " foo bar".lstrip
<benzrf> GeorgesLeYeti: means left
<benzrf> there's strip, lstrip, and rstrip
<benzrf> strip does both sides, l does left, r does right
<horrror> hi, i'm using system('curl -X post') , the results prints to screen but when I try to assign to variable it saves boolean true val
<horrror> how can i access the response data?
NukePuppy has joined #ruby
<eval-in> benzrf => "foo bar" (https://eval.in/161004)
<eval-in> benzrf => "foo bar" (https://eval.in/161005)
<eval-in> benzrf => "foo bar" (https://eval.in/161006)
<pontiki> lol
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
Zenigor has joined #ruby
sinkensa_ has joined #ruby
<benzrf> horrror: you want ``
amargherio has joined #ruby
<benzrf> but use a ruby library!
sinkensabe has quit [Remote host closed the connection]
<benzrf> shelling out is for perlists
sk87 has quit [Client Quit]
<GeorgesLeYeti> Ok but still same problem. i made text.each_line{ |line| line.lstrip! }
<GeorgesLeYeti> seam to work when i print each line but text stay the same
<horrror> benzrf: where to put `` ?
chipotle has quit [Ping timeout: 240 seconds]
ehc has joined #ruby
<benzrf> horrror: don't
<benzrf> use a reaaalll library
<GeorgesLeYeti> horrror: i'm using Faraday
<horrror> i tried but i have trouble setting header 'Content-Type: audio/x-flac; rate=16000;'
hermanmunster has quit [Remote host closed the connection]
oo_ has joined #ruby
hermanmunster has joined #ruby
sinkensa_ has quit [Ping timeout: 264 seconds]
<horrror> and post audio file
TheKruex has quit []
chipotle has joined #ruby
cocotton has quit [Remote host closed the connection]
metasyntax has joined #ruby
tkuchiki has joined #ruby
hermanmunster has quit [Read error: No route to host]
hermanmunster has joined #ruby
Zenigor_ has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
enebo has joined #ruby
sdouglas has joined #ruby
Zenigor has quit [Ping timeout: 245 seconds]
beef-wellington has joined #ruby
cpruitt has joined #ruby
kaspergrubbe has joined #ruby
Zebroid has quit [Remote host closed the connection]
krz has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
taybin has quit [Quit: This computer has gone to sleep]
yacks has quit [Ping timeout: 276 seconds]
<jheg> o/
<jheg> struggling to understand the logic of this ...
freerobby has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<jheg> arr = [["b", 1],["c", 2],["d", 3]]
asteve has joined #ruby
<jheg> and I want to delete 1 from the first array
<jheg> I'd do this
Alina-malina has joined #ruby
<jheg> arr.first.delete(arr.first.last)
<jheg> right?
<horrror> this is weird. i'm posting to http and first i receive {results: []} and after few seconds i get another { results: ["boa blablbal", "lblablbla"] }. the http response catches only the first one. How can I handle the second one?
<jheg> what I don't understand is that the first part of that selects the first array in arr so why in the delete argument am I having to select the first array in are again?
<DouweM> horrror: what do you mean your first receive X and then Y? you send one request and the server sends two responses?
sinkensabe has joined #ruby
<jheg> arr.first.delete selects the array ["b",1]
<horrror> DouweM: yes , so it seems
yfeldblum has joined #ruby
lemur has joined #ruby
<DouweM> horrror: that makes no sense. what URL is this you're posting to?
<DouweM> jheg: right
Takle has quit [Remote host closed the connection]
<jheg> so I would have though that I then only need to select the element index as the argument like are.last
marr has joined #ruby
bradhe has joined #ruby
<jheg> but I need to select that element by arr.first.last
<DouweM> jheg: you can do arr.first.pop
<DouweM> jheg: why would arr.last be enough? arr.last is ["c",3]
<DouweM> jheg: you don't want to delete _that_ from arr.first which is ["a",1]
<jheg> but as the argument of arr.first.delete() I am in the first array right?
cocotton has joined #ruby
<DouweM> you want to get at the last item in ["a",1] so arr.first.last
cocotton has quit [Remote host closed the connection]
<DouweM> jheg: you're not suddenly anywhere, you're still in the same scope you were before
<DouweM> you're just calling a method on arr.first
cocotton has joined #ruby
mikesplain has joined #ruby
<jheg> yeah so arr.first.delete(arr.first.last) is correct?
<DouweM> would work, but arr.first.pop is probably better
<jheg> yeah sure I see how that would be better
Zebroid has joined #ruby
<lemur> https://github.com/baweaver/pry-session - Introducing Pry Sessions, save and load sessions in pry.
<jheg> but am I right in thinking arr.delete(arr.first.last) would make more sense than arr.first.delete(are.first.last)?
tobago has quit [Remote host closed the connection]
<jheg> it just seems to me that the first method on the first part of that is redundant
oponder has joined #ruby
hakunin_ is now known as hakunin
yfeldblum has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby
diegoviola has quit [Remote host closed the connection]
<DouweM> you're wrong, you want to delete something from ["a",1], not from the entire arr. so of course you need arr.first to get at that ["a", 1] at all
Takle has joined #ruby
<DouweM> then you can do with that array whatever you want, which is delete the 1
<DouweM> how to get at the 1? first get at the ["a", 1], then get at the 1, so arr.first and then arr.first.last
bradhe has quit [Ping timeout: 245 seconds]
<DouweM> the way it works makes perfect sense, I think you misunderstand scope
RaCx has joined #ruby
<jheg> yes I think I have misunderstood something because its seems to me that I am twice selecting the first array
s3ri0us has joined #ruby
xjiujiu has joined #ruby
<DouweM> of course you are
<jheg> in part one arr.first and in part two arr.first.la.......
<DouweM> right
Alina-malina has quit [Ping timeout: 240 seconds]
GoodTimes has quit [Ping timeout: 252 seconds]
Rollabunna has joined #ruby
<DouweM> you need to get at the first array twice, once because you need to get the entire thing, and then again when you want to get its last element
<DouweM> would it make more sense to you if you assigned arr.first to a variable firs?
failshell has joined #ruby
<DouweM> like first_array = arr.first, and then first_array.delete(first_array.last0
LnL_ is now known as LnL
<jheg> See what you mean yes it would :)
bluOxigen has joined #ruby
yubrew has joined #ruby
<DouweM> arr.first and first_array are equivalent, so they should make equal sense to you :)
<jheg> I suppose that I just thought that once you have selected the array you want to manipulate arr.first.delete then you would just be able to specify the index of the element to be deleted
<jheg> know what I mean?
<DouweM> oh you definitely can, but that's not what you were doing with #delete ;)
taybin has joined #ruby
<jheg> oh dear i sense a whole new level of confusion coming up
<DouweM> right now you're specifying the element you want to destroy, not its index. to get at the index you need arr.first.last
jobewan has joined #ruby
<DouweM> if you know it's at index 1, you can do arr.first.delete_at(1)
freezey has joined #ruby
<jheg> oh good :)
Avahey_ has quit [Quit: Connection closed for inactivity]
<jheg> thank you DouweM
jprovazn is now known as jprovazn_afk
Burgestrand has quit [Quit: Burgestrand]
Jalada has joined #ruby
tagrudev has quit [Remote host closed the connection]
freezey has quit [Read error: Connection reset by peer]
<Jalada> Is it possible for an exception's backtrace to be nil?
freezey has joined #ruby
eka has joined #ruby
JBreit has left #ruby ["Leaving"]
RaCx has quit [Read error: Connection reset by peer]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
pietr0 has joined #ruby
originalpete__ has joined #ruby
<Mon_Ouie> Yes, but raising the exception will set its backtrace to an actual array of strings
<Jalada> ok
ahofmann has joined #ruby
<Jalada> makes sense
VinceThePrince has quit [Ping timeout: 252 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
poguez_ has joined #ruby
xjiujiu has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
RaCx has joined #ruby
Bira has joined #ruby
panzi has joined #ruby
panzi has quit [Client Quit]
chipotle has joined #ruby
cina has quit [Ping timeout: 245 seconds]
ari-_-e has quit [Quit: Leaving]
b1205 has joined #ruby
benzrf is now known as benzrf|offline
robertodecurnex has quit [Excess Flood]
rippa has joined #ruby
Yoda- has quit [Quit: Bouncer either died or restarting.]
blinkdesign has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
blinkdesign has joined #ruby
robertodecurnex has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
scx_ is now known as scx
Takle has quit [Remote host closed the connection]
xjiujiu has joined #ruby
blinkdes_ has joined #ruby
shredding has joined #ruby
blinkdesign has quit [Read error: Connection reset by peer]
Jalada has left #ruby ["Textual IRC Client: www.textualapp.com"]
shime_ has joined #ruby
thesheff17 has joined #ruby
Zenigor_ has quit [Remote host closed the connection]
arrubin has joined #ruby
Zenigor has joined #ruby
monkegjinni has joined #ruby
shime has quit [Ping timeout: 252 seconds]
Eyes has quit [Quit: Leaving]
Eyes has joined #ruby
mikepack has joined #ruby
taybin has quit [Quit: This computer has gone to sleep]
codabrin_ has joined #ruby
SCommette has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
codabrink has quit [Ping timeout: 260 seconds]
xjiujiu has joined #ruby
tungd has joined #ruby
blackmesa has joined #ruby
pietr0 has quit [Quit: pietr0]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has quit [Quit: cpruitt]
treehug88 has joined #ruby
cephalostrum has quit [Ping timeout: 252 seconds]
larsam has joined #ruby
sk87 has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
ahofmann has quit [Quit: Computer has gone to sleep.]
tier has joined #ruby
ixti has joined #ruby
cephalostrum has joined #ruby
whyy has joined #ruby
Ningen_UA has quit [Ping timeout: 276 seconds]
cpruitt has joined #ruby
Guest88881 is now known as C0deMaver1ck
dik_dak has joined #ruby
kies has quit [Ping timeout: 245 seconds]
<hfp> Hey guys, I'm trying to write a snippet that would take today's date and calculate when was 100 days ago. But I would like to skip weekends in my count. How would you go about it?
<arrubin> How accurate must it be?
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
kies has joined #ruby
<Sigma00> multiply the number your user gives you by 7/5 then substract that from the date
xjiujiu has joined #ruby
<olivier_bK> i try to parse a html file with nokogiri i can get the tite of file but i cant rescue any data i try to parse a multiple div
<Sigma00> >> days= 40; puts Date.today - (days * 7/5).days
<eval-in> Sigma00 => undefined method `today' for Date:Class (NoMethodError) ... (https://eval.in/161073)
<Sigma00> >> days= 40; puts Time.now - (days * 7/5).days
<eval-in> Sigma00 => undefined method `days' for 56:Fixnum (NoMethodError) ... (https://eval.in/161075)
<Sigma00> fucking
<hfp> Sigma00: It's not accurate enough. Because then I am getting quotes for the interval and there are no quotes on weekends.
happytux has joined #ruby
<happytux> hi
northfurr has quit [Quit: northfurr]
<Sigma00> it's not accurate because it's assuming there are X amount of perfect weeks, yeah
<happytux> undefined method `display_name' for RSpec::ExampleGroups
<happytux> great
<Sigma00> but you can take that and add code to deal with cases when it's not sunday
oponder has quit []
<olivier_bK> how i can do that
<olivier_bK> some on here search a job in ruby in USA ??
sinkensabe has quit [Remote host closed the connection]
<happytux> oh no
<happytux> undefined method `display_name' for RSpec::ExampleGroups
<happytux> Which brings me onto a maze between different closed references.
sinkensabe has joined #ruby
<happytux> Some circular reference thing. An issue by itself.
<happytux> Could someone give me a hint if they already solved the issue?
byteoverfl0w has quit [Quit: Leaving... have a good one...]
toastynerd has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
newUser1234 has quit [Remote host closed the connection]
xjiujiu has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<Sigma00> happytux: sounds like you need to upgrade rspec or downgrade rspec-puppet
Zebroid has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 240 seconds]
kwd has quit [Quit: kwd]
hpoydar has joined #ruby
VinceThePrince has joined #ruby
blinkdes_ has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
Brando753 has joined #ruby
StevenNunez has quit [Remote host closed the connection]
jottr_ is now known as jottr
bradhe has joined #ruby
momomomomo has joined #ruby
havenwood has joined #ruby
geggam has joined #ruby
SubSignal has quit [Remote host closed the connection]
blinkdesign has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
SBoolean has joined #ruby
ringarin has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
chrishough has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
emsilva has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
beef-wellington has quit [Ping timeout: 272 seconds]
Zai00 has joined #ruby
<shevy> dumdedum
Beoran__ has joined #ruby
phinfonet has joined #ruby
oo_ has joined #ruby
djdb has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 260 seconds]
lemur has quit [Read error: Connection reset by peer]
danman has joined #ruby
flops has quit [Ping timeout: 240 seconds]
<shevy> how can I from within a .rb file
<shevy> get all dependencies of a specific gem?
<shevy> say the gem name is 'foobar'
SCommette has quit [Quit: SCommette]
VinceThePrince has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
<bmurt> im having some difficulty using configatron's configure_from_hash method. https://github.com/markbates/configatron#hashyaml
lemur has joined #ruby
toastynerd has quit [Remote host closed the connection]
georgschlenkhoff has joined #ruby
Beoran_ has quit [Ping timeout: 240 seconds]
<georgschlenkhoff> Does anyone know what is the CMS behind http://guides.rubyonrails.org/ ?
<bmurt> i have my config.yaml that gets loaded to a variable called 'config'. so i have: configatron.configure_from_hash(config) but im unsure how to reference using configatron's syntax
mikepack has joined #ruby
<bmurt> the output from 'puts configatron.inspect' is: configatron.mail = [{"smtp_server"=>"mail.domain.us"}, {"username"=>"brendan@domain.us"}, {"password"=>"password123"}, {"port"=>25}, {"use_ttls"=>false}, {"use_ssl"=>false}, {"enable_auto_ttls"=>false}, {"openssl_verify_mode"=>"none"}]
<bmurt> i was really trying to find out in the example on the github page, how they had the hash/yaml formatted
ffranz has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
stantona has joined #ruby
<Sigma00> !gist
<helpa> http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<bmurt> its one line
<bmurt> :P
<Sigma00> bmurt: that's not a hash
<Sigma00> that's an array of single-key hashes
Alina-malina has joined #ruby
<shevy> bmurt notice the leading [
Tuor has joined #ruby
<Sigma00> >> {a:1, b:2, c: {d: 3, e: 4}}.to_yml
<eval-in> Sigma00 => undefined method `to_yml' for {:a=>1, :b=>2, :c=>{:d=>3, :e=>4}}:Hash (NoMethodError) ... (https://eval.in/161090)
<Sigma00> >> {a:1, b:2, c: {d: 3, e: 4}}.to_yaml
<eval-in> Sigma00 => undefined method `to_yaml' for {:a=>1, :b=>2, :c=>{:d=>3, :e=>4}}:Hash (NoMethodError) ... (https://eval.in/161091)
<Sigma00> whoops
<shevy> haha Sigma00 :D
<Sigma00> OH MY GOD
<shevy> psych is a binding to libyaml and eval-in hates C-like addons
<bmurt> the leading [ signifies an array?
<Sigma00> >> require 'yaml'; {a:1, b:2, c: {d: 3, e: 4}}.to_yaml
<eval-in> Sigma00 => (https://eval.in/161092)
<shevy> yeah
<banister> shevy hello
<shevy> look bmurt:
<shevy> >> array = []; array << 'foo'; array
<eval-in> shevy => ["foo"] (https://eval.in/161093)
Bira has quit []
<shevy> >> array = []; array << 'foo'; array.class
<eval-in> shevy => Array (https://eval.in/161094)
<Sigma00> fuck it, eval hates when you require shit
fabrice31 has quit [Remote host closed the connection]
<shevy> you could have malicious intent!
paulfm has quit []
<bmurt> there we go
<happytux> Sigma00: I have to use a specific Ruby version because for proper testing it has to be the same Runtime as Puppet uses on the System.
beef-wellington has joined #ruby
<bmurt> i removed the -'s entries in the yaml so now... i think it'll be hashed versus in array
chipotle_ has joined #ruby
<bmurt> the .inspect looks much better
<banister> >> ["shevy,", "gonna beat u", "beat you so bad"].join.display
<eval-in> banister => shevy,gonna beat ubeat you so badnil (https://eval.in/161095)
<happytux> Sigma00: rspec-core 3.0.0
<bmurt> shevy: configatron.mail.port = 25
<bmurt> ty Sigma00 & shevy
<happytux> shevy: hi
<shevy> happytux hi
<banister> >> ["shevy,", "gonna beat u,", "beat you so bad"].join(" ").display
<eval-in> banister => shevy, gonna beat u, beat you so badnil (https://eval.in/161096)
<happytux> Sigma00: Ruby version 1.9.3-p194
Spami has joined #ruby
<Sigma00> happytux: I'm just saying what comes to mind when I read those git issues
<happytux> shevy: did the links help yesterday?
<happytux> Sigma00: it sounds reasonable
<shevy> happytux not sure, I wasn't awake for much longer afterwards haha
<happytux> Sigma00: I have to find out if I can upgrade rspec
maletor has joined #ruby
<happytux> shevy: This one gives a good picture: https://www.ruby-toolbox.com/categories/image_processing
kiri has quit [Ping timeout: 260 seconds]
<happytux> native ruby
Hobogrammer has joined #ruby
Alina-malina has quit [Max SendQ exceeded]
<Sigma00> and this is why native ruby image gems don't usually make it: OilyPNG is a drop in mixin module that implements some of the ChunkyPNG algorithms in C, which provides a massive speed boost to encoding and decoding.
* Sigma00 chuckles
<banister> Sigma00 how does that follow
subraminion has joined #ruby
Alina-malina has joined #ruby
<Sigma00> "here, have a native gem that's slow, and a module to make it non-native but much faster"
<banister> Sigma00 well of course ruby would be bad at something like image manip :)
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
Takle has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
<Sigma00> yes, that's exactly what I'm saying
b00stfr3ak has joined #ruby
diegoviola has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
paulfm has joined #ruby
Tuor has quit [Quit: Leaving]
maestrojed has joined #ruby
mania has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
binaryhat has joined #ruby
b1205 has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
happytux has quit [Read error: Connection reset by peer]
mordof has left #ruby [#ruby]
yacks has joined #ruby
Takle has quit [Remote host closed the connection]
happytux_ has joined #ruby
RaCx has quit [Ping timeout: 245 seconds]
zarubin has quit []
RaCx has joined #ruby
mania has quit [Ping timeout: 264 seconds]
lewix has joined #ruby
Takle has joined #ruby
happytux_ is now known as happytux
havenwood has quit [Remote host closed the connection]
niharvey is now known as niharvey|out
forcefsck has quit [Ping timeout: 252 seconds]
georgschlenkhoff has left #ruby ["Bye, bye"]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
karmatr0_ has quit [Remote host closed the connection]
wldcordeiro has quit [Read error: Connection reset by peer]
georgschlenkhoff has joined #ruby
noop has quit [Ping timeout: 276 seconds]
norm has joined #ruby
georgschlenkhoff has left #ruby ["Bye, bye"]
norm has left #ruby [#ruby]
dawkirst has joined #ruby
b1205 has joined #ruby
yubrew_ has joined #ruby
almostwhitehat has quit [Quit: almostwhitehat]
sdouglas has joined #ruby
snath has joined #ruby
kireevco has joined #ruby
yubrew__ has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
benzrf|offline is now known as benzrf
qba73 has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 245 seconds]
yubrew_ has quit [Ping timeout: 272 seconds]
lolmaus has joined #ruby
binaryhat has quit [Quit: Leaving]
GoodTimes has joined #ruby
havenwood has joined #ruby
Wolland has joined #ruby
railzFor_ has quit [Ping timeout: 260 seconds]
lord4163 has left #ruby [#ruby]
sambao21 has quit [Quit: Computer has gone to sleep.]
newUser1234 has joined #ruby
Valesk has joined #ruby
sambao21 has joined #ruby
railzForDaiz has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
bradhe has joined #ruby
Valesk has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
jxf has joined #ruby
JohnBat26 has quit [Ping timeout: 276 seconds]
horrror has quit [Quit: horrror]
RaCx has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
RaCx has joined #ruby
larsam has quit [Quit: larsam]
bradhe has quit [Ping timeout: 245 seconds]
sputnik13 has joined #ruby
cocotton has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
cocotton has joined #ruby
freezey has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
<happytux> I solved the rspec issue by downgrading. I hope they will solve the issue with the next release.
<happytux> I hate those nasty suprises.
yfeldblum has joined #ruby
cocotton has joined #ruby
Morkel has quit [Quit: Morkel]
Alina-malina has quit [Ping timeout: 272 seconds]
i_s has joined #ruby
marr has quit [Ping timeout: 264 seconds]
forcefsck has joined #ruby
mania has joined #ruby
aspires has joined #ruby
wldcordeiro has joined #ruby
forcefsck is now known as chth0n
benzrf is now known as benzrf|offline
wallerdev has joined #ruby
deric_skibotn has joined #ruby
sailias has quit [Quit: Leaving.]
zB0hs has joined #ruby
redondos has quit [Excess Flood]
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
tungd has quit [Ping timeout: 240 seconds]
troyready has joined #ruby
alex88 has quit [Quit: Leaving...]
arya_ has joined #ruby
taybin has joined #ruby
vaicine has left #ruby [#ruby]
marr has joined #ruby
lyanchih has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
wjimenez5271 has joined #ruby
originalpete__ has left #ruby [#ruby]
sski has quit [Remote host closed the connection]
lkba has joined #ruby
sski has joined #ruby
IcyDragon has joined #ruby
Atrumx has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
tacit7 has joined #ruby
stantona has quit [Remote host closed the connection]
hpoydar has quit [Remote host closed the connection]
yetanotherdave has joined #ruby
Zenigor has quit [Remote host closed the connection]
bthesorceror has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
IcyDragon is now known as IceDragon
_bart has joined #ruby
brasten has joined #ruby
toastynerd has joined #ruby
<bmurt> blah.... /usr/local/lib/ruby/2.0.0/net/smtp.rb:541:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) :(
arya_ has quit [Quit: sayonara ^_^]
_bart has quit [Client Quit]
sski has quit [Ping timeout: 240 seconds]
<bmurt> i wish there was more detail as to why the connection was refused
<canton7> the other side wasn't listening - you tried to connect to a port, and there wasn't anything to accept the connection
<canton7> that's literally that ruby knows - it's all that TCP will tell you
<canton7> *all that ruby knows
bthesorceror has quit [Quit: bthesorceror]
bthesorceror has joined #ruby
<bmurt> i think its a bug with the mail gem and instance variables. if i hard code the values, boom roasted & we're good. i'm even outputitng the variables prior to being used the Mail's code block and they're present
hpoydar has joined #ruby
stantona has joined #ruby
<bmurt> its using my smtp server on my 2nd vps, but the request doesn't get that far
<bmurt> i can telnet from the origination point via 25 as well without issue
<canton7> aha, 'mail gem'
<canton7> so it looks like it's passing some bad args to the socket layer, probably
<canton7> (pony is the best mail-sending library ever, btw)
<canton7> so yeah, it would be nice if that gem caught the ECONNREFUSED exception and gave you some more details
mikecmpbll has quit [Ping timeout: 240 seconds]
olivier_bK has quit [Ping timeout: 245 seconds]
<bmurt> hmm, pony
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
freezey has joined #ruby
<bmurt> what i'm trying to do is pull the smtp settings from a YAML to be used
Alina-malina has joined #ruby
<bmurt> interesting suggestion canton7
<bmurt> im going to look into pony
<canton7> I've never used mail, but I've used pony with plenty of success
jhass|off is now known as jhass
<canton7> anyway, I suggest you examine the parameters you're passing into the mail gem just before you pass them in
nateberkopec has joined #ruby
<canton7> make totally sure they're right
<canton7> (hint: they probably aren't)
<bmurt> well, i've done p and puts and the values are there
almostwhitehat has joined #ruby
segfalt has joined #ruby
<canton7> are the right values in the right places? try hard-coding them
<canton7> check for whitespace, unprintable characters, etc, as well
lw has quit [Quit: s]
crome has quit [Ping timeout: 260 seconds]
pietr0 has joined #ruby
razrunelord has joined #ruby
crome has joined #ruby
<bmurt> if its hardcoded, it works
havenwood has quit [Ping timeout: 264 seconds]
combusean has joined #ruby
krz has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
_bart has joined #ruby
<canton7> so, the issue is that the values aren't being read correctly
<bmurt> yes, from what i can tell
<canton7> print them again. check every character, check for whitespace, etc
<canton7> check that they're actually being passed to the correct places
<RubyPanther> benzrf|offline: I don't think I know him
dangerousdave has joined #ruby
<mozzarella> GUYS
yfeldblu_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
yfeldblum has quit [Read error: Connection reset by peer]
<mozzarella> I need extreme float precision
fauzanqadri has joined #ruby
tier has quit [Remote host closed the connection]
mahlon_ is now known as mahlon
<canton7> mozzarella, Rational ?
shredding has quit [Ping timeout: 272 seconds]
Notte has joined #ruby
gomikemike has joined #ruby
sailias has joined #ruby
_bart has quit [Client Quit]
sailias has quit [Remote host closed the connection]
SBoolean has quit [Ping timeout: 240 seconds]
<gomikemike> hello, is there a way to check the value of the env variable http_proxy from a ruby script?
merceris_ has quit [Quit: Computer has gone to sleep.]
cjsarette has joined #ruby
sailias has joined #ruby
<jhass> gomikemike: you can access all environment variables through the Hash-like object ENV
<mozzarella> canton7: it doesn't offer more precision than float, though
yfeldblu_ has quit [Ping timeout: 240 seconds]
<jhass> mozzarella: looked into BigDecimal?
<canton7> mozzarella, it can represent e.g. 1/3 perfectly, rather than to finite precision
CodeBunny has joined #ruby
<mozzarella> canton7: that's not what I want
<mozzarella> jhass: doesn't seem to offer more precision than float…
lkba has quit [Ping timeout: 245 seconds]
<canton7> ther'es also BigDecimal
<canton7> "BigDecimal provides arbitrary-precision floating point decimal arithmetic."
<canton7> which seems to suggest that it does
<jhass> you seem to have a different definition of "precision"
karmatr0n has joined #ruby
p4tux has joined #ruby
lw has joined #ruby
Valesk has joined #ruby
tier has joined #ruby
stantona has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
lkba has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
SBoolean has joined #ruby
MZAWeb has joined #ruby
<mozzarella> >> (BigDecimal('1', 100) / BigDecimal('3', 100)).to_s
<eval-in> mozzarella => undefined method `BigDecimal' for main:Object (NoMethodError) ... (https://eval.in/161119)
Kricir has joined #ruby
<mozzarella> >> require 'bigdecimal'; (BigDecimal('1', 100) / BigDecimal('3', 100)).to_s
<eval-in> mozzarella => (https://eval.in/161120)
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has quit [Client Quit]
djbkd has joined #ruby
<canton7> mozzarella, aah, you want to *format* a number with more decimal places?
stantona has joined #ruby
<mozzarella> yes
<jhass> as said, different definition of "precision" then
saarinen has joined #ruby
stantona has quit [Remote host closed the connection]
<jhass> >> "%.25f" % (1/3.0)
combusean has quit [Quit: Leaving.]
<eval-in> jhass => "0.3333333333333333148296163" (https://eval.in/161121)
<bmurt> canton7: in 5mins, alerady fixed using pony
<canton7> bmurt, good good!
<bmurt> not changing the instance variables ,etc
<bmurt> that gem has some issues :/
klaut has quit [Remote host closed the connection]
bradleyprice has joined #ruby
<canton7> :P
<mozzarella> so, is there a lib for that?
<jhass> mozzarella: didn't I just show you?
SCommette has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby
obs_ has quit [Remote host closed the connection]
<canton7> mozzarella, a double will give you about 13 decimal places. you can convert that to a string, and specify exactly how many digits you want to display, using methods like the one jhass showed
RaCx has joined #ruby
krz has joined #ruby
<canton7> if you want more than 13 digits, BigDecimal is your friend
<mozzarella> no I want high precision
<canton7> (or Rational)
<mozzarella> you're just displaying garbage after the 333's
fresham has joined #ruby
jheg has joined #ruby
<mozzarella> canton7: can you show me how to do it?
andrewjanssen has joined #ruby
sski has joined #ruby
Guest79836 is now known as mumblerit
<canton7> >> require 'bigdecimal'; BigDecimal.new('0.3333333333333333333333333333333333333333333333333').to_s
<eval-in> canton7 => (https://eval.in/161122)
andrewjanssen has quit [Client Quit]
<canton7> >> require 'bigdecimal'; p BigDecimal.new('0.3333333333333333333333333333333333333333333333333').to_s
<eval-in> canton7 => (https://eval.in/161123)
<canton7> grr you get the idea
dawkirst has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
bradhe has joined #ruby
<mozzarella> duh, I want it to contain the result of a division, though
Hobogrammer has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
<canton7> well we showed you that earlier, duh ;)
Zenigor has joined #ruby
<mozzarella> nononono
<mozzarella> you didn't
cocotton has quit [Remote host closed the connection]
<canton7> maybe you wanted something like BigDecimal(1).div(3, 100).to_s ?
cjsarette has quit [Remote host closed the connection]
<canton7> that enough '3's for you? you can have more if you want ;)
<mozzarella> it's not even more precise than a regular float… it's pointless
<canton7> it is!
cjsarette has joined #ruby
<canton7> that one goes to 100 decimal places
<mozzarella> no it's not
<mozzarella> I get "0.333333333333333333E0"
cocotton has joined #ruby
havenwood has joined #ruby
cocotton has quit [Remote host closed the connection]
<jhass> well, the issue here is that most output methods seem to do something like to_f.to_s
<canton7> mozzarella, then you're doing it wrong
fresham has left #ruby [#ruby]
wallerdev has joined #ruby
<canton7> (which, you might note, is *exactly* what I just sent you)
cocotton has joined #ruby
freezey has quit [Remote host closed the connection]
subraminion has quit [Ping timeout: 264 seconds]
fresham has joined #ruby
sski has quit [Ping timeout: 272 seconds]
troyready has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 240 seconds]
_5kg has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
<canton7> anyway, home time
Gil_ has joined #ruby
<mozzarella> so, it doesn't do operator overloading?
<canton7> "If digits is 0, the result is the same as the / operator. If not, the result is an integer BigDecimal, by analogy with Float#div."
monkegjinni has joined #ruby
acrussell has joined #ruby
<canton7> read the docs ;)
<mozzarella> (BigDecimal.new(1, 100) / BigDecimal.new(3, 100)).to_s
stantona has joined #ruby
<canton7> yes. '/ 3' is the same as .div(3, 0)
<canton7> as the bit I JUST PASTED says
hpoydar has quit [Remote host closed the connection]
combusean has joined #ruby
<canton7> anyway, I am off. you'll have to read the docs from now on yourself ;)
<mozzarella> no, it doesn't work
tkuchiki has quit [Remote host closed the connection]
<mozzarella> only the .div does
ffranz has quit [Ping timeout: 245 seconds]
<canton7> oh for fuck's sake. #div DOES work. I just showed you
<mozzarella> yeah
<canton7> #/ does do arbitrary precision, I JUST told you
<canton7> *doesn't, sorry
<mozzarella> oh
Avahey_ has joined #ruby
<canton7> <canton7> yes. '/ 3' is the same as .div(3,
blackmesa has joined #ruby
<mozzarella> what an ill-conceived library
centrx has joined #ruby
<canton7> complain to the devs if you want
<canton7> I'm sure they had their reasons
benzrf|offline is now known as benzrf
<mozzarella> I will
<canton7> please let me know how it goes :D
<mozzarella> thank you
<mozzarella> for the help
fauzanqadri has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
<benzrf> RubyPanther: somebody with that name commented on a post saying that their friend described FP as 'an unnatural act'
anarang has quit [Quit: Leaving]
monkegjinni has quit [Ping timeout: 252 seconds]
Eiam has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
<centrx> PHP is an unnatural act
treehug88 has quit [Ping timeout: 240 seconds]
fauzanqadri has joined #ruby
mercerist has joined #ruby
Rollabunna has quit [Remote host closed the connection]
combusean has quit [Quit: Leaving.]
andrewjanssen has quit [Quit: Leaving...]
acrussell has left #ruby [#ruby]
lw has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
Uranio has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
mu5k17u has joined #ruby
djbkd has quit [Remote host closed the connection]
combusean has joined #ruby
mijicd has joined #ruby
codeurge has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
combusean has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
ndrei has joined #ruby
sambao21 has joined #ruby
andrewjanssen has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
CodeBunny has quit [Ping timeout: 245 seconds]
ffranz has joined #ruby
hpoydar has joined #ruby
fauzanqadri has quit [Remote host closed the connection]
taybin has quit [Quit: This computer has gone to sleep]
nmokru has joined #ruby
hpoydar has quit [Remote host closed the connection]
<shevy> IT IS SO DAMN HOT
Uranio has quit [Ping timeout: 264 seconds]
<centrx> saucy
* mozzarella licks his own nipple
hpoydar has joined #ruby
<mozzarella> I know, right?
enebo has joined #ruby
Gil_ has quit [Remote host closed the connection]
freezey has joined #ruby
jheg has quit [Quit: jheg]
djbkd has joined #ruby
kidoz has joined #ruby
joaoh82 has joined #ruby
<happytux> shevy: The link I gave you?
chth0n has quit [Ping timeout: 272 seconds]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
<DouweM> mozzarella: :|
Squarepy has quit [Quit: Leaving]
aspires has quit []
andrewjanssen has quit [Remote host closed the connection]
pvb has joined #ruby
ixti has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
ringarin has joined #ruby
BizarreCake has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
almostwhitehat has quit [Quit: almostwhitehat]
<gomikemike> [A
<Sigma00> [B
<gomikemike> oops
cjsarette has quit [Remote host closed the connection]
<gomikemike> so, i asked a question and had to go to a meeting... will re-ask it
<gomikemike> hello, is there a way to check the value of the env variable http_proxy from a ruby script?
cjsarette has joined #ruby
Squarepy has joined #ruby
<gomikemike> i have a script that needs the proxy, so i set the env variable in the script and un-set it on the last line of the script but some servers already have the env variable set, so i would be leaving it unset
<gomikemike> I would like to check what the value is and if empty, set it and un-set it after the script is done
<gomikemike> if its set, then leave it as is
djbkd has quit [Remote host closed the connection]
<centrx> ENV has environment vars
<centrx> it acts like a hash
glenfe has joined #ruby
glenfe has left #ruby ["Leaving"]
tier has quit [Remote host closed the connection]
<pvb> ENV["HTTP_PROXY"] ?
<centrx> yes
b1205 has quit [Ping timeout: 240 seconds]
<centrx> something like that
Azulinho has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
<bmurt> canton7: another funny regarding pony & mail... pony has a dependency on mail :/
diegoviola has quit [Ping timeout: 245 seconds]
maletor_ has joined #ruby
<gomikemike> so, currnetly i do "ENV[http_proxy = "http://xxx.xxx.xxx.xxx:3128/" to set it
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
MrDoctor has quit [Remote host closed the connection]
cjsarette has quit [Remote host closed the connection]
mercerist has quit [Ping timeout: 272 seconds]
<jhass> no you're not, that wouldn't parse
cjsarette has joined #ruby
MrDoctor has joined #ruby
<gomikemike> ohh no double quote, its single
b1205 has joined #ruby
<jhass> still
<gomikemike> well it works
<jhass> not as you typed it
treehug88 has joined #ruby
<jhass> >> ENV[http_proxy = 'http://xxx.xxx.xxx.xxx:3128/'
<eval-in> jhass => /tmp/execpad-fb205cb0f8b2/source-fb205cb0f8b2:3: syntax error, unexpected keyword_rescue, expecting ']' ... (https://eval.in/161147)
cocotton has quit [Remote host closed the connection]
<gomikemike> ENV[http_proxy] = 'http://xxx.xxx.xxx.xxx:3128'
<jhass> >> ENV[http_proxy] = 'http://xxx.xxx.xxx.xxx:3128'
<eval-in> jhass => undefined local variable or method `http_proxy' for main:Object (NameError) ... (https://eval.in/161150)
maletor has quit [Ping timeout: 240 seconds]
<pvb> ENV['http_proxy'] = "blablabla"
brunops has joined #ruby
sputnik13 has joined #ruby
GoodTimes has quit [Ping timeout: 252 seconds]
<gomikemike> ok, it working....what i need is how to check if its set at the start of the script so i set it if its not there
<jhass> ||=
gfunc has quit [Remote host closed the connection]
codabrin_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<gomikemike> this is the first ruby code i do btw
djbkd has quit [Remote host closed the connection]
<jhass> ENV['http_proxy'] ||= 'whatever'
MrDoctor has quit [Ping timeout: 252 seconds]
codabrink has joined #ruby
aspires has joined #ruby
<RubyPanther> benzrf: It is probably perfectly natural, just not for humans
RaCx_ has joined #ruby
djbkd has joined #ruby
yetanotherdave has quit [Read error: Connection reset by peer]
<gomikemike> so, i can use that in an if statement
yetanotherdave has joined #ruby
<jhass> huh?
<pvb> why?
<gomikemike> if ENV['http_proxy'] ||= 'htttp://xxx.xxx.xxx.xxx' [then]...
<pvb> no
almostwhitehat has joined #ruby
<jhass> gomikemike: ||= sets the left hand side to the right hand side if the left hand side is nil or false
<gomikemike> ohhhhhhhh snap
<gomikemike> that is neat
<gomikemike> does it go the other way too?
<gomikemike> =||
<shevy> happytux well I am kinda dabbling with pure imagemagick right now
<shevy> somehow I dont really like rmagick
ixti has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<jhass> gomikemike: no, assignments are always right hand side to left hand side
gigetoo has quit [Remote host closed the connection]
<gomikemike> ok
<jhass> ew, that sounded wrong
<jhass> the right hand side is always written into the left hand side
gigetoo has joined #ruby
<gomikemike> but how do i manage if the value was not there and I added it... how do i know when to unset it?
sinkensabe has joined #ruby
<jhass> why do you need to?
b1205 has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
chrishough has quit [Quit: chrishough]
RaCx_ has quit [Ping timeout: 264 seconds]
<gomikemike> because of the stupid proxy
<gomikemike> some apps use it
<gomikemike> and some break if its set
<gomikemike> thats why im setting it at the beginning of the script
closer has quit [Ping timeout: 252 seconds]
<jhass> the script won't affect your environment outside of it though
<jhass> only that of processes spawned from it
sputnik13 has joined #ruby
<gomikemike> ohh so if i set it there and the script ends, it will not leave it "set"
<gomikemike> that is great
<jhass> yes
_5kg has joined #ruby
SBoolean has quit [Ping timeout: 272 seconds]
<benzrf> RubyPanther: your rong
<benzrf> FP is the shit :-D
<gomikemike> i could have deployed this some time ago
railzForDaiz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gomikemike> jhass: much thanks!
<happytux> shevy: I can help you with imagemagick
<shevy> \o/
RaCx has joined #ruby
<happytux> shevy: I had trouble of pain with it, so experience.
<shevy> I am not at that point yet
<shevy> I need to clean up stuff first and layout a plan
<shevy> and I also need to finish the "one gem to rule them all" first
<happytux> shevy: one gem to rule them all?
<banister> benzrf did you read taht nice article on a OOPer who switched to FP for a year?
<happytux> shevy: Yes, what should your tool do exactly?
<shevy> happytux I need to bundle all dependencies for some projects into a single gem without any more dependencies
<shevy> happytux programmatically too
<happytux> shevy: bundler package feature is your friend
<shevy> no
closer has joined #ruby
<happytux> shevy: it can pull and package all dependency gems
sputnik13 has quit [Client Quit]
<shevy> happytux for bundler as far as I know, they remain separate projects and you need to write a file
b1205 has joined #ruby
sputnik13 has joined #ruby
skaflem has joined #ruby
<happytux> shevy: hm, you want to kind link the dependencies?
<happytux> shevy: bundler will put them into vendor directory
nanoyak has joined #ruby
<shevy> happytux can I bundle without having to write anything? such as "bundle remote project foo for me"?
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
SBoolean has joined #ruby
nanoyak has quit [Client Quit]
MZAWeb has quit [Ping timeout: 264 seconds]
cocotton has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noop has joined #ruby
Mattias has joined #ruby
<shevy> the whole point is to end up with a single .gem with everything inside and without having to write anything other than the command to give the URL
bradhe has joined #ruby
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<happytux> shevy: hm, you want to package your project as gem anyway. So you could add vendor/ to it.
codeurge has joined #ruby
tsunamie has quit [Ping timeout: 260 seconds]
minecoins has quit [Ping timeout: 264 seconds]
<shevy> well a .gem is like most other archives
cwc has quit [Ping timeout: 240 seconds]
rs0 has quit [Ping timeout: 264 seconds]
mozzarella has quit [Ping timeout: 240 seconds]
<shevy> I need to ensure that a given snapshot works and that a user won't have to download anything else other than that single archive ever
momomomomo has joined #ruby
sdouglas has quit [Remote host closed the connection]
<happytux> shevy: bundler can also store the cache locally in project directory
cwc has joined #ruby
zB0hs has joined #ruby
nanoyak has joined #ruby
<shevy> and you then end up with a single .gem that has all dependencies inside?
rs0 has joined #ruby
<benzrf> > It's a mindset change. I wish I'd known this earlier as it would've saved me frustration and doubt, but you kind of need to unlearn what you think you know about coding, then go back to the basics. Imagine you've driven trains for decades, and spontaneously decide you want to be a pilot. No, you can't just read a plane manual in the morning and be in Tokyo in the afternoon. No, if you grab a
<benzrf> beer with experienced pilots you won't be able to talk about aviation at their level. It's normal, right? Be patient, learn the basics, have fun, you'll get there.
<benzrf> i like this metaphor
<happytux> shevy: yes
minecoins has joined #ruby
dawkirst has joined #ruby
<happytux> shevy: either by dumping the bundler cache or the vendor gems directly
<shevy> hmm
Neomex has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
mjsmith2 has quit []
Zenigor has quit [Ping timeout: 272 seconds]
<shevy> I hate this heat wave :(
kaspergrubbe has quit [Remote host closed the connection]
<happytux> shevy: yes
Takle has quit [Remote host closed the connection]
MZAWeb has joined #ruby
<happytux> shevy: you are in europe, too?
<shevy> yeah
<shevy> happytux what is the peak temperature currently at your place?
<shevy> we have been at +35°C already
<wallerdev> brr
<shevy> although the forecast says it'll cool down slowly in the coming days
tsunamie has joined #ruby
kirun has joined #ruby
Gil_ has joined #ruby
mjsmith2 has joined #ruby
tier has joined #ruby
<happytux> shevy: well, I am lucky :) Today it heavily rained. Yesterday it was about 38°C, yes
<shevy> ack
kenneth has joined #ruby
<shevy> how can you even sit before a computer with such a temperature
vt102 has quit [Ping timeout: 265 seconds]
<benzrf> RubyPanther: as shevy posted
Tricon has quit [Quit: Leaving...]
<shevy> huh? I am a functional programmer?
<RubyPanther> I thought Europe had electricity and air conditioning by now
<hfp> I swear I saw something like this somewhere... Is it not possible to increment both a, b and c by doing `a, b, c += 1` ?
<shevy> RubyPanther that doesn't help much! :(
mjsmith2 has quit [Client Quit]
chrishough has joined #ruby
<shevy> hfp first time I see that
<shevy> c += 1 would be: c = c + 1
nateberkopec has quit [Quit: Leaving...]
b1205 has quit [Ping timeout: 240 seconds]
<shevy> not sure what a, b, c += 1 is?
<Sigma00> it's nothing
<shevy> a, b, c = a + 1, b + 1, c + 1
<shevy> ?
Zenigor has joined #ruby
<shevy> hehehe Sigma00
blinkdesign has quit [Remote host closed the connection]
<shevy> hfp perhaps your mind tries to trick you
mozzarella has joined #ruby
<hfp> shevy: Yes, I thought there was a way do "mass assign" the same value
<hfp> do = to
<hoelzro> I don't think you can do that in Ruby
jheg has joined #ruby
<hoelzro> not like that, anyway
<jhass> hfp: seems to syntax error for me
reset has joined #ruby
<benzrf> map (+1) [a, b, c]
<RubyPanther> += isn't close to same
<shevy> hfp well mass assignment sure, but you try to also increment
dawkirst has quit [Ping timeout: 272 seconds]
<hoelzro> a, b, c = [ a, b, c ].map { |v| v + 1 }
<shevy> I never saw mass increment in ruby before haha
<hoelzro> but at that point...
<happytux> So Functional Programming is like C++ or JavaScript?
<happytux> Some prototyping thing?
moritzs has joined #ruby
<shevy> functional is about assembling functions that are pure, no?
b1205 has joined #ruby
Rubyist has joined #ruby
<shevy> basically like the neanderthals, before discovering objects
<Rubyist> Wanting to convert Array to hash
redondos has quit [Ping timeout: 272 seconds]
<hoelzro> Prototypes and functional programming are orthogonal concepts
Tricon has joined #ruby
<benzrf> hoelzro: what
<Rubyist> I want the hash to map array index => value
<shevy> Rubyist that is easy
<benzrf> c++ is one of the least functional langs i know iof
<benzrf> *of
<shevy> Rubyist give example array pls
razrunelord has quit [Remote host closed the connection]
Mattias has quit [Ping timeout: 245 seconds]
<Rubyist> [Object,Object] => {0 => Object, 1 => Object}
<hoelzro> benzrf: I'm saying that the presence of prototypical OOP doesn't imply functional programming facilities in a language
<hoelzro> and the converse as well
<Rubyist> shevy: ^
<shevy> hmm
<benzrf> hoelzro: oops mistabbed
<RubyPanther> happytux: It means breaking down everything into formulas that carry their state around. so you have no variables, or methods. Instead of a method that can be called by name, you have to bundle the method into each call
<benzrf> i meant that @ happytux
<shevy> well you'll have to catch the index Rubyist
<hoelzro> benzrf: oh, ok =)
<shevy> but normally this works
<shevy> >> Hash[*[1,2,3,4]]
<eval-in> shevy => {1=>2, 3=>4} (https://eval.in/161153)
redondos has joined #ruby
redondos has quit [Changing host]
redondos has joined #ruby
<shevy> Rubyist you probably can use ... .each_with_index or something
<benzrf> RubyPanther: that is a bizarre description
<shevy> or perhaps build up the array first, then send it into Hash[]
sepp2k has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mrsolo has joined #ruby
<Sigma00> >> a= {}; [1,2,3].each_with_index {|i,o| a[i]=o }
<eval-in> Sigma00 => [1, 2, 3] (https://eval.in/161154)
mrsolo has quit [Client Quit]
<happytux> RubyPanther: Is this something new? When I read articles about it, these concepts are about 30 or more years old.
<Rubyist> shevy: Trying to clean up a params hash in rails
<benzrf> happytux: FP has been around a while
<Sigma00> er, maybe I should have puts a
<Rubyist> Think this is the right way to go?
<RubyPanther> benzrf: Well, I focused on what it is supposed to be. What it really is is a bunch of lies to hide the fact that FP is only useful for tiny programs. Real programs that claim to use it, spend the whole time creating fake state, and masking their side effects
<benzrf> happytux: FP is in contrast to imperative, not in contrast to OOP
Mattias has joined #ruby
<Sigma00> >> a= {}; [1,2,3].each_with_index {|i,o| a[i]=o }; puts a
<eval-in> Sigma00 => {1=>0, 2=>1, 3=>2} ... (https://eval.in/161155)
<benzrf> RubyPanther: top lel
<jhass> >> array = [3,2,1]; Hash[(0...array.size).zip(array)] # Rubyist, thoguh what do you need that for?
<RubyPanther> happytux: No, you're right, except it is just 2000 yo math formulas mapped to programming
<eval-in> jhass => {0=>3, 1=>2, 2=>1} (https://eval.in/161156)
<shevy> Rubyist if it solves your problem, sure; I have no idea what hash you need, but you could always write a method that guarantees to you that the creating hash is working
<centrx> There is nothing new
<shevy> Rubyist, look at Sigma00's code
<centrx> Everything is from 30+ years ago
lewix has quit [Ping timeout: 245 seconds]
<shevy> centrx not everything! parallel computing!!!
<happytux> RubyPanther: :)
<RubyPanther> You basically pretend each function is a page of papyrus, and you're not allowed to refer to anything not proven in formulas on the same page
sputnik13 has joined #ruby
<shevy> lol
<happytux> RubyPanther: But LISP and friends are quite mature.
<shevy> I have fond memories of (L(I(S(P
<RubyPanther> LISP is quite mature, stable, and unused. Yes.
<jhass> Rubyist: what do you mean by cleanup? what's the benefit of having a hash like that? you can access an array by index just fine
<happytux> RubyPanther: What Functional Programming language came out just recently?
<happytux> RubyPanther: Go?
<shevy> after 100 years of its existance, (L(I(S(P should be mature
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<RubyPanther> I can make my way around a ~/.emacs script, but "nobody" wants to use LISP for an app.
<shevy> happytux some apple language!
<shevy> btw those new languages have awful names
<shevy> go ... swift ...
robertodecurnex has quit [Ping timeout: 264 seconds]
<happytux> shevy: How is it called? The IDE thing from this year Apple Conference?
<shevy> what's next? turf?
<happytux> ah
SBoolean has quit [Ping timeout: 252 seconds]
<shevy> IDE?
<Rubyist> jhass: One of activerecord's methods only takes a hash in certain format for update operation on child records
<shevy> it has an IDE?
nanoyak has quit [Read error: Connection reset by peer]
<RubyPanther> Even emacs is written in C. Lisp is just used as the extension language; it does do pretty good at that. That is where you don't really want state, you just want lightweight filters
<happytux> So those languages are used for Build systems, right?
<shevy> dunno
<shevy> perhaps apple hates obj-c
<shevy> and wants to leave it
<happytux> hm, so there are advantages and downsides for both worlds.
<jhass> Rubyist: so you got field names like '0', '1' etc?
nanoyak has joined #ruby
kilk_ has joined #ruby
<happytux> So for what one can't use Functional Programming without resorting to pain and overkill?
<shevy> to be honest, I don't understand why they just don't want to use languages like ruby or python
jkline has joined #ruby
<RubyPanther> Apple just needs a dynamic language, for places where that is wanted.
<shevy> but we have dynamic languages already!
<RubyPanther> They're addicted to control
<shevy> yeah
<shevy> that is a much better explanation
<shevy> wasn't there hypercard once?
<RubyPanther> Go, OTOH, it designed to be a compiled language that is similar to dynamic languages, but easier to optimize inside a VM or other container
<shevy> http://en.wikipedia.org/wiki/HyperCard it's what apeiros often mentions... and eiffel too I think
<RubyPanther> Yeah, I did hypercard in HS
bthesorceror has quit [Quit: bthesorceror]
<benzrf> RubyPanther is sooooooooo full of shit
<Rubyist> jhass: no..maybe I am doing this wrong
<RubyPanther> It was like PDF, but with an IDE that made heavy use of the linking feature. Like the web, but with layout built in
adantj has quit [Ping timeout: 272 seconds]
<jhass> Rubyist: time to explain what you're actually doing ;)
almostwhitehat has quit [Quit: almostwhitehat]
robertodecurnex has joined #ruby
<RubyPanther> benzrf: People get jealous of me for lots of reasons, my regularity is just one of them. Sorry for your problem. I recommend eating more fruit.
net_mask has joined #ruby
ringarin has quit [Quit: Leaving]
<benzrf> RubyPanther: lol
Spami has joined #ruby
SBoolean has joined #ruby
<happytux> OK, so for what FP can/should be used and for what should I rather use IP?
<happytux> I ask because I am thinking about investing some time in learning a FP language.
bthesorceror has joined #ruby
<shevy> nobody realls knows
<happytux> I need to know what language would be good to learn and for what I can use it, practically.
<shevy> *really
<shevy> we have ruby
<shevy> and C
<shevy> that's like python
joaoh82 has quit [Remote host closed the connection]
<shevy> and C++
<shevy> or Java
<shevy> and perl
<shevy> :D
dukedave has joined #ruby
eka has quit [Read error: Connection reset by peer]
<jsaak> it is always good to know languages, learn a FP too, you will see how practical it will be for you
<shevy> yeah
<shevy> always good to learn
<shevy> php
<dukedave> Is there something like Enumerable#chunk, but which yields pairs of elements and expects true/false if they belong in the same/different chunk?
nmokru has quit [Quit: nmokru]
eka has joined #ruby
phantasm66 has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
<RubyPanther> happytux: You do need to learn one, though you hopefully won't need to use it. ;) I recommend Scheme, it is similar to Lisp, but simpler
<RubyPanther> Scheme is popular as an extension language so it is sometimes useful
<jhass> dukedave: no, but maybe there's a (nice) solution to your real problem
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Mon_Ouie> dukedave: You don't mean like #partition, right?
razrunelord has joined #ruby
<dukedave> Mon_Ouie, no, it's a 'chunking' operation, rather than just a Boolean partition :/
Xeago has quit [Read error: Connection reset by peer]
Rubyist is now known as Meatchicken
<centrx> enum.chunk(2).partition ?
<dukedave> jhass, I was just going to roll a reduce if not?
Xeago has joined #ruby
rezzack has quit [Quit: Leaving.]
SBoolean has quit [Ping timeout: 252 seconds]
<centrx> dukedave, enum.chunk(2).partition
<centrx> dukedave, enum.chunk(2) returns a chainable enumerator
niklasb has joined #ruby
<dukedave> centrx, ooh, okay, let me see :)
almostwhitehat has joined #ruby
thisirs has joined #ruby
<centrx> dukedave, actually sorry, enum.each_slice(2).partition
b1205 has quit [Ping timeout: 272 seconds]
<dukedave> centrx, okay, that makes more sense :)
klaut has joined #ruby
nmokru has joined #ruby
relix has joined #ruby
combusean has joined #ruby
rdark has quit [Quit: leaving]
kilk_ has quit [Quit: kilk_]
<dukedave> centrx, hmm, well, I see how that works, but I don't see how I can apply it to my problem?
kilk_ has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
SBoolean has joined #ruby
<centrx> dukedave, Not sure based on how you described your problem, maybe you want enum.each_slice(2).chunk
taybin has joined #ruby
dfinly has joined #ruby
<jhass> as said, it would help to describe your underlying problem. Currently you're describing the solution you think you need
djbkd has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 264 seconds]
brain_shim has quit [Ping timeout: 245 seconds]
joaoh82 has joined #ruby
djbkd has joined #ruby
dfinly has quit [Client Quit]
kilk_ has quit [Client Quit]
moritzs has joined #ruby
nateberkopec has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
moritzs has quit [Max SendQ exceeded]
RaCx has quit [Quit: Computer has gone to sleep.]
Zai00 has quit [Quit: Zai00]
<dukedave> centrx, jhass, coming up
moritzs has joined #ruby
aspires has quit []
aspires has joined #ruby
moritzs has quit [Max SendQ exceeded]
razrunelord has quit [Remote host closed the connection]
moritzs has joined #ruby
freezey has quit [Remote host closed the connection]
karmatr0n has quit [Remote host closed the connection]
blinkdesign has joined #ruby
<dukedave> Is there an eval bot in here? I've got a one liner to show :)
wchun has quit [Quit: Leaving]
<jhass> >> "yes"
<eval-in> jhass => "yes" (https://eval.in/161160)
<centrx> >> :hi
<eval-in> centrx => :hi (https://eval.in/161161)
sambao21 has quit [Quit: Computer has gone to sleep.]
<dukedave> >> [1, 2, 10, 11, 20, 21, 22, 30].reduce([]) { |memo, obj| curr = memo.last; curr && (obj - curr.last < 5 ) ? curr.push(obj) : memo.push([obj]); memo }
<eval-in> dukedave => [[1, 2], [10, 11], [20, 21, 22], [30]] (https://eval.in/161162)
lkba has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
<dukedave> That's how I'd write it as a reduction, the point being I can compare obj and curr.last, to decide if they belong in the same chunk (in this case if they're within 5 of each other)
sambao21 has joined #ruby
<cocotton> Hey all, is there a way to tell $stdin.read to stop reading when I press enter? (read only 1 value)
<jhass> cocotton: use .gets
frem__ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
ixti has joined #ruby
sinkensabe has joined #ruby
sputnik13 has joined #ruby
<cocotton> jhass: Things is I'm using mixlib-cli as an option parser, and it seems to create some problems. When using gets, it fetches the first flag (ruby myScript -a flag) rather than the user input at this moment
bthesorceror has joined #ruby
<dukedave> jhass, centrx, see example for 'chunk with compare' above
nanoyak has joined #ruby
jprovazn_afk is now known as jprovazn
yacks has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<jhass> cocotton: $stdin.gets
dangerousdave has quit [Max SendQ exceeded]
arrubin has quit [Ping timeout: 260 seconds]
jeregrine has quit [Ping timeout: 260 seconds]
bjeanes has quit [Ping timeout: 260 seconds]
jrhe has quit [Ping timeout: 260 seconds]
datafirm has joined #ruby
sinkensabe has quit [Ping timeout: 264 seconds]
anaeem1 has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
codabrink has quit [Ping timeout: 252 seconds]
<cocotton> jhass: oh haha, my bad, that works well, many thanks!
dangerousdave has joined #ruby
arrubin has joined #ruby
bjeanes has joined #ruby
jrhe has joined #ruby
x1337807x has joined #ruby
jeregrine has joined #ruby
freezey has joined #ruby
vifino has quit [Quit: Ze Cat now leaves...]
b00stfr3ak has quit [Remote host closed the connection]
<atmosx> riceandbeans: It is different, but I don't think you will notivce any difference. I'm quite happy with Sequel truth to be told.
<jhass> dukedave: I don't think it gets much smarter than that. Personally I'd expand that to multiple lines and a if / else though (I only use ternary for value expressions, not for control flow)
<dukedave> jhass, oh yeah, I just wanted to one liner it ;) but thanks for the sanity check!
<dukedave> FWIW, it's sexy in Haskell: Data.List.groupBy (\x y -> y - x < 5) [1, 2, 10, 11, 20, 21, 22, 30]
<dukedave> I was just hoping Ruby has something similar :)
<benzrf> dukedave: haskell-five >>=
<centrx> dukedave, Array has group_by
m8 has joined #ruby
<centrx> *Enumerable
vifino has joined #ruby
moritzs has quit [Ping timeout: 245 seconds]
m8 has quit [Max SendQ exceeded]
kidoz has quit [Quit: Ухожу я от вас]
<dukedave> centrx, yeah, unfortunately they don't quite behave the same
<dukedave> well, at all in fact :)
bradhe has joined #ruby
centrx has quit [Quit: Mission accomplished. Ready for self-termination.]
therocketforever has joined #ruby
blooberr____ has joined #ruby
codabrink has joined #ruby
treehug88 has quit [Ping timeout: 272 seconds]
jkline has quit [Quit: jkline]
therocketforever has quit [Client Quit]
alvaro_o has joined #ruby
Kaozr has joined #ruby
mijicd has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 264 seconds]
gregf has joined #ruby
aagdbl has quit [Quit: Connection closed for inactivity]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaoh82 has quit [Remote host closed the connection]
therocketforever has joined #ruby
taybin has quit [Quit: This computer has gone to sleep]
Meatchicken has quit [Quit: Page closed]
RaCx has joined #ruby
RaCx has quit [Client Quit]
<axilla> how would i say current_storage not greater than allowed_storage
Hanmac1 has joined #ruby
stantona has quit [Remote host closed the connection]
shime_ has quit [Ping timeout: 240 seconds]
<DouweM> so less than or equal? current_storage <= allowed_storage
<axilla> hmm
<axilla> yea seems that simple i thought so
<axilla> but that didnt work right..
<DouweM> then it's something else in your code
<wallerdev> maybe someone redefined <=
Guest1744 has quit [Ping timeout: 260 seconds]
shime has joined #ruby
therocketforever has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
nfk has quit [Quit: yawn]
Hanmac has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
therocketforever has joined #ruby
<axilla> thanks i got it
<axilla> in ruby is nil considered < than some #?
<jhass> >> nil < 1
<eval-in> jhass => undefined method `<' for nil:NilClass (NoMethodError) ... (https://eval.in/161165)
<axilla> for instance my database value is null and my variable value is 1
<jhass> >> 1 < nil
<eval-in> jhass => comparison of Fixnum with nil failed (ArgumentError) ... (https://eval.in/161166)
<axilla> cool
<axilla> really cool :)
<shevy> happytux, it seems as if it is mandatory to write a Gemfile when one wants to use bundler for full packaging, see first answer at http://stackoverflow.com/questions/4402819/download-all-gems-dependencies
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
nfk has joined #ruby
sputnik13 has joined #ruby
RaCx has joined #ruby
gomikemike has quit [Ping timeout: 240 seconds]
taybin has joined #ruby
DEA7TH has joined #ruby
aspires has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
therocketforever has quit [Client Quit]
kilk_ has joined #ruby
carraroj has joined #ruby
adantj has joined #ruby
joaoh82 has joined #ruby
joaoh82 has quit [Remote host closed the connection]
SCommette has joined #ruby
jottr has joined #ruby
toastynerd has quit [Remote host closed the connection]
SBoolean has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
Nogbit has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
s3ri0us is now known as s3ri0us|away
chrishough has quit [Quit: chrishough]
GeorgesLeYeti has quit [Quit: Quitte]
moritzs has joined #ruby
sinkensabe has joined #ruby
Takle has joined #ruby
beef-wellington has quit [Ping timeout: 240 seconds]
riceandbeans has quit [Quit: leaving]
spastorino has joined #ruby
boris has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 240 seconds]
cjsarette has quit [Remote host closed the connection]
troyready has joined #ruby
SBoolean has joined #ruby
sinkensabe has quit [Remote host closed the connection]
cjsarette has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
kilk_ has quit [Quit: kilk_]
Wolland has joined #ruby
Rollabunna has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle has joined #ruby
kaspergrubbe has joined #ruby
moritzs has quit [Ping timeout: 252 seconds]
nmokru has quit [Quit: nmokru]
benzrf is now known as benzrf|offline
sputnik13 has joined #ruby
freezey has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
alol_ has quit [Ping timeout: 260 seconds]
mikepack has quit [Remote host closed the connection]
alol_ has joined #ruby
anaeem1 has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 252 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
shevy has joined #ruby
anaeem1 has joined #ruby
freezey has joined #ruby
robertodecurnex has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
kaspergrubbe has quit []
codeurge has joined #ruby
kies has quit [Ping timeout: 245 seconds]
Squarepy has quit [Quit: Leaving]
SBoolean_ has joined #ruby
renier has quit [Ping timeout: 252 seconds]
SBoolean has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
datafirm has quit [Quit: Computer has gone to sleep.]
RaCx has quit [Quit: Computer has gone to sleep.]
razrunelord has joined #ruby
toastynerd has joined #ruby
robertodecurnex has joined #ruby
railzForDaiz has joined #ruby
Kaozr has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 240 seconds]
sepp2k has quit [Read error: Connection reset by peer]
SCommette has quit [Quit: SCommette]
Neomex_ has joined #ruby
Neomex has quit [Ping timeout: 252 seconds]
Avahey_ has quit [Quit: Connection closed for inactivity]
razrunelord has quit [Ping timeout: 240 seconds]
rizzatti has joined #ruby
jerius has quit [Remote host closed the connection]
olivier_bK has joined #ruby
jerius has joined #ruby
freezey has joined #ruby
RaCx has joined #ruby
paulfm has quit []
beef-wellington has joined #ruby
adantj has quit [Ping timeout: 245 seconds]
Kaozr has joined #ruby
yetanotherdave has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
s3ri0us|away has quit [Quit: Leaving...]
paulfm has joined #ruby
Nogbit has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
adantj has joined #ruby
jkline has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
DEA7TH has quit [Ping timeout: 272 seconds]
kies has joined #ruby
anaeem1 has quit [Remote host closed the connection]
jespada has quit [Ping timeout: 245 seconds]
cocotton has quit [Remote host closed the connection]
Shidash has joined #ruby
Rojo has joined #ruby
djbkd has quit [Remote host closed the connection]
karmatr0n has joined #ruby
anaeem1_ has joined #ruby
decoponio has quit [Quit: Leaving...]
RaCx has quit [Read error: Connection reset by peer]
dorei has joined #ruby
bradhe has joined #ruby
m_3 has quit [Quit: leaving]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
silkfox has joined #ruby
mercwithamouth has joined #ruby
nanoyak has joined #ruby
Marfu_ has joined #ruby
<Marfu_> hello
<Marfu_> how read from datamaper?
sinkensabe has joined #ruby
<Marfu_> I read it but my database is deleted!
blinkdesign has quit [Remote host closed the connection]
shime has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 272 seconds]
<shevy> what does that even mean
beef-wellington has quit [Ping timeout: 272 seconds]
mehlah has quit [Quit: Leaving...]
anaeem1_ has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<Marfu_> when I run my script i get only one record, before
<Marfu_> deleted
<Marfu_> previous
dukedave has quit [Ping timeout: 252 seconds]
<Marfu_> Why?
senayar has joined #ruby
<shevy> I am not sure anyone will be able to reproduce that
Atrumx has quit [Quit: Exit]
<Marfu_> ?
aspires has joined #ruby
<Marfu_> download and run my code
therocketforever has joined #ruby
<Marfu_> easyly
rezzack has joined #ruby
paulfm has quit []
mercwithamouth has quit [Ping timeout: 245 seconds]
mary5030_ has joined #ruby
m_3 has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
Zai00 has joined #ruby
ndrei has joined #ruby
RaCx has joined #ruby
therocketforever has quit [Client Quit]
dawkirst has joined #ruby
<Marfu_> hello? How read the datamaper database?
cjsarette has quit [Remote host closed the connection]
mikepack has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
Fire-Dragon-DoL has joined #ruby
jonahR has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<shevy> The outpit I get with your code is #<Koniec @info="_a0">
<shevy> *output
<atmosx> Marfu_: there's a manual on the website, read it.
<Marfu_> This is from manual
<atmosx> cool
Fire-Dragon-DoL has joined #ruby
<Marfu_> read it first ;-)
chrishough has joined #ruby
rizzatti has quit [Quit: Leaving...]
mikepack_ has joined #ruby
<Marfu_> but not working
<Marfu_> this is commandline no www sinatra etc
<shevy> last release in 2011
treehug88 has joined #ruby
Eiam has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
stantona has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
mary5030_ has quit [Remote host closed the connection]
djbkd has joined #ruby
mary5030 has joined #ruby
phantasm66 has quit [Quit: *poof*]
MrDoctor has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
yetanotherdave has joined #ruby
stantona has quit [Ping timeout: 264 seconds]
codabrink has quit [Ping timeout: 264 seconds]
kpshek has quit []
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
yalue has quit [Quit: Leaving]
karmatr0n has quit [Remote host closed the connection]
paulfm has joined #ruby
<Sigma00> RTFM
<Sigma00> seriously
<Sigma00> DataMapper.auto_migrate! This will issue the necessary CREATE statements (DROPing the table first, if it exists) to define each storage according to their properties.
blinkdesign has joined #ruby
<Marfu_> Sigma00, I must delete this line?
<Sigma00> don't blindly run code 'directly from the manual' if you're not gonna read the manual
troyready has quit [Quit: Leaving]
<Sigma00> I'm not helping you with datamapper, there are docs for that and the project is dead
<Marfu_> Working
* Marfu_ is stupid
<Marfu_> Many thanks
codabrink has joined #ruby
dseitz has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> yeah, dead projects are the saddest
Morkel has joined #ruby
sinkensabe has quit [Remote host closed the connection]
silkfox has quit [Ping timeout: 245 seconds]
pvb has quit [Quit: Leaving]
<MrDoctor> Can someone please help me out with this
<MrDoctor> Can't run migrations without a shard spec: this may be :all, :none, or a specific shard (for data-fixups). please call shard(arg) in your migration.
Gil_ has quit [Remote host closed the connection]
<MrDoctor> I have no idea what a shard spec is
silkfox has joined #ruby
Marfu_ has left #ruby ["Wychodzi"]
happytux has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
<shevy> does one of you know if it is possible with ruby readline to capture the full line that a user typed?
aspires has quit []
emergion has joined #ruby
kpshek has joined #ruby
mikepack_ has quit [Remote host closed the connection]
happytux has joined #ruby
kpshek has quit [Client Quit]
kireevco has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
jprovazn has quit [Quit: Odcházím]
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
yetanotherdave has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
mania has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
b1205 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
djbkd has joined #ruby
shredding has joined #ruby
<shevy> sometimes I feel as if I am the only ruby user
<ddv> you are
joaoh82 has joined #ruby
tier has joined #ruby
AlSquire has joined #ruby
<shevy> :(
cjsarette has quit [Remote host closed the connection]
<jheg> Can the merge method be run on arrays?
<jheg> or is it just for hashes?
mostlybadfly has quit [Quit: Connection closed for inactivity]
<jhass> what result would you expect? (and no, there's no merge on Array)
dawkirst has quit [Remote host closed the connection]
t0rc has joined #ruby
<ddv> jheg, you can call + on arrays
cjsarette has joined #ruby
<jheg> thanks jhass ddv
razrunelord has joined #ruby
<jheg> is + the hash equiv of merge?
<jhass> if you answer my question there likely is something that does what you want
<jhass> let's say we got [1,2,3] and [2,3,4,5], what result do you expect?
<jheg> [1,2,3,4,5]?
<jhass> so union
Neomex has joined #ruby
<jhass> >> [1,2,3] | [2,3,4,5]
<eval-in> jhass => [1, 2, 3, 4, 5] (https://eval.in/161220)
sambao21 has joined #ruby
benzrf|offline is now known as benzrf
dawkirst has joined #ruby
<ddv> jheg: you don't want [1,2,2,3,4,5]?
<shevy> jheg it's not so much equivalent; a hash has unique keys, what will .merge do there? and compare this to array + array operations
<ddv> jheg: you don't want [1,2,2,3,3,4,5]?
Neomex_ has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
gomikemike has joined #ruby
<shevy> so he also wants unique entries in that array
<jheg> it's an exercise ddv but yes I guess if I wanted to merge arrays I would want all values
<jheg> even if it meant duplication
bthesorceror has quit [Quit: bthesorceror]
<shevy> with or without duplication, that is the question ;-)
hpoydar has quit [Remote host closed the connection]
<jhass> seriously, get clear what you want and search for the right operation, not the other way around
<shevy> >> {:a => 33, :b => 22}.merge(:b => 43)
<eval-in> shevy => {:a=>33, :b=>43} (https://eval.in/161225)
<shevy> :b => 22 magically disappeared!
sambao21 has quit [Client Quit]
sinkensabe has joined #ruby
<shevy> but you actually have more information here than in an array
<wallerdev> magic
<shevy> unless you store it as [:a, 33, :b, 43]
<jheg> I love this chan :)
<shevy> in which case you could have used a hash anyway
<jhass> ducking ponicorn magick!
<apeiros> jhass: puzzle coders… try until shit fits :)
<ddv> you could also just how .merge is actually implemented
sinkensabe has quit [Remote host closed the connection]
<ddv> +look
<shevy> or
<shevy> >> Hash[*[:a, 33, :b, 43]]
<eval-in> shevy => {:a=>33, :b=>43} (https://eval.in/161226)
<shevy> jheg in ruby it is all about juggling data in objects
musashi1 has joined #ruby
sinkensabe has joined #ruby
<shevy> and trying to guess which method is the right one to use
<jhass> apeiros: they just should move to malbolge and leave us alone :(
kyb3r_ has joined #ruby
<shevy> because the docus suck
<apeiros> jhass: :D
<apeiros> jhass: endless puzzles waiting for them there ;-)
relix has quit [Ping timeout: 240 seconds]
<jheg> the docs suck?
testcore has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<apeiros> jheg: most don't. which ones suck IYO and why?
<benzrf> in haskell functions have relevant types so u can use Hoogle to find them by type :3
jackneill has quit [Read error: Connection reset by peer]
<jhass> jheg: we left the realms of being serious until we get a straight question from you, in case you didn't notice ;)
<ddv> who cares about haskell you are in #ruby
<benzrf> ddv: mee
<jhass> apeiros: ^ kick time, pls? :P
<shevy> jheg it depends; for things that are often used, the docs are ok, but for things that people don't often use they are awful or just don't exist
<jheg> trial and error right?
<shevy> and copy paste from other people's code
<apeiros> jhass: benzrf because he's nagging with haskell? yeah, I really should :-D
<jhass> yeah
<apeiros> j/k
<shevy> and puzzling and jiggling and wiggling until it works
bthesorceror has joined #ruby
<jhass> we should just join #haskell and talk about ruby all the time
<jhass> shevy: do you join me?
<shevy> I can not join inferior channels
Takle has joined #ruby
<shevy> well actually
<shevy> I'd like to join #python and speak in their native language
hpoydar has joined #ruby
<ddv> there is no point in python if you know ruby
<shevy> sshshs ZSshsh Shshshshs
freezey has quit [Remote host closed the connection]
<shevy> ddv but I like their documentation more!
Kricir has quit [Remote host closed the connection]
<wallerdev> python is a dead language
djbkd has quit [Remote host closed the connection]
combusean has quit [Quit: Leaving.]
<shevy> the best would be documentation that would be valid for every scripting language
<wallerdev> like latin
<jhass> really? I find pythons official docs pretty awful tbh.
<jhass> though I didn't check in a while
sinkensabe has quit [Ping timeout: 264 seconds]
<wallerdev> python's docs are written like a novel lol
<shevy> I grew up with ruby's iframe rdocs
<shevy> yeah wallerdev
<jhass> yeah and the search sucks
<shevy> it excites!
<shevy> the hero slays the dragon in the end
bthesorceror has quit [Client Quit]
dukedave has joined #ruby
freezey has joined #ruby
datafirm has joined #ruby
<shevy> sadly I can't take python seriously as an OOP language
<shevy> def foo(self):
<happytux> shevy: "it seems as if it is mandatory to write a Gemfile when one wants to use bundler for full packaging, see first answer at http://stackoverflow.com/questions/4402819/download-all-gems-dependencies"
<shevy> def bla(self):
<shevy> def hey(self):
<happytux> shevy: is this bad or an unintended feature?
predator117 has quit [Ping timeout: 240 seconds]
<shevy> I am sure it is an intended feature for their use case happy
tyfighter has joined #ruby
<shevy> happytux but it is ok, on stackoverflow someone told me how to fetch the dependencies in pure ruby
djbkd has joined #ruby
t0rc has left #ruby ["WeeChat 0.4.3"]
bradhe has joined #ruby
<shevy> happytux I am modifying it slowly http://pastie.org/9281179
<shevy> then turn it into a standalone class
<shevy> what will repackage things once you pass it the name of the project you wish to repackage completely
<shevy> *which will
yetanotherdave has joined #ruby
<shevy> but right now I feel lazy, and I am out of beer
<shevy> so I am idling ...
kies has quit [Ping timeout: 264 seconds]
Takle has quit [Ping timeout: 240 seconds]
predator117 has joined #ruby
<gomikemike> so, with the proxy env variable set on the script, the query seems like its coming from the proxy server so all my custom facts now have values from the proxy server
<happytux> shevy: so some kind of static code analyzer you write?
skaflem has quit [Quit: Leaving]
blinkdesign has quit [Remote host closed the connection]
<shevy> happytux well static at first; perhaps lateron I will add a full parsing of all requires... but for my own use case I think static suffices completely
bthesorceror has joined #ruby
blinkdesign has joined #ruby
<shevy> I need it only for one project for the perl team, they can't be bothered to have to deal with any ruby-related problem
anaeem1_ has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
heftig has joined #ruby
ylluminate has quit [*.net *.split]
spacemud has quit [*.net *.split]
peterhu has quit [*.net *.split]
Anarch has quit [*.net *.split]
utkarsh_ has quit [*.net *.split]
fearoffish has quit [*.net *.split]
faulkner has quit [*.net *.split]
likemike has quit [*.net *.split]
mduk has quit [*.net *.split]
tskogberg has quit [*.net *.split]
kotk_ has quit [*.net *.split]
qqw_ has quit [*.net *.split]
__main__ has quit [*.net *.split]
go|dfish has quit [*.net *.split]
chihhsin_wego has quit [*.net *.split]
Wayneoween has quit [*.net *.split]
zastern has quit [*.net *.split]
skinny_much has quit [*.net *.split]
bahar has quit [*.net *.split]
Spleeze has quit [*.net *.split]
camilasan has quit [*.net *.split]
everett has quit [*.net *.split]
xm has quit [*.net *.split]
xMopxShell has quit [*.net *.split]
ozzloy has quit [*.net *.split]
Davedo has quit [*.net *.split]
dazeddev has quit [*.net *.split]
AntelopeSalad has quit [*.net *.split]
crodas has quit [*.net *.split]
bijumon has quit [*.net *.split]
stylus has quit [*.net *.split]
wmoxam has quit [*.net *.split]
aep has quit [*.net *.split]
matti has quit [*.net *.split]
philtr has quit [*.net *.split]
sindork has quit [*.net *.split]
nopc0de has quit [*.net *.split]
zxq9 has quit [*.net *.split]
eam has quit [*.net *.split]
avelldiroll has quit [*.net *.split]
Akuma has quit [*.net *.split]
kloeri has quit [*.net *.split]
jpinnix has quit [*.net *.split]
TheNumb has quit [*.net *.split]
NET||abuse has quit [*.net *.split]
phreax has quit [*.net *.split]
kke has quit [*.net *.split]
x0nic has quit [*.net *.split]
snkcld has quit [*.net *.split]
dacamp has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
amargherio has quit [Remote host closed the connection]
bijumon has joined #ruby
stylus has joined #ruby
kke has joined #ruby
eam has joined #ruby
likemike has joined #ruby
chihhsin_wego has joined #ruby
philtr has joined #ruby
Anarch has joined #ruby
TheNumb has joined #ruby
TheNumb has quit [Changing host]
TheNumb has joined #ruby
wmoxam has joined #ruby
x0nic_ has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
snkcld has joined #ruby
faulkner has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
xMopxShell has joined #ruby
sindork_ has joined #ruby
qqw has joined #ruby
dazeddev has joined #ruby
aep has joined #ruby
camilasan has joined #ruby
zastern has joined #ruby
crodas has joined #ruby
peterhu has joined #ruby
dacamp has joined #ruby
tskogberg has joined #ruby
phreax has joined #ruby
zxq9 has joined #ruby
samuelkadolph has joined #ruby
bahar has joined #ruby
ylluminate has joined #ruby
AntelopeSalad has joined #ruby
jpinnix_____ has joined #ruby
xm has joined #ruby
Spleeze has joined #ruby
mduk has joined #ruby
Akuma has joined #ruby
jpinnix_____ has quit [Changing host]
jpinnix_____ has joined #ruby
Wayneoween has joined #ruby
__main__ has joined #ruby
nopc0de- has joined #ruby
spacemud has joined #ruby
NET||abuse has joined #ruby
go|dfish has joined #ruby
kotk has joined #ruby
fearoffish has joined #ruby
kloeri has joined #ruby
everett has joined #ruby
Davedo has joined #ruby
skinny_much has joined #ruby
utkarsh_ has joined #ruby
x0nic_ is now known as x0nic
avelldiroll has joined #ruby
predator117 has quit [Remote host closed the connection]
x1337807x has joined #ruby
Piotrek has joined #ruby
<Piotrek> Hi, does Ruby have something like perldoc or pydoc?
<ericwood> rdoc
blinkdesign has quit [Ping timeout: 245 seconds]
<jhass> yes, rdoc, a popular alternative is yard
nmokru has joined #ruby
anaeem1 has joined #ruby
<Piotrek> oh, thanks
Xeago_ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<Piotrek> ericwood: trying to use rdoc starts parsing files...
dangerou_ has quit [Ping timeout: 272 seconds]
<Piotrek> I'll check yard.
razrunelord has quit []
<apeiros> Piotrek: rdoc/yard are for generating docs
<apeiros> ri is for reading docs
cocotton has quit [Ping timeout: 240 seconds]
stantona has joined #ruby
<apeiros> (I think yri for yard, not sure, I usually view them in the browser)
paulfm has quit []
blackmesa has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
<Piotrek> yyy
predator117 has joined #ruby
mark_locklear has quit [Ping timeout: 276 seconds]
Guest92259 has joined #ruby
lw has quit [Quit: s]
noop has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
mradmacher has quit [Ping timeout: 252 seconds]
<Piotrek> Weel, how to use ri?
<Piotrek> Everything returns "nothing known about xxx"
<Piotrek> *Well
Eiam has quit [Remote host closed the connection]
amargherio has joined #ruby
Eiam has joined #ruby
Hanmac has joined #ruby
<apeiros> Piotrek: sounds like you installed ruby without docs then
<apeiros> Piotrek: how to install the docs depends on how you installed ruby. how did you install it?
mikepack has joined #ruby
<shevy> hehe
Hanmac1 has quit [Ping timeout: 264 seconds]
<Piotrek> apeiros: Debian repo.
mikepack_ has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<shevy> awww
<shevy> they probably have it split into some doc-package
<shevy> apt-get install ri1.8
<shevy> gem install rdoc rdoc-data
<shevy> you may have to search for how they split it up, you poor soul
Xeago_ has quit [Remote host closed the connection]
mikepack has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhass is now known as jhass|off
thisirs has quit [Read error: Connection reset by peer]
<atmosx> gem management through random package-managers (apt-get, emerge, pkg, etc.) sucks big time
<atmosx> not to mention it's seriously outdated
DanielRb has joined #ruby
<Piotrek> ah
<Piotrek> shevy: OK, thanks
<atmosx> it's way better to install ruby vanilla manually and use that, rvm/rbenv
<Piotrek> :)
mikepack_ has quit [Ping timeout: 264 seconds]
<hfp> Anybody familiar with XPaths and Nokogiri?
morinap has quit [Remote host closed the connection]
morinap has joined #ruby
kies has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
SBoolean_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
tier has quit []
Neomex_ has joined #ruby
Neomex has quit [Ping timeout: 245 seconds]
Zenigor has quit [Remote host closed the connection]
<benzrf> hfp: y not css selectors
bthesorceror has quit [Quit: bthesorceror]
bmurt has quit []
morinap has quit [Ping timeout: 245 seconds]
<hfp> benzrf: Because I can't figure how to do what I want with CSS selectors. I'm trying to write a screen scrapper and I want to find within a table all the td that have a specific attribute value and remove the parent tr node from the Nokogiri element
<hfp> I'm not sure how to do that with css selectors, I thought only xpath could do it
<Rojo> Piotrek: there is also TomDoc
<benzrf> table td[data-foo='wut']
<benzrf> ^css
<hfp> Yes and how do I get Nokogiri to remove the parent node, ie the tr?
mijicd has joined #ruby
Kricir has joined #ruby
taybin has quit [Quit: This computer has gone to sleep]
robertodecurnex has quit [Remote host closed the connection]
Kricir_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
mu5k17u has quit [Quit: Leaving]
anaeem1 has quit [Remote host closed the connection]
kies has quit [Ping timeout: 245 seconds]
<hfp> benzrf: I'm not sure it's possible with css selectors
<benzrf> 05:02 < benzrf> table td[data-foo='wut']
<benzrf> 05:02 < benzrf> ^css
monkegjinni has joined #ruby
<hfp> benzrf: This selects the td, how to remove the tr ancestor?
niklasb has quit [Quit: WeeChat 0.4.3]
BizarreCake has quit [Quit: Leaving]
<apeiros> hfp: dom modification is neither part of CSS nor XPath
<apeiros> hfp: take a look at Node and NodeSet docs for dom mod
mikepack has joined #ruby
alexju has quit [Remote host closed the connection]
<kenneth> hey all; so i'm looking to build a library that looks somewhat like this
NukePuppy has quit [Ping timeout: 264 seconds]
<hfp> apeiros: It's not to modify the DOM per se. I use Nokogiri to scrap a webpage and then I have to parse it to extract only certain values. But the page has, once in a while, an irregular tr with a colspan=6. So I want to remove these tr altogether before doing the parsing because it messes everything up
<kenneth> you can subscribe to something, by passing it a block that gets executed whenever this event happens
<benzrf> ]]]]]]]]
Morkel has quit [Quit: Morkel]
<benzrf> oops
alexju has joined #ruby
<kenneth> but with the ability to break from the block to terminate the execution
<benzrf> hfp: cant you get the nodeset for that, then traverse back upward
<apeiros> hfp: "how to remove tr ancestor" - that's dom modification
<kenneth> is there a way to intercept a break? when the block is not nicely and linearly called through through a yield
<hfp> apeiros: Maybe I worded it poorly
<apeiros> maybe
Xeago has joined #ruby
<hfp> benzrf: I'm not sure, I started using Nokogiri 2 hours ago...
mikepack_ has joined #ruby
<shevy> hehehe
Kricir_ has quit [Ping timeout: 252 seconds]
ctp has joined #ruby
<apeiros> hfp: tr:not([colspan=6])
Gadgetoid_ has joined #ruby
<apeiros> selects all tr's which don't have colspan=6
<hfp> apeiros: Didn't think of that haha thanks I'll try it now
vinleod has joined #ruby
anaeem1 has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
netf has quit [Write error: Connection timed out]
timfoo has quit [Write error: Broken pipe]
Gadgetoid has quit [Ping timeout: 1825 seconds]
peckermanzzz has quit [Ping timeout: 1825 seconds]
Caius has quit [Ping timeout: 1825 seconds]
soulcake has quit [Ping timeout: 1825 seconds]
Gadgetoid_ is now known as Gadgetoid
Piotrek has left #ruby ["/part"]
netf has joined #ruby
peckermanzzz has joined #ruby
Caius has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
dvcliving has joined #ruby
<dvcliving> hello
Caius is now known as Guest3499
aspires has joined #ruby
soulcake has joined #ruby
holden247 has quit [Quit: Leaving.]
mikepack has quit [Ping timeout: 252 seconds]
nmokru has quit [Quit: nmokru]
Rollabunna has joined #ruby
timfoo has joined #ruby
alexju has quit [Ping timeout: 264 seconds]
<dvcliving> someone uses rails? I cannot join #rails. I have a really weird problem with registration. All fields are failing and empty, the model is the same as before (it worked), controllers are the same, some gems where updated. Still on the same rails version. I checked the request and the fields as sent as json and processed by the right controller. Anybody knows what can be happening?
djbkd has quit [Remote host closed the connection]
<dvcliving> or any idea on how to procceed, I wastes 4 hours on this, cannot get a solution
mikepack_ has quit [Ping timeout: 272 seconds]
joaoh82 has quit [Remote host closed the connection]
<havenwood> dvcliving: /msg NickServ REGISTER <password> <email-address>
<havenwood> dvcliving: ^ to register your nick
sailias has quit [Quit: Leaving.]
kies has joined #ruby
<havenwood> dvcliving: like: /msg NickServ REGISTER sekr3t example@example.com
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> dvcliving: after registering your nick you should be able to join #rubyonrails
<dvcliving> im registred
<dvcliving> and authenticated
relix has joined #ruby
kilk_ has joined #ruby
<hfp> apeiros: That works, thanks.
yfeldblum has joined #ruby
mattmcclure has joined #ruby
Rollabunna has quit [Ping timeout: 245 seconds]
lewix has quit [Ping timeout: 264 seconds]
nowthatsamatt has joined #ruby
dwayhs has joined #ruby
ylluminate has quit [*.net *.split]
nomadic has quit [*.net *.split]
wlanboy has quit [*.net *.split]
thoolihan has quit [*.net *.split]
thejoecarroll has quit [*.net *.split]
camt has quit [*.net *.split]
Kamilion has quit [*.net *.split]
felixjet has quit [*.net *.split]
froy has quit [*.net *.split]
anekos has quit [*.net *.split]
bitscraper has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
mburns has quit [*.net *.split]
machty has quit [*.net *.split]
Senjai has quit [*.net *.split]
andrewstewart has quit [*.net *.split]
zrl has quit [*.net *.split]
blenny has quit [*.net *.split]
davidcelis has quit [*.net *.split]
Killerkeksdose_ has quit [*.net *.split]
GeekOnDecaf has joined #ruby
Killerkeksdose has joined #ruby
froy has joined #ruby
wlanboy has joined #ruby
wlanboy has quit [Changing host]
wlanboy has joined #ruby
davidcelis has joined #ruby
mburns has joined #ruby
nomadic_ has joined #ruby
davidcelis has quit [Changing host]
ylluminate has joined #ruby
davidcelis has joined #ruby
felixjet has joined #ruby
blenny has joined #ruby
andrewstewart has joined #ruby
Senjai has joined #ruby
anekos has joined #ruby
thejoecarroll has joined #ruby
GeekOnDecaf is now known as GeekOnCoffee
bitscraper has joined #ruby
Kamilion has joined #ruby
zrl has joined #ruby
thoolihan has joined #ruby
machty has joined #ruby
<Sigma00> dvcliving: #rails isn't the channel you want
jkline has quit [Quit: jkline]
djbkd has joined #ruby
combusean has joined #ruby
<Sigma00> and also !code
<Sigma00> !gist
<apeiros> Sigma00: #rails forwards to #rubyonrails these days
<helpa> http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<Sigma00> apeiros: oh, nice to know
kies has quit [Ping timeout: 264 seconds]
treehug88 has quit []
Darryl has quit [Quit: Connection closed for inactivity]
<benzrf> !version
yfeldblum has quit [Ping timeout: 240 seconds]
<benzrf> eeaaahhh
Shidash has quit [Quit: Leaving.]
soulcake has quit [Ping timeout: 272 seconds]
barratt has quit [Ping timeout: 272 seconds]
[42] has quit [Ping timeout: 272 seconds]
]42[ has joined #ruby
barratt has joined #ruby
soulcake has joined #ruby
]42[ is now known as [42]
Takle has joined #ruby
TheKruex has joined #ruby
toordog has quit []
ndrei has quit [Ping timeout: 264 seconds]
almostwhitehat has left #ruby [#ruby]
mostlybadfly has joined #ruby
failshell has quit []
Wolland has quit []
bradhe has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
amargherio has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
lw has joined #ruby
nfk has quit [Quit: yawn]
<dvcliving> Sigma00
nycto has quit [Read error: Connection reset by peer]
<Sigma00> join the rails channel
<hfp> I don't get it... I have `foo = scrapped_stock_prices.search(".yfnc_datamodoutline1 table tr:not([colspan='6'])"); p foo.css('td')[141]`. 141 has the value 6 for colspan, so why is it selected?
<hfp> ^ using Nokogiri
nmokru has joined #ruby
ldnunes has quit [Quit: Leaving]
nahtnam has joined #ruby
DEA7TH has joined #ruby
<nahtnam> Hey! I have a quick question. https://gist.github.com/nahtnam/441215de06d78cb02a29 <- I am going through ever number in an array. How can I find its position in the array?
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<hoelzro> nahtnam: use each_with_index
<apeiros> nahtnam: .each_with_index do |number, index|
<DouweM> each_with_index do |number, index|
<apeiros> plerp
<Sigma00> >> [5,6,2,3,1,4].each_with_index {|n, i| print "#{i}: #{n} "}
<eval-in> Sigma00 => 0: 5 1: 6 2: 2 3: 3 4: 1 5: 4 [5, 6, 2, 3, 1, 4] (https://eval.in/161283)
camt has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
<nahtnam> Thanks guys!
<nahtnam> Your the best! :)
<Sigma00> my the best what? <_<
ericboehs has joined #ruby
nmokru has quit [Client Quit]
momomomomo has joined #ruby
<ericboehs> Is there a clever way to make an object that responds to any method with the output of the first argument? Here's a crappy example using Struct: `Struct.new(:noop){ def load s; s end; def dump s; s end }.new.load {foo: 'bar'}`
Kerea has joined #ruby
r0bby has quit [Excess Flood]
r0bby has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
<wallerdev> ericboehs: method_missing ?
treehug88 has joined #ruby
sambao21 has joined #ruby
<ericboehs> Yeah but I also want to define the class on the fly
<apeiros> Class.new
<apeiros> though, why you'd need a class is beyond me
<apeiros> sounds to me like a single object would suffice.
RaCx has joined #ruby
shredding has quit [Quit: shredding]
timfoo has quit [Write error: Broken pipe]
netf has quit [Write error: Broken pipe]
<DouweM> >> Class.new { def method_missing(m, arg, *args, &block); arg; end }.new.foo({ foo: "bar" })
<eval-in> DouweM => {:foo=>"bar"} (https://eval.in/161285)
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
<nahtnam> Sigma00: Everybody is the best
<nahtnam> Lol
benlieb has quit [Quit: benlieb]
tacit7 has quit [Ping timeout: 264 seconds]
b1205 has joined #ruby
<nahtnam> I need a little more help. https://gist.github.com/nahtnam/3cb822d4a4101de9beab <- If im not wrong, this code should run 8 times (each statement), but its only running once. (I know I can just use .sort but I want to make my own sorting system).
<ericboehs> DouweM: Doh. Of course! That's perfect
<ericboehs> Why do I need it? Rails...
<ericboehs> haha
<DouweM> ericboehs: I do Rails and I've never needed this ;)
<DouweM> ericboehs: what are you going to do with it?
Neomex has joined #ruby
<apeiros> >> o = Object.new.tap do |o| def o.method_missing(m, arg, *args, &block); arg; end end.foo({ foo: "bar" })
<eval-in> apeiros => {:foo=>"bar"} (https://eval.in/161290)
<Sigma00> nahtnam: it only runs once because start == 1 at the beginnig of the second loop
netf has joined #ruby
silkfox has quit [Ping timeout: 252 seconds]
<apeiros> ericboehs: ^
<DouweM> if you only need a single object, apeiros's is better
<nahtnam> Sigma00: Thanks! :)
<DouweM> if for some reason you really want a class, use Class.new
<ericboehs> DouweM: Using a JSON data store in postgres
timfoo has joined #ruby
Neomex_ has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
<ericboehs> Either Rails' json coder support is broke or I'm not using it right
Neomex has quit [Client Quit]
anaeem1 has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
adantj has quit [Ping timeout: 240 seconds]
<ericboehs> I have a pg column type of json on a "service_keys". In my model I'm doing `store :service_keys, accessors: [:rdio_key], coder: JSON` and rails tries to JSON.load on a hash
<Sigma00> if you want to be REALLY crazy, you could add method_missing to NilClass
yfeldblum has joined #ruby
<ericboehs> Sigma00: nty :P
jonahR has quit [Remote host closed the connection]
<dvcliving> Sigma00 any idea? I shared the code
joaoh82 has joined #ruby
chipotle_ has quit [Quit: cya]
wjimenez5271 has left #ruby [#ruby]
Blaguvest has joined #ruby
chipotle has joined #ruby
<Sigma00> "I have this really weird problem with registration" expound on this please
Senjai has quit [Changing host]
Senjai has joined #ruby
jxf has quit [Ping timeout: 252 seconds]
<Sigma00> I assume build_resource is a helper?
claymore has quit [Quit: Leaving]
<Sigma00> oh, it's Devise
<dvcliving> yes
Kerea has quit [Quit: leaving]
<dvcliving> devise
<dvcliving> registration form shows all fields empty and invalid
<Sigma00> btw preferred_language is misspelled
jkline has joined #ruby
<dvcliving> and all the validation messages are shown
<dvcliving> yes
<dvcliving> let me check
MrDoctor has quit [Remote host closed the connection]
MrDoctor has joined #ruby
TheKruex has quit []
MrDoctor has quit [Read error: No route to host]
mikepack has joined #ruby
<dvcliving> * Now talking on ##namespace
<dvcliving> * Now talking on ##namespace
<dvcliving> Sigma00
MrDoctor has joined #ruby
<dvcliving> its didn?t change
<nahtnam> Lol, i give up
<dvcliving> it sets the locale from locale helper
benlieb has joined #ruby
kilk_ has quit [Quit: kilk_]
<Sigma00> dvcliving: I suggest you use a tool like PRY (or log heavily) to debug this problem
aspires has quit []
<banister> Sigma00 it's spelt pry not PRY :P it's not an acronu
<banister> acronym
Zenigor has joined #ruby
joaoh82 has quit [Ping timeout: 245 seconds]
datafirm has quit [Quit: Computer has gone to sleep.]
datafirm has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
datafirm has quit [Read error: Connection reset by peer]
<matled> PRY: not an acRonYm?
nmokru has joined #ruby
<banister> cute :)
qwyeth has quit [Remote host closed the connection]
<fresham> Is there a better way to parallel assign an array to a hash than this? https://gist.github.com/fresham/d4b0e672751671079261
dblessing has quit [Quit: dblessing]
mikesplain has quit [Ping timeout: 245 seconds]
<matled> fresham: you could use Hash[keys.zip(values)]
aspires has joined #ruby
nmokru has quit [Client Quit]
Notte has quit [Remote host closed the connection]
adantj has joined #ruby
dwayhs_ has joined #ruby
SCommette has joined #ruby
<fresham> Oh, yeah, that makes sense.
<fresham> matled: Thanks!
<jheg> does has_value? work when the value of a key is an array?
<jheg> an array of strings
frem has joined #ruby
<Tricon> matled: Good answer.
descala has quit [Ping timeout: 276 seconds]
Zenigor has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 240 seconds]
momomomomo has quit [Quit: momomomomo]
Zenigor has joined #ruby
toordog has joined #ruby
<nahtnam> Hey!
<fresham> Yeah, that’s spot on. Exactly what I was looking for.
<apeiros> jheg: seems has_value? uses == to test equality
<nahtnam> How can I swap two items in an array?
dwayhs has quit [Ping timeout: 264 seconds]
<apeiros> jheg: so yes, it should work with array of strings
enebo has quit [Quit: enebo]
<apeiros> nahtnam: ary[a],ary[b] = ary[b],ary[a]
Zenigor_ has joined #ruby
<nahtnam> apeiros: Is there a swap function or is that the only way?
nmokru has joined #ruby
<apeiros> nahtnam: there's no swap method. but no, this is not the only way.
frem__ has quit [Ping timeout: 252 seconds]
<havenwood> >> [*:a..:c].map.with_index(1) { |char, index| [char, index] }.to_h
<eval-in> havenwood => {:a=>1, :b=>2, :c=>3} (https://eval.in/161307)
<nahtnam> apeiros: Oh ok.
<fresham> I’m actually parsing rows of data and that cleaned everything up quite a bit.
wallerdev has quit [Ping timeout: 272 seconds]
<nahtnam> Maybe in an update they will add a swap function
<jheg> if hash1.has_value?("string1") is returning false
<apeiros> nahtnam: unlikely
OffTheRails has joined #ruby
dangerousdave has joined #ruby
<nahtnam> apeiros: Why not?
<jheg> for hash1 = {lenders: ["string1", "string2", "string3"] }
<DouweM> havenwood: [*:a..:c].map.with_index(1) { |*args| args }.to_h — slightly shorter ;)
<apeiros> nahtnam: because ruby is already ~20y old
<apeiros> if they wanted to add a swap method to array, they'd probably have done so long ago
<nahtnam> apeiros: So, people are still contributing to it
<havenwood> >> [*:a..:c].map.with_index(1).to_h
<eval-in> havenwood => {:a=>1, :b=>2, :c=>3} (https://eval.in/161308)
Kricir has joined #ruby
<apeiros> jheg: because "string1" is not a value in that hash
<havenwood> DouweM: shorter yet ^
<apeiros> jheg: ["string1", "string2", "string3"] is a value in that hash
<nahtnam> >> 5+5
<eval-in> nahtnam => 10 (https://eval.in/161309)
<DouweM> havenwood: I wondered if that'd work but didn't bother trying :P good to know it does
<jheg> is there a way to drill into that array using has_value? that you know of?
Zenigor has quit [Ping timeout: 240 seconds]
emptymag00 has quit [Read error: Connection reset by peer]
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gusblan has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros> jheg: no. as said, has_value? tests with == whether a value in the hash is equal to what you passed it. that's it. nothing more, nothing less.
hpoydar has quit [Remote host closed the connection]
<apeiros> if you want to drill down, you'll have to do manually
<jheg> OK thanks apeiros
vifino has quit [Quit: Ze Cat now leaves...]
echevemaster has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
jobewan has quit [Quit: Leaving]
Matip has quit [Read error: Connection reset by peer]
Matip has joined #ruby
Matip has quit [Changing host]
Matip has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
datafirm has joined #ruby
<jheg> apeiros: ah ha! hash1.first.last.include?("string1")
SCommette has quit [Quit: SCommette]
Zenigor_ has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> jheg: I think you should not use a hash for whatever you're doing.
<apeiros> jheg: also, that will only test a single value in the hash
<jheg> I'm just fiddling really
sambao21 has joined #ruby
<jheg> at the mo I'm doing no more than trying to learn the language
mehlah has joined #ruby
nmokru has quit [Quit: nmokru]
dangerousdave has quit [Ping timeout: 272 seconds]
<apeiros> jheg: well, using the right data structure should probably be a part of that
thesheff17 has quit [Ping timeout: 245 seconds]
riotjone_ has joined #ruby
vinleod has quit [Quit: Computer has gone to sleep.]
mijicd has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 260 seconds]
dawkirst has quit [Remote host closed the connection]
nmokru has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
cjsarette has quit [Remote host closed the connection]
<jheg> apeiros: OK thanks really appreciate the advice
cjsarette has joined #ruby
SCommette has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
jottr_ has joined #ruby
bradhe has joined #ruby
moritzs has joined #ruby
andrewlio has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
nanoyak has joined #ruby
Nahra has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 272 seconds]
dukedave has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 244 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
ffranz has quit [Quit: Leaving]
akonny has joined #ruby
momomomomo has joined #ruby
geggam has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
nowthatsamatt has quit [Quit: nowthatsamatt]
nmokru has quit [Quit: nmokru]
newUser1234 has quit [Remote host closed the connection]
nmokru has joined #ruby
Azulinho has quit [Ping timeout: 240 seconds]
<jkline> I have two gems: jkline-mylib and jkline-myapp. The specs on jkline-myapp are failing because it is using an incompatible version of jkline-mylib, even though the gemspec lists the required version. I would appreciate suggestions how to fix this, including links to online docs.
treehug88 has quit []
<jkline> (its a hard topic to google search for relevant information)
aspires has quit []
<dvcliving> Sigma00
<dvcliving> the problem was
hpoydar has joined #ruby
<jkline> jkline-myapp.gemspec says "jkline-mylib", "= 0.1.0" but instead `rake spec` is using jkline-mylib 0.2.0
<dvcliving> anyway, thanks !
<dvcliving> good bye people zZZzz
stantona has quit [Remote host closed the connection]
nmokru has quit [Client Quit]
dvcliving has quit [Quit: zZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzzzZZzz]
nmokru has joined #ruby
aspires has joined #ruby
djbkd has quit [Remote host closed the connection]
sambao21 has joined #ruby
Valesk_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
nmokru has quit [Client Quit]
hpoydar has quit [Ping timeout: 252 seconds]
nmokru has joined #ruby
x1337807x has joined #ruby
frem has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
freerobby has quit [Quit: Leaving.]
<DEA7TH> Is there a method I can use to calculate the median of an array? It doesn't need to be high performant.
<benzrf> DEA7TH: sort it and take the middle item?
spider-mario has quit [Remote host closed the connection]
freezey has quit []
<DEA7TH> ah, my bad - it's already sorted
<DouweM> array[array.length/2] then
sambao21 has quit [Quit: Computer has gone to sleep.]
hpoydar has joined #ruby
klaut has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 272 seconds]
<Sigma00> only if array is even
joaoh82 has joined #ruby
mikepack has joined #ruby
<Sigma00> er, odd
<Sigma00> and you'd want +1
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nmokru has quit [Quit: nmokru]
nmokru has joined #ruby
<apeiros> >> a = [1,2,3]; a[a.length/2]
<eval-in> apeiros => 2 (https://eval.in/161371)
<apeiros> I don't think you want a +1
<apeiros> but depending on what you want, you want to special case even length arrays
benzrf is now known as benzrf|offline
gusblan has quit [Remote host closed the connection]
nmokru has quit [Client Quit]
nmokru has joined #ruby
<Sigma00> oh you're right, since index starts at 0 that's fine
Zai00 has quit [Quit: Zai00]
<DouweM> ;)
joaoh82 has quit [Ping timeout: 272 seconds]
mikepack has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stantona has joined #ruby
GriffinHeart has joined #ruby
DEA7TH has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
nmokru has quit [Quit: nmokru]
jkline has quit [Quit: jkline]
nmokru has joined #ruby
Kricir has joined #ruby
frem has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
sdouglas has joined #ruby
arrubin has quit []
x1337807x has joined #ruby
jkline has joined #ruby
nmokru has quit [Client Quit]
snath has quit [Ping timeout: 272 seconds]
akonny has quit [Quit: akonny]
predator117 has quit [Ping timeout: 264 seconds]
nmokru has joined #ruby
gusblan has joined #ruby
hermanmunster has quit [Remote host closed the connection]
monkegjinni has joined #ruby
hermanmunster has joined #ruby
_jayel_ has joined #ruby
predator117 has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
MrDoctor has quit [Remote host closed the connection]
MrDoctor has joined #ruby
_jayel_ has quit [Quit: Leaving]
yetanotherdave has quit [Ping timeout: 264 seconds]
nmokru has quit [Client Quit]
Avahey_ has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
RaCx has quit [Quit: Computer has gone to sleep.]
Valesk_ has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
yetanotherdave has joined #ruby
r0bby has quit [Excess Flood]
r0bby has joined #ruby
nahtnam has quit [Quit: Page closed]
Rollabunna has joined #ruby
karmatr0n has quit []
MrDoctor has quit [Ping timeout: 252 seconds]
<jheg> DEA7TH: would this work?
<jheg> array = [1,4,34,22,12,67,34,6]
<jheg> if array.length.odd?
<jheg> i = array.length / 2 + 0.5
<jheg> puts "The median is #{array[i]}"
<jheg> else
<jheg> i = array.length / 2 - 0.5
<jheg> i2 = array.length / 2 + 0.5
<jheg> puts "The median is #{array[i]} and #{array[i2]}"
<jheg> end
doodlehaus has joined #ruby
amargherio has joined #ruby
Guest92259 has quit [Quit: Leaving...]
chrishough has quit [Quit: chrishough]
<Sigma00> !gist
<helpa> http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<DouweM> jheg: you can't use floats for array indexes
usr583 has joined #ruby
<jheg> sorry
<jheg> its not a float
<DouweM> yeah it is
<jheg> ah sorry
blackmesa has quit [Ping timeout: 264 seconds]
<jheg> would I need to convert to int?
<jheg> although it did work as I intended
<DouweM> why are you messing with + 0.5 anyway? 5/2 == 2, because you're dividing integers. 2 is the "lower median index", 2 + 1 (so len/2+1) is the "higher median index"
timonv has quit [Ping timeout: 240 seconds]
mary5030_ has joined #ruby
<DouweM> no need for +0.5
bthesorceror has joined #ruby
toastynerd has quit [Remote host closed the connection]
bradhe has joined #ruby
Rollabunna has quit [Ping timeout: 240 seconds]
<jheg> so better to write 9 / 2 + 1 to get the middle number ?
<jheg> to avoid changing the int to a float?
snath has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
kevind has quit [Quit: kevind]
<DouweM> length / 2 for an odd length is the left side of the median. if you want the right side, use length / 2 + 1
usr583 has quit [Quit: Page closed]
bradhe has quit [Ping timeout: 252 seconds]
<DouweM> ah damn, I'm confusing things as well I think
hpoydar has quit [Remote host closed the connection]
<jheg> for odd isn't it just length / 2 - 1 for the middle number
<DouweM> it's completely the other way around
<jheg> oh yeah length / 2 for odd
<DouweM> if you have 3 numbers, the index of the median is 1, or 3/2, without -1
<DouweM> right. it's with an even length that things get hairy
<jheg> length / 2 - 1 and length / 2 for even
<DouweM> 4/2 == 2, which is the right side, 4/2-1==1 is the left side
<DouweM> yup
<DouweM> sorry for making this even more confusing :
<DouweM> :/
<jheg> so 9 / 2 - 1 [3] and 9 / 2 [4]
<apeiros> .length/2 is the middle index already. no -1, no +1
<DouweM> I was mixing a couple of things up and not really thinking it through
<jheg> lol
<DouweM> apeiros: for even length, length/2 is the right side, length/2-1 the left side
gusblan has quit [Remote host closed the connection]
<apeiros> yes. for even length arrays you need to know whether you want average of low & high median or one of low/high
<jheg> yeah thats what I have now
dukedave has joined #ruby
<jheg> night all thanks once again for all your help o/
SCommette has joined #ruby
aantix has joined #ruby
jheg has quit [Quit: jheg]
thesheff17 has joined #ruby
kies has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
djbkd has quit [Remote host closed the connection]
bthesorceror has joined #ruby
djbkd has joined #ruby
hermanmunster has joined #ruby
jkline has quit [Quit: jkline]
doodlehaus has quit [Remote host closed the connection]
chrishough has joined #ruby
benzrf|offline is now known as benzrf
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nmokru has joined #ruby
cashnguns has joined #ruby
mijicd has joined #ruby
jespada has joined #ruby
l3ck has joined #ruby
Takle has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 252 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
gusblan has joined #ruby
dwayhs__ has joined #ruby
danman has quit [Quit: danman]
ephemerian has left #ruby [#ruby]
maletor_ has quit [Ping timeout: 245 seconds]
l3ck has quit [Client Quit]
dwayhs_ has quit [Ping timeout: 240 seconds]
maletor has joined #ruby
danman has joined #ruby
Nahra has quit [Ping timeout: 245 seconds]
Shidash has joined #ruby
northfurr has joined #ruby
andrewjanssen has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
Valesk_ has joined #ruby
NukePuppy has joined #ruby
Nahra has joined #ruby
joaoh82 has joined #ruby
lw has joined #ruby
gusblan has quit [Remote host closed the connection]
testcore has quit [Quit: BitchX: it keeps going and going and going and going and...]
sdouglas has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
danman has quit [Ping timeout: 264 seconds]
gaboesquivel has joined #ruby
<shevy> dumdedum
sgp667 has joined #ruby
<shevy> will mruby replace mri ruby?
nmokru has quit [Quit: nmokru]
Takle has joined #ruby
cjsarette has quit [Remote host closed the connection]
cjsarette has joined #ruby
gusblan has joined #ruby
SCommette has quit [Quit: SCommette]
<sgp667> hey guys I got super noobish question but its ungooglable? what is this? ="> #<Mysql:0x96734b0>" I got this as response in irb to command "db = Mysql.new ...."
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
joaoh82 has quit [Ping timeout: 272 seconds]
i_s has quit [Read error: Connection reset by peer]
gaboesquivel has quit [Client Quit]
gaboesquivel has joined #ruby
sdouglas_ has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
phinfonet has quit [Read error: Connection reset by peer]
r0bby is now known as robbyoconnor
MZAWeb has quit [Ping timeout: 240 seconds]
<shevy> sgp667 do db.class