<socialcoder>
what dat are you referring to? sorry, newbie questions, because I am newbie
<drbrain>
you should be able to find String#chomp easily
<drbrain>
socialcoder: don't worry about it, I don't want it to distract you from learning right now
<socialcoder>
oh ok...
<socialcoder>
I am gonna hit that link now and read up
<socialcoder>
I am actually studying from Learn Ruby The Hard Way
<ezkl`>
socialcoder: Not a bad book to start with. The primary author isn't very well-liked by quite a few people in the community, despite his early, essential contributions
<socialcoder>
you mean Zed Shaw? why
<drbrain>
socialcoder: mostly drama that is of no real substance
<drbrain>
Zed is a fine but opinionated person
<ezkl`>
Yeah. He is a brilliant engineer and a very good dude in general.
ezkl` is now known as ezkl
<socialcoder>
I see
<socialcoder>
I like his way of teaching
<socialcoder>
initially it was frustrating
<socialcoder>
typing everything
<socialcoder>
but I realized
<socialcoder>
how fast I was memorizing, understanding, etc
Croms_ has joined #ruby-lang
<ezkl>
If I could go back in time and give myself a tip w/r/t learning programming languages, it would have been to read a lot more code than I did.
<socialcoder>
read?
<socialcoder>
I thought write
<drbrain>
reading is harder than writing
<drbrain>
but you learn more reading than writing
<cirwin>
you need to be able to write code before you can read it effectively
macmartine has joined #ruby-lang
<ezkl>
cirwin: Indeed.
<zzak>
cirwin: i disagree
<zzak>
i'm comfortable reading through MRI source, and understand what is happening, but don't ask me to write anything in C
<cirwin>
zzak: sure, language doesn't matter too much
<cirwin>
you know how to program
<drbrain>
if you know how to program one language reading another is certainly easier than writing it
<drbrain>
but if you're not good at writing one language reading is hard
mjio has quit []
Croms has quit [Ping timeout: 245 seconds]
<zzak>
makes sense
socialcoder has quit [Ping timeout: 244 seconds]
<drbrain>
reading a language with an unfamiliar style is hard too
<ezkl>
Building blocks of programming (syntax, grammar) vs high level concepts (well-structured sentences, prose)
<drbrain>
I still have trouble reading irb code because it is so different
<zzak>
drbrain: which part?
<drbrain>
mostly the lexer
<ezkl>
drbrain: Wow, yeah.
<drbrain>
I haven't read other irb code recently
<zzak>
i am having trouble with #inspect
<zzak>
which evaluates the statements in context
BigO_ has quit [Remote host closed the connection]
klebervirgilio has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
methods has quit [Quit: Leaving.]
_Mon_Ouie_ has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 246 seconds]
jxie_ has joined #ruby-lang
My_Hearing has quit [Ping timeout: 264 seconds]
<drbrain>
zzak: IRB::Inspector#inspect_value?
<zzak>
drbrain: IRB::Context#inspect
<drbrain>
ugh, tabs
jxie has quit [Ping timeout: 264 seconds]
<drbrain>
wow, this code is so old
<zzak>
haha yeah, its awesome
<zzak>
try figuring out what those constants mean, and how they're used >:D
<drbrain>
they're only used there
<drbrain>
I'm not sure why they're constants
<drbrain>
maybe to save GC time?
<drbrain>
maybe way back in the ruby 1.4 days memory was too precious to use literal values
sush24_ has joined #ruby-lang
Technodrome has quit [Quit: Leaving.]
<drbrain>
it looks like it's just to say "last_value doesn't get printed because it's large, @irb and @io use to_s because inspect is ugly, @prompt_mode uses the symbol name so you can put that in your .irbrc"
<drbrain>
I'd nodoc it
<zzak>
i nodoc'd the constants, you think #inspect too?
<drbrain>
I usually do since the describing the implementation often isn't useful
<drbrain>
Object#inspect is enough
<zzak>
that is fair
jsilver has quit [Remote host closed the connection]
dyfrgi has joined #ruby-lang
<dyfrgi>
Where is the method :<< from "class << self" defined?
<cirwin>
dyfrgi: it's not a method, it's syntax
<cirwin>
in ruby 1.9 you can do self.singleton_class.class_eval{ }
<dyfrgi>
I'm pretty sure << isn't a reserved word.
<cirwin>
it's not
<cirwin>
but class is
<dyfrgi>
And it does weird things with the tokens which follow it.
<cirwin>
yup
<cirwin>
ruby's syntax is not nice
<cirwin>
(from a parseability perspective)
<dyfrgi>
That's a pretty awful corner, from a consistency perspective.
<dyfrgi>
I never expected to have to learn yacc in order to understand the syntax of a language.
<zzak>
ok, so parts of this are "useful", ill just nodoc the specifics, like Inspector#inspect_value
_Mon_Ouie_ has quit [Ping timeout: 244 seconds]
<drbrain>
dyfrgi: for ruby, you can't stop at just yacc
<drbrain>
there's state between the grammar and the lexer
brianpWins has joined #ruby-lang
<zzak>
NoMansLand?
<dyfrgi>
drbrain: Oh joy.
<dyfrgi>
Well, I found where class << is defined in parse.y anyway. Now to learn enough yacc to trace up a level.
<drbrain>
dyfrgi: pro tip: ruby -ye 'class << self; end'
socialcoder has joined #ruby-lang
<dyfrgi>
Man. That's totally cheating.
<dyfrgi>
Also quite useful, thanks.
<socialcoder>
back
<socialcoder>
had a power outage
<socialcoder>
drbrain, u in?
<drbrain>
hi
lake2 has joined #ruby-lang
<socialcoder>
i u pppppppppppppppppppppppppppppppppppppppppppppiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiolp0pp[[
<socialcoder>
ippeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeepppppppppppppppppppppiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii u ipppppppppppppppppppppppppppppppppppppppppppppiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiolp0pp[[
petercooper has quit [Read error: Operation timed out]
<crazyhorse>
now i just want a function that iteretes over every stage in every stages in every app
<crazyhorse>
and it's going to modify it as well
<crazyhorse>
apps.*.stages.each do |bla, bla|
<crazyhorse>
is kinda what i need to do
<crazyhorse>
or more specifically i'm going to go through and for everyone that has got a server string defined, i need to replace that with a corspoding hash
sush24 has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby-lang
socialcoder has quit []
faustman has quit [Ping timeout: 264 seconds]
swav has joined #ruby-lang
jnoon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
<mfn>
I need to match multiple different patterns in a string and replace each with their own replacement. Something like an array of pattern and each with their own replacement to operate on a string. [/pattern1/, /pattern2/] and ['replacement1', 'replacement2']. Should I just concatenate #gsub calls or is there a nicer way?
<mfn>
I've seven patterns each with their own replacement
<yorickpeterse>
You can use \\X, where X is a number, for match groups
<yorickpeterse>
You can also give them names in either 1.9 or 2.0 (not sure which one)
<judofyr>
mfn: are there any capture groups in the patterns
<judofyr>
?
mindbender1 has left #ruby-lang [#ruby-lang]
<mfn>
judofyr: no. String may look like "fooo_pattern1_bar_pattern2" and "pattern1" should be replaced with "replacement1" and "pattern2" with "replacement2", etc.
<mfn>
(the underscores are just for readability)
<judofyr>
mfn: is it a pattern (regexp) or a string?
<mfn>
the patterns are all strings
epitron has quit [Quit: Lost terminal]
<andrewvos>
I'm writing a gem that has a server written in java that needs to be launched in the background while the ruby gem is doing stuff.... What's a good way of including the java source in the gem and then compiling it?
epitron has joined #ruby-lang
epitron has quit [Changing host]
epitron has joined #ruby-lang
krz has quit [Quit: krz]
<judofyr>
mfn: then it's simpler. replace = { "a" => "b", "b" => "a" }; regexp = Regexp.union(replace.keys); str.gsub(regexp) { |m| replace[m] }
leopard_me has joined #ruby-lang
<andrewvos>
Shit I have to interview someone... Nobody answer the question till I'm back :)
solars has joined #ruby-lang
<tockitj_>
what are common topics you use on ruby interview ?
<mfn>
judofyr: Holy! Took me a while to understand how it works. Very nice, learned something. Thank you!
<judofyr>
mfn: Regexp.union is very neat :)
<mfn>
yeah, and also using a block to gsub and then matching the original string . That's why you asked whether it's a regexp, right? Because it wouldn't work that way of the key in replace is a Regexp ...
nXqd_ has joined #ruby-lang
<judofyr>
mfn: correct.
thone has joined #ruby-lang
jsilver has joined #ruby-lang
anannie has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 252 seconds]
anannie has joined #ruby-lang
adambeynon has joined #ruby-lang
manveru has quit [Ping timeout: 250 seconds]
<injekt>
tockitj_: that would be specific to the role they're applying for, and probably less ruby specific than you'd think
<dominikh>
injekt couldn't answer a single question and still got a job, so don't worry too much about it
<injekt>
haha
<injekt>
hey man I co own the company, i would have failed the interview so had to go another route
<dominikh>
:D
<apeiros_>
tockitj_: I generally ask some basic questions about core/stdlib
<tockitj_>
injekt, well role would be ruby developer ofcourse
<tockitj_>
apeiros_, can you please give example for these (:
<dominikh>
rails? sinatra? backend programming? for NASA (who do use Ruby)?
<injekt>
^
<burgestrand>
Was somebody a few months back that collected questions to ask developers during a short phone screening interview.
<burgestrand>
andrewvos: was that you?
<injekt>
tockitj_: ask them what inject does
<injekt>
trollol
<tockitj_>
dominikh, yes - all of them i guess, ruby is used for webapp backends right ?
<apeiros_>
tockitj_: the easy things like what do you need to do in order to include Enumerable into your class, or how do you get all strings starting with "A" from an array of strings
<burgestrand>
tockitj_: something tells me you are the one being given the interview? ;)
<apeiros_>
or what libraries out of stdlib have you used so far, what gems, for what purpose
<ddfreyne>
I'd rather focus on questions that show a candidate's capability of reasoning about algorithms and problems
<ddfreyne>
While using Ruby for that
<burgestrand>
I’d like to ask them what they don’t like about the gems they regularly use.
<tockitj_>
apeiros_, which questions would not be appropriate for interview in your opinion ?
<burgestrand>
(or libraries, or ruby)
<rue|w>
injekt: Summary of the SV
<injekt>
tockitj_: "what bra size are you?"
<tockitj_>
would ruby meta-programing be a good topic ?
<burgestrand>
Then again I don’t do that kind of interviews, something that just interests me is all…
<apeiros_>
my prefered question was "show a bit of code you wrote and are proud of (any language, not just ruby)"
nXqd_ has quit [Quit: leaving]
nXqd has quit [Remote host closed the connection]
<apeiros_>
that question was given ahead of time
<injekt>
apeiros_: +1
nXqd has joined #ruby-lang
<ddfreyne>
One question that I haven't heard yet, was "here is a piece of code. How would you refactor it?"
<injekt>
and a bit of code you are not proud of, and why, and how you would improve it
<apeiros_>
ddfreyne: oooh I had that prepared
<injekt>
ddfreyne: I use that one
<apeiros_>
a super fugly csv parser
<ddfreyne>
Actually, not "how would you" but rather "DO refactor it" :)
<tockitj_>
apeiros_, basic questions can give understanding if candidate can adopt to given project over time.. but how to 'measure' somebodies expertese with these questions ? offered pay should correlate to interview i think
hakunin_ has joined #ruby-lang
<apeiros_>
but it was too fucked up, handing it to my coworkers lead to confused looks :D
<ddfreyne>
haha
<apeiros_>
tockitj_: you don't know the expertise of somebody from an interview
<apeiros_>
the open "show code" question gives you the most insight
hakunin has quit [Read error: Connection reset by peer]
<apeiros_>
the other questions are merely to figure whether the guy knows anything at all
swav has quit [Read error: Connection reset by peer]
<tockitj_>
hmmz.. but at some point there is need to agree on paycheck, and estimate future contribution of that developer
swav has joined #ruby-lang
<tockitj_>
how to deal with that ?
waffleau_ has joined #ruby-lang
<tockitj_>
should interview carry more weight than cv - or vice versa ?
<apeiros_>
tockitj_: that was not my duty :)
<injekt>
lol cv
<injekt>
throw it in the god damn trash
<apeiros_>
agreed, cv is worthless
<apeiros_>
(on its own)
<tockitj_>
i'd agree to some point on this
<apeiros_>
so many people overestimate their abilities, so many people even flat out lie.
<burgestrand>
tockitj_: work with your candidate for a while
<tockitj_>
but, cv can be starting point for talk
<kith>
so many ppl underestimate their abilities :D
<ddfreyne>
How do you negotiate salary?
<apeiros_>
yes, cv is what I used to adjust my questions
<apeiros_>
if somebody said "ruby skill level guru" I expected him to answer tougher questions
<kith>
ddfreyne: you say "MOAR DORRAH"
<ddfreyne>
kith: I tend to underestimate them I think. I got through some interviews where I was sure I'd fail
<apeiros_>
and tbh, all who put themselves on guru level were barely above modest, if at all…
<tockitj_>
well its normal for humans to overestimate selfs.. we *do* tend to thing good about ourselves
<tockitj_>
for most tests i personally did - i was sure i'd fail most of them after they were completed
<tockitj_>
but was accepted almost always..
<apeiros_>
then you underestimated yourself
<apeiros_>
overestimation would have been "wow, I was so good, I sure pass" and then you fail.
<tockitj_>
well when i came to interview i thought i could pass ofcourse
<tockitj_>
ok.. but in ruby terms.. how to get objective with candidate
<apeiros_>
look, IMO the two defining aspects of a good coder are passion and intelligence
<apeiros_>
get him to show you where his passion is
<injekt>
i always have candidates write something relative to the position they're applying for, something small, then you can discuss it (I dont do this during interview time, too much pressure, they can take it away)
<apeiros_>
lunch time!
<tockitj_>
problem imho is that answer on broad questions are known to most ruby devs who worked on ruby projects for more than a year or two, and more specific stuff heavily depends on previous experience
<injekt>
tockitj_: you have to not worry if they dont know something extremely specific, if you don't hire someone based soley on that you're doing it wrong
<ddfreyne>
So present them a problem and tell them to implement it in Ruby
<tockitj_>
asking lots of basic questions on large number of topics would be best solution ?
<ddfreyne>
either before hand (give them a week to finish it) or right at that point
<ddfreyne>
No, I wouldn't do basic questions
<injekt>
+1 for before hand
manveru has joined #ruby-lang
<ddfreyne>
Either way, after they finish the implementation, say something like... "now, there's a new requirement. How would you add that?"
<ddfreyne>
Something that doesn't trivially fit into an existing solution
<ddfreyne>
And therefore requires some refactoring, unless the design was very well thought out before hand maybe
<ddfreyne>
(I don't have experience giving interviews. I was always the one taking them, but I do have opinions about what interviews I like and what interviews I don't)
waffleau_ has quit [Quit: waffleau_]
io_syl has quit [Quit: Computer has gone to sleep.]
waffleau has joined #ruby-lang
<tockitj_>
i find testing interesting topic to talk about (:
<ddfreyne>
Ah yes. When would you use mocks/stubs?
<ddfreyne>
... and when not? and why?
<tockitj_>
what test ratio does candidate consider good coverage of existing code.. which testing frameworks he has worked with
<crazyhorse>
how do i access all the arguments to a method?
<tockitj_>
yes (:
<ddfreyne>
crazyhorse: you want a list of arguments?
<crazyhorse>
i thought there was something like args.map(&:to_s).join(",")
<crazyhorse>
ddfreyne: yeah just for some quick debugging in some recursive stuff
<crazyhorse>
I just thought it might be possibel to do ruby-magic-variable.map(&:to_s).join
<injekt>
p [tree, replace_key, replace_value]
<injekt>
crazyhorse: na
<tockitj_>
hmmmz.. yes.. understanding of testing process (along with few broad questions on networknig, linux administration, oop, refactoring, ruby core, and a tiny bit of metaprogramming) could be determinal for estimating 'coder quality'
<crazyhorse>
inject.. ah yeah thats nicer
seoaqua has quit [Quit: 离开]
<ddfreyne>
injekt*
<ddfreyne>
tockitj_: throw in some questions about distributed programming and scalability as well. even if they don't have any experience, they should be able to come up with something
<injekt>
crazyhorse: p is nice for debugging, puts returns nil p(obj) returns obj so you can use it mostly anywhere. p(obj) does puts(obj.inspect); obj (basically)
<ddfreyne>
tockitj_: I personally also like to focus on data structures (when to you have arrays, sets, dictionaries, etc)
<crazyhorse>
ah right.. yeah
<crazyhorse>
yeah that is nice
<tockitj_>
hah.. some of the candidates are inevitably going to be better devs than one holding the interview... how to approach & understand those guys (:
<ddfreyne>
One thing I found interesting was: what is the difference between a tree set and a hash set? why would you use a tree set if access is not O(1) ? :P
jayne_ is now known as jayne
<judofyr>
ddfreyne: wtf is a "tree set" ?
<tockitj_>
ddfreyne, i find it easy to get carried away with data structs and algorithms
<injekt>
lol
<judofyr>
sorry. I meant "what is"
<ddfreyne>
that is true :)
<judofyr>
(not wtf)
<crazyhorse>
tockitj_: 1. always ask for code.. don't interview anyone who doesn't send you code 2. make them sit a test, make sure the test is sensible 3. after they've sat the test and passed then get them into an interview
<ddfreyne>
judofyr: a binary search tree, so you can figure out whether something is part of a tree set in O(log n) time
<injekt>
a treeset is a slow ass hashset
<ddfreyne>
a treeset is ordered though, while a hashset is not
<injekt>
^
<judofyr>
ah, a set backed by a binary search tree
<crazyhorse>
tockitj_: 4. don't believe anybodies resume.. soo much bullshit, they need to back it up
<judofyr>
I've just never heard the term "tree set" before
<ddfreyne>
judofyr: I got that from java
<injekt>
me too :(
<tockitj_>
hah.. and finally when dev passes the tests.. how to figure out if he is sane at all.. i've met some very difficult and smart ppl (:
<ddfreyne>
judofyr: say what you want about Java, but I like its collection classes
<injekt>
ddfreyne: I do too, but there's wayyy to many to remember
<injekt>
too*
<tockitj_>
the more i think about this.. the more 'testing' comes up as good subject to talk about
<ddfreyne>
too many to remember!!!!
<ddfreyne>
injekt: I guess
<injekt>
lol
<crazyhorse>
5. be wary of people with lots and lots of short jobs (i.e 1 to 3 months contracts).. they need extra scruitinising . sometimes they use contracts as an excuse as "i got fired" 5. always ring references, and previous work places
<ddfreyne>
I prefer it over Ruby's collection classes... which is really limited
<injekt>
aye
<ddfreyne>
I could relaly use a LinkedList class in ruby sometimes
<tockitj_>
crazyhorse, what kind of bullshit are you thinking of in cvs
<crazyhorse>
tockitj: "i'm a great ruby programmer but actually i'm a java programmer and i've just done the first 2 chapters of the book"
<tockitj_>
i did lots of things in past.. and when i review that list, i figure out how much do we (or I) forget over time
<crazyhorse>
tockitj: I know css.. but i can't tell #a { border: 1px solid red; } .b {border: 1px solid green;} si going to generate which image
<ddfreyne>
System.out.puts "Hello #{'world'} !"
<crazyhorse>
yeah.. i gave my developers called the dumb-ass test.. basically if you fail a single question.. you need to worry
<tockitj_>
crazyhorse, ah right.. but list of technologies candidate has used can be revealing in a way
<crazyhorse>
tockitj_ i give them a sheet
<crazyhorse>
with all of the technologies down the side
<tockitj_>
yes i think its sound to make simple questions that just verify basic understanding
<crazyhorse>
then they tick None | Parsing | Basic | Intermediate | Advanced | Expert
<tockitj_>
^^ these are pretty valuable i think
<crazyhorse>
Passing*
<tockitj_>
i think i've seen one of those - few years back xD
<crazyhorse>
yeah our list is huge
<crazyhorse>
lists about 50 things
<tockitj_>
but what is reference there ?
<injekt>
as a candidate, that would bore the life out of me
<crazyhorse>
then if they tick something.. you can quiz them about it
<tockitj_>
ppl who thing good about them selves are going to get higher average (:
<crazyhorse>
injekt: if you got bored about filling a 2 minute questionare.. then you'd be too princessy for the job
<ddfreyne>
crazyhorse: yeah I did a list like that, but then rating from 0 to 10
<crazyhorse>
:D
<ddfreyne>
and only... 10 to 15 subjects (not programming languages)
<injekt>
crazyhorse: "50 things" -> 2 minutes?
<crazyhorse>
really? what did they list?
<crazyhorse>
lol yeah good point
<crazyhorse>
5 mins
<crazyhorse>
the tests take ages though
<crazyhorse>
we don't set time limits.. and they range from anywhere from 2 - 4 hours
<tockitj_>
interesting thing about making tests is that you learn a lot along the line.. but its easy to come up with test that you could not have passed yourself before you got into these details - which probably means that test is bad (:
<crazyhorse>
yeah.. i think you can split it up
<ddfreyne>
crazyhorse: networking, distributed systems, OOP, system administration, that sor tof stuff. Very high-level, but if you have multiple job openings this could be useful
<crazyhorse>
i.e. group it into basic (anyone should know), intermediate(most experienced devs would know), advanced (have to look it up)
<crazyhorse>
haha
<crazyhorse>
ddfreqyne: oh yeah
<crazyhorse>
ddfreyne: i want to hire specilist server admins and database guys soon.. so i'm going to think carefully about what to ask
<tockitj_>
crazyhorse, how often do you use google while working (:
<crazyhorse>
i.e. pop into #postgresql and ask them what to ask :)
<crazyhorse>
haha
<crazyhorse>
tockitj_: none stop all the time
<tockitj_>
its a bit tricky with 'advanced category' as you gave it
carloslopes has joined #ruby-lang
<crazyhorse>
tockitj_: yeah also though
bastilian has joined #ruby-lang
<crazyhorse>
from a business perspective
<crazyhorse>
it might be good to stick some really hard questions in there
<tockitj_>
but what is ie. hard ruby question ?
<crazyhorse>
because it gives you some barganning points with wages
<tockitj_>
heh
<ddfreyne>
:D
<tockitj_>
i'd just like to figure out how good are they (:
<ddfreyne>
crazyhorse: what kind of hard questions are you thinking about?
<crazyhorse>
andrewvos: roman numerals to number converter is always a good one
<tockitj_>
andrewvos, what is fizzbuzz ?
<injekt>
oO
<crazyhorse>
give them the wikipedia article.. give them the unit tests... get them to write the code
<andrewvos>
burgestrand: I don't agree that much with phone interviews... but my client for legal reasons had to go through that process. (client at the time)
<ezkl>
Builds won't pass until they are adequately documented
Mon_Ouie has joined #ruby-lang
<apeiros_>
don't such thresholds usually lead to just garbage docs?
<apeiros_>
i.e., tool measures "all documented", but all doc comments are like "blabla documented blabla"
<jds__>
I'm reading stdin from another command, using ARGF.each{.....}. If the other command exits (perhaps due to the user hitting Ctrl-C), I get an Errno::EPIPE exception
<jds__>
Is there a nice way of dealing with it, or do I just wrap my entire script in begin... rescue Errno::EPIPE and forget about it?
Mon_Ouie has quit [Ping timeout: 264 seconds]
kristofferrr has joined #ruby-lang
rcvalle has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
yalue has joined #ruby-lang
<injekt>
jds__: wrap your operation in the begin;rescue block yeah
kristofferrr has quit [Ping timeout: 244 seconds]
tbuehlmann has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
kurko_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 265 seconds]
<ddfreyne>
ezkl: Nice
<ddfreyne>
apeiros_: that is my fear as well
<ezkl>
apeiros_: It depends on the size of the project, I suppose. It isn't ideal for, say, a government contract, but… you'd have dedicated documentation team, so depending upon software to do their job job for them would be short-sighted anyway.
<ezkl>
At the end of the day, if someone commits "blah blah blah" any accumulated technical debt clearly rests on their shoulders.
madish has joined #ruby-lang
<ezkl>
They'd have to consciously make the decision to do a half-assed job.
klebervi_ has joined #ruby-lang
<yorickpeterse>
or just "Changes"
<yorickpeterse>
"fixed bugs" etc
rcvalle has quit [Quit: Leaving]
<injekt>
heh
klebervi_ has quit [Read error: Connection reset by peer]
klebervi_ has joined #ruby-lang
klebervi_ has quit [Read error: Connection reset by peer]
klebervi_ has joined #ruby-lang
klebervi_ has quit [Read error: Connection reset by peer]
rolfb has joined #ruby-lang
klebervi_ has joined #ruby-lang
waffleau has quit [Quit: waffleau]
klebervi_ has quit [Read error: Connection reset by peer]
klebervi_ has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
rcvalle has joined #ruby-lang
<ezkl>
That said, having worked contracts with far more documentation requirements than application requirements, I also think that documentation means absolutely nothing if management/"stakeholders" are clueless.
klebervi_ has quit [Read error: Connection reset by peer]
BigO_ has quit [Remote host closed the connection]
havenn has joined #ruby-lang
digitalbane has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
bastilian has quit [Client Quit]
sush24 has joined #ruby-lang
intellitech has quit [Quit: intellitech]
gnufied has joined #ruby-lang
vlad_starkov has joined #ruby-lang
glebm has joined #ruby-lang
mytrile has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
jtoy has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
heftig has quit [Read error: Connection reset by peer]
bentis has joined #ruby-lang
lcdhoffman has joined #ruby-lang
retro|cz has quit [Ping timeout: 244 seconds]
<bentis>
Hi all, I'm struggling with viewing my gem's rdoc with "ri" without actually installing it first. From "ri --help" I would have thought that "ri --no-standard-docs -d doc MyClass" would work, but it doesn't.
<andrewvos>
What's a nice way to download a file in ruby?
<andrewvos>
It's 518kb
<apeiros_>
open-uri
<yorickpeterse>
andrewvos: system("wget #{file}")
<apeiros_>
require 'open-uri'; data = open(uri, &:read)
* yorickpeterse
runs
<apeiros_>
yorickpeterse: if you really have to, at least use system(*)
blazes816 has quit [Quit: blazes816]
<apeiros_>
e.g. system('wget', file)
<andrewvos>
yorickpeterse: wget is not installed everywhere
<andrewvos>
yorickpeterse: Now I have two problems :|
<andrewvos>
Oh and what's the best zip library?
gsav has joined #ruby-lang
<yorickpeterse>
andrewvos: Net::HTTP?
<ddd>
if you're worried about something being there then probably best to implement your own 'wget' using Net::HTTP or something. and as for best, best is subjective. pkzip or 7pk (iirc thats the right name) are considered defactos
gsav_ has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
gsav has quit [Client Quit]
burgestrand has quit [Quit: Leaving.]
glebm has quit [Ping timeout: 265 seconds]
<tockitj_>
whats wrong with apeiros_ solution ?
<tockitj_>
data = open(uri) { |h| h.read }
gsav_ has quit [Client Quit]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
enebo has joined #ruby-lang
<andrewvos>
tockitj_: Nothing. I'm going to do that but I'm already using HTTParty so will go with that.
<andrewvos>
Thanks apeiros_, by the way.
gsav_ has quit [Client Quit]
gsav has quit [Client Quit]
gsav has joined #ruby-lang
* apeiros_
prefers just `open(uri, &:read)` (as exposed above)
gsav_ has joined #ruby-lang
gsav_ has quit [Client Quit]
gsav has quit [Client Quit]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
jammanbo has joined #ruby-lang
carloslopes has joined #ruby-lang
<jammanbo>
Can any Treetop users see what the hell is wrong with this expression? It breaks TT. a:([1-9][0-9,]) { def value; a.delete(',').to_i; end }
* bentis
just noticed "-r|--ri". Doh.
kith has joined #ruby-lang
<zzak>
bentis: yup!
<zzak>
rdoc -r lib/mylib.rb
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
carloslopes has quit [Ping timeout: 255 seconds]
arya_ has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
jammanbo has left #ruby-lang [#ruby-lang]
gaveen has joined #ruby-lang
zhul_mechanos has joined #ruby-lang
davidbalber|away is now known as davidbalbert
jbwiv has quit [Ping timeout: 260 seconds]
dstywho has joined #ruby-lang
badeball has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
setmeaway2 has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 250 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
richardjortega has joined #ruby-lang
Technodrome has quit [Quit: Leaving.]
richardjortega has left #ruby-lang [#ruby-lang]
srbaker has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby-lang
vlad_starkov has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
richardjortega_ has joined #ruby-lang
richardjortega_ has left #ruby-lang [#ruby-lang]
nXqd has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
gsav has quit [Quit: Lost terminal]
<soahccc>
How would I accomplish a single file ruby interpreter? I would like to write some server scripts and as the bash syntax is so horrible I would like to use a nicer language. Unfortunately ruby is a major dependency, total uncommon to be installed by default and deperate outdated on Debian :/
<yorickpeterse>
though the package name is misleading
carloslopes has joined #ruby-lang
<soahccc>
yorickpeterse: woah... that is definitely new in there! There was just 1.8 for ages!
setmeaway has joined #ruby-lang
unsymbol has quit [Ping timeout: 252 seconds]
<yorickpeterse>
:)
unsymbol has joined #ruby-lang
<bentis>
zzak: ta
incog has joined #ruby-lang
truexfan81 has joined #ruby-lang
<incog>
yes, hello
slyphon has joined #ruby-lang
truexfan81 has left #ruby-lang [#ruby-lang]
arya_ has quit []
arya has joined #ruby-lang
intellitech has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
<badeball>
hi! i have a question regarding file locks and was hoping someone here might be able to help. when using flock without LOCK_NB, making the thread block, will timeout ever occur? or will it just keep trying to lock the file until it manage to do so?
incog has left #ruby-lang [#ruby-lang]
srbaker has quit [Quit: Computer has gone to sleep.]
<badeball>
from reading the source code, it does not seem like a timeout will ever occur.
mixandgo has quit [Quit: mixandgo]
nazty has joined #ruby-lang
srbaker has joined #ruby-lang
dzhulk has joined #ruby-lang
coliflor has quit [Ping timeout: 245 seconds]
Uranio has quit [Quit: WeeChat 0.3.8]
mixandgo has joined #ruby-lang
methods has joined #ruby-lang
dzhulk has quit [Client Quit]
Fretta has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
zmack has quit [Remote host closed the connection]
srbaker has quit [Quit: Computer has gone to sleep.]
chimkan has left #ruby-lang [#ruby-lang]
dzhulk has joined #ruby-lang
blazes816 has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
srbaker has joined #ruby-lang
BigO_ has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
vlad_starkov has joined #ruby-lang
krohrbaugh has joined #ruby-lang
ryanlecompte has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
jxie has joined #ruby-lang
chimkan has joined #ruby-lang
jsaak has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
<joevandyk>
is defining a constant in a module/class thread safe?
methods has left #ruby-lang [#ruby-lang]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<joevandyk>
if two threads both try to require a file and load a class at the same time, there's no problems, right?
srbaker has quit [Quit: Computer has gone to sleep.]
BigO__ has joined #ruby-lang
chimkan has left #ruby-lang [#ruby-lang]
ryanlecompte has quit [Remote host closed the connection]
BigO_ has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby-lang
ryanlecompte has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
rue|w has joined #ruby-lang
srbaker has joined #ruby-lang
nyuszika7h has joined #ruby-lang
rue|w has quit [Ping timeout: 264 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
KA_ has joined #ruby-lang
__butch__ has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
<andrewvos>
joevandyk: Why would you be trying to require two files at the same time??
<joevandyk>
andrewvos: hm, right, if something like rails is started in thread safe mode, it'll require all the files first, before threads are created?
<joevandyk>
andrewvos: i'm thinking in cases like autoload
<andrewvos>
I'm not sure
<andrewvos>
Had no idea that rails had a thread safe mode
imperator has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
macmartine has joined #ruby-lang
srbaker has joined #ruby-lang
richardjortega has joined #ruby-lang
richardjortega has left #ruby-lang [#ruby-lang]
thekungfuman has left #ruby-lang [#ruby-lang]
rondale_sc has left #ruby-lang [#ruby-lang]
lcdhoffman has joined #ruby-lang
_malte_ has joined #ruby-lang
digitalbane1 has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
achiu has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 276 seconds]
amerine_ has joined #ruby-lang
_malte_ has quit [Remote host closed the connection]
sailias1 has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
_malte_ has joined #ruby-lang
t0h has quit [Disconnected by services]
t0h_ has joined #ruby-lang
pabs_ has joined #ruby-lang
rippa has quit [Ping timeout: 276 seconds]
joast has quit [Ping timeout: 265 seconds]
Weems has quit [Ping timeout: 265 seconds]
_malte has quit [Ping timeout: 265 seconds]
digitalbane has quit [Ping timeout: 265 seconds]
sailias has quit [Ping timeout: 265 seconds]
amerine has quit [Ping timeout: 265 seconds]
pabs has quit [Ping timeout: 265 seconds]
<badeball>
hi! i have a question regarding file locks and was hoping someone here might be able to help. when using flock without LOCK_NB, making the thread block, will timeout ever occur? or will it just keep trying to lock the file until it manage to do so?
banisterfiend has quit [Remote host closed the connection]
<badeball>
i did try, but it didn't timeout for the ~20 seconds. then i killed it.
sn0wb1rd has quit [Quit: I will be right back]
wyhaines has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
sush24 has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
_malte_ has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
Fretta has quit [Ping timeout: 244 seconds]
joevandyk has quit [*.net *.split]
znouza_ has quit [*.net *.split]
yibe_ has quit [*.net *.split]
pcboy__ has quit [*.net *.split]
Fretta has joined #ruby-lang
Fretta has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
rsl__ has quit [Quit: Computer has gone to sleep.]
arya has quit []
digitalbane1 has left #ruby-lang [#ruby-lang]
srbaker has quit [Quit: Computer has gone to sleep.]
Xzyx987X has quit [Ping timeout: 256 seconds]
_malte has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
hayri has joined #ruby-lang
Austin__ has joined #ruby-lang
alvaro_o has joined #ruby-lang
_sillymarkets has joined #ruby-lang
sepp2k1 has joined #ruby-lang
intellitech has quit [Quit: intellitech]
pabs_ is now known as pabs
sepp2k has quit [Ping timeout: 244 seconds]
Xzyx987X has joined #ruby-lang
<_sillymarkets>
Can somenoe help me out with a Ruby on Rails way for link delay? ... I have a text form, when they push submit, I'd like a delay and then a link to dynamically display at the bottom