apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
shock_one has joined #ruby
mockra has joined #ruby
kofno has joined #ruby
ZachBeta has joined #ruby
hackeron has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
baphled has joined #ruby
mockra has quit [Ping timeout: 264 seconds]
pitzips has quit [Ping timeout: 245 seconds]
LaPetiteFromage has joined #ruby
Spooner has quit [Remote host closed the connection]
AlSquire has quit [Quit: This computer has gone to sleep]
AlSquire has joined #ruby
reppard_ has joined #ruby
moeSizlak has left #ruby ["Leaving"]
madb055 has quit [Ping timeout: 252 seconds]
Left_Turn has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
brian_000_ has quit [Ping timeout: 245 seconds]
undersc0re97 has quit [Ping timeout: 245 seconds]
jdunck_ has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
timmow has joined #ruby
slainer68 has joined #ruby
canton7 has quit [Remote host closed the connection]
Left_Turn has left #ruby [#ruby]
locriani has joined #ruby
voodoofish has joined #ruby
pitzips has joined #ruby
miskander has quit [Quit: miskander]
dv_ has joined #ruby
meanderer has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
peta_ has quit [Quit: peta_]
eykosioux has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
dv_ has joined #ruby
dv_ has quit [Remote host closed the connection]
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
mockra has joined #ruby
blacktulip has quit [Remote host closed the connection]
lktp has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
eykosioux has quit [Ping timeout: 260 seconds]
jdunck_ has quit [Quit: Computer has gone to sleep.]
mockra has quit [Ping timeout: 255 seconds]
dv_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
shock_one_ has joined #ruby
pskosinski has joined #ruby
pitzips has quit [Ping timeout: 252 seconds]
shock_one has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
sailias has joined #ruby
davetherat has quit [Remote host closed the connection]
adrian has joined #ruby
davetherat has joined #ruby
AlSquire has quit [Ping timeout: 256 seconds]
wsterling has joined #ruby
tealmage has joined #ruby
cmarques has quit [Ping timeout: 245 seconds]
reppard_ has quit [Ping timeout: 256 seconds]
LaPetiteFromage has joined #ruby
Akuma has joined #ruby
Anarch has quit [Ping timeout: 264 seconds]
generali_ has quit [Remote host closed the connection]
Anarch has joined #ruby
tealmage has quit [Ping timeout: 252 seconds]
johndbritton has joined #ruby
nezumi has joined #ruby
iphands_ has joined #ruby
pitzips has joined #ruby
tdecs has quit [Remote host closed the connection]
mneorr has joined #ruby
vlad_starkov has joined #ruby
rakl has quit [Quit: sleeping]
beneggett has joined #ruby
soooga has joined #ruby
wsterling has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 264 seconds]
zmanfx has quit [Ping timeout: 245 seconds]
jgrevich has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
Anarch has quit [Ping timeout: 245 seconds]
subbyyy has joined #ruby
johndbritton has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 246 seconds]
Hanmac1 has joined #ruby
dmiller has joined #ruby
tylersmith has quit [Quit: tylersmith]
zmanfx has joined #ruby
mfridh has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 248 seconds]
pskosinski has quit [Quit: pskosinski]
YakkoAFK has quit [Ping timeout: 246 seconds]
dmiller has quit [Ping timeout: 258 seconds]
tomsthumb has joined #ruby
iphands_ has quit [Ping timeout: 246 seconds]
pioz has joined #ruby
Yakko has joined #ruby
momomomomo has quit [Quit: momomomomo]
heliumsocket has quit [Quit: heliumsocket]
pioz has quit [Client Quit]
security has joined #ruby
megha has quit [Ping timeout: 260 seconds]
adrian has quit [Quit: Adrian]
sepp2k has quit [Remote host closed the connection]
dmiller has joined #ruby
eykosioux has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
Myk267 has left #ruby [#ruby]
immutable_ has left #ruby [#ruby]
heliumsocket has joined #ruby
wreckimnaked has joined #ruby
pandawarrior1 has joined #ruby
kofno has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
tomsthumb has quit [Quit: Leaving.]
dmiller has joined #ruby
heliumsocket has quit [Client Quit]
timmow has joined #ruby
pandawarrior1 has quit [Client Quit]
heliumsocket has joined #ruby
pandawarrior1 has joined #ruby
etcetera has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
baroquebobcat has joined #ruby
Fuzai has quit [Ping timeout: 264 seconds]
timmow has quit [Ping timeout: 252 seconds]
cheese1756 has quit [Excess Flood]
cheese1756 has joined #ruby
hiyakashi has joined #ruby
bradhe has joined #ruby
reppard has joined #ruby
tealmage has joined #ruby
<Vivekananda> how do I run the debugger in pry
mockra has joined #ruby
idkazuma has joined #ruby
momomomomo has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
jpfuentes2 has joined #ruby
kofno has joined #ruby
havenwood has joined #ruby
nezumi has quit [Ping timeout: 248 seconds]
pandawarrior1 has quit [Quit: Leaving.]
mockra has quit [Ping timeout: 246 seconds]
Fuzai has joined #ruby
kofno has quit [Remote host closed the connection]
reppard has quit [Quit: leaving]
SCommette has joined #ruby
chimmy has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
cheese1756 has quit [Quit: ZNC - http://znc.in]
SCommette has quit [Client Quit]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
cheese1756 has joined #ruby
ARCADIVS has joined #ruby
roz has joined #ruby
etcetera has quit []
bradhe has quit [Remote host closed the connection]
eykosioux has quit [Remote host closed the connection]
eykosioux has joined #ruby
sambio has quit [Remote host closed the connection]
sambio has joined #ruby
idkazuma has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
tealmage has quit [Ping timeout: 246 seconds]
Mattx has joined #ruby
eykosioux has quit [Ping timeout: 258 seconds]
wesside has joined #ruby
roz has quit [Ping timeout: 252 seconds]
Matip has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
pkill has quit [Ping timeout: 245 seconds]
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
mockra has joined #ruby
<Vivekananda> hey everyone In pry how do I lookup documentation. I tried ri Numeric and ri Numeric#methods but it comes up empty
F1skr has quit [Quit: WeeChat 0.4.0]
shock_one_ has quit [Ping timeout: 256 seconds]
SCommette has joined #ruby
eka has joined #ruby
mockra has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
<Vivekananda> Anyone here
idkazuma has joined #ruby
nezumi has joined #ruby
chimmy has joined #ruby
Guedes has quit [Quit: Saindo]
pandawarrior1 has joined #ruby
ryanf has joined #ruby
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
pkrnj has joined #ruby
pandawarrior1 has quit [Client Quit]
pandawarrior1 has joined #ruby
danneu has joined #ruby
hach has joined #ruby
chessguy has quit [Read error: Connection reset by peer]
bean has joined #ruby
pandawarrior1 has quit [Client Quit]
chessguy has joined #ruby
pandawarrior1 has joined #ruby
danslo_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
danslo_ has quit [Client Quit]
pandawarrior1 has quit [Client Quit]
pandawarrior1 has joined #ruby
bhaarat has joined #ruby
<bhaarat> I have most of the basics down of ruby language but still learning. I don't get to write much ruby at work but would like to look around other people's code on github to learn/explore more. any github projects that are good to read over for ruby code? I do remember a presentation from James Edward Gray that mentioned good github projects to study but can't find it now
<Vivekananda> hey there
<Vivekananda> bhaarat: howdy
<bnagy> bhaarat: ara howard's github is pretty good
<bnagy> the celluloid code is nicely written
pandawarrior1 has quit [Client Quit]
<bnagy> (tarcieri)
<Vivekananda> bnagy: :)
<Vivekananda> you of all people to find here !
sebastianb has quit [Quit: leaving]
pandawarrior1 has joined #ruby
<bnagy> bhaarat: any particular areas you're interested in?
shevy has quit [Ping timeout: 276 seconds]
Opettaja has quit [Quit: WeeChat 0.4.0]
<bhaarat> howdy
<bhaarat> since I'm new to the ruby world I'm interested in the language itself for now. not something like vagrant
LongLiveBacon has joined #ruby
timmow has joined #ruby
pandawarrior1 has quit [Client Quit]
pandawarrior1 has joined #ruby
<bnagy> bhaarat: ok, but there are 'pure' ( not webby ) ruby projects to do pretty much anything you can think of
<bnagy> so if you have a general area of programming interest then there might be some relevant stuff to read
radic has joined #ruby
radic_ has quit [Read error: Operation timed out]
sebastianb has joined #ruby
pandawarrior1 has quit [Client Quit]
<bhaarat> something with lucene/elastic would be nice. That way I can get a feel for lucene as well.
pandawarrior1 has joined #ruby
<bhaarat> so, text search, area.
tomsthumb has joined #ruby
pandawarrior1 has quit [Client Quit]
newUser1234 has quit [Remote host closed the connection]
pandawarrior1 has joined #ruby
<bnagy> k, not really my area, but github search should turn up something
<bnagy> maybe read some of the other stuff I suggested so you can tell if you're reading good code or bad code :)
pandawarrior1 has quit [Client Quit]
<bean> httparty is pretty clean and simple
pandawarrior1 has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
timmow has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
shevy has joined #ruby
hach has quit [Ping timeout: 256 seconds]
pandawarrior1 has quit [Quit: Leaving.]
<bhaarat> alright, cool. thanks
pandawarrior1 has joined #ruby
pandawarrior1 has quit [Client Quit]
rismoney has quit []
mockra has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
wsterling has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
<Vivekananda> bnagy thanks
tk_ has joined #ruby
<Vivekananda> good advice I will look that up to. Ara you said
chessguy has quit [Remote host closed the connection]
fixl has joined #ruby
momomomomo has quit [Quit: momomomomo]
cheese1756 has quit [Excess Flood]
etcetera has joined #ruby
cheese1756 has joined #ruby
<bnagy> older style ( ara has been around forever ) but I find his code really easy to read
hashmal has quit [Quit: Computer has gone to sleep.]
n1x has joined #ruby
slyv has joined #ruby
AlSquire has joined #ruby
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
sailias has quit [Quit: Leaving.]
idkazuma has quit [Remote host closed the connection]
wargasm has quit [Ping timeout: 245 seconds]
wargasm1 has joined #ruby
freeayu has joined #ruby
tomzx_mac has quit [Ping timeout: 245 seconds]
<Vivekananda> bnagy: thanks. also if you care to tell me something. I am trying to run ri Numeric or ri Numeric#methods inside pry
<Vivekananda> but no response
<Vivekananda> but I tried it from the prompt and it responds to it. what coud be wrong
s2013 has joined #ruby
<s2013> is there anyway to convert something like $10m into 10,000,000 ?
<welandB> Yes.
<welandB> Regular expressions should do the trick.
<s2013> but i thought there was some function that did that
<s2013> i am sure i remember seeing it somewhere
akashj87 has joined #ruby
<Mattx> wtf? begin ... foo 123 ... rescue RequestError => e; puts e.message; end
<Mattx> error "in `throw': uncaught throw #<RequestError: ..."
<Mattx> any idea?
mockra has joined #ruby
<Mattx> it doesn't make sense
kaneda^ has joined #ruby
<kaneda^> hey all, how does "extend" differ from ">" (inheritance)
momomomomo has joined #ruby
charliesome has joined #ruby
<s2013> isnt < inheritance?
iamjarvo has quit [Quit: Leaving.]
aapzak has quit [Ping timeout: 256 seconds]
<kaneda^> yes
<bhaarat> you meant < not >
<kaneda^> yes
pitzips has quit [Ping timeout: 246 seconds]
nfk has quit [Quit: yawn]
sailias has joined #ruby
reset has quit [Ping timeout: 260 seconds]
aapzak has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 248 seconds]
<kaneda^> ?
bhaarat has quit [Quit: bhaarat]
<Mattx> ah, niice.. I didn't know about raise/rescue vs throw/catch in ruby
<Vivekananda> hey everyone I am supposed to write a currency converter thing. I have it and it works in pry but on the site it says undefined method 'rupee' for 2:fixnum
<Mattx> I don't have any rupee either
<Mattx> even in pry
<Vivekananda> Mattx: here is the code https://gist.github.com/anonymous/3487b717292dbaa54d5c. The other thing is that in pry I am trying ri Numeric but this returns nothing
chessguy has joined #ruby
<Mattx> if it does work in pry but not in the real site check ruby versions
<Mattx> they're probably different
pkrnj has joined #ruby
thams has joined #ruby
momomomomo has quit [Quit: momomomomo]
<Vivekananda> yes they are different. pry is newer but that should not matter coz I am defining a missed_method for rupee in the code. It says rupee not present as compared to
<Vivekananda> something else
mahmoudimus has joined #ruby
keymone_ has joined #ruby
<bnagy> Vivekananda: I think they changed the inheritance chain for numbers
ntzrmtthihu777 has quit [Ping timeout: 260 seconds]
<bnagy> also, never use @@class_vars, and never monkey patch core classes, and especially never patch method_missing in core classes
<Mattx> "never use @@class_vars" <-- don't agree
<bnagy> that whole gist is basically just a crime against code
SCommette has quit [Quit: SCommette]
<bnagy> Mattx: good for you, sunshine! Aren't you plucky.
<Mattx> bnagy, explain why :P
<bnagy> because there are no good use cases for them and they screw up inheritance
<bnagy> everything you can do with class vars you can do with class @ivars
keymone has quit [Ping timeout: 252 seconds]
keymone_ is now known as keymone
<ryanf> bnagy: except share them across inheritance boundaries ;)
<Mattx> class @ivars?
<Mattx> you mean instance vars?
<ryanf> yes, he means instance variables of classes
<Mattx> lol
freakazoid0223 has quit [Ping timeout: 245 seconds]
<bnagy> yes, class instance vars, which is different to 'normal' instance vars
<Mattx> so I suppose you also think it doesn't make sense to have class methods?
<bnagy> ... why is that related?
pitzips has joined #ruby
<Mattx> well, where do you "persist" whatever you need to persist in a class method?
<bnagy> in a class intance var
ZachBeta has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
timmow has joined #ruby
<Mattx> ah, ok.. I got your point..
<Mattx> there should be some cases in which you need them but yeah, you don't use them so often
<bnagy> there are no cases
<bnagy> unless your architecture is insane
<bnagy> one way of telling that is if you find you need class vars
<bnagy> they're like $globals - they still exist, but they're only ever used by awful code
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Vivekananda> bnagy: so you suggest that I create a method for class instance rather than the class itself. also I dont wish to patch but this is just an exercise to demonstrate that the classes are actually open in ruby and nothing else
wsterling has quit [Remote host closed the connection]
<Mattx> you can use a constant, Vivekananda
<Vivekananda> but all that comes in later. First I need to find out what superclass I should use so that this is correct
timmow has quit [Ping timeout: 252 seconds]
<Vivekananda> Mattx: constant ?? static methods ?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
chandankumar has joined #ruby
AlStanforth has joined #ruby
<Vivekananda> and before all this why does my ri Numeric return nothing in pry
<Mattx> class Foo \n BAR = {whatever: "here"} \n ... end
sailias has quit [Quit: Leaving.]
AlStanforth has quit [Remote host closed the connection]
momomomomo has joined #ruby
d11wtq_ios has joined #ruby
etcetera has joined #ruby
slainer68 has quit [Remote host closed the connection]
crazymykl has quit [Read error: Connection reset by peer]
crazymykl has joined #ruby
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has quit [Client Quit]
daidoji has joined #ruby
mockra has joined #ruby
sambio has quit []
mockra has quit [Ping timeout: 276 seconds]
<Vivekananda> Mattx: thanks for the tip. I will have to read constants now. I was hoping to weed out the error here and then read a better way but that never happens on irc
<Vivekananda> :(
<bnagy> Vivekananda: I already told you why it's not working
niceguy1234 has quit [Ping timeout: 256 seconds]
ZachBeta has joined #ruby
ikstrm has quit [Remote host closed the connection]
<bnagy> oh, and your ri isn't working because you don't have ri installed, or you didn't build rdoc when you built your ruby
<Vivekananda> bnagy: yes I looked to find that fixnum is a descendant of Numeric
<Vivekananda> but in that case why would the code give me the methods_missing for numeric. that was a given part of the code and I did the second part
<Vivekananda> I guess I will just include a method itself for rupee in fixnum
<Vivekananda> dont even konw what version of ruby they are using
MetaCosm has quit [Excess Flood]
<Mattx> wait a second, is it just rupee which is not working?
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
<Mattx> that would be weird
tjbiddle_ has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
ariedler has quit [Remote host closed the connection]
sambio has joined #ruby
chessguy has quit [Remote host closed the connection]
<Vivekananda> Mattx: no it is none of those. Sorry for the confusion.
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
d11wtq_ios has quit [Remote host closed the connection]
kaneda^ has quit [Ping timeout: 245 seconds]
<Vivekananda> I wonder why we are asked to modify the Numeric class when it is not the parent class for this
tylersmith has joined #ruby
tjbiddle has quit [Ping timeout: 245 seconds]
tjbiddle_ is now known as tjbiddle
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
<bnagy> because they changed the inheritance chain since the retarded example was written
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
chessguy has joined #ruby
<Vivekananda> I followeed the readme for rbenv setup and then the latest ruby
<Vivekananda> how do I install docs now ?
davetherat has quit [Remote host closed the connection]
etcetera has quit []
davetherat has joined #ruby
momomomomo has joined #ruby
amorphid has joined #ruby
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
<amorphid> have a few questions about installing ruby from source. anyone feeling chatty? just unclear on a couple conceots
theoros has joined #ruby
<bnagy> amorphid: sure
<amorphid> bnagy, thanks!
Opettaja has joined #ruby
<amorphid> here's the situation, I can install from rbenv fine w/ opensll
<theoros> i'm trying to use RB_TYPE_P(RARRY_PTR(ary)[0], T_STRING) in array.c for a patch, and it is breaking `make`, as is TYPE_P(...) == T_STRING. both of these are used elsewhere in array.c. any hints?
Nuck has quit [Quit: Nuck Off]
<amorphid> but i want to try using labels in Ruby (using this :http://patshaughnessy.net/2012/2/29/the-joke-is-on-us-how-ruby-1-9-supports-the-goto-statement)
<theoros> (i'm not too familiar with C)
Nuck has joined #ruby
<amorphid> I don't know how to install w/o rbenv while including openssl, too.
tjbiddle has quit [Quit: tjbiddle]
etcetera has joined #ruby
<bnagy> amorphid: how did you install with rbenv? using ruby-build or something?
baroquebobcat has quit [Quit: baroquebobcat]
<amorphid> just using vanilla instructions on rbenv readme
<bnagy> because you can just as easily do a 'normal' make configure make install using a local prefix and then access that with rbenv
<bnagy> you just need it to be in the rbenv versions dir
<amorphid> oh yeah? that's almost too simple :) I'll try it, thanks
<bnagy> you can even just symlink it it, tbh
<amorphid> bnagy: +1 upvote to you sir/ma'am
<bnagy> that's how I do my jruby - I symlink in the cloned repo
<amorphid> bnagy: thanks, that's good enough for now!
<bnagy> np
amorphid has quit [Quit: Page closed]
SDr has joined #ruby
arya has joined #ruby
slainer68 has joined #ruby
mockra has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
Nuck has quit [Quit: Nuck Off]
Nuck has joined #ruby
<Vivekananda> how do I change ruby versin n pry
mockra has quit [Ping timeout: 276 seconds]
rburton- has joined #ruby
slainer68 has quit [Ping timeout: 258 seconds]
shmoon has joined #ruby
<shmoon> can ruby do system calls?
<bnagy> shmoon: uh.. what do you mean by system calls
<shmoon> to kernel, like chroot(2)
<bnagy> ok. yes and no.
<bnagy> I have code to do it on Windows, but I have to manually build machine code
<bnagy> cause there's no easy syscall bridge. On *nix it's probably easier, but I think you're probably still going to have to write some FFI code
<bnagy> unless someone has done it...
<heftig> shmoon: sure, you have the "syscall" method to do arbitrary system calls
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<bnagy> oh shit wait I bet you can just... shit what heftig just said :)
<bnagy> :D
<bnagy> I do too much windows hacking :(
<heftig> of course, it's completely unsafe and unportable
<bnagy> I automatically expect everything to be hard
idkazuma has joined #ruby
callmeivan has quit [Remote host closed the connection]
bradhe has joined #ruby
callmeivan has joined #ruby
pitzips has quit [Remote host closed the connection]
<bnagy> ooh, lame, JRuby has no syscall support, so you would need cruby as well
<bnagy> actually I guess it's not that lame :)
iamjarvo has joined #ruby
<shmoon> heftig: hm, lets say i wanna do chroot('/var') how do i do it via syscall, the documentation is sligly confusing
<heftig> bnagy: it does have syscall support here
wargasm1 has quit [Read error: Connection reset by peer]
<bnagy> heftig: eh? os / version?
security is now known as megha
<heftig> bnagy: jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on OpenJDK 64-Bit Server VM 1.7.0_17-b02 [linux-amd64]
<heftig> shmoon: Dir.chroot
wargasm has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
<bnagy> heftig: how odd. Windows / OSX not.. I can't be bothered connecting VPN to check one of my linux boxes
timmow has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
<shmoon> heftig: how about directly via syscall ? :)
havenwood has joined #ruby
browndawg has joined #ruby
chandankumar has quit [Quit: Leaving]
browndawg has quit [Client Quit]
<heftig> shmoon: find the syscall number in your C includes, then run syscall(nr, "/var")
<heftig> e.g. for me (linux x86_64) the syscall number is 161
<shmoon> how do you find that exactly ? :P
<shmoon> sorry beginner \
<heftig> /usr/include/syscall.h is the starting point
timmow has quit [Ping timeout: 252 seconds]
<shmoon> just has #include <sys/syscall.h> - i wonder where to find that C file now - not a C programmer
Opettaja has quit [Quit: WeeChat 0.4.0]
<heftig> then you shouldn't screw around with syscalls
<heftig> learn C and systems programming first
browndawg has joined #ruby
<momomomomo> Check out Programming in C by Stephen Kochan shmoon
<momomomomo> or Absolute Beginner's Guide to C by Greg Perry
<shmoon> i aint doing anything nasty, just testing out few things
<shmoon> yesterday i decided i will learn c/c++ in the coming months
mockra has joined #ruby
callmeivan_ has joined #ruby
<iamjarvo> what tells ruby to calculate "cat.length" first in 0..."cat".length
<shmoon> anyway I'll play with Dir/chroot
nfk has joined #ruby
idkazuma has quit [Remote host closed the connection]
wsterling has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
callmeivan_ is now known as callmeivan
tommyvyo has quit [Quit:]
arya has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
<iamjarvo> hrm think i figured it out
mockra has quit [Ping timeout: 252 seconds]
randomautomator has joined #ruby
undersc0re97 has quit [Quit: Leaving]
<heftig> iamjarvo: operator precedence
undersc0re97 has joined #ruby
tjbiddle has joined #ruby
wsterling has quit [Ping timeout: 246 seconds]
<iamjarvo> heftig: what is precedence though?
<iamjarvo> in order for it to work it should be evaluated first
sayan has joined #ruby
<iamjarvo> thanks. will take a read
etcetera has quit []
ZachBeta has quit [Quit: Computer has gone to sleep.]
etcetera has joined #ruby
markalanevans has quit [Quit: markalanevans]
faen has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
generali_ has joined #ruby
d11wtq_ios has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
pandawarrior1 has joined #ruby
<iamjarvo> heftig: . has the highest precedence. good article
kofno has joined #ruby
vlad_starkov has joined #ruby
dmiller has quit [Remote host closed the connection]
roz has joined #ruby
blf has joined #ruby
<blf> Since arrays can store any type of object (and multiple types of objects), how do you guys handle the validation of array items when passed to a method?
ananthakumaran has joined #ruby
kofno has quit [Remote host closed the connection]
<heftig> call and pray
<blf> For instance, should I raise and ArgumentError if one of the elements is not an Float, but I require floats?
<heftig> blf: try to coerce it instead IMO
vlad_starkov has quit [Ping timeout: 246 seconds]
<heftig> could be an integer or a rational
<blf> heftig: should I coerce everything, or only items which aren't floats?
<heftig> just call to_f on everything
<blf> That is, would some_float.to_f be expensive?
<blf> heftig: okay.
<blf> Thanks :)
tylersmith has quit [Quit: tylersmith]
<Vivekananda> momomomomo: hello
<momomomomo> hello Vivekananda
<Vivekananda> people here recommended pry to me
shevy has joined #ruby
Bry8Star has quit [Remote host closed the connection]
end_guy has quit [Write error: Broken pipe]
DrCode has quit [Write error: Connection reset by peer]
<momomomomo> for what use?
i0x3p710n has joined #ruby
<Vivekananda> so I have it. Could anyone tell me how to change the pry ruby version. do I have to use rbenv for it ?
<Vivekananda> for running and testing code
<Vivekananda> I have rbenv installed too
mercwithamouth has quit [Ping timeout: 255 seconds]
mockra has joined #ruby
randomautomator has quit [Remote host closed the connection]
<momomomomo> Vivekananda: do you use rvm?
mercwithamouth has joined #ruby
<Vivekananda> rbenv
<Vivekananda> I just installed like 3 days ago.
<momomomomo> not to sure, I haven't used rbenv before Vivekananda
mockra has quit [Ping timeout: 256 seconds]
<bnagy> pry is a gem
<i0x3p710n> ruby has a nice update and version manager rvm..u can use it to install and update ruby versions.. Vivekananda take a look here https://rvm.io/rvm/install/
<bnagy> you install it per ruby version, and you switch your in-use ruby with a version manager
<bnagy> rvm is awful
<momomomomo> bnagy: I take it you use rbenv?
<bnagy> yeah, but I should probably be using chruby now
<bnagy> just that I can't be bothered doing work when rbenv does everything I currently need
i0x3p710n has left #ruby [#ruby]
<momomomomo> top 3 reasons for using rbenv over rvm? bnagy
<codesoda> I'm using rbenv, but have heard good things about chruby
<codesoda> rvm actually stubs all your command lines tools
<codesoda> pretty nasty
<momomomomo> ;o
undersc0re97 has quit [Quit: Leaving]
<codesoda> stubs = shims
<codesoda> they are both good, depends if you need gemsets etc provided by rvm
<codesoda> i use rbenv and bundle into each projects /vendor folder
<codesoda> more duplication, but its just feels cleaner for me
<codesoda> rvm puts shit everywhere
<momomomomo> I'll have to check it out
<codesoda> give chruby a go
<momomomomo> right, well unfortunately I'm afraid to give either of them a go at the moment; but will look into them this week :)
<codesoda> what are you using at the moment?
<momomomomo> rvm
<codesoda> are you using vagrant?
<Vivekananda> bnagy: also if you can , I saw the video for pri and showing docs. I defined methods on the Numeric class so how do I see the methods. show-doc Numeric#methods
<codesoda> highly recommended https://github.com/zhengjia/vagrant-rbenv
<Vivekananda> so noone else uses rbenv ?
emergion has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<codesoda> I hesitated on moving from rvm, so glad I have now
<bnagy> Vivekananda: I have no idea, I don't use pry, but it seems to have pretty good documentation
<bnagy> so maybe reading that would be a better use of your time
drale2k has joined #ruby
<momomomomo> right on codesoda I don't use vagrant… but a friend did use it to set up dev boxes for teaching rails to beginners
<momomomomo> very slick stuff
<Vivekananda> bnagy: Yes and I have been reading that and trying out different things.
<codesoda> definately, especially if you are teaching, and people turn up with winblows machine
<momomomomo> right on codesoda - do you constantly use a VM then? I'd much rather just open up terminal on my local
drale2k has quit [Client Quit]
drale2k has joined #ruby
<codesoda> vagrant would be running headless though, and you'd essentially have a symlink between the files on the vm and on the local machine
<codesoda> i do everything in vm's
<codesoda> emulates my production environments
timmow has joined #ruby
danneu has quit [Ping timeout: 264 seconds]
<momomomomo> so vagrant up and I've got a 'vm' on my local env?
<momomomomo> bleh my brain is fried, I"ll have to read their docs tomorrow, but it looks interesting
etcetera has quit []
generali_ has quit [Remote host closed the connection]
generali_ has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
dmiller has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
<Vivekananda> My system is now getting more and more messed up and I dont know troubleshooting that well.
jdolitsky has quit [Quit: Leaving]
<Vivekananda> the instructions in rbenv said to use rbenv install after running exec $SHELL -l and I did. I also installed pry
<Vivekananda> now I have two ruby versions one from the default ubuntu and one using rbenv install.
blf has quit [Quit: Page closed]
kujaka has joined #ruby
<Vivekananda> I then did gem uninstall pry pry-doc and it said it did but I still get pry
<Vivekananda> I then tried exec $SHELL -l and tried pry uninstall and it did and still getting pry prompt
<Vivekananda> :(
staafl has joined #ruby
dmiller has quit [Ping timeout: 258 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
Skofo has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
kujaka has left #ruby [#ruby]
KJM has joined #ruby
KJM has quit [Client Quit]
benlieb has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
execat_ has joined #ruby
basex has joined #ruby
d11wtq_ios has quit [Remote host closed the connection]
Nimsical has joined #ruby
jdunck has joined #ruby
<execat_> Hi, I am using "ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]" with "Bundler version 1.3.5", which gives me a permission denied error. Happening to me since upgrade to Ruby 2.0.0. https://gist.github.com/anonymous/5381594
<execat_> This is a rails project I am trying to do. If I try to install the gems individually (like gem install rails), it would succeed.
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<momomomomo> so basically execat_ it's saying that your current user doesn't have access to usr/lib/ruby/gems/2.0.0/build_info/
<momomomomo> also, I'd recommend using some sort of ruby management - https://rvm.io/ is what I currently use, but there are others. rvm seems to be the defacto standard
<execat_> momomomomo, so it's a problem with the way the package was installed, right?
thams has quit [Ping timeout: 245 seconds]
<momomomomo> maybe ruby was installed as root, and bundler wasn't?
<momomomomo> no idea
thams has joined #ruby
robbyoconnor has joined #ruby
kofno has joined #ruby
stkowski has quit [Quit: stkowski]
sayan has quit [Ping timeout: 248 seconds]
generali_ has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 258 seconds]
vlad_starkov has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
havenwood has quit [Remote host closed the connection]
LnL has quit [Quit: LnL]
havenwood has joined #ruby
vlad_starkov has quit [Ping timeout: 258 seconds]
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
execat_ has quit [Read error: No route to host]
mockra has joined #ruby
iamjarvo has quit [Quit: Leaving.]
mercwithamouth has joined #ruby
rsahae has joined #ruby
mockra has quit [Ping timeout: 258 seconds]
shadoi has quit [Quit: Leaving.]
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
baphled has quit [Ping timeout: 245 seconds]
shock_one_ has joined #ruby
jhn has joined #ruby
eldariof has joined #ruby
ttt has joined #ruby
wallerdev has quit [Quit: wallerdev]
roz has quit [Ping timeout: 252 seconds]
timmow has joined #ruby
answer_42 has joined #ruby
robert_ has quit [Quit: Connection reset by traffic clause.]
n1x has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
ARCADIVS has quit [Quit: WeeChat 0.3.8]
ARCADIVS has joined #ruby
thams has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
chrishunt has quit [Read error: Connection reset by peer]
danneu has joined #ruby
daidoji has quit [Ping timeout: 248 seconds]
rickruby has quit [Read error: No route to host]
dmiller has quit [Ping timeout: 258 seconds]
rickruby has joined #ruby
mockra has joined #ruby
chrishunt has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
puppeh has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 240 seconds]
s00pcan_ has quit [Read error: Operation timed out]
mockra has quit [Ping timeout: 246 seconds]
s00pcan has joined #ruby
callmeivan has quit [Remote host closed the connection]
callmeivan has joined #ruby
rsahae has quit [Quit: rsahae]
vlad_starkov has joined #ruby
divout has joined #ruby
rsahae has joined #ruby
rsahae has quit [Client Quit]
eykosioux has joined #ruby
momomomomo has quit [Quit: adios]
s00pcan has quit [Ping timeout: 246 seconds]
rsahae has joined #ruby
kofno has joined #ruby
s00pcan has joined #ruby
angusiguess has joined #ruby
Rym has quit [Ping timeout: 252 seconds]
huoxito has quit [Quit: Leaving]
Rym has joined #ruby
bga-ruby has left #ruby [#ruby]
Hanmac1 is now known as Hanmac
kofno has quit [Ping timeout: 258 seconds]
Rumsteak has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
benlieb has quit [Read error: Connection reset by peer]
wallclockbuilder has joined #ruby
mockra has joined #ruby
arietis has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
rsahae has quit [Quit: rsahae]
emergion has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
rsahae has joined #ruby
rsahae has quit [Client Quit]
rakl has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
rsahae has joined #ruby
Ontolog has joined #ruby
earthquake has joined #ruby
yashshah has quit [Ping timeout: 256 seconds]
yashshah has joined #ruby
timmow has joined #ruby
mityaz has joined #ruby
rsahae has quit [Quit: rsahae]
oneirophren has joined #ruby
oneirophren has quit [Client Quit]
dmiller has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
chandankumar has joined #ruby
basex has quit [Quit: basex]
a_a_g has joined #ruby
drale2k has left #ruby ["Linkinus - http://linkinus.com"]
vlad_starkov has quit [Remote host closed the connection]
puppeh has quit [Remote host closed the connection]
mockra has joined #ruby
aryasam has joined #ruby
Ontolog has quit [Remote host closed the connection]
inomataj has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
ryanf has quit [Quit: leaving]
ryanf has joined #ruby
oneirophren has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
inomataj has quit [Client Quit]
knapper_tech has quit [Ping timeout: 264 seconds]
adrian has joined #ruby
beneggett has joined #ruby
end_guy has joined #ruby
robert_ has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
v0n has quit [Ping timeout: 276 seconds]
emergion has joined #ruby
aryasam has quit [Quit: Bye]
aryasam has joined #ruby
Yakko is now known as YakkoAFK
YakkoAFK is now known as Yakko
<Hanmac> apeiros: funny fact: with flonum 0.0 has fixed object_id, but -0.0 does have not ;P
undersc0re97 has quit [Quit: Leaving]
<Hanmac> and yeah there is a difference ;P
qohelet_ has joined #ruby
Czupa has joined #ruby
kofno has joined #ruby
icrazyhack has quit [Ping timeout: 252 seconds]
subbyyy has quit [Quit: none 0.3.9.2]
kofno has quit [Ping timeout: 258 seconds]
s2013 has quit []
adrian has quit [Quit: Adrian]
rolton has joined #ruby
wallclockbuilder has joined #ruby
adrian has joined #ruby
adrian has quit [Client Quit]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
end_guy has quit [Remote host closed the connection]
pcarrier has joined #ruby
marcdel has quit []
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
pcarrier has quit [Client Quit]
vlad_starkov has joined #ruby
pandawarrior1 has joined #ruby
mockra has joined #ruby
rakl has quit [Quit: sleeping]
mockra has quit [Ping timeout: 246 seconds]
swex_ has joined #ruby
swex has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 246 seconds]
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
undersc0re97 has quit [Client Quit]
Guest64573 has joined #ruby
Rioji has joined #ruby
divout has quit [Quit: Leaving.]
aryasam has quit [Quit: Bye]
Macaveli has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
krainboltgreene has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
end_guy has joined #ruby
sayan has joined #ruby
timmow has joined #ruby
eykosioux has quit [Remote host closed the connection]
dormoose has left #ruby [#ruby]
vlad_starkov has joined #ruby
GhostingCoder011 has joined #ruby
krainboltgreene has quit [Quit: Computer has gone to sleep.]
dormoose has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
halfie has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
<halfie> hi, I am looking for a Ruby compiler (something like Python's py2exe).
<halfie> can anyone point me towards one which is being actively developed?
Nahra has quit [Remote host closed the connection]
<halfie> ocra seems like a good one
MetaCosm has quit [Excess Flood]
beneggett has quit [Quit: Computer has gone to sleep.]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
chandankumar has quit [Ping timeout: 252 seconds]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
mockra has joined #ruby
yosafbridge has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
Rioji has quit [Remote host closed the connection]
GhostingCoder011 has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
krainboltgreene has joined #ruby
<bnagy> I don't use it, but fwiw ocra is the only one I have heard positive things about
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
<bnagy> rubyscript2exe is the only other one I know
ToApolytoXaos has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
br4ndon has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
mockra has quit [Ping timeout: 264 seconds]
subbyyy has joined #ruby
Pierre__ has quit [Quit: Page closed]
ZachBeta has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
ZachBeta has joined #ruby
callmeivan_ has joined #ruby
pcarrier has joined #ruby
sambio has quit []
idkazuma has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
callmeivan_ is now known as callmeivan
kofno has joined #ruby
pedda has joined #ruby
stacky has joined #ruby
Spooner has joined #ruby
mneorr has quit [Remote host closed the connection]
akashj87__ has joined #ruby
kofno has quit [Ping timeout: 240 seconds]
akashj87__ has quit [Client Quit]
lktp has quit [Quit: This computer has gone to sleep]
yosafbridge has joined #ruby
waxjar has quit [Ping timeout: 245 seconds]
callmeivan has quit [Ping timeout: 252 seconds]
akashj87 has quit [Ping timeout: 256 seconds]
Skofo has quit [Remote host closed the connection]
ntzrmtthihu777 has joined #ruby
pcarrier has quit [Quit: Textual IRC Client: www.textualapp.com]
<ntzrmtthihu777> is there a sort of cross-compiling for ruby?
mockra has joined #ruby
<Hanmac> ntzrmtthihu777: hm why did you ask?
waxjar has joined #ruby
ThePicard has quit [Ping timeout: 245 seconds]
style has joined #ruby
<style> good morning
dross has quit [Ping timeout: 255 seconds]
connor_goodwolf has quit [Ping timeout: 276 seconds]
<ntzrmtthihu777> Hanmac: well for example I can rake something on linux, right? is there a way to rake something on linux for windows, for example?
connor_goodwolf has joined #ruby
end_guy has quit [Remote host closed the connection]
dross has joined #ruby
callmeivan has joined #ruby
Rym__ has joined #ruby
ThePicard has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
adrian has joined #ruby
GhostingCoder011 has joined #ruby
akashj87 has joined #ruby
wargasm has quit [Ping timeout: 258 seconds]
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
maxmanders has joined #ruby
subbyyy has quit [Ping timeout: 264 seconds]
security has joined #ruby
style has quit [Ping timeout: 256 seconds]
end_guy has joined #ruby
<ntzrmtthihu777> Hanmac: are you here 24/7 ? seems like you are :D
megha has quit [Ping timeout: 276 seconds]
maxmanders has quit [Client Quit]
mneorr has joined #ruby
gr4yscale has joined #ruby
tret has joined #ruby
eldariof has quit [Ping timeout: 248 seconds]
soooga has quit [Quit: 离开]
ehaliewicz has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 256 seconds]
timmow has joined #ruby
tret has left #ruby [#ruby]
aryasam has joined #ruby
stacky has quit [Ping timeout: 258 seconds]
<ntzrmtthihu777> Hanmac: and not what I was thinking of exactly, but still cool. what I mean is if I rake something to make an exe, is there a way, from linux, to create a win32 exe
Adr1an00 has joined #ruby
Bry8Star has joined #ruby
<Adr1an00> morning
adrian has left #ruby [#ruby]
MrZYX|off is now known as MrZYX
robustus has quit [Ping timeout: 276 seconds]
idkazuma has quit [Remote host closed the connection]
robustus has joined #ruby
Macaveli has quit [Quit: This computer has gone to sleep]
timmow has quit [Ping timeout: 252 seconds]
DonRichie has joined #ruby
chandankumar has joined #ruby
akashj87 has quit [Quit: Leaving]
shock_one_ has quit [Remote host closed the connection]
sepp2k has joined #ruby
threesome has quit [Remote host closed the connection]
soulofpeace has joined #ruby
pkill has joined #ruby
tevio has joined #ruby
Nimsical has quit [Quit: Computer has gone to sleep.]
tomzx_mac has joined #ruby
mockra has joined #ruby
threesome has joined #ruby
qohelet_ has quit [Quit: qohelet_]
<Hanmac> ntzrmtthihu777: only ocra
browndawg has left #ruby [#ruby]
bulkan has joined #ruby
Rym__ has joined #ruby
Rym has quit [Ping timeout: 245 seconds]
Rym__ is now known as Rym
soulofpeace has quit [Ping timeout: 246 seconds]
faen has joined #ruby
zmike has joined #ruby
_veer has quit [Ping timeout: 245 seconds]
aryasam_ has joined #ruby
<ntzrmtthihu777> Hanmac: ocra?
aryasam has quit [Read error: Connection reset by peer]
aryasam has joined #ruby
_veer has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
stef_204 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
krainboltgreene has quit [Ping timeout: 246 seconds]
<Hanmac> ntzrmtthihu777: http://ocra.rubyforge.org/
pyrac has joined #ruby
aryasam_ has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
timonv has joined #ruby
<Rumsteak> are return statements useless in this code ? : https://gist.github.com/jdalbert/5382139
<drPoggs> yup
<Rumsteak> ok
<drPoggs> a purist may argue that you shouldn't be having multiple exit points from that code, but... well, it works
<yxhuvud> they actually make it slightly slower.
krainboltgreene has joined #ruby
<Rumsteak> ok will remove them then
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
pkill has quit [Quit: leaving]
<Hanmac> i often do return statments in oneliners too ... its often more clear with them
chandankumar has quit [Ping timeout: 264 seconds]
aryasam has quit [Quit: Bye]
<tobiasvl> but oneliners are the case where they clarify the least
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has quit [Excess Flood]
<yxhuvud> personally I might keep them since it makes it more obvious what is happening there. forcing the parse of if branches can make it a bit hard to read.
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
Rym__ has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
codespectator has quit [Quit: Computer has gone to sleep.]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
jhn has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
<Rumsteak> what is the best "ruby style" code among those then ? https://gist.github.com/jdalbert/5382169
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
<Rumsteak> or more readable
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
<Rumsteak> or maybe is there another way to make this bit of code more readable ?
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
GhostingCoder011 has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<Rumsteak> (or maybe https://gist.github.com/jdalbert/5382139 is clearer after all)
MetaCosm has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has quit [Excess Flood]
<ntzrmtthihu777> Hanmac: interesting
<tobiasvl> def decompose(n); n == 0 ? [] : (n == 1 ? [1] : [n + n-1 + n-1 + n-2] + decompose(n-2)); done
<tobiasvl> that's my favorite
<Hanmac> Rumsteak: [n + n-1 + n-1 + n-2] => [n*4-4]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
<tobiasvl> Rumsteak: i'd go with the first one in https://gist.github.com/jdalbert/5382169
kofno has quit [Ping timeout: 258 seconds]
adam12 has quit [Read error: Connection timed out]
<Rumsteak> Hanmac: I know, just separated those terms for my better understanding of what I want to do
angusiguess has quit [Ping timeout: 256 seconds]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
adam12 has joined #ruby
<Rumsteak> tobiasvl: yep think I agree too
forlin has joined #ruby
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
<Rumsteak> I'm just poking around since I'm a ruby beginner
<tobiasvl> sure
<tobiasvl> nothing better than poking around
madb055 has joined #ruby
<tobiasvl> Rumsteak: i think maybe this is my favorite: https://gist.github.com/anonymous/5382184
ttt has quit [Remote host closed the connection]
<Rumsteak> tobiasvl: changed your mind ?
<tobiasvl> highlights the bottoms of the recursion as return points
<tobiasvl> yeah
MetaCosm has joined #ruby
<Rumsteak> yeah highliths the "end cases" sure
<Rumsteak> well previous one with if elses also highlights them a bit
<tobiasvl> yeah. pretty verbose though.
hashmal has joined #ruby
wreckimnaked has quit [Ping timeout: 246 seconds]
ntzrmtthihu777 has quit [Quit: leaving]
bakedb_ has quit [Quit: No Ping reply in 180 seconds.]
bakedb has joined #ruby
Nahra has joined #ruby
<Rumsteak> yxhuvud: return statements make ruby code slower ? weird
<yxhuvud> not really, it is an extra call.
mneorr has quit [Remote host closed the connection]
F1skr has joined #ruby
mneorr has joined #ruby
eka has joined #ruby
<tobiasvl> i don't think you should worry about that infinitesimal slowdown when you're a ruby beginner. just learn how to write beautiful ruby code
codecop has joined #ruby
kuzushi has quit [Quit: Leaving]
hamakn has joined #ruby
<Rumsteak> even when not a ruby beginner I think one should not worry about infinitesimal slowdown. just my opinion though
LS\MFT has joined #ruby
LS\MFT has quit [Client Quit]
LS\MFT has joined #ruby
matchaw_ has joined #ruby
LnL has joined #ruby
axxT has joined #ruby
axxT has quit [Changing host]
axxT has joined #ruby
<Adr1an00> haha Rumsteak :-0
<Adr1an00> :-)
mneorr has quit [Remote host closed the connection]
timmow has joined #ruby
matchaw_ has quit [Remote host closed the connection]
jgrevich has quit [Remote host closed the connection]
chandankumar has joined #ruby
Ng|Adonixx8359 has quit [Ping timeout: 255 seconds]
coderhut has joined #ruby
pyrac has quit [Quit: pyrac]
arya has joined #ruby
krainboltgreene has quit []
pyrac has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
d11wtq has quit [Ping timeout: 256 seconds]
Spooner has quit [Remote host closed the connection]
chandankumar has quit [Client Quit]
d11wtq has joined #ruby
emergion has joined #ruby
arya_ has joined #ruby
Rioji has joined #ruby
dmiller has joined #ruby
Rym__ has joined #ruby
tobyo has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 248 seconds]
Rym has quit [Ping timeout: 245 seconds]
Rym__ is now known as Rym
basex has joined #ruby
arya has joined #ruby
pyrac has quit [Ping timeout: 245 seconds]
<tobiasvl> i agree :)
<tobiasvl> speed is for the low-level programmers to worry about
dmiller has quit [Ping timeout: 258 seconds]
arya_ has quit [Ping timeout: 248 seconds]
ehellman has joined #ruby
mockra has joined #ruby
<tobiasvl> "My conscience won’t let me call Ruby a computer language. That would imply that the language works primarily on the computer’s terms. That the language is designed to accommodate the computer, first and foremost. That therefore, we, the coders, are foreigners, seeking citizenship in the computer’s locale. It’s the computer’s language and we are translators for the world."
arya has quit [Read error: Connection reset by peer]
<tobiasvl> "But what do you call the language when your brain begins to think in that language? When you start to use the language’s own words and colloquialisms to express yourself. Say, the computer can’t do that. How can it be the computer’s language? It is ours, we speak it natively! We can no longer truthfully call it a computer language. It is coderspeak. It is the language of our thoughts."
<tobiasvl> thus spoke the prophet why_
pyrac has joined #ruby
timmow has joined #ruby
hmarr has joined #ruby
chessguy has quit [Remote host closed the connection]
amal has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
yacks has quit [Quit: Leaving]
Mon_Ouie has quit [Read error: Connection reset by peer]
<bnagy> or to steal some guy's tweet 'source code is the way of telling other programmers what you wanted the computer to do"
<bnagy> holy crap have I seen too much code that doesn't bear that in mind
<tobiasvl> hehe
maligree has joined #ruby
basex has quit [Quit: basex]
mikecmpbll has joined #ruby
apeiros has quit [Remote host closed the connection]
lkba has joined #ruby
Mon_Ouie has joined #ruby
kofno has joined #ruby
elaptics`away is now known as elaptics
Gnubie_ has quit [Quit: No Ping reply in 180 seconds.]
Gnubie has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
Rioji has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 258 seconds]
_veer has quit [Ping timeout: 258 seconds]
Spooner has joined #ruby
RagingDave has joined #ruby
Xeago has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
_veer has joined #ruby
atmosx has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
stef_204 has joined #ruby
ehellman has quit [Ping timeout: 264 seconds]
Rym__ has joined #ruby
k610 has joined #ruby
Rym has quit [Ping timeout: 252 seconds]
Rym__ is now known as Rym
ehellman has joined #ruby
arya has joined #ruby
mockra has joined #ruby
DrCode has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
_veer has joined #ruby
ttt has joined #ruby
slainer68 has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
stacky has joined #ruby
Macaveli has joined #ruby
slainer68 has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
Adr1an00 has quit [Quit: Textual IRC Client: www.textualapp.com]
Iszak has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
Iszak has quit [Read error: Connection reset by peer]
vlad_sta_ has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
pioz has joined #ruby
Iszak has joined #ruby
_veer has quit [Ping timeout: 258 seconds]
tylersmith has joined #ruby
Macaveli has left #ruby [#ruby]
r0kis has joined #ruby
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
r0kis has quit [Killed (idoru (Spam is off topic on freenode.))]
madb055 has quit [Remote host closed the connection]
mneorr has joined #ruby
madb055 has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
kirun has joined #ruby
Rioji has joined #ruby
jpfuentes2 has joined #ruby
kleinerdrache has joined #ruby
tylersmith has quit [Quit: tylersmith]
<kleinerdrache> can I concat for and if like 'for foo.each do |f| if f.id'
<kleinerdrache> fooo.each do |f| if f.id
<kleinerdrache> or do I have do make it afterwards, to break the loop if f.id is nil
<Hanmac> foo.each {|f| break unless f.id; ... }
<MrZYX> foo.reject {|f| f.id }.each
dmiller has joined #ruby
xlab_ has joined #ruby
Xlab has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
Rioji has quit [Ping timeout: 260 seconds]
TheFuzzball has joined #ruby
<kleinerdrache> MrZYX, thanks I'll try that
Spooner has quit [Remote host closed the connection]
<kleinerdrache> MrZYX, seems i get only the elemente where id is nil
dmiller has quit [Ping timeout: 258 seconds]
<Hanmac> kleinerdrache: use select not reject
<MrZYX> uh, right, sorry
<kleinerdrache> ok, i got it, thanks
mockra has joined #ruby
arya has quit [Ping timeout: 248 seconds]
tenmilestereo has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
mneorr has quit [Remote host closed the connection]
unflores has joined #ruby
browndawg has joined #ruby
peta_ has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
arya has joined #ruby
pedda has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 264 seconds]
m8 has joined #ruby
NAYENA has joined #ruby
kofno has joined #ruby
sepp2k has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
akashj87 has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
m8 has quit [Max SendQ exceeded]
m8 has joined #ruby
dormousy has quit [Quit: ZNC - http://znc.in]
dormoose has quit [Quit: ZNC - http://znc.in]
predator117 has joined #ruby
arya has joined #ruby
teddyp1cker has joined #ruby
hmarr has quit []
mneorr has joined #ruby
kofno has quit [Ping timeout: 255 seconds]
love_color_text has joined #ruby
BizarreCake has joined #ruby
dormousy has joined #ruby
Rym__ has joined #ruby
chipotle has joined #ruby
dormoose has joined #ruby
chipotle has quit [Client Quit]
postmodern has quit [Quit: Leaving]
pyrac has quit [Quit: pyrac]
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
anderse has joined #ruby
mockra has joined #ruby
gyre007 has joined #ruby
bhaarat has joined #ruby
backjlack has quit [Read error: Connection reset by peer]
mllie has joined #ruby
pyrac has joined #ruby
<mllie> hello
coderhut has quit [Quit: Page closed]
mikecmpbll has joined #ruby
bean has quit [Quit: Leaving]
mockra has quit [Ping timeout: 245 seconds]
teddyp1cker has quit [Remote host closed the connection]
madb055 has quit [Remote host closed the connection]
threesome has quit [Remote host closed the connection]
madb055 has joined #ruby
<bhaarat> http://stackoverflow.com/questions/4014352/ruby-getting-a-particular-line-from-a-file which one is a good solution here?? I want to be able to extract a random line from a file that consists of dictionary words. Each line contains one word. The file will be pretty big
slainer68 has joined #ruby
<NAYENA> im trying to get through the ruby koans to learn a little about programming in ruby, and I can get on quite fine, but the rspec error messages are terrible. Is there any way to make them any more verbose? Im getting stuff like "undefined local variable or method `value19' for #<AboutNil:0x00000001678aa8>"
<MrZYX> bhaarat: if speed and memory usage is really an issue you could get the filesize, seek to a random value inside, and read up to the next two \n, split at \n and use the second element of the resulting array
Rym has quit [Ping timeout: 245 seconds]
gr4yscale has quit [Quit: Computer has gone to sleep.]
hmarr has joined #ruby
Rym has joined #ruby
<MrZYX> nayena: not really answering your question but that means you still got a __ somehwere in about_nil.rb
<NAYENA> MrZYX: yes, i know, but I tried doing the same thing earlier this week and i got a message like: "<false> is not true."
<NAYENA> which is indefinitely more helpful
Czupa has quit [Remote host closed the connection]
codesoda has quit [Remote host closed the connection]
<MrZYX> btw that's minitest, not rspec ;)
<Hanmac> bhaarat: File.foreach(path).find{|line| line ... } or something like that
madb055 has quit [Ping timeout: 258 seconds]
tjbiddle has quit [Quit: tjbiddle]
oneirophren has quit [Ping timeout: 256 seconds]
madb055 has joined #ruby
Rioji has joined #ruby
hmarr has quit []
skattyadz has joined #ruby
bhaarat has quit [Quit: bhaarat]
LS\MFT has quit [Quit: Leaving]
iphands_ has joined #ruby
tdecs has joined #ruby
yacks has joined #ruby
nkr has joined #ruby
Rym__ has joined #ruby
<Nuck> What would be the best way to take a hash and remap the keys? I have two APIs which have the same data in two formats, and I want to convert the output of one to be the input for the other
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
<Nuck> I've traditionally used an intermediate variable, but (ideally) I'd just create a throwaway "mappings" hash and then use that to convert
arya_ has joined #ruby
vlad_starkov has joined #ruby
mockra has joined #ruby
arya has quit [Ping timeout: 256 seconds]
Apathetic has joined #ruby
iphands_ has quit [Ping timeout: 245 seconds]
arya has joined #ruby
kaneda^ has joined #ruby
kaneda^ has quit [Changing host]
kaneda^ has joined #ruby
arya_ has quit [Ping timeout: 264 seconds]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
mllie has left #ruby [#ruby]
bhaarat has joined #ruby
anderse has quit [Quit: anderse]
mockra has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
artofraw has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
zmike has quit [Quit: Выходжу]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
TheFuzzball has joined #ruby
madb055 has quit [Remote host closed the connection]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Rioji has quit [Remote host closed the connection]
kofno has joined #ruby
madb055 has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
pskosinski has joined #ruby
pskosinski has quit [Client Quit]
pskosinski has joined #ruby
stef_204 has joined #ruby
basex has joined #ruby
kofno has quit [Ping timeout: 246 seconds]
pioz has joined #ruby
atmosx has quit [Quit: And so the story goes…]
sambao21 has joined #ruby
subbyyy has joined #ruby
atno has quit [Ping timeout: 252 seconds]
josh_ has joined #ruby
pioz has quit [Client Quit]
tangledhelix has joined #ruby
<josh_> hey guys, I have an array of strings like this one: https://gist.github.com/joshmyers/060a976f0d05103a3678 . How could I inspect the number associated with a box, and if the number is high enough, prints the box and the number?
ToApolytoXaos has quit [Quit: Leaving]
oneirophren has joined #ruby
f0ster has joined #ruby
pyrac has quit [Quit: pyrac]
<sam113101> each + split + casting to float?
<banisterfiend> josh_: array.map { |v| b, num = v.split; [b, num.to_f] }
hogeo has joined #ruby
<kaneda^> what's the difference between "class foo; extend bar; end" and "class foo < bar; end"
<banisterfiend> kaneda^: first of all the class name must be Upper case, so foo -> Foo, bar -> Bar
graeme has joined #ruby
<kaneda^> banisterfiend, sure, sure, but that doesnt answer my question
<banisterfiend> kaneda^: secondly, the "<" syntax is used to specify a superclass
vlad_starkov has joined #ruby
<kaneda^> and extend does not?
<Hanmac> kaneda^: extend is only for modules and does work different than you think
<banisterfiend> kaneda^: the 'extend' method is used to mix in a module so that the modules methods are class methods on the class
<banisterfiend> no
<kaneda^> ahh
<kaneda^> so it's not inheritance this way
<f0ster> kaneda^: extend will include methods in the current class.. but with < it will have the properties of the parent class
<kaneda^> it's literally an extension
<f0ster> yes not inheritance
<Hanmac> kaneda^: with extend you can add a module into an object directly without needing a class
<banisterfiend> kaneda^: it's not really inheritance, but it's very similar
mockra has joined #ruby
IrishGringo has joined #ruby
<kaneda^> ok
<banisterfiend> kaneda^: if you had used 'include' rather than 'extend' it's more or less equivalent to inheritance
<banisterfiend> but 'extend' is a bit different
<kaneda^> second question, what's the difference between "Proc.new { ... }" and "lambda { ... }"
<kaneda^> erm, what's the difference between "include" and "extend" then?
<banisterfiend> kaneda^: just slightly differnet behaviour, 'lambda' has method-like semantics
unflores has quit [Quit: unflores]
tangledhelix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<banisterfiend> and Proc has block-like semantics
<kaneda^> but they're used very similarly in the examples
<banisterfiend> yes, Proc.new/lambda are extremely similar
Neandre has joined #ruby
<banisterfiend> the different are often not that relevant in practice
<kaneda^> k, i'm used to lambda functions
<kaneda^> but what's the difference between "include" and "extend" then?
<banisterfiend> kaneda^: when you *extend* a module the methods become *class methods* (aka static methods) on the class
<banisterfiend> kaneda^: when you *include* a module they become just normal instance methods
<kaneda^> ooooh
<kaneda^> so if i have Math::cos or something, then when i extend i can just say "NewClass::cos"
<kaneda^> but if i include it then i can use cos without referencing Math
<banisterfiend> kaneda^: i'll show u an example
<kaneda^> to the main difference is that while extend does give a class all public methods/members it does not provide "super"
<josh_> banisterfiend, thanks for that! could you just walk me through what that is doing? sorry to be a pain :(
mockra has quit [Ping timeout: 256 seconds]
<Hanmac> there is also an prepend that works like include but addes itself before the class and not after like include
<f0ster> kaneda^: well yeah and all the other things you get with inheritance besides 'super' :p
<kaneda^> Hanmac, let's not go crazy ;)
<josh_> an array of arrays
<kaneda^> f0ster, erm, but all you get through inheritance is super, methods, and members?
<josh_> oki like it :)
<kaneda^> it seems to provide 2/3
<banisterfiend> kaneda^: no
<banisterfiend> kaneda^: you get everything when you include a module that you'd get when you inherit a class
<banisterfiend> the only difference is you dont get class methods when you include a module
<Hanmac> kaneda^: extended modules can provide super too
heliumsocket has joined #ruby
<banisterfiend> kaneda^: but really you have to start talking about 'include' rather than 'extend'
<kaneda^> hmm, too flexible, let's talk about the best practice/common use case
<banisterfiend> it's *include* that's analogous to inheritance not 'extend' (when invoked in a class definition)
madb055 has quit [Ping timeout: 276 seconds]
<kaneda^> hmm, all except "super" yes?
freerobby has joined #ruby
<banisterfiend> kaneda^: no, u get super
<banisterfiend> kaneda^: i dont know where u got that idea :)
<josh_> banisterfiend, how could I search that array of arrays
<Hanmac> banisterfiend: have you thought about prepending to a singleton_class of an object? ;P its earlier in the ancestors than the singleton methods too ;P
<kaneda^> cant you include more than one class?
veinofstars has joined #ruby
<banisterfiend> kaneda^: you're not including classes, u're including modules, and yes you can include as many as you want
<banisterfiend> kaneda^: the ancestor chain is resolved dynamically,
<kaneda^> banisterfiend, so then what does "super" refer to?
<josh_> to print a particular array f the number is bigger than X?
<kaneda^> ahhh
pyrac has joined #ruby
<banisterfiend> kaneda^: it refers to the class/module that's above it in the ancestor chain
<Hanmac> super refers to the next in the chain
<banisterfiend> kaneda^: type: MyClass.ancestors to see
<kaneda^> banisterfiend, if i have two, does it figure out which one i'm referring to based on the method?
kofno has joined #ruby
<banisterfiend> kaneda^: i dont know what you mean
<banisterfiend> kaneda^: you need to read a book ;)
<banisterfiend> this is basic stuff that will be covered in a chapter on the ruby object model
<kaneda^> banisterfiend, if i include two modules, to which does super refer?
<banisterfiend> kaneda^: the most recently included one
<kaneda^> this was my question ;p
<banisterfiend> the most recently included module is put directly above the current class
madb055 has joined #ruby
<kaneda^> and if you could suggest a good resource i'd happily read it
<banisterfiend> the module included prior to that is set as the super to that one
<kaneda^> i'm doing code academy right now -_-
<banisterfiend> kaneda^: "the ruby programming language" book
<kaneda^> oooh, interesting
<kaneda^> so it creates a chain of inheritance for each module you include
<banisterfiend> it doesn't create it
<josh_> How could I parse this: [["box1", 717.0181208808299], ["box2", 933.1672666646361], ["box3", 160.19343810497668]] to print a particular array if the number is over X?
<banisterfiend> it modifies the ancestor chain
<banisterfiend> josh_: use Enumerable#select or Enumerable#find
lurker has joined #ruby
<josh_> thx banisterfiend I will have a look, apologies new to ruby
<banisterfiend> josh_: [["box1", 717.0181208808299], ["box2", 933.1672666646361], ["box3", 160.19343810497668]].select { |a, b| b > X }
katherin1m13 has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
akashj87 has quit [Read error: Connection reset by peer]
katherin1m13 is now known as katherinem13_
akashj87 has joined #ruby
anderse has joined #ruby
tzanger has joined #ruby
sepp2k has joined #ruby
tzanger has left #ruby [#ruby]
br4ndon has quit [Ping timeout: 276 seconds]
Iszak has quit [Quit: Computer has gone to sleep.]
kaneda^ has left #ruby ["Leaving"]
skattyadz has quit [Quit: skattyadz]
Iszak has joined #ruby
Rym__ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Neandre has quit [Remote host closed the connection]
Rym___ has joined #ruby
Rym has quit [Ping timeout: 245 seconds]
Rym___ is now known as Rym
<josh_> if I have a value ,v, in seconds, how can I turn that into minutes? :D
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
<banisterfiend> josh_: haha are you serious?
<josh_> no it's ok :(
<banisterfiend> josh_: you many seconds are in a minute? :)
<josh_> but thank you for our help!
<banisterfiend> how*
<josh_> ah of course
<josh_> wasn't sure if there is a method already in ruby to do it
<josh_> :)
Rym__ has quit [Ping timeout: 258 seconds]
<MrZYX> there is
skattyadz has joined #ruby
<josh_> ^^
<MrZYX> it's called #/()
bhaarat has quit [Quit: bhaarat]
Davey has joined #ruby
<josh_> it may go more than 24 hours ..
mockra has joined #ruby
freerobby has quit [Quit: Leaving.]
kofno has quit [Ping timeout: 255 seconds]
dummies_freelanc has joined #ruby
arya_ has joined #ruby
graeme has quit [Quit: graeme]
anderse has quit [Quit: anderse]
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
tdecs has quit [Remote host closed the connection]
elux has joined #ruby
etcetera has joined #ruby
<banisterfiend> Hanmac: too complicated for me to follow right now ;)
etcetera has quit [Client Quit]
<banisterfiend> maybe you could summarize what u discovered
arya has quit [Ping timeout: 248 seconds]
mockra has quit [Ping timeout: 256 seconds]
<Hanmac> banisterfiend: it shows the ancestors tree in methods ... and that an module, prepended into the singleton_class are very difficult to overwritten :P
daidoji has joined #ruby
chandankumar has joined #ruby
daidoji has quit [Client Quit]
katherinem13 has quit [Remote host closed the connection]
sailias has joined #ruby
Matip has joined #ruby
chessguy has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
danneu has quit [Ping timeout: 252 seconds]
baphled_ has joined #ruby
chandankumar has quit [Remote host closed the connection]
Mattx has quit [Ping timeout: 245 seconds]
arya has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
atno has joined #ruby
thone_ has joined #ruby
thone has quit [Ping timeout: 245 seconds]
tenmilestereo has quit [Read error: Connection reset by peer]
bulkan has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
mklappstuhl has quit [Ping timeout: 245 seconds]
Rym__ has joined #ruby
chandankumar has joined #ruby
pedda has joined #ruby
arya has joined #ruby
pandawarrior1 has quit [Quit: Leaving.]
arya_ has joined #ruby
generali_ has joined #ruby
Rym has quit [Ping timeout: 260 seconds]
Rym__ is now known as Rym
aspiers has joined #ruby
kelabot has joined #ruby
chipotle has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mockra has joined #ruby
billy_ran_away has left #ruby ["Textual IRC Client: www.textualapp.com"]
stacky has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
adkron has joined #ruby
mikecmpbll has joined #ruby
mercwithamouth has joined #ruby
mockra has quit [Ping timeout: 258 seconds]
niceguy1234 has joined #ruby
etcetera has joined #ruby
robscomputer has joined #ruby
lktp has joined #ruby
robscomputer has quit [Remote host closed the connection]
tommyvyo has joined #ruby
mklappstuhl has joined #ruby
robscomputer has joined #ruby
maligree has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
angusiguess has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
ARCADIVS has quit [Quit: WeeChat 0.3.8]
backjlack has joined #ruby
ehellman has quit []
JohnBat26 has joined #ruby
arya has joined #ruby
style has joined #ruby
nari has joined #ruby
<style> hello
<style> i need some help because i'm playing a little with ruby and open ssl.... not familiar with crypting stuff - does is see it right, that i have to store the initialisation vector for decrypting things?
chipotle has quit [Quit: cya]
nezumi has quit [Ping timeout: 248 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
aarush has joined #ruby
peta_ has quit [Quit: peta_]
carloslopes has joined #ruby
<aarush> hi
kofno has joined #ruby
jpfuentes2 has joined #ruby
aarush has left #ruby [#ruby]
katherinem13_ is now known as katherinem13
mockra has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
Proshot has joined #ruby
tommyvyo has quit [Quit:]
thams has joined #ruby
mityaz has quit [Quit: See ya!]
mockra has quit [Ping timeout: 252 seconds]
rolton has quit [Ping timeout: 258 seconds]
Ankhers has joined #ruby
rolton has joined #ruby
br4ndon has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
bhaarat has joined #ruby
Assurbanipal has joined #ruby
codespectator has joined #ruby
thone has joined #ruby
pandawarrior1 has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
dhruvasagar has joined #ruby
etcetera has quit []
thone_ has quit [Ping timeout: 256 seconds]
tobyo has joined #ruby
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
Banistergalaxy has joined #ruby
feedbackloop_ has joined #ruby
feedbackloop has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
thams has quit [Quit: thams]
hach has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
nwertman has quit [Ping timeout: 255 seconds]
nwertman has joined #ruby
freakazoid0223 has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
iamjarvo has joined #ruby
tommyvyo has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
rolton has quit [Ping timeout: 258 seconds]
GeissT has quit [Quit: MillBroChat AdIRC User]
ariedler has joined #ruby
tommyvyo has quit [Client Quit]
snuglepuss has joined #ruby
ehellman has joined #ruby
style has quit [Ping timeout: 256 seconds]
aspiers has quit [Quit: WeeChat 0.4.1-dev]
arya has quit [Ping timeout: 248 seconds]
aspiers has joined #ruby
sixEch0_ has joined #ruby
mockra has joined #ruby
Xeago_ has joined #ruby
etcetera has joined #ruby
nari has quit [Ping timeout: 256 seconds]
yacks has joined #ruby
<josh_> ey guys, got this script working OK: https://gist.github.com/joshmyers/26c96585f128d52a72b6 but rather than 2329323 seconds, how can I get to 1d 20 h 14m 20s ??
<josh_> or something similar?
mockra has quit [Ping timeout: 248 seconds]
dummies_freelanc has quit [Read error: Connection reset by peer]
kleinerdrache has quit [Ping timeout: 264 seconds]
freeayu has quit [Remote host closed the connection]
dr_bob has joined #ruby
wallerdev has joined #ruby
arya has joined #ruby
anildigitl is now known as anildigital
carloslopes has quit [Remote host closed the connection]
anildigital has quit [Changing host]
anildigital has joined #ruby
dhruvasagar has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
chessguy has quit [Ping timeout: 256 seconds]
sixEch0_ has left #ruby [#ruby]
knapper_tech has joined #ruby
mneorr_ has joined #ruby
heliumsocket has joined #ruby
j0hnnY has left #ruby [#ruby]
mneorr has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 258 seconds]
kleinerdrache has joined #ruby
maxmanders has joined #ruby
arya has quit [Ping timeout: 248 seconds]
volte has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 255 seconds]
nari has joined #ruby
<josh_> thx tobiasvl
arya has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
sylvinus has joined #ruby
hiroyuki has joined #ruby
Davey has joined #ruby
volte has joined #ruby
lurker has left #ruby [#ruby]
wallerdev has quit [Quit: wallerdev]
arya has quit [Ping timeout: 248 seconds]
<Vivekananda> Helloo everyone. Where am I erring in this -- https://gist.github.com/anonymous/cf8bc78d153ead6e539d
mockra has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
nari has quit [Ping timeout: 246 seconds]
ephemerian has joined #ruby
rickruby has quit [Remote host closed the connection]
<MrZYX> Vivekananda: yield [x, y] instead of building a temporary array and never returning it
<Hanmac> Vivekananda:
<Hanmac> >> [:a,:b ].product([4,5])
<eval-in> Hanmac => [[:a, 4], [:a, 5], [:b, 4], [:b, 5]] (http://eval.in/16345)
<MrZYX> Vivekananda: I'm also unsure what the purpose of line 10 would be
arya has joined #ruby
<tobiasvl> MrZYX: it is returned
<tobiasvl> ah
<tobiasvl> but with the symbols
<tobiasvl> yeah, Vivekananda it's weird to have an iterator that doesn't actually yield, isn't it
mockra has quit [Ping timeout: 256 seconds]
<MrZYX> Vivekananda: and lastly if you want to get rid of nil values in an array just call compact on it
<josh_> using this code https://gist.github.com/joshmyers/8672c4fc26d502ae9b80, how could I drop certain "boxs'" from being map'd into the checkins array? say if it matches /box3/ regex it doesnt get put into checkins array
ariedler has quit [Remote host closed the connection]
arya has quit [Client Quit]
<Vivekananda> MrZYX: thanks. The question is to write an each iterator itself and return the product and also return nil if one of the arguments is empty
<MrZYX> then just guard that away
<Vivekananda> Hanmac: I have to not use any built in methods :)
<MrZYX> return if @value1.empty? || @value2.empty?
<tobiasvl> josh_: reject?
<josh_> hmm
<MrZYX> Vivekananda: and in the constructor @value1 = value1.compact; @value2 = value2.compact
basex has quit [Quit: basex]
<Vivekananda> MrZYX: Dont we need line 10 so that the ivar is visible to other methods. ( a little confused with java :()
<MrZYX> nope
<MrZYX> the @ is making it visible to all methods of the class
<MrZYX> no declaration needed
<Vivekananda> MrZYX: thanks. so all I need to change is add return to the if block right ?
<Vivekananda> and remove the line 10
<tobiasvl> no Vivekananda
arya has joined #ruby
<tobiasvl> you don't want to return anything
<tobiasvl> you want to yield it to the block
<MrZYX> Vivekananda: maybe read all my answers again :)
<kalleth> trying to do a gem install middleman but nothing happens... when I run gem install --debug middleman i get lots of OpenSSL::SSL::SSLError - read would block messages
<Vivekananda> MrZYX: yep reading
<kalleth> i'm using ruby 2.0
<kalleth> i've installed openssl using apt on debian
momomomomo has joined #ruby
<Vivekananda> MrZYX: you metioned to use yield and so did tobiasvl . Does it mean that return will be incorrect ? I dont know how yield responds to a block
<waxjar> so read up on yield :)
<MrZYX> you know what a block is by now?
mikecmpbll has quit [Quit: Computer has gone to sleep.]
security is now known as megha
<tobiasvl> Vivekananda: i think this is exactly what they want you to learn in that exercise ;)
chessguy has joined #ruby
<kalleth> Exception `Errno::ENOENT' at /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/remote_fetcher.rb:296 - No such file or directory - /home/vagrant/.gem/specs/rubygems.org%443/latest_specs.4.8
<kalleth> that doesn't look right
<Vivekananda> MrZYX: I do but I never used it so forgot. just read an overview
<Vivekananda> block and yield
<Vivekananda> hmmm. But my question is what is wrong with returning things. I understand that block and yield are all very great stalwarts
<tobiasvl> well they do different things
<Vivekananda> let me try ruby monks again then
<tobiasvl> return returns something FROM the each method and to the place where it was called
<tobiasvl> so the value of the call `c.each { |elt| puts elt.inspect }` becomes the return value from inside each
<dr_bob> Vivekananda, if you call a method #each then the expectation of the user is that it will yield values to a block passed. If no block is passed then one typically returns to_enum(:each) in order to allow for later iteration.
v0n has joined #ruby
mikecmpbll has joined #ruby
<dr_bob> The return value of #each is by convention self.
etcetera has quit [Ping timeout: 255 seconds]
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
bhaarat has quit [Quit: bhaarat]
chessguy has quit [Ping timeout: 258 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
ZachBeta has joined #ruby
jpfuentes2 has joined #ruby
chessguy has joined #ruby
etcetera has joined #ruby
arya_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
tk_ has quit [Quit: ばいばい]
wallerdev has joined #ruby
chandankumar has quit [Quit: Leaving]
arya has joined #ruby
banisterfiend has joined #ruby
Amnesthesia has joined #ruby
rickruby has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
chrishunt has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mockra has joined #ruby
<Vivekananda> tobiasvl: so when the return returns in my code does it not return each element of the expected array like [:a , 4] then [:a , 5] et c...
SCommette has joined #ruby
etcetera has quit [Ping timeout: 276 seconds]
<MrZYX> no, return stops the method right there, and again, return is what comes out of the method, i.e. var = method, return specifies what will be in var, yield calls the passed block, i.e. method {|var| ... }, var will be the argument passed to yield
etcetera has joined #ruby
arya has quit [Ping timeout: 264 seconds]
<MrZYX> think of it as yield inserts the code that is passed via the block into your method
arya has joined #ruby
mockra has quit [Ping timeout: 264 seconds]
<Vivekananda> also when tryiing return I got [:a , :b ] as the returned value I wonder why
<MrZYX> uhm
<Apathetic> who wants a http://justpaste.me/view/3j
<MrZYX> because you return it?
roz has joined #ruby
basex has joined #ruby
ehellman has quit []
danneu has joined #ruby
anderse has joined #ruby
bradhe has joined #ruby
rolton has joined #ruby
etcetera has quit []
katherinem13 has quit [Quit: leaving]
katherinem13 has joined #ruby
mercwithamouth has joined #ruby
marcdel has joined #ruby
Apathetic has quit [Ping timeout: 255 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
chandankumar has joined #ruby
tommyvyo has joined #ruby
geggam has quit [Quit: Leaving]
etcetera has joined #ruby
katherinem13 has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
hogeo has quit [Remote host closed the connection]
katherinem13 has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
osvico has joined #ruby
etcetera has quit [Client Quit]
<Vivekananda> MrZYX: no I meant that since the code stops at the return it means it should just do one loop iteration and then come out. but here I am getting two values out. I wonder why
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
apeiros has joined #ruby
<MrZYX> what's your return statement?
hogeo has joined #ruby
Ontolog has joined #ruby
ananthakumaran has joined #ruby
<tobiasvl> MrZYX: it IS one value.
<tobiasvl> it's an array containing the values :a and :b
<MrZYX> I know
<tobiasvl> oops
<tobiasvl> i mean Vivekananda
<tobiasvl> :)
<MrZYX> ;)
carloslopes has joined #ruby
Amnesthesia has quit [Remote host closed the connection]
danneu has quit [Quit: WeeChat 0.3.8]
Ontolog has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
Opettaja has joined #ruby
arya_ has joined #ruby
katherin1m13 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
katherinem13 has quit [Quit: leaving]
yankeefan04 has joined #ruby
katherin1m13 is now known as katherinem13
katherin1m13 has joined #ruby
katherinem13 has quit [Client Quit]
yankeefan04 has quit [Remote host closed the connection]
yankeefan04 has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
mockra has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
katherin1m13 is now known as katherinem13
chessguy has quit [Remote host closed the connection]
redgetan has joined #ruby
chessguy has joined #ruby
moos3 has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
mockra has quit [Ping timeout: 255 seconds]
tangledhelix has joined #ruby
Czupa has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
arya has joined #ruby
IceDragon has joined #ruby
SCommette has quit [Quit: SCommette]
jgrevich has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
pothibo has quit [Quit: pothibo]
arya_ has quit [Ping timeout: 248 seconds]
chessguy has quit [Ping timeout: 256 seconds]
hogeo has quit [Remote host closed the connection]
chessguy has joined #ruby
roz has quit [Ping timeout: 258 seconds]
_maes_ has joined #ruby
banisterfiend has quit [Remote host closed the connection]
Davey has joined #ruby
xlab_ has quit []
tangledhelix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Xlab has joined #ruby
hrs has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
pyrac has quit [Quit: pyrac]
chrishunt has quit [Read error: Connection reset by peer]
<shevy> guys
<shevy> what do you use for parsing commandline options?
strtok has left #ruby [#ruby]
psyprus has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
chrishunt has joined #ruby
arya has joined #ruby
bradhe has quit [Remote host closed the connection]
<Xeago> apeiros: I am back in platinum w/l ratio: 0.2
pyrac has joined #ruby
crodas has quit [Ping timeout: 252 seconds]
security has joined #ruby
kelabot has quit [Remote host closed the connection]
chandankumar has quit [Read error: Connection reset by peer]
bigmac has quit [Quit: Leaving]
megha has quit [Ping timeout: 264 seconds]
pedda has quit [Ping timeout: 252 seconds]
alexwh has joined #ruby
ariedler has joined #ruby
mockra has joined #ruby
hach has quit [Ping timeout: 260 seconds]
browndawg has quit [Quit: Leaving.]
redgetan has quit [Quit: Leaving]
mockra has quit [Ping timeout: 248 seconds]
Dreamer3 has joined #ruby
busybox42 has quit [Ping timeout: 264 seconds]
redgetan has joined #ruby
anderse has quit [Ping timeout: 240 seconds]
tjbiddle has joined #ruby
psyprus has joined #ruby
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Yakko has quit [Ping timeout: 255 seconds]
maxmanders has joined #ruby
bhaarat has joined #ruby
tjbiddle has quit [Remote host closed the connection]
jrajav has joined #ruby
hrs has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
busybox42 has joined #ruby
akashj87 has quit [Quit: nn]
banisterfiend has joined #ruby
mahmoudimus has joined #ruby
eldariof has joined #ruby
<ryanf> shevy: in practice, slop
<ryanf> trollop seems good but I've never used it for anything
<ryanf> or optparse I guess
bradhe has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
subbyyy has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
apeiros has quit [Remote host closed the connection]
mockra has joined #ruby
LS\MFT has joined #ruby
crodas has joined #ruby
dmiller has joined #ruby
kofno has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
hach has joined #ruby
Lemtzas has quit [Ping timeout: 264 seconds]
peta_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 258 seconds]
eka has joined #ruby
kofno has quit [Ping timeout: 260 seconds]
chandankumar has joined #ruby
Davey has joined #ruby
codespectator has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
moos3 has joined #ruby
linusoleander has joined #ruby
canton7 has joined #ruby
chessguy has quit [Remote host closed the connection]
<TTilus> shevy: trollop
<linusoleander> How would one select 5 items from a list (with n items) with a uniform distribution?
moos3 has quit [Client Quit]
hamakn has quit [Remote host closed the connection]
pandawarrior1 has quit [Quit: Leaving.]
<linusoleander> TTilus: I don't want to pick items with a uniform dist. not just items at random
ariedler has quit [Ping timeout: 252 seconds]
<tobiasvl> step
<linusoleander> Sorry, that should be the opposite, i want to pick items with a uniform diet.
<linusoleander> *dist
<TTilus> linusoleander: aww, whats the diffecence of "uniform distribution" and "at random"?
<tobiasvl> linusoleander: step
<linusoleander> tobiasvl: Suffle the list and then just pick the first 5 items?
chessguy has joined #ruby
<tobiasvl> no... that would be random
<tobiasvl> which you said you didn't want
Lemtzas has joined #ruby
<tobiasvl> i think you want step
<linusoleander> tobiasvl: Care to explain?
<tobiasvl> i don't know if i can explain it better than google can
<TTilus> someone care to explain me the diffecence between "with a uniform distribution" and "at random"
<Vivekananda> does this make any sense. tobiasvl I really would like to use return to get to my result and they try using yield and all those bells and whistles
<tobiasvl> TTilus: i interpret it as "every nth item"
Guest1361 has joined #ruby
<Guest1361> ruby is insecure.
<marwinism> What?
<TTilus> most definitely
<tobiasvl> ignore Guest1361, he's here every day spewing nonsense
<marwinism> Guest1361: And you say that based on?
<marwinism> tobiasvl: ah :)
<Guest1361> On facts.
<tobiasvl> Vivekananda: does it look like it works based on the rspec output on the bottom?
<linusoleander> TTilus: The problem is that I want to select 5 items for a list, each item should be able to be selected with the same probability.
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<TTilus> linusoleander: arr.sample(5)
<linusoleander> If I select 5 items 5 times then the 5th item will have a much higher prop. to be selected than the first one
<Guest1361> shit.
<marwinism> Guest1361: You don't have facts. Poor trolling. This is a fact: Nothing is as insecure as the nibwit that wrote it..
<Guest1361> FUCK!
Guest1361 has quit [Quit: a]
elux has quit [Quit: Leaving...]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<tobiasvl> Vivekananda: why exactly don't you want to use yield when you're making a yielding enumerator?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<TTilus> linusoleander: where were you during statistics classes?
<hashmal> this was the least talented troll I have ever seen
vlad_starkov has joined #ruby
<Vivekananda> tobiasvl: for the simple reason that I am new to ruby and I will try to use basic constructs to answer questions and then go on to higher levels. if return can return an array then I can use it.
ZachBeta has joined #ruby
<linusoleander> TTilus: I'm taking one now at master level. Why, did I miss something?
<MrZYX> Vivekananda: yield is a basic construct in ruby, one of the few keywords
<MrZYX> also didn't we talk already about line 3?
<Vivekananda> also on running in pry for inputs : car
<Vivekananda> I get as a result : [[:a, 4], [:a, 5], [:b, 4], [:b, 5], [:c, 4], [:c, 5]]
<Vivekananda> => #<CartesianProduct:0xa45dfbc @value1=[:a, :b, :c], @value2=[4, 5]>
<TTilus> linusoleander: reduce the case and rethink, say you have arr = [:a, :b] and pick 2 elements at random
tenmilestereo has joined #ruby
<TTilus> linusoleander: whats the possibility of the first and the last to be picked
keymone_ has joined #ruby
ZachBeta has quit [Client Quit]
<TTilus> linusoleander: is the last greater than the first
<linusoleander> TTilus: How many times I'm I allowed to pick itmes?
<tobiasvl> Vivekananda: that's strange, i get NoMethodError: undefined method `<<' for nil:NilClass
<tobiasvl> :)
<TTilus> linusoleander: you have two and you pick two
<MrZYX> oh, () is nil, interesting
ariedler has joined #ruby
<linusoleander> That's the problem.
<linusoleander> I'll give you an example
<MrZYX> I kinda expected a syntax error
hogeo has joined #ruby
<Vivekananda> tobiasvl: let me try and paste again
HelenCrowley has joined #ruby
chandankumar has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 256 seconds]
LS\MFT has quit [Read error: Connection reset by peer]
<TTilus> linusoleander: the most important point is: is the distribution uniform
<linusoleander> If you have 52 cards in one deck and want to pick 5 cards you can't pick 1 card 5 times at random. The last card would then have a 10% of being picked (1/52 + 1/51 …), when the first one had 1.9%, is there for not uniformed distributed.
adamjleonard has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
BizarreCake has quit [Ping timeout: 252 seconds]
eka has joined #ruby
HelenCrowley is now known as LS-MFT
eka has quit [Client Quit]
<TTilus> linusoleander: you are still not considering the whole experiment
<linusoleander> TTilus: What do you mean?
hogeo has quit [Ping timeout: 256 seconds]
<TTilus> linusoleander: for first pic, prob is 1/52, for the next it is (considering the whole sampling experiment) that they were _not_ picked at first _and_ were picked second
rickruby has quit [Remote host closed the connection]
<Vivekananda> tobiasvl: sorry for the code just change tempArray =() to tempArray = [] or use this https://gist.github.com/anonymous/4afbe1a24e9149868698
stef_204 has joined #ruby
apeiros has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<TTilus> linusoleander: first is 1/52, next (51/52) * (1/51), and the next (50/51)*(51/52)*(1/52), etc.
sylvinus has quit [Quit: sylvinus]
<TTilus> linusoleander: the distribution very much is uniform
sambio has joined #ruby
<MrZYX> Vivekananda: your assignment is to write an iterator, not a function that returns something, therefore you can't use return to accomplish it
banister_ has joined #ruby
nmeum has quit [Quit: WeeChat 0.4.1-dev]
droppedonmyhead has quit [Quit: droppedonmyhead]
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
adamjleonard has quit [Quit: Leaving...]
nmeum has joined #ruby
apeiros has quit [Remote host closed the connection]
jekotia has joined #ruby
<linusoleander> TTilus: I think you misunderstood me, but never mind
elux has joined #ruby
bradhe has quit [Remote host closed the connection]
<tobiasvl> Vivekananda: you can try handing that in and see if you pass, but your "each" method isn't an iterator like each methods usually are
cat-on-mah-keys has quit [Quit: Leaving]
<tobiasvl> so if people wanted to use your cartesian product class they'd have to call each.each to get an iterator :)
<linusoleander> TTilus: You're not allowed to pick the same number twice btw
brianherman has joined #ruby
dmiller_ has joined #ruby
moos3 has joined #ruby
carloslopes has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
dmiller_ has quit [Remote host closed the connection]
dmiller_ has joined #ruby
aderyabin has joined #ruby
dmiller has quit [Ping timeout: 258 seconds]
enriclluelles has quit [Read error: Connection reset by peer]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hiyakashi has joined #ruby
enriclluelles has joined #ruby
pedda has joined #ruby
k610 has quit [Ping timeout: 245 seconds]
nmeum has quit [Quit: WeeChat 0.4.1-dev]
nmeum has joined #ruby
nmeum has quit [Client Quit]
enriclluelles has quit [Read error: Connection reset by peer]
nmeum has joined #ruby
enriclluelles has joined #ruby
Proshot has quit [Quit: Leaving]
forced_request has joined #ruby
marcdel has quit []
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
Skofo has joined #ruby
<Xeago> tobiasvl: the difference between random and step would be the accuracy for low amounts of samples
Assurbanipal has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
kofno has joined #ruby
rickruby has joined #ruby
vlad_starkov has joined #ruby
carloslopes has joined #ruby
pyg has joined #ruby
aboudreault has quit [Ping timeout: 245 seconds]
pyg is now known as peteygao
peteygao is now known as peteyg
Sigma00 has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
kofno has quit [Ping timeout: 264 seconds]
Sigma00 has joined #ruby
rolton has quit [Ping timeout: 252 seconds]
pkill has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
cheese1756 has quit [Excess Flood]
sixEch0_ has joined #ruby
cheese1756 has joined #ruby
niceguy1234 has quit [Ping timeout: 245 seconds]
statarb3 has joined #ruby
yankeefan04 has quit [Read error: Connection reset by peer]
motto has joined #ruby
rickruby has quit [Ping timeout: 256 seconds]
aboudreault has joined #ruby
yankeefa_ has joined #ruby
m8 has quit [Ping timeout: 240 seconds]
wreckimnaked has joined #ruby
<josh_> argh, https://gist.github.com/joshmyers/e89808cbd31d7c7106b0 anyone help me with this? line 32 I want to interpolate the value v?
bhaarat has quit [Quit: bhaarat]
sambio has quit []
sixEch0_ has quit [Quit: sixEch0_]
<MrZYX> josh_: "#{k}: '#{seconds_to_units(v)'}" ?
<tobiasvl> sure you don't want to interpolate the value seconds_to_units(v)?
pyrac has joined #ruby
<josh_> MrZYX, nope :/
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
skattyadz has quit [Quit: skattyadz]
<tobiasvl> well then what's wrong?
<tobiasvl> what is it that doesn't work? you do interpolate v
niceguy1234 has joined #ruby
Ontolog has joined #ruby
<MrZYX> josh_: argh, had a typo in case you c&p'ed: "#{k}: '#{seconds_to_units(v)}'"
<josh_> i want toe value of v to use the seconds_tp_units method
<josh_> otherwise it's coming out like 34932844 seconds
Astral_ has joined #ruby
<tobiasvl> what you're saying doesn't make sense, but i think you want to do what MrZYX is saying...
statarb3 is now known as Proshot
beiter has joined #ruby
<josh_> MrZYX, perfect! :)
<josh_> thank you
Astral__ has joined #ruby
<MrZYX> you should really learn to recognize such typos...
<josh_> I realised it was a typo but wasnt sure of correct syntax
<josh_> thank you v muc for your help :)
<tobiasvl> then say that instead of "nope :/"
gyre007 has quit [Remote host closed the connection]
<tobiasvl> that makes us think it was the wrong approach
<josh_> apologies
<josh_> been a long day :)
huoxito has joined #ruby
Astralum has quit [Ping timeout: 256 seconds]
niceguy1234 has quit [Ping timeout: 260 seconds]
hamakn has joined #ruby
Astral_ has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
nmeum has quit [Quit: WeeChat 0.4.1-dev]
tdecs has joined #ruby
tdecs has quit [Remote host closed the connection]
nmeum has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
forlin has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
<shevy> josh_ DIE!
<shevy> oops sorry
<shevy> wrong idiom
<shevy> hi :)
<josh_> ...
<Hanmac> shevy you should look at my commits
<shevy> Hanmac I dont understand your code!!!
<Hanmac> the current new one is better
hach has quit [Ping timeout: 252 seconds]
Davey has joined #ruby
m8 has joined #ruby
LS-MFT has quit [Quit: Leaving]
motto has quit [Ping timeout: 256 seconds]
anderse has joined #ruby
skattyadz has joined #ruby
basex has quit [Quit: basex]
basex has joined #ruby
Matip has quit [Ping timeout: 260 seconds]
apod has joined #ruby
apod has quit [Remote host closed the connection]
basex has quit [Read error: Connection reset by peer]
bhaarat has joined #ruby
basex has joined #ruby
<shevy> I am still working on UnifiedColours
<shevy> UnifiedColours.disable_colours
nkts has joined #ruby
eldariof has quit []
arya has quit [Ping timeout: 248 seconds]
jinie has joined #ruby
bricker`LA has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
apeiros has joined #ruby
marcdel has joined #ruby
timonv has quit [Remote host closed the connection]
arya has joined #ruby
Rumsteak has quit [Quit: Rumsteak]
xlab_ has joined #ruby
jinie has quit [Quit: Textual IRC Client: www.textualapp.com]
Banistergalaxy has quit [Ping timeout: 258 seconds]
chessguy has quit [Remote host closed the connection]
callmeivan_ has joined #ruby
Xlab has quit [Ping timeout: 258 seconds]
s00pcan has quit [Read error: Connection reset by peer]
apeiros has quit [Ping timeout: 256 seconds]
s00pcan has joined #ruby
callmeivan__ has joined #ruby
callmeivan has quit [Ping timeout: 256 seconds]
enriclluelles has quit [Read error: Connection reset by peer]
f0ster has quit [Ping timeout: 245 seconds]
Thelostcircuit has joined #ruby
enriclluelles has joined #ruby
Beoran_ has joined #ruby
callmeivan__ is now known as callmeivan
balr0g has quit [Ping timeout: 245 seconds]
dekz__ has quit [Ping timeout: 245 seconds]
callmeivan_ has quit [Ping timeout: 252 seconds]
hach has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> Is the Ruby Logger ok, or should I rather use another one?
chessguy has joined #ruby
slainer68 has quit [Remote host closed the connection]
kofno has joined #ruby
Beoran__ has quit [Ping timeout: 255 seconds]
basex has quit [Quit: basex]
hiyakashi has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
grenierm has joined #ruby
maxmanders has joined #ruby
xlab_ has quit [Read error: Connection reset by peer]
grenierm_ has joined #ruby
Xlab has joined #ruby
vise890 has joined #ruby
brianpWins has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
rickruby has joined #ruby
Animawish has joined #ruby
pkrnj has joined #ruby
wreckimnaked has quit [Ping timeout: 248 seconds]
freannrak has joined #ruby
enriclluelles has quit [Read error: Connection reset by peer]
freannrak has left #ruby ["= Leaving"]
chrishunt has quit [Quit: ZzZzZz...]
grenierm has quit [Ping timeout: 258 seconds]
grenierm_ is now known as grenierm
enriclluelles has joined #ruby
adamjleonard has joined #ruby
rolton has joined #ruby
tethra has joined #ruby
chrishunt has joined #ruby
ultramoonie has joined #ruby
mockra has joined #ruby
nazty has quit [Read error: Connection reset by peer]
enriclluelles has quit [Read error: Connection reset by peer]
enriclluelles has joined #ruby
timmow_ has joined #ruby
ultramoonie is now known as hasaraka
rickruby has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
Lemtzas has quit [Ping timeout: 264 seconds]
linusoleander has quit [Quit: linusoleander]
iamjarvo has quit [Quit: Leaving.]
anderse has quit [Quit: anderse]
nmeum has quit [Quit: WeeChat 0.4.1-dev]
nmeum has joined #ruby
hasaraka has quit [Quit: Leaving]
thefishfromspace has joined #ruby
kleinerdrache has quit [Quit: Ex-Chat]
<thefishfromspace> how would you authorize an admin user? Would you check every logging in user if they are present in an "admin table" or would you perhpas hardcode the names? wut wuld u dou
enriclluelles has quit [Remote host closed the connection]
codenapper has joined #ruby
<tobiasvl> the former
unflores has joined #ruby
<tobiasvl> hardcoding is never a good idea
vise890 has quit [Remote host closed the connection]
allsystemsarego has quit [Quit: Leaving]
Skofo has quit [Remote host closed the connection]
Czupa has quit [Quit: Leaving]
cmarques has joined #ruby
bricker`1A has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
<thefishfromspace> it'd be easy for an attacker to just insert his/her username in that table, to take control over the server then.
dmiller_ has quit [Remote host closed the connection]
<shevy> then hardcode the values and praise yourself
niceguy1234 has joined #ruby
<thefishfromspace> shevy: that's an impulsive, reactive and non-reflecting attitude you have there. Say, are you a criminal?
<thefishfromspace> Anger problems?
answer_42 has quit [Quit: WeeChat 0.4.0]
<thefishfromspace> Do you beat your own mom... ?
<shevy> thefishfromspace you gave two options. someone else told you which one is better, then you instantly went to pick the other option
pkill has quit [Quit: leaving]
bricker`LA has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
rippa has joined #ruby
Opettaja has quit [Ping timeout: 264 seconds]
<thefishfromspace> shevy: You know. Hitler saw things that way. In black and white. He never concidered options. And his followers, they never questioned authority - which is essential to make better decisions. One should always ask: why, what if, how about, is? and so forth.
elux has quit [Quit: Leaving...]
emmanuelux has joined #ruby
<shevy> thefishfromspace I don't care about your idols man
<thefishfromspace> shevy: people like you sir, are the reason why we've had wars, and why there has been a dark ages of christianity.
<pskosinski> thefishfromspace: Why it would be easy to insert by attacker credentials to that table...? If your app is well written he won't have such possibility. And if he have access to server itself he can also read source code of app…
<shevy> thefishfromspace I think you have some really weird ideas in your head. please don't ever buy a weapon
<thefishfromspace> shevy: that's right. You don't care, because you're _ignorant_. Conservatist. You don't develop.
<pskosinski> Assuming that database is on same machine…
rolton has quit [Ping timeout: 264 seconds]
<shevy> thefishfromspace all there is in your head man, it's a whole universe!
<shevy> thefishfromspace remember - hardcoded values make your system totally secure
emmanuelux has quit [Max SendQ exceeded]
sepp2k has quit [Quit: Leaving.]
<thefishfromspace> pskosinski: SQL injections would be one way. But you can protect yourself against them. Question is though, which one is safer: code or database
<waxjar> lol, what the hell
<pskosinski> Use prepared statements/bind vars and you won't have problem with SQL Injection.
<thefishfromspace> shevy: protecting your ego with bladdering won't make you any more experienced.
<shevy> thefishfromspace hey now it gets interesting, let's see how you counter pskosinski now
<thefishfromspace> pskosinski: that's what I' intending to do.
iamjarvo has joined #ruby
<pskosinski> Bad configured server can leak code too, e.g. in case of error… I don't know what is better, I wouldn't hardcode credentials either ^^
<waxjar> i think this is the quickest application Godwin's Law I've seen so far
<waxjar> *of
<thefishfromspace> pskosinski: would you make a separate table for admins?
<thefishfromspace> such as "admin users"
<pskosinski> ask channel. ;P
<shevy> man don't leave him alone now
<shevy> he asked you :(
stoicsquirrel has joined #ruby
<pskosinski> I don't have big experience…
<shevy> do you think he has? :P
<thefishfromspace> shevy: I learned _why_ I shouldn't hardcode credentials today. How many _why_s have you learned this (ten) whole year?
<pskosinski> For sure some people here have much bigger experience than me ;)
tylersmith has joined #ruby
adamjleonard has quit [Quit: Leaving...]
<shevy> thefishfromspace from whom did you learn this?
<thefishfromspace> not you, not hitler, but from pskosinski.
apeiros has joined #ruby
<pskosinski> Assuming that your app is not printing SQL statements in case of error it doesn't matter if you have admin credentials in same table as users…
<pskosinski> Oh wait.
<shevy> thefishfromspace ey, but when pskosinski said to not hardcode values, that was also what tobiasvl told you, so why do you ignore tobiasvl but not pskosinski
aderyabin has quit [Ping timeout: 258 seconds]
tylersmith has quit [Client Quit]
<pskosinski> I personally would make separate table for admins just to not add one more field for "roles" to table of users, but I have what is more secure…
<pskosinski> but I don't know what is … *
<thefishfromspace> shevy: tobiasvl didn't tell me why. And you, with your nazi indoctorine (or pathalogically authorizing parents), got crazy :o
pioz has joined #ruby
<thefishfromspace> shevy: .. when I asked why, your nazi-senses got mad
<shevy> tobiasvl you should have told him why :(
<thefishfromspace> shevy: you might not realize it yourself, you're pretty stupid. A dunning-kruger irony
Opettaja has joined #ruby
<thefishfromspace> shevy: or just a kid..
brianpWins has quit [Quit: brianpWins]
<pskosinski> Shake hands or something
pioz has quit [Client Quit]
graeme has joined #ruby
axxT has quit [Ping timeout: 264 seconds]
<banisterfiend> thefishfromspace: relax
huoxito has quit [Quit: Leaving]
nateberkopec has joined #ruby
thone_ has joined #ruby
<thefishfromspace> some people typ, and then reflect. This guy seem to talk, and then not reflect. He needs a lesson for his own good.
<unstable> There is this one enviromental variable I can't seem to get access to. ENV['HOME'] outputs "/home/john", other variables output also. Though ENV['GOOGLE_API_KEY'] doesn't output anything. I have the variable set in my .bashrc file. If I do "echo $GOOGLE_API_KEY" on bash, it gives me the key. Does ENV only access environmental variables from certain places only?
motto has joined #ruby
<tobiasvl> thefishfromspace: well this is a ruby channel. do we really have to be able to tell you why you shouldn't hardcode values but store them in a database?
<banisterfiend> thefishfromspace: he's a fool, it's true, so just ignore him, stop raging :)
yankeefa_ has quit [Remote host closed the connection]
<waxjar> shevy the nazi, has a ring to it :P
<tobiasvl> <thefishfromspace> it'd be easy for an attacker to just insert his/her username in that table, to take control over the server then.
<tobiasvl> if it's EASY to hack your database
<tobiasvl> then you have bigger problems
m8 has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
heliumsocket has joined #ruby
Opettaja has quit [Quit: WeeChat 0.4.0]
thone has quit [Ping timeout: 255 seconds]
pyrac has quit [Quit: pyrac]
<waxjar> unstable, are you sure the shell you run your ruby script in has the environment variable set?
<tobiasvl> thefishfromspace: here's a guide for you: http://drupal.org/node/1052556
<thefishfromspace> thnx
<tobiasvl> a nice quote: "The temptation to hardcode happens to the best of us - that's why even the best of us are at risk of being burned by it."
<thefishfromspace> (see, asking why IS good)
<unstable> waxjar: I only use a bash shell to my knowledge. All my shell setting are default, I'm using the latest ubuntu.
skattyadz has quit [Quit: skattyadz]
<unstable> waxjar: Interestingly, if I export the key first.. then when I go to pry/irb.. I can do env['GOOGLE_APIKEY'] and it works fine.
anachronistic has joined #ruby
<pskosinski> thefishfromspace: + If you would hardcode credentials then you could have problem with changing them without restarting app…
<waxjar> yes, you have to set it prior to running the script
sepp2k has joined #ruby
chandankumar has joined #ruby
<unstable> waxjar: It is set when the shell is initialized, since it reads .bashrc; I know it's set in the shell because I can close all the shells, starts a new one.. then do 'echo $GOOGLE_API_KEY' and it works fine. It's set in my ~/.bashrc
Opettaja has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
<waxjar> unstable: i understand. but are you also running your ruby script in a fresh shell?
<waxjar> in my experience that's often the culprit :P
nateberkopec has quit [Quit: Leaving...]
<unstable> waxjar: I'm not trying to run a script right now, I'm just starting pry and running ENV to see it's output.
<unstable> [2] pry(main)> ENV['PATH']
<unstable> => "/home/john/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/john/.rbenv/versions/2.0.0-p0/bin:/home/john/bin"
<unstable> As a side note, I also set my rbenv bin directory inside my ~/.bashrc, one line above my google key.
<unstable> ENV returns my changed $PATH fine.
<waxjar> strange.
<unstable> [2] pry(main)> ENV['GOOGLE_API_KEY'] gives me nil
<unstable> Unless I export before running the script, or doing the above ENV command in pry.
Adr1an00 has joined #ruby
<unstable> yea, really strange.
xlab_ has joined #ruby
<unstable> maybe it's the underscores it doesn't like
* unstable shrugs, worth a shot.
<waxjar> nah, underscores are fine
ckrailo has joined #ruby
ariedler has quit [Remote host closed the connection]
<banisterfiend> unstable: you can use clipit/gist commands in pry instead rather than having to copy/paste
chessguy has quit [Remote host closed the connection]
Xlab has quit [Ping timeout: 276 seconds]
nkr has quit [Quit: Linkinus - http://linkinus.com]
marr has joined #ruby
tommyvyo has quit [Quit:]
thefishfromspace has left #ruby [#ruby]
stacky has joined #ruby
beneggett has joined #ruby
SCommette has joined #ruby
ariedler has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
gyre007 has joined #ruby
kofno has joined #ruby
brianpWins has quit [Quit: brianpWins]
eka has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ntzrmtthihu777 has joined #ruby
chandankumar has quit [Quit: Leaving]
tomsthumb has quit [Quit: Leaving.]
slainer68 has joined #ruby
<ntzrmtthihu777> can anyone point me at a working version of rubyscript2exe for 1.9.3? all my googling has failed, and I've been at it for a few hours
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> ntzrmtthihu777: didnt we tell you that rubyscript2exe is outdated and that you should use orca?
gyre007 has quit [Ping timeout: 256 seconds]
sambao21 has joined #ruby
kofno has quit [Ping timeout: 256 seconds]
skattyadz has joined #ruby
<ntzrmtthihu777> Hanmac: no, but you did suggest it. But my reading of orca seems to imply it only operates under windows, am I mistaken in this?
Skofo has joined #ruby
linusoleander has joined #ruby
<Hanmac> it may also work with mingw
nateberkopec has joined #ruby
<ntzrmtthihu777> not looking for may work, looking for does work, lol.
heliumsocket has quit [Quit: heliumsocket]
<Hanmac> than answer for you: rubyscript2exe does definitely not work on recent ruby
<tomzx_mac> ntzrmtthihu777: how about a jruby .jar?
<ntzrmtthihu777> tomzx_mac: trying to avoid having the end user need to do anything particularly fancy.
heliumsocket has joined #ruby
<Hanmac> everyone seems to want bytecode ruby or precompiled gems, and THEN they wonder why it does not work on ther system ...
pyrac has joined #ruby
<Hanmac> maybe its such a hype like everyone wants into the Cloud ... they dont know why, and whey dont understand why its not so an good idea for what they want, but they wants into the cloud because everyone is in the cloud ...
<Hanmac> stupid sheeple ...
<Xeago> Hanmac: that is what they say
<tomzx_mac> ntzrmtthihu777: what about ocra? ocra.rubyforge.org
<Xeago> I've seen companies call it private cloud
<Xeago> 3 servers, 16 RAM total
pyrac has quit [Client Quit]
codecop has quit [Quit: Išeinu]
<Xeago> and they hosted vms on that
<ntzrmtthihu777> tomzx_mac: see above post, running linux and unless I missread orca only operates under windows.
<Hanmac> Xeago and whats the big difference between that and a VPN?
Guest64573 is now known as undersc0re97
undersc0re97 has quit [Changing host]
undersc0re97 has joined #ruby
<Xeago> still the cloud
<Xeago> but privately managed
<Xeago> with no redundancy
<Xeago> and sla's
<Xeago> and stuff
<Xeago> and bla
<Xeago> total crap :)
brianpWins has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
<tomzx_mac> ntzrmtthihu777: you mentioned rubyscript2exe, I was under the impression you wanted to run it under windows
<Hanmac> Xeago so "Cloud" is only the newest bullshit-bingo word
<Xeago> uhu, agreed
<Hanmac> ntzrmtthihu777: use an VM if that (11:12:08) Hanmac: ntzrmtthihu777: http://lmgtfy.com/?q=rake+crosscompile&l=1 is not enough
<Xeago> and also, they sold stuff on it too
sylvinus has joined #ruby
<Xeago> hosted on our own private CLOUD infra..
<ntzrmtthihu777> tomzx_mac: yes. basically cross-compiling like for c++. I'm looking to produce working exe for windows from linux
<Xeago> 3 servers, no redundancy on it
<ntzrmtthihu777> Hanmac: ever think someone's machine may not have the capability to run a vm?
<Xeago> ntzrmtthihu777: define not having the capability
average has joined #ruby
<Hanmac> then you think you have the capability todo cross compile?
<Xeago> too slow, or just doesn't start
<tomzx_mac> ntzrmtthihu777: yeah, ocra requires you are on windows for it to generate the "installer"
<Xeago> I've run virtualized stuff on my 80$ phone, rPI, apple time capsules
Spooner has joined #ruby
<ntzrmtthihu777> Xeago: crappy ram/cpu etc. mine does, but quite frankly Hanmac is starting to irritate me.
Pierreb has joined #ruby
<tomzx_mac> I'm curious if you could just get ruby for windows and write a simple .bat script to call ruby yourscript.rb
<tomzx_mac> and package all of that
<tomzx_mac> obviously client would need something to unzip your package ;)
<Xeago> ever heard of msi?
<ntzrmtthihu777> "use a vm" should not be the answer to everything. People choose their development platform for reasons.
<Xeago> make a generic runner that reads a config file for stuff to run
<tomzx_mac> or use a self-extractor
timeout has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
<tomzx_mac> Xeago: not sure how easy it is to make msi packages on linux
<Xeago> I think they are glorified zips
<Xeago> not entirely sure
<tomzx_mac> yes, they are, with a bit of instructions
<ntzrmtthihu777> meh, I could create a 7z self-extracting exe for installations sake, but what I'm asking about is the actual executable.
graeme has quit [Quit: graeme]
<Xeago> for that I'd recommend a simple generic runner that will invoke ruby for you
_carloslopes has joined #ruby
<Hanmac> ntzrmtthihu777: why not testing rake-compiler? it can cross-compile
marcdel has quit []
chessguy has joined #ruby
dayepa has quit [Ping timeout: 258 seconds]
dayepa has joined #ruby
<ntzrmtthihu777> Xeago: the resultant program is gonna be fairly large, gui intereface and such, so I'm not so sure how well running it as a script will do
* Hanmac will never ever ship precompiled gems because all my gems are hand-made, and special designed for the users ... it always fits exactly at the users system
<banisterfiend> ntzrmtthihu777: look at spooner's project, i
<Xeago> i second that
<banisterfiend> ntzrmtthihu777: https://github.com/Spooner/releasy/
carloslopes has quit [Read error: No route to host]
<ntzrmtthihu777> sorry, but not a clue about spooner XD
<ntzrmtthihu777> oh, its a person. I was thinking it was something like murpheys law
<Xeago> Spooner is around too here :)
<tomzx_mac> ntzrmtthihu777: well, you just need a launcher that basically calls the ruby interpreter
<Hanmac> Spooner: what is the diff between yours and rake-compiler?
<tomzx_mac> if you really want an "executable"
<Xeago> that is assuming the pre-compilation does not optimize well enough
<ntzrmtthihu777> banisterfiend: now this looks interesting :D
tommyvyo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
_carloslopes has quit [Remote host closed the connection]
rickruby has joined #ruby
average has left #ruby [#ruby]
<tomzx_mac> lol, spooner looks like a frontend to ocra
<tomzx_mac> execute_command %[#{ocra_command} --output "#{folder}/#{executable_name}"]
madb055 has quit [Remote host closed the connection]
Opettaja has quit [Quit: WeeChat 0.4.0]
<ntzrmtthihu777> tomzx_mac: yeah, I see that. but thing is is it runs on linux, which is a huge plus in my book.
<tomzx_mac> well, ocra should work on linux, it's all ruby from what I've checked
<banisterfiend> tomzx_mac: on windows yes, but it also builds .app files on osx, and packages for linux to
<banisterfiend> tomzx_mac: i thought ocra was just a windows thing to pack ruby code (and the interpreter) into a single .exe ?
<ntzrmtthihu777> banisterfiend: thats how I read it as well
<tomzx_mac> banisterfiend: looks like it indeeds take care of other platforms, that's a good thing
* Hanmac will only ship his stuff as source gem, not as precompiled gem
<tomzx_mac> exe is self-extracting, self-running
<ntzrmtthihu777> banisterfiend: yeah, only windows. have a look down in the similar tools section.
k610 has joined #ruby
* ntzrmtthihu777 is getting irritated at hanmac's elitism
graeme has joined #ruby
<Xeago> I wouldn't call it elitism, it is in my opinion the proper way to do it too
kirun has quit [Quit: Client exiting]
madb055 has joined #ruby
madb055 has quit [Remote host closed the connection]
<ntzrmtthihu777> its elitism. if you don't provide it in any other form than a source package you're basically denying it to any non-techy individual.
<Xeago> nope
<Xeago> my girlfriend uses the gem install command quite frequently
<Xeago> or well did, she has most of her stuff now
<ntzrmtthihu777> and recall I'm not building a gem.
beiter has quit [Quit: beiter]
blacktulip has quit [Remote host closed the connection]
tenmilestereo has quit [Quit: Leaving]
<Hanmac> ntzrmtthihu777: look at this: ERROR - libwx_gtk2u_media-2.8.so.0: cannot open shared object file ... now quess why the error does happen ... that is exactly what would happen with precomiled
pioz has joined #ruby
Banistergalaxy has joined #ruby
subbyyy has joined #ruby
<Xeago> gem is the standard way to package ruby source code and distribute it, besides cloning source
timmow_ has joined #ruby
<ntzrmtthihu777> Xeago: yeah, I'm sure it is, but this is not that sort of thing.
<Hanmac> Xeago i think he wants to use bundler ... and that he should ask at #bundler
cmarques has quit [Ping timeout: 257 seconds]
madb055 has joined #ruby
brhelwig has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
brhelwig has left #ruby [#ruby]
tommyvyo has quit [Quit:]
<Banistergalaxy> Gems is not appropriate for an end user imo
<Banistergalaxy> Releasey seems the right thing
s0ber has quit [Write error: Connection reset by peer]
stacky has quit [Ping timeout: 264 seconds]
* Hanmac 's stuff will be still not precomiled
vlad_starkov has joined #ruby
<ntzrmtthihu777> Banistergalaxy: in this case I agree wholly. average folk just want to run the program, not deal with all the extra junk.
* ntzrmtthihu777 is ignoring Hanmac
<tomzx_mac> just a question/thought, but if it's that hard to deploy ruby for end user, is it the right language to use?
timmow_ has quit [Ping timeout: 252 seconds]
<tomzx_mac> or is it just something ruby should be working on improving?
graeme has quit [Quit: graeme]
<ntzrmtthihu777> tomzx_mac: good question, and I think the latter is true, and the former depends on what is being done.
s0ber has joined #ruby
NAYENA has left #ruby [#ruby]
dmiller has joined #ruby
<Xeago> my girlfriend is totally comfortable running a gem to get a web server for her stuff :)
LnL has quit [Quit: LnL]
<Hanmac> tomzx_mac: no, endusers should only get C code ;P
timeout has quit [Quit: "Rubbish!"]
<tomzx_mac> Xeago: looks like she has experience
<Xeago> nope
<Xeago> she asked me she wanted that
<Xeago> locally
<Xeago> I told her how
<Xeago> that's it
<tomzx_mac> Xeago: that's what I meant, she has "someone" with experience ;)
<Xeago> I did it via e-mail, nothing an installation guide can't do
<ntzrmtthihu777> I'm using ruby because I'm working on an open source version of an application already using ruby, for a community that uses ruby and knows ruby.
banisterfiend has quit [Remote host closed the connection]
<ntzrmtthihu777> (for the most part)
cantonic has joined #ruby
<tomzx_mac> Xeago: sure, but the thing is that as soon as something fails, you might end up losing your "users" before they can even start your app
heliumsocket has quit [Quit: heliumsocket]
<Xeago> tomzx_mac: that is the case with all your stuff that requires any user side effort
<tomzx_mac> Xeago: yeap, which is why ntzrmtthihu777 is probably trying to make it as painless as possible
ph^_ has quit [Remote host closed the connection]
<tomzx_mac> Xeago: basically the equivalent of a lib in a single source file lol
<Xeago> life is painless
<Hanmac> i use my gems to make Window GUIs for linux, windows and mac, but i still does not support precomiled, because EACH of the pcs chould have a different build configuration ... thats why precomiled will never work
<Xeago> or at least, it can be that way
<Xeago> I concur with Hanmac
LnL has joined #ruby
<ntzrmtthihu777> tomzx_mac: yes, exactly. plus the resultant exe needs to be able to produce for linux/win32/osx also.
RagingDave has quit [Quit: Ex-Chat]
brianpWins has quit [Quit: brianpWins]
tommyvyo has joined #ruby
<Hanmac> there is no such stuff as exe for linux ... just mark them as executable and do not forget the shebang
tomsthumb has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
lupine has joined #ruby
lupine has quit [Max SendQ exceeded]
vlad_starkov has quit [Ping timeout: 264 seconds]
kemist has joined #ruby
harrymoreno has joined #ruby
wargasm has joined #ruby
<harrymoreno> could anyone take a look and tell me what syntax error I'm making http://pastebin.com/rg9kNtrS
baroquebobcat has quit [Quit: baroquebobcat]
josh_ has quit [Ping timeout: 258 seconds]
jrajav has joined #ruby
postmodern has joined #ruby
<tomzx_mac> harrymoreno: you need to use elsif and not else if
<harrymoreno> thanks
balr0g has joined #ruby
dekz__ has joined #ruby
k610 has quit [Ping timeout: 248 seconds]
f0ster has joined #ruby
xcv has joined #ruby
kofno has joined #ruby
lktp has quit [Quit: Leaving]
lupine has joined #ruby
lupine has quit [Max SendQ exceeded]
chessguy has quit [Remote host closed the connection]
Adr1an00 has quit [Quit: Computer has gone to sleep.]
chessguy has joined #ruby
br4ndon has joined #ruby
GoGoGarrett has joined #ruby
artofraw has quit [Remote host closed the connection]
banisterfiend has joined #ruby
br4ndon has quit [Client Quit]
kofno has quit [Ping timeout: 258 seconds]
<banisterfiend> ntzrmtthihu777: what's the application
marr has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
Lemtzas has joined #ruby
etcetera has joined #ruby
<ntzrmtthihu777> banisterfiend: basically a game ide
<banisterfiend> ntzrmtthihu777: for what game?
<ntzrmtthihu777> banisterfiend: that is up to the end user. they choose.
Guedes has joined #ruby
_bart has quit [Quit: _bart]
<banisterfiend> ntzrmtthihu777: hmm ok, but you said you were writing an OSS version of a closed app, what was the original closed app?
<ntzrmtthihu777> ah, gotcha. RPG Maker XP/etc
<banisterfiend> ntzrmtthihu777: ah ok cool
lupine has joined #ruby
<banisterfiend> i think Hanmac is working on something like that too
<banisterfiend> hehe
lupine has quit [Max SendQ exceeded]
pyx has joined #ruby
<ntzrmtthihu777> meh. with his attitude to releasing only as uncompiled gems it will never reach the masses that XP did.
GoGoGarrett has left #ruby [#ruby]
tommyvyo has quit [Quit:]
ryanf has left #ruby [#ruby]
arya has joined #ruby
alanp has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
pyx has quit [Client Quit]
baroquebobcat has joined #ruby
bttf has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
ckrailo has quit [Read error: Connection reset by peer]
ckrailo has joined #ruby
s2013 has joined #ruby
<s2013> whats the best way to replace a character? is it gsub?
oneirophren has quit [Quit: Lost terminal]
kraljev has joined #ruby
<kraljev> Is this a bug?
<kraljev> irb(main):001:0> a = Hash.new { [] }
<kraljev> => {}
<kraljev> irb(main):002:0> a[10] << 'test'
<kraljev> => ["test"]
<kraljev> irb(main):003:0> a
osvico has joined #ruby
<kraljev> => {}
<kraljev> why is a empty?
<s2013> oh its .tr
<kraljev> expected: {10 => 'test' }
<kraljev> no, sorry, this is expected: {10 => ['test'] }
f0ster has quit [Remote host closed the connection]
lkba has joined #ruby
marcdel has joined #ruby
<tobiasvl> kraljev: when you create the hash you don't give it a key and a value
<tobiasvl> a[10] = 'test'
DonRichie has quit [Quit: Verlassend]
<kraljev> a[10] << 'test'
<kraljev> and default for nonexistent key is empty array
<kraljev> a = Hash.new { [] }
xlab_ has quit [Remote host closed the connection]
QKO has quit [Changing host]
QKO has joined #ruby
<kraljev> i'd say this is a bug
cantonic has quit [Quit: cantonic]
bhaarat has quit [Quit: bhaarat]
bhaarat has joined #ruby
<banisterfiend> kraljev: you want this: Hash.new { |h, k| h[k] = [] }
<banisterfiend> i think
kofno has joined #ruby
<banisterfiend> but i didnt read thoroughly what you wrote :)
baroquebobcat has quit [Quit: baroquebobcat]
etcetera has quit []
baroquebobcat has joined #ruby
sylvinus has quit [Quit: sylvinus]
emergion has joined #ruby
baroquebobcat has quit [Client Quit]
elaptics is now known as elaptics`away
kofno has quit [Ping timeout: 258 seconds]
<kraljev> so, how is this possible?
<Spooner> kraljev, Yes, what banisterfiend said.
<Spooner> What you are doing is just returning a new [] for all unknown keys, not setting the value and returning that.
<Mon_Ouie> Read the documentation for Hash.new, it does say it is the responsability of the block to store theelement in the Hash
momomomomo has joined #ruby
brianpWins has joined #ruby
rpgsimmaster has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
arya has quit [Ping timeout: 248 seconds]
ph^ has joined #ruby
stoicsquirrel has quit [Remote host closed the connection]
nazty has joined #ruby
tomsthumb has quit [Quit: Leaving.]
jimg has joined #ruby
baroquebobcat has joined #ruby
dmiller_ has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Remote host closed the connection]
Mattc007 has joined #ruby
Mattc007 has quit [Client Quit]
arya has joined #ruby
baroquebobcat has quit [Client Quit]
dmiller has quit [Ping timeout: 258 seconds]
rpgsimmaster has joined #ruby
baroquebobcat has joined #ruby
ph^ has quit [Ping timeout: 256 seconds]
keymone_ has quit [Quit: keymone_]
<mneorr_> kraljev: what ruby version?
<kraljev> 2.0
banisterfiend has joined #ruby
guardian has joined #ruby
<Davey> Does ruby use libpcre for regexp?
<mneorr_> kraljev: well, i don't think it's a bug.
<mneorr_> here's what happens:
<mneorr_> you define a hash, which will give you [] if you ask him for a non-existing key/value
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<mneorr_> so a[123] is nil, and returns you []
momomomomo has quit [Quit: momomomomo]
emergion has quit [Quit: Computer has gone to sleep.]
vise890 has joined #ruby
<apeiros> davetherat: no, ruby 1.8 uses some custom souped up emacs matcher, 1.9 uses oniguruma and 2.0 uses a fork of oniguruma
<mneorr_> you're doing a[123] << 'a' which expands to a[123] => nil => here's just an empty array for you
maxmanders has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros> gah, not davetherat, Davey ^
backjlack has quit [Remote host closed the connection]
yankeefan04 has joined #ruby
<mneorr_> but implicitly, a doesn't set a[123] = [] , before returning that value for you
tomsthumb has joined #ruby
<mneorr_> so you're basically adding 'test' to an unassigned reference
<apeiros> kraljev: what mneorr_ describes is even documented behaviour
<apeiros> "It is the block's responsibility to store the value in the hash if required."
<apeiros> straight from the docs.
* apeiros wished people would consult the docs when stuff doesn't do what they expect…
krisfremen has quit [Ping timeout: 252 seconds]
bradleyprice has joined #ruby
<Davey> apeiros: so it's ereg then, it looks like
<MrZYX> Davey: no, Onigmo for the 2.0 version: https://github.com/k-takata/Onigmo
<apeiros> Davey: no it's not and that's not what I said either.
<mneorr_> apeiros: +1
<apeiros> it's just not libpcre
<apeiros> it's very close to pcre, though
angusiguess has quit [Ping timeout: 252 seconds]
<apeiros> MrZYX: ah right, onigmo was the name of the fork.
<Davey> apeiros: hrm, I'm guessing based on it's usage in PHP for the mbstring_ereg* stuff. Bad assumption on my part (it still uses libpcre otherwise)
<Davey> apeiros: OK, :)
Xlab has joined #ruby
tomsthumb has quit [Client Quit]
<kraljev> verdict: if i use:
<kraljev> a = Hash.new { |hash, key| hash[key] = [] }
<kraljev> for definition, it works as expected
<mneorr_> kraljev: and that's what documentation says
<kraljev> correct
<vandemar> what's the best workaround when jj won't display an ascii-8bit encoded string because it tries to convert to utf-8 which errors out with undefinedconversionerror? (specifically, I'm trying to get friendly json output from torrent data, where torrent["info"]["pieces"].encoding is ASCII-8BIT)
sailias has quit [Quit: Leaving.]
marr has joined #ruby
araujo has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
viuo has joined #ruby
<vandemar> replace it with an escaped-hex version of the string that's in low ascii?
vise890 has quit [Remote host closed the connection]
gyre008 has joined #ruby
baphled_ has quit [Ping timeout: 245 seconds]
Xlab has quit [Ping timeout: 264 seconds]
davetherat has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
krisfremen has joined #ruby
krisfremen has joined #ruby
krisfremen has quit [Changing host]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
ggordan has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
thone_ has quit [Ping timeout: 248 seconds]
swex has joined #ruby
arya has quit []
swex_ has quit [Ping timeout: 258 seconds]
harrymoreno has quit [Quit: harrymoreno]
alanp has joined #ruby
predator217 has joined #ruby
pygmael has left #ruby [#ruby]
pygmael has joined #ruby
jnoob22 has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 245 seconds]
thone has joined #ruby
motto has quit [Quit: Sto andando via]
huoxito has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
Vivekananda has quit [Quit: Ex-Chat]
Vivekananda has joined #ruby
<Vivekananda> hey everyone
idkazuma has joined #ruby
unflores has quit [Quit: unflores]
momomomomo has joined #ruby
slainer68 has quit [Remote host closed the connection]
thone has quit [Ping timeout: 276 seconds]
guardian has left #ruby [#ruby]
<Vivekananda> so I have this working solution but I dont know if it is correct. In pry it prints out a last line which I dont know how to remove https://gist.github.com/anonymous/8260155a4df65afc5ed0
kofno has joined #ruby
jimg has quit [Remote host closed the connection]
plaisn has quit [Ping timeout: 256 seconds]
gabrielrotbart has joined #ruby
eykosioux has joined #ruby
<vandemar> Vivekananda: function (.each) return value
adamjleonard has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
plains has joined #ruby
<Vivekananda> vandemar: yes I know but the problems asks me create an iterator using word "each". my each is doing the iterator thing so where should I return a value and to whom ?
tomsthumb has joined #ruby
timmow has quit [Remote host closed the connection]
<MrZYX> Vivekananda: return block_given? ? self : to_enum(:each)
hiyakashi has joined #ruby
vlad_starkov has joined #ruby
<Vivekananda> MrZYX: took your advice on yield and read that up
<MrZYX> "on yield"?
kofno has joined #ruby
<Vivekananda> I meant on iterators and using blocks andd yield
emergion has joined #ruby
emmanuelux has joined #ruby
GeissT has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
<Vivekananda> where do I put that line and also do I need to put it ? coz the code as it is , is running fine without errors
mneorr_ has quit [Remote host closed the connection]
<MrZYX> not really, it's just convention, you would put it as the last line of the method, with the return keyword being optional
ph^ has joined #ruby
chrishunt has quit [Read error: Connection reset by peer]
pitzips has joined #ruby
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
vlad_starkov has quit [Ping timeout: 258 seconds]
mahmoudimus has joined #ruby
pkrnj has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
ckrailo has joined #ruby
kraljev2 has joined #ruby
kraljev has quit [Ping timeout: 252 seconds]
chrishunt has joined #ruby
beneggett has joined #ruby
bradleyp_ has joined #ruby
andrew12 has quit [Read error: Connection timed out]
andrew12 has joined #ruby
andrew12 has joined #ruby
andrew12 has quit [Changing host]
hiyakashi has quit [Quit: お前は知りすぎた]
ph^ has quit [Ping timeout: 258 seconds]
ephemerian has quit [Quit: Leaving.]
emergion has quit [Ping timeout: 264 seconds]
bradleyprice has quit [Ping timeout: 256 seconds]
niceguy1234 has quit [Ping timeout: 248 seconds]
tomsthumb has quit [Ping timeout: 256 seconds]
tevio has quit [Remote host closed the connection]
eykosioux has quit [Remote host closed the connection]
eykosioux has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
eykosiou_ has joined #ruby
eykosioux has quit [Remote host closed the connection]
bradhe has joined #ruby
epireve has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Quit: pskosinski]
gabrielrotbart has joined #ruby
t_p has quit [Quit: Computer has gone to sleep.]
Xlab has joined #ruby
linusoleander has quit [Quit: linusoleander]
sixEch0_ has joined #ruby
kofno has quit [Remote host closed the connection]
jamesfung14 has joined #ruby
andrew12 has quit [Quit: never coming back]
Mon_Ouie has quit [Ping timeout: 255 seconds]
idkazuma has quit [Remote host closed the connection]
andrew12 has joined #ruby
andrew12 is now known as Guest94057
gabrielrotbart has quit [Ping timeout: 245 seconds]
Mattix has joined #ruby
<Mattix> hey there!
<Mattix> why is that? http://pastebin.com/6TdqMmMu
caledones has joined #ruby
d11wtq has quit [Ping timeout: 248 seconds]
<Mattix> I thought it was "illegal" to change a constant value
robert_ has quit [Ping timeout: 258 seconds]
<Mattix> I think I should add a ".dup"
eykosiou_ has quit [Remote host closed the connection]
<MrZYX> assigning an object to a constant doesn't make that object constant
<MrZYX> the association is constant
kraljev2 has quit [Ping timeout: 252 seconds]
bttf has left #ruby [#ruby]
eykosioux has joined #ruby
<MrZYX> you can't reassign the constant (well you can, but ruby prints a warning)
moos3 has joined #ruby
timmow has joined #ruby
idkazuma has joined #ruby
<Mattix> it doesn't work with dup either, it seems it doesn't clone all the structure but just the first level http://pastebin.com/AaXWHqv3
hiroyuki has quit [Read error: Connection reset by peer]
GeissT has quit [Quit: MillBroChat AdIRC User]
<Mattix> how should I do that? I want to start with a fresh object every time
GeissT has joined #ruby
<Mattix> (I know I can put the hash inside initialize, any other way?)
Xlab has quit [Ping timeout: 258 seconds]
bonty_ssh has joined #ruby
<MrZYX> hm
<MrZYX> changing a dup'ed object shouldn't change the original
<Mattix> it does change the original
kofno has joined #ruby
predator117 has joined #ruby
<Mattix> because -I believe- it only duplicate the "first level"