<FPSDavid>
Anyone know how to make RVM stick? I run "source ~/.rvm/scripts/rvm", then "type rvm | head -n 1" says "rvm is a function". But, then if I close Terminal and re-open it, it no longer says rvm is a function
<FPSDavid>
and says "type rvm | head -n 1"
<FPSDavid>
whoops, it says "rvm is /home/david/.rvm/bin/rvm"
havenn has joined #ruby
hydrozen has joined #ruby
<fuzai>
How can I delete an element safely from an array while a do loop is iterating over it?
benlieb has joined #ruby
kaen has quit [Remote host closed the connection]
<Kovensky>
you can't
<fuzai>
ok
<Kovensky>
use a filter
<Kovensky>
or push the kosher elements to a new array
<Spooner>
fuzai, #dup the array before you delete it or yeah, use select or reject.
billy_ran_away has quit [Ping timeout: 255 seconds]
atmosx has quit [Quit: And so the story goes…]
fyolnish has joined #ruby
Banistergalaxy has joined #ruby
Playground has joined #ruby
benlieb has quit [Client Quit]
<xybre>
But now it halts on EOF and just sits there
himsin has quit [Remote host closed the connection]
main has quit [Read error: Operation timed out]
tommyvyo_ has joined #ruby
guns has quit [Quit: guns]
<xybre>
Because Ruby automatically closes the file when it sees an eof
fyolnish has quit [Remote host closed the connection]
<Spooner>
Just pipe out to system "tail" :P
jackyalcine_ has quit [Ping timeout: 252 seconds]
kiyoura has joined #ruby
<RubyPanther>
theanvah: does the PHP part do something like unpack("m*") somewhere? I don't know PHP, but that looks like a part that is different if my eyes are only half focused
<theanvah>
RubyPanther: Nope. Sorry...that was a copy and paste mistake. I was trying out m* to see if that makes a diffrence.
<theanvah>
RubyPanther: The PasswordSalt in the raw response XML in PHP and Ruby are identical.
<RubyPanther>
oh. So it was the wrong question. With no output.
<theanvah>
RubyPanther: But when I retrieve the value in PHP using its soap client vs. Ruby, the outputs are different.
jlast has quit [Remote host closed the connection]
robacarp has quit [Ping timeout: 272 seconds]
apeiros has quit [Ping timeout: 248 seconds]
jlast has joined #ruby
<swarley>
Anyone want to throw out a crazy valid ruby identifier so I can see if the range of unicode I'm using catches everything valid?
jjbohn has joined #ruby
drpaulruth has quit [Quit: drpaulruth]
chrismhough has quit [Quit: chrismhough]
chrismhough has joined #ruby
robacarp has joined #ruby
jxf has quit [Ping timeout: 260 seconds]
robacarp is now known as Guest61416
v0n has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
jxf has joined #ruby
slainer68 has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 248 seconds]
jbhewitt has joined #ruby
SCommette has quit [Quit: SCommette]
jjbohn has quit [Ping timeout: 272 seconds]
billy_ran_away has joined #ruby
Rym has quit [Read error: Connection reset by peer]
dmiller has quit [Read error: Connection reset by peer]
Rym has joined #ruby
dmiller has joined #ruby
JonnieCache has quit [Ping timeout: 256 seconds]
bapa has quit [Quit: No Ping reply in 180 seconds.]
bapa has joined #ruby
vonsar has quit [Quit: This computer has gone to sleep]
jlast has joined #ruby
<blazes816>
ಠ_ಠ
robotmay has quit [Ping timeout: 272 seconds]
NemesisD has quit [Ping timeout: 248 seconds]
lupine has quit [Ping timeout: 256 seconds]
<xybre>
Apparently there's a File::Tail gem, which does all of that. And another one IO::Tail which works for all IO objects (but seems to implement a few less features).
<reppard>
Spooner: btw, thanks for the help yesterday. I did infact figure out what the hell I was doing wrong
hoolandi has joined #ruby
jonahR has quit [Remote host closed the connection]
sjuxax has left #ruby [#ruby]
jonahR has joined #ruby
MattRB has joined #ruby
<Spooner>
reppard, I've already forgotten what I helped with, but you are welcome :D
lkba has joined #ruby
paolooo has quit [Quit: Page closed]
<reppard>
it was with rspec
paolooo has joined #ruby
<reppard>
specifically my misuse of #should_receive
<reppard>
i was incorrectly trying to use it as an assertion when it is pretty much the same as #stub
jduan1981 has quit [Read error: Operation timed out]
<reppard>
thats what i get for reading blogs rather than actual documentation
generalissimo has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<Spooner>
It is an assertion. Well, pre-assertion.
<Spooner>
stub is just a faker that doesn't care if you call it..
slainer68 has joined #ruby
hoolandi has quit [Quit: Leaving.]
yshh has joined #ruby
<reppard>
indeed, but pre-assertion is a good way to put it
hoolandi has joined #ruby
<reppard>
you can't call it in a test after the fact though, more of a before block thing
<Spooner>
Yes.
<reppard>
i was thinking it would just magically keep track of if my stubbed method was being called and i could check if it was called with should_receive
<Spooner>
Ah, I see.
woolite64 has quit [Quit: Leaving]
<reppard>
but if you use should_receive #with #and_return, it will actually stub the method and check to see if it gets called
<reppard>
very cool
sepp2k1 has quit [Read error: Connection reset by peer]
kenneth has quit [Read error: Connection reset by peer]
kenneth_ has joined #ruby
hybris has quit [Quit: hybris]
carlyle has joined #ruby
jjbohn has joined #ruby
danneu has joined #ruby
danieldocki has quit [Quit: Leaving...]
huoxito has joined #ruby
celinedior has quit [Quit: celinedior]
<yoshie902a>
havenn: thanks
<yoshie902a>
Spooner: thanks!
Jacky has quit [Quit: Quit]
Jamone has quit [Ping timeout: 256 seconds]
Jamone has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
jblack has quit [Ping timeout: 248 seconds]
slainer68 has quit [Ping timeout: 272 seconds]
Virunga has quit [Remote host closed the connection]
Goles has joined #ruby
jonathanwallace has joined #ruby
entrenador has joined #ruby
dmerrick has quit [Quit: dmerrick]
gwillickers has joined #ruby
Goles has quit [Remote host closed the connection]
Jacky has joined #ruby
gwillickers has left #ruby [#ruby]
<yoshie902a>
why does "12345623789".scan(/23/i) $~.offset(0) return [6,8] not [6,7]?
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
god has joined #ruby
gwillickers has joined #ruby
god is now known as Guest23431
halph has quit [Ping timeout: 255 seconds]
<swarley>
>> k = "123456723789"; k.scan(/23/); puts k[*$~.offset(0)]
emmanuelux has quit [Remote host closed the connection]
<swarley>
why are you moving the contents around through variables like that?
jjbohn_ has joined #ruby
taoru has joined #ruby
luckyruby has joined #ruby
fschuindt has quit [Remote host closed the connection]
<eric_>
Well inside the host.txt is a encrypted string which i wanna decrypt using that method
DatumDrop has quit [Remote host closed the connection]
<swarley>
no.
<swarley>
contents = file
icole has quit [Remote host closed the connection]
<swarley>
you're moving the text around but it's not doing anything
<eric_>
oh
<Spooner>
eric_, My suggestion was just good style (like swarley's question) not about fixing it. Either there is something odd in the file text or a bug in a specific gem.
<eric_>
right
<swarley>
Also, is the file empty?
<danneu>
Also note that the gem is over a year old
<swarley>
Is there anything being output?
<yoshie902a>
swarley: in your code puts k[*$~.offset(0)], what does the * do?
<swarley>
that's actually not what you want I would assume
<eric_>
yes there is the error and the file has a encrypted base32 string
<swarley>
but the * turns the array into a glob of arguments
jjbohn has quit [Ping timeout: 245 seconds]
<eric_>
this is in host.txt OBUW4ZZOOBXW4ZZMGY4C4MJZGMXDCOJVFY2TM===
<eric_>
hosts.txt**
bitcrave has quit [Ping timeout: 255 seconds]
twoism has quit [Remote host closed the connection]
<swarley>
yoshie902a; k[Range.new(*$~.offset(0), true)] would give you the "23" from the string
<swarley>
errr
<eric_>
idk what to do
<swarley>
no last argument
artOfWar has quit [Remote host closed the connection]
thinkclay has quit [Quit: Leaving.]
<swarley>
eric_; it's outputting that from your script?
<eric_>
yes it puts it
<eric_>
but it cant decrypt it
<danneu>
Why the $~? Can you not access the match result or something?
jaequery has quit [Quit: Computer has gone to sleep.]
<Spooner>
eric_, That gem gives me the same error with something that is definitely base32. Try base32-crockford gem instead. That seems to work for me.
c0rn_ has joined #ruby
<yoshie902a>
swarley: when I tried it alone just *$~.offset(0), I get a syntax error. a glob of arguments? can you be more specific or provide a reference to read on? This whole match set is a different language for me.
<danneu>
only one i use is `$: << "."` because i'm lazy
<eric_>
i installed using the gem command
artOfWar has quit [Ping timeout: 248 seconds]
<danneu>
eric_: usually the best way to figure a gem out is to google "ruby <gemname> github" and find its repository. the readme usually tells you what's up
<eric_>
Spooner wouldnt, the gem command install the samething
nfk has quit [Quit: yawn]
<Spooner>
I'm gradually weaning myself off $magics. Think $0 is the only one I use now.
<yoshie902a>
interesting, * is the same * for *arg
<swarley>
Spooner; $< $> are pretty useful shortcuts for STDin and STDOUT
cout has quit [Read error: Connection reset by peer]
Playground has joined #ruby
fyolnish has joined #ruby
danieldocki has quit [Ping timeout: 248 seconds]
<swarley>
and I use $: since I'm unaware of an alternative, and generally I use ARGV unless the mood strikes me
<Spooner>
Not really. $stdin and $stdout work fine (STDIN and STDOUT are the constants). $: == $LOAD_PATH, but unless you suppose 1.8, you shouldn't really need to use it.
robert_ has quit [Max SendQ exceeded]
<swarley>
I just assume that people know the ones that are used a lot
<Spooner>
*support.
<swarley>
I wouldn't just bust a $= out of no where
<RubyPanther>
My rule of thumb, the $ is always wrong if avoidable
<Spooner>
I lose my will to live if I see $' or $` or $- or just anything with $ waving a little line.
<swarley>
Yeah lol
<swarley>
I use $< $> to redirect IO
<swarley>
that's about it
<swarley>
$: to modify the path
Michael_ has quit [Remote host closed the connection]
<swarley>
I have little use for other globals
jesse- has quit [Changing host]
jesse- has joined #ruby
<swarley>
Save regular expression matches, but those can be captured with match anyway
sorbo_ has joined #ruby
<swarley>
Gah. Ruby is sort of a bitch to lex. Given how loose it is with its identifier matching
stopbit has joined #ruby
jrgifford has joined #ruby
banister`cnc has quit [Ping timeout: 272 seconds]
Michael_ has joined #ruby
Jacky has quit [Ping timeout: 252 seconds]
<swarley>
I'm trying to write a better implementation using parrot and I'm having a bitch of a time getting the lexical structure just right since the standard is so freaking expensive to get
<RubyPanther>
$: is forgivable because it is a traditional common thing that was used
<danneu>
at least $: is contextually obvious. `$: << 'somepath'.
<danneu>
most of the others come out of nowhere
<danneu>
like swarley's code. [*$~...] wat
<danneu>
that a regex? nope
jrist is now known as jrist-afk
<RubyPanther>
it is a cave painting, duh
<eric_>
Spooner
<eric_>
check pm
Kingy has quit [Quit: Leaving]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<danneu>
that's like telling someone in person to check their txt message
jonathanwallace has joined #ruby
banister`cnc has joined #ruby
jlast has joined #ruby
asym has joined #ruby
jonathanwallace has quit [Client Quit]
<swarley>
danneu; I only used $~ because it appeared whoever was talking about it wanted to make use of it
rickwinfrey has joined #ruby
jonathanwallace has joined #ruby
<yoshie902a>
so I understand this .offset is the length of the matchset string. Is this correct?
joofsh has joined #ruby
jrgifford has quit []
<Spooner>
danneu, You mean people don't do that to you?
segv- has quit [Quit: segv-]
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
bricker is now known as bricker`away
jlast has quit [Ping timeout: 260 seconds]
r3nrut_ has quit [Ping timeout: 248 seconds]
<sorbo_>
danneu, are you the same danneu who wrote the Sinatra blog tutorial? If so, wanted to say thanks.
<danneu>
sorbo_: thanks mate
<sorbo_>
danneu: Sure thing.
sorbo_ has quit [Quit: sorbo_]
<danneu>
:')
asym has quit [Ping timeout: 246 seconds]
rickwinfrey has quit [Quit: rickwinfrey]
<yoshie902a>
so annoying when people define words with the word you are trying to get the meaning of…. Returns a two-element array containing the beginning and ending offsets of the nth match. n can be a string or symbol to reference a named capture.
<yoshie902a>
offset()
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
bigmac has joined #ruby
jonathanwallace has joined #ruby
bitZero__ has quit [Read error: Connection reset by peer]
green_leaf2 has joined #ruby
cout has joined #ruby
carlyle has quit [Remote host closed the connection]
<danneu>
the beginning and end offsets are the offset distance from the offset origin.
brianpWins has quit [Quit: brianpWins]
<yoshie902a>
when I do k="012345678910"; k[3,2]; #=> "34", which to me means 3 is the starting position and I get 2 characters in the line. [3,2] does not seem to be the offset. Therefore, when you say the offset origin, where is that?
Ziioynx has joined #ruby
rakl has quit [Quit: sleeping]
c0rn has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
squidBits has quit [Quit: whoops]
maletor has quit [Quit: Computer has gone to sleep.]
<reppard>
yoshie902a: in computing counting starts at 0
<Spooner>
Except in Pascal ;)
<reppard>
is he refering to pascal?
<reppard>
i thought this was a ruby channel ;)
<yoshie902a>
reppard: sorry, subtract 1, I was not thinking
<Spooner>
You referred to "computing" not "Ruby".
<yoshie902a>
#=>"23"
<reppard>
valid point
<reppard>
irb
<reppard>
=)
Spooner has quit [Quit: Leaving]
<yoshie902a>
no correction, I was correct,
<yoshie902a>
the first time
<yoshie902a>
try the code
slainer68 has joined #ruby
<reppard>
so it looks like with k[3,2], 3 is the starting index position and 2 is +2 from the starting index
<reppard>
right?
tps_ has joined #ruby
<yoshie902a>
reppard: that is how I understand it
<yoshie902a>
reppard: so how does offset play into this?
<reppard>
what are you trying to acheive?
skcin7 has joined #ruby
eric_ has quit [Quit: Leaving]
slainer68 has quit [Read error: Operation timed out]
voodoofish has quit [Ping timeout: 276 seconds]
<yoshie902a>
reppard: understanding to get ride of my ignorance on the topic. I'm just trying to learn.
forced_request has joined #ruby
dankest has quit [Quit: Leaving...]
<reppard>
well i can surely relate to that
<yoshie902a>
is offset the first number in the offset the starting index position and the second number the ending index position+1?
gyre007 has quit [Remote host closed the connection]
MattRB has quit [Quit: This computer has gone to sleep]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
<yoshie902a>
swarley: so offset(n) actually refers to the backref of the regex
ner0x has joined #ruby
gyre007 has joined #ruby
<yoshie902a>
not the actual second or third match
<swarley>
Yes
<swarley>
Well
reset has quit [Ping timeout: 246 seconds]
gyre007 has quit [Read error: Connection reset by peer]
<yoshie902a>
well?
<swarley>
It's just not zero indexed it seems
<swarley>
So the counting begins at 1
<swarley>
>> p /(?<foo>.)(.)/.match("hi").offset
<eval-in>
swarley: Output: "/tmp/execpad-89ca33cbf575/source-89ca33cbf575:1:in `offset': wrong number of arguments(0 for 1) (ArgumentError)\n\tfrom /tmp/execpad-89ca33cbf575/source-89ca33cbf575:1:in `<main>'\n" (http://eval.in/6983)
<swarley>
hrm
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
<yoshie902a>
I think it needs to match the back ref number, for example /(1)(2)/ would need offset(1), while /(1)(2)(3)/ would need offset(2)
gyre007 has joined #ruby
DatumDrop has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
mparodi has joined #ruby
<mparodi>
Hello
gyre007 has joined #ruby
v0n has quit [Quit: WeeChat 0.3.9.2]
gyre007 has quit [Read error: Connection reset by peer]
<yoshie902a>
swarley: thanks again! I feel much better about this stuff
<mparodi>
should I really use rails' public/ dir? I find it confusing to have assets and a public dir.. do you really use it?
v0n has joined #ruby
<swarley>
No problem at all
rickwinfrey has joined #ruby
<reppard>
hello
sn0wb1rd has quit [Quit: sn0wb1rd]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
<swarley>
mparodi; try #rails
<mparodi>
I did, no one is there
io_syl has quit [Ping timeout: 252 seconds]
<mparodi>
I mean, no one is reading there
<reppard>
try #rubyonrails?
gyre007 has joined #ruby
jonahR has quit [Quit: jonahR]
gyre007 has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 248 seconds]
tjbiddle_ has joined #ruby
<yoshie902a>
#rubyonrails
<mparodi>
oh, nice.. a lot more people
<mparodi>
thanks
<shevy>
hehe
gyre007 has joined #ruby
tjbiddle_ has quit [Read error: Connection reset by peer]
<shevy>
we redirect railsers to their own channel quickly, unless it is a pure-ruby question :P
gyre007 has quit [Read error: Connection reset by peer]
<reppard>
seems to be more people active now than when i asked this earlier
io_syl has joined #ruby
<reppard>
anyone know of a meetup/user group near atlanta georgia?
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
<reppard>
i've only seen found one online and its never scheduled when i could go
DatumDrop has quit [Ping timeout: 252 seconds]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
icole has joined #ruby
bigmac has joined #ruby
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
tjbiddle has quit [Ping timeout: 272 seconds]
gyre007 has joined #ruby
jlast has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
nik_-_ has quit [Quit: nik_-_]
joeycarmello has joined #ruby
sorbo_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
pcarrier has quit []
gyre007 has joined #ruby
aaronmacy has quit [Quit: Leaving.]
<reppard>
bummer
aaronmacy has joined #ruby
Ziioynx has quit [Quit: Leaving]
pcarrier has joined #ruby
<swarley>
I don't know of any ruby meetups at all other than conferences actually
aaronmacy has quit [Client Quit]
gyre008 has quit [Remote host closed the connection]
Sou|cutter has joined #ruby
theanvah has quit [Ping timeout: 246 seconds]
<reppard>
i always them mention being part of these meetups on the rogues. i get jealous
<reppard>
i wish there was an active community around here. i dont know any other rubyists besides the guys i work with
gyre007 has quit [Ping timeout: 252 seconds]
jbw has quit [Ping timeout: 248 seconds]
<yoshie902a>
reppard: fly to chicago, there is a huge community because of DHH
liqi has joined #ruby
billy_ran_away has quit [Ping timeout: 248 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
<reppard>
yoshie902a: part of the team i am on is in chicago so i may very well fly up there sooner or later
<reppard>
i'd like to pair with the people i see on the hangout everyday
<yoshie902a>
prob. doing work for group on.. lol
malte_ has quit [Quit: malte_]
sn0wb1rd has joined #ruby
<reppard>
haha no its not group on
dhruvasagar has joined #ruby
moos3 has joined #ruby
billy_ran_away has joined #ruby
yacks has joined #ruby
<yoshie902a>
reppard: not groupon? ummm…
jeffreybaird has joined #ruby
jeffreybaird has quit [Client Quit]
paolooo has quit [Ping timeout: 245 seconds]
<reppard>
yoshie902a: no i work for company called manheim
<reppard>
niche market
liqi has quit [Ping timeout: 260 seconds]
regedarek has quit [Ping timeout: 255 seconds]
bigmac is now known as i8igmac
Targen has quit [Ping timeout: 272 seconds]
locriani_ has joined #ruby
noyb has joined #ruby
locriani has quit [Ping timeout: 255 seconds]
pskosinski has quit [Quit: Learn Life's Little Lessons]
freakazoid0223 has quit [Quit: Leaving]
Playground has quit [Read error: Connection reset by peer]
_alejandro has joined #ruby
<yoshie902a>
is there a reason a=[];a<<"hello"; p a does not return anything? I would have thought it would have printed the array with the element "hello"
Hanmac1 has joined #ruby
<heftig>
it does.
Bosma has joined #ruby
<heftig>
maybe you mean p's return value?
<heftig>
it prints to stdout, but returns nothing
<yoshie902a>
heftig: no, it does you are right, I had to close my irb session to get it working
<yoshie902a>
something went screwy
jbw has joined #ruby
<yoshie902a>
heftig: thanks
joofsh has quit [Remote host closed the connection]
jduan1981 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
f03lipe has quit [Read error: Connection reset by peer]
<shevy>
fragmachine dunno... is 1 << 16 always 65536 everywhere?
<RubyPanther>
fragmachine: if instead of 1 or 16 you have a variable :)
<fragmachine>
ahh ok
<RubyPanther>
Or if you want to clarify what the number means
eka has joined #ruby
baphled_ has joined #ruby
<shevy>
down with variables, long live the hardcoded numbers
baphled has quit [Ping timeout: 255 seconds]
sailias has quit [Quit: Leaving.]
eka has quit [Client Quit]
<fragmachine>
So it has something to do with bits being different sizes on differnt machines?
<fragmachine>
or integers I mean
dankest has quit [Quit: Leaving...]
<shevy>
I dunno. let's wait for RubyPanther to say something clever
<RubyPanther>
Mostly << is not used on ints. It is used on collections. But it does your traditional bit shifting, yeah
MattRB has joined #ruby
MattRB has quit [Remote host closed the connection]
<RubyPanther>
when you would need it you don't need it because you're writing it as a C extension :)
dmerrick has joined #ruby
vifanq has joined #ruby
<vifanq>
Hello. How to check if current ruby script is already running in other copy, and exit if so?
vlad_starkov has joined #ruby
<reppard>
ps aux | grep ruby
<shevy>
vifanq on what OS you use that
<vifanq>
shevy: linux
<shevy>
ok, you can find out the pid of your script via Process.pid, then you can use ps aux etc... to get a list of all those ruby scripts, then you can check for the filename in question, and the pid there
MattRB has joined #ruby
<shevy>
if your ruby script would create a file on startup, and remove that file on at-exit, then it would be simpler :P
<reppard>
killall -9 ruby ;)
<vifanq>
shevy: cool idea. I will use this
MattRB has quit [Client Quit]
<RubyPanther>
vifanq: I would write to a .pid file that way you can kill 0 to check if it is alive
<vifanq>
except the removal should be guaranteed somehow..
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
<gwillickers>
vifanq: look into pidfiles
vlad_starkov has quit [Ping timeout: 244 seconds]
<RubyPanther>
then you can log when it has to get killed and what the pid was, etc
JumpMast3r has quit [Quit: JumpMast3r]
<RubyPanther>
otherwise you can be flapping with no notice
<vifanq>
in shell, I can all=( `pgrep -x my-script` ); if [ "${#all}" -gt 1 ]; then
karasawa has joined #ruby
<RubyPanther>
never flap in the dark, you might crash into a wall(1)
berserkr has quit [Quit: Leaving.]
etcetera has quit []
robert___ has quit [Ping timeout: 252 seconds]
FifthWall has joined #ruby
chrismhough has quit [Quit: chrismhough]
hbpoison has quit [Ping timeout: 272 seconds]
kenneth has joined #ruby
jjbohn_ has quit [Quit: Leaving...]
ohdae has joined #ruby
<ohdae>
hey all. i have a quick question. i have 2 different scripts, where i have a hash @shadow. sometimes @shadow has data, sometimes it doesnt
<ohdae>
i check this before writing the output with if not @shadow.empty?
katherinem13_ has joined #ruby
<ohdae>
and then proceed with writing the data from the hash, if its there.
<ohdae>
in one script, that line of if not @shadow.empty? works fine. no complaints
katherinem13_ has quit [Client Quit]
dmiller has joined #ruby
katherinem13_ has joined #ruby
tps_ has quit [Read error: Connection reset by peer]
tps_ has joined #ruby
<ohdae>
but in my other script i get this error
<ohdae>
undefined method `empty?' for nil:NilClass (NoMethodError)
<ohdae>
and it's the same exact function that contains the line which is causing the error =\
kpshek has joined #ruby
katherinem13_ has quit [Client Quit]
DukeDave_ has joined #ruby
katherinem13_ has joined #ruby
<FifthWall>
So, the problem isn't that the hash is empty.
<FifthWall>
It's that @shadow is null
mercwithamouth has quit [Ping timeout: 255 seconds]
<reppard>
ohdae: are you defining @shadow in that script?
<ohdae>
oh hah. you're right.
aces23up has joined #ruby
<ohdae>
@shadow only exists if i retrieve a certain result from a http request
<ohdae>
so when that function checks if it's empty, it doesnt even exist if it is empty.
<ohdae>
or should be empty, rather
dukedave has quit [Remote host closed the connection]
<reppard>
why not do @shadow = http request stuff || {}
DukeDave_ is now known as DukeDave
danneu has quit [Ping timeout: 252 seconds]
DukeDave has quit [Remote host closed the connection]
<ohdae>
that could work
aces1up has quit [Ping timeout: 255 seconds]
dmiller has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
<ohdae>
i took the lazy route. i just put @shadow = {} before the http request
vifanq has left #ruby ["bye"]
<ohdae>
that seems wasteful though
DukeDave has joined #ruby
kpshek has quit [Ping timeout: 252 seconds]
DatumDrop has joined #ruby
cibs has quit [Quit: leaving]
crackfu has joined #ruby
jenrzzz has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
hbpoison has joined #ruby
v0n has joined #ruby
mercwithamouth has joined #ruby
reppard has quit [Ping timeout: 255 seconds]
luckyruby has quit [Remote host closed the connection]
gwillickers has quit [Quit: leaving]
alex__c2022_ has joined #ruby
ben_____ has joined #ruby
ben_____ has left #ruby [#ruby]
Zolrath has quit []
statarb3 has quit [Ping timeout: 256 seconds]
paolooo has joined #ruby
icole has quit [Remote host closed the connection]
subbyyy has joined #ruby
liqi has joined #ruby
alex__c2022 has quit [Ping timeout: 252 seconds]
alex__c2022_ is now known as alex__c2022
MattRB has joined #ruby
xibalba has joined #ruby
mparodi has quit [Ping timeout: 264 seconds]
AsgardBSD has quit [Ping timeout: 260 seconds]
Goatbert has quit [Ping timeout: 245 seconds]
DukeDave has quit [Remote host closed the connection]
<xibalba>
i'm curious what OS/Dev Environment most of you use?
jenrzzz has quit [Ping timeout: 256 seconds]
<ohdae>
OSX @ work. gnu/linux @ home.
<ohdae>
vim and/or sublimetext on both
icole has joined #ruby
<xibalba>
any particular distro choice?
<shevy>
xibalba linux, mostly following the gobolinux philosophy, but I compile everything from source
<havenn>
xibalba: OS X with TextMate 2
danneu1 has joined #ruby
<shevy>
xibalba bluefish 1.0.7 as my main editor :D
jlast has quit [Remote host closed the connection]
<xibalba>
i find alot of ruby devs use osx
syamajala has quit [Quit: leaving]
<xibalba>
sublimetext looks pretty amazing
locriani has quit [Read error: Operation timed out]
az7ar has joined #ruby
karasawa has joined #ruby
adeponte has quit [Remote host closed the connection]
Ontolog has quit [Quit: Ontolog]
cibs has joined #ruby
sayan has joined #ruby
<shevy>
at the end of the day, the most important stuff to have is the brain, notepad alone should suffice
stuartrexking has joined #ruby
karasawa has quit [Ping timeout: 246 seconds]
icole has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<txdv>
ttp://paste.ubuntu.com/1543546 - the code in the class Loop is basically boiler plate and will happen all over again, is there a way to make it shorter?
templaedhel has quit [Quit: Leaving...]
MattRB has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby
az7ar has quit [Remote host closed the connection]
<Hanmac>
it seems that the rubyzip gem is broken ... or it it is used wrong .. (i REALY need to update my libarchive gem ...)
beilabs has joined #ruby
<visof>
Hanmac: how can i do this ?
dmiller has quit [Ping timeout: 246 seconds]
<Hanmac>
show us a pastie where you used that gem
<visof>
Hanmac: do you mean Gemfile in rails ?
arturaz has joined #ruby
<Hanmac>
no i mean your app where you do "require "rubyzip""
<Hanmac>
from what i can see, the sections/files of the rubyzip gem are required/loaded in the wrong order (or multible times)
hoolandi has quit [Ping timeout: 248 seconds]
tjbiddle has quit [Quit: tjbiddle]
<visof>
Hanmac: i don't but maybe rubyzip is installed as dependent gem for other gems
chaosis has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
<Hanmac>
you should investigate them and maybe ask the guys at #bundler
mpfundstein has joined #ruby
nomenkun has joined #ruby
<apeiros>
Hanmac: reading or writing (broken rubyzip)
<Hanmac>
i dont use bundler-gemfiles and i dont use rails .. and i dont have any of such problems ...
<Hanmac>
apeiros: i mean as you can see in the pastie, the require order seems to be broken ...
<apeiros>
Hanmac: ah, not about the zip reading/writing ability, ok
jinzhu_ has joined #ruby
<apeiros>
I asked because I had to monkey-patch it in order to read some zips
jinzhu_ has quit [Client Quit]
atno is now known as afarazit
ttt has quit [Remote host closed the connection]
afarazit is now known as atno
<Hanmac>
apeiros: i maybe manage to revite my libarchive gem so with it you could do: LibArchive::new(path).each { |info,content| } .... or like that
<apeiros>
::new? really? :(
n1x has joined #ruby
<Hanmac>
ah of cause you could use .new too
<Hanmac>
(sometimes i like :: for class methods)
<apeiros>
of course, that doesn't depend on your lib. I mean that you use :: in your coding style :-p
raddazong is now known as madhatter
robotmay has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
elico has joined #ruby
bluOxigen has joined #ruby
madhatter is now known as Guest76486
Guest76486 has quit [Changing host]
Guest76486 has joined #ruby
blueOxigen has quit [Ping timeout: 255 seconds]
<Hanmac>
apeiros: currently the binary file loading of my gem is broken ... but "i can fix it" :P
Guest76486 is now known as madhatter
toekutr has quit [Remote host closed the connection]
<Hanmac>
the interesting thing is that it supports <<; like that: a = Archive.new("myarchive.tar.gz"); a << "a.rb" << "b.cpp" << "README.rdoc"
francisfish has joined #ruby
Elhu has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
elico has quit [Client Quit]
<Hanmac>
is someone else interested in an ruby-like archive manipulating interface ?
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
mpfundstein has quit [Ping timeout: 252 seconds]
blacktulip has joined #ruby
dwu1 has quit [Quit: Leaving.]
hoelzro|away is now known as hoelzro
mpfundstein has joined #ruby
Maziz has joined #ruby
asteve has joined #ruby
marr has joined #ruby
templaedhel has quit [Quit: Leaving...]
luckyruby has quit [Remote host closed the connection]
horofox has joined #ruby
djdb has quit [Remote host closed the connection]
DatumDrop has joined #ruby
yfeldblum has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
RagingDave has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
DatumDrop has quit [Ping timeout: 255 seconds]
blaxter has joined #ruby
nfk has joined #ruby
aaronmacy has quit [Quit: Leaving.]
Xeago has quit [Read error: Connection reset by peer]
karuna has quit [Quit: Konversation terminated!]
cdt has joined #ruby
aaronmacy has joined #ruby
eka has joined #ruby
Vainoharhainen has joined #ruby
jimeh has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
chriskk has quit [Quit: chriskk]
sn0wb1rd has quit [Quit: sn0wb1rd]
ryanf has quit [Quit: leaving]
tatsuya_o has joined #ruby
jgrevich has quit [Quit: jgrevich]
adambeynon has joined #ruby
hbpoison has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
eldariof has joined #ruby
Solnse has joined #ruby
baphled_ has quit [Ping timeout: 252 seconds]
horofox has quit [Quit: horofox]
slainer68 has joined #ruby
elaptics`away is now known as elaptics
tatsuya__ has joined #ruby
JonnieCache has quit [Quit: Reconnecting]
JonnieCache has joined #ruby
fyolnish has quit [Ping timeout: 252 seconds]
tatsuy___ has joined #ruby
robert_ has joined #ruby
Xeago has joined #ruby
tatsuya_o has quit [Ping timeout: 256 seconds]
robert___ has quit [Ping timeout: 245 seconds]
tatsuya__ has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
Yorzack has joined #ruby
timonv has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
a_a_g1 has joined #ruby
atmosx has joined #ruby
buscon has joined #ruby
zommi has left #ruby [#ruby]
timmow has joined #ruby
<shevy>
Hanmac YES
<shevy>
depends on the way how to use it though
a_a_g2 has joined #ruby
<shevy>
a = Archive.new
<shevy>
a.type = 'tar.xz'
a_a_g has quit [Ping timeout: 252 seconds]
<shevy>
and make it a gem :)
osaut has joined #ruby
a_a_g1 has quit [Ping timeout: 244 seconds]
<shevy>
apeiros Hanmac's ruby style is so strange, I think it has to do with the fact that he writes a lot of C++ code
<atmosx>
yeah, people who write C++ and Java are probably from Mars.
xcfdjse7en has quit [Read error: Connection reset by peer]
gyre008 has joined #ruby
hoolandi has joined #ruby
ippif has joined #ruby
Yorzack has quit [Ping timeout: 272 seconds]
ephemerian has joined #ruby
Yorzack has joined #ruby
<Hanmac>
shevy it is a gem, but its over a year old ...
<Hanmac>
and it would work like: Archive.new("file.tar.xz")
<shevy>
ok nice
rdark has joined #ruby
Solnse has quit []
<Hanmac>
or Archive.new("myown.ext",:tar, :xz)
Solnse has joined #ruby
<Hanmac>
(currenty) ... i change it maybe later to Archive.new("myown.ext",:format=>:tar,filter => :xz)
freeayu has quit [Quit: This computer has gone to sleep]
<Yorzack>
hi, need some help! a=[5,5,4,7] b=[4,5,6,6] how can i make a new array that contains all the elements in b which are also in a so that c=[4,5] and not [4,5,5]?
chaosis has joined #ruby
alejandro_ has quit [Ping timeout: 256 seconds]
<Yorzack>
i tried c=a.select {|i| b.include?(i)} but it returns [5,5,4]
Solnse2 has joined #ruby
<Hanmac>
Yorzack a & b
<Yorzack>
i need to keep duplicates if there are any
zigomir has quit [Quit: zigomir]
mydog2 has quit [Ping timeout: 260 seconds]
<Hanmac>
"so that c=[4,5] and not [4,5,5] ?"
dmerrick has quit [Quit: dmerrick]
beiter has joined #ruby
<Yorzack>
yes, because in b there is only one 5
Solnse has quit [Ping timeout: 276 seconds]
<Yorzack>
if b=[4,5,5,6] then c=[4,5,5] would be good
icole has quit [Remote host closed the connection]
Kakera has joined #ruby
Solnse has joined #ruby
<Yorzack>
i'm sorry, not very good at explaining :D
yshh has quit [Remote host closed the connection]
Solnse2 has quit [Ping timeout: 252 seconds]
freeayu has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
DatumDrop has joined #ruby
Dakuan has joined #ruby
nomenkun has joined #ruby
robert___ has joined #ruby
<Hanmac>
>> a=[5,5,4,7] b=[4,5,6,6]; p (a & b).map {|i| [i] * [a.count(i),b.count(i)].min}.flatten.sort
<eval-in>
Hanmac: Output: "/tmp/execpad-a85fd6fad49a/source-a85fd6fad49a:1: syntax error, unexpected tIDENTIFIER, expecting $end\na=[5,5,4,7] b=[4,5,6,6]; p (a & b).map {|i...\n ^\n" (http://eval.in/7008)
<Hanmac>
>> a=[5,5,4,7]; b=[4,5,6,6]; p (a & b).map {|i| [i] * [a.count(i),b.count(i)].min}.flatten.sort
<Hanmac>
shevy i seems that i must rewrite & revite my entire libarchive gem ... but its 2 years old so i think its okay ...
<shevy>
hehe
Neomex has joined #ruby
Neomex has quit [Client Quit]
mneorr has joined #ruby
mneorr_ has joined #ruby
jxf has quit [Ping timeout: 245 seconds]
tonini has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 255 seconds]
perlsyntax has joined #ruby
freeayu has quit [Quit: This computer has gone to sleep]
ViPi has joined #ruby
atmosx has quit [Quit: And so the story goes…]
chussenot has joined #ruby
aaronmacy has quit [Quit: Leaving.]
jinzhu has quit [Ping timeout: 256 seconds]
icole has joined #ruby
zaiste has joined #ruby
zaiste has left #ruby [#ruby]
dmiller has joined #ruby
foofoobar has quit [Quit: Computer has gone to sleep.]
perlsyntax has quit [Quit: Leaving]
dmiller has quit [Ping timeout: 260 seconds]
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
Maziz has quit [Quit: Maziz]
Dakuan has quit [Remote host closed the connection]
<Hanmac>
shevy: do you want to make an feature list for my archive gem what it needed to can do?
cdt has quit [Read error: Connection reset by peer]
cdt has joined #ruby
cdt has quit [Client Quit]
taoru has quit [Remote host closed the connection]
Dakuan has joined #ruby
icole has quit [Ping timeout: 260 seconds]
pcarrier has quit []
fyolnish has joined #ruby
F1skr has joined #ruby
<apeiros>
Hanmac: I have a suggestion - make it as close to Dir/File API as possible :)
<dagobah>
Trying to turn a flat datastructure of nodes=>parent_nodes to a nested tree (with a hash), any ideas? http://rubyfiddle.com/riddles/f52a0
Dakuan_ has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
Dakuan has quit [Ping timeout: 246 seconds]
Su-Shee has joined #ruby
<Su-Shee>
hi.
Neomex has joined #ruby
* hoelzro
waves
Neomex has quit [Client Quit]
<Kuifje>
hi
<Hanmac>
apeiros i try ... so i guess you want class methods too like Archive.read("my.tar.xz","myfile") ?
fyolnish has quit [Ping timeout: 244 seconds]
<shevy>
Hanmac hmm
<shevy>
Hanmac basically allow some simple control. like, if I am in a project, and want to create an archive, I want it to be as easy as possible to do so
<shevy>
I myself would not need class methods, but being able to build up the archive step-by-step would be nice
<Hanmac>
shevy and maybe in next versions ther will be support for << pathname or Dir objects too (hm i need to test if it maybe allready does)
<atmosx>
shevy: yes
<atmosx>
on linux (iirc you're on linux) requires rubygems, java and firefox)
Astrals has quit [Read error: Connection reset by peer]
karasawa has quit [Ping timeout: 252 seconds]
slainer68 has quit [Remote host closed the connection]
telli has joined #ruby
Astrals has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
karasawa has joined #ruby
vlad_starkov has joined #ruby
<shevy>
ewwww java
<shevy>
I am java free
<shevy>
atmosx I am going to finally learn C for real
vonsar has joined #ruby
<atmosx>
shevy: why?
<atmosx>
I don't see any use, seriously.
<shevy>
:(
<shevy>
what else then other than C
<atmosx>
:-P
<shevy>
java???
* Hanmac
my home pc is not 100% java free because some programms does still require it ...
DatumDrop has joined #ruby
<atmosx>
I'd go for JS and Coffescript, to be able to put up a decent web-app
<shevy>
yikes
<shevy>
I hate JS
<hoelzro>
atmosx: no use for C?
<atmosx>
hoelzro: not for me ,no.
<shevy>
atmosx you only fuel my desire for C that way ;)
zigomir has joined #ruby
<hoelzro>
oh, ok
<hoelzro>
I thought you meant objectively speaking!
adeponte has quit [Remote host closed the connection]
<atmosx>
shevy: let's say that my will to learn "everything about computers" passed when I switched from linux to mac. Then I realized that I didn't C at all.
<atmosx>
I'm not writing unix-system tools. So why C?
<Hanmac>
i think shevy wants to learn C as entry point for learning C++
<hoelzro>
atmosx: binding new libraries to Ruby and other languages?
<shevy>
atmosx I am replacing all unix tools in ruby eventually
<atmosx>
it's slow, procedural good for optimizations but, I can write an algorithm in C if all that's needed.
<hoelzro>
knowing how things work under the hood?
<shevy>
Hanmac nah, C++ should have never happened
<atmosx>
hoelzro: I leave that to ruby dev, I'm not expert in Ruby to care about bindings
atmosx has quit [Quit: Konversation terminated!]
atmosx has joined #ruby
xcfdjse7en has joined #ruby
<atmosx>
hoelzro: I don't care about under the hood at that level
xcfdjse7en has quit [Changing host]
xcfdjse7en has joined #ruby
<hoelzro>
interesting
<atmosx>
hoelzro: I understand what you're saying though.
samphippen has joined #ruby
DatumDrop has quit [Ping timeout: 256 seconds]
<atmosx>
hoelzro: most people really dont. I'd like to know, but I wont spent my time on reading kernel .h. I didn't do it when I was 24/7 on gentoo, so it's long gone path :-)
<hoelzro>
fair enough
<shevy>
nah
<atmosx>
sure, you could make the same argument to asm
<atmosx>
s/t/for
<shevy>
gentoo sucks
<shevy>
they use python, those bastards
<atmosx>
shevy: not really :-P you just need to compile all the time.
<atmosx>
haha
<atmosx>
true
<shevy>
the compiling is not the problem
<atmosx>
well it is
<shevy>
the problem is when the compiling does not work :(
<atmosx>
for me
<atmosx>
if you don't compile your system for a month or so, breaking starts
<shevy>
yeah
<shevy>
but this is also because they follow the FHS
<atmosx>
and I was tired on spending my time "on the system" I'd like to spend it "doing things WITH the system"
<shevy>
on gobolinux, just switch between different versions via symlink
timonv has quit [Remote host closed the connection]
<atmosx>
A well, didn't dig into the structure. But I'm fairly familiar with /etc and how portage works and I always the "gentoo way" instead of nasty hacks.
<shevy>
on gentoo, the only thing you have is eselect which is gay
<atmosx>
well most "gentoo ways" are nasty hacsk in a sense
timonv has joined #ruby
<shevy>
/etc is a true abomination
<atmosx>
shevy: no, I think portage is the most advanced package manager out there
<atmosx>
at least from the ones I've encountered to date
<shevy>
I have my doubts :P
<shevy>
they all stink
<atmosx>
haha
<atmosx>
you're negative by defualt
<shevy>
none of them supports appdirs
<shevy>
atmosx, no, I am on spot with my criticism
<atmosx>
appdirs
<atmosx>
macosx
<shevy>
yeah
<atmosx>
supports them, uses them actually
<atmosx>
gentoo has slots
<shevy>
that's one thing that macosx got right, except that they don't have it everywhere
<atmosx>
for different version of the same software
<shevy>
they build on the BSD filesystem right?
<atmosx>
yeah but the apps
<atmosx>
especially now with appstore and shit
<shevy>
haha
<atmosx>
they are all self-containted packages
<atmosx>
they occasionally drop a launcher but that's about it
<shevy>
yeah, that is a good thing actually, self-contained packages
<atmosx>
they don't fuck up your system or cross-link libraries etc.
<shevy>
on linux this will never happen. distributions consider one another as arch enemies
carloslopes has joined #ruby
<atmosx>
the good with macosx is that you have the cli power of linux
<atmosx>
and the beauty and stability of osx
<atmosx>
it;s like the best of the two worlds
BizarreCake has joined #ruby
<Hanmac>
shevy: suse IS the arch enemy ;P
<shevy>
except that you use apple, atmosx :P
* atmosx
is on suse right now
<atmosx>
shevy: sure
<atmosx>
shevy: I use whats best :-P
Liothen has quit [Remote host closed the connection]
<shevy>
suse is quite awful
<atmosx>
no bigotry
<atmosx>
well I like KDE
<shevy>
even debian is better than suse
includex has joined #ruby
<shevy>
and debian is really god damn awful
<atmosx>
I don't really care about distributions as long as they do what I want
<shevy>
ruby1.9 wtf were they thinking...
<atmosx>
ruby == rvm
<shevy>
versioning binaries...
<atmosx>
the defualts are fuckedup everywhere
<shevy>
yeah
<shevy>
but atmosx, the better situation would be if the need for rvm would not exist in the first place
vlad_starkov has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 252 seconds]
<Kovensky>
it would always exist
<Kovensky>
if only as a test tool
<atmosx>
see on opensuse, ruby-devel is 1.8.7p357
<shevy>
why would you need a test
<atmosx>
seriously? 1.x series? wtf
<shevy>
you can have all ruby versions in appdirs
<Kovensky>
what's wrong with 1.x
<Kovensky>
2.0 is not out yet
<Kovensky>
definitely wrong with 1.8 though
<shevy>
atmosx I'd like to test ruby 1.0 :)
<atmosx>
atmosx: I meant 1.9.x sorry
visof has quit [Quit: leaving]
ryanh has joined #ruby
Targen has quit [Ping timeout: 240 seconds]
ryanh has quit [Max SendQ exceeded]
charliesome has joined #ruby
kenneth has joined #ruby
healpay has joined #ruby
<atmosx>
brb
atmosx has quit [Remote host closed the connection]
Dakuan_ has quit [Remote host closed the connection]
Dakuan has joined #ruby
Dakuan has quit [Read error: Connection reset by peer]
ryanh has joined #ruby
Dakuan has joined #ruby
freeayu has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
beiter has quit [Ping timeout: 240 seconds]
ChampS666 has joined #ruby
banister`sleep has joined #ruby
tommyvyo_ has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
ffranz has joined #ruby
vlad_starkov has joined #ruby
chaosis has quit [Ping timeout: 272 seconds]
berserkr has joined #ruby
<Xeago>
honestly
<Xeago>
I miss brew whenever I touch my ubuntu box's
<shevy>
hehehe
<shevy>
brew is ok, written in ruby
<hoelzro>
I actually prefer apt > brew
sepp2k has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
x82_nicole has joined #ruby
pjb-d has joined #ruby
<Xeago>
how the freakshit do you list installed packages
<Xeago>
it is not apt
<Xeago>
or apt-get
<JonnieCache>
apt-cache
<Xeago>
it is freakin dpkg --list
zarubin has joined #ruby
<Xeago>
the aptitude ui is kinda nice
dmiller has joined #ruby
<pjb-d>
Hi! is WEBrick working in a separate thread? I start a webrick server and then launch synchronously commands (hg) to access this server, but it hangs.
<Xeago>
atleast I can find everything I want there..
<JonnieCache>
Xeago: aptitude search '~i' is actually what you want
<JonnieCache>
aptitude fixes a lot of the crappiness of apt-*
atmosx has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
jfl0wers has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
<pjb-d>
Ah, no, it' WEBrick.Server.start that blocks.
ippif has quit [Quit: Computer has gone to sleep.]
binaryplease has joined #ruby
krz has quit [Quit: krz]
hbpoison has joined #ruby
fyolnish has quit [Ping timeout: 248 seconds]
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
carlzulauf has quit [Ping timeout: 260 seconds]
<Xeago>
thanks JonnieCache!
elaptics is now known as elaptics`away
<Hanmac>
JonnieCache i like apt-get and dpkg a bit more, but aptitude has nice system for matching packages ... like show me all not automatic installed packs that are in the depends of an automatic installed package
malte_ has quit [Quit: malte_]
carlzulauf has joined #ruby
vonsar has quit [Ping timeout: 256 seconds]
jfl0wers has quit [Quit: jfl0wers]
nkts has joined #ruby
karasawa has quit [Ping timeout: 246 seconds]
larissa has joined #ruby
karasawa has joined #ruby
pcarrier has joined #ruby
Virunga has joined #ruby
tommylommykins has quit [Disconnected by services]
asteve has quit [Quit: Computer has gone to sleep.]
browndawg has joined #ruby
binaryplease has quit [Read error: Operation timed out]
binaryplease has joined #ruby
emocakes has joined #ruby
vonsar has joined #ruby
<Xeago>
damnit I need a coverpage for my graduation documents
DatumDrop has joined #ruby
<Xeago>
any designer :3?
atno has quit [Read error: Connection reset by peer]
atno_ has joined #ruby
pcarrier has quit [Ping timeout: 244 seconds]
statarb3 has quit [Ping timeout: 255 seconds]
<workmad3>
Xeago: isn't there a standard university or school coverpage for it?
foofoobar has quit [Quit: Computer has gone to sleep.]
hoolandi has quit [Read error: Connection reset by peer]
hoolandi1 has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
TomyLobo has joined #ruby
emergion has joined #ruby
pskosinski has joined #ruby
pavilionXP has quit [Excess Flood]
bitZero__ has joined #ruby
insulator has joined #ruby
pavilionXP has joined #ruby
Hanmac has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
x82_nicole has quit [Quit: Computer has gone to sleep.]
n1x has joined #ruby
cdt has joined #ruby
bitZero__ has quit [Remote host closed the connection]
berserkr has quit [Quit: Leaving.]
adkron has quit [Ping timeout: 252 seconds]
Dakuan has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
statarb3 has joined #ruby
<pjb-d>
I have this error: ~/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate ruby2ruby-2.0.2, because sexp_processor-3.2.0 conflicts with sexp_processor (~> 4.0) (Gem::LoadError)
<pjb-d>
How should I proceed?
DatumDrop has joined #ruby
bluOxigen has joined #ruby
skaczor has joined #ruby
elaptics`away is now known as elaptics
mark_locklear has joined #ruby
affix has left #ruby ["Leaving"]
<banister`sleep>
pjb-d: y r u on ruby 1.8
<pjb-d>
Yes, 1.8.7
<banister`sleep>
pjb-d: that's going to be killed any day now
<pjb-d>
Well, it's used here for cucumber, etc.
<pjb-d>
Any other version and the setup is broken.
<banister`sleep>
pjb-d: i dont use cucumber but i'm 100% sure it will work with ruby 1.9
<pjb-d>
It's 1.8.7-p370, not p371
<pjb-d>
You know, continuous integration servers, production, etc.
<banister`sleep>
pjb-d: ok, well, just a heads up. You should probably convince your team to move to 1.9 because i dont think #ruby or rubyists in general are going to be particularly forthcoming about supporting an obsolete ruby version for much longer, it's already holding the community back
<pjb-d>
Before we can change a version… It'll impact tens of people.
<pjb-d>
banister`sleep: I agree. If only Ruby had a standard like Common Lisp, we could converge onto it!
<banister`sleep>
pjb-d: ruby has an ISO standard, not sure what version it's based on though
<pjb-d>
That's great!
DatumDrop has quit [Ping timeout: 252 seconds]
<banister`sleep>
pjb-d: anyway regarding your bug, looks like oyu have two gems installed that have conflicting dependencies, so you should uninstall one of them
gyre008 has quit [Remote host closed the connection]
<banister`sleep>
pjb-d: best to ask on #ruby-lang where the gem author lives
gyre007_ has quit [Remote host closed the connection]
<pjb-d>
Ok, thanks.
<banister`sleep>
pjb-d: zenspider is his name,
drago757 has joined #ruby
main has joined #ruby
zz_chrismcg is now known as chrismcg
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
iamjarvo has joined #ruby
pjb-d is now known as pjb
r0bby_ has joined #ruby
<pjb>
Well, it seems I can't send to #ruby-lang. Perhaps because I'm a lisper?
<banister`sleep>
pjb: you need to be logged in to nickserv
sailias has joined #ruby
<pjb>
I am, as pjb.
<banister`sleep>
pjb: were you banned at some point?
<banister`sleep>
pjb: msg zenspider or drbrain or apeiros
<Xeago>
apeiros: also admin on #ruby-lang woot
<Xeago>
that guy must be famous
<pjb>
I don't think so. Last time I had to use ruby was three years ago, and I didn't use irc that much from work, so…
lolmaus has quit []
hoolandi1 has quit [Quit: Leaving.]
<Mon_Ouie>
I think the ISO standard is 1.8-based
Elhu has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
gyre007 has joined #ruby
dougireton has quit [Quit: Leaving.]
nateberkopec has joined #ruby
bitZero__ has quit [Ping timeout: 256 seconds]
<gearaholic>
I would like to build a simple GUI app in ruby, the kicker is it needs to be cross platform, it will only be used internally at work. I was looking at QT and or JRuby with SWT or Swing. Any one have experience with either and care to share?
security has joined #ruby
Dakuan has quit [Remote host closed the connection]
<Hanmac>
gearaholic i can point you at wxRuby and rwx too (or does it need to work with jruby?)
megha has quit [Ping timeout: 248 seconds]
alex__c2022_ has joined #ruby
<gearaholic>
Hanmac: nope, no requirements for jruby.
Dakuan has joined #ruby
security is now known as megha
<gearaholic>
It just needs to run on windows and mac
statarb3 has quit [Read error: Connection reset by peer]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
IrishGringo has joined #ruby
<gearaholic>
It's gonna be for time tracking and connenct to our billing system
jerius has joined #ruby
<shevy>
gearaholic I used to use ruby-gtk in the past
<shevy>
but I cant get it compiled anymore
<Hanmac>
wxWidgets and ths both gems i show you works that the GUIs looks native on the system
F1skr has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
tps_ has joined #ruby
alex__c2022 has quit [Ping timeout: 272 seconds]
alex__c2022_ is now known as alex__c2022
timonv has quit [Remote host closed the connection]
<gearaholic>
Hanmac: does wxRuby require anything special to be installed on the users computers before using? like to i have to install wxWidgets on everyones pcs first?
tobiasvl has quit [Ping timeout: 256 seconds]
Dakuan has quit [Ping timeout: 240 seconds]
DavidLevin has joined #ruby
DavidLevin has quit [Max SendQ exceeded]
<Hanmac>
yes, same for rwx
<shevy>
they will always need something installed
<shevy>
even for the ruby bindings to tcl/tk, they would need tcl/tk
bitZero__ has joined #ruby
<ericwood>
ugh, I hate Tk
jfl0wers has joined #ruby
<Hanmac>
"Tk - before retro was cool"
<ericwood>
I used to write a bunch of horrible horrible Tkinter code back in my high school / python days
<ericwood>
tried pushing it to its limits, it turns out it's quite limited :P
<banisterfiend>
b4ch: then get: "the ruby programming language"
<banisterfiend>
b4ch: by o'reilly
<hoelzro>
"The Ruby Programming Language"++
<banisterfiend>
it's based on k&r in terms of layout, apparently
<b4ch>
Thanks
fyolnish has quit [Remote host closed the connection]
<banisterfiend>
so it's quite terse cmpared to the more discursive ones like proggramming ruby
<b4ch>
great
jonathanwallace has quit [Ping timeout: 244 seconds]
jrajav has joined #ruby
zoozanaghe has joined #ruby
anonymuse has quit [Quit: Leaving.]
thisirs has joined #ruby
Apocalypse has joined #ruby
anonymuse has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
Goles has quit [Quit: Computer has gone to sleep.]
atno_ has joined #ruby
mmitchell has joined #ruby
jfl0wers has joined #ruby
pcarrier has quit []
jfl0wers has quit [Remote host closed the connection]
jfl0wers has joined #ruby
atno has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
kold_ has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
hashpuppy has quit [Quit: hashpuppy]
timonv has quit [Remote host closed the connection]
joshman_ has joined #ruby
vonsar has quit [Quit: This computer has gone to sleep]
robert___ has joined #ruby
d2dchat has quit [Remote host closed the connection]
b4ch has quit [Quit: Leaving]
timonv_ has joined #ruby
robert_ has quit [Ping timeout: 260 seconds]
apeiros has quit [Remote host closed the connection]
horofox has joined #ruby
F1skr has joined #ruby
MattRB has joined #ruby
insulator has quit [Ping timeout: 276 seconds]
freeayu has quit [Remote host closed the connection]
whitedawg has quit [Quit: Leaving.]
timonv_ has quit [Ping timeout: 252 seconds]
zoozanaghe has quit [K-Lined]
a_a_g has joined #ruby
insulator has joined #ruby
fyolnish has joined #ruby
delphaber has joined #ruby
wmoxam has quit [Quit: leaving]
<delphaber>
Hi #ruby :) Anyone using jasmine-gem in a non-rails project? How can I change default directory structure. I can't find anything on github :(
banisterfiend has quit [Remote host closed the connection]
<epitron>
what's a good gem for parsing natural language date/times? like "5 days from now"
DatumDrop has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
matchaw__ has quit [Ping timeout: 248 seconds]
DatumDrop has joined #ruby
dougireton has joined #ruby
jblack has quit [Ping timeout: 252 seconds]
tjbiddle has joined #ruby
drfreeze_ has joined #ruby
tjbiddle has quit [Client Quit]
Rym has joined #ruby
nkr has joined #ruby
daniel_- has joined #ruby
drfreeze has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ruby
matchaw_ has joined #ruby
yshh has quit [Remote host closed the connection]
philcrissman has joined #ruby
ffranz has quit [Ping timeout: 246 seconds]
etcetera has joined #ruby
philcrissman has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
philcrissman has joined #ruby
jonahR has quit [Quit: jonahR]
willob has joined #ruby
pencilcheck has joined #ruby
willob has quit [Max SendQ exceeded]
berserkr has joined #ruby
willob has joined #ruby
spugster has joined #ruby
pcarrier has joined #ruby
spugster is now known as Spug
piotr_ has quit [Ping timeout: 272 seconds]
Spug is now known as tobiasvl
jxf has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
RubNoob has quit [Ping timeout: 256 seconds]
Rym has quit [Quit: Rym]
whowantstolivefo has quit [Ping timeout: 248 seconds]
jblack has joined #ruby
telli has quit [Remote host closed the connection]
woolite64 has joined #ruby
baroquebobcat has joined #ruby
hackerdude has joined #ruby
rdark has quit [Quit: leaving]
earl2 has quit [Quit: Page closed]
benlieb has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
bananastalktome has quit [Quit: bananastalktome]
sn0wb1rd has joined #ruby
Umren has joined #ruby
zastern has joined #ruby
SCommette has quit [Read error: Connection reset by peer]
robert_ has joined #ruby
insulator has quit [Quit: insulator]
SCommette has joined #ruby
punkrawkR^Home has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
jonahR has joined #ruby
karasawa has joined #ruby
samuel02 has quit [Remote host closed the connection]
robert___ has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
malkomalko has joined #ruby
thatguycraig has joined #ruby
cdt has quit [Quit: Ex-Chat]
Maziz has quit [Quit: Maziz]
telli has joined #ruby
cheese1756 has quit [Ping timeout: 272 seconds]
<lectrick>
gotta love it when you get so meta with your ruby code that you trigger segfaults :(
Onii-san has quit [Ping timeout: 245 seconds]
punkrawkR^Home has quit [Ping timeout: 252 seconds]
<lectrick>
this is on 1.9.3p374 too, so whatever segfaults it fixed don't cover mine :/
kpshek has joined #ruby
Onii-san has joined #ruby
<Hanmac>
löl lectrick hm can you tell me what you done? still using rails?
TheFuzzball has joined #ruby
larissa has quit [Quit: Leaving]
cheese1756 has joined #ruby
<lectrick>
Hanmac: Yep, Rails 3.0 (soon 3.1, we finally finished the upgrade, it's going through QA)
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
banisterfiend has quit [Remote host closed the connection]
cableray has joined #ruby
niklasb has joined #ruby
<lectrick>
Hanmac: Hard to explain what I've done, I suspect it's too clever and am trying to un-clever it lol
blazes816 has joined #ruby
red5 has joined #ruby
j^2 has quit [Quit: leaving]
sn0wb1rd has quit [Quit: sn0wb1rd]
jjbohn has quit [Quit: Leaving...]
dmiller has joined #ruby
reppard has quit [Ping timeout: 252 seconds]
<Hanmac>
i know why i dont use rails :D
robbyoconnor has joined #ruby
pcarrier has quit []
ffranz has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
main has joined #ruby
xAndy is now known as xandy
Goopyo has quit [Read error: Connection reset by peer]
j^2 has joined #ruby
Goopyo has joined #ruby
xandy is now known as xAndy
icole has joined #ruby
razibog has quit [Ping timeout: 255 seconds]
dmiller has quit [Ping timeout: 256 seconds]
Dakuan has quit [Remote host closed the connection]
mafolz has quit [Quit: mafolz]
Dakuan has joined #ruby
theanvah has joined #ruby
apeiros has joined #ruby
pjb-d has quit [Quit: 'Going back home.']
jaequery has joined #ruby
NemesisD has joined #ruby
icole has quit [Ping timeout: 248 seconds]
jaequery has quit [Max SendQ exceeded]
benlieb_ has joined #ruby
<lectrick>
unfortunately it's not really related to rails. The segfault occurs in a unit test which (in theory) is trying to run independently of anything else. The mechanism by which I am able to unit test a class that has a lot of coupling is the cleverness... Obviously, removing or mitigating the coupling would be the ideal solution
Architect has joined #ruby
<Architect>
hi
jaequery has joined #ruby
Dakuan has quit [Ping timeout: 260 seconds]
<apeiros>
lectrick: missing the backlog, only read segfault - are you using the newest patchlevel of ruby? (p374)
<apeiros>
it addressed some segfault issues
tmi_ has joined #ruby
<Architect>
anyone know xmpp4r library?
benlieb has quit [Ping timeout: 248 seconds]
benlieb_ is now known as benlieb
<hoelzro>
I know of it
ffranz1 has joined #ruby
jaequery has quit [Client Quit]
<Architect>
hoelzro, do you know league of legneds?
headius has joined #ruby
<hoelzro>
I've heard of it
<Architect>
i made lol(league of legneds) chatting bot by xmpp4r
xsarin has joined #ruby
<Architect>
but, when i set the presence, it is crash;
hakunin has quit [Read error: Connection reset by peer]
swex_ has joined #ruby
hakunin has joined #ruby
ffranz has quit [Ping timeout: 255 seconds]
Architect has quit []
love_color_text has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
jasond has joined #ruby
robert___ has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
waxjar has joined #ruby
Neomex has joined #ruby
dmiller has joined #ruby
stkowski has joined #ruby
kevin_e has quit [Quit: leaving]
mockra has joined #ruby
apeiros has quit [Remote host closed the connection]
atno_ is now known as atno
skcin7 has quit [Quit: Computer has gone to sleep.]
fumbe has joined #ruby
chaosis has joined #ruby
jblack has quit [Ping timeout: 256 seconds]
robert_ has quit [Ping timeout: 276 seconds]
Zolo has joined #ruby
AsgardBSD_ has joined #ruby
fumbe_ has joined #ruby
DaZ has quit [Ping timeout: 264 seconds]
d2dchat has quit [Remote host closed the connection]
Dakuan has joined #ruby
withnale has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
nik_-_ has quit [Quit: nik_-_]
grzywacz has quit [Ping timeout: 260 seconds]
AsgardBSD has quit [Ping timeout: 252 seconds]
<pencilcheck>
what does
<pencilcheck>
class << self mean?
<pencilcheck>
I have seen it sometimes
rtl has quit [Remote host closed the connection]
<pencilcheck>
like class Test class << self end end
fumbe_ has quit [Client Quit]
<philcrissman>
pencilcheck: it means whatever is in that block is going to be a class method
rtl has joined #ruby
<pencilcheck>
oh
fumbe has quit [Ping timeout: 260 seconds]
<pencilcheck>
so it's just a way to group class methods?
stan has quit [Ping timeout: 255 seconds]
<philcrissman>
yes
red5 has left #ruby [#ruby]
<pencilcheck>
because can't you make a class methods like def self.method end?
benlieb has quit [Quit: benlieb]
DatumDrop has quit [Remote host closed the connection]
<pencilcheck>
interesting
<philcrissman>
pencilcheck: yep, you sure can.
tmi_ has quit [Quit: ./]
rtl has quit [Remote host closed the connection]
<pencilcheck>
what does << means by itself? append?
<philcrissman>
pencilcheck: same result; just you can group all the class methods inside that class << self; end block
MattRB has quit [Quit: This computer has gone to sleep]
<pencilcheck>
yea
rtl has joined #ruby
io_syl_ has joined #ruby
Dakuan has quit [Ping timeout: 255 seconds]
tintin has joined #ruby
<philcrissman>
welll.. basically. People call "<<" the shovel operator. It's _most_ often used in arrays or strings: [1, 3] << 2 => [1, 3, 2], etc. You can easily play around with it in irb to see what it does.
wrench has joined #ruby
ddd has joined #ruby
<tintin>
require 'mysql2' is it correct?
<pencilcheck>
shovel lol
<tintin>
gem install mysql2
<tintin>
should i use mysql2 or mysql ?
DaZ has joined #ruby
<wrench>
I'm trying to figure out what this example line means(the sum variable is assigned to a number): response = [sum].pack('V') What does putting square brackets around the variable name do?
nari has quit [Ping timeout: 255 seconds]
ebobby has quit [Quit: Lost terminal]
io_syl has quit [Ping timeout: 240 seconds]
io_syl_ is now known as io_syl
yshh has joined #ruby
<philcrissman>
wrench: it's just making an array with one element; pack is a method on Array. I don't remember what that particular option does, you'd need to look it up.
greenarrow has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
clocKwize has quit [Quit: clocKwize]
Mchl has quit [Disconnected by services]
Mchl has joined #ruby
xibalba has left #ruby ["Leaving"]
baphled has joined #ruby
BoomCow has quit [Client Quit]
skcin7 has joined #ruby
<wrench>
I'm having trouble finding when using ruby tcp socket lib -- a socket.read -- how much does that read before stopping? How does it know when to stop reading? Does it read a certain number of bytes or does it look for a special terminating char?
yshh has quit [Ping timeout: 255 seconds]
marcoshack has joined #ruby
Mchl has quit [Disconnected by services]
<yfeldblum>
wrench, it probably stops reading when the socket is closed
<wrench>
hrmm
hoelzro is now known as hoelzro|away
Mchl has joined #ruby
<wrench>
then it must be closed by the other side of the connection if that's true right?
<wrench>
otherwise will just hang forever
<Mon_Ouie>
Indeed
Mchl has quit [Disconnected by services]
skcin7 has quit [Client Quit]
[eDu] has quit [Quit: [eDu]]
<yfeldblum>
wrench, right
<wrench>
cool thanks
marcoshack has left #ruby [#ruby]
haxrbyte has quit [Remote host closed the connection]
<gyre007>
I just cant seem to be able to generate JSON
<gyre007>
from hash
<gyre007>
simple code
s1n4 has quit [Quit: leaving]
<gyre007>
but ruby is giving me error saying can't convert Hash into String
<gyre007>
arrgh
phantasm66 has joined #ruby
phantasm66 has joined #ruby
pu22l3r has joined #ruby
dougireton has joined #ruby
shevy has quit [Ping timeout: 255 seconds]
arietis has joined #ruby
<Mon_Ouie>
Because Hash#each returns a Hash
chriskk has joined #ruby
<Mon_Ouie>
And String#+ expects its second argument to be convertible to a String
emanu has joined #ruby
obryan has quit [Quit: Konversation terminated!]
phantasm66 has quit [Client Quit]
carlyle has joined #ruby
dougireton has quit [Client Quit]
carlyle has quit [Remote host closed the connection]
apeiros has joined #ruby
<emanu>
so I have 5 dimensions of data and I want to generate each permutation of an array with one of the values in each dimension. Right now, I'm doing nested each loops per dimension, and this means 5 nested each loops. Is there a standard pattern to avoid the nesting of the each iterator? Does this question make any sense?
<Xeago>
depends on how you interact with the earlier dimensions
matthias_ has quit [Remote host closed the connection]
<Xeago>
if it is just navigation it is easy to unroll
<Xeago>
otherwise it is just a bit harder to unroll
<Xeago>
but
asobrasil has left #ruby [#ruby]
<Xeago>
you will always loop atleast 5 times
ddd has quit []
sepp2k has quit [Read error: Connection reset by peer]
banister_ has quit [Remote host closed the connection]
DatumDrop has joined #ruby
Dakuan has quit [Remote host closed the connection]
jgrevich has joined #ruby
Dakuan has joined #ruby
eldariof has joined #ruby
benlieb has joined #ruby
n1x has quit [Ping timeout: 248 seconds]
RubyPanther has joined #ruby
shevy has joined #ruby
dmiller has joined #ruby
etcetera has quit [Client Quit]
zehrizzatti has joined #ruby
baphled has joined #ruby
robert___ is now known as robert_
benlieb has quit [Client Quit]
delphaber has left #ruby [#ruby]
n1x has joined #ruby
krzkrz has joined #ruby
sayan has joined #ruby
Dakuan has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
DatumDrop has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
dougireton has quit [Quit: Leaving.]
etcetera has joined #ruby
kenneth has quit [Quit: kenneth]
karasawa has joined #ruby
kirun has joined #ruby
ffranz2 has joined #ruby
anachronistic has joined #ruby
Michael_ has quit [Remote host closed the connection]
ffranz1 has quit [Ping timeout: 244 seconds]
marr has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 272 seconds]
buibex has joined #ruby
karasawa has quit [Ping timeout: 244 seconds]
dmiller has quit [Ping timeout: 248 seconds]
<gyre007>
havenn: yes...cheers
Ontolog has quit [Quit: Ontolog]
swingha has joined #ruby
Solnse has joined #ruby
Ontolog has joined #ruby
ffranz2 has quit [Quit: Leaving]
squidBits_ has joined #ruby
ffranz has joined #ruby
undersc0re97 has joined #ruby
ffranz has quit [Remote host closed the connection]
wmoxam has joined #ruby
ffranz has joined #ruby
squidBits has quit [Ping timeout: 255 seconds]
squidBits_ is now known as squidBits
Hanmac has quit [Ping timeout: 245 seconds]
vonsar has joined #ruby
hadees has joined #ruby
dougireton has joined #ruby
aedorn has quit [Quit: Leaving]
Playground has joined #ruby
peteyg has joined #ruby
<peteyg>
Is there a practical difference between ActiveSupport::JSON.decode() and JSON.parse?
chrismcg is now known as zz_chrismcg
bricker is now known as bricker`LA
bricker`away is now known as bricker
chrisbolton_ has joined #ruby
peteyg has quit [Remote host closed the connection]
BizarreCake has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
<chrisbolton_>
I have an array of nodes (they have start nodes, end nodes and relationship types). I need to cycle through them to create an array of hashes with the start_node and the number of times the node occurs. I'm just having a hard time putting that together. Can someone help?
pcarrier has joined #ruby
<canton7>
chrisbolton_, pastie sample input, sample output, and what youv'e got so far?
Michael_ has joined #ruby
aaronmacy has joined #ruby
dankest is now known as dankest|away
mneorr has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
<canton7>
chrisbolton_, original data?
Zolo has quit [Remote host closed the connection]
slainer68 has joined #ruby
DrShoggoth has joined #ruby
telli has quit [Remote host closed the connection]
<chrisbolton_>
canton7: I don't know that I have original data I can copy and paste. It's a neo4j database and is all node based.
Michael_ has quit [Remote host closed the connection]
xibalba has joined #ruby
benlieb has joined #ruby
stormetrooper has quit [Quit: Leaving]
Zolrath has joined #ruby
Zolrath has quit [Max SendQ exceeded]
bean__ has quit [Quit: Computer has gone to sleep.]
pcarrier has quit []
Zolrath has joined #ruby
cantonic_ has joined #ruby
jrist is now known as jrist-afk
robert___ has joined #ruby
main has quit [Remote host closed the connection]
JumpMast3r has quit [Quit: JumpMast3r]
brianpWins has joined #ruby
cantonic has quit [Ping timeout: 272 seconds]
cantonic_ is now known as cantonic
pu22l3r has quit [Remote host closed the connection]
robert_ has quit [Ping timeout: 245 seconds]
carlzulauf has quit [Ping timeout: 276 seconds]
osaut has quit [Quit: osaut]
tspike has joined #ruby
tspike has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
kpshek has quit []
dankest|away is now known as dankest
Playground has quit [Ping timeout: 246 seconds]
c0rn has joined #ruby
bel3atar has joined #ruby
Virunga has joined #ruby
kenneth has joined #ruby
nwertman has quit [Remote host closed the connection]
d2dchat has joined #ruby
buibex has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
apeiros has joined #ruby
krzkrz has quit [Remote host closed the connection]
Myconix has joined #ruby
woolite64_ has joined #ruby
woolite64 has quit [Ping timeout: 244 seconds]
krzkrz has joined #ruby
icole has joined #ruby
shammancer has quit [Quit: Leaving.]
shammancer has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
emocakes has quit [Quit: emocakes]
dankest has joined #ruby
woolite64_ has quit [Ping timeout: 245 seconds]
DrShoggoth has quit [Read error: Operation timed out]
SeySayux_ has joined #ruby
Villadelfia_ has joined #ruby
robert___ has quit [Ping timeout: 276 seconds]
Villadelfia has quit [Ping timeout: 276 seconds]
SeySayux has quit [Ping timeout: 264 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
chrismhough has quit [Quit: chrismhough]
rasinchive has joined #ruby
<rasinchive>
hi
<rasinchive>
i have some virtual hosts in apache
cantonic has quit [Quit: cantonic]
michele_ has left #ruby [#ruby]
Joel has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0/20130104151925]]
<rasinchive>
i just found out that if i make a parse error in one site
<rasinchive>
its crashing all other sites
kpshek has joined #ruby
<rasinchive>
is this normal
vlad_starkov has joined #ruby
<rasinchive>
i dont think ive had this problem before
mneorr has joined #ruby
forced_request has joined #ruby
<Ontolog>
bricker: bricker`LA: you there?
forced_request has quit [Remote host closed the connection]
cantonic has joined #ruby
DrShoggoth has joined #ruby
thorncp_ is now known as thorncp
dustint has left #ruby ["Leaving"]
abionic has quit [Read error: Connection reset by peer]
<bricker>
Ontolog: what's up
segv- has quit [Quit: segv-]
<Ontolog>
bricker: can i pm you?
xibalba has left #ruby ["Leaving"]
segv- has joined #ruby
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
nomenkun has joined #ruby
cantonic has quit [Client Quit]
etcetera has quit []
lethjakman_lapto has joined #ruby
pu22l3r has joined #ruby
<lethjakman_lapto>
hey, I've been using PHP for a while, and I've noticed the arrays are HUGE. I haven't been able to find any articles on them in Ruby though. Does anyone know about their size compared to a C array/have an article?
_br_ has quit [Excess Flood]
<apeiros>
lethjakman_lapto: rubys arrays are sizeof(VALUE) + ~20 bytes of overhead
<apeiros>
sorry, sizeof(VALUE)*N + ~20 bytes
niklasb has quit [Ping timeout: 246 seconds]
karasawa has joined #ruby
<apeiros>
N = number of items (possibly more since any sane dynamically sized array increases by doubling the capacity)
mengu has joined #ruby
cantonic has joined #ruby
SeySayux_ is now known as SeySayux
<apeiros>
sizeof(VALUE) is 4 bytes for 32bit ruby. not sure about 64bit ruby, but I'd assume it's 8 bytes there.
_br_ has joined #ruby
<apeiros>
(also, ruby doesn't confuse arrays and hashtables)
Xeago has joined #ruby
michele has joined #ruby
swex_ has quit [Remote host closed the connection]
Dakuan has joined #ruby
emmanuelux has joined #ruby
<Xeago>
Oh deer
mfaeh has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
chrismhough has joined #ruby
thatguycraig has quit [Quit: Leaving.]
carloslopes has joined #ruby
hackerdude has quit [Read error: Connection reset by peer]
karasawa has quit [Ping timeout: 260 seconds]
_br_ has quit [Excess Flood]
hackerdude has joined #ruby
cantonic has quit [Quit: cantonic]
Dakuan has quit [Ping timeout: 240 seconds]
squidBits has quit [Read error: Connection reset by peer]
swex has joined #ruby
fumbe has joined #ruby
_br_ has joined #ruby
squidBits has joined #ruby
Roa has joined #ruby
jfl0wers has joined #ruby
polerin has left #ruby [#ruby]
Harzilein has joined #ruby
<Harzilein>
hi
<frem>
hello
etcetera has joined #ruby
bean__ has joined #ruby
slainer68 has quit [Remote host closed the connection]
<Harzilein>
how should i go about allowing the users of my objects (which might be command line users in particular) to use c-style \n etc. in a string and having that expanded?
<Harzilein>
i.e. i want to modifie nokoe to have a -w option like curl does
Ontolog has quit [Quit: Ontolog]
<apeiros>
you can use gsub
<apeiros>
@ Harzilein
chridal has joined #ruby
dmiller has joined #ruby
berserkr has quit [Read error: Connection reset by peer]
<Harzilein>
apeiros: i'd prefer just using an existing method. so i take it there isn't any, at least not in stdlib?
<apeiros>
not that I'm aware.
reppard has joined #ruby
willob has quit [Quit: Leaving.]
<apeiros>
YAML & JSON do a bit of string parsing too. don't know if you can make your input suitable for those.
fumbe has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
sullenel has joined #ruby
eric_ has joined #ruby
syamajala has joined #ruby
mpfundstein has joined #ruby
mneorr has quit [Remote host closed the connection]
devdazed has quit [Quit: Bye]
woolite64 has joined #ruby
devdazed has joined #ruby
chrisbolton_ is now known as chrisbolton
dmiller has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
samphippen has quit [Read error: Connection reset by peer]
<Harzilein>
apeiros: hmm...
samphippen has joined #ruby
<Harzilein>
apeiros: oh well, i guess i can copy/hand-write code then :/
<apeiros>
again, if all you want is \n, I'd say gsub is a good option
Zolo has joined #ruby
rippa has quit [Read error: Connection reset by peer]
chridal has quit [Quit: Lost terminal]
samphippen has quit [Client Quit]
<Harzilein>
apeiros: currently i only need \n, but i'd like to support more eventually
samphippen has joined #ruby
<Harzilein>
apeiros: i guess i should look at what curl does and make a port in the same spirit
Guest49955 has quit [Ping timeout: 252 seconds]
_bart has joined #ruby
<apeiros>
Harzilein: um, curl is written in C?
<Harzilein>
apeiros: yes
<apeiros>
C metaphors hardly translate well to ruby…
<banister_>
apeiros: you ever played c&c 3?
rippa has joined #ruby
<apeiros>
banister_: not sure. if it's the one ported to mac, then yes (I think that was C&C generals)
carloslopes has quit [Remote host closed the connection]
<Harzilein>
i _think_ i'm violating yagni atm anyway. i know i use -w \\n with curl, i want to do the same with nokoe -s -w \\n so the last line does not get corrupted by the bash prompt %-)
<Harzilein>
s/i use/i abuse/
<banister_>
apeiros: oh, this was released in 2008, it had a mac port (i think a lot of them did)
gyre007 has quit [Remote host closed the connection]
<banister_>
apeiros: i think generals was 2003/2004
<banister_>
apeiros: anyway it's kick-ass, im still looking for someone to play online
reppard has quit [Ping timeout: 252 seconds]
jds has joined #ruby
emocakes has joined #ruby
Ontolog has joined #ruby
jds has quit [Remote host closed the connection]
Zolo has quit [Remote host closed the connection]
Zolo has joined #ruby
<apeiros>
banister_: ah I'm more of an SC2 player, sorry :)
<apeiros>
maybe when I get my gamer pc…
OldOats has joined #ruby
<wmoxam>
apeiros: what league are you in 1v1?
<apeiros>
wmoxam: currently silver. I should be able to make it to gold, though.
luckyruby has joined #ruby
Ankhers has joined #ruby
<wmoxam>
apeiros: I just jumped to gold this season. I'm actually finding it easier, more people seem to play stadard builds
<wmoxam>
*standard
<wmoxam>
silver seems all over the place, lots of cheesiness
<apeiros>
yeah, bronze too. the way to get out of bronze is know how to be safe against cheeses. after that, there's not much more that comes.
Zolo has quit [Ping timeout: 252 seconds]
Zolo_ has joined #ruby
eric_ has quit [Ping timeout: 245 seconds]
dougireton has quit [Quit: Leaving.]
<banister_>
apeiros: woul sc2 run on a pimped out 11" mba
<wmoxam>
banister_: yes
<banister_>
cool
sullenel has quit [Quit: Leaving.]
otters has quit [Ping timeout: 252 seconds]
jblack has joined #ruby
jacktrick has joined #ruby
eric_ has joined #ruby
OldOats has quit [Quit: Page closed]
benlieb has quit [Quit: benlieb]
eldariof has quit []
carlzulauf has joined #ruby
griffindy has joined #ruby
benlieb has joined #ruby
marr has joined #ruby
horofox has quit [Quit: horofox]
gabriel_hacker has joined #ruby
<gabriel_hacker>
hi
jds has joined #ruby
<gabriel_hacker>
why ruby is slow ?
dougireton has joined #ruby
Ontolog has quit [Quit: Ontolog]
headius has quit [Quit: headius]
<apeiros>
gabriel_hacker: because it's a very dynamic language and that's hard to optimize
<gabriel_hacker>
apeiros: python is faster than ruby
squidBits has quit [Quit: squidBits]
* Harzilein
was about to answer with a suggestion to try the following google keywords: corundum carbon chrome pressure time
breakingthings has joined #ruby
jds has quit [Ping timeout: 252 seconds]
arkiver has joined #ruby
<gabriel_hacker>
apeiros: a lot of time faster
<apeiros>
gabriel_hacker: did you just come here to troll? if so, then please go by yourself.
Zolo_ has quit [Remote host closed the connection]
<gabriel_hacker>
apeiros: do u know why ruby is slow ?
chriskk has quit [Quit: chriskk]
tvw has quit [Remote host closed the connection]
gabriel_hacker was kicked from #ruby by apeiros [yeah, no, trolling is not welcome. good bye.]
green_leaf has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
postmodern has joined #ruby
carlzulauf has quit [Ping timeout: 244 seconds]
squidBits has joined #ruby
squidBits has quit [Read error: Connection reset by peer]
mengu has quit [Quit: Leaving]
Goles has joined #ruby
squidBits has joined #ruby
green_leaf has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
enebo has joined #ruby
<banister_>
apeiros: what's the single player like for sc2?
horofox has joined #ruby
<apeiros>
quite nice
Goles has quit [Client Quit]
jblack has quit [Remote host closed the connection]
<apeiros>
if you play it through on easy + brutal, I'd say ~20-40h of gameplay. depending on your prowess
jblack has joined #ruby
pothibo has joined #ruby
<apeiros>
I like the story. even if it's a bit cheesy. you should watch a youtube video on SC1+Broodwar story. SC2 continues from there.
carlzulauf has joined #ruby
failshell has quit [Remote host closed the connection]
Xeago_ has joined #ruby
kayloos has joined #ruby
Xeago is now known as Guest596
Guest596 has quit [Killed (brooks.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
hadees has quit [Quit: hadees]
fuzai has quit [Quit: Leaving]
squidBits has quit [Read error: Connection reset by peer]
<lectrick>
banister_: apeiros: single player SC/SC2 is unfortunately the ONLY type of SC/SC2 I like. I suck too bad at multi :( And the singleplayer for SC2 is nice, I concur... can't wait for the next exp
spinagon has joined #ruby
rippa has quit [Read error: Connection reset by peer]
chriskk has joined #ruby
plotplanexe has joined #ruby
<apeiros>
lectrick: hm? you just have to accept that if the match-making works correctly, you'll lose 50% of the battles
jds has joined #ruby
<lectrick>
apeiros: i like my sc slow, strategic and ponderous I guess. Funny because I love WoW PVP but when it comes to sc2 i just shrivel up in MP
jblack_ has joined #ruby
<apeiros>
:)
Kakera has quit [Read error: Connection reset by peer]
Kakera has joined #ruby
spinagon has quit [Read error: Connection reset by peer]
horofox has quit [Read error: Connection reset by peer]
horofox has joined #ruby
horofox has quit [Client Quit]
jblack has joined #ruby
Guest27535 is now known as robacarp
jblack has quit [Client Quit]
dankest has joined #ruby
atmosx has joined #ruby
Hanmac has joined #ruby
generalissimo is now known as FREE_JOKES
jackyalcine has quit [Quit: Quit]
reinaldob has quit [Remote host closed the connection]
deception has joined #ruby
fermion_ has joined #ruby
ryanf has joined #ruby
emanu_ has joined #ruby
PragmaticCypher has quit [Remote host closed the connection]
emanu has quit [Read error: Connection reset by peer]
emanu_ is now known as emanu
Xeago has quit [Remote host closed the connection]
PragCypher has joined #ruby
JumpMast3r has joined #ruby
Xeago has joined #ruby
dmiller has joined #ruby
end_guy has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
rezzack has joined #ruby
chridal has joined #ruby
hoelzro|away is now known as hoelzro
reinaldob has joined #ruby
nwertman has quit [Read error: Connection reset by peer]
rippa has quit [Ping timeout: 252 seconds]
<Eiam>
if you want a hard FPS single player, try Armies of Exigo
<Eiam>
holy shit that game is hard
<Eiam>
err, RTS =)
<Eiam>
lectrick: how can you love WoW pvp =( you must be a warrior and not a healer =) /troll
<wildcard0>
is that written in ruby?
jaygen has joined #ruby
<Eiam>
banister_: I used to play SC2 on a MBA (13" tho, but same chipset (HD3000 or HD4000 depending on what generation), it ran fine if you used more sane settings. same goes for all blizzard titles.
<Eiam>
wildcard0: no. but I do have a ruby question now too
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
mark_locklear has quit [Remote host closed the connection]
<wildcard0>
you should ask on #wowtroll :)
nyuszika7h has joined #ruby
havenn has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 248 seconds]
<Eiam>
wildcard0: the conversation 2 lines above me was about the same topic, i was catching up & chiming in
reinaldob has quit [Remote host closed the connection]
nwertman has joined #ruby
<apeiros>
"troll" in a wow context can be considered racially offensive :-p
havenn has joined #ruby
<wildcard0>
haha
<wildcard0>
Eiam: oh you're allowed to troll and im not now? :)
Jackneill has quit [Remote host closed the connection]
Aquatick_ has joined #ruby
arturaz has joined #ruby
Aquatick_ is now known as Aquaticks
<Eiam>
Say you have a local ruby gem you are adding some functionality to, and that functionality is dependent on new code you are writing in *other* local gems. Do you write unit tests in the gems that pass, then write the code to pass the test, then create the gemspec, install the gem.. then continue in the original gem now that the feature is there?
<Eiam>
wildcard0: I thought you were being a bit more serious in scolding me for being off topic
<wildcard0>
hehe
<wildcard0>
so it was a successful troll :)
emocakes is now known as emocakes|zZz
<Eiam>
i like to clue people in on my trolling since they can't hear my voice or see my body language, but yes if you like to t/roll that way, it was successful
jds has joined #ruby
deception has left #ruby [#ruby]
<Eiam>
I just run into this ridiculous cycle where I'm adding features that are dependent on multiple gems that are also gems i "own" and I'm constantly doing bundle installs and iterating on the output from one gem to see if it works with the other gem & so on
<Eiam>
its nightmarish tbh but I'm not exactly sure what else to do =)
<wildcard0>
hmm
<wildcard0>
that's a hard workflow
<Spooner>
You can bundle install from a directory, so you never need to update anything.
<Eiam>
my boss factored our rails app out into 5 gems
<Eiam>
so all the stuff that *used* to be in one nice place (rails) is now in a bunch of gems
<wildcard0>
oh it's "better"
<arturaz>
Eiam, are they reused?
havenn has quit [Ping timeout: 240 seconds]
<Eiam>
so adding a feature to one gem often means coordinated changes in the other gems too
<Eiam>
arturaz: is what reused? the code? no its all distinct code
<arturaz>
gems, between projects?
<arturaz>
or something
<arturaz>
why the separation?
<Eiam>
arturaz: say you have one gem that talks about who an employee is, like their name, their address. another gem talks about what a team is (what employees are in it)
<Eiam>
yeah, you'd totally want to use some of this functionality in other projects
<Eiam>
we used to pull it out of rails via json feeds
<Eiam>
its cleaner to be in gems i think, but its painful to maintain
<banister_>
Eiam: haha
<arturaz>
can't you just stuff submodules into lib/ or something?
<banister_>
Eiam: sounds retarded, gems are never used in that way
<Eiam>
then you have another gem that talks about 'issues' and you maybe want to know what 'issues' are grouped by what 'team' or what 'employee' and so on
<banister_>
Eiam: yeah, that's not the purpose of gems
<Eiam>
and that particular change would probably involve exposing new data in each gem. yeah
vlad_starkov has joined #ruby
<Eiam>
okay so maybe thats why its painful =)
skcin7 has joined #ruby
Aquaticks has left #ruby ["From whence shall we expect the approach of danger?"]
timonv has quit [Remote host closed the connection]
swinburnesque81 has quit [Ping timeout: 276 seconds]
ryanjh has joined #ruby
timonv has joined #ruby
huoxito has joined #ruby
<Eiam>
the gems are structured as modules with various classes inside of them
jds has quit [Ping timeout: 252 seconds]
<Eiam>
so you are saying maybe a single gem with *all* these modules & classes inside of them?
<reactormonk>
Eiam, gems are just packages with ruby code in it
<Eiam>
banister_: so what is the purpose ofa gem
rakl has quit [Quit: sleeping]
asym has quit [Ping timeout: 255 seconds]
<Eiam>
to deal with depdencies & external libraries?
prakriti has joined #ruby
ryanh_ has joined #ruby
emocakes|zZz is now known as emocakes
prakwtf has joined #ruby
ryanjh has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 248 seconds]
MattRB has joined #ruby
jds has joined #ruby
<lethjakman_lapto>
hey, I'm having a weird error when I'm trying to run an application. I'm getting this error
Goles has quit [Quit: Computer has gone to sleep.]
jtharris has quit [Quit: WeeChat 0.3.9.2]
<lethjakman_lapto>
/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.2.3/lib/bundler/source.rb:801:in `rescue in load_spec_files': git://github.com/spree/spree_auth_devise (at 1-3-stable) is not checked out. Please run `bundle install` (Bundler::Git
<lethjakman_lapto>
I've already run bundle install, and it seems to be there
<lethjakman_lapto>
and I've removed the Gemfile.lock
<lethjakman_lapto>
does anyone have any ideas?
jenrzzz has joined #ruby
dougireton has joined #ruby
brianpWins has joined #ruby
<lethjakman_lapto>
ls
dmiller has joined #ruby
<lethjakman_lapto>
whoops
reppard has joined #ruby
Morkel has quit [Quit: Morkel]
cableray has joined #ruby
Xeago_ has joined #ruby
Xeago has quit [Killed (holmes.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
cjs226 has quit []
jds has quit [Ping timeout: 245 seconds]
Xeago has quit [Read error: Connection reset by peer]
rdg has quit [Quit: ttfn]
Xeago has joined #ruby
dmiller has quit [Ping timeout: 252 seconds]
hoelzro is now known as hoelzro|away
bricker_ has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
bricker has quit [Read error: Operation timed out]
syamajala has quit [Quit: leaving]
MattRB has joined #ruby
MattRB has quit [Client Quit]
alphabitcity has joined #ruby
Mch1 is now known as Mchl
<alphabitcity>
What's the best way to write/publicly host documentation for Ruby code that I write?
jackyalcine has quit [Ping timeout: 252 seconds]
jackyalcine_ has joined #ruby
jackyalcine_ has quit [Changing host]
jackyalcine_ has joined #ruby
jonahR has quit [Quit: jonahR]
karasawa has joined #ruby
<davidcelis>
rubydoc.info
<alphabitcity>
thank you sir
<davidcelis>
as far as writing it, i like YARD
<davidcelis>
avoid RDoc
<alphabitcity>
so i would push my docs to github and rubydoc periodically pulls updates and hosts it?
<apeiros>
+1 for liking yard
<apeiros>
wouldn't go as far as advising to avoid rdoc, though
<davidcelis>
well, avoid RDOC in favor of YARD, i'd say
<apeiros>
alphabitcity: rdoc.info automatically creates docs on demand
<davidcelis>
im not sure what i'd use RDoc for that i wouldn't use YARD for
<Eiam>
+1 yard
<apeiros>
yeah, same, I prefer yard over rdoc
<Eiam>
I started using it recently and like it
beilabs has quit [Read error: Connection reset by peer]
<davidcelis>
alphabitcity: i believe it hooks into RubyGems.org for gems if you hook it up in your gemspec
<apeiros>
but if somebody doesn't like yard, rdoc is still a good tool and second runner up :)
<alphabitcity>
i see, thanks guys
<Eiam>
however that confident ruby guy seems to be suggesting that documentation in the style of yard means your code isn't very clear/understandable
<Eiam>
=0
<Eiam>
or maybe "don't use 4 lines of documentation to document a 2 line function"
Goles has joined #ruby
swinburnesque81 has quit [Ping timeout: 252 seconds]
karasawa has quit [Ping timeout: 246 seconds]
<lethjakman_lapto>
is there any easy way to get the path to my gems?
<Eiam>
if you are in code Gem.loaded_specs['my_gem'].full_gem_path
yfeldblum has quit [Ping timeout: 260 seconds]
MattRB has joined #ruby
<Eiam>
or banisterfiend's if you don't have the gem loaded
mach1ne has joined #ruby
<mach1ne>
anybody here familiar with mechanize?
mmitchell has quit [Remote host closed the connection]
<lethjakman_lapto>
can I do that from bash?
jonathanwallace has quit [Read error: Connection reset by peer]
justin_pdx has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
squidBits has quit [Quit: squidBits]
jackyalcine_ has quit [Ping timeout: 256 seconds]
emergion has joined #ruby
<justin_pdx>
Hello. I am having difficulty checking the mime types of files on my Macbook. The command "MIME.check('filename').type" is squirrelly and doesn't always return what I need. It works on a Ubuntu server but not locally.
<justin_pdx>
And I'm finding that not everyone even has the MIME.check method. Where does it come from and what is the most reliable way to accomplish my goal?
<eric_>
I really need help with a piece of code im working on, pm me if u can help
<lethjakman_lapto>
eric_: I'm sure there are a lot of people here that are good, but you'll probably get more help if you're more specific with what you want
<lethjakman_lapto>
ruby's pretty broad
banisterfiend has quit [Read error: Connection reset by peer]
joshman_ has quit [Ping timeout: 272 seconds]
banisterfiend has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
<eric_>
Well, I have a .txt file with a base64 encoded string. I need to open the file, decode it, and search through it for a specific string
<justin_pdx>
eric_: A good way to start is by creating a public pastie with your code and a write up of your problem and then sharing the link to that pastie in here.
<atmosx>
eric_: in 1st line, you probably need File.read
<eric_>
yah
<eric_>
okay
<eric_>
LOL yah that was 1 problem
banisterfiend has joined #ruby
<eric_>
After it decodes it, it isnt finding the url. So inside the .txt there is a base64 string, once decrypted it reads ping.pong
<eric_>
url = ping.pong
ckrailo has quit [Quit: Computer has gone to sleep.]
<eric_>
but its not finding url in the file
jrist is now known as jrist-afk
<atmosx>
eric_: that's because you suck at programming.
<eric_>
IK RIGHT
<atmosx>
eric_: why do you do it anyway?
<atmosx>
eric_: why not just pay someone to do it?
<eric_>
That isnt fun
<eric_>
Its better to learn
<atmosx>
eric_: and how will you learn if I tell you
<atmosx>
what happens next time
<atmosx>
?
<eric_>
Yes I will learn
<atmosx>
you'll come here again and again asking silly questions?
dankest is now known as dankest|away
<eric_>
No
<atmosx>
eric_: no what?
<eric_>
No, I wont come ask another silly question
<eric_>
I just usually dont decrypt things from a file
<apeiros>
base64 isn't really encryption…
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<eric_>
encoding**
<atmosx>
eric_: I'm just joking man, you can ask as many questions as you want, but it's better if you listen to the advice of people like apeiros who are experienced, especially with troubleshooting.
dankest|away is now known as dankest
<eric_>
Okay then, I've been trying to figure this out
<eric_>
but IT will not work
dougireton has quit [Remote host closed the connection]
forced_request has joined #ruby
<apeiros>
eric_: quick start at problem description: "does not work" is not to be used ever. period. what you should do is:
dougireton has joined #ruby
<apeiros>
what did you do? (that includes code and input), what did you expect to happen? what happened instead?
<apeiros>
anything less is useless.
swinburnesque81 has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
solidoodlesuppor has quit [Remote host closed the connection]
<apeiros>
sensibly the code+input should be a reproducable example
joeycarmello has joined #ruby
arturaz has quit [Remote host closed the connection]
<eric_>
Scartch it, I'll find another way, how do I read a line from a file, search for a specific word, then read the whole line and split it at every ","
EPIK has joined #ruby
jjbohn has quit [Quit: Leaving...]
stopbit has quit [Quit: Leaving]
squidBits has joined #ruby
etcetera has quit []
<shevy>
eric_ several ways. a simple one is to use: data = File.readlines('/your_file_here')
gutsiest60 has joined #ruby
<shevy>
then access the proper entry in data, with grep, or directly via []
v0n has quit [Ping timeout: 244 seconds]
<shevy>
now you have the "whole line", which you can then .split(',')
chrismhough has quit [Quit: chrismhough]
joeycarmello has quit [Ping timeout: 252 seconds]
<eric_>
Egh can I get a example?
drpaulruth has joined #ruby
Dakuan has joined #ruby
cableray has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
Iszak has joined #ruby
theanvah has quit [Ping timeout: 245 seconds]
<shevy>
File.readlines('/your_file_here').grep(/blabla/)[0].split(',') # <-- but you must check for nil first
cableray has joined #ruby
zph has joined #ruby
<eric_>
Alright
<eric_>
Let me try this out.
ryanf has quit [Ping timeout: 252 seconds]
<shevy>
eric_ it is easier if you split those chained . methods up into subtasks though
<drpaulruth>
Is anyone here familiar with this "library not loaded…dylib" error that happens when I try to run my Ruby server on my Mountain Lion OS X system? I think it has something to do with uninstalling Mac Ports. Gist: https://gist.github.com/4569393
tessier has left #ruby [#ruby]
<shevy>
you can always check whether your data structure is ok, i.e. via: pp data
Markvilla has joined #ruby
jds has joined #ruby
<shevy>
pp is very useful
<eric_>
k
EPIK has quit []
hadees has joined #ruby
<atmosx>
drpaulruth: I do
Dakuan has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
<eric_>
You see I need to search for a string like ping.pong but its followed by a ip like this ping.pong,0.0.0.0 What I need is to search for the ping.pong but read the whole line so i can split it into host and ip
dougireton1 has joined #ruby
etcetera has joined #ruby
<drpaulruth>
atmosx: Think I need to somehow restore the /opt directory or make it look elsewhere through a link?
dougireton has quit [Ping timeout: 240 seconds]
<atmosx>
drpaulruth: no it's rvm's problem actually
<atmosx>
you have openssl from macports?
<drpaulruth>
atmosx: Oh no! Maybe i need to use an older Ruby
<atmosx>
drpaulruth: nope
<drpaulruth>
atmosx: Probably, yes
<drpaulruth>
atmosx: Oh, ok
<atmosx>
it has to do with the time you compiled rvim
<eric_>
Shevy: Can i pm u what i mean
<atmosx>
rvm, if you had some libs and if they changed in time etc.
<drpaulruth>
atmosx: i see, thanks. Should i port install openssl?
chrismhough has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<atmosx>
ls this file exist? /opt/local/lib/libssl.1.0.0.dylib
<shevy>
eric_ no please not, I have to click on the tab, then click on the main channel again, and the longer the PM the more work. just write down here in the main channel what your problem is please
Goles has joined #ruby
<shevy>
eric_ File.readlines() already reads in all "whole lines"
<eric_>
plainlist.grep(/ping.pong/)[0].split(',') # <-- but you must check for nil first
<drpaulruth>
atmosx: No, because i rashly followed some instructions to uninstall Port by rm'ing that whole thing :(
<shevy>
so you have the full data available as-is
<atmosx>
drpaulruth: yes
<atmosx>
➜ ~ sudo port provides /opt/local/lib/libssl.1.0.0.dylib
jds has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
<atmosx>
/opt/local/lib/libssl.1.0.0.dylib is provided by: openssl
<eric_>
I need to split the plainlist into host,ip
<drpaulruth>
atmosx: Got it, so if i port install openssl it'll come back
baroquebobcat has quit [Client Quit]
<atmosx>
drpaulruth: install openssl through ports, might work (probably will)
<drpaulruth>
atmosx: dope!
<shevy>
divide a problem into smaller tasks. (1) Do you already have the full dataset available in your script? Continue only if task (1) has been solved
<atmosx>
drpaulruth: try first installing openssl and see how it goes :-)
<shevy>
eric_ ok do you have the full data available already...
<drpaulruth>
it's underway
<drpaulruth>
!
<drpaulruth>
despite some weird dyld errors
<atmosx>
eric_: use minitest
<eric_>
That is the only part I need help with
baroquebobcat has joined #ruby
anonymuse1 has joined #ruby
anonymuse has quit [Ping timeout: 252 seconds]
<eric_>
minitest?
theanvah has joined #ruby
<shevy>
in your code, do pp contents
<eric_>
okay
<shevy>
verify that contents has the data you need to have
<shevy>
do require 'pp' before using pp first time