<unix_>
Radar: So whenever ruby looks for files to load, it looks in the array $:, which is the load path. Outside of that array it doesn't exist, correct?
<Radar>
unix_: "it"?
<Radar>
What is "it" after "array" referring to?
<unix_>
it, the load path.
htmldrum has quit [Ping timeout: 260 seconds]
Ankhers has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Ankhers has joined #ruby
Ankhers has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
<unix_>
Radar: ?
unix_ has left #ruby [#ruby]
<Radar>
and gone
Ankhers has joined #ruby
bronson has joined #ruby
htmldrum has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
aerozeppelin has joined #ruby
aerozeppelin has quit [Client Quit]
bronson has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
tkuchiki has joined #ruby
Ankhers has quit [Quit: ZNC - 1.6.0 - http://znc.in]
senayar has quit [Remote host closed the connection]
QKO_ has quit [Ping timeout: 264 seconds]
QKO has joined #ruby
Ankhers has joined #ruby
elperdut_ has joined #ruby
arooni has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
haraoka has joined #ruby
tkuchiki has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 268 seconds]
sanjayu has quit [Ping timeout: 264 seconds]
evanjs has joined #ruby
elperdut_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocshaw1 has joined #ruby
freerobby has joined #ruby
evanjs has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
yfeldblum has quit [Quit: Leaving...]
karapetyan has joined #ruby
astrobun_ has joined #ruby
consti has joined #ruby
senayar has joined #ruby
yfeldblum has joined #ruby
livathinos has joined #ruby
atomical has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
datanoise has quit [Ping timeout: 264 seconds]
felixrsmith has quit [Ping timeout: 260 seconds]
terlar has joined #ruby
joufflu has quit [Quit: Leaving]
giuseppesolinas has joined #ruby
vdamewood has quit [Quit: Life beckons.]
giuseppesolinas_ has joined #ruby
psk17_ has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
Freeaqingme has joined #ruby
baweaver has quit [Remote host closed the connection]
terlar has quit [Read error: No route to host]
Rollabunna has quit [Ping timeout: 264 seconds]
sundhell has joined #ruby
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Client Quit]
zenguy_pc has joined #ruby
n008f4g_ has joined #ruby
Silox| has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Hounddog has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
abyss_ is now known as abyss
Rollabunna has joined #ruby
joonty has joined #ruby
<yorickpeterse>
morning
inanepenguin has quit [Quit: inanepenguin]
rocknrollmarc has joined #ruby
leafybasil has joined #ruby
rocknrollmarc has quit [Client Quit]
<herbst>
morning
rocknrollmarc has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
rushed has joined #ruby
<platzhirsch>
Why is there a .ruby-version in my Android project directory?
<platzhirsch>
Who put it there?
terlar has joined #ruby
Mia has quit [Ping timeout: 246 seconds]
leafybasil has quit [Ping timeout: 240 seconds]
<maloik>
I doubt anyone here knows
<maloik>
that said, try `git blame` on it and find out
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<awk>
hmm, out of interest, does anyone have a ruby script to export all google sheets to csv ;)
KnownSyntax has joined #ruby
eGGsha has quit [Ping timeout: 244 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
maloik: Good morning .. :)
<maloik>
let's stick to morning
<maloik>
I feel terrible
kies^ has quit [Ping timeout: 246 seconds]
eGGsha has joined #ruby
solars has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
<arup_r>
haha
karapetyan has quit [Remote host closed the connection]
<arup_r>
Did you sleep today ?
nfk|laptop has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
kies^ has joined #ruby
krisquigley has joined #ruby
<ddv>
herbst: you could have checked that with the beta releases a few months back
karapetyan has joined #ruby
<herbst>
i didnt, i assume my co workers did. I a just a ruby monkey in the company. I have nothing depending on xCode. Just heard the others raging a whole afternoon
<adaedra>
Hello everyone
vondruch has joined #ruby
timonv has quit [Ping timeout: 268 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
skade has joined #ruby
<certainty>
hello you specific one
DEA7TH has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
<maloik>
arup_r: not that well... it's weird though, everything hurts, but only a little bit
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Remote host closed the connection]
<maloik>
I feel something is up in my stomache, my head, my throat... but no proper headache or sore throat to speak of
<maloik>
and my eyes and skin hurts :D
yfeldblum has joined #ruby
lalalaaa has joined #ruby
niko has joined #ruby
haraoka has joined #ruby
cih has quit [Ping timeout: 246 seconds]
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
<arup_r>
maloik: :( But what is the reason of these many hurts ... ?
<maloik>
no clue, I'm guessing it's just my body fighting something off
<maloik>
either that or I'm too tired, I did just run a conference past few days and felt kind of drained
blackmesa has joined #ruby
jenrzzz has joined #ruby
<arup_r>
maloik: you need a proper sleep.. may be don't come to IRC .. atleast 3 days..
<lalalaaa>
Hi! Trying to output some stuff randomly according to probabilities, but having some trouble preventing the same thing from being repeated twice: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2 -- airplane.rb:35:in `include?': no implicit conversion of Float into String (TypeError) -- anybody know?
<maloik>
which line is airplane.rb:35 ?
<lalalaaa>
maloik: Sorry about that, it's `if range.include?(random)`
<maloik>
lalalaaa: you really should paste your code in there and call it foo.rb so that we get proper code styles applied
<lalalaaa>
Yup
mattprelude has joined #ruby
<arup_r>
maloik: that is why you are ill! take rest :)
<arup_r>
adaedra: you jumped in between without knowing any context.. Don't reply me on the plase
<lalalaaa>
hmm
<arup_r>
*that please
<maloik>
ughh I am now.. hold on
minotep has quit [Quit: minotep]
<adaedra>
arup_r: I see the context, don't worry.
<lalalaaa>
ah, "good"
<arup_r>
come on... adaedra no more.
<ddv>
:p
rdark has joined #ruby
<maloik>
lalalaaa: seems your variables are messed up... memo is a range, range is 0.5, airplane is nil
<maloik>
you'll probably need to run through the program using something like pry and figure out where something is not what you expect it to be
shredding has quit [Ping timeout: 256 seconds]
astrobun_ has quit [Remote host closed the connection]
<lalalaaa>
hmmm.. ok..
<lalalaaa>
maloik: is that whole memo thing the best way to go about preventing repetition though?
<maloik>
I can see a couple weird things about this code but that's mostly because there's no context... for instance I don't get why you'd represent airplane as a float
<maloik>
the hash seems overkill too, an array should do the trick and then just call .to_s on it when you need to
<adaedra>
I feel like someone was too short to catch the joke. Oh, well.
<lalalaaa>
maloik: one sec please
<lalalaaa>
adaedra: lol
<lalalaaa>
adaedra: at least you didn't talk directly to him this time :)
<lalalaaa>
or her
<adaedra>
:)
<arup_r>
adaedra: then sorry! :) I am not a native english speaker .. so that is the problem really.
<adaedra>
it's ok.
<adaedra>
Not the first time such a thing happens, and definitely not the last one.
<ljarvis>
maloik: how was arrrrcamp?
eGGsha has quit [Ping timeout: 272 seconds]
rockngo has joined #ruby
workmad3 has joined #ruby
<maloik>
pretty good :) heard nothing but good comments
atomical has joined #ruby
rocknrollmarc has quit [Ping timeout: 246 seconds]
<maloik>
im getting older quickly, I remember the first one I did I slept like 10-11h over 3 nights... this year I never stayed past midnight except for the first day :D
sdwrage has quit [Quit: This computer has gone to sleep]
<adaedra>
I slept really badly this night :(
<maloik>
you too? time to start thinking up conspiracy theories
scottymeuk has quit [Ping timeout: 246 seconds]
ruboto_ is now known as ruboto
dmolina has quit [Read error: Connection reset by peer]
<lalalaaa>
The context incase somebody missed it: Trying to run some stuff randomly according to probabilities, but having some trouble preventing the same thing from being repeated twice: https://gist.github.com/dt1973/0f48bc9e8abdc1d462c2 -- airplane.rb:31:in `include?': no implicit conversion of Float into String (TypeError)
<lalalaaa>
* airplane2.rb
arup_r has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lalalaaa>
maloik: the float / hash overkill thing still applies?
_blizzy_ has quit [Read error: Connection reset by peer]
<adaedra>
a miserable pile of floats.
lubarch has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Gottaname|Mobili has joined #ruby
mike___1234 has quit [Ping timeout: 252 seconds]
Gottaname|Mobili has left #ruby [#ruby]
<lalalaaa>
apeiros: nothing really.. should have just said "Lorem", "Ipsum", "Dolor"
User4587_ has joined #ruby
<apeiros>
I'm sorry. to me not replying to direct questions like that translates to "I don't want/need help".
n008f4g_ has quit [Ping timeout: 260 seconds]
<apeiros>
(there's a point to my question)
User458764 has quit [Ping timeout: 244 seconds]
hephaestus_rg has quit [Ping timeout: 250 seconds]
<lalalaaa>
apeiros: im sorry? i thought you were asking about the meaning of the puts "0.5" etc.
<apeiros>
I wasn't.
rushed has quit [Quit: rushed]
<lalalaaa>
ok well they're probabilities i guess.. 0.5 would be 50% chance of running etc.
<apeiros>
I understand that
<apeiros>
your probabilities are 0.3, 0.4 and 0.5. and I ask you again for the sum of those probabilities.
allomov has joined #ruby
<lalalaaa>
ooh
nettoweb has joined #ruby
<apeiros>
I guess you've seen the point of my question now :-p
<lalalaaa>
apeiros: i was under the impression that the `airplanes_probabalized` wouldn't summarize the probabilities but instead let each work independently
<lalalaaa>
yeah sorta :)
karapetyan has joined #ruby
<lalalaaa>
im in way over my head here though..
<apeiros>
lalalaaa: hm, ok. not sure then whether you've seen it.
NeverDie has joined #ruby
<apeiros>
you should inspect the keys of your airplanes_probabalized hash
<apeiros>
and then think about what the max value of `random = Kernel.rand` is
<lalalaaa>
hmmm
<ddv>
lalalaaa: try to understand the math first
haxrbyte has quit [Read error: Connection reset by peer]
<lalalaaa>
good idea guys, thanks
blaxter has joined #ruby
tawaffan has quit [Remote host closed the connection]
NeverDie has quit [Client Quit]
karapetyan has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
datanoise has joined #ruby
haxrbyte has joined #ruby
CanTonic has joined #ruby
User4587_ has quit [Ping timeout: 252 seconds]
arup_r_ has joined #ruby
datanoise has quit [Ping timeout: 240 seconds]
arup_r has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
NeverDie has joined #ruby
NeverDie has quit [Max SendQ exceeded]
nfk|laptop has quit [Ping timeout: 250 seconds]
NeverDie has joined #ruby
tomphp has joined #ruby
User458764 has joined #ruby
<User458764>
Hi, how do I serve a static PDF document with Rack?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
sulky has quit [Remote host closed the connection]
<awk>
Anyone use google_drive ruby gem? I have finally got it to auth and have it download the ID of the google sheet to CSV.. the problem is the whole Tile: Blah has 10 sheets, it only downloads the first sheet, any advice
<freezevee>
bougyman: there is a "[12926.495838] Out of memory: Kill process 16930 (ruby) score 493 or sacrifice child " inside dmesg
<freezevee>
bougyman: it might be it
<bougyman>
freezevee: yes, that's exactly what I expected.
<bougyman>
you are out of memory.
<freezevee>
bougyman: but it's weird how it appeared after I have been working like this for months
Silox| has quit [Quit: Connection closed for inactivity]
Rickmasta has joined #ruby
<freezevee>
bougyman: only thing changed, the gemfile
<bougyman>
freezevee: nothing weird about that when you're running such a heavy stack of stuff.
bronson has joined #ruby
User458764 has quit [Ping timeout: 264 seconds]
<freezevee>
bougyman: do you think I should start removing things ?
<freezevee>
to spot the root of the issue
tvw has joined #ruby
<freezevee>
there must be a log or something somewhere
tkuchiki has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 240 seconds]
<bougyman>
freezevee: it depends.
<bougyman>
you can't remove stuff you're using in your app.
<bougyman>
this is the point where you decide you need more ram, usually.
<bougyman>
how much ram are you running on?
User458764 has joined #ruby
<bougyman>
maybe your specs are doing something stupid and gobbling up your ram
<[k->
64 mb
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
pawnbox has joined #ruby
enylcanment has quit [Quit: Konversation terminated!]
haxrbyte has joined #ruby
enlycanment has joined #ruby
<shevy>
hey girls
PhantomSpank has joined #ruby
<ddv>
shevy....
<yorickpeterse>
shevy: hey babe
<[k->
shevy is a \girl/
<ddv>
sevenseacat is nothere
<yorickpeterse>
shevy: what are you wearing?
Xeago has joined #ruby
<adaedra>
\girl: unknown escape sequence.
<yorickpeterse>
or should I ask, what are you _not_ wearing? (͡° ͜ʖ ͡°)
<[k->
it's girl/
<ddv>
sexism in the ruby community
<yorickpeterse>
unless shevy is also underaged the word is "woman"
<[k->
shevy is a male
vondruch has quit [Quit: Ex-Chat]
<yorickpeterse>
do you have reproducable scientific evidence for that?
<shevy>
ddv she abandoned us and now hangs out with the cool folks on #rubyonrails :(
<shevy>
yorickpeterse you are way too cheeky
kinlo has left #ruby [#ruby]
<freezevee>
bougyman: I am running everything on a vagrant ubuntu box with 512mb
<yorickpeterse>
:P
vondruch has joined #ruby
<freezevee>
bougyman: haven't have a problem since today
<freezevee>
had*
trautwei_ has joined #ruby
<shevy>
not bad
<shevy>
a full day without problems
<[k->
your face is a full day with/out problems
Xeago has quit [Remote host closed the connection]
<adaedra>
This is a [k- point
<ddv>
freezevee: figure what is taking all the ram
<ddv>
+out
<freezevee>
how ?
<[k->
profiling!
<ddv>
do I need to wipe your butt too?
<freezevee>
no thanks
<ddv>
haha
<freezevee>
but you could help me on something I never did before
<freezevee>
like fguring out what is abusing the ram !
enlycanment has quit [Changing host]
enlycanment has joined #ruby
trautwein has quit [Ping timeout: 246 seconds]
<[k->
yes, the method is called profiling
<shevy>
ddv can others accept your offer?
ndrei has joined #ruby
<shevy>
freezevee abusing the ram is to use strings rather than symbols as hash keys!!!
<freezevee>
[k-: htop ?
<bougyman>
freezevee: 512MB is easily grabbable by a rails stack.
<bougyman>
1 Gig, even.
<shevy>
god, rails is so hungry
<bougyman>
let me guess, the specs run with an sqlite in memory: mode, too?
NeverDie has joined #ruby
<[k->
what is htop
<bougyman>
no, I guess not, no sqlite in your gemfile
<[k->
i did not profile Ruby before
<freezevee>
never done this before but interesting to know
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Coldblackice_ has quit [Ping timeout: 256 seconds]
datanoise has joined #ruby
lubarch has quit [Ping timeout: 265 seconds]
catphish has joined #ruby
<catphish>
is there a configure option i can use to prevent ruby building against libyaml?
stamina has joined #ruby
NeverDie has joined #ruby
<awk>
has nobody here used the ruby google_drive gem ? I really need help spreadsheet_by_key .... export_as_file only takes the first sheet
<awk>
not all of them
haxrbyte has quit [Read error: Connection reset by peer]
enlycanment has quit [Remote host closed the connection]
<ddv>
no one has used it
<ddv>
sorry
NeverDie has quit [Max SendQ exceeded]
<ddv>
awk: why not debug?
Testo has joined #ruby
NeverDie has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
<shevy>
catphish you could perhaps remove the ext/psych directory. I don't think there is an explicit configure option, but in that case, you can suggest this to ruby-core to add it, at: bugs.ruby-lang.org/projects/ruby-trunk
yardenbar has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 264 seconds]
haraoka has quit [Ping timeout: 252 seconds]
<catphish>
shevy: looking more closely, i think i'm asking the wrong question, perhaps what i want is for psych to compile agsinst an internal libyaml, instead of an external one, i have 2 build hosts, one of them has libyaml installed and seems to create a dependency, the other doesn't but still seems to provide psych with no external dependency
<bhaak>
yeah, I know that is not really wrong but when you juggle data from and to the db, you can easily lose sight what is date field and what is a datetime field in the db.
<catphish>
yeah, that's annoying, best to be explicit always
<bhaak>
if you only have "record[:start_date] <= other_date_or_time" you don't see the problem at a glance
casadei has quit [Ping timeout: 265 seconds]
<bhaak>
at least with ruby, I can override the comparison and raise an error for seeing where the problematic code is sprinkled all over the place :-)
last_staff has quit [Remote host closed the connection]
solars has joined #ruby
<shevy>
It seems your ruby installation is missing psych (for YAML output).
<shevy>
To eliminate this warning, please install libyaml and reinstall your ruby.
<shevy>
catphish ok when I get rid of ext/psych Psych::LIBYAML_VERSION does not work because Psych no longer is a known thing
<shevy>
but otherwise that ruby variant works fine, I am in irb, eating cats \o/
<catphish>
so, it seems ruby 2+ does have a bundled libyaml
<catphish>
but i don't know how to make it use it :(
<shevy>
I assume it uses some kind of stub/placeholder
zenguy_pc has joined #ruby
<shevy>
yeah, there really should be a configure option to tell ruby what you want, I assume nobody was thinking of it because most everyone will just use psych anyway
spider-mario has joined #ruby
<catphish>
so my question becomes "how can i force ruby to compile against bundled libyaml instead of external libyaml"
codecop has quit [Remote host closed the connection]
workmad3 has quit [Client Quit]
EXID123 has joined #ruby
beast has quit [Quit: Leaving]
User458764 has quit [Ping timeout: 250 seconds]
beast has joined #ruby
bronson has joined #ruby
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
EXID123 has quit [Remote host closed the connection]
<catphish>
shevy: i believe the reason it's discouraged is because if there's ever a security issue in a library, it only has to be patched in one place, rather than having to upgrade everything where its bundled
<catphish>
there are plenty of other reasons why it's not ideal, particularly in an environment with managed packages
rodfersou has quit [Read error: Connection reset by peer]
gagrio_ has joined #ruby
gagrio_ has quit [Remote host closed the connection]
rodfersou has joined #ruby
gagrio has quit [Remote host closed the connection]
gagrio has joined #ruby
Voker57 has joined #ruby
p0wn3d_ has joined #ruby
pecpec has quit [Remote host closed the connection]
ldnunes has joined #ruby
haxrbyte has joined #ruby
Total_noob has joined #ruby
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
decoponyo has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
decoponio has quit [Ping timeout: 264 seconds]
Voker57 has quit [Ping timeout: 268 seconds]
haxrbyte has quit [Ping timeout: 246 seconds]
wookiehangover has joined #ruby
User458764 has joined #ruby
leafybasil has joined #ruby
banister has quit [Read error: Connection reset by peer]
marr has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
moss has joined #ruby
ruurd has joined #ruby
elperdut has joined #ruby
andikr has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
sdothum has joined #ruby
blackmesa has joined #ruby
ekinmur has joined #ruby
krisquigley has quit [Remote host closed the connection]
darkxploit has quit [Ping timeout: 255 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
Voker57 has joined #ruby
Pupp3tm4st3r has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
iceyec has joined #ruby
towski_ has joined #ruby
<catphish>
so, my problem isn't 100% solved, psych is installed as a "default gem" and i don't know how to pass options to it :(
<ddv>
what is the real problem?
<catphish>
ddv: mine?
<ddv>
yes? what are you trying to achieve and why?
pawnbox has quit [Remote host closed the connection]
<catphish>
ddv: i'm trying to get ruby to compile psych against its bundled libyaml instead of having an external dependency
workmad3 has joined #ruby
<ddv>
catphish: oh why?
joonty has joined #ruby
nateberkopec has quit [Ping timeout: 256 seconds]
<ddv>
catphish: why deviate from the default?
<ddv>
do you a good reason?
shredding has joined #ruby
<adaedra>
did you a word?
<catphish>
because i'm building a bundled binary ruby, and i would like to avoid the extra dependency, the default behaviour is only the default because i happen to have libyaml-dev installed on my build host, if i didn't the default would be to use the bundled one
<catphish>
lol
Testo has quit [Read error: Connection reset by peer]
blaxter has quit [Quit: foo]
<catphish>
i might be able to install a new psych gem over the top of the "default gem" one
<ddv>
lol
<ddv>
+have
<jhass>
catphish: you looked at traveling ruby?
<catphish>
jhass: i have, but it's not very flexible with binary gems
gagrio has quit [Ping timeout: 240 seconds]
<catphish>
my build worked perfectly until i tried to do the build on a server with libyaml-dev installed, at which point ruby picked up the external library and made it a dependency :(
ekinmur has quit [Ping timeout: 244 seconds]
<catphish>
hopefully "gem install psych -v 2.0.8 -- --enable-bundled-libyaml" will sort it out and replace the gem
darkxploit has joined #ruby
pawnbox has joined #ruby
skade has joined #ruby
vdamewood has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
asad has joined #ruby
ddtblues has quit []
asad is now known as Guest97495
Guest97495 has left #ruby [#ruby]
jenrzzz has joined #ruby
JDiPierro has joined #ruby
pecpec has joined #ruby
lxsameer has joined #ruby
<catphish>
nah, didn't work :(
yalue has joined #ruby
krisquigley has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
NeverDie has joined #ruby
Pisuke has quit [Quit: WeeChat 1.4-dev]
s00pcan has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
prestorium has joined #ruby
Sembei has joined #ruby
raphagodoi has joined #ruby
raphagodoi has quit [Client Quit]
gagrio has joined #ruby
gusTester has joined #ruby
bronson has joined #ruby
TheWhip has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
giuseppesolinas has joined #ruby
giuseppesolinas_ has joined #ruby
diprotic is now known as monoprotic
pawnbox_ has joined #ruby
<catphish>
i'll try shevy's approach of deleting ext/psych, then install it separately
blackmesa has joined #ruby
<catphish>
since i can't find a way to pass build options to default gems
bronson has quit [Ping timeout: 272 seconds]
buck_ has joined #ruby
decoponyo has quit [Ping timeout: 244 seconds]
joonty has quit [Quit: joonty]
haxrbyte has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
Jardayn has joined #ruby
kapoenator has joined #ruby
towski_ has quit [Remote host closed the connection]
<buck_>
Hi. How does changing the value of a global variable inside a ruby script affect that variable inside required ruby scripts?
decoponio has joined #ruby
<catphish>
buck_: it changes it for the whole process, that's what makes it global :)
mike___1234 has joined #ruby
<ddv>
still don't understand what you are trying to achieve catphish
<ddv>
:p
<catphish>
ddv: i'm trying to prevent my ruby binary depending on libyaml
<catphish>
it's that simple
<buck_>
If I have a file called main.rb that has a global variable of $main set to "main" and if a required file has "puts $main" in it, it will print out "main"...
_blizzy_ has joined #ruby
Testo has joined #ruby
<ddv>
catphish: why?
<catphish>
buck_: yes, it will apply to all code in all files
<buck_>
catphish: How? What's the process of this working?
<buck_>
catphish: I was reading that required files are executed in another top-level namespace. What does this mean?
<catphish>
buck_: global variables exist across ALL namespaces, that's their purpose
<catphish>
buck_: you can set and retrieve a global variable absolutely anywhere in your program, however normally you should avoid doing so
<catphish>
ddv: because i don't want the extra dependency for my application
dorei has joined #ruby
<ddv>
catphish: well it will save you a few kilobytes
<ddv>
:p
dhjondoh has quit [Quit: dhjondoh]
TomyWork has joined #ruby
<ddv>
catphish: you could have spent your time on something more usefull
<TomyWork>
hi
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<buck_>
So if I change $: variable in one file, it will be changed in all required files? And I mean files that depend on others. So all these files will have the $: variable changed?
<TomyWork>
can i somehow tell ruby 1.9.3 not to barf "invalid multibyte char (US-ASCII)" at me when i use a non-us-ascii character in a string?
<j416>
TomyWork: # encoding: utf-8
<j416>
TomyWork: at top of file
<jhass>
TomyWork: where does the string come from? why isn't it in the right encoding in the first place?
<TomyWork>
ah, thanks
karapetyan has joined #ruby
<jhass>
note that'll only fix it for literals, maybe
<j416>
TomyWork: assuming you use utf-8, if you're not you should
<j416>
s/you use/you're using/
<TomyWork>
i always thought that was some vim thing, not for ruby itself
<catphish>
buck_: yes
<TomyWork>
i've seen it in people's files
<ddv>
silly editors
<jhass>
TomyWork: also note that all supported Ruby versions (1.9 is EOL) default to utf-8 for the file encoding if no system encoding is present
<catphish>
TomyWork: i try to avoid non-ascii in source code, but if your editor is using utf8 then #encoding: utf-8 will sort it
decoponio has quit [Ping timeout: 250 seconds]
<TomyWork>
jhass tell ubuntu :)
Ox0dea has left #ruby ["WeeChat 1.4-dev"]
<jhass>
buck_: it's a global variable, it changes globally
<jhass>
TomyWork: pretty sure there's ruby2.0 or something, also have a look at the brightbox ruby packages for ubuntu
<TomyWork>
catphish this file to be kinda readable, so i cant use escape sequences or something
<catphish>
ubuntu still support 1.9.3, their support cycle is somewhat longer than ruby's, it's kind of annoying, but unavoidable
<catphish>
TomyWork: then the #encoding thing should be fine
<TomyWork>
+has
prestorium has quit [Read error: Connection reset by peer]
<TomyWork>
catphish i'm using that now
Peg-leg has joined #ruby
joonty has joined #ruby
yashinbasement has joined #ruby
ruurd has joined #ruby
datanoise has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
PhantomS_ has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<catphish>
so, it seems my psych only depends on libyaml when it's loaded by bundler, weird
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
casadei has quit [Ping timeout: 250 seconds]
datanoise has quit [Ping timeout: 264 seconds]
A124 has quit [Quit: '']
cassioscabral has joined #ruby
karapetyan has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
sgambino has joined #ruby
Xeago has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
yashinbasement has quit [Quit: Leaving]
Rollabunna has quit [Quit: Leaving...]
PhantomSpank has quit [Read error: Connection reset by peer]
kapoenator has quit [Read error: Connection reset by peer]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
blaxter has joined #ruby
elperdut_ has joined #ruby
sanjayu has quit [Remote host closed the connection]
sanjayu has joined #ruby
lxsameer has quit [Quit: Leaving]
Cyther has joined #ruby
sanjayu has quit [Client Quit]
sdwrage has joined #ruby
pontiki has quit [Quit: workies]
sanjayu has joined #ruby
sanjayu has quit [Client Quit]
cih_ has quit [Remote host closed the connection]
sanjayu has joined #ruby
havenwood has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
User4587_ has joined #ruby
Xeago has quit [Remote host closed the connection]
arup_r_ has quit []
Pupp3tm4st3r has quit [Quit: Leaving...]
jgpawletko has joined #ruby
User458764 has quit [Ping timeout: 272 seconds]
gagrio has quit [Ping timeout: 240 seconds]
jordanm has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
dhjondoh has joined #ruby
gagrio has joined #ruby
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
nateberkopec has joined #ruby
ponga has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
krisquigley has quit [Remote host closed the connection]
decoponio has joined #ruby
mikey has joined #ruby
mikey is now known as Guest14791
sanguisdex has left #ruby [#ruby]
A124 has joined #ruby
Kendos-Kenlen has joined #ruby
atmosx has joined #ruby
[k- has quit [Read error: Connection reset by peer]
[k- has joined #ruby
<Guest14791>
How are constants defined in a top-level scope visible inside the scope of a method? https://eval.in/445104
WizJin has quit [Excess Flood]
gagrio has quit [Ping timeout: 256 seconds]
skweek has joined #ruby
pecpec has quit [Ping timeout: 240 seconds]
Guest53 has joined #ruby
`tim` has joined #ruby
devoldmx_ has quit [Read error: Connection reset by peer]
WizJin has joined #ruby
<Guest14791>
Whilst local-variables defined in the top-level scope are not. (which is expected) I'm trying to understand ruby's scoping rules.
devoldmx has joined #ruby
lkjhf has joined #ruby
<jhass>
Guest14791: they are because they are defined to be, there's not much more to it
luksaur has joined #ruby
RegulationD has joined #ruby
Guest14791 has left #ruby [#ruby]
pecpec has joined #ruby
lkjhf has quit [Client Quit]
devoldmx has quit [Ping timeout: 268 seconds]
Cyther_ has joined #ruby
dopie has quit [Ping timeout: 246 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
PhantomSpank has joined #ruby
TPBallbag has joined #ruby
hfp_work has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 256 seconds]
prestorium has joined #ruby
krz has joined #ruby
djcp has joined #ruby
Cyther has quit [Ping timeout: 265 seconds]
cih has joined #ruby
syath has joined #ruby
gagrio has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
Guest53 has joined #ruby
freerobby has joined #ruby
amystephen has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
chouhoulis has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
umgrosscol has joined #ruby
freezevee has quit []
A124 has quit [Quit: '']
balazs_ has joined #ruby
hfp_work has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Quit: dhjondoh]
simplyianm has quit [Ping timeout: 255 seconds]
A124 has joined #ruby
<balazs_>
What is the a way to execute code in a ternary operator ? Something like: answer = S == 'yes' ? 1 : S == 'no' ? 0 : {puts "Illegal answer"; continue}
<Silicium_>
i'am using ruby 2.0.0p247 on passenger/nginx. i have to configure the heap so i set the env vars... In the application i can read the env vars, they exist and they are set correctly but the the app still uses 1500heaps, i configured it in a way it should only use 1 heap after startup, but it seems that the environment variables are ignored. is there a way to debug that?
<lalalaaa>
Basically it's a script to randomly and infinitely run other scripts according to probabilities. That part is fine, however I'm trying to prevent it from repeating the same item consecutively and that part is not working.
datanoise has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<gregf__>
adaedra: true
boxrick1 has joined #ruby
skade has joined #ruby
<ddv>
lalalaaa: dejavu
chipotle has quit [Remote host closed the connection]
<boxrick1>
Afternoon, I am having some issues with passenger and foreman after removing some temp files
datanoise has quit [Ping timeout: 240 seconds]
symbol has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<boxrick1>
Can anyone give me a hand ?
<jhass>
lalalaaa: explain why and what you don on line 32
skweek has joined #ruby
<jhass>
*do on
<boxrick1>
[ 2015-10-05 15:48:33.0119 10070/7ff7511e8700 Pool2/Implementation.cpp:1174 ]: [App 10235 stderr] : Permission denied - /usr/share/foreman/PassengerTeeInput-0.738844345172722 (Errno::EACCES) Is the error I am getting :(
renancarvalho has joined #ruby
TheWhip has joined #ruby
krisquigley has joined #ruby
<Silicium_>
i'am using ruby 2.0.0p247 on passenger/nginx. i have to configure the heap so i set the env vars... In the application i can read the env vars, they exist and they are set correctly but the the app still uses 1500heaps, i configured it in a way it should only use 1 heap after startup, but it seems that the environment variables are ignored. is there a way to debug that?
karapetyan has joined #ruby
patchedmonkey has joined #ruby
whippythellama has joined #ruby
<jhass>
Silicium_: it came through the first time
<Silicium_>
ok good to know! thank you! :)
chipotle_ has joined #ruby
pandaant has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
<maloik>
jhass: tried to help him/her this morning, some of those values are probably not what they expect
terlar has joined #ruby
<maloik>
I suggested using pry to figure it out but yea..
<jhass>
maloik: look at the current code, in particular the line I hinted
headius_ is now known as headius
<jhass>
it's not unobvious really
<jhass>
will get to the logic fail afterwards
<maloik>
not sure what you mean by that
chipotle has quit [Ping timeout: 250 seconds]
<jhass>
airplanes_probabalized.each do |memo, (range, airplane)|
karapetyan has quit [Ping timeout: 240 seconds]
<jhass>
not .inject, not each_with_object or anything
<jhass>
that decomposition doesn't make any sense
<maloik>
ah, yea gotcha
rushed has quit [Quit: rushed]
casadei has joined #ruby
sanjayu has quit [Ping timeout: 252 seconds]
i8igmac has joined #ruby
n008f4g_ has joined #ruby
<lalalaaa>
maloik: greetings! i was unable to figure much out using pry, but as you can see i've added it to the runnable
skade has quit [Quit: Computer has gone to sleep.]
cubicme has joined #ruby
huddy has joined #ruby
<lalalaaa>
jhass: i got the code by some guy on StackOverflow, however he's declined to go into detail about what it does or why it currently doesn't work
Testo has quit [Read error: Connection reset by peer]
hj2007 has joined #ruby
<jhass>
that version?
<jhass>
throw it away then
sanguisdex has joined #ruby
<lalalaaa>
jhass: so as for line 32.. hold up
falicy has quit [Quit: Leaving]
<lalalaaa>
hmm.. yeah might as well throw it away
luksaur has quit [Quit: Leaving]
<jhass>
I mean you got the second version from there?
<jhass>
the first one is fine
<lalalaaa>
yup the second one
<lalalaaa>
first one is all good
tagrudev has quit [Remote host closed the connection]
<jhass>
okay, where can I downvote?
aganov has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
<jhass>
the general approach works but the example is just wrong and confusing
<jhass>
did you try what the second comment on your OP said?
inteq has quit [Remote host closed the connection]
<jhass>
working from the first version you posted
<lalalaaa>
"to capture the previous result and handle a duplicate occurrence" not quite sure where to start to be honest
<jhass>
the beginning
<jhass>
how would you capture the previous result?
<lalalaaa>
also by taking this approach, doesnt it mean the running of a script could be considerably delayed depending on how many consecutive runs there are?
<jhass>
another term we could use here is "remember" or "memoize"
<lalalaaa>
i like "remember"
<jhass>
?random
<ruboto>
I don't know anything about random
<jhass>
mmh
<lalalaaa>
i would save it to a variable right?
<adaedra>
nine
<jhass>
lalalaaa: right
<jhass>
so do that
<[k->
the real random number is 4
zenguy_pc has joined #ruby
InternetFriend has joined #ruby
tenderlove has joined #ruby
<[k->
insert relevant xkcd here
DoubleMalt has quit [Remote host closed the connection]
<maloik>
I thought that was 9
<jhass>
9 is dilbert
<maloik>
I see
<maloik>
the amount of mostly useless knowledge here is staggering
<lalalaaa>
i've learned to ignore its bad sides, just like two lovers would
felixrsmith has joined #ruby
elperdut_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<uberjar>
Hi. I have a quick question about Celluloid IO actors. (nobody is around in #celluloid) : Should I only ever create X celluloid IO actors in my program where X equals the number of CPU cores, or is it OK to have one for each subsystem ?
davedev24 has joined #ruby
devoldmx has quit [Ping timeout: 252 seconds]
<uberjar>
in other words is the only cost some extra memory and startup time for each reactor ? or does it waste CPU somehow
<jhass>
lalalaaa: right, let's think about it for a sec, what do we do here
<jhass>
lalalaaa: we get a random airplane. We set last_call to it. We then check if last_call is the current_airplane
<jhass>
well, it always is, we just set them equal, right?
<lalalaaa>
ooh
<lalalaaa>
yeah
bronson has joined #ruby
<lalalaaa>
we have got ourselves a problem there..
<jhass>
uberjar: don't know about celluloid, but that's thread thinking. Limiting the amount of actors to the number of cores/parallel tasks kinda defeats the entire actor model
<jhass>
it's task centric, not thread centric
<lalalaaa>
jhass: so we need a `previous_airplane` too then maybe?
<jhass>
lalalaaa: last_call should be our previous airplane
<jhass>
lalalaaa: and you just got the better name for it, so rename
pawnbox has joined #ruby
<lalalaaa>
hehe
<jhass>
but think about _when_ to set it
spider-mario has joined #ruby
catphish has left #ruby ["Leaving"]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
<lalalaaa>
maybe i should move `previous_airplane = current_airplane` inside the `unless previous_airplane == current_airplane` block?
<jhass>
please list out the conditions that would need to be met for it to run then
<uberjar>
jhass: hrm.. that's an interesting perception. I'm still fuzzy on the actor model to be honest. But if I understand it correctly celluloid IO is the "reactor" model but implemented within the actor paradigm which makes it more tricky
<[k->
lalalaaa sounds like shevy
<uberjar>
I'll go read more about actors in general until I understand what a "task" is supposed to be. cheers
bronson has quit [Ping timeout: 250 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aerozeppelin has quit [Read error: No route to host]
aerozeppelin has joined #ruby
aerozeppelin has quit [Client Quit]
<jhass>
uberjar: the classic task centric model is that you have a pool of thread workers and (a bunch of) queues on which you push workloads for the threads to process. Those workloads are called tasks
pawnbox_ has joined #ruby
atomical has joined #ruby
<lalalaaa>
jhass: if the previous airplane is not the current air plane, then run the current airplane and set it to the previous airplane?
<lalalaaa>
was it really that simple? what the hell was that dude on SO thinking
UtkarshRay has joined #ruby
p0wn3d__ has joined #ruby
<jhass>
his code does basically the same. Just with some messed up each and convoluted construction of it in general
<jhass>
"look how smart I am, I know inject", basically
<lalalaaa>
hehe
<lalalaaa>
jhass: thanks for not just helping me but for like.. taking the whole teacher approach and believing in me
TheWhip has joined #ruby
<lalalaaa>
learned a valuable lesson.. _and_ i fixed my code yay
<renancarvalho>
hello everybody
<renancarvalho>
i'm starting programming ruby
<certainty>
\o/
<jhass>
lalalaaa: the more people I can help to help themselves, the more people can be helped, both by myself and eventually the people I did help in the past ;) After all teaching is still the best way to learn something yourself actually
<certainty>
arms raised in a V
chthon has joined #ruby
p0wn3d_ has quit [Ping timeout: 268 seconds]
<adaedra>
certainty: now do the rest of the alphabet
psy_ has quit [Ping timeout: 264 seconds]
sanguisdex has quit [Quit: Leaving.]
<certainty>
adaedra: no, now i've got distracted. Gotta hear jeremy from pearl jam
p0wn3d_ has joined #ruby
sanguisdex has joined #ruby
p0wn3d_ has quit [Read error: Connection reset by peer]
<lalalaaa>
jhass: cheers :)
p0wn3d__ has quit [Ping timeout: 264 seconds]
UtkarshRay has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 244 seconds]
ekinmur has joined #ruby
[spoiler] has quit [Quit: Cheers!]
[spoiler] has joined #ruby
ekinmur has quit [Client Quit]
pawnbox_ has quit [Ping timeout: 252 seconds]
Gnomethrower has quit [Max SendQ exceeded]
gey\ has quit []
karapetyan has joined #ruby
<[k->
code is like violence
<[k->
if it doesn't work, you need more of it
<Aria>
o.O
<[k->
change it a little here and there and somehow it works
<[k->
(or add more if checks)
i8igmac has quit [Ping timeout: 240 seconds]
ksteck has joined #ruby
p0wn3d_ has joined #ruby
zenguy_pc has joined #ruby
lubarch has quit [Ping timeout: 255 seconds]
nfk|laptop has quit [Ping timeout: 240 seconds]
<[k->
if something_that_leads_to_bug28482 then do something else do normal stuff
p0wn3d_ has quit [Read error: Connection reset by peer]
<Zarthus>
you write bugs in your code?
<Aria>
I think my approach to code is a lot like my approach to violence: Less, please.
<Zarthus>
i think there is your problem
<Aria>
Take time and understand what's going on.
<[k->
you write bugs in your code too!
<Zarthus>
i never write bugs
enigmaty has joined #ruby
<Zarthus>
they are called features
zapata has quit [Quit: WeeChat 1.3]
Testo has quit [Ping timeout: 268 seconds]
Xeago has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
<[k->
less talking more code slinging!
zapata has joined #ruby
pawnbox has joined #ruby
datanoise has joined #ruby
lubarch has joined #ruby
dfinninger has joined #ruby
<certainty>
code like violence breaks the silence
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
paulcsmith has joined #ruby
eminencehc has joined #ruby
mary5030 has joined #ruby
jessemcgilallen has joined #ruby
<[k->
much rhyme
<certainty>
stolen from depeche mode
cazrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
tvw has quit [Remote host closed the connection]
_joes__ has joined #ruby
_blizzy_ has joined #ruby
elperdut has joined #ruby
cball has joined #ruby
trautwei_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
TomyWork has quit [Remote host closed the connection]
bigmac has joined #ruby
p0wn3d_ has joined #ruby
[spoiler] has quit [Quit: Cheers!]
CpuID has quit [Ping timeout: 246 seconds]
[spoiler] has joined #ruby
cdg has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
[spoiler] has quit [Client Quit]
[spoiler] has joined #ruby
[spoiler] has quit [Client Quit]
Xeago has joined #ruby
The_Phoenix has joined #ruby
[spoiler] has joined #ruby
freerobby has quit [Quit: Leaving.]
User458764 has joined #ruby
skade has joined #ruby
snockerton has joined #ruby
rippa has joined #ruby
_blizzy_ has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
troulouliou_div2 has joined #ruby
ekinmur has joined #ruby
ruurd has quit [Quit: Bye]
DoubleMalt has joined #ruby
pwnd_nsfw has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
stardiviner has quit [Ping timeout: 240 seconds]
newdan has joined #ruby
Spami_ has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
jas02 has quit [Quit: jas02]
blackmesa has joined #ruby
chipotle has joined #ruby
whippythellama has quit [Ping timeout: 240 seconds]
Spami has quit [Ping timeout: 240 seconds]
jpfuentes2 has joined #ruby
symbol_ has joined #ruby
Guest86944 has joined #ruby
apfeluser has joined #ruby
TheWhip_ has joined #ruby
symbol has quit [Ping timeout: 244 seconds]
eminencehc has quit [Remote host closed the connection]
TheWhip has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
aerozeppelin has joined #ruby
eminencehc has joined #ruby
inteq has joined #ruby
eminencehc has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 264 seconds]
rcvalle has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 268 seconds]
axl_ has joined #ruby
whippythellama has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
stamina has quit [Ping timeout: 264 seconds]
_Cyther_ has joined #ruby
bronson has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
livathinos has left #ruby [#ruby]
eminencehc has joined #ruby
dfinning_ has joined #ruby
|-_-| has left #ruby ["-_-"]
Xeago has quit [Remote host closed the connection]
Cyther_ has quit [Ping timeout: 272 seconds]
<shevy>
yeah
<shevy>
[k- is too young to know depeche mode
bronson has quit [Ping timeout: 252 seconds]
aerozeppelin has joined #ruby
aerozeppelin has quit [Client Quit]
morenoh149 has joined #ruby
dfinninger has quit [Ping timeout: 240 seconds]
sparr has quit [K-Lined]
Hijiri has quit [K-Lined]
larissa has quit [K-Lined]
rodfersou is now known as rodfersou|lunch
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
larissa has joined #ruby
sparr has joined #ruby
barhum2013 has joined #ruby
sundhell has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 256 seconds]
aerozeppelin has joined #ruby
aerozeppelin has quit [Client Quit]
SCHAAP137 has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Hijiri has joined #ruby
aerozeppelin has joined #ruby
aerozeppelin has quit [Client Quit]
arup_r has quit [Ping timeout: 255 seconds]
jud has quit [Quit: Leaving]
SenpaiSilver has joined #ruby
Guest86944 has quit [Ping timeout: 272 seconds]
xcesariox has joined #ruby
tjohnson has joined #ruby
bashrw has joined #ruby
snockerton has quit [Quit: Leaving.]
inanepenguin has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
jessemcgilallen has quit [Read error: Connection reset by peer]
<morenoh149>
I'm getting some error with bundler and native extensions. Something about not being able to compile the native extension.
tuxero has joined #ruby
<morenoh149>
I'm recompiling ruby on my machine, that's the correct course of action right?
baroquebobcat has joined #ruby
<morenoh149>
this is osx
ReK2 has joined #ruby
ReK2 has joined #ruby
kalleth has joined #ruby
<jhass>
morenoh149: probably not. What's the full error output? (use gist)
TheWhip_ has quit [Ping timeout: 260 seconds]
hfp_work has quit [Ping timeout: 256 seconds]
wookiehangover has quit [Ping timeout: 240 seconds]
spcmastertim has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yokel has quit [Ping timeout: 244 seconds]
herbst has quit [Remote host closed the connection]
<morenoh149>
well I'll try after recompiling ruby lol
umgrosscol has quit [Quit: End of Line]
yokel has joined #ruby
genpaku has joined #ruby
hahuang61 has quit [Ping timeout: 252 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wookiehangover has joined #ruby
loc22 has quit [Client Quit]
loc22 has joined #ruby
snockerton has joined #ruby
<ght>
Question: I have a Ruby 2.2 application that uses XMLRPC client, and I have the XMLRPC call surrounded in a begin/resuce block, and the rescue is for SocketError, XMLRPC::FaultException => e
<ght>
And that normally works good, except, it looks like that XMLRPC call is periodically generating "Error: Authorization failed. HTTP-Error: 401 Unauthorized"
<ght>
Well, it's proprietary code, I'd have to modify it.
<jhass>
normally the error output would contain the exceptions class
<ght>
But the point being, this exception should be caught by rescuing SocketErrors and XMLRPC::FaultExceptions?
<ght>
It's coming from a cron job
<jhass>
but the backtrace should also lead you to where it's raised, so you can just look at what class is raised
<ght>
I don't see the exception class specified
<jhass>
then it's RuntimeError
<jhass>
(and worth a bug report to the library author)
<ght>
Interesting, ok
<jhass>
that is if you don't see it at the raise statement
patchedmonkey has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
darkf has quit [Quit: Leaving]
<ght>
jhass: Here's the backtrace as provided in the local user account's mailbox, since cron generates an email to that user if a job's exit status is error:
<ght>
and the error is "Authorization failed. HTTP-Error: 401 Unauthorized".
<ght>
If that is of any use to you.
bigmac has joined #ruby
<ght>
And this is an XMLRPC::Client call that is called over and over, and works 99% of the time, it just happens that at some point, the API provider is down or returns that for whatever reason.
<ght>
for what it's worth, this should not be occurring. I always assumed it was the API provider barfing, but this XLMRPC::Client call is called over and over to the same provider with the same credentials, and out of nowhere returns that.
<tubbo>
that's pretty lame
<tubbo>
that it raises RuntimeError rather than XMLRPC::RuntimeError or something
skade has quit [Quit: Computer has gone to sleep.]
lubarch has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
Kendos-Kenlen has quit [Ping timeout: 250 seconds]
barhum2013 has quit [Quit: barhum2013]
maletor has joined #ruby
barhum2013 has joined #ruby
InternetFriend has joined #ruby
EllisTAA has joined #ruby
gusTester has quit [Read error: Connection reset by peer]
<EllisTAA>
?offtopic
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
gusTester has joined #ruby
joonty has quit [Quit: joonty]
Xeago has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
TheWhip has joined #ruby
<ght>
So this discussion about rescuing a specific exception class within my Ruby code is off-topic to Ruby?
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
<ght>
There's always an issue.
<adaedra>
ght: carry on. This probably was aimed at nobody.
<ght>
I see, thank you.
gusTester has quit [Ping timeout: 240 seconds]
gusTester has joined #ruby
<ght>
So, since I'm at the mercy of XMLRPC::Client here and, even though it probably shouldn't be, it's raising RuntimeError when it hits a 401 unauthorized, is it safe to say that I should simply add RuntimeError to my rescue block to allow code execution to continue?
<ght>
Or will that cose other problems in case other aspects of the program fail? It's a small begin / rescue block, it simply encompasses the XMLRPC::Client call itself
atmosx has quit [Quit: Lost in trance]
<adaedra>
RuntimeError is the base of a lot of exception iirc
zendrix has joined #ruby
<adaedra>
*+s
<ght>
No doubt.
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
So I guess that if you use a resuce with specialized exceptions, it's not to catch most exceptions.
<ght>
Yes, well normally, the only exceptions I seem to encounter with XMLRPC::Client are SocketError and XMLRPC::FaultException
Rickmasta has joined #ruby
<ght>
but for some reason, this generic RuntimeError pops up from time to time. Not sure why the API provider randomly returns a 401 unauthorized, but, there you have it.
gusTester1 has joined #ruby
gusTester has quit [Ping timeout: 246 seconds]
<adaedra>
well, either you change - or make changed - the source of the non-specialized exception, either you catch everything, see inside the rescue block if it's for you, and rethrow otherwise
kp666 has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
Xeago has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zendrix has quit [Read error: Connection reset by peer]
elperdut_ has joined #ruby
pecpec has quit [Remote host closed the connection]
towski_ has joined #ruby
Xeago has joined #ruby
cih has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
zendrix has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cih has joined #ruby
p0wn3d_ has quit [Ping timeout: 260 seconds]
ponga has quit [Quit: Connection closed for inactivity]
DEA7TH has quit [Quit: DEA7TH]
p0wn3d_ has joined #ruby
dravine_ has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
troyready has quit [Remote host closed the connection]
MasterPiece has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
s2013 has joined #ruby
dravine has quit [Ping timeout: 240 seconds]
dravine_ is now known as dravine
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hephaestus_rg has quit [Ping timeout: 265 seconds]
lalalaaa has quit [Read error: Connection reset by peer]
p8952 has joined #ruby
m8 has quit [Quit: Sto andando via]
p0wn3d_ has quit [Ping timeout: 250 seconds]
lalalaaa has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
TheWhip has quit [Remote host closed the connection]
lalalaaa has quit [Read error: Connection reset by peer]
despai has joined #ruby
hephaestus_rg has joined #ruby
chipotle has quit [Quit: cheerio]
maletor has quit []
DmitryBochkarev has quit [Ping timeout: 264 seconds]
sulky has joined #ruby
maletor has joined #ruby
yfeldblum has joined #ruby
lalalaaa has joined #ruby
shmilan has quit [Ping timeout: 246 seconds]
TheWhip has joined #ruby
leafybasil has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
cih has quit [Remote host closed the connection]
pwnd_nsfw has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
_el_fer_ has quit [Ping timeout: 240 seconds]
barhum2013 has joined #ruby
leafybasil has joined #ruby
bakedb has quit [Ping timeout: 264 seconds]
tvw has quit [Ping timeout: 256 seconds]
benaiah has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
zendrix has joined #ruby
eminencehc has quit [Remote host closed the connection]
zendrix has quit [Client Quit]
pocketprotector2 has joined #ruby
tvw has joined #ruby
karapetyan has joined #ruby
TheWhip has quit [Remote host closed the connection]
Alina-malina has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
Alina-malina has joined #ruby
|ifei5g0_ has joined #ruby
rgtk has quit [Ping timeout: 264 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ekinmur has quit [Ping timeout: 264 seconds]
Lucky__ has joined #ruby
barhum2013 has quit [Quit: barhum2013]
bakedb has joined #ruby
TheRinger has joined #ruby
hephaestus_rg has quit [Ping timeout: 250 seconds]
barhum2013 has joined #ruby
freerobby has quit [Quit: Leaving.]
hephaestus_rg has joined #ruby
lalalaaa has quit [Read error: Connection reset by peer]
minimalism has joined #ruby
freerobby has joined #ruby
lalalaaa has joined #ruby
danielroth has joined #ruby
AlexAltea has quit [Read error: Connection reset by peer]
rushed has quit [Quit: rushed]
bubbys has quit [Ping timeout: 250 seconds]
willardg has joined #ruby
danielroth has quit [Remote host closed the connection]
willardg has quit [Client Quit]
tehcyx has joined #ruby
TheWhip has joined #ruby
lenwood has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
C0L0R has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
<tehcyx>
hey guys, i recently saw this: value = _array( -> { key "test", value "test2" }) is that _array a ruby function or do i have to look in the repo for that function? can someone explain what it does or post a link to the documentation?
C0L0R has joined #ruby
C0L0R has quit [Client Quit]
<jhass>
not a core method, no
<jhass>
if you have a place where you can call it, do puts method(:_array).source_location
TheWhip has quit [Ping timeout: 244 seconds]
lalalaaa has quit [Read error: Connection reset by peer]
<BraddPitt>
what is the reason for preceding with an underscore, what does that denote?
lalalaaa has joined #ruby
<jhass>
we can only guess
<BraddPitt>
hm
<BraddPitt>
thought there was a reason behind doing so
<BraddPitt>
ive seen it in a few projects and always wondered
t3rm has joined #ruby
<BraddPitt>
if it crept in from another language idiom or something
SenpaiSilver has quit [Quit: Leaving]
<tehcyx>
in particular, i'm using sparkleformation to create a cloudformation template, the outcome is expected to be this: "sgwithoutegress": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "GroupDescription": "Limits security group egress traffic", "SecurityGroupEgress": [ { "CidrIp": "127.0.0.1/32", "IpProtocol": "-1" } ], "VpcId": { "Ref": "myVPC"} } }
d5sx43 has joined #ruby
<tehcyx>
the _array( .... ) part generates the securitygroupegress in the resulting json
<craysiii>
put it in a gist please.
axl_ has joined #ruby
<tehcyx>
one sec
<BraddPitt>
is it more ruby-like to use single or double quotes on require statements
dfockler has quit [Read error: Connection reset by peer]
sanjayu has joined #ruby
<jhass>
BraddPitt: I guess single quotes still win, but it's like 70%/30% at most. personally I switched to double quotes unless the string contains a double quote (but a single quote) or specifically need to prevent interpolation
devoldmx has joined #ruby
<BraddPitt>
cool, thanks all
<BraddPitt>
was just curious
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lalalaaa has quit [Read error: Connection reset by peer]
d5sx43 has quit [Quit: Leaving...]
<pipework>
jhass: Where do you get 70/30? 70 for double quotes?
elperdut_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tehcyx has quit [Quit: Page closed]
<pipework>
Because very popular tools, frameworks, and libraries, use double quotes a lot, and even generate code that uses double quotes.
timonv has quit [Ping timeout: 265 seconds]
<jhass>
pipework: gut feeling. 70 for single quotes by default
lalalaaa has joined #ruby
<jhass>
rubocop enforces single quotes in the default config for example
<pipework>
Ah, yeah I'm exposed to a lot of newer rubyist code and they tend to double quote.
postmodern has joined #ruby
<apeiros>
I started to try to use double quotes everywhere. and try because I noticed how inconsistent I am.
<jhass>
why did tehcyx quit now m(
<pipework>
jhass: Maybe he's using firefox and his browser shit the bag.
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheWhip has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
p0wn3d_ has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 264 seconds]
symbol_ has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
rgtk has quit [Client Quit]
dfockler has joined #ruby
<BraddPitt>
what is the ruby reasion for naming a variable _
Testo has quit [Ping timeout: 250 seconds]
<BraddPitt>
I see it in iterators/enumerables a lot
Testo has joined #ruby
<BraddPitt>
im only familiar with it from Go as a throwaway val
<pipework>
BraddPitt: Same here.
<jhass>
it turns of the warning about unusued variables
<pipework>
Unused positional variable.
Kendos-Kenlen_ has quit [Read error: No route to host]
<BraddPitt>
ah
lalalaaa has quit [Read error: Connection reset by peer]
<BraddPitt>
neat
jstacks has joined #ruby
karapetyan has quit [Remote host closed the connection]
lalalaaa has joined #ruby
dstarh has joined #ruby
<jhass>
oh and reusage iirc, eg, foo, foo # warning, _, _ # ok
InternetFriend has joined #ruby
rushed has joined #ruby
evanjs has quit [Remote host closed the connection]
rgtk_ has joined #ruby
Kendos-Kenlen has joined #ruby
rgtk_ has quit [Client Quit]
jstacks has left #ruby [#ruby]
TheWhip has quit [Ping timeout: 250 seconds]
diegoviola has quit [Read error: Connection reset by peer]
<cokehead>
hi
cokehead has left #ruby [#ruby]
<rubybeginner>
Hey
atmosx has joined #ruby
<jhass>
too slow, you had 2 seconds!
tuxero has left #ruby [#ruby]
willardg has joined #ruby
<atmosx>
I have this snippet: https://gist.github.com/atmosx/35491a2bf7ebfedd398e .. @entries has a 'created_at' attributed. What's the fastest way to create a hash which displays the @total for every date?
<atmosx>
hi btw
Moonman420 has joined #ruby
dikaio has joined #ruby
<shevy>
pipework I used to do so too
<jhass>
group_by ?
<yxhuvud>
jhass: ok, so the guy redefines #is_a, #class, #respond_to?, #nil? and also define #method_missing. That seems like playing with scissors.
<shevy>
but I found it became ugly, like _tmp
<pipework>
shevy: I think we're talking about two different things.
<jhass>
yxhuvud: building a transparent proxy is fun though
<jhass>
the major thing I'm missing is tricking Module#===
e4xit has joined #ruby
<pipework>
some_hash_with_hashes.map do {|_key, (_nested_key, value)| value.to_s }
<Moonman420>
what is ruby used for?
<jhass>
Moonman420: everything
<newdan>
Moonman420: programming?
<havenwood>
Moonman420: Programming in the general sense.
<Moonman420>
but why is it inferior to c?
<Moonman420>
then
<jhass>
I only use it to save the world!
<jhass>
boring troll detected
<newdan>
Moonman420: Inferior in what way? Ruby is just higher level
<Moonman420>
seriously
<havenwood>
Moonman420: That's like asking why spoons are inferior to forks. They aren't.
<Moonman420>
why are most programming languages inferior to c?
<jhass>
Moonman420: who said so? ask them
<havenwood>
Moonman420: They aren't?
<newdan>
jhass was right, good call
<Moonman420>
no i am serious
<jhass>
Moonman420: though they'll probably talk bullshit
<newdan>
Moonman420: that's okay you're still a troll
allomov has joined #ruby
<Moonman420>
the only thing i used ruby is to make rails apps
<havenwood>
Moonman420: Who said this?
<atmosx>
jhass: will try that ty
<Moonman420>
it's fun to make rails apps
<havenwood>
?rails Moonman420
<ruboto>
Moonman420, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<havenwood>
Moonman420: Ruby is a general purpose programming language.
<Moonman420>
but all the underlying code in the ruby docs uses c
<shevy>
Moonman420 oh ruby is written in C!
<havenwood>
Moonman420: The reference implementation of Ruby is written in C.
<Moonman420>
why not just use c?
<arup_r>
LOL
<slash_nick>
Moonman420: why not just use assembly?
<atmosx>
Moonman420: you have to know thw difference between programming paradigms to understand the answer.
<jhass>
Moonman420: answer yourself first, why don't you do you rails apps in C?
<Moonman420>
why not
<slash_nick>
Moonman420: must be some reason
<havenwood>
Moonman420: You use punchcards. We'll use Ruby. Meet you on the other side!
<jhass>
Moonman420: seriously, answer yourself first
lalalaaa has quit [Read error: Connection reset by peer]
<tubbo>
Moonman420: you ever use C?
<shevy>
Moonman420 don't evade the question
<Moonman420>
assembly doesn't take crap or collect garbage and if you don't know what you're doing then you shouldn't be doing it in the first place
<tubbo>
because i have, and i'd rather write Ruby
<jhass>
I think we're just feeding the troll here
<arup_r>
hehe.. Fun begins.......
<jhass>
let's stop
<pipework>
I'm just not sure why he doesn't use C to write web apps.
User458764 has joined #ruby
<tubbo>
Moonman420: one time i tried to bust assembly's balls. he wasn't having it.
<Moonman420>
because c isn't interpreted :(
lalalaaa has joined #ruby
<Moonman420>
otherwise i'd be using c for everythign
<havenwood>
Moonman420: It is actually, that's an option.
<Moonman420>
in order to write good c you have to compile it and then benchmark the code and see what kind of hardware your users are going to be using and then optimize the code in assembly for your target audience
<pipework>
I wonder when the channel will level up and start encountering high-level trolls
<tubbo>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<tubbo>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<tubbo>
sorry :)
<atmosx>
Moonman420: and avoid some buffer overflow in teh process, mem leaks and so on.
<pipework>
tubbo: ?gals
<tubbo>
that guys guy though was pretty high level
<havenwood>
>.>
<atmosx>
Moonman420: also you need 5.000 lines of code to write an httpd.
axl_ has quit [Read error: Connection reset by peer]
<atmosx>
Moonman420: time is money.
<jhass>
atmosx: let's just stop feeding
<atmosx>
jhass: okay
jgt has joined #ruby
<Moonman420>
if you're too lazy to write 5000 lines of good code you, then you should be ashamed of even calling yourself a programmer
<tubbo>
see this is why i'm not a good programmer, because i don't know the exact hardware specs of every one of the millions of users who visit my site(s) every day.
<jhass>
still boring, try something creative
<tubbo>
yeah for real, this is old news. i want a better troll
<tubbo>
like come in here and be like I JUST CAUGHT DHH FUCKING A 12 YEAR OLD BOY
<tubbo>
but don't give me this boring shit
<shevy>
Moonman420 you need to write 5000 lines?
<Moonman420>
you need to write everything from scratch
<Radar>
arup_r: please don't use !ops unless it's necessary
<Aria>
whoa, tubbo, that was kinda horrible
<Radar>
baweaver: I think arup_r needs a paddlin'
jgt has quit [Ping timeout: 250 seconds]
<shevy>
:)
<BraddPitt>
also ellipses have 3 dots, not 2
<baweaver>
oh, so we're banning arup_r then
<baweaver>
ok
eminencehc has quit [Remote host closed the connection]
<baweaver>
self selection it is
<BraddPitt>
an ellipsis*
<havenwood>
Happy Monday.
<eam>
BraddPitt: tell that to Range
<Aria>
Though also, Moonman420 ... no need to shame people for the amount of effort they have available. Not everyone is a professional programmer, highly trained, with lots of free time.
lalalaaa has quit [Read error: Connection reset by peer]
<BraddPitt>
range != ellipsis though
<eam>
news to me
<slash_nick>
arup_r: For future reference... you can `/msg ruboto (!)ops` to get the list...
bronson has joined #ruby
sundhell has joined #ruby
_djbkd has quit [Ping timeout: 250 seconds]
krisquigley has quit [Ping timeout: 240 seconds]
<jhass>
or /msg NickServ ACCESS #ruby LIST
<arup_r>
ok.
<shevy>
is it time to do !ops again?
<jhass>
shevy: no
<baweaver>
!.mute shevy
<slash_nick>
shevy: !oops
sp4rrow_ has joined #ruby
<Moonman420>
Aria: if you want to do something (whatever you're interested in and passionate about) it's always in your best interest to do it right and to do it with your best effort and abilities
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
p0wn3d_ has quit [Ping timeout: 240 seconds]
<eam>
generally they run things ;-)
* baweaver
whistles innocently
<shevy>
the boss trolls
<shevy>
too much hp to down
<BraddPitt>
is there anything gained by running a task as `bundle exec <command>` instead of just running a rake task and requiring whatever things you need inside that rake task?
yfeldblum has quit [Ping timeout: 246 seconds]
<baweaver>
executes in context of your bundle instead.
lalalaaa has quit [Read error: Connection reset by peer]
<slash_nick>
that'd be a cool IRC channel feature, shevy ... new visitors are given 50HP... +10 HP with every non-annoying return visit, +10 HP for every 10 posts that don't get you banned... kick/ban goes through bots, and each op can only take away 50 HP... so...
poguez_ has joined #ruby
<BraddPitt>
right, but what is the bonus of that baweaver ?
<havenwood>
BraddPitt: Say you have more versions installed that just the ones that actually work with your app.
<BraddPitt>
ah
lalalaaa has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
BraddPitt: RubyGems does support dependency resolution if you `gem install -g` and set: export RUBYGEMS_GEMDEPS=-
<pipework>
eam: I call them 'channel fixtures', like lighting fixtures, they're necessary for illumination.
<shevy>
slash_nick I guess in some ways the karma points on stackoverflow work in a somewhat similar way. like you level up by gaining points which are like XP \o/
<Radar>
odigity: probably a legacy option from Test::Unit
<havenwood>
BraddPitt: But Bundler is quite popular and Rails hardcodes to Bundler.
ericjphillips has joined #ruby
<jhass>
"hardcodes"
<odigity>
BraddPitt, when you run a command with `bundle exec` or "require 'bundler/setup'" in your file, bundler will look at your Gemfile.lock, and for every gem in there, will add the lib path for the specified version of that gem to $LOAD_PATH, which is what ruby uses when you say 'require'
<jhass>
nothing preventing you from dropping the three lines from our config/
|ifei5g00d has quit []
Eiam_ has joined #ruby
<pipework>
jhass: Except there's other bundler invocation.
eminencehc has joined #ruby
<pipework>
config/application.rb I think, or was it boot or something?
jaequery_ has joined #ruby
<jhass>
hence i didn't say boot.rb or application.rb but config/
jamesaxl|2 is now known as jamesaxl
<pipework>
jhass: Ah, I thought the / was a mistyped period.
<jhass>
the setup require is in boot.rb, the Bundler.require call is in application.rb
lalalaaa has quit [Read error: Connection reset by peer]
<pipework>
As in your railsrc, rails config.
<odigity>
I once spent a day trying to understand the Rails initialization process and gave up. I've since switched to Sinatra, and as a result I've learned a lot more about Ruby, core tools like Rack and Bundler and Minitest, and know exactly how every part of my app works. It feels good.
cdg has joined #ruby
<pipework>
odigity: There's a rails initialization guide.
<odigity>
pipework, I read it
tvw has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
<pipework>
I just manually traced through it a long time ago but after rails 3 dropped.
<odigity>
I believe Rails has more lines of code than Sinatra... :)
Axy is now known as mia
mia is now known as Mia
<pipework>
I'm a fan of smaller tools myself
<odigity>
And two weeks in, I absolutely adore the sequel gem.
Testo has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
lalalaaa has joined #ruby
tvon has joined #ruby
<odigity>
I can't think of any gem (possibly open source project in general) that is better designed, documented, and maintained than the sequel gem.
Helheim has joined #ruby
speakingcode has joined #ruby
eminencehc has quit [Remote host closed the connection]
jaequery has quit [Ping timeout: 250 seconds]
<atmosx>
odigity: you're using sinatra MVC?
<havenwood>
odigity: Indeed, though you should checkout Roda by the maintainer of Sequel: http://roda.jeremyevans.net
<havenwood>
odigity: It's lovely!
Testo has joined #ruby
lalalaaa has quit [Read error: Connection reset by peer]
tvon has quit [Client Quit]
smathy has joined #ruby
willardg has joined #ruby
tvon has joined #ruby
<pipework>
havenwood: I was hoping roda would let me mount rack apps at endpoints.
<odigity>
havenwood, I saw the roda repo in jeremy's account, but I've already got enough on my plate learning and using my current new tool set (including sinatra routing). that's why I'm putting off jumping to padrino. now that I'm using simple, well-designed tools that I can reason about, I've developed a hunger to master them before moving on
<odigity>
slash_nick, that's good to know, since I hope to use ES someday
havenn has joined #ruby
<odigity>
atmosx, not sure what you mean by sinatra MVC
Testo has quit [Read error: Connection reset by peer]
Coldblackice_ has joined #ruby
loechel has joined #ruby
<odigity>
slash_nick, that may be true -- but they still have more than zero open issues :) (31 currently) Jeremy maintains a zero-issue policy for sequel. Of course, he achieves it by being a relentless machine of responsiveness...
neanderslob has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
eminencehc has joined #ruby
<odigity>
odigity, it's not a fair comparison -- I've never seen another project attempt such a policy, let alone achieve it -- but you gotta be impressed
Pumukel has quit [Read error: Connection reset by peer]
loechel is now known as Pumukel
<havenn>
odigity: Roda's plugin system is killer. I've found porting simple Sinatra apps over to be a positive process. I'd really recommend looking at it closer when you get a chance. :)
Testo has joined #ruby
<havenn>
odigity: It's just done so well.
<slash_nick>
eh, i don't think that's a very useful measurement... number of open issues...
nolic has quit [Remote host closed the connection]
<havenn>
slash_nick: There literally aren't any issues with the projects though. It's superhero-level maintainership.
<slash_nick>
odigity: when github opens an issue for every pull request, lots of open issues could just mean lots of community contributions
willardg has quit [Client Quit]
<slash_nick>
/involvement
lalalaaa has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
<odigity>
atmosx, I already built a custom app structure from scratch. wanted to learn the core tool well, and figured that was the best way to do it. when I'm ready to upgrade, I'll probably pick something popular and well-maintained like Padrino
<pipework>
Also, zero-issue policies don't mean much without the context of the people closing them.
<pipework>
Some people just respond and close without providing closure.
<odigity>
slash_nick, I believe PRs are counted separately. the elasticsearch-ruby gem, for example, has 31 issues and 13 pull requests. different numbers.
<odigity>
pipework, from everything I've seen about jeremy and sequel, if an issue is opened that represents an actual bug, it will get fixed, not rage-closed
<havenn>
pipework: Oh I can close all the issues on a project, just you watch me! :P
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* havenn
closes all the issues.
<pipework>
havenn: :D
<odigity>
as someone said above, it's superhero-level maintainership. like beyond what's reasonable to ask/expect of any project.
<pipework>
odigity: I just think that it's a false metric for much more than how involved he stays with the project.
<pipework>
It's pretty cool, to be sure.
<havenn>
pipework: Monthly release, like clockwork.
`tim` has quit [Read error: Connection reset by peer]
<pipework>
havenn: I don't care about those myself.
<odigity>
if you want the best metric, I encourage you to read the code. I'm traditionally scared to read the code of major projects, but I regularly dip into his.
<pipework>
New features and bugfixes constantly is pretty cool.
<shevy>
havenwood became a wise man by reading big naughty ruby projects
vdamewood has quit [Quit: Life beckons.]
<pipework>
havenn: Ubuntu releases every six months.
Kendos-Kenlen has joined #ruby
<pipework>
Doesn't say much towards quality, just that people are wiling to do the work to release as often as they do.
<odigity>
havenn, yeah, that's another thing. He releases on the first of each month, whatever's ready to go, which a minor version bump (4.26 -> 4.27). pretty awesome.
<odigity>
pipework, these are not proofs, these are indicators. you know, the kind of thing you utilize when you have less than complete/perfect information...
felixrsmith has quit [Quit: Konversation terminated!]
lalalaaa has quit [Read error: Connection reset by peer]
<pipework>
odigity: Yeah, but they can paint an incorrect picture of reality.
<odigity>
quality is ultimately subjective. look at the code and docs and decide
Soda has quit [Read error: Connection reset by peer]
<pipework>
middle-managers have perfected the use of indicators to portray the narrative they're most fond of.
havenwood has joined #ruby
<odigity>
I give up
<pipework>
Though I'm not saying jeremy is doing anything like that.
sundhell has quit [Ping timeout: 255 seconds]
lalalaaa has joined #ruby
<havenwood>
I'm having such connection trouble today... time for a bouncer.
<pipework>
I'm saying that using those things to say much more than what they say is foolhardy.
<toretore>
"oh no, there hasn't been a new release in over a month! must be shit then"
<pipework>
I met him, he seems like a very great open source developer.
Soda has joined #ruby
<odigity>
It seems you'd prefer people say nothing, because you can't be suggesting that it is possible to articulate accurately the "quality" of a project.
<pipework>
I've been at his talk about roda, it was fantastic, even though I thought it did something a bit different than what it does
<pipework>
odigity: I'm saying that a project being great because of the things you mention is a foolish statement.
TheWhip has joined #ruby
<odigity>
I say those things as indicators because I'm lacking the language to proof "quality" in any objective manner.
<havenwood>
pipework: Starting with barebones and adding plugins to compose the app you want is something I really grok. It's a fun project to read the code of. Remarkably flat and simple.
<pipework>
For me, I prefer bugfixes, features, and documentation as indicators of worthwhile projects.
<odigity>
Whereas at least the things I said above are objectively true.
<shevy>
what is the project you people talk about again?
naftilos76 has joined #ruby
<odigity>
sequel
<pipework>
havenwood: Yeah, I just wanted to be able to mount rack apps in. :(
<pipework>
havenwood: At only a subset of the routes? I didn't find that when I was looking 6 months ago. I'll look again.
Guest53 has joined #ruby
<pipework>
odigity: They may be truths, but they aren't indicators of a great project, just a great maintainer.
<havenwood>
pipework: I'm not sure on timeframe, but yeah good support. The #roda channel is helpful too for finding em.
<havenwood>
pipework: It's been too long since I've read through the plugins, maybe I'll do that this week.
baweaver has quit [Remote host closed the connection]
lalalaaa has quit [Read error: Connection reset by peer]
<pipework>
If a project can be rather crap with those attributes that you mention, then they aren't indicators of a good project.
<pipework>
The sky tends to be blue.
`tim` has joined #ruby
<shevy>
lies!
morenoh149 has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<toretore>
there is only one thing that really matters, and that is the quality of the code
<pipework>
havenwood: Ooh, I see router#run!
lalalaaa has joined #ruby
<toretore>
all the other things in no way indicate this
<odigity>
pipework, I will in the future refrain from saying anything that isn't based on 100% causal relationships between A and B -- which means I don't see much conversation in our future.
apfeluser has quit [Ping timeout: 272 seconds]
<pipework>
odigity: I don't know why you sound so personally involved here.
<shevy>
you two just don't get along
<toretore>
you two are made for each other
<pipework>
I'm glad you're excited about his work, I think it's pretty great.
<pipework>
toretore: And falling short of internal code quality, expectations on public interface and behaviour being met are secondarily appreciable.
TheWhip has quit [Ping timeout: 268 seconds]
sdwrage has quit [Quit: Leaving]
bigmac has joined #ruby
<toretore>
pipework: one could say that external interface is the only thing that matters
<wmoxam>
now, kiss!
sdwrage has joined #ruby
skweek has joined #ruby
<pipework>
toretore: It is what I tend to say.
<pipework>
But for when the source is open, internal cleanliness is good stuff too
unshadow has quit [Ping timeout: 246 seconds]
<toretore>
what the code does internally is of no interest to the consumer; but if it's shit then it's going to be difficult to develop and stagnate
<toretore>
and bugs won't be fixed, features won't be added, etc.
zotherstupidguy has joined #ruby
<pipework>
I was wrong when I said 'internal code quality', I should have just said code quality.
lalalaaa has quit [Read error: Connection reset by peer]
<toretore>
what bothers me about most code is that it doesn't play well with others
<toretore>
assumptions being made all over the place
lenwood has quit [Ping timeout: 256 seconds]
<pipework>
toretore: You do know what happens when you make an assumption, right? People start thinking about asses.
<toretore>
neat looking website > quality
<toretore>
i don't have anything against asses
<shevy>
I got a paddle
willardg has joined #ruby
lalalaaa has joined #ruby
lucasfs7 has joined #ruby
zotherstupidguy has quit [Client Quit]
lucasfs7 has left #ruby [#ruby]
zotherstupidguy has joined #ruby
<goldfish6744>
*pats on shoulder* Just imagine... asses... asses as far as the eye can see. Now grab that paddle and get to work. :)
<wmoxam>
Please don't hit those donkeys
* slash_nick
quickly builds an ass-raft
zotherstupidguy has quit [Client Quit]
dmolina has joined #ruby
zotherstupidguy has joined #ruby
bronson has quit []
ndrei has quit [Ping timeout: 272 seconds]
<slash_nick>
333[>-/o]333333
* pipework
hides the poor donkeys in a hole.
tvon has quit [Quit: leaving]
syath has quit [Quit: WeeChat 1.2]
lalalaaa has quit [Read error: Connection reset by peer]
ericjphillips has joined #ruby
<goldfish6744>
nature gave donkeys their own tools to protect themselves
lalalaaa has joined #ruby
baweaver has joined #ruby
balazs_ has quit [Ping timeout: 265 seconds]
<shevy>
slash_nick lol
<goldfish6744>
had a funny incident with that, though. We were in Spain and in a hotel and I wanted butter for my bread. I speak no Spanish, but obviously I know "butter" in English, then "beurre" in French, also "Butter" in German, so I tried to guesstimate and asked for "burro."
<shevy>
now that you mention this... <3 is a heart... I didn't think before what <3 is without the <
<goldfish6744>
then the waitress started laughing at me. Well yea, "burro" means "donkey" in Spanish. Butter is called "montequila"
zcreative has joined #ruby
zcreative has quit [Remote host closed the connection]
<slash_nick>
odigity: 0 open issues is cool, especially given there are ~750 closed. 185 contributors is also awesome, it almost accounts for 425 forks. assuming it doesn't look as though it's been written by 185 people, that's definitely something to boast. any one metric is not very useful, they're only useful when corroborated by other metrics
zcreative has joined #ruby
zcreative has quit [Remote host closed the connection]
zcreative has quit [Remote host closed the connection]
krisquigley has joined #ruby
<slash_nick>
odigity: but, i know, you weren't saying "lib x rocks because of y"... you were just saying "lib x rocks... and it has y" :)
<goldfish6744>
shevy, yea, it is
ndrei has joined #ruby
<toretore>
the thing about open issues is people will open an issue about all sort of stupid shit
d10n-work has joined #ruby
<slash_nick>
toretore: no kidding...
<odigity>
slash_nick, yes
<goldfish6744>
issue #47617: "Program doesn't do what I want, help." Followup: merged with issues 46821-47491...
loc22 has quit [Ping timeout: 240 seconds]
marr has joined #ruby
<toretore>
"please use the mailing list for questions, please use the mailing list for questions, please use the mailing list for questions"
<goldfish6744>
or dat, yea
* slash_nick
nods
<toretore>
"Issue #2342: make a dsl for integrating with salesforce and sap"
<slash_nick>
Even if there are 5000 closed issues and 0 open... that doesn't mean anything is good. imagine what kind of rube goldberg contraption you might have after 200 people resolve 5000 issues
<pipework>
toretore: Protip: Just turn off issues and use librelist
<goldfish6744>
couldn't you train some small mammal to post that reply? You could make a keyboard macro to type it all in, it should just push the RED key whenever it sees one.
<pipework>
Fuck internet points.
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<bougyman>
slash_nick: a patchy server was that. is that. always will be that.
renderfu_ has joined #ruby
<baweaver>
isn't that what interns are for?
krisquigley has quit [Ping timeout: 264 seconds]
<pipework>
Hopefully, you'll have a mail client. I hear any software project is incomplete until it includes a mail client.
<pipework>
And even then, people still extend emacs.
<goldfish6744>
interns tend to use the computer for all other sort of things as well, and are having all sort of unreasonable expectations (human rights etc)
<slash_nick>
goldfish6744: paychecks, etc
baweaver has quit [Remote host closed the connection]
djcp has quit [Quit: WeeChat 1.0.1]
<slash_nick>
this has really been an OT day.
<goldfish6744>
squirrels ask for extra peanuts at the end of a busy day, at worst
dionysus69 has quit [Remote host closed the connection]
<CooloutAC>
slash_nick: oh you were right, i had to to do it that way
dionysus69 has joined #ruby
martinbjeldbak_ has quit [Ping timeout: 272 seconds]
Voker57 has quit [Read error: Connection reset by peer]
leafybasil has quit [Read error: Connection reset by peer]
naftilos76 has quit [Quit: Αποχώρησε]
<CooloutAC>
it wasn't a one liner cause the if/end were part of it, and if i indent them makes it obvious
leafybasil has joined #ruby
evanjs has joined #ruby
InternetFriend has joined #ruby
leafybasil has quit [Remote host closed the connection]
<slash_nick>
CooloutAC: right-o... sorry i wasn't clear, but it sounds like you understand what i was saying now :)
martinbjeldbak has joined #ruby
<CooloutAC>
yep tks
ndrei has quit [Ping timeout: 240 seconds]
skade has joined #ruby
_blizzy_ has joined #ruby
decoponio has quit [Quit: Leaving...]
shmilan has joined #ruby
skade has quit [Client Quit]
mosez has quit [Ping timeout: 272 seconds]
ldnunes has quit [Quit: Leaving]
yfeldblum has quit [Quit: Leaving...]
dmolina has quit [Read error: Connection reset by peer]
elperdut_ has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
rodfersou has quit [Quit: leaving]
solocshaw has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
sekrit has quit [Ping timeout: 604 seconds]
devoldmx has joined #ruby
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
skade has joined #ruby
mary5030 has quit [Remote host closed the connection]
rushed has joined #ruby
maikowblue has quit [Quit: .]
_blizzy_ has joined #ruby
s2013 has joined #ruby
tubuliferous_ has joined #ruby
umgrosscol has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
Ropeney has quit [Ping timeout: 240 seconds]
morenoh149 has joined #ruby
sepp2k has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
newdan has quit [Ping timeout: 264 seconds]
pecpec has joined #ruby
arup_r has quit [Quit: Leaving]
j5s7 has joined #ruby
morenoh149 has quit [Ping timeout: 256 seconds]
ducklobster has joined #ruby
zayaman has joined #ruby
subscope has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
sepp2k has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
cassioscabral has quit [Quit: cassioscabral]
craysiii has quit [Remote host closed the connection]
jessemcgilallen has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
barhum2013 has quit [Quit: barhum2013]
dagir has joined #ruby
barhum2013 has joined #ruby
Eiam_ has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
simpson has joined #ruby
skade has joined #ruby
spcmastertim has quit [Ping timeout: 246 seconds]
<simpson>
Hi! Thor question: I'm new to Thor but the docs are helpful so far. I know how to specify coercion types for options; how can I do it for positional arguments?
_djbkd has quit [Remote host closed the connection]
skade has quit [Client Quit]
neanderslob has quit [Remote host closed the connection]
j5s7 has quit [Quit: leaving]
yodaman has joined #ruby
yfeldblu_ has quit [Quit: Leaving...]
<simpson>
For example, I want to call my application as `$ bin/app subcommand 42`, and I want to enforce that that positional arg to the subcommand is :numeric. Is there a Thor way to do this or do I have an ad-hoc type check?
pecpec has quit [Remote host closed the connection]
barhum2013 has quit [Client Quit]
zayaman has quit [Read error: Connection reset by peer]
_blizzy_ has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
eminencehc has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
last_staff has quit [Quit: g'nite y'all]
_blizzy_ has joined #ruby
bkulbida has quit [Ping timeout: 272 seconds]
Ropeney has joined #ruby
stacybird has joined #ruby
Eiam_ has joined #ruby
lkba has joined #ruby
CrazyEddy has joined #ruby
freerobby has quit [Ping timeout: 244 seconds]
willardg has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
David27 has joined #ruby
aldodelgado has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
nKulo has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
symm- has joined #ruby
zayaman has quit [Quit: leaving]
<havenwood>
yodaman: The outermost one keeps your code separate from other Ruby code, so it's project-wide. Any module or class for your project then goes in that namespace. I'd suggest avoiding further nesting unless you know why you're doing it.
alexherbo2 has quit [Quit: WeeChat 1.3]
s00pcan has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
yfeldblu_ has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
[Butch] has quit [Read error: Connection reset by peer]
^butch^ has joined #ruby
^butch^ has quit [Client Quit]
yfeldblum has joined #ruby
shmilan has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
inteq has quit [Remote host closed the connection]
Rickmasta has joined #ruby
djbkd_ has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
chandlerbing has joined #ruby
Guest87318 has quit [Quit: This computer has gone to sleep]
bigmac has joined #ruby
Guest87318 has joined #ruby
__butch__ has quit [Ping timeout: 240 seconds]
hydrozen has joined #ruby
Azure has quit [Ping timeout: 272 seconds]
nKulo has joined #ruby
Guest87318 has quit [Client Quit]
maletor has joined #ruby
Pathfinder_ has joined #ruby
uri_ has quit [Ping timeout: 265 seconds]
shmilan has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
Azure has joined #ruby
paulcsmith has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
jobewan has joined #ruby
axl_ has quit [Quit: axl_]
MrJoshua has joined #ruby
symm- has quit [Quit: Leaving...]
paulcsmith has quit [Client Quit]
niemcu has quit [Ping timeout: 265 seconds]
paulcsmith has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
hephaestus_rg has quit [Ping timeout: 246 seconds]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
hephaestus_rg has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has quit [Ping timeout: 255 seconds]
paulcsmith has quit [Ping timeout: 256 seconds]
chandlerbing has quit [Remote host closed the connection]
<Eiam_>
hmm, if I had some code like MyClass.some_function({:attr => "stuff"}) and I wanted to be able to... stringify that and let some code elsewhere actually execute it..
spider-mario has quit [Read error: Connection reset by peer]
chandlerbing has joined #ruby
finisherr has joined #ruby
<Eiam_>
just .send(mystr) ?
<shevy>
.send will invoke a method
<shevy>
so mystr would have to be a method on your target object
<Eiam_>
hmm yeah .send and .call don't seem to be quite what I'm after
willardg has joined #ruby
<Eiam_>
I guess I could say MyClass.send
<shevy>
note that in your example you do not send any arguments to the method that you call via .send()
Oka has joined #ruby
<Eiam_>
yeah.. that requires breaking it all up. i want to try and maintain exactly what you'd write as code
<zhkirill>
Do you mean MyClass.method('some_function').call({:attr => "stuff"}) ?
n008f4g_ has quit [Ping timeout: 250 seconds]
ngscheurich has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
<Eiam_>
I'm looking for a way to turn the code "MyClass.some_function({:attr => "stuff"})" (which written in ruby, would execute) and instead call it later elsewhere
wookiehangover has joined #ruby
hephaestus_rg has quit [Ping timeout: 272 seconds]
<Eiam_>
.send and .call require breaking it up into distinct parts
<inanepenguin>
Turning MyClass.some_function({:attr => "stuff"}) into a string is one thing, but if you have the string you can use Kernel#eval
<shevy>
why
<zhkirill>
By "elsewhere" you mean not from Ruby?
<shevy>
.send will make use of already existing methods
<Eiam_>
zhkirill: still in ruby
<Eiam_>
shevy: I'm writing an ETL source, which will run from a rake task, and I want that source to be something that can be driven by known queries
<zhkirill>
Yeah, eval should work
<Eiam_>
queries being functions on classes
cschneid_ has quit [Remote host closed the connection]
willardg has quit [Client Quit]
<shevy>
methods
elperdut_ has joined #ruby
<Eiam_>
methods =)
paulcsmith has joined #ruby
<Eiam_>
ah yes, eval(mystring) worked
<Eiam_>
hmm, now tell me why im stupid for doing this
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zhkirill>
Oh, Rubyists don't accept "function"?
symm- has joined #ruby
firstdayonthejob has quit [Ping timeout: 264 seconds]
<Eiam_>
maybe I'll be safer ,define two paramters. method & values, and just force it to only allow MyClass.<your values>
<Eiam_>
some minor protection
jaequery has joined #ruby
weemsledeux has joined #ruby
johnzorn has quit [Ping timeout: 246 seconds]
<shevy>
I don't know why you would need eval for when you have .send already
tmillc has quit [Ping timeout: 264 seconds]
weemsledeux has quit [Read error: Connection reset by peer]
bffff_ has quit [Quit: Connection closed for inactivity]
jaequery_ has quit [Ping timeout: 244 seconds]
elperdut_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Eiam_>
shevy: well origially I didn'tw ant to break apart the code
<Eiam_>
so eval did exactly what I wanted
willardg has joined #ruby
<Eiam_>
send requires you name your method then split out the args to it
<shevy>
you have quite a lot of constraints there
<Eiam_>
shevy: =) without constraints, we could do anything!
Guest28550 has quit [Quit: This computer has gone to sleep]
johnzorn has joined #ruby
comm64x has joined #ruby
<comm64x>
this may seem like an odd question but, can you assign a value to an instance variable as an argument in a method, like def foo(@bar=nil)
<drbrain>
comm64x: no
<shevy>
syntax error
platzhirsch has joined #ruby
<comm64x>
in python you can and I'm trying to find a way to get around this
snockerton has quit [Quit: Leaving.]
<Radar>
comm64x: assign the instance variable in the method.
baweaver has quit [Remote host closed the connection]
Spami_ has quit [Quit: This computer has gone to sleep]
<uberjar>
hello
<uberjar>
expect(Time.now.utc.iso8601).to eql(DateTime.now.utc.iso8601) <--- should that work assuming the clocktime was paused long enough for it to execute concurrently ?
<uberjar>
If the time is in UTC, add a Z directly after the time without a space. Z is the zone designator for the zero UTC offset. "09:30 UTC" is therefore represented as "09:30Z" or "0930Z". "14:45:15 UTC" would be "14:45:15Z" or "144515Z".
<drbrain>
last paragraph of that section says "can also be stated numerically"
SCHAAP137 has joined #ruby
<uberjar>
doh! right you are
Lucky__ has joined #ruby
<uberjar>
so they're both valid, just using different variations of the standard.. *sigh*
<drbrain>
uberjar: let's back up, what are you testing?