mloveless has quit [Remote host closed the connection]
tsu_ has quit [Ping timeout: 258 seconds]
HYDRO187 is now known as HYDRODifferent
BadQuanta has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
nyanz has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Sawbones has joined #ruby
agrinb has quit [Remote host closed the connection]
econerd4ever has quit [Remote host closed the connection]
<shevy>
benzrf are you finally coming back to ruby?
MartynKeigher has joined #ruby
agrinb has joined #ruby
<benzrf>
no
AmirolAhmad has quit [Remote host closed the connection]
sargas has quit [Quit: This computer has gone to sleep]
diegoviola has joined #ruby
<shevy>
:(
<pipework>
He left?
<pipework>
But it isn't fixed yet.
robustus has quit [Ping timeout: 250 seconds]
agrinb has quit [Ping timeout: 258 seconds]
<shevy>
some people just don't understand that IRC is meant to idle for power
Spami has quit [Ping timeout: 250 seconds]
xaaabk has quit [Ping timeout: 245 seconds]
HYDRODifferent is now known as HYDRO187
Spami has joined #ruby
charliesome has quit [Quit: zzz]
Fusl has quit [Ping timeout: 245 seconds]
checkit has quit [Quit: (null)]
Snowstormer has quit [Ping timeout: 272 seconds]
jamgood96 has joined #ruby
Sawbones has quit [Remote host closed the connection]
robustus|Off has joined #ruby
hamakn has joined #ruby
Miron has quit [Ping timeout: 272 seconds]
Sawbones has joined #ruby
larissa has joined #ruby
stormbytes has joined #ruby
<jamgood96>
When deploying via Capistrano, does anyone know how to override the `git:wrapper` task? This link shows how, but unfortunately all it does is allow me to append to `git:wrapper` - http://osdir.com/ml/capistrano/2014-09/msg00004.html
fgo has joined #ruby
djbkd has joined #ruby
hamakn has quit [Ping timeout: 264 seconds]
robustus|Off is now known as robustus
robustus has quit [Excess Flood]
<Fire-Dragon-DoL>
if I have a module that I want to include, is possible to have private methods (I want to have only one "included method" but that method is complex enough to require few private methods)
<Fire-Dragon-DoL>
?
arescorpio has quit [Remote host closed the connection]
mary5030 has joined #ruby
silva42 has joined #ruby
<apeiros_>
Fire-Dragon-DoL: why don't you just try?
<apeiros_>
takes you about 60s in irb…
<apeiros_>
s/irb/pry/
<Fire-Dragon-DoL>
you are right
Sawbones has quit [Remote host closed the connection]
econerd4ever has joined #ruby
robustus|Off has joined #ruby
<Fire-Dragon-DoL>
O.o looks like is possible, nice
robustus|Off is now known as robustus
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tier has joined #ruby
hamakn has joined #ruby
ixti has quit [Ping timeout: 244 seconds]
Deele has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 264 seconds]
<workmad3>
Fire-Dragon-DoL: it's worth noting that 'private' methods like that are callable from object you include the module... it basically works exactly the same as subclassing a class with private methods
<workmad3>
(and not like private methods in java or C++)
<Fire-Dragon-DoL>
workmad3: yes yes
s00pcan has joined #ruby
<Fire-Dragon-DoL>
I will never complain about Ruby "private" concept: the way they did it, basically fixes ANY issue I had with other OOP languages
<workmad3>
Fire-Dragon-DoL: heh :)
<Fire-Dragon-DoL>
(not to mention how much easier makes tests)
aspires has quit []
hamakn has quit [Remote host closed the connection]
<workmad3>
Fire-Dragon-DoL: protected in ruby is a little foobarey IMO :)
<Fire-Dragon-DoL>
workmad3: true, I wrote a GIST about that
hamakn has joined #ruby
<workmad3>
Fire-Dragon-DoL: but then, I can't think of a time I've ever bothered with it :)
<matti>
:)
<Fire-Dragon-DoL>
workmad3: well basically the concept of "virtual protected" method is missing in ruby. Yes you can reproduce it
<Fire-Dragon-DoL>
but you need two methods to have that
<apeiros_>
"it basically works the same as subclassing" -> included modules end up in the ancestry.
Sawbones has joined #ruby
aspires has joined #ruby
<shevy>
hey IceDragon look - we have a Fire-Dragon-DoL here now
<Fire-Dragon-DoL>
lol
<mostlybadfly>
now, battle
* IceDragon
panics
<apeiros_>
I find the whole private/protected business pointless
<Fire-Dragon-DoL>
ahahaha
* IceDragon
uses Escape
<silva42>
exit
<mostlybadfly>
winter is here so this seems appropriate
silva42 has quit [Quit: leaving]
* IceDragon
tried to run away...
* Fire-Dragon-DoL
feels like a Pokemon
<mostlybadfly>
it's super effective!
* IceDragon
could not escape.
<shevy>
IceDragon lol... notice how silva42 instantly used exit when you tried to Escape
<workmad3>
Fire-Dragon-DoL: I'm still waiting for someone to come up with a good use for virtual protected inheritance in C++ :P
<IceDragon>
:3
ta has joined #ruby
<IceDragon>
I know right
<IceDragon>
I'm looking for a fps to play on linux
<IceDragon>
-.-
<shevy>
play economy games!
<shevy>
or try apeiros to get to finish his game
robustus has quit [Ping timeout: 255 seconds]
rshetty has joined #ruby
<Fire-Dragon-DoL>
workmad3: uhm, if you consider abstract protected still a virtual protected, there are some situations where it's nice to have
<apeiros_>
shevy: which one?
yfeldblu_ has joined #ruby
<shevy>
apeiros_ haha ALL OF THEM :D
<apeiros_>
oh dear :-|
<workmad3>
Fire-Dragon-DoL: I'm not talking about a virtual protected method you gain through inheritance
<apeiros_>
that's a lot of work
<mostlybadfly>
most of the Civ games are on linux
<mostlybadfly>
and are fairly affordable
<shevy>
Civilization was a good game
<mostlybadfly>
<3
<Fire-Dragon-DoL>
workmad3: mh, I'm not sure what virtual protected inheritance is. I know you can inherit using "protected", not sure what "virtual" can do in that case, lol
<mostlybadfly>
don't you mean Sid Meier's Civilization? :D
<shevy>
not long ago I tried to play some of the old DOS games in dosbox; but they just didn't seem as awesome as they used to be many years ago :<
<workmad3>
Fire-Dragon-DoL: I'm talking about class Foo: virtual protected Bar { <impl> }
arescorpio has joined #ruby
<Fire-Dragon-DoL>
sigh you can add VIRTUAL there too
<workmad3>
Fire-Dragon-DoL: you need virtual inheritance to cope with multiple inheritance in C++
<Fire-Dragon-DoL>
what did they smoke when they made the C++ API for OOP
<workmad3>
Fire-Dragon-DoL: and protected will, iirc, cause all public methods you inherit to become protected in the subclass
<mostlybadfly>
Fire-Dragon-DoL: Cocaine++
<IceDragon>
shevy: I wanna play shooters o3o
<workmad3>
Fire-Dragon-DoL: but I've never encountered anyone who could explain what the hell you'd want to use virtual protected inheritance for...
<mostlybadfly>
or maybe Crack you can't smoke the other
<shevy>
IceDragon I always hated shooters... I even played Doom 1 and I always got a headache after a while. and I got a headache ONLY from those kind of shooters
<IceDragon>
shevy: but your right, I should probably play a economy game, since my mouse isn't working correctly ;_;
<shevy>
yes! \o/
louism2wash has quit [Quit: This computer has gone to sleep]
<shevy>
play with brain, not with mouse!
<workmad3>
Fire-Dragon-DoL: there's also the fun of non-virtual destructors in C++ :)
yfeldblum has quit [Ping timeout: 258 seconds]
jonr22 has joined #ruby
<Fire-Dragon-DoL>
workmad3: don't know. From my understanding, the entire issue with "multiple inheritance" is the fact that they didn't want to "depend" on inheritance order, like if you write class Blah : A, B, C or B, A, C, it should be the same
<mostlybadfly>
i have a fondness for shooters but i think i enjoy others
<mostlybadfly>
like i'll always play COD or Halo
ta has quit [Ping timeout: 260 seconds]
<mostlybadfly>
but not all the time, I probably spend more time on rpgs
AndyBotwin has quit [Quit: Leaving]
<mostlybadfly>
or strategy/economy type games
<Fire-Dragon-DoL>
workmad3: in ruby, order matters, and module are exactly like multiple inheritance, at least for me. You can also "super" up to other modules
aspires has quit []
Hobogrammer has joined #ruby
mg^ is now known as mg^afk
<workmad3>
Fire-Dragon-DoL: modules get around a lot of the issue, as does specifying that the ancestors chain will always be linear and the last inclusion will be at the start
<workmad3>
Fire-Dragon-DoL: python also gets around the issue by simply providing a deterministic mechanism for resolving method lookup in multiple inheritance (again, order-based)
<apeiros_>
Fire-Dragon-DoL: modules are the same way NOT multiple inheritance as class A < B < C is not multiple inheritance
cloaked1 has quit [Quit: leaving]
<Fire-Dragon-DoL>
scala raises, I don't like it though.
<apeiros_>
it's a linear ancestry
Techguy305 has joined #ruby
robustus has joined #ruby
<Fire-Dragon-DoL>
apeiros I wrote Blah : A, B, C, which in pseudo-c++ syntax is is something like Blah < A, B, C (Blah inherits from all 3)
jonr22 has quit [Ping timeout: 265 seconds]
<apeiros_>
Fire-Dragon-DoL: I'm referring to "and module are exactly like multiple inheritance"
mary5030 has quit [Remote host closed the connection]
<apeiros_>
no, they're not
<apeiros_>
and A < B < C was supposed to be short for: class C; end; class B < C; end; class A < B; end. sorry if that was not clear.
mary5030 has joined #ruby
<Fire-Dragon-DoL>
sorry, I missed the "having"
<Fire-Dragon-DoL>
I mean, modules are like HAVING multiple inheritance
<workmad3>
they provide a somewhat similar end-result (being able to pull in behaviour from more than one other source), but yeah... modules are, as apeiros_ said, definitely not MI :)
mary5030 has quit [Read error: Connection reset by peer]
emmesswhy has quit [Quit: This computer has gone to sleep]
tvw has quit []
mary5030 has joined #ruby
<workmad3>
(I should get to bed tbh... it's too late for me to be lucidly talking about this stuff :) )
Sawbones has quit [Remote host closed the connection]
<apeiros_>
I'm way ahead of you
<Fire-Dragon-DoL>
I find fun how sometimes I say "I can't really work today" => wrote 400 lines of code. Other times I say "Oh today I'm working so good" => wrote 3-4 lines
* apeiros_
already in bed
<apeiros_>
Fire-Dragon-DoL: best days are when I delete code
<Fire-Dragon-DoL>
I should be already in bed
<Fire-Dragon-DoL>
but I want to play some games
<apeiros_>
so rare
mary5030 has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
definitely, lol
econerd4ever has quit [Remote host closed the connection]
mikepack has joined #ruby
<workmad3>
apeiros_: my best days are when I figure out those 10 lines of code that stop me writing hundreds of lines in the first place and then deleting them :)
mary5030 has joined #ruby
chipotle has joined #ruby
<Fire-Dragon-DoL>
I'm trying to follow the max-5-lines-per-method convention which makes the code look much more clear, recently
econerd4ever has joined #ruby
ixti has joined #ruby
doritostains has quit [Quit: doritostains]
<pipework>
But as everything has pros and cons, it means you probably have more indirection.
<Fire-Dragon-DoL>
pipework: is it referred to my last sentence? Not sure about the context
<pipework>
It is.
josephndenton has joined #ruby
* apeiros_
finds such rules hilariously pointless
AndyBotwin has joined #ruby
<Fire-Dragon-DoL>
pipework: yes and no, usually, it forces me to think twice about my code, it helps me find "missing classes" that are hidden in my logic
devdazed has quit [Quit: Computer has gone to sleep.]
<pipework>
apeiros_: One thing I heard from Sandi Mrtz is that newer programmers love rules like that. Chiefly, they love DRY. It's easy to understand.
<workmad3>
Fire-Dragon-DoL: you could always try skipping the rule and just going straight to thinking about code :P
<apeiros_>
pipework: of course. people love rules, guidelines, constraints. it frees them from thinking.
<apeiros_>
but that's exactly the problem with it: people *stop* thinking.
<workmad3>
pipework: that fits with the dreyfus model too... the more advanced your skill in something becomes, the less you rely on rules
rshetty has quit [Remote host closed the connection]
<pipework>
I personally dislike the rule of threes.
econerd4ever has quit [Read error: Connection reset by peer]
<workmad3>
(which is also a big problem with 'expert systems'... a rules-based approach to capturing the knowledge of people that no longer think in terms of rules)
<Fire-Dragon-DoL>
pipework: I don't have points against the rule itself, obviously must be used with brain
<pipework>
Fire-Dragon-DoL: I'm not saying you're doing it mindlessly.
<pipework>
I'm just saying make sure you question it every time you use it.
mary5030 has quit [Ping timeout: 264 seconds]
robustus has quit [Ping timeout: 250 seconds]
<Fire-Dragon-DoL>
pipework: Yes it wasn't a complain against what you said, I was just pointing exactly toward "do it with brain"
<apeiros_>
or put differently: when the rule substitutes the reason for the rule, then it's bad.
boombadaroomba has joined #ruby
kireevco1 has quit [Quit: Leaving.]
josephndenton has quit [Ping timeout: 255 seconds]
AmirolAhmad has joined #ruby
<apeiros_>
your method isn't bad because it's 50 lines long. it is bad because it does more than one thing (which leads to it being 50 lines long). the length is merely an indicator.
<Fire-Dragon-DoL>
apeiros_: yes definitely
<apeiros_>
(f.ex.)
Hobogrammer has quit [Ping timeout: 252 seconds]
redjack1964 has joined #ruby
<Fire-Dragon-DoL>
are there any forum/place where I can get suggestions/discussion about OOD? Last time I tried a good question on Stackoverflow, went basically ignored
<Fire-Dragon-DoL>
(and I have 3500 reputation, so I'm not a new user)
<pipework>
Fire-Dragon-DoL: Here's not terrible.
<workmad3>
Fire-Dragon-DoL: pfft, only 3500 :P
<pipework>
Maybe there's a discourse. There's Objects-on-Rails mailing list if you like that.
<Fire-Dragon-DoL>
workmad3: I'll kill you. Considering the "recent" stackoverflow directions, it's impossible to increase reputation now
<Fire-Dragon-DoL>
pipework: LINK!
<workmad3>
Fire-Dragon-DoL: :D
<workmad3>
Fire-Dragon-DoL: I think I've only posted about 2 answers on SO in the last 4 years
<Fire-Dragon-DoL>
workmad3: from useful questions to damn "missing comma" questions, damn stackoverflow <.<
<workmad3>
Fire-Dragon-DoL: yeah... but I answered it over 6 years ago now :P
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
<workmad3>
Fire-Dragon-DoL: an easy question over 6 years generates a fair bit of rep ;)
yfeldblu_ has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
definitely
x1337807x has joined #ruby
<Fire-Dragon-DoL>
workmad3: and they also nerfed the "gain" from upvote on questions too
jtheuer has joined #ruby
claptor has joined #ruby
<workmad3>
Fire-Dragon-DoL: I find it more amusing than anything tbh... I'm sat with enough SO rep to be a mod, when I managed to get in when there was still low-hanging fruit for questions to answer
Takle has joined #ruby
gregf has joined #ruby
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<workmad3>
Fire-Dragon-DoL: right from the outset, people were predicting that this would happen with SO btw... the common, useful questions would get answered and those answers would be hit time and time again
sailias has joined #ruby
<workmad3>
Fire-Dragon-DoL: so yeah... it favoured early adopters
<Fire-Dragon-DoL>
workmad3: true, the fact that I can't post questions I really need made it a "readonly" website from my point of view
tsu_ has joined #ruby
<Fire-Dragon-DoL>
workmad3: not too bad, but I miss a good place where I can make questions about programming
jlast has joined #ruby
<workmad3>
Fire-Dragon-DoL: as apeiros_ said, there's always here
rshetty has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
yes I know chat can be good, but requires me to stay connected and sometimes good people aren't and will miss that entirely
<workmad3>
Fire-Dragon-DoL: plenty of us are always willing to shave a good coding yak ;)
BadQuanta has joined #ruby
lampd1 has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
<workmad3>
Fire-Dragon-DoL: tbh, I quite like that aspect of IRC... it's more like a large coffeeshop filled with coders... you can wander in, find a conversation to join/butt in on
AmirolAh_ has joined #ruby
<workmad3>
Fire-Dragon-DoL: and ignore the other convos if necessary
Takle has quit [Ping timeout: 250 seconds]
<Fire-Dragon-DoL>
workmad3: and now the question of the day. After reading poodr which basically improved my OOD by a lot. Are there any similar books for JavaScript? I keep hearing people "you shouldn't write a library to emulate classes". OK. "You shouldn't write a library to emulate modules". OK. Now, what's the correct way to make good object oriented code with JavaScript so, can anyone tell me? NO <.<
robustus|Off has joined #ruby
robustus|Off is now known as robustus
econerd4_ has quit [Remote host closed the connection]
AmirolAhmad has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
hamakn has joined #ruby
Soda has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
feels like I have an idea how to design an application but I don't have the tools to do it °°
econerd4ever has joined #ruby
<workmad3>
Fire-Dragon-DoL: heh :) I'm currently writing JS that does both of those (but I didn't write the libraries)
tsu_ has quit [Ping timeout: 245 seconds]
<workmad3>
Fire-Dragon-DoL: specifically, requirejs for modules, and both Backbone and React have their own class mechanisms
<Fire-Dragon-DoL>
I'm ok with libraries provided by others. But everyone says "use composition" => I know composition, but that tool solves ONE problem, I'm still missing inheritance and expecially ruby modules
<Fire-Dragon-DoL>
mh
__main__ has quit [Read error: Connection reset by peer]
frem_ is now known as frem
Rollabunna has joined #ruby
<workmad3>
Fire-Dragon-DoL: but I can't point to good resources for that, I'm afraid... can't think of any
<Fire-Dragon-DoL>
unfortunately backbone and react delivers those things NOT as a separate module that I can use in <random project without react or backbone>
BadQuanta has quit [Quit: Leaving.]
jtheuer has quit [Quit: This computer has gone to sleep]
<workmad3>
Fire-Dragon-DoL: and I'm now being shouted at for not getting off IRC, so must go :P
<workmad3>
night
<Fire-Dragon-DoL>
workmad3: doh
<Fire-Dragon-DoL>
'night
konsolebox has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
BadQuanta has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
econerd4ever has quit [Ping timeout: 258 seconds]
<Fire-Dragon-DoL>
Mhhh it's fun, I usually ends up talking with workmad3, pipework or bricker`work (which has always `work), in rotation.
fuhgeddaboudit has joined #ruby
<pipework>
We're not shit, but I feel like workmad3 and I are more aggressive in our OOD
Channel6 has joined #ruby
<Fire-Dragon-DoL>
well you are usually also the guys that answer me, so definitely never thought you are shit :P
AmirolAh_ has quit []
baweaver has quit [Remote host closed the connection]
Akuma has quit [Quit: So long sukkas!]
sailias has quit [Quit: Leaving.]
AmirolAhmad has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
wmute has joined #ruby
ghr has joined #ruby
robustus has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
rkalfane has quit [Read error: Connection reset by peer]
Lightsword has joined #ruby
rkalfane has joined #ruby
micah has left #ruby [#ruby]
apeiros_ has quit [Ping timeout: 244 seconds]
renderful has quit [Remote host closed the connection]
Fusl has joined #ruby
jasonwebster has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
reset has quit [Quit: Leaving...]
__main__ has joined #ruby
Lightsword has quit [Quit: Lightsword]
jlast has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 252 seconds]
<Fire-Dragon-DoL>
I have the feeling that "Service Objects" if misues may screw your design so badly that you can't even imagine
yfeldblum has quit [Remote host closed the connection]
rkalfane has quit [Read error: Connection reset by peer]
Hobogrammer has joined #ruby
s00pcan has quit [Remote host closed the connection]
kies has joined #ruby
rkalfane has joined #ruby
BadQuanta has quit [Remote host closed the connection]
<Fire-Dragon-DoL>
Lightsword: I never used that at all but doesn't ch.shutdown() and break works?
Dopagod has joined #ruby
jlast_ has joined #ruby
<Lightsword>
well, I haven’t done a break, not sure why ch.shutdown() doesn’t work by itself
larissa has quit [Quit: Leaving]
<Lightsword>
guess ill try that
Joufflu has quit [Read error: Connection reset by peer]
deric_skibotn has quit [Ping timeout: 260 seconds]
<Fire-Dragon-DoL>
Lightsword: my hypothesis, ch.shutdown closes the connection but doesn't terminate the loop, I know it's obvious, but it's the only thing I can think about. Much like `render` in rails
jlast has quit [Ping timeout: 258 seconds]
s00pcan has joined #ruby
<Lightsword>
weird thing is that I’ve used ch.shutdown before in connection loops before and it worked fine before in a rescue block
jasonwebster has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<soahccc>
Lightsword: does the shutdown method just block there?
<Lightsword>
soahccc, I’m not sure, how would I check?
yfeldblum has joined #ruby
klmlfl has joined #ruby
kiyote23 has joined #ruby
chu has joined #ruby
robustus has quit [Ping timeout: 250 seconds]
<soahccc>
Lightsword: do some debugging before and after the call (puts, `say` or whatever)
ghr has quit [Ping timeout: 240 seconds]
Sawbones has joined #ruby
AndyBotwin has quit [Quit: Leaving]
Jesterman81 has joined #ruby
<soahccc>
Lightsword: Apparently the shutdown methods just closes the socket
lbrf has joined #ruby
hiyosi has joined #ruby
chipotle has quit [Quit: cya]
<Lightsword>
soahccc, so what should I do instead?
renderful has joined #ruby
emergion has joined #ruby
renderful has quit [Remote host closed the connection]
chipotle has joined #ruby
Tranquility has quit [Quit: Connection closed for inactivity]
<soahccc>
Lightsword: not sure but the methods is described with "Performs a "hard" shutdown of the connection. In general, this should never be done, but it might be necessary (in a rescue clause, for instance, when the connection needs to close but you don't know the status of the underlying protocol's state)."
bricker`work has quit [Quit: leaving]
robustus has joined #ruby
<Lightsword>
well, the remote system reboots right and there is no connection so it kind of just seems to freeze
<soahccc>
Lightsword: I suppose the socket tries to read and the default timeout is around a minute or so, have you waited long enough?
<soahccc>
I ask because I'm a very impatient person :D
Techguy305 has joined #ruby
<soahccc>
I tend to kill everything taking longer than 10 seconds
robustus has quit [Ping timeout: 255 seconds]
klmlfl has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby
<Lightsword>
I thought doing the shutdown would execute right away
graydot has quit [Quit: graydot]
<Lightsword>
oh, just realized I did something stupid…I wasn’t seeing “Upgrade Complete” from puts I was seeing it as output from the device
<Lightsword>
which would mean my if statement isn’t activating
<Lightsword>
or executing
AmirolAhmad has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
mloveless has quit [Remote host closed the connection]
tsu_ has joined #ruby
troyready has quit [Quit: Leaving]
CrazyM4n has quit [Remote host closed the connection]
yetanotherdave has quit [Ping timeout: 255 seconds]
wjimenez5271 has quit [Remote host closed the connection]
tsu_ has quit [Ping timeout: 245 seconds]
kish has quit [Changing host]
kish has joined #ruby
parabolize has joined #ruby
renderful has joined #ruby
renderful has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.0.1]
mikepack has quit [Remote host closed the connection]
diegoviola has joined #ruby
ezio has quit [Read error: Connection reset by peer]
ezio has joined #ruby
tyll_ has joined #ruby
mikepack has joined #ruby
kiyote23 has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 258 seconds]
dc_ has quit [Remote host closed the connection]
Sutffness has quit []
nfk has quit [Quit: yawn]
tyll has quit [Ping timeout: 255 seconds]
gee_totes has joined #ruby
kiyote23 has joined #ruby
<gee_totes>
if i have a class that has a class with @variable, how would i check that variable from an rspec test?
<gee_totes>
do i need to put a method around it?
rshetty_ has joined #ruby
Jesterman81 has quit [Quit: Jesterman81]
rshetty has quit [Ping timeout: 256 seconds]
lectrick is now known as pmarreck
JokerDoomWork has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
sargas has joined #ruby
sargas has quit [Changing host]
sargas has joined #ruby
<gee_totes>
attr_accessor will do it! yay!
sargas has quit [Client Quit]
JokerDoomWork has joined #ruby
<rpag_>
gee_totes, there's a few options, attr_reader, instance_variable_get, instance_eval.
mary5030 has joined #ruby
arup_r has joined #ruby
<gee_totes>
rpag_ ahh, and with attr_accessor i can probably change that variable, right?
Techguy305 has quit [Ping timeout: 250 seconds]
fgo has joined #ruby
Lightsword has quit [Ping timeout: 240 seconds]
mary5030_ has joined #ruby
kireevco has joined #ruby
Milkweed has joined #ruby
postmodern has quit [Quit: Leaving]
mary5030 has quit [Ping timeout: 258 seconds]
ghr has joined #ruby
<rpag_>
attr_accessor :foo creates 'foo' and 'foo=', sounds like you just need 'foo'
fgo has quit [Ping timeout: 265 seconds]
chu has quit [Ping timeout: 245 seconds]
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
ezio has quit [Ping timeout: 260 seconds]
mloveless has joined #ruby
chu has joined #ruby
xorax has joined #ruby
chu has quit [Remote host closed the connection]
xorax has quit [Client Quit]
mary5030 has quit [Ping timeout: 252 seconds]
tier has quit [Remote host closed the connection]
triple_b has joined #ruby
GOSHDARNYOU has joined #ruby
phutchins has quit [Ping timeout: 258 seconds]
GOSHDARNYOU is now known as goshdarnyou
mloveless has quit [Remote host closed the connection]
Calmoto has joined #ruby
Takle has joined #ruby
Lightsword has joined #ruby
_5kg has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
chu has joined #ruby
renderful has joined #ruby
renderful has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 264 seconds]
radic has quit [Ping timeout: 245 seconds]
radic has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
oo_ has quit [Remote host closed the connection]
charliesome has joined #ruby
oo_ has joined #ruby
Sawbones has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
chipotle has quit [Ping timeout: 245 seconds]
oo_ has quit [Ping timeout: 258 seconds]
Sawbones has quit [Ping timeout: 258 seconds]
AmirolAhmad has joined #ruby
anaeem1_ has joined #ruby
AmirolAhmad has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.0.1]
gee_totes has quit [Quit: leaving]
chipotle has joined #ruby
tsu has joined #ruby
diegoviola has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Read error: Connection reset by peer]
tsu has quit [Ping timeout: 264 seconds]
Techguy305 has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
Lightsword has quit [Read error: Connection reset by peer]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Max SendQ exceeded]
diegoviola has quit [Remote host closed the connection]
Lightsword has joined #ruby
davedev2_ has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
braincra- has quit [Quit: bye bye]
davedev24_ has joined #ruby
fgo has joined #ruby
adriancb has quit [Remote host closed the connection]
diegoviola has joined #ruby
lemur has joined #ruby
braincrash has joined #ruby
redjack1964 has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
Akagi201 has joined #ruby
russt has quit [Quit: russt]
henesy has quit [Ping timeout: 258 seconds]
elusion has joined #ruby
ghr has joined #ruby
Akagi201 has quit [Ping timeout: 265 seconds]
frem has quit [Quit: Connection closed for inactivity]
Lilian has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
mahtennek has joined #ruby
kobain has quit [Quit: Changing server...]
jimbach_ has quit [Remote host closed the connection]
jimbach has joined #ruby
devdazed has joined #ruby
Kryptonical has joined #ruby
henesy has joined #ruby
melik has quit [Quit: (null)]
charliesome has joined #ruby
Lightsword has quit [Ping timeout: 265 seconds]
jimbach has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
klmlfl has quit [Remote host closed the connection]
Akagi201 has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
tkuchiki has quit [Remote host closed the connection]
kobain_ has joined #ruby
tkuchiki has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
arescorpio has quit [Excess Flood]
sargas_ has joined #ruby
sargas_ has quit [Changing host]
sargas_ has joined #ruby
tkuchiki has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
sargas_ is now known as sargas
klmlfl has joined #ruby
mary5030_ has joined #ruby
fgo has joined #ruby
<sargas>
how can I require my class if I start pry being in my project directory?
Sawbones has joined #ruby
<parabolize>
put your class in a file and put `require './filename'` at the top
st1gma1 has quit [Read error: Connection reset by peer]
sski has joined #ruby
wjimenez5271 has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
<parabolize>
or `require_relative 'filename'` if your feeling wordy
<parabolize>
s/your/you're
fgo has quit [Ping timeout: 244 seconds]
Sawbones has quit [Ping timeout: 245 seconds]
tsu has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
jlast_ has quit [Remote host closed the connection]
Kryptonical has quit [Read error: Connection reset by peer]
jlast has joined #ruby
kevinxu has joined #ruby
kevinxu is now known as Guest97067
<parabolize>
err.. enter `require './filename' into pry.
chipotle has quit [Quit: cya]
yfeldblum has joined #ruby
<epitron>
or load "filename.rb"
tsu has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 258 seconds]
ta has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
mahtennek has quit [Remote host closed the connection]
perturbation has quit [Quit: Leaving]
chipotle has joined #ruby
dc_ has joined #ruby
JBreit has joined #ruby
siavashserver has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
jonr22 has joined #ruby
<siavashserver>
hello. a few days ago I ran a gem update --system && gem update , and I've just noticed that jekyll is broken. anyideas what's wrong here? https://paste.kde.org/put7wwm1o
ta has quit [Ping timeout: 260 seconds]
mahtenne_ has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
Techguy305|2 has joined #ruby
Techguy305 has quit [Ping timeout: 260 seconds]
Techguy305|2 has quit [Max SendQ exceeded]
damic has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Connection closed for inactivity]
Takle has joined #ruby
Techguy305 has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
Milkweed has quit [Ping timeout: 245 seconds]
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
x1337807x has joined #ruby
diegoviola has joined #ruby
Sawbones has joined #ruby
<sargas>
parabolize: thanks
Takle has quit [Ping timeout: 265 seconds]
Techguy305 has quit [Ping timeout: 264 seconds]
linocisco has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
linocisco has quit [Quit: Leaving]
anaeem1 has joined #ruby
Lightsword has joined #ruby
dam0_ has joined #ruby
dam0_ has quit [Client Quit]
lnormous has quit [Ping timeout: 245 seconds]
sargas has quit [Quit: This computer has gone to sleep]
freerobby has joined #ruby
ghr has joined #ruby
hamakn_ has quit [Remote host closed the connection]
Megtastique has joined #ruby
anaeem1 has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
fedexo has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
Kryptonical has joined #ruby
AlexRussia has joined #ruby
_JokerDoomWork has joined #ruby
freerobby has quit [Quit: Leaving.]
Techguy305 has joined #ruby
Kryptonical is now known as Kryptonical-GT
jarjar_prime has quit [Read error: Connection reset by peer]
sfr^ has quit [Excess Flood]
fabrice31 has joined #ruby
Lightsword has quit [Ping timeout: 244 seconds]
sfr^ has joined #ruby
JokerDoomWork has quit [Ping timeout: 264 seconds]
sargas has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mahtenne_ has quit [Remote host closed the connection]
hamakn has joined #ruby
jenrzzz has joined #ruby
fedexo_ has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
melik has joined #ruby
fedexo_ has quit [Read error: Connection reset by peer]
sargas has quit [Quit: This computer has gone to sleep]
JBreit has quit [Read error: Connection reset by peer]
akaiiro has quit [Ping timeout: 245 seconds]
chu has quit [Remote host closed the connection]
mahtennek has joined #ruby
chu has joined #ruby
keen_______ has joined #ruby
boombadaroomba has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
keen______ has quit [Ping timeout: 264 seconds]
chipotle has quit [Ping timeout: 252 seconds]
rshetty has joined #ruby
fgo has joined #ruby
mahtennek has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
melloyelo has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
Lightsword has joined #ruby
mary5030 has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
fotoflo has joined #ruby
JBreit has joined #ruby
duncannz has quit [Ping timeout: 240 seconds]
<fotoflo>
Hey all. I’m about half way through The Rails 4 Way — seems to be a very good book, but coming from other languages, there’s a lot of ruby i think i need to learn. Can y’all reccomend a good Ruby book?
<quazimodo>
some times, when I pass a long string into stdin, this thing doesn't read it all
ycodr has quit [Remote host closed the connection]
<quazimodo>
some sort of weird condition arises where it tries to read the first 'chunk' of data from the stdout, then sees if there is more, There should be, but my call to stdin.puts doesn't seem to 'fill' stdout at all
ycodr has joined #ruby
rshetty has quit [Remote host closed the connection]
<quazimodo>
so some times in my tests it passes, other times it fails
william3 has joined #ruby
<pontiki>
maybe you want to syswrite instead of puts
<pontiki>
or binwrite? idk -- it may be being buffered somehow?
uber_hulk has joined #ruby
<quazimodo>
pontiki: i guess Ruby itself has some weird buffering process. Assuming so, would we ever expect this sort of race condition if we were doing raw writes/reads to the system?
apeiros_ has joined #ruby
<pontiki>
there's buffereing going on in many places; in ruby, i suspect, but also in the library functions, between user space and kernel space, etc
rshetty has joined #ruby
<pontiki>
idk, it's been ages since i looked at anything like this, and never had in ruby
ycodr has quit [Ping timeout: 258 seconds]
<pontiki>
and it is by no means weird
ycodr has joined #ruby
chinmay_dd has quit [Quit: Leaving]
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
Soda has joined #ruby
chinmay_dd has joined #ruby
michael_mbp has quit [Excess Flood]
gccostabr has quit [Quit: ZZZzzz…]
lemur has quit [Ping timeout: 258 seconds]
<quazimodo>
pontiki: I'll see what syswrite does
<quazimodo>
thank you
michael_mbp has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
Kryptonical-GT has quit [Read error: Connection reset by peer]
melik has quit [Remote host closed the connection]
melik has joined #ruby
jtheuer has joined #ruby
adamski2600 has joined #ruby
<quazimodo>
pontiki: still same issue with using syswrite :)
melik has quit [Remote host closed the connection]
melik has joined #ruby
lampd1 has joined #ruby
melik_ has joined #ruby
TgMts has joined #ruby
fgo has joined #ruby
ta has joined #ruby
anaeem1 has quit [Remote host closed the connection]
jtheuer has quit [Ping timeout: 272 seconds]
anaeem1 has joined #ruby
melik has quit [Ping timeout: 256 seconds]
AmirolAhmad has joined #ruby
jtheuer has joined #ruby
DLSteve has joined #ruby
anaeem1 has quit [Ping timeout: 244 seconds]
melik_ has quit [Quit: (null)]
jenrzzz has joined #ruby
shvelo has joined #ruby
rkalfane has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
ta has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
deleg has quit [Ping timeout: 245 seconds]
ta has joined #ruby
ta has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
ikaros has joined #ruby
blackmesa has joined #ruby
shock_one has quit [Remote host closed the connection]
ezioa has quit [Read error: Connection reset by peer]
ta has joined #ruby
tsu has joined #ruby
shock_one has joined #ruby
ezioa has joined #ruby
shock_one has quit [Remote host closed the connection]
<pontiki>
i guess the other thing is to make sure your io is flushed
fabrice31 has joined #ruby
<apeiros>
flush the ios! clear the buffers! brace for EOF!
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tsu_ has joined #ruby
tsu has quit [Ping timeout: 260 seconds]
<apeiros>
if coding was an action movie…
Alina-malina has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 258 seconds]
Takle has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
anaeem1 has joined #ruby
anaeem1 has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
lbrf has joined #ruby
timonv_ has quit [Remote host closed the connection]
<gamzera_>
Define a method sum which takes an array of integers as an argument and returns the sum of its elements. For an empty array it should return zero.
<gamzera_>
Can anyone help me with it?
<sevenseacat>
what have you got so far?
mlue has joined #ruby
rshetty has quit [Ping timeout: 245 seconds]
tsu has quit [Ping timeout: 240 seconds]
<gamzera_>
sevenseacat: I just defined method and I belive it is done by something like a[]= gets.chomp ?
yfeldblum has quit [Ping timeout: 250 seconds]
<sevenseacat>
so what does the method you defined look like
yeticry has quit [Read error: Connection reset by peer]
philwantsfish has quit [Ping timeout: 272 seconds]
arturhoo has quit [Quit: arturhoo]
uber_hulk has joined #ruby
<gamzera_>
sevenseacat: I am back, I belive that I understund most of things.. here is how my code looks now http://pastie.org/9764267 first I am not sure how I should sum all elements that obviously go after 'return'..
yeticry has joined #ruby
uber_hulk has quit [Client Quit]
TgMts has quit [Read error: Connection reset by peer]
kaspertidemann has quit []
mahtennek has joined #ruby
TgMts has joined #ruby
chinmay_dd has quit [Ping timeout: 244 seconds]
DaniG2k has joined #ruby
<gamzera_>
sevenseacat: there?
<sevenseacat>
gamzera_: i don't really know how to teach the fundamentals of a language, sorry.
<gamzera_>
sevenseacat: I just need to see how it's done
<gamzera_>
sevenseacat: I will find out why you done it alone.
<sevenseacat>
the link i gave you has examples of it
<gamzera_>
sevenseacat: yeah, I took everything I saw there, they didn't speak about sum
<sevenseacat>
when they defined a reverse_sign method that takes an argument
tier has joined #ruby
iamninja has joined #ruby
giuseppesolinas has joined #ruby
shredding has quit [Quit: shredding]
timonv_ has quit [Remote host closed the connection]
bMalum_ has joined #ruby
amundj has quit [Read error: Connection reset by peer]
giuseppesolinas has quit [Client Quit]
lbrf has joined #ruby
jtheuer has quit [Read error: Connection reset by peer]
bMalum has quit [Ping timeout: 244 seconds]
bMalum_ is now known as bMalum
hamakn has joined #ruby
DaniG2k has quit [Quit: leaving]
giuseppesolinas has joined #ruby
amundj has joined #ruby
lbrf has quit [Ping timeout: 250 seconds]
ycodr has quit [Ping timeout: 252 seconds]
ycodr has joined #ruby
tsu has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
uzi_ has joined #ruby
arup_r has quit [Quit: Leaving.]
Guest35729 has quit [K-Lined]
arup_r has joined #ruby
chipotle has joined #ruby
shvelo has quit [Remote host closed the connection]
havenwood has joined #ruby
yfeldblum has joined #ruby
tsu has quit [Client Quit]
DLSteve has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 272 seconds]
last_staff has quit [Quit: last_staff]
cajone has joined #ruby
chinmay_dd has joined #ruby
rshetty has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
vvivv has joined #ruby
uber_hulk has joined #ruby
uber_hulk has quit [Client Quit]
charliesome has quit [Quit: zzz]
jusmyth has joined #ruby
mahtennek has quit [Remote host closed the connection]
jusmyth has left #ruby [#ruby]
uber_hulk has joined #ruby
uber_hulk has quit [Client Quit]
uzi_ has left #ruby ["Leaving"]
<SquirrelCZECH>
hi folks
<SquirrelCZECH>
how would you make log mechanism
<SquirrelCZECH>
for script that is launched many times at once?
<SquirrelCZECH>
(webscript)
AlexRussia has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n3vtelen has quit [Quit: Leaving]
jimbach has joined #ruby
shock_one has quit [Remote host closed the connection]
mahtennek has joined #ruby
i5um41ru has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
i5um41ru has joined #ruby
melik_ has joined #ruby
<havenwood>
SquirrelCZECH: How about logging to STDOUT with Logger?
kaspertidemann has joined #ruby
MasterPiece has quit [Quit: Leaving]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
Freelusion has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
melik_ has quit [Ping timeout: 244 seconds]
<SquirrelCZECH>
havenwood: ehmm
<SquirrelCZECH>
it's script launched by apache
<SquirrelCZECH>
as cgi
<SquirrelCZECH>
havenwood: so, how would that help me?
<havenwood>
SquirrelCZECH: You'd have a log.
<SquirrelCZECH>
yeah, but wherE? :D
Deele has quit [Quit: User excited]
<SquirrelCZECH>
oh
* SquirrelCZECH
opened apache doc, no it makes sens
AlexRussia has quit [Quit: WeeChat 1.1-dev]
i5um41ru has quit [Quit: leaving]
JohnBat26 has joined #ruby
AlexRussia has joined #ruby
<havenwood>
SquirrelCZECH: stdout, which your init system will presumably divert to where it goes and rotate the logs, etc
<SquirrelCZECH>
havenwood: but on output I've got the html page I suppose
shredding has joined #ruby
red_horned_rihno has joined #ruby
<havenwood>
SquirrelCZECH: So are you wanting the apache log? You keep mentioning apache.
<SquirrelCZECH>
nooo
<SquirrelCZECH>
again
rylev has quit [Remote host closed the connection]
<havenwood>
SquirrelCZECH: Then why do you mention it? What does it have to do with anything?
<SquirrelCZECH>
I've got script that is made to generate page with which users pics something
<SquirrelCZECH>
and it's done by apache on ruby script
iml has quit [Quit: sleep]
<SquirrelCZECH>
and I want to measure how much time some parts of that log takes
<SquirrelCZECH>
and output them somewhere
jimms has joined #ruby
<havenwood>
I'll take that to mean you're using Apache as a reverse proxy to a Rack app? Still, what does apache have to do with your logging?
tier has quit [Remote host closed the connection]
<SquirrelCZECH>
not Rack app
<SquirrelCZECH>
CGI
red_horned_rihno has quit [Client Quit]
Freelusion has quit [Quit: Freelusion]
Snowstormer is now known as lostcat
lostcat is now known as Snowstormer
josephndenton has joined #ruby
kiyote23 has quit [Remote host closed the connection]
elemenopy has quit [Remote host closed the connection]
Snowstormer is now known as lostcat
<SquirrelCZECH>
havenwood: yep, STDout is used to print the page the script creates, can't use that
red_horned_rihno has joined #ruby
bMalum has quit [Quit: bMalum]
chinmay_dd_ has joined #ruby
chinmay_dd has quit [Read error: Connection reset by peer]
gamzera_ has quit [Read error: Connection reset by peer]
<havenwood>
Can't promise no problems. Will drink some coffee though, then I listen better. :P
sinkensabe has quit [Remote host closed the connection]
chu has quit [Remote host closed the connection]
DLSteve has joined #ruby
<SquirrelCZECH>
great, main thing: I suppose few instances of script are launched at sime time and every of them will log
chu has joined #ruby
<SquirrelCZECH>
(problem is that that script can take 60 seconds)
<SquirrelCZECH>
into syslog... Will it cause problems? :)
sinkensabe has joined #ruby
jimbach has quit [Remote host closed the connection]
tier has joined #ruby
jimbach has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
centrx has joined #ruby
livcd has quit [Quit: leaving]
spastorino has joined #ruby
lnormous has joined #ruby
jimbach has quit [Ping timeout: 260 seconds]
mark06 has joined #ruby
brendenb has quit [Ping timeout: 258 seconds]
livcd has joined #ruby
<mark06>
what kind of thing from the requiring script does a required script have access to?
ta has joined #ruby
brendenb has joined #ruby
lbrf has joined #ruby
<shevy>
wat
<shevy>
that's a cool question
tristanp has joined #ruby
<shevy>
I'll pass it over to the cat expert here, sevenseacat
sinkensabe has quit [Remote host closed the connection]
<sevenseacat>
its not a question about cats.
sinkensabe has joined #ruby
<havenwood>
oh man, a cat question!?
<havenwood>
oh no, no it isn't...
Mothore__ has quit [Quit: Be back later ...]
<havenwood>
back to bed.
ahri__ has joined #ruby
<Mia>
Any twitter developers here? How can I get access tokens for an app of mine that's in another account? I have my BotAccount and my AppAccount. The AppAcount has the app, but I want to use it from my BotAccount --- how can I do this?
<shevy>
mark06 basically if you require a ruby file, all the stuff it has defined will be available to the other ruby code you use there. if you don't want to have that then the only way to avoid it is to not require the file(s9 in question
adriancb has joined #ruby
lbrf has quit [Ping timeout: 258 seconds]
ta has quit [Ping timeout: 260 seconds]
ahri_ has quit [Ping timeout: 244 seconds]
adriancb has quit [Remote host closed the connection]
<havenwood>
SquirrelCZECH: No problems that I know of at least. Maybe give it a try and see how it works out.
Mothore__ has joined #ruby
n1lo has joined #ruby
<havenwood>
mark06: ALL THE THINGS! \o/
<havenwood>
Californa doesn't have a state cat. :(
Aswebb has joined #ruby
<havenwood>
Massachusetts wisely chose the tabby cat.
<havenwood>
Maine's Maine Coon ain't fair.
Stichoza has quit [Quit: Be back later ...]
Takle has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
<SquirrelCZECH>
fu me
<SquirrelCZECH>
I somehow came to conclusion that Ruby::Logger can't handle my task
<SquirrelCZECH>
after reading a lot of things on the internet
<havenwood>
SquirrelCZECH: Why can't it?
AlexRussia has joined #ruby
kiyote23 has joined #ruby
<SquirrelCZECH>
but ehm.. practical test showed that it should be able :D
<havenwood>
Only roughly one in three thousand of Maryland's state cats are male.
<SquirrelCZECH>
havenwood: yeah, why shoudln't ?
SCHAAP137 has quit [Quit: Leaving]
<havenwood>
It should. Go forth and log!
<SquirrelCZECH>
I just supposed it would scream when two scripts would want to open same log file
SCHAAP137 has joined #ruby
freerobby has joined #ruby
DLSteve has quit [Ping timeout: 252 seconds]
davedev24_ has joined #ruby
hamakn has joined #ruby
phutchins has joined #ruby
russt has quit [Quit: russt]
fandi has quit [Ping timeout: 250 seconds]
tejas-manohar has joined #ruby
sinkensabe has joined #ruby
Mothore__ has quit [Quit: Be back later ...]
Mothore__ has joined #ruby
sigurding has joined #ruby
mrdevri has joined #ruby
Mothore__ has quit [Ping timeout: 264 seconds]
mrdevri has left #ruby [#ruby]
freerobby has quit [Quit: Leaving.]
tier has quit [Remote host closed the connection]
Photism has joined #ruby
Sawbones has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
shock_one has joined #ruby
reluctantlove has joined #ruby
<tejas-manohar>
wait so if i do bundler.require
<tejas-manohar>
i dont have to explicitly require gems in the gemfile?
adriancb has joined #ruby
rkjaer_ has joined #ruby
sevenseacat has quit [Quit: Leaving.]
adriancb has quit [Ping timeout: 244 seconds]
godd2 has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
valeriansaliou has joined #ruby
parabolize has joined #ruby
robustus|Off is now known as robustus
lnormous has quit [Ping timeout: 255 seconds]
AmirolAhmad has quit [Remote host closed the connection]
jonr22 has joined #ruby
freerobby has joined #ruby
enebo has joined #ruby
amundj has joined #ruby
jonr22 has quit [Ping timeout: 258 seconds]
<mark06>
shevy: all the stuff?
<shevy>
mark06 sure, all the stuff
<mark06>
shevy: just tested and local vars are not seen
<tejas-manohar>
how do i expire a session variable
<shevy>
oh yeah, they will remain local to the .rb file they were defined in
<mark06>
fwiw I want to emulate python's __doc__ so the library reads such a thing from the script that is using it
<shevy>
what is __doc__ doing
<tejas-manohar>
like a sinatra session var
RedWraith has joined #ruby
<tejas-manohar>
i wanna make it expire after x time
<tejas-manohar>
so i can create a session var that says if uve used the service too much
<mark06>
shevy: are you aware of any other exceptions? how would you implement the above? 'doc' doesn't work, so Doc, or $doc, or maybe MyLib_Doc or something?
jimms has quit [Read error: Connection reset by peer]
<RedWraith>
Hey - is there a way to generate GSON objects based on a Ruby repo? I'm making an Android front-end to a Ruby backend and was curious if there was a gem that could analyze server-side code or something.
jimms has joined #ruby
tristanp has quit [Remote host closed the connection]
<shevy>
mark06 and how do I know what __doc__ does?
banister has joined #ruby
devdazed has joined #ruby
tristanp has joined #ruby
devdazed has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
reluctantlove has quit [Ping timeout: 260 seconds]
<mark06>
quazimodo: what is your shell, bash? do export RUBYLIB=/your/dir
<quazimodo>
yeah i am
<mark06>
ah ok, rspec-cli
<micah>
I'm getting this ActionView::Template::Error (can't convert Symbol into Integer), but I can't figure out what specifically has the problem, is there a way I can get ruby to show me the specific one it is talking about? https://paste.debian.net/135177/
emmesswhy has joined #ruby
<shevy>
hey Hanmac lookie - this is a pipe instruction (cat, nl, colourize) and parsed through CodeRay on the commandline (kde konsole output) http://i.imgur.com/aZAsuN5.png
gidea_ has quit []
jonr22 has joined #ruby
<quazimodo>
I think maybe it's better for me to require_relative in my gem
mengu has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
<quazimodo>
i dont know, my brain hurts
jenrzzz has joined #ruby
melik_ has joined #ruby
<mark06>
quazimodo: odd, it works for me... I'm using bash in msys2
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<havenwood>
mark06: you do get access to all the things, all the things you'd ever have access to. whatever is exposed.
<mark06>
quazimodo: you are the author of rspec-cli?
<rpag_>
sinatra/base doesn't load any methods at the toplevel
<havenwood>
tejas-manohar: look at the examples in the link above
<tejas-manohar>
um
<tejas-manohar>
hmm ok
<rpag_>
but your Bundler.require() should pull it in.
josephndenton has joined #ruby
<micah>
parabolize: i think i just need to figure out how to test a hash's value in a template
<tejas-manohar>
rpag_ thats what i thought
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
yfeldblum has quit [Ping timeout: 255 seconds]
pwh has quit []
<micah>
parabolize: hmm, actually i have a good lead here
<tejas-manohar>
havenwood: i looked at examples i dont see what im doing wrong here
chinmay_dd_ has quit [Ping timeout: 252 seconds]
<tejas-manohar>
rpag_: any things that ud suspect could be causing bundler.require not to make those loaded
kireevco has joined #ruby
timonv_ has joined #ruby
Bullit_ has joined #ruby
<parabolize>
micah: I think the :all_branches you had was correct and I've pointed you towards the wrong thing. I've never used rails or redmine. One of those channels can probably help you better. Perhaps its the l(:all_branches) on the previous lines that are making it choke on a symbol.
<havenwood>
tejas-manohar: a few things. in your Gemfile, https not http. are you wanting `request.env`?
chu has joined #ruby
<havenwood>
tejas-manohar: i'd avoid Bundler.require, but your choice
<tejas-manohar>
am i wanting request.env
<tejas-manohar>
hmmm
<havenwood>
tejas-manohar: pick whether you want to use the classic or modular style. pick one.
DLSteve has joined #ruby
<havenwood>
tejas-manohar: Bundler.require will bork modular style by including classical.
21WAAKJN5 has joined #ruby
<tejas-manohar>
oh
<tejas-manohar>
yeah im going classic
<tejas-manohar>
one sec
<havenwood>
if you want to stick with classical style, that's fine
Akagi201 has joined #ruby
segfalt has quit [Quit: Connection closed for inactivity]
<havenwood>
tejas-manohar: it 'Encourages the understanding and use of Rack and its extensions instead of providing such functionality.'
<havenwood>
tejas-manohar: or you can learn to use Sinatra's functionality
reinaldob has joined #ruby
maletor has joined #ruby
<havenwood>
tejas-manohar: for which #sinatra might be helpful
<apeiros>
"Your Ruby version is 2.1.5, but your Gemfile specified ruby-2.1.5" lolwut?
<apeiros>
oh dear
<apeiros>
I see
<tejas-manohar>
what
<tejas-manohar>
the
<tejas-manohar>
heck
<tejas-manohar>
havenwood: im making a little app where you enter gist url then it ajax url to my api which grabs content from gist api and hits it to hackerrank api which compiles the code which the output is the response in the api request and i show that in browser
<tejas-manohar>
havenwood: i think sinatra is fit for the json api
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<tejas-manohar>
havenwood: other than that there are no features except im trying to make that session var expiration thing so i can have rate limiting
<havenwood>
tejas-manohar: sure, any one of the rack adapters would suffice. sinatra is fine. you'll just need to learn sinatra convention, because it doesn't defer to rack whenever possible. it has its own way of doing things.
<havenwood>
that can be done with Rack middleware, again with any of the Rack adapters
<tejas-manohar>
havenwood: ah
<tejas-manohar>
do you think expiration thing should use session var
<havenwood>
why are you expiring sessions?
Sawbones has joined #ruby
<tejas-manohar>
im using a session var to keep track of daily usage of my app per user
<tejas-manohar>
like how many gists theyve run
<tejas-manohar>
i don't want it to overflow hackerrank api and get me in trouble :P
<havenwood>
is that really the best way to track that?
<tejas-manohar>
prolly not
Sawbones has quit [Remote host closed the connection]
<tejas-manohar>
what do you suggest? redis w/ IPs?
<tejas-manohar>
basically yeah rate limiting the user to like x submissions daily
sigurding has quit [Quit: sigurding]
shredding has quit [Quit: shredding]
<havenwood>
tejas-manohar: maybe look at how some existing APIs deal with the issue for possible inspiration. here's Github's rate limit stuff: https://developer.github.com/v3/#rate-limiting
<havenwood>
(supports Net::HTTP or HTTPClient, for example)
<tejas-manohar>
just found rest client seems nice
<tejas-manohar>
and reliable w/ 2.4k stars
diego_ar has joined #ruby
<havenwood>
tejas-manohar: that's one of the simple Net::HTTP wrappers, but i don't have anything bad to say about it
Cyberheb has joined #ruby
uber_hulk has left #ruby [#ruby]
ta has joined #ruby
diego_ar has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Remote host closed the connection]
diego_ar has joined #ruby
sinkensabe has joined #ruby
uber_hulk has joined #ruby
<havenwood>
tejas-manohar: it doesn't support async, parallel, keep-alive, pipelining, custom verbs - but maybe you don't need those things, in which case carry on!
tristanp has joined #ruby
uber_hulk has left #ruby [#ruby]
magic is now known as AUv
<havenwood>
tejas-manohar: there're multiple good HTTP client options
<siaw>
cat says the method name is stake_from_stack
<havenwood>
siaw: stake
<siaw>
typo. but i have saved the take_from_stack
<crome>
cat say meow
<siaw>
:D :D
<crome>
says*
<siaw>
hahaha
<siaw>
is it cause i’m using git?
<shevy>
lol
JokerDoomWork has quit [Ping timeout: 255 seconds]
<shevy>
kill the vampire
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<shevy>
it is because you have bad eyesight siaw
<havenwood>
mm steak
<siaw>
shevy: hm
digifiv5e has quit [Quit: quit]
iamjarvo has joined #ruby
<siaw>
havenwood: why is cat stacklike.rb STILL telling me my method name is stake_from_stack instead of take_from_stack even though i have fixed and saved the typo?
<siaw>
there’s on file of each name in one director
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MrIlyas_ has joined #ruby
<havenwood>
siaw: like open the file again from where you did `cat`: atom stacklike.rb
<havenwood>
siaw: alpha browser may or may not save code? or do you have a copy open, not the one you think you're editing? :P
Soda has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
<havenwood>
s/browser/text editor
<siaw>
nope
gfp has quit [Ping timeout: 246 seconds]
<shevy>
your editor confuses you siaw
<havenwood>
text editor running in a browser window*
<siaw>
one of us is stupid, me or my editor, but i think my editor is
<shevy>
yes
digifiv5e has joined #ruby
<siaw>
i’m using sublime text
digifiv5e is now known as Guest18500
<shevy>
I have seen editors that did strange things without the user wanting them to do so
__JokerDoomWork has joined #ruby
<siaw>
hahahahaaa this is crazy!!!
stormbytes has joined #ruby
<havenwood>
siaw: sublime does some crazy stuff where they save a copy of the file, then overwrite the original.
Sawbones has quit [Remote host closed the connection]
<shevy>
I forgot which one it was though... red* something or so I think
elusion has quit [Quit: Leaving]
MrIlyas has quit [Ping timeout: 255 seconds]
<havenwood>
siaw: i'm not a sumblime user, but i've seen issue tickets about the atypical way it saves files. i still suspect you just have a copy of the file open.
kyoshero_ has joined #ruby
<siaw>
so all editors are stupid
<shevy>
only the magical ones
Guest18500 has quit [Changing host]
Guest18500 has joined #ruby
<siaw>
ok i’ll close all my editors now and restart
Guest18500 is now known as daynaskully
<siaw>
and keep one file open
<siaw>
or closed
<shevy>
mine one here is a fancified notepad editor
kyoshero has quit [Ping timeout: 250 seconds]
kyoshero_ has quit [Max SendQ exceeded]
fuhgeddaboudit has joined #ruby
<havenwood>
siaw: you may want to look into the atomic save option, dunno if there is a sublime chan
<tejas-manohar>
havenwood: got any api suggestions for compiling the code?
<tejas-manohar>
hackerrank?
kyoshero_ has joined #ruby
<havenwood>
tejas-manohar: compiling?
<tejas-manohar>
maybe repl.it has something
_JokerDoomWork has quit [Ping timeout: 240 seconds]
<havenwood>
huh?
<tejas-manohar>
havenwood: well compiling the code i got from the gist
<tejas-manohar>
compiling/executing
<tejas-manohar>
depending on language
<tejas-manohar>
like basically im making gists executable
<havenwood>
tejas-manohar: so you're sending code to an api as json?
<tejas-manohar>
havenwood: most likely or text or whatever
kyoshero_ has quit [Max SendQ exceeded]
<riceandbeans>
dude just use emacs
<tejas-manohar>
lol
kyoshero_ has joined #ruby
<tejas-manohar>
havenwood: yeah not compiling ruby :P -- just maybe like some online code runner with many lang support
<tejas-manohar>
trying to find a good api
kiyote23 has joined #ruby
<riceandbeans>
tryruby
<tejas-manohar>
let me check network tab on replit
__JokerDoomWork has quit [Ping timeout: 250 seconds]
<tejas-manohar>
wait so we can do this client-side?
<siaw>
havenwood: this is the strangest thing i ever came across in my life! i closed the editor, reopened it and it had my TYPO, had to fix the TYPO again and save it and now it works
poppingtonic has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
MrIlyas_ has joined #ruby
mloveless has joined #ruby
MrIlyas has quit [Ping timeout: 252 seconds]
lemur has joined #ruby
dEPy has joined #ruby
chipotle has joined #ruby
mushotoku has joined #ruby
adriancb has joined #ruby
Takle has quit [Remote host closed the connection]
chris613 has joined #ruby
Lightsword has quit [Ping timeout: 250 seconds]
ta has joined #ruby
diego_ar has quit [Remote host closed the connection]
timonv_ has joined #ruby
mushotoku has left #ruby [#ruby]
<mbff>
Question: I am working with open-uri and I would like to call abort if any error happens when retrieving the uri. Can this be done? I am not very familiar with with Ruby's exception system
Takle has joined #ruby
diegoviola has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
t7y9r has quit [Ping timeout: 240 seconds]
t3h_j4n170r has quit [Ping timeout: 256 seconds]
maletor has joined #ruby
avrc has joined #ruby
<lbrf>
mbff: you can use the response code to handle this
t7y9r has joined #ruby
t3h_j4n170r has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diego_ar has joined #ruby
dEPy has quit [Ping timeout: 245 seconds]
<asteve>
so I failed a interview because I couldn't write a function to print out a specific level of a BST, in two minutes
<asteve>
I spent about 3 hours making a BST today, then wrote the function in about 10 minutes
<asteve>
:/
ARCADIVS has joined #ruby
<lbrf>
asteve: can you put on gist this function?
SCHAAP137 has quit [Remote host closed the connection]
Cyberheb has quit [Quit: Computer has gone to sleep.]
<lbrf>
kaspergrubbe: i'm reading the same thread here =)
diego_ar has joined #ruby
chishiki has joined #ruby
ferr has joined #ruby
timonv_ has joined #ruby
rikai has quit [Ping timeout: 272 seconds]
LudicrousMango has joined #ruby
duncannz has quit [Ping timeout: 255 seconds]
ptrrr has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dr4_ has quit [Ping timeout: 255 seconds]
juuo has joined #ruby
rikai has joined #ruby
<shevy>
is there a simple test framework out there
<shevy>
but super simple
boombadaroomba has joined #ruby
fgo has joined #ruby
adriancb has quit [Remote host closed the connection]
<wasamasa>
someone at work wrote one for pure fun
quimrstorres has quit [Remote host closed the connection]
<wasamasa>
because he concluded everything else is shit
* wasamasa
checks whether they've released it
ringarin has quit [Ping timeout: 252 seconds]
fabrice31 has joined #ruby
shredding has quit [Quit: shredding]
<shevy>
well
fgo has quit [Ping timeout: 244 seconds]
<wasamasa>
hmm, no, doesn't seem so
<wasamasa>
but I can give you the sources, harhar
boombadaroomba has quit [Ping timeout: 258 seconds]
mengu has quit [Remote host closed the connection]
<shevy>
I wouldn't call the test frameworks shit; but I want to invest no more than 5% of the time I'd invest in the rest of the library/code in question
louism2wash has joined #ruby
<asteve>
that is not going to happen
codecop has quit [Remote host closed the connection]
<wasamasa>
"It's the minimum viable product, but for rubyists!"
<wasamasa>
that's how he described it
icbm has joined #ruby
nickjj has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
akaiiro has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
icbm has quit [Client Quit]
shock_one has quit [Remote host closed the connection]
<Obfuscate>
asteve: Typically it's not possible to have nil children in a BST, aside from a root pointer in an empty tree: nodes are either leaves (and have no children), or they have two children.
<Obfuscate>
asteve: They can, but such a tree is suboptimal: normally they're designed so that nodes with only one child are merged with their parent (which complicates insertion/deletion, but makes searches faster).
codezomb has joined #ruby
ta has quit [Remote host closed the connection]
Bullit_ has quit [Quit: Leaving]
chinmay_dd has quit [Ping timeout: 252 seconds]
TgMts has quit [Read error: Connection reset by peer]
<asteve>
ah, suboptimal/optimal doesn't really matter with the requirement for this function; I wrote the BST and the function; the nil checks are verifying that there is a node in each respective direction
<asteve>
and the node for that matter
<asteve>
I mean, I could have written a function wrapper called exist? or something prettier
wink_ndge has joined #ruby
<Obfuscate>
Ah, okay. Your implementation looks good, in any case.
ht__th has quit [Remote host closed the connection]
CpuID has joined #ruby
Xiti` has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
Xiti` has quit [Read error: Connection reset by peer]
<Obfuscate>
asteve: I just now read the part about iteratively: you could do this if you built your own stack (either emulating the depth-first call stack, or you could push nodes breadth-first), but I don't see much advantage over the simple recursive version.
mloveless has quit []
jimbach has joined #ruby
Xiti` has joined #ruby
TgMts has joined #ruby
louism2wash has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]