<Ox0dea>
edj: Global variables are just way too "visible"; any change you make can affect code *anywhere* else, and *anybody else* can change a global you're currently relying upon.
NeverDie has joined #ruby
<edj>
I'm not really making anything practical yet just trying to get a good grasp of ruby
<shevy>
edj you can use a proc if you really need that and then .call on it
<edj>
but thats a good point
<edj>
true
<Ox0dea>
edj: This is one habit you'll want to break, like, right now.
whippythellama has quit [Quit: WeeChat 1.3]
<shevy>
but he won't!
bubuntu has quit [Ping timeout: 244 seconds]
<edj>
what habit is that ?
<shevy>
the bad habit
<Ox0dea>
That thing you're doing that you should never do again.
<edj>
what habit lmao
<Ox0dea>
This one.
<edj>
alright man
<shevy>
it's getting too much to bear
<Ox0dea>
But not enough to snake.
<edj>
i understand
dopie has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 250 seconds]
<edj>
I need to stop that.
<shevy>
don't call that dam beaver
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dimik has quit [Ping timeout: 265 seconds]
<Ox0dea>
Sshhh, he'll hear you.
<Ox0dea>
He's got ears like a snake!
Alayde has joined #ruby
<hxegon>
am I having a stroke?
<edj>
no, but i am
<shevy>
dunno... stand up just in case hxegon, a sitting position is not healthy
decoponio has quit [Quit: Leaving...]
<baweaver>
hm?
<Ox0dea>
Toldja.
moeabdol has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
<shevy>
the beaver has awoken!
I has joined #ruby
* baweaver
yawns
I is now known as Guest54901
<Ox0dea>
So, I'm accidentally running a social experiment.
<shevy>
yeah
<shevy>
since quite a long while you have been experimenting on #ruby!
<Ox0dea>
You can't prove that!
infamos has quit [Ping timeout: 250 seconds]
<ytti>
been rocking python recently, and i'm in pain
kies has joined #ruby
<ytti>
".".join(list) because, why not
teclator has quit [Ping timeout: 240 seconds]
<edj>
so *var means it can take multiple arguments and put it in one?
<Ox0dea>
edj: Yeah.
<edj>
alright, nice
<edj>
thanks
<ytti>
set(list1).difference(list2) because list1-list2 is not good?
<Ox0dea>
edj: * is called "splat" in general, and it can be used all over the place with similar semantics.
nateberkopec has quit [Read error: Connection reset by peer]
<ytti>
methods often are for wronb object
<FailBit>
I am highly illogical
<Ox0dea>
>> first, *middle, last = [1,2,3,4,5]; middle # edj
<Ox0dea>
That demonstrates that splatting "goes both ways"; you can use it to capture many arguments, and you can also use it to "explode" one argument into many.
<Ox0dea>
The `sum3` method there takes three arguments, but we can't just pass it a single Array of three elements.
<Fire-Dra_>
let's explode some arguments, will be my new signature
<Fire-Dra_>
what happened to my name, sigh
Fire-Dra_ has quit []
mdst has quit [Ping timeout: 260 seconds]
Fire-Dragon-DoL has joined #ruby
aaeron has joined #ruby
<edj>
explode one argument to many?
<Ox0dea>
The example was pretty clear.
<Fire-Dragon-DoL>
Ox0dea: lol
mikecmpbll has quit [Quit: i've nodded off.]
<Fire-Dragon-DoL>
Ox0dea: the feeling when you try to explain a programming joke to your girlfriend, lol
<Ox0dea>
Explosions are programming now? :P
<Ox0dea>
I'll get the redstone.
cdg has quit [Remote host closed the connection]
<edj>
what is that for? how does it connect to everything?
<edj>
it seems like having one argument 9001 times wouldnt have any use
<Fire-Dragon-DoL>
are there any sort of gem/whatever that allows me to create a hash accessible in both directions (by value AND by key)? Doesn't matter how is implemented (two hashes), it's a bunch of static values
babblebre has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest78736
banister has joined #ruby
mdih has quit [Ping timeout: 264 seconds]
<Ox0dea>
edj: All 9001 of those arguments are different, but I was just showing you that *args really does accept any number of arguments.
nertzy has joined #ruby
Azure has joined #ruby
<Ox0dea>
Fire-Dragon-DoL: What're you doing that that makes sense?
chipotle has quit [Quit: cheerio]
<Ox0dea>
Either way, Hash#merge and Hash#invert are the methods you're looking for; you don't need a gem/whatever.
infamos has joined #ruby
Trynemjoel has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
<edj>
OOOOOOOOH
B1n4r10 has joined #ruby
<Fire-Dragon-DoL>
Ox0dea: nothing, was playing with a script and wanted a way to create some errors (symbol) that should become a number (for serialization purposes) and I wanted a short way to reference from the number, the symbol
<edj>
gotcha
mattwildig has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
<eam>
two parens is pretty standard for ruby
<eam>
you need that even for simple stuff like "not true"
<FailBit>
that's because not has stupidly low precedence
<eam>
FailBit: nope
<eam>
that's not why
<shevy>
I remember how eam once linked in a link to some twitter about the ruby parser
<eam>
>> [not true]
<ruboto>
eam # => /tmp/execpad-a7954db40fd6/source-a7954db40fd6:2: syntax error, unexpected keyword_true, expecting '( ...check link for more (https://eval.in/466684)
<eam>
not a precedence issue
<willardg>
Cancancan question
<shevy>
cacao questions!
<willardg>
Why can't student see the classroom_path?
<willardg>
elsif user.role?(:teacher)
<willardg>
can :read, :all
<willardg>
elsif user.role?(:student)
<willardg>
can :read, Classroom
Ropeney has quit [Read error: Connection reset by peer]
<Ox0dea>
willardg: Please post the contents of your project directory in full.
<Ox0dea>
Right here into the channel like a decent human being.
rgtk has quit [Read error: Connection reset by peer]
Guest93656 has quit [Ping timeout: 276 seconds]
rikai has joined #ruby
<FailBit>
I mean if it wasn't a private repo I'd just link the source because that's easier
rgtk has joined #ruby
<Ox0dea>
Hold my backtrace, I'm gonna divide by the number of fucks I give.
<Ox0dea>
Sorry. <3
lemur has joined #ruby
CloCkWeRX has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
rgtk has joined #ruby
kuya5 has joined #ruby
karmatr0n has quit [Read error: No route to host]
m0nge has joined #ruby
roxtrongo has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
m0nge has quit [Client Quit]
tkuchiki has joined #ruby
rgrmatt has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lemur has quit [Ping timeout: 250 seconds]
<ElSif>
that is definitely javascript, i don't think your joke works there ;)
daivyk has quit [Quit: ZZZzzz…]
<ElSif>
unless Infinity counts as a backtrace...
rgtk has joined #ruby
trosborn has quit [Quit: trosborn]
rgtk has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
baweaver has quit [Ping timeout: 260 seconds]
rgtk has joined #ruby
towski_ has quit [Remote host closed the connection]
roxtrongo has quit [Ping timeout: 240 seconds]
<Fire-Dragon-DoL>
any trick to focus on work when you really want to play a game but you have to work? :S
rgtk has quit [Read error: Connection reset by peer]
<ElSif>
uninstall fallout 4?
CloCkWeRX has left #ruby [#ruby]
<havenwood>
Fire-Dragon-DoL: Play the game then restore your life to a save point before you started playing.
rgtk has joined #ruby
<Fire-Dragon-DoL>
rotfl
CloCkWeRX has joined #ruby
TheNet has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
cdg has joined #ruby
tmtwd has joined #ruby
<Ox0dea>
ElSif: Hm? You definitely get an exception and a backtrace if you divide by zero in Ruby.
<ElSif>
true enough, but not in javascript :)
<ytti>
anyone aware if nagios or some other software has generic heartbeat alerting. Such as client would do GET http://nagios/heartbeat/$app/$keepalive, and if next GET does not occur within $keepalive nagios would raise alarm for $app down
<Ox0dea>
...
rgtk has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infamos has quit [Ping timeout: 264 seconds]
<ElSif>
of course you would never
markfletcher has joined #ruby
<shevy>
you could!
<shevy>
my_fancy_variable = 0
<shevy>
use it!
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Ox0dea>
ytti: You could tell a sleeper thread to watch some variable.
diegoaguilar has quit [Ping timeout: 244 seconds]
<dorei>
ytti: i think it's pretty easy to make nagios do that
Ropeney has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
<dorei>
what if the NMS can't send the HTTP GET due to network problems?
<ytti>
i don't
<ElSif>
then HEAD seems more correct
<ytti>
nm's isn't sending http get, clients who are monitored are sending it
<shevy>
oha
<shevy>
the new rubygems has different warnings
<ytti>
if network between clients and nms is dead, then nms thinks eveyrthing is dead
<shevy>
"WARNING: license value 'GPL 2' is invalid. Use a license identifier from http://spdx.org/licenses or 'Nonstandard' for a nonstandard license."
<ytti>
HEAD does not seem correct to me
<ElSif>
how so?
<ytti>
because it's more awkward to do
<ytti>
and it's not restful
sepp2k has quit [Read error: Connection reset by peer]
<Ox0dea>
Wat.
<ElSif>
what?
<jhass>
shevy: dash not space
<ytti>
it's silly optimization when none is needed
<ytti>
like, i'd need to do 'man curl' to know how to do HEAD
<ytti>
eam, i think this proposal misses the point, runit would still only restart if it knows failure happens
<ytti>
eam, while my approach considers failure happened, unless we get information of success
axisys has joined #ruby
<ytti>
eam, it's far more robust way to do it
<eam>
ytti: yeah, you're monitoring - agreed you want both
<ytti>
eam, in runit scenario, the problem recurses
<eam>
well, it doesn't recurse
<eam>
runit is run by init
<eam>
init is guaranteed to be up
<ytti>
yes, but now we need to monitor runit
blackmesa has quit [Ping timeout: 240 seconds]
<eam>
sure, monitoring is different than process supervision
<ytti>
and if we build solution to monitor runit, we need to monitor that solution
<eam>
agreed you should determine and measure your success criteria
<eam>
well, you don't actually
<eam>
typically you want to monitor *only* the success criteria for an app
<eam>
and no other metrics
<ytti>
specifically absense of information about failure, does not mean failure didn't occur
<eam>
eg, can I successfully fetch /_status via https? Within a bounded latency? Without error rate? If so, I don't care about load average, CPU, or any other secondary factors
TheHodge has quit [Quit: Connection closed for inactivity]
<eam>
you wouldn't want to monitor something like runit
htmldrum has quit [Ping timeout: 272 seconds]
<ytti>
agreed, but if runit is my solution to monitor app, then i would (hence recursion)
<eam>
yeah, it's not that
<ytti>
i think most nms solutions appraoch to problem this way, they are looking for failures
<eam>
"ensure running" is different from "ensure operationally sound"
<ytti>
which is very fragile way to solve the problem
<ytti>
compared to looking for absense of success
duncannz has joined #ruby
<eam>
most monitoring is garbage
<ytti>
which is inherently robust (with higher chance of false positives, obviously)
<ElSif>
from what you have said i think you really just want a route in your app for nagios to hit with an active check
<eam>
one that exercises the database, naturally :)
<ElSif>
sure
<ElSif>
and trys an email too
<eam>
pretty quick, I think you can converge on "run all my tests in production, continually"
<ytti>
i should sleep instead of trying to solve this now, it's 5am and roosters are already crowing :/
<ElSif>
because if it aint broken, we had better keep checking
<ElSif>
ytti: sleep is always the right answer
<ytti>
i thought it would be peace and quiet in country-side, much noisier than in central helsinki
rattatmatt has joined #ruby
RegulationD has joined #ruby
rattatmatt has quit [Client Quit]
rattatmatt has joined #ruby
<shevy>
you forgot that finns love two things
<shevy>
(1) sauna
<shevy>
(2) party !!!
mattwildig has joined #ruby
<shevy>
You can't go wrong with Eläkeläiset
bruno- has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
bruno- is now known as Guest1079
RobertBirnie has joined #ruby
ReK2 has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 250 seconds]
Yzguy has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlovell has joined #ruby
<Yzguy>
random thought: what if you made some tutorial thing for git. like clone this repo, run like rake level:1
<Ox0dea>
By the same folks who started the Ruby Koans, it seems.
Guest1079 has quit [Ping timeout: 250 seconds]
<Yzguy>
i will never have an original idea...
<Yzguy>
haha
weemsledeux has joined #ruby
baweaver has joined #ruby
benlovell has quit [Ping timeout: 255 seconds]
<Yzguy>
well yeah, this is exactly what i was thinking
_blizzy_ has quit [Quit: Leaving]
<edj>
whats the difference between a lambda and a method?
reaVer has quit [Ping timeout: 272 seconds]
chipotle has quit [Quit: cheerio]
<FailBit>
lambdas are objects
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FailBit>
methods are... methods
<shevy>
Yzguy hah I thought about that too, all my ideas other people may have had, but the bigger ideas, when you don't see anyone having implemented it, now this is where you could shine - by using that idea to build something grand
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
baweaver has quit [Ping timeout: 240 seconds]
mjuszczak has quit []
<Yzguy>
most of the time I find someone else did it so i get discouraged and stop doing it
bigkevmcd has quit [Ping timeout: 240 seconds]
infamos has joined #ruby
qiukun has quit [Remote host closed the connection]
dikaio has joined #ruby
<Ox0dea>
edj: They both encapsulate the basic notion of a "function", but a method is a function attached to an object, and a lambda is a function without a name.
qiukun has joined #ruby
hxegon has joined #ruby
<Ox0dea>
>> m = 42.method(:to_s); [m.name, m.owner] # edj
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Arkon has quit [Ping timeout: 265 seconds]
<Ox0dea>
jfranz2: `gets.chomp` will never be `nil`, so there's no point in checking that; you probably want to check whether `fourword` is empty instead.
<Ox0dea>
And then you have an off-by-one error on Line 10.
UtkarshRay has quit [Quit: Leaving]
UtkarshRay has joined #ruby
pdoherty has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
sankaber has quit [Remote host closed the connection]
<jfranz2>
Line 10 is supposed to say "elsif fourword.length > 4", oops. Also thanks, I didn't know that.
sankaber has joined #ruby
pwnd_nfsw has quit [Ping timeout: 240 seconds]
UtkarshRay has quit [Remote host closed the connection]
<ElSif>
also, checking for equality to nil is not terribly pretty :) you can just check truthyness
UtkarshRay has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cesario has joined #ruby
<ElSif>
(sounds like you get that though)
claptor has quit [Quit: this channel is bakas]
UtkarshRay has quit [Remote host closed the connection]
_kfpratt has quit [Remote host closed the connection]
B1n4r10 has quit [Ping timeout: 250 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ElSif>
somone recently said to me that a ruby slack channel would be better for ruby discussion than a ruby irc because it is more available to less technical people. I am curious about anyones thoughts on this.
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Why are "less technical" people in a programming language channel?
favadi has quit [Read error: Connection reset by peer]
<ElSif>
yea, very good question but also didn't take the discussion beyond 'well they can have good input too'
<ElSif>
do you think it would just be too noisy for good discussion?
AnoHito has quit [Read error: Connection reset by peer]
AnoHito has joined #ruby
<Fire-Dragon-DoL>
ok folks, leaving to play some FTL
<Fire-Dragon-DoL>
good night ;)
<ElSif>
it seems like an oddly controversial topic... im not against it but i really don't see slack as terribly simpler to use than irc. is the real problem just a buzz-service one? new service that has pretty buttons is better?
favadi has joined #ruby
Fire-Dragon-DoL has quit []
<ElSif>
godspeed Fire-Dragon-DoL
<Ox0dea>
Now he's gonna go to Hell. :<
<ElSif>
i didn't get that feeling....
<shevy>
what happened to people using an IRC client to connect to irc
<Ox0dea>
Well, he left just before your godspeed got through.
<Ox0dea>
It still baffles me that things like Arch and IRC are perceived to be "difficult".
<ElSif>
yea....
<shevy>
arch became a distribution for the clever
<ElSif>
i didn't realise reading the manual was clever ;)
<Ox0dea>
I guess that's it, isn't it? The average person can't stand to read.
<shevy>
you can read manuals all day long
kp666 has quit [Quit: Leaving]
<ElSif>
i don't know that it really is that, i think some of it is just different strokes for different computer folks
mattwildig has quit [Remote host closed the connection]
pwnd_nfsw has joined #ruby
<shevy>
I knew of a swedish gentoo dude who went the arch route, then lateron went back again to gentoo stating that it allowed for him to customize and optimize more than arch
<ElSif>
<3
blackmesa has joined #ruby
<ElSif>
gentoo, for wen every picosecond counts
<dorei>
shevy: let's hope that he installed gentoo only on his computer
trosborn has joined #ruby
qiukun has quit [Quit: qiukun]
<shevy>
I think so, he was a radical
<ElSif>
a FREE radical???
<shevy>
he'd preach about how awesome arch is, then one day suddenly was back at gentoo :D
<ElSif>
sorry...
<ElSif>
i don't think i will be doing that any time soon
<ElSif>
though installing gentoo is great fun
<shevy>
he also was using ruby. It always felt unclean for me to want to use gentoo's python portage
<Ox0dea>
Is it?
<ElSif>
oh yea, when you get that final emerge started and just lean back watching the whole system compile you feel great
<shevy>
I once tried to install gentoo. one had to compile from source. I put it on my laptop, things took so long, I went to bed. I woke up, and some compile error happened
<shevy>
yeah unless you hit some error
<ElSif>
yea, laptop with gentoo = don't update on battery power
<Ox0dea>
You learn much more about gcc's diagnostic messages than you do Linux by installing Gentoo.
babblebre has quit [Quit: Connection closed for inactivity]
daivyk has quit [Quit: ZZZzzz…]
patdohere has quit [Ping timeout: 255 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patdohere has joined #ruby
haasn has quit [Ping timeout: 250 seconds]
rattatmatt has quit [Ping timeout: 276 seconds]
Hobbyboy has joined #ruby
molay has joined #ruby
towski_ has quit [Remote host closed the connection]
<molay>
I'm looking to get started with TDD (mainly bdd) and i've heard of rspec. Where's the best place for me to start? I done some reading on rspec, but i'm having trouble wrapping my head around it
<norc_>
shevy: I actually wrote a test case for a ruby bug I reported.
<shevy>
you broke ruby :(
lukaszes has joined #ruby
dkam has quit [Ping timeout: 260 seconds]
<norc_>
Koichi did.
krz has quit [Ping timeout: 264 seconds]
<norc_>
git blame is extremely satisfying.
<certainty>
bad name
<certainty>
imho
<norc_>
Yeah.
mercerist has joined #ruby
<shevy>
I guess git was picked because it's so short to type
<norc_>
not shorter than svn tho
<norc_>
or cvs...
<adaedra>
and longer than hg.
<tobiasvl>
hg is shorter
<tobiasvl>
"blame" is just a holdover from earlier vcs I guess, but svn has aliases for it: praise, annotate
<certainty>
as does hg
<adaedra>
and hg has out-of-the box shortcuts like ci or st, making its use even shorter.
<adaedra>
:p
zotherstupidguy has quit [Ping timeout: 260 seconds]
* certainty
likes hg
<certainty>
but git just has so much support
DanKnox is now known as DanKnox[away]
haasn has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
<adaedra>
^
<adaedra>
I'm not the only one D:
mghaig has joined #ruby
<norc_>
The big advantage git has is that its difficult enough to use that it automatically sorts out idiots.
<certainty>
i don't think that's true
<adaedra>
They'll put their code on Dropbox and call it a day.
<certainty>
"idiots" will manage to do serious damage though
<certainty>
much harder in stock hg
blackmesa has quit [Ping timeout: 250 seconds]
<adaedra>
(And yes, I've seen people doing collaborative code work through Dropbox.)
<norc_>
I have actually seen a major company doing a 20 men project for production software in avionics use an FTP server for VCS...
<norc_>
For years people would overwrite each others changes. It was really amusing to watch.
<oddmunds>
:|
ibouvousaime has joined #ruby
<shevy>
what is wrong with FTP
<adaedra>
Everything.
<certainty>
nothing shevy
<norc_>
you mean because its also 3 letters like cvs, svn or git?
<certainty>
go back to sleep
<norc_>
:-)
akem has quit [Quit: Bye]
mghaig has quit [Ping timeout: 272 seconds]
<norc_>
Okay, Im beginning to feel that "Ruby under a microscope" still lacks the magnification that I want.
<adaedra>
You need to go deeper?
<norc_>
Yeah.
waka has quit [Remote host closed the connection]
waka has joined #ruby
<norc_>
I mean I have already started stepping through the YARV compiler by hand. But the sheer lack of documentation in the source code makes this hard.
maikowblue has joined #ruby
flip_digits has joined #ruby
duncannz has quit [Remote host closed the connection]
bnizzle has quit [Ping timeout: 272 seconds]
ldnunes has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
blackmesa has joined #ruby
flip_digits has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
prestorium has joined #ruby
DanKnox[away] is now known as DanKnox
last_staff has quit [Read error: Connection reset by peer]
seedinger has joined #ruby
neanderslob has joined #ruby
pandaant has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
neanderslob has quit [Remote host closed the connection]
bnizzle has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roxtrongo has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhjondoh has joined #ruby
lkba_ has joined #ruby
lukaszes has joined #ruby
sross07 has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
sross07 has joined #ruby
ibouvousaime has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
baweaver has joined #ruby
favadi has quit [Max SendQ exceeded]
Hounddog has quit [Ping timeout: 246 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 276 seconds]
ruurd has joined #ruby
seedinger has quit [Read error: Connection reset by peer]
subscope has joined #ruby
avril14th has joined #ruby
Xeago has quit [Remote host closed the connection]
<bob_f>
Hi, using rspec, can somebody tell me how to correctly do `allow(obj).to receive(:method).with(:param1, :param2)` ?
<yorickpeterse>
That's correct actually
zotherstupidguy has joined #ruby
<bob_f>
I get an error telling me I must specify a default value when using this format, but if I prescribe a `and_call_original` method beforehand, the second line doesn't get called.
roxtrong_ has joined #ruby
<bob_f>
I can pastebin code if needed.
Hounddog has quit [Excess Flood]
codecop has quit [Ping timeout: 264 seconds]
Hounddog has joined #ruby
<bob_f>
Sorry, by "the second line doesn't get called" I meant to say that the original is always called, never the stub I specify for those exact parameters.
codecop has joined #ruby
<avril14th>
bob_f: code?
bruno- has joined #ruby
roxtrongo has quit [Ping timeout: 276 seconds]
<avril14th>
anyone on my alias_method of scope thing? ;)
suchness has joined #ruby
Hounddog has quit [Excess Flood]
<avril14th>
exit
bruno- is now known as Guest83560
<norc_>
avril14th: Yeah.
Hounddog has joined #ruby
<suchness>
I didn't get much response in the ##English channel, maybe you guys can help me with a name: I am looking for a word that fits the following definition: A person added to an event with the capacity to optionally manage or optionally attend the event.
<norc_>
avril14th: Well you have your answer. alias_method is a private method. ;-)
tkuchiki_ has quit [Read error: Connection reset by peer]
<DEA7TH>
I'm considering making an open-source gem out of my system, but my idea is a bit unusual - most gems have a much more technical idea than mine. My gem will provide the common things for companies which need to make deliveries to / collections from customers. For example, pizza delivery or ironing services with driving as part of the service. Things like route visualization and optimization (TSP), JSON for an Android app for the driver, generator for custo
<DEA7TH>
and JSON for mobile app for customers to make orders (Android and customer mobile apps will also be released). Can this be a gem?
Synthead has quit [Ping timeout: 244 seconds]
stan has quit [Quit: Leaving]
FernandoBasso has joined #ruby
<DEA7TH>
generator for customer DB table*
Hounddog has quit [Excess Flood]
<norc_>
avril14th: I think what you really want to do is to stub :woot
<DEA7TH>
also it might include views for all those things, if I figure out how to do it with generators.
Hounddog has joined #ruby
<avril14th>
norc_: I could indeed, thx
<suchness>
avril14th: Hrm. I am not completely sold. I will have to think about that one.
<avril14th>
bob_f: not sure what you're trying to do
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bob_f>
I want to stub a call to a method only when specific params are passed, otherwise delegate to original.
<avril14th>
bob_f: then use stub
<avril14th>
with the described logic in it
<avril14th>
norc_: actually the not funky thing is that stub does only exit in rspec files :)
lipoqil has quit [Quit: Connection closed for inactivity]
<avril14th>
but well, will do
Hounddog has quit [Excess Flood]
<bob_f>
avril14th: Huh, I thought `stub` was not correct any more - my mistake.
Guest83560 has quit [Ping timeout: 240 seconds]
<norc_>
avril14th: Why are you trying to do that anyway?
Hounddog has joined #ruby
<DEA7TH>
Or actually a Ruby gem is the same thing as a library in any other program, right?
<norc_>
avril14th: If your factory expects an interface in your model - then provide it in your model.
<norc_>
Dont monkey patch your model from your factory.
kimegede has quit [Quit: Leaving...]
<avril14th>
norc_: well, Event is an abstract class. interface is provided in sub classes. but I don't want to do examples (test it on every sub class)
<norc_>
avril14th: Then why does your factory take an abstract class?
lukaszes has joined #ruby
<norc_>
Give it an implementation class instead.
DEA7TH has quit [Quit: DEA7TH]
<avril14th>
indeed
DEA7TH has joined #ruby
Hounddog has quit [Excess Flood]
stan has joined #ruby
Hounddog has joined #ruby
htmldrum has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bob_f>
avril14th: `stub` is deprecated.
Hounddog has quit [Excess Flood]
<avril14th>
bob_f: , is it? I use it everywhere. let me see :)
Hounddog has joined #ruby
<bob_f>
avril14th: Yeah. `allow` is the new preferred syntax.
dkam has joined #ruby
ruurd has joined #ruby
<avril14th>
indeed
suman has joined #ruby
<suman>
hi need help on timeouts in ruby
<avril14th>
bob_f: your question makes more sense :)
<norc_>
suman: Ask your question then :)
<bob_f>
:)
mghaig has joined #ruby
Hounddog has quit [Excess Flood]
<avril14th>
bob_f: don't think you can call allow to receive twice and have one or the other called depending on parameters. you have to set it once and then in the code, call original I'd say (tried super?)
<suman_>
i have a situation where the result of one request was replaced by another
Rickmasta has joined #ruby
<suman_>
i doubt that was because of timeouts
<norc_>
bob_f: This could be an XY problem stemming from design. Maybe what you really want is to stub out a method that is used by whatever you are trying to stub?
suman has quit [Ping timeout: 246 seconds]
Synthead has joined #ruby
<suman_>
i am not able to reproduce can someone help on reproducing how the previous data can be retruned?
<ruboto>
norc_ # => "== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========\n0000 trace 1 ...check link for more (https://eval.in/467029)
<ruboto>
norc_ # => == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== ...check link for more (https://eval.in/467030)
dkam has joined #ruby
<norc_>
No makes sense again. :)
Synthead has quit [Ping timeout: 244 seconds]
<norc_>
() should result in null node in the AST I think?
<bougyman>
/25
dkam has quit [Ping timeout: 250 seconds]
seedinge_ has joined #ruby
mghaig has joined #ruby
DanKnox[away] is now known as DanKnox
_blizzy_ has joined #ruby
flip_digits has joined #ruby
zenguy_pc has joined #ruby
The_Ball has quit [Ping timeout: 272 seconds]
shredding has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
mghaig has quit [Ping timeout: 276 seconds]
The_Ball has joined #ruby
flip_digits has quit [Ping timeout: 250 seconds]
cajone has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 255 seconds]
ruurd has quit [Quit: ZZZzzz…]
Azure has joined #ruby
Synthead has joined #ruby
campestrini has joined #ruby
cajone has joined #ruby
bricker_ has quit [Ping timeout: 260 seconds]
ixti has joined #ruby
kp666 has quit [Remote host closed the connection]
dkam has joined #ruby
<campestrini>
After a long time, is nice to be using irc again
<campestrini>
this is amazing, hahaha
ebbflowgo has joined #ruby
<certainty>
why?
<adaedra>
You have to ask why IRC is amazing?
<certainty>
yeah
<oddmunds>
this discussion will be great
rbowlby has joined #ruby
krz has joined #ruby
<__desmondhume>
extinguishing enthusiasm at its finest
solocshaw has joined #ruby
<apeiros>
curb your enthusiasm
dhjondoh has quit [Quit: dhjondoh]
campestrini has quit [Quit: Leaving]
<__desmondhume>
:|
rbowlby has quit [Ping timeout: 246 seconds]
solocshaw has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
indignatio has joined #ruby
dkam has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
blaxter has joined #ruby
sdothum has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
Xeago has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
benlovell has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
karapetyan has quit [Remote host closed the connection]
<skakri>
Wooo IRC! \o/
DanKnox is now known as DanKnox[away]
syath has joined #ruby
<certainty>
see?
TiuTalk has joined #ruby
Rodya_ has joined #ruby
krz has quit [Ping timeout: 272 seconds]
timonv has quit [Ping timeout: 264 seconds]
yqt has joined #ruby
<__desmondhume>
i agree with certainty btw, i'm new to IRC and it's not something you give for granted if you've never used it
<__desmondhume>
sorry, with camilasan
<__desmondhume>
f*ck campestrini
<__desmondhume>
wrong quote. lol
krz has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby
baweaver has joined #ruby
Xeago has quit [Remote host closed the connection]
dhjondoh has joined #ruby
luriv has joined #ruby
flip_digits has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
htmldrum has joined #ruby
riffraff has quit [Quit: Leaving]
minimalism has quit [Quit: leaving]
baweaver has quit [Ping timeout: 240 seconds]
k3asd` has joined #ruby
jdawgaz has joined #ruby
Xeago has joined #ruby
ruurd has joined #ruby
prestorium has quit [Quit: Leaving]
dtordable has quit [Quit: Lost terminal]
dkam has joined #ruby
benlovell has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
TiuTalk has quit [Quit: Leaving...]
dkam has quit [Read error: Connection reset by peer]
mghaig has joined #ruby
dkam has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
rodfersou has quit [Quit: leaving]
freerobby has joined #ruby
neohunter has joined #ruby
dlitvak has joined #ruby
benlovell has joined #ruby
dkam has quit [Ping timeout: 276 seconds]
mghaig has quit [Ping timeout: 276 seconds]
rodfersou has joined #ruby
dkam has joined #ruby
lapide_viridi has joined #ruby
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 246 seconds]
Jardayn has joined #ruby
B1n4r10 has joined #ruby
Pupp3tm4st3r has joined #ruby
darkxploit has joined #ruby
hool is now known as ZYPP
flip_digits has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
Pupp3tm4_ has quit [Ping timeout: 240 seconds]
Feyn has quit [Quit: Leaving]
TheHodge has quit [Quit: Connection closed for inactivity]
bricker has joined #ruby
<darkxploit>
hello guys. After having install ruby with rvm i noticed that my ruby is version 2.2.1p85 whereas on the official ruby website its 2.2.3 How do i update to latest
ruurd has quit [Quit: ZZZzzz…]
<FailBit>
rvm install 2.2.3
mercerist has quit [Quit: Computer has gone to sleep.]
lapideviridi has joined #ruby
rfmind has joined #ruby
<darkxploit>
FailBit, yes its installing
seedinge_ has quit [Read error: Connection reset by peer]
|| has joined #ruby
<darkxploit>
but this command curl -sSL https://get.rvm.io | bash -s stable --ruby is suppose to download latest stable right ?
NO_BOOT_DEVICE has quit [Ping timeout: 276 seconds]
|| is now known as Guest60384
CloCkWeRX has joined #ruby
TheHodge has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
lapide_viridi has quit [Ping timeout: 265 seconds]
lapideviridi has quit [Ping timeout: 246 seconds]
valeriansaliou has joined #ruby
valeriansaliou has quit [Remote host closed the connection]
devoldmx has quit [Remote host closed the connection]
joe___ has joined #ruby
SenpaiSilver has joined #ruby
htmldrum has joined #ruby
tvw has joined #ruby
mattwildig has joined #ruby
bruno-_ has quit [Ping timeout: 252 seconds]
goodcodeguy has joined #ruby
Xeago has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
prestorium has joined #ruby
joe___ has quit [Ping timeout: 246 seconds]
infamos has quit [Ping timeout: 260 seconds]
lapide_viridi has joined #ruby
ruurd has joined #ruby
Icey has quit [Quit: icey]
dstarh has joined #ruby
dstarh has quit [Remote host closed the connection]
<ruboto>
FailBit # => /tmp/execpad-922fe6013dca/source-922fe6013dca:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/467178)
<FailBit>
lel
<desmondhume>
well, ok :') this is a bit fancy, lots of uselessly different possible notations
grill_ has joined #ruby
<adaedra>
FailBit: some spaces are important in my line.
<canton7>
it's just "you can use any marker you like"
<adaedra>
desmondhume: not so useless.
grill_ has quit [Changing host]
grill_ has joined #ruby
boris317 has joined #ruby
<adaedra>
>> %(String with both 'single' and "double" quotes, without escaping)
<ruboto>
adaedra # => "String with both 'single' and \"double\" quotes, without escaping" (https://eval.in/467183)
<desmondhume>
i can't catch the point of using dots in place of rounded brackets
<canton7>
"Any single non-alpha-numeric character can be used as the delimiter" from adaedra's link. So you can choose a character which doesn't appear in your string
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<canton7>
it's not that dots are expressely permitted, it's that dots are an alphanumeric character and any alphanumeric character is permitted
B1n4r10 has quit [Ping timeout: 240 seconds]
<adaedra>
>> %
<ruboto>
adaedra, I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<adaedra>
erf
Rodya_ has joined #ruby
<adaedra>
apeiros: that's not a server error this time :D
<desmondhume>
ahahahahah ok so i see now. It's useful cause you can use any delimiter that's not appearing inside the string, so you don't have to think about escaping chars, ammaright?
rippa has quit [Ping timeout: 250 seconds]
<adaedra>
yes.
<desmondhume>
cool, thank you adaedra
<adaedra>
also, the paired ones like (, [, { are counted
<adaedra>
so %(hello (world) !!!) ends at the second )
<desmondhume>
i just benchmarked ( against {, the { seems a bit slower, dunno why
<FailBit>
you can use string interp still, right?
sdwrage has quit [Quit: This computer has gone to sleep]
<boris317>
Hello. I want to implement a DSL like method call as seen here: https://bpaste.net/show/a442d8ac55f8 How would I go about that? config will just store a key/value pair in a hash. Thanks.
<FailBit>
desmondhume: pretty sure that's parsing and not execution
<FailBit>
so I wouldn't see why
<desmondhume>
ooook, everything's clear now
tkuchiki has quit [Remote host closed the connection]
mghaig has quit [Ping timeout: 244 seconds]
arne has joined #ruby
aaeron1 has joined #ruby
<adaedra>
FailBit: It's like %Q, so yes.
diegoaguilar has quit [Ping timeout: 276 seconds]
platzhirsch has left #ruby [#ruby]
rippa has joined #ruby
suman_ has quit [Ping timeout: 246 seconds]
molay has quit [Quit: Leaving]
aaeron has quit [Ping timeout: 244 seconds]
kfpratt has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
wprice has joined #ruby
<adaedra>
because you're defining ::CoolClass2
ruurd has quit [Quit: ZZZzzz…]
johnzorn has joined #ruby
vigintas has joined #ruby
sdothum has joined #ruby
<adaedra>
(so at the top level, not in your module)
<Oli`>
but it's inside the anonymous module right?
arthurix_ has joined #ruby
baweaver has quit [Remote host closed the connection]
<Oli`>
how should i write it ?
User458764 has joined #ruby
s00pcan has quit [Remote host closed the connection]
darkf_ is now known as darkf
devoldmx has quit [Ping timeout: 265 seconds]
s00pcan has joined #ruby
bMalum has joined #ruby
arthurix has quit [Ping timeout: 250 seconds]
loc22_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
<adaedra>
You can use const_set
Rodya_ has joined #ruby
kobain has joined #ruby
ekleog has quit [Read error: Connection reset by peer]
c355E3B has quit [Quit: Connection closed for inactivity]
<Oli`>
ok, thank you
loincloth has joined #ruby
CodingWolf has quit [Ping timeout: 240 seconds]
ekleog has joined #ruby
aufi has quit [Quit: Konversation terminated!]
diegoaguilar has joined #ruby
<gregf_>
desmondhume: sorry, got pulled into a meeting :|. i was trying the padding string bit(PizzaHut), *this* len = 8; p %w{foo foobar foobarbaz}.map{ |str| pad = len - str.length; " " * (pad > 0 ? pad : 0) + str }
dravine has quit [Ping timeout: 260 seconds]
<gregf_>
oops, scrolls down :/
<desmondhume>
it seems to work fine
<gregf_>
and PizzaHat i meant
<desmondhume>
in my irb console
<adaedra>
gregf_: what's wrong with ljust/rjust?
ekleog has quit [Read error: Connection reset by peer]
<gregf_>
i think i managed to trick the bot :|
chipotle has quit [Quit: cheerio]
leafybas_ has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
<gregf_>
adaedra: nothing ;). what you've suggested is better
leafybas_ has joined #ruby
ekleog has joined #ruby
roxtrongo has joined #ruby
rodfersou|lunch is now known as rodfersou
mary5030 has quit [Remote host closed the connection]
<gregf_>
Oli`: module Foo; ADD = 1;SUB = 2;end;class Bar; include Foo;end;p Bar.constants *works for me*
lsv_ has joined #ruby
johnzorn has quit [Ping timeout: 264 seconds]
Xzanron has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
podman has joined #ruby
klaas_ has joined #ruby
dtordabl1 has joined #ruby
Rickmasta has joined #ruby
RedDwarf has joined #ruby
<gregf_>
oh - well
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
vayan_ has joined #ruby
aaeron has joined #ruby
<Sou|cutter>
Is there a reason behind declaring a class like this: class GeneratedAttributeMethods < Module;
mahlon_ has joined #ruby
loc22_ has quit [Quit: Be back later ...]
<Sou|cutter>
why would you throw < Module in there ?
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Iacobus_ has joined #ruby
ckrailo_ has joined #ruby
gusTester1 has joined #ruby
mghaig has joined #ruby
ahuman_ has joined #ruby
roxtrongo has quit [Ping timeout: 240 seconds]
subscope has joined #ruby
ESpiney has joined #ruby
zrl_ has joined #ruby
cjheath_ has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
jorb_ has joined #ruby
gusTester1 has left #ruby [#ruby]
niftylettuce_ has joined #ruby
Jello_Raptor_ has joined #ruby
sp_ has joined #ruby
shellie__ has joined #ruby
greedo_ has joined #ruby
agentmee1kat has joined #ruby
axisys_ has joined #ruby
raenk_ has joined #ruby
qpls_ has joined #ruby
kadoppe_ has joined #ruby
veloutin_ has joined #ruby
aredridel has joined #ruby
subscope has quit [Client Quit]
Skelz0r_ has joined #ruby
cornerman has joined #ruby
Guest32335 has joined #ruby
Aria has quit [Disconnected by services]
xxneolithicxx1 has joined #ruby
kadoppe has quit [Ping timeout: 240 seconds]
svkurowski has quit [Ping timeout: 240 seconds]
duoi has quit [Ping timeout: 240 seconds]
amitchellbullard has quit [Ping timeout: 240 seconds]
cjheath has quit [Ping timeout: 240 seconds]
aaeron1 has quit [Ping timeout: 240 seconds]
alem0lars has quit [Ping timeout: 240 seconds]
vayan has quit [Ping timeout: 240 seconds]
ckrailo has quit [Ping timeout: 240 seconds]
WillAmes has quit [Ping timeout: 240 seconds]
jorb has quit [Ping timeout: 240 seconds]
zrl has quit [Ping timeout: 240 seconds]
Iacobus has quit [Ping timeout: 240 seconds]
xxneolithicxx has quit [Ping timeout: 240 seconds]
UNIMPL has quit [Ping timeout: 240 seconds]
johnhamelink has quit [Ping timeout: 240 seconds]
Outlastsheep has quit [Ping timeout: 240 seconds]
shellie_ has quit [Ping timeout: 240 seconds]
Zackio has quit [Ping timeout: 240 seconds]
dtordable has quit [Ping timeout: 240 seconds]
agentmeerkat has quit [Ping timeout: 240 seconds]
blaxter has quit [Ping timeout: 240 seconds]
sankaber has quit [Ping timeout: 240 seconds]
axisys has quit [Ping timeout: 240 seconds]
niftylettuce has quit [Ping timeout: 240 seconds]
djcp has quit [Ping timeout: 240 seconds]
raenk has quit [Ping timeout: 240 seconds]
qpls has quit [Ping timeout: 240 seconds]
greedo has quit [Ping timeout: 240 seconds]
Lilian has quit [Ping timeout: 240 seconds]
indignatio has quit [Ping timeout: 240 seconds]
lsv has quit [Ping timeout: 240 seconds]
pwnd_nfsw has quit [Ping timeout: 240 seconds]
znz_jp has quit [Ping timeout: 240 seconds]
ZeeNoodley has quit [Ping timeout: 240 seconds]
klaas has quit [Ping timeout: 240 seconds]
mahlon has quit [Ping timeout: 240 seconds]
j416 has quit [Ping timeout: 240 seconds]
Jello_Raptor has quit [Ping timeout: 240 seconds]
Rovanion has quit [Ping timeout: 240 seconds]
veloutin has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 240 seconds]
ahuman has quit [Ping timeout: 240 seconds]
Skelz0r has quit [Ping timeout: 240 seconds]
fold1 has quit [Ping timeout: 240 seconds]
duoi has joined #ruby
pwnd_nfsw has joined #ruby
duoi has joined #ruby
duoi has quit [Changing host]
cjheath_ is now known as cjheath
aredridel is now known as Aria
subscope has joined #ruby
LilianRose has joined #ruby
Yzguy has joined #ruby
Rovanion_ has joined #ruby
blaxter has joined #ruby
car has quit [Quit: Leaving]
j416_ has joined #ruby
ckrailo_ is now known as ckrailo
vayan_ is now known as vayan
djcp has joined #ruby
fold2 has joined #ruby
dravine has joined #ruby
indignatio has joined #ruby
<gregf_>
>> class Foo < Module;end; class Bar;end; [ Foo.ancestors, Bar.ancestors ]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
johnzorn has joined #ruby
subscope has joined #ruby
charliesome has joined #ruby
bigkevmcd has joined #ruby
arthurix has joined #ruby
<gregf_>
Sou|cutter: i guess theres many things one could do but why would a class want to inherit from a module? its not an is_a but has_a relationship?
hanmac has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapety_ has joined #ruby
<gregf_>
like so would this make any sense in an OO world: class Cat < Chicken; end ?
symm- has joined #ruby
karapety_ has quit [Remote host closed the connection]
subscope has quit [Client Quit]
<gregf_>
modules are for delegations
infamos has joined #ruby
karapetyan has joined #ruby
<gregf_>
but then you're right, the language needs to handle it. i would expect it for fail at compile time in like say Java. something like: public interface Bar {}; class Foo extends Bar {}
<Sou|cutter>
This is something I saw in rails code, so I can't defend it
<gregf_>
s/for/to/
arthurix_ has quit [Ping timeout: 264 seconds]
B1n4r10 has quit [Ping timeout: 240 seconds]
subscope has joined #ruby
Xeago has quit [Remote host closed the connection]
<shevy>
they are an alien race, those railsters
lubarch has joined #ruby
<shevy>
but they no longer require nick registration so they are on a path of redemption!
ThatsNotJack has quit [Remote host closed the connection]
mghaig has joined #ruby
ThatsNotJack has joined #ruby
<Sou|cutter>
yeah
fschuindt has quit [Quit: WeeChat 1.3]
yardenbar has quit [Ping timeout: 264 seconds]
AugustoCesar has joined #ruby
_blizzy_ has joined #ruby
alem0lars has joined #ruby
adac has joined #ruby
bricker has quit [Read error: Connection reset by peer]
ThatsNotJack has quit [Remote host closed the connection]
mjuszczak has joined #ruby
AugustoCesar has left #ruby [#ruby]
crdpink has joined #ruby
mghaig has quit [Read error: Connection reset by peer]
ThatsNotJack has joined #ruby
crdpink2 has quit [Ping timeout: 246 seconds]
JDiPierro has quit [Remote host closed the connection]
ruurd has joined #ruby
TheNet has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
mghaig has joined #ruby
solars has quit [Ping timeout: 240 seconds]
terminalrecluse has joined #ruby
arne has joined #ruby
terminalrecluse has quit [Max SendQ exceeded]
terminalrecluse has joined #ruby
<slash_nick>
oh no?
* slash_nick
unregisters
[Butch] has joined #ruby
infamos has joined #ruby
kp666 has joined #ruby
<Oli`>
the doc for Module::new says "[...]block is evaluated in the context of this module[...]" but if I want to declare a class into my module I can't do this: Module.new { class Foo; end } I have to write this: Module.new { |mod| class mod::Foo; end }
tulak has quit [Remote host closed the connection]
arne has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lubarch has quit [Quit: leaving]
<Oli`>
if the block is evaluated in the context of the module, shouldn't Module.new { class Foo; end } declare a class inside my module ?
<Oli`>
or am I missing something?
<shevy>
hmm
<shevy>
here is the doc just in case someone else wants to read it:
mh_laaks1 has quit [Remote host closed the connection]
fantazo has joined #ruby
adac has joined #ruby
mghaig has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
blackmesa has joined #ruby
tulak has joined #ruby
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpup has quit [Ping timeout: 240 seconds]
mesamoo has joined #ruby
Icey has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
synthroid has joined #ruby
ht__ has joined #ruby
TheNet has joined #ruby
Guest3421 has joined #ruby
emilkarl has joined #ruby
Blaguvest has joined #ruby
TomPeed has joined #ruby
PizzaHat has quit [Quit: PizzaHat]
roxtrongo has joined #ruby
rakm has joined #ruby
towler has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
__desmondhume has quit [Remote host closed the connection]
cpup has joined #ruby
ramfjord has joined #ruby
eminencehc has quit [Remote host closed the connection]
yardenbar has quit [Quit: Leaving]
eminencehc has joined #ruby
yardenbar has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
axl_ has joined #ruby
aaeron has joined #ruby
roxtrongo has quit [Ping timeout: 244 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
akem has quit [Read error: Connection reset by peer]
levifig has quit [Ping timeout: 265 seconds]
ruby-lang407 has quit [Quit: Page closed]
solocshaw has joined #ruby
centrx has joined #ruby
levifig has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
krz has quit [Ping timeout: 260 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
purplexed- has joined #ruby
purplexed- has joined #ruby
weaksauce has joined #ruby
Fire-Dragon-DoL has quit []
dionysus69 has joined #ruby
TheNet has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 240 seconds]
makenoise has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FailBit>
>windows
ss_much has joined #ruby
eminencehc has quit [Remote host closed the connection]
jud has quit [Quit: Leaving]
hxegon has quit [Ping timeout: 240 seconds]
dionysus70 has joined #ruby
dlitvak has joined #ruby
vigintas has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
dionysus70 is now known as dionysus69
mghaig has quit [Read error: Connection reset by peer]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
x-light has joined #ruby
hxegon has joined #ruby
mesamoo has joined #ruby
lipoqil has joined #ruby
aaeron has quit [Quit: Leaving.]
grilled-cheese has quit [Quit: grilled-cheese]
aaeron has joined #ruby
baweaver has quit [Remote host closed the connection]
karapetyan has joined #ruby
blaxter has quit [Ping timeout: 260 seconds]
__desmondhume has joined #ruby
moeabdol has joined #ruby
rakm has joined #ruby
aaeron has quit [Client Quit]
DEA7TH has joined #ruby
RegulationD has joined #ruby
mghaig has joined #ruby
baweaver has joined #ruby
grilled-cheese has joined #ruby
failshell has joined #ruby
pwnd_nfsw has quit [Ping timeout: 240 seconds]
fantazo has quit [Ping timeout: 264 seconds]
kerunaru has joined #ruby
gusrub has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
shadeslayer has quit [Ping timeout: 250 seconds]
chrisja has joined #ruby
cornerma1 has joined #ruby
maasha has joined #ruby
ascarter has joined #ruby
<maasha>
Can I get rake to skip a task if it was completed successfully earlier - like writing file.
luriv has quit [Remote host closed the connection]
Guest2617 has quit [Ping timeout: 250 seconds]
aaeron has joined #ruby
sepp2k has quit [Quit: Leaving.]
baweaver has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
shadeslayer has joined #ruby
Arkon has quit [Remote host closed the connection]
<jhass>
it should do so by default
<jhass>
or you mean between multiple runs? look into `rule`
Arkon has joined #ruby
ESpiney has quit [Ping timeout: 240 seconds]
<maasha>
jhass
aaeron has quit [Client Quit]
<maasha>
ok
cornerman has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
cornerma1 is now known as cornerman
bMalum has quit [Quit: bMalum]
_stu_ has joined #ruby
last_staff has joined #ruby
pontiki_x has quit [Quit: Connection closed for inactivity]
psy_ has joined #ruby
last_staff has quit [Client Quit]
mghaig has quit [Read error: Connection reset by peer]
momloy has quit [Ping timeout: 244 seconds]
luriv has joined #ruby
mghaig has joined #ruby
baweaver has joined #ruby
makenoise has quit [Remote host closed the connection]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apfeluser has joined #ruby
i8igmac has quit [Ping timeout: 260 seconds]
apfeluser has quit [Remote host closed the connection]
aaeron has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Quit: WeeChat 1.3]
ruurd has quit [Quit: ZZZzzz…]
lapide_viridi has joined #ruby
Fire-Dragon-DoL has joined #ruby
pwnd_nfsw has joined #ruby
fantazo has joined #ruby
gusrub has joined #ruby
c355E3B has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
eminencehc has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
weckl has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 246 seconds]
<maasha>
jhass: hm, how would a rule like that downloads a file, but only once?
dlitvak has quit [Read error: Connection reset by peer]
<maasha>
*look like
<jhass>
I always need to look at the docs too
Fire-Dragon-DoL has quit []
TheNet has joined #ruby
bMalum has joined #ruby
The_Ball has quit [Remote host closed the connection]
makenoise has joined #ruby
stamina has joined #ruby
opensource_ninja has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
skullcrasher has quit [Quit: quit]
hxegon has quit [Ping timeout: 260 seconds]
vyorkin has joined #ruby
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Client Quit]
vyorkin has quit [Client Quit]
jackjackdripper has joined #ruby
nateberkopec has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
jackjackdripper has joined #ruby
skullcrasher has joined #ruby
jackjackdripper has quit [Client Quit]
ascarter has joined #ruby
_stu_ has quit [Quit: _stu_]
jackjackdripper has joined #ruby
<EllisTAA>
offtopic?
<EllisTAA>
what is the offtopic channel called?
yardenbar has joined #ruby
loc22 has joined #ruby
<centrx>
EllisTAA, #ruby-offtopic
<centrx>
EllisTAA, most offtopic channels on IRC follow that form
hxegon has joined #ruby
<EllisTAA>
centrx: thanks
Arkon has quit [Remote host closed the connection]
Arkon has joined #ruby
h99h9h88 has joined #ruby
shadoi has joined #ruby
rdark has quit [Quit: leaving]
dlitvak has joined #ruby
ruby-lang920 has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
ibouvousaime has joined #ruby
vigintas has joined #ruby
Arkon has quit [Ping timeout: 272 seconds]
ruby-lang920 has quit [Client Quit]
rippa has quit [Ping timeout: 244 seconds]
sdwrage has joined #ruby
NathanielHiggers has joined #ruby
NathanielHiggers has left #ruby [#ruby]
to_json has joined #ruby
evanjs has quit [Ping timeout: 244 seconds]
mattwildig has joined #ruby
benlieb has quit [Quit: benlieb]
lukaszes has joined #ruby
ruurd has joined #ruby
ta has joined #ruby
rippa has joined #ruby
leafyba__ has joined #ruby
leafyba__ has quit [Remote host closed the connection]
Freeaqingme has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 265 seconds]
leafyba__ has joined #ruby
dlitvak_ has joined #ruby
shredding has joined #ruby
segfalt has quit [Quit: WeeChat 1.3]
Freeaqingme has joined #ruby
diegoaguilar has quit [Ping timeout: 244 seconds]
segfalt has joined #ruby
NathanielHiggers has joined #ruby
NathanielHiggers has left #ruby [#ruby]
ht__ has quit [Quit: Konversation terminated!]
opensource_ninja has quit [Quit: opensource_ninja]
ht__ has joined #ruby
leafybas_ has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
ruurd has quit [Quit: ZZZzzz…]
dlitvak has joined #ruby
Kabal has joined #ruby
leafyba__ has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- is now known as Guest46989
Freeaqingme has quit [Remote host closed the connection]
prestorium has quit [Quit: Leaving]
Kabal has quit [Client Quit]
arthurix has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
Kabal has joined #ruby
dlitvak_ has quit [Ping timeout: 250 seconds]
Kabal has quit [Client Quit]
Kabal has joined #ruby
aaeron1 has joined #ruby
devoldmx has joined #ruby
lukaszes has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
evanjs has joined #ruby
ascarter has joined #ruby
Arkon has joined #ruby
jud has joined #ruby
aaeron2 has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
aaeron1 has quit [Read error: Connection reset by peer]
aaeron has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 260 seconds]
aaeron2 has quit [Client Quit]
h99h9h88 has quit [Remote host closed the connection]
ascarter has quit [Client Quit]
mattwildig has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
aaeron has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
devoldmx has quit [Ping timeout: 240 seconds]
A124 has joined #ruby
sinkensabe has joined #ruby
Arkon has quit [Remote host closed the connection]
infamos has quit [Ping timeout: 246 seconds]
Arkon has joined #ruby
baweaver has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
roxtrongo has joined #ruby
prestorium has joined #ruby
karapetyan has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
poguez_ has joined #ruby
karapetyan has joined #ruby
trajing has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Pupp3tm4st3r has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
trajing has joined #ruby
kies has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
Arkon has quit [Ping timeout: 260 seconds]
loc22 has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
ibouvousaime has quit [Ping timeout: 252 seconds]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
duncannz has joined #ruby
roxtrongo has quit [Ping timeout: 246 seconds]
rakm has joined #ruby
blackmesa has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
Guest53 has joined #ruby
ldnunes has quit [Quit: Leaving]
maasha has quit [Quit: Page closed]
VeryBewitching has joined #ruby
freerobby has quit [Quit: Leaving.]
emilkarl has quit [Quit: emilkarl]
<VeryBewitching>
G'day folks.
<havenwood>
hi
<VeryBewitching>
How's the day havenwood?
<havenwood>
VeryBewitching: it goes!
<VeryBewitching>
Never enough keystrokes in a day.
ibouvousaime has joined #ruby
mjuszczak has quit []
scmx has joined #ruby
karapetyan has quit [Remote host closed the connection]
platzhirsch has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.3]
Arkon has joined #ruby
A124 has quit [Ping timeout: 276 seconds]
A124 has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafybas_ has joined #ruby
mjuszczak has joined #ruby
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
baweaver has joined #ruby
dlitvak has joined #ruby
mjuszcza_ has joined #ruby
gusrub has quit [Remote host closed the connection]
momomomomo has joined #ruby
lapide_viridi has quit [Quit: Leaving]
gusrub has joined #ruby
haylon has quit [Quit: Leaving]
luriv has quit [Remote host closed the connection]
mjuszczak has quit [Ping timeout: 250 seconds]
ht__ has quit [Quit: Konversation terminated!]
shredding has quit [Ping timeout: 250 seconds]
eminencehc has quit [Ping timeout: 272 seconds]
prestorium has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
Yzguy has joined #ruby
ht__ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dlitvak has quit [Remote host closed the connection]
_kfpratt has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
rodfersou is now known as rodfersou|dinner
mghaig has quit [Ping timeout: 255 seconds]
kfpratt has quit [Ping timeout: 246 seconds]
TheNet has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 260 seconds]
mjuszcza_ has quit []
mghaig has joined #ruby
last_staff has joined #ruby
kies has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
naftilos76 has joined #ruby
neanderslob has joined #ruby
<naftilos76>
Hi i am trying to use net-ssh / net-ssh-shell to finally buld a login shell through ruby. I could execute simple terminal commands but what i really want is to be able to play with rvm and that requires a login shell. Can any body help?
DoubleMalt has joined #ruby
kerunaru has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
niftylettuce has quit [Quit: Connection closed for inactivity]
maletor has quit [Quit: Computer has gone to sleep.]
arup_r has quit [Quit: Leaving]
diegoaguilar has quit [Ping timeout: 272 seconds]
leafybas_ has quit [Ping timeout: 244 seconds]
dasher00 has joined #ruby
mghaig has quit [Read error: Connection reset by peer]
kadoppe_ has quit [Ping timeout: 272 seconds]
mghaig has joined #ruby
codecop has quit [Quit: Išeinu]
kadoppe has joined #ruby
baweaver has joined #ruby
sinkensabe has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
last_staff has quit [Read error: Connection reset by peer]
fantazo has quit [Quit: Verlassend]
gusrub has joined #ruby
agentmee1kat has quit [Ping timeout: 264 seconds]
yqt has joined #ruby
dopie has quit [Ping timeout: 240 seconds]
willardg has joined #ruby
sinkensabe has quit [Remote host closed the connection]
waka has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
professorscience has joined #ruby
waka has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
CloCkWeRX has joined #ruby
ht__ has joined #ruby
dlitvak has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has joined #ruby
bMalum has quit [Quit: bMalum]
<professorscience>
Hi all, not sure if this is the right place but: I'm trying to use rake because it came along with 'ceedling' which I'm trying out. A few questions but starting at one: is there a way I can add a task as a pre-requisite to all tasks (except itself)?
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
__desmondhume has quit [Read error: Connection reset by peer]
ESpiney has joined #ruby
bMalum has joined #ruby
__desmondhume has joined #ruby
<BraddPitt>
naftilos76 can you expand on what you're trying to do?
mattwildig has joined #ruby
cicloid has joined #ruby
elshaka has joined #ruby
mozzarella has joined #ruby
tvw has quit [Remote host closed the connection]
Guest53 has joined #ruby
benlieb has joined #ruby
<jhass>
professorscience: not really, I mean you could list all tasks and update them again, but what is this for?
<BraddPitt>
professorscience you can have a rake task call another rake task with `Rake::Task['task_name'].execute
DoubleMalt has joined #ruby
sdwrage has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
mjuszczak has joined #ruby
DoubleMalt has quit [Max SendQ exceeded]
lukaszes has joined #ruby
<professorscience>
jhass: There seem to be several options for default builds - test, test:all, release, default, all... I would like it so all of them depend on having built one task which is a library.
decoponio has quit [Quit: Leaving...]
<jhass>
elaborate?
dopie has joined #ruby
<naftilos76>
BraddPitt, i am using rails 4.2 and at some point i need a login shell so that i can set my ruby env bu doing 'rvm use 2.2.0' and then get the list of gems i have and showing them in a webpage
mjuszczak has quit [Client Quit]
DoubleMalt has joined #ruby
malconis has quit [Ping timeout: 250 seconds]
<professorscience>
jhass: I'm using someone else's library which I've cloned from github. It has a makefile to build its own .o files which I can then (hopefully) link my C against. But I need to have the make command run for any of the rake tasks. If that makes sense?
sinkensabe has joined #ruby
<BraddPitt>
naftilos76 so on a webpage hosted by your rails app, you want to have an interactive login shell?
<professorscience>
jhass: I should say, ceedling is a TDD framework for C, but it includes rake.
Cyther has joined #ruby
<BraddPitt>
or you just want to show the list of gems being used on a webpage hosted by your rails app?
aaeron has quit [Quit: Leaving.]
<BraddPitt>
if the latter, you can just shell out for the command and put the return value in an html.erb page
<jhass>
professorscience: I would expect ceedling to have appropriate hooks/configuration for that
roxtrongo has joined #ruby
<naftilos76>
BraddPitt, no as i said i want to show a list of my gems under a certain ruby version. RVM requires a login shell. I cannot do that with system() or other `` or whatever.
<jhass>
peeking at the project you don't write a Rakefile/regular rake tasks at all there
h99h9h88 has joined #ruby
sdwrage has quit [Ping timeout: 250 seconds]
sdwrage_ has joined #ruby
<naftilos76>
BraddPitt, happens on the click of a button. i never said anything about an interactive terminal on a page
karapetyan has joined #ruby
<BraddPitt>
ok, I see. Well unfortunately I cannot help you as I do not know how to get a login shell from ruby
<zwdr>
cant you just use a cronjob to write that stuff into a flat file?
ht__ has quit [Quit: Konversation terminated!]
<professorscience>
jhass: Hmm. I would have thought the same but it seems the project maintainers haven't got around to fully documenting their scripts.
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
maddmaxx has joined #ruby
<naftilos76>
Anybody? Login shell with a ruby gem?
freerobby has joined #ruby
rgtk has quit [Remote host closed the connection]
freerobby has quit [Client Quit]
<jhass>
run sh -l ?
malconis has joined #ruby
<naftilos76>
This project claims interactive login shells but no docs are available and after trying some methods i couldn't get stdout : https://github.com/jedi4ever/net-ssh-shell
Icey has quit [Quit: icey]
lemur has quit [Ping timeout: 246 seconds]
<jhass>
dunno, if you have the rvm script in the path, just use rvm do
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
syath has quit [Quit: WeeChat 1.2]
<naftilos76>
jhass, if i do any of these bash -l or sh -l the net/ssh gem process gets trapped which is documented as normal as this is not the supposed usage of net/ssh
<naftilos76>
jhass, i want to be able to change rubies by doing rvm use this or use that etc
frmendes has joined #ruby
<jhass>
it's (getting a login shell) probably the wrong solution to your problem anyway
maddmaxx has quit [Quit: Leaving]
<naftilos76>
jhass, do you have anything else to suggest?
<BraddPitt>
can you make a bash script on the server running rvm that outputs the gemlist into a file?
<BraddPitt>
then read that file in your application to get the gem list?
<jhass>
rvm use is merely convenience, nothing I'd rely on in a script anyway
<grill_>
question: how would I go about splitting up a module across multiple files (one class per file) in such a manner that would allow the classes to reference eachother?
evanjs has quit [Remote host closed the connection]
<BraddPitt>
grill_ references should (ideally) be one way to avoid circular dependencies
<naftilos76>
i do not want to break this process into a bunch of running scripts bash/ruby each affecting the other and so on
<BraddPitt>
attempt to structure you code as such
maddmaxx has joined #ruby
<jhass>
grill_: you generally don't have to worry about it until you have toplevel code referencing one constant to be defined to define another and to define that other constant you need the former
cicloid_ has joined #ruby
evanjs has joined #ruby
__desmondhume has quit [Remote host closed the connection]
cicloid has quit [Read error: Connection reset by peer]
<jhass>
grill_: that is if you have the references in methods only, it should just work
cicloid_ has quit [Max SendQ exceeded]
cicloid has joined #ruby
tomphp has joined #ruby
SCHAAP137 has joined #ruby
<grill_>
ok. can I structure the file as I would a java program?
DoubleMalt has quit [Remote host closed the connection]
dented42 has joined #ruby
cicloid has quit [Max SendQ exceeded]
dmitch has joined #ruby
<grill_>
i.e. have one "main" class that instantiates other classes + performs operations?
<shevy>
what does this mean
<shevy>
yeah
Coldblackice has joined #ruby
<grill_>
do I need to do any includes or anything?
<shevy>
of course
cicloid has joined #ruby
<grill_>
how would the includes work?
<jhass>
include is for mixing a module into a class
maletor has joined #ruby
<jhass>
it's sort of like inheriting an interface in java, except that the implementation comes with them
<jhass>
so no, you don't generally need include
<jhass>
only where it makes sense
<grill_>
why'd shevy say "of course" then
<jhass>
because shevy, nobody else would mind if you just ignore them tbh
<grill_>
ok
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
ouch
axsuul has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
<grill_>
so ruby will implicitly understand that several classes in a module spread across several files are all part of the same module?
axsuul has joined #ruby
<jhass>
grill_: ruby doesn't really care. You use require to load files and those files define constants (classes and modules are just objects assigned to constants too)
sdothum has quit [Read error: Connection reset by peer]
Guest53 has joined #ruby
<jhass>
ruby makes no assumptions at all on the relation between file names and what classes or modules they define or do in any way really
<jhass>
that's just conventions
indignatio has quit [Quit: Leaving]
<grill_>
ok. i am going to have to look into require a bit then.
<jhass>
the two popular styles are to require the files that define the classes & modules the class/module of the current file needs in order to function at the top of the file, or have a central entry point file where you do all requires in the right order
<jhass>
I tend to prefer the first
sdothum has joined #ruby
benlieb has quit [Quit: benlieb]
redline6561 has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
<frmendes>
hey! I have to connect to an already existing database. With datamapper it's just defining the models and relationships between them and run setup, right?
dravine has quit [Ping timeout: 264 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
ghostbox has quit [Read error: Connection reset by peer]
dravine has joined #ruby
<banister>
yorickpeterse The Dutch-man with a singular bullfrog or trilobite expression of the eyes, whose eyes were like frog ponds in the broad platter of his cheeks and gleamed like a pool covered with frog-spittle.
<adaedra>
wow.
EvanFreeeman has joined #ruby
<EvanFreeeman>
wow
neanderslob has quit [Read error: Connection reset by peer]
mghaig has quit [Read error: Connection reset by peer]
neanderslob has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mwaldner has quit [Client Quit]
ghostbox has joined #ruby
EvanFreeeman has joined #ruby
<EvanFreeeman>
test
tomphp has joined #ruby
<EvanFreeeman>
grr
EvanFreeeman has left #ruby [#ruby]
Ox0dea has joined #ruby
<jhass>
do they expect a reaction within 3 seconds or ...?
uri has quit [Ping timeout: 246 seconds]
<adaedra>
Like most new people on IRC.
<adaedra>
"There's 1k people, room must be very active."
<Ox0dea>
jhass: I'm almost certain shevy took grill_'s "do any includes" to mean "use `require`", which would explain his "of course".
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass>
Ox0dea: maybe, it's confusing to newbies nevertheless
sepp2k1 has joined #ruby
ec|hat is now known as ec
<jhass>
if you research include with ruby you won't get require explained
<grill_>
s/new people on IRC/millennials/g
<jhass>
new to ruby I mean ;)
<grill_>
yeah. i am looking into require and include now. it is time
<Ox0dea>
In any case, "do any includes" is poor phrasing, and I don't think shevy deserved that particular round of belittlement.
<jhass>
Ox0dea: and tbh they have a habit for such confusing statements or mentioning things that are only confusing to the other person since only remotely related
mghaig has joined #ruby
<Ox0dea>
But I do that too?
<grill_>
ok. so, i meant "requre"
<grill_>
err require
<Ox0dea>
You did.
sepp2k has quit [Ping timeout: 250 seconds]
adac has quit [Ping timeout: 240 seconds]
<adaedra>
Ox0dea: not the same way, I'd say.
<jhass>
Ox0dea: you solve the real problem first or at least clear it up quickly. I'm not saying they do it intentionally, but they keep going on with the irrelevant/confusing stuff
<jhass>
defending it as relevant even when pointed out that it's quite misleading atm
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<grill_>
so, let's say I have a module with three classes (a, b, and main). Let's also say I've split the module into three files such that each contains a single class. How do I reference a and b from main?
<jhass>
grill_: if you're inside module Main, just A or B, outside Main::A, Main::B
tomphp has joined #ruby
h99h9h88 has joined #ruby
makenoise has quit [Remote host closed the connection]
<jhass>
grill_: and as said make sure the files defining A & B are require'd first
scmx has quit [Ping timeout: 250 seconds]
h99h9h88 has quit [Remote host closed the connection]
kriskropd_ has quit [Changing host]
kriskropd_ has joined #ruby
kriskropd_ is now known as kriskropd__
imperator has joined #ruby
tomphp has quit [Client Quit]
kriskropd__ is now known as kriskropd
rgtk has joined #ruby
SCHAAP137 has quit [Ping timeout: 260 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
synthroid has quit []
VeryBewitching has joined #ruby
Freeaqingme has joined #ruby
CloCkWeRX has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has joined #ruby
mghaig has quit [Read error: Connection reset by peer]
raldu_ has left #ruby [#ruby]
malconis_ has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
malconis has quit [Ping timeout: 252 seconds]
phillips1012 has quit [Ping timeout: 250 seconds]
failshell has quit []
arthurix has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
tomphp has joined #ruby
mjuszczak has quit []
mghaig has joined #ruby
adac has joined #ruby
tomphp has quit [Client Quit]
mh_laakso has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
mjuszczak has joined #ruby
SCHAAP137 has joined #ruby
ht__ has quit [Client Quit]
Guest53 has joined #ruby
aaeron has joined #ruby
<grill_>
ok nice
icarus_ has quit [Quit: leaving]
nfk|laptop has quit [Quit: yawn]
rakm has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has joined #ruby
tomphp has joined #ruby
rgtk has quit [Remote host closed the connection]
ghostbox has quit [Read error: Connection reset by peer]
CloCkWeRX has left #ruby [#ruby]
ghostbox has joined #ruby
subscope has joined #ruby
jdawgaz has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
<meatchicken>
Anyone looking for ruby devs?
bMalum has quit [Quit: bMalum]
vdamewood has joined #ruby
<adaedra>
I think they're in the #ruby channel
agent_white has joined #ruby
malconis_ has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby
devoldmx has joined #ruby
rakm has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
K1MOS has joined #ruby
mhi^ has left #ruby [#ruby]
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has quit [Quit: Konversation terminated!]
weemsledeux has joined #ruby
ht__ has joined #ruby
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
Xeago has joined #ruby
tomphp has joined #ruby
davejlong has quit [Quit: leaving]
phillips1012 has joined #ruby
ht__ has quit [Client Quit]
<imperator>
adaedra, wut
willardg has joined #ruby
rakm has quit [Client Quit]
it_tard has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
mary5030 has quit [Remote host closed the connection]
<adaedra>
imperator, nothing.
sdwrage_ has quit [Quit: This computer has gone to sleep]
mjuszczak has quit []
tomphp has quit [Client Quit]
ss_much has quit [Quit: Connection closed for inactivity]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
rakm has joined #ruby
stan has quit [Quit: Leaving]
professorscience has left #ruby [#ruby]
mjuszczak has joined #ruby
tulak has quit [Remote host closed the connection]
<ruboto>
Ox0dea, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<Ox0dea>
Yay, computers.
<to_json>
imho python -> ruby is a pretty small transition wherein most of your existing idioms and practices will continue to serve you. just don't forget to `end` your blocks
<Ox0dea>
I'm not sure that's true.
lukaszes has quit [Ping timeout: 264 seconds]
<jhass>
well, the base datastructures the languages evolve around are the same, which helps a bunch
h99h9h88 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patdohere has quit [Ping timeout: 240 seconds]
<to_json>
the lack of namespaces is a bit of a shock, i suppose
gambl0re has joined #ruby
unknowns2k2 has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<to_json>
but you could do worse than to learn ruby from it
tomphp has quit [Client Quit]
symm- has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
h99h9h88 has quit [Ping timeout: 240 seconds]
<jhass>
lack is a bit harsh, it's just that there's none per file
k3asd` has quit [Ping timeout: 260 seconds]
<cyberfawkes>
well... that was fun... sorry guys. basically a friend and I, are building an IRC Bot. I know Python, and my friend knows Ruby. We ended up going with Ruby. We are using something called gems? Basically I need to get into ruby really fast.
naftilos76 has quit [Quit: Αποχώρησε]
tomphp has joined #ruby
<jhass>
gems are libraries, rubygems is to ruby what pip is to python
<jhass>
you're probably going with cinch?
unreal has joined #ruby
ebbflowgo has joined #ruby
tomphp has quit [Client Quit]
<to_json>
oh man, a cinch bot is itself a really fun way to learn ruby
freerobby has joined #ruby
<cyberfawkes>
jhass: never used/heard of pip.
<cyberfawkes>
cinch?
<to_json>
easy_install?
<to_json>
cinch is a gem/module/framework for building IRC bots
<jhass>
well, not too much python either I guess :P
unreal_ has quit [Ping timeout: 240 seconds]
<to_json>
gives you all you need to start taking IRC messages as arguments
<cyberfawkes>
jhass: I pretty much used Python for making text based adventure games, scripts, etc. Nothing I was intending to share with anyone.
<cyberfawkes>
to_json: I'll have to take a look at that.
Arkon has quit [Remote host closed the connection]
<jhass>
pip is more about using than sharing really
robbyoconnor has quit [Quit: Konversation terminated!]
ebbflowgo has quit [Client Quit]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby
<cyberfawkes>
I don't know how I haven't heard about it.