<seanstickle>
tompsony: lots of new innovative stuff
benson has quit [Remote host closed the connection]
savage-_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<tompsony>
well ... I know it is somewhat out of context to talk about windows. but anyone have any news about a new version? since version 8 was a total failure.
SegFault1X|work2 has quit [Quit: Lost terminal]
graft has quit [Ping timeout: 248 seconds]
w400z_ has quit [Quit: Computer has gone to sleep.]
mengu has quit [Remote host closed the connection]
jjbohn has quit [Client Quit]
cpruitt has quit [Quit: cpruitt]
havenn has quit [Remote host closed the connection]
<Spooner>
canadadry : flat_map was added in Ruby 1.9.3 (I think - maybe 1.9.2).
<canadadry>
this is ruby 1.8.5
<shevy>
tompsony nah. windows is boring once you switch to linux
<shevy>
canadadry that's a really old ruby you have there
<shevy>
but .flatten.map should work
emmanuelux has joined #ruby
<canadadry>
shevy: it's centos 5.8
<canadadry>
rh based distros are garbage, what can I say?
<shevy>
yeah
<canadadry>
just the way the cookie crumbles
dv_ has quit [Read error: Connection reset by peer]
<banisterfiend>
Spooner: Hello.
savage- has joined #ruby
burntbit has joined #ruby
<Spooner>
canadadry : You should use rvm or rbenv to install an up-to-date ruby. 1.8.5 will even fail with a lot of gems nowadays, since no-one would consider putting in compatibility before 1.8.6 or 7.
<banisterfiend>
Spooner: you're from mancheste rright?
<Spooner>
No.
<Spooner>
It isn't far enough.
<canadadry>
Spooner: it has to be able to work on production
<canadadry>
some of our production stuff is older than that
<canadadry>
so...
<canadadry>
yeah
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
dv_ has joined #ruby
w400z has joined #ruby
bbttxu has quit [Quit: bbttxu]
droptable has quit [Ping timeout: 264 seconds]
alek_b_ has quit [Ping timeout: 245 seconds]
burgestrand has quit [Quit: Leaving.]
<Spooner>
Yes, but 1.8.5 :D Come on! I'm surprised rails works, but I suppose you are using an ancient version of that. Oh well, not going anywhere there, but I can roll my eyes a bit, if you'll allow me the indulgence.
alek_b has joined #ruby
m_3 has quit [Read error: Operation timed out]
jjbohn has joined #ruby
m_3 has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
justsee has joined #ruby
bradhe has quit []
bradhe has joined #ruby
Russell^^ has quit [Ping timeout: 240 seconds]
sailias has joined #ruby
ephemerian has left #ruby [#ruby]
canadadry has quit [Quit: Page closed]
phanousit has joined #ruby
droptable has joined #ruby
savage- has quit [Remote host closed the connection]
artOfWar_ has quit [Remote host closed the connection]
Stalkr_ has quit [Quit: Leaving...]
artOfWar has joined #ruby
ringotwo has quit [Remote host closed the connection]
phanousit has quit [Client Quit]
jjbohn has quit [Quit: Leaving...]
w400z has quit []
queequeg1 has quit [Quit: leaving]
jonathanwallace has joined #ruby
artOfWar has quit [Ping timeout: 244 seconds]
verto|off is now known as verto
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
jonathanwallace has quit [Ping timeout: 272 seconds]
<aces1up>
its breaking at the second statement @current_interpreter.has_run?
<meoblast001>
that's from the quickstart
<aces1up>
I would think it wouldn't process that as the first statement evailuates to nil
<meoblast001>
heh, it works if i do quickstart/2... but i think this is a problem
<n_blownapart>
hi . I need some advice about the Pick Axe book, covering 1.8. I have 1.9.3 installed and for review want to go through the famous tutorial, but don't want to get tripped up on all the changes. The essential changes in 1.9 : would I miss out by going through an outdated edition? Could I just familiarize myself with essential changes? ps the book was free of course.
<banisterfiend>
n_blownapart: buy the newest book
<banisterfiend>
:)
<banisterfiend>
dont read out of date stuff, most of 1.9 is compatible with 1.8, but you'll miss out on learning new 1.9 features which are pretty cool
vvgomes has joined #ruby
linoj has quit [Quit: linoj]
Godslastering has quit [Ping timeout: 248 seconds]
<n_blownapart>
Suzanne takes you down, to her place by the river....thanks banisterfiend I won't be a tight-wad ! Varreli a.k.a napolean blownapart
<banisterfiend>
n_blownapart: haha hey
<n_blownapart>
what's up New Zealand..
<banisterfiend>
n_blownapart: not a lot, you saw the pry presentation at berkeley right?
w0lverine has quit [Quit: w0lverine]
<n_blownapart>
banisterfiend: yeah it was cool. they had another presentation on xiki which is quite interesting too...the guy who wrote it was there.
jarred has joined #ruby
Ethan has quit [Ping timeout: 246 seconds]
freeayu has quit [Ping timeout: 246 seconds]
<n_blownapart>
banisterfiend: could I ask you something else re: rails?
<banisterfiend>
n_blownapart: no, i dont do rails
<n_blownapart>
banisterfiend: wow, well I was studying a tutorial and hated all the html stuff. I had a talk with a python programmer who told me to just stick to the pure language.
ForSpareParts has quit [Ping timeout: 255 seconds]
krusty_ar has joined #ruby
IPGlider has joined #ruby
<banisterfiend>
n_blownapart: learn ruby first
<Spooner>
n_blownapart : I dunno. You could learn the basics from the 1.8 book (most things are the same) and then just use online resources to add 1.9 wisdom.
krusty_ar_ has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
mfridh has quit [Read error: Operation timed out]
Hanmac1 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
banisterfiend: please comment on Spooner if you have time ^^
freeayu has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
<banisterfiend>
n_blownapart: IMO if you're unwilling to shell out a few $ on an up-to-date book then you're not serious about learning the language
<banisterfiend>
the version you're learning is 1.8.6, not even 1.8.7
<banisterfiend>
1.8.6 lacked a few features, some of the pretty basic methods in Enumerable which are very handy
<Spooner>
1.8.6 is at least current (EE). 1.8.5 is comedy land :D
verto is now known as verto|off
<n_blownapart>
banisterfiend: Spooner its not the money I have the 1.8 in front of me but I could buy the kindle version. I wanted to really catch up and review pronto thats all.
<banisterfiend>
n_blownapart: you dont know any other languages right?
<banisterfiend>
if that's the case u should probably start with "learn to program" by chris pine
<meoblast001>
so i'm just learning Ruby, and i hear it's a lot like Python in many ways
<meoblast001>
does Ruby have a concept of a "this" or "self" reference?
adamkittelson has quit [Ping timeout: 245 seconds]
<banisterfiend>
meoblast001: Yeah, but it's implicit, like in most other OO languages
<meoblast001>
i'm looking around, but search engines are not very specific when you type "this"
<banisterfiend>
meoblast001: it's 'self'
<meoblast001>
ah, okay. thanks
jjbohn has quit [Quit: Leaving...]
<n_blownapart>
just what I got from Beginning Ruby and about half of Eloquent Ruby which was a bit beyond me. banisterfiend
<meoblast001>
the joys of searching for things when important words in the search string are common words...
<Spooner>
still, things like #each are just the same, as are how variables work (though stuff it will tech, like class variables are a little disliked nowadays, compared to 1.8 days).
<banisterfiend>
meoblast001: ruby "self keyword" brings up a lot of relevant hits on google :)
<meoblast001>
hm, damn you duckduckgo!
<Spooner>
meoblast001 : Ruby is similar to Python in that they are both very high level languages, but then _all_ very high level languages are very high level :)
<meoblast001>
:D
jasonLaster has joined #ruby
<banisterfiend>
jasonLaster: sup jase
<meoblast001>
i figure i know Python and Django, it's time to add Ruby and Rails to my list
<jasonLaster>
banisterfiend: yo
<jasonLaster>
good timing, was just creating a pull-request for pry
<banisterfiend>
jasonLaster: oh to dowhat
<jasonLaster>
you know, basically say that I did :)
<jasonLaster>
ingrid and I added support for cd ../ tabcomplete
<jasonLaster>
its some issue somewhere, fairly minor
<Spooner>
meoblast001 : You might want more specific things to ask than "are they similar in general" though. For exdample, Ruby is strongly OO, coming from Smalltalk. Python is sorta OO, like most purportedly OO languages :D
<banisterfiend>
jasonLaster: cool, how does it work? cos i've seen a few solutions for that which weren't good :P
<banisterfiend>
jasonLaster: but i have faith in yours
<meoblast001>
Spooner: heh :D
<jasonLaster>
haha - uhoh, i'm not sure if im that psyched with mine honestly
<meoblast001>
i picked up Python from a lot of programs that use it, but when i talked to someone at uni about Python and Django, he said "Just learn Ruby, it's Python but better"
<banisterfiend>
jasonLaster: can i see it?
<meoblast001>
i am not yet sure if i will agree...
<meoblast001>
but i figure learning Ruby and Rails can't hurt
<Spooner>
And we talk about chunky bacon, rather than parrots. Totally different.
<meoblast001>
if i like them, great. if i don't, at least i know how to use them
<jasonLaster>
looking for the link. we passed pry into build_complete_proc
<jasonLaster>
and at that point it was fairly easy to add a condition to the case statement to look for ../
<jasonLaster>
that's why i'm not thrilled about it :)
<Spooner>
meoblast001 We obviously think Ruby > Python here :)
<meoblast001>
yes ;P
<meoblast001>
i've always followed the philosophy of "No language is better than another. They all have their own specific purposes", but there might be a problem here
<meoblast001>
the purposes of Python and Ruby sort of overlap
<Spooner>
I have no idea if Rails > Django though. I don't like Rails, myself (I do like Sinatra though).
Gab0 has quit [Read error: Connection reset by peer]
<meoblast001>
aah, Spooner. i read a comparison of Django and Rails. end result was "None is better, just use which one suits you the best"
<Spooner>
Yes, they have very similar niches.
<fowl>
use whichever one gets you laid more!(hint: none)
havenn has joined #ruby
<meoblast001>
the one thing in Rails that makes me "What?" is that i've read it pluralizes tables automatically if you do not specify a name
IPGlider has quit []
manizzle has quit [Ping timeout: 245 seconds]
<meoblast001>
but you can always override that
<fowl>
rails does a lot of weird things
<fowl>
like generating random symbols
<meoblast001>
now you're scaring me :D
<n_blownapart>
banisterfiend: thanks I'm just going to get the kindle pickaxe book and see if I can stand using it on a laptop.
mikepack has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<fowl>
meoblast001: i'm pretty sure that was fixed a while ago
<banisterfiend>
jasonLaster: cool, doe sit complete methods too?
<banisterfiend>
or just variables?
<banisterfiend>
and what about constants?
<meoblast001>
fowl: what was? the fact that you're scaring me? :P
<jasonLaster>
oh, like soemthing other than an instance or local var
Gab0 has joined #ruby
<Spooner>
meoblast001 : Er, it sort of makes sense, if it is what I think you are talking about. Just knows that Employee objects are rows on the Employees table without you needing to explicitly connect those two.
<banisterfiend>
jasonLaster: Yeah, it would be cool if it could complete all symbols in scope
<jasonLaster>
no, that's a good point. if you like the approach i could add that
<jasonLaster>
sure, the code borrows from the ls command heavily
<jasonLaster>
so that would be easy
<banisterfiend>
jasonLaster: but maybe that would require some kind of recursive function ? so that it just calls the complete proc again
<jasonLaster>
in fact, it'd be really nice to abstract that :)
<banisterfiend>
jasonLaster: but in the context of the previous binding
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
<meoblast001>
Spooner: but then it hard codes English-language logic into the pluralization... that seems dirty to me
<fowl>
Spooner: there is a such thing as being too-implicit
<banisterfiend>
jasonLaster: or whichever binding is pointed to by the "../.././" syntax
<jasonLaster>
you know, pass in a scope and get back symbols
fantazo has joined #ruby
<jasonLaster>
I felt like ../../ might be ambiguous
<banisterfiend>
jasonLaster: what do u mean
<Spooner>
A big thing in Ruby is to make assumptions, so you don't need to configure anything unless you want something unusual.
foEs has joined #ruby
<banisterfiend>
jasonLaster: the "../../@x/@y/.." syntax always points to a specific binding, is it possible u could do completion in the context of teh binding it's pointing to?
<jasonLaster>
oh, actually not ambiguous at all. I guess you're just looking at the -2, -3, or -n binding stack.
apok has quit [Ping timeout: 244 seconds]
<jasonLaster>
yea, i was thinking that would collide with ../foo/.. but those are two different uses.
<banisterfiend>
jasonLaster: Yeah, but i use a funciton in 'cd' to always figure out what binding the "../././." syntax points to, maybe u could extract out that code, and re-use it to grab the relevant binding for the completion
Tomasso has quit [Ping timeout: 240 seconds]
<banisterfiend>
jasonLaster: btw u guys seem to have a large number of females at hackerschool, is there some kind of quota?
ForSpareParts has joined #ruby
<jasonLaster>
yup. and in terms of what symbols you'd want I'd love to pull out the ls code...
<jasonLaster>
there was a 5k grant for women.
<jasonLaster>
Etsy, the sponsor, was fantastic about it. It's really changed the dynamic for the better and I believe is really good overrall
<banisterfiend>
jasonLaster: can't you just re-use the completion code but in the context of the pointed-to binding? why do you need to take out the 'ls' code?
<fowl>
america - land of equality, everyone gets a scholarship except white males
<jasonLaster>
take-out is a very strong word. I was just thinking that it would be nice to have one method that took a binding and options for types of symbols and returned an array of symbols that were in that scope
<jasonLaster>
it seems like ls and the complete aspect are similar in that way.
<banisterfiend>
jasonLaster: so the same code that's used to complete: @hel<tab> could be used to complete ../@hel<tab>
<banisterfiend>
just that before completing ../@hel<tab> u find the binding pointed to by the "../"
<banisterfiend>
do u see what im saying? maybe it's obvious
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
<jasonLaster>
actually, i'm afraid we're saying two things. I see a two step process 1. find binding '../../' 2. get symbols
<jasonLaster>
nicely, 1 maps well onto the cd method (obviously), and 2. maps onto the ls method
<banisterfiend>
jasonLaster: but my question is why do you need to do '2' at all, when the completion proc already does that once it's passed the binding it's supposed to work inside
<banisterfiend>
right?
<jasonLaster>
i really havent looked into it, but those seem like common use-cases so it'd be nice to have one method that did both
WardCunningham has joined #ruby
<jasonLaster>
like one general get_scope and one general get_binding
<jasonLaster>
cd and complete share get_scope and cd and complete share get_binding...
Facetious_ has joined #ruby
<jasonLaster>
are we saying the same thing? haha
<banisterfiend>
jasonLaster: IMO you should be calling complete_proc recurseively
<jasonLaster>
hmm. I don't see that yet
burgestrand has joined #ruby
<jasonLaster>
okay. haha, now I see it :)
balki_ is now known as balki
<jasonLaster>
../@test/foo[2]/.. should still work
krusty_ar has quit [Ping timeout: 272 seconds]
<banisterfiend>
jasonLaster: so if you detect that the current line is of the form of a "../sdfads/.df/as/.fas/fas" then u re-call the proc, but pass in the binding that u extract from following the "../sadfasdf/./asd.f/asdf"
<banisterfiend>
jasonLaster: actually, u could use 'redo' instead
<banisterfiend>
jasonLaster: like, u could set the target == to the correct binding after following the object path syntax, then just call "redo"
<banisterfiend>
and it'll rerun the proc, but with the appropriate binding
<banisterfiend>
you'll have to null out the input somehow too
<jasonLaster>
what does redo do?
<banisterfiend>
no, not null it out, but remove all the crap before the last /
<banisterfiend>
'redo' just re-runs the current proc
<banisterfiend>
proc { puts "hi!!"; redo }.call
<banisterfiend>
that displays "hi!!!" an infinite times on the screen
Spooner has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Remote host closed the connection]
<jasonLaster>
oh, ha - i was thinking pry commands
bricker88 has quit [Quit: Leaving.]
WardCunningham has left #ruby [#ruby]
cherrypeel has quit [Quit: Leaving]
<jasonLaster>
so with you're example from up top. you loop through until you get the current binding and then you get the symbols
<fowl>
shame on both of you
eataix has joined #ruby
<fowl>
dirtying my #ruby with your talks of meta crowbars
<jasonLaster>
this feels like two different functions. one for .. and another to handle paths of greater depths
gmci has joined #ruby
<banisterfiend>
jasonLaster: try this proc { v = rand(10); redo if v.even?; puts v }.call
<banisterfiend>
u'll never get an even number
<banisterfiend>
fowl: i love your gypsy mind
<jasonLaster>
for example cd _pry_/@hooks/@ should autocomplete to _pry_/@hooks/@error
<banisterfiend>
Yeah
<banisterfiend>
jasonLaster: how much info do u get about the current line in the completion proc?
<banisterfiend>
do u get the entire line?
<banisterfiend>
or just the word?
<jasonLaster>
you get the entire line minus the prompt
chimkan has quit [Quit: chimkan]
<jasonLaster>
this is because readline and coolline handle it
ForSpareParts has quit [Ping timeout: 250 seconds]
jonathanwallace has joined #ruby
<jasonLaster>
nice redo magic btw
<jasonLaster>
I'm creating a pull-request so that some of this can be discussed on there
nari has joined #ruby
ken_barber has quit [Remote host closed the connection]
jgrevich has quit [Quit: jgrevich]
freeayu__ has joined #ruby
ken_barber has joined #ruby
<jasonLaster>
banisterfiend: what do you think of on enter, executing the previous command?
jonathanwallace has quit [Ping timeout: 264 seconds]
<jasonLaster>
this makes a lot of sense if you're "next"ing through the code and just want to hit enter. It's also common with terminal apps
<banisterfiend>
jasonLaster: i'd like to provide a hook for that so ppl can tune the behaviour
<banisterfiend>
but with the deafult hook executing prior command ya maybe
<banisterfiend>
what do u think fowl
<jasonLaster>
hmm, that makes sense
<jasonLaster>
is that like a before_eval hook or something?
freeayu has quit [Ping timeout: 246 seconds]
<banisterfiend>
maybe..
<banisterfiend>
that could probably work already
<jasonLaster>
yea, before_eval would be in re and would just check to see if the code is empty and if so, add the previous command to the input
mascool has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
<banisterfiend>
jasonLaster: hmm before_eval wont work :/
baroquebobcat has joined #ruby
<banisterfiend>
jasonLaster: cos commands also set an empty code string
<banisterfiend>
we clear out the eval_string after executing the commands, so executing a command is equivalent to just pressing enter as far as re() is concerned
Chryson has quit [Quit: Leaving]
<banisterfiend>
after_read would work though
<banisterfiend>
nah that doesnt either, hehe
baroquebobcat has quit [Client Quit]
<jasonLaster>
hmm, you know what. say no more
<jasonLaster>
this will be a fun puzzle tomorrow
<jasonLaster>
I've been meaning to better understand commands.
foEs has quit [Remote host closed the connection]
<jasonLaster>
I tried and failed to do debug hanoi(3, :a, :b, :c) earlier this week
<jasonLaster>
the desired result was to start a binding.pry before hanoi and then step inside of the function call
baroquebobcat has joined #ruby
<jasonLaster>
everything I tried was close, but not correct
Godslastering has joined #ruby
<banisterfiend>
jasonLaster: can u give me your function
<jasonLaster>
it was modeled after you're dummy method which is in the comment section
deryl has quit [Ping timeout: 240 seconds]
<jasonLaster>
banisterfiend: i'm still confused as to what happens when you drop a binding.pry into your code and then begin "next"ing, i don't think the code after binding.pry is the same thing as an input_stack...
kpshek has joined #ruby
<banisterfiend>
jasonLaster: what does debug do and why does it take a block?
<jasonLaster>
haha - i was playing with the syntax debug {hanoi(3, :a, :b, :c)}
<jasonLaster>
the idea is that it its functionally equivelant to your dummy method
<banisterfiend>
jasonLaster: interesting
<banisterfiend>
that's cool
<banisterfiend>
nice idea
<jasonLaster>
right now, if I want to debug the hanoi call I either set a breakpoint at hanoi def or edit the method to add a binding.pry
<jasonLaster>
but i really just want to type debug hanoi
<banisterfiend>
yeah, holdon
<jasonLaster>
or step hanoi
<jasonLaster>
maybe step would be cleaner
<banisterfiend>
jasonLaster: can't you just use: break hanoi
<banisterfiend>
no..
<banisterfiend>
maybe
<banisterfiend>
let metry
vvgomes has quit [Ping timeout: 272 seconds]
<banisterfiend>
stupid pry-debugger
<banisterfiend>
it only accept files on disk
<jasonLaster>
EXACTLY!
<banisterfiend>
jasonLaster: anyway, excepting the bug in pry-debugger
<banisterfiend>
this works:
<banisterfiend>
break hanoi
<banisterfiend>
hanoi(args)
kpshek has quit [Ping timeout: 264 seconds]
<banisterfiend>
should just be a matter of getting pry-debugger to accept "(pry)" files too
<jasonLaster>
hmm - very cool
<jasonLaster>
what is this (pry) file :)
<jasonLaster>
where do i find it
<banisterfiend>
jasonLaster: nowhere, it's an imaginary file that represents the pry session
<fowl>
look deep within yourself
<banisterfiend>
any methods defined inside pry
zeen has quit [Ping timeout: 240 seconds]
<banisterfiend>
have the "(pry)" file set as their file
<banisterfiend>
we then use that internally to lookup where the methods are defined
<banisterfiend>
so we can retrieve their source
<banisterfiend>
so, if i define a method inside pry, it might get a source_location that looks like this: ["(pry)", 56]
<banisterfiend>
when pry is given a source_location like that, it knows to not treat "(pry)" as a real file, but instead to look in the internal input buffer
<banisterfiend>
and line 56 of the input buffer, to fid the start of the method definition, and then extract out the full source from there
<jasonLaster>
hmm
<jasonLaster>
there's always more to learn :)
<banisterfiend>
jasonLaster: it's the reason wy this works:
<banisterfiend>
def hello
<banisterfiend>
puts 'hi'
<banisterfiend>
end
<banisterfiend>
show-source hello
mikepack has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<jasonLaster>
and show-source (pry)?
<jasonLaster>
is that tougher :)
<banisterfiend>
well show-source only works on methods/classes/modules
<banisterfiend>
so it doesnt make sense to give it (pry) as an argument
<banisterfiend>
though in the future we're thining of letting it output files, so in thta situation if it's given (pry) we would make it output the entire pry line buffer
Guest60601 is now known as meskyanichi
<jasonLaster>
oh shit, i thought there was a way to get pry to show you a file
<banisterfiend>
jasonLaster: there is, the 'cat' command
<banisterfiend>
currently we make a distinctino between cat/show-source, where 'cat' is used for files on disk and 'show-source' is used for code objects, like methods/classes
<banisterfiend>
cat my_file.rb
Guest79471 has quit [Remote host closed the connection]
HRabbit has quit [Ping timeout: 245 seconds]
<banisterfiend>
'cat' is pretty cool as it detects the file type and syntax highlights it properly, so it highlights python code using the python lexer etc, same with html/c/yaml
<banisterfiend>
it also knows that Rakefile and Gemfile contain ruby code, so highlghts those properly too :P
Taichou has joined #ruby
<jasonLaster>
oh man.
<jasonLaster>
the little things
<jasonLaster>
is cat absolute paths starting at home>
<banisterfiend>
jasonLaster: it works with respect to Dir.pwd
<jasonLaster>
cat :ex
<jasonLaster>
oh oops :)
<banisterfiend>
what's :ex ?
<banisterfiend>
we have: cat --ex
<banisterfiend>
'cat' is currently overloaded with too much functionality
TorpedoSkyline has joined #ruby
<jasonLaster>
haha - yea, thats me typing in the wrong place
<banisterfiend>
we have: cat --ex and cat --in
<banisterfiend>
those should both be defined somewhere else i think..
<banisterfiend>
jasonLaster: have you used cat --ex before?
<jasonLaster>
no, but I will now.
baroquebobcat has quit [Quit: baroquebobcat]
<jasonLaster>
that's really handy
<banisterfiend>
jasonLaster: cat --ex is awesome
<banisterfiend>
it came to be in a dream brought by the goddess kali
<banisterfiend>
me*
<jasonLaster>
i guess it's a poorman's exception explorer
<banisterfiend>
Yeah exactly
<banisterfiend>
but it's pretty awesome
<jasonLaster>
most best ideas come in a drug infused high?!?!
<banisterfiend>
i barely use exception_explorer myself though, i normally just use stack_explorer
<banisterfiend>
so i wrap the exception in a: begin; rescue Blah; binding.pry ; end
<banisterfiend>
and use stack_explorer to go up the call stack
HRabbit has joined #ruby
<banisterfiend>
exception_explorer is kind of annoying
<jasonLaster>
yea, the begin wrapper is a great idea.
<banisterfiend>
jasonLaster: have you used exception_explorer ?
Taichou has quit [Ping timeout: 246 seconds]
<jasonLaster>
it was weird. I set it up and ran through the demo before
<jasonLaster>
then I tried to use it today and it let me down
<jasonLaster>
actually i told a friend to use it and it let him down
<banisterfiend>
jasonLaster: it only works on ruby exceptions, that's the limitation
<banisterfiend>
so if there were non-ruby exceptions being raised it wont work
<jasonLaster>
still, it was an ArgumentError
<banisterfiend>
ArgumentErrors it can't catch ;)
<banisterfiend>
as they're internal
<banisterfiend>
it can only catch exceptions that are explicitly raise() ed
<banisterfiend>
since i override the 'raise' method
CannedCorn has joined #ruby
<jasonLaster>
oh, that makes sense. yea i saw that in the code
<banisterfiend>
so, user exceptions
<banisterfiend>
it can only catch user raised exceptions
<banisterfiend>
so it's pretty good in Rails environments
<banisterfiend>
where most exceptions are explicitly raised
<jasonLaster>
yea.
emmanuelux has quit [Ping timeout: 246 seconds]
<jasonLaster>
would you want to put the begin wrapper trick in the exception explorer
<jasonLaster>
and make it an explicit block syntax...
<banisterfiend>
i wrote a LD_PRELOAD shim that overrides the C-level rb_raise() function
<banisterfiend>
but it only works some of the time too
<jasonLaster>
oh weird
<banisterfiend>
it's a tricky problem
lorandi has quit [Quit: Leaving]
<banisterfiend>
jasonLaster: i'd probably put it in stack_explorer i think
<jasonLaster>
yea, this is misleading then `EE.intercept(ArgumentError)`
ken_barber has quit [Remote host closed the connection]
<jasonLaster>
oh, ha - in the example you raise ArgumentError, that's nasty
<jasonLaster>
actually, terrible false marketing
uris has joined #ruby
<banisterfiend>
hehe
<banisterfiend>
jasonLaster: i do have this big "Note" at the top of the README though
<banisterfiend>
"Note, like the hammertime gem, pry-exception_explorer can only really intercept exceptions that are explicitly raised (using the raise method) from Ruby code. This means that exceptions raised by syntax errors or from code such as 1/0 cannot be intercepted. Though experimental support for intercepting such deep (c-level) exceptions is provided by invoking with pry --c-exceptions."
<jasonLaster>
haha - such fine print!
td123 has joined #ruby
<banisterfiend>
second paragraph with a bold first word? :P
<jasonLaster>
what do you think of of the begin wrapper, with a binding.pry :input => "up"
<banisterfiend>
but yeah, its a difficult problem, pry-exception_explorer is only a first stab at it
CannedCo_ has joined #ruby
CannedCo_ has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
leoncamel has joined #ruby
radic_ is now known as radic
ken_barber has joined #ruby
baroquebobcat has joined #ruby
apeiros has quit [Remote host closed the connection]
CannedCorn has quit [Quit: Computer has gone to sleep.]
naz has quit [Ping timeout: 252 seconds]
cpruitt has joined #ruby
naz has joined #ruby
erichmenge has quit [Quit: Be back later]
adamkittelson has joined #ruby
Facetious_ has quit [Ping timeout: 244 seconds]
erichmenge has joined #ruby
CannedCorn has joined #ruby
erichmenge has quit [Client Quit]
igotnolegs has joined #ruby
adamkittelson has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
chimkan_ has joined #ruby
w0lverine has joined #ruby
rehat has quit [Remote host closed the connection]
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Guedes0 has quit [Ping timeout: 246 seconds]
sgronblom has joined #ruby
monkegjinni has quit [Remote host closed the connection]
jasonLaster has quit [Remote host closed the connection]
freeayu has joined #ruby
jonathanwallace has joined #ruby
b1rkh0ff has quit [Ping timeout: 248 seconds]
freeayu__ has quit [Ping timeout: 245 seconds]
burntbit has quit [Quit: Ex-Chat]
ananthakumaran has joined #ruby
havenn has quit [Remote host closed the connection]
charliesome has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
davidcelis has joined #ruby
burgestrand has quit [Quit: Leaving.]
havenn has joined #ruby
niklasb has quit [Ping timeout: 245 seconds]
ken_barber has quit [Remote host closed the connection]
seanstickle has quit [Quit: seanstickle]
graspee has joined #ruby
ken_barber has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
erichmenge has joined #ruby
ik6 has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
<ik6>
can I talk...?
<ik6>
yay!
freeayu has quit [Ping timeout: 246 seconds]
vitor-br has joined #ruby
havenn has quit [Remote host closed the connection]
<ik6>
i have two instances of ruby installed... causing me problems i think. can i just remove one?
<davidcelis>
how?
<davidcelis>
im guessing your first instance of ruby is the system ruby
<davidcelis>
how'd you install the second
<ik6>
i guess i installed it with apt
<ik6>
not really sure
<ik6>
i have 'ruby'
<ik6>
and ruby1.8
<davidcelis>
apt :(
rehat has joined #ruby
<davidcelis>
:(((((
<davidcelis>
uninstall the apt ruby
mahmoudimus has joined #ruby
<davidcelis>
so i guess apt-get remove ruby or apt-get uninstall ruby
mrdodo has quit [Remote host closed the connection]
<davidcelis>
or whatever
<davidcelis>
then use rbenv or rvm ro install a more up to date ruby
<davidcelis>
to*
<ik6>
is 1.8 ok?
<davidcelis>
the problem with apt-get is you dont want shit installed under root
<davidcelis>
no
<davidcelis>
1.8 is old
<ik6>
k, think i was reading an old book :)
freeayu has joined #ruby
User_420 has quit [Quit: Leaving]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Ping timeout: 246 seconds]
banisterfiend` has joined #ruby
viaov has joined #ruby
TorpedoSkyline has joined #ruby
erichmenge has quit [Quit: Be back later]
w0lverine has quit [Quit: w0lverine]
tommyvyo has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has quit [Client Quit]
dankest has joined #ruby
<dankest>
I'm using Enumerator.first(x) to get the first x elements, how can I get the rest after x?
ylluminate has joined #ruby
<fowl>
if you want an array use an array
<fowl>
enumerators are for enumeration
<ik6>
ruby 1.9.1 ok?
<ik6>
to install i mean..
<fowl>
no, use 1.9.3
<dankest>
fowl: word, thanks
<fowl>
dankest: you can easy convert it to array with #to_a
w0lverine has joined #ruby
<ik6>
thanks fowl.
ken_barber has quit [Remote host closed the connection]
<ik6>
hey, thanks davidcelis. it's working now.
vertroa_ has joined #ruby
freeayu has quit [Ping timeout: 244 seconds]
ik6 has quit [Quit: Leaving]
mikeric has joined #ruby
<davidcelis>
:D
jonathanwallace has joined #ruby
freeayu has joined #ruby
jonathanwallace has quit [Ping timeout: 250 seconds]
keyvan is now known as Guest
vvgomes has joined #ruby
ken_barber has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
tiripamwe has quit [Ping timeout: 250 seconds]
eataix has left #ruby [#ruby]
zeen has joined #ruby
cakehero has joined #ruby
ken_barber has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
AndChat| has quit [Ping timeout: 264 seconds]
freeayu has joined #ruby
iamjarvo has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
jarred has quit [Quit: jarred]
vitor-br has quit [Quit: Saindo]
defendguin has joined #ruby
tobym has quit [Remote host closed the connection]
tobym has joined #ruby
UNIXgod has quit [Remote host closed the connection]
UNIXgod has joined #ruby
w7tree has joined #ruby
w7tree has quit [Remote host closed the connection]
Gab0 has quit [Remote host closed the connection]
defendguin has quit [Quit: Leaving.]
butblack has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
thecreators_ has joined #ruby
Emmanuel_Chanel has joined #ruby
kn330 has quit [Ping timeout: 245 seconds]
Guest is now known as keyvan
kn330 has joined #ruby
keyvan is now known as Guest
mikeric has quit [Quit: mikeric]
cherrypeel has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
tk_ has joined #ruby
Bosma has quit [Ping timeout: 240 seconds]
vvgomes has quit [Ping timeout: 272 seconds]
andoriyu has joined #ruby
<andoriyu>
>> {asd: "asd"}.to_json
<andoriyu>
=> "{\"asd\":\"asd\"}"
<al2o3cr>
andoriyu: (String) "NoMethodError: undefined method `to_json' for {:asd=>\"asd\"}:Hash"
<andoriyu>
why?
vvgomes has joined #ruby
tiripamwe has joined #ruby
dhruvasagar has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
butblack has left #ruby [#ruby]
Targen_ has joined #ruby
baroquebobcat has quit [Client Quit]
Targen has quit [Ping timeout: 246 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
tiripamwe has quit [Quit: Leaving]
cherrypeel has quit [Quit: Leaving]
jonathanwallace has joined #ruby
daster has joined #ruby
daster has quit [Client Quit]
baroquebobcat has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
tommyvyo has joined #ruby
dankest has quit [Quit: Leaving...]
Markvilla has joined #ruby
savage- has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
leoncamel has quit [Ping timeout: 246 seconds]
Morkel has joined #ruby
leoncamel has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
meoblast001 has quit [Quit: Leaving]
beakerman has quit [Remote host closed the connection]
beakerman has joined #ruby
s1n4 has joined #ruby
andoriyu has quit [Quit: This computer has gone to sleep]
uris has quit [Quit: leaving]
beneggett has quit [Ping timeout: 244 seconds]
deryl has joined #ruby
javon has quit [Quit: Lost terminal]
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Layke2 has joined #ruby
Guest89851 has joined #ruby
Layke has quit [Ping timeout: 245 seconds]
chimkan__ has joined #ruby
jonathanwallace has joined #ruby
andoriyu has joined #ruby
chimkan_ has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Quit: Leaving...]
jonathanwallace has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
iori has joined #ruby
mmokrysz has joined #ruby
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
dankest has joined #ruby
Bastianx9 has joined #ruby
<Bastianx9>
|| Paypal Account Full Information || Payment Method Liberty Reserve Only || Paypal Account Full Information || Payment Method Liberty Reserve Only || Paypal Account Full Information || Payment Method Liberty Reserve Only ||
Bastianx9 has quit [Killed (idoru (Spam is off topic on freenode.))]
<fowl>
no no we need the routing and account number you boob
tommyvyo has quit [Quit: Computer has gone to sleep.]
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
daniel_hinojosa has joined #ruby
akem has quit [Read error: Connection reset by peer]
user__ has joined #ruby
workmad3 has joined #ruby
savage- has quit [Remote host closed the connection]
shadoi has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
vvgomes has quit [Ping timeout: 246 seconds]
subbyyy has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
Hanmac1 is now known as Hanmac
Targen_ has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
darren has quit [Remote host closed the connection]
kn330 has quit [Ping timeout: 246 seconds]
sahbeewah has joined #ruby
vvgomes has joined #ruby
mrdodo has joined #ruby
beneggett has joined #ruby
Tref has joined #ruby
philips_ has quit [Excess Flood]
ananthakumaran has quit [Ping timeout: 250 seconds]
dhruvasagar has joined #ruby
kn330 has joined #ruby
justsee is now known as justsee|away
jorum has joined #ruby
andrewh has joined #ruby
philips_ has joined #ruby
xbayrockx1 has joined #ruby
ananthakumaran has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
xbayrockx has quit [Ping timeout: 276 seconds]
areil has joined #ruby
sailias has joined #ruby
beneggett has quit [Ping timeout: 264 seconds]
beneggett has joined #ruby
jonathanwallace has joined #ruby
mmokrysz has left #ruby [#ruby]
Morkel has quit [Quit: Morkel]
khakimov has joined #ruby
alanp has joined #ruby
balki_ has joined #ruby
balki has quit [Ping timeout: 240 seconds]
alanp_ has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
justsee|away is now known as justsee
Markvilla has quit [Ping timeout: 250 seconds]
jonathanwallace has quit [Ping timeout: 246 seconds]
Markvilla has joined #ruby
pzol has quit [Ping timeout: 264 seconds]
beneggett has quit [Ping timeout: 240 seconds]
Coad has joined #ruby
qwerxy has joined #ruby
zodiak has quit [Read error: No route to host]
stephenjudkins has joined #ruby
beneggett has joined #ruby
arturaz has joined #ruby
pzol has joined #ruby
rippa has joined #ruby
pskosinski has joined #ruby
flak has joined #ruby
flak is now known as Guest71229
Rizzle has joined #ruby
Guest71229 has quit [Client Quit]
Markvilla has quit [Ping timeout: 246 seconds]
spinagon has joined #ruby
<shevy>
<ik6> i have 'ruby'
<shevy>
<ik6> and ruby1.8
<shevy>
see
<shevy>
debian sucks
answer_42 has joined #ruby
rippa has quit [Ping timeout: 246 seconds]
* Hanmac
has ruby,ruby1.8, ruby1.9.1 and ruby1.9.3 ... find the two links
chriskk has quit [Quit: chriskk]
<fowl>
hey shevy are you mad that arnold isnt in the total recall remake
<Hanmac>
"recall" alone sounds after a remake ... so is this an remake of an remake?
<shevy>
fowl, nah, you need younger faces, arnold is way too old for action movies now
mfridh has joined #ruby
<fowl>
Hanmac: no recall refers to memory
mfcabrera has quit [Ping timeout: 246 seconds]
lantins has quit [Ping timeout: 248 seconds]
<Hanmac>
shevy did you see "last action hero"?
<shevy>
yeah, that one was pretty bad
<fowl>
shevy: i'm looking forward to seeing the three-boobed chick with modern special effects :)
<Hanmac>
:(
<shevy>
hehehe
mfcabrera has joined #ruby
<shevy>
Hanmac, I think there were only two peaks in arnold's career... one was around terminator I, Conan (first one), red heat, predator, total recall ... second one (much smaller) around true lies
<shevy>
though in the second phase he already declined... kindergarten cop, whoever was the director, should be shot
<Hanmac>
i like the storry of "last action hero"
sailias has quit [Quit: Leaving.]
<fowl>
jingle all the way
<fowl>
haha
droptable has quit [Quit: さようなら]
Markvilla has joined #ruby
mpereira has quit [Ping timeout: 246 seconds]
ylluminate has quit [Read error: Operation timed out]
mockra has joined #ruby
und3f has joined #ruby
xaq has joined #ruby
mockra has quit [Ping timeout: 264 seconds]
gmci has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
arturaz has quit [Remote host closed the connection]
liluo has joined #ruby
abra has joined #ruby
manizzle has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
beneggett has quit [Quit: Computer has gone to sleep.]
umttumt has joined #ruby
twinturbo has quit [Quit: twinturbo]
tranzform has joined #ruby
d3vic3 has joined #ruby
s1n4 has quit [Quit: peace out]
lxsameer has joined #ruby
fn4liif3 has joined #ruby
<fn4liif3>
thru the eyes of ...
<fn4liif3>
by the smashing pmpkns
<fowl>
violating your god
<fowl>
by me
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Remote host closed the connection]
lxsameer has joined #ruby
jonathanwallace has joined #ruby
Rajesh has joined #ruby
Rajesh is now known as Guest34230
Stalkr_ has quit [Quit: Leaving...]
Guest34230 has quit [Max SendQ exceeded]
lxsameer has quit [Ping timeout: 246 seconds]
jonathanwallace has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
lxsameer has joined #ruby
Guest34230 has joined #ruby
umttumt has quit [Remote host closed the connection]
Jake232 has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasa1ar has joined #ruby
burgestrand has quit [Quit: Leaving.]
foEs has quit [Read error: Connection reset by peer]
Guest34230 has quit [Max SendQ exceeded]
kernelpanix has joined #ruby
dhruvasagar has joined #ruby
dhruvasa1ar has quit [Ping timeout: 272 seconds]
Guest34230 has joined #ruby
umttumt has joined #ruby
kvirani has joined #ruby
Guest11736 has quit [Ping timeout: 245 seconds]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
lxsameer has quit [Quit: Leaving]
verto|off is now known as verto
niklasb has joined #ruby
yasushi has quit [Ping timeout: 246 seconds]
chichou has quit [Remote host closed the connection]
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
Drunkma is now known as Sigma00
kernelpanix has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
Guest11736 has joined #ruby
dhruvasagar has joined #ruby
yasushi has joined #ruby
verto is now known as verto|off
hsbt has quit [Ping timeout: 276 seconds]
Jake232 has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
burgestrand has joined #ruby
vlad_starkov has joined #ruby
hsbt has joined #ruby
jjbohn has joined #ruby
Agis__ has quit [Quit: Agis__]
verto|off is now known as verto
kidoz has joined #ruby
verto is now known as verto|off
cakehero has joined #ruby
freeayu__ has joined #ruby
beakerman has quit [Remote host closed the connection]
beakerman has joined #ruby
akem has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
saschagehlich has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
apeiros_ has joined #ruby
flint__ has joined #ruby
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
freeayu3 has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
dv310p3r has joined #ruby
user has joined #ruby
freeayu__ has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
qwerxy has quit [Quit: offski]
leoncamel has quit [Ping timeout: 240 seconds]
Taichou_ has joined #ruby
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
lxsameer has joined #ruby
jjbohn has quit [Quit: Leaving...]
jimeh has quit [Quit: bye]
tranzform has quit [Remote host closed the connection]
Taichou_ has quit [Ping timeout: 244 seconds]
lxsameer has quit [Max SendQ exceeded]
dhruvasagar has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
yasushi has quit [Ping timeout: 240 seconds]
feelx_ has joined #ruby
alphanumeric has quit [Ping timeout: 244 seconds]
d3vic3 has quit [Quit: leaving]
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
kjellski has joined #ruby
feelx_ has left #ruby [#ruby]
feelx has joined #ruby
mfcabrera has quit [Read error: Connection reset by peer]
mfcabrera has joined #ruby
<kjellski>
If I have a big csv file, what's the best way to slice it to process it slice-wise? currently I'm using the csv gem.
strife25 has joined #ruby
burgestrand has quit [Quit: Leaving.]
<bnagy>
csv shouldn't be a gem - it's in stdlib
<bnagy>
and it has lots of examples :)
<kjellski>
bnagy: sure, no gem, std lib… okay I'll have a look again… you're sure there is one for this problem?
<fowl>
there are alternatives that are gems
<bnagy>
well it includes enumerable
yasushi has joined #ruby
<fowl>
i never liked any of them though
<bnagy>
so you have each_line and everything else
<kjellski>
should I just read linke 1000 lines and map them in a thread to process and then reduce afterwards? ;) sounds familiar…
<bnagy>
imho I'd use each_line cause I bet that's what everything else is built on
freeayu__ has joined #ruby
<fowl>
well
<apeiros_>
kjellski: don't process *line* wise, but *record* wise
<fowl>
csv.rb handles multiline strings
<bnagy>
sry foreach they call it
<fowl>
iirc
<apeiros_>
newline is not a reliable record separator (it is allowed within values in csv)
<kjellski>
apeiros_: yes, that's what I mean...
akem has quit [Read error: Connection reset by peer]
<fowl>
kjellski: how big of a file is it
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
freeayu3 has quit [Ping timeout: 246 seconds]
<kjellski>
fowl: like 400k entries...
<apeiros_>
but yes. the basic approach would probably be to have a producer thread (which only parses the csv and slices it) and a couple of consumer threads
<_axx>
hey guys, i have an array like this [{:username => 'peter', :password => 'test'}] and i want to get only the params + values (i'll add them to an API call like this API.call('post',*args), args in this case, should be the array of values but only like :username => 'peter', :password => 'test', how can i achieve this? :)
prometheus has joined #ruby
ppawel has joined #ruby
<Mon_Ouie>
You mean you want to do API.call("post", :username => "peter", :password => "test") in the end?
<Mon_Ouie>
If so, that's just a fancy syntax for hashes, it doesn't pass multiple arguments
u_u has quit [Read error: Operation timed out]
<Mon_Ouie>
API.call("post", {k => v, …}) is the same thing
berserkr has joined #ruby
u_u_ has quit [Quit: Page closed]
<virunga>
>> :ciao
<al2o3cr>
virunga: (Symbol) :ciao
baphled has quit [Ping timeout: 272 seconds]
prometheus has quit [Ping timeout: 250 seconds]
Godslast1ring has joined #ruby
Godslastering has quit [Ping timeout: 246 seconds]
Godslast1ring is now known as Godslastering
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
monkegjinni has joined #ruby
s1n4 has quit [Quit: leaving]
elhu has quit [Quit: Computer has gone to sleep.]
<_axx>
Mon_Ouie: the problem is, i have in my API.call(method, *args)
<_axx>
because i have sometimes more args than these two
beakerman has quit [Remote host closed the connection]
jimeh has joined #ruby
<Mon_Ouie>
But you do understand that a hash is only *one* argument?
<_axx>
oh
<_axx>
yeah
<_axx>
hadn't thought about the 'post', {}
<_axx>
yeah that should solve it
<Hanmac>
_axx do it with call(method, opt = {})
beakerman has joined #ruby
<_axx>
good idea! :)
freeayu__ has quit [Ping timeout: 246 seconds]
elhu has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
fowl is now known as fowlzzzzzzzzzzzz
<kjellski>
could someone tell me how to open a file with csv as writable while providing the options hash
yoklov has joined #ruby
yasushi has quit [Remote host closed the connection]
elhu has quit [Quit: Computer has gone to sleep.]
yasushi has joined #ruby
u_u has joined #ruby
malkomalko has joined #ruby
malkomalko has quit [Remote host closed the connection]
freeayu has joined #ruby
umttumt has quit [Remote host closed the connection]
yasushi has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
lxsameer has quit [Max SendQ exceeded]
shevy has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
jrajav has joined #ruby
lxsameer has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
whitedawg has joined #ruby
lxsameer has quit [Remote host closed the connection]
niklasb_ has quit [Quit: WeeChat 0.3.8]
niklasb has joined #ruby
sailias has joined #ruby
yasushi has quit [Remote host closed the connection]
tommyvyo has joined #ruby
chimkan_ has joined #ruby
yasushi has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
mahmoudimus has joined #ruby
nateberkopec has joined #ruby
yekta has joined #ruby
ppawel has quit [Ping timeout: 246 seconds]
yasushi has quit [Ping timeout: 246 seconds]
shevy has joined #ruby
deryl-android has quit [Remote host closed the connection]
chimkan__ has joined #ruby
chimkan__ has quit [Client Quit]
dankest has joined #ruby
dankest has quit [Client Quit]
jorge_ has joined #ruby
chimkan_ has quit [Ping timeout: 246 seconds]
jimeh has quit [Read error: Connection reset by peer]
<kjellski>
aha! this is a 1.9.3 csv feature… :/
bothra has joined #ruby
rodj has quit [Quit: rodj]
Gab0 has joined #ruby
bondar has joined #ruby
samuel02 has quit [Remote host closed the connection]
kirun has joined #ruby
Markvilla has joined #ruby
mpereira has joined #ruby
skipper has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Tomasso has quit [Ping timeout: 272 seconds]
vvgomes has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
skipper has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
minijupe has joined #ruby
nateberkopec has joined #ruby
cakehero has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
<shevy>
sex
bondar has quit []
d-snp has joined #ruby
bondar has joined #ruby
bondar has quit [Excess Flood]
jonathanwallace has quit [Ping timeout: 246 seconds]
<Tasser>
shevy, testing the local filter?
reuf has joined #ruby
reuf has quit [Client Quit]
rodj has joined #ruby
jasonLaster has joined #ruby
<shevy>
lol
snearch has joined #ruby
<shevy>
just checking if I am connected again
cakehero has quit [Quit: Computer has gone to sleep.]
jrajav has quit [Quit: The best darkness is strange and surprising]
Eypeon_ has left #ruby [#ruby]
mengu has joined #ruby
mockra has joined #ruby
sequethin has joined #ruby
yoklov has quit [Quit: computer sleeping]
wallerdev has joined #ruby
nateberkopec has joined #ruby
bairui has quit [Ping timeout: 248 seconds]
ppawel has joined #ruby
flint__ has quit [Ping timeout: 248 seconds]
stephenjudkins has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
jorge_ has quit [Remote host closed the connection]
havenn has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
saschagehlich has quit [Quit: saschagehlich]
sgupta has joined #ruby
tomb_ has joined #ruby
whitedawg1 has joined #ruby
notVert has joined #ruby
mengu has quit [Ping timeout: 246 seconds]
knirhs has quit [Ping timeout: 246 seconds]
<yekta>
What must I do to update a forked gem in github such that my gemfile will know to pick up the changes on a `bundle`
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
mikeric has quit [Quit: mikeric]
<davidcelis>
you pointed :github => 'your/fork' ?
whitedawg has quit [Ping timeout: 272 seconds]
Vert has quit [Ping timeout: 252 seconds]
mucker has quit [Quit: leaving]
Guedes0 has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<yekta>
davidcelis: If your referring to the gemfile i've got "gem 'mygem', :git => "git://github.com/me/mygem.git"
<davidcelis>
bundle update?
ananthakumaran has joined #ruby
<davidcelis>
p.s. you can do :github => 'username/repo' and it's a nice shortcut. bundler is cool
lxsameer has quit [Max SendQ exceeded]
whitedawg1 has quit [Quit: Leaving.]
<yekta>
davidcelis: OK, I believe that worked, thanks.
sgupta has quit [Ping timeout: 272 seconds]
ZachBeta has joined #ruby
busybox42 has quit [Ping timeout: 248 seconds]
Shrink has joined #ruby
JohnBat26 has joined #ruby
s1n4 has joined #ruby
Taichou_ has joined #ruby
busybox42 has joined #ruby
PapaSierra has joined #ruby
s1n4 has quit [Client Quit]
s1n4 has joined #ruby
Taichou_ has quit [Read error: Operation timed out]
<PapaSierra>
super quick question: i don't know ruby at all. please see http://www.hastebin.com/boseguhuya.ruby line 17 complains saying: `method_missing': undefined local variable or method `env'
<havenn>
PapaSierra: On your line 17, the stuff between the double-quotes is a String. The '#{}' is used for String interpolation (e.g., "#{1 + 1}" #=> "2").
virunga has quit [Ping timeout: 250 seconds]
<havenn>
PapaSierra: env is a local variable that isn't defined, hence the error
<PapaSierra>
great, understood. now given what i'm *trying* to do on line 4, can you suggest the correct way to make line 17 and line 4 understand each other
<havenn>
PapaSierra: Uncomment out line 15.
<PapaSierra>
i don't want to. i want to line 4 or line 10 to execute depending on which "task" i run. therefore i don't want line 15 at all
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<PapaSierra>
maybe line 4 should read: $domain = "staging"
<havenn>
PapaSierra: @domain =
<PapaSierra>
ok, will an instance variable (@) be visible in that scope?
havenn has quit [Remote host closed the connection]
iamtakingiteasy has quit [Ping timeout: 252 seconds]
cpruitt has quit [Quit: cpruitt]
<PapaSierra>
havenn @env = "staging" is not seen by the time it reaches line 17
flip_digits has joined #ruby
bier has quit [Ping timeout: 248 seconds]
burgestrand has joined #ruby
<Hanmac>
PapaSierra? you mean the set methods?? i think you may havnt understand it
<PapaSierra>
Hanmac, thanks a lot that did it. i see why it works (scoping issue) not yet sure how :deploy_to will be seen outside that scope though, but for now it appears to be working
ThaDick has joined #ruby
Gulit has joined #ruby
paradoja has quit [Ping timeout: 246 seconds]
conor_ireland has joined #ruby
td123 has joined #ruby
knirhs has joined #ruby
mengu has quit [Remote host closed the connection]
Shrink has quit [Read error: No route to host]
cj3kim has quit [Quit: This computer has gone to sleep]
sgupta has joined #ruby
Spaceghostc2c has joined #ruby
saschagehlich has joined #ruby
mockra has quit [Remote host closed the connection]
Niamkik has joined #ruby
MrZYX has joined #ruby
mjburgess has joined #ruby
knirhs has quit [Ping timeout: 250 seconds]
MrZYX has left #ruby [#ruby]
cj3kim has joined #ruby
cj3kim has quit [Client Quit]
elhu has joined #ruby
chrxn_ has joined #ruby
mjburgess has quit []
mdesrosiers has left #ruby [#ruby]
dpk has joined #ruby
Niamkik has quit [Quit: leaving]
knirhs has joined #ruby
chrxn_ has quit [Read error: Connection reset by peer]
dv310p3r has quit [Ping timeout: 246 seconds]
baphled has quit [Read error: Operation timed out]
virunga has joined #ruby
cakehero has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
sgupta has quit [Read error: No route to host]
fastred has joined #ruby
virunga has quit [Client Quit]
baphled has joined #ruby
u_u has quit [Read error: Operation timed out]
ananthakumaran has joined #ruby
akem has quit [Ping timeout: 272 seconds]
burgestrand has quit [Quit: Leaving.]
Beoran has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
virunga has joined #ruby
knirhs has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
ylluminate has joined #ruby
mneorr has joined #ruby
banseljaj has quit [Remote host closed the connection]
sailias has quit [Read error: Connection reset by peer]
mockra has joined #ruby
fbernier has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
subbyyy has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
khakimov has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
thecreators_ has quit [Quit: thecreators_]
ZachBeta has quit [Quit: Computer has gone to sleep.]
nateberkope has joined #ruby
mockra has quit [Remote host closed the connection]
fbernier has quit [Ping timeout: 246 seconds]
jbw has quit [Ping timeout: 245 seconds]
nateberkopec has quit [Read error: Connection reset by peer]
uris has quit [Ping timeout: 244 seconds]
Jake232 has joined #ruby
u_u has joined #ruby
nateberkope has quit [Ping timeout: 272 seconds]
td123 has quit [Ping timeout: 272 seconds]
artOfWar has joined #ruby
uris has joined #ruby
Hanmac has joined #ruby
brianpWins has joined #ruby
s1n4 has left #ruby ["leaving"]
RegEchse has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 246 seconds]
td123 has joined #ruby
sailias has joined #ruby
sailias has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
fbernier has joined #ruby
defendguin has joined #ruby
samuel02 has joined #ruby
samuel02 has quit [Remote host closed the connection]
mobilegamelabs has joined #ruby
Markvilla has quit [Quit: Markvilla]
Jake232 has quit [Quit: Computer has gone to sleep.]
savage- has quit [Remote host closed the connection]
jbw has joined #ruby
wedgeV has quit [Quit: wedgeV]
davorb has joined #ruby
<davorb>
hey guys. i need some help with a little something.
Markvilla has joined #ruby
arietis has joined #ruby
<davorb>
i basically want to define a class with methods that I can call using this method call "myclass.something.method"
<davorb>
how would you go about defining something like that? it's the "something" part that gets me, and I have no good looking solutions for it.
apeiros_ has quit [Remote host closed the connection]
<Hanmac>
davorb "def self.classmethod"
flint__ has joined #ruby
<davorb>
Hanmac: where would I keep the "something" in there? i'm basically after something similar to "def something.othername"
<davorb>
I guess I could return a class, but that seems stupid
<Hanmac>
WHY do you want to return a class?
<davorb>
i don't
<davorb>
let's say that i have a class called "a". i want to call a method like this "a.b.c.d". how do i define that?
<Hanmac>
oO you can do that oo
jorge has joined #ruby
<Hanmac>
>> class A; def self.abc; "i am a classmethod"; end;end;
<al2o3cr>
Hanmac: (NilClass) nil
Markvilla has quit [Quit: Markvilla]
<Hanmac>
so you define class methods
iamjarvo has quit [Quit: Leaving...]
gmci has quit [Ping timeout: 272 seconds]
<davorb>
Hanmac: here's the thing hanmac, I NEED to have dots between a.b.c. I don't just want to create a class method called abc.
<davorb>
I literally want to do a.b.c
<davorb>
and it's an instance of the class, so i don't need a class method
<Hanmac>
a = 10; a.to_s.length
<Hanmac>
>> a = 10; a.to_s.length
<al2o3cr>
Hanmac: (Fixnum) 2
<Hanmac>
you can chain methods into infinite
phinfonet has joined #ruby
chichou has joined #ruby
apeiros_ has joined #ruby
<davorb>
okay, let's put it this way
sailias has joined #ruby
<davorb>
what's the fastest way to define this method: my_object.method_a.method_b
<davorb>
does method_a HAVE to return a class so that I can call method_b on it?
shadoi has quit [Quit: Leaving.]
sailias has quit [Read error: Connection reset by peer]
<Hanmac>
you cant define "method_a.method_b" in one step
entrenador has joined #ruby
<Hanmac>
you can do my_object.tap{|o|o.method_a;o.method_b}
wallerdev has quit [Quit: wallerdev]
<davorb>
ah, thx
davorb has quit [Quit: Lost terminal]
<Hanmac>
davorb what programming languages did you learn before? ... dont tell me it was java
<shevy>
hehe
<apeiros_>
meh, he went off too quickly…
<shevy>
Hanmac scared him
arietis has quit [Quit: Computer has gone to sleep.]
<shevy>
lol
<Hanmac>
i only teach guys who want to learn
mpereira has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
liluo has quit [Remote host closed the connection]
wallerdev has joined #ruby
bothra has quit [Ping timeout: 245 seconds]
mdupont has quit [Ping timeout: 276 seconds]
arietis has joined #ruby
sailias has quit [Client Quit]
Guest61436 is now known as taec
parus has quit [Ping timeout: 244 seconds]
ylluminate has quit [Ping timeout: 244 seconds]
Choobie has joined #ruby
fastred has quit [Quit: fastred]
parus has joined #ruby
areil has quit [Remote host closed the connection]
jankly has quit [Ping timeout: 250 seconds]
mohits has quit [Read error: Connection reset by peer]
mobilegamelabs has quit [Quit: Angry Polygon (iPhone/Android/Mac) - http://www.MGGGGG.com/ap #ratingexchange]
elhu has quit [Quit: Computer has gone to sleep.]
chichou has quit [Remote host closed the connection]
jfelchner has quit [Quit: WeeChat 0.3.7]
mahmoudimus has joined #ruby
iamjarvo has joined #ruby
und3f has quit [Quit: Leaving.]
und3f has joined #ruby
AlbireoX has joined #ruby
w400z has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
akem has joined #ruby
flip_digits has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
Gulit is now known as Tsunekazu
emmanuelux has quit [Read error: Connection reset by peer]
sailias has joined #ruby
jhunter has quit [Ping timeout: 246 seconds]
yxhuvud has joined #ruby
apeiros_ has quit [Remote host closed the connection]
knirhs has joined #ruby
jhunter has joined #ruby
codezombie has joined #ruby
chussenot has joined #ruby
jgrevich_ has joined #ruby
jgrevich_ has quit [Client Quit]
jgrevich_ has joined #ruby
Shrink has quit [Ping timeout: 246 seconds]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
mockra has joined #ruby
<PapaSierra>
anyone here use capistrano?
knirhs has quit [Ping timeout: 240 seconds]
<Hanmac>
never heard
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
chussenot has quit [Quit: chussenot]
emmanuelux has joined #ruby
mikeric has joined #ruby
flip_digits has joined #ruby
verbad has quit []
mockra has quit [Ping timeout: 246 seconds]
Tsunekazu has quit [Ping timeout: 264 seconds]
ppawel has quit [Ping timeout: 240 seconds]
knirhs has joined #ruby
iamjarvo has quit [Quit: Leaving...]
spinagon has joined #ruby
viaov has quit [Quit: viaov]
Shrink has quit [Read error: Connection reset by peer]
sgupta has joined #ruby
artOfWar_ has joined #ruby
subbyyy has joined #ruby
axl_ has joined #ruby
axl_ has quit [Client Quit]
niklasb has quit [Quit: WeeChat 0.3.8]
niklasb has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
<Spaceghostc2c>
PapaSierra: Yes.
<Spaceghostc2c>
Hanmac: It's used mostly by rails people. :(
knirhs has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby
vertroa_ has quit [Remote host closed the connection]
<Hanmac>
then you are both in the wrong channel ... goto #rubyonrails
niklasb has quit [Client Quit]
niklasb has joined #ruby
phinfonet has quit [Quit: phinfonet]
knirhs has joined #ruby
verbad has joined #ruby
sgupta has quit [Ping timeout: 246 seconds]
habib has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
knirhs has quit [Ping timeout: 272 seconds]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
wedgeV has joined #ruby
vvgomes has quit [Ping timeout: 244 seconds]
paolooo has joined #ruby
verbad has quit [Client Quit]
shlim has quit [Remote host closed the connection]
knirhs has joined #ruby
shlim has joined #ruby
chichou has joined #ruby
<davidcelis>
10 PRINT "FUCK YOU"
<davidcelis>
20 GOTO #RUBYONRAILS
chichou has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
<Hanmac>
davidcelis didnt you know? ruby has goto too :P
sailias has quit [Client Quit]
<davidcelis>
I see Ruby's goto as more of a cruel joek
<davidcelis>
joke, even
paolooo has quit [Client Quit]
entrenador has quit [Quit: Lost terminal]
Shrink has quit [Ping timeout: 246 seconds]
paolooo has joined #ruby
bluenemo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
tk_ has quit [Quit: ばいばい]
<Hanmac>
yeah there must be Jokes supported :P SUPPORT_JOKE = 1
knirhs has quit [Ping timeout: 246 seconds]
elhu has joined #ruby
Shrink has joined #ruby
bluenemo has joined #ruby
shadoi has joined #ruby
zemanel has joined #ruby
<habib>
hey
<habib>
i've just installed ruby and when i'm trying toi install gems using sudo gem install gosu for example it says there are no such command
jjbohn has joined #ruby
<habib>
anyone know how to install gosu?
<Hanmac>
habib whats your os?
<habib>
ubuntu
<Hanmac>
install ruby1.9.1-full
<habib>
i've allready installed 1.9.3. p194
<Hanmac>
and then do "sudo update-alternatives --config ruby" and pick the newer version
phinfonet has joined #ruby
lambdan has joined #ruby
<habib>
won't it be conflictable?
<Hanmac>
no it only changed the link
wedgeV has quit [Quit: wedgeV]
<lambdan>
i have a log file from irssi, and in the begining every line has "08-03|" (the current date), what do i want to use to make ruby import that file and remove all those?
<_axx>
hey guys, what's the best way to manipulate yaml files? I'm building a gem and write a dotfile to the homedir of a user. i want to save different configuration options in it. :}
<jrajav>
But even after doing the entire process, what happens after this?:
<jrajav>
Do you enter a shell inside the new "vm"?
<jrajav>
If so, how do you lxc-create, run something, and lxc-destroy programmatically?
joshman_ has joined #ruby
iamjarvo has quit [Quit: Leaving...]
Markvilla has joined #ruby
defendguin has joined #ruby
<jrajav>
Most importantly, is starting and stopping a container actually fast and light enough for a bot like this?
w400z has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
<rking>
jrajav: OK
beakerman has quit [Ping timeout: 264 seconds]
<rking>
I would help you out more but I'm trying to do a couple of tasks before I hate myself for not finishing them for the day, but:
<jrajav>
It's okay, I can't do anything more with the bot till Monday anyway
ThaDick has joined #ruby
<rking>
I wouldn't create and destroy them except on special command. Come up with some I/O mechanism, then use that (I'm thinking a Unix pipe could be created then would work after the sandbox is entered)
stephenjudkins has joined #ruby
noyb has joined #ruby
<rking>
Then it's just a play-land that can exist for however long. Files created can still exist, etc. A single >> restart! or !>!> or whatever you want could kick it off afresh.
<jrajav>
You're still hung up on the persistent sessions thing :P
<jrajav>
I still think keeping a single Ruby instance open would be more complicated than it's worth, but keeping files around would probably be easier to manage
<rking>
Well, yes, of course, but for this one you can give or take that part. I'm only referring to the container.
<jrajav>
Yeah
<rking>
jrajav: When I used LXC's we didn't lock down net access, so the contained stuff was easy to control. I imagine there's a super-simple mechanism even if you don't have net, though, because otherwise how would the whole tool be useful at all?
<jrajav>
Maybe in the future if we get around to gist stuff, that can replace whatever you'd want persistent sessions for
<rking>
Well, if I had persistent files I could get the persistent session easily enough. Perhaps it'd be cleaner.
<jrajav>
What, just append and re-run the whole file each time?
<rking>
OK. Then I'll put nagging you about it on my TODONT list.
<jrajav>
I'll try to get to it before we all just forget about it and stop caring
<jrajav>
rking: Haha
Stalkr_ has joined #ruby
<jrajav>
On the other hand, if I leave it for too long Hanmac will probably get bored and start playing around with the VM's filesystem
Taichou has joined #ruby
<jrajav>
I'll ls ~ and see hundreds of files named stuff like HANMAC-WAS-HERE-145
<rking>
jrajav: If you hit me up later on maybe we could pair on it. (VOIP + tmux on my Linode)
<jrajav>
I might have to set up ssh on the vm so I can work on it at home
graspee has quit [Quit: leaving]
<jrajav>
I did almost everything in lunch and offtime at work
defendguin has quit [Quit: Leaving.]
<Mon_Ouie>
jrajav: Btw, I don't know if someone told you already, but since you use plain interpolation, your code chokes on some perfectly valid lines of code
<Mon_Ouie>
A simple example is you need to write /\\w+/ instead of /\w+/
<Mon_Ouie>
>> begin; raise "foo"; rescue StandardError; "fine"; end
<jrajav>
I should probably just set the limit to the soft limit of an IRC PRIVMSG
Guest89851 has quit [Quit: Guest89851]
darren has quit [Remote host closed the connection]
<Mon_Ouie>
And actually, I think one can evaluate code outside of the sandbox because of the way you insert code — kind of like an SQL injection usually happens
<jrajav>
Mon_Ouie: So, correct if I'm wrong, but I thought that if you had escapes in a string that you got from somewhere else, and pass that around in a variable, they're never actually translated
<jrajav>
Mon_Ouie: Or does that happen in the + interpolation?
chichou has joined #ruby
<jrajav>
Mon_Ouie: How would someone do that?
darren has joined #ruby
<Mon_Ouie>
I don't know much about Javascript strings (nothing really), I just know your code doesn't seem to work here:
<Mon_Ouie>
>> "foo" =~ /\w+/
<al2o3cr>
Mon_Ouie: (NilClass) nil
<Mon_Ouie>
>> "foo" =~ /\\w+/
<al2o3cr>
Mon_Ouie: (Fixnum) 0
<Mon_Ouie>
For the latter, I'm trying to come up with an example right now
berserkr has quit [Quit: Leaving.]
<jrajav>
Okay, I see now. It's not in the Javascript, it's in the ad-hoc Ruby code. I get around most problems with just inlining a string by using %` ` and then disallowing `, but it is in fact still a string literal
<jrajav>
So escapes will be translated before they should be
<jrajav>
Hmm :/
S1kx has quit [Ping timeout: 264 seconds]
sepp2k has quit [Remote host closed the connection]
<Mon_Ouie>
Ah, you do check for backticks, so that's fine
<jrajav>
The easiest way to fix that would probably be to write it to a file, then read the file in the Ruby code and pass it to Sandrbox.perform
<jrajav>
Yeah
Choobie has quit [Quit: Leaving]
<jrajav>
>> %`a string`
<al2o3cr>
jrajav: I don't evaluate code with backticks for spiritual reasons
<jrajav>
:P
iamjarvo has joined #ruby
<Mon_Ouie>
There we go, even dumber
<Mon_Ouie>
>> #{Process.kill :KILL, Process.pid}
<al2o3cr>
Mon_Ouie: The Ruby interpreter exited with nonzero status. Hanmac is probably to blame.
resure has quit [Remote host closed the connection]
<jrajav>
What's the error?
<Hanmac>
yeah but the bot surives
<jrajav>
(It PMs it to you)
S1kx has joined #ruby
<jrajav>
Hanmac: My bot is IMMORTAL
<Mon_Ouie>
>> #{Process.kill :KILL, Process.ppid}
al2o3cr has quit [Remote host closed the connection]
<Mon_Ouie>
You say?
<jrajav>
Welp.
<jrajav>
Nice going
<jrajav>
lol
al2o3cr has joined #ruby
<Hanmac>
:'D
S1kx has quit [Read error: Connection reset by peer]
<jrajav>
Now we don't have a bot for the weekend :P
<jrajav>
Oh, I forgot that I put him on a forever instance!
<jrajav>
HA
S1kx has joined #ruby
<jrajav>
IMMORTAL I SAY
<habib>
Hey, is there anything like gedit but where i can run ruby files?
<habib>
edit and run
<jrajav>
habib: You mean, an IDE that supports Ruby?
<habib>
yeah
<jrajav>
habib: There are tons
<jrajav>
Lots of people like Vim and Emabs
<jrajav>
I'm partial to Sublime Text myself
<jrajav>
*Emacs
<habib>
i use sublime text too but how to run code from there?
<Mon_Ouie>
Anyway, that's a huge flaw; that's why you should be using stdin for passing code to your script
joshman_ has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
<jrajav>
Mon_Ouie: It'll be a moot point if I change the bot to use LXC
<jrajav>
al2o3cr: You alive buddy?
<jrajav>
al2o3cr: ping
<al2o3cr>
jrajav: pong
* jrajav
tearfully hugs al2o3cr
arvidkahl has quit [Read error: Connection timed out]
ppawel has joined #ruby
gmci has quit [Read error: Connection reset by peer]
<jrajav>
Mon_Ouie: I'm not gonna lie, I didn't even think of passing the script in through stdin
<jrajav>
Mon_Ouie: That would be a pretty easy fix
snearch has quit [Quit: Verlassend]
<Hanmac>
Mon_Ouie: what do you think about:
<Hanmac>
>> $PROGRAM_NAME
<al2o3cr>
Hanmac: (String) "r10.rb"
<Hanmac>
can it be used for something meanful?
Michael has joined #ruby
<Mon_Ouie>
Not much now because the script gets rewritten every time
Michael is now known as Guest4920
noyb has quit [Quit: Leaving.]
<Hanmac>
my idea was to write an new file and then somehow change the cmod :P
<Mon_Ouie>
I'm wondering if there's a way to kill the program that keeps running the bot over and over; mind if I try? :p
<banisterfiend>
>> [1]*100
<al2o3cr>
banisterfiend: Output too long, I PMed it to you
arvidkahl has joined #ruby
<banisterfiend>
jrajav: can i tel lit to PM the long output to someone else?
<banisterfiend>
i want the bot to flood someone off
<jrajav>
No, and that's why
<jrajav>
lol
fastred has quit [Quit: fastred]
<jrajav>
Mon_Ouie: There probably is
<jrajav>
Mon_Ouie: And yes ;P
<jrajav>
You would have to find that pid ofc
kvirani has quit [Remote host closed the connection]
brianpWins has joined #ruby
<jrajav>
Or you could just loop over possible pids until you find it, trashing the whole running system in the meantime
gmci has joined #ruby
<jrajav>
Why are you so determined to kill my little bot, anyway? :(
<jrajav>
Mon_Ouie? More like Mean_Ie
<Hanmac>
hm i get "Too many open files" from the bot, but no crashing :(
<Mon_Ouie>
I think there's another flaw as long as you set STDOUT and friends in the same code as the user code: you can use STDOUT in a BEGIN clause
mockra has joined #ruby
EPIK has quit []
banseljaj is now known as imami|afk
<Hanmac>
jrajav: why do we want to crash your bot? the same reason why we want to push red buttons ... "because we can" :P
fbernier has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
Guest4920 has quit [Quit: Leaving...]
<jrajav>
Mon_Ouie: Except I don't do that anymore, because it breaks Sandrbox :P
<jrajav>
That hole is just left open
<jrajav>
Is that still in the github code?
<Mon_Ouie>
Yes
<jrajav>
I removed it
<jrajav>
I should update that
<Mon_Ouie>
I thought it was the other way around for some reason :p
theRoUS has quit [Remote host closed the connection]
fbernier has joined #ruby
mockra has quit [Ping timeout: 246 seconds]
<habib>
Does anybody know how to install sublime text 2 the way u can run it brom dash?
<habib>
from dash
chichou has quit [Remote host closed the connection]
<gowie>
Is there an enumerable method which acts as select but also remove/rejects the item? Seems like there should be... but I can't seem to find it.
phinfonet has joined #ruby
<jrajav>
I know that I have a 'subl' command here on OSX, forgot how I set that up though
<Hanmac>
jrajav i think he means bash (or maybe not)
<jrajav>
I think dash is actually a real shell
<Hanmac>
gowie, did you try reject? or delete_if?
<jrajav>
Oh! I remember now. subl is a binary included in the .app for OS X
<habib>
dash is launcher for ubuntu
<jrajav>
I just had to add it to my path
<jrajav>
Might be the same if you install a package for it on Linux
bluOxigen has joined #ruby
<gowie>
hanmac Right now I am doing a select to get them item and then the next line i'm using reject to remove them.
<jrajav>
habib: google something like 'subl sublime text 2 command line'
arvidkahl has quit [Read error: Connection timed out]
<gheegh>
Hey all.. simple ruby question.. i'm trying to match a pattern in an array.. say I've got an array of [1,2,3,4,5, 1,9,1,2,5,4,3,7,6].. i want to check for at what indexes the array matches [1,2], which would be at 0 and 7.. I can iterate using each_cons.. but is there a better way?
<gheegh>
understand.. i'm using numbers to arbitrarily show this.. i'm not actually matching numbers..
<habib>
thnx
<habib>
jrajav, thnx
<JonahR>
Sublime text is awesome even works great under windows
<jrajav>
Yup, I use it on Windows too
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
<gheegh>
Sublime is an awesome editor.. was on TextMate for years.. never moved back.
<gowie>
Switched over from emacs to sublime text a couple weeks ago. I'm digging it
pskosinski has joined #ruby
beakerman has joined #ruby
<gowie>
Continually adding emacs key bindings though
bothra has quit [Ping timeout: 245 seconds]
<jrajav>
Yeah, the best part is its configurability
meskyanichi has joined #ruby
Guest2999 has joined #ruby
<jrajav>
And you can script it completely with Python the same way you can script Emacs with Lisp
<gowie>
jrajav Yeah, agreed. That's what made the switch from emacs possible. I didn't get good at emacs keybindings for 6 months to switch to another text editor and have to relearn all it's keybindings.
<gowie>
I just wish the documentation was a bit better. And that it was open source of course, but who would do that when they're just raking in as many bills as he is.
sdwrage has joined #ruby
notVert has quit [Ping timeout: 252 seconds]
paolooo has quit [Quit: Page closed]
blacktulip has quit [Read error: Connection reset by peer]
n1x has quit [Quit: Ex-Chat]
niklasb has quit [Quit: WeeChat 0.3.8]
virunga_ has joined #ruby
williamcotton_ has joined #ruby
virunga_ has quit [Client Quit]
uokesita has joined #ruby
niklasb has joined #ruby
nicoulaj has joined #ruby
williamcotton has quit [Ping timeout: 248 seconds]
williamcotton_ is now known as williamcotton
yakko has quit [Quit: No Ping reply in 180 seconds.]
yakko has joined #ruby
bairui has joined #ruby
Jay_Levitt has joined #ruby
anoiaque has joined #ruby
Guest2999 has quit [Quit: Leaving]
Guest2999 has joined #ruby
ctp_ has joined #ruby
anoiaque has quit [Remote host closed the connection]
mk03 has joined #ruby
vvgomes has joined #ruby
bothra has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
knirhs has joined #ruby
ctp has quit [Ping timeout: 272 seconds]
gowie has quit [Remote host closed the connection]
meskyanichi has quit [Quit: Leaving...]
Shrink has quit [Ping timeout: 246 seconds]
ThaDick has quit [Quit: zzzZZZ ...]
answer_42 has quit [Quit: WeeChat 0.3.8]
TheShadowFog has quit [Read error: Connection reset by peer]
chichou has joined #ruby
<Hanmac>
jrajav did you try to add Process to the bad constants?
<shevy>
apeiros_ I am going to fight human datamining as long as I can!
<shevy>
fight *against, that is
<apeiros_>
you already lost
<shevy>
codora, dunno. probably it will be a hybrid chip with some neurones connected to the silicon chip,p erhaps even cells embedded in a microfluidic area
<codora>
that would be cool.
fbernier has quit [Ping timeout: 244 seconds]
thone_ has quit [Ping timeout: 240 seconds]
<codora>
be able to grow your consciousness onto an embedded set of chips, and virtualize my consciousness.
<codora>
then i'd be virtually immortal.
mockra has joined #ruby
Guest2999 is now known as jankly
burgestrand has joined #ruby
w400z has quit []
Jake232 has joined #ruby
thone has joined #ruby
<codora>
shevy: having a set of chips that act the same as neurons on the surface, and would allow me to grow over time onto the chips as i age, that would be cool.
jonathanwallace has quit [Remote host closed the connection]
nonotza_ has joined #ruby
jasonLas_ has quit [Remote host closed the connection]
jasonLaster has joined #ruby
nonotza has quit [Ping timeout: 240 seconds]
nonotza_ is now known as nonotza
<shevy>
hehe
<shevy>
hmm
<shevy>
we are probably too far away... but the folks in 100 years will surely see that
mockra has quit [Ping timeout: 245 seconds]
<codora>
i wont live to see it, probably.
<codora>
i'll be wormfood.
vvgomes has joined #ruby
<shevy>
yeah
<shevy>
gotta make the best of life before wormfood time
fantazo has joined #ruby
<shevy>
like write awesome ruby code
<Spaceghostc2c>
codora: Until we get tired of you and have our cats use you as a litter box.
<codora>
Spaceghostc2c: indeed.
jasonLaster has quit [Ping timeout: 272 seconds]
tiripamwe has quit [Ping timeout: 240 seconds]
tiripamwe has joined #ruby
<codora>
shevy: i'm still learning ruby.
<shevy>
I too
<shevy>
:)
<codora>
:D
<shevy>
some days ago... someone showed me
duply has quit [Read error: Connection reset by peer]
<shevy>
remove_instance_variable(:foo) or something like that
<shevy>
you can completely get rid of them!
<shevy>
how cool is that
<codora>
that's pretty cool
<shevy>
I used to have things like @fat_hash_here
yakko has quit [Ping timeout: 246 seconds]
<shevy>
and when I did pp object
<shevy>
that fat hash was output and spammed my screen
phinfonet has joined #ruby
<Hanmac>
the constants are maybe accessable over other ways ...
mikeric has quit [Quit: mikeric]
liluo has quit [Remote host closed the connection]
<shevy>
you mean
uokesita has quit [Quit: This computer has gone to sleep]
<shevy>
class Foo; HASH = { a: 5, b: 6}
<shevy>
it's a bit strange that you can change constants in ruby
Stalkr_ has quit [Ping timeout: 246 seconds]
Stalkr_ has joined #ruby
shlim has quit []
jjbohn has joined #ruby
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
balki has joined #ruby
tobym has quit [Remote host closed the connection]
resure has joined #ruby
<apeiros_>
shevy: agreed. I think just giving a warning is too weak. it should raise.
bothra has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
Gab0 has joined #ruby
alanp_ has joined #ruby
balki_ has quit [Ping timeout: 272 seconds]
chimkan___ has joined #ruby
alanp has quit [Ping timeout: 272 seconds]
apeiros_ has quit [Ping timeout: 272 seconds]
Tref has quit [Quit: Tref]
liluo has joined #ruby
chimkan_ has quit [Ping timeout: 246 seconds]
pskosinski has quit [Ping timeout: 244 seconds]
verto|off is now known as verto
ppawel has quit [Ping timeout: 250 seconds]
yxhuvud has quit [Ping timeout: 240 seconds]
zemanel has quit [Quit: Remote hottie closed the connection]
jeff_sebring has quit [Quit: Leaving]
liluo has quit [Remote host closed the connection]
whitedawg has joined #ruby
jonathanwallace has joined #ruby
yxhuvud has joined #ruby
beakerman has quit [Remote host closed the connection]
beakerman has joined #ruby
<shevy>
I.Will.Never.Ever.Again.Rewrite.Anything.
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
sprink has joined #ruby
liluo has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
<shevy>
but I must do require 'fileutils' first... was hoping there exist another way without having to require anything
mneorr has quit [Quit: Leaving.]
Jay_Levitt has quit [Quit: Jay_Levitt]
tiripamwe has quit [Ping timeout: 264 seconds]
Jay_Levitt has joined #ruby
burgestrand has quit [Quit: Leaving.]
EPIK has joined #ruby
subbyyy has quit [Quit: Leaving.]
<bperry>
shevy: `mkdir blah` :P
xaq has quit [Remote host closed the connection]
<habib>
is here someone using sublime text 2?
<shevy>
bperry hmmm nah...
<shevy>
bperry, I think that would not work on windows
ringotwo has quit [Remote host closed the connection]
<bperry>
yeah I know
<bperry>
it was a facetious suggestion
subbyyy has joined #ruby
<bperry>
it actually would work on windows if you did just mkdir blah
<bperry>
mkdir exists on windows by default
habib has quit [Remote host closed the connection]
<fowl>
just use fileutils.mkdir_p
<fowl>
why would u care about loading fileutils, its stdlib
<shevy>
oh?
<shevy>
hmm
br4ndon has joined #ruby
<shevy>
cool
<shevy>
works without require
justsee has joined #ruby
<shevy>
why does fowl know such things, it's amazing
<fowl>
if it works without require thats because you already loaded it lol
<fowl>
pry uses it
statarb3 has quit [Quit: Leaving]
xaq has joined #ruby
vvgomes has joined #ruby
jxf has joined #ruby
khakimov has joined #ruby
rburton- has joined #ruby
Urthwhyte has joined #ruby
<rburton->
re
<rburton->
What's a good framework to execute a job every x minutes.
<Urthwhyte>
cron
seanstickle has joined #ruby
<rburton->
I figured that would be the case, Was hoping to have something built in ruby that will run the job, monitor it, etc
<Urthwhyte>
So you want a job queue?
mockra has joined #ruby
<rburton->
I'm using resque at the moment, for offline jobs
<rburton->
but I have a case in which I need to query dropbox every 15 minutes
<Urthwhyte>
so have cron execute the rake task every x minutes?
<rburton->
what about monitoring of the job etc.
<Urthwhyte>
If a job raises an exception, it is logged and handed off to the Resque::Failure module. Failures are logged either locally in Redis or using some different backend.
<Urthwhyte>
For example, Resque ships with Hoptoad support.
<Urthwhyte>
Keep this in mind when writing your jobs: you may want to throw exceptions you would not normally throw in order to assist debugging.
<Urthwhyte>
then do something with the logging support built in
<rburton->
so use resque?
<Urthwhyte>
If you're already using it I see no reason to rip it out
<rburton->
How would I execute it every 15.minutes
tiripamwe has joined #ruby
<Urthwhyte>
add job to queue. start worker after 15 minutes, kill worker when finished, repeat.