user__ has quit [Remote host closed the connection]
S0da has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
gancl has joined #ruby
robbyoconnor has joined #ruby
jzig has joined #ruby
greggroth has joined #ruby
Solnse has quit [Quit: Leaving.]
nateberkopec has quit [Quit: Leaving...]
cashnguns has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
YamakasY has quit [Ping timeout: 265 seconds]
Guest9187 has quit [Ping timeout: 255 seconds]
cashnguns has joined #ruby
jzig has quit [Ping timeout: 265 seconds]
saarinen has joined #ruby
saarinen has quit [Client Quit]
macmartine has joined #ruby
m4n1f3st0 has joined #ruby
tnk1 has quit [Remote host closed the connection]
Marc has joined #ruby
Marc is now known as Guest32008
saarinen has joined #ruby
tnk1 has joined #ruby
tnk1 has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
tnk1 has joined #ruby
Nightmare is now known as Nightmurr
tnk1 has quit [Read error: Connection reset by peer]
hfp`away has joined #ruby
Nightmurr is now known as Nightmare
BuSerD has quit [Quit: Lost terminal]
rationalrevolt has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rationalrevolt has left #ruby [#ruby]
andy___ has joined #ruby
andy___ is now known as Guest19351
f1skn has quit []
dx7 has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 255 seconds]
dx7 has joined #ruby
smathieu has joined #ruby
greggroth has quit [Ping timeout: 255 seconds]
The_NetZ has joined #ruby
diegoviola has quit [Remote host closed the connection]
cover has quit [Remote host closed the connection]
Guest19351 has quit [Ping timeout: 255 seconds]
<The_NetZ>
hello. could one in theory write a pair of ruby extensions, with the same method/class/module names, but with slightly different functions, require the first one, and require the other, and have the second require'd gem/extension totally overwrite the definition of the first?
jason__ has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
w|t has quit [Ping timeout: 264 seconds]
jason_ has joined #ruby
diegoviola has joined #ruby
<mr_snowf1ake>
The_NetZ, can you give us an example of why you want to do that?
<The_NetZ>
mr_snowf1ake: I think the term in the java world is shadowing... basically the reason and reference here is in regards to the RPG Maker series of software.
<The_NetZ>
mr_snowf1ake: from what I've gathered from how the game works, you have an exe with an embedded ruby interpreter, a dll with classes handling graphics, audio, and input, and then scripts handling the game logic
<mr_snowf1ake>
The_NetZ, oh, I see what you mean. yeah, you can do that. in ruby, you can basically override anything.
<mr_snowf1ake>
well
<mr_snowf1ake>
uhh
<mr_snowf1ake>
the exe might make it tricky
<The_NetZ>
mr_snowf1ake: yeah, but, I just tested that I can use require within the scripts themselves and load stuffs, but I'll do more testing. in theory it should be workable, though?
Lewix has quit [Remote host closed the connection]
<mr_snowf1ake>
The_NetZ, depends on when those scripts are loaded. but yes.
jason_ has quit [Ping timeout: 240 seconds]
funktor has joined #ruby
lyanchih__ has quit [Quit: lyanchih__]
<The_NetZ>
mr_snowf1ake: best I can figure is launching the exe require's the dll (or whatever the proper useage here is), and then does some marshal and zlib magic to evaluate the scripts database file.
saarinen has quit [Quit: saarinen]
<The_NetZ>
so init > require > eval basically, and I can add requires into the eval step.
evenix has joined #ruby
Lewix has joined #ruby
<mr_snowf1ake>
The_NetZ, alright. then i guess it's fine. but yes, you can override methods just by redefining them.
Celm has quit [Remote host closed the connection]
<The_NetZ>
I'm going to write a simple extension (little more than a hello world) and see if I can require the so/dll
Celm has joined #ruby
funktor has quit [Remote host closed the connection]
rvraghav93_ has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
rvraghav93 has quit [Ping timeout: 240 seconds]
petey has quit [Remote host closed the connection]
ce_afk is now known as cescalante
petey has joined #ruby
lyanchih__ has joined #ruby
creede has quit [Ping timeout: 246 seconds]
snuffeluffegus has joined #ruby
kenneth has joined #ruby
munix has quit [Quit: Konversation terminated!]
rvraghav93_ has quit [Ping timeout: 265 seconds]
smathieu has quit [Ping timeout: 255 seconds]
michael_lee has joined #ruby
funburn has joined #ruby
petey has quit [Ping timeout: 240 seconds]
rvraghav93 has joined #ruby
<mr_snowf1ake>
The_NetZ, kk, good luck
<The_NetZ>
mr_snowf1ake: I suspected it would work, but I'm a rookie :P
braincrash has quit [Quit: bye bye]
brunoro has joined #ruby
fgo has joined #ruby
juanmnl has quit [Quit: My dingdong has gone to sleep. ZZZzzz…]
eynj has joined #ruby
SonicX has quit [Remote host closed the connection]
mbuf has joined #ruby
kobain_ has joined #ruby
jzig has joined #ruby
kobain has quit [Ping timeout: 268 seconds]
toastynerd has joined #ruby
braincrash has joined #ruby
rvraghav93 has quit [Ping timeout: 240 seconds]
e^0 has joined #ruby
<Rylee>
Is it possible to pass the ``new`` method a block to operate on the newly created object?
<Rylee>
Like...
greggroth has joined #ruby
<Rylee>
e = example_object.new { |o| o.set_a_thing; o.do_a_thing_that_changes_it; o.do_magic }
<bricker`LA>
I know but every time I go in #bash they just tell me to read the man page
<bricker`LA>
(which I've done, of course)
<bricker`LA>
oh well, the other format works and is fine
<gr33n7007h>
what does printf "%s\n" "kpcc-w3c-$(date +%F)" say?
Lewix has quit [Remote host closed the connection]
<bricker`LA>
same result: 30m"kpcc-w3c-2014-03-28
<gr33n7007h>
both work fine in mine
fabrice31 has joined #ruby
<bricker`LA>
hm
<bricker`LA>
oh well
<gr33n7007h>
maybe try a different terminal emulator
<bricker`LA>
might be my zsh prompt
<gr33n7007h>
bricker`LA, have you tried it in /bin/bash
<bricker`LA>
hey it works
<bricker`LA>
thanks
<gr33n7007h>
cool, no worries
axsuul has joined #ruby
klaut has joined #ruby
LiohAu has joined #ruby
petey has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
victorbjelkholm has joined #ruby
lw has quit [Quit: s]
creede has joined #ruby
boboc has joined #ruby
dagobah has joined #ruby
zigomir has joined #ruby
petey has quit [Ping timeout: 265 seconds]
boboc has quit [Client Quit]
boboc_ has joined #ruby
pfg has joined #ruby
johncjensen has quit []
iamdoo2 has joined #ruby
victorbjelkholm has quit [Ping timeout: 240 seconds]
LiohAu has quit [Ping timeout: 240 seconds]
ahawkins has joined #ruby
andikr has joined #ruby
boboc_ has quit [Remote host closed the connection]
nfk has joined #ruby
Bounga has joined #ruby
Stalkr_ has joined #ruby
ephemerian has joined #ruby
Xeago has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blueOxigen has joined #ruby
dx7 has joined #ruby
abdulsattar has quit [Ping timeout: 264 seconds]
lolmaus has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
duggiefresh has joined #ruby
jespada has joined #ruby
CyborgCygnus has quit [Quit: Rage Quit]
browndawg has quit [Ping timeout: 255 seconds]
sk87 has joined #ruby
browndawg has joined #ruby
dx7 has quit [Ping timeout: 265 seconds]
orthos has joined #ruby
duggiefresh has quit [Ping timeout: 264 seconds]
lemonsparrow has quit [Ping timeout: 245 seconds]
Stalkr_ has quit [Quit: Leaving...]
lolmaus_ has joined #ruby
orthos has quit [Remote host closed the connection]
ndrei has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
_justin has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
airstream66 has joined #ruby
gaussblurinc has joined #ruby
orthos has joined #ruby
_justin has joined #ruby
browndawg has quit [Quit: Leaving.]
airstream66 has quit [Remote host closed the connection]
gasbakid has joined #ruby
orthos is now known as orthos_
einarj has joined #ruby
orthos_ has quit [Quit: Leaving]
axisys has joined #ruby
pfg has joined #ruby
fannye has joined #ruby
robozahn has joined #ruby
lolmaus_ has quit [Read error: Connection reset by peer]
victorbjelkholm has joined #ruby
lolmaus has joined #ruby
tacos1de has quit [Ping timeout: 265 seconds]
Advocation has joined #ruby
Bloc has joined #ruby
renklaf has joined #ruby
<Bloc>
i'm looking at chef and there are config files in this format default["my_app"]["mysql"]["database"] = 'mydb'
dumdedum has joined #ruby
<Bloc>
how is it creating these things that looks like arrays?
RaptorJesus_ has joined #ruby
<Bloc>
when I try this in irb it doesn't work
RaptorJesus has quit [Disconnected by services]
tacos1de has joined #ruby
RaptorJesus_ is now known as RaptorJesus
fabrice31 has quit [Remote host closed the connection]
kitak_ has quit [Remote host closed the connection]
abdulsattar has joined #ruby
withnale_ has quit [Ping timeout: 252 seconds]
<apeiros>
Bloc: those are hashes
<apeiros>
it could technically be anything which responds to [] and []=
<apeiros>
but most likely it's hashes
<Bloc>
aren't hashes defined by curly braces?
obs has joined #ruby
<apeiros>
the literal, yes
<apeiros>
but once you assigned them to a variable, you call methods on them like on any other object
<apeiros>
and to be able to do the above, you need nested hashes. so that default["my_app"] returns a hash again, which in turn responds to [], and returns a hash for "mysql" key, which in turn must be a hash again, to be able to set the "database" key on it
<Bloc>
does that mean default is some kind of hash object with a method [] ?
<apeiros>
that's one possible implementation. they might also be constructing a matching hash for you to fill
<Bloc>
i see
<apeiros>
e.g. default = {"my_app" => {"mysql" => {}}
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki_ has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
poikon_ has joined #ruby
nari has quit [Ping timeout: 245 seconds]
poikon has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 268 seconds]
banister has joined #ruby
Celm has joined #ruby
deadlock has quit [Read error: Connection reset by peer]
robozahn has left #ruby [#ruby]
wchun has quit [Ping timeout: 240 seconds]
_Andres has quit [Read error: Connection reset by peer]
Celm has quit [Ping timeout: 265 seconds]
maroloccio has joined #ruby
obs has quit [Quit: Konversation terminated!]
skammer is now known as skammer|afk
skammer|afk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhass|off is now known as jhass
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
obs has joined #ruby
AlSquire has joined #ruby
timonv has quit [Remote host closed the connection]
senayar_ has joined #ruby
oneawayman has joined #ruby
hiall has quit [Quit: hiall]
njection_ has joined #ruby
fgo has joined #ruby
banister has quit [Ping timeout: 255 seconds]
nffff has quit [Ping timeout: 265 seconds]
njection has quit [Ping timeout: 265 seconds]
senayar has quit [Ping timeout: 255 seconds]
Advocation has quit [Quit: Advocation]
poikon_ has quit [Remote host closed the connection]
olivier_bK has joined #ruby
olivier_bK has quit [Remote host closed the connection]
iamdoo2 has quit [Remote host closed the connection]
olivier_bK has joined #ruby
r_rios has joined #ruby
banister has joined #ruby
<olivier_bK>
hy
klaut has quit [Remote host closed the connection]
mehlah has joined #ruby
heftig has joined #ruby
petey has joined #ruby
<olivier_bK>
in my array i try to remove all line mydomaine.net/scripts/exportStatsCsv/
<olivier_bK>
how i can do it
<olivier_bK>
?
<olivier_bK>
i try delete but
mengu has quit [Remote host closed the connection]
<olivier_bK>
he delete only the first line
bgy has joined #ruby
<bgy>
hi
<bgy>
I can't remember, using capistrano 3, how could I start the interactive deployment feature/debug mode? I've a remote failing task and I'd like to stop and test myself on the remote
workmad3 has joined #ruby
ben3 has joined #ruby
poikon has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackms has joined #ruby
<blackms>
morning
ndrei_ has joined #ruby
mehlah has quit [Ping timeout: 264 seconds]
petey has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 265 seconds]
gancl has joined #ruby
aaronmcadam has joined #ruby
mehlah has joined #ruby
r_rios has quit [Ping timeout: 264 seconds]
aaronmcadam has quit [Remote host closed the connection]
dx7 has joined #ruby
mehlah has quit [Client Quit]
Dwarf has quit [Ping timeout: 255 seconds]
mehlah has joined #ruby
WillAmes has joined #ruby
agent_white has joined #ruby
Dwarf has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.3]
robustus has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
dx7 has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
poikon has quit [Remote host closed the connection]
Advocation has joined #ruby
m4n1f3st0 has joined #ruby
robustus|Off has quit [Ping timeout: 252 seconds]
<olivier_bK>
how i can delete a params in string for exemple in this string i only want to delete scripts mydomain.net/scripts/exportStatsCsv/
<olivier_bK>
?
<tobiasvl>
a params in string?
<tobiasvl>
olivier_bK: does the string always look like a dir path?
<tobiasvl>
split it and remove scripts, then glue it together again with File.join
fgo has quit []
<olivier_bK>
i get a lot of line like this one mydomain.net/scripts/exportStatsCsv/ and i need to remove /scripts
<tobiasvl>
okay, just gsub then?
Xeago_ has joined #ruby
<shevy>
:)
<shevy>
come on olivier_bK
etqqkoiflwhb_ has quit [Quit: Computer has gone to sleep.]
<shevy>
you know .gsub
<shevy>
you have been using ruby now for a while
etqqkoiflwhb_ has joined #ruby
hiall has joined #ruby
goganchic has joined #ruby
Speed has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 240 seconds]
doodlehaus has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
gilcosson has joined #ruby
RaptorJesus has quit [Quit: Torturing small animals for shits 'n giggles...what? I'm a serial killer?]
boombadaroomba has quit [Ping timeout: 265 seconds]
mansi has joined #ruby
makara has quit [Quit: Leaving]
<olivier_bK>
i found my stupid error
<olivier_bK>
i m really ...
yfeldblum has quit [Remote host closed the connection]
depesz has joined #ruby
<depesz>
hi. is it possible to set timeout in irb, so that when user doesn't do anything for <...> and there is no command running, irb exits?
poikon has joined #ruby
poikon has quit [Remote host closed the connection]
<shevy>
depesz probably. you can run a Thread.new on irb startup via your .irbrc
<jhass>
sounds like a weird requirement though
poikon has joined #ruby
chipotle_ has quit [Quit: cya]
<shevy>
depesz you'd probably have to also catch whenever the user input something into irb, right now I am unsure how to do this
spacemud has quit [Ping timeout: 265 seconds]
<agent_white>
shevy: Are you in the outbahk?
geggam has quit [Ping timeout: 255 seconds]
<shevy>
agent_white I am in the middle of a semi-large city!
gasbakid has quit [Ping timeout: 265 seconds]
<agent_white>
shevy: Ah! My current sleeping schedule seems to be on ~austrailian time. It's 4:30am here.
geggam has joined #ruby
<shevy>
now now now
<shevy>
austria, not australia!
supergeek has quit [Quit: Goodbye, cruel world.]
gasbakid has joined #ruby
WormDrink has quit [Ping timeout: 255 seconds]
<agent_white>
If that's the case, you should encourage my /r/programmingbuddy to get on his shit so we can get our website built.
WormDrink has joined #ruby
<agent_white>
Instead of `rm -fr`'ing our server like last time.
<shevy>
haha
* agent_white
wishes he was joking... *cries on the inside*
arietis has joined #ruby
<shevy>
I like your programming buddy
<shevy>
he seems to be a doer, not a talker
<agent_white>
Eh, the opposite-ish... I was teaching him how to build a server... and suddenly I couldn't ssh-in.. then he began to go "Oh no... ohhhhh no..."
nari has joined #ruby
creede has quit [Quit: Leaving]
<agent_white>
"You didn't fucking do what I think you did... did you?" ~~ "Ahhhh fuck man...."
<crome>
screwing up login is a good sign of progress
oneawayman has quit [Ping timeout: 255 seconds]
<agent_white>
crome: Agreed. My motto is: 'If you don't fuck up, you wont' learn.'
gilcosson has quit [Remote host closed the connection]
<agent_white>
Though that was after ~3 hours of a show-and-tell on how to setup a basic server... only to demolish it in an instant.
Celm has joined #ruby
<crome>
hehe
<crome>
way to go
banister has joined #ruby
<agent_white>
"RIP $SERVER 04:00:00 - 07:00:00 ... you will not be missed."
<agent_white>
This is why devs should never get root privs. :(
<shevy>
he did it on purpose
boombadaroomba has joined #ruby
goganchic has quit []
Speed has joined #ruby
<agent_white>
shevy: That's what I've been thinking. I can't tell if I'm with a 'fellow newbie' or being trolled. It sucks :(
browndawg has joined #ruby
jollyy has joined #ruby
m0s^away is now known as m0s
Celm has quit [Ping timeout: 265 seconds]
dawkirst has quit [Ping timeout: 265 seconds]
LiohAu has joined #ruby
<depesz>
shevy: :( was hoping for something like a configuration variable :/
m4n1f3st0 has quit []
Xeago_ has quit [Remote host closed the connection]
<shevy>
depesz well your use case is not that common
<shevy>
and IRB has an awful documentation
<shevy>
I use an alias called 'q'
<shevy>
in bash, if I type 'q' (for quit), I actually open irb
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
and in irb, if I type 'q', I exit irb back to bash
<shevy>
so in essence I just toggle between these two
spacemud has joined #ruby
gancl has quit [Quit: No Ping reply in 180 seconds.]
patrick99e99 has quit [Ping timeout: 240 seconds]
gancl has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlad_starkov has joined #ruby
<depesz>
shevy: i'm not sure about it being common or not. the use case is very simple - developers tend to forget about running irb sessions on servers
klaut has joined #ruby
<depesz>
shevy: the irb keeps db connection open.
<depesz>
and it irks me (i'm a dba)
mrnugget has quit [Quit: mrnugget]
<shevy>
I can tell you how common it is - in the last ~8 years here on #ruby, you are the first to have wanted it ;P
<depesz>
:)
<shevy>
irb's configuration can be obtained inside of irb via "conf" or via IRB.conf
jlebrech has joined #ruby
jollyy has quit [Quit: jollyy]
<shevy>
doesn't have a lot of stuff... about 20 lines
jollyy has joined #ruby
<depesz>
yeah :(
shaunbaker has joined #ruby
<agent_white>
G'night folks.
shaunbak_ has joined #ruby
agent_white has quit [Quit: night]
mercwithamouth has joined #ruby
yfeldblum has joined #ruby
_5kg has quit [Ping timeout: 252 seconds]
LiohAu has quit [Quit: LiohAu]
caustic has joined #ruby
JasmeetQA has joined #ruby
caustic has quit [Client Quit]
oneawayman has joined #ruby
shaunbaker has quit [Ping timeout: 265 seconds]
evenix has joined #ruby
_5kg has joined #ruby
<matcouto>
What kind of date type ruby handles when the value of the column in matter is a postgres timestamp?
<shevy>
I am sure this depends on the bindings you use
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
evenix has quit [Ping timeout: 255 seconds]
etqqkoiflwhb_ has quit [Ping timeout: 268 seconds]
abdulsattar has quit [Ping timeout: 255 seconds]
<jhass>
or even the ORM (if any)
<jhass>
matcouto: you can easily find out though, just calll .class on the result
etqqkoiflwhb_ has joined #ruby
<olivier_bK>
how can i remove x index in array ?
<matcouto>
fear enough. thanks jhass shevy
mengu has joined #ruby
DouweM_ has joined #ruby
mansi has quit [Ping timeout: 265 seconds]
koderok has joined #ruby
<jhass>
olivier_bK: Array#delete_at, you should rarely need this operation in ruby though
<olivier_bK>
i try to use it but i cant do that array.delete_at(1,2,3)
VTLob has joined #ruby
<jhass>
no you can't
sk87 has joined #ruby
abdulsattar has joined #ruby
<jhass>
what are you really trying? show your code and the expected result
<olivier_bK>
i need to remove a multiple index in array
<jhass>
why?
jollyy_ has joined #ruby
jollyy has quit [Ping timeout: 255 seconds]
jollyy_ is now known as jollyy
jamto11 has joined #ruby
<matcouto>
What would you guys use as a date type when Timezone is not importnat?! Only the datetime 'yyyy-mm-dd hh:mm:ss' would be enough, since I'm using postgres and it seems not to have a datetime-like
camilasan has quit [Read error: Connection reset by peer]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
depesz: ah, nice term for it (and link), thanks
iamdoo2 has joined #ruby
camilasan has joined #ruby
etqqkoiflwhb_ has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
spyderman4g63 has quit [Ping timeout: 255 seconds]
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
jottr has quit [Read error: Connection reset by peer]
jottr has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
Paradox has joined #ruby
etqqkoiflwhb_ has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
camilasa_ has joined #ruby
dangerousdave has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
iamdoo2 has quit [Ping timeout: 268 seconds]
camilas__ has joined #ruby
camila___ has joined #ruby
camil____ has joined #ruby
mupkoo has joined #ruby
rails426 has quit []
camilasan has quit [Ping timeout: 240 seconds]
cami_____ has joined #ruby
camilasa_ has quit [Ping timeout: 240 seconds]
camilasan has joined #ruby
jollyy has quit [Ping timeout: 268 seconds]
sepp2k has joined #ruby
poikon has quit [Remote host closed the connection]
camilas__ has quit [Ping timeout: 240 seconds]
camilasa_ has joined #ruby
camila___ has quit [Ping timeout: 240 seconds]
gancl has quit [Ping timeout: 265 seconds]
camilas__ has joined #ruby
LetErikTry has joined #ruby
camil____ has quit [Ping timeout: 240 seconds]
camila___ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
mupkoo has quit [Client Quit]
camil____ has joined #ruby
fabrice31 has joined #ruby
cami_____ has quit [Ping timeout: 240 seconds]
cami_____ has joined #ruby
camilasan has quit [Ping timeout: 268 seconds]
camilasan has joined #ruby
camilasa_ has quit [Ping timeout: 268 seconds]
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
camilas__ has quit [Ping timeout: 268 seconds]
momomomomo has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
`MArceLL` has quit [Ping timeout: 246 seconds]
dgfdgf has joined #ruby
camila___ has quit [Ping timeout: 268 seconds]
rudisimo has joined #ruby
dgfdgf is now known as `MArceLL`
poikon has joined #ruby
camil____ has quit [Ping timeout: 268 seconds]
oneawayman has quit [Ping timeout: 255 seconds]
sheepman is now known as calbertuk
nvrch has quit [Quit: nvrch]
cami_____ has quit [Ping timeout: 268 seconds]
calbertuk is now known as sheepman
jollyy has joined #ruby
Celm has joined #ruby
_justin has quit [Quit: _justin]
DouweM_ has quit [Read error: Connection reset by peer]
DouweM has joined #ruby
doodlehaus has joined #ruby
Celm has quit [Ping timeout: 265 seconds]
`MArceLL` has quit [Ping timeout: 246 seconds]
mrnugget has joined #ruby
mikecmpbll has joined #ruby
<jlebrech>
is there a shorthand for raise ...inspect
<jlebrech>
?
<DefV>
raise inspect?
<jhass>
don't debug with raise
andy___ has joined #ruby
andy___ is now known as Guest64140
teddyp1cker has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
* apeiros
only debugs with throw
`MArceLL` has joined #ruby
mark_locklear has joined #ruby
etqqkoiflwhb_ has quit [Quit: Computer has gone to sleep.]
gancl has joined #ruby
jottr has quit [Quit: WeeChat 0.4.2]
maoko has joined #ruby
oo_ has quit [Remote host closed the connection]
skammer has joined #ruby
patrick99e99 has quit [Ping timeout: 265 seconds]
etqqkoiflwhb_ has joined #ruby
etqqkoiflwhb_ has quit [Read error: Connection reset by peer]
eka has joined #ruby
gancl has quit [Client Quit]
etqqkoiflwhb_ has joined #ruby
gancl has joined #ruby
teddyp1cker has joined #ruby
mostlybadfly has joined #ruby
gaussblurinc has quit [Quit: Leaving.]
doodlehaus has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
blueOxigen has quit [Ping timeout: 265 seconds]
JasmeetQA1 has joined #ruby
JasmeetQA1 has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Leaving...]
JasmeetQA has quit [Ping timeout: 268 seconds]
dx7 has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
aliancebloom has joined #ruby
Xeago has joined #ruby
<aliancebloom>
join #rubyonrails
yfeldblum has joined #ruby
mikecmpbll has joined #ruby
spyderman4g63 has joined #ruby
Xeago_ has joined #ruby
yalue has joined #ruby
tvw has quit []
lkba has joined #ruby
petey has joined #ruby
dx7 has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
ndrei_ has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
bluOxigen has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
davedev24 has joined #ruby
popl has quit [Ping timeout: 255 seconds]
gancl has quit [Quit: No Ping reply in 180 seconds.]
petey has quit [Ping timeout: 265 seconds]
gancl has joined #ruby
danshultz has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
mansi has quit [Ping timeout: 265 seconds]
aagdbl has joined #ruby
koderok has quit [Ping timeout: 240 seconds]
doodlehaus has joined #ruby
linojon has joined #ruby
gancl has quit [Ping timeout: 255 seconds]
danshultz has quit [Ping timeout: 265 seconds]
bambuka has joined #ruby
moshee has quit [Read error: Operation timed out]
Paradox has quit [Ping timeout: 265 seconds]
endash_ has joined #ruby
endash_ has quit [Client Quit]
roolo has joined #ruby
bluOxigen has joined #ruby
Advocation has quit [Quit: Advocation]
awkisopen has quit [Ping timeout: 265 seconds]
jlebrech has quit [Quit: Konversation terminated!]
danman_ has joined #ruby
Paradox has joined #ruby
patrick99e99 has joined #ruby
moshee has joined #ruby
rvraghav93 has quit [Ping timeout: 264 seconds]
Frank13760 has joined #ruby
Frank13760 has left #ruby [#ruby]
awkisopen has joined #ruby
ineb has quit [Read error: Connection reset by peer]
benzrf|offline is now known as benzrf
rvraghav93 has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<benzrf>
hej da
patrick99e99 has quit [Ping timeout: 255 seconds]
danshultz has joined #ruby
Beoran has joined #ruby
alexju has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
<j416>
blergh I'll crosspost this from #bundler; sorry: if I need a specific version of a gem (not the latest), would I specify that in Gemfile or the lockfile?
chipotle has joined #ruby
<benzrf>
j416: gemfile
<j416>
thanks
<benzrf>
never edit the lockfile
<benzrf>
in fact deleting it is safe
<j416>
I also just read it in the first FAQ on bundler's site
<j416>
..
dEPy has joined #ruby
<jhass>
I wouldn't say deleting the .lock is safe
<jhass>
it might cause unnoticed updates on the next bundle install
tjr9898__ has quit [Remote host closed the connection]
<j416>
naturally
<pipework>
benzrf: Actually, deleting it isn't 'safe'.
gasbakid has quit [Read error: Connection reset by peer]
<pipework>
Mostly because a lot of people don't really follow SemVer.
<benzrf>
w/e
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
<j416>
what happens if I want to use one version of a gem, and another gem says it's not compatible with that version
banister has joined #ruby
<j416>
does bundler install two versions?
<jhass>
no, then bundle install refuses to run
<j416>
hm
* j416
experiments
<jhass>
since you can't load two versions of a gem simultaneously
Zordrak has joined #ruby
<Zordrak>
Is anyone aware of a yum repository of any repute currently serving ruby-2 packages for RHEL/CentOS?
Sheik` has joined #ruby
* pipework
does not know of such a thing
blueOxigen has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<j416>
jhass: then how come 'bundle update sass' updated sass from 3.1.15 to 3.3.4, even though I have compass saying:
r_rios has joined #ruby
<j416>
compass (0.12.2)
<j416>
chunky_png (~> 1.2)
<Zordrak>
It's not something I can easily understand given all of the equivalents. e.g. IUS provides for needs of upgraded MySQL and PHP; postgresql provide their own yum repo to get the software out there - but there seems no method for ruby provided by anyone
<j416>
fssm (>= 0.2.7)
<j416>
sass (~> 3.1)
<j416>
does that not mean compass declares it's not compatible with anything >= 3.2?
<jhass>
j416: ~> 3.1 says >= 3.1 && < 4
Celm has joined #ruby
<j416>
ooh
bluOxigen has quit [Ping timeout: 265 seconds]
<j416>
so in that case compass is wrong
<jhass>
~> 3.1.0 would say >= 3.1.0 && < 3.2
mikecmpbll has joined #ruby
bluOxigen has joined #ruby
<j416>
because compass doesn't seem to work with 3.3.4
<j416>
ah, thanks
<jhass>
you can work around that for now by adding gem 'sass', '~> 3.1.0' to your Gemfile
sailias has joined #ruby
blueOxigen has quit [Ping timeout: 255 seconds]
dumdedum has quit [Quit: foo]
rmorello has joined #ruby
rvraghav93 has quit [Ping timeout: 264 seconds]
kennym has joined #ruby
Celm has quit [Ping timeout: 265 seconds]
sambao21 has joined #ruby
gancl has joined #ruby
bryanculver has joined #ruby
blueOxigen has joined #ruby
_justin has joined #ruby
<bryanculver>
Is there a way for me to use the Regex shorthand %r{...} but include a string from a variable inside?
<j416>
jhass: how can I say >= 3.1 and < 3.3 ?
<jhass>
bryanculver: sure, you can use #{} inside iirc
<jhass>
j416: you can't but you can say '< 3.3' and the >= will come through the ~> 3.1 that compass has
<jhass>
I think, never actually tried '< x'
nowthatsamatt has joined #ruby
bluOxigen has quit [Ping timeout: 268 seconds]
patrick99e99 has joined #ruby
rvraghav93 has joined #ruby
<j416>
jhass: clever
tkuchiki has joined #ruby
Guest52242 has joined #ruby
m0s is now known as m0s^away
gaussblurinc has joined #ruby
<jhass>
j416: btw. if you can tell your colleagues to never delete the .lock, never run an open bundle update and to not update sass you could just leave the .lock at the working version
rrios has joined #ruby
noop has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
r_rios has quit [Ping timeout: 255 seconds]
cover has joined #ruby
meatherly has joined #ruby
peret has quit []
VinceThePrince has joined #ruby
Deele has joined #ruby
<Zordrak>
Does the ruby community specifically not want EL6 users?
Macaveli has quit [Ping timeout: 252 seconds]
<jhass>
I think the EL6 community specifically does not want ruby users
<tobiasvl>
Zordrak: it's not the ruby community's fault that Red Hat doesn't serve ruby 2.0, is it?
<Zordrak>
tobiasvl: Red Hat provides nothing for anyone.. it's a community effort that covers the rest of software. Most goes into EPEL, but then mosot of the most widely depended upon software provides its own repos; or commmunity comes together to provide a combined repo for groups of similar software. Just about the only thing not covered is ruby.
<AlexRussia>
Hi!How to convert file to utf-8?
<AlexRussia>
text*
VinceThePrince has quit [Client Quit]
<AlexRussia>
in the code
Macaveli has joined #ruby
<j416>
jhass: well we want to bundle update every once in a while
<j416>
better keep it safe
depesz has left #ruby ["WeeChat 0.4.3"]
<tobiasvl>
Zordrak: yes, I see. I've been using RHEL6 at work since it came out, but we're not allowed to use any other external repos than EPEL.
ndrei has joined #ruby
<tobiasvl>
now I'm on Fedora 20 instead and have ruby 2.0 <3
<Zordrak>
tobiasvl: A lot of problems with epel relate to multiple versions; but thats why places like IUS provide a versioning scheme such as "mysql55"
<Zordrak>
I thought someone somewhere might provide either a raw latest ruby or at least ruby20-2.0 and ruby21-2.1 packages - but nothing
yfeldblum has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
Guest64140 has quit [Remote host closed the connection]
<spstarr_work>
hmmmm
<spstarr_work>
can a Ruby module be a 'singleton' also?
andy___ has joined #ruby
<AlexRussia>
hm....
<spstarr_work>
ie, does a Ruby module itself have 'class methods' or module methods?
andy___ has quit [Read error: Connection reset by peer]
<AlexRussia>
jhass: i get some problem with yesterday program
andy___ has joined #ruby
<spstarr_work>
module Foo.....................................self.myModuleMethodMadness .................... ; end ; end ;end Foo.myModuleMethodMadness?
<spstarr_work>
im trying to think what sort of use case you'd use that
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
<jhass>
spstarr_work: yes, a module has, as every other object in ruby, a singleton class on which you can define methods. There's even the module_function shorthand that copies(!) a method to a modules singleton class
tvw has joined #ruby
<AlexRussia>
jhass: hm, i think, problem in parsing telephone....
mansi has joined #ruby
<jhass>
spstarr_work: they're often used for a collection of method that share no state
jaywastaken has joined #ruby
jaywastaken has joined #ruby
rrios has quit [Ping timeout: 268 seconds]
<spstarr_work>
jhass: interesting
jollyy has quit [Quit: jollyy]
r_rios has joined #ruby
jottr has joined #ruby
Guest91050 has quit [Ping timeout: 265 seconds]
timonv has quit [Ping timeout: 268 seconds]
mansi has quit [Ping timeout: 265 seconds]
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Takumo>
Hi all, I'd like to add a tag to my documentation (in YARD), to tag if a method is memoized or not
<Takumo>
(i.e. adding @memoize to the docstring, and applying a label to the method)
<Takumo>
Anyone know if this it built into the memoize gem, or perhaps how I'd add it myself?
zigomir has quit []
browndawg has quit [Quit: Leaving.]
Advocation has joined #ruby
jamto11 has joined #ruby
peret has joined #ruby
meatherly has quit [Remote host closed the connection]
flagg0204_ has quit [Ping timeout: 264 seconds]
meatherly has joined #ruby
brunoro has joined #ruby
tjr9898 has joined #ruby
flagg0204 has joined #ruby
meatherl_ has joined #ruby
meatherly has quit [Read error: No route to host]
jamto11 has quit [Ping timeout: 252 seconds]
<bryanculver>
jhass: That worked perfectly, thanks
maoko has joined #ruby
wchun has joined #ruby
<bryanculver>
Took me forever to test because the server I was connecting to, someone decided to turn off
timonv has joined #ruby
chris_thomson has joined #ruby
Sheik` has quit [Read error: Connection reset by peer]
crystal77 has joined #ruby
garndt has joined #ruby
jzig has quit [Remote host closed the connection]
jzig has joined #ruby
patrick99e99 has joined #ruby
etqqkoiflwhb_ has quit [Quit: Computer has gone to sleep.]
etqqkoiflwhb_ has joined #ruby
tjr9898 has quit [Ping timeout: 264 seconds]
Guest78571 has quit [Remote host closed the connection]
chris_thomson has quit [Client Quit]
brunoro has quit [Ping timeout: 255 seconds]
gfunc has joined #ruby
rm_ has joined #ruby
DeanH has joined #ruby
etqqkoiflwhb__ has joined #ruby
tjr9898 has joined #ruby
gancl has quit [Ping timeout: 255 seconds]
brunoro has joined #ruby
patrick99e99 has quit [Ping timeout: 255 seconds]
_justin has quit [Quit: _justin]
etqqkoiflwhb_ has quit [Ping timeout: 268 seconds]
rm_ has quit [Ping timeout: 255 seconds]
juque has joined #ruby
danman_ has quit [Quit: danman_]
lukec has joined #ruby
gancl has joined #ruby
mansi has joined #ruby
abdulsattar has quit [Read error: Operation timed out]
sk87 has joined #ruby
enebo has joined #ruby
hfp`away has quit [Ping timeout: 245 seconds]
CreativeEmbassy has joined #ruby
Iravan_ has joined #ruby
r0nin has joined #ruby
pu22l3r has joined #ruby
azzz_ has joined #ruby
bambuka has quit [Quit: Saliendo]
hfp has joined #ruby
jprovazn has quit [Quit: Odcházím]
brunoro has quit [Ping timeout: 255 seconds]
azzz_ has left #ruby [#ruby]
klaut has quit [Read error: Connection reset by peer]
klaut has joined #ruby
juarlex has joined #ruby
hfp has quit [Ping timeout: 245 seconds]
lw has joined #ruby
nvrch has joined #ruby
danshultz has quit [Remote host closed the connection]
petey has joined #ruby
danshultz has joined #ruby
afreidah1 has joined #ruby
hfp has joined #ruby
juque has quit [Quit: juque]
SCommette has joined #ruby
chipotle has joined #ruby
duggiefresh has joined #ruby
evenix has joined #ruby
_justin has joined #ruby
m1lt0n_ has quit [Quit: Lost terminal]
chrisseaton has joined #ruby
<jaywastaken>
looking for a clean way to simultaneously select a segment of an array and get rid of those items... e.g. a = [1,2,3,4,5]; b = a.select {|i| i > 2 }; a.reject! {|i| i > 2 };
<spstarr_work>
a constant is supposed to be 'frozen'
<spstarr_work>
by definition its non-changing
kitak has quit [Remote host closed the connection]
<jhass>
for a constant reassignment is discouraged
<jhass>
the object doesn't care what it's assigned to
<Hanmac1>
spstarr_work: even if you can not change to which object an constant is pointing, the object ITSELF can still be changed
<spstarr_work>
wouldn't that mask issues though?
meatherly has quit [Ping timeout: 255 seconds]
joonty has quit [Read error: Connection reset by peer]
<jhass>
spstarr_work: not if you write somewhat sane programs, I mean in ruby you can do stuff like class String; def to_i; to_sym; end; end; and nobody stops you
aagdbl has quit [Quit: This computer has gone to sleep]
<spstarr_work>
every language lets you shoot yourself in foot ;)
<jhass>
ruby doesn't enforce stuff, it just gives you methods to display your intent
<spstarr_work>
so could I do this then
claymore has joined #ruby
<jhass>
for the rare cases where you need to break the intent that's very useful
<spstarr_work>
MyConstant = "HELLO WORLD".freeze
<spstarr_work>
effectively freezing the object
<spstarr_work>
explicitly
alexju has quit [Remote host closed the connection]
<spstarr_work>
yes
<spstarr_work>
that is what you showed me above
kpshek has joined #ruby
<jhass>
yes you could, and I could just do MY_CONSTANT.unfreeze; MY_CONSTANT.replace(...); MY_CONSTANT.freeze; it's still only showing the intent
<spstarr_work>
`<main>': undefined method `unfreeze' for "Hello":String (NoMethodError)
<jhass>
oh, no unfreeze on string, never noticed
<jhass>
that's because actually nobody really uses .freeze in ruby
lxsameer has quit [Quit: Leaving]
<spstarr_work>
but the object should have unfreeze
jollyy has joined #ruby
<jhass>
or let's say it's rather rare to see it
Jetchisel has joined #ruby
chrisseaton has quit []
ce_afk is now known as cescalante
<workmad3>
spstarr_work: if you could unfreeze the object, there wouldn't be much point in freezing it
<spstarr_work>
"Prevents further modifications to obj. A RuntimeError will be raised if modification is attempted. There is no way to unfreeze a frozen object. See also Object#frozen?."
<benzrf>
10:11 < jhass> yes you could, and I could just do MY_CONSTANT.unfreeze; MY_CONSTANT.replace(...); MY_CONSTANT.freeze; it's still only showing the intent
<jhass>
apparently just my imagination
failshell has joined #ruby
<cek>
now JS guys say there are constants in JS
Zai00 has joined #ruby
cek has left #ruby [#ruby]
kpshek has quit []
<spstarr_work>
so then frozen() effectively makes the whole object a constant
<spstarr_work>
or whatever a 'constant object' is called
<jhass>
spstarr_work: anyway, I can still just reassign the constant and ignore the warning ruby gives me on that ;)
r0nin has quit [Remote host closed the connection]
<spstarr_work>
evil
lukec has quit [Quit: lukec]
rvraghav93_ has joined #ruby
<poikon>
immutable object
rvraghav93 has quit [Ping timeout: 268 seconds]
<spstarr_work>
yes
<spstarr_work>
i'd then use frozen for that purpose since I do like knowing that the object will not change no matter what
tylersmith has joined #ruby
SCommette has joined #ruby
patrick99e99 has joined #ruby
juarlex has quit [Remote host closed the connection]
juarlex has joined #ruby
abdulsattar has quit [Ping timeout: 252 seconds]
<spstarr_work>
hmm i need a good ruby editor with code completion, it would help immensely for determining what an object methods are available, vi doesn't cut it ;)
<cocotton>
Hey all. I have this string "recipe[owners::myowner]" and I'm trying to return only the owner name (in this case 'myowner'). I tried <mystring[/::(.*?)\]/>. On online regex tester, it return 'myowner', but when I run it with ruby, it returns '::myowner]'. Anyone knows what I'm doing wrong?
_justin has quit [Quit: _justin]
evenix has quit [Ping timeout: 268 seconds]
<dmead>
hey channel
<dmead>
i'm trying to execute a shell command
<dmead>
that takes a long time
<dmead>
returns alot of text during execution
abdulsattar has joined #ruby
<dmead>
and i don't want to wait for it to finish to see the results
<dmead>
even partial results
<dmead>
is there a gem that does this?
jrendell has quit [Ping timeout: 240 seconds]
<dmead>
i've done it before in php using stream_select and proc_open
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 265 seconds]
bbloom has joined #ruby
renklaf_ has quit [Remote host closed the connection]
sk87 has joined #ruby
Celm has quit [Ping timeout: 265 seconds]
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sputnik1_ has joined #ruby
kennym has quit [Quit: Leaving.]
mark_locklear has quit [Client Quit]
r0nin has joined #ruby
obs has joined #ruby
arietis has joined #ruby
ahawkins has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
sputnik1_ has quit [Client Quit]
lw has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Macaveli has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 252 seconds]
kennym has joined #ruby
_Andres has joined #ruby
fabrice31 has quit [Remote host closed the connection]
okdas has quit [Read error: Connection reset by peer]
<skyofdwarf>
join #chat
kennym has quit [Client Quit]
kennym has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<Mon_Ouie>
Rubeh: Blocks are a syntax construct. You can get an object out of them. That object is called a proc (and lambdas are slightly different procs)
mikepack has joined #ruby
rek2p0wn has joined #ruby
yfeldblum has joined #ruby
<Mon_Ouie>
A closure is something that references ("closes over") variables from the environment. Blocks do do that.
endash_ has joined #ruby
tylersmith has quit [Remote host closed the connection]
poikon has quit [Read error: Connection reset by peer]
poikon has joined #ruby
tylersmith has joined #ruby
danno1 has joined #ruby
Vovko has joined #ruby
kennym has quit [Client Quit]
lw has quit [Quit: s]
kennym has joined #ruby
m4n1f3st0 has joined #ruby
oo_ has joined #ruby
davy_ has joined #ruby
kennym has quit [Client Quit]
kennym has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
tylersmith has quit [Ping timeout: 265 seconds]
bal has quit [Quit: bal]
asteros has joined #ruby
jobewan has joined #ruby
oo_ has quit [Ping timeout: 255 seconds]
Cache_Money has quit [Quit: Cache_Money]
kennym has quit [Client Quit]
kevind_ has joined #ruby
sailias has joined #ruby
senayar_ has quit [Remote host closed the connection]
macmartine has joined #ruby
blueOxigen has quit [Read error: Connection reset by peer]
sputnik1_ has joined #ruby
bluOxigen has joined #ruby
senayar has joined #ruby
doodlehaus has quit [Ping timeout: 240 seconds]
macmartine has quit [Remote host closed the connection]
wallerdev has joined #ruby
lw has joined #ruby
asteros has quit [Quit: asteros]
zarul has joined #ruby
zarul has quit [Changing host]
zarul has joined #ruby
kevind has quit [Ping timeout: 255 seconds]
kevind_ is now known as kevind
sambao21 has quit [Quit: Computer has gone to sleep.]
pietr0 has joined #ruby
jollyy has quit [Quit: jollyy]
tjr9898 has quit [Remote host closed the connection]
axsuul has joined #ruby
jollyy has joined #ruby
ikaros has quit [Quit: Ex-Chat]
chrisseaton has quit []
toastynerd has joined #ruby
sski has joined #ruby
danshultz has quit [Remote host closed the connection]
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
danshultz has joined #ruby
einarj has quit [Remote host closed the connection]
Iravan_ has quit [Remote host closed the connection]
rippa has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
kennym has joined #ruby
danshultz has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
oo_ has joined #ruby
maletor has joined #ruby
oneawayman has joined #ruby
michaeldeol has joined #ruby
x77686d has joined #ruby
maletor has quit [Read error: Connection reset by peer]
<mary5030>
NoMethodError: undefined method `is_primary?' for []:Array
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
<mary5030>
i am a ruby nob still ips have stuff in it, but how i can i check for this empty array inside that code
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia__ has joined #ruby
<pierre___>
git status
<pierre___>
git status
ascarter has joined #ruby
<pierre___>
ho fuck
<pierre___>
sorry
Vovko has quit [Ping timeout: 252 seconds]
<Hanmac1>
mary5030: use each_with_object
Hanmac1 is now known as Hanmac
<shevy>
git fuck, pierre___
m4n1f3st0 has quit []
<pontiki>
mary, you have the sense of parameters backwards. the first one is the ojbect being built, the send is the current item
oo_ has joined #ruby
<mary5030>
oh thanks
<pontiki>
each_with_object puts the in the order you're wanting
rudisimo has quit [Ping timeout: 240 seconds]
crystal77 has quit [Quit: Computer has gone to sleep.]
dstynchula has joined #ruby
<pontiki>
s/send/second/
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cescalante is now known as ce_afk
<benzrf>
somebody email linus to add a fuck subcommand to git
<benzrf>
i bet hed do it
<mary5030>
really how where do i call each_with_object?
ascarter_ has joined #ruby
<pontiki>
i thought someone alreayd did that
LiohAu has joined #ruby
ffranz has quit [Quit: Leaving]
<pontiki>
mary -- each_with_object is on Enumerable, same as inject/reduce
<pontiki>
it just reverses the order of the parameters
browndawg has quit [Read error: Connection timed out]
<pierre___>
pontiki, shevy :)
<pierre___>
git fuck --force
<benzrf>
pierre___: pls dont
<jhass>
mary5030: you want an array that says n times "primary ip is missing" where n is the count of ip.primary_ip? returning false?
whatasunnyday has joined #ruby
browndawg has joined #ruby
<shevy>
pierre___ lol
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ffranz has joined #ruby
whatasunnyday has joined #ruby
<shevy>
there should be a switch for that in reallife
<mary5030>
yes
ascarter has quit [Ping timeout: 265 seconds]
AlexRussia__ is now known as AlexRussia
<mary5030>
jhass: yes
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
browndawg has quit [Max SendQ exceeded]
oo_ has quit [Ping timeout: 268 seconds]
<whatasunnyday>
Hey Everyone, I had a quick question about omniauth. What prevents any arbitary user from posting session create with a fake hash and hijacking a user’s session?
kennym has joined #ruby
AlexRussia has joined #ruby
smathieu has joined #ruby
<shevy>
I hate optionparser so much
<shevy>
end.parse!
<jhass>
mary5030: doesn't seem very useful, though here you go: Array.new(ips.count {|ip| !ip.is_primary? }) { "Primary IP is missing" }
blueOxigen has joined #ruby
<benzrf>
shevy: use thor
tectonic has joined #ruby
hobodave has joined #ruby
<freeone3000>
whatasunnyday: Session tokens are short-lived and the hash has to match. Other than that, nothing.
duggiefresh has joined #ruby
brunoro has joined #ruby
browndawg has joined #ruby
zachallett has quit [Remote host closed the connection]
browndawg has quit [Max SendQ exceeded]
<whatasunnyday>
freeone3000: Is it typical to white list your OAuth provider’s ip address?
fabrice31 has quit [Remote host closed the connection]
<jhass>
mary5030: now tell us about the problem you're solving where you think having such an array would be useful
oo_ has joined #ruby
<freeone3000>
whatasunnyday: OAuth actually provides security over and above that - it hashes the request ID with the content body securely along with a timestamp, and prevents a replay attack.
maletor_ has quit [Quit: Computer has gone to sleep.]
contradictioned_ has quit [Remote host closed the connection]
<mary5030>
i actually dont event want to throw an array so if any primary ip is false i want a message to go to the user may fomrated better than array?
rdark has quit [Quit: leaving]
mansi has quit [Remote host closed the connection]
browndawg has joined #ruby
kennym has quit [Client Quit]
contradictioned has joined #ruby
<freeone3000>
whatasunnyday: It is assumed that the connection between the OAuth provider and your server is secure, which in practice, is very likely.
nomenkun has quit [Remote host closed the connection]
browndawg has quit [Max SendQ exceeded]
mansi has joined #ruby
shadoi has joined #ruby
<shevy>
wow
<freeone3000>
whatasunnyday: And yeah, you need to disable csrf protection for the oauth provider.
mansi has quit [Read error: Connection reset by peer]
<shevy>
does OptionParser automatically respond to --help ?
nomenkun has joined #ruby
<benzrf>
shevy: use thorrrr
<jhass>
mary5030: so you want true/false whether any of the ips is not primary?
<benzrf>
thor is bet
<benzrf>
*ebst
<benzrf>
ugh w/e
<jhass>
mary5030: ips.all?(&:is_primary?)
bluOxigen has quit [Ping timeout: 240 seconds]
<mary5030>
oh this cheks for each ip and if not primary throws error?
<whatasunnyday>
freeone3000: I guess I was just a bit confused because the gem abstracts a lot of the functionality. My code and much of what’s available on the internet makes it seem like you can just post a uid and provider and you would get logged in.
browndawg has joined #ruby
<jhass>
mary5030: it returns falls if any of the ips returns false of is_primary?
User458764 has joined #ruby
<jhass>
*returns false
browndawg has quit [Max SendQ exceeded]
<freeone3000>
whatasunnyday: Yes, essentially. The lib takes care of the nasty bits, but you should read up on OAuth, and whatever version of OAuth2 your provider is using (if they are).
<mary5030>
sweet jhass you are awesome
<mary5030>
:)
rvraghav93 has quit []
chrisseaton has joined #ruby
<shevy>
benzrf well it would be an additional addon
cpruitt has quit [Quit: cpruitt]
<whatasunnyday>
freeone3000: Just to confirm, you didn’t mean “yes, essentially, you only need to post a uid and provider to hijack a session”
<freeone3000>
whatasunnyday: The actual authentication is taken care of on the client-side.
Jetchisel has quit [Ping timeout: 240 seconds]
<whatasunnyday>
freeone3000: I’m using GitHub. I’ll investigate it more. It is interesting.
<freeone3000>
whatasunnyday: So with a uid and a provider, the user can "hijack" the session to get to (for example) the facebook login page for the user.
<benzrf>
shevy: thor tho
CreativeEmbassy has quit [Quit: FO SHO]
oo_ has quit [Ping timeout: 265 seconds]
f0ster has joined #ruby
<freeone3000>
whatasunnyday: Unless the hijacker also knows the user's facebook username and password, you won't ever get a callback from facebook.
browndawg has joined #ruby
nerocrux has quit [Remote host closed the connection]
ascarter_ has quit [Ping timeout: 265 seconds]
<whatasunnyday>
freeone3000: I see. I was concerned that the user wouldn’t get access to their facebook but rather if any data is stored on my server.
nerocrux has joined #ruby
<freeone3000>
whatasunnyday: Oh, you mean if they steal a valid user OAuth token?
Jetchisel has joined #ruby
cpruitt has joined #ruby
<Rubeh>
Mon_Ouie: thanks
tjr9898 has quit [Remote host closed the connection]
<freeone3000>
whatasunnyday: A fully-validated OAuth token is usually kept hidden from the user, but yes, this can be used for impersonation. Expiry is usually on the order of hours for this reason.
shaunbak_ has quit [Remote host closed the connection]
mansi has joined #ruby
rvraghav93 has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
<whatasunnyday>
freeone3000: No, not that. So suppose a user is created in my db. What I’m afraid is someone will get their uid (trivial) and provider, and post a well formed hash to session create and get access to that session.
Olipro has joined #ruby
<whatasunnyday>
freeone3000: I’m doing pretty much what’s in the railscast video on Omniauth if you’re familiar with it. It checks if a user exists with that uid and provider or creates a new one.
x77686d has quit [Quit: x77686d]
<whatasunnyday>
freeone3000: Also, GitHub tokens never expire :'(
lkba has quit [Ping timeout: 255 seconds]
tjr9898 has joined #ruby
mansi has quit [Remote host closed the connection]
asteros has joined #ruby
<freeone3000>
whatasunnyday: It takes care of token validation. It's important to know how it works, so you know the weaknesses.
petey has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
<freeone3000>
whatasunnyday: But without a valid github oauth token, omniauth will not recognize the user as logged in via github.
jespada has quit [Quit: Leaving]
<whatasunnyday>
freeone3000: Agreed.
petey has joined #ruby
Voodoofish430 has quit [Read error: Connection reset by peer]
kennym has joined #ruby
<freeone3000>
whatasunnyday: So the user needs to know 1) the user id, 2) that it's provided by github, and 3) the valid github oauth token. And yes, it's kinda terrible that github tokens never expire.
_maes_ has joined #ruby
maletor has joined #ruby
<freeone3000>
whatasunnyday: They generally can't get #3 without either the user's login to github, or an unsecured communication with a server which requires the github oauth token. So keep yours secure.
Voodoofish430 has joined #ruby
<freeone3000>
whatasunnyday: Tokens are issued per-application (each application on an account has a separate token), so even if users compromise one of their oauth tokens, if it isn't approved for your app, it won't work.
<whatasunnyday>
freeone3000: Yeah, i’m operating over SSL so it should hopefully be no issue. Do you know how Omniauth validates the github token? I have it stored in my db but I never tell it.
shadoi1 has joined #ruby
maroloccio has joined #ruby
asteros has quit [Client Quit]
asteros has joined #ruby
chrisseaton has quit [Read error: Connection reset by peer]
juarlex has quit [Remote host closed the connection]
mansi has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 255 seconds]
petey has quit [Read error: Connection reset by peer]
<benzrf>
Mon_Ouie: hey, I think the reason multiple remote-pries fail is because you're taking over global streams for each instance
<benzrf>
Mon_Ouie: any chance you could do it individually for each or something
koderok has joined #ruby
Emmanuel_Chanel has joined #ruby
workmad3 has joined #ruby
brunoro has quit [Ping timeout: 265 seconds]
Tamae has joined #ruby
kamoricks has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freeone3000 has quit [Disconnected by services]
kamoricks is now known as freeone3000
<freeone3000>
whatasunnyday: By asking github if it's valid, basically. There's a challenge/response handshake to convert a user-auth token to an application-auth token (this is what you get from oauth).
mansi has quit [Remote host closed the connection]
<freeone3000>
whatasunnyday: Operations on github generally require this key.
jollyy has joined #ruby
mansi has joined #ruby
timonv has quit [Remote host closed the connection]
x77686d has joined #ruby
saarinen has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
hamakn has quit [Remote host closed the connection]
jollyy has quit [Client Quit]
m4n1f3st0 has joined #ruby
whatasunnyday has quit [Quit: whatasunnyday]
oo_ has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
whatasunnyday has joined #ruby
saarinen has quit [Client Quit]
browndawg has quit [Read error: Connection timed out]
kennym has quit [Quit: Leaving.]
mansi has quit [Ping timeout: 255 seconds]
jollyy has joined #ruby
Dr3amc0d3r has quit [Ping timeout: 240 seconds]
whatasunnyday has quit [Client Quit]
ce_afk is now known as cescalante
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
I hate bugs
<crome>
:DD
oo_ has quit [Ping timeout: 255 seconds]
subbyyy_ has joined #ruby
axl_ has joined #ruby
<crome>
then stop developing them!
browndawg has joined #ruby
saarinen has joined #ruby
olivier_bK has quit [Read error: Operation timed out]
<shevy>
well
<shevy>
it's sometimes hard to know about them
axl_ has quit [Client Quit]
siwica has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
<shevy>
I made a small chance to my IRC client, which also as a side-effect appended a '.' character to the nick (ok, this was my bug, no question). But the whole thing could no longer connect to IRC altogether, it said: "Erroneous Nickname"
<shevy>
*change, not chance
<shevy>
I did not even know that irc nicks may not include a '.' character
zachallett has joined #ruby
wallerdev has joined #ruby
<shevy>
:\
tylersmith has joined #ruby
Jetchisel has quit [Ping timeout: 252 seconds]
chipotle_ has quit [Ping timeout: 255 seconds]
oneawayman has quit [Read error: Connection reset by peer]
<spstarr_work>
i know you can have setter/getter methods for instantiated instances of a class, but you can also have setter/getters for the 'real class'
RTG` has quit []
dkamioka has quit [Ping timeout: 265 seconds]
abdulsattar has quit [Ping timeout: 265 seconds]
okdas has joined #ruby
<benzrf>
spstarr_work: the 'real class' is the singleton class
etqqkoiflwhb__ has quit [Ping timeout: 255 seconds]
<xybre>
spstarr_work: Classes are instances too. So the "class instance variable" is different, in a different object, than the normal instance variable.
toastynerd has joined #ruby
<dstynchula>
I've got classes and methods, I thought I would be able to run the methods with class.method()
<spstarr_work>
but if i print that twice it returns 30 both times
<xybre>
spstarr_work: You are correct that MyClass.foo, foo is a class method.
pel_daniel has joined #ruby
<xybre>
spstarr_work: Yes, and?
<spstarr_work>
so thats the same object
<spstarr_work>
or i think it is if i check the ID #
<xybre>
spstarr_work: The singleton will return the same object?
<xybre>
Why wouldn't it?
mrnugget has joined #ruby
moted has quit [Ping timeout: 245 seconds]
<spstarr_work>
puts MyClass.foo ; puts MyClass.foo are both the same object
<xybre>
spstarr_work: OF course
etqqkoiflwhb__ has joined #ruby
<xybre>
spstarr_work: Ah, sorry, fixnums are singletons. try using a string.
GodPuppet has joined #ruby
<spstarr_work>
ahhh
osvico has quit [Read error: Connection reset by peer]
<jhass>
spstarr_work: classes are instances of the class Class, so class definitions are objects too
<spstarr_work>
so numbers change things?
<xybre>
spstarr_work: change what things?
<spstarr_work>
MyClass.foo = 30
<spstarr_work>
vs MyClass.foo = "Hello World"
osvico has joined #ruby
jamto11 has quit [Remote host closed the connection]
nerocrux has quit [Quit: Leaving...]
<xybre>
spstarr_work: numbers are singletons, always, instead of instances. So every 400 is the same object.
GodPuppet has quit [Read error: Connection reset by peer]
<jhass>
for that you'd need to define them as class methods using def self.install etc. _or_ make a new instance of your class first: mdadm = Mdadm.new; mdadm.install
m0s is now known as m0s^away
Azulinho has quit [Ping timeout: 255 seconds]
s3ri0us has joined #ruby
shadoi has quit [Quit: Leaving.]
<dstynchula>
so I need to include 'self' in the method definition?
Houl has quit [Ping timeout: 255 seconds]
<jhass>
I gave you two ways
<jhass>
which one you go is your decision
<dstynchula>
ah _or_
<dstynchula>
got it
<dstynchula>
:_
<dstynchula>
:)
<dstynchula>
thank you for your help!
<pierre___>
wow
<pierre___>
so weekend
<pierre___>
amazing
<pierre___>
no work
petey has joined #ruby
poikon has quit []
<pierre___>
a lot of beer
<pierre___>
so cool
<pierre___>
incredible
<pierre___>
.. good by guys
mansi has joined #ruby
<gizmore>
wait
<pierre___>
me ?
<gizmore>
beer without irc is sin
<pierre___>
wow
<pierre___>
waiting
<gizmore>
now you can go
patrick99e99 has quit [Ping timeout: 252 seconds]
<pierre___>
sin ?
<pierre___>
sorry i speak really bad english ?
<gizmore>
yes... beer should be drank while coding
<pierre___>
wow english
<pierre___>
so not french
bricker_ has joined #ruby
<pierre___>
beer JUST should be drank
<pierre___>
that's all
<pierre___>
more is less
chichou has quit [Remote host closed the connection]
<gizmore>
that´s a nice generalization!
<gizmore>
i´ll adopt that
<slash_nick>
i'll drink to that
<pierre___>
yeah
<pierre___>
.. fuck, i'm still here
<pierre___>
let's goooo !
<pierre___>
so you
<pierre___>
see you*
shadoi has joined #ruby
acrussell has quit [Quit: Leaving.]
whatasunnyday has joined #ruby
pierre___ has quit [Quit: Lost terminal]
bricker has quit [Ping timeout: 255 seconds]
senayar has quit [Remote host closed the connection]
pfg has joined #ruby
senayar has joined #ruby
whatasunnyday has quit [Client Quit]
mansi has quit [Ping timeout: 255 seconds]
jespada has quit [Quit: Leaving]
alvaro_o_ has joined #ruby
benzrf is now known as benzrf|offline
circuit has joined #ruby
itadder has joined #ruby
jlast has quit [Remote host closed the connection]
CreativeEmbassy has joined #ruby
elaptics is now known as elaptics`away
x77686d_ has joined #ruby
x77686d has quit [Ping timeout: 265 seconds]
x77686d_ is now known as x77686d
Zai00 has quit [Quit: Zai00]
Foo1 has quit [Remote host closed the connection]
jonatasdp has quit [Remote host closed the connection]
northfurr has quit [Ping timeout: 240 seconds]
bricker_ is now known as bricker
sambao21 has quit [Ping timeout: 268 seconds]
heftig has quit [Quit: Quitting]
jlast has joined #ruby
f0ster has quit [Changing host]
f0ster has joined #ruby
sambao21 has joined #ruby
gigetoo has quit [Remote host closed the connection]
itadder has quit [Remote host closed the connection]
rvraghav93_ has quit [Remote host closed the connection]
gigetoo has joined #ruby
mattmcclure has joined #ruby
rvraghav93 has joined #ruby
skyjumper has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 240 seconds]
noodman has quit [Quit: noodman]
User458764 has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 265 seconds]
aspires has quit []
aspires has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<gizmore>
Is there a way to tell if an object is a classobject, like object < ClassDefinition?
chichou has joined #ruby
eka has joined #ruby
<jhass>
gizmore: .is_a? Class
<gizmore>
jhass: thank you
olivier_bK has joined #ruby
<Hanmac>
gizmore: object.is_a?(ClassDefinition) or object.is_instance_of?(ClassDefinition) or ClassDefinition === object
banister has quit [Ping timeout: 268 seconds]
banister_ has joined #ruby
<gizmore>
Hanmac: i think my question was a bit rough, and jhass answered it... i wanted to check if it´s an instance or a class
<gizmore>
if it´s an instance i would use instance.class, else just the param, thx
lkba has joined #ruby
<jhass>
you should use "foo".is_a? String too, not "foo".class == String
tjr9898 has joined #ruby
kobain_ has quit []
<Hanmac>
or better dont test for class, check for methods like object.respond_to?(:each)
spicerack has joined #ruby
banister_ has quit [Client Quit]
<shevy>
anyone of you has some guide how many @ivars should be used per given class?
spicerack has quit [Client Quit]
<jhass>
not too many
afex has quit [Ping timeout: 255 seconds]
<f0ster>
shevy: why would that be a quantifiable thing?
<Hanmac>
shevy: when you dont have any meanful names anymore ... then you have to much ;P
<f0ster>
it's qualitative.. really it should only be limited by proper OOP design
jollyy has joined #ruby
m4n1f3st0 has quit []
shadoi has quit [Quit: Leaving.]
reset has joined #ruby
jlast has quit [Read error: Connection reset by peer]
jlast_ has joined #ruby
<shevy>
f0ster so what exactly is "proper OOP design" as a qualitative statement?
<f0ster>
How could the answer to that question ever be quantitative vs qualitative?
<shevy>
jhass yeah, that's about the only guide I found so far
<f0ster>
it just depends on your OOP design
m4n1f3st0 has joined #ruby
tgkokk has joined #ruby
<gizmore>
shevy: as much as you need :P
<jhass>
shevy: low coupling and strong cohesion mainly, there probably isn't much beyond that's measurable, and these are hard enough to measure already
jamto11 has joined #ruby
jollyy has quit [Client Quit]
Shidash has quit [Ping timeout: 265 seconds]
<toretore>
counting instance variables is meaningless. you use as many as is required
<gizmore>
shevy: if you feel that somewhat is a bit horrible in your code, you probably have to refactor a bit :)
<toretore>
quantifying "good code" is not possible
Azulinho has joined #ruby
reset has quit [Read error: Connection reset by peer]
jollyy has joined #ruby
<toretore>
just like the "5 lines per method" bs
CaptainJet has joined #ruby
<shevy>
or one method per class
Xeago has joined #ruby
<gizmore>
toretore: imo good code has less than 1000 lines per file (200 is a good loc per file to me), but that´s just me
<RubyPanther>
shevy: I'd be more worried about how many ivars I used in a method and if I'm doing more than one thing, rather than what the class has
klaut has quit [Remote host closed the connection]
<toretore>
there is no number that meaningfully represents "good design"
sailias has joined #ruby
dkamioka has joined #ruby
chichou has quit [Read error: Connection reset by peer]
freezey_ has quit [Remote host closed the connection]
chichou has joined #ruby
<RubyPanther>
Good OO design has the number of things a class does depending entirely on the problem domain; it is subjective and any objective analysis should be from the perspective of the subject that is being modeled
freezey has joined #ruby
x77686d has quit [Quit: x77686d]
blackmesa has joined #ruby
spstarr_work has quit [Quit: bye :)]
<RubyPanther>
Way more likely is non-OO reasons for having too many attributes, for example if your implementation creates a db column for every attribute
<toretore>
how is it objective if it is from the perspective of the subject?
s3ri0us has quit [Quit: leaving]
Vovko_ has quit []
fabrice31 has joined #ruby
<RubyPanther>
toretore: Are you joking?
<toretore>
yes
dkamioka_ has quit [Ping timeout: 255 seconds]
AMcP has quit [Remote host closed the connection]
aspires has quit []
doodlehaus has joined #ruby
AMcP has joined #ruby
<toretore>
but "from the perspective of [a] subject" is pretty much the definition of subjective
<RubyPanther>
Right
brunoro has quit [Ping timeout: 255 seconds]
s3ri0us has joined #ruby
peret has quit [Read error: Connection reset by peer]
<RubyPanther>
Objectively, the subjective perspective of a particular part of the system is to be given priority
x1337807x has joined #ruby
axl_ has joined #ruby
aspires has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Houl has joined #ruby
Advocation has quit [Quit: Advocation]
<RubyPanther>
Just like a doctor might use an objective measure of health, but still have the analysis based on the subjective quality of life concerns of the patient. Using the correct source of subjectivity is part of the objective goal
<toretore>
well, i do object-oriented programming, so everything i do is objective
<toretore>
that's what that means, right?
<shevy>
oh man
maasha has joined #ruby
spicerack has joined #ruby
smathieu has quit [Remote host closed the connection]
skyjumper has joined #ruby
<RubyPanther>
Luckily OOP is a noun, or we'd be screwed right there lol
smathieu has joined #ruby
petey has quit [Read error: Connection reset by peer]
<gizmore>
oop is just a technique to encapsulate functional code better :P
<toretore>
what's the objective of your analysis here?
fabrice31 has quit [Ping timeout: 252 seconds]
tfittsy has quit [Ping timeout: 265 seconds]
petey has joined #ruby
tfittsy has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jottr has quit [Read error: Connection reset by peer]
banister has joined #ruby
m0s^away is now known as m0s
jottr has joined #ruby
sailias has quit [Quit: Leaving.]
benzrf|offline is now known as benzrf
MattStra_ has joined #ruby
<benzrf>
friend of mine sez: 'steve ballmer is the rms of proprietary software'
mansi has joined #ruby
aspires has quit []
<toretore>
seems about right
<freeone3000>
Being motivated by profit isn't really the same thing. People LIKE money.
<crome>
I like money
<freeone3000>
Being motivated by the free exchange of information at the expense of money makes you a little weird.
smathieu has quit [Remote host closed the connection]
<toretore>
or a hero
smathieu has joined #ruby
<benzrf>
freerobby: nonsense, rms is the normallest person i know
sputnik1_ has joined #ruby
<f0ster>
benzrf: as in root mean square ?
<RubyPanther>
benzrf: It sounds right, but I'm not really sure... I've never figured out what Ballmer does though
sputnik1_ has quit [Max SendQ exceeded]
Es0teric has joined #ruby
<benzrf>
bbl
<f0ster>
i was always under the impression he was a brand personality
<toretore>
chief shouting officer
<freeone3000>
RubyPanther: Project managers are a bit like producers on a movie set.
sputnik1_ has joined #ruby
<RubyPanther>
my image is that useless office assistant they showed him as in the movie Pirates of Silicon Valley
tgkokk has quit [Remote host closed the connection]
s3ri0us has quit [Quit: leaving]
benzrf is now known as benzrf|offline
sputnik1_ has quit [Max SendQ exceeded]
sambao21 has joined #ruby
<f0ster>
lol toretore
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sputnik1_ has joined #ruby
tgkokk has joined #ruby
aspires has joined #ruby
s3ri0us has joined #ruby
<RubyPanther>
freeone3000: omg talk about a nightmare image
davy_ has quit [Remote host closed the connection]
sputnik1_ has quit [Client Quit]
dkamioka has quit [Remote host closed the connection]
lw has joined #ruby
sputnik1_ has joined #ruby
ndrei has joined #ruby
sputnik1_ has quit [Max SendQ exceeded]
lw has quit [Client Quit]
mrnugget has quit [Quit: mrnugget]
sputnik1_ has joined #ruby
dkamioka_ has joined #ruby
<RubyPanther>
I think the media equivalent of a project manager is the director, the producer is the client or VP or whoever asked for the project
x77686d has joined #ruby
_reset has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
sepp2k1 has joined #ruby
m4n1f3st0 has quit []
freezey has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
sepp2k has quit [Ping timeout: 255 seconds]
sputnik1_ has quit [Client Quit]
freezey has joined #ruby
bynaryshef has quit []
Shidash has joined #ruby
BuSerD has joined #ruby
browndawg has left #ruby [#ruby]
juarlex has joined #ruby
noop has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby
davy_ has joined #ruby
jenrzzz has joined #ruby
Bounga has quit [Quit: Bounga]
freezey has quit [Ping timeout: 240 seconds]
benzrf is now known as benzrf|offline
ndrei has quit [Ping timeout: 265 seconds]
freezey has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
petey has quit [Remote host closed the connection]
geopet has quit []
m4n1f3st0 has joined #ruby
doodleha_ has joined #ruby
petey has joined #ruby
mehlah has quit [Quit: Leaving...]
osvico has quit [Read error: Connection reset by peer]
diegoviola has quit [Read error: Connection reset by peer]
<maasha>
freeone3000: alas, output order is important.
mven has quit [Max SendQ exceeded]
michaeldeol has joined #ruby
teddyp1cker has quit [Read error: Connection timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
mven has joined #ruby
<maasha>
(0 ... 10).feach(processes: 2) { |i| puts "#{i}" } # <- out of sync
zachallett has quit [Remote host closed the connection]
aspires has quit []
Guest95140 has joined #ruby
zachallett has joined #ruby
<maasha>
(0 ... 10).feach(processes: 2) { |i| "#{i}" } # <- in sync but puts is hardcode in the feach method.
benzrf is now known as benzrf|offline
<freeone3000>
maasha: If output order is important, you have an implicit run-order dependency on n-1 for n.
_justin has joined #ruby
teddyp1cker has joined #ruby
<freeone3000>
maasha: This means that the most efficient execution path for your code is single-threaded.
<RubyPanther>
maasha: if all that matters is the output order and not the processing order, you can just include a sequence number with your results
iceden has joined #ruby
m4n1f3st0 has quit []
Guest95140 has left #ruby [#ruby]
ndrei has joined #ruby
<maasha>
freeone3000: nah, that can't be right. If I cache and sort the results from heavy tasks run in separate processes I should save a lot of time in most cases.
s3ri0us has quit [Quit: Lost terminal]
<freeone3000>
maasha: Not if they always have to run in the same order.
afex has joined #ruby
<maasha>
RubyPanther: I have a sequence number, but getting it to with with a Ruby style syntax is a bit different.
arietis has quit [Quit: Computer has gone to sleep.]
smathieu has quit [Remote host closed the connection]
<RubyPanther>
maasha: I'm not sure that makes any sense
<maasha>
freeone3000: The jobs can run in any order, the results should be in sync, though.
smathieu has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maasha>
RubyPanther: This I would consider Ruby style syntax: (0 ... 10).feach(processes: 2) { |i| puts "#{i}" } - but that invocation I fail to get working in sync.
GaryOak_ has quit [Remote host closed the connection]
Shidash has joined #ruby
<freeone3000>
maasha: That parallelizes the counting, doesn't it?
<RubyPanther>
maasha: No, in Ruby you would be creating objects that keep track of things like sequence number. What you're doing is procedural programming, which is Perl style.
<freeone3000>
maasha: You want the opposite of that. Your task is already paralleized. It needs to output not to console, but to an in-memory buffer.
hiall has quit [Ping timeout: 255 seconds]
<maasha>
freeone3000: yes
AlexRussia has quit [Read error: Connection reset by peer]
m4n1f3st0 has joined #ruby
<RubyPanther>
And good Perl is awful Ruby
<maasha>
freeone3000: which is what the (0 ... 10).feach(processes: 2) { |i| "#{i}" } does
AlexRussia has joined #ruby
<freeone3000>
maasha: No.
<maasha>
But that is relying on what the block returns. Not good enough :/
doodleha_ has quit [Read error: Connection reset by peer]
gancl has quit [Ping timeout: 240 seconds]
<freeone3000>
maasha: The processes need to send the output to the parent. The parent needs to output the results in order.
doodlehaus has joined #ruby
fannye has quit [Read error: Connection reset by peer]
<maasha>
freeone3000: I am doing that.
<freeone3000>
maasha: Not with that code, you aren't.
wallerdev has quit [Quit: wallerdev]
<maasha>
freeone3000: well, I am not sending the puts output to the parent, but the return value of the block.
<freeone3000>
maasha: Right, and if your code evaluated to the return value, feach synchronization would be sufficient. It doesn't, so it's not.
thesheff17 has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Affix has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby
m0s is now known as m0s^away
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maasha>
freeone3000: well, puts return nil and that is not much help. I am clearly missing something
freezey has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
<freeone3000>
maasha: Your tasks need to not puts.
crystal77 has quit [Remote host closed the connection]
<hfp>
Hi guys! Tell me, how does Array#shuffle work? Does it shuffle the elements at random or does it keep track of what it did and each new call to shuffle results in a different and new combination? If so what happens when all combinations have been exhausted? Does it roll over?
<xybre>
hfp: it doesn't keep track
kennym has quit [Quit: Leaving.]
Astralum has joined #ruby
<hfp>
xybre: Right, so running shuffle 10 times doesn't guarantee I'll get 10 different combinations?
sk87 has joined #ruby
<hfp>
by different I mean unique
nanoyak has joined #ruby
<jhass>
it doesn't guarantee, but it's not too likely
<jhass>
if you need the guarantee build the permutations, shuffle the result and consume the first n items
<maasha>
freeone3000: but what if it was not puts, but something similar - I am aiming for something as generic as possible
mary5030 has quit [Ping timeout: 255 seconds]
<bilbo_swaggins>
hfp
CreativeEmbassy has quit [Quit: FO SHO]
<maasha>
freeone3000: I am relunctant to harvest unknowns from stdout
<freeone3000>
maasha: You cannot write to an outputstream in a task to be executed in parallel if you want the writes to said output stream to be in a particular order.
<hfp>
xybre: This is the most annoying thing and the most awesome thing about Ruby. There is always a method to do it for you!! You spend time writing a function and when you're done you discover there's a method for that. It should be Ruby's catchphrase. "Ruby. There's a method for that."
<bilbo_swaggins>
could I interest you in an algorithm I created (haven't seen elsewhere at least) to generate the nth permutation of an array, without precomputing permutations 1..(n-1)?
pixleight has joined #ruby
<hfp>
bilbo_swaggins: Sure
pixleight has left #ruby [#ruby]
lw has joined #ruby
<bilbo_swaggins>
you could make sure you have unique keys and generate a bunch of permutations super fast
CreativeEmbassy has joined #ruby
<maasha>
freeone3000: Hm, the parallel gem gets it right.
<freeone3000>
maasha: Meaning what, it always executes your tasks in a certain order?
afex has quit [Ping timeout: 255 seconds]
geopet has joined #ruby
sambao21 has joined #ruby
centrx has joined #ruby
<xybre>
hfp: I had the same experience when I was new. I would come in here and be like "I wanna do this thing." and they'd be like "Did you try foo.this_thing?" and I'd go away red faced.
<xybre>
hfp: I have a solution btw. There might be better ones, but I got the test to pass.
<maasha>
freeone3000: meaning that it parallelizes tasks and output in correct order with puts (double checking that)
rurban has quit [Ping timeout: 240 seconds]
<bilbo_swaggins>
which is why I downloaded the whole ruby doc archives for offline perusing
<freeone3000>
maasha: I suppose you *could* reassign the input and output streams, and then re-order them.
<freeone3000>
maasha: But this assumes you know what streams you're going to use ahead of time.
ndrei has joined #ruby
razrunelord has joined #ruby
<hfp>
bilbo_swaggins: What's your solution? I hate these kind of questions because I suck at maths :/
<maasha>
freeone3000: yeah, and that is a mess. I am quite sure Parallel doesn't do that - some other magic must be called
<RubyPanther>
Or, you could just use Ruby and OOP instead of a procedural mess that should be written in Perl or another language that in designed for Procedural
<bilbo_swaggins>
the idea is basically related to this
<jhass>
.to_a because ruby 1.9.3, not needed for 2.0
<bilbo_swaggins>
If I knew how to use lazy evaluation, I'd say there'd be a solution to hfp's problem using a lazy construction of an endless array of permutations of an array, at each step removing non-unique ones
<bilbo_swaggins>
it would be slow, but a one-liner
<freeone3000>
maasha: 256.
Shidash has quit [Ping timeout: 265 seconds]
x77686d has quit [Quit: x77686d]
<maasha>
freeone3000: I never understood that with_instrumentation method
<xybre>
jhass: chars is better than my split :D
<hfp>
jhass: I don't get your map block, why is it required?
<freeone3000>
maasha: Runs the on-start method, runs the block, runs the on-end method. Workers were created at line 284.
oso|away is now known as oso96_2000
<freeone3000>
maasha: Lines 288 and 289 are also fun when you realize that work_on_threads also uses workers.
<xybre>
hfp: Because otherwise it'd return an array of arrays of strings. :D
<hfp>
jhass: I see, thanks
blackmesa has quit [Ping timeout: 268 seconds]
<maasha>
freeone3000: well, I did borrow ideas from Parallel - those I could understand :o)
thesheff17 has joined #ruby
IceDragon has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<hfp>
I'm still very concerned re my ability to become a good developer if problems like these bother me. I hate solving abstract math stuff with programming.
<shevy>
man
<bilbo_swaggins>
you don't need math for web development
WanderingGlitch has joined #ruby
<shevy>
can't you stop worrying about math
<jhass>
hfp: how long are you programming?
<bilbo_swaggins>
but yeah you need it for anything I find interesting
<bilbo_swaggins>
you only need as much math as applies to the problem domain
Musashi1 has joined #ruby
<hfp>
jhass: About 10 years in and out as a hobby. My things work but for sure there must be a better way to write it.
<xybre>
hfp: the great thing about programming is that you just have to step logically through the problem - once - and then you put it in a library so you never have to do it again!
<bilbo_swaggins>
and the greater thing about programming is those libraries likely exist already
YamakasY has quit [Remote host closed the connection]
<bilbo_swaggins>
however, knowing how to use them still requires a conceptual understanding of the problem domain a lot of the time
smathieu has quit [Remote host closed the connection]
<hfp>
jhass: The thing is I'm considering a career change as a developer and I'm worried I don't have what it takes on the theoretical/maths front
smathieu has joined #ruby
<bilbo_swaggins>
you need some of each, but not really everything
<bilbo_swaggins>
this is coming from someone who's really into both
<jhass>
hfp: hm after ten years you still confuse implementing (and inventing) algorithms with building good software?
<Xeago>
hfp: I found a crypto course very exciting
<bilbo_swaggins>
don't take crypto
<maasha>
ffr
<bilbo_swaggins>
it's useless to you
<bilbo_swaggins>
and you don't like math
<Xeago>
it doesn't require intensive math to get started with but if you like security/cryptography it is cool
<xybre>
hfp: I'm not a maths head. Don't think of it as math, its not, its logic.\
<bilbo_swaggins>
learn about algorithm analysis, complexity, P/NP
<Xeago>
bilbo_swaggins: cryptography does not mean abstract math!
<bilbo_swaggins>
BS
<Xeago>
an abbreviation for your nickname
patrick99e99 has joined #ruby
<bilbo_swaggins>
X
nomenkun has joined #ruby
<maasha>
freeone3000: I fail to see any redirection of stdout still :o( - and I don't get options[:start] in the with_instrumentation method - that option is set where?
lmickh has quit [Ping timeout: 255 seconds]
<freeone3000>
maasha: In options.
nanoyak has joined #ruby
dkamioka has joined #ruby
<maasha>
I search for :start and nothing pops up
<freeone3000>
maasha: You *do* see line 288, "child_read, parent_write = IO.pipe" ?
<maasha>
freeone3000: yes
subbyyy_ has quit [Ping timeout: 255 seconds]
AMcP has quit [Remote host closed the connection]
Aquilo_ has quit [Ping timeout: 265 seconds]
rabeldable has joined #ruby
skaflem has quit [Quit: This computer has gone to sleep]
<maasha>
freeone3000: oooh. that is what you meant by worker used in threads.
nopolitica has joined #ruby
<maasha>
darn, that was sneaky
benlieb has joined #ruby
LiohAu has joined #ruby
asteros has joined #ruby
LiohAu has quit [Client Quit]
<freeone3000>
maasha: Okay. Then line 291 does a UNIX fork(), which clones the fds. If it's a child, it closes the parent_write and parent_read, and then process_incoming_jobs. If it's a parent, it returns a new worker with that pid.
<bilbo_swaggins>
hfp more to the point, if you've been programming 10 years, you're probably fine
dkamioka_ has quit [Ping timeout: 240 seconds]
<bilbo_swaggins>
I didn't go to school. Only been doing this a couple years.
<bilbo_swaggins>
Learn what you need or want to
olivier_bK has quit [Ping timeout: 246 seconds]
<bilbo_swaggins>
As it comes
Dreamer3 has quit [Quit: Leaving...]
SCommette has quit [Quit: SCommette]
patrick99e99 has quit [Ping timeout: 265 seconds]
quatron has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
nomenkun has quit [Ping timeout: 268 seconds]
m4n1f3st0 has quit []
<RubyPanther>
benlieb: somebody else on the internet with a similar problem solved it with brew link readline --force
<shevy>
you never went to school?
<hfp>
Not for CS
<RubyPanther>
hfp: You will not use theoretical maths as taught in school
<benlieb>
RubyPanther: I'll be damned
<benlieb>
that worked.
<maasha>
freeone3000: I have the same in my gist line 61 & 62
DrShoggoth has joined #ruby
YamakasY has joined #ruby
<RubyPanther>
What is 3 months of math in school, is 30 minutes understanding how to use the methods in the math library
<benlieb>
Do you know what that is about? It seems my upgrade killed a bunch of brew things. Is there a way to just fix all of that at once
Aquilo has joined #ruby
sambao21 has joined #ruby
<benlieb>
RubyPanther: ^
<RubyPanther>
which is to say, it is EASY to learn how to use calculus methods. You do NOT need to be able to do them with paper and pencil to use them in your programs.
toastynerd has joined #ruby
<RubyPanther>
benlieb: No idea, I avoid proprietary OSes
YamakasY_ has joined #ruby
<bilbo_swaggins>
RubyPanther: you don't need calculus unless you're simulating physics or some other obscure purposes
<bilbo_swaggins>
you DO need graph theory
<RubyPanther>
Statistics, you might want to take a free online course though, there is a bit more to it, but thankfully you only need a few weeks, not the year or two it takes in school
<hfp>
RubyPanther: Fair enough, I dread things like the challenges on codility or project Euler. You have to know maths to solves these. Even if you can use libraries, you still have to figure out the mathematical properties of the things you're trying to solve
freeone3000 has quit [Quit: Konversation terminated!]
peret has joined #ruby
<bilbo_swaggins>
then don't do them
kenneth has joined #ruby
<RubyPanther>
bilbo_swaggins: No, EVEN if you're simulating physics, you need to know what the methods do and when to use them, you do NOT need to be able to do the vaaaaaaast majority of what is taught in math classes
<bilbo_swaggins>
make your own programming challenges
ukd1 has joined #ruby
<bilbo_swaggins>
RubyPanther: I don't understand why you said "No" then agreed with me
Zesty has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<RubyPanther>
You sortof need graph theory. I mean you need it, but you don't need the type of graph theory that is taught in school.
<bilbo_swaggins>
the teachings help you grok it
<RubyPanther>
It is a waste of time and a distraction from understanding graph theory as used in CS
<hfp>
I don't know graph theory.
<bilbo_swaggins>
I visualize things in graphs
<bilbo_swaggins>
you only need the basics
michaeldeol has joined #ruby
<bilbo_swaggins>
maybe try solving the Travelling Salesman Problem, hfp?
YamakasY has quit [Ping timeout: 240 seconds]
pagioss has quit [Remote host closed the connection]
cescalante is now known as ce_afk
<bilbo_swaggins>
You don't need everything, but cracking open a book on a topic and seeing if any algorithm names pop out at you as being potentially useful is a good use of time
<bilbo_swaggins>
learning everything is a bad use
<toretore>
learning is never a bad use of time
<bilbo_swaggins>
sure it is
dkamioka has quit [Remote host closed the connection]
<bilbo_swaggins>
if you try to learn everything at once
<bilbo_swaggins>
or if your house is on fire
petey has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
enebo has quit [Quit: enebo]
Spami has joined #ruby
aspires has joined #ruby
<bilbo_swaggins>
theoretical CS is to programming as iterative development is to waterfall
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<bilbo_swaggins>
You can get away with hacking sometimes, but sometimes you need to engineer something
<bilbo_swaggins>
It really depends what you're interested in doing
<bilbo_swaggins>
So let's start there
<bilbo_swaggins>
What do you want to program?
jollyy has quit [Quit: jollyy]
<RubyPanther>
"waterfall" is a myth
<bilbo_swaggins>
immaterial
Spami has quit [Client Quit]
<hfp>
bilbo_swaggins: I'm interested in web apps, phone systems, Internet of Things
quatron has quit [Remote host closed the connection]
<hfp>
APIs
<bilbo_swaggins>
then get books on those
* maasha
wonders where freeone3000 went
<bilbo_swaggins>
oh I have a good book on APIs
kirun has joined #ruby
greggroth has quit [Ping timeout: 264 seconds]
skaflem has joined #ruby
<bilbo_swaggins>
The Little Manual on API Design
_Andres has quit [Ping timeout: 240 seconds]
<bilbo_swaggins>
RubyPanther: did you go to school? Perhaps that's why we disagree
<RubyPanther>
sure
<bilbo_swaggins>
I did not and I dug into theoretical CS because I wanted
<RubyPanther>
it was useless though
peret has quit []
<bilbo_swaggins>
I agree from the other side of the fence
<shevy>
he learned how to participate in intellectual debates at school
_justin has quit [Quit: _justin]
<bilbo_swaggins>
I learned how to cynically manipulate the system
<RubyPanther>
anything you can use you have to be able to learn from books, and the books that are used in schools generally suck (bad)
havenwood has quit []
kennym has joined #ruby
carlyle has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 265 seconds]
rm_ has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
I agree
Spami has joined #ruby
rm__ has joined #ruby
<bilbo_swaggins>
Books are my favorite resource
<bilbo_swaggins>
sorry, Coursera
_Andres has joined #ruby
<RubyPanther>
So all that you get is handholding, and if you need that even at the slow pace of classes... you're gonna suck
<bilbo_swaggins>
Wikipedia is amazing for individual topics in mathy/programmy/sciency areas
<bilbo_swaggins>
oh god I hated school
yalue has quit [Quit: Leaving]
<bilbo_swaggins>
I had high hopes college would be different
rm__ has quit [Remote host closed the connection]
<bilbo_swaggins>
I dropped out because it was just high school++
<hfp>
I studied business and tbh maybe 10% of what I had to cram in my brain for exam was useful and up to date knowledge. The 2 or 3 computer-related courses we had to do were a joke. Because of this I am not very confident in any degree's ability to teach you practical skills. But I wouldn't want to extrapolate, maybe it's different outside what I studied
ganthore has joined #ruby
<RubyPanther>
random "books written by famous programmers" will teach a lot more than the crap the publishers push out to the schools
rm_ has joined #ruby
mary5030 has joined #ruby
MattStra_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hfp>
exams*
<bilbo_swaggins>
hfp, I would say the idea of a degree in itself is outdated
kirun_ has joined #ruby
<bilbo_swaggins>
let people take whatever they want
rabeldable has quit [Quit: Leaving.]
MattStra_ has joined #ruby
<bilbo_swaggins>
if they take bullshit classes, well, that's only going to hurt them
AlSquire has joined #ruby
<RubyPanther>
hfp: Yeah, biology is different, because it is harder ;) CS is easy. Or at least, everything is well defined.
smathieu has quit [Remote host closed the connection]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
<bilbo_swaggins>
okay yeah I wouldn't try to get into biology without a degree
<bilbo_swaggins>
please don't just hack my cells
smathieu has joined #ruby
<hfp>
haha
mary5030 has joined #ruby
<hfp>
bilbo_swaggins: The API book you talked about it's from 2008 written by someone related to Nokia, is that it?
<bilbo_swaggins>
yes
<RubyPanther>
law school is useful, because you have to learn different and non-intuitive methods of thinking, many of them arbitrary.
petey has quit [Remote host closed the connection]
<bilbo_swaggins>
RubyPanther: I come from a line of lawyers
smathieu has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
I talked to my dad about law school once
<bilbo_swaggins>
I was surprised they don't teach formal reasoning
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ukd1 has quit [Remote host closed the connection]
smathieu has joined #ruby
kirun has quit [Ping timeout: 255 seconds]
pcorliss has joined #ruby
<bilbo_swaggins>
rhetoric is way more heavily-emphasized
petey has joined #ruby
<bilbo_swaggins>
that I understand, but still, no logic?
<RubyPanther>
lol reasoning, that is the last thing they would want you to try to do
<RubyPanther>
You're supposed to "win," not be "right"
toastynerd has quit [Remote host closed the connection]
<bilbo_swaggins>
I do like to observe tech cases
vlad_starkov has quit []
<bilbo_swaggins>
well, you can use reason to dance around opponents, even if you use it to support wrong-ish points
ukd1 has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<bilbo_swaggins>
you just gotta "sound" smart
<RubyPanther>
CS is based on objective principles, so you can at least use being
<RubyPanther>
"right" as a proxy
<bilbo_swaggins>
that's why I like watching those cases and not others
pcorliss has quit []
<bilbo_swaggins>
you read arstechnica?
<bilbo_swaggins>
they cover tech law well
<bilbo_swaggins>
and other tech/science news
RaptorJesus has joined #ruby
<RubyPanther>
yeah, I've read like... 200 court filings from the Prenda cases lol
subbyyy_ has joined #ruby
<bilbo_swaggins>
I still don't know what a porn troll is
rm_ has quit [Ping timeout: 264 seconds]
dkamioka has joined #ruby
<bilbo_swaggins>
someone who posts private videos to get back at someone?
sputnik1_ has joined #ruby
garethrees has joined #ruby
<RubyPanther>
No, a porn troll is somebody who sues you for downloading copyrighted porn
<bilbo_swaggins>
what lol
michaeldeol has joined #ruby
<bilbo_swaggins>
so a really grungy RIAA
<RubyPanther>
In the case of Prenda, sometimes porn that was never even offered for sale, but was only uploaded to torrent sites to induce copying
davy_ has joined #ruby
<bilbo_swaggins>
oh wow that is dirty
<bilbo_swaggins>
no wonder they got slapped so hard
petey has quit [Ping timeout: 265 seconds]
<bilbo_swaggins>
that's like the one case I didn't read up on
kirun_ has quit [Ping timeout: 240 seconds]
afex has joined #ruby
mrmoney2012 has joined #ruby
<RubyPanther>
They got slapped so hard that Steele had to do $500k of remodeling on his house last year with the money.
<RubyPanther>
I wish I'd get slapped like a lawyer. When I get a smack-down it means the client didn't pay me and I'm not remodeling anything
bryanculver has quit [Quit: Connection closed for inactivity]
maroloccio has quit [Quit: WeeChat 0.4.3]
<mrmoney2012>
how do i return one of the inner arrays if I search for a reference number… e..g 3 to return [3, "BBC Radio 5 Live", "http://bbc.co.uk/radio/listen/live/r5l.asx"]
<bilbo_swaggins>
they should be disbarred
<bilbo_swaggins>
borderline jailed
<bilbo_swaggins>
anyway an actual question has come up and I have to do some work
<bilbo_swaggins>
away I go
w|t has joined #ruby
garethrees has quit [Ping timeout: 240 seconds]
<hfp>
mrmoney2012: @stations[3]
rudisimo|away has quit []
aliver has joined #ruby
<mrmoney2012>
hmm, but that just gives me the third array right?
<hfp>
@stations[0][3] rather
patrick99e99 has joined #ruby
<mrmoney2012>
i was thinking i’d search through the arrays and return the one i wanted based on the [*3*, "BBC Radio 5 Live", "http://bbc.co.uk/radio/listen/live/r5l.asx"]
<mrmoney2012>
maybe i’m doing it wrong though...
njection_ has quit [Ping timeout: 255 seconds]
jollyy has quit [Client Quit]
RubyPanther has quit [Ping timeout: 240 seconds]
<hfp>
mrmoney2012: No I'm doing it wrong, I misread your pastie
<mrmoney2012>
:-)
sputnik1_ has joined #ruby
mercwithamouth has joined #ruby
<aliver>
Hiya folks, I just configured Ruby 2.2.0 on AIX. I've been fighting it for a while and I had to patch a couple of source files, but my patches look like they've been superceeded in the source repo (good). However, I still can't do a make install and I'm a little foggy on what's wrong. I don't know much ruby, I'm just a package maintainer here.
<mrmoney2012>
that’s fine, but what I mean is - how do i search for a particular station given an ID number
carlyle has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Ping timeout: 265 seconds]
<hfp>
if you organise you @stations like in my example then you look them up like `@stations[station_number]`
<hfp>
your*
<jhass>
mrmoney2012: .assoc(3) but your arrays probably want to be a hash instead
chukwizy has joined #ruby
<jhass>
where are you getting them from?
<chukwizy>
Anyone want a Macbook Pro 15" Retina Display 2013 for $900. Cheapest price.
<mrmoney2012>
i just typed them out… but ok - i should be using a hash ?
jbueza has joined #ruby
<jhass>
yes
<gizmore>
chukwizy: this is not #trashcan
chukwizy has left #ruby [#ruby]
rahult has quit [Ping timeout: 255 seconds]
IceDragon has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
<RubyPanther>
I'd be willing to accept it for $200, $900 seems steep for a recycling fee
<hfp>
mrmoney2012: yes, a hash would make it easier
<mrmoney2012>
ok, thanks I’ll look into that
circuit has quit [Quit: leaving]
njection has quit [Ping timeout: 265 seconds]
Nahra has quit [Ping timeout: 240 seconds]
mrmoney2012 has quit [Quit: .]
twiceaday has quit [Ping timeout: 240 seconds]
twiceaday has joined #ruby
Nahra has joined #ruby
Nahra has joined #ruby
Nahra has quit [Changing host]
<RubyPanther>
naming question... I have a polymorphic belongs_to that points to either an "item" or a "category", and I don't know what to call it... item_or_category_id and I'll jump out the window
alexju_ has joined #ruby
<jhass>
what does belong to either an item or category?
<bilbo_swaggins>
why is it polymorphic?
njection has joined #ruby
lw has quit [Quit: s]
<bilbo_swaggins>
okay better question: where are they going?
<bilbo_swaggins>
they must have some common purpose?
<RubyPanther>
bilbo_swaggins: it is a menu system and I have to display items or groups of items (categories) in a flexible way
<jhass>
entry ?
<RubyPanther>
and I don't want nonsense like special 1-item categories
carlyle has joined #ruby
<jhass>
like in menu entry?
<bilbo_swaggins>
get_item_tree_id
<bilbo_swaggins>
or
freezey has joined #ruby
echevemaster has joined #ruby
<bilbo_swaggins>
menu_location
SoLoMoN1112 has joined #ruby
<RubyPanther>
well, I have Entry as the join model for Item and Category, and each Entry belongs to a category, and either another category or an item
<jhass>
target then
<bilbo_swaggins>
target is nice
<RubyPanther>
so each Entry displays the item_or_category
michael_lee has quit [Remote host closed the connection]
<bilbo_swaggins>
^
rakm has joined #ruby
<toretore>
defined? is not a method
aspires has quit []
<bilbo_swaggins>
elaborate?
IceDragon has joined #ruby
<toretore>
how could it be?
<bilbo_swaggins>
what
<jhass>
yeah defined? is syntax
nanoyak has quit [Quit: Computer has gone to sleep.]
<toretore>
what is its argument?
<bilbo_swaggins>
it's immaterial
<bilbo_swaggins>
it's argument is syntactical
<bilbo_swaggins>
whatever
njection has quit [Ping timeout: 255 seconds]
<bilbo_swaggins>
Ruby gets pretty semantically-whoogly about these kinds of things
<toretore>
no, there is no argument because it's not a method. if it were a method, `defined? foo` would result in an exception when foo is not defined
<toretore>
and it would never run
<bilbo_swaggins>
I understand but it's splitting hairs
<toretore>
it's not
<toretore>
it's pretty simple
dangerousdave has quit [Read error: Connection reset by peer]
<bilbo_swaggins>
I get it
<bilbo_swaggins>
but it's moot
Foo1 has joined #ruby
<bilbo_swaggins>
although I will say it definitely violates "everything is an object" ;)
<jhass>
variables aren't objects, they point to objects
<toretore>
it does not
<bilbo_swaggins>
so would you call it metaprogramming?
<bilbo_swaggins>
then why can it be used in composition with other code?
weems has quit [Quit: Leaving]
<jhass>
so it makes sense that you can't have methods that operate on variables
weems has joined #ruby
<bilbo_swaggins>
I know
chipotle has joined #ruby
Astralum has quit [Ping timeout: 240 seconds]
<toretore>
how can `if` work if it's not a method?
njection has joined #ruby
<bilbo_swaggins>
`if` is different from `defined?` in its intended use
<bilbo_swaggins>
you're still implying I don't get it
<toretore>
it would be quite useless otherwise
<bilbo_swaggins>
you could define a programming language where `if` was a method
<bilbo_swaggins>
it's moot
<bilbo_swaggins>
more like a DSL
danno1 has quit [Ping timeout: 255 seconds]
nanoyak has joined #ruby
<centrx>
defined? is part of the language syntax
camilasan has joined #ruby
<bilbo_swaggins>
it's not basic syntax; it's metaprogramming hocus-pocus syntax
IcyDragon has joined #ruby
<RubyPanther>
everything is an object, except the things that are not
<bilbo_swaggins>
I *still* understand that it's not a method.
<RubyPanther>
containers are NOT objects
<toretore>
actually you can't have if as a method
<bilbo_swaggins>
I'll do it right now
IceDragon has quit [Ping timeout: 240 seconds]
<RubyPanther>
if variables were objects, then defined? would be a method. But they're not, and it isn't.
<toretore>
not without basic syntax to support it
lw has quit [Quit: s]
<bilbo_swaggins>
you can't have ANY methods without syntax
jackneill has quit [Remote host closed the connection]
<bilbo_swaggins>
def my_if test_case, do_this
<bilbo_swaggins>
do_this if test_case
<bilbo_swaggins>
end
<toretore>
you can't have a proper if method without syntactical support for it either
jason__ has joined #ruby
<bilbo_swaggins>
so?
<benzrf>
dang it
<toretore>
that was your point
GaryOak_ has joined #ruby
jonatasdp has joined #ruby
<bilbo_swaggins>
don't tell me what my point was
<bilbo_swaggins>
that really wasn't
<toretore>
[21:45:53] <bilbo_swaggins> you could define a programming language where `if` was a method
<bilbo_swaggins>
well if it doesn't exist and it cannot be referred to, has it really escaped anything?
<bilbo_swaggins>
is it really an it at all?
<toretore>
"you could define a programming language where `if` was a method" sounds a whole lot like "you could have a language where `if` was provided purely as a method implemented with the language's primitives"
sputnik1_ has joined #ruby
<bilbo_swaggins>
you're playing language games now
<toretore>
otherwise, what was the point of saying it?
spicerack has joined #ruby
<toretore>
"you can define methods with any name you want"?
<bilbo_swaggins>
and again conveniently leaving out the second part of what I said
<bilbo_swaggins>
but again it's immaterial
<bilbo_swaggins>
just make cool stuff with code instead of deconstructing it
<toretore>
there was no second part
<bilbo_swaggins>
*rolleyes
brunoro has joined #ruby
<RubyPanther>
omg, you went THERE?! deconstructing?!
Xeago has quit [Remote host closed the connection]
jason__ has quit [Ping timeout: 245 seconds]
<RubyPanther>
Larry Wall talks about this stuff in his talk about Postmodernism
Xeago has joined #ruby
<bilbo_swaggins>
yeah?
aspires has quit [Client Quit]
x77686d has joined #ruby
<RubyPanther>
but Ruby is post-postmodern
kyb3r_ has joined #ruby
IcyDragon is now known as IceDragon
sputnik1_ has quit [Client Quit]
<benzrf>
in haskell i can say:
Xeago has quit [Read error: Operation timed out]
<benzrf>
if' True v _ = v
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 28.0/20140314220517]]
<benzrf>
if' False _ v = v
skaflem has quit [Quit: Leaving]
<RubyPanther>
Perl already deconstructed it all, and now we have Ruby which rebuilds the Modern but with the focus on the programmer instead of the machine. We can't do that without leaving it partially-deconstructed, because humans are so changeable
njection has quit [Ping timeout: 265 seconds]
<benzrf>
if' (3 == 4) "this" "that" -- => "that"
<xybre>
toretore: There's a few languages where "if" is a method, fyi.
<bilbo_swaggins>
benzrf I read a neat article that defined ifs with functions as well as numbers and everything
nari has joined #ruby
<bilbo_swaggins>
it was lambda calculus + defining numbers with sets
Xeago has joined #ruby
<toretore>
xybre: such as?
<bilbo_swaggins>
and it was beautifully O(n!^x) or something
MattStra_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xybre>
toretore: Smalltalk
<blackms>
would be better O(logn)
<toretore>
you can have if as a function, but it would be very inefficient
<bilbo_swaggins>
I don't think it's necessarily inefficient
aspires has joined #ruby
<bilbo_swaggins>
read above for benzrf's explanation
<bilbo_swaggins>
he did better than I did
njection has joined #ruby
sputnik1_ has joined #ruby
CorySimmons has quit [Quit: Bye!]
dkamioka has joined #ruby
<bilbo_swaggins>
plus efficient is in the eyes of the abstract machine doing the computation, when it comes down to such a low level as an `if` construct
<xybre>
Ruby's "if" should be fairly efficicent, but its kinda nerfed too.
<redondos>
bilbo_swaggins: ah, i was missing some parentheses to make that work. thanks!
mrnugget has joined #ruby
<bilbo_swaggins>
may the parantheses be with you, always
_justin has quit [Quit: _justin]
<RubyPanther>
You don't need to know about the abstract machine, or if it is efficient. You know it is more efficient to have it is a language construct rather than a method/function, because the interpreter/compiler already optimized it before the function/method gets a chance to try to be efficient
zachallett has quit [Remote host closed the connection]
<bilbo_swaggins>
which is where practicality comes in
<bilbo_swaggins>
you could make anything in LISP
<bilbo_swaggins>
if you really wanted to
paulfm has quit []
<bilbo_swaggins>
you could define numbers as recursive lists
<bilbo_swaggins>
if you REALLY wanted to
<benzrf>
in haskell:
sputnik1_ has quit [Client Quit]
<benzrf>
data Peano = S Peano | Z
<benzrf>
Z + Z = Z
<bilbo_swaggins>
stop giving me haskell envy
<benzrf>
x + Z = x
<benzrf>
Z + x = x
<benzrf>
oh wait first one is unnecessary
<benzrf>
(S x) + y = S (x + y)
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf>
(y)
<RubyPanther>
It is a meta-argument, do you find value in language constructs, or do you want everything to be entirely generic. In Ruby, we explicitly find value in OOP, and in convenience, and obviousness, so having things be more generic is not "good." We want it to be generic enough to be flexible, but specific enough to be convenient. So special-purpose language constructs are good, unless we have too many. It would be hard to argue if is too
<RubyPanther>
many.
rezzack has quit [Quit: Leaving.]
<benzrf>
pattern matchin bitch
sputnik1_ has joined #ruby
kennym has quit [Quit: Leaving.]
danshultz has quit [Remote host closed the connection]
<bilbo_swaggins>
but hey, do you think it's OS related?
dkamioka has quit [Ping timeout: 255 seconds]
toastynerd has joined #ruby
rvraghav93 has joined #ruby
<RubyPanther>
aliver: probably whatever AIX does to make scripts "safe" is biting you
heftig has joined #ruby
<aliver>
Anyhow, I'm just wondering WTF this error is: Why would ruby try to "require" something that it couldn't get due to not being installed yet (the 'thread' lib/include whatever)
sputnik1_ has joined #ruby
<RubyPanther>
I don't remember if that is controlled by an executable flag, or what
mrnugget has quit [Quit: mrnugget]
<aliver>
RubyPanther: Hmm, it doesn't really have anything like SElinux etc...
danshultz has quit [Ping timeout: 240 seconds]
<aliver>
RubyPanther: Just an execute bit etc..
<RubyPanther>
No, this is pre-SELinux
<aliver>
which is certainly set.
smathieu has quit [Remote host closed the connection]
<aliver>
It dies with: /tmp/ruby-2.2.0-r45411/lib/monitor.rb:9:in `require': this executable file can't load extension libraries (LoadError)
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aliver>
monitor.rb has: require 'thread' on line #9
<aliver>
which seems normal.
dkamioka_ has quit [Remote host closed the connection]
<aliver>
RubyPanther: this is AIX 6.1. There aren't any TSEC style restrictions on this box. Other scripts, python, lua, php, etc.. all compile and install file.
<aliver>
s/scripts/script interpreters/
quatron has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
smathieu has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
<toretore>
xybre: so smalltalk actually does implement as methods
smathieu has joined #ruby
<aliver>
Hmm, maybe those -I flags are like -I flags to gcc telling miniruby where it can find it's extensions. Maybe it didn't compile the thread extension for some reason.
<aliver>
Hmm, yep. That is part of the issue. Ruby allows you to disable threading (and sometimes does it on it's own) and then later on during the install that monitor.rb installation has a requirement for it.
a432c1 has quit []
ringaring has joined #ruby
<aliver>
== bug in my mind.
YamakasY_ has joined #ruby
blackmesa has joined #ruby
ascarter has joined #ruby
kennym has joined #ruby
ringaring has quit [Read error: Connection reset by peer]
<ddamko>
is there away around that or a better approch
<RubyPanther>
aliver: what Ruby version are you using?
ringaring has joined #ruby
jorts has joined #ruby
__VenTys__ has joined #ruby
<RubyPanther>
oh, 2.2 lol
YamakasY has quit [Ping timeout: 264 seconds]
<RubyPanther>
does that exist?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 252 seconds]
kyb3r_ has quit [Ping timeout: 265 seconds]
<benzrf>
wait, 2.2 exists? o-o
<benzrf>
ddamko: you could cut down the longer list
<benzrf>
ddamko: or do 'next unless args.all?' or something
<ddamko>
true ok let me see what I can do.
<aliver>
RubyPanther: freakin newest thing I could get my hands on since there is so many bugs I have to patch in older versions.
<RubyPanther>
aliver: less stable means MORE bugs, not less
end_guy has joined #ruby
<aliver>
I don't know ruby very well at all (just tutorial basics) I know C, very well, though.
<aliver>
RubyPanther: not in this case.
[42] has joined #ruby
<RubyPanther>
yes, in this case, because Ruby is not brand-new software
<aliver>
RubyPanther: There are specifc bugs fixed in that version
<RubyPanther>
and dev versions ARE generally full of bugs.
<benzrf>
yo can somebody confirm a bug for me
<aliver>
So, no, not in this case.
<benzrf>
pls open vim with ruby syntax highlighting and paste:
<benzrf>
[$stdout, @client.stdout]
asteros has quit [Quit: asteros]
<RubyPanther>
when you hit known bugs, it is normal to apply a patch
freezey has quit [Ping timeout: 255 seconds]
<aliver>
Earlier versions are worse on AIX than this one in terms of how many custom patches I have to create.
nopolitica has quit [Remote host closed the connection]
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<aliver>
RubyPanther: there aren't backported patches for the bugs I'm hitting.
<aliver>
Plus I already fixed them.
<aliver>
It's just that the newest version has fixes already in place.
bricker has quit [Read error: Connection reset by peer]
<aliver>
ie.. not my custom monkey crap.
bricker__ has joined #ruby
bricker__ is now known as bricker
<aliver>
and I'm not real fond of the idea of trying to generate 6-7 patches out of the VCS to do a proper backport.
<aliver>
Plus this looks like a ruby bug to me.
<aliver>
Not a bug, but a logic error, really.
<benzrf>
aliver: isnt that what a bug is?
<aliver>
I just mean it's not a C-code error coming from the compiler.
asteros has joined #ruby
<aliver>
It's just a logic error based on failed assumptions.
<aliver>
but whatever, it sounds to me like my coding skills > people answering and I'm not going to debate why I need to do this with #ruby. Thanks for looking/trying. I'm sure I can fix it myself much faster. If I end up patching stuff that you guys haven't found I'll send it over to the Ruby grown ups.
<RubyPanther>
right, because it is a dev version
<aliver>
via email.
<aliver>
Thanks though.
aliver has quit [Quit: leaving]
mven_ has joined #ruby
<RubyPanther>
deciding we're not "grown up" enough is lame
<gizmore>
is it because of me?
mven_ has quit [Max SendQ exceeded]
<gizmore>
>> begin; cry; rescue => e; 'meh; end
<eval-in>
gizmore => /tmp/execpad-a121747bf162/source-a121747bf162:2: unterminated string meets end of file ... (https://eval.in/128448)
<RubyPanther>
I mean, I took the time to open up configure.in and find out that that line is already removed, I guess he can go get handholding from somebody more important
mven_ has joined #ruby
kirun has quit [Ping timeout: 240 seconds]
<RubyPanther>
frickin' vampires
ndrei has joined #ruby
<RubyPanther>
Just when I thought I'd seen it all, I see an AIX vamp
jason__ has joined #ruby
mven has quit [Ping timeout: 268 seconds]
m0s^away is now known as m0s
<gizmore>
in the end we are all PUSH EAX
njection has quit [Ping timeout: 265 seconds]
<gizmore>
or NOP
carlyle has joined #ruby
<maasha>
What does Thread.exclusive do?
sdegutis has joined #ruby
<sdegutis>
What's the new hotness for testing Ruby code?
toastynerd has joined #ruby
SoLoMoN1112 has left #ruby [#ruby]
toastynerd has quit [Remote host closed the connection]
<shevy>
You can use tests to ensure that certain features are documented to work at time X.
smathieu has quit [Remote host closed the connection]
oso96_2000 is now known as oso|away
<RubyPanther>
"Until there are bug reports, those are only misfeatures" -- Something I once told a difficult client
bricker has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
thesheff17 has quit [Ping timeout: 255 seconds]
bricker__ is now known as bricker
kirun has quit [Read error: Operation timed out]
<shevy>
what made him difficult?
geopet has quit []
<terrellt>
His app was too buggy.
teddyp1cker has quit [Remote host closed the connection]
<RubyPanther>
No spec, conflicting (and just incorrect) descriptions of features, no bug reports, voice mails full of complaints about "all these bugs"
smathieu has quit [Remote host closed the connection]
<RubyPanther>
Almost all the "bugs" were actually just specification mistakes and changes
smathieu has joined #ruby
<RubyPanther>
If I'd been using "agile" he would have been a great client, "okay we're going to need another couple sprints for that" LOL
sdelmore has left #ruby [#ruby]
<RubyPanther>
I don't mind if a client doesn't know what they want... as long as that meas they want the "normal" thing for their business case
chichou has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
smathieu has quit [Remote host closed the connection]
carlyle has joined #ruby
benzrf|offline is now known as benzrf
smathieu has joined #ruby
<shevy>
are you sure it was a difficult client
<shevy>
or was it a case of a difficult panther :)
jorts has quit [Quit: jorts]
kirun has joined #ruby
<RubyPanther>
"No, I want the WTF to have an flashing icon on TOP, and the cherry on the side, and 3, no 7 bells, and it scrapes the whistle from google. I mean bing."
mengu has joined #ruby
mengu has joined #ruby
CreativeEmbassy has quit [Quit: FO SHO]
echevemaster has quit [Quit: Leaving]
rahult has joined #ruby
axl_ has quit [Quit: axl_]
terrellt has quit [Ping timeout: 265 seconds]
baroquebobcat has quit [Ping timeout: 252 seconds]
<RubyPanther>
shevy: in the end I won the stubborn battle, because I refunded and dropped him lol
cjk101010 has quit [Ping timeout: 265 seconds]
asteros has joined #ruby
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
vpretzel_ has joined #ruby
cjk101010 has joined #ruby
<shevy>
lol
carlyle has quit [Ping timeout: 265 seconds]
toastynerd has joined #ruby
Xeago has quit [Remote host closed the connection]
<RubyPanther>
I don't mind making lots of changes. But I am not going to type in bug reports for the client over the phone. No way. They can hire a secretary if they can't do their own typing.
arubincloud has quit []
vpretzel has quit [Read error: Operation timed out]
vpretzel_ is now known as vpretzel
evenix has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Shidash1 has quit [Ping timeout: 268 seconds]
nfk has quit [Quit: yawn]
smathieu has quit [Ping timeout: 255 seconds]
nolic has quit [Read error: No route to host]
bricker has quit [Read error: Connection reset by peer]
matcouto has joined #ruby
Olipro_ has joined #ruby
Shidash has joined #ruby
ukd1 has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 264 seconds]
Olipro has quit [Ping timeout: 246 seconds]
otherj has joined #ruby
jason__ has joined #ruby
ascarter has joined #ruby
evenix has quit [Remote host closed the connection]
matcouto has quit [Read error: Connection reset by peer]
<slash_nick>
amen... same with writing RFPs for the client... it's your request, you identify your needs/wants
<benzrf>
hey Mon_Ouie are you back yet o.o
Olipro_ is now known as Olipro
kennym has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
michaeldeol has joined #ruby
kennym has quit [Client Quit]
<RubyPanther>
Yeah, writing an RFP is a more costly business consulting gig than the software consulting to implement it
smathieu has joined #ruby
ukd1 has joined #ruby
<benzrf>
RFP?
<slash_nick>
Requests for proposals
nateberkopec has joined #ruby
aspires has quit []
<slash_nick>
RFP: I need some something, it shall do X,Y,Z.... then your response is "X,Y,Z will be done in this manner, blah blah." Probably includes some breakdown of how long the things will take.
sambao21 has joined #ruby
aspires has joined #ruby
<slash_nick>
RubyPanther: what I'm talking about is a client who comes in saying "I need X to do Y.. or maybe W... maybe W should do Y. Then X can just be X. Or ..."
mengu has quit [Remote host closed the connection]
devdazed has quit [Quit: Bye]
kpshek has quit []
<benzrf>
slash_nick: so like an RFC but also asking for an impl?
momomomomo has joined #ruby
<RubyPanther>
slash_nick: I don't mind as long as they're happy with, "I know how to get you to Z, but you have to get there my way"
<benzrf>
oh wait
ffranz has quit [Quit: Leaving]
jorts has joined #ruby
<slash_nick>
RubyPanther: if they know they want Z and say they want Z, I'd be content with the same...
<RubyPanther>
The clients that suck are the ones that don't know how to get there, but they know they want to Decide Which Way
sputnik1_ has joined #ruby
<RubyPanther>
Mr. Bigshot In Charge of My Theoretical Micro Business
kennym has joined #ruby
chipotle has joined #ruby
george2 has quit [Remote host closed the connection]
<benzrf>
MBICMTMB
sambao21 has quit [Ping timeout: 265 seconds]
<slash_nick>
RubyPanther: There's really just one dimwit I deal with regularly... 10 minutes late to calls, shares screen and rambles nonsense while indiciating this or that with her mouse. "Look person, I can't hear you clicking your mouse 1500 miles away so I don't know what all that mouse movement means. Also, WRITE ALL THIS DOWN, go over it until you yourself can read it, then email it to me."
arubin has joined #ruby
ziyadb_ has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
WJB has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<RubyPanther>
slash_nick: I've considered pretending I'm disabled and can't use a telephone
freezey has quit [Ping timeout: 265 seconds]
jzig has quit [Remote host closed the connection]
<RubyPanther>
they'd probably email mp3s though
jzig has joined #ruby
<RubyPanther>
"sorry, you have to send a transcript, I'm hard of hearing"
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
snath has quit [Ping timeout: 264 seconds]
DrShoggoth has quit [Quit: Leaving]
ndrei has joined #ruby
kennym has quit [Quit: Leaving.]
SCommette has quit [Quit: SCommette]
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
LiquidInsect has joined #ruby
jzig has quit [Ping timeout: 255 seconds]
LiquidInsect has quit [Remote host closed the connection]
armyriad has joined #ruby
jamesaanderson has joined #ruby
snuffeluffegus has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
claymore has quit [Quit: Leaving]
LiquidInsect has joined #ruby
george2 has joined #ruby
siwica has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
sambao21 has joined #ruby
kennym has joined #ruby
nateberkopec has quit [Quit: Leaving...]
tjr9898 has joined #ruby
rahult is now known as rahult_
rahult_ is now known as rahult
maasha has quit [Ping timeout: 245 seconds]
xxi is now known as ixx
<dstynchula>
How do I write a def to make sure one step completes prior to beginning the next?
<centrx>
That happens anyway?
<dstynchula>
hmm
bluehavana_ has joined #ruby
<dstynchula>
right now, it seems like they're executing all at once.
x1337807x has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dstynchula>
is this a chef problem and not a ruby problem?
<momomomomo>
dstynchula: Show us your code
toastynerd has joined #ruby
<centrx>
dstynchula, Are you using multiple threads/fibers or multiple processes? Also must have code
Squarepy has quit [Quit: Leaving]
<centrx>
dstynchula, Try #chef
* dstynchula
nods
<momomomomo>
^
crystal77 has joined #ruby
sputnik1_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
kennym has quit [Quit: Leaving.]
Jetchisel has joined #ruby
jlast_ has quit [Remote host closed the connection]
x1337807x has quit [Client Quit]
mehlah has quit [Quit: Leaving...]
dik_dak has quit [Quit: Leaving]
sincereness has joined #ruby
toastynerd has quit [Remote host closed the connection]
rahult is now known as rahult_
<sincereness>
can someone tell me how to delete duplicates in an array
<sincereness>
.uniq doesnt work
<sincereness>
its an array of strings btw
<sincereness>
if that makes a difference
<Jamo>
%w(foo foo bar).uniq
<Jamo>
=> ["foo", "bar"]
AlexRussia has joined #ruby
Shidash has joined #ruby
<jhass>
sincereness: then your "duplicate" strings aren't equal, or you're ignoring the resulting array
<sincereness>
im getting 3 links of the same thing when i only need one
<sincereness>
then when i iterate with links.href it outputs all three links
<Jamo>
Mechanize::Page::Link doesn't apparently act as one might suspect with uniq
<sincereness>
ahh
kennym has joined #ruby
<sincereness>
so how do i dismiss the other 2 links
lkba has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
sambao21 has quit [Quit: Computer has gone to sleep.]
ehc has quit [Quit: ehc]
kennym has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
<Jamo>
a, well rather dummy, way might be %w(foo bar foo).each_with_object([]) {|a, acc| acc << a unless acc.include? a }
<Jamo>
you might need to replace .include? with smthing else; you need to be able to tell if it already exists in the accumulator
Senjai has quit [Ping timeout: 240 seconds]
VTLob has quit [Quit: VTLob]
sambao21 has joined #ruby
<sincereness>
jesus
gasbakid has joined #ruby
saarinen has joined #ruby
SCommette has joined #ruby
tchebb has quit [Ping timeout: 240 seconds]
<Jamo>
or monkey-patch the method so that it would look just for the content for equality, not just if objects are same
<jhass>
uniq takes a block, you can try to map to something you can compare, like uniq(&:method_returning_the_url)
kirun has quit [Ping timeout: 265 seconds]
kennym has joined #ruby
<jhass>
Jamo: to cite the docs "It compares values using their #hash and #eql? methods for efficiency." Mechanize probably doesn't implement those properly