ljarvis changed the topic of #ruby-lang to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p547: http://ruby-lang.org || Paste code on http://gist.github.com
weems|mac has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sarkyniin has joined #ruby-lang
sepp2k has quit [Ping timeout: 272 seconds]
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
ddv has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
ddv has joined #ruby-lang
Sigma00 has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
cornerman has joined #ruby-lang
cornerma1 has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
homeless_ has joined #ruby-lang
Sirupsen has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
<homeless_> I have heard about the Magpie developers, Are all the languages such as ruby,python,php,perl and so on have been shaped and developed by the same elite groups
<whitequark> what?
<whitequark> elite groups?
<homeless_> elite developers
<whitequark> elite developers?
<zenspider> yes. yes they are.
<zenspider> it's a language cabal
<whitequark> apeiros: swift "may" end up open-source
<whitequark> aiui the core developers want that
<homeless_> cabal? that's bad
<whitequark> apeiros: either way, the benefit of swift is that now everyone will want the same cool thing apple developers have, and hopefully ML derivatives will become more widely used
<whitequark> (for me. I'm disinterested in OS X)
<zenspider> homeless_: it's the only way to keep the languages pure
<homeless_> zenspider: how
<zenspider> homeless_: secret meetings
Sirupsen has quit [Ping timeout: 240 seconds]
<homeless_> instead of jumping to new languages like addict, is it better to focus on one
<homeless_> i mean isn't it better?
<Xney> hmm what am I missing ... expect(true).to be_true
<Xney> expected true to respond to `true?`
<zenspider> Xney: haha. good question!
saarinen has quit [Quit: saarinen]
<Xney> irb(main):001:0> true.respond_to?(:true?)
<Xney> => false
<zenspider> homeless_: yes. I stick to visual basic.
<Xney> this is rspec 3.x
<homeless_> who are these elite developers
<homeless_> how many are they
<homeless_> what's their motive while developing new languages?
seanosaur has quit [Remote host closed the connection]
<Xney> I see.. in rspec 3, be_true expects a true? method and be_truthy is not-false/not-nil, and be true is literally equal to the true singleton
<Xney> geez
<homeless_> are they doing it for their self-interest or distinguish them better from their mediocre colleagues or trying to change the world
* Xney wonders who came up with be_true meaning send(:true?)==true and not be_true?
pixelhandler has quit [Quit: pixelhandler]
<Xney> expect(true).to be_true fails O_o
homeless_ has quit [Ping timeout: 246 seconds]
David___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sirupsen has joined #ruby-lang
<zenspider> Xney: hah!
duderonomy has joined #ruby-lang
David___ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
emmesswhy has joined #ruby-lang
kalehv_ has quit [Remote host closed the connection]
kalehv has joined #ruby-lang
hahuang65 has quit [Ping timeout: 256 seconds]
David___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Xney> I'm having perl flashbacks, where true and false are.. uhm.. guidelines
toastynerd has joined #ruby-lang
kalehv has quit [Ping timeout: 260 seconds]
Cakey has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
Rich_Morin has joined #ruby-lang
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fenicks has quit [Remote host closed the connection]
sarkyniin has quit [Quit: Quitte]
justinmcp has quit [Ping timeout: 240 seconds]
<Rich_Morin> http://robots.thoughtbot.com/psa-do-not-use-system-ruby indicates that the default Ruby on Mavericks is badly broken and I've run into some problems trying to update my gems from Snow Leopard. (eg, build errors on libxml-ruby). Suggestions?
shinnya has quit [Ping timeout: 272 seconds]
djbkd has quit [Remote host closed the connection]
David___ has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
weems|mac has joined #ruby-lang
duderonomy has joined #ruby-lang
David___ has quit [Ping timeout: 272 seconds]
mistym has joined #ruby-lang
toastynerd has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 240 seconds]
seanosaur has joined #ruby-lang
seanosaur has quit [Remote host closed the connection]
seanosaur has joined #ruby-lang
<darix> Rich_Morin: that article is nothing but FUD
<Rich_Morin> okaaay ... but I still have the build errors to contend with.
<darix> well
<darix> it would help if you share the error message ;)
<darix> (use a paste site like pastie.org or gist)
seanosaur has quit [Ping timeout: 240 seconds]
Sigma00 has left #ruby-lang ["Textual IRC Client: http://www.textualapp.com/"]
duderonomy has quit [Read error: Connection reset by peer]
<Rich_Morin> OK, I ran it again; here's the output: http://pastie.org/9418990
<Rich_Morin> I would have trimmed it down, but I'm not sure which parts may be helpful...
<darix> so
<darix> your error is from nokogiri
<darix> -multiply_definedsuppress
<darix> that's something passing weird things to clang
<Rich_Morin> That is, the xml jazz is a nokogiri dependency?
<darix> naw
<darix> nokogiri is another libxml2 binding
<darix> but
<darix> your main problem is clang doesnt like one compiler option passed to it
<darix> ruby -r rbconfig -e 'puts RbConfig::CONFIG["CFLAGS"]'
<Rich_Morin> -g -Os -pipe
<darix> hm
<darix> ruby -r rbconfig -r pp -e 'pp RbConfig::CONFIG' | grep multiply_definedsuppress
<Rich_Morin> "-undefineddynamic_lookup -multiply_definedsuppress -install_name /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0 $(XLDFLAGS)",
<Rich_Morin> "DLDFLAGS"=>"-undefineddynamic_lookup -multiply_definedsuppress",
<darix> ok
<darix> run again with grep -B1
<darix> to see which setting it passes
<darix> i guess LDFLAGS or so
<darix> basially that is breaking it for you
<Rich_Morin> "LIBRUBY_DLDFLAGS"=>
<Rich_Morin> "-undefineddynamic_lookup -multiply_definedsuppress -install_name /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0 $(XLDFLAGS)",
<Rich_Morin> --
<Rich_Morin> "ARCH_FLAG"=>" ",
<Rich_Morin> "DLDFLAGS"=>"-undefineddynamic_lookup -multiply_definedsuppress",
<darix> so you could edit the rbconfig.rb file
<darix> (and please report that as a bug to Apple)
<darix> it is kinda funny how they got their own ruby build when the clang on their system doesnt support it ,)
saarinen has joined #ruby-lang
<Rich_Morin> This is new territory for me, so I need fairly explicit instructions. What is the path to the rbconfig.rb file and the explicit edit I should perform?
<darix> btw
<darix> "Mavericks 10.9.3 updates ruby to: ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] This seems to resolves the issue. – Sash May 21 at 23:47"
<darix> from
<darix> export ARCHFLAGS='-Wno-error=unused-command-line-argument-hard-error-in-future'
<Rich_Morin> hmmmm Unfortunately, I've seen reports of multiple monitor problems on 10.9.3 and 10.9.4
<darix> then run your gem upgrade command
saarinen has quit [Client Quit]
candidkilsborne has quit [Remote host closed the connection]
amerine has quit [Ping timeout: 240 seconds]
amerine has joined #ruby-lang
<Rich_Morin> http://pastie.org/9419012 - much improved, but still confused...
<darix> it wants libiconv for nokogiri
<darix> i am sure googlign for "nokogiri libiconv osx"
<darix> will show something
<darix> the stackoverflow link was the first hit for multiply_definedsuppress
<Rich_Morin> ok, tnx
seanosaur has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
<darix> as I thought ... brew install libiconv ...
<Rich_Morin> bleah
wallerdev has quit [Quit: wallerdev]
<darix> ;)
Miphix has joined #ruby-lang
<darix> so
<darix> nn
candidkilsborne has joined #ruby-lang
hahuang65 has joined #ruby-lang
concernedcitizen has quit [Quit: ZNC - http://znc.in]
amclain has joined #ruby-lang
wallerdev has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
|jemc| has joined #ruby-lang
seanosaur has quit [Remote host closed the connection]
dknox has quit [Quit: Textual IRC Client: www.textualapp.com]
malconis has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hgl has joined #ruby-lang
charliesome has joined #ruby-lang
Cakey has joined #ruby-lang
weems|mac has joined #ruby-lang
heftig has quit [Ping timeout: 250 seconds]
candidkilsborne has quit [Remote host closed the connection]
MikaAK has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
mykoweb has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has joined #ruby-lang
saarinen has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
mykoweb has quit [Ping timeout: 240 seconds]
yatish27 has joined #ruby-lang
emmesswhy has quit [Quit: emmesswhy]
Lewix has quit [Remote host closed the connection]
milky has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
gix has quit [Ping timeout: 240 seconds]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gix has joined #ruby-lang
Sirupsen has joined #ruby-lang
toastynerd has joined #ruby-lang
|jemc| has quit [Ping timeout: 272 seconds]
|jemc| has joined #ruby-lang
|jemc| has quit [Client Quit]
TrueJet has joined #ruby-lang
CaptainJet has quit [Ping timeout: 255 seconds]
toastynerd has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
tectonic has joined #ruby-lang
kalehv has joined #ruby-lang
kalehv has quit [Remote host closed the connection]
hgl has quit [Quit: Computer has gone to sleep.]
toretore has quit [Quit: This computer has gone to sleep]
seanosaur has joined #ruby-lang
tylersmith has joined #ruby-lang
seanosaur has quit [Ping timeout: 272 seconds]
davispuh has quit [Ping timeout: 245 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
Guest88437 has quit [Remote host closed the connection]
rafamaciel has joined #ruby-lang
heftig has quit [Ping timeout: 255 seconds]
TrueJet has quit []
rafamaciel has quit [Quit: Konversation terminated!]
rafamaciel has joined #ruby-lang
rafamaciel has quit [Client Quit]
Junker has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has joined #ruby-lang
Junker has quit [Quit: Konversation terminated!]
djbkd has quit [Remote host closed the connection]
Junker has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
amclain has quit [Quit: Leaving]
djbkd has joined #ruby-lang
levifig has quit [Ping timeout: 240 seconds]
BucOder has joined #ruby-lang
segy_ has joined #ruby-lang
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby-lang
segy has quit [Ping timeout: 240 seconds]
segy_ is now known as segy
justinmcp has joined #ruby-lang
vintik has joined #ruby-lang
levifig has joined #ruby-lang
heftig has quit [Quit: Quitting]
vintik has quit [Ping timeout: 255 seconds]
jxie has quit [Ping timeout: 240 seconds]
jxie has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
arBmind has joined #ruby-lang
apeiros has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
BucOder has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
yie has left #ruby-lang [#ruby-lang]
solars has joined #ruby-lang
chris2 has quit [Ping timeout: 260 seconds]
chris2 has joined #ruby-lang
uberjar has joined #ruby-lang
<uberjar> Hi. my problem is that I don't know how to eloquently describe what it is I'm tryin to program
<uberjar> but here is my best shot: I have an array of numbers for example: [155, 64, 24, 10, 6, 5, 5, 5, 2, 2, 1, 0]
<uberjar> I want to turn that array into an array of the same size.. but each number should be 0 thru 10.. no higher than 10
<uberjar> all numbers should be in aproximate same proportion as original array
<uberjar> I don't need you to solve it for me, but help me figure out what I should be "googling" for at least
duderonomy has joined #ruby-lang
apeiros has joined #ruby-lang
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 260 seconds]
mykoweb has joined #ruby-lang
<uberjar> normalization was the word I was searching for
<uberjar> figured it out, thanks anyways
uberjar has left #ruby-lang [#ruby-lang]
mykoweb has quit [Ping timeout: 240 seconds]
BucOder has joined #ruby-lang
charliesome has quit [Ping timeout: 256 seconds]
charliesome_ has joined #ruby-lang
charliesome_ has quit [Client Quit]
fullybaked has joined #ruby-lang
fullybaked has quit [Client Quit]
yfeldblum has joined #ruby-lang
tectonic has quit []
vintik has joined #ruby-lang
BucOder has quit [Quit: Computer has gone to sleep.]
AKASkip has joined #ruby-lang
vintik has quit [Ping timeout: 240 seconds]
JEG2 has quit [Quit: Connection closed for inactivity]
djbkd has joined #ruby-lang
kwd has joined #ruby-lang
Lewix has joined #ruby-lang
<Lewix> you
<Junker> no, you
kiddorails has joined #ruby-lang
relix has joined #ruby-lang
houhoulis has joined #ruby-lang
_ht has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
sMecKs has quit [Read error: Connection reset by peer]
riffraff has joined #ruby-lang
<riffraff> hei everyone
<riffraff> does anyone know what is the proper way to pass a set of keyword arguments to super if the overriden method only has positional ones?
AKASkip has quit [Ping timeout: 240 seconds]
<riffraff> i.e. spmething like (made up) def foo(a:, b:) super(**) end
kiddorails has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
ur5us has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby-lang
kiddorails has joined #ruby-lang
<Silex> you cannot change signatures and expect super to figure it out for you, super will forward as is
<Silex> reformat the arguments as you want them to be when you call super
fullybaked has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
vintik has joined #ruby-lang
scmx has joined #ruby-lang
AKASkip has joined #ruby-lang
vintik has quit [Ping timeout: 250 seconds]
Neurexin has joined #ruby-lang
tbuehlmann has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 250 seconds]
arBmind has quit [Quit: Leaving.]
hgl has joined #ruby-lang
dangerousdave has joined #ruby-lang
hgl has quit [Client Quit]
benlovell has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
elia has joined #ruby-lang
benlovell has joined #ruby-lang
arBmind has joined #ruby-lang
achiu2 has joined #ruby-lang
riffraff has quit [Quit: This computer has gone to sleep]
mikecmpbll has joined #ruby-lang
achiu1 has quit [Ping timeout: 255 seconds]
beawesomeinstead has joined #ruby-lang
arntempelgibbarn has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 255 seconds]
<yorickpeterse> morning kids
ssam2 has joined #ruby-lang
benlovell has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
vintik has joined #ruby-lang
kwd has quit [Quit: Leaving.]
kwd has joined #ruby-lang
vintik has quit [Ping timeout: 240 seconds]
yatish27 has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
Junker has quit [Ping timeout: 245 seconds]
scmx has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
diegoviola has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 272 seconds]
DEac-_ has quit [Quit: leaving]
DEac- has joined #ruby-lang
scmx has joined #ruby-lang
toastynerd has joined #ruby-lang
riffraff has joined #ruby-lang
toastynerd has quit [Ping timeout: 255 seconds]
eeezkil has joined #ruby-lang
vintik has joined #ruby-lang
DEac- has quit [Quit: leaving]
DEac- has joined #ruby-lang
marr has joined #ruby-lang
<ljarvis> moin
gpg_ has joined #ruby-lang
vintik has quit [Ping timeout: 245 seconds]
koos303 has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 255 seconds]
dangerousdave has joined #ruby-lang
toretore has joined #ruby-lang
banisterfiend has joined #ruby-lang
dangerousdave has quit []
benlovell has quit [Ping timeout: 260 seconds]
symm- has joined #ruby-lang
Neurexin has quit [Quit: Neurexin]
<gpg_> if anyone can help with this would be great
<gpg_> ive been stuck on it sice yesterday
<gpg_> thanks
thomasxie has joined #ruby-lang
thomasxie has quit [Read error: Connection reset by peer]
<ljarvis> gpg_: you're updating all every time.. it's of course going to be left with the last value you use to update them
<ljarvis> what are you expecting/trying to do?
benlovell has joined #ruby-lang
Neurexin has joined #ruby-lang
Neurexin has quit [Client Quit]
<gpg_> ljarvis: i want tu update with different values not same one?
<gpg_> ljarvis: i am trying to update with all values from array?
<yorickpeterse> Youtube jukebox via IRC as a service
kiddorails has quit [Remote host closed the connection]
<ljarvis> gpg_: you want to store an array in the db?
<gpg_> ljarvis: no
kiddorails has joined #ruby-lang
<ljarvis> then I don't understand
<gpg_> ljarvis: http://awesomescreenshot.com/01037ld719 see this screenshot
<yorickpeterse> ggherdov: You are misunderstanding what update_all does I think
<yorickpeterse> it literally updates all rows
Miphix has quit [Quit: Leaving]
<yorickpeterse> So say you have a User model
<yorickpeterse> and you do `User.update_all(:email => 'foo')`
<yorickpeterse> The SQL query for that would be
<yorickpeterse> UPDATE users SET email = 'foo';
<yorickpeterse> So it updates *all* users
Atttwww has quit [Ping timeout: 255 seconds]
<gpg_> ljarvis: my code saves the same last value from array
<ggherdov> yorickpeterse: not sure it was me
<yorickpeterse> Since you're doing it multiple times without some kind of filter the last value overwrites the rest
<yorickpeterse> ggherdov: soz, meant gpg_
<yorickpeterse> all these damn Gs!
<ggherdov> np
<gpg_> :)
<gpg_> i want instead of last value from array all values from array mapped
<gpg_> hope that makes sense
<gpg_> thanks
<yorickpeterse> Do you want to update only specific records?
<gpg_> nope
<gpg_> just one column
<yorickpeterse> What I mean is, do you want to update *all* database records in the "Model" table by setting column "column_name" to a single value?
lele|w has quit [Ping timeout: 256 seconds]
<yorickpeterse> Right now you're basically doing this:
<ljarvis> it's like doing x = "foo"; x = "bar"; and wondering why x is "bar"
<yorickpeterse> >> number = 0; numbers = [10,20,30]; numbers.each { |n| number = n }; p number
<Mon_Robot> yorickpeterse: => 30... (https://eval.in/171674)
<yorickpeterse> Mon_Robot: wtf
<ljarvis> orly
<yorickpeterse> where'd eval-in go
<gpg_> i just basically want to copy each value from array to each field under column column_name
<ljarvis> ok im done
<yorickpeterse> ljarvis: patience young grasshopped
<yorickpeterse> * hopper
<ljarvis> m8
<yorickpeterse> gpg_: You can not set multiple values to the same column of all rows
<gpg_> not all rows
<yorickpeterse> That's not possible unless you turn the Array into a single value (e.g. a comma separated string)
<gpg_> just filed under column_name
<yorickpeterse> gpg_: You are now updating all rows
<yorickpeterse> Model.update_all(column_name: i)
<yorickpeterse> Updates *everything*
<yorickpeterse> That is, all rows
<yorickpeterse> by setting "column_name" to i
<gpg_> ok then all rows with different values from array
<yorickpeterse> In SQL that would be `UPDATE models SET column_name = i`
<ljarvis> :D
<yorickpeterse> gpg_: Do you want to set each value in a separate column?
toastynerd has joined #ruby-lang
<gpg_> in separate field under column_name :)
<gpg_> yorickpeterse: u must be buddhist
<yorickpeterse> You are mixing two things here in that case
<gpg_> :))
<yorickpeterse> 1. You'll need a dynamic field name in that case
<yorickpeterse> but 2. you're using a static one
<yorickpeterse> So you'll want something like
<yorickpeterse> Model.update_all("my_field_#{some_dynamic_value_that_is_unique}" => some_value)
<yorickpeterse> Right now the same column gets overwritten every time
<ljarvis> that wont work
<gpg_> ok look i think i should do before and after screenshot of what i want to achieve :))
<gpg_> ok thanks for trying to help so far
<yorickpeterse> ljarvis: it will
<yorickpeterse> gpg_: gimme a minute
toastynerd has quit [Ping timeout: 250 seconds]
yatish27 has joined #ruby-lang
<yorickpeterse> gpg_: https://gist.github.com/YorickPeterse/eea089c335d3074e35d5 ok so there's this which uses the raw SQLite3 Gem
<gpg_> yorickpeterse: ok this is what my code at https://gist.github.com/ggeorgiev1/e137d8a8f1c6e182d025 outputs --> chrome-extension://alelhddbbhepgpmgidjdcjakblofbmce/edit.html .. And this is what i want it to output, different values corresponding to my array values --> http://awesomescreenshot.com/08d37lh1f7
<yorickpeterse> The bits at line 19 - 21 is basically what you're doing now
kiddorails has quit [Remote host closed the connection]
<yorickpeterse> I can't open chrome extension links
lele|w has joined #ruby-lang
<gpg_> yorickpeterse: ok this is what my code at https://gist.github.com/ggeorgiev1/e137d8a8f1c6e182d025 outputs --> http://awesomescreenshot.com/01037ld719 .. And this is what i want it to output, different values corresponding to my array values --> http://awesomescreenshot.com/08d37lh1f7
<yorickpeterse> So you want to update different rows
<gpg_> posting twice oops
<yorickpeterse> At least that's what it looks like
<gpg_> yes
<yorickpeterse> Ok I asked that before already
<yorickpeterse> You are, currently, updating *all* database rows with the *same value* for a certain column ("column_name")
<gpg_> yes!
<gpg_> L(
<gpg_> :)
<yorickpeterse> If you only want to update *specific* rows, you need to do something like
<yorickpeterse> Model.where(:some_column => some_value).update_all(:column_name => value)
<yorickpeterse> In other words, you need to limit what to update
jasiek has joined #ruby-lang
vintik has joined #ruby-lang
<gpg_> yorickpeterse: I am trying to: You are, currently, updating *all* database rows with the *different_value* for a certain column ("column_name")
<yorickpeterse> That however isn't what you want to do
<yorickpeterse> gpg_: do this first:
Lewix has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 240 seconds]
<yorickpeterse> change Model.update_all(column_name: i) to Model.where().update_all(column_name: i)
<gpg_> ok
<yorickpeterse> Next, how do you determine what row to update? That is, is there a unique ID you know in order to update a certain row?
<yorickpeterse> If so, change where() to where(the_name_of_that_column: the_value_that_is_unique_for_every_row)
<yorickpeterse> (replacing the names/values with the actual data)
<yorickpeterse> So you might get something like
<yorickpeterse> Model.where(:email => 'alice@example.com').update_all(:email => 'alice123@example.com')
vintik has quit [Ping timeout: 245 seconds]
<yorickpeterse> If there Model.where(...) bit *always* returns a single row you can change "update_all" to just "update"
banisterfiend has quit [Quit: Computer has gone to sleep.]
<gpg_> yorickpeterse: thanks man i can see how much you want to help me cheers. i hope i end up like you one day. no shit. i think i need to take a step back and formulate my question better.
<yorickpeterse> You'll end up like a grumpy guy who talks way too much
benlovell has joined #ruby-lang
<gpg_> :))
<yorickpeterse> also brb, lunch
<gpg_> have a good one
<gpg_> bye
tkuchiki_ has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
tkuchiki_ has joined #ruby-lang
kiddorails has joined #ruby-lang
symm- has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
<gpg_> yorickpeterse: this is the code that did it: Model.all.each_with_index do |payment, n = 0| payment.update_attributes(column_name: @enc[n]) n +=1 end
toastynerd has joined #ruby-lang
amerine has quit [Ping timeout: 260 seconds]
<ljarvis> gpg_: if you're using with_index you don't need n=0 and n+=1
yfeldblum has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
toastynerd has quit [Ping timeout: 264 seconds]
ayonkhan has joined #ruby-lang
amerine has joined #ruby-lang
heavyhor1e has joined #ruby-lang
heavyhor1e has quit [Client Quit]
<gpg_> ljarvis: thanks m8
<ljarvis> ur welcom m8
<gpg_> love u guys oops went too far
<ljarvis> tehe
<gpg_> :)
tkuchiki has joined #ruby-lang
jds has quit [Quit: Connection closed for inactivity]
strmpnk has quit [Ping timeout: 256 seconds]
<yorickpeterse> gpg_: Is the order of those encrypted values guaranteed to be the same as the order of rows in your database?
strmpnk has joined #ruby-lang
<yorickpeterse> That is, if the database rows would be in reverse order, would things still work?
dangerousdave has quit [Read error: Connection reset by peer]
tkuchiki_ has quit [Ping timeout: 256 seconds]
banisterfiend has joined #ruby-lang
dangerousdave has joined #ruby-lang
<gpg_> yes the order is the same.i had to decrypt values and rencrypt them with new encryption and then insert them back
MindfulMonk has quit [Ping timeout: 256 seconds]
MindfulMonk has joined #ruby-lang
<yorickpeterse> A bit more of a solid way, if possible, is to do something like
<yorickpeterse> values = { 1 => '...', 2 => '...' } # where 1 and 2 are primary key values (e.g. from an "id" column)
<yorickpeterse> Then you could do
faces has quit [Ping timeout: 240 seconds]
face has joined #ruby-lang
<yorickpeterse> values.each { |id, val| Model.where(:id => id).update_all(:column_name => val) }
<yorickpeterse> or Model.find(id).update_attributes(:column_name => val)
<yorickpeterse> Though that will use 2 queries instead of 1
marr has quit [Ping timeout: 245 seconds]
marr has joined #ruby-lang
<ljarvis> question, what's the point of doing Model.where(id: id).update_all if they're primary keys
<ljarvis> you could do this in a single query..
<yorickpeterse> That uses a single query
<yorickpeterse> He wants to update different rows
heftig-z has joined #ruby-lang
<yorickpeterse> Model.where(id: id).update_all(...) gets compiled into `UPDATE models WHERE id = :id SET ...`
<yorickpeterse> errr SET ... WHERE
<yorickpeterse> I always forget the order
tkuchiki_ has joined #ruby-lang
stamina has joined #ruby-lang
symm- has joined #ruby-lang
tkuchiki has quit [Ping timeout: 240 seconds]
tkuchiki_ has quit [Ping timeout: 256 seconds]
jds has joined #ruby-lang
JEG2 has joined #ruby-lang
symm- has quit [Ping timeout: 264 seconds]
vintik has joined #ruby-lang
amystephen has quit [Read error: Connection reset by peer]
amystephe has joined #ruby-lang
<heftig-z> (from #ruby) how do you register GAsyncReadyCallbacks in ruby-gir-ffi?
<yorickpeterse> heftig-z: ooff, not sure. I messed with GAsyncQueue the other day and that wasn't very pleasant either
vintik has quit [Ping timeout: 245 seconds]
<yorickpeterse> Considering gir-ffi is a pretty thin layer on top of the GTK/GObject CAPI the C docs are probably the best starting point
<yorickpeterse> Or do you mean setting it up using `GirFFI.setup` ?
<heftig-z> the C api is pretty simple, you just provide a function pointer
<heftig-z> (GAsyncReadyCallback is the type of that pointer)
<heftig-z> it's used all over GIO for asynchronous operations
<heftig-z> dbus calls in my case
<yorickpeterse> Hm, not sure if gir-ffi has any stuff in place for that. For regular signals it supports blocks in Ruby, might be worth looking into seeing how that's handled
<heftig-z> i've tried providing a proc, but I guess it's not handled properly
<yorickpeterse> since functions such as g_signal_connect() also operate on pointers
ldnunes has joined #ruby-lang
mehlah has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
ayonkhan has quit []
scmx has quit [Ping timeout: 255 seconds]
toastynerd has joined #ruby-lang
toastynerd has quit [Ping timeout: 255 seconds]
benlovell has joined #ruby-lang
tbuehlmann has quit [Quit: Leaving]
spastorino has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
mlangenberg has joined #ruby-lang
banisterfiend has joined #ruby-lang
Sgeo has quit [Read error: Connection reset by peer]
yatish27 has quit [Ping timeout: 245 seconds]
Sirupsen has joined #ruby-lang
banisterfiend has quit [Ping timeout: 250 seconds]
dwknoxy has joined #ruby-lang
<mlangenberg> I have a initializer that normally accepts an array of Car objects, the initializer selects all Wheel objects from every car. Now there is one scenario where I want to pass just one Wheel object. Is it bad to use array.all? { |e| e.is_a? Wheel } in the initializer to check for an object class?
miqui has joined #ruby-lang
Soilent has joined #ruby-lang
heftig-z has quit [Remote host closed the connection]
arntempelgibbarn has quit [Ping timeout: 240 seconds]
centrx has joined #ruby-lang
toretore has quit [Ping timeout: 264 seconds]
toretore has joined #ruby-lang
Technodrome has joined #ruby-lang
lele has left #ruby-lang ["Leaving"]
lele has joined #ruby-lang
scmx has joined #ruby-lang
<gpg_> yorickpeterse: ljarvis: Model.all.each_with_index do |payment,n| payment.update_attributes(column_name: @enc[n]) end --> saves my encrypted values to each column, BUT.. when there is a *\n* in the encrypted string it creates a new line.. instead of including the character *\n*
tbuehlmann has joined #ruby-lang
woollyams has joined #ruby-lang
<gpg_> how can i convert "" double quotes in a array of strings to single quote strings?
Technodrome has quit [Quit: Technodrome]
<centrx> gpg_, Strings are strings
toastynerd has joined #ruby-lang
cornerma1 has joined #ruby-lang
<gpg_> centrx: yes but i want single quotes so not allow interpolation
<centrx> gpg_, It sounds like the strings have already been interpolated
fullybaked has quit []
<gpg_> so how can i convert wit #gsub , array["asd","asd","asd","asd","asd","asd","asd"] to array['asd','asd','asd','asd','asd','asd','asd','asd','asd',]
arntempelgibbarn has joined #ruby-lang
<gpg_> or with any other method
<centrx> gpg_, You change the quotation marks in your editor
cornerman has quit [Ping timeout: 260 seconds]
<centrx> What are you really trying to do?
<gpg_> well encrypted strings with \n are creating new line in my db fields
toastynerd has quit [Ping timeout: 272 seconds]
<gpg_> where \n should be left literal
<apeiros> mlangenberg: sounds like bad design to me, yes
<gpg_> i guess thats the doble quotes
scmx has quit [Ping timeout: 250 seconds]
<centrx> gpg_, More likely the database is just showing you the new line
<apeiros> mlangenberg: aim for normalized input.
<centrx> gpg_, You'll have to show some code. An encryption system should return a string, not something that would be interpolated
malconis has joined #ruby-lang
Miphix has joined #ruby-lang
tkuchiki has joined #ruby-lang
<apeiros> gpg_: you realize that the \n character *is* a newline?
Blaguvest has joined #ruby-lang
seanosaur has joined #ruby-lang
<yorickpeterse> gpg_: you have to escape the "\n" if you want to use it as a literal, not a newline
<yorickpeterse> >> "\n"
<Mon_Robot> yorickpeterse: => "\n" (https://eval.in/171706)
<yorickpeterse> >> puts "\n".gsub("\n", "\\n")
<Mon_Robot> yorickpeterse: => \n... (https://eval.in/171707)
<yorickpeterse> >> puts "\n"
<Mon_Robot> yorickpeterse: => ... (https://eval.in/171708)
jgpawletko has joined #ruby-lang
<gpg_> ok yes that was the problem...all the doube quotes were replaced with single quotes and it worked, now \n is showing as a character in db field
<gpg_> even though in console when i call my array variable @enc it still outputs doublequotes..weird? but it makes a difference how variable @enc was first defined
<gpg_> which was with single quotes
Technodrome has joined #ruby-lang
<apeiros> '\n' == "\\n"
<apeiros> and that'd be 2 characters, and not "the \n character"
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gpg_> again thanks for all help guys!
charliesome has joined #ruby-lang
robin850 has joined #ruby-lang
rsl has joined #ruby-lang
scmx has joined #ruby-lang
djbkd has joined #ruby-lang
<robin850> Hello! Excuse me but is it expected that nil.singleton_class.singleton_class? == false please ?
yatish27 has joined #ruby-lang
seanosaur has left #ruby-lang [#ruby-lang]
karamazov has joined #ruby-lang
<centrx> robin850, Where is that question mark method defined?
fullybaked has joined #ruby-lang
djbkd has quit [Ping timeout: 260 seconds]
<robin850> centrx: Here http://git.io/dTefGA
<centrx> thanks
<yorickpeterse> robin850: because nil.singleton_class doesn't return a singleton class
<yorickpeterse> >> nil.singleton_class?
<Mon_Robot> yorickpeterse: => NoMethodError: undefined method `singleton_class?' for nil:NilClass (https://eval.in/171712)
<yorickpeterse> derp
<yorickpeterse> wait
<centrx> robin850, It seems wrong, but NilClass, TrueClass, and FalseClass are special
<yorickpeterse> >> nil.singleton_class
<Mon_Robot> yorickpeterse: => NilClass (https://eval.in/171713)
<yorickpeterse> >> nil.singleton_class.singleton_class?
<centrx> robin850, Though this might be a bug
<Mon_Robot> yorickpeterse: => false (https://eval.in/171714)
<yorickpeterse> >> class C; end; C.singleton_class
<Mon_Robot> yorickpeterse: => #<Class:C> (https://eval.in/171715)
<yorickpeterse> >> class C; end; C.singleton_class.singleton_class?
<Mon_Robot> yorickpeterse: => true (https://eval.in/171716)
<yorickpeterse> Ah
<yorickpeterse> Well my guess is that NilClass simply isn't a singleton class
<yorickpeterse> but nil *is* a singleton *value*
<robin850> yorickpeterse and centrx: Thank you very much!
<robin850> yorickpeterse: What does "singleton value" means please ?
<yorickpeterse> Basically means the value is created once and re-used
<yorickpeterse> true and false are singletons in that regard too if I'm not mistaken
<yorickpeterse> >> def true.foobar; end; true.foobar
<Mon_Robot> yorickpeterse: => nil (https://eval.in/171718)
<yorickpeterse> >> def nil.haha; end; nil.haha
<Mon_Robot> yorickpeterse: => nil (https://eval.in/171719)
<yorickpeterse> >> def ''.foobar; end; ''.foobar
<Mon_Robot> yorickpeterse: => SyntaxError: (eval):1: syntax error, unexpected tSTRING_BEG... (https://eval.in/171720)
<yorickpeterse> derp
<yorickpeterse> >> a = ''; def a.foobar; end; ''.foobar
<Mon_Robot> yorickpeterse: => NoMethodError: undefined method `foobar' for "":String (https://eval.in/171721)
<yorickpeterse> dat parser
<yorickpeterse> Basically true, false, nil are created once and re-used
<yorickpeterse> opposed to being created upon reference every time
<yorickpeterse> The object ID also shows this
<yorickpeterse> >> true.object_id
<Mon_Robot> yorickpeterse: => 2 (https://eval.in/171722)
<yorickpeterse> >> true.object_id
<Mon_Robot> yorickpeterse: => 2 (https://eval.in/171723)
<yorickpeterse> >> false.object_id
<Mon_Robot> yorickpeterse: => 0 (https://eval.in/171724)
<yorickpeterse> >> nil.object_id
<Mon_Robot> yorickpeterse: => 4 (https://eval.in/171725)
<yorickpeterse> >> ''.object_id
<Mon_Robot> yorickpeterse: => 555585100 (https://eval.in/171726)
<robin850> I see thank you ; but then it's seems a bit awkward that these objects respond to `singleton_class` or it should returns something like `nil`, no ?
vintik has joined #ruby-lang
<centrx> robin850, The only excuse for it I can find is that Object#singleton_class specifically mentions - perhaps as though they were not really singleton classes
<centrx> robin850, They are more like data types that happen to only have one value
<yorickpeterse> >> true.singleton_class.singleton_class?
<Mon_Robot> yorickpeterse: => false (https://eval.in/171727)
<yorickpeterse> The classes of true, false and nil themselves are not singletons
<yorickpeterse> A singleton class is one of which there's again only one instance
<yorickpeterse> >> nil.singleton_class.singleton_class
<Mon_Robot> yorickpeterse: => #<Class:NilClass> (https://eval.in/171730)
<centrx> robin850, e.g. 1.singleton_class raises an error, the Numeric class has many different numbers it can be, so it is not a singleton class
<yorickpeterse> >> nil.singleton_class.singleton_class.singleton_class?
<Mon_Robot> yorickpeterse: => true (https://eval.in/171731)
banisterfiend has joined #ruby-lang
<yorickpeterse> It indeed is confusing though that `nil.singleton_class` is apparently the same as `nil.class` here
<yorickpeterse> But that probably is because it's already a singleton value
* yorickpeterse put a singleton in your singleton so you can singleton while classing
<robin850> centrx: Yes, thanks!
<robin850> yorickpeterse: actually I'd expect nil.singleton_class to return what nil.singleton_class.singleton_class returns
vintik has quit [Ping timeout: 240 seconds]
<centrx> It has to fit into the class hierarchy somehow
kwd has quit [Quit: Leaving.]
<yorickpeterse> well, lets see
<yorickpeterse> >> true.class.singleton_class
<Mon_Robot> yorickpeterse: => #<Class:TrueClass> (https://eval.in/171732)
<yorickpeterse> >> true.class.singleton_class.singleton_class
<Mon_Robot> yorickpeterse: => #<Class:#<Class:TrueClass>> (https://eval.in/171733)
<yorickpeterse> hmm
<yorickpeterse> (that btw is infinite)
<yorickpeterse> >> true.class.singleton_class.singleton_class.singleton_class.singleton_class.singleton_class
<Mon_Robot> yorickpeterse: => #<Class:#<Class:#<Class:#<Class:#<Class:TrueClass>>>>> (https://eval.in/171734)
<yorickpeterse> But yes, it's a bit odd
houhoulis has joined #ruby-lang
<robin850> Yep, it's a bit odd. I will try to investigate ; thanks for your help (and for showing me the available parser on the room ; it's pretty cool :-p )
kyb3r_ has quit [Read error: Connection reset by peer]
<centrx> which is not used that much even from the Unix console
sarkyniin has joined #ruby-lang
Sirupsen has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 240 seconds]
<igalic> centrx: 90% of current ops tools are implemented in ruby.
<centrx> igalic, I like the answer that uses ENV['PATH'] better
<centrx> igalic, Why do ops tools need to use which?
mikecmpbll has joined #ruby-lang
<yorickpeterse> igalic: nonsense, Bash, Perl and Python still dominate that industry
<yorickpeterse> Chef and Puppet are certainly popular, though Chef is no longer Ruby I believe
<yorickpeterse> But they are definitely not "90% of the ops tools"
michd is now known as MichD
rcvalle has joined #ruby-lang
toastynerd has joined #ruby-lang
<centrx> maybe he means at his organization
<igalic> yorickpeterse: sorry, I mean, 100% of all ops tools I use are written in Ruby. (I'm perfectly ignorant to the others)
<centrx> *systems
<yorickpeterse> igalic: If we're going down that route, you're but 0,000000000000000001% of all Ruby users
<yorickpeterse> I don't know while FileUtils doesn't have `which`, it's best to ask that on the Ruby mailing list
<yorickpeterse> or to whomever maintains FileUtils these days
<yorickpeterse> if it's even maintained
<yorickpeterse> (I believe it wasn't for a while)
toastynerd has quit [Ping timeout: 272 seconds]
loincloth has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnFord has joined #ruby-lang
JohnFord has quit [Read error: Connection reset by peer]
alekst has joined #ruby-lang
DivineEntity has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
robin850 has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: Computer has gone to sleep.]
AccidentallyLike has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby-lang
charliesome has joined #ruby-lang
momomomomo has joined #ruby-lang
gpg_ has quit [Quit: Page closed]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Client Quit]
GBrawl has joined #ruby-lang
saarinen has joined #ruby-lang
s1kx has joined #ruby-lang
Lewix has joined #ruby-lang
charliesome has joined #ruby-lang
yfeldblum has joined #ruby-lang
vintik has joined #ruby-lang
cmhobbs has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby-lang
dangerou_ has quit [Read error: Connection reset by peer]
vintik has quit [Ping timeout: 255 seconds]
dangerousdave has joined #ruby-lang
apeiros has quit [Ping timeout: 250 seconds]
Cakey has joined #ruby-lang
rippa has joined #ruby-lang
shinnya has joined #ruby-lang
joast has quit [Quit: Leaving.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tsou has left #ruby-lang ["bye"]
woollyams has quit [Ping timeout: 272 seconds]
joast has joined #ruby-lang
karamazov has joined #ruby-lang
centrx has quit [Quit: Mead error: Connection reset by beer]
charliesome has joined #ruby-lang
momomomomo has joined #ruby-lang
Cakey has quit [Ping timeout: 264 seconds]
Cakey has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
yatish27 has quit [Remote host closed the connection]
jaimef has quit [Excess Flood]
koos303 has quit [Quit: Connection closed for inactivity]
karamazov has joined #ruby-lang
Cakey has quit [Ping timeout: 250 seconds]
saarinen has quit [Quit: saarinen]
Cakey has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
jaimef has joined #ruby-lang
dangerousdave has joined #ruby-lang
alekst has quit [Quit: Computer has gone to sleep.]
jlovick has joined #ruby-lang
ascarter has joined #ruby-lang
AKASkip has quit [Ping timeout: 260 seconds]
Lewix has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
s1kx has quit [Quit: Leaving]
scmx has quit [Ping timeout: 264 seconds]
<ljarvis> why would FileUtils have a `which`
s1kx has joined #ruby-lang
s1kx has quit [Client Quit]
s1kx has joined #ruby-lang
mlangenberg has quit [Ping timeout: 264 seconds]
<ljarvis> >> require 'mkmf'; find_executable('cd')
<Mon_Robot> ljarvis: => (https://eval.in/171766)
pglombardo has joined #ruby-lang
<yorickpeterse> mkmf is fucking terrible
<yorickpeterse> don't ever use that
jsullivandigs has joined #ruby-lang
NemesisD has joined #ruby-lang
<NemesisD> hey folks. i've got some bug deep in a rails app that's causing a stack level too deep error. using ruby 1.9.3, this error does not seem to have a backtrace attached to it. is there any technique i can do shy of recompiling ruby with a patch to troubleshoot this?
<yorickpeterse> NemesisD: No, you have to find where the recursion is occurring
<ljarvis> yorickpeterse: really? a lot of stdlib is terrible, i don't see a reason not to use that particular method
<yorickpeterse> Then you can inject something like `if caller.length > 10000; some code...; end`
yfeldblum has joined #ruby-lang
<NemesisD> yorickpeterse i've narrowed it down to one test and one place in the code, but to troubleshoot further it requires me to delve into code that isn't my own, and it it exhausts the stack limit almost immediately so i have no chance to interrupt it and catch a glimpse of the stack
<yorickpeterse> ljarvis: I've tried to deal with mkmf bullshit when packaging things in Gems, it's not worth using
nottheoilrig has quit [Remote host closed the connection]
<ljarvis> well... way to prove a point
<yorickpeterse> NemesisD: see snippet above
<NemesisD> so i shuold say I found the road to the recursion, the actual recursion could be happening in rspec, activerecord, who knows
<ljarvis> I think this answer is similar (and fine) http://stackoverflow.com/a/5471032
saarinen has quit [Quit: saarinen]
<yorickpeterse> That particular answer is fine
<NemesisD> yorickpetersewas that code meant for ljarvis?
<NemesisD> oh nm i see
<yorickpeterse> NemesisD: if caller.length > 5_000; binding.pry; end # something like that
yfeldblum has quit [Ping timeout: 255 seconds]
<ljarvis> i really need some oss time :/
nathanstitt has joined #ruby-lang
<yorickpeterse> stop whining and get coding
<ljarvis> hey m8
<ljarvis> ill mash u
<yorickpeterse> No you won't
vintik has joined #ruby-lang
<ljarvis> oh rly
<yorickpeterse> I'd like to see you smash me across that channel in between us
<ljarvis> i said mash not smash, different things
mikecmpbll has quit [Quit: i've nodded off.]
<ljarvis> did you like Brighton yorickpeterse
<yorickpeterse> Yeah I quite enjoyed it, minus the really hot conference room
<ljarvis> aye :/
centrx has joined #ruby-lang
<yorickpeterse> Didn't get to see anything of Brighton though, other than a pub and a street filled with homeless people
<ljarvis> so you did see brighton
<ljarvis> the pier is nice, shame you didn't get to see much of the seafront
<yorickpeterse> Well, I tried to walk down there one evening
<yorickpeterse> But I got kebab on my pants so I walked back
<ljarvis> dinner plans went to shit so i went home early
<ljarvis> haha
<ljarvis> kebab on your pants
<yorickpeterse> It was shit kebab too
<yorickpeterse> tasted like rubber
<ljarvis> :(
vintik has quit [Ping timeout: 240 seconds]
sharpmachine has quit [Remote host closed the connection]
enebo has joined #ruby-lang
<ljarvis> did you not get mexican with benlovell?
cirenyc has joined #ruby-lang
<yorickpeterse> They left by the time I got off my arse. When I walked down to the place it was apparently closed
<yorickpeterse> So I coded in the hotel lobby instead, not a bad night actually
<yorickpeterse> I guess it's pretty bad I had a bad coding itch for the entire day
<yorickpeterse> I really do have a problem with that
<ljarvis> :D
<ljarvis> I guess it's better than spending most your day coding and not listening to talks to like people do
mikecmpbll has joined #ruby-lang
<yorickpeterse> I was surprised by how many people honored the "keep your laptop shut" request
<ljarvis> there were a few people at the back who didn't
<ljarvis> but in general yep it was good
sharpmachine has joined #ruby-lang
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
cantonic has joined #ruby-lang
kiddorails has quit [Remote host closed the connection]
dangerou_ has joined #ruby-lang
dangero__ has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerou_ has quit [Ping timeout: 250 seconds]
relix has joined #ruby-lang
jgpawletko is now known as jgpawletko_away
candidkilsborne has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
Cakey has quit [Ping timeout: 272 seconds]
dangero__ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby-lang
enebo has quit [Quit: enebo]
toastynerd has quit [Ping timeout: 250 seconds]
Miphix has quit [Quit: Leaving]
arntempelgibbarn has quit []
toastynerd has joined #ruby-lang
Soilent__ has joined #ruby-lang
monees has joined #ruby-lang
Lewix has joined #ruby-lang
charliesome has joined #ruby-lang
Soilent has quit [Ping timeout: 250 seconds]
jds has quit [Quit: Connection closed for inactivity]
mikecmpbll has quit [Quit: i've nodded off.]
CaptainJet has joined #ruby-lang
mykoweb has joined #ruby-lang
cirenyc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pglombardo has quit []
MikaAK has joined #ruby-lang
Cakey has joined #ruby-lang
wallerdev has joined #ruby-lang
mikecmpbll has joined #ruby-lang
mistym has joined #ruby-lang
yfeldblum has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
bin7me has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
mykoweb has quit [Read error: Connection reset by peer]
mykoweb has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
futilegames has joined #ruby-lang
futilegames has quit [Client Quit]
mikecmpbll has quit [Quit: i've nodded off.]
vintik has joined #ruby-lang
karamazov has joined #ruby-lang
mikecmpbll has joined #ruby-lang
MindfulMonk has quit [Ping timeout: 264 seconds]
vintik has quit [Ping timeout: 255 seconds]
benlovell has quit [Ping timeout: 272 seconds]
fullybaked has quit [Ping timeout: 240 seconds]
__butch__ has joined #ruby-lang
amerine has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
candidkilsborne has left #ruby-lang [#ruby-lang]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
Cakey has quit [Ping timeout: 260 seconds]
centrx has quit [Quit: Mead error: Connection reset by beer]
wallerdev has quit [Client Quit]
cirenyc has joined #ruby-lang
monees has quit [Ping timeout: 264 seconds]
karamazov has joined #ruby-lang
Atttwww has joined #ruby-lang
saarinen has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
riffraff has quit [Quit: Leaving]
mehlah has quit [Quit: Leaving...]
djbkd has joined #ruby-lang
mikecmpbll has joined #ruby-lang
jxie has quit [Ping timeout: 250 seconds]
jxie has joined #ruby-lang
jgpawletko_away is now known as jgpawletko
elia has quit [Quit: Computer has gone to sleep.]
nisstyre has quit [Quit: WeeChat 0.4.3]
nisstyre has joined #ruby-lang
wallerdev has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
vintik has joined #ruby-lang
pixelhandler has joined #ruby-lang
havenwood has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby-lang
MindfulMonk has joined #ruby-lang
davispuh has joined #ruby-lang
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
yfeldblum has joined #ruby-lang
davispuh has quit [Read error: Connection reset by peer]
davispuh has joined #ruby-lang
MikaAK has quit [Remote host closed the connection]
ssam2 has quit [Quit: Leaving]
yfeldblum has quit [Ping timeout: 255 seconds]
MikaAK has joined #ruby-lang
hahuang65 has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loincloth has quit [Remote host closed the connection]
vintik has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
scmx has joined #ruby-lang
tylersmith has joined #ruby-lang
GBrawl_ has joined #ruby-lang
mistym has joined #ruby-lang
JohnFord has joined #ruby-lang
wallerdev has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby-lang
GBrawl has quit [Ping timeout: 264 seconds]
jay_ has joined #ruby-lang
jay_ has left #ruby-lang [#ruby-lang]
djbkd has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
Asher1 is now known as Asher
BucOder has joined #ruby-lang
djbkd has joined #ruby-lang
vintik has joined #ruby-lang
GBrawl__ has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
monees has joined #ruby-lang
Lewix has joined #ruby-lang
GBrawl_ has quit [Ping timeout: 264 seconds]
scmx has quit [Ping timeout: 272 seconds]
x0f has quit [Ping timeout: 260 seconds]
jaimef has quit [Excess Flood]
benlovell has quit [Quit: Lost terminal]
jaimef has joined #ruby-lang
GBrawl___ has joined #ruby-lang
banister has joined #ruby-lang
x0f has joined #ruby-lang
yfeldblum has joined #ruby-lang
GBrawl__ has quit [Ping timeout: 245 seconds]
MikaAK has quit [Remote host closed the connection]
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
jaimef has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
bender_unit has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
<darix> nts: 4GB ram is not enough for rake db:migrate on discourse
relix has joined #ruby-lang
<darix> hmm looks more like a bug with tzinfo
loincloth has joined #ruby-lang
<darix> [pid 1510] mmap(NULL, 292277026816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
emanu has joined #ruby-lang
djbkd has joined #ruby-lang
AccidentallyLike has quit [Quit: Lost terminal]
tbuehlmann has quit [Remote host closed the connection]
<emanu> hey guys, I encountered a weird bug where a user is copy/pasting text from an input field and it contains a bunch of hidden characters which I'm saving to a database along the way.
<emanu> when I pull it out of the database, the string contains various \u#### characters
enebo has joined #ruby-lang
<emanu> I managed to strip them out using: .gsub(/[^[:print:]]/,'')
Junker has joined #ruby-lang
<darix> emanu: \u can be valid unicode chars
<darix> that your current font might just not display
<darix> (or your current local charset)
<emanu> but my question is: wtf happened? :)
<eam> darix: is your stack rlimit set very high? I've seen some buggy software try to allocate memory the size of whatever the stack rlimit is set to
<apeiros> emanu: difficult to tell with the info you gave
<apeiros> emanu: you could do .gsub(/[[:print:]]/,'').chars.to_a.uniq and show the result
<apeiros> so we see which chars are in there
<darix> eam: no. it is "tzinfo doesnt handle zic 2014 files, update it to fix that" :)
<eam> hah
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<emanu> ["\u001D", "\u0016", "\e", "\u0019", "\u0010", "\u0013", "\u0014", "\u0000"] <-- result of the .chars.to_a.uniq
<darix> eam: the mmap was like 292GB :p
BucOder has quit [Quit: Computer has gone to sleep.]
<emanu> but yes, it seems after conferring with various professionals on this topic
<emanu> that the pdf is borked and copying from it on OSX probably mucks up the encoding
havenwood has quit [Remote host closed the connection]
<darix> emanu: you uplaoded a PDF into the DB?
<emanu> and that weird string is the result, and a safe approach is to strip out all non-printable characters using regex character classes
<emanu> darix: no, our users are copy/pasting from a pdf into an input field
havenwood has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
<eam> darix: yeah, for example on RHEL: sh -c 'ulimit -SH -s 292277026816; host example.com'
<eam> same failure mode, it attempts to malloc the stack size
<eam> or rather, the stack limit
<darix> i have a password set in database.yml and the pg update tells me "no password sent"
fullybaked has joined #ruby-lang
ruby-lang404 has joined #ruby-lang
<apeiros> emanu: hm, those are all control characters
djbkd has quit [Remote host closed the connection]
<emanu> yup, which is NOT what should be put in the clipboard when I copy "300-47382-32" from the pdf that's causing the bug...
djbkd has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> definitively not a null byte (\u0000)
<ruby-lang404> is there a way outside or restclient to get output from an api resource pointer (i am a nubie)
momomomomo has joined #ruby-lang
<ruby-lang404> s/or/of
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sirupsen has joined #ruby-lang
BucOder has joined #ruby-lang
scmx has joined #ruby-lang
cirenyc has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has quit [Ping timeout: 264 seconds]
ruby-lang404 has quit [Ping timeout: 246 seconds]
touzin has joined #ruby-lang
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby-lang
__butch__ has joined #ruby-lang
Sirupsen has quit [Ping timeout: 250 seconds]
Sirupsen has joined #ruby-lang
mehlah has joined #ruby-lang
amerine has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
vintik has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
Sirupsen has quit [Remote host closed the connection]
symm- has joined #ruby-lang
Sirupsen has joined #ruby-lang
mykoweb has quit [Ping timeout: 250 seconds]
emanu has quit [Quit: emanu]
yfeldblum has quit [Ping timeout: 260 seconds]
__butch__ has quit [Quit: Leaving.]
scmx has quit [Ping timeout: 256 seconds]
scmx has joined #ruby-lang
karamazov has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
touzin has quit [Ping timeout: 256 seconds]
GBrawl___ has quit [Quit: Lingo - http://www.lingoirc.com]
nhmood has joined #ruby-lang
<nhmood> Is there a way to convert a Regexp into a string and/or modify an already created Regexp object?
<nhmood> I don't have access to the text/string that was used to generate the Regexp object
<eam> nhmood: to_s?
Logger_ has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<eam> >> "foo" =~ Regexp.new(/foo/.to_s)
<Mon_Robot> eam: => 0 (https://eval.in/171803)
fullybaked has quit []
<eam> >> "bar" =~ Regexp.new(/foo/.to_s.gsub /foo/, "bar")
<Mon_Robot> eam: => 0 (https://eval.in/171804)
Logger_ has quit [Remote host closed the connection]
Logger_ has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnFord has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
Logger_ has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
karamazov has joined #ruby-lang
Logger_ has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
davidfrey has joined #ruby-lang
davidfrey has quit [Client Quit]
emanu has joined #ruby-lang
davidfrey has joined #ruby-lang
<apeiros> nhmood: see .to_s (as shown by eam) and .source
<apeiros> .to_s is usually the better choice
Cakey has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo_ is now known as momomomomo
Logger_ has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
abhi_rsd_ has joined #ruby-lang
elia has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
Logger_ has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
Logger_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Logger_ has quit [Remote host closed the connection]
emanu has quit [Quit: emanu]
touzin has joined #ruby-lang
emanu has joined #ruby-lang
Loggie has joined #ruby-lang
cantonic has quit [Quit: cantonic]
ascarter has joined #ruby-lang
arBmind has joined #ruby-lang
<nhmood> apeiros, eam: I had tried that earlier but I got the following string (?-mix:\\A\\/test\\/?\\z)
yfeldblum has quit [Quit: Leaving...]
yfeldblum has joined #ruby-lang
<apeiros> nhmood: yes, which is a proper representation of a regex
<apeiros> you can implant that 1:1 into another regex and it will work perfectly
cantonic has joined #ruby-lang
djbkd has joined #ruby-lang
<nhmood> apeiros: Ahh I see, I wasn't aware that was proper regex
apeiros_ has joined #ruby-lang
<nhmood> I thought it was some botched conversion of the class to a string, some extra metadata or something
<nhmood> apeiros, eam: thanks for clearing that up!
<apeiros_> wow… been a while that I had a hard crash
apeiros has quit [Disconnected by services]
apeiros_ is now known as apeiros
ddv has quit [Changing host]
ddv has joined #ruby-lang
<apeiros> nhmood: (?:…) is a non-capturing group
hahuang65 has quit [Ping timeout: 240 seconds]
<apeiros> and between ?: the flags can be put. e.g. (?-mix:…)
<apeiros> this says "m i and x flags are not set" (hence -)
<apeiros> >> /foo/xi.to_s
<Mon_Robot> apeiros: => "(?ix-m:foo)" (https://eval.in/171816)
<apeiros> i and x are set here, hence before the -
<nhmood> I see
elia has quit [Quit: Computer has gone to sleep.]
scmx has quit [Ping timeout: 255 seconds]
<nhmood> What do you mean by a non-capturing group
<apeiros> >> "foobar".match(/([aeiou]+)/).captures
<Mon_Robot> apeiros: => ["oo"] (https://eval.in/171820)
<apeiros> () is a capturing group
<apeiros> >> "foobar".match(/(?:[aeiou]+)/).captures
<Mon_Robot> apeiros: => [] (https://eval.in/171822)
<apeiros> (?:) is a non-capturing group
<nhmood> what is the use of a non capturing group?
scmx has joined #ruby-lang
<apeiros> when you want to group stuff, but don't need the regex engine to capture that group
yalue has quit [Quit: Leaving]
elia has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
<nhmood> ok i see, so you could mix a (?..) and a (..) in the same regex search if you are just grouping things out
<nhmood> and the performance would be better im guessing?
<apeiros> probably. also it's less annoying when you have actual captures in the regex
<apeiros> you don't want to sort out which you want and which you don't want. especially with larger regexen
emanu has quit [Quit: emanu]
sirene has quit [Read error: Connection reset by peer]
<nhmood> oh i didn't even think of that
<nhmood> that makes things much more simpler actually
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
postmodern has quit [Quit: Leaving]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
touzin has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
davidfrey has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
Loggie has quit [Remote host closed the connection]
davidfrey has joined #ruby-lang
Loggie has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
emanu has joined #ruby-lang
davidfrey has quit [Ping timeout: 255 seconds]
JohnFord has joined #ruby-lang
fullybaked has joined #ruby-lang
Loggie has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
saarinen has joined #ruby-lang
fullybaked has quit [Client Quit]
momomomomo_ has joined #ruby-lang
AKASkip has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo_ is now known as momomomomo
loincloth has joined #ruby-lang
postmodern has joined #ruby-lang
vintik has joined #ruby-lang
jlovick has quit [Ping timeout: 255 seconds]
_ht has quit [Remote host closed the connection]
loincloth has quit [Ping timeout: 250 seconds]
loincloth has joined #ruby-lang
__butch__ has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby-lang
jlovick has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
MichD is now known as michd
djbkd has quit [Ping timeout: 260 seconds]
tylersmith has quit [Remote host closed the connection]
BucOder has quit [Quit: Computer has gone to sleep.]
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
cmhobbs has quit [Remote host closed the connection]
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
mykoweb has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
cmhobbs has joined #ruby-lang
cmhobbs has joined #ruby-lang
cmhobbs has quit [Changing host]
havenwood has quit [Ping timeout: 264 seconds]
cmhobbs has quit [Client Quit]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmhobbs has joined #ruby-lang
cmhobbs has joined #ruby-lang
cmhobbs has quit [Changing host]
slawrence00 has joined #ruby-lang
vintik has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
slawrence00 has quit [Client Quit]
karamazov has joined #ruby-lang
mistym has joined #ruby-lang
mykoweb has joined #ruby-lang
centrx has joined #ruby-lang
scmx has quit [Ping timeout: 256 seconds]
emanu has quit [Quit: emanu]
sepp2k has joined #ruby-lang
vintik has joined #ruby-lang
monees_ has joined #ruby-lang
monees has quit [Ping timeout: 240 seconds]
stamina has quit [Ping timeout: 272 seconds]
djbkd has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
nhmood has quit [Quit: Page closed]
djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
karamazov has quit [Remote host closed the connection]
kirby_ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AKASkip has quit [Ping timeout: 250 seconds]
joast has quit [Quit: Leaving.]
<kirby_> Hello. I’m running into a perplexing issue with bacula and am curious whether anyone has any input
<kirby_> When running a job some clients report that they cannot authenticate to the storage daemon
<kirby_> However, some clients can authenticate without issue
<kirby_> Based on the way bacula works the director is providng the credentials to access the storage daemon so I’m confused why I’m seeing varying results
hotpancakes has joined #ruby-lang
kirby_ has left #ruby-lang [#ruby-lang]
monees_ has quit [Remote host closed the connection]
loincloth has quit [Remote host closed the connection]
momomomomo_ has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
momomomomo has quit [Ping timeout: 250 seconds]
momomomomo_ is now known as momomomomo
jlovick has quit [Ping timeout: 240 seconds]
momomomomo has quit [Client Quit]
Sgeo has joined #ruby-lang
Sirupsen has joined #ruby-lang
woollyams has joined #ruby-lang
samotarnik has joined #ruby-lang
cmhobbs has quit [Remote host closed the connection]
samotarnik has quit [Quit: Leaving]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
toretore has quit [Ping timeout: 250 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
candidkilsborne has joined #ruby-lang
toretore has joined #ruby-lang
mistym has quit [Ping timeout: 264 seconds]
mistym_ has joined #ruby-lang
mykoweb has quit [Ping timeout: 260 seconds]
mistym_ is now known as mistym
sharpmachine has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
<Xney> hmm so there's no way to make an object 'false', like, the way ruby determines falseness?
<centrx> That would be messed up
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby-lang
<centrx> It might be possible but there is really no reason to do it
<Xney> there is if you want separate 'nil' instances you can define singleton methods on
<Xney> or false, or true
mistym_ has joined #ruby-lang
<centrx> What's the point of it except to make something less explicit?
<centrx> Your "false" must represent something. If it's boolean, use "false". If it's not, use something explicit like a method called #active?
<Xney> if you have a proxy object system where you want to represent any value and add functionality to it
<Xney> sort of like a wrapper
karamazov has joined #ruby-lang
<Xney> ideally I would like it to also handle the singleton instances by wrapping mutable versions of it but I can't make them function the same way the singleton true ones do
<centrx> Xney, Can't you just define the methods on an object to act like false in boolean expressions?
<centrx> There is only one "false", but you can make anything act like false.
<Xney> no, you can't
<Xney> not without wrapping it in a method or something which handles your special false :)
mistym has quit [Ping timeout: 255 seconds]
<centrx> I don't see any use for that
<centrx> You are trying to make false something it is not
<centrx> There really is only one false in all of existence
<Xney> No, it's more like a wrapper class around false which acts as false but is extensible
<Xney> but it wouldn't be a singleton like false is
<centrx> Isn't that what FalseClass is?
mistym_ has quit [Ping timeout: 250 seconds]
<Xney> let's say you had a set of objects which could be any value, including true, false, etc. and you wanted to extend them individually. you can do that with normal objects and wrap around their method calls, but you can't do it with false and true and such because they are singleton instances
karamazov has quit [Remote host closed the connection]
<Xney> I can create a wrapper class around them which act as non-singletons but I can't duplicate their boolean-ness, I don't think they're method calls
mistym has joined #ruby-lang
<Xney> yes I can call a special method on my wrapper classes which can determine false/true, but then I have to use that everywhere
karamazov has joined #ruby-lang
<Xney> which turns into if IsTrue?(xxx) or xxx.true? or whatever
rcvalle has quit [Quit: rcvalle]
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
<Xney> basically, I'd like my wrapper objects to act exactly as the objects they're wrapping, with some additional features. I already have immutable objects like fixnums wrapped, but the boolean and nil objects don't work purely through methods (I think)
amerine has joined #ruby-lang
amsi has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Xney> I guess it sounds odd but I want to extend objects for a reason, immutable singletons can't be
banisterfiend has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
<Xney> (and I need instances of them, anyways.. one '6' is not another '6')
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
dangerousdave has joined #ruby-lang
<Xney> there's no.. #to_bool or whatever. or #true?
rubybytes has joined #ruby-lang
shinnya has quit [Ping timeout: 256 seconds]
enebo has quit [Quit: enebo]
<rubybytes> In my humble opinion /net/http/request.rb Net::HTTPHeader - initialize_http_header should coerce integer headers to strings, or at the very least raise an exception
marr has quit [Ping timeout: 240 seconds]
__butch__ has quit [Quit: Leaving.]
elia has joined #ruby-lang
<Mon_Ouie> As you said, you can't completely replicate the behavior of falsey objects, so you should just avoid doing that and instead have the user use YourClass#some_predicate? in conditionals to avoid confusion
<Xney> mon: well, then that kind of defeats the point of having it silently act as the wrapped objects
rubybytes has quit [Client Quit]
<Mon_Ouie> I'm saying you shouldn't do that because you can't accomplish it
shinnya has joined #ruby-lang
<Xney> yeah I was just hoping I was wrong, that there was a way to accomplish it :|
tylersmith has joined #ruby-lang
<Xney> thanks for the ears in listening, at least :)
stardiviner has joined #ruby-lang
abhi_rsd_ has quit [Remote host closed the connection]
banisterfiend has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> Pun intended? :p
wallerdev has quit [Quit: wallerdev]
banisterfiend has joined #ruby-lang
_JokerDoom has joined #ruby-lang
candidkilsborne has quit [Remote host closed the connection]
dluv has joined #ruby-lang
hotpanca_ has joined #ruby-lang
kyb3r_ has joined #ruby-lang
mbr__ has joined #ruby-lang
faces has joined #ruby-lang
nopc0de- has joined #ruby-lang
headius_ has joined #ruby-lang
sharpmachine has joined #ruby-lang
lguardiola_ has joined #ruby-lang
PaulePan1er has joined #ruby-lang
jamooo has joined #ruby-lang
jsaak_ has joined #ruby-lang
error404_ has joined #ruby-lang
kalehv has joined #ruby-lang
davispuhh has joined #ruby-lang
spuk_ has joined #ruby-lang
`micro_ has joined #ruby-lang
cout_ has joined #ruby-lang
yeltzooo4 has joined #ruby-lang
kavinder has joined #ruby-lang
hachiya_ has joined #ruby-lang
davispuh has quit [Disconnected by services]
davispuhh is now known as davispuh
Forgetful_Lion has joined #ruby-lang
hotpancakes has quit [*.net *.split]
centrx has quit [*.net *.split]
eeezkil has quit [*.net *.split]
face has quit [*.net *.split]
spuk has quit [*.net *.split]
JokerDoom has quit [*.net *.split]
hachiya has quit [*.net *.split]
surrounder has quit [*.net *.split]
_rgn has quit [*.net *.split]
clamstar has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
lguardiola has quit [*.net *.split]
verto has quit [*.net *.split]
Kabaka has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
mbr has quit [*.net *.split]
error404 has quit [*.net *.split]
`micro has quit [*.net *.split]
zz_dlu has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
headius has quit [*.net *.split]
nopc0de has quit [*.net *.split]
cout has quit [*.net *.split]
jamooo_ has quit [*.net *.split]
mfn has quit [*.net *.split]
jsaak has quit [*.net *.split]
sMecKs has joined #ruby-lang
NemesisD has quit [Quit: going home]
banisterfiend has quit [Quit: Computer has gone to sleep.]
mfn has joined #ruby-lang
heftig has joined #ruby-lang
fmendez has joined #ruby-lang
clamstar has joined #ruby-lang
Kabaka has joined #ruby-lang
fmendez has left #ruby-lang [#ruby-lang]
fmendez has joined #ruby-lang
surrounder has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
woollyams has quit [Ping timeout: 272 seconds]
Mon_Robot has quit [Ping timeout: 240 seconds]
kavinder has quit [Remote host closed the connection]
kavinder has joined #ruby-lang
kavinder_ has joined #ruby-lang
kavinder has quit [Ping timeout: 245 seconds]
sharpmachine has quit [Remote host closed the connection]
spuk_ has quit [Read error: Connection reset by peer]
weems|mac has joined #ruby-lang
woollyams has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
spuk has joined #ruby-lang
hahuang65 has joined #ruby-lang