<JokesOnYou77>
No errors. I just can't figure out what the keys are. I just .each ed what I loaded and got #<Psych::Nodes::Scalar:0x0000000144fd58>
<graft>
am i stuck with creating an index array?
<hooper>
JokesOnYou77: did you load the class that you saved the yaml with? I had to do something like 'class <table> ; end' in the past to re-use my loaded yaml objects
lynxbat has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<graft>
like i have to do: my_ary.size.times.to_a.bsearch or some such
Lewix has joined #ruby
<graft>
oh wait i think i had this issue before... and bsearch is defined on ranges or something
<JokesOnYou77>
Ok. It looks like what I loaded has only yeys...no values ?
<graft>
haha, yes... Range#bsearch
IceDragon has quit [Ping timeout: 245 seconds]
deric_skibotn has quit [Ping timeout: 260 seconds]
<neilk_>
JokesOnYou77: maybe you can paste that YAML file somewhere.
<jhass>
JokesOnYou77: you still didn't show code
<jhass>
give us something we can copy and paste to reproduce your error
<JokesOnYou77>
It's an array! LMAO. No wonder I was having trouble lol
<JokesOnYou77>
I've been figureing it out in the listener slowly with your combinded help
<JokesOnYou77>
REPL I mean
testcore has quit [Quit: [BX] He-Man uses BitchX. *HE HAS THE POOWWEEEEEEEEEERRRRRRRR!!!!!*]
Ankhers has joined #ruby
lynxbat has joined #ruby
jmbrown412 has quit [Remote host closed the connection]
<neilk_>
JokesOnYou77: yeah but I assume your YAML library should have turned it into a native data structure.
<JokesOnYou77>
Yeah, and array
<JokesOnYou77>
*an
Cheezebo_ has quit [Remote host closed the connection]
<neilk_>
JokesOnYou77: so I don't see why you got Psych objects.
<neilk_>
JokesOnYou77: I think you parsed something that was not a string.
Cheezebox has joined #ruby
Cheezebox has quit [Remote host closed the connection]
<jhass>
iirc a case of using .parse instead of load / load_file
<JokesOnYou77>
OK now that I have the file loaded, can I modify the file? When I exit the script will it overwrite the file or anything?
<neilk_>
JokesOnYou77, jhass: yeah
pareidoliax has joined #ruby
<jhass>
JokesOnYou77: no, you have to write it back
<neilk_>
JokesOnYou77: this isn't loaded in the sense of having a word document open. You just read the file.
linojon has joined #ruby
IceDragon has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ankhers has quit [Ping timeout: 264 seconds]
lewis_ has joined #ruby
lewis_ has quit [Client Quit]
tvw has quit []
lynxbat has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lynxbat has joined #ruby
fabrice31 has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
hooper has quit [Quit: Leaving.]
chrishough has joined #ruby
bryanhowarth has quit [Quit: bryanhowarth]
Takle has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
ptierno has quit [Quit: leaving]
nfk has quit [Quit: yawn]
sarkis has quit [Ping timeout: 240 seconds]
timgauthier is now known as timgauthier_isaw
mockra has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
timgauthier_isaw is now known as timgauthier
IceDragon has joined #ruby
coldkey21 has quit [Quit: Leaving]
lynxbat has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arkadiusj has quit [Remote host closed the connection]
<mozzarella>
how can I debug a ruby function? one that is part of a library
<jhass>
I tend to just stuff binding.pry in there
MCDev has joined #ruby
<jhass>
subl $(bundle show library)
b00stfr3ak has quit [Ping timeout: 250 seconds]
dayepa has joined #ruby
Ankhers has joined #ruby
dayepa has quit [Client Quit]
Takle has quit [Ping timeout: 240 seconds]
TheTopBloke has joined #ruby
b00stfr3ak has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has joined #ruby
pietr0 has joined #ruby
<mozzarella>
jhass: "Could not locate Gemfile"
<jhass>
subl is my editor ;)
<mozzarella>
I know
<jhass>
bundle show just works if your in a application with a Gemfile
<mozzarella>
hmmmmmm
IceDragon has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
<banister>
jhass you can just edit it in pry: edit MyModule#library_function
IceDragon has joined #ruby
b00stfr3ak has quit [Ping timeout: 246 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
emmesswhy has quit [Quit: Leaving]
<jhass>
yeah, in that case I want to edit to get into pry though ;)
britneywright has joined #ruby
<banister>
jhass but you can start pry, require the library, and inject the binding.pry: by going edit my_library_function --> add binding.pry --> run library function --> end up at the pry breakpoint
sparrovv has joined #ruby
<jhass>
mozzarella: there's a similar, more generic gem which which will give you a path to a file as it would be resolved by require
<mozzarella>
uh, the file I get is empty/doesn't exist
centrx has quit [Quit: Mead error: Connection reset by beer]
<EasyCo>
What am I missing here? I'm doing: redirect_to action: :index, notice: 'Redemption successful' but the flash bucket is empty
<jhass>
EasyCo: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
<EasyCo>
Woops
<EasyCo>
Weong chat
<EasyCo>
My bad
PanPan has joined #ruby
sparrovv has quit [Ping timeout: 245 seconds]
pabloh has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
maestrojed has quit [Quit: Computer has gone to sleep.]
rubytor has joined #ruby
rubyonrailed has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 240 seconds]
sevvie has joined #ruby
ffranz has quit [Quit: Leaving]
narcan has joined #ruby
ghr has joined #ruby
eli has joined #ruby
eli is now known as Guest66548
Guest66548 has quit [Client Quit]
IceDragon has joined #ruby
ixti has quit [Quit: WeeChat 0.4.3]
<mozzarella>
how do I call pry's edit inside a ruby script?
aspires has quit []
goshdarnyou has quit [Ping timeout: 240 seconds]
Guest85414______ has quit [Ping timeout: 240 seconds]
goshdarnyou has joined #ruby
ClarusCogitatio has quit [Ping timeout: 264 seconds]
<benzrf>
mozzarella: huh?
freerobby has quit [Quit: Leaving.]
ghr has quit [Ping timeout: 246 seconds]
project2501a has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
Guest85414______ has joined #ruby
<edwardloveall>
mozzarella: if i understand correctly, you need to have gem 'pry' in your gemfile
freerobby has quit [Client Quit]
mockra has joined #ruby
<edwardloveall>
and then anywhere, you can call binding.pry
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<edwardloveall>
that will stop execution
<edwardloveall>
and let you monkey around
cashnguns has joined #ruby
<mozzarella>
edwardloveall: yes, but can you call something like "edit method" directly?
ssvo has quit [Read error: Connection reset by peer]
nifty has quit [Ping timeout: 240 seconds]
<edwardloveall>
you can redefine the method
davedev24_ has quit [Ping timeout: 244 seconds]
<edwardloveall>
just like you can in a ruby file
<mozzarella>
I mean without binding.pry
ssvo has joined #ruby
nifty has joined #ruby
<edwardloveall>
in ruby, you can redefine methods
aspires has joined #ruby
<edwardloveall>
i can write a code example if that helps
nb_bez__ has quit [Quit: Connection closed for inactivity]
Spami has joined #ruby
bmurt has joined #ruby
pu22l3r has joined #ruby
jhass is now known as jhass|off
fabrice31 has joined #ruby
Photism has quit [Quit: Leaving]
sectionme has joined #ruby
saarinen has quit [Quit: saarinen]
tkuchiki has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
alvaro_o_ has quit [Quit: Ex-Chat]
bmurt has quit [Ping timeout: 250 seconds]
bmurt has joined #ruby
tlarevo_ has joined #ruby
GriffinHeart has joined #ruby
Guest___ has quit [Ping timeout: 246 seconds]
fabrice31 has quit [Ping timeout: 260 seconds]
sectionme has quit [Ping timeout: 246 seconds]
mr-foobar has joined #ruby
tlarevo has quit [Ping timeout: 250 seconds]
b00stfr3ak has joined #ruby
benlieb has joined #ruby
jfutbol has quit [Remote host closed the connection]
bmurt has quit [Ping timeout: 245 seconds]
krz has joined #ruby
benlieb has quit [Client Quit]
IceDragon has quit [Quit: Space~~~]
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
lewis_ has joined #ruby
idoru has quit [Remote host closed the connection]
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
Lewix has joined #ruby
lewis_ has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
rubytor has joined #ruby
thams has joined #ruby
bthesorceror has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
duncannz has joined #ruby
Cer3bus has joined #ruby
pietr0 has joined #ruby
St_Marx has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
bearish has joined #ruby
linojon has quit [Quit: linojon]
lw has joined #ruby
bearish has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
Spami has quit [Quit: This computer has gone to sleep]
ValicekB has quit [Ping timeout: 260 seconds]
jfutbol has joined #ruby
oo_ has joined #ruby
Spami has joined #ruby
<bricker`LA>
Okay, need some gsub help:
<bricker`LA>
>> version 1.2.3".gsub(/(version +\d+\.\d+\.)(\d+)/, '\1' + "#{'\2'.to_i + 1}")
<eval-in>
bricker`LA => /tmp/execpad-f2a6d97228fc/source-f2a6d97228fc:2: no .<digit> floating literal anymore; put 0 before dot ... (https://eval.in/185147)
<dopie>
cmosguy, im telling you i had windows nightmare with ruby
<dopie>
use a virtual machine
<cmosguy>
dopie, i am seeing the lite
<cmosguy>
light
<cmosguy>
ok
<cmosguy>
off to use the VM to do this shiznat
<dopie>
yes
<dopie>
much easier
<sevenseacat>
oh boy
<dopie>
sevenseacat, I helped :)
<dopie>
taking a gangbanger off the streets to learn ruby
windblown has quit [Ping timeout: 246 seconds]
<sevenseacat>
:P
Ilyas has joined #ruby
<dopie>
sevenseacat, youre on mac correcT?
<sevenseacat>
nope, ubuntu
mkaesz has joined #ruby
<cmosguy>
lol
<dopie>
ahhh thank goodness
sigurding has quit [Quit: sigurding]
nhhagen has joined #ruby
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
oo_ has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
Bumptious has quit [Remote host closed the connection]
hellangel7 has quit [Remote host closed the connection]
iterator_ has quit [Read error: Connection reset by peer]
iteratorP has joined #ruby
sigurding has joined #ruby
oo_ has joined #ruby
dopie has quit [Remote host closed the connection]
hellangel7 has joined #ruby
ari-_-e has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby
staycreative has joined #ruby
oo_ has quit [Remote host closed the connection]
max06 has joined #ruby
juz88 has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Remote host closed the connection]
<bricker`LA>
I'm trying to decide how I could setup a worker node with chef... it hosts a few apps and runs background workers. It has some dependencies, ffmpeg, imagemagick, etc. I can't decide if I should put everything into the 'workers' cookbook, or if I should put most of it into the attributes/run list. Any opinions on this?
patrick99e99 has joined #ruby
davedev24_ has joined #ruby
saarinen has quit [Quit: saarinen]
hsps_ has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
ghr has joined #ruby
Sawbones has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
kalusn has joined #ruby
Obversity has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
hellangel7 has quit [Remote host closed the connection]
<Hanmac>
" error: C compiler cannot create executables" ;DDD
tkuchiki has joined #ruby
<canton7>
mage_, so your gcc version doesn't get along with... anything, by the look of it
<mage_>
what do you mean ..?
<crome>
wth is gcc -V
<Hanmac>
first it does look you installed your own version of gcc ... can you tell us why you did that?
<crome>
something is very weird in your system
<Hanmac>
"/home/jcigar/bin/gcc" that says me you installed a compiler into user space
<mage_>
Hanmac: I install gcc46 from the freebsd ports, the thing is that apparently ruby-build wants "gcc" so I ln -s /usr/local/bin/gcc46 ~/bin
<tobiasvl>
^____^
<mage_>
I did that because it's /usr/local/bin/gcc46 under freebsd ..
<tobiasvl>
and that's not in your path?
<Mon_Ouie>
You could build with CC=gcc46 to tell it that
<mage_>
let's try ..
<mage_>
isn't the problem the cc1: error: -Werror=shorten-64-to-32: no option -Wshorten-64-to-32 ?
<mage_>
Mon_Ouie: it seems to work ... !
<mage_>
thank you very much
mityaz has joined #ruby
<Hanmac>
i tell you guys he will come back later when he has problems with his 1.8.7 ... or later than that when his program for 1.8.7 does not work for 1.9+
guanophobic has joined #ruby
<Hanmac>
such colleagues who want to use ruby1.8.7 also uses IE6 and lower
<jhass>
LeShadow: == returns true or false, which then is used to decide what if branch is run, so true == true -> true and false == true -> false is kinda redundant
<LeShadow>
I understand
jusmyth has joined #ruby
rylev has joined #ruby
<LeShadow>
also jhass it says that at line 70 it expects an end-of-input, but it contains an end word? O.o
<canton7>
fix your 'if ... do' problems first
<canton7>
it's searching for the 'end' for that 'do', and it finds end-of-file instead
<canton7>
take out the 'do', and it will no longer be looking for the 'end'
<jhass>
it means you got an end without a prior opening statement (do, if, unless, while, until, def)
<LeShadow>
canton7: I fixed those do’s with the if statements
<tobiasvl>
options[:git].chop.chop.chop.chop
<tobiasvl>
:D
<jhass>
update the gist
<Mon_Ouie>
canton7: "expected end-of-input" is not looking for the keyword end, it means it thought it was done but there was still stuff to parse
<LeShadow>
nvm I found one more, fixed it and now it works :)
<canton7>
Mon_Ouie, I assumed he was referring to his error "/Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:70: syntax error, unexpected end-of-input, expecting keyword_end"
<LeShadow>
thanks for the help !
<Hanmac>
LeShadow: some things to make it shorter: command = options.values_at(:type,:dir).join(" ") ...
camt has joined #ruby
Sht0 has joined #ruby
kaspertidemann has joined #ruby
arup_r1 has joined #ruby
tfitts has joined #ruby
Ilyas has joined #ruby
andikr has joined #ruby
hsps_ has joined #ruby
ghr has joined #ruby
yfeldblum has joined #ruby
echooo has joined #ruby
verto has joined #ruby
braincrash has joined #ruby
GriffinHeart has joined #ruby
skolman_ has joined #ruby
Sgeo has joined #ruby
zettam_ has joined #ruby
peeja has joined #ruby
blenny_ has joined #ruby
wiscas has joined #ruby
jayne has joined #ruby
DanKnox has joined #ruby
GGMethos has joined #ruby
waltz has joined #ruby
crazysim has joined #ruby
zastern has joined #ruby
GeekOnCoffee has joined #ruby
gremax has joined #ruby
yeltzooo has joined #ruby
m4rCsi has joined #ruby
orionstein has joined #ruby
mikalv has joined #ruby
Schmidt has joined #ruby
asuka has joined #ruby
jle` has joined #ruby
mjulian has joined #ruby
Killerkeksdose_ has joined #ruby
Mattias has joined #ruby
pusewicz has joined #ruby
gtrak has joined #ruby
maxmanders has joined #ruby
andrewbredow has joined #ruby
luckyruby has joined #ruby
michael_mbp has joined #ruby
wlanboy has joined #ruby
ZYPP has joined #ruby
Scient has joined #ruby
three18ti has joined #ruby
nomadic has joined #ruby
akoz has joined #ruby
sarlalian has joined #ruby
thejoecarroll has joined #ruby
redondos has joined #ruby
iceden has joined #ruby
Cer3bus has joined #ruby
<jhass>
LeShadow: btw gists can be edited
WildBamboo-Josh has joined #ruby
jrdnull has joined #ruby
<Mon_Ouie>
Oh, if he changes the message when he says it all bets are off :p
<sdegutis>
We have 2k page views per day on average, rarely up to 4k.
<sdegutis>
Most of our access is reads, with a few occasional writes.
pabloh has quit [Remote host closed the connection]
felixjet_ has joined #ruby
<wasamasa>
sdegutis: well, you've asked what could go wrong and there is nothing you can rule out
<wasamasa>
sdegutis: therefore everything can go wrong!
riotjones has joined #ruby
<sdegutis>
wasamasa: no crome did, sarcastically
<sdegutis>
:)
HelperW__ has joined #ruby
<wasamasa>
oh damn
<sdegutis>
but that's okay I like feedback anyway
Neomex_ has joined #ruby
rimenes_ has joined #ruby
Azulinho has quit [Ping timeout: 240 seconds]
amundj_ has joined #ruby
decoponio has joined #ruby
proxie has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
virtualize has quit [Read error: Connection reset by peer]
Deele2 has joined #ruby
<crome>
sdegutis: anyway, using sqlite is fine as long as you know it is going to be enough for what you need (which is pretty much the case with everything else)
anaeem___ has joined #ruby
armyriad has joined #ruby
<sdegutis>
:)
<sdegutis>
On their page it says it can usually handle up to 100k page views per day.
<sdegutis>
And we only get 2k!
jusmyth1 has joined #ruby
<jhass>
because page views are so comparable
<wasamasa>
as long as you're not using an ORM that selects way more than it should
<sdegutis>
As long as I enable write-ahead-logging and set it to more durable (persisting to disk more often), then it should be safe enough.
<sdegutis>
wasamasa: like ActiveRecord?
drizz_ has joined #ruby
neoice_ has joined #ruby
<wasamasa>
sdegutis: that was the one I had in mind
nucc has joined #ruby
<sdegutis>
:)
<crome>
activerecord doesn't do more selects that what you need if you know how to use it
<wasamasa>
but I'm pretty sure it's not alone
<crome>
than*
mityaz_ has joined #ruby
genta has joined #ruby
echevemaster has quit [Remote host closed the connection]
<sdegutis>
crome: +1
<sdegutis>
Anyway right now we're using Datomic so anything's faster.
vinky_ has joined #ruby
FracV_ has joined #ruby
PaulePan1er has joined #ruby
kaspertidemann has quit []
totimkop1 has joined #ruby
kaspertidemann has joined #ruby
<wasamasa>
wait, aren't we in #ruby?
magicien_ has joined #ruby
<crome>
how is that relevant?
jxport_ has joined #ruby
Apocalyp- has joined #ruby
micah`_ has joined #ruby
maloik_ has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
<wasamasa>
datomic is a clojure database
catepill1r has joined #ruby
<wasamasa>
unless someone decided to recreate it in ruby
davedev24_ has joined #ruby
<Hanmac>
crome: ActiveRecord questions at #rubyonrails ... they did it, now they need to pay for that
<crome>
we are speaking english which is sure as hell a different language from ruby
sdegutis has left #ruby ["Leaving..."]
newbie has joined #ruby
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
<crome>
arup_r: less dumb version: compare checksums
keen________ has joined #ruby
anildigital has joined #ruby
<jhass>
more sophisticated stuff could start by looking at the length first, the paths first, even the inode maybe, then maybe hashing the contents and comparing the hashes can be faster
pu22l3r has joined #ruby
mordof has joined #ruby
elcuervo is now known as Guest97132
malcolmva has joined #ruby
snath has joined #ruby
rkjaer_ is now known as rkjaer
Sauvin has joined #ruby
mattyohe_ is now known as mattyohe
Guest53913 has quit [Quit: No Ping reply in 180 seconds.]
pygospa has joined #ruby
rubytor has joined #ruby
mattyohe is now known as Guest76686
swartwulf has joined #ruby
<arup_r>
jhass: I just wanted to check if they contain same thing or not
agrinb has quit [Ping timeout: 260 seconds]
<jhass>
yes
mosez has joined #ruby
keen________ has quit [Read error: Connection reset by peer]
KnownSyntax_ has joined #ruby
schubam has joined #ruby
<arup_r>
The below returns false... Which it should also
<arup_r>
file1 = "#{__dir__}/out.txt"
<arup_r>
file2 = "#{__dir__}/out1.txt"
<arup_r>
p test('-', file1, file2)
schubam has quit [Remote host closed the connection]
keen________ has joined #ruby
<arup_r>
But the below returns true
<arup_r>
file1 = "#{__dir__}/out.txt"
<arup_r>
file2 = "#{__dir__}/out.txt"
<arup_r>
p test('-', file1, file2)
<arup_r>
But in my case is first code
<arup_r>
2 different file.. if contains the same content or nit
agrinb has joined #ruby
schubam has joined #ruby
yacks has joined #ruby
Tarential has joined #ruby
kvad32 has joined #ruby
philevans_ has joined #ruby
tiagonobre_ has joined #ruby
KnownSyntax__ has quit [Ping timeout: 250 seconds]
cirn0 has joined #ruby
tiagonobre has joined #ruby
urtokk has quit [Ping timeout: 240 seconds]
flughafen has quit [Ping timeout: 240 seconds]
musicmatze has quit [Ping timeout: 240 seconds]
mbwe has quit [Ping timeout: 240 seconds]
Dr3amc0d3r|away has quit [Ping timeout: 240 seconds]
shtirlic has quit [Ping timeout: 240 seconds]
Edelwin has quit [Ping timeout: 240 seconds]
tiagonobre has quit [Ping timeout: 240 seconds]
tiagonobre_ is now known as tiagonobre
shtirlic has joined #ruby
flughafen has joined #ruby
Sgeo_ has joined #ruby
Dr3amc0d3r|away has joined #ruby
Ilyas_ has joined #ruby
urtokk has joined #ruby
Edelwin has joined #ruby
Morrolan has joined #ruby
nisstyre has joined #ruby
schubam has quit [Client Quit]
mbwe has joined #ruby
Takle_ has joined #ruby
ceej_ has joined #ruby
garethrees has joined #ruby
skolman__ has joined #ruby
yfeldblu_ has joined #ruby
Sauvin has quit [Excess Flood]
soxet has joined #ruby
Takle has quit [Write error: Connection reset by peer]
swartwulf has quit [Excess Flood]
musicmatze has joined #ruby
sarkis has joined #ruby
Sauvin has joined #ruby
tvl is now known as tobiasvl
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<arup_r>
jhass: Why *path* is needed /
yfeldblum has quit [Ping timeout: 244 seconds]
Ilyas has quit [Ping timeout: 244 seconds]
_tpavel has joined #ruby
<jhass>
?
<arup_r>
What do you mean by hashing the contents ?
swartwulf has joined #ruby
<shevy>
probably store stuff into a hash
<jhass>
I mean taking the content, feeding it into a hash function and comparing the resulting hashes
cirn0 has quit [Ping timeout: 250 seconds]
skolman_ has quit [Ping timeout: 261 seconds]
Sgeo has quit [Ping timeout: 261 seconds]
<arup_r>
crome: Could you elaborate more /
<jhass>
shevy: no, not the data structure
timonv_ has joined #ruby
<jhass>
arup_r: hashing and checksum are pretty much the same thing
<arup_r>
jhass: Would you give me a Gist.. I am confused
<jhass>
no, I would give you google.com
<arup_r>
:-(
ghr has quit [Ping timeout: 263 seconds]
<wasamasa>
soon the day will come when the aspiring developer has to take the mighty search engine and solve his problems himself
chipotle has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
<shevy>
well
<shevy>
google can spit out a lot of shit
<shevy>
the only thing that gets to me is that arup_r has like 10000x more karma than I have on stackoverflow
<shevy>
how can you have so much and still ask newbie questions!!!
<shevy>
people downvote me all the time :(
<tobiasvl>
lol
<wasamasa>
what?
gccostabr has joined #ruby
<wasamasa>
helpa: google arup_r stackoverflow
<wasamasa>
._.
<tobiasvl>
shevy: aren't you the guy who thinks code shouldn't have comments?
<aedorn>
shevy: because those other people are haters of compiling from source!
<tobiasvl>
you're probably controversial on SO ;)
<shevy>
aedorn yeah
<arup_r>
shevy: I tried.... it like File.readlines(file1) == File.readlines(file2)
<jhass>
s/on SO//
<shevy>
tobiasvl nono
<shevy>
tobiasvl meaningful comments are very important
* wasamasa
wonders whether arup_r is the master troll of this place
abuzze__ has joined #ruby
yetanotherdave has joined #ruby
<arup_r>
I am tired today...
<arup_r>
I did File.readlines(file1) == File.readlines(file2)... But I didn't like it... although it is giving me correct result
<shevy>
a lot of the questions on stackoverflow are very application-specific
timgauthier has joined #ruby
<shevy>
only few ruby-centric questions
joast has quit [Ping timeout: 250 seconds]
<shevy>
"Trying to run a shell command in Rakefile"
HaniKazmi has quit [Ping timeout: 260 seconds]
<shevy>
"Is there a way to read Wordpress export file in Rails?"
<shevy>
"Hashie::Rash element access"
<shevy>
"PayPal iOS sdk - Which calls should I make from Ruby sdk on my server after Single Payment from mobile?"
<shevy>
ah well
<timgauthier>
heh
TorpedoSkyline has joined #ruby
<timgauthier>
shevy you just trying to make it ping me? :P
<shevy>
I don't even understand why you want wordpress export files from rails
<shevy>
you got pinged timgauthier?
lxsameer has joined #ruby
<shevy>
then it is time for you to get punked too!
<timgauthier>
heh
<timgauthier>
wordpress is a ping for me yeah :P
abuzze_ has quit [Ping timeout: 250 seconds]
<timgauthier>
friggen wordpress *shakes fist*
<shevy>
once a software has a critical mass, it really becomes rather unimportant in which language it is written
mkaesz has quit [Ping timeout: 255 seconds]
<timgauthier>
yup, wordpress is shit not because it is PHP, but because it is simply shit
<arup_r>
I will delete my account from StackOverflow..
<shevy>
you don't dare to
<shevy>
you are karma addicted now
<arup_r>
Then I will come here
<tobiasvl>
timgauthier: doesn't help that it's PHP though
jtz has joined #ruby
<shevy>
and ask newbie questions again
<Nowaker>
shevy: wanting to show a calendar in jquery, but doesnt show up in irb. halp
<timgauthier>
tobiasvl surely
<shevy>
arup_r are you on rubygems.org btw?
<timgauthier>
Nowaker lol
<shevy>
damn javascript
<timgauthier>
i can't get my vagrant LAMP stack to actually show pages.
<timgauthier>
just gives me a "can't find file at URL" error.
<arup_r>
No... I am not..People don't like my code.. as I don't know Good design and OOP
<timgauthier>
I know good design, and i OOD
<arup_r>
I am learning and trying to write good OOP code
<timgauthier>
and OCD, and POOP
bricker`1A has joined #ruby
garethrees is now known as ghr
TheDerpSquad has joined #ruby
riotjone_ has joined #ruby
<timgauthier>
i've been trying to figure out "object oriented CSS", what a waste lol,
<wasamasa>
lolwut
<arup_r>
I don't understand S.O.L.I.D still
<arup_r>
:(
<shevy>
arup_r see, there is more than one way in ruby
TieSoul_ has joined #ruby
sk87_ has joined #ruby
<wasamasa>
arup_r: what the hell are you even talking about
apeiros_ has joined #ruby
<shevy>
arup_r when something works, then it is ok. when it has less lines, and still works, then it is almost always better - except when it becomes unreadable
abuzze has joined #ruby
<arup_r>
wasamasa: What the hell you meant to say
<shevy>
arup_r go publish gems! you learn the most that way
<timgauthier>
or when it doesn't always work shevy
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<shevy>
well bugs happen
Alina-malina has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Ping timeout: 264 seconds]
<shevy>
it's difficult to think of all corner cases
<arup_r>
shevy: I have been rejected from companies.. as I don't write code obeying OOP
Sauvin has quit [Excess Flood]
lectrick has quit [Ping timeout: 255 seconds]
rubytor has joined #ruby
TieSoul has quit [Read error: Connection reset by peer]
<shevy>
for instance, I just changed a File.readlines('bla.bla') to File.readlines('bla.bla', :encoding => 'ascii-8bit')
<shevy>
because I have no valid encoding on my current machine right now
Alina-malina has joined #ruby
miah_ has joined #ruby
<shevy>
arup_r well then simply add more discipline into your code
maetthew has quit [Ping timeout: 260 seconds]
<timgauthier>
spare the rod, spoil the compile they say
phoo1234567 has joined #ruby
<shevy>
proper namespace, proper classes, specific concerns of your classes, documentation, and consistent tests
jso has quit [Ping timeout: 255 seconds]
miah has quit [Ping timeout: 255 seconds]
samuelkadolph has quit [Ping timeout: 255 seconds]
<timgauthier>
i suck at documentation the most, its like "how is this important later, what does this do for other people to read it", then i go back and look at my comments and i'm like, wtf? cause at some point i changed a small thing somewhere and broke it all and then my comments are fucked
bricker`LA has quit [Ping timeout: 255 seconds]
swaggus has joined #ruby
<shevy>
sinatra is actually not that easy
lectrick has joined #ruby
banister has joined #ruby
<arup_r>
That was a project given to me from the company
jso has joined #ruby
<shevy>
hey wait
madhatter has joined #ruby
abuzze__ has quit [Ping timeout: 260 seconds]
<timgauthier>
I just don't understand enough of what i'm doing, so too much of my programming is shit and thought out as i write it
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
<shevy>
you have a config.ru file
phoo1234567 has quit [Max SendQ exceeded]
jpic has joined #ruby
Sauvin has joined #ruby
Sauvin has quit [Excess Flood]
<arup_r>
That project works.. but didn't meet the standard
davzie has joined #ruby
<shevy>
so you use more than sinatra alone right?
machete has joined #ruby
mhenrixon has joined #ruby
cescalante has joined #ruby
thomasxie has joined #ruby
<shevy>
documentation is damn boring
jsaak has joined #ruby
matrixise has joined #ruby
phoo1234567 has joined #ruby
mclee has joined #ruby
papercode has joined #ruby
<arup_r>
shevy: humm :-(
abuzze_ has joined #ruby
olivier_bK has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
samuelkadolph has joined #ruby
<shevy>
well that means you also use rack right?
swaggus has quit [Client Quit]
<timgauthier>
hey, shevy help me with my vagrant instal
<timgauthier>
basically, i actually just need help getting my apache working on ubuntu vurtual machine
jakolehm has joined #ruby
Takle_ has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
I recently switched from apache to lighttpd
<shevy>
the config format of lighttpd is simpler
<timgauthier>
yeah?
<timgauthier>
i am pretty sure any web hosting i use online is going to be stuck with apache, so *puke*
<timgauthier>
is lighttpd production ready, and is it okay for php :P
<shevy>
yeah, or perhaps I learned more when I wasted hours with httpd.conf - they changed the apache config not too long ago, I think from version 2.2x to 2.4x
jusmyth1 has quit [Quit: Leaving.]
abuzze has quit [Ping timeout: 255 seconds]
yasu_ has joined #ruby
<shevy>
I dunno if it is ok for .php, but there are guides to add it (I no longer use php so I dont test, I "zipped" up all my old php code into a .tar.xz file), but all my ruby .cgi files work perfectly well, and it "feels" faster than apache too
<shevy>
but the biggest gain was the config file really :P
luckyruby has quit [Remote host closed the connection]
Fraeon has joined #ruby
snorkra has joined #ruby
<timgauthier>
my take on the whole OOC and OOP and stuff is that if i can't wrap my head around what the objects are in a project, i can't actually write the project like that.
ccooke_ has joined #ruby
abuzze_ has quit [Remote host closed the connection]
eval-in_ has joined #ruby
diego_k has joined #ruby
error404_ has joined #ruby
sumark_ has joined #ruby
sawtooth has joined #ruby
<shevy>
yeah
matrixis1 has joined #ruby
jamo_ has joined #ruby
<Nowaker>
arup_r: they rejected you for oop, right?
<arup_r>
Yes
kiki_lam1 has joined #ruby
kloeri_ has joined #ruby
abuzze has joined #ruby
QKO_ has joined #ruby
<Nowaker>
or rather, lack of oop
gkra_ has joined #ruby
certaint1 has joined #ruby
Muz_ has joined #ruby
<Nowaker>
i think you have too many includes there
<arup_r>
lack of OOP
matti_ has joined #ruby
abuzze has quit [Read error: Connection reset by peer]
matrixise has quit [Ping timeout: 255 seconds]
alex-i has quit [Ping timeout: 255 seconds]
Dr3amc0d3r|away has quit [Ping timeout: 255 seconds]
adam_ has quit [Ping timeout: 255 seconds]
autochthon has quit [Ping timeout: 255 seconds]
jamo__ has quit [Ping timeout: 255 seconds]
pr0t has quit [Ping timeout: 255 seconds]
sawtooth_ has quit [Ping timeout: 255 seconds]
cjk101010 has quit [Ping timeout: 255 seconds]
choke has quit [Ping timeout: 255 seconds]
sumark has quit [Ping timeout: 255 seconds]
ccooke has quit [Ping timeout: 255 seconds]
diegok has quit [Ping timeout: 255 seconds]
eval-in has quit [Ping timeout: 255 seconds]
jeekl has quit [Ping timeout: 255 seconds]
kiki_lamb has quit [Ping timeout: 255 seconds]
error404 has quit [Ping timeout: 255 seconds]
jso has quit [Ping timeout: 255 seconds]
matti has quit [Ping timeout: 255 seconds]
xMopxShe- has quit [Ping timeout: 255 seconds]
agjacome has quit [Ping timeout: 255 seconds]
Muz has quit [Ping timeout: 255 seconds]
omosoj has quit [Ping timeout: 255 seconds]
MindfulMonk has quit [Ping timeout: 255 seconds]
xlii has quit [Ping timeout: 255 seconds]
agjacome_ has joined #ruby
QKO has quit [Ping timeout: 255 seconds]
gkra has quit [Ping timeout: 255 seconds]
certainty has quit [Ping timeout: 255 seconds]
irk has quit [Ping timeout: 255 seconds]
ValicekB has joined #ruby
matti_ is now known as matti
<timgauthier>
lack of oop, but did they give you useful feedback?
<Nowaker>
you include things instead of just use it
<timgauthier>
by useful as in "actionable"
abuzze has joined #ruby
<shevy>
yes
<shevy>
"you suck man"
<Nowaker>
oop is about delegation, not packing everything to your class using include
irk has joined #ruby
<arup_r>
shevy I know
<shevy>
nono
<shevy>
I meant that this was their feedback :-)
<shevy>
it is not my statement, hence the "
abuzze_ has joined #ruby
mooru has joined #ruby
<arup_r>
I didn't write all Unit tests and code are not standard as per OOD.. so I got rejected.. that's the feedback
<shevy>
arup_r "[...] I have been rejected politely as my code was not properly written using OOP"
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afhammad has joined #ruby
<shevy>
ok
<shevy>
so lack of tests it was
<Nowaker>
arup_r: and i told you more about oop thing, so you know whats wrong
<timgauthier>
what do i do when i try to isntall bundler gem and it says i can't write to dir
<timgauthier>
if i sudo it doesn't htat give me shit for ages afterwards?
<shevy>
timgauthier permission?
craigp has quit [Ping timeout: 246 seconds]
<Nowaker>
and yeah, tests are important
schaary|afk has joined #ruby
autochthon has joined #ruby
Dr3amc0d3r|away has joined #ruby
<jhass>
timgauthier: "ages"?
<timgauthier>
forever
MindfulMonk has joined #ruby
_|d0m|_ has joined #ruby
xMopxShell has joined #ruby
afhammad has quit [Client Quit]
<timgauthier>
indefinite, issues due to not resolving permissions for bundler, forcing me to use sudo on all bundle commands
adam_ has joined #ruby
xlii has joined #ruby
Sammael has joined #ruby
sirecote has joined #ruby
marahin has joined #ruby
UKn0Me has joined #ruby
Kovensky has joined #ruby
gf3 has joined #ruby
jso has joined #ruby
marahin is now known as Guest9505
icedp has joined #ruby
pr0t has joined #ruby
kimosabe has joined #ruby
mroth has joined #ruby
cjk101010 has joined #ruby
choke has joined #ruby
<jhass>
well, I guess your $GEM_HOME is just not writable by your user
omosoj has joined #ruby
anekos_ has joined #ruby
<jhass>
no idea how you "resolve permissions", but mkay
kloeri has quit [Ping timeout: 624 seconds]
<arup_r>
shevy: Read the below.. so painful for me:
<arup_r>
Hello Arup. I've been taking a look in detail into your project and I'm sorry to say that I have to reject your application. There are several things in the exercise that don't meet the level of expertise that we expected. These are the most relevant:
<arup_r>
We expected a much stronger object oriented approach. We found very strange the way of calculating the report. Which makes use of send() to call the action, flexibility that I don't see needed. It also doesn't have a simple Report object that might wrap running the action of calculating the weights and exposing them through methods.
<arup_r>
The project shows poor testing. A very complex class like FileReport has no tests at all. You also mix MiniTest tests with RSpec when the rspec gem is not present in the Gemfile. Other classes like the HttpConnection, not only doesn't have the success scenarios missing, but http requests to my.workshare.com are not mocked and will actually try to reach the host.
abuzze has quit [Ping timeout: 264 seconds]
alex-i has joined #ruby
tfitts has quit [Ping timeout: 264 seconds]
<Nowaker>
why painful?
<jhass>
sounds pretty objective
patrick99e99 has joined #ruby
<Nowaker>
its about toy codec not you
TorpedoSkyline has joined #ruby
TheTopBloke has joined #ruby
<Nowaker>
you are not your code
tfitts has joined #ruby
chipotle has quit [Quit: cya]
<arup_r>
I meant.. my skills were not good.. and still not good in OOP
pu22l3r has quit [Remote host closed the connection]
<Nowaker>
meant to say: its about your code not you
<jhass>
maybe you're applying for too high positions, try gathering some in field experience with lower positions first
<arup_r>
when I got the project from them... I was aware of Ruby only
<arup_r>
.. I took sinatra to complete the project.. I thought Sinatra is _small_
atheneith has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
Bumptious has quit [Remote host closed the connection]
weeb1e has joined #ruby
Bumptious has joined #ruby
<jhass>
since how many years do you program?
<arup_r>
2 years
jeekl has joined #ruby
<arup_r>
seriously.. and 1 years casually
Dev-Gitter has quit [Quit: Leaving [Bye Everybody]]
PHP4Ever has quit [Quit: Leaving [Bye Everybody]]
FarlaTux has quit [Quit: Leaving [Bye Everybody]]
<arup_r>
total 3 years
<jhass>
any formal education or all self taught?
<Nowaker>
arup_r: then htfu and start learning instead of crying. really, its not that hard. you seem to be a rookie dev, start with some great book like the pragmatic programmer, or apprenticeship patterns.
<shevy>
arup_r well getting setbacks in life is normal, you need to keep on pushing, until you succeed
pasv has quit [Ping timeout: 255 seconds]
<shevy>
arup_r and from what I read, the main complaint was not in the design but in testing, so add more testing man
pasv has joined #ruby
<Nowaker>
accept feedback, be happy that people express in detail whats wrong with your code
<arup_r>
I have degree in Engineering... But useless..I had no goal.. while I was doing engineering
pasv is now known as Guest22356
fold has quit [Ping timeout: 260 seconds]
<timgauthier>
what sort of engineering?
<arup_r>
after completing computer science and engineering..
craigp has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
<arup_r>
I was totally confused what to do..
<arup_r>
since last 3 years I started to get good feeling in code
<Nowaker>
with your current attitude, code review, a common practise, will never work
axilla_ has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
kenneth has quit [Ping timeout: 255 seconds]
<Nowaker>
be open to feedback ane learn.
rylev has joined #ruby
<arup_r>
I am ready to learn
Takle has joined #ruby
<jhass>
and don't expect to be perfect just because you don't know any better right now, it's normal not to
<arup_r>
Sorry if my words went wrong
<timgauthier>
but you are not open to feedback
SecretAgent has quit [Ping timeout: 255 seconds]
axilla has quit [Ping timeout: 255 seconds]
jradd has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Ping timeout: 255 seconds]
wmoxam has quit [Ping timeout: 255 seconds]
<Nowaker>
i always want to be the worst in the team. that means i learn from the better, right?
<arup_r>
humm
redondos has quit [Ping timeout: 255 seconds]
badhatter_ has quit [Ping timeout: 255 seconds]
pixman has quit []
<jhass>
there's always a field where somebody else in the team is better than you
<arup_r>
for me no...
<arup_r>
That's the problem
<jhass>
like there's almost always a field where you're better than everybody else
<arup_r>
I have none who can reveiew my code and help me to get better
Takle has quit [Remote host closed the connection]
SecretAgent has joined #ruby
<arup_r>
in my daily work
gsd_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
well, this channel is pretty review friendly
ganeshran has joined #ruby
<Nowaker>
change the work
wmoxam has joined #ruby
<shevy>
arup_r you can still do the most ancient way of learning - learning through "try and error"
<timgauthier>
aka IRB :P
<aedorn>
but there is no try!
<wasamasa>
hmm, irb
<shevy>
:\
kenneth has joined #ruby
abuzze_ has quit [Remote host closed the connection]
<timgauthier>
sorry wasamasa , pry
<timgauthier>
pry and error
<wasamasa>
why on earth does irb start a second prompt when I hit enter in an empty line
<wasamasa>
every other command interpreter gives me a new prompt
<shevy>
you can change that behaviour
<timgauthier>
lol because it assumes you want a second prompt!
MCDev has joined #ruby
<timgauthier>
yeah, but does that require a recompile shevy ;)
<shevy>
I have disabled all prompts in irb
abuzze has joined #ruby
<shevy>
nah it is an IRB.conf option
<wasamasa>
I have enabled a simple prompt
<shevy>
prompts are for wimps
<wasamasa>
time to revisit my irb config
<timgauthier>
the people in vagrant are all other people looking for help, no one in there seems to actually know what the shit they are doing :(
<mostlybadfly>
Mernin
<shevy>
someone once said "how the hell can you understand what you are doing without a prompt"
iteratorP has joined #ruby
<timgauthier>
majik
<arup_r>
jhass: you are right.. I need kind of mentor.. who can slap me when I am wrong.. that's why I joined here and the other channel.. you found me in weekdays..
<mostlybadfly>
That Euler meetup was fun last night
<ganeshran>
How can I convert a nested error into a json object
sk87_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Fusl has joined #ruby
iteratorP has quit [Remote host closed the connection]
catbusters_ has quit [Quit: Connection closed for inactivity]
PaulePan1er is now known as PaulePanter
tlarevo has quit [Ping timeout: 260 seconds]
iteratorP has joined #ruby
mferrier has quit [Ping timeout: 250 seconds]
elstif has quit [Read error: Connection reset by peer]
az has joined #ruby
jonr22 has joined #ruby
iteratorP has quit [Remote host closed the connection]
sarkis has joined #ruby
elstif has joined #ruby
weeb1e has quit [Ping timeout: 240 seconds]
Dr3amc0d3r|away has quit [Quit: ZNC - http://znc.in]
gaussblurinc1 has quit [Quit: Leaving.]
Dr3amc0d3r|away has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weeb1e has joined #ruby
mupkoo has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
craigp has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
joshbamboo2 has joined #ruby
sk87 has joined #ruby
Ilyas__ has joined #ruby
<ganeshran>
Does the to_h method not work on arrays in Ruby 2.0?
paulfm has joined #ruby
<ganeshran>
any idea?
mattp_ has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
wchun has joined #ruby
<jhass>
mh, it's 2.1 I guess
agjacome_ has quit [Quit: leaving]
kristoff_ has joined #ruby
<jhass>
>> %i(a b).to_h
yfeldblum has joined #ruby
<jhass>
20>> %i(a b).to_h
_musl_ has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
eval-in__ has joined #ruby
joshbamboo1 has quit [Read error: Connection reset by peer]
Ilyas_ has quit [Read error: Connection reset by peer]
mattp___ has quit [Read error: Connection reset by peer]
yfeldblu_ has quit [Read error: Connection reset by peer]
kristofferR has quit [Read error: Connection reset by peer]
musl_ has quit [Read error: Connection reset by peer]
qpls has quit [Ping timeout: 246 seconds]
cornfeedhobo_ has quit [Ping timeout: 246 seconds]
seanmarcia_ has quit [Ping timeout: 246 seconds]
genta has quit [Read error: Connection reset by peer]
jenskarlsen has quit [Read error: Connection reset by peer]
moshee has quit [Ping timeout: 246 seconds]
Monsieur- has quit [Ping timeout: 246 seconds]
thomasfedb_ has quit [Ping timeout: 246 seconds]
rikai_ has quit [Quit: No Ping reply in 180 seconds.]
icedp has quit [Ping timeout: 246 seconds]
eval-in_ has quit [Remote host closed the connection]
charliesome has joined #ruby
mbwe has quit [Ping timeout: 246 seconds]
riking_ has quit [Ping timeout: 246 seconds]
Pro| has quit [Ping timeout: 246 seconds]
micah`_ has quit [Ping timeout: 246 seconds]
saltsa_ has quit [Ping timeout: 246 seconds]
ght_ has quit [Ping timeout: 246 seconds]
rikai has joined #ruby
qpls has joined #ruby
ght has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zeroXten_ has quit [Ping timeout: 246 seconds]
pontiki has quit [Ping timeout: 246 seconds]
pontiki has joined #ruby
micah` has joined #ruby
moshee has joined #ruby
saltsa has joined #ruby
cornfeedhobo has joined #ruby
Pro| has joined #ruby
HelperW___ has joined #ruby
lw has joined #ruby
MonsieurApple has joined #ruby
Cooler_ has quit [Read error: Connection reset by peer]
genta has joined #ruby
Cooler_ has joined #ruby
lukeholder has joined #ruby
lukeholder has quit [Max SendQ exceeded]
thomasfedb has joined #ruby
Photism has joined #ruby
seanmarcia has joined #ruby
lukeholder has joined #ruby
jenskarlsen has joined #ruby
HelperW__ has quit [Ping timeout: 245 seconds]
Azulinho has joined #ruby
davedev24_ has joined #ruby
HelperW___ has quit [Ping timeout: 260 seconds]
Riking has joined #ruby
zeroXten has joined #ruby
bearish has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
bearish has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
krz has quit [Quit: WeeChat 1.0]
jonr22 has quit [Quit: WeeChat 0.4.2]
mbwe has joined #ruby
icedp has joined #ruby
kalleth_ is now known as kalleth
sickdan is now known as halfdan
lewis_ has joined #ruby
Lewix has joined #ruby
bearish has quit [Ping timeout: 245 seconds]
craigp has joined #ruby
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
MCDev has quit [Ping timeout: 250 seconds]
jonr22 has joined #ruby
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
Pharaoh2 has joined #ruby
pandaant has quit [Remote host closed the connection]
Morkel has joined #ruby
matti has quit [Quit: Reconnecting]
matti has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
lw has quit [Quit: s]
klmlfl has joined #ruby
joast1 has joined #ruby
joast1 has quit [Client Quit]
momomomomo has joined #ruby
St_Marx has joined #ruby
moritzs has quit [Ping timeout: 260 seconds]
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
flowerha_ has quit [Remote host closed the connection]
Lewix has joined #ruby
joast has joined #ruby
lewis_ has joined #ruby
GriffinHeart has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
freerobby has joined #ruby
weeb1e has joined #ruby
devdazed has joined #ruby
iamjusthatdude has joined #ruby
klmlfl has quit [Ping timeout: 250 seconds]
the_dude has quit [Ping timeout: 260 seconds]
cirn0 has joined #ruby
dorei has joined #ruby
ccooke_ is now known as ccooke
GriffinHeart has quit [Ping timeout: 240 seconds]
doodlehaus has joined #ruby
ndRx has joined #ruby
tvw has quit []
cirn0 has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 260 seconds]
britneywright has joined #ruby
hanikazmi_ has quit [Read error: Connection reset by peer]
xfz_ has quit [Ping timeout: 260 seconds]
HaniKazmi has joined #ruby
xfz has joined #ruby
dawkirst_ has quit [Quit: Leaving...]
dawkirst has joined #ruby
preller has quit [Ping timeout: 250 seconds]
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
tvw has joined #ruby
ndrei has joined #ruby
anaeem___ has quit [Remote host closed the connection]
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anildigital is now known as zz_anildigital
devdazed has quit [Quit: Computer has gone to sleep.]
kaspertidemann has quit []
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
banister has joined #ruby
sparrovv has joined #ruby
mferrier has joined #ruby
sparrovv has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
bmurt has joined #ruby
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
flowerhack has joined #ruby
flowerhack has quit [Remote host closed the connection]
nszceta has joined #ruby
Xeago has joined #ruby
moritzs has joined #ruby
nucc has quit [Read error: Connection reset by peer]
bearish has joined #ruby
nucc has joined #ruby
orolo has joined #ruby
agrinb has quit [Ping timeout: 250 seconds]
sarkis has joined #ruby
tvw has quit []
alexju has joined #ruby
yetanotherdave has quit [Ping timeout: 260 seconds]
dolf has joined #ruby
weems|mac has joined #ruby
weems|mac has joined #ruby
<dolf>
Hi folks, can anybody explain this syntax (or point me to a url). I'm wondering what the question mark does in this context, and am assuming the command = is just the first parameter of this function with a default value? def self.lspci?(command = "lspci 2>/dev/null")
Xiti` has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
einarj has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
<dorei>
dolf: it's party of the method name, in ruby methods can end with "?"
tvw has joined #ruby
<dorei>
dolf: by convention, usually methods that end with "?" return true/false
yetanotherdave has joined #ruby
ssvo has quit [Ping timeout: 240 seconds]
nucc has quit [Quit: Computer has gone to sleep.]
Guest15440 has quit [Ping timeout: 264 seconds]
davzie has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 264 seconds]
weeb1e_ has joined #ruby
banister has quit [Ping timeout: 246 seconds]
Sawbones has joined #ruby
ssvo has joined #ruby
<dolf>
dorei, and that string after command = is simply the default value for the parameter 'command'?
<jhass>
dolf: command = just assigns a local variable command
<dorei>
yeap
linduxed has quit [Read error: Connection reset by peer]
<dolf>
is it possible to use some selector for that default value?
Morrolan has quit [Ping timeout: 255 seconds]
<jhass>
a named parameter would be command: "foo"
<shevy>
dolf "!" can also be used as last character like "?"
charliesome has quit [Quit: zzz]
spastorino has joined #ruby
<jhass>
oh, it's a def
<jhass>
nvm
weeb1e has quit [Ping timeout: 260 seconds]
<jhass>
what do you mean by selector?
yetanotherdave has quit [Ping timeout: 264 seconds]
banister has joined #ruby
<dolf>
jhass, sorry. I was wondering if I could use a ternary in that line, or if I should then extract it from the function definition itself
banister has quit [Max SendQ exceeded]
<jhass>
you could but I don't think you should
Morrolan has joined #ruby
freerobby has quit [Quit: Leaving.]
<jhass>
I'd default to something like nil and use command ||= more_complicated_expression inside the method
Takle has quit [Remote host closed the connection]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
linojon has joined #ruby
<dolf>
agreed ;)
banister has quit [Max SendQ exceeded]
banister has joined #ruby
Neomex has joined #ruby
gaussblurinc1 has joined #ruby
agrinb has joined #ruby
Ankhers has joined #ruby
Xeago has joined #ruby
Neomex_ has quit [Ping timeout: 245 seconds]
Fire-Dragon-DoL has joined #ruby
rubytor has quit [Ping timeout: 260 seconds]
Channel6 has joined #ruby
ryanleesipes has joined #ruby
sylvanica has joined #ruby
<shevy>
yeah
<shevy>
def foo(i = nil)
<shevy>
i = DEFAULT_VALUE_FROM_SOME_CONSTANT if i.nil?
Scsilver has joined #ruby
HelperW___ has joined #ruby
Mongey has quit [Ping timeout: 250 seconds]
pu22l3r_ has joined #ruby
einarj has joined #ruby
freerobby has joined #ruby
weeb1e_ has quit [Ping timeout: 246 seconds]
djcp has joined #ruby
Aranshada|W has joined #ruby
lolmaus has joined #ruby
cpruitt has joined #ruby
HelperW___ has quit [Ping timeout: 260 seconds]
rylev has quit []
<Hanmac>
jhass: did you know that ruby does support "more_complicated_expression" as default values too?
<shevy>
omg
<shevy>
Hanmac-features
<Hanmac>
;P
<jhass>
yes, I said "you could"
starkhalo has joined #ruby
weeb1e has joined #ruby
Morkel_ has joined #ruby
michaeldeol has joined #ruby
BackEndCoder has joined #ruby
michaeldeol has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 245 seconds]
Morkel_ is now known as Morkel
Cheezebox has joined #ruby
michaeldeol has joined #ruby
Mongey has joined #ruby
michaeldeol has quit [Client Quit]
ganeshran has quit [Quit: Page closed]
michaeldeol has joined #ruby
banister has quit [Ping timeout: 260 seconds]
albedoa has joined #ruby
tylerkern has joined #ruby
lsone has joined #ruby
patrick99e99 has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
tjr9898 has quit []
pu22l3r has joined #ruby
b00stfr3ak has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
patrick99e99 has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
crised has joined #ruby
<crised>
Is ruby good for implementing serial port protocols?
jakolehm has quit []
<jhass>
ruby is a good general purpose programming language, so it's not specifically good at that, but you should get along fine
banister has joined #ruby
cuppscakes has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
<crised>
jhass: looking for java alternatives, since it's not very clear when it comes to serial ports
<jhass>
heh, when is java very clear anyway
TheDerpSquad has quit [Ping timeout: 250 seconds]
Guest76686 is now known as mattyohe
cocotton has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
kaspergrubbe_ has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
lkba has joined #ruby
iamjarvo has joined #ruby
kaspergrubbe has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
<crised>
ok ruby is object oriented, that's good. unlike python. Is it interpreted, right? So it can run in x86 an arm?
<shevy>
it's the "chasing the stick" strategy - the big company can churn it down and swallow it comparatively easily but competitors may struggle when they lack the manpower to do so
TorpedoSkyline has quit [Client Quit]
<dorei>
lol @ ooxml
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
shackleford has joined #ruby
sparrovv has quit [Read error: Connection reset by peer]
shackleford has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
<shevy>
public Expr mul(Expr a, Expr b) { return env -> ( a.eval(env) * b.eval(env) ); }
<shevy>
well
<shevy>
java is now almost like ruby
<shevy>
we have -> as well after all
sparrovv has joined #ruby
gaussblurinc1 has joined #ruby
shackleford has joined #ruby
sailias has joined #ruby
bwilson has quit [Ping timeout: 240 seconds]
jack_rabbit has quit [Ping timeout: 245 seconds]
weeb1e has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
jaffachief has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
weeb1e has joined #ruby
mupkoo has quit []
jonr22 has quit [Quit: WeeChat 0.4.2]
jon22 has joined #ruby
jon22 has quit [Client Quit]
pu22l3r_ has quit [Remote host closed the connection]
jonr22 has joined #ruby
timgauthier is now known as timgauthier_isaw
pu22l3r has joined #ruby
sarkis has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
icebourg has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
cout__ is now known as cout
tvw has joined #ruby
freerobby has joined #ruby
Cheezebox has quit [Remote host closed the connection]
havenwood has joined #ruby
Cheezebox has joined #ruby
momomomomo has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bbloom has quit [Quit: Computer has gone to sleep.]
jusmyth has quit [Quit: Leaving.]
_5kg has joined #ruby
iamjarvo has joined #ruby
nucc has quit [Ping timeout: 240 seconds]
kimosabe has quit [Quit: Connection closed for inactivity]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
aganov has quit [Quit: Leaving]
genta has quit [Quit: Quit]
cocotton has joined #ruby
weeb1e has quit [Ping timeout: 250 seconds]
Cheezebox has joined #ruby
project2501a has joined #ruby
<jheg>
hey all o/
sk87 has joined #ruby
<jheg>
I have a problem i'm struggling to fix in a little game I'm building
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jheg>
basically I need the computer player to make a certain move dependent upon certain conditions
<jheg>
its almost working except ...
weeb1e has joined #ruby
gccostabr has quit [Quit: See you later!]
neoice_ is now known as neoice
<jheg>
if the computer is one move away from a winning line and so is the player and its the computers turn
<jheg>
tic tac toe btw
janmuffino has joined #ruby
<jheg>
then the computer should proceed to choose winning rather than defending
mikepack has joined #ruby
definiv has joined #ruby
<jheg>
here is my code and the issue is currently that when faced with that position it is executing every possibility in my program and essentially filling 3 squares
Cheezebox has quit [Remote host closed the connection]
<jheg>
the two in a row method is line 78 and the player2 method is below it on line 89
amargherio has joined #ruby
Cheezebox has joined #ruby
qwyeth has joined #ruby
<jheg>
any advice would be great if anyone gets a hanse to look
<jheg>
*chance
maestrojed has quit [Quit: Computer has gone to sleep.]
spyderman4g63 has joined #ruby
tagrudev has quit [Remote host closed the connection]
<jheg>
I thought that the if check on line 99 eval to true the code is executed and then exists the conditional but it seems to carry out all three checks
ddv has quit [Remote host closed the connection]
nucc has joined #ruby
<Mon_Ouie>
No, in if a then … elsif b then … elsif c then … end only the body of the first condition that is satisfied is executed
toastynerd has joined #ruby
<jheg>
as I thought so why is my code executing all three conditionals?
Cheezebox has quit [Ping timeout: 255 seconds]
Cer3bus has joined #ruby
<Mon_Ouie>
It isn't, that assumption is wrong
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
rimenes_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gccostabr has joined #ruby
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
krz has joined #ruby
afhammad has joined #ruby
<jheg>
but the body of all thee checks is executing?
walidvb has joined #ruby
marr has joined #ruby
tanath has quit [Remote host closed the connection]
St_Marx has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
end_guy has quit [Write error: Broken pipe]
Ankhers has quit [Write error: Connection reset by peer]
o0oo0o has quit [Write error: Connection reset by peer]
Boohbah has quit [Write error: Connection reset by peer]
DrCode has quit [Write error: Connection reset by peer]
<walidvb>
i'm trying to loop through an (0..n), but i'd like to loop 0 times when n= 0
cocotton has quit [Read error: Connection reset by peer]
<walidvb>
how can i do that?
cocotton_ has joined #ruby
o0oo0o has joined #ruby
St_Marx has joined #ruby
DrCode has joined #ruby
<canton7>
not entirely sure what you mean
mkaesz has joined #ruby
<canton7>
you want to loop through 1..n?
havenwood has joined #ruby
Ankhers has joined #ruby
<apeiros_>
walidvb: with n=1, would it loop once or twice? (i.e. 0 only, or 0 and 1)?
<cschneid_>
If I have several enumerable objects, and want to smush them all into a single enumerable (consume all of 1, then all of 2, etc), is there a builtin to do that
<walidvb>
apeiros_: 0 and 1
<apeiros_>
cschneid_: zip
<apeiros_>
cschneid_: assuming they have the same amount of items
timgauthier has joined #ruby
<apeiros_>
cschneid_: oh, wait, you want sequential
timgauthier has quit [Max SendQ exceeded]
<walidvb>
i have an array i loop through n times, to do smth on the array[n] object.
<apeiros_>
walidvb: in that case, (0..n).each do … end unless n.zero?
<walidvb>
oh, no, only 1, sry
ryanleesipes has quit [Ping timeout: 240 seconds]
<walidvb>
apeiros_: so you do need an unless here
<cschneid_>
apeiros_: nah, so I have obj1.each => ...., then an obj2.each ..., etc. I want to do a single object Something.new(obj1, obj2, obj3) that exausts obj1's each, then obj2's each, etc.
<canton7>
cschneid_, look at #concat, #flat_map
<apeiros_>
cschneid_: you could build a generic solution. but depending on your problem, stuff already exists
weeb1e_ has joined #ruby
Boohbah has joined #ruby
weeb1e has quit [Ping timeout: 245 seconds]
<apeiros_>
walidvb: not sure. you reverted your previous statement? n=1 would only loop through the value 0?
enebo has joined #ruby
<cschneid_>
right. the tldr is a paged api, we make several calls and have to suck all of it into a single enumerable list. I'd like to keep the underlying paging around though.
<walidvb>
yes i did
<walidvb>
sry :D
<apeiros_>
walidvb: n.times
bricker`LA has joined #ruby
<walidvb>
ah
ValicekB has quit [Ping timeout: 245 seconds]
<cschneid_>
so it's [apiresult1, apiresult2, apiresult3] -> I want to work through all records
<walidvb>
sounds perfect
icebourg_ has joined #ruby
anthonys has joined #ruby
<cschneid_>
and yeah, the generic solution is easy enough, was just wondering if it already exists :)
icebourg_ has quit [Max SendQ exceeded]
<apeiros_>
cschneid_: do they properly return an Enumerator if you call apiresult1.each without a block?
arya_ has joined #ruby
momomomomo_ has joined #ruby
<cschneid_>
I believe so, yes.
<walidvb>
apeiros_: but using times, i'd then need to store the curent index, correct?
momomomomo has quit [Ping timeout: 240 seconds]
oddraisin has quit [Ping timeout: 240 seconds]
momomomomo_ is now known as momomomomo
fnsefgj has joined #ruby
<apeiros_>
cschneid_: I don't think a generic solution exists already. I'd build one on top of .each Enumerators
<fnsefgj>
hello all, can anyone give me details on Thread.join
oddraisin has joined #ruby
<jheg>
sorted btw :) man I love ruby!
<fnsefgj>
for example, is it just thread main, which is started by ruby
kiki_lamb has joined #ruby
<canton7>
fnsefgj, you list the threads you want to join
<fnsefgj>
they all must be listed? i believe it was just for main, and where can i read about it?
Guest13407 has joined #ruby
aclearman037 has joined #ruby
<fnsefgj>
all must be joined?
timgauthier has joined #ruby
<canton7>
what are you trying to do
<fnsefgj>
docs please
pr0t has joined #ruby
<lolmaus>
I've got an array of arrays. Each inner array has exactly two items. How do iterate it similar to `.each_pair { |key, value| ... }` ?
<canton7>
Thread.join is used when you want to block the current thread until another, specified, thread finishes
fabrice31_ has joined #ruby
<canton7>
google 'ruby thread'
nhhagen_ has joined #ruby
<fnsefgj>
where do you read?
fabrice31 has quit [Read error: No route to host]
<canton7>
google 'ruby thread'
<apeiros_>
lolmaus: just like that
<canton7>
click the 'ruby-doc' link
<fnsefgj>
....
<apeiros_>
lolmaus: except .each instead of .each_pair
<fnsefgj>
canton7: does not say much
iamjarvo has joined #ruby
robbyoconnor has quit [Excess Flood]
<canton7>
says enough for me :P
<lolmaus>
apeiros_: each with two block variables?
<fnsefgj>
canton7: gives very little detail about .join, why do i need to join all threads, i belive it was just main, after all its a thread that sits on a thread that has already been joined
robbyoconnor has joined #ruby
<apeiros_>
lolmaus: yes
wallerdev has joined #ruby
<apeiros_>
fnsefgj: *why* depends on your needs
<apeiros_>
fnsefgj: you don't need to join a thread if you don't care whether it finishes
<lolmaus>
My IDE stumbles upon two variables either.
GriffinHeart has joined #ruby
nhhagen has quit [Ping timeout: 240 seconds]
<apeiros_>
lolmaus: no idea. maybe man ruby. it's a syntax thing. see splat.
mockra_ has joined #ruby
<lolmaus>
apeiros_: ah
<Phrogz>
lolmaus: .each{ |x,y| ... }
<lolmaus>
Thank you, apeiros_.
<apeiros_>
yw
apeiros_ is now known as apeiros
<cschneid_>
apeiros_: here's where I landed - assuming each thing in `ess` implements .each, this works: `e = Enumerator.new{|y| ess.each {|e| e.each { |x| y << x }}}`
<cschneid_>
well, ignore the terrible variable shadowing going on in that line. That's just me being dumb :)
<apeiros>
:)
<apeiros>
cschneid_: at a glance, looks sensible
nhhagen_ has quit [Ping timeout: 245 seconds]
<cschneid_>
yeah. Mildly surprising Enumerable doesn't implement a `+` that does exactly that
<Phrogz>
Hanmac: That happens to produce the same results, but for clarity I was not attempting to flatten an array, simply showing how one can un-splat (explode?) array values inside block parameters.
<cschneid_>
is there no shorthand to `[].inject(&:+)` ? ActiveSupport gives you `.sum` but there isn't anything built in to fold over a known function right?
<Phrogz>
fnsefgj: Main will wait on the outer thread, but if the outer thread is not waiting for the end of the inner thread, I imagine it will just end before the inner is done. Again, want a test?
Morkel has quit [Quit: Morkel]
pu22l3r_ has quit [Remote host closed the connection]
<Phrogz>
cschneid_: You can drop the &...that's a bit shorter :)
end_guy has joined #ruby
<cschneid_>
oh right, 2.something changed that.
bjz has quit [Max SendQ exceeded]
<fnsefgj>
Phrog: Ruby-Doc is not clear on .join
<cschneid_>
Phrogz: my haskell days have made me wanting monoids everywhere, So this is really "where's my mconcat?"
bearish has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pu22l3r has joined #ruby
<Phrogz>
fnsefgj: TIAS :)
weeb1e_ has quit [Quit: No Ping reply in 180 seconds.]
bjz has joined #ruby
cirn0 has quit [Ping timeout: 255 seconds]
<Phrogz>
You should be able to test in about 7 lines.
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Catzby>
Phrogz: what's TIAS stand for?
duggiefresh has joined #ruby
<Phrogz>
Sorry: Try It And See
<apeiros>
fnsefgj: threads don't have nesting
<apeiros>
fnsefgj: there is no such thing as "a thread in another thread"
weeb1e has joined #ruby
<apeiros>
that's just two threads
<Catzby>
Phrogz: ah, hehe
<fnsefgj>
thread instance inside another thread instance
<apeiros>
Phrogz example above is just two threads. they don't have any relation.
<fnsefgj>
yeah at the machine level, this is more syntax
<fnsefgj>
for scope
lmickh has joined #ruby
<Phrogz>
There. If you see 'yes', then joining the 'outer' joins the inner. If you don't, as I assume, then it does not.
<jhass>
that's block nesting then
axilla_ is now known as axilla
<jhass>
not thread nesting
timgauthier is now known as timgauthier_isaw
<apeiros>
Phrogz: joining the outer will not join the inner.
<waxjar>
to answer your question fnsefgj, no the "outer thread" will not wait on the "inner thread"
ndrei has quit [Ping timeout: 264 seconds]
<waxjar>
you'll have to wait on it somewhere
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
joining the outer only ensures the Thread.new to be actually executed. the code within the thread's block belongs to the other thread and is not joined
<fnsefgj>
waxjar: "outer thread" is infinte loop
tris- is now known as tris
<Phrogz>
fnsefgj: Then you need to join the 'outer' thread to ensure that the app doesn't quit while you're infinitely looping, but you don't need to join the 'inner' unless you break out of your loop and end the app before it's "done".
lw has joined #ruby
<Phrogz>
Er, no. Wait. That's wrong.
<Phrogz>
Or is it? I don't know. :)
<fnsefgj>
Phrogz: both threads are infinite
<Phrogz>
Your program never ever ends?
<shevy>
NEVER
<Phrogz>
That's some sweet uptime.
<fnsefgj>
Phrogz, maybe if it is signaled
<shevy>
IT IS THE MAIN PROGRAM THAT RUNS THE UNIVERSE MAN
<waxjar>
shit
<Phrogz>
fuck!
* Phrogz
leaves to join a meeting in progress. Oops.
<shevy>
lol
<shevy>
"What have you been doing man, why are you late" - "I was IRCing!"
Aaaal has quit [Quit: Aaaal]
charliesome has joined #ruby
bthesorceror has joined #ruby
<apeiros>
fnsefgj: to say it again: your thought model of inner/outer thread is broken. that does not exist. and no, no thread automatically waits on another.
claymore has joined #ruby
<apeiros>
that's what join exists for. to wait for a thread to finish (effectively blocking the thread you're currently in until the thread you join finishes)
catbusters_ has joined #ruby
catbusters_ has quit [Client Quit]
<fnsefgj>
the idea is that main will terminate before thread starts? ive already joined both thread1 = thread.new { thread2 = thread.new }
<fnsefgj>
thread1.join
catbusters_ has joined #ruby
ndrei has joined #ruby
<fnsefgj>
the idea is that main will terminate before thread starts? ive already joined both thread1 = thread.new { thread2 = thread.new { while true end }}
<apeiros>
fnsefgj: main terminates when the program exists
<apeiros>
*exits
<fnsefgj>
-both
cocotton_ has quit [Remote host closed the connection]
<waxjar>
does anyone have a link to good descriptions of the different Errno::* exceptions and their meaning?
<jhass>
man errno
<waxjar>
the ruby docs just refer to man for read(2), write(2), etc. the descriptions are a bit sparse there
<apeiros>
all errno errors are thinly wrapped C errors
<apeiros>
and iirc automatically generated
sarkis has joined #ruby
<fnsefgj>
thread1 = thread.new { thread2 = thread.new { while true print "a" end }}
weeb1e has quit [Ping timeout: 246 seconds]
<fnsefgj>
thread1.join
lsmola has joined #ruby
<apeiros>
fnsefgj: gist.github.com
<apeiros>
above code will not wait for thread2 to finish
<apeiros>
as I already stated with Phrogz' example
<fnsefgj>
apeiros: im sorry thread1 will contain an infinite loop
PsionTheory has joined #ruby
Port3M5[Work] has quit [Remote host closed the connection]
<apeiros>
fnsefgj: that doesn't change what I said
iamjarvo has joined #ruby
weeb1e has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<waxjar>
if thread2 is a short-running something, it'll probably finish before a signal interrupts thread1, but you can't garantuee it without waiting on it fnsefgj
<apeiros>
fnsefgj: but I don't see your current question
<apeiros>
(it is ok if it does not do yet what you want it to do, but it should be executable - i.e., not raise an exception)
rjhunter has quit [Remote host closed the connection]
<fnsefgj>
apeiros: those two threads run with their sleeps
<apeiros>
fnsefgj: the inf_loop method is only there for decoration?
oo_ has quit [Ping timeout: 264 seconds]
Guest44678 has quit [Ping timeout: 245 seconds]
<fnsefgj>
apeiros: ugh, its a gl routine
parduse has joined #ruby
<fnsefgj>
its a method argument setup in initialize
weeb1e has joined #ruby
<fnsefgj>
i guess thats confusing
<fnsefgj>
i will not nest their blocks
<apeiros>
anyway, still, thread1.join does NOT wait for thread2, neither for inf_loop.
maestrojed has joined #ruby
jmbrown412 has joined #ruby
Xeago_ has joined #ruby
<Phrogz>
fnsefgj: And (a polite suggestion) next time please write a Ruby program that actually runs, showcasing your problem, not pseudo-code.
roolo has quit [Quit: Leaving...]
<apeiros>
joining a thread does NOT wait for *other* threads. it only joins that thread's code. nothing else.
<fnsefgj>
apeiros:say inf_loop is called? i imagine, that thread2.join is not necessary
sailias has quit [Ping timeout: 255 seconds]
<apeiros>
fnsefgj: is called *where*?
devdazed has joined #ruby
bwilson has joined #ruby
sambao21 has joined #ruby
<fnsefgj>
where in initialize
<apeiros>
you can also just put a top-level sleep (without arg) in your app
<apeiros>
you then don't wait for threads to finish. your app just coincidentally runs long enough…
<apeiros>
which is the same case if you have two infinitely looping threads and only join one of them
<apeiros>
fnsefgj: that's the lexical where
larissa has joined #ruby
roolo has joined #ruby
<apeiros>
fnsefgj: I'll repeat once again - there. is. no. thread. nesting.
<apeiros>
lexical context is NOT execution context.
<fnsefgj>
main never exits
<Phrogz>
! That's not something I knew. I don't quite even follow it. apeiros Are you saying that a sleep without arguments sleeps forever? Will the main app never exit, or will it exit cleanly when all threads are done or sthing?
<fnsefgj>
because of thread1
emocakes has joined #ruby
<apeiros>
Phrogz: correct
Xeago has quit [Ping timeout: 260 seconds]
<Phrogz>
OK, so sleep without args is unrelated to threading. Still cool, but not what I felt at first reading.
<apeiros>
Phrogz: ruby -e 'Thread.new do loop do puts "hi"; sleep 2; end; end; sleep'
<jhass>
I don't see why you guys still bother. You repeatedly say the same things, he's repeatedly incapable to ask a proper question or even show reproducing, runnable code
<apeiros>
interestingly enough it does not raise deadlock if called without other live threads.
<Phrogz>
jhass: MINASWAN
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
you've been nice
sarkis has joined #ruby
<jhass>
and just stopping to repeat yourself but let him go back and try to actually understand what you told him is not rude
<Phrogz>
apeiros: I thought at first that you were saying that ruby -e 'Thread.new{ 3.times{ puts "hi"; sleep 1 } }; sleep' would exit after 3 seconds or something.
<apeiros>
fnsefgj: use ri in the shell or ruby-doc.org
<fnsefgj>
haha
<fnsefgj>
is this place a joke
afhammad has quit [Remote host closed the connection]
<apeiros>
fnsefgj: are you one?
afhammad has joined #ruby
<fnsefgj>
its really nice to refer people to https://www.ruby-lang.org, sometimes my google has not indexed it yet
<fnsefgj>
the topic just flew by
Guest97132 is now known as elcuervo
<apeiros>
fnsefgj: ?
<Phrogz>
"my google has not indexed it yet"
<apeiros>
fnsefgj: you're the guy who's not capable to find the docs.
<fnsefgj>
haha SHERIFF
JohnFord has joined #ruby
klmlfl has joined #ruby
moted has joined #ruby
<jhass>
you don't even read the full replies, are you?
<fnsefgj>
if everyone just read that they would be gon
davedev24_ has quit []
<jhass>
ruby- and there he stopped reading
<havenwood>
g'morning
<apeiros>
fnsefgj: oh well, welcome on my ignore. way to be nice to people who sacrifice their valuable time.
sambao21 has quit [Quit: Computer has gone to sleep.]
marco has joined #ruby
<marco>
hello
<jhass>
hi
<Phrogz>
Good morning, marco
marco is now known as Guest81865
<Guest81865>
if i use the snmp package i'll get timeouts, but with the console snmpwalk ill get my results... does any one expierence with SNMP::Manger.open... ?
mooru has joined #ruby
iamjarvo has joined #ruby
sambao21 has joined #ruby
<Phrogz>
Guest81865: If you get no responses, it's not because we're ignoring you, but likely because we don't use SNMP. I don't, any how.
danijoo has quit [Read error: Connection reset by peer]
<Mon_Ouie>
I didn't know ChanServ supported piping to grep
danijoo has joined #ruby
ffranz has joined #ruby
<Phrogz>
These newfangled computers, man.
Pumukel has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: zzz]
wallerdev has joined #ruby
etqqkoiflwhb has joined #ruby
sectionme has joined #ruby
nfk has joined #ruby
max06 has quit [Ping timeout: 260 seconds]
weeb1e has quit [Ping timeout: 260 seconds]
emmesswhy has joined #ruby
agjacome has joined #ruby
weeb1e has joined #ruby
Sht0 has quit [Ping timeout: 264 seconds]
wallerdev has quit [Ping timeout: 240 seconds]
<windblown>
I have a form that accepts a number. It is straight out of the rails guides "getting started" example. It has a submit button I have labelled "post" and I want it to execute a query a service that responds with a pile of JSON. I am getting a *No route matches [POST] "/queries/new"* routing error. I have a post method def'd in the controller. How do I correctly route a submit button to an action?
linojon has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
<Phrogz>
windblown: Probably better suited for #rubyonrails, but: are you trying to get the results asynchronously (while the user looks at the page, without leaving it) or with the page refreshing (as though the user clicked on a hyperlink and goes to a new page)?
Sauvin has joined #ruby
michaeldeol has joined #ruby
catepill1r is now known as catepillar
abuzze_ has quit [Ping timeout: 264 seconds]
fnsefgj has joined #ruby
kenneth has joined #ruby
bwilson has quit [Quit: bwilson]
<windblown>
Hey again Phrogz, there will probably be a substantial wait. I had planned to just redirect to another action when the query completed to render the JSON results. Do you have a recommendation?
cocotton has quit [Remote host closed the connection]
<windblown>
Phrogz, did I even answer the question?
BLuEGoD has joined #ruby
ndRx has quit [Remote host closed the connection]
OffTheRails has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
ndRx has joined #ruby
<Phrogz>
windblown: :) You did. My recommendation is uncertain, as it depends on the page and user needs. If the user should do nothing else until getting the results, then I would reload the page (force a modal state). If the user might do something else, or has data on the page that they don't want to lose, then I would do it asynchronously.
<windblown>
Let's say asynchronously then. What do you think?
<Phrogz>
The only problem with the asynchronous route + long delay is that the user may not realize that they were heard and try to press the button repeatedly. Then you need to handle this both on the server and client.
wallerdev has joined #ruby
<windblown>
->Phrogz Okay, noted. I can probably handle that with a css button state or something similar.
arya_ has joined #ruby
<Phrogz>
The reason I ask this is not to help with the Rails routing side -- because I don't know the answer -- but because if this is a full page load your server should be returning HTML, not JSON. JSON is only useful in this case when making an asynchronous request.
<windblown>
->Phrogz, so let's assume they like waiting and watching the little icon spin. Where should I route the submit? And more importantly, how?
<Phrogz>
So, now that I've wasted your time by confirming that you really do want async+JSON, I point you towards #rubyonrails for help on the code. :/
<windblown>
->Phrogz, thanks man.
windblown has left #ruby [#ruby]
sambao21 has joined #ruby
ndRx has quit [Ping timeout: 245 seconds]
jack_rabbit has joined #ruby
Scsilver has quit [Ping timeout: 255 seconds]
lele has quit [Ping timeout: 260 seconds]
speaking1ode has joined #ruby
speaking1ode has quit [Client Quit]
speaking1ode has joined #ruby
dkannan has joined #ruby
jobewan has joined #ruby
speaking1ode has quit [Client Quit]
etqqkoiflwhb has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 264 seconds]
speaking1ode has joined #ruby
bradleyprice has joined #ruby
etqqkoiflwhb has joined #ruby
speakingcode has quit [Disconnected by services]
davedev24_ has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 240 seconds]
sparrovv has joined #ruby
speaking1ode is now known as speakingcode
phutchins has quit [Remote host closed the connection]
rimenes has joined #ruby
windblown has joined #ruby
<windblown>
->Phrogz, what was the exact name of the ruby on rails irc? Is it open?
davedev2_ has joined #ruby
drawingthesun has joined #ruby
<Phrogz>
windblown: Type /join #rubyonrails You need to have your account registered with nickserv to speak there.
DrShoggoth has quit [Ping timeout: 240 seconds]
<windblown>
okay, thanks.
lele has joined #ruby
sparrovv has quit [Ping timeout: 260 seconds]
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HelperW___ has joined #ruby
pushpak_ has joined #ruby
tanath has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
pushpak has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 260 seconds]
ptrrr has quit [Quit: ptrrr]
DrShoggoth has joined #ruby
chrishough has joined #ruby
rimenes_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
DrShoggoth has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
windblown has quit [Quit: Page closed]
sambao21 has joined #ruby
doug1 has joined #ruby
wallerdev has quit [Quit: wallerdev]
stef_204 has joined #ruby
wallerdev has joined #ruby
patrick99e99 has joined #ruby
bigkevmcd has quit [Quit: have a fun weekend folks!]
<r2d233>
++ /scripts/functions/logging : rvm_error() 117 > printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
<r2d233>
For 404 errors check your sources configured in:
spyderman4g63 has quit [Ping timeout: 244 seconds]
<havenwood>
r2d233: And if you?: sudo apt-get update
<Phrogz>
lessless: I do not understand your question. But I can say that using threads to have ~4 parallel connections can massively improve the throughput of many network requests.
HelperW___ has joined #ruby
<Phrogz>
r2d233: PLEASE do not paste multiple lines to the window.
michaeldeol has joined #ruby
<jhass>
lessless: if you need to make a real lot of request check the typhoeus gems hydra
r2d233 has quit [Quit: Leaving]
<havenwood>
lessless: or HTTP with Celluloid::IO
tvw has joined #ruby
andrewlio has quit [Quit: Leaving.]
TieSoul is now known as TieSoul_
fabrice31 has joined #ruby
pasties has quit [Ping timeout: 250 seconds]
TieSoul_ is now known as TieSoul
blackmesa has joined #ruby
pietr0 has joined #ruby
amargherio has quit [Ping timeout: 244 seconds]
MrL0ngbowman has joined #ruby
<kenneth>
are the $stdout globals thread-local?
mikepack has joined #ruby
sambao21 has joined #ruby
ghostmoth has joined #ruby
rdavila has quit [Quit: rdavila]
* Phrogz
wants to mock the question "Are the [] globals [] local", but cannot bring himself to do it.
<jhass>
crystal has thread local globals :P
djbkd has joined #ruby
lkba has joined #ruby
rdavila has joined #ruby
asterite has joined #ruby
sylvanica has quit [Ping timeout: 260 seconds]
fabrice31 has quit [Ping timeout: 255 seconds]
rezzack has quit [Quit: Leaving.]
<Phrogz>
kenneth: What is your desire? What do you need to happen (or need not to happen)?
amargherio has joined #ruby
<kenneth>
it's a valid question. ruby has thread-local globals. e.g., the $-variables that are set after a regex.
ghr has quit [Ping timeout: 264 seconds]
echevemaster has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
wallerdev has joined #ruby
<kenneth>
anyways, i want to change the stdout IO for the main thread, without it affectign secondary threads
JohnFord has joined #ruby
<eam>
not possible
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
txdv has quit [Read error: Connection reset by peer]
weeb1e has quit [Ping timeout: 245 seconds]
<eam>
all threads share the same descriptor table
<Phrogz>
kenneth: Yes, my apologies if my comment made it seem like it was not a valid question. It was just an amusing combination of words, like "dynamic constant assignment"
txdv has joined #ruby
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
if ruby internally had some canonical way of abstracting descriptors you could fake it at the ruby level, but it doesn't
nucc has quit [Quit: Computer has gone to sleep.]
<eam>
and even then there would be a million gotchas
geggam has quit [Remote host closed the connection]
_tpavel has quit [Quit: Leaving]
mikecmpbll has joined #ruby
weeb1e has joined #ruby
<Phrogz>
kenneth: Instead of $stdout, have your own IO then in Main?
<kenneth>
hmm…
<eam>
kenneth: what's the underlying problem?
oddraisin has quit [Quit: leaving]
<Phrogz>
i.e. rewrite your code to remove implicit $stdout assumption
<kenneth>
then, what if I set $stdout to a proxy object that forwards to the right object based on the current thread… that could work
hamed_r has joined #ruby
bwilson has joined #ruby
<eam>
kenneth: $stdout isn't the canonical way to reference stdout though
Lewix has joined #ruby
lewis_ has joined #ruby
enebo has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
<eam>
when you do things like reopen it to a new location what's happening at the ruby object level isn't so important -- it's the underlying descriptor state that matters
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
IceDragon has joined #ruby
<eam>
which is state external to the ruby objects
etqqkoiflwhb has joined #ruby
cocotton has joined #ruby
<kenneth>
eam: i have a codebase with a bunch of puts. it's an http api on top of Rack. i have a middleware in production that swizzles $stdout and $stderr, and captures that in stringbuffers, and sends the content to a logging system as a structured piece of json. i only want this to happen on the main thread; anything in other threads should just send to stdout/err as usual
<eam>
ah, in that particular case if you know it's accessing $stdout specifically then changing it might achieve your goals
mijicd has joined #ruby
<eam>
(vs accessing descriptor #1 in general)
mijicd has quit [Client Quit]
djbkd has quit [Remote host closed the connection]
<kenneth>
yeah. luckily, ruby's native printing stuff accesses $stdout dirrectly, so it's been working quite well
threesixes has joined #ruby
<kenneth>
i think i might look into the proxy object trick
yacks has quit [Ping timeout: 245 seconds]
sharms has quit [Ping timeout: 240 seconds]
oo_ has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
TieSoul is now known as TieSoul_
TieSoul_ is now known as TieSoul
enebo has joined #ruby
TieSoul is now known as TieSoul_
shackleford has joined #ruby
TieSoul_ is now known as TieSoul
Spami has quit [Quit: This computer has gone to sleep]
_yez has joined #ruby
TheTopBloke has joined #ruby
jonr22 has quit [Ping timeout: 260 seconds]
binaryhat has quit [Quit: Leaving]
sharms has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
kayloos has quit [Ping timeout: 250 seconds]
IceDragon has quit [Ping timeout: 260 seconds]
yetanotherdave has joined #ruby
IceDragon has joined #ruby
IceDragon has quit [Read error: Connection reset by peer]
IcyDragon has joined #ruby
IcyDragon is now known as IceDragon
binaryhat has joined #ruby
afhammad has joined #ruby
djbkd has joined #ruby
shackleford has quit [Ping timeout: 260 seconds]
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
darkxploit has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
claymore has joined #ruby
weeb1e has joined #ruby
TieSoul is now known as TieSoul_
TieSoul_ is now known as TieSoul
bbloom has joined #ruby
kirun has joined #ruby
ari-_-e has quit [Ping timeout: 250 seconds]
Wolland has joined #ruby
Gurpartap has quit [Quit: Gurpartap]
Kricir has quit [Remote host closed the connection]
__main__ has quit [Ping timeout: 250 seconds]
Kricir has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
weeb1e has quit [Ping timeout: 246 seconds]
weeb1e_ has joined #ruby
Spami has joined #ruby
ssyrain_ has joined #ruby
Spami has quit [Client Quit]
tvw has quit []
Kricir has quit [Ping timeout: 246 seconds]
Aaaal has quit [Quit: Aaaal]
orolo has joined #ruby
Spami has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
dkannan_ has joined #ruby
dkannan has quit [Ping timeout: 240 seconds]
dkannan_ is now known as dkannan
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
ssyrain_ has quit [Remote host closed the connection]
weeb1e_ has quit [Quit: No Ping reply in 180 seconds.]
<lessless>
Phrogz, jhass, havenwood - as a developer of gem which will act as a facade to remote api should I consider using threads for performing a network requests? or the developer who will use this gem should bother with that?
dee5 has joined #ruby
<lessless>
I just started to investigated the topic and totally new to the multi-threading conception
<sweeper_>
lessless: I would consider making it asynchronous at least
_cmosguy has quit [Ping timeout: 240 seconds]
<jhass>
lessless: one API call == one request or one API call == multiple requests ?
<dee5>
I'm trying to make a small CLI project, and I can't figure out the right way how include a utils file from other files. require_relative appears to do what I want, but doesn't support ruby 1.8.7. Any ideas?
<Phrogz>
I concur with sweeper.
<sweeper_>
lessless: but it really depends on what kind of interface you want. plenty of gems leave threading as an exercise to the implementer
<lessless>
jhass, one API call - one request
<jhass>
dee5: setup $LOAD_PATH properly
<jhass>
lessless: then I'd say make it the callers business
pietr0 has quit [Quit: pietr0]
<Phrogz>
dee5: You can require File.join( File.dirname(__FILE__), ... )
<mg^>
You should totally create as many threads for as many reasons as you can think of. At least, that's the philosophy of the Java guys at my workplace, who routinely have like 8000 runnable threads in the application...
<jhass>
dee5: also 1.8 is out of official support, consider not developing new stuff against it
<dee5>
jhass: unfortunately it's the only ruby on Amazon Linux :( I've seen setting up load path with the ruby cli tool (ruby -Ilib), but haven't seen how to do it with bundler
<sweeper_>
lessless: but regardless, it really sounds like you should KISS
xcv has quit [Ping timeout: 260 seconds]
sectionme has joined #ruby
Akagi201_ has quit []
<sweeper_>
lessless: and if it's an HTTP api, use faraday
arup_r has quit [Quit: Leaving.]
<sweeper_>
so people can plug in eventmachine if they want async
<jhass>
dee5: no experience with thor, but don't you have a single entry point there too? Then just do $LOAD_PATH.unshift(File.expand_path("../to/lib", __FILE__)) before any require
<havenwood>
or instead of eventmachine, nio4r in celluloid land
<havenwood>
celluliod-io
CaptainJet has joined #ruby
<shevy>
code code code
<dee5>
much appreciated jhass and Phrogz! (:
pietr0 has joined #ruby
<havenwood>
lessless: if you're trying to solve the problem of evented or threaded http requests, there're certainly multiple Ruby HTTP gems that can do it for you
Kricir has joined #ruby
<Phrogz>
jhass: I didn't know expand_path took a reference point like that. That's nice.
<sweeper_>
just make sure you expose the underlying gem config .\/.
bbloom has quit [Quit: Computer has gone to sleep.]
axsuul has joined #ruby
<sweeper_>
so people can set things like timeouts without monkeypatching
cocotton has quit [Remote host closed the connection]
<Phrogz>
Doing a lot of programming in Lua for work, I keep wanting to use 'and' in my Ruby programming but bc of uncertainty about precedence I always type an^H^H&&
<eam>
and, or and not work just fine in perl, just sayin'
mallu0987 has quit [Quit: Page closed]
djbkd has joined #ruby
Sauvin has quit [Remote host closed the connection]
mrsolo has joined #ruby
lessless has quit [Read error: Connection reset by peer]
<shevy>
Phrogz yeah
<shevy>
I think the first time I found out was when I used something like...
<wmoxam>
Phrogz:
GGMethos has quit [Ping timeout: 264 seconds]
<shevy>
if hash.include? 'ble' and ! ble.include? 'yo' # or something like that
<wmoxam>
Phrogz: '=' has a higher precedence than 'and'
kvad32 has quit [Ping timeout: 246 seconds]
<shevy>
so I use () suddenly
<Phrogz>
Right. I knew that 'and' and 'or' are way low.
saarinen has quit [Quit: saarinen]
HelperW___ has quit [Quit: Computer has gone to sleep.]
MrL0ngbowman has quit [Remote host closed the connection]
<wmoxam>
yeah, I don't use them either
danoo2 has joined #ruby
<eam>
just put a () inside every method call and inside every use of [] or {} and it fixes this bug
mikepack has quit [Remote host closed the connection]
mooru has joined #ruby
HelperW___ has joined #ruby
<eam>
toootal parser bug
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
[], and foo() method parens don't count as precedence
michaeldeol has joined #ruby
saarinen has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasxie has quit [Remote host closed the connection]
<Phrogz>
I *love* Ruby. Don't get me wrong. It's always my go-to language. But I really do find it hard to justify telling someone to learn it when the syntax is SO 'flexible', when there are SO many special cases. They make *my* life better, but they make it so much harder to learn than, say, Lua.
cocotton has joined #ruby
bashrw has joined #ruby
cocotton has quit [Remote host closed the connection]
<Phrogz>
Lua is so simple, so consistent, and still so powerful.
Xeago_ has quit [Remote host closed the connection]
cocotton has joined #ruby
agrinb has joined #ruby
michaeldeol has quit [Client Quit]
<eam>
shevy: look at what you started
skarn has joined #ruby
<Phrogz>
p foo {bar} Whose block is that? Or is it a hash argument to foo?
britneywright has joined #ruby
<Eiam>
lol
<Eiam>
I feel like I'm listening to myself talk
michaeldeol has joined #ruby
<shevy>
lol
HelperW___ has quit [Ping timeout: 244 seconds]
agrinb has quit [Remote host closed the connection]
<waxjar>
i wish rescues syntax wasn't so weird
robbyoconnor has quit [Ping timeout: 245 seconds]
<Phrogz>
Yup.
<waxjar>
rescue X, Y, Z do |exception| would be much cleaner imo
saarinen has quit [Client Quit]
xxi is now known as ixx
michaeldeol has quit [Client Quit]
michaeldeol has joined #ruby
saarinen has joined #ruby
devyn has quit [Ping timeout: 250 seconds]
devyn has joined #ruby
jay_ has joined #ruby
darkxploit has quit [Ping timeout: 245 seconds]
dkamioka has quit [Ping timeout: 260 seconds]
jay_ is now known as rubyonrailed
danoo2 has quit [Ping timeout: 260 seconds]
CodeBunny has joined #ruby
ringarin has quit [Quit: Leaving]
shackleford has joined #ruby
cocotton has quit [Remote host closed the connection]
shackleford has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
GGMethos has joined #ruby
shackleford has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
emocakes has joined #ruby
saarinen has quit [Quit: saarinen]
dkannan has quit [Quit: dkannan]
nobitanobi has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
<nobitanobi>
hihi
lolmaus has joined #ruby
Xeago has quit [Remote host closed the connection]
roolo has joined #ruby
mkaesz has quit [Remote host closed the connection]
m1lt0n has quit [Read error: Connection reset by peer]
mallu0987 has joined #ruby
skolman has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
<mallu0987>
Can you please take a look at this and tell me why I can't call the variable snapshot_id? http://pastie.org/9513665#14
St_Marx has quit [Quit: Ex-Chat]
dkamioka has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
ylluminarious has joined #ruby
michaeldeol has joined #ruby
<pontiki>
mallu0987: is snapshot_id only set for the first time inside the volumes.each do... block?
<mallu0987>
yes
axsuul has quit [Read error: Connection reset by peer]
<pontiki>
then it doesn't have scope outside that block
dkamioka has joined #ruby
<apeiros>
mallu0987: variables only assigned to within a block are block-local
<mallu0987>
oh ok.. so If I initialize it outside of that block then it will work?
Morkel has quit [Quit: Morkel]
<apeiros>
yes
<mallu0987>
oh I see
flowerhack has joined #ruby
mfmfmfmfmfmf has quit [Remote host closed the connection]
<apeiros>
your code is odd, though
<apeiros>
snapshot_id will be an array of exactly one element - the last iteration's snapshot_ids["SnapshotId"]
<apeiros>
you could drop the whole volumes.each and only run the code volumes.last…
mfmfmfmfmfmf has joined #ruby
shackleford has quit [Remote host closed the connection]
<apeiros>
but I guess you really want to move the `snapshot_id = []` outside the loop - it resets the snapshot_id to an empty array on every iteration.
djbkd has quit [Remote host closed the connection]
<mallu0987>
I thought snapshot_id << snapshot_ids["SnapshotId"] would keep on adding to the array
<apeiros>
mallu0987: yes. but you reset it a line before.
djbkd has joined #ruby
pietr0 has joined #ruby
freerobby has quit [Quit: Leaving.]
<mallu0987>
i see
<mallu0987>
thanks
jhass|off is now known as jhass
<apeiros>
also, if all you want out of this, you should use .map
threesixes has quit [Remote host closed the connection]
paulfm has quit []
<apeiros>
and def snapshot(volume) …your code… end
<mallu0987>
ok
<apeiros>
which returns the snapshot id
dkamioka has quit [Remote host closed the connection]
<apeiros>
just my $0.02 :)
sambao21 has quit [Quit: Computer has gone to sleep.]
ghostmoth has joined #ruby
SquidId has joined #ruby
Spami has joined #ruby
<mallu0987>
Appreciate that.. thank you
St_Marx has joined #ruby
bmurt has quit []
flowerhack has quit [Remote host closed the connection]
aclearman037 has quit []
Cache_Money has joined #ruby
davedev24_ has joined #ruby
livingstn has quit []
TheDerpSquad has quit [Ping timeout: 246 seconds]
TheTopBloke has joined #ruby
sambao21 has joined #ruby
shevy has joined #ruby
pietr0 has quit [Ping timeout: 240 seconds]
<graft>
hey, is there a better way to get the chain of a class's module hierarchy besides class.name.split(/::/).map &:to_sym ?
terlar has joined #ruby
freerobby has joined #ruby
magic has quit [Ping timeout: 244 seconds]
fabrice31 has joined #ruby
TDJACR has joined #ruby
TDJACR is now known as Guest49426
maestrojed has quit [Quit: Computer has gone to sleep.]
BeanDip has joined #ruby
fold has quit [Ping timeout: 260 seconds]
craigp has quit []
mfmfmfmfmfmf has quit [Remote host closed the connection]
terlar has quit [Client Quit]
TorpedoSkyline has joined #ruby
terlar has joined #ruby
_Andres has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
Ankhers has quit [Ping timeout: 264 seconds]
mooru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pietr0 has joined #ruby
jheg has joined #ruby
<apeiros>
graft: sadly not really
rylev has joined #ruby
mfmfmfmfmfmf has joined #ruby
mooru has joined #ruby
sectionme has joined #ruby
speaking1ode has joined #ruby
rubyonrailed has joined #ruby
BeanDip has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Ping timeout: 246 seconds]
aspires has joined #ruby
<waxjar>
there is Module.nesting, but it doesn't always help
amargherio has quit [Remote host closed the connection]
qwyeth has quit [Quit: Leaving]
speakingcode has quit [Ping timeout: 260 seconds]
bricker`work has quit [Ping timeout: 244 seconds]
sectionme has quit [Ping timeout: 255 seconds]
<apeiros>
damit, *of course* MediaQueryListListener is experimental and only in FF :-S (javascript)
kyb3r_ has quit [Quit: Leaving]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
waxjar: Module.nesting is mostly unrelated
pu22l3r has quit [Ping timeout: 260 seconds]
<diegoviola>
just had a job interview with a company at 4pm, I went there and they didn't said anything, they didn't talk to me... left an hour later
<diegoviola>
that's really frustrating
<apeiros>
diegoviola: eh, what?
<dorei>
diegoviola: i'm pretty sure that you dont want to work for/cooperate with such jerks
alvaro_o has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
parduse is now known as Guest75328
parduse has joined #ruby
<diegoviola>
dorei: right
mooru has quit [Ping timeout: 260 seconds]
Guest75328 has quit [Ping timeout: 260 seconds]
x1337807x has joined #ruby
parduse is now known as Guest32009
ndrei has quit [Ping timeout: 246 seconds]
pasties has joined #ruby
emocakes has quit []
Guest49426 has quit [Ping timeout: 260 seconds]
<apeiros>
diegoviola: they literally said nothing at all?
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<diegoviola>
apeiros: right
<apeiros>
seriously, wtf? OO
<apeiros>
I'm amazed you stayed there for a full hour
__main__ has joined #ruby
<diegoviola>
apeiros: sorry, it's not a real job, it's for a remote job... I shouldn't have said "went there"
mikepack has quit [Remote host closed the connection]
<diegoviola>
english isn't my primary language, sorry
<diegoviola>
I didn't went anywhere
<diegoviola>
we were supposed to talk at 16:00 via Skype
<apeiros>
ok. but you're sure it wasn't technical issues?
<diegoviola>
I'm sure
<jhass>
or timezone fuckup?
<diegoviola>
no timezone f*ckup either
carraroj has joined #ruby
<apeiros>
we don't censor "bad" words
<diegoviola>
they know my time, I know theirs
Cache_Money has quit [Quit: Cache_Money]
<apeiros>
(we only kick people using it to insult other people ;-)
<diegoviola>
apeiros: good to know
ndrei has joined #ruby
Bumptious has quit [Remote host closed the connection]
* apeiros
finds the concept of bad words rather ridiculous
<jhass>
isn't it
<shevy>
what the f*ck
<shevy>
do I really have to f*cking now use *
<shevy>
lift this filter!!!
<diegoviola>
all words are words, why they have to be good or bad?
<apeiros>
man, I'm jealous at how fast my wife falls asleep :-O
<diegoviola>
I've just been kicked from #gentoo-chat because I said "shitty" before
<diegoviola>
kick/banned
<shevy>
haha
<shevy>
so you are a potty mouth
TDJACR_ has joined #ruby
duggiefresh has quit []
elaptics is now known as elaptics`away
grenierm has quit [Quit: grenierm]
kireevco1 has quit [Quit: Leaving.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
sooooo… TIL HDMI cables don't fit into USB ports. mhm, mhm, I see…
<graft>
diegoviola: wait, so you had a skype interview and they never called you? and after an hour you signed out of skype?
<diegoviola>
graft: yeah, pretty much
<graft>
diegoviola: that is like, way different than what you said
<jhass>
display port fits into hdmi though
<diegoviola>
graft: irght
<diegoviola>
right
<jhass>
at least on my notebook
carraroj has quit [Quit: Konversation terminated!]
<apeiros>
media queries + transition-property == awesome :D
<diegoviola>
graft: sorry should have mentioned the job was remote and I shouldn't have said "went there"
<diegoviola>
graft: it doesn't make it less shitty though? does it?
claymore has quit [Quit: Leaving]
<apeiros>
it makes it waaay less shitty
<apeiros>
but it's still shitty
spyderman4g63 has quit []
<diegoviola>
well, yeah
freerobby has quit [Quit: Leaving.]
jheg has quit [Quit: jheg]
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emmesswhy has joined #ruby
pasties has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
mkaesz has quit [Remote host closed the connection]
freerobby has joined #ruby
ldnunes has quit [Quit: Leaving]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
flowerhack has joined #ruby
pasties has joined #ruby
ryanleesipes has quit [Quit: Leaving]
InhalingPixels has quit [Remote host closed the connection]
pasties has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
flowerhack has quit [Remote host closed the connection]
pasties_ has joined #ruby
Pharaoh2_ has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pasties_ has quit [Read error: Connection reset by peer]
InhalingPixels has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has joined #ruby
OffTheRails has quit [Ping timeout: 244 seconds]
MCDev has quit [Ping timeout: 250 seconds]
_Andres has joined #ruby
doodlehaus has quit [Remote host closed the connection]
pasties has joined #ruby
andrewlio has joined #ruby
olivier_bK has quit [Ping timeout: 260 seconds]
TorpedoSkyline has joined #ruby
mfmfmfmfmfmf has quit [Remote host closed the connection]
<pontiki>
shit. piss. fuck. cunt. cocksucker. motherfucker. and tits.
<diegoviola>
nice
<pontiki>
thanks to George Carlin
caveat- has quit [Ping timeout: 260 seconds]
mfmfmfmfmfmf has joined #ruby
b00stfr3ak has quit [Ping timeout: 246 seconds]
pasties has quit [Ping timeout: 250 seconds]
<diegoviola>
motherfucker
whatasunnyday has joined #ruby
TheTopBloke has joined #ruby
afhammad has quit [Remote host closed the connection]
orolo has quit [Quit: This computer has gone to sleep]
afhammad has joined #ruby
pasties has joined #ruby
<diegoviola>
Linus said "
<diegoviola>
I like offending people, because I think people who get offended should be offended.
<diegoviola>
"
pietr0 has quit [Quit: pietr0]
<diegoviola>
does that means that the problem is within these people and not in the words?
<Boohbah>
yes
caveat- has joined #ruby
<apeiros>
while I understand linus' sentiment there, I disagree with him
<apeiros>
it's a form of unnecessary harm
OffTheRails has joined #ruby
fantazo has quit [Ping timeout: 255 seconds]
<Boohbah>
i look forward to the next release of the apeirox kernel
<apeiros>
you're in for a loooong wait :-)
qhartman has joined #ruby
yezzie has joined #ruby
andrewjanssen has joined #ruby
andrewjanssen has quit [Client Quit]
afhammad has quit [Ping timeout: 260 seconds]
olivier_bK has joined #ruby
<pontiki>
it's hard to tell if he meant that offending people was a side-effect and he can't be arsed if it is, or if he goes out of his way to offend people as a primary effect.
pasties has quit [Read error: Connection reset by peer]
<bricker`LA>
Anybody with HTTP expertise, is it better to use HEAD or OPTIONS for health checks? (via haproxy in this case)
<bricker`LA>
better meaning least overhead
pasties_ has joined #ruby
<whatasunnyday>
hey, i have a gem which embeds the fork of another gem. the directory looks like gem/lib, gem/fork. how can i tell bundler to add the fork as well when install the gem?
Bumptious has joined #ruby
benlieb has joined #ruby
<Xeago>
bricker`LA: OPTIONS makes less sense imo
<bricker`LA>
Xeago: yeah I agree, but it's the HAProxy default, which is why I'm asking
<bricker`LA>
otherwise I wouldn't have even considered options
<Xeago>
doesn't matter really
<jhass>
whatasunnyday: consider publishing and depending on the fork properly, but as a hack you can add fork/lib to your gemspecs require_paths
djbkd has quit [Remote host closed the connection]
Cheezebox has joined #ruby
<Xeago>
bricker`LA: in some weird universe, options does make more sense
<Xeago>
in a partially degraded state
<whatasunnyday>
jhass: yeah i agree with that.
<Xeago>
you can send back the capabilities left
<whatasunnyday>
jhass thanks, i’ll see if that works
djbkd has joined #ruby
doug1 has quit [Quit: WeeChat 0.4.3]
Radar_ is now known as Radar
<jhass>
whatasunnyday: not you need to include in both, files and require_paths
<jhass>
*note
caveat- has quit [Ping timeout: 260 seconds]
<bricker`LA>
Xeago: ah, yeah that does make sense. Not really a concern for us though.
mary5030 has quit [Remote host closed the connection]
<benlieb>
I just discovered require_relative. It works fine locally (1.8.7 p352) but fails with undefined method `require_relative' on my server (1.8.7p334). I can't imagine this was added in the patches between 334 and 352, but I guess it's possible. Am I missing something?
mrsolo has quit [Quit: This computer has gone to sleep]
linojon has quit [Quit: linojon]
<whatasunnyday>
jhass okay, and can i do just fork or do i have to fork/lib?
<benlieb>
And yes I know I should upgrade ruby... :)
<Xeago>
benlieb: that's fairly easy to check, install 334 locally?
<jhass>
whatasunnyday: require_paths tells rubygems what to add to the load paths when loading the gem, it defaults to 'lib', so you want to make it ['lib', 'fork/lib']
<benlieb>
Xeago: that wouldn't help me since I won't upgrade ruby on the server for this issue.
quatron has quit [Quit: quatron]
marr has quit [Read error: Connection reset by peer]
<whatasunnyday>
jhass: got it thanks
<benlieb>
I was hoping it was something else obvious
<bricker`LA>
benlieb: require_relative was actually added in 1.9
x1337807x has joined #ruby
<apeiros>
benlieb: maybe you have a patched ruby
dolf has quit [Remote host closed the connection]
Ilyas_ has joined #ruby
<bricker`LA>
benlieb: there's a gem that backports to 1.8
<bricker`LA>
benlieb: so maybe you have the gem installed locally but not on the server
<benlieb>
bricker`LA: hm
<benlieb>
whats the gem?
<apeiros>
rvm defaults to install some backport patches
<jhass>
whatasunnyday: files tells rubygems what files to include when building the gem, you need to make a list of all files, common way to do that is using something like Dir["lib/**/*", "fork/**/*"]
<bricker`LA>
require_relative ;)
Hobogrammer_ has joined #ruby
marr has joined #ruby
x1337807x has quit [Max SendQ exceeded]
sailias has quit [Ping timeout: 245 seconds]
<whatasunnyday>
jhass thank you so much for your help. really apperciate that.
<apeiros>
send, public_send and method all accept both, String and Symbol.
binaryhat has quit [Ping timeout: 244 seconds]
<apeiros>
why'd you need another way?
<cek>
just wondering
<apeiros>
there are all the variations of eval
cuppscakes has quit [Quit: Whoops, AFK.]
DEA7TH_ is now known as DEA7TH
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
duncannz has joined #ruby
<apeiros>
(instance_, class_, module_, *_exec)
riking_ is now known as Riking
Riking has quit [Changing host]
Riking has joined #ruby
starless has joined #ruby
drawingthesun has joined #ruby
andrewlio has quit [Client Quit]
binaryhat has joined #ruby
<jhass>
You could consider Symbol#to_proc a way, though that boils down to send too
<apeiros>
other than that, I'm unaware of anything which only requires the method name as prerequisite
maestrojed has joined #ruby
<apeiros>
as usual, I'm curious - ##ruby did not give you any answers? :)
avita1 has quit [Quit: Leaving.]
<jhass>
haha, lonely place
jlast_ has quit [Ping timeout: 260 seconds]
weems|mac has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<cek>
##ruby is for top elite
<apeiros>
jhass: yeah, but OTOH, it is TOTALLY BULLY FREE!
<apeiros>
and no bullshit discussion whatsoever!!!
<jhass>
##new2ruby degraded into some guys private chatroom
<apeiros>
(well, no discussion whatsoever too…)
<Hanmac>
an interesting point is with send and method missing ... if you use send on an object with a string of a method name that does not exist of that method and you does NOT define your own methodmissing, THAN that method name is not turned into a Symbol ... IF you define your own method_missing, it is
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
will you make hanmacsobscurefacts.com already?
SquidId has quit [Ping timeout: 260 seconds]
<apeiros>
+1 :)
<apeiros>
that'd actually be fun and worthwile
jonr22 has joined #ruby
<cek>
another thing is that send won't look for local vars while eval will
<apeiros>
I'd even proofread your english (as good as I can - not being a native speaker myself)
<apeiros>
cek: BS
<cek>
assuming invoking method with no args
<apeiros>
ah
<apeiros>
you mean to get the *value* of an lvar? sure. because lvars aren't methods.
<apeiros>
local_variable_get. but seriously, you're doing it *very* wrong if you need that.
chipotle has joined #ruby
<jhass>
let me add another *very* to that
<Hanmac>
you can also do obj.instance_exec { @val } or something similar
<apeiros>
helpa needs a list of synonyms for "very" :D
asuka has joined #ruby
chipotle has quit [Client Quit]
<cek>
okay, anything else other than send, Symbol.to_proc, eval?
flagg0204 has joined #ruby
kenneth has joined #ruby
renderful has joined #ruby
davzie has joined #ruby
zastern has joined #ruby
Killerkeksdose_ has joined #ruby
soxet has joined #ruby
Guest22356 has joined #ruby
atheneith has joined #ruby
zettam_ has joined #ruby
mjulian has joined #ruby
ZYPP has joined #ruby
17SAAZWA3 has joined #ruby
sarlalian has joined #ruby
jle` has joined #ruby
hydrajump has joined #ruby
Schmidt has joined #ruby
mclee has joined #ruby
mjulian has quit [Max SendQ exceeded]
<jhass>
the bad thing about a smart part/join filter: you miss the netsplit fun
<Hanmac>
cek you can also get a Method object and call that
gkra_ is now known as gkra
olivier_bK has quit [Ping timeout: 260 seconds]
jle` has quit [Max SendQ exceeded]
zettam_ has quit [Max SendQ exceeded]
kenneth has quit [Max SendQ exceeded]
17SAAZWA3 has quit [Max SendQ exceeded]
<jhass>
already listed that
axsuul has joined #ruby
flagg0204 has quit [Ping timeout: 305 seconds]
<cek>
yea, was thinking about binding, but don't yet know how to do that
renderful has quit [Ping timeout: 305 seconds]
Guest22356 has quit [Ping timeout: 305 seconds]
atheneith has quit [Ping timeout: 305 seconds]
Killerkeksdose_ has quit [Ping timeout: 305 seconds]
gtrak has joined #ruby
jpinnix has quit [Ping timeout: 250 seconds]
<apeiros>
will we do a JSON based successor to IRC already?
natewalck has quit [Ping timeout: 250 seconds]
<jhass>
I'm sure there's a XEP for that
<cek>
i use irccloud
<apeiros>
XEP? teh fuck is that?
andrewstewart has quit [Ping timeout: 250 seconds]
<jhass>
know PEPs?
<apeiros>
yeah
sambao21 has joined #ruby
<jhass>
same thing for xmpp
<apeiros>
python enigma protocol
<cek>
The IRCCloud API consists of a stream of JSON messages and a series of RPC methods.
camt has joined #ruby
<apeiros>
jhass: but but but… xmpp is ridiculously complex and xml!
davedev24_ has quit [Ping timeout: 245 seconds]
metadave has quit [Ping timeout: 250 seconds]
<jhass>
yeah, the prosody guys currently write all sorts of funny mods to filter all sorts of messages to make groupchats with > 100 people possible without overloading the server ;D
andrewstewart_ has joined #ruby
sambao21 has quit [Client Quit]
jpinnix_ has joined #ruby
natewalck has joined #ruby
<Hanmac>
apeiros: do you know about "super_method" ? ;P
<apeiros>
o0
mkaesz has joined #ruby
<apeiros>
Hanmac: actually no, I don't
<apeiros>
Hanmac: 2.2?
oo_ has joined #ruby
flowerhack has quit [Remote host closed the connection]
<Hanmac>
apeiros: yeah found it in ruby trunk: Array.instance_method(:to_s).super_method #=> #<UnboundMethod: Object(Kernel)#to_s>
<apeiros>
funky
<apeiros>
Hanmac: did you know about window.matchMedia? (JS)
afhammad has joined #ruby
cek has left #ruby ["thanks"]
<Hanmac>
hm not yet, but i dont work much with javascript ... currently newest language i work with is Haxe ;P
metadave has joined #ruby
chipotle has joined #ruby
idoru has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
avita1 has joined #ruby
TheTopBloke has joined #ruby
oo_ has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
caveat- has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
caveat- has joined #ruby
<Hanmac>
apeiros: the funky thing with super_method is with it you can like in a ancestor chain with A < B < C you can easier call C#func from A#func without needing to call B#func with super like stuff
andrewjanssen has joined #ruby
unclouded has quit [Ping timeout: 250 seconds]
nobitanobi has quit [Remote host closed the connection]
djbkd has joined #ruby
avita1 has quit [Client Quit]
DrShoggoth has quit [Quit: Leaving]
douglasssssss has joined #ruby
skarn has quit [Ping timeout: 250 seconds]
mkaesz has quit [Ping timeout: 244 seconds]
djbkd has quit [Client Quit]
TheTopBloke has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
skarn has joined #ruby
skarn is now known as Guest21595
Cache_Money has joined #ruby
rdavila has quit [Quit: rdavila]
mikepack has quit [Remote host closed the connection]
avita1 has joined #ruby
avita1 has quit [Client Quit]
qhartman has quit [Quit: Ex-Chat]
avita1 has joined #ruby
sambao21 has joined #ruby
<benzrf>
irccloud is bull
<benzrf>
cant we just use bouncers like everybody USED tony_
<benzrf>
*to
gtrak has quit [Ping timeout: 264 seconds]
<benzrf>
why do we need this proprietary "cloud" "saass" crap
<tony_>
TIL tony_ pings me
<tony_>
wow what happened to my username :(
tony_ is now known as mrapple
icebourg_ has quit []
fabrice31 has joined #ruby
upgrayeddd has joined #ruby
LnL has left #ruby [#ruby]
pietr0 has joined #ruby
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has quit [Ping timeout: 255 seconds]
rdavila has joined #ruby
ndrei has quit [Read error: No route to host]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
lol
PhilK_ is now known as PhilK
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
ndrei has joined #ruby
rimenes_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mfmfmfmfmfmf has joined #ruby
Guest21595 has joined #ruby
Guest21595 has quit [Changing host]
Guest21595 is now known as skarn
ptrrr has quit [Quit: ptrrr]
Cheezebox has joined #ruby
avita1 has quit [Quit: Leaving.]
sectionme has joined #ruby
rimenes has joined #ruby
avita1 has joined #ruby
Aaaal has joined #ruby
lmickh has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
mrsolo has joined #ruby
Neomex has quit [Quit: Leaving]
_lexjm has joined #ruby
starless has quit [Quit: Leaving]
afhammad has quit [Ping timeout: 245 seconds]
Wolland has quit [Remote host closed the connection]
Photism has joined #ruby
Wolland has joined #ruby
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
chipotle has joined #ruby
kirun has quit [Quit: Client exiting]
augur has joined #ruby
saarinen has joined #ruby
nobitanobi has joined #ruby
<augur>
any suggestions on how to wipeout ruby entirely and then install the current version?
linojon has quit [Quit: linojon]
Bumptious has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
Wolland has quit [Remote host closed the connection]
Cheezebox has joined #ruby
<havenwood>
augur: What OS/distro are you on? How'd you install Ruby to start with?
Cheezebox has quit [Read error: Connection reset by peer]
Spami has joined #ruby
Cheezebox has joined #ruby
<augur>
Mavericks 10.9.4; how i installed it is a good question. it was a while ago and i think it was with homebrew (at least the most recent install) but brew uninstall leaves ruby 1.9.3 remnants around
rdavila has quit [Quit: rdavila]
kristofferR has joined #ruby
<havenwood>
augur: Mavericks ships with two system Rubies, 1.8 and 2.0.
<augur>
when i just try `ruby` in terminal i get a complaint about a 1.9.3 lib not loading
<augur>
havenwood: oh?
<havenwood>
augur: Try?: which ruby
<augur>
/opt/local/bin/ruby
bthesorceror has joined #ruby
babykosh has joined #ruby
<havenwood>
so i'd guess that's an old Macports installation?
<babykosh>
ruby gods - I need a good resource for using R in ruby
Spami has quit [Client Quit]
<havenwood>
augur: Are you using Homebrew now?
Phrogz has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
<augur>
havenwood: it originated in macports like.. >5 years ago, yeah
<augur>
homebrew now tho
<havenwood>
augur: I'd suggest following steps to remove or disable Macports (it doesn't play well alongside Homebrew).
testcore has quit [Quit: BitchX: your way, right away]
<shevy>
babykosh how do you wanna do that?
ghr has joined #ruby
<havenwood>
augur: Once you're removed Macports, check that everything is kosher with Homebrew: brew doctor
MCDev has quit [Ping timeout: 250 seconds]
<augur>
ok
<babykosh>
@shevy hmmm I’m hunting it up for a girl…don’t know how she wants to use it
<shevy>
well you could use R separately
<havenwood>
augur: Then either brew install ruby and setup your dotfiles for RubyGems or ruby-install to /usr/local/.
caveat- has quit [Ping timeout: 260 seconds]
<shevy>
or generate .R files from ruby
<shevy>
or use ruby instead of R :>
Lewix has joined #ruby
lewis_ has joined #ruby
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Derander_ is now known as Derander
edwardloveall has quit [Quit: Leaving.]
jle` has joined #ruby
centrx has joined #ruby
<zorak>
hi
elementz has quit [Ping timeout: 246 seconds]
<zorak>
.sunday? check if a date in sunday
<shevy>
sounds like activerecord
sectionme has joined #ruby
<centrx>
ActiveSupport
<zorak>
how i check that a date IS NOT sunday?
ghr has quit [Ping timeout: 246 seconds]
<centrx>
You Rails-haters always getting your ActiveDingus messed up
<centrx>
zorak, !my_date.sunday?
<havenwood>
augur: The brew route would be `brew install ruby` for 2.1.2 then add something along the lines of `export PATH="$(brew --prefix ruby)/bin:$PATH"` to your a dotfile that gets sourced. Or the ruby-install route would be `brew install ruby-install && sudo ruby-install -i /usr/local/ ruby` and it'd already be in your PATH.
TheSojourner is now known as mjulian
avita1 has joined #ruby
<zorak>
centrx: thanks!
lewis_ has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
devyn has joined #ruby
Takle has quit [Ping timeout: 245 seconds]
hellangel7 has joined #ruby
babykosh has quit [Quit: babykosh]
ForkingPaths has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
babykosh has joined #ruby
caveat- has joined #ruby
<havenwood>
augur: I use ruby-install to install and chruby to switch. Some folk use rvm to install and switch. If you don't need to switch Rubies, the brew package may just suffice.
rjhunter has joined #ruby
marr has quit [Ping timeout: 245 seconds]
Cheezebox has quit [Remote host closed the connection]
<shevy>
switch rubies and bubies
Wolland has joined #ruby
timgauthier-mobi has joined #ruby
<augur>
havenwood: i just need to have an up to date version of ruby
timgauthier-mobi has quit [Client Quit]
edwardloveall has joined #ruby
Rollabunna has joined #ruby
<havenwood>
augur: Then the brew ruby package or building to /usr/local should be perfect.
<babykosh>
shevy thank you
babykosh has quit [Quit: babykosh]
<augur>
havenwood: do you know where bash profiles are stored on mavericks? it seems that ~/.bash_profile doesnt exist for me, but $PATH still points to /opt/local
matchaw has joined #ruby
<augur>
everything google returns is about adding to $PATH, which is of no use :\
<zorak>
If i have a class with a couple of methods, can a method use a variable generated by he oher method?d
<zorak>
*tho other
bryanhowarth has joined #ruby
<centrx>
zorak, If the methods are in the same class, you can set an instance variable in one method that is accessible by any other method in the class instance
GriffinHeart has joined #ruby
<augur>
aha, wait
<havenwood>
augur: for interactive non-login, .bashrc