Pumukel has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
discr33t___ has joined #ruby
almostwhitehat has joined #ruby
lidaaa has quit [Ping timeout: 255 seconds]
<discr33t___>
is it possible to specify a rang of ip addresses? i want to pull the ip address of all my servers and if the ip falls in a certain range declare the appropriate security zone
end_guy has quit [Remote host closed the connection]
peret has joined #ruby
parzo has quit [Ping timeout: 260 seconds]
jamesfordummies has joined #ruby
bmurt has joined #ruby
klaut_ has quit [Remote host closed the connection]
<waxjar>
discr33t__: ruby has an IPAddr class that can be used in ranges i think
<almostwhitehat>
Having a little trouble with method_missing - cant find the answer via google, maybe I’m doing it wrong. If I define method_missing on Foo, and call Foo.waffles then I get a :waffles symbol - this works fine. But if I call Foo.waffles.syrup then I still only get a :waffles symbol.
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar>
syrup will be called on whatever #waffles (i.e. Foo#method_missing) returns
end_guy has joined #ruby
<almostwhitehat>
Oh man, I cant believe that wasnt obvious, thanks waxjar!
pietr0 has quit [Quit: pietr0]
jmbrown412 has quit [Remote host closed the connection]
jmbrown412 has joined #ruby
xcv has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
axsuul has joined #ruby
chipotle has joined #ruby
babykosh has quit [Quit: babykosh]
mike32 has joined #ruby
SilkFox_ has joined #ruby
nateberkopec has joined #ruby
<mike32>
hi, how i can encode string to windows-1251?
<mike32>
i trie search but couldnot find solution
chipotle has quit [Read error: Connection reset by peer]
Sid05 has quit [Quit: Sid05]
Mozee has joined #ruby
discr33t___ has quit [Quit: Page closed]
<jhass>
mike32: "foo".encode("windows-1251")
toastynerd has quit [Remote host closed the connection]
chipotle has joined #ruby
jmbrown412 has quit [Ping timeout: 272 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
threesixes has quit [Remote host closed the connection]
threesixes has joined #ruby
<dr0ff>
someone explain why ruby run all threads if I #join only one? pastebin.com/KSFrSTHT
chichou has quit [Client Quit]
<DreamingRainne>
dr0ff: .join will wait till that particular thread is done, then return. It doesn't stop other threads. It's not supposed to.
SilkFox_ has joined #ruby
<DreamingRainne>
For example, what if you spawn a thread *within* a thread and then call .join on the spawned one? Should it stop the parent thread too? :P
<TotalEvil>
didn't help (
dapz has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
Dreamer3 has quit [Quit: Leaving...]
<dr0ff>
DreamingRainne: thank you
iteratorP has joined #ruby
tylerkern has joined #ruby
SilkFox_ has quit [Ping timeout: 255 seconds]
mrsolo has left #ruby ["Leaving"]
64MAAHYAY has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
babykosh has joined #ruby
robbyoconnor has joined #ruby
brianherman has joined #ruby
dayepa has joined #ruby
amclain has joined #ruby
jdj_dk has quit [Ping timeout: 250 seconds]
PanPan has joined #ruby
amystephen has quit [Quit: amystephen]
bricker`work has quit [Ping timeout: 264 seconds]
noocode has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
babykosh has quit [Client Quit]
oo_ has joined #ruby
patrick99e99 has quit [Ping timeout: 260 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
michaeldeol has quit [Ping timeout: 240 seconds]
noocode has joined #ruby
felixjet has quit [Quit: Leaving]
felixjet has joined #ruby
siwica has quit [Remote host closed the connection]
<raddy>
I am frequently receiving "No route to host - connect(2) (Errno::EHOSTUNREACH)", in redmine in both Passenger and Webrick
<raddy>
Can anubody help me?????
SilkFox_ has quit [Ping timeout: 255 seconds]
<raddy>
Passenger v4 and Redmine v2.4.5
MrL0ngbowman has joined #ruby
bluOxigen has joined #ruby
agarie has joined #ruby
saarinen has quit [Quit: saarinen]
agarie has quit [Remote host closed the connection]
philcrissman has quit [Ping timeout: 272 seconds]
hephaestus_rg has quit [Ping timeout: 245 seconds]
<raddy>
Anybody there ????
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
jdj_dk has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
jdj_dk has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
lxsameer has joined #ruby
<eam>
raddy: you have a networking problem
vsoftoiletpaper has joined #ruby
Arkaniad has quit [Ping timeout: 255 seconds]
RandyT has quit [Ping timeout: 245 seconds]
<gr33n7007h>
Could I do something like this: require 'socket'; Socket.instance_eval do; def pack_sockaddr_in_bluetooth(port, host); bytes = host.split(":").reverse.map{ |b| b.to_i(16) }; sockaddr = [31, 0, *bytes, port, 0].pack("C*"); sockaddr; end; end would this be legitimate in a program?
<raddy>
eam : It cannot be, as i am running multiple versions of redmine in different ports in that server without any issues.
Pharaoh2 has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jdj_dk has joined #ruby
agarie has joined #ruby
<Hanmac>
gr33n7007h: why do you need instance_eval ?
<gr33n7007h>
then use like Socket.new(31,1,3); s.connect Socket.pack_sockaddr_in_bluetooth port, host ?
<gr33n7007h>
Hanmac, to define a class method on Socket
<Hanmac>
"class Socket; def self.pack_sockaddr_in_bluetooth(port, host) ... ; end; end" or"def Socket.pack_sockaddr_in_bluetooth(port, host) ... ; end" do the same, no need for instance eval
nanoyak has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
<gr33n7007h>
Hanmac, why did I even think of instance_eval wow
aspires has joined #ruby
<raddy>
eam : the passenger is binding at 0.0.0.0 in port 3001
<gr33n7007h>
yes mind is gone!
<raddy>
eam : I am not sure how a networking problem be there in this case unless passenger is try to connect to other hosts.
<gr33n7007h>
what was I thinking then jeez
jdj_dk has quit [Remote host closed the connection]
<Hanmac>
gr33n7007h: try to make your function shorter: def Socket.pack_sockaddr_in_bluetooth(port, host); [31, 0, *host.split(':').reverse_each.map(&:hex), port, 0].pack("C*") ; end
goodenough has quit [Remote host closed the connection]
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jmbrown412 has joined #ruby
<gr33n7007h>
Hanmac, really appreciate that thank you :)
yfeldblu_ has quit [Remote host closed the connection]
parzo has joined #ruby
<raddy>
eam : are you there ?
raddy has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<gr33n7007h>
thats tons better
parzo has quit [Read error: Connection reset by peer]
parzo has joined #ruby
raddy has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa>
eam: there's a couple hundred nicks connected and you ask whether anybody's there
<raddy>
wasamasa : cool down, he was the only person responded to my question.
eyeamaye has quit [Quit: Leaving.]
<Hanmac>
gr33n7007h: replace /:/ with ':' and "C*" with 'C*' and it should be perfect ... ps are you shure you want port, host in the parameters and not host, port ?
icebourg has joined #ruby
icebourg has quit [Client Quit]
<gr33n7007h>
Hanmac, one little problem now I get TypeError: superclass mismatch for class Socket
MrL0ngbowman has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 240 seconds]
<Hanmac>
hmmm no that cant be come from this part of code
benzrf is now known as benzrf|offline
<gr33n7007h>
that's from within pry
<gr33n7007h>
let me restart pry and try again
<Hanmac>
yeah it that problem ;P
<Hanmac>
hm and banister is not on to explain it ...
<wasamasa>
raddy: the answer is still the same btw, this is an error you see if whatever library using the internet can not even establish a connection because the routes are borked or not even there yet
<wasamasa>
raddy: figure out why
apeiros has quit [Read error: Connection reset by peer]
<gr33n7007h>
Hanmac, nevermind reset pry works perfect thank you so much
apeiros has joined #ruby
dawkirst has joined #ruby
<raddy>
Anyways i found there is some problem in my server, thanks everybody
starkhalo has quit [Ping timeout: 260 seconds]
<eam>
raddy: yes, you are connecting to other hosts
<eam>
it's an error from connect()
<raddy>
eam : the error is from passenger, not from the client
<eam>
then passenger is making a connection
<eam>
outbound
<raddy>
Ohhh okk
yeticry has quit [Ping timeout: 245 seconds]
Jaood has joined #ruby
BadQuanta has quit [Quit: Leaving.]
Jaood has left #ruby [#ruby]
yeticry has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
Sid05_ has quit [Quit: Sid05_]
Takle has joined #ruby
agarie has quit [Remote host closed the connection]
ghr has joined #ruby
Sid05_ has joined #ruby
relix has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
jmbrown412 has quit [Remote host closed the connection]
timonv_ has joined #ruby
jmbrown412 has joined #ruby
raddy has left #ruby ["Closing Window"]
timgauthier has joined #ruby
bradleyp_ has joined #ruby
tylerkern has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
goodenough has joined #ruby
bal has joined #ruby
jmbrown412 has quit [Ping timeout: 255 seconds]
apeiros has quit [Remote host closed the connection]
bradleyprice has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
Glyphnote has joined #ruby
wjimenez_ has quit [Remote host closed the connection]
aganov has joined #ruby
morenoh150 has quit [Ping timeout: 260 seconds]
fgo has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 240 seconds]
theharshest has quit [Quit: This computer has gone to sleep]
Akagi201 has joined #ruby
goodenough has quit []
dawkirst has quit [Remote host closed the connection]
SilkFox_ has joined #ruby
toastynerd has joined #ruby
mike32 has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
SilkFox_ has quit [Ping timeout: 250 seconds]
vsoftoiletpaper has quit []
Sid05_ has quit [Quit: Sid05_]
Takle_ has joined #ruby
vsoftoiletpaper has joined #ruby
timonv_ has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
Matadoer has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 260 seconds]
jdj_dk_ has joined #ruby
JoshGlzBrk has joined #ruby
shredding has joined #ruby
arq_ has quit [Ping timeout: 260 seconds]
Glyphnote has quit [Read error: Connection reset by peer]
kaiwren has quit [Quit: kaiwren]
larsam has joined #ruby
max06 has joined #ruby
larsam has quit [Read error: Connection reset by peer]
anarang has joined #ruby
threesixes has quit [Ping timeout: 272 seconds]
threesixes has joined #ruby
razum2um has joined #ruby
kenneth has joined #ruby
cg433n has joined #ruby
thams has joined #ruby
kiri has joined #ruby
shredding has quit [Quit: shredding]
dawkirst has joined #ruby
cg433n has quit [Ping timeout: 240 seconds]
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
dawkirst_ has joined #ruby
fgo has joined #ruby
vsoftoiletpaper has quit []
kiri has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
Pharaoh2 has quit [Remote host closed the connection]
Alina-malina has joined #ruby
iteratorP has quit [Remote host closed the connection]
asdasdasdasss has joined #ruby
dawkirst has quit [Ping timeout: 244 seconds]
iteratorP has joined #ruby
apeiros has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
techsethi has joined #ruby
noop has joined #ruby
asdasdasdasss has quit [Ping timeout: 245 seconds]
Morkel has joined #ruby
ist has quit [Quit: Leaving]
tvw has quit []
Brando753 has quit [Read error: Connection reset by peer]
morenoh150 has joined #ruby
jdj_dk_ has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asdasdasdasss has joined #ruby
thams has quit [Quit: thams]
sethen has joined #ruby
oo_ has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
Mattx has quit [Read error: Connection reset by peer]
iteratorP has quit [Remote host closed the connection]
thams has joined #ruby
Brando753 has joined #ruby
Mattx has joined #ruby
dingus_khan has quit []
anaeem1_ has joined #ruby
Morkel has quit [Quit: Morkel]
arup_r has joined #ruby
ghr has joined #ruby
bhaus has joined #ruby
oo_ has joined #ruby
<bhaus>
hello all, does anyone have experience with rexml? id Document.write non blocking?
<bhaus>
*is Document.write non blocking?
kaiwren has joined #ruby
gauravagarwalr has joined #ruby
<arup_r>
I need one Heroku set up help.. I am working on a project already hosted in Heroku. I cloned the project from Github and working on it.. Creating branch and pushing it to Github and using a pull request I am merging it. Now also I want to push the changes to the Heroku. How to set up my local master with the Heroku
<arup_r>
I installed and created the Heroku account
<sevenseacat>
just set the right git remote?
gruz0[russia] has joined #ruby
<sevenseacat>
then push
<sevenseacat>
there are so many docs for this
<arup_r>
sevenseacat : I am not able to..
<arup_r>
Would you please help me
<arup_r>
By mistake I did Heroku create
<arup_r>
But that did the wrong thing
ephemerian has joined #ruby
aspires has quit []
<arup_r>
I actually supposed to add my master to the heroku app
<arup_r>
I am not aware of how to do so
philcrissman has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
<arup_r>
sevenseacat: Please help..
iteratorP has joined #ruby
skylite has joined #ruby
tylerkern has joined #ruby
abdulsattar has joined #ruby
philcrissman has quit [Ping timeout: 260 seconds]
parzo has joined #ruby
asdasdasdasss has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
WormDrink has quit [Ping timeout: 245 seconds]
asdasdasdasss has joined #ruby
W0rmDr1nk has quit [Ping timeout: 264 seconds]
gauke has joined #ruby
clauswitt has joined #ruby
Aryasam has joined #ruby
Aryasam has quit [Client Quit]
doev has joined #ruby
bbloom has joined #ruby
krz has joined #ruby
SilkFox_ has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
Sid05 has quit [Read error: Connection reset by peer]
marr has joined #ruby
Pharaoh2 has joined #ruby
bayed has joined #ruby
clauswit_ has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has quit [Quit: Leaving.]
yfeldblum has joined #ruby
kireevco has joined #ruby
clauswitt has quit [Ping timeout: 240 seconds]
gauke has quit [Quit: gauke]
SilkFox_ has quit [Ping timeout: 245 seconds]
kireevco has quit [Client Quit]
<bhaus>
hello all are filehandle opened by IO.new blocking by default?
kireevco has joined #ruby
kireevco has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
Wolland has quit [Read error: Connection reset by peer]
gogohome has joined #ruby
Wolland has joined #ruby
cg433n has quit [Ping timeout: 244 seconds]
abuzze has quit [Ping timeout: 264 seconds]
jds has joined #ruby
arya_ has joined #ruby
anarang has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby
<gogohome>
hello
sevenseacat has left #ruby [#ruby]
<gogohome>
who know about ‘arduino'?
devdazed has quit [Ping timeout: 240 seconds]
devdazed has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
arup_r has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
timonv_ has joined #ruby
arup_r has joined #ruby
<robscormack>
hm, a bit, not much, it depends, is this related with Ruby?
arup_r has quit [Remote host closed the connection]
elaptic`` is now known as elaptics
discr33t__ has quit [Ping timeout: 246 seconds]
<robscormack>
hi elastic
<robscormack>
*elaptics*
devdazed has quit [Ping timeout: 244 seconds]
timonv_ has quit [Remote host closed the connection]
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
devdazed has joined #ruby
jhass is now known as jhass|off
maestrojed has quit [Quit: Computer has gone to sleep.]
jhass|off is now known as jhass
jdj_dk_ has quit [Ping timeout: 250 seconds]
<ddv>
my code is beautifull today, i'm a genius <3
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
philcrissman has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
<robscormack>
I want three wishes, then
dangerousdave has joined #ruby
* robscormack
reminds himself that "genio" in English can be "genius" (like Einstein) or "genie" like "Genie in a bottle" and slaps himself.
W0rmDr1nk has joined #ruby
asdasdasdasss has joined #ruby
ki0 has joined #ruby
shredding has quit [Quit: shredding]
GlenK has joined #ruby
philcrissman has quit [Ping timeout: 255 seconds]
<Hanmac>
robscormack: why not both? ;P
<robscormack>
the joke doesn't make sense in English.
tiguser has quit [Ping timeout: 272 seconds]
Wolland has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
Pharaoh2 has quit [Remote host closed the connection]
Jackneill has joined #ruby
max06 has joined #ruby
tiguser has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
asmodlol has quit [Quit: Leaving]
Pharaoh2 has joined #ruby
hsps_ has quit [Read error: Connection reset by peer]
mclee has quit [Ping timeout: 250 seconds]
Wolland has quit [Ping timeout: 255 seconds]
amacou has joined #ruby
hsps_ has joined #ruby
<Hanmac>
robscormack: it does in german ... do you know the jokes (specially about english vs france vs german) about 'poison' and 'potion' and the german 'gift' vs the english 'gift' ? ;P
InfraRuby has left #ruby [#ruby]
<wasamasa>
false friends
<wasamasa>
"Igel" vs. "Eagle"
mr-foobar has quit [Read error: Connection reset by peer]
<robscormack>
I know that germans can't pronounce "squirrel"
mr-foobar has joined #ruby
<robscormack>
Hanmac: what's that?
<wasamasa>
I know that french can't pronounce "railway station"
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
BadQuanta has quit [Remote host closed the connection]
<Hanmac>
robscormack: and we cant build airports ;P (look at the BER in berlin ;D )
amacou has quit [Ping timeout: 255 seconds]
fgo has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
<robscormack>
wooo
<robscormack>
Hanmac: reading about it on wikipedia
abdulsattar has joined #ruby
workmad3 has joined #ruby
duyue2 has joined #ruby
devdazed has joined #ruby
doev has joined #ruby
<robscormack>
at least you have problems with other languages. Here in Chile, "guagua" means baby but in Spain and other spanish-speaking countries, it means "bus".
dEPy has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
Shidash has quit [Ping timeout: 250 seconds]
<robscormack>
"can you hold my baby?" is hilarious in other places, while "waiting for the bus" is hilarious for others here.
devdazed has quit [Max SendQ exceeded]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
masak: ask your distribution. also look out for ruby2.0 or so packages
<jhass>
belozi: use gist.github.com to share code ;)
kyb3r_ has joined #ruby
<masak>
jhass: there is indeed a ruby2.0 one.
<apeiros>
dEPy: a) it's needless magic. b) it violates "don't mutate your argument"
<masak>
jhass: there isn't a ruby2.1 one :)
startupality has quit [Client Quit]
<dEPy>
apeiros: ok tnx
<masak>
jhass: would you recommend uninstalling Ruby 1.9.1 before installing ruby2.0?
<jhass>
belozi: the issue is that you're creating new local variables inside move_forward, you don't change the outer ones
<apeiros>
when I do X.include Y, I expect Y to be included into X. not any number of unexpected side effects
TripTastic has joined #ruby
devdazed has quit [Ping timeout: 244 seconds]
jdj_dk_ has quit [Ping timeout: 255 seconds]
<jhass>
masak: I don't know Linux Mint
<masak>
jhass: what's the biggest reason for Ruby 2.x not being the default Ruby that gets installed? or is that another "ask your distribution" question?
<jhass>
masak: ask your distribution
<masak>
oki
<masak>
thank you.
japed has joined #ruby
<jhass>
belozi: the proper solution would be returning the new values from move_forward or making that a class and x and y instance variables
troulouliou_dev has joined #ruby
jottr has joined #ruby
Ilyas has quit [Ping timeout: 240 seconds]
<jhass>
belozi: also note that you have a space too much in your method definition, it ends up being equivalent to def move_forward((d))
xcv has joined #ruby
devdazed has joined #ruby
<jhass>
belozi: oh and you seem to use magic values like 0 for up, 1 for down etc. Don't do that, use symbols like :up, :down, :left and :right
<jhass>
and name d direction, avoid single letter variable names
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcv_ has joined #ruby
morenoh150 has left #ruby ["WeeChat 0.4.3"]
<apeiros>
jhass:
tiguser has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
<jhass>
I wonder if he's still listening :P
<belozi>
I am
<belozi>
I just confused and nothing is working
<belozi>
*I'm
tiguser has joined #ruby
<jhass>
see, once you do an assignment inside the method, x and y outside the method are different variables than those inside. That's why they're called local variables, they're local to the current scope
xcv has quit [Ping timeout: 250 seconds]
<belozi>
ok
PeterBoy has joined #ruby
<belozi>
I understand that
<belozi>
hmmm...
TripTastic has left #ruby ["Leaving"]
stef_204 has joined #ruby
workmad3 has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
sk87 has joined #ruby
asdasdasdasss has joined #ruby
sk87 has quit [Read error: Connection reset by peer]
sk87 has joined #ruby
starless has quit [Quit: Leaving]
<Hanmac>
hey for the ruby source, what is the difference between default_gems ("defs/default_gems") and bundled gems ("gems/bundled_gems") ?
<jhass>
belozi: as said, make it return both values or make the whole thing a class and @x and @y instance variables
jmbrown412 has joined #ruby
cantonic has quit [Quit: cantonic]
shredding has joined #ruby
dEPy has quit [Quit: Computer has gone to sleep.]
cpruitt has quit [Quit: cpruitt]
amacou has joined #ruby
kireevco has joined #ruby
jmbrown412 has quit [Ping timeout: 272 seconds]
Morkel has quit [Quit: Morkel]
<belozi>
How do I make it return both values? I don't understand
startupality has quit [Quit: startupality]
arup_r_ has quit []
fgo has joined #ruby
arup_r has joined #ruby
Sie00 has joined #ruby
amacou has quit [Ping timeout: 260 seconds]
stef_204 has joined #ruby
<jhass>
by returning an array. def move_forward(direction, current_x, current_y); ....; [current_x, current_y]; end; current_x, current_y = move_forward(:up, current_x, current_y)
startupality has joined #ruby
OffTheRails has joined #ruby
gauravagarwalr has quit [Remote host closed the connection]
wpp has joined #ruby
<jhass>
though I think the make it a class option is better: class Position; attr_reader :x, :y; def initialize; @x = 0; @y = 0; end; def move_forward(direction); case direction; ...; @x += 1; ...; end; end; position = Position.new; position.move_forward(:up); puts position.x, position.y;
cg433n has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
startupality has quit [Client Quit]
<wpp>
Is there a short way to get the diff of 2 arrays, which is does dependend on the order of the operands (-)
GriffinHeart has quit [Remote host closed the connection]
iteratorP has quit [Remote host closed the connection]
<OffTheRails>
wpp, explain? give two example arrays and your desired output
<mongag>
I have seen a lot's of there config.action_mailer.raise_delivery_errors = false in rails but I don't know what it is. It's not a variable, hash or array so?
cpruitt has joined #ruby
duyue has joined #ruby
<Hanmac>
OffTheRails: i said ruby trunk ... why is no one listening?
cpruitt has quit [Client Quit]
<OffTheRails>
so it doesn't exist in practice. why is nobody listening?
InfraRuby has left #ruby [#ruby]
<OffTheRails>
what can I use now. that's the question
<OffTheRails>
not what is in ruby-trunk
<Hanmac>
OffTheRails: it will be usable in practice but the commit is not released yet... that change was only 6 days ago
<OffTheRails>
is there a shorter form in the mean time that you know of, Hanmac?
<eval-in>
shevy => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/177348)
dangerousdave has joined #ruby
<shevy>
Hanmac, can you explain this
mclee has joined #ruby
belozi has quit [Read error: Connection reset by peer]
<Hanmac>
shevy **opts are only for kargs ... that one is not ... :/
<shevy>
hmm
devdazed has quit [Ping timeout: 240 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
Snowstormer has joined #ruby
autonomousdev has joined #ruby
shredding has quit [Quit: shredding]
devdazed has joined #ruby
fgo has joined #ruby
autonomousdev has quit [Client Quit]
tkuchiki has joined #ruby
Ayey_ has quit [Ping timeout: 250 seconds]
tiguser has joined #ruby
robbyoconnor has quit [Ping timeout: 250 seconds]
teddyp1cker has joined #ruby
robbyoconnor has joined #ruby
Miron has joined #ruby
autonomousdev has joined #ruby
sergiomiranda has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
phoo1234567 has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
xcv_ has quit [Remote host closed the connection]
phoo1234567 has quit [Max SendQ exceeded]
klaut has quit [Remote host closed the connection]
phoo1234567 has joined #ruby
clauswitt has joined #ruby
bewees has joined #ruby
klaut has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
SilkFox_ has joined #ruby
Akagi201 has quit []
<apeiros>
<3 rubydocs… "Raises an exception on any error." (File.unlink)
<apeiros>
very (un)helpful :(
<shevy>
haha
<shevy>
you need to think like a japanese there
lkba has joined #ruby
klaut has quit [Ping timeout: 255 seconds]
SilkFox_ has quit [Ping timeout: 240 seconds]
jdj_dk has joined #ruby
mongag has quit [Quit: Leaving]
kireevco has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
GlenK has quit []
<apeiros>
wow, and ruby C coding style-- :-S
<shevy>
apeiros is in nirvana - a place of sheer happiness
<apeiros>
braces-less if with the action indented the same as the condition… horror
<gogohome>
hello shevy , are you happy?
teddyp1cker has quit [Remote host closed the connection]
gaussblurinc1 has quit [Quit: Leaving.]
Wolland has joined #ruby
devdazed has joined #ruby
<shevy>
omg he is back
<apeiros>
*sob*, so many indirections
<ddv>
:|
<shevy>
wasamasa, are you awake?
<gogohome>
why?
<gogohome>
i will learn ruby?
<ddv>
never
<shevy>
lol
claymore has joined #ruby
<wasamasa>
shevy: nope
<wasamasa>
shevy: I'm still sleepy and discussing stuff at work
PeterBoy has quit [Remote host closed the connection]
<wasamasa>
shevy: I'm pretty surprised programming not only involves writing code
Takle_ has quit []
<shevy>
wasamasa ok... gogohome is back
cobakobodob has quit [Ping timeout: 272 seconds]
<shevy>
gogohome, shall wasamasa unban you?
<gogohome>
why?
<gogohome>
i just want learn ruby.
Takle has joined #ruby
Wolland has quit [Ping timeout: 244 seconds]
<shevy>
you never read a ruby book man
<wasamasa>
lol
<wasamasa>
don't you know learning with books is not cool anymore
<gogohome>
i read it too much.
<gogohome>
:(
<shevy>
gogohome why does the keyword "yield" do in ruby?
<shevy>
*what
<gogohome>
yield is call block.
<shevy>
good
<shevy>
perhaps there is hope for you
<gogohome>
haha yw
<gogohome>
thanks
<ddv>
gogohome: explain to me what blocks are
tewlz has quit [Ping timeout: 260 seconds]
Ayey_ has joined #ruby
TorpedoSkyline has joined #ruby
<gogohome>
ddv block is namelsee function that can take paramter as ||
<gogohome>
how about? ddv
Xeago has quit [Remote host closed the connection]
<gogohome>
right?
<apeiros>
gogohome: not correct, but an acceptable answer IMO
<apeiros>
i.e., close enough
<ddv>
gogohome: Ruby blocks are syntax literals for Proc objects, defined as instructions between curly braces {} (or do...end phrases for multiline blocks, which have lower precedence than curly braces) which may optionally take arguments and return values (e.g. {|x,y| x+y}). Procs are first-class objects and can be constructed explicitly or attained implicitly as method pseudo-arguments
<gogohome>
thanks then i can stay here ?
ldnunes has joined #ruby
parzo has quit [Ping timeout: 272 seconds]
<apeiros>
"ddv: gogohome: Ruby blocks are syntax literals for Proc objects" not correct
<gogohome>
oh i see. thanks ddv
<ddv>
explain apeiros
<apeiros>
a block only becomes a Proc instance if you a) pass it to proc or lamba, or b) pass it to a method which has a &block param
<apeiros>
otherwise no Proc instance is being created
<ddv>
apeiros: ok
<gogohome>
apeiros >> ddv >> shevy
<gogohome>
right?
<shevy>
yeah
<shevy>
he can ban your ass
<shevy>
I can't :(
<apeiros>
/assban ?
<gogohome>
apeiros: >> ddv >>>>>>>>>>>> shevy
<ddv>
gogohome: there is always someone who is better
<ddv>
stay humble
<gogohome>
oh i see.
<gogohome>
ddv:
<shevy>
lol
<gogohome>
:)
<ddv>
except is my case, since i'm a genius <3
<ddv>
in*
sk87 has joined #ruby
<gogohome>
ddv: what is IQ?
<gogohome>
my IQ is 154.
<ddv>
I have no idea
<gogohome>
why? too low?
<shevy>
ddv you typoed man
<ddv>
they couldn't measure my IQ because it's that high
<apeiros>
my IQ is 28
<ddv>
shevy: :|
<shevy>
gogohome is just punking you
<wasamasa>
shevy: did you just say there's hope for gogohome
<shevy>
:(
<shevy>
wasamasa he tricked me!
<wasamasa>
shevy: I think I have to cut you down
<gogohome>
how man’s iQ can be 28? mabe be chicken head?
<shevy>
wasamasa he gave a good answer to the question of what yield is though
<wasamasa>
shevy: to quote from the last manga I've read
<apeiros>
gogohome: don't insult my head!
<wasamasa>
shevy: lots of samurai who cut each other down with these words
<ddv>
wasamasa: the thing you accuse me of his also applicable to yourself
<ddv>
:P
<ddv>
is*
<apeiros>
gogohome: note that I currently consider you to be a disturbance in this channel. please restrict yourself to ruby specific questions. I'll kickban you otherwise.
SchweetPapa has quit [Ping timeout: 255 seconds]
jonr22 has joined #ruby
<shevy>
ddv happened to me as well
parzo has joined #ruby
<gogohome>
ok i will concenstrate on ruby
<gogohome>
:(
<shevy>
ddv his awful english causes me to reply in awful english as well :(
gattuso has quit [Read error: Connection reset by peer]
<shevy>
"concenstrate"
<shevy>
is this like castrate
<ddv>
shevy: :'(
<wasamasa>
ddv: I don't claim to know ruby
<wasamasa>
ddv: didn't ask stuff about it either
<wasamasa>
ddv: definitely not in that engrish
<shevy>
wasamasa you really think he uses google to find answers to questions given to him?
<wasamasa>
shevy: who knows :P
jonr22 has quit [Client Quit]
<wasamasa>
shevy: nothing surprised me anymore on freenode
<shevy>
hahaha
devdazed has joined #ruby
<apeiros>
on the same note @ all others: if you keep talking about it, you don't help. if he annoys you, STOP TALKING ABOUT IT.
<apeiros>
I can't give him a stern warning while you keep chatting about it/him. that's just unfair.
<wasamasa>
ok, I guess you're right
<ddv>
apeiros: op stands for oppression
<shevy>
op stands for opinionated :>
timonv_ has joined #ruby
<shevy>
gogohome has all the freedom in the world to learn ruby!
<shevy>
wasamasa and I shall teach him
<apeiros>
ddv: in this case in the name of all those who cried "I'm annoyed!". I didn't kick/ban him in the first instance, because strictly speaking he didn't violate any rules by which I kick/ban.
<ddv>
:) ok
<wasamasa>
apeiros: it was Mon_Ouie who did, yes
<apeiros>
correct
lkba has quit [Ping timeout: 244 seconds]
devdazed has quit [Max SendQ exceeded]
<apeiros>
IMO it's a case for /ignore
<gogohome>
apeiros: you are good ruby programmer.
<apeiros>
and that's the last I say about this.
<gogohome>
:)
jdj_dk has quit [Ping timeout: 272 seconds]
krisquigley has joined #ruby
devdazed has joined #ruby
<gogohome>
3 others are reverse.
lxsameer has joined #ruby
<gogohome>
wasamasa: shevy ddv
gogohome has left #ruby [#ruby]
<wasamasa>
wait, did you just force him to part
<shevy>
lol
<OffTheRails>
ha
<OffTheRails>
good
<wasamasa>
or did he part prematurely
<apeiros>
the mere presence of that @ scared him
<shevy>
LOL
<shevy>
now that's significantly more hilarious than an actual kick
<shevy>
it's like intimidation without effort
<wasamasa>
I already wanted to comment about mischievous people who react to good will by annoying you more
<OffTheRails>
didn't he leave so he wasn't kicked so he can come back later?
<wasamasa>
^
<apeiros>
it'd be more hilarious if I now went on to remove a couple of bans, because that's what I intended to do
<wasamasa>
lol
<apeiros>
OffTheRails: kick doesn't stop you from coming back
<apeiros>
only ban does
<OffTheRails>
ahh right
<apeiros>
and I can ban you after you've left too
<OffTheRails>
I was thinking that
<wasamasa>
the mere ban doesn't prevent you from seeing things said on the channel
<apeiros>
but might still have been his line of thought
<wasamasa>
you have to be kicked/disconnected for that to happen
<wasamasa>
hence both get combined
<apeiros>
wasamasa: with your client, yes, it prevents you from seeing.
<apeiros>
wasamasa: but there's irclog
<apeiros>
wasamasa: ah
<wasamasa>
apeiros: no, I mean if you're online and someone bans you
<apeiros>
wasamasa: misunderstood you. yes. ban alone doesn't remove you from the channel
<wasamasa>
apeiros: you're still connected
MartinCleaver has joined #ruby
<apeiros>
ban prevents reentry. kick removes from channel. so usually ban -> kick
<wasamasa>
apeiros: must be why people speak of kickbans
<ddv>
just bribe a freenode staffer
<wasamasa>
wound bankick be more correct then?
<apeiros>
yes. but kick->ban has the disadvantage that you often have to kick again because of auto-rejoin
<ddv>
kline
PeterBoy has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
<apeiros>
wasamasa: a good client gives you a button and probably does it indeed in the order ban->kick. and because it happens so fast it's not an issue. however, limechat is a bad client for ops :-(
<apeiros>
*in the order kick->ban (hence the name)
tewlz has joined #ruby
hamakn has joined #ruby
* wasamasa
uses an extensible irc client
<apeiros>
limechat originally was in ruby :-/
<ddv>
textual ftw
<ddv>
although I use weecaht also in a tmux
<wasamasa>
I only know of limechat since a friend of mine uses osx and didn't like my suggestion to go for macirssi
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
vsoftoiletpaper has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
teddyp1cker has quit []
phutchins has joined #ruby
fgo has joined #ruby
<apeiros>
OffTheRails: yes, it is the same bot
professor_soap has joined #ruby
<apeiros>
OffTheRails: different users on the same network can't use the same nae
<apeiros>
*name
<OffTheRails>
ahh
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
krisquigley has quit [Remote host closed the connection]
amacou has quit [Ping timeout: 272 seconds]
gattuso has joined #ruby
rixius has joined #ruby
mrommelf has joined #ruby
rixius is now known as Guest81845
wpp has quit []
fgo has quit [Ping timeout: 260 seconds]
gaussblurinc1 has joined #ruby
maximski has quit []
yokel has joined #ruby
SysArchBeOS has left #ruby [#ruby]
techsethi has quit [Quit: techsethi]
gaussblurinc1 has quit [Client Quit]
kireevco has quit [Ping timeout: 260 seconds]
devdazed has joined #ruby
SilkFox_ has joined #ruby
hamakn has quit [Ping timeout: 260 seconds]
lanox has joined #ruby
xcv_ has joined #ruby
PeterBoy has quit [Remote host closed the connection]
bluenemo has quit [Ping timeout: 240 seconds]
PeterBoy has joined #ruby
xcv has quit [Read error: Connection timed out]
SilkFox_ has quit [Ping timeout: 245 seconds]
ziyadb has joined #ruby
jdj_dk has joined #ruby
anarang_ has quit [Quit: Leaving]
x1337807x has joined #ruby
anarang has quit [Remote host closed the connection]
anarang has joined #ruby
gogohome has joined #ruby
brianherman has joined #ruby
gogohome has left #ruby [#ruby]
InfraRuby has joined #ruby
TDJACR has quit [Ping timeout: 250 seconds]
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brianherman has quit [Client Quit]
mrommelf has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dRbiG has joined #ruby
RandyT has joined #ruby
himsin has joined #ruby
Cyrax_ has joined #ruby
Wolland has joined #ruby
philcrissman has joined #ruby
arup_r_ has joined #ruby
mrommelf has joined #ruby
Ilyas_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Ping timeout: 250 seconds]
farn has joined #ruby
bluenemo has joined #ruby
TieSoul has joined #ruby
Ilyas has quit [Ping timeout: 246 seconds]
wpp has joined #ruby
philcrissman has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
lkba has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
PeterBoy has quit [Remote host closed the connection]
PeterBoy has joined #ruby
pothibo has joined #ruby
TorpedoSkyline has joined #ruby
davispuh has quit [Remote host closed the connection]
mr_foobar_baz has joined #ruby
TieSoul_ has joined #ruby
mrbrklyn has quit [Ping timeout: 255 seconds]
LekeFly has joined #ruby
TieSoul has quit [Ping timeout: 255 seconds]
nateberkopec has joined #ruby
kireevco has joined #ruby
TieSoul_ is now known as TieSoul
Solnse has joined #ruby
britneywright has joined #ruby
jdj_dk has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
rafaelcaricio has joined #ruby
shredding has joined #ruby
Shakyj has joined #ruby
sambao21 has joined #ruby
himsin has quit [Quit: himsin]
jgt has joined #ruby
gaussblurinc1 has joined #ruby
<Shakyj>
Hey, I am trying to install gitlabs and gitlabs_ci on the same box. Both use unicorn but have different setups / configs. if I try to start one after the other it fails for obvious clash reasons. How do I get round this? Not a ruby dev so I have no clue about unicorn
<jhass>
-p 1337
<jhass>
(just choose a different port for one)
<ddv>
they don't run on the same ports by default
<ddv>
not sure what you did
<Shakyj>
dvv copy and paste job :D
InfraRuby has left #ruby [#ruby]
joonty has quit [Quit: Leaving]
<jhass>
so you copy pasted gitlabs's unicorn.rb to gitlab-ci or what?
<Shakyj>
no, copy and pasted the commands from the install file
<jhass>
ddv: actually looks like the listen on the same ports by default
<Shakyj>
so I have no clue what I did
<Pro|>
if i have begin rescue end, how can i throw error in begin to get in to rescue
vsoftoiletpaper has quit []
<ddv>
weird we are running gitlab/gitlab ci for ages on the same vps
mrommelf has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
fgo has joined #ruby
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
<sonOfRa>
Users of net-ldap around? I have a full DN, and I want to get that entry directly via its DN, rather than doing a search with the base DN and a specific filter. Is this possible?
workmad3 has joined #ruby
workmad3 has quit [Client Quit]
thams has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
jgt has quit [Remote host closed the connection]
thams has quit [Client Quit]
jgt has joined #ruby
Grantlyk has quit [Read error: Connection reset by peer]
amundj has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 246 seconds]
Grantlyk has joined #ruby
babykosh has joined #ruby
iamjarvo has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
PeterBoy has quit [Remote host closed the connection]
jottr has joined #ruby
Ayey_ has quit [Ping timeout: 260 seconds]
dEPy has joined #ruby
wpp has quit [Quit: ZZZzzz…]
krisquigley has joined #ruby
razum2um1 has joined #ruby
nowthatsamatt has joined #ruby
asmodlol has joined #ruby
claymore has quit [Quit: Leaving]
Zenigor has joined #ruby
iamjarvo has quit [Client Quit]
kiri has joined #ruby
SilkFox_ has joined #ruby
zkay11 has joined #ruby
razum2um has quit [Ping timeout: 240 seconds]
Grantlyk has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
sk87 has joined #ruby
mikesplain has joined #ruby
krisquigley has joined #ruby
Dr3amc0d3r|away has quit [Changing host]
Dr3amc0d3r|away has joined #ruby
Dr3amc0d3r|away is now known as Dr3amc0d3r
<discr33t_>
jhass: where do i specify the variable that has the value of the existing ip address?
Wolland has joined #ruby
Xiti` has quit [Quit: Leaving]
<discr33t_>
jhass: oh nevermind i think i got it
Solnse has quit [Ping timeout: 260 seconds]
Xiti has joined #ruby
r0bby_ has quit [Excess Flood]
r0bby_ has joined #ruby
<Shakyj>
jhass: have you had experience with gitlabs or did you just look when I asked?
<jhass>
I just looked
Ayey_ has quit [Ping timeout: 245 seconds]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Shakyj>
ahhh, okies
sputnik13 has joined #ruby
parzo has quit [Ping timeout: 260 seconds]
jdj_dk has quit [Ping timeout: 272 seconds]
mikesplain has quit [Ping timeout: 240 seconds]
krisquigley has quit [Ping timeout: 250 seconds]
echooo has joined #ruby
platzhirsch has joined #ruby
Takle has quit [Remote host closed the connection]
tylerkern has joined #ruby
Grantlyk has quit [Remote host closed the connection]
parzo has joined #ruby
jerius has joined #ruby
arup_r_ has quit []
gtrak has joined #ruby
failshell has joined #ruby
redondo has joined #ruby
<Shakyj>
is it easy to run passenger and unicorn together?
snath has quit [Ping timeout: 246 seconds]
<DefV>
Shakyj: to do what?
lxsameer has joined #ruby
lxsameer has quit [Remote host closed the connection]
<Shakyj>
I am trying to get gitlabs and gitlabs_ci on the same server, the example to decouple gitlabs from an embedded nginx uses passenger but gitlabs_ci uses unicorn
bradleyp_ has quit [Ping timeout: 246 seconds]
failshell has quit [Remote host closed the connection]
Takle has joined #ruby
beef-wellington has joined #ruby
<Shakyj>
I don't know any ruby and very little nginx, so my "simple" solution was to follow the guide that uses passenger and run it alongside unicorn
failshell has joined #ruby
jgt has quit [Read error: Connection reset by peer]
<txdv>
unicorn?
<DefV>
Shakyj: you could run it alongside, but on different ports. Ideally you just want to set up both with passenger
jgt has joined #ruby
<jhass>
Shakyj: you're running separate applications, you can pick the appserver for any and always find a configuration that doesn't conflict since they're separate applications
paulfm has joined #ruby
Grantlyk has joined #ruby
asdasdasdasss has joined #ruby
shackleford has joined #ruby
shackleford has quit [Read error: Connection reset by peer]
shackleford has joined #ruby
iamjarvo has joined #ruby
PeterBoy has quit [Remote host closed the connection]
kireevco has joined #ruby
babykosh has quit [Quit: babykosh]
mikesplain has joined #ruby
almostwhitehat has joined #ruby
asdasdasdasss has quit [Ping timeout: 260 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jayunit100_ has joined #ruby
JohnFord has joined #ruby
InfraRuby has joined #ruby
hellangel7 has joined #ruby
Dr3amc0d3r is now known as Dr3amc0d3r|away
sk87 has joined #ruby
InhalingPixels has quit [Remote host closed the connection]
abdulsattar has quit [Remote host closed the connection]
<Shakyj>
sorry, pulled away for a min, think my best option is keep trying to get gitlabs working with unicorn and nginx, as gitlabs_ci is already working with it. That will keep things simpler
jgt has quit [Remote host closed the connection]
<Shakyj>
txdv: it's a http server like passenger
jgt has joined #ruby
eka has joined #ruby
Grantlyk has quit [Read error: Connection reset by peer]
amacou has quit [Ping timeout: 245 seconds]
Dr3amc0d3r|away is now known as Dr3amc0d3r
Grantlyk has joined #ruby
amacou has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
eka has quit [Client Quit]
r0bby_ has quit [Ping timeout: 250 seconds]
eka has joined #ruby
georgelappies has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
androidbruce has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
ffranz has joined #ruby
philcrissman has joined #ruby
msmith has quit [Remote host closed the connection]
maximski has quit []
shredding has joined #ruby
msmith has joined #ruby
geggam has joined #ruby
djcp has left #ruby ["WeeChat 0.4.3"]
SilkFox has joined #ruby
gogohome has joined #ruby
SilkFox_ has joined #ruby
balazs has joined #ruby
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gogohome>
who know about ‘arduino’?
beef-wellington has quit [Ping timeout: 272 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
jdj_dk has quit [Ping timeout: 260 seconds]
relix has quit [Client Quit]
tylerkern has joined #ruby
sambao21 has joined #ruby
<discr33t_>
can anyone help me figure out how to use the IPAddr function in Ruby to match an ip address against multiple ip address ranges? here is my pastebin. http://pastebin.com/8CaAE3uB i've tried this a ton of different ways and can't get it to work
Advocation has joined #ruby
bMalum_ has joined #ruby
asdasdasdasss has joined #ruby
<apeiros>
discr33t_: I suggest you make an actually reproducable example
Cheezebox has quit [Remote host closed the connection]
<apeiros>
note: I'm off for commute in a few minutes
<shevy>
nooo!
<shevy>
don't commute!
haasn has joined #ruby
<apeiros>
`IPAddr("10.150.120.0/21") | ("10.150.128.0/21")` should probably be `IPAddr("10.150.120.0/21") | IPAddr("10.150.128.0/21")`
CorpusCallosum has joined #ruby
<apeiros>
or even IPAddr.new
goodenough has joined #ruby
<sonOfRa>
Can I get net-ldap to return strings instead of arrays for single-element entries?
<sonOfRa>
currently I'm getting :dn=>["uid=foo,ou=People,dc=ldap,dc=acme,dc=com"]
<apeiros>
I also doubt you actually want IPAddr#|
<sonOfRa>
okay, so at least I'm not the only one :)
<apeiros>
docs say its bitwise OR
doev has joined #ruby
<sonOfRa>
eam: do you happen to know the best way to grab an entry by its DN?
<discr33t_>
apeiros: i've tried this: if (IPAddr.new("10.150.120.0/21") | (IPAddr.new("10.150.128.0/21"))).include? IPAddr.new("10.150.130.243") and it didn't work
mikesplain has joined #ruby
<apeiros>
discr33t_: also take not that "didn't work" is the *shittiest* problem description ever.
<sonOfRa>
.eq('dn', <full-dn-here>), base=""?
<discr33t_>
apeiros: it doesn't match the second ip range
<eam>
sonOfRa: unsure, I only pretend to understand ldap
PeterBoy has quit [Remote host closed the connection]
<apeiros>
discr33t_: I assume by | you want union. but | is bitwise OR
<sonOfRa>
I think everyone does.
asdasdasdasss has quit [Ping timeout: 260 seconds]
<eam>
pretty happy to have just replaced it, hopefully won't have to use it much going forward
<discr33t_>
apeiros: i'm looking for or. basically i want to know if the ip address is within the first range specified or the second range specified
<apeiros>
yes. bitwise OR is not the OR you're looking for.
<shevy>
just look at that ridiculous yellow and blue and red outfit of superman
<JumpyTheFrog>
I'm new to Ruby. I was curious if anyone 'round these parts uses it mostly outside of rails.
bMalum_ has joined #ruby
<JumpyTheFrog>
*mostly*
arup_r has joined #ruby
krisquigley has joined #ruby
<Hanmac>
imo superman has a very shitty hairstyle ... and that says someone who has no hairstyle ;P
<shevy>
JumpyTheFrog yeah
<shevy>
JumpyTheFrog I use it for all tasks
<shevy>
for instance: "apaconfig USR" generates a httpd.conf file for me into /usr/conf/httpd.conf
Takle has quit [Remote host closed the connection]
<JumpyTheFrog>
Cool!
agarie has joined #ruby
saarinen has quit [Quit: saarinen]
PeterBoy has quit [Remote host closed the connection]
asdasdasdasss has joined #ruby
awc737 has joined #ruby
OffTheRails has quit [Ping timeout: 260 seconds]
<shevy>
JumpyTheFrog my long term goal is to replace all shell scripts on a linux system
amacou has quit [Read error: Connection reset by peer]
amacou_ has joined #ruby
snath has joined #ruby
shredding has quit [Quit: shredding]
basiclaser has quit [Excess Flood]
alessandro1997 has joined #ruby
<shevy>
JumpyTheFrog here is another example http://shevegen.square7.ch/screenshot_2014.png - nevermind the colours, and nevermind that the line is overflowing to the right when it should be chopped off after 80 chars, but that's a set of ruby scripts I use to compile software from source. that script provides information required to another script that then handles the compilation procedure
Grantlyk has quit [Ping timeout: 260 seconds]
alessandro1997 has quit [Client Quit]
asdasdasdasss has quit [Ping timeout: 240 seconds]
JumpyTheFrog has quit [Remote host closed the connection]
bMalum__ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
philcrissman has joined #ruby
JumpyTheFrog has joined #ruby
michaeldeol has joined #ruby
<JumpyTheFrog>
Thanks! That's really cool.
awc737_ has joined #ruby
baroquebobcat has quit [Ping timeout: 245 seconds]
baroquebobcat_ is now known as baroquebobcat
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
toastynerd has joined #ruby
<shevy>
JumpyTheFrog you can also generate .pdf files with ruby, for instance prawn github - this works fine in rails but also from the commandline just as well, I use it to generate a calendar of upcoming meetings https://github.com/prawnpdf/prawn
iamjarvo has joined #ruby
bMalum_ has quit [Ping timeout: 250 seconds]
<JumpyTheFrog>
You are blowing my mind right now! I should have googled a little harder
jdj_dk has joined #ruby
jgt has quit [Remote host closed the connection]
larsam has joined #ruby
fgo has joined #ruby
mikecmpbll has quit [Ping timeout: 272 seconds]
anarang has quit [Quit: Leaving]
philcrissman has quit [Ping timeout: 255 seconds]
awc737 has quit [Ping timeout: 250 seconds]
havenwood has joined #ruby
vsoftoiletpaper has quit []
bradleyprice has quit [Remote host closed the connection]
<shevy>
well
<shevy>
there are basically two philosophies
<shevy>
one is the "use the right tool for the job"
<shevy>
the other is "use ruby for everything"
<jamesfordummies>
shevy: know anything that can parse pdfs into maniputable text like that?
<shevy>
I am in the second group
bradleyprice has joined #ruby
<shevy>
jamesfordummies hmm not sure ...
<shevy>
pdf can be a beast
<jamesfordummies>
yep
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jamesfordummies>
impress me
jottr has joined #ruby
<jamesfordummies>
:)
<shevy>
hehehehe
SilkFox has quit [Quit: WeeChat 0.4.3]
Ankhers has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
eyeamaye has quit [Quit: Leaving.]
doev has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
gauke has joined #ruby
goshdarnyou has joined #ruby
olivier_bK has quit [Ping timeout: 250 seconds]
gauke has quit [Client Quit]
<shevy>
a co-worker parsed .pdf via php
wjimenez5271 has quit [Remote host closed the connection]
<jamesfordummies>
bleh
Ankhers has joined #ruby
SilkFox has joined #ruby
pietr0 has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<jamesfordummies>
i just want a good pdf -> mobi/epub conversion
lkba has joined #ruby
<jamesfordummies>
that's all the world needs
amacou_ has quit [Remote host closed the connection]
tylerkern has joined #ruby
maestrojed has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
amacou has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
Emmanuel_Chanel has joined #ruby
W0rmDr1nk has quit [Ping timeout: 250 seconds]
<canton7>
jamesfordummies, doesn't calibre do that well?
apeiros has joined #ruby
<jamesfordummies>
no.
<jamesfordummies>
it's apparently a very hard problem to solve
<jamesfordummies>
epub <-> mobi is great
<jamesfordummies>
pdf to anything is pretty shitty
eyeamaye has joined #ruby
sergiomiranda has joined #ruby
<jamesfordummies>
fun fact - kindles can do it too. if you email a pdf to your kindle with the subject 'convert', it will attempt to convert it
lanox has quit []
<jamesfordummies>
not bad, but not good either
<jamesfordummies>
especially for books with code in them
amacou has quit [Ping timeout: 250 seconds]
SilkFox_ has joined #ruby
bronson has joined #ruby
jerius has quit []
momomomomo has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 240 seconds]
bricker`work has joined #ruby
jdj_dk has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
momomomomo has quit [Client Quit]
momomomomo has joined #ruby
SilkFox_ has quit [Ping timeout: 260 seconds]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
tewlz has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
maletor has joined #ruby
Sie00 has joined #ruby
theharshest has joined #ruby
freezey has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
matrixis1 is now known as matrixise
tjr9898 has quit [Remote host closed the connection]
zz_anildigital is now known as anildigital
<shevy>
hmm
<shevy>
can I rename a key in a hash
<shevy>
from foo to bar
<shevy>
hmm
<jhass>
hash[foo] = hash.delete(bar)
sambao21 has joined #ruby
<jhass>
er, other way around but you get it
<shevy>
ah yeah
<shevy>
that will work nicely
vsoftoiletpaper has joined #ruby
sdwrage has joined #ruby
chrishough has quit [Quit: chrishough]
apeiros has joined #ruby
<apeiros>
discr33t_: solved your problem?
PeterBoy has joined #ruby
JumpyTheFrog has quit []
Advocation has quit [Quit: Advocation]
<havenwood>
anyone use XDG_DATA_HOME, etc? trying to grok how XDG base dir spec can be reconciled with LFH.
LiohAu has quit [Quit: LiohAu]
gaussblurinc1 has quit [Quit: Leaving.]
krisquigley has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
tjr9898 has joined #ruby
baroquebobcat has joined #ruby
mocchi_ has quit [Ping timeout: 250 seconds]
jamesfordummies has quit [Ping timeout: 264 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Konversation terminated!]
cantonic has joined #ruby
aspires has quit []
MartinCleaver has quit [Quit: MartinCleaver]
atmosx has joined #ruby
sailias has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kash has left #ruby [#ruby]
sailias1 has quit [Read error: Connection reset by peer]
aspires has joined #ruby
tiguser has joined #ruby
<bricker`work>
Is there something you can safely use to join a URL path with / characters, so you don't have to worry about trailing/beginning slashes? I usually use File.join, but I understand that would break if the program was running on an OS that didn't use slashes for file paths. I know about URI.join, but it requires a host which I don't always have or want when building a path
<bricker`work>
URI.join is too "smart", eg:
mikecmpbll has joined #ruby
bMalum__ has quit [Read error: Connection reset by peer]
johnmolina has joined #ruby
jdj_dk has joined #ruby
<eam>
bricker`work: a URL always uses /
<eam>
for file paths (not url paths) you can use File.join
<bricker`work>
havenwood: eam what I'm saying is that they happen to be the same on the OS we're using, but if that changed I wouldn't want it to break. File.join has the better functionality for joining URL paths
deric_skibotn has joined #ruby
<bricker`work>
havenwood: the reason I'm using File.join is because it's smart about leading/trailing slashes
Logico has joined #ruby
<havenwood>
bricker`work: aha
<bricker`work>
momomomomo: only worried about the paths, not queries
autonomousdev has joined #ruby
<eam>
bricker`work: yeah, but what I'm saying is you asked about URL
<eam>
not file paths
<momomomomo>
aye
<bricker`work>
eam: Yes...
<bricker`work>
eam: thats the point of my question
<eam>
don't use File.join on urls :)
<momomomomo>
i guess the question is, bricker`work what do you mean by worrying about trailing slashes
<bricker`work>
eam: yes, that's what I'm asking, what do you recommend I use instead?
gruz0[russia] has joined #ruby
autonomousdev has quit [Client Quit]
alex88 has quit [Quit: Leaving...]
<eam>
bricker`work: for file paths, File.join. For URLs, "/"
<bricker`work>
you didn't change the part that's throwing the error, you changed a method that you're never calling (host=)
jimms has joined #ruby
diegoviola has joined #ruby
<bricker`work>
mongag: you're calling #host(), which takes 0 arguments, but you're passing it 1 argument (:localhost)
fgo has joined #ruby
awc737_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
jdj_dk has quit [Ping timeout: 240 seconds]
<eam>
apeiros: no, the path separator is \
mrommelf has joined #ruby
<shevy>
huh
chipotle has joined #ruby
echooo has quit [Ping timeout: 264 seconds]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<mongag>
I thought host= will be called when a parameter is passed and host will be called if not arent they "custom" setter/getter?
anildigital is now known as zz_anildigital
<apeiros>
eam: so File.read('C:/some/path.txt') does not work in your dos ruby?
<eam>
and DOS isn't super useful any more, but it comes in handy for some stuff
<shevy>
DOS had cool games
<shevy>
PRINCE OF PERSIA
<shevy>
CIVILIZATION
<shevy>
I guess the xcom or some of them ran on it as well
<eam>
various weird vendor software
<shevy>
haha
<shevy>
I never used these... only made use of the games
<eam>
though most of them are shipping linux firmware tools now
chipotle has quit [Client Quit]
<shevy>
if I would have only had ruby back then in the DOS days
<eam>
I have a PXE bootable DOS image
<eam>
I had to write reboot.com, DOS doesn't actually ship with a command capable of rebooting the system (why would you just not press the power button?)
zz_anildigital is now known as anildigital
<shevy>
omg
<shevy>
eam please
<shevy>
leave behind the old days
<shevy>
come to the modern world now
mongag has quit [Quit: This computer has gone to sleep]
<eam>
isnt' any platform with ruby modern enough?
<shevy>
every platform with ruby is better than a platform without ruby
razum2um1 has quit [Quit: Leaving.]
eeezkil has quit [Ping timeout: 245 seconds]
xcv has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
tjr9898 has joined #ruby
sepp2k has joined #ruby
endash has quit [Ping timeout: 255 seconds]
brianherman has joined #ruby
gruz0[russia] has quit [Quit: Leaving]
wallerdev has joined #ruby
fschuindt has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fschuindt has quit [Max SendQ exceeded]
fschuindt has joined #ruby
fschuindt has quit [Max SendQ exceeded]
fschuindt has joined #ruby
baroquebobcat has joined #ruby
michaeldeol has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
startupality has quit [Quit: startupality]
Spami has joined #ruby
michaeldeol has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has joined #ruby
Spami has quit [Client Quit]
mrommelf has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilkFox has quit [Ping timeout: 245 seconds]
duggiefr_ has joined #ruby
chipotle has quit [Client Quit]
vsoftoiletpaper has quit []
sailias has quit [Quit: Leaving.]
Spami has joined #ruby
vsoftoiletpaper has joined #ruby
dawkirst has joined #ruby
SilkFox_ has joined #ruby
Cheezebox has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
gaussblurinc1 has joined #ruby
Alina-malina has quit [Ping timeout: 244 seconds]
timonv_ has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
duggiefresh has quit [Ping timeout: 250 seconds]
little_fu has joined #ruby
Spami has quit [Client Quit]
noop has joined #ruby
anaeem1 has quit [Remote host closed the connection]
Matadoer has joined #ruby
Spami has joined #ruby
<eam>
apeiros: I take it back, it appears there's something odd with file separators in this DOS instance
Zenigor has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
<eam>
rather, ruby appears to translate / paths to \, even though the system only deals in \
<eam>
that's pretty messed up
nanoyak has joined #ruby
bradleyprice has joined #ruby
<eam>
paths constructed and manipulated in ruby/dos can't be written to a file and used by another application, for example
SilkFox_ has quit [Ping timeout: 260 seconds]
SilkFox has joined #ruby
little_fu has quit [Ping timeout: 245 seconds]
freezey has quit [Remote host closed the connection]
little_fu has joined #ruby
jonahR_ has joined #ruby
jgt has joined #ruby
tewlz has joined #ruby
hamakn has quit [Remote host closed the connection]
postmodern has joined #ruby
<apeiros>
eam: sounds weird :)
Alina-malina has joined #ruby
freezey has joined #ruby
<eam>
it's super weird ... not sure I'm going to bother fixing though :D
r0bby_ has quit [Excess Flood]
Asher has quit [Quit: Leaving.]
Zenigor has joined #ruby
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
r0bby_ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
jonahR has quit [Ping timeout: 264 seconds]
nanoyak has quit [Ping timeout: 240 seconds]
zorak has joined #ruby
Alina-malina has joined #ruby
little_fu has quit [Ping timeout: 250 seconds]
arya_ has joined #ruby
testcore has joined #ruby
superscott[8] has joined #ruby
nateberkopec has joined #ruby
dangerousdave has joined #ruby
anaeem1_ has joined #ruby
nanoyak has joined #ruby
alessandro1997 has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
mercwithamouth has joined #ruby
doev has quit [Ping timeout: 246 seconds]
bradleyp_ has joined #ruby
danijoo has joined #ruby
wpp has joined #ruby
awc737 has joined #ruby
tylerkern has joined #ruby
troyready has quit [Ping timeout: 240 seconds]
yetanotherdave has joined #ruby
bradleyprice has quit [Ping timeout: 264 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
InfraRuby has joined #ruby
claymore has joined #ruby
doodlehaus has quit [Ping timeout: 246 seconds]
InfraRuby has left #ruby [#ruby]
Ayey_ has joined #ruby
senayar has quit [Remote host closed the connection]
Advocation has joined #ruby
senayar has joined #ruby
timonv_ has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
Zenigor has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zenigor has joined #ruby
iamjarvo has joined #ruby
maximski has quit []
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
mike32 has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
Ayey_ has quit [Ping timeout: 245 seconds]
Zenigor_ has joined #ruby
senayar has quit [Ping timeout: 250 seconds]
dangerousdave has joined #ruby
Zenigor has quit [Read error: Connection reset by peer]
dangerousdave has quit [Client Quit]
FDj_ is now known as FDj
mleone has quit [Ping timeout: 245 seconds]
<shevy>
hey jamesfordummies did you check out PDF::Reader gem yet?
tylerkern has quit [Read error: Connection reset by peer]
<ari-_-e>
I'm not sosure that any of these are suitable for regexes
<ari-_-e>
so sure
tylerkern has joined #ruby
DEA7TH has joined #ruby
Vivekananda has quit [Remote host closed the connection]
Klumben has quit [Ping timeout: 240 seconds]
omosoj has joined #ruby
<DEA7TH>
If I have foo = [:a, :b, :c], and I iterate through it, how do I get the number of the current iteration? I know I can do foo.zip(1..foo.size).each |var, num|
<DEA7TH>
But I suppose there's already a built-in function?
chrishough has joined #ruby
<DEA7TH>
which is presumably more readable
<ari-_-e>
DEA7TH: Enumerable#each_with_index
<DEA7TH>
Ah. Thanks
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
felgenh3 has joined #ruby
michaeldeol has joined #ruby
livingstn has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
parzo_ has quit [Read error: Connection timed out]
<ari-_-e>
or Enumerator#with_index if you have an Enumerator
asdasdasdasss has quit [Ping timeout: 240 seconds]
r0bby_ has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
parzo has joined #ruby
mjmac has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
definiv_ has joined #ruby
mjmac has joined #ruby
sambao21 has joined #ruby
definiv_ has quit [Client Quit]
bronson has quit [Quit: bronson]
magikfx__ has quit [Quit: Computer has gone to sleep.]
jamesfordummies has quit [Remote host closed the connection]
parzo_ has joined #ruby
michaeldeol has quit [Ping timeout: 272 seconds]
stoned has quit [Ping timeout: 240 seconds]
parzo has quit [Ping timeout: 250 seconds]
Klumben has joined #ruby
centrx has quit [Quit: Mead error: Connection reset by beer]
godd2 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 255 seconds]
georgelappies has quit [Remote host closed the connection]
<godd2>
Is it possible to make an object return one of it's properties by default instead of self?
stoned has joined #ruby
ssvo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaleido has joined #ruby
kaleido has joined #ruby
tobago has quit [Remote host closed the connection]
<godd2>
Like if I have dog = Dog.new and then I say dog and have it return the dog's name instead of #<Dog:0x29225e12> or whatever
testcore has joined #ruby
dbasch has joined #ruby
michaeldeol has joined #ruby
mikesplain has quit [Ping timeout: 250 seconds]
<shevy>
not via .new
jimmyhoughjr has joined #ruby
PeterBoy has joined #ruby
<shevy>
hmm
jprovazn_afk has quit [Quit: Odcházím]
<shevy>
you can however overwrite #inspect
Ilyas has quit [Quit: Leaving]
<shevy>
so rather than #<Dog:0x29225e12> you can modify it so you get that
x1337807x has joined #ruby
<shevy>
>> class Dog; def inspect; 'jeremy'; end; end; dog = Dog.new; dog
<mongag>
What does this inherit do? class IndexDefinition < Struct.new(:table, :name, :unique, :columns, :lengths, :orders, :where, :type, :using)
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilkFox_ has joined #ruby
jdj_dk has joined #ruby
michaeldeol has joined #ruby
yfeldblum has joined #ruby
<godd2>
mongag it sets up a bunch of methods for you, and when you make a new isntance, passes any arguments sent to those values
djbkd has quit [Remote host closed the connection]
jottr has joined #ruby
JoshGlzBrk has joined #ruby
livingstn has joined #ruby
Glyphnote has joined #ruby
<apeiros>
godd2: fundamental misunderstanding - objects don't return. at all.
cmarques has quit []
n1lo_ has left #ruby ["Leaving"]
Sleepee has quit [Quit: Leaving]
djbkd has joined #ruby
n1lo has joined #ruby
Sie00 has quit [Remote host closed the connection]
lw has joined #ruby
<mongag>
I'm confused. Can you give me what to search in google?
Sie00 has joined #ruby
<apeiros>
mongag: Struct.new creates a class
<apeiros>
mongag: and IndexDefinition inherits from that class
<godd2>
apeiros: okay then what word should I use when I describe what dog.name does if it's imprecise to say 'it returns a string of the name"?
<apeiros>
should use Struct.new(…) do … end instead
michaeldeol has quit [Read error: Connection reset by peer]
<apeiros>
godd2: dog.name is a method, not an object. and methods do indeed return.
livingstn has quit [Read error: Connection reset by peer]
michaeldeol has joined #ruby
SilkFox_ has quit [Ping timeout: 240 seconds]
parzo_ has quit [Read error: Connection timed out]
autonomousdev has joined #ruby
<godd2>
apeiros: alright then what word should I use to describe what dog does if it's imprecise to say 'it returns itself'
<mongag>
aperios I understand that but what about instead of just inherit it a new instance is passed or something like that?
<apeiros>
godd2: that's where your misunderstanding lies
<apeiros>
godd2: that concept you have there is wrong
<apeiros>
an object *is*
<apeiros>
and you can't change what it *is*
<apeiros>
it wouldn't make sense either
<apeiros>
mongag: use tab completion. saves you from hilarious nick-typos
djbkd has quit [Remote host closed the connection]
omosoj has joined #ruby
<apeiros>
mongag: I don't understand your question
nateberkopec has quit [Quit: Leaving...]
lw has quit [Client Quit]
djbkd has joined #ruby
parzo has joined #ruby
InfraRuby has left #ruby [#ruby]
<godd2>
While I'd love to have a debate on the ontology of objects, my question was of a practical nature. Is there a way to make dog behave as if I had typed dog.name by default? If not, that's fine, but that is my question.
<apeiros>
godd2: no
<apeiros>
godd2: as said, it makes no sense.
<apeiros>
methods like puts, and p, will however invoke methods on your object
nateberkopec has joined #ruby
<apeiros>
and if you implement them properly, you can avoid calling them yourself.
<apeiros>
>> class Dog; def initialize(name); @name=name; end; attr_reader :name; alias to_s name; end; doggy = Dog.new("Fiffy"); puts doggy
Sie00 has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
tylerkern has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
tylerkern has joined #ruby
dru has joined #ruby
patrick99e99 has joined #ruby
parzo has quit [Ping timeout: 260 seconds]
SilkFox has quit [Ping timeout: 260 seconds]
asmodlol has quit [Quit: Leaving]
TorpedoSkyline has joined #ruby
<mongag>
apeiros: sorry but my client doesn't support tab completion... I know that for example class A < B here class A inherits class B but what about class A < B.new(:name, :password) for example?
<jimms>
Hey all! I'm trying to pass optionparser a multiline description that comes from a hash. is there a way? http://pastie.org/9456424
<apeiros>
mongag: errr, what? there's like a bazillion clients out there, and I haven't heard of a single client without tab completion…
<tewlz>
hmm, why can methods that return booleans has suffix ? but local booleans can't. Doesn't seem to follow principle of least surprise
InfraRuby has joined #ruby
<apeiros>
mongag: so I'm really curious - what client do you use?
<mongag>
x-chat aqua
<hoelzro>
mongag: the RHS of < is just an expression, so it could be just about anything
<apeiros>
mongag: dude, xchat totally has tab completion
<hoelzro>
so sometimes you'll see things like class Foo < Bar[Baz]
<hoelzro>
Bar is being used like a class factory here to generate Foo's parent
IceDragon has quit [Ping timeout: 246 seconds]
<apeiros>
mongag: amending what hoelzro said - A < (SomeClass)
<jimms>
Trying to list all possible options, but they change depending on a hash const in an included module
<apeiros>
SomeClass can be any expression evaluating to a class
IceDragon has joined #ruby
cg433n has quit [Quit: Computer has gone to sleep.]
<apeiros>
and Struct.new(…) evaluates to a class (as I already said)
georgelappies has quit [Read error: Connection reset by peer]
<apeiros>
tewlz: what's a "local boolean"?
SilkFox has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
<hoelzro>
apeiros: I think tewlz means is_ok? = true
<hoelzro>
a variable
djbkd has quit [Remote host closed the connection]
<apeiros>
then he's confusing value and variable
<hoelzro>
I can do def is_ok? ... end, but I can't create a variable with a trailing ? as part of its name
Cereal` has quit [Ping timeout: 255 seconds]
<tewlz>
apeiros: I'm using a formatting method and I need to pass two different states to it to determine output so I want to pass a boolean that initializes to false if nothing is passed
<apeiros>
tewlz: not quite sure how that's connected to your original question
<tewlz>
local variables can't have non-letters, right?
DrShoggoth has quit [Read error: Connection reset by peer]
georgelappies has joined #ruby
<apeiros>
they can have underscores and digits. otherwise, right
<tewlz>
I'm wondering why that's the case. It would seem to be more consistent to allow variables to have suffixes like ? to denote boolean
<shevy>
hoelzro what is the @_ in perl? is that something implicit in a sub?
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hoelzro>
yeah, it's the argument list
<jhass>
joelteon: maybe your bundle is installed to vendor/ or something?
<hoelzro>
so sub add { my ( $a, $b ) = @_; $a + $b } add(1, 2) # 3
<joelteon>
jhass: oh, I see
<eam>
shevy: it's basically what you were saying you wanted in ruby yesterday
mews has quit [Quit: He's gone...]
<joelteon>
ok, so if it's using vendor, it won't pick system gems too
<shevy>
I already forget what I wanted yesterday
<joelteon>
it doesn't like two different sources
<joelteon>
I understand
<eam>
map { _ + _ }
<shevy>
yeah
<shevy>
the @ makes that ugly :(
ascarter has joined #ruby
<eam>
ps hoelzro is making a subtle joke when he uses $a and $b
<shevy>
actually, _ + _ is almost a smiley
ascarter has quit [Max SendQ exceeded]
JohnFord has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<shevy>
he looks like very serious man
lele has joined #ruby
eyeamaye has joined #ruby
<shevy>
he probably never ever made a smiley on IRC!
ascarter has joined #ruby
<hoelzro>
;)
<eam>
it's like a robot trying to mimic emotions
bronson has quit [Quit: bronson]
abuzze has joined #ruby
<hoelzro>
that's me being naughty and forgetting about $a and $b being bad examples
InfraRuby has left #ruby [#ruby]
jimms has quit [Remote host closed the connection]
Karpuragauram has joined #ruby
Karpuragauram has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Ping timeout: 244 seconds]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak has joined #ruby
gr33n7007h has joined #ruby
benzrf is now known as benzrf|offline
Beoran has quit [Ping timeout: 272 seconds]
agarie has quit [Remote host closed the connection]
zorak has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
djbkd has joined #ruby
jdj_dk has quit [Ping timeout: 250 seconds]
joelteon has left #ruby ["bye"]
krisquigley has joined #ruby
lw_ has quit [Quit: s]
lw has joined #ruby
agarie has joined #ruby
treehug88 has quit [Ping timeout: 250 seconds]
nszceta has quit [Ping timeout: 246 seconds]
abuzze has quit [Ping timeout: 260 seconds]
TorpedoSkyline has joined #ruby
felgenh3 has quit [Quit: felgenh3]
chrishough has joined #ruby
Squarepy has quit [Quit: Leaving]
speakingcode has quit [Ping timeout: 240 seconds]
kireevco has quit [Client Quit]
zorak has joined #ruby
djbkd has quit [Ping timeout: 255 seconds]
x1337807x has joined #ruby
nszceta has joined #ruby
Sawbones has quit []
timonv_ has joined #ruby
Sie00 has joined #ruby
lw has quit [Ping timeout: 255 seconds]
<shevy>
naughty naughty
speaking1ode has joined #ruby
wjimenez_ has joined #ruby
Zenigor_ has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
almostwhitehat has quit [Quit: almostwhitehat]
Tricon has joined #ruby
benlieb has joined #ruby
aspires has quit []
speaking1ode has quit [Client Quit]
definiv has quit [Quit: leaving]
amystephen has joined #ruby
wjimenez5271 has quit [Ping timeout: 250 seconds]
speakingcode has joined #ruby
Beoran has joined #ruby
sergiomiranda has quit [Quit: sergiomiranda]
zorak has quit [Read error: Connection reset by peer]
rickruby__ has left #ruby [#ruby]
aspires has joined #ruby
tvw has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
aarkerio has joined #ruby
rickruby has joined #ruby
jdj_dk has joined #ruby
<rickruby>
anyone have a tutorial they've gone through that they'd recommend for building a gem for private use ?
<aarkerio>
hi! in this line : if aut = article.author rescue nil
<aarkerio>
the "rescue nil" part is just to be sure aut is not false
<aarkerio>
?
felgenh3 has joined #ruby
joshua__ has joined #ruby
<joshua__>
hola, is `<%= print "-C #{fetch(:sidekiq_config)}" if fetch(:sidekiq_config) %>` valid erb?
almostwhitehat has joined #ruby
theharshest has quit [Read error: Connection reset by peer]
<apeiros>
rickruby: not any different than building a public one
<apeiros>
the only difference is not in building, but in "not publishing"
<apeiros>
joshua__: looks valid to me
<rickruby>
apeiros thanks i'll look into publishing gems
<joshua__>
oki thanks apeiros, wasn't sure if `if` in erb needed to have an <% end %>
<apeiros>
aarkerio: I *assume* it is to rescue a NoMethodError caused if article is e.g. nil and thus doesn't respond to .author. horrible code IMO.
yekta has quit [Quit: yekta]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
joshua__: inline if returns nil if the condition isn't met. and <%= %> calls to_s on the result. so it'll just insert an empty string in that case.
michaeldeol has joined #ruby
<joshua__>
ok perfect, cheers apeiros
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
rickruby: `gem push your.gem` is the part which puts it on rubygems.org. just leave that part away. install it locally instead: `gem install path/to/your.gem`
alvaro_o has quit [Ping timeout: 245 seconds]
Spami has joined #ruby
sailias has quit [Quit: Leaving.]
ghostmoth has joined #ruby
jamesfordummies has joined #ruby
paulfm has quit []
duggiefr_ has quit []
Atrumx has quit [Ping timeout: 264 seconds]
<rickruby>
apeiros okay cool, thanks
arya_ has quit [Read error: Connection reset by peer]
<aarkerio>
apeiros: why horrible? works fine
arya_ has joined #ruby
djbkd has joined #ruby
shackleford has joined #ruby
shackleford has quit [Remote host closed the connection]
shackleford has joined #ruby
jamesfordummies has quit [Client Quit]
asdasdasdasss has joined #ruby
zorak has joined #ruby
aclearman037 has quit []
<shevy>
hmm
<shevy>
when I write stand-alone classes
tewlz has joined #ruby
<shevy>
it seems as if it is better to store user input into an array
<shevy>
and then batch process that array
<shevy>
e. g. to simulate multiple file input
tylerkern has joined #ruby
<apeiros>
aarkerio: because it's a bad idea to use the extremely unspecific inline rescue for something trivial like that
<shevy>
"work on these files: ['homer.txt','marge.txt','bart.txt']
<apeiros>
aarkerio: your "it works fine" is for a rather arbitrary value of "works" :)
timonv_ has quit [Remote host closed the connection]
<apeiros>
aarkerio: it can easily be done using: auth = article && article.author - much more specific
<apeiros>
aarkerio: additionally, assignment in a condition is bad style
nanoyak has quit [Quit: Computer has gone to sleep.]
jottr has joined #ruby
zorak has quit [Read error: Connection reset by peer]
asdasdasdasss has quit [Ping timeout: 245 seconds]
mews has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
<shevy>
rb_cairo_private.h:43:23: error: 'ruby_errinfo' undeclared (first use in this function)
<shevy>
# define RB_ERRINFO (ruby_errinfo)
zorak has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
x1337807x has joined #ruby
bpgoldsb|too is now known as bpgoldsb
SilkFox_ has joined #ruby
<shevy>
nope
<shevy>
I am dumb
itspots has quit [Quit: Computer has gone to sleep.]
itspots has joined #ruby
Sie00 has joined #ruby
<shevy>
hmm another question
<shevy>
I need to correct some files in a .html file
<shevy>
to .css files, which are incorrect
dc_ has joined #ruby
<shevy>
sorry
<shevy>
I need to correct some *lines in a .html file
benlieb has quit [Quit: benlieb]
SilkFox_ has quit [Ping timeout: 272 seconds]
<shevy>
ok :P
<shevy>
.gsub works on the whole string ...
philcrissman has joined #ruby
m8 has quit [Quit: Sto andando via]
itspots has quit [Ping timeout: 260 seconds]
failshel_ has joined #ruby
ValicekB has quit [Ping timeout: 246 seconds]
benzrf|offline is now known as benzrf
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
InhalingPixels has quit [Remote host closed the connection]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has quit [Ping timeout: 246 seconds]
DreamingRainne has joined #ruby
zorak has joined #ruby
philcrissman has quit [Ping timeout: 260 seconds]
failshel_ has quit [Ping timeout: 244 seconds]
redondo has quit [Ping timeout: 250 seconds]
cocotton_ has joined #ruby
cocotton_ has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
Ilyas has joined #ruby
cocotton_ has joined #ruby
andrewjanssen has joined #ruby
Sie00 has quit [Ping timeout: 250 seconds]
redondo has joined #ruby
dc_ has quit [Remote host closed the connection]
Atrumx has joined #ruby
dc_ has joined #ruby
parag has joined #ruby
dingus_khan has joined #ruby
cocotton has quit [Ping timeout: 240 seconds]
jayunit100_ has quit [Quit: jayunit100_]
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
patrick99e99 has quit [Ping timeout: 260 seconds]
georgelappies has quit [Remote host closed the connection]
cocotton_ has quit [Ping timeout: 260 seconds]
autonomousdev has joined #ruby
zorak has quit [Ping timeout: 272 seconds]
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
JohnFord has joined #ruby
jerius has quit []
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
nszceta has quit []
ascarter has joined #ruby
johnmolina has quit []
jamesfordummies has joined #ruby
troyready has quit [Ping timeout: 250 seconds]
mews has joined #ruby
zorak has joined #ruby
Ilyas_ has joined #ruby
benlieb has joined #ruby
ValicekB has joined #ruby
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
dc_ has quit [Remote host closed the connection]
crdpink has joined #ruby
almostwhitehat has quit [Quit: almostwhitehat]
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
tylerkern has quit [Read error: Connection reset by peer]
Ilyas has quit [Ping timeout: 272 seconds]
tylerkern has joined #ruby
eyeamaye has quit [Quit: Leaving.]
oetjenj has joined #ruby
gtrak has quit [Ping timeout: 264 seconds]
kirun has quit [Quit: Client exiting]
Atrumx has quit [Ping timeout: 264 seconds]
georgelappies has joined #ruby
dc_ has joined #ruby
mews has quit [Quit: He's gone...]
jonahR_ has quit [Quit: ¡Adios amigos, me fui para el carajo!]
djstorm has quit [Ping timeout: 245 seconds]
Sie00 has joined #ruby
doodlehaus has quit [Remote host closed the connection]
InhalingPixels has joined #ruby
patrick99e99 has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
krisquigley has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
livingstn has quit []
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev2_ has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has joined #ruby
britneywright has joined #ruby
JohnFord has joined #ruby
codecop has quit [Remote host closed the connection]
Sie00 has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Ping timeout: 250 seconds]
jxf has quit [Ping timeout: 264 seconds]
zorak has quit [Ping timeout: 245 seconds]
SchweetPapa has quit [Ping timeout: 240 seconds]
w09x has joined #ruby
zorak has joined #ruby
apeiros has quit []
goshdarnyou has quit [Quit: Connection closed for inactivity]
SchweetPapa has joined #ruby
apeiros has joined #ruby
spider-mario has quit [Remote host closed the connection]
Pharaoh2 has quit [Remote host closed the connection]
asdasdasdasss has joined #ruby
deric_skibotn has quit [Ping timeout: 272 seconds]
TorpedoSkyline has joined #ruby
nateberkopec has quit [Quit: Leaving...]
yfeldblum has joined #ruby
jayunit100 has joined #ruby
freezey_ has quit [Remote host closed the connection]
terrell_t has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asdasdasdasss has quit [Ping timeout: 245 seconds]
dbasch has quit [Quit: dbasch]
andrewlio has quit [Quit: Leaving.]
tylerkern has joined #ruby
fgo has joined #ruby
apeiros has quit [Remote host closed the connection]
terrellt has quit [Ping timeout: 244 seconds]
RichardLitt has quit [Quit: RichardLitt]
apeiros has joined #ruby
bricker`work has quit [Read error: Connection reset by peer]
lw has joined #ruby
agarie has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
goshdarnyou has joined #ruby
djbkd has quit [Remote host closed the connection]
tjr9898 has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
yfeldblum has quit [Remote host closed the connection]
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
georgelappies has quit [Ping timeout: 245 seconds]
fgo has quit [Ping timeout: 255 seconds]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kireevco has joined #ruby
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
chipotle has quit [Quit: cya]
freezey has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjr9898 has quit [Ping timeout: 272 seconds]
bricker`work has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<robscormack>
you want to use ruby bc you want to build a reusable script?
<shevy>
ruby is awesome
<robscormack>
I use this: sed -i.bak -e 's/css\/(.+).css/stylesheets\/($1).css/g' *.html
michaeldeol has joined #ruby
benzrf is now known as benzrf|offline
momomomomo has quit [Quit: momomomomo]
ReBoRN- has quit [Remote host closed the connection]
kireevco has quit [Quit: Leaving.]
aspires has quit []
Petru has joined #ruby
aspires has joined #ruby
claymore has quit [Quit: night]
w09x has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
SilkFox_ has joined #ruby
abuzze has joined #ruby
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deric_skibotn has joined #ruby
yfeldblum has joined #ruby
freezey has joined #ruby
shackleford has quit [Remote host closed the connection]
austincb has joined #ruby
mongag has quit [Quit: This computer has gone to sleep]
wallerdev has quit [Quit: wallerdev]
SilkFox_ has quit [Ping timeout: 245 seconds]
vsoftoiletpaper has quit []
abuzze has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
frosgy has joined #ruby
Neomex has quit [Ping timeout: 250 seconds]
ffranz has quit [Quit: Leaving]
georgelappies has joined #ruby
agarie has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bumptious has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 250 seconds]
icebourg has quit []
<dingus_khan>
x-post from #ruby-lang: i think i have a stupid question: is there some relatively simple way to take a symbol that's passed as a parameter, that's the same name as a method, and convert it into a call to that method? am i insane?
<dingus_khan>
mozzarella: hmm, thank you! i'm going to study both approaches, it's for a method that builds a response hash, i want to call the method specified by a symbol as a parameter argument when calling the response method
<mozzarella>
>> a = "live"; m = a.method(:reverse); a << "wut"; m.call
<mozzarella>
method is good if you need to store callables and call them later on
crdpink has quit [Ping timeout: 272 seconds]
<dingus_khan>
mozzarella: would the "live" be my symbol?
djbkd has joined #ruby
<mozzarella>
no, the object
<DreamingRainne>
The "live" is whatever you want to call the method on; the :reverse is the symbol.
<dingus_khan>
gotcha on the method, um, method--looking that up, have not seen that before
<Emmanuel_Chanel>
Hello!
jds has quit [Quit: Connection closed for inactivity]
Ilyas_ has quit [Ping timeout: 255 seconds]
<Emmanuel_Chanel>
Is there a good IRC bot reading RSS feeds?
<jhass>
dingus_khan: if you don't want to accidentally call private methods use #public_send
w09x has joined #ruby
toastynerd has joined #ruby
jrhorn424 is now known as zz_jrhorn424
freerobby has quit [Quit: Leaving.]
<dingus_khan>
i see, so could i use the isolated symbol as given as a parameter in an argument as the object on which to call #method on?
<dingus_khan>
jhass: this would be calling private methods exclusively, it's from a public member function building a response body, does that make sense?
<zenspider>
<zenspider>
too many "as"es
fold has quit [Ping timeout: 255 seconds]
<jhass>
yeah, that question doesn't parse well
<jhass>
what's an "isolated symbol"
<dingus_khan>
sorry, gonna make a paste real quick to explain
<jhass>
"parameter in an argument"?
msmith_ has quit [Remote host closed the connection]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dingus_khan>
sorry, does that make more sense? i knew i wasn't explaining that right
<nobitanobi>
Hi guys, how can I return a Tempfile from a method and be able to access it? https://gist.github.com/novito/0e0fcda7514cac6db4c9 -- When I try to fetch the return of this method, I see a #<File:0x007f9231d9f088> instead of a #<Tempfile> - And the .path returns nil.
<zenspider>
I hope that isn't the explanation.
<zenspider>
tl;dr
InhalingPixels has quit []
agarie has quit [Remote host closed the connection]
sputnik13 has joined #ruby
momomomomo_ has joined #ruby
<dingus_khan>
so in the else of #execute, if a request doesn't have a :method in it's request hash that is a protected a action, it should just call #response(:ok, <<method symbol here>>)
icarus has quit [Remote host closed the connection]
momomomomo_ has quit [Client Quit]
sdwrage has quit [Quit: This computer has gone to sleep]
momomomomo has joined #ruby
<dingus_khan>
what i wanted to do was convert that :method symbol into a call to the method specified by the symbol
davedev2_ has quit [Read error: Connection reset by peer]
momomomomo has quit [Client Quit]
<jhass>
nobitanobi: I guess that's because you unlink it
davedev24_ has joined #ruby
<dingus_khan>
anyway, off to research __send__ and #method, brb
<nobitanobi>
crap, that ensure killed me
<nobitanobi>
thanks jhass
momomomomo has joined #ruby
<jhass>
dingus_khan: use #public send or a plain #send. But answer my question first. How is a symbol ever equal to an array?
dc_ has joined #ruby
Takle has quit [Remote host closed the connection]
<dingus_khan>
jhass: good question; i thought about that as well, but it passes all the tests, so i'm assuming the logic there is that is any stored symbol is a match for the given argument, then it evaluates to true
<dingus_khan>
if any*
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<zenspider>
before you get into dynamic programming you REALLY need to understand what the code is doing. otherwise you're opening up a world of hurt
<dingus_khan>
had a feeling, hah
Sgeo has joined #ruby
<dingus_khan>
yeah it was a rush job for sure
<dingus_khan>
not mission critical
<zenspider>
it's mission critical when you're dynamically executing methods.
<jhass>
I see things like a check that always returns false, authorization check _inside the branch that is never executed_ and __in the else you want to call private methods with user data__
momomomomo has left #ruby [#ruby]
<jhass>
I mean...
<jhass>
that's not good
momomomomo has joined #ruby
<gruz0[russia]>
hi guys
dc_ has quit [Ping timeout: 240 seconds]
sevvie has joined #ruby
<jhass>
hi
<dingus_khan>
got it, looking into that as well. i did this at 3AM last night, sigh
msmith has joined #ruby
jdj_dk has quit [Remote host closed the connection]
lw has quit [Quit: s]
gtc has quit [Remote host closed the connection]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
and then you have an authorized? method where everybody expects a true/false response but instead you merely use its side effects
sdwrage has joined #ruby
<gruz0[russia]>
use === for compare
<jhass>
no, use ==
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<gr33n7007h>
I though == and .eql? was the same
sputnik13 has joined #ruby
<dingus_khan>
jhass: what do you mean by side effects?
<jhass>
gr33n7007h: Object#eql? docs explicitly state that it's not true for Numeric's
momomomomo has quit [Client Quit]
<jhass>
dingus_khan: it sets @authorized which you later checks
yfeldblum has joined #ruby
momomomomo has joined #ruby
<jhass>
dingus_khan: if you forget to call that method @authorized may not be what you think it is because you thought you called that method. That's a side effect
msmith has quit [Ping timeout: 272 seconds]
sputnik13 has quit [Client Quit]
dbasch has quit [Quit: dbasch]
terrell_t has quit [Remote host closed the connection]
<jhass>
dingus_khan: what I'm getting at is that it's not obvious that the purpose of authorized? is to set @authorized
sepp2k has quit [Read error: Connection reset by peer]
<dingus_khan>
jhass: um, not sure i follow--i'm sort of in the middle of re-writing the whole thing basically, but #authorized? currently hashes a password and checks against the stored hash and sets @authorized, true
asdasdasdasss has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<dingus_khan>
ah ok, yes i need to change a few things, i'm intending to make that whole process clearer
<jhass>
normally you'd just return the result and call with authorized = authorized?(..) or if authorized?(...)
terrellt has joined #ruby
mary5030 has quit [Remote host closed the connection]
gruz0[russia] has quit [Quit: Leaving]
<dingus_khan>
gotcha, i wanted to make it to where it wouldn't even check for authorized if there weren't credentials, i'm changing that whole decision structure basically at the moment
nowthatsamatt has joined #ruby
jayunit100 has quit [Quit: jayunit100]
<dingus_khan>
i actually have to run out the door at the moment though, but thank you jhass, very helpful and exactly the "other eyes" i need, much appreciated
<jhass>
gr33n7007h: since that paragraph is talking about Hashes it's probably to make {1 => :a, 1.0 => :b} work while having 1 == 1.0
yfeldblum has quit [Remote host closed the connection]
asdasdasdasss has quit [Ping timeout: 255 seconds]
<mallu>
obviously the has changes so I can't use [0], [1] etc as I have here .. http://pastie.org/9456878
<mallu>
** hash changes
<godd2>
zenspider: well, hopfully Object.send(:remove_const, :Data) doesn't break anyone's code who wants to use my gem
TorpedoSkyline has joined #ruby
mews has quit [Ping timeout: 240 seconds]
mews_ is now known as mews
kaspergrubbe_ has quit [Remote host closed the connection]
Peter has joined #ruby
Peter has left #ruby [#ruby]
gigetoo has joined #ruby
mallu has quit [Ping timeout: 246 seconds]
yokel has quit [Ping timeout: 264 seconds]
TorpedoSkyline has quit [Client Quit]
lw has joined #ruby
<zenspider>
godd2: that's a really fucking bad idea
<zenspider>
namespace your shit and don't mess with core classes
lw has quit [Max SendQ exceeded]
PeterBoy has quit [Quit: Bye Bye]
<godd2>
I did namespace it to Sound::Data, but if I include Sound in an example script, and call Data.new it tried to call the core Data, not mine
lw has joined #ruby
<jhass>
then don't include
<jhass>
I never understood what's up with these people having to include their stuff into main
<godd2>
It's less verbose. I'm not saying that's a good reason, just that it's a reason
<jhass>
btw you can still call Sound::Data.new after the include
<zenspider>
so, you namespaced it, and then unnamespace it with include. Makes sense.
<zenspider>
I've said my piece. It's a really fucking bad idea. Don't do it. You'd NEVER think doing it to String was a good idea, so I don't see why you think this is.
<godd2>
I wouldn't do it to String because people use String
<jhass>
^
<jhass>
+1 to zenspider
<zenspider>
godd2: so. burden of proof is on you. Go PROVE that nobody uses Data
<zenspider>
wait. you can't.
gdd229 has joined #ruby
tcstar has joined #ruby
<zenspider>
and ppl are using it. soo.... bad fucking idea
tcstar has quit [Client Quit]
choke has joined #ruby
n_blownapart has joined #ruby
felgenh3 has quit [Quit: felgenh3]
<zenspider>
Oh look. I use it in my code.
cybercix has quit [Read error: Connection reset by peer]
bradleyprice has quit [Remote host closed the connection]
<godd2>
lol didn't mean to rustle any jimmies
bradleyprice has joined #ruby
jmbrown412 has quit [Remote host closed the connection]
<zenspider>
"lol". You asked how irresponsible something would be. You were told how fucking stupid it was. You argued.
<zenspider>
you want to be stupid about this. go nuts.
<godd2>
I don't know why you're lashing out at me though.
mews has quit [Quit: He's gone...]
threesixes has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
eyeamaye has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
<godd2>
If I'm wrong, that's fine, I can take it.
<zenspider>
Don't mind me. I have this odd condition where when someone asks a question I think they're sincere about wanting an answer.
n_blownapart has quit []
<godd2>
Just because I argue back doesn't make me insincere.
arya_ has quit [Ping timeout: 250 seconds]
bradleyprice has quit [Ping timeout: 240 seconds]
<godd2>
To be fair, your claims remain unsubstantiated. Not that mine, don't.
Hobogrammer has quit [Ping timeout: 260 seconds]
<zenspider>
the fuck?
<godd2>
mine don't*
startupality has quit [Quit: startupality]
<zenspider>
it's a core fucking class you moron. it's referenced in rdoc. it's referenced explictly in README.EXT.
<jhass>
I think we've made clear that it's not a good idea. Let's leave it there
<zenspider>
like I said, if you want to be stupid, go for it.
<jhass>
zenspider: stop insulting, that's not helping
<zenspider>
welcome to my /fools list
<zenspider>
there's no helping this guy
choke has quit [Quit: Leaving]
pietr0 has quit [Quit: pietr0]
<alpha123>
I can't help but reference http://rubydrama.com/ right now (not that I mind :P )
<jhass>
no reason to insult, really
<DreamingRainne>
You don't get to assume what other people will or won't do with the core classes. They're "core" for a reason: everyone's supposed to be able to depend on them being there, and having XYZ behavior.
<shevy>
the only sad thing is that RubyPanther is not here :(
yfeldblum has quit [Ping timeout: 240 seconds]
<DreamingRainne>
If you want your own class, go for it, but don't think to replace a core class in code that other people are meant to use.
nateberkopec has joined #ruby
<zenspider>
alpha123: it doesn't list the last one anymore? I was wondering how long it's been
momomomomo has quit [Quit: momomomomo]
<zenspider>
guess I'll have to go poke at devchix instead.
freerobby has quit [Quit: Leaving.]
<shevy>
"Imagine the person sitting at another keyboard somewhere whom your comment may affect. Is this something you would say to them in person?"
<shevy>
YES
ARCADIVS has joined #ruby
<DreamingRainne>
Like, you say, "no one uses Data", so you feel free in assuming you can overwrite it. Fine, but then if someone *does* go on to use Data, they scribble all over your assumptions, right? And that'd be a bad thing, for the same reason it's bad when you scribble on theirs.
arya_ has joined #ruby
<godd2>
Well I can take some name calling, I just didn't mean to put you in a bad mood zenspider.
nowthatsamatt has quit [Quit: nowthatsamatt]
<godd2>
So for that I apologize
cpruitt has quit [Quit: cpruitt]
<alpha123>
zenspider: I don't actually remember the last one, what was it?
<shevy>
zenspider is in a bad mood?
<godd2>
shevy If he is, I take full responsibility.
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h>
zenspider needs dos grande cervezas
<zenspider>
alpha123: heh. don't remember. I try to ignore that crap. :)
startupality has joined #ruby
<zenspider>
shevy: call it severely allergic to wilful ignorance
Petru has quit [Quit: Leaving]
hsps_ has quit [Ping timeout: 260 seconds]
<zenspider>
gr33n7007h: while I do drink now, I still can't stand beer. thanks tho. :)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nateberkopec has quit [Ping timeout: 240 seconds]
dorei has quit []
<gr33n7007h>
:P
zaphro has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dopie has joined #ruby
<dopie>
hello beautiful rubyists!
<shevy>
gr33n7007h spanish beer?
OrkzRule has quit [Ping timeout: 260 seconds]
<shevy>
I once had to drink "sangria" ...
<gr33n7007h>
shevy, yep san miguel
asdasdasdasss has joined #ruby
<shevy>
not that it is beer, but I dunno what it really wanted to be