<danneu>
i google that same link every time i have to use file.open
fschuindt has left #ruby [#ruby]
<danneu>
one day i'll print it out
fschuindt has joined #ruby
ravigehlot has left #ruby [#ruby]
<fschuindt>
My config.ru file was deleted… wtf
vabenjamin has joined #ruby
adeponte has quit [Remote host closed the connection]
<danneu>
fschuindt: no, it left cuz it doesnt like you
tommyvyo has joined #ruby
horofox has joined #ruby
predator117 has quit [Ping timeout: 256 seconds]
RonScagz has joined #ruby
<fschuindt>
danneu: not really, it was not deleted, it was created… I noticied by git of untracked files config/config.ru and config/log and my server pow stops work.
banisterfiend is now known as banister`sleep
Mattix has joined #ruby
Volta has quit [Quit: leaving]
moos3 has joined #ruby
karupanerura has quit [Excess Flood]
atyz has joined #ruby
nanothief has joined #ruby
yshh has quit [Remote host closed the connection]
moos3 has quit [Client Quit]
karupanerura has joined #ruby
pen has joined #ruby
`brendan has joined #ruby
moos3 has joined #ruby
segv- has quit [Quit: segv-]
moos3 has quit [Client Quit]
Kuifje has quit [Ping timeout: 264 seconds]
danneu has quit [Ping timeout: 244 seconds]
Volta has joined #ruby
twoism has quit [Remote host closed the connection]
BrindleFly has joined #ruby
dmiller1 has quit [Ping timeout: 256 seconds]
atyz has quit [Ping timeout: 245 seconds]
ferdev has joined #ruby
kstephens has quit [Ping timeout: 260 seconds]
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby
<Volta>
h
mikepack has quit [Remote host closed the connection]
richardjortega has joined #ruby
<shevy>
I hate the .ru file extension
<shevy>
can you use rack without having to nazi-rename .rb files to .ru?
slyv has joined #ruby
<Es0teric>
how do you force rvm to reinstall all gems again?
idkazuma has quit [Ping timeout: 252 seconds]
johnmilton has quit [Remote host closed the connection]
quazimodo has joined #ruby
mattbl has joined #ruby
hbpoison has joined #ruby
Volta has quit [Quit: leaving]
hydrozen has joined #ruby
<Dwarf>
Is there a way to catch ^C?
chaosis has quit [Read error: Connection reset by peer]
garbagecollectio has quit [Quit: garbagecollectio]
BrindleFly has quit [Quit: BrindleFly]
<vabenjamin>
anyone here use Aptana Studio?
apok has quit [Quit: apok]
arya_ has quit [Ping timeout: 252 seconds]
<aedornm>
Dwarf: trap('SIGINT') {}
<Dwarf>
Alright, gonna look that up
<Dwarf>
Thanks
<Dwarf>
vabenjamin: I do
etcetera has quit []
adeponte has joined #ruby
<vabenjamin>
It doesnt seem tob e very popular among ruby folks
<vabenjamin>
not sure why?
<aedornm>
Dwarf: You can also rescue Interrupt
<Dwarf>
vabenjamin: it's a resource hog
<aedornm>
probably not a great idea though
<Dwarf>
That trapping seems interesting
<vabenjamin>
what else do people use?e macs?
kofno has joined #ruby
etcetera has joined #ruby
<Dwarf>
I use sublimetext from time to time
<Dwarf>
I haven't found a good "IDE" for ruby yet
Marius is now known as nkts
asdfqwer has joined #ruby
asdfqwer has quit [Client Quit]
<vabenjamin>
sublime is expensive
<vabenjamin>
$70 for a text editor =\
arya has joined #ruby
twshelton has quit [Quit: Computer has gone to sleep.]
Konboi has joined #ruby
yshh has joined #ruby
<havenwood>
<3 TextMate 2
<havenwood>
I keep getting tempted to switch to MacVim, but...
<lewellyn>
havenwood: you want the older macvim :/
DrShoggoth has joined #ruby
<lewellyn>
the current builds kinda suck.
<havenwood>
TextMate 2 is $54 or free for academic license or build yourself since it is now open source.
<havenwood>
lewellyn: Sucks due to bugs or bad design decisions?
mattbl has quit [Quit: This computer has gone to sleep]
<lewellyn>
havenwood: it is less featureful than most gui vims and feels less maclike
<lewellyn>
kind of a damning combination, in my book.
<jrajav>
"Feels less maclike"?
<jrajav>
It's a window of text.
<lewellyn>
jrajav: compare 7.3.53 and 7.3.66
<jrajav>
You can use Mac text editing shortcuts / services
<jrajav>
What, besides that, disappoints you?
<vabenjamin>
Ims urprised there isnt just one open source text editor
<lewellyn>
um. the fact that minimizing the window doesn't show up in the dock, for starters.
<vabenjamin>
with free binariees
Volta has joined #ruby
<jrajav>
lewellyn: Just did it. Try again.
danneu has joined #ruby
vikhyat has joined #ruby
<lewellyn>
jrajav: i'm on windows sshed into solaris and linux atm. i can't easily right now.
<jrajav>
If you find a bug, report it
adeponte has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
<Volta>
:q
<jrajav>
I use it every day and I find it to be of very good quality
Volta has quit [Client Quit]
<lewellyn>
jrajav: in most cases, i am on ppc when on a mac, anyhow. so i'm kinda limited to 7.3.53 anyhow ;)
chimkan has joined #ruby
<jrajav>
Perhaps they are bugs that have been fixed then
garbagecollectio has quit [Quit: garbagecollectio]
hbpoison has quit [Ping timeout: 255 seconds]
xemu has joined #ruby
ahokaomaeha has joined #ruby
rburton- has joined #ruby
Volta has joined #ruby
havenn has quit [Remote host closed the connection]
Volta has left #ruby [#ruby]
spaceships has quit [Quit: leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
spaceships has joined #ruby
spaceships has quit [Client Quit]
spaceships has joined #ruby
dhruvasagar has joined #ruby
dankest has joined #ruby
atyz has joined #ruby
willob has joined #ruby
Virunga has quit [Remote host closed the connection]
chimkan__ has joined #ruby
horofox has quit [Quit: horofox]
dhruvasagar has quit [Read error: Connection reset by peer]
chimkan has quit [Ping timeout: 248 seconds]
willob has quit [Client Quit]
dhruvasagar has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
atyz has quit [Ping timeout: 248 seconds]
joeycarmello has joined #ruby
atal421 has joined #ruby
pdamer has joined #ruby
chimkan__ is now known as chimkan
tylersmith has quit [Quit: tylersmith]
jeremywrowe has joined #ruby
Spooner has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
horofox has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
subbyyy has joined #ruby
dhruvasagar has joined #ruby
nilobject has joined #ruby
nkts has quit []
indigestible has joined #ruby
octoberry has joined #ruby
nilobject has quit [Client Quit]
nilobject has joined #ruby
dankest has quit [Quit: Leaving...]
danneu has quit [Quit: WeeChat 0.3.8]
freeayu has joined #ruby
miskander has joined #ruby
mlr has quit [Ping timeout: 244 seconds]
kstephens has joined #ruby
mockra has quit [Remote host closed the connection]
slainer68 has joined #ruby
bean has joined #ruby
garbagecollectio has joined #ruby
bean__ has joined #ruby
Jamone has joined #ruby
kstephens has quit [Client Quit]
julian-delphiki has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
kofno has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 256 seconds]
decoponio has joined #ruby
blf has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
bean has quit [Ping timeout: 252 seconds]
gabrielrotbart has quit [Remote host closed the connection]
Jamone has quit [Ping timeout: 245 seconds]
PanPan has joined #ruby
kofno has joined #ruby
dhejejehe has joined #ruby
dhejejehe is now known as Aguy
moos3 has joined #ruby
meoblast001 has joined #ruby
moos3 has quit [Client Quit]
<blf>
Hey guys, I'm fairly new (as in the last month) to working with web services. I've written a small client which downloads a hundred megs or so of data from a web service, but the downloads are taking much longer than expected. Is there any way to speed up requests apart from spawning more concurrent connections?
slainer68 has quit [Ping timeout: 252 seconds]
<bean__>
blf, do they take longer than manually downloading?
ckrailo has quit [Quit: Computer has gone to sleep.]
<blf>
bean__: Well... I'm not sure I can really test that. Manually downloading the data requires querying and requerying the website.
<bean__>
i see.
wargasm has joined #ruby
<bean__>
I would imagine that ruby is downloading as fast as your connection will allow, but i'd need to see code to know for sure
fir_ed has quit [Read error: Connection reset by peer]
<blf>
vabenjamin: We're researching homologous genes in an attempt to show that more frequently used proteins are replaced with those which are cheaper to produce.
fir_ed has joined #ruby
<bean__>
blf, how long is it taking to download?
<blf>
bean__: Maybe 5 minutes. Which is drastically shorter than it was at first (down from about a day) =P. But still, that seems too long for a couple hundres megs.
<blf>
s/hundres/hundred
<vabenjamin>
Cool, I'm moving to Ruby from Java myself to do some web mining stuff
<bean__>
depends on your connection. How fast is the network?
<blf>
30Mb
<blf>
I've haven't tried on the school's network yet.
<vabenjamin>
I have my comps in a few months sadly
<blf>
Even so, I'm only getting about 15Mbps from the server most of the time.
<blf>
But, I'm pretty new to all of this. I just thought there might be something obvious I was missing.
indigestible has quit [Quit: Bye]
adeponte has joined #ruby
etcetera has quit []
<vabenjamin>
BLF what department are you working out of? Information School?
<blf>
Oi?
<blf>
Computer Engineering at Write State University.
<vabenjamin>
Ah
<bean__>
blf, naw, you could parallelize though and see if you get some improvements
<bean__>
you'll find that 30mbit doesn't always mean 30 mbit
<vabenjamin>
I'm over at Arizona
<bean__>
and the site you're pulling from could be the bottleneck
<blf>
bean__: Hm, could be. The HomoloGene site seems much snappier than its Protein counterpart.
apok has joined #ruby
<blf>
bean__: In any event, thanks for taking a look. I do appreciate the feedback :)
<blf>
I'll look into parallelization
<bean__>
:)
<blf>
vabenjamin: Cool :) Arizona is pretty nice
pac1 has joined #ruby
the_jeebster has quit [Quit: Leaving.]
mlr has joined #ruby
goraxe has joined #ruby
* bean__
is in cold cold iowa
thufir_ has joined #ruby
havenwood has quit [Remote host closed the connection]
inokenty has quit [Quit: Leaving.]
Aguy has quit [Quit: my phone]
doodah has joined #ruby
khimera has joined #ruby
<vabenjamin>
Yup I am learning Ruby by porting a lot of my old Java code, my goal is to implement some machine learning algorithms in Ruby for people to use for stuff like sentiment classification, topic clustering, etc. I've seen similar packages in Python, but nothing for Ruby yet
chimkan has quit [Ping timeout: 252 seconds]
miskander has quit [Quit: miskander]
atal421 has quit [Quit: atal421]
stkowski has quit [Quit: stkowski]
goraxe has quit [Ping timeout: 252 seconds]
khimera has quit [Ping timeout: 256 seconds]
mrkris has joined #ruby
adeponte has quit [Remote host closed the connection]
Jedi_SCT1 has quit [Quit: See ya]
<srid>
is there a html template for ruby that where html is defined by ruby code (so i can embed the html in a little sinatra app)?
daniel_-_ has quit [Ping timeout: 255 seconds]
Nisstyre-laptop has joined #ruby
vyrus001 has left #ruby [#ruby]
Jedi_SCT1 has joined #ruby
emmanuelux has quit [Remote host closed the connection]
fschuindt has quit [Quit: Computer has gone to sleep.]
nilobject has quit [Quit: nilobject]
Volta has joined #ruby
<Volta>
What is ruby?
<vabenjamin>
a programming language
Volta has quit [Client Quit]
horofox has quit [Quit: horofox]
<vabenjamin>
Guess he didnt like that language
gatopan has quit [Ping timeout: 245 seconds]
BrindleFly has joined #ruby
nari has joined #ruby
atyz has joined #ruby
BrindleFly has quit [Client Quit]
miskander has joined #ruby
nfk has quit [Quit: yawn]
joofsh has quit [Remote host closed the connection]
atyz has quit [Ping timeout: 260 seconds]
kstephens has joined #ruby
<V8Energy>
which gem should i use to authenticate http using digest?
timols has joined #ruby
arya has quit [Ping timeout: 252 seconds]
baba has quit [Quit: WeeChat 0.4.0]
miskander has quit [Client Quit]
twshelton has joined #ruby
Volta has joined #ruby
<Volta>
test test
<Volta>
am I communicating?
arya has joined #ruby
timols has quit [Ping timeout: 245 seconds]
Volta has left #ruby [#ruby]
pavilionXP has quit [Ping timeout: 260 seconds]
miskander has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
v0n has joined #ruby
tish has joined #ruby
thinkclay has quit [Quit: Leaving.]
gabrielrotbart has joined #ruby
miskander has quit [Client Quit]
<vabenjamin>
hm #ruby seems to be slow around this time of day
caleb_io has quit [Quit: caleb_io]
<aedornm>
it varies
arya has quit [Ping timeout: 244 seconds]
<bean__>
V8Energy, HTTParty works well.
miskander has joined #ruby
<bean__>
vabenjamin, meh, americans are eating or going to bed / internetting.
miskander has quit [Client Quit]
woolite64 has quit [Ping timeout: 276 seconds]
joofsh has joined #ruby
<JayT>
Is there something to parse my html, then format it with whatever the html idioms are?
nilobject has joined #ruby
<aedornm>
I've started exploring Faraday instead of HTTParty. Still not sure what I like, really.
<blf>
vabenjamin: I've been noticing the same. It's generally busy during the daytime.
twshelton has quit [Quit: Computer has gone to sleep.]
yacks has joined #ruby
arya has joined #ruby
mockra has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
multi_io has quit [Read error: Operation timed out]
etcetera has joined #ruby
multi_io has joined #ruby
timols has joined #ruby
ferdev is now known as ferdev|away
`p has quit [Quit: Leaving]
mockra has quit [Ping timeout: 252 seconds]
predator217 has quit [Ping timeout: 256 seconds]
miskander has joined #ruby
marcgg has quit [Read error: No route to host]
marcgg has joined #ruby
predator117 has joined #ruby
blf has quit [Quit: "Back in a bit"]
banjara has quit [Quit: Leaving.]
dankest has joined #ruby
Jedi_SCT1 has quit [Quit: See ya]
AndChat| has joined #ruby
timols has quit [Quit: timols]
Jedi_SCT1 has joined #ruby
mlr has quit [Ping timeout: 256 seconds]
fuzai has quit [Ping timeout: 260 seconds]
Banistergalaxy has quit [Ping timeout: 245 seconds]
kop has quit [Ping timeout: 248 seconds]
Targen has joined #ruby
ehm_may has joined #ruby
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
jerikl has joined #ruby
IceDragon has quit [Quit: Space~~~]
tylersmith has joined #ruby
richardjortega has quit [Quit: richardjortega]
fuzai has joined #ruby
Rizzle has joined #ruby
bradhe has quit [Remote host closed the connection]
<vyrus001>
is it safe to reuse URI and Net::HTTP:Get objects for calls to different urls?
<bean__>
hmm, not sure.
<bean__>
id imagine so
gatopan has joined #ruby
daniel_hinojosa has joined #ruby
arya has quit [Ping timeout: 276 seconds]
tylersmith has quit [Quit: tylersmith]
<bean__>
vyrus001, i dont know why it wouldnt be
jeremywrowe has quit [Quit: jeremywrowe]
mockra has joined #ruby
codekoala has quit [Quit: WeeChat 0.4.0]
<vyrus001>
bean__: me either but i figured id ask, its kind of a pain to create uri and http objects everytime i want to do a query so rather than make a bunch of new instances id rather just re assign the uri to new uri and rebuild the req object each time
<vyrus001>
but im not sure if the .new syntax would do that and not do some other horrible memory acrobatic ya know?
toekutr has quit [Remote host closed the connection]
jeremywrowe has joined #ruby
whitedawg has joined #ruby
nilobject has quit [Quit: nilobject]
arya has joined #ruby
ebobby has quit [Ping timeout: 255 seconds]
dmiller1 has quit [Quit: WeeChat 0.3.9.2]
hashmal has quit [Quit: Computer has gone to sleep.]
atal421 has joined #ruby
Takehiro has joined #ruby
lectrick has quit [Ping timeout: 256 seconds]
mockra has quit [Remote host closed the connection]
angusiguess has quit [Read error: Connection reset by peer]
khimera has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
therod has quit [Quit: Leaving...]
angusiguess has joined #ruby
G has quit [Ping timeout: 256 seconds]
miskander has quit [Quit: miskander]
lushious has quit [Ping timeout: 252 seconds]
drPoggs has quit [Ping timeout: 256 seconds]
thorncp has quit [Ping timeout: 256 seconds]
drPoggs has joined #ruby
headius has quit [Quit: headius]
G has joined #ruby
thorncp has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
ehm_may has quit [Ping timeout: 244 seconds]
dmiller has joined #ruby
WhereIsMySpoon has quit [Ping timeout: 248 seconds]
d2dchat has quit [Remote host closed the connection]
toekutr has joined #ruby
WhereIsMySpoon has joined #ruby
lushious has joined #ruby
PanPan has joined #ruby
arya has quit [Ping timeout: 256 seconds]
joeycarmello has quit [Remote host closed the connection]
goraxe has joined #ruby
tish has quit [Quit: Leaving.]
browndawg has quit [Quit: Leaving.]
postmodern has joined #ruby
arya has joined #ruby
goraxe has quit [Read error: Connection reset by peer]
PanPan has quit [Read error: Connection reset by peer]
PanPan has joined #ruby
gatopan has quit [Ping timeout: 245 seconds]
ner0x has quit [Quit: Leaving]
divout has joined #ruby
chrishough has joined #ruby
slyv has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
reefocto has joined #ruby
mikepack has joined #ruby
<reefocto>
hello, huge newb here. Does anyone know what might cause ruby not to be able to find installed gems? I keep getting [ERROR] Could not find typhoeus (= 0.4.2) amongst [] even though the gem appears in gemlist
<reefocto>
I typically work with other languages, I'm just trying to get a wordpress vulnerability scanner to run, and I'm not sure why my configuration won't work. any help is appreciated
stormetrooper has quit [Read error: No route to host]
mikepack has quit [Remote host closed the connection]
<vyrus001>
reefocto: do you have jruby installed?
elkclone has quit [Quit: It's never too late to unplug and run.]
<vyrus001>
as well?
<reefocto>
im running ubuntu. can i sudo apt-get install jruby?
<vyrus001>
hehe dont do that
<vyrus001>
i was asking if u did
bradleyprice has joined #ruby
<reefocto>
i followed a tutorial to install ruby
<reefocto>
it said not to use apt-get
<vyrus001>
i do infosec and have both and had an issue with that gem running on windows with wpscan so thats why i asked
<vyrus001>
:D
<reefocto>
i dont think so
<vyrus001>
anyway yea, no ide abut check gem env
<reefocto>
im trying to get this working without getting deep into another oreilly book
<reefocto>
heh
<vyrus001>
lol yea, run gem env and see if the gem is there
<vyrus001>
also run gem list see if it shows up
<reefocto>
people at my company have all these old wordpress installs running, and they get hacked at least once per week
<reefocto>
they show up in gem list
<vyrus001>
then yea check gem env
atyz has joined #ruby
<reefocto>
i dont see any gems
CloCkWeRX has joined #ruby
<vyrus001>
?
<reefocto>
in gem env
<vyrus001>
when you run "gem env" you should se a path
<reefocto>
there are GEM PATHS, two of them, and one of them has folders for the gems
<vyrus001>
right
<reefocto>
GEM PATHS:
<reefocto>
- /usr/lib/ruby/gems/1.8
<reefocto>
- /home/rob/.gem/ruby/1.8
<vyrus001>
are the gems in there?
<reefocto>
yup
therod has joined #ruby
<vyrus001>
hm, then dono :/
<reefocto>
right on. oreilly it is
<reefocto>
:)
<vyrus001>
lol well chill here too
<vyrus001>
im NOT a ruby guru
<reefocto>
today is my first day touching ruby.
Emmanuel_Chanel has quit [Quit: Leaving]
<reefocto>
i am not enjoying it thus far
io_syl has quit [Ping timeout: 252 seconds]
[rust] has quit [Ping timeout: 252 seconds]
NsOmNiAc has quit [Quit: Lost terminal]
<CloCkWeRX>
hey folks - I have a tree made of nodes, each node has a parent id. I have a 'paths' table which shows a flattened relationship of the tree (A -> B -> C, D has mappings for [A, B], [B, C], [B, D], [A, C], [A,D], for example). I'm trying to figure out the best way to calculate the width of the tree - for each level in tree, count nodes. Is there going to be a better way than just iterating?
atyz has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
codekoala has joined #ruby
octoberry has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
atal421 has quit [Quit: atal421]
<reefocto>
keep track?
<reefocto>
in an array
tylersmith has joined #ruby
therod has quit [Ping timeout: 244 seconds]
<CloCkWeRX>
i'm a bit reluctant to cache too much, as there are annoying operations (move section D of tree up to have a parent of A) which would require expiring/recalculating
gatopan has joined #ruby
<CloCkWeRX>
not ruling it out; just leery of going too far in one direction
Emmanuel_Chanel has joined #ruby
<reefocto>
ah ok. yea, that would be a pain.
dankest has quit [Quit: Leaving...]
joeycarmello has joined #ruby
<kenneth>
can you use ffi with a static library (.a)
end_guy has quit [Remote host closed the connection]
vyrus001 has left #ruby [#ruby]
Dan has joined #ruby
yacks has joined #ruby
bubblehead has joined #ruby
bradhe has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jrajav has quit [Quit: I tend to be neutral about apples]
ryanf_ has joined #ruby
banjara has joined #ruby
objectivemo_ has joined #ruby
pac1 has quit [Ping timeout: 256 seconds]
ABK has joined #ruby
objectivemo has quit [Ping timeout: 248 seconds]
objectivemo_ is now known as objectivemo
v0n has quit [Read error: Operation timed out]
vikhyat has joined #ruby
bubblehead has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
baroquebobcat has joined #ruby
[rust] has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
marcgg_ has joined #ruby
jekotia has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
slainer68 has joined #ruby
crackfu has joined #ruby
robert_ has quit [Read error: Connection reset by peer]
Mattix has quit [Ping timeout: 255 seconds]
tylersmith has quit [Quit: tylersmith]
whitedawg has quit [Quit: Leaving.]
Yakko has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
DrShoggoth has joined #ruby
verysoftoiletppr has quit []
bwlang has left #ruby [#ruby]
chimkan_ has joined #ruby
chimkan_ has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
karnowski has quit [Read error: Operation timed out]
NimeshNeema has quit [Read error: Operation timed out]
telling has quit [Read error: Operation timed out]
rwz has quit [Read error: Operation timed out]
caveat- has quit [Read error: Operation timed out]
sweet_kid has quit [Ping timeout: 246 seconds]
rcsheets has quit [Ping timeout: 244 seconds]
xerxas has quit [Ping timeout: 248 seconds]
fcoury has quit [Ping timeout: 252 seconds]
Guest85414 has quit [Read error: Operation timed out]
Mattix has joined #ruby
madhatter has quit [Read error: Operation timed out]
swistak35 has quit [Ping timeout: 246 seconds]
rcj_ has quit [Ping timeout: 255 seconds]
nosleep77 has quit [Ping timeout: 244 seconds]
jhowarth has quit [Ping timeout: 244 seconds]
thejefflarson_ has quit [Ping timeout: 245 seconds]
Harzilein has quit [Ping timeout: 260 seconds]
cool has quit [Ping timeout: 240 seconds]
pkondzior__ has quit [Ping timeout: 248 seconds]
randym has quit [Ping timeout: 248 seconds]
moeSeth_ has quit [Ping timeout: 248 seconds]
kapowaz has quit [Ping timeout: 245 seconds]
tessi has quit [Ping timeout: 252 seconds]
im0b has quit [Ping timeout: 272 seconds]
cam` has quit [Ping timeout: 252 seconds]
RJ3 has quit [Ping timeout: 255 seconds]
strax has quit [Ping timeout: 260 seconds]
Sigma00 has quit [Ping timeout: 260 seconds]
TheDeadSerious_ has quit [Ping timeout: 260 seconds]
spanx has quit [Ping timeout: 245 seconds]
guilleiguaran has quit [Ping timeout: 245 seconds]
kaichanvong has quit [Ping timeout: 240 seconds]
notbrent has quit [Ping timeout: 248 seconds]
yeban has quit [Ping timeout: 264 seconds]
Volta has joined #ruby
dekz__ has quit [Ping timeout: 260 seconds]
dnyy has quit [Ping timeout: 255 seconds]
wereHamster has quit [Ping timeout: 255 seconds]
SeanTAllen has quit [Ping timeout: 260 seconds]
davidboy has quit [Ping timeout: 245 seconds]
patricksroberts_ has quit [Ping timeout: 256 seconds]
prime has quit [Ping timeout: 246 seconds]
ccooke has quit [Ping timeout: 246 seconds]
Bracki has quit [Ping timeout: 252 seconds]
Spaceghost|cloud has quit [Ping timeout: 260 seconds]
[Neurotic] has quit [Ping timeout: 260 seconds]
hbpoison has quit [Ping timeout: 252 seconds]
[0x1a] has quit [Ping timeout: 260 seconds]
muminz has quit [Ping timeout: 276 seconds]
Bish has quit [Ping timeout: 248 seconds]
Volta has quit [Client Quit]
scrr has quit [Ping timeout: 244 seconds]
wedgeV_ has quit [Ping timeout: 255 seconds]
chiel has quit [Ping timeout: 255 seconds]
iaj has quit [Ping timeout: 245 seconds]
_br_ has quit [Ping timeout: 264 seconds]
error404 has quit [Ping timeout: 264 seconds]
bluehavana has quit [Ping timeout: 260 seconds]
Weazy has quit [Ping timeout: 260 seconds]
octarine has quit [Ping timeout: 248 seconds]
heidar has quit [Ping timeout: 248 seconds]
percival__ has quit [Ping timeout: 276 seconds]
Urtokk has quit [Ping timeout: 264 seconds]
KRF has quit [Ping timeout: 246 seconds]
blooberr has quit [Ping timeout: 260 seconds]
prudhvi has quit [Ping timeout: 260 seconds]
srid has quit [Ping timeout: 260 seconds]
eval-in has quit [Ping timeout: 260 seconds]
Blue_Ice has quit [Remote host closed the connection]
ohcibi has quit [Read error: Connection reset by peer]
madhatter has joined #ruby
WhereIsMySpoon has quit [Ping timeout: 255 seconds]
CraHan|out has quit [Ping timeout: 246 seconds]
rcj_ has joined #ruby
z has quit [Ping timeout: 245 seconds]
therod has joined #ruby
mrkris has quit [Quit: Computer has gone to sleep.]
Muz_ has joined #ruby
z has joined #ruby
Muz has quit [Ping timeout: 264 seconds]
z is now known as Guest44483
sweet_kid has joined #ruby
Takehiro has joined #ruby
nidhimj22 has joined #ruby
ohcibi has joined #ruby
verysoftoiletppr has joined #ruby
nidhimj22 has left #ruby [#ruby]
sonne has quit [Ping timeout: 255 seconds]
mockra has joined #ruby
CraHan|out has joined #ruby
ananthakumaran has joined #ruby
Dreamer3 has joined #ruby
Bracki has joined #ruby
rcj_ has quit [Ping timeout: 252 seconds]
Blue_Ice has joined #ruby
Blue_Ice has quit [Changing host]
Blue_Ice has joined #ruby
iaj has joined #ruby
heidar has joined #ruby
WhereIsMySpoon has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
Muz_ has quit [Ping timeout: 252 seconds]
sonne has joined #ruby
KRF has joined #ruby
mercwith1mouth has quit [Remote host closed the connection]
mercwithamouth has quit [Remote host closed the connection]
nosleep77 has joined #ruby
Weazy has joined #ruby
Urtokk has joined #ruby
chiel has joined #ruby
eval-in has joined #ruby
msch has quit [Ping timeout: 245 seconds]
ccooke has joined #ruby
yacks has quit [Ping timeout: 248 seconds]
prime has joined #ruby
tessi has joined #ruby
mockra has quit [Ping timeout: 248 seconds]
prudhvi has joined #ruby
rcj_ has joined #ruby
Bish has joined #ruby
Sigma00 has joined #ruby
swistak35 has joined #ruby
_br_ has joined #ruby
taoru_ has joined #ruby
therod has quit [Ping timeout: 255 seconds]
Myconix has quit [Quit: Server Error 482]
verysoftoiletppr has quit [Remote host closed the connection]
gommo has quit [Remote host closed the connection]
noop has quit [Remote host closed the connection]
noop_ has quit [Read error: Connection reset by peer]
noop has joined #ruby
Jeaye has joined #ruby
Myconix has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
v0n has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
gommo has joined #ruby
moshee has quit [Ping timeout: 276 seconds]
moshee has joined #ruby
angusiguess has joined #ruby
cableray has quit [Quit: cableray]
ananthakumaran has joined #ruby
techhelp has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
crackfu has quit [Remote host closed the connection]
atno has joined #ruby
crackfu has joined #ruby
lectrick has joined #ruby
brianpWins has joined #ruby
kenneth has joined #ruby
kenneth has quit [Client Quit]
thone has joined #ruby
spaceships has quit [Quit: leaving]
jeremywrowe has quit [Quit: jeremywrowe]
Nisstyre-laptop has joined #ruby
techhelp has quit [Ping timeout: 252 seconds]
Myconix has joined #ruby
cableray has joined #ruby
thone_ has quit [Ping timeout: 252 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
crackfu has quit [Ping timeout: 264 seconds]
Slivka has joined #ruby
v0n has quit [Ping timeout: 276 seconds]
mockra has joined #ruby
crackfu has joined #ruby
techhelp has joined #ruby
techhelp has quit [Remote host closed the connection]
<vabenjamin>
whats the best way to get people to help on myy open source project
vikhyat has quit [Ping timeout: 245 seconds]
taoru has quit [Remote host closed the connection]
taoru has joined #ruby
browndawg has joined #ruby
<havenwood>
vabenjamin: put it on Github, use nice indention, have unit tests so people can get up to speed faster and refactor, write issues for potential features and issues for where you'd hope they might help
<havenwood>
vabenjamin: and shameless self-promotion :P
<vabenjamin>
WEKA is a machine learning\data mining library
<havenwood>
vabenjamin: cool
codecop has joined #ruby
<vabenjamin>
I know Java but not Ruby so I figured it's a good way to learn
<havenwood>
vabenjamin: sounds like it, I've heard of WEKA but have no experience with it
<havenwood>
good project, github, tests -- check, check, check :)
crackfu has quit [Remote host closed the connection]
<havenwood>
vabenjamin: Yeah, doing up issues tickets for features or bugs is nice because looking at the project from the outside it gives you a place to start. And TODO:s in the code. Hrm.
crackfu has joined #ruby
<havenwood>
vabenjamin: Oh, once you've got a good start, prolly posting to reddit/r/ruby is a good idea. Asking here during peak hours.
<vabenjamin>
tyvm
<vabenjamin>
Do you have any personal need for any NLP or machine learning tools implemented in Ruby?
_adeponte has quit [Remote host closed the connection]
yacks has joined #ruby
crackfu has quit [Ping timeout: 244 seconds]
<havenwood>
vabenjamin: Not a specific need, but it seems pretty interesting. I'd be curious to check it out more. I starred your repo so I can look at it when I have fresh eyes. :)
crackfu has joined #ruby
zodiak has joined #ruby
atyz has joined #ruby
jarjar_prime has quit [Quit: Ready? Set? Go!]
goraxe has joined #ruby
arya has quit [Ping timeout: 240 seconds]
gokul has joined #ruby
gokul has quit [Client Quit]
gokul has joined #ruby
gokul has left #ruby [#ruby]
arya has joined #ruby
haxrbyte has quit [Remote host closed the connection]
goraxe has quit [Ping timeout: 252 seconds]
carraroj has joined #ruby
haxrbyte has joined #ruby
gokul has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
CloCkWeRX has quit [Quit: Leaving.]
rburton- has joined #ruby
Merlin has joined #ruby
crackfu has quit [Remote host closed the connection]
mcarron has quit [Quit: mcarron]
<Merlin>
is this an acceptable place to ask for help with a capistrano/bundler issue related to rails, or is that best done in #rails?
ebobby has joined #ruby
mockra has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
skattyadz has joined #ruby
toekutr has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
skattyadz has quit [Client Quit]
banjara has quit [Quit: Leaving.]
ferdev is now known as ferdev|away
hamed_r has joined #ruby
hemanth_ has joined #ruby
obs has joined #ruby
bradhe has quit [Remote host closed the connection]
ozgura has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 256 seconds]
noxoc has quit [Quit: noxoc]
adambeynon has joined #ruby
kevinfagan has joined #ruby
atyz has quit [Quit: Leaving...]
nomenkun has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
ozgura has joined #ruby
sandGorgon has quit [Ping timeout: 256 seconds]
swex_ has quit [Ping timeout: 248 seconds]
ferdev|away is now known as ferdev
swex has joined #ruby
afd__ has quit [Read error: Connection reset by peer]
Elhu has joined #ruby
QaDeS has joined #ruby
dr_bob has quit [Quit: Leaving.]
twoism has joined #ruby
nomenkun has joined #ruby
nari has quit [Ping timeout: 276 seconds]
notVert has joined #ruby
jgrevich has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 255 seconds]
hoelzro|away is now known as hoelzro
chichou has joined #ruby
bradleyprice has quit [Remote host closed the connection]
asuka has quit [Ping timeout: 246 seconds]
cybes has left #ruby [#ruby]
tish has joined #ruby
twoism has quit [Ping timeout: 256 seconds]
dr_bob has joined #ruby
eka has joined #ruby
ozgura has quit [Ping timeout: 255 seconds]
Criztian has joined #ruby
hemanth_ has quit [Ping timeout: 245 seconds]
buscon has joined #ruby
PanPan has joined #ruby
_bart has joined #ruby
browndawg has joined #ruby
Myconix has joined #ruby
ozgura has joined #ruby
skattyadz has joined #ruby
nari has joined #ruby
arya has quit [Ping timeout: 256 seconds]
arya has joined #ruby
Vainoharhainen has joined #ruby
ephemerian has joined #ruby
brianpWins has quit [Quit: brianpWins]
noxoc has joined #ruby
abdulqabiz has joined #ruby
<_bart>
Hi, I just tried to run `rvm install 1.9.3-p385`, but while installing, I get this error: There was an error while trying to resolve rubygems version for 'latest'.
<Hanmac1>
_bart you could try #rvm
<_bart>
Hanmac1: alright, thanks
workmad3 has joined #ruby
hbpoison has joined #ruby
headius has joined #ruby
daniel_-_ has joined #ruby
Adys has quit [Read error: Connection reset by peer]
<_bart>
Ah, I did a reinstall, and it ran fine, weird weird stuff! rvm reinstall worked
Slivka has quit [Ping timeout: 245 seconds]
schaerli has joined #ruby
Adys has joined #ruby
gommo has quit [Remote host closed the connection]
arya has quit [Ping timeout: 240 seconds]
dcunited001 has joined #ruby
timmow has joined #ruby
gtc has quit [Quit: kill -9 gtc]
spider-mario has joined #ruby
<shevy>
anyone of you guys have default colours they use
keymone has quit [Quit: keymone]
<shevy>
like when you want to say "this is a file, we output this to the user in colours"
Myconix has quit [Ping timeout: 248 seconds]
timmow has quit [Remote host closed the connection]
slainer68 has joined #ruby
timmow has joined #ruby
gtc has joined #ruby
arya has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
timonv has joined #ruby
macq has joined #ruby
<Hanmac1>
shevy you mean that when you do ll, it does shows you in colours?
<shevy>
Hanmac1 well, yeah, BUT
<shevy>
I mean not only for bash
<shevy>
kinda "colours to rule them all", everywhere, both on commandline, also on the www
ferdev has quit [Quit: Leaving...]
<shevy>
I seem to be one of the few who use ansi colours in .rb scripts
<shevy>
and I really want to be as consistent as possible whenever I do
<Hanmac1>
one of my developdepences uses ansi colours, but only for testing
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
<shevy>
is libarchive finished? :D
browndawg has quit [Read error: Connection reset by peer]
notVert has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
dcunited001 has quit [Quit: Leaving]
<Hanmac1>
shevy no it is not finsih ... currently i have some probls that lays deeper in the lib itself (so i try to fix it there, otherway i will need an workaround that may not work on all platforms)
vabenjamin has left #ruby [#ruby]
adeponte has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<shevy>
hehe
<shevy>
I tell you
<shevy>
the first 80% of the way is simple
<shevy>
the rest is hard work
gyre007 has joined #ruby
adeponte has quit [Ping timeout: 252 seconds]
<Hanmac1>
shevy: for sample **/*.* does currently not work in libarchive itself so i need glob or fnmatch itself for a workaround
<shevy>
and that is not good?
<shevy>
I always use Dir['*']
skattyadz_ has joined #ruby
<Hanmac1>
i mean i wanted to use it inside my gem itself (maybe without need to call the ruby functions)
Es0teric has quit [Quit: Computer has gone to sleep.]
<macq>
Anyone know why Module.const_defined?("abc") creates new symbol :abc ?
generali_ has quit [Ping timeout: 264 seconds]
BrindleFly has quit [Client Quit]
<hoelzro>
consts are stored in a table keyed by symbol
codespectator has joined #ruby
codespectator has quit [Excess Flood]
<hoelzro>
so you need a symbol to look it up
codespectator has joined #ruby
hamed_r has quit [Remote host closed the connection]
<macq>
i see... thanks
bradhe has quit [Ping timeout: 255 seconds]
verysoftoiletppr has quit []
goraxe has joined #ruby
<Hanmac1>
"FakeNews: Rails does wants to fix that some data send to rails could be an SymbolTableOverflow because they uses the input directly at Module.const_defined?"
chussenot has joined #ruby
<Hanmac1>
macq what is your ruby version?? because ob both versions i use, it does not create new symbols
goraxe has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 260 seconds]
<Hanmac1>
macq this error was fixed in ruby2
softbit has joined #ruby
emocakes has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
Mon_Ouie has quit [Ping timeout: 276 seconds]
ferdev has joined #ruby
pandawarrior1 has joined #ruby
sduckett_ has quit [Read error: Operation timed out]
JonnieCache has quit [Quit: leaving]
vlad_starkov has joined #ruby
arya has joined #ruby
<macq>
yep, it is
sduckett has joined #ruby
schaerli has quit [Remote host closed the connection]
hbpoison has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
chussenot__ has joined #ruby
himsin has quit [Remote host closed the connection]
bradhe has joined #ruby
himsin has joined #ruby
thone_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
pandawarrior has quit [Ping timeout: 252 seconds]
thone has quit [Ping timeout: 276 seconds]
abionic has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
ABK has quit [Ping timeout: 244 seconds]
arya has joined #ruby
<_bart>
When I run `gem list` I see bundler, but when I try to run 'bundle install' I get: ERROR: Gem bundler is not installed, run `gem install bundler` first.
<_bart>
Only after I say: rvm use 1.9.3-p385 it works
<_bart>
but how do I do that automatically every time I login, in an elegant way
<Hanmac1>
_bart #rvm or #bundler
<macq>
rvm use --default 1.9.3-p385
<fuzai>
http://pastie.org/6223096 When I run this I seem to get a fatal error and Ruby stops, what is the correct way to trap the error so Ruby doesn't stop and verify that the server was able to infact connect to the JSON server and pull valid data, before I replace the old arrays?
msch has joined #ruby
Mekkis has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
zoonfafer has joined #ruby
<Xeago>
dave?
<_bart>
macq: doesn't work, when I run 'rvm list' it says it is set and default, but when I run 'rails' I get 'zsh: command not found: rails'
<Xeago>
apeiros_: it boils down to expensive official batteries are less secure than ebay ones :P
generalissimo has quit [Remote host closed the connection]
schaerli has joined #ruby
* lewellyn
blows apeiros_ up
<Mekkis>
basic question: does assignment make a copy, or is it just a pointer copy? as in, if I go r = @init[@current_idx] , then later modify r, does it modify the contents of @init?
<Xeago>
secure as in have a password set not to 0x000000
<hoelzro>
Mekkis: yes
<Xeago>
or 0xffffff
<hoelzro>
if you do something like r.downcase!
wf2f has quit []
<Xeago>
I am pretty sure that once you get remote code execution
<Mekkis>
cool, thanks
<Xeago>
on the chip in battery
<Xeago>
you can control certain aspects
<Xeago>
like continually increaasing the voltage
ferdev has quit [Quit: Leaving...]
<workmad3>
Mekkis: assignment assigns references (bit more heavyweight than just a pointer)
Kuifje has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
<Xeago>
(the battery contains all logic btw, chargers 'read' the battery and then do stuff, and because we are on the battery, we can make the charger do anything we want :D)
<_bart>
macq: I added this: source $(rvm 1.9.3-p385 do rvm env --path) to my ~/.zshrc
<_bart>
macq: feels hacky, but the docs also say that
yacks has quit [Read error: Operation timed out]
carloslopes has joined #ruby
razibog has joined #ruby
<Xeago>
_bart: do you need to use rvm?
<workmad3>
Xeago: don't discount the physical security aspects too though... if someone has had access to your device, then sure they could have fiddled with your battery and set it so it'll blow up
<workmad3>
Xeago: but on the other hand, if they had access to your device, they could just replace the battery with one set to blow up
<Xeago>
workmad3: ofcourse
<_bart>
Xeago: Yes well, I know it's a good thing to use it
<workmad3>
Xeago: at which point your secure battery from ebay is pointless :P
<Xeago>
but what about remote code execution in browsers :P
<Xeago>
in the tested systems
<Xeago>
this does not always require root
ferdev has joined #ruby
<Xeago>
or with a simple dns rebind, you can modify the firmware downloaded
<Xeago>
(dns rebinding is awesome btw)
emergion has quit [Quit: Computer has gone to sleep.]
<workmad3>
Xeago: true :) I was thinking (for some odd reason) that you would need physical access to piss around with battery firmware
<Xeago>
I have seen so many vulnerable hosts, on airport networks
<Xeago>
it is ridiculous!
<Xeago>
(and yes, I do play around on those hosts :3)
<apeiros_>
Xeago: oh neat, you mean new viruses like that one ~10-15y back which would melt your motherboard (only certain mobos were affected)
<Xeago>
I wouldn't call it a virus tho
<workmad3>
malware
vikhyat has joined #ruby
<dawkirst>
hi there, I'm new to Ruby and programming, and I'm trying to understand something fundamental: when doing stuff in Sinatra for example, how much sense does it make to put a lot of logic in the views?
<Xeago>
not necessarily ;p
<Xeago>
you can use it for 'good' intents
<Xeago>
e.g. setting the manufacturing date
<apeiros_>
dawkirst: generally you try to separate concerns
<Xeago>
so you get your warranty back :P
<apeiros_>
dawkirst: so you'll try to have as little logic as possible in the view
<workmad3>
Xeago: that's still not 'good' :P
<apeiros_>
dawkirst: also makes it easier to deal gracefully with errors
<Xeago>
'good' in some sense: my wallet
slainer68 has quit [Remote host closed the connection]
<workmad3>
Xeago: not to mention that most warrantys I've seen require proof of purchase date, not proof of manufactured date
<Xeago>
also, usb driver exploits
<Xeago>
stick a thumbdrive into something of which you know has a driver bug (there are lots), you got contorl over the bus
<dawkirst>
apeiros_, that makes sense, but when looking at templating engines like Haml and Slim, I see that it cates for quite a bit of logic -- or is it simply that it caters for the effective construction of views?
<dawkirst>
*caters
<Xeago>
(and os, and that is in root)
<apeiros_>
dawkirst: you do need a bit of logic in views
<Xeago>
you can't actually do anything with a TMP, for example
<apeiros_>
dawkirst: otherwise you could just serve static html
<Xeago>
because that communication is authenticated via a different bus
<Xeago>
solution, install a fuzzer on the battery
<apeiros_>
which btw. is absolutely an option with client side frameworks
<Xeago>
TMP=trusted module platform
<Xeago>
like keycards etc
<apeiros_>
i.e., you serve static html+assets, and have e.g. a JSON API which is accessed via JS
carloslopes has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
<Xeago>
workmad3: but indeed, I would be far more concerned about someone getting access to it, than what they could do when they get access ;p
<workmad3>
apeiros_: which is the entire principle behind couchapps :)
bigkevmcd has quit [Quit: Ex-Chat]
a_a_g has joined #ruby
robbyoconnor has joined #ruby
segv- has joined #ruby
<dawkirst>
apeiros_, in that regard, which templating engine is the most semantically geared towards that (i.e. using logic just to construct views)?
Takehiro has joined #ruby
<apeiros_>
uh, no idea. I like HAML and stick with it until something sufficiently better comes a long
<apeiros_>
*along
samphippen has quit [Quit: Computer has gone to sleep.]
bigkevmcd has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<banister`sleep>
dawkirst: what language do you come from?
<banister`sleep>
prior to ruby, i mean
<dawkirst>
banister`sleep, none, I've only started picking up programming this year (I did a business systems major)
<banister`sleep>
dawkirst: ah :)
backjlack has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
inao has quit [Quit: Leaving...]
arya has joined #ruby
emocakes has quit [Quit: emocakes]
denken has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
yacks has joined #ruby
denken has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
zigomir has quit [Quit: zigomir]
<shevy>
dawkirst aaaaah but rails lured you? not ruby itself? :(
apok has quit [Quit: apok]
nfk has joined #ruby
samphippen has joined #ruby
arya has quit [Ping timeout: 245 seconds]
kofno has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 244 seconds]
<dawkirst>
shevy no not at all, it was Ruby itself. I haven't touched Rails (only Sinatra)
a_a_g has quit [Ping timeout: 255 seconds]
yewton has quit [Excess Flood]
ale` has joined #ruby
divout has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
arya has quit [Ping timeout: 276 seconds]
<Quadlex>
Whoo, RubyConf_AU
JonnieCache has joined #ruby
gokul has quit [Quit: Leaving]
banister`sleep has quit [Remote host closed the connection]
arya has joined #ruby
cha1tanya has joined #ruby
banister`sleep has joined #ruby
<dawkirst>
speaking of Rails (which I haven't touched, promise), is there a gem that could do something similar than the Rails #to_sentence method?
Virunga has joined #ruby
<dawkirst>
Guess it'll probably be easiest just to do it myself
obs has quit [Quit: Konversation terminated!]
hybris has joined #ruby
postmodern has quit [Quit: Leaving]
fermion has joined #ruby
<shevy>
hmm not sure what to_sentence does
moos3 has joined #ruby
<shevy>
there is an umbrella project... I forgot the name... started by trans, I think. it kind o... ah, facets was the name. it has like a million methods
vikhyat_ has quit [Remote host closed the connection]
<shevy>
ewww
v0n has joined #ruby
<shevy>
give a few years and rails will have a #scratch_my_butt method
robustus has quit [Ping timeout: 276 seconds]
thone has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 260 seconds]
robustus has joined #ruby
thufir_ has joined #ruby
pdamer has quit [Quit: pdamer]
willob has joined #ruby
unix has quit [Ping timeout: 264 seconds]
<dawkirst>
lol
<Hanmac1>
shevy such a method would not suprise me
<Hanmac1>
and then the railer comes and whine why they cant use it in core ruby
yshh has joined #ruby
abdulqabiz has joined #ruby
abdulqabiz has quit [Max SendQ exceeded]
aqabiz has quit [Quit: aqabiz]
noop has quit [Quit: Leaving]
aqabiz has joined #ruby
aqabiz has quit [Max SendQ exceeded]
aqabiz has joined #ruby
aqabiz has quit [Max SendQ exceeded]
ryannielson has quit [Quit: ryannielson]
chussenot__ has quit [Quit: chussenot__]
JarJar has quit [Remote host closed the connection]
unix has joined #ruby
aqabiz has joined #ruby
<shevy>
Hanmac1 I think most of them will stick to rails
<shevy>
I mean completely
<shevy>
would not take long and rails will be its own programming language
ryannielson has joined #ruby
yshh has quit [Ping timeout: 272 seconds]
JarJar has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
<hoelzro>
Rails on Rails
<Hanmac1>
Rails on Planes
<JonnieCache>
what is it with hipsters and triangles
<JonnieCache>
come on this channel is pretty hip someone in here must be able to tell me
slainer68 has joined #ruby
hashmal has joined #ruby
BBonifield has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
callmehyde has quit [Remote host closed the connection]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 252 seconds]
BBonifield has joined #ruby
jbpros has quit [Quit: May the Cuke be with you!]
jbpros has joined #ruby
jacobw has quit [Ping timeout: 252 seconds]
sharpobject has quit [Ping timeout: 252 seconds]
aqabiz has quit [Quit: aqabiz]
vng|afk is now known as crankycoder
avelldiroll has quit [Ping timeout: 252 seconds]
aqabiz has joined #ruby
daemoen has quit [Ping timeout: 252 seconds]
atal421 has joined #ruby
end_guy has joined #ruby
tommyvyo has joined #ruby
jimeh has joined #ruby
<shevy>
dunno
<shevy>
perhaps triangles is how hipsters have sex
ffranz has joined #ruby
jacobw has joined #ruby
CreativeEmbassy has joined #ruby
thone has joined #ruby
sharpobject has joined #ruby
daemoen has joined #ruby
chussenot has joined #ruby
avelldiroll has joined #ruby
pdamer has joined #ruby
<Hanmac1>
shevy i thought that they take normal persons and then convert them with iphones into hipsters ... like borg :P
banister`sleep has joined #ruby
Urtokk has quit [Quit: leaving]
atyz has joined #ruby
<shevy>
hey
<shevy>
borg were cool
<shevy>
I can't imagine that hipsters are cool
<JonnieCache>
lol i searched google for "what is it with hipsters and triangles" and there are many others asking that exact question all over the internet
carloslopes has quit [Remote host closed the connection]
<shevy>
array.size
blaxter has quit [Quit: foo]
<f1gjam>
ah...
ryannielson has joined #ruby
jkbbwr has joined #ruby
<jkbbwr>
how simple is the ruby virtual machine
<shevy>
but you must have an array
<hoelzro>
f1gjam: split it into lines
<shevy>
I mean, you can do "string".size too
ananthakumaran has quit [Quit: Leaving.]
<hoelzro>
jkbbwr: why do you ask?
<shevy>
yeah, split it, like .split("\n") or similar
<f1gjam>
ok, so its a string it putting it as, but I can turn in to array
<JonnieCache>
jkbbwr: really not simple
<jkbbwr>
heidar: im looking for a final year project, nothing gets me going more than implementing a virtual machine, I was scouting for a language to use
<f1gjam>
one sec
<JonnieCache>
because the language isnt simple
<shevy>
yeah, and you can always check if it is a string or array.. if your_object.is_a? Array
__BigO___ has quit [Remote host closed the connection]
<hoelzro>
jkbbwr: Lua's VM is pretty simple
<JonnieCache>
the grammar is full of crazy edge cases
<f1gjam>
can I create an array based on \n
<shevy>
f1gjam told you, .split("\n")
justsee has quit [Quit: Leaving...]
<f1gjam>
oh
<jkbbwr>
hoelzro: Im avoiding lua for the time being because of the lack of documentation
<f1gjam>
thanks
m3pow has joined #ruby
<hoelzro>
jkbbwr: lack of documentation?
<shevy>
and the reverse to .split is .join so you can shuffle between these two until the end of days :P
<hoelzro>
it's fairly well documented, imo
<hoelzro>
there's even a paper on how the VM works
atyz has quit [Quit: Leaving...]
<jkbbwr>
hoelzro: the paper isn't quite as clear as it could be
<f1gjam>
great :D thanks shevy
<f1gjam>
and hoelzro
<shevy>
\o/
jerius has joined #ruby
carloslopes has joined #ruby
<shevy>
hey... hoelzro has two o ... I am going to use two cheering folks for hoelzro
<shevy>
\o/ \o/
<hoelzro>
\o/
mpfundstein has joined #ruby
<shevy>
h\o/elzr\o/
carlyle has joined #ruby
<shevy>
man, I obviously need to go back and code something useful...
<f1gjam>
shevy i am trying to just a script which checks the system is in the expected state after a chef run
<f1gjam>
so a verification
<f1gjam>
first time using ruby :) - I'm sure ill pick all this up
vollerts has joined #ruby
<shevy>
f1gjam I usually only use: result = `ffmpeg -i #{video_file}`.chomp # something like that
sandGorgon has quit [Ping timeout: 248 seconds]
abionic has quit [Ping timeout: 255 seconds]
tish has joined #ruby
<f1gjam>
i was using the %x as it looks cleaner
<shevy>
I would be unable to remember %x[] ... though I think you could use %x() instead too... hmm I dont use %x though
<shevy>
aha
sambio has joined #ruby
aquaranto has joined #ruby
<f1gjam>
plus I'm a python guy :)
<shevy>
cleanest is system() still
<f1gjam>
so i like [] alot
<shevy>
system 'ffmpeg -i '+video_file
<f1gjam>
yeah but system starts a new process in place of running process right
the_mentat has quit [Quit: Computer has gone to sleep.]
<shevy>
yeah but you also use [] for string objects, array objects, and your custom classes, when you do: "def [](input)"
<f1gjam>
I know i can use ()
<f1gjam>
so ill probably change
vollerts has left #ruby [#ruby]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<shevy>
class Foo; def [](input); puts 'hi from '+input; end; end; foo = Foo.new; foo['world'] # hi from world
schaerli has joined #ruby
BrindleFly has joined #ruby
aquaranto has left #ruby [#ruby]
ner0x has joined #ruby
<f1gjam>
lol that one lliner
<f1gjam>
I'm not "there" yet
<shevy>
you can spread it onto several lines
<shevy>
all ; will become a newline
<f1gjam>
yeah would be easier for me :D
<apeiros_>
; works like newline
<shevy>
it is just a tiny class
<f1gjam>
yep i got that
<f1gjam>
like bash
<shevy>
but on IRC, I dont want to flood
<shevy>
apeiros_ would kick me :(
<f1gjam>
sure
<apeiros_>
indeed I would. but shevy is well behaved and so I don't have to :)
<shevy>
never let the swiss to power!!!
<shevy>
always go with an austrian ... ;P
<apeiros_>
shevy: pfff, we own the world
mmitchell has joined #ruby
<f1gjam>
lol
<shevy>
nestle - dominates global chocolate
<f1gjam>
hmmm
angusiguess has quit [Ping timeout: 272 seconds]
<f1gjam>
i thought kraft group did
<Hanmac1>
<shevy>
yah no idea... could be krafts is bigger
<f1gjam>
whoever makes nutella owns the world
<shevy>
lol
<shevy>
hmmm we should get a big dataset, which huge companies use RoR
hbpoison has joined #ruby
<f1gjam>
how kids suddenly stop and their eyes just start gleaming when they see nutella (and its the same for adults)
<f1gjam>
anyway enough chocolate talk :D
<shevy>
f1gjam hmm I just had a look, nutella is owned by italian ferrero
kiwnix has joined #ruby
<f1gjam>
ah :) well then looks like the italians control the world ;)
<Hanmac1>
nutella is jummy
<shevy>
f1gjam you only have to connect those babblings with ruby somehow ;)
<shevy>
like which company uses RoR :P
<f1gjam>
give me a few months i am sure I will
joofsh has joined #ruby
mmitchell has quit [Remote host closed the connection]
<shevy>
f1gjam for food, quite yes, they have a few really great food "products"
<shevy>
just compare this to UK cuisine
<JonnieCache>
the bbc uses rails for everything internally
arya_ has quit [Disconnected by services]
<JonnieCache>
or at least they used to
<shevy>
cool
<f1gjam>
lol uk cuisine
<shevy>
wait
<JonnieCache>
a lot of corporations use rails internally for small departmental projects
angusiguess has joined #ruby
<shevy>
only internally?
<apeiros_>
"I hate these filthy neutrals Kif! With enemies you know where they stand but with neutrals? Who knows! It sickens me." - Captain Zapp Brannigan
<JonnieCache>
yeah because departments can do their own projects how they like, but doing that actual company website has to go through all sorts of awful committees so it ends up being java or something
kofno has quit [Remote host closed the connection]
Criztian has joined #ruby
<f1gjam>
i hate this: myarray.each do |i|
kofno has joined #ruby
<f1gjam>
i know what it is doing i just hate it
<f1gjam>
i would prefer if it was like: for i in myarrach.each do
girija has quit [Ping timeout: 276 seconds]
bradhe has joined #ruby
<apeiros_>
hm, anybody know how I can get the name by which an executable was invoked? $0 gives me the full path (and I did not run the executable using the full path)
<Hanmac1>
for in do so outdated its only for the ones that came from C and other old languagess
aedornm has quit [Quit: Leaving]
tensil has quit [Quit: tensil]
<f1gjam>
Hanmac1 :D
bricker`LA has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
ferdev|away is now known as ferdev
<Hanmac1>
do you guys know what i have seen? for i in 0..CONST.size; ... CONST[i] ...; end this line was MADE for using each but the code was crippeld to fit into the for in shema
CreativeEmbassy has joined #ruby
<apeiros_>
CONST.size.times do |i|
<apeiros_>
not each
<apeiros_>
:-p
<apeiros_>
but yeah, why add syntax if you don't have to?
<apeiros_>
syntax is less discoverable than methods
daniel_- has joined #ruby
Guest21304 has joined #ruby
rovalent has joined #ruby
<Hanmac1>
f1gjam: you CAN use for i in [1,2,3].each do ... but i would NOT recomend it
kumarat9pm has quit [Quit: Leaving.]
Xeago has quit [Ping timeout: 240 seconds]
<rovalent>
My developers have a process that is streaming a large gziped txt file to read into a database. Is there a way to cleanup after the worker has finished? Is it a better idea ot just pull this into its own process and then when its done, just kill the process?
<apeiros_>
you can also use `for i in [1,2,3] do` (without .each)
octoberry has joined #ruby
<apeiros_>
does for/in actually have a `do`?
<Hanmac1>
the "do" is optional but does nothing
rovalent has quit [Client Quit]
atal421 has quit [Quit: atal421]
<apeiros_>
ah, but it is allowed
<Hanmac1>
yeah
RonScagz has joined #ruby
<f1gjam>
one sec
<Hanmac1>
>> for c in "abc".each_codepoint; p c; end
<shevy>
what is the difference between to_h and to_hash anyway
the_mentat has joined #ruby
b1rkh0ff has quit [Read error: Connection reset by peer]
<Hanmac1>
shevy it the same difference between to_a and to_ary, and to_s and to_str, and to_i and to_int
samphippen has joined #ruby
anonymuse has joined #ruby
<spider-mario>
what is it?
b1rkh0ff has joined #ruby
<spider-mario>
I don’t know it
* hoelzro
listens up
<macq>
a.each {|**o| ...} that's 2.0 only
<JonnieCache>
yeah what is this difference? ive always just used the to_x single char versions
<Hanmac1>
the longer method names are for "louseless convert" ... like when you turn an number into an string you loose information ... (thats why numbers does not have to_str)
<JonnieCache>
so the long name impliess loss?
<JonnieCache>
but the short one is reversable?
geekbri has joined #ruby
<Hanmac1>
otherway around, the long names (should) reversable ...
<JonnieCache>
hmmm
twshelton has joined #ruby
<Hanmac1>
and they are used when donig *args calls to_ary or **args calls to_hash
bean__ is now known as bean
<JonnieCache>
ah right
<JonnieCache>
so when there is both, as in to_a and to_ary what actually is there difference?
slainer68 has joined #ruby
<JonnieCache>
specifically
bradhe has joined #ruby
nari has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
<banister`sleep>
JonnieCache: to_ary is called when u *
stevechiagozie has joined #ruby
<Hanmac1>
the longer, to_ary is prefered in the most fuctions ... (in some other, the shorter is ignored)
<banister`sleep>
JonnieCache: it's also called when u destructure it
stevechiagozie has quit [Client Quit]
<banister`sleep>
JonnieCache: looks like to_a is called when u splat
<banister`sleep>
JonnieCache: so to_ary is just used when u destructure
angusiguess has quit [Ping timeout: 245 seconds]
<JonnieCache>
yeah but what does it actually do differently, if anything?
Hanmac1 has quit [Read error: Operation timed out]
hbpoison has quit [Ping timeout: 260 seconds]
Guest44483 has quit [Changing host]
Guest44483 has joined #ruby
Guest44483 is now known as z
<banister`sleep>
JonnieCache: well to_a is *not* called when u destructure :P
<banister`sleep>
so if you want to have that feature, u need to implement to_ary
<banister`sleep>
that's different, isn't it? :)
<banister`sleep>
x,y = my_obj
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
end_guy has quit [Remote host closed the connection]
<JonnieCache>
ok so they are the same but they are called at different times. theyre basically hooks for you to reimplement
<JonnieCache>
yes?
<shevy>
JonnieCache you sound almost desperate, trying to understand it!
<JonnieCache>
i like to understand things :P
<JonnieCache>
relentlessly needing to understand things is what got me where i am today
slainer68 has quit [Ping timeout: 272 seconds]
<JonnieCache>
confused and scared of the world but with a good job
<JonnieCache>
haha
<banister`sleep>
JonnieCache: yeah, they're kinda like hooks i guess. I think the behaviour of "to_ary" is kind of vague, it just means your object acts a little bit more array-like, but to what degree im not quite sure
yacks has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
<shevy>
JonnieCache hahaha
slainer68 has joined #ruby
interactionjaxsn has joined #ruby
Hanmac1 has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
<macq>
There is one funny thing about ruby - if you have question and you try to find answers reading vm source code... you probably will end up with more questions
goraxe has joined #ruby
end_guy has joined #ruby
__BigO__ has joined #ruby
schaerli has joined #ruby
<banister`sleep>
JonnieCache: to_ary also allows your object to be destructured in block arguments
<banister`sleep>
each { |x, y| }
<Hanmac1>
or each {|(x1,y1),(x2,y2)| ... } for a more funnier sample
tehdekan has joined #ruby
filipe has quit [Quit: Leaving]
twshelton has quit [Quit: Computer has gone to sleep.]
<f1gjam>
but i thought there might a ruby "module" that does it platform independent
timols has joined #ruby
dr_bob has joined #ruby
browndawg has joined #ruby
mockra has joined #ruby
zykes- has joined #ruby
mephux has quit [Excess Flood]
rippa has quit [Ping timeout: 240 seconds]
zoonfafer has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
jlast has joined #ruby
mephux has joined #ruby
<f1gjam>
shevy what I want to do is create a method called find_process_by_name
<f1gjam>
which does just that
<f1gjam>
i pass the string to the function and it looks for it in the running process list
<f1gjam>
if its there it means the app has started etc...
<Hanmac1>
hm there are maybe mutlibe processes with the same name ...
<f1gjam>
then i check port to see if its listen on correct port
<f1gjam>
Hanmac unlikely
anachronistic has joined #ruby
<f1gjam>
i will be very specific
<f1gjam>
in this case
<f1gjam>
its mongodb
pablognu has joined #ruby
pdamer has quit [Quit: pdamer]
<pablognu>
Hi to all, i'm new on ruby and i have a question
Slivka has joined #ruby
<Hanmac1>
then we have answers, lets trade :P
<pablognu>
i'm trying to use hirb to show and array in screen, but
pyro111 has quit [Quit: Leaving]
<pablognu>
i don't know how do this
Nanuq has quit [Read error: Operation timed out]
<f1gjam>
there should be only one
enebo has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
* f1gjam
notices highlander quote in that last line
jimeh has quit [Quit: Computer has gone to sleep.]
atno has joined #ruby
terrorpup has quit [Read error: Operation timed out]
<f1gjam>
i have to admit, I am very impressed by the help and how nice people are here, back in the day IRC was a dangerous place where you would get ridiculed by the elite
nosleep77 has left #ruby [#ruby]
<mpfundstein>
f1gjam: go to #c++ , feels like the old days (- 10 years from now) :-)
<f1gjam>
lol
Nanuq has joined #ruby
theRoUS has joined #ruby
<f1gjam>
i remember going into the solaris channel - wow i got hammered, go there now and they are your best friends
banister`sleep has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 240 seconds]
dr_bob has joined #ruby
banister`sleep has joined #ruby
mlr has joined #ruby
pyrac has quit [Ping timeout: 252 seconds]
carloslopes has joined #ruby
_nitti_ has joined #ruby
_br_ has joined #ruby
jeremywrowe_ has joined #ruby
zigomir has quit [Quit: zigomir]
bradleyprice has joined #ruby
mlr_ has joined #ruby
wmoxam has joined #ruby
mlr has quit [Disconnected by services]
JohnBat26 has quit [Read error: Operation timed out]
wmoxam has quit [Client Quit]
mlr_ is now known as mlr
gosshedd has quit [Ping timeout: 256 seconds]
wmoxam has joined #ruby
timonv has quit [Remote host closed the connection]
jgrevich has joined #ruby
wmoxam has quit [Client Quit]
techhelp has joined #ruby
kpshek has quit []
wmoxam has joined #ruby
PanPan has joined #ruby
_nitti has quit [Ping timeout: 244 seconds]
braoru has quit [Quit: Leaving]
pdamer has joined #ruby
jeremywrowe has quit [Ping timeout: 272 seconds]
jeremywrowe_ is now known as jeremywrowe
dallasm has left #ruby [#ruby]
baroquebobcat has joined #ruby
JohnBat26 has joined #ruby
dmiller has joined #ruby
rippa has joined #ruby
skum is now known as Vainoharhainen
Vainoharhainen has quit [Changing host]
Vainoharhainen has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
br4ndon has joined #ruby
skcin7 has joined #ruby
br4ndon has quit [Client Quit]
chrishough has joined #ruby
carloslopes has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
wmoxam has quit [Client Quit]
jonathanwallace has joined #ruby
wmoxam has joined #ruby
dr_bob has quit [Quit: Leaving.]
graft has quit [Ping timeout: 240 seconds]
wmoxam has quit [Client Quit]
adkron has quit [Ping timeout: 240 seconds]
PanPan has quit [Ping timeout: 272 seconds]
volte_ has joined #ruby
wmoxam has joined #ruby
timonv has quit [Remote host closed the connection]
adkron_ has quit [Ping timeout: 251 seconds]
wmoxam has quit [Client Quit]
volte has quit [Ping timeout: 272 seconds]
skattyadz has quit [Quit: skattyadz]
banister`sleep has quit [Remote host closed the connection]
wmoxam has joined #ruby
<lectrick>
Is there an easy way to detect whether an array or hash has a self-referential bit?
carlyle has joined #ruby
<hoelzro>
walk the structure and check for it?
anachronistic has quit [Quit: anachronistic]
<lectrick>
so just store a list of object id's and stop if a previous one is encountered?
dmiller has quit [Ping timeout: 255 seconds]
wmoxam has quit [Client Quit]
eldariof has quit [Ping timeout: 252 seconds]
joofsh has quit [Remote host closed the connection]
<hoelzro>
yup
<hoelzro>
you don't even need to store the IDs
nricciar has joined #ruby
<hoelzro>
well, actually, that's probably the most robust
<Hanmac1>
lectrick ruby has some internal way to detect that ... but not nice function like .recusive?
richardjortega has joined #ruby
<hoelzro>
Hanmac1: it does?
wmoxam has joined #ruby
<lectrick>
Hanmac1: yeah that's kind of what I'm looking for. hoelzro Yeah, try this in IRB: a = {}; a[0]=a
j^2 has quit [Remote host closed the connection]
<hoelzro>
lectrick: I would use a hash rather than an array
<lectrick>
it will ellipsis the output
<hoelzro>
quicker to search
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
{^_^}_______ has quit [Ping timeout: 256 seconds]
zastern has joined #ruby
<hoelzro>
oh fun.
<lectrick>
hoelzro: because hash keys are easier to look up?
<hoelzro>
yeah
jeremywrowe has quit [Remote host closed the connection]
jeremywrowe has joined #ruby
<lectrick>
is there any way to keep an array sorted and just insert quick into a sorted array and therefore make lookups quicker? meh.
<hoelzro>
no
joofsh has joined #ruby
<hoelzro>
inserting into a sorted array is going to be O(n)
<hoelzro>
so your algorithm is still O(n^2)
<lectrick>
yeah i think i am with you on the hash thing, just seems silly to have a hash with values that basically don't mean anything, you really just want the fast key lookup
<hoelzro>
your best bet is a binary tree or hash table
<lectrick>
hoelzro: yeah that's what i was thinking
<hoelzro>
then use a set
bradhe has joined #ruby
banister`sleep has joined #ruby
<lectrick>
doesn't set use hash internally? :)
<hoelzro>
yes ;)
psyprus has joined #ruby
dawkirst has joined #ruby
Stilo has joined #ruby
peteyg has joined #ruby
james has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
james is now known as Guest88175
pdamer has quit [Quit: pdamer]
<apeiros_>
17:38 hoelzro: inserting into a sorted array is going to be O(n)
<apeiros_>
only if you use a poor method ;-)
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
mercwithamouth has joined #ruby
wyhaines has joined #ruby
maxmanders has quit [Ping timeout: 252 seconds]
robert_ has joined #ruby
kpshek has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
hbpoison has joined #ruby
<hoelzro>
apeiros_: if you leave no spaces in the array, how can you make it faster?
dallasm has joined #ruby
maxmanders has joined #ruby
yshh has quit [Remote host closed the connection]
thedoty has joined #ruby
vabenjamin has joined #ruby
Criztian has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 244 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
otters has quit [Ping timeout: 245 seconds]
ahokaomaeha has joined #ruby
nobitanobi has joined #ruby
anderse has joined #ruby
<Spooner>
hoelzro, If the array is sorted, you can use binary chop to find where to place the new element, which I guess is O(logn)
Mattix has quit [Ping timeout: 255 seconds]
<hoelzro>
yes, finding the insertion position for a sorted array is O(log n)
<hoelzro>
but the insertion will still be O(n)
prophile is now known as nuclearbunkerphi
<hoelzro>
because you have to shift elements
Monie has quit [Ping timeout: 272 seconds]
robert_ has quit [Ping timeout: 256 seconds]
yacks has joined #ruby
<nobitanobi>
I am trying to overwrite the mysql2 connector of ActiveRecord to make it able to use multiple statements. I have found this code https://gist.github.com/wok/1367987 -- But I fail to see what this does: config[:flags] = Mysql2::Client::FOUND_ROWS | Mysql2::Client::MULTI_STATEMENTS --- what is the "|" doing there?
<JonnieCache>
nobitanobi: just use sequel instead. its designed to be overridden and its generally better than AR
<nobitanobi>
JonnieCache: as stated here: https://github.com/brianmario/mysql2 -- is the only way I can make the mysql2 connection adapter to let me have multiple results set
<Hanmac1>
nobitanobi the constants hold numbers, with | you combine them so the gem uses both
<Spooner>
nobitanobi, You can say TALL = 0b01; WIDE = 0b10 and then pass TALL | WIDE (0b11) and then at the other end you can do if flags & WIDE then do wide stuff
PragCypher has joined #ruby
Nisstyre-laptop has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
<Spooner>
if flags & TALL then do tall stuff.
<lectrick>
JonnieCache: What if I'm hooked on ARel? Can I get away from AR without too much pain? :)
banister`sleep has joined #ruby
<JonnieCache>
well i will have no sympathy when activerecord starts haunting you in your dreams as vengence for touching its internals
hoelzro is now known as hoelzro|away
<JonnieCache>
because thats how bad it is
jlast has joined #ruby
<nobitanobi>
oh, ok I see. Thank you.
<lectrick>
None of us like to have our internals touched, though
goraxe has joined #ruby
<JonnieCache>
(sorry for being sarcastic but it actually is real advice, learned the hard way.)
kernel7 has quit [Quit: Leaving]
<nobitanobi>
So, if I require 'active_record' how could I overwrite it? Just loading another file that does this: https://gist.github.com/wok/1367987 ?
Matriks has joined #ruby
<JonnieCache>
lectrick: sequel basically is ARel without all the crazy shit on top
<lectrick>
nice.
<JonnieCache>
yeah it really is
svandiepen has quit [Remote host closed the connection]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<apeiros_>
hoelzro|away: memcpy is negligible in that context
<JonnieCache>
its not quite as clever as arel but thats by design
* apeiros_
off
apeiros_ has quit [Remote host closed the connection]
interact_ has joined #ruby
codespectator has quit [Quit: Computer has gone to sleep.]
_br_ has quit [Excess Flood]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
mityaz has joined #ruby
razibog has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
Nisstyre-laptop has joined #ruby
_br_ has joined #ruby
billiam has joined #ruby
thinkclay has joined #ruby
interactionjaxsn has quit [Ping timeout: 272 seconds]
jerikl has quit [Quit: jerikl]
arturas_ has quit [Ping timeout: 245 seconds]
<JonnieCache>
nobitanobi: yes you can override things that way
goraxe has quit [Ping timeout: 264 seconds]
<nobitanobi>
JonnieCache: I will take a look at sequel
<nobitanobi>
Thanks a lot
nkr has joined #ruby
carlyle has joined #ruby
etcetera has joined #ruby
_br_ has quit [Excess Flood]
ffranz has quit [Quit: Leaving]
tjbiddle has joined #ruby
interactionjaxsn has joined #ruby
bradhe has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
interact_ has quit [Read error: Connection reset by peer]
interact_ has joined #ruby
kpshek has quit []
kn330 has joined #ruby
_br_ has joined #ruby
daniel_hinojosa has joined #ruby
DaltonUS has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
_bart has quit [Ping timeout: 245 seconds]
ffranz has joined #ruby
maletor has joined #ruby
justme1 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
DaltonUS has joined #ruby
noob22 has joined #ruby
interactionjaxsn has quit [Ping timeout: 272 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
interactionjaxsn has joined #ruby
Voodoofish430 has joined #ruby
cantonic has joined #ruby
vikhyat has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Matriks has quit [Ping timeout: 255 seconds]
BizarreCake has joined #ruby
CreativeEmbassy has joined #ruby
carloslopes has joined #ruby
{^_^}_______ has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
interact_ has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jonathanwallace has joined #ruby
codespectator has joined #ruby
noob22 has quit [Quit: Page closed]
Monie has joined #ruby
<justme1>
I'm using vim and I'm trying to call a ruby method which take one parameter. is there a way to some how know anything about which paramters the method have, withought using ctrl-]?
Matriks has joined #ruby
dmiller has joined #ruby
kpshek has quit []
PanPan has joined #ruby
<Hanmac1>
justme1: no because of the ultimate dynamicly
ahokaomaeha has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
<mr-rich>
if I'm walking through an array with .each, is there a method to return the element number of the current array member?
<justme1>
Hanmac1: ok, so if I don't know which parameters the method takes, I should use ctrl-] and come back or read the doc, am I correct?
<Hanmac1>
justme1 i use ri to read about the methods
codespectator has quit [Quit: Computer has gone to sleep.]
<justme1>
Also, is there a way for vim to autocomplete the initialize method?
PanPan has quit [Ping timeout: 272 seconds]
dallasm has left #ruby [#ruby]
ericmathison has joined #ruby
monkegjinni has joined #ruby
bluOxigen has joined #ruby
apeiros_ has joined #ruby
moted has joined #ruby
justme1 has quit [Quit: Leaving.]
joeycarmello has quit [Ping timeout: 276 seconds]
justme1 has joined #ruby
vikhyat has joined #ruby
twoism has joined #ruby
Monie has quit [Quit: Quit]
eindoofus has joined #ruby
alvaro_o_ has joined #ruby
maxmanders has quit [Ping timeout: 256 seconds]
io_syl has joined #ruby
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
<eindoofus>
I'm just curious, do gems take a different form once installed on a system or do they have the same structure as the git repo they came from?
pandawarrior has joined #ruby
<Muz>
They might contain some additional bits and pieces once installed (see the casewhere native extensions are compiled/linked)
pandawarrior has quit [Client Quit]
<Muz>
Why'd you ask?
the_mentat has quit [Quit: Computer has gone to sleep.]
pandawarrior has joined #ruby
io_syl has quit [Read error: Connection reset by peer]
io_syl_ has joined #ruby
adeponte has joined #ruby
io_syl_ is now known as io_syl
brianpWins has joined #ruby
alvaro_o has quit [Ping timeout: 248 seconds]
pandawarrior has quit [Client Quit]
BRMatt has joined #ruby
pandawarrior has joined #ruby
<eindoofus>
Muz, was wondering whether studying the repo of a gem could help me to customize it after install
maxmanders has joined #ruby
idkazuma has quit [Remote host closed the connection]
<Muz>
Ah. Sounds a bit weird why that'd rely on the gem at the level of the filesystem though.
bradhe has quit [Remote host closed the connection]
squidBits has joined #ruby
<Muz>
s/that'd/you're going to/ # eindoofus
CraHan|out is now known as CraHan
bradhe has joined #ruby
<eindoofus>
Muz, oh.. should I clone and edit a repo before install then?
<whitequark>
eindoofus: there's some weird stuff happening with gemspec
<Muz>
eindoofus: why are you editing the repo at all? What sort of change are you trying to achieve?
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<eindoofus>
For example, it would be nice to expand on trim the functionality of something like Spree
<Muz>
whitequark: that's more the gem application itself and dependancy tracking/local auditting gubbins though
<eindoofus>
or*
<Muz>
eindoofus: you could just monkey patch that class or function without ever touching anything on the FS...
<JonnieCache>
eindoofus: spree in particular is a weird one
banister`sleep has quit [Read error: Connection reset by peer]
CreativeEmbassy has joined #ruby
<JonnieCache>
eindoofus: spree is lots of separate gems when you install it, but they all live in one git repo
banister`sleep has joined #ruby
<JonnieCache>
eindoofus: but most gems arent like that
joeycarmello has joined #ruby
otters has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
chrishough has joined #ruby
cdt has quit [Remote host closed the connection]
<JonnieCache>
but spree has a whole system worked out for you to customise its behaviour. ask in #spree if you have questions about it, they are very helpful
schaerli has joined #ruby
<Muz>
eindoofus: after 'require "gemgoeshere"', you can then declare your own class and function definitions which'll override something that was declared in the original require.
nomenkun has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
kn330 has quit [Read error: Connection reset by peer]
<eindoofus>
In regards to any gem, am I correct in my understanding that a gem installs from a repo?
<Muz>
No
bradhe has quit [Ping timeout: 255 seconds]
<eindoofus>
oh. lol.. how is it done?
<fuzai>
wouldn't anything that gem installs be coming from a ruby repo?
<Muz>
Gems may be installed from a pre-packaged archive. Commonly found with the .gem suffix it's a bit like a zip archive which is downloaded, extracted, copied into place and then optionally bits executed.
interact_ has joined #ruby
<fuzai>
I guess the question really is, do you mean os distribution repo, or from a ruby repo?
<eindoofus>
fuzai, I'm not going to pretend I know the difference. lol
<fuzai>
Muz: wouldn't a collection of pre packaged archives be a repo?
schaerli has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
<Muz>
fuzai: er, yes.
mafolz has quit [Quit: mafolz]
mrsolo has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
<Muz>
eindoofus: ^ see how I included a library, overrode definitions of what it does and how that was then executed?
<eindoofus>
thanks fuzai, i'll take a look at that
<Muz>
Didn't have to ever touch anything on the file-system.
slainer68 has joined #ruby
l3ck has joined #ruby
<eindoofus>
Muz, so that would extend the current functionality?
interactionjaxsn has quit [Ping timeout: 272 seconds]
<Muz>
eindoofus: yes, it can be used to do that too
<eindoofus>
:)
rupee has joined #ruby
<Muz>
>> class String; def eindoofus; puts "monkeys"; end; end; "this is a string".eindhoofus
<eval-in>
Muz: Output: "/tmp/execpad-aa8026248429/source-aa8026248429:1:in `<main>': undefined method `eindhoofus' for \"this is a string\":String (NoMethodError)\n" (http://eval.in/10644)
<Muz>
>> class String; def eindoofus; puts "monkeys"; end; end; "this is a string".eindoofus
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<Muz>
See, I extended the String class there with my own method. (Once I corrected a typo)
<eindoofus>
Didn't realize it was that easy! :-)
<eindoofus>
thanks Muz
Inoperable is now known as zz_Inoperable
CreativeEmbassy has joined #ruby
pdamer has joined #ruby
interactionjaxsn has joined #ruby
razibog has joined #ruby
bradhe has joined #ruby
etcetera has quit [Ping timeout: 245 seconds]
reset has joined #ruby
peteyg has quit [Ping timeout: 244 seconds]
ferdev has quit [Quit: Leaving...]
Matriks has quit [Remote host closed the connection]
Es0teric has joined #ruby
ryanf has quit [Quit: leaving]
__BigO__ has quit [Remote host closed the connection]
interact_ has quit [Ping timeout: 260 seconds]
__BigO__ has joined #ruby
slainer68 has quit [Remote host closed the connection]
zz_Inoperable is now known as Inoperable
timmow has quit [Remote host closed the connection]
jrajav has joined #ruby
etcetera has joined #ruby
<fuzai>
eindoofus: i've found Ruby to be one of the easist and coolest languages i've ever worked with
nobitanobi has quit [Quit: Page closed]
mercwithamouth has quit [Quit: Lost terminal]
<psyprus>
1ng3y35
<Hanmac1>
its also the most evil language you can play with :P
mercwithamouth has joined #ruby
mercwithamouth has quit [Client Quit]
pkrnj has joined #ruby
mercwithamouth has joined #ruby
jlast has quit [Remote host closed the connection]
<eindoofus>
lol. I'm enjoying it so far
warreng has joined #ruby
reset has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Quit: tjbiddle]
caleb_io has joined #ruby
jeffreybaird_ has joined #ruby
MartinCleaver has joined #ruby
jeffreybaird_ has quit [Client Quit]
breakingthings has quit []
tar_ has joined #ruby
<MartinCleaver>
I have a log file containing lines of ruby such as {:message=>"heartbeat", :level=>:debug, :file=>"/opt/logstash/logstash-1.1.9-monolithic.jar!/logstash/agent.rb", :line=>"491", :method=>"run_with_config"}
<MartinCleaver>
is there a way to tail -f logfile | some-simple-application-to-format-sanely ? (Preferably something built into ruby)
peteyg has joined #ruby
<eindoofus>
I'm taking a different approach at the moment to my studies of it and what seems to be the most confusing is how files relate to one another. I'm seeing references to random things and I don't know where they even are.
gosshedd has joined #ruby
volte_ has quit [Ping timeout: 240 seconds]
BadLarry has quit [Quit: quitting]
Slivka has quit [Ping timeout: 252 seconds]
jeffreybaird has quit [Ping timeout: 248 seconds]
adeponte has quit [Remote host closed the connection]
dayepa has quit [Read error: Connection reset by peer]
BadLarry has joined #ruby
vikhyat_ has joined #ruby
dayepa has joined #ruby
adeponte has joined #ruby
artOfWar has joined #ruby
kpshek has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Chryson has joined #ruby
Kingy has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 252 seconds]
vikhyat has quit [Ping timeout: 260 seconds]
mattbl has joined #ruby
caleb_io has quit [Quit: caleb_io]
adeponte has quit [Remote host closed the connection]
jerikl has joined #ruby
havenwood has joined #ruby
tommyvyo has joined #ruby
imami|afk is now known as banseljaj
gregorg_taf has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
<shevy>
eindoofus sounds like a chaotic system!
decoponio has quit [Quit: Leaving...]
gregorg_taf has joined #ruby
gaahrdner has quit [Ping timeout: 256 seconds]
the_mentat has joined #ruby
<end_guy>
Does anyone know if there is a gem for wrapping the ruby-toolbox.com API, prehaps a REST api wrapper gem?
fedza has joined #ruby
andikr has quit [Read error: Connection reset by peer]
<eindoofus>
shevy, I think it's just my ignorance. I'm trying to reverse engineer something as a noob to Ruby.
adeponte has joined #ruby
sn0wb1rd has joined #ruby
octoberry has joined #ruby
tjbiddle_ has joined #ruby
browndawg has quit [Quit: Leaving.]
<gregor3005>
is it possible to create an socket in an unit test? i tried it but it give me always an error
<Spooner>
gregor3005, You want TCPServer. TCPSocket needs address+port.
volte has joined #ruby
<gregor3005>
lol, thx
<Spooner>
You also need to use @server.
<gregor3005>
sry
d2dchat has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 252 seconds]
tjbiddle_ is now known as tjbiddle
ffranz has quit [Read error: Connection reset by peer]
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
ffranz has joined #ruby
matchaw_ is now known as matchaw
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
<gregor3005>
Spooner: thx, yes i know it was only an starting example
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
elaptics is now known as elaptics`away
softbit has quit [Remote host closed the connection]
Kingy has quit [Quit: Leaving]
caleb_io has joined #ruby
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
<eindoofus>
Hanmacl, I'm looking at "spree/core/app/models/spree/calculator/default_tax.rb" and the top it says "require_dependency 'spree/calculator'". What does that do exactly? And does that statement imply "../../spree/calculator"?
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
<eindoofus>
I don't understand whether that's requiring a file or directory, and how it's able to find the location with so little information
Nisstyre-laptop has joined #ruby
reset has joined #ruby
justme1 has left #ruby [#ruby]
dmerrick has joined #ruby
inokenty has joined #ruby
Nisstyre-laptop has quit [Read error: Connection reset by peer]
inokenty has quit [Max SendQ exceeded]
dankest has joined #ruby
ericmathison has quit [Quit: leaving]
breakingthings has joined #ruby
inokenty has joined #ruby
<shevy>
eindoofus well
inokenty has quit [Max SendQ exceeded]
<shevy>
eindoofus you ask about require functionality?
<shevy>
if so, then it follows a simple logic
<shevy>
require 'foo/bar'
<shevy>
would most often be:
<shevy>
require 'foo/bar.rb'
<shevy>
ok?
grohne has joined #ruby
<shevy>
it might also look for a .so file rather than .rb but these cases should be very rare
dmiller has joined #ruby
philcrissman has quit [Remote host closed the connection]
inokenty has joined #ruby
<shevy>
require_dependency() is non standard
PanPan has joined #ruby
<Hanmac1>
PS: rb files are preferd over so files
inokenty has quit [Max SendQ exceeded]
<shevy>
eindoofus so whoever added this method should be asked what it does
<grohne>
hi. just learning ruby. is there a shorter form for (somearray.collect { |someobject| someobject.someattr }).join(" ")?
Vainoharhainen has quit [Quit: Leaving...]
<shevy>
grohne you could use .map rather than .collect, saves a few chars :P
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
<grohne>
shevy: ok. so there is nothing that inlines this attribute access? thanks
<shevy>
thing is I am not sure whether you can make this much shorter
<shevy>
well, these are not attributes as such, they are method calls right?
<shevy>
so you can't avoid having to call .someattr
<Hanmac1>
somearray.map(&:someattr).join " "
kevinfagan has quit [Quit: Leaving...]
<shevy>
that's about the maximum you can do yeah
<grohne>
ahh &:someattr is what I looked for :)
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
* grohne
comes a bit from a haskell perspective and thus avoiding local variables has become a habit
philcrissman has joined #ruby
<peteyg>
What is "&:" called, in Ruby? (Googling "&: ruby" gives you a bunch of Max and Ruby results... :P)
<banister`sleep>
peteyg: Symbol#to_proc
inokenty has joined #ruby
inokenty has quit [Max SendQ exceeded]
PanPan has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 256 seconds]
<Spooner>
It is two things. :someattr is a Symbol. & implies that it is a proc, so it calls Symbol#to_proc on it to get the expanded proc for you (so there still _is_ a temp var; you just don't need to deal with it :D).
ephemerian has quit [Quit: Leaving.]
banjara has joined #ruby
<grohne>
Spooner: thank you very much for both the hint and the explanation.
<eindoofus>
So does require and requires_dependency look backwards from the current location automatically rather than using the root of the app? I mean for 'spree/calculator' default_tax.rb would have to go up a directory, check whether that directory is name spree, and then look for a 'calculator.rb'
mattbl has quit [Quit: This computer has gone to sleep]
eldariof has joined #ruby
<eindoofus>
thanks Hanmacl
codezombie has quit [Ping timeout: 248 seconds]
brain_shim has quit [Ping timeout: 248 seconds]
timols_ has joined #ruby
JohnBat26 has joined #ruby
the_mentat has quit [Quit: Computer has gone to sleep.]
jaimef has quit [Ping timeout: 248 seconds]
sandGorgon has quit [Ping timeout: 272 seconds]
yellow5 has quit [Ping timeout: 264 seconds]
skcin7 has quit [Quit: Computer has gone to sleep.]
ixx has quit [Ping timeout: 276 seconds]
ixx has joined #ruby
<eindoofus>
This require_dependency thing sounds kind of nightmarish to me. So require_dependency "let's you define class Admin::User inside the file app/models/admin/user.rb and have Rails know what you are talking about when you call Admin::User.new from another part of the application like a controller". Wth, are you supposed to dig around the application till you find Admin::User if your trying to understand the code!?
<Spooner>
Hanmac: concat(a) is better than push(*a)
* apeiros_
thinks `(0..127).map` is bad, `Array.new(128)` is better
sam113101 has joined #ruby
<apeiros_>
that too
<grohne>
I think push and concat will fail here.
br4ndon has joined #ruby
<grohne>
usually one of the DiskInfo.new ctors will raise an exception and terminate the loop
c0rn has joined #ruby
<Spooner>
apeiros_, You would need Array.new(128).map.with_index {|n| which is just as horrid.
<apeiros_>
Spooner: wtf?
<apeiros_>
Spooner: no, just Array.new(128) { |n|
<apeiros_>
of course if you want to crap up your code you add needless stuff…
<Spooner>
Oh, oops. Another magic :D
cantonic has quit [Quit: cantonic]
<Hanmac1>
ruby is full of magic :P
<apeiros_>
know yer core! :-p
<apeiros_>
ruby is full of sense
<apeiros_>
and usefulness
<grohne>
so am I correct that if I use the .push .concat or .new(128) here that my nothing will be in disks if the body raises an exception?
<apeiros_>
an exception stops execution right where it occurs, yes
<apeiros_>
and jumps to the next `rescue` clause which handles it
<grohne>
ok. then I got it right here and cannot use the suggested forms
gaahrdner has joined #ruby
<apeiros_>
you could paste the error you get and get help
<grohne>
the error is raised on lines 20 and 21
forrest has joined #ruby
BizarreCake has quit [Ping timeout: 255 seconds]
<grohne>
so this is rather intentional. for AMCC the disks are always numbered with small numbers. as soon as I find one that does not exist, I can abort.
<grohne>
with LSI I have to actually try each number.
<apeiros_>
grohne: that's not "pasting the error"
jimeh has quit [Quit: Computer has gone to sleep.]
d2dchat has joined #ruby
philcrissman has quit [Remote host closed the connection]
<grohne>
apeiros_: so what error should I be pasting precisely?
<Hanmac1>
PS: i dont know Facter::Util::Resolution.exec, but what happens when the program does not exist?
<grohne>
Hanmac1: the output shall be nil
<Hanmac1>
hm ok, then each_line could fail
JohnBat26 has quit [Ping timeout: 260 seconds]
<wrench>
I'm following the 1.9.3 doc for net/http -- For this line: req = Net::HTTP::Get.new(uri.request_uri) I get this error: undefined method `new' for :Get:Symbol (NoMethodError)
<grohne>
thanks for all your suggestions. they taught me quite a bit about ruby.
<wrench>
*thanks
JohnBat26 has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
<wrench>
canton7: is the '::' the way ruby references things within modules?
<canton7>
yes
Matriks has joined #ruby
<canton7>
(among some other stuff)
mahmoudimus has joined #ruby
<Hanmac1>
grohne PS: you may not need the each_line , you can do: @serial = output[/^Serial Number: (.*)/,1]
_JamieD_ has quit [Quit: _JamieD_]
<grohne>
Hanmac1: will it become nil if the pattern is not found?
<Hanmac1>
yes
goraxe has quit [Read error: Connection reset by peer]
<grohne>
ah. just found the answer in the docs as well. thanks
codekoala has quit [Ping timeout: 256 seconds]
nomenkun has joined #ruby
Chryson has quit [Ping timeout: 255 seconds]
kkkiki has joined #ruby
robert_ has joined #ruby
<grohne>
I hope I didn't miss a suggestion. the end result is quite a bit shorter now.
xardas has joined #ruby
<Hanmac1>
PS: wrench: methods can be called with :: too .. but there are pitfalls ::abc is a method, ::ABC is a constant, and ::ABC() is a method again (the methods needs resciver ... so ::meth does not work, while ::Class still works)
buibex has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
<wrench>
hrmm I think I get it -- will need more hands on
JohnBat26 has joined #ruby
horofox has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<Hanmac1>
there are another pitfalls: Integer is a class, while Integer() is a method
ffranz has quit [Ping timeout: 248 seconds]
sepp2k has quit [Ping timeout: 256 seconds]
Kingy has joined #ruby
sepp2k has joined #ruby
eindoofus has left #ruby ["Leaving"]
<apeiros_>
constant-like methods are required to be unambiguous, though
tylersmith has quit [Quit: tylersmith]
<apeiros_>
i.e. mandatory (), or an argument
<apeiros_>
or an explicit receiver
Mattix has joined #ruby
gaahrdner has quit [Remote host closed the connection]
grohne has quit [Quit: leaving]
<banister`sleep>
apeiros_: have oyu ever used them in your projects to 'cast' an object?
<Hanmac1>
its funny because Integer() can do things to_i cant doo ..
<banister`sleep>
i've seen it a little bit
<banister`sleep>
we use it a bit in pry
<banister`sleep>
i.e: Pry::Method(method(:puts))
<apeiros_>
banister`sleep: yes, I prefer Integer() over to_i
<banister`sleep>
(to imbue a normal Method object with secret powers ;)
Takehiro has joined #ruby
<apeiros_>
simply because Integer() raises.
* apeiros_
is a fan of fail early
buibex has quit [Remote host closed the connection]
<banister`sleep>
apeiros_: i mean your own constant-like methods
<apeiros_>
I don't think I've defined constant-like methods myself
jasond has left #ruby ["Killed buffer"]
<apeiros_>
hm, I might have some in my color gem
<apeiros_>
but even if I had, I wouldn't do it that way anymore
<Hanmac1>
klass.instance_method(sym).bind(object).call is funny
jrendell has joined #ruby
kpshek has quit []
queequeg1 has quit [Remote host closed the connection]
codekoala has joined #ruby
kkkiki has quit [Quit: Page closed]
_nitti has joined #ruby
budmang_ has joined #ruby
Morkel_ has joined #ruby
<Hanmac1>
apeiros_ i used ones this: RPG::Item.new(:item1) == RPG::Item[:item1] #=> true so the class reminds its children .. or i will use some kind of autoload so that RPG::Item is undefined but is loaded from an xml file and Item will be a Category ... maybe
tar_ has quit [Quit: farewell]
banjara has quit [Ping timeout: 252 seconds]
lushious has quit [Ping timeout: 252 seconds]
budmang has quit [Ping timeout: 276 seconds]
fermion has joined #ruby
<apeiros_>
Hanmac1: well, that's not a Foo() style method.
kpshek has joined #ruby
beiter has quit [Quit: beiter]
Morkel has quit [Ping timeout: 245 seconds]
Morkel_ is now known as Morkel
chichou has quit [Remote host closed the connection]
JohnBat26 has quit [Ping timeout: 248 seconds]
<Hanmac1>
apeiros_ i once did a method missing so that calling Mod::Class(*arg) will call Mod::Class.new(*arg) ... now i need to remember why ...
ebobby has joined #ruby
adeponte has quit [Remote host closed the connection]
skcin7 has quit [Quit: Computer has gone to sleep.]
Catbuntu has joined #ruby
stkowski has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
<Hanmac1>
i have something that WX::App { ... } works like creating an own App class ... i thought it would be more nice for small stuff
adeponte has quit [Remote host closed the connection]
<shevy>
does not forward me
<shevy>
my firefox wants to download this .exe file
<mantas322>
I get how you can do this a = [[1,2,3], [4,5,6], [7,8,9]]
<aedorn>
oh, so it is native. One day I should really set aside time and browse the source more
<Mon_Ouie>
mantas322: Arrays contain object; it does not matter that the contained objects are arrays too
carlyle has joined #ruby
<mantas322>
slow down
timols_ has quit [Ping timeout: 255 seconds]
<mantas322>
oh
<shevy>
yes Mon_Ouie TYPE SLOWER
<mantas322>
that works..
<Mon_Ouie>
shevy: Exactly what I thought :p
caleb_io has joined #ruby
<mantas322>
thanks
bwlang has quit [Excess Flood]
philcrissman has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
<Hanmac1>
aedorn it was extra gem before 1.9 .. in 1.9+ its part of stdlib
<shevy>
mantas322 are you like those insects that look like camouflaged flowers?
bwlang has joined #ruby
<mantas322>
yes I also pray, and eat my mate
<mantas322>
har har har
Takehiro has quit [Ping timeout: 260 seconds]
jrendell has quit [Quit: jrendell]
toekutr has joined #ruby
keyword has joined #ruby
<keyword>
hi there I have a question why when I make a request with open-uri to url json I get like this {\\\"updated_at\\\":\\\"2013-02-16T22:45:34Z\\\",\\\"country\\\":\\\"Peru\\\",\\\"port\\\":8080,\\\"ip\\\":\\\"190.40.53.52\\\"} so I cant parse it then
mantas322_ has joined #ruby
<mantas322_>
get disconnected Humpf......
Es0teric has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
Vainoharhainen has quit [Quit: Leaving...]
mantas322 has quit [Ping timeout: 245 seconds]
<keyword>
anyone can helpme
Hecatic has joined #ruby
dayepa1 has quit [Ping timeout: 245 seconds]
<Hanmac1>
keyword: JSON.parse(s.gsub('\\',''))
<keyword>
why I'm getting ///
bradleyprice has quit [Ping timeout: 244 seconds]
dayepa1 has joined #ruby
<keyword>
if I get with the brwoser I see ok the json output
<Spooner>
keyword, Probably the way you are printing it out in Ruby is confusing things. inspecting will _show_ you \" instead of ", but you seem to have it happening twice (so it is showing \\ \" instead of \ "
<keyword>
but is wierd if i copy the output from the brwoser I can parse it ok
<keyword>
but when I do open(uri).read
<keyword>
I cant parse
cantonic has joined #ruby
<keyword>
I get (JSON::ParserError)
<Spooner>
We don't know what you are doing with it between reading it and looking at it.
<Hanmac1>
keyword did you try my help?
DrCode has quit [Ping timeout: 276 seconds]
moted has quit [Remote host closed the connection]
mahmoudi_ has joined #ruby
<shevy>
the keyword is in a state of trance
<Spooner>
Hanmac, JSON.parse(s.gsub('\\"','"')) should be safer.
wmoxam has quit [Ping timeout: 248 seconds]
<Hanmac1>
spooner hm yeah you are right
<keyword>
Spooner: nopos doesnt works
moted has joined #ruby
rismoney has joined #ruby
mahmoudimus has quit [Ping timeout: 248 seconds]
horofox has quit [Quit: horofox]
<Spooner>
But it is still odd that the extra \ is being added somewhere.
<keyword>
let me see
kirun has joined #ruby
<Spooner>
Can you show more source?
horofox has joined #ruby
philcrissman has joined #ruby
Kingy has quit [Quit: Leaving]
banjara has joined #ruby
mantas322_ has quit [Quit: Page closed]
<fuzai>
Hi could someone help me build the proper match here, i've got a semi complex regex match going that works however now I need to extract the next 25 characters that are hex based in the string. http://pastebin.com/iTgMgNHE
<fuzai>
sorry pastie is down right now
DrCode has joined #ruby
mattbl has joined #ruby
wmoxam has joined #ruby
<wrench>
I'm able to authenticate w/ a REST endpoint using curb gem(some sort of implementation of curl) -- but I can't successfully authenticate using net/http or httparty or any other REST api I've found. Any ideas why curl would work and everything else fail?
<shevy>
Spooner Can you show more leg!!!
Xeago has quit [Remote host closed the connection]
<forrest>
fuzai: wait, if by hex-based chars you mean hexadecimal representation of a number, 25 would give you a half-byte left over, is that right?
<fuzai>
basically they are 25 character userids coded in hexdecimal
<fuzai>
i need the string verbatim
arya has joined #ruby
<forrest>
do you mean a hex representation of 25 bytes (which would be 50 chars) ?
<fuzai>
5116e57baaa5cd48cb7aa9ef
<fuzai>
thats what i'm trying to extract out of the string
<forrest>
/[a-fA-F0-9]{50}/
<forrest>
or 25 if you mean 25 chars in the representation, but that still strikes me as weird
Hecatic has quit [Quit: Àá¼ö]
<fuzai>
sorry yea 25 characters
<fuzai>
it's in hex but i need it as a string
twoism has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
<forrest>
oh, you need to decode the hex into bytes?
<fuzai>
no
PanPan has joined #ruby
<havenwood>
Haha, got emoji working in my PROMPT now so that
<fuzai>
they are internal usernames or userids
twoism has joined #ruby
atyz has quit [Ping timeout: 248 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
anderse has joined #ruby
bradleyprice has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
pdamer has quit [Quit: pdamer]
<fuzai>
nice my irc client supports emoji
Jackneill has quit [Ping timeout: 240 seconds]
carloslopes has quit [Remote host closed the connection]
jrendell has joined #ruby
BRMatt has quit [Quit: Leaving]
<heftig>
havenwood: i just have big green S for Staged changes (HEAD and index differ) and a big red U for Unstaged changes (Index and working tree differ)
mahmoudi_ has quit [Ping timeout: 252 seconds]
<havenwood>
heftig: yeah, i had a check mark and x, but just got rid of any trace of oh-my-zsh from my system and wanted to remake the simple-theme prompt. though emoji would be a nice touch :D
snuglepuss has quit [Remote host closed the connection]
adambeynon has joined #ruby
dmiller has joined #ruby
scepticulous has joined #ruby
<robert_>
shevy: hai.
<scepticulous>
does anyone know how to disable the "pem password" prompt of ruby-openssl, when no password is provided when reading a password protected private-key?
snuglepuss has joined #ruby
snuglepuss has quit [Max SendQ exceeded]
eldariof has quit [Ping timeout: 240 seconds]
snuglepuss has joined #ruby
Umren has quit [Read error: Connection reset by peer]
Matriks has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
Matriks has joined #ruby
billiam has quit [Quit: Leaving]
the_mentat has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
workmad3 has joined #ruby
the_mentat has joined #ruby
adeponte has quit [Read error: No route to host]
lenswipe has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
rlb3 has quit [Quit: rlb3]
Eldariof-ru is now known as eldariof
Catbuntu has quit [Quit: hohoho nonono]
hbpoison has quit [Ping timeout: 255 seconds]
_nitti_ has quit [Remote host closed the connection]
Mon_Ouie has quit [Remote host closed the connection]
_nitti has joined #ruby
<robert_>
I'm celebate, sadly. I took an oath as a monk 30 years ago. I should look at planting my seed in someone's tomato patch before I die, though.. :(
<aedorn>
hmmm... why are all the python solutions for remote server management simpler than Ruby's? There's just something not right about that.
codekoala has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
elico has joined #ruby
hbpoison has joined #ruby
skcin7 has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
kpshek has quit []
<havenwood>
aedorn: like what?
Neomex has joined #ruby
<havenwood>
Chef and Puppet?
graft has quit [Quit: Lost terminal]
kirun has quit [Ping timeout: 276 seconds]
<aedorn>
Yeah, those are really the only two for actual management. You have Sprinkle too, which is a bit simpler, but the setup for Chef is anything but quick, and Puppet has its own set of problems.
TheIronWolf has quit [Quit: zonk]
<aedorn>
Great for large sets, not very efficient for <20 though
hbpoison has quit [Remote host closed the connection]
__BigO__ has quit [Remote host closed the connection]
MartinCleaver has quit [Quit: MartinCleaver]
hbpoison has joined #ruby
chussenot has quit [Quit: chussenot]
__BigO__ has joined #ruby
MartinCleaver has joined #ruby
MartinCleaver has quit [Changing host]
MartinCleaver has joined #ruby
<fuzai>
http://pastebin.com/QerLGzn7 can't convert regexp to string. How do I get around this or re-write this match so it works correctly?
TheIronWolf has joined #ruby
bwlang has quit [Excess Flood]
rmartin has quit [Remote host closed the connection]
bwlang has joined #ruby
keyword has left #ruby [#ruby]
hybris has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
anonymuse has quit [Quit: Leaving...]
hbpoison has quit [Remote host closed the connection]
<fuzai>
can i include variables in a regex string?
<banister`sleep>
Hanmac1: how come you never answered me when i asked if you wanted to go to the cherry tree dance?
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
swex has quit [Read error: Operation timed out]
chussenot has quit [Client Quit]
Slivka has joined #ruby
huoxito has quit [Ping timeout: 244 seconds]
Myk267 has joined #ruby
baroquebobcat has joined #ruby
chichou has quit [Remote host closed the connection]
goraxe has joined #ruby
nomenkun has quit [Remote host closed the connection]
_nitti has joined #ruby
kirun_ has quit [Quit: Client exiting]
TheIronWolf has quit [Quit: zonk]
hbpoison has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
timols_ has joined #ruby
queequeg1 has quit [Quit: leaving]
cantonic has quit [Quit: cantonic]
goraxe has quit [Read error: Connection reset by peer]
queequeg1 has joined #ruby
nerd has joined #ruby
stormetrooper has joined #ruby
wmoxam has quit [Quit: leaving]
unix has quit [Ping timeout: 244 seconds]
wmoxam has joined #ruby
Pufferfood has quit [Read error: Connection reset by peer]
BrianJ has quit [Quit: Computer has gone to sleep.]
timols_ has quit [Ping timeout: 252 seconds]
kofno has quit [Remote host closed the connection]
<tjbiddle>
Is it common to have to reset the namespace before creating a new object? Was creating an object (Git::Base.init('.')) and it kept calling it with the namespace of the file it was in, had to prepend it with '::' to get it to work.
Pufferfood has joined #ruby
casheew has quit [Ping timeout: 276 seconds]
<arturaz>
Anybody knows about a site that allows you to find people with similar interests in your neighborhood?
casheew has joined #ruby
fedza has quit [Ping timeout: 248 seconds]
razibog has quit [Ping timeout: 244 seconds]
ebobby has quit [Ping timeout: 248 seconds]
queequeg1 has quit [Quit: leaving]
hbpoison has quit [Remote host closed the connection]
<banister`sleep>
arturaz: adultfriendfinder.com
queequeg1 has joined #ruby
<gregor3005>
i have some troubles with unit tests. should the setup method be called before every test or for every object/class ?
<wmoxam>
arturaz: fetlife.com
<shevy>
arturaz hmm those I know tend to be very localized
queequeg1 has quit [Client Quit]
bigkm has joined #ruby
<shevy>
I mean like, 500 km radius
queequeg1 has joined #ruby
sailias has quit [Quit: Leaving.]
kpshek has joined #ruby
<shevy>
arturaz, i.e. one for german speaking folks is www.friendseek.com
emergion has quit [Quit: Computer has gone to sleep.]
<Hanmac1>
shevy i use github and ohloh :P
pskosinski has quit [Quit: ._.]
sailias has joined #ruby
chrishough has joined #ruby
pskosinski has joined #ruby
Roa has quit [Ping timeout: 248 seconds]
PanPan has joined #ruby
<shevy>
Hanmac1 yeah but like when you wanna go to a festival but not alone and your friends are all busy
k3rn3lito has quit [Ping timeout: 255 seconds]
hbpoison has joined #ruby
LouisRoR has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
<Hanmac1>
hm i maybe will go to the next rubycon in germany, but there are no other festivals i want to go, and you dont need an Master in Math to count my RL-Friends :P
<aedorn>
isn't that what Facebook is for? Stalking your neighborhood 'friends'?
k3rn3lito has joined #ruby
mockra has quit [Remote host closed the connection]
beiter has joined #ruby
<banister`sleep>
Hanmac1: how many rl friends do u have
Takehiro has joined #ruby
pablognu has joined #ruby
<pablognu>
Hi to all
twoism has quit [Read error: Connection reset by peer]
<pablognu>
i have a question
<Hanmac1>
one in my neighborhood
<shevy>
aedorn dunno, facebook feels like a bizarre cult
twoism has joined #ruby
<gregor3005>
is there any similar in ruby like in java jvisualvm?
<pablognu>
how can i caught a system reboot to stop my ruby app on a determinate way?
bricker`LA has joined #ruby
<Hanmac1>
shevy facebook is like apple for exhibitionists
angusigu1ss has quit [Ping timeout: 244 seconds]
PanPan has quit [Ping timeout: 248 seconds]
__BigO__ has quit [Remote host closed the connection]
bricker`LA has quit [Client Quit]
<aedorn>
shevy: Yes... it's a cult of stalkers.
elico has quit [Quit: elico]
v0n has quit [Ping timeout: 255 seconds]
TDJACR has quit [Quit: leaving]
Eldariof-ru has joined #ruby
Xeago has joined #ruby
dmiller has joined #ruby
carloslopes has joined #ruby
<Xeago>
apeiros_: how is your catching up doing?
Takehiro has quit [Ping timeout: 255 seconds]
mockra has joined #ruby
LouisRoR has quit [Ping timeout: 240 seconds]
eldariof has quit [Ping timeout: 244 seconds]
__BigO__ has joined #ruby
AwayLex is now known as Quadlex
pyrac has joined #ruby
<apeiros_>
Xeago: friend here today. His app is playing catch up…
<apeiros_>
that's why I couldn't play until tomorrow either :)
<apeiros_>
but OTOH, I learned about `ORDER BY foo ASC NULLS FIRST`, love it
hbpoison has quit [Ping timeout: 248 seconds]
woolite64_ has quit [Ping timeout: 260 seconds]
<gregor3005>
is there a method for unit tests like setup but a setup for all testcases?
adambeynon has joined #ruby
hbpoison has joined #ruby
<banister`sleep>
gregor3005: use bacon or rspec
<banister`sleep>
then u can use before blocks
mattbl has joined #ruby
etcetera has quit []
<gregor3005>
thx i test it
<kenneth>
okay, so rb_str2cstr(str) returns a char *, but i need an unsigned char *
<kenneth>
doing a simple cast should be safe right?
geekbri has quit [Remote host closed the connection]
axl_ has quit [Read error: Connection reset by peer]
vikhyat_ has quit [Remote host closed the connection]
skattyadz has joined #ruby
<kenneth>
</ is not sure he understands sign overflow / casting correctly :p >
<kenneth>
int salt_arg_length = RSTRING_LEN(salt);
<kenneth>
this should be good, right?
gyre007 has quit [Ping timeout: 245 seconds]
pablognu has quit [Quit: pabloGNU]
ferdev has joined #ruby
mark_locklear has quit [Ping timeout: 255 seconds]
tvl has joined #ruby
tvl is now known as Spug
<Hanmac1>
i think this is better: salt = StringValue(salt); salt_bin = RSTRING_PTR(salt); salt_length = RSTRING_LEN(salt);
hbpoison has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
<aedorn>
I feel like going home.... I shall do that!
aedorn has quit [Quit: Leaving]
slainer68 has joined #ruby
<kenneth>
Hanmac1: ok. out of curiosity though, why is it better?
ebobby has quit [Ping timeout: 255 seconds]
rheoli has joined #ruby
ner0x has quit [Quit: Leaving]
hbpoison has quit [Read error: Connection reset by peer]
Eldariof93-ru has joined #ruby
<Hanmac1>
when salt is not an string (and you may havent test it) then RSTRING_LEN crashs ... thats what StringValue is for ... that ensures that it is a string
mattbl has quit [Quit: This computer has gone to sleep]
CAMALEON has joined #ruby
CAMALEON has left #ruby [#ruby]
pyrac has quit [Quit: pyrac]
chichou has joined #ruby
mattbl has joined #ruby
gaahrdner has joined #ruby
pyrac has joined #ruby
arturaz has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 248 seconds]
hbpoison has joined #ruby
Eldariof-ru has quit [Ping timeout: 276 seconds]
jrendell has quit [Quit: jrendell]
<kenneth>
i thought that my StringValuePtr would have done the check too
ebobby has joined #ruby
techhelp has quit [Quit: Leaving]
<Hanmac1>
maybe yeah ... but not for the LEN call i think ..
wyhaines has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
wyhaines has joined #ruby
cantonic has joined #ruby
nilobject has joined #ruby
PanPan has quit [Ping timeout: 252 seconds]
workmad3 has quit [Read error: Operation timed out]
ryanf has quit [Ping timeout: 276 seconds]
timols has joined #ruby
Neomex has quit [Quit: Neomex]
dustint has quit [Ping timeout: 255 seconds]
lancepantz_ is now known as lancepantz
jerikl has joined #ruby
alienaut has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
carloslopes has quit [Ping timeout: 244 seconds]
the_mentat has quit [Quit: Computer has gone to sleep.]
end_guy has joined #ruby
dagnachew has joined #ruby
blacktulip has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
mahmoudimus has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
timols has quit [Ping timeout: 244 seconds]
e-dard has left #ruby [#ruby]
the_mentat has joined #ruby
dagnachew has quit [Remote host closed the connection]
phantasm66 has quit [Quit: *sleeeep….]
k3rn3lito has quit [Ping timeout: 260 seconds]
forrest has quit [Quit: Leaving]
Roa has quit [Ping timeout: 256 seconds]
ryanf_ is now known as ryanf
k3rn3lito has joined #ruby
<tjbiddle>
Anyone have any idea why Dir.pwd would be returning '/' instead of the correct working path? It seems to work in some cases, and not in others.
alvaro_o__ has joined #ruby
Roa has joined #ruby
sambio has quit [Remote host closed the connection]
<swarley>
I didn't know about procs in full for a long time either
<vabenjamin>
and banister' sleep I've honestly spent the past 6 years in Java
<vabenjamin>
I started getting into python a few months ago but I feel it really doesn't save me much time compared to just using Java
<swarley>
Time as in developing time?
<vabenjamin>
yeah
falk has joined #ruby
<banister`sleep>
vabenjamin: java is the only language you know?
<swarley>
Yeah, python is an inbetween.
<vabenjamin>
and C++
reset has quit [Ping timeout: 244 seconds]
<banister`sleep>
vabenjamin: ah ok
<vabenjamin>
I just started with Ruby a few days ago and it's speaking to me a bit more
falk is now known as Guest13192
Guest13192 has quit [Client Quit]
<vabenjamin>
I especially like that the gem system is essentially the same as linux repositories
<banister`sleep>
vabenjamin: ruby will blow your mind, then ;)
<swarley>
You're doing something wrong if your ruby development time takes longer than that of java ;)
<swarley>
just in time for 2.0 too
<vabenjamin>
and I can also be more terse with Ruby than with Python even though it might look hackish. The majority of what I do is prototype building anyway, so it really doesn't matter
<swarley>
Can you show an example? There might be a more elegant way to do it if it feels hackish
<vabenjamin>
the code might just not be as readable to others
multi_io has quit [Read error: Operation timed out]
<vabenjamin>
I threw up a github for my work in case anyone does any data mining stuff. It might eventually become useful for you: https://github.com/vabenjamin/BrilliantRuby
multi_io has joined #ruby
<banister`sleep>
vabenjamin: cool, if your projects are small enough, we can convert them into idiomatic ruby for you
<banister`sleep>
so you get a sense of how rubyists write ruby ;)
horofox has joined #ruby
<swarley>
[] is the hacky way to use it like javascript functions, where foo refers to the function and foo[] is the return of the function
remi has quit [Read error: Operation timed out]
<vabenjamin>
Ill be porting over some basic NLP and machine learning algorithms in Ruby
remi has joined #ruby
remi has quit [Changing host]
remi has joined #ruby
<swarley>
the definition for it probably just looks like def [](*args); call(*args); end
<vabenjamin>
I havent seen a good gem for that typ of stuff yet
gyre007 has joined #ruby
zoonfafer has joined #ruby
AllStruck has quit [Read error: Operation timed out]
jerius has quit []
dcope has quit [Read error: Operation timed out]
dcope_ has joined #ruby
Derander has quit [Ping timeout: 256 seconds]
Derander has joined #ruby
stillEPIK has joined #ruby
_bart has quit [Quit: _bart]
skattyadz_ has joined #ruby
skattyadz has quit [Read error: Connection reset by peer]
bradleyprice has quit [Remote host closed the connection]
<dmonjo_>
what is the difference when using symbols inside hashs vs using strings to reference ex: hash1 { :name => "blah" } pr hash1 { "name" => "blah" ... }
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
<swarley>
symbols in 1.9 are not garbage collected, so you are saving memory if you have a hash with the same keys that you'll be using many times
<swarley>
Where as when you make a new string, it will create a new String object for each use assuming that you're using something like hash["key"]
<dmonjo_>
so mainly one symbol is always reference to the same object id
<dmonjo_>
even if it changes values
<swarley>
Use strings when content matters, but use symbols when the identity matters.
atno has quit [Read error: Connection reset by peer]
<swarley>
Symbols cannot change value, they are like constants in a way
k3rn3lito has quit [Ping timeout: 260 seconds]
atno has joined #ruby
skrewler has joined #ruby
mikeastock has quit [Quit: Leaving]
bigmac has joined #ruby
bigmac has quit [Client Quit]
bigmac has joined #ruby
Roa has quit [Ping timeout: 276 seconds]
v0n has joined #ruby
<swarley>
if you had something like, a web program that was always creating hashes that look like {"foo" => "bar"} it would be memory efficient to use {:foo => "bar"} instead, because you're going to have the same key over and over and it avoids allocating space for objects that dont really matter
berserkr has quit [Quit: Leaving.]
k3rn3lito has joined #ruby
dcope_ has quit [Changing host]
dcope_ has joined #ruby
Roa has joined #ruby
dmiller has joined #ruby
dcope_ is now known as dcope
dankest has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
gaahrdner has joined #ruby
<dmonjo_>
so :hello = 1 is not allowed
codekoala has quit [Ping timeout: 255 seconds]
m8 has quit [Quit: Sto andando via]
hrls has joined #ruby
* hrls
<dmonjo_>
swarley: well said
<Spooner>
dmonjo_, :hello is a value not a variable. You can no more do that than 1 = 2
<dmonjo_>
so mainly a symbol doesnt have any value it has a reference to a valye
<dmonjo_>
value*
Inoperable is now known as zz_Inoperable
jgarvey has quit [Quit: Leaving]
noxoc has quit [Quit: noxoc]
<dmonjo_>
ok
Jedi_SCT1 has quit [Quit: See ya]
IrishGringo has joined #ruby
<dmonjo_>
symbols are values that can also be used in hashes as keys to reference other values
alienaut has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 252 seconds]
elaptics`away is now known as elaptics
dmiller has quit [Ping timeout: 264 seconds]
samphippen has joined #ruby
<dmonjo_>
rubymonk is pretty cool btw
Jedi_SCT1 has joined #ruby
thinkclay has quit [Quit: Leaving.]
<v0n>
how can I know the filename calling a given function?
<v0n>
like __FILE__ but for the caller
<Spooner>
v0n, Files don't call functions.
<v0n>
def foo; puts __FILE__; end
<v0n>
but I want the name of the file calling foo(), not the name of the file where foo() is defined
goraxe has joined #ruby
hrls has left #ruby [#ruby]
arya has quit [Ping timeout: 244 seconds]
jekotia has joined #ruby
<Spooner>
v0n I guess you could extract it from #caller
<apeiros_>
v0n: it's a bad idea to do that, unless you're using this for debugging
Mon_Ouie has quit [Ping timeout: 255 seconds]
<v0n>
apeiros_: kind of
<v0n>
it's to dynamically build a doc
carlyle has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
<bigmac>
im having a hard time sorting out a packet with ruby sockets...
sambio has quit [Ping timeout: 248 seconds]
skattyadz has quit [Quit: skattyadz]
mmitchell has quit [Remote host closed the connection]
sambio has joined #ruby
<bigmac>
i have a string s="7f00000007f11117f222222227f333333...and so on"
goraxe has quit [Read error: Connection reset by peer]
frem has joined #ruby
<Spooner>
bigmac, I'm guessing there is a formal format to the packet.
<bigmac>
yes, all start wth f7
<bigmac>
i need to break this into arrea
horofox has quit [Quit: horofox]
mattbl has quit [Quit: This computer has gone to sleep]
<bigmac>
scan is what i am trying
<bigmac>
regex stuff
<bigmac>
s.scan(/f7.*.f7/)
<bigmac>
i dont know
skrewler has quit [Quit: skrewler]
atno has quit [Read error: Connection reset by peer]
<Spooner>
That would eat the next packet header too.
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<bigmac>
yes,
dankest has quit [Quit: Leaving...]
<v0n>
Spooner: hehe, #caller sounds great
<bigmac>
i do my own hacky method
Monie has quit [Quit: Quit]
atno has joined #ruby
<bigmac>
s.scan(/f7.*.f7/(.)(.))
<bigmac>
i forget how to do it
jrendell has joined #ruby
<Spooner>
You can't really scan since you really need to eat as much as you can, then store any excess to use when you next receive data.
<bigmac>
i can share my hacky method, but it produces nil and breaks with error
Kuifje has quit [Ping timeout: 260 seconds]
cloaked1 has joined #ruby
<Spooner>
s.scan(/\xf7[^\xf7]+/) is probably better, but that will accept partial packets which isn't ideal either. I assume there is an end marker too or you have no idea whether you've received a full packet.
__BigO__ has quit [Remote host closed the connection]
<bigmac>
each packet has its own end byte or expected size...
kpshek has quit []
atno has quit [Read error: Connection reset by peer]
<bigmac>
but i think if i just search for f7 it will work
<Spooner>
It won't.
skattyadz has joined #ruby
<Spooner>
Because you have no idea if you have a full packet.
atno has joined #ruby
lele has quit [Quit: Coyote finally caught me]
<Spooner>
Because you are streaming the data, not guaranteed to only have full packets every time you read.
PanPan has joined #ruby
generalissimo has quit [Remote host closed the connection]
horofox has joined #ruby
bubblehead has quit [Remote host closed the connection]
toekutr has joined #ruby
<Spooner>
You want to read the size of the packet, then read that much. And also you need to decide if you can block or not, since that changes a lot your algorithm.
mattbl has joined #ruby
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
kpshek has joined #ruby
Kingy has joined #ruby
belieber-15d1 has joined #ruby
Slivka has quit [Ping timeout: 248 seconds]
staafl has quit [Read error: Connection reset by peer]
PanPan has quit [Ping timeout: 276 seconds]
belieber-15d1 has quit [Read error: Connection reset by peer]
<bigmac>
so, i could reach each byte until f7 is found again
gaahrdner has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 255 seconds]
gosshedd has quit [Ping timeout: 260 seconds]
the_mentat has quit [Quit: Computer has gone to sleep.]
<Spooner>
You could do that, but if you do have exactly one packet, then you would not "accept" it until (and unless) you receive another packet. Much better to work out the length or end code.
RORgasm has joined #ruby
gregor3005 has quit [Quit: Leaving.]
gaahrdner has joined #ruby
havenwood has joined #ruby
<bigmac>
identify each start and end point of each packet?
<dmonjo_>
cant use string.chars { |x| if x == 'f' && x.next == '7' ... ?
frem has quit [Ping timeout: 260 seconds]
<dmonjo_>
sorry wrong
<Spooner>
if you know both start and end, you are fine.
moted has joined #ruby
twshelton has quit [Quit: Computer has gone to sleep.]
<Spooner>
What data are you reading? I'm sure the provider gives that info out.
<bigmac>
there is some info online
<bigmac>
its a game protocol
<bigmac>
i have a ruby client im trying to improve
<bigmac>
warcrat game
<Spooner>
Ah, so sketchy because it was backwards engineered. I've had that fun time before!
<Spooner>
war rat? ;)
<bigmac>
i can establish connection and keep the connection alive most of the time... not 100% though
monkegjinni has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 256 seconds]
<swarley>
you may just want to add an argument to the function that the caller would pass __FILE__ to
<banister`sleep>
bigmac: wanna play warcraft3?
<swarley>
-to
freeayu has joined #ruby
<bigmac>
what games do u play
<bigmac>
dota?
the_mentat has joined #ruby
<banister`sleep>
bigmac: ni no kuni
kristofers has quit []
jlast has joined #ruby
wmoxam has joined #ruby
jaygen has quit [Remote host closed the connection]
<dmonjo_>
Spooner: usually iterators work one at a time on an Object right? it would be hard to do some computations between 2 iterators running in parralel on the same string, for example iterator 1 working on first string and iterator 2 working on second stream at the same time and do some matching between iterator1 and 2, regex would be easier right
jaygen has joined #ruby
chico_chicote has joined #ruby
<dmonjo_>
stream* string
bean__ has quit [Quit: Computer has gone to sleep.]
skattyadz has left #ruby [#ruby]
dustint has quit [Ping timeout: 244 seconds]
nari has joined #ruby
dagnachew has quit [Read error: Connection reset by peer]
<swarley>
oh man, banister`sleep, I would sell my soul for a PS3 to play that game
pdamer has joined #ruby
<banister`sleep>
swarley: hehe, fan of studio ghibli? :)
<swarley>
yes, very much so. I flipped my laptop off my desk when i found out that it was PS3 only
<Spooner>
dmonjo_, Not really understanding what you are trying to do. Might be a job for #zip...but I can't tell.
DarkFoxDK has quit [Remote host closed the connection]
<banister`sleep>
swarley: ps3s probbly aren't that expensive anymore, not sure
byteit101 has joined #ruby
<swarley>
they aren't but they're still $170 more than I have
<banister`sleep>
swarley: anyway, yeah, it feels like you're playing a ghibli movie, even the music is done by the same dude
<swarley>
i heard, i've been watching pewdiepie play it on youtube because i don't know when I'll actually get the game myself
dagnachew has joined #ruby
DarkFoxDK has joined #ruby
banseljaj is now known as imami|afk
fedza has joined #ruby
spider-mario has quit [Remote host closed the connection]
timols has joined #ruby
lele has joined #ruby
willob has quit [Quit: Leaving.]
<Spooner>
dmonjo_, Can you explain what you want to achieve?
mmitchell has joined #ruby
dmonjo_ has quit [Quit: Leaving]
Monie has joined #ruby
SilverKey has joined #ruby
_nitti has joined #ruby
jonahR has quit [Quit: jonahR]
RORgasm has quit [Remote host closed the connection]
lancepantz is now known as lancepantz_
jrendell has quit [Quit: jrendell]
timols has quit [Ping timeout: 252 seconds]
arya_ has joined #ruby
zoonfafer has quit [Ping timeout: 260 seconds]
kpshek has quit []
wmoxam has quit [Ping timeout: 244 seconds]
havenwood has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]