apeiros changed the topic of #ruby to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
mloveless has quit [Remote host closed the connection]
sinkensabe has joined #ruby
fabrice31 has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
adriancb has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
mloveless has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
freerobby has quit [Quit: Leaving.]
agrinb has joined #ruby
<shevy> b3itz now that you understand .map - given this code: array = [2,4,6]
<shevy> b3itz how can you transform it into [4,8,12] ?
lbrf has quit [Quit: Be back later ...]
fabrice31 has quit [Ping timeout: 240 seconds]
tejas-manohar has joined #ruby
<tejas-manohar> anyone know how to apply global html w/ sinatra like to all my views/ (erb :...)
<b3itz> shevy: yes i do
<b3itz> thanks man
Akuma has quit [Read error: Connection reset by peer]
Akuma has joined #ruby
nanSTA has quit [Ping timeout: 258 seconds]
<b3itz> shevy: something like array.map{|x| x*2}
<shevy> b3itz good
jimbach_ has joined #ruby
<b3itz> :)
<b3itz> now im getting back 'ip addresses' like 004.000.000.000
<b3itz> why...
xaaabk has joined #ruby
djbkd has quit [Remote host closed the connection]
wjimenez5271 has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
deleg has quit [Ping timeout: 245 seconds]
jimbach has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 244 seconds]
econerd4ever has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
Axy is now known as Mia
<tejas-manohar> yo
<tejas-manohar> i wanna have some universal templating in my sinatra app
<tejas-manohar> like a css file linked in all templates
<tejas-manohar> is there a way to set universal html
icbm has quit [Quit: Computer sleeping]
<momomomomo> what? you mean like a layout?
<momomomomo> http://www.sinatrarb.com/intro.html#Templates%20with%20%3Ccode%3Eyield%3C/code%3E%20and%20nested%20layouts
rkalfane has quit [Read error: Connection reset by peer]
gsd has joined #ruby
lmickh has quit [Remote host closed the connection]
rkalfane has joined #ruby
jlast has quit [Remote host closed the connection]
AlexRussia has joined #ruby
jlast has joined #ruby
econerd4ever has joined #ruby
Rollabunna has joined #ruby
<b3itz> momomomomo: so ip address like 4.0.0.0 is returned... whats the logic im missing
benzrf is now known as benzrf|offline
Spami has joined #ruby
<momomomomo> b3itz: I have no idea what you’re asking about
Spami has quit [Max SendQ exceeded]
<b3itz> you saw my program right?
<momomomomo> last time I talked to you was an hour ago
<b3itz> its supposed to return {1,3}.{1,3}..... like an ip address
<momomomomo> I suggest you read !ask
<momomomomo> !ask
<helpa> How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
<b3itz> well that was the fastest hour ever lol
<b3itz> -_-
Rollabunna has quit [Ping timeout: 260 seconds]
jlast has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
wjimenez5271 has joined #ruby
geggam has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
mikepack has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
Spami has quit [Max SendQ exceeded]
michael_mbp has quit [Excess Flood]
geilt has joined #ruby
b3itz has quit [Quit: Page closed]
mikepack has joined #ruby
Spami has joined #ruby
michael_mbp has joined #ruby
diegoviola has quit [Remote host closed the connection]
Hijiri has joined #ruby
sargas has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
momomomomo has quit [Quit: momomomomo]
mloveless has quit [Remote host closed the connection]
devdazed has joined #ruby
mloveless has joined #ruby
sinkensabe has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
baweaver has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
agjacome has joined #ruby
baroquebobcat has joined #ruby
mikepack has quit [Remote host closed the connection]
neoxquick has quit [Read error: Connection reset by peer]
bigmac_ has joined #ruby
stunder has quit [Quit: Screw you guys I'm going home]
<shevy> hmm how would you implement a pure copy functionality in ruby without fileutils?
<shevy> (1) read target byte stream (2) save byte stream into a file ?
<pipework> shevy: A file copy?
<shevy> yeah
<pipework> You'd need a way to get a file descriptor at least.
Sawbones has joined #ruby
Soda has joined #ruby
i8igmac has quit [Ping timeout: 258 seconds]
jlow has joined #ruby
djbkd has joined #ruby
fgo has joined #ruby
baweaver has joined #ruby
Takle has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
Sawbones has quit [Remote host closed the connection]
tjohnson has joined #ruby
Spami has quit [Quit: Leaving]
akaiiro has quit [Ping timeout: 264 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
tsu_ has joined #ruby
marr has quit [Ping timeout: 258 seconds]
arescorpio has joined #ruby
<shevy> hmm
dc_ has joined #ruby
djbkd has quit [Ping timeout: 245 seconds]
<benzrf> >> 255.to_s 8
<eval-in__> benzrf => "377" (https://eval.in/231434)
Spami has joined #ruby
<benzrf> oh
Spami has quit [Changing host]
Spami has joined #ruby
<benzrf> >> 256.to_s 8
<eval-in__> benzrf => "400" (https://eval.in/231435)
<benzrf> whoa
fgo has quit [Ping timeout: 260 seconds]
tejas-manohar has left #ruby [#ruby]
emmesswhy has joined #ruby
neoxquick has joined #ruby
kirun has quit [Quit: Client exiting]
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.
<workmad3> Fire-Dragon-DoL: pfft... this; is; one; line; but; it; would; be; horrible; :P
<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.
stormbytes has quit [Quit: Textual IRC Client: www.textualapp.com]
econerd4_ has joined #ruby
<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 <.<
robustus has joined #ruby
<workmad3> Fire-Dragon-DoL: when I stopped answering, I was at something like 3k or 4k rep... with absolutely no intervention, I'm now at 13k :P
rshetty has joined #ruby
* bricker`work checks SO rep
<Fire-Dragon-DoL> pipework: thanks
<bricker`work> 6.2k :(
<Fire-Dragon-DoL> workmad3: how did you do that? :P
hamakn has quit [Remote host closed the connection]
boombadaroomba has quit [Ping timeout: 264 seconds]
<workmad3> Fire-Dragon-DoL: I managed to get some answers in very early on for some pretty common C++ questions
<Fire-Dragon-DoL> workmad3: I stopped around that amount. The sad part is that my answers are all about C#, I don't work anymore in C# <.<
<Fire-Dragon-DoL> OH
<Fire-Dragon-DoL> that's not fair. We are not allowed to make useful questions anymore
x1337807x has joined #ruby
<Fire-Dragon-DoL> workmad3: argh
x1337807x has quit [Max SendQ exceeded]
<Fire-Dragon-DoL> that's unfair, it's an easy one
<Fire-Dragon-DoL> lol
<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
<workmad3> Fire-Dragon-DoL: hardly surprising tbh :)
robustus has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
<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
<Fire-Dragon-DoL> misused*
Lightsword has joined #ruby
jlast has joined #ruby
danijoo has quit [Quit: Leaving...]
kies has quit [Ping timeout: 264 seconds]
robustus|Off has joined #ruby
<Lightsword> does anyone know how to force close and break out of this net-ssh loop at this line? https://gist.github.com/jameshilliard/9e88dc9e107181f7da20#file-gistfile1-txt-L9
oo_ has joined #ruby
robustus|Off is now known as robustus
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
robustus has quit [Ping timeout: 255 seconds]
JokerDoomWork has joined #ruby
Akagi201 has joined #ruby
jamgood96 has quit [Quit: Leaving...]
phutchins has joined #ruby
x1337807x has quit [Ping timeout: 264 seconds]
Galas has quit [Quit: Leaving...]
robustus has joined #ruby
Akagi201 has quit [Ping timeout: 256 seconds]
ghr has joined #ruby
<Lightsword> Fire-Dragon-DoL, I added a break and it still freezes https://gist.github.com/jameshilliard/9e88dc9e107181f7da20#file-gistfile1-txt-L10
mloveless has joined #ruby
krz has joined #ruby
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> So you verfied that the method blocks?
kyoshero has joined #ruby
Techguy305 has quit [Ping timeout: 250 seconds]
<Lightsword> when I run it
<soahccc> do you get any error output like "forcing connection closed"
<Lightsword> nope
<soahccc> not sure what the error method does but shutdown does this: https://github.com/net-ssh/net-ssh/blob/master/lib/net/ssh/transport/session.rb#L125
fgo has quit [Ping timeout: 258 seconds]
<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]
fabrice31 has quit [Ping timeout: 245 seconds]
neoxquick has quit [Quit: Miranda NG! Smaller, Faster, Easier. http://miranda-ng.org/]
fedexo has joined #ruby
melloyelo has joined #ruby
CrazyM4n has joined #ruby
CrazyM4n_ has joined #ruby
CrazyM4n_ is now known as CrazyM4n
akaiiro has joined #ruby
boombadaroomba has joined #ruby
rshetty_ has quit [Ping timeout: 252 seconds]
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?
JBreit has left #ruby [#ruby]
tsu has joined #ruby
viki_ has joined #ruby
<fotoflo> Seems like http://www.amazon.com/Ruby-Programming-Language-David-Flanagan/dp/0596516177/ would be a good one, but it just covers ruby v1.8 or 1.9 and i’m using 2.1.3
lnormous has joined #ruby
vcoinminer______ is now known as vcoinminer
mary5030 has quit [Ping timeout: 258 seconds]
<parabolize> I'm reading http://www.manning.com/black3/ . I'm 115 pages in. Its been very good so far.
tsu has quit [Ping timeout: 255 seconds]
<Fire-Dragon-DoL> good night everyone
Fire-Dragon-DoL has quit [Quit: Leaving.]
duncannz has joined #ruby
fotoflo has quit [Quit: fotoflo]
Guest97067 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
D9 has quit [Quit: Leaving]
yfeldblum has joined #ruby
vinleod has joined #ruby
CrazyM4n has quit [Quit: "I'll be back, internet dieing"]
AlexRussia has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
yfeldblum has joined #ruby
crdpink has joined #ruby
kyoshero has quit [Quit: Leaving]
siavashserver has left #ruby ["Konversation terminated!"]
agjacome has quit [Quit: leaving]
Auv is now known as magic
fedexo has quit [Ping timeout: 252 seconds]
CrazyM4n has joined #ruby
techsethi has joined #ruby
techsethi has quit [Client Quit]
diegoviola has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
linojon has quit [Quit: linojon]
diegoviola has quit [Client Quit]
ghr has joined #ruby
diegoviola has joined #ruby
AndChat| has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
lkba has joined #ruby
uber_hulk has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
codesoda has joined #ruby
akaiiro has joined #ruby
fandi has joined #ruby
gleetch has joined #ruby
<codesoda> hi y'all
gsd has joined #ruby
<CrazyM4n> Hi
gleetch has quit [Remote host closed the connection]
gleetch has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<codesoda> Is anyone doing something other than sinatra or rails?
gleetch has quit [Remote host closed the connection]
gleetch has joined #ruby
<soahccc> codesoda: on the web? no
MasterPiece has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinmay_dd has joined #ruby
gleetch has quit [Remote host closed the connection]
Techguy305|2 has joined #ruby
vesic has quit [Read error: Connection reset by peer]
Techguy305 has quit [Ping timeout: 244 seconds]
rkalfane has joined #ruby
havenwood has quit [Remote host closed the connection]
rkalfane has quit [Read error: Connection reset by peer]
techsethi has joined #ruby
rkalfane has joined #ruby
Photism has quit [Quit: Leaving]
konsolebox has joined #ruby
<arup_r> How can I convert a Time object to equivalent number of sceonds
<arup_r> ?
kobain_ has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<parabolize> seconds from when? epoch?
<arup_r> got it...
<arup_r> #to_
benzrf is now known as benzrf|offline
fandi has quit [Ping timeout: 245 seconds]
kireevco has quit [Quit: Leaving.]
kevinxu has joined #ruby
kireevco has joined #ruby
kevinxu is now known as Guest12201
ndrei has joined #ruby
fgo has joined #ruby
Xuerian has quit [Remote host closed the connection]
Lightsword has quit [Ping timeout: 244 seconds]
Xuerian has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
doritostains has joined #ruby
jonr22 has joined #ruby
rshetty has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby
Takle has joined #ruby
b4rbz has joined #ruby
lnormous has quit [Ping timeout: 252 seconds]
b4rbz has quit [Remote host closed the connection]
Techguy305|2 has quit [Ping timeout: 264 seconds]
davedev24_ has quit [Ping timeout: 255 seconds]
tsu has joined #ruby
lnormous has joined #ruby
davedev24_ has joined #ruby
damic has joined #ruby
kiyote23 has quit [Remote host closed the connection]
El3ktra has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uber_hul1 has joined #ruby
Takle has quit [Ping timeout: 252 seconds]
akaiiro has quit [Quit: Leaving]
tsu has quit [Ping timeout: 245 seconds]
duncannz has quit [Ping timeout: 260 seconds]
diegoviola has quit [Quit: WeeChat 1.0.1]
uber_hulk has quit [Ping timeout: 245 seconds]
rshetty has joined #ruby
billy_ran_away_ is now known as billy_ran_away
Channel6 has quit [Quit: Leaving]
memph1s has joined #ruby
postmodern has joined #ruby
rshetty has quit [Remote host closed the connection]
Calmoto has quit [Ping timeout: 258 seconds]
Kryptonical-GT has quit [Read error: Connection reset by peer]
rippa has joined #ruby
kyoshero has joined #ruby
flak has joined #ruby
flak has quit [Client Quit]
rippa has quit [Client Quit]
diegoviola has joined #ruby
mozzarella has quit [Quit: WeeChat 1.1-dev]
rippa has joined #ruby
adriancb has joined #ruby
robustus has joined #ruby
lnormous has quit [Ping timeout: 250 seconds]
Crazy_Atheist has quit [Quit: WeeChat 1.0.1]
davedev24_ has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ruby
adriancb has quit [Ping timeout: 244 seconds]
CrazyM4n has quit [Quit: Leaving]
sinkensabe has joined #ruby
mozzarella has joined #ruby
ylluminate has quit [Quit: Bye!]
fabrice31 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
nyanz has quit []
ghr has joined #ruby
lbrf has quit [Quit: Be back later ...]
anaeem1_ has joined #ruby
AmirolAhmad has joined #ruby
fabrice31 has quit [Ping timeout: 258 seconds]
mikepack has quit [Remote host closed the connection]
diegoviola has quit [Remote host closed the connection]
RyanV has joined #ruby
_JokerDoomWork has quit [Ping timeout: 260 seconds]
ghr has quit [Ping timeout: 272 seconds]
Lightsword has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<RyanV> whats the best/safest/cleanest way to add extensions to ruby core classes (< 2.0) without overriding if they already exist?
ecksit has joined #ruby
klmlfl has quit [Remote host closed the connection]
tsunamie has quit [Ping timeout: 264 seconds]
ylluminate has joined #ruby
<codesoda> RyanV: have you considered checking if the methods already exist?
<RyanV> yeah im thinking this: http://pastie.org/9763861
<RyanV> but wasnt sure if there was already something built in or often used
tsunamie has joined #ruby
Lightsword has quit [Quit: Lightsword]
AmirolAhmad has quit [Ping timeout: 244 seconds]
ylluminate has quit [Client Quit]
fgo has joined #ruby
last_staff has joined #ruby
juuo has joined #ruby
<RyanV> codesoda anything?
<codesoda> just checking if I have any examples
<codesoda> the only problem i see is expectation of what the methods do
<codesoda> if you add some functionality, and it ends up that method already exists, then it might not work how you originally wanted to them to
<codesoda> so perhaps you would want it to fail instead
<RyanV> yeah things could break if there was poor implementation of the method
<RyanV> my wn implementation would likely pull from active support/core_ext
fgo has quit [Ping timeout: 265 seconds]
ghr has joined #ruby
fgo has joined #ruby
<RyanV> but its too big when all i might need are conversion methods (e.g. String#underscore)
sinkensabe has joined #ruby
<codesoda> This might be a good reference https://github.com/rsl/stringex
<RyanV> that lib doesnt check for existing implementations though. it just adds them all directly
fgo has quit [Ping timeout: 244 seconds]
techsethi has quit [Quit: techsethi]
ghr has quit [Ping timeout: 250 seconds]
sinkensabe has quit [Remote host closed the connection]
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
charliesome has quit [Quit: zzz]
Caius has quit [Ping timeout: 260 seconds]
tsu has joined #ruby
kiyote23 has joined #ruby
<RyanV> its messier but probaby safest to just pass the args into a method instead of overriding core
shock_one has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
<codesoda> without knowing what you specifically want to add that might be safest
shock_one has joined #ruby
anaeem1_ has quit [Quit: Leaving...]
jusmyth has joined #ruby
anaeem1 has joined #ruby
jusmyth has left #ruby [#ruby]
Lightsword has joined #ruby
tsu has quit [Ping timeout: 245 seconds]
Guest12201 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wjimenez5271 has joined #ruby
Caius has joined #ruby
lbrf has joined #ruby
efg_ has quit [Ping timeout: 246 seconds]
kevinxu has joined #ruby
kevinxu is now known as Guest54916
wjimenez5271 has quit [Ping timeout: 245 seconds]
viki_ has quit [Quit: Connection closed for inactivity]
lbrf has quit [Ping timeout: 250 seconds]
Morkel has joined #ruby
lampd1 has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kiyote23 has quit [Ping timeout: 252 seconds]
goshdarnyou has quit [Quit: Connection closed for inactivity]
shock_one has quit [Remote host closed the connection]
hiyosi has joined #ruby
tsu has joined #ruby
blackmesa has joined #ruby
Kryptonical has joined #ruby
akkad has quit [Ping timeout: 250 seconds]
Kryptonical is now known as Kryptonical-GT
ezio has joined #ruby
akkad has joined #ruby
charliesome has joined #ruby
Spami has joined #ruby
codesoda has quit [Quit: Leaving...]
elusion has quit [Ping timeout: 245 seconds]
shock_one has joined #ruby
quazimodo has joined #ruby
<quazimodo> guys what syntax is this:
<quazimodo> def read_all nonblocking: false
<quazimodo> return nil if nonblocking and not has_data?
<quazimodo> thats so weird, is it ruby 2+ ?
Alina-malina has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
TerjeLarsen has joined #ruby
ta has joined #ruby
versatiletech has quit [Quit: versatiletech]
Alina-malina has quit [Ping timeout: 264 seconds]
koderok has joined #ruby
koderok has quit [Quit: koderok]
tsu has quit [Remote host closed the connection]
Takle has joined #ruby
ptrrr has joined #ruby
kireevco has quit [Quit: Leaving.]
ta has quit [Ping timeout: 260 seconds]
jonr22 has joined #ruby
ta has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<Hanmac> quazimodo: hm i would have used () in that case to make it more readable but yes its valid ruby
<Hanmac> apeiros: spam juuo
mices has joined #ruby
Morkel has quit [Quit: Morkel]
<mices> i can't connect to http://localhost:3000
blackmesa has quit [Ping timeout: 260 seconds]
<quazimodo> Hanmac: ruby 2 though rigth?
<quazimodo> you can't do that in 1.9.3??
Takle has quit [Ping timeout: 256 seconds]
<Hanmac> 19>> def read_all(nonblocking: false); end
<eval-in__> Hanmac => /tmp/execpad-135ce66cf6e7/source-135ce66cf6e7:2: syntax error, unexpected tLABEL, expecting ')' ... (https://eval.in/231500)
<Hanmac> 20>> def read_all(nonblocking: false); end
<eval-in__> Hanmac => nil (https://eval.in/231501)
<Hanmac> quazimodo: yeah its 2.0+ stuff
ycodr has quit [Remote host closed the connection]
<HYDRO187> fucking quit messages
<quazimodo> Hanmac: ah gooda
<quazimodo> Hanmac: so that becomes a local variable huh
<Hanmac> hm yeah thats key-arguments
jonr22 has quit [Ping timeout: 244 seconds]
<quazimodo> wha was wrong with nonblocking = false ??
codecodecode123 has joined #ruby
<codecodecode123> hi
Alina-malina has joined #ruby
<HYDRO187> the weed guy here only allowed me to get 1/2 oz at at time
<HYDRO187> so weird
<HYDRO187> "united states"
fgo has joined #ruby
<HYDRO187> more like "united marj janes"
<Hanmac> quazimodo: because if you have more of them, with keyargs the order is not important anymore
<quazimodo> Hanmac: so you can do something.my_method butts: 'awesome', boobs: 'awesomer' and you wont need to declare an opts hash
<quazimodo> hrm
<quazimodo> is it compatible with an ops hash?
<quazimodo> like def something(butts: 'good', boobs: 'also good', opts = {})
<Hanmac> hm yeah you can use **opts ... thats something like *args for key arguments
<quazimodo> weird shiat
<HYDRO187> I can so Ruby loops around you guys
<HYDRO187> this code looks old
shredding has joined #ruby
<codecodecode123> how can i slice! an aray but get the array that has been sliced instead of the thing that has been sliced out of the array?
ghr has joined #ruby
<HYDRO187> how many lines are you dealing w/?
<codecodecode123> *array
<HYDRO187> this a 10line problem, or 1,000?
<codecodecode123> 1line
<HYDRO187> LOL
<HYDRO187> how much memory?
<HYDRO187> how many octives do you have to fuck with
<codecodecode123> what are you tying to say
<HYDRO187> exactly what I'm saying
<Hanmac> codecodecode123: array.tap {|o| o.splice!(...) }
<codecodecode123> [1,2,3].differentslice(0) #=> [2,3]
ezio has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 244 seconds]
<HYDRO187> for (@ARGV) {
<HYDRO187> uhh wrong language
codecop has joined #ruby
<codecodecode123> argv?
ht__th has joined #ruby
<codecodecode123> *facepalm*
<HYDRO187> sorry, stuff that's not authorized here
ezioa has joined #ruby
<codecodecode123> thanks Hammac
<HYDRO187> hanmac's snippit is cute
RyanV has quit [Quit: (null)]
<HYDRO187> not scalable
<codecodecode123> scalable mlablable I WANT ONE LINE
<HYDRO187> you need 10
<codecodecode123> dont
<HYDRO187> you need to loop your code bro
<soahccc> codecodecode123: what is there to palm with argv?
<HYDRO187> how do you handle Memory hacks?
<codecodecode123> NOTHING soahccc
<codecodecode123> my ain task is turning a string eg "123" into something like "231"
ghr has quit [Ping timeout: 240 seconds]
<codecodecode123> *main
<HYDRO187> open LOG< ">" #rubyNewbs #die $1; #Words
<codecodecode123> "asdf" => "fasd"
<HYDRO187> time to break into Xerox
<HYDRO187> , again
<codecodecode123> def peace; system "kill n0o0bs"; end
<HYDRO187> #lawyersHackingLayers
<HYDRO187> #ofLawyers
<codecodecode123> n0o0bs[69] == "HYDRO187"
<HYDRO187> we should have a code off
<HYDRO187> this guy is too easy
<codecodecode123> dang bash coders these days
<Hanmac> codecodecode123:
Guest54916 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Hanmac> >> a,b,c = "123".scan(/(.)(.+)(.)/).first; b+c+a
<eval-in__> Hanmac => "231" (https://eval.in/231505)
<HYDRO187> use warnings FATAL => "codecodecode123";
<codecodecode123> dafuq am i gonna use argv for
<HYDRO187> you'll see
<codecodecode123> yeayeayea
<HYDRO187> it's the only way to safely pass your code
<codecodecode123> have you heard of anything called VARIABLES?
<codecodecode123> it is something you store data in
<HYDRO187> variables are not hardcodes
<HYDRO187> hardcodes is home base
<codecodecode123> heve you heard DATA as well?
<HYDRO187> Data is only data that hasn't been modified
<codecodecode123> strings, integers, floats
<HYDRO187> 1, 2 and 3
<HYDRO187> sorry I did coding coaching (phython) I know about as much as I can shit :)
<HYDRO187> python*
mijicd has joined #ruby
<HYDRO187> "do 300 push-ups or die"
<HYDRO187> literally :)
<codecodecode123> .............
<HYDRO187> do you even action flash, bro?
<codecodecode123> "do 300 push-ups || die"
<codecodecode123> do you even ruby bashbro
<HYDRO187> dude I bash with 10 year old hacks
<HYDRO187> you don't even wanna
<HYDRO187> IRC to fxp is baby shit
<codecodecode123> yea i dont nonrubyist
<HYDRO187> do you even !pre, bro? :)
<codecodecode123> look at the channel name
<Hanmac> shevy: i am the only one that does feel like watching a pingpong between two trolls? ;P
<codecodecode123> it says #ruby
<HYDRO187> Hanmac really?
<codecodecode123> yes you are hammac
jusmyth has joined #ruby
<HYDRO187> I will !pre a shit-STorm
<HYDRO187> from .SE of course
<HYDRO187> or .IT
<quazimodo> any way to test a block's output in rspec
<quazimodo> like
<HYDRO187> .IT has nicely rated FTPs
<HYDRO187> like1, 2 and 3
<HYDRO187> we race them all
lbrf has joined #ruby
decoponio has joined #ruby
<codecodecode123> well i will say....
<quazimodo> expect(my_lamba).to yield_and_return "hi"
<quazimodo> ?
<Hanmac> ping apeirosi
<HYDRO187> -FFN
<Hanmac> i mean apeiros
<HYDRO187> -LOL
<HYDRO187> -maVen
<HYDRO187> :)
i5um41ru has joined #ruby
<codecodecode123> wait
<codecodecode123> accidentally pressed backspace
<codecodecode123> and other keys...
<HYDRO187> C-band sats anyone?
<HYDRO187> its 4 hours
<Hanmac> quazimodo: hm you can try in #rspec there might be more specific help
* HYDRO187 goes to exit planET dust
<quazimodo> Hanmac: they are all dead atm
<HYDRO187> "one too many mornings" - chemical brothers
Lightsword has quit [Quit: Lightsword]
<HYDRO187> ruby on Rails nerds here?
<HYDRO187> I have an enterprise problem
Abhijit has joined #ruby
* codecodecode123 is trying to find something in computer
<Hanmac> HYDRO187: #rubyonrails
<HYDRO187> codecode try the search function
<HYDRO187> thanks Hanmac
<HYDRO187> this is a huge problem, I cant just copy paste code
<codecodecode123> it has no spesific name
parduse has quit [Ping timeout: 264 seconds]
<Hanmac> codecodecode123: use the right os and then use grep
<HYDRO187> just saying
<HYDRO187> grep will not help us on this one
rshetty has joined #ruby
<HYDRO187> grep does not pull the real-time memory
jusmyth has quit [Ping timeout: 255 seconds]
<HYDRO187> only past-time memory
lbrf has quit [Ping timeout: 245 seconds]
* codecodecode123 is trying to open a file accidentally with rubymine which takes a lot of time to load
<HYDRO187> copy paste that shit bro
parduse has joined #ruby
* codecodecode123 is saying * codecodecode123 is trying to open a file accidentally with rubymine which takes a lot of time to load
<codecodecode123> whatever
<HYDRO187> or do some Packpage *nameSpace *verSion if you know what I mean
<HYDRO187> goodness, if Germany pays for another iTunes 0day i'm gonna shit
fabrice31 has joined #ruby
<HYDRO187> we cant make fake pop-up windows our entire lives
doritostains has quit [Quit: doritostains]
chinmay_dd has quit [Ping timeout: 264 seconds]
uber_hul1 has quit [Ping timeout: 250 seconds]
<HYDRO187> dudes, dogecoin, cisco, and python all banned me
<codecodecode123> Hammac: what was the solution with tap for the slice problem?
sinkensabe has joined #ruby
<HYDRO187> have fun with my next C block...
rshetty has quit [Ping timeout: 258 seconds]
<Hanmac> (09:46:41) Hanmac: codecodecode123: array.tap {|o| o.splice!(...) }
<codecodecode123> thx
<codecodecode123> NoMethodError: undefined method `splice!' for ["1", "2", "3"]:Array
Mothore__ has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
<Hanmac> oh it was slice!
mikepack has joined #ruby
Mothore__ has quit [Ping timeout: 255 seconds]
doev has joined #ruby
Mothore__ has joined #ruby
ycodr has joined #ruby
chinmay_dd has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
agjacome has joined #ruby
kevinxu has joined #ruby
kevinxu is now known as Guest17995
ndrei has quit [Quit: Lost terminal]
ta has quit [Remote host closed the connection]
mengu has joined #ruby
mijicd has quit [Quit: Lost terminal]
rshetty has joined #ruby
i5um41ru has quit [Ping timeout: 244 seconds]
rshetty has quit [Remote host closed the connection]
<quazimodo> on a strange not, how would you generate a string that is 0xFFFF long ?
<quazimodo> or longer, ideally
<pontiki> " " * 0xFFFF ?
<quazimodo> +1 help count pontiki
<pontiki> i don't know if that works
<pontiki> just what i'd try at first
<Hanmac> >> (" " * 0xFFFF).size
<eval-in__> Hanmac => 65535 (https://eval.in/231514)
<pontiki> i guess it works
<pontiki> +1 Hanmac confirmation count
<quazimodo> pontiki: quickly, write the helper bot and a leader board
<quazimodo> we can call it the leader beard
<quazimodo> currently we have equal sized beards
<pontiki> what, so i can get yelled at for bringing in a bot?
<pontiki> no thanks
tsu has joined #ruby
<quazimodo> a helpy botty, are they disallowed?
Takle has joined #ruby
sinkensabe has quit [Remote host closed the connection]
rshetty has joined #ruby
i5um41ru has joined #ruby
boombadaroomba has joined #ruby
alandb has joined #ruby
<wasamasa> inofficial bots are unless the staff explicitly allows them
<wasamasa> even then it's not like anyone can bring theirs to the channel
sski has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 240 seconds]
<quazimodo> :)
<quazimodo> <- will not bring them in of course, without talking to a boss first
<quazimodo> on a separate note
tsu has quit [Ping timeout: 240 seconds]
<quazimodo> check this out
Guest17995 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
boombadaroomba has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
hamakn has quit [Remote host closed the connection]
deleg has joined #ruby
hamakn has joined #ruby
tvw has joined #ruby
ghr has joined #ruby
oleo__ has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
oleo__ has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 264 seconds]
neoxquick has joined #ruby
oleo is now known as Guest1731
oleo__ has joined #ruby
Guest1731 has quit [Ping timeout: 244 seconds]
oleo__ has quit [Read error: Connection reset by peer]
sski has joined #ruby
hamakn has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 252 seconds]
sski has quit [Remote host closed the connection]
ta has joined #ruby
agjacome has quit [Quit: leaving]
oleo__ has joined #ruby
jemendja has joined #ruby
<jemendja> hi
last_staff has quit [Quit: last_staff]
oleo__ is now known as oleo
ta has quit [Ping timeout: 260 seconds]
Miron has joined #ruby
jemendja has quit [Quit: leaving]
lbrf has joined #ruby
virtualize has quit [Ping timeout: 244 seconds]
<quazimodo> hurro
ohaibbq_ has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 256 seconds]
lbrf has quit [Ping timeout: 256 seconds]
<pontiki> juuo is trying to message me
<rpag_> should try harder
<pontiki> will not work
<rpag_> show gratis, solo hoy!@!
chinmay_dd has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
hiall has quit [Ping timeout: 256 seconds]
<quazimodo> so i have this interesting thing here
chinmay_dd has joined #ruby
<quazimodo> someone look
<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]
anaeem1_ has quit [Ping timeout: 264 seconds]
lbrf has quit [Ping timeout: 264 seconds]
techsethi has joined #ruby
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> apeiros: then michael Bay would direct it ;P
startupality has joined #ruby
<apeiros> so much dying code. so many exploding bugs…
tsu_ has quit [Remote host closed the connection]
nfk has joined #ruby
juuo has quit [Ping timeout: 256 seconds]
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lampd1 has quit []
Snowstormer has joined #ruby
Alina-malina has joined #ruby
shock_one has joined #ruby
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
<rpag_> boom, boom, boom, boom
juuo has joined #ruby
anaeem1 has joined #ruby
AmirolAhmad has quit [Remote host closed the connection]
shvelo has quit [Ping timeout: 264 seconds]
shock_one has quit []
techsethi has quit [Quit: techsethi]
anaeem1 has quit [Ping timeout: 265 seconds]
Advocation has joined #ruby
<pontiki> hee
codecodecode123 has quit [Ping timeout: 246 seconds]
tvw has quit [Ping timeout: 255 seconds]
shock_one has joined #ruby
yfeldblu_ has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
jtheuer has quit [Ping timeout: 258 seconds]
tylersmith has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
emmesswhy has joined #ruby
<shevy> Hanmac haha I was sleeping while that happened
TgMts has quit [Quit: No Ping reply in 180 seconds.]
Hien_ has quit [Ping timeout: 258 seconds]
AmirolAhmad has joined #ruby
tylersmith has joined #ruby
shock_one has quit [Remote host closed the connection]
Hien has joined #ruby
qox31 has quit []
tvw has joined #ruby
shvelo has joined #ruby
TgMts has joined #ruby
jtheuer has joined #ruby
kaspertidemann has joined #ruby
Rollabunna has quit [Remote host closed the connection]
danijoo has joined #ruby
charliesome has joined #ruby
kevinxu has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
kevinxu is now known as Guest28299
TgMts has quit [Quit: No Ping reply in 180 seconds.]
DLSteve has quit [Ping timeout: 260 seconds]
melik_ has joined #ruby
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
chu has joined #ruby
Advocation has quit [Quit: Advocation]
workmad3 has quit [Ping timeout: 258 seconds]
DLSteve has joined #ruby
<apeiros> ok, flipping a html table on its topleft to bottomright axis is more work than it is worth :)
melik_ has quit [Ping timeout: 250 seconds]
ghr has joined #ruby
<pontiki> are you trying to do it with CSS or rewriting the HTML?
TgMts has joined #ruby
jtheuer has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
hrr has joined #ruby
jtheuer has joined #ruby
<soahccc> apeiros: Flipping like so? :D https://de.gamesplanet.com/?cheats=flip (hover over something)
<apeiros> soahccc: yeah, but on the diagonal
<apeiros> also needs some texts rotated
shvelo has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 272 seconds]
<soahccc> sort of
<apeiros> no
cajone has left #ruby [#ruby]
<apeiros> not like that
<apeiros> the top right cell should end up bottom left
<apeiros> while topleft and bottomright cells stay where they are
<soahccc> hmm
Guest35729 has joined #ruby
juuo has quit [Ping timeout: 256 seconds]
chinmay_dd has quit [Quit: Leaving]
TgMts has quit [Quit: No Ping reply in 180 seconds.]
ndrei has joined #ruby
chinmay_dd has joined #ruby
chinmay_dd has quit [Client Quit]
lbrf has joined #ruby
chinmay_dd has joined #ruby
<shevy> can't you just turn the monitor upside down
Guest89151 has quit [Ping timeout: 258 seconds]
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest18421
Advocation has joined #ruby
parduse has quit [Ping timeout: 258 seconds]
lbrf has quit [Ping timeout: 260 seconds]
Narzew has joined #ruby
doev has quit [Ping timeout: 240 seconds]
renanoronfle has joined #ruby
parduse has joined #ruby
tsu has joined #ruby
robbyoconnor has joined #ruby
william3 has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
jonr22 has joined #ruby
tsu has quit [Read error: Connection reset by peer]
tsu has joined #ruby
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ta has quit [Remote host closed the connection]
kirun has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 265 seconds]
cantonic has quit [Read error: Connection reset by peer]
fandi has joined #ruby
cantonic has joined #ruby
TgMts has joined #ruby
ta has joined #ruby
lkba has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
hamakn has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
phrozen77 has quit [Changing host]
phrozen77 has joined #ruby
konsolebox has quit [Remote host closed the connection]
renanoronfle has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robustus is now known as robustus|Off
shvelo has joined #ruby
shvelo has quit [Changing host]
shvelo has joined #ruby
sevenseacat has joined #ruby
Takle has quit [Remote host closed the connection]
pandaant has joined #ruby
ta has quit [Remote host closed the connection]
Takle has joined #ruby
deleg has joined #ruby
rshetty has quit [Ping timeout: 244 seconds]
shock_one has joined #ruby
Beoran_ has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
shock_one has quit [Ping timeout: 272 seconds]
Advocation has quit [Quit: Advocation]
fabrice31 has joined #ruby
Takle has joined #ruby
melik_ has joined #ruby
fabrice31 has quit [Ping timeout: 258 seconds]
melik_ has quit [Ping timeout: 260 seconds]
hrr has quit [Ping timeout: 246 seconds]
DLSteve has quit [Ping timeout: 260 seconds]
Shazaum has joined #ruby
fandi has quit [Ping timeout: 252 seconds]
n3vtelen has joined #ruby
fandi has joined #ruby
<n3vtelen> how to set current ruby version to rbenv?
Rollabunna has joined #ruby
brendenb has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
hamakn has quit [Remote host closed the connection]
brendenb has joined #ruby
Rollabun_ has joined #ruby
Stichoza has joined #ruby
MrIlyas has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
last_staff has joined #ruby
arup_r has quit [Ping timeout: 250 seconds]
DaniG2k has joined #ruby
arup_r has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
lbrf has joined #ruby
anaeem1_ has joined #ruby
Abhijit has quit [Ping timeout: 245 seconds]
arturhoo has joined #ruby
yfeldblum has joined #ruby
tsu has quit [Remote host closed the connection]
ta has joined #ruby
Rollabun_ has joined #ruby
lxsameer has quit [Quit: Leaving]
gamzera_ has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
deleg has quit [Ping timeout: 264 seconds]
lbrf has quit [Ping timeout: 250 seconds]
Rollabunna has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
mahtennek has joined #ruby
memph1s has quit [Quit: I couldn't come up with quit message :(]
Narzew has quit [Ping timeout: 256 seconds]
Stichoza has quit [Quit: Lingo: www.lingoirc.com]
amundj has joined #ruby
Deele has joined #ruby
Stichoza has joined #ruby
shock_one has joined #ruby
spider-mario has joined #ruby
Stichoza has quit [Client Quit]
disconnected has joined #ruby
Stichoza has joined #ruby
ta has quit [Remote host closed the connection]
bMalum has joined #ruby
mrnugget has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
i5um41ru has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
chinmay_dd_ has joined #ruby
Guest28299 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AmirolAhmad has quit [Remote host closed the connection]
AmirolAhmad has joined #ruby
bMalum has quit [Client Quit]
chinmay_dd has quit [Ping timeout: 244 seconds]
uber_hulk has quit [Ping timeout: 240 seconds]
mahtennek has quit [Remote host closed the connection]
russt has joined #ruby
kobain has joined #ruby
linojon has joined #ruby
i5um41ru has joined #ruby
raja has joined #ruby
fandi has quit [Ping timeout: 244 seconds]
chinmay_dd_ has quit [Read error: Connection reset by peer]
rylev has joined #ruby
rshetty has joined #ruby
Stichoza has quit [Quit: Lingo: www.lingoirc.com]
tsu has joined #ruby
Stichoza has joined #ruby
yfeldblum has joined #ruby
Stichoza has quit [Client Quit]
Stichoza has joined #ruby
chinmay_dd has joined #ruby
chu has joined #ruby
bMalum has joined #ruby
Cyberheb has joined #ruby
timonv_ has joined #ruby
DLSteve has joined #ruby
<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
boombadaroomba has joined #ruby
i5um41ru has quit [Ping timeout: 260 seconds]
renderful has joined #ruby
<gamzera_> sevenseacat: here it is http://pastie.org/9764236
<apeiros> gamzera_: re terminology: usually "a method which takes" is considered "takes as an argument", not "gets userinput"
<sevenseacat> that doesnt take an array of integers as an argument
<sevenseacat> that reads a string from stdin
i5um41ru has joined #ruby
kiyote23 has joined #ruby
<gamzera_> yeah, but how that should be done then?
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby
sski has joined #ruby
<sevenseacat> gamzera_: what are you using to learn ruby?
<sevenseacat> what tutorial
<gamzera_> sevenseacat: that is edx.org CS course
DaniG2k has quit [Ping timeout: 255 seconds]
Shazaum has quit [Quit: This computer has gone to sleep]
boombadaroomba has quit [Ping timeout: 264 seconds]
sski has quit [Remote host closed the connection]
<sevenseacat> have they covered defining methods yet?
sski has joined #ruby
disconnected has left #ruby [#ruby]
renderful has quit [Ping timeout: 260 seconds]
<gamzera_> sevenseacat: I belive they did, didn't I defined method with 'def'?
chinmay_dd has quit [Ping timeout: 255 seconds]
<gamzera_> sevenseacat: let me read and come back :)
raja has quit [Quit: Textual IRC Client: www.textualapp.com]
fandi has joined #ruby
chinmay_dd has joined #ruby
sski has quit [Ping timeout: 258 seconds]
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]
sinkensabe has joined #ruby
<SquirrelCZECH> and how that solves the problem?
* SquirrelCZECH is not making new script but debugging script that is in use somewhere
<SquirrelCZECH> so no, I can't completely rewrite it
<havenwood> it suggests manual log redirection is an antipattern
<havenwood> SquirrelCZECH: are you familiar with the init system you're using?
<SquirrelCZECH> come on
AlexRussia has quit [Ping timeout: 272 seconds]
<SquirrelCZECH> havenwood: why you ask?
<havenwood> because it seems you're trying to do its job
<havenwood> let it handle where the logs go
chipotle has quit [Quit: cya]
<SquirrelCZECH> so syslog can handle it without problems?
AlexRussia has joined #ruby
<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]
giuseppesolinas has joined #ruby
quimrstorres has joined #ruby
yfeldblum has joined #ruby
<shevy> oh you mean python docstring
Areessell has joined #ruby
valeriansaliou has quit [Ping timeout: 244 seconds]
<shevy> ruby has no docstrings
<mark06> well, that I know :P
Shazaum has joined #ruby
<mark06> it just means that I want to access a string variable that has been defined before the require clause
<mark06> I wonder about a good way, globals etc as I mentioned
<quazimodo> how do i require from a specific file rather than the installed gem?
<shevy> it won't work if you use it as a local variable
<shevy> @ivar = 'foo'
<shevy> quazimodo give the .rb file? like require 'foobar/bla.rb'
gidea_ has joined #ruby
<quazimodo> shevy: well the thing is, i want to require from a file in my dir
<quazimodo> but it's requiring from the installed gem
<quazimodo> which is out dated
<mark06> shevy: I know that too, that it won't work as local var, I told you that
<shevy> mark06 yeah I am telling you that
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quimrstorres has quit [Remote host closed the connection]
<mark06> shevy: you like repeating :)
tristanp has quit [Ping timeout: 258 seconds]
<quazimodo> shevy: any idea?
<shevy> quazimodo well, how do you require it right now?
Akagi201 has quit [Remote host closed the connection]
<shevy> mark06 look above
<shevy> <shevy> @ivar = 'foo'
jimms has quit []
<quazimodo> require '/home/quazimodo/Code/rspec-cli/lib/rspec/cli.rb'
<quazimodo> but look
<mark06> shevy: never heard you could require 'xxx.rb', didn't work either
<quazimodo> show-source p.run!
<quazimodo> From: /home/quazimodo/.rvm/gems/ruby-1.9.3-p194/gems/rspec-cli-1.0.2/lib/rspec/cli/cli_process.rb @ line 47:
<shevy> quazimodo ok you give the absolute path so it must work really
<mark06> shevy: it's the second suggestion of yours that fail
yfeldblum has quit [Ping timeout: 272 seconds]
akurilin has quit [Ping timeout: 256 seconds]
lbrf has joined #ruby
<shevy> mark06 nothing fails. @ivar will have defined an instance variable in a .rb file, you can require that file and @ivar will be known
Soda has quit [Remote host closed the connection]
<mark06> shevy: nothing fails?
<shevy> yep
<mark06> shevy: second one actually works , yes, but ' all the stuff' is false as you repeat yourself
<shevy> yeah, local variables won't work
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mark06> yeah, local variables won't work
<shevy> I am glad you finally learned that
<mark06> quazimodo: maybe add the dir to $RUBYLIB
Areessell has quit [Ping timeout: 272 seconds]
<quazimodo> mark06: but i don't get why it's not working
<quazimodo> i'm specifying the exact file
<quazimodo> this is really weird behaviour
<mark06> quazimodo: well, and how cli.rb is requiring 'cli_process'?
<havenwood> namespaces shmamefaces
<quazimodo> mark06: ah.
<quazimodo> now i get it
<quazimodo> it's doing require 'cli/cli_process'
<quazimodo> not require_relative
lbrf has quit [Ping timeout: 245 seconds]
dblessing has joined #ruby
<quazimodo> what's best practice?
<mark06> quazimodo: maybe it's better to just add your dir to ruby lib path
<quazimodo> ok
Rollabun_ has quit [Remote host closed the connection]
<mark06> quazimodo: are you testing a fix for the gem?
<havenwood> install the gem so it is where it says it'll be or change the namespace
<mark06> shevy: I am glad that I'm the one that taught you that
<quazimodo> mark06: yeah
<shevy> mark06 I knew that already buddy
<quazimodo> mark06: my stupid pipes are broken
<mark06> shevy: then wyh you said 'all the stuff'
<shevy> mark06 cuz your question was so short
danijoo has quit [Read error: Connection reset by peer]
<mark06> quazimodo: then just set env var RUBYLIB=/your/dir and it should prefer that over the gem
mengu has joined #ruby
danijoo has joined #ruby
quimrstorres has joined #ruby
maletor has joined #ruby
<quazimodo> hrm
<mark06> shevy: how would implement it, @doc or similar is too common, no? may conflict with other stuff like globals, no?
maletor has quit [Read error: Connection reset by peer]
<shevy> mark06 @foo would never be like $foo
chipotle has joined #ruby
<quazimodo> still loading from the gem files
<quazimodo> weird huh
chipotle has quit [Client Quit]
<mark06> quazimodo: now I relaize what cli is, haha https://rubygems.org/gems/cli
Stichoza has joined #ruby
<shevy> @foo will retain the scope it was defined in; in the case of normal @ivar = 'bla' it should be part of class Object namespace
<mark06> quazimodo: maybe try this instead? https://github.com/renatosilva/easyoptions
micah has joined #ruby
<quazimodo> mark06: thats not it
Takle has joined #ruby
<quazimodo> its rspec-cli
<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?
<havenwood> mark06: scoping rules of course apply
giuseppesolinas has joined #ruby
Takle has quit [Ping timeout: 258 seconds]
<quazimodo> yes
Stichoza has quit [Ping timeout: 260 seconds]
HYDRO187 has left #ruby ["Textual IRC Client: www.textualapp.com"]
HYDRO187 has joined #ruby
<HYDRO187> Your behavior is not conducive to the desired environment.
<havenwood> HYDRO187: Adjust your behavior or the environment.
Chinmay has joined #ruby
<HYDRO187> Thanks
<HYDRO187> mom
<mark06> quazimodo: well it works for me... setting RUBYLIB makes the dir have priority over the gem
<parabolize> micah: did you try removing the : on line 5?
<quazimodo> goddamit
<mark06> quazimodo: try placing your fix onto /usr/lib/ruby/site_ruby maybe
<HYDRO187> I was banned from #bitcoin, #Python and ##chat
<HYDRO187> do I have some Spills for them...
<micah> parabolize: no, i'll try it
<HYDRO187> A-BLOCK IP will be jumping
<quazimodo> mark06: what's that
<parabolize> micah: pretty sure you want the variable all_branches not the symbol :all_branches
fabrice31 has quit [Ping timeout: 258 seconds]
Dopagod has quit [Read error: Connection reset by peer]
Lightsword has joined #ruby
Dopagod has joined #ruby
Shazaum has quit [Quit: This computer has gone to sleep]
melik_ has quit [Ping timeout: 244 seconds]
chinmay_dd_ has quit [Ping timeout: 258 seconds]
Lightsword has quit [Client Quit]
<micah> parabolize: hm, if I do that, i get: undefined local variable or method `all_branches'
<mark06> quazimodo: sort of /usr/local/bin for ruby
galeido has joined #ruby
<quazimodo> mark06: i dont know why, but it's not working
centrx has quit [Quit: Did gyre and gymble in ye wabe]
<mark06> quazimodo: paste the full error... paste the whole new gem if possible too
<quazimodo> yeah hold up
<mark06> brb
diegoviola has joined #ruby
quimrstorres has quit [Remote host closed the connection]
iaj_ has quit [Ping timeout: 252 seconds]
<quazimodo> goddam thing
<quazimodo> unix pipes are fickle too
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<claf> pipes and processes are fickle?
<parabolize> micah: what is Setting.plugin_redmine_gitlab_hook? Is it an array, hash or something else?
Chinmay is now known as chinmay_dd
<quazimodo> claf: they seem to be, to me at least :)
<quazimodo> they die easily
jenrzzz has quit [Ping timeout: 255 seconds]
<quazimodo> not robust
<quazimodo> or at least I don't think so
<claf> so, maybe are fickle?
rylev has joined #ruby
olivier_bK has joined #ruby
<quazimodo> XD
iaj has joined #ruby
<tejas-manohar> hey guys
chinmay_dd_ has joined #ruby
<tejas-manohar> code -- error
<tejas-manohar> any idea?
gsd has joined #ruby
sigurding has quit [Quit: sigurding]
<tejas-manohar> i was going based off what i read here
<micah> parabolize: i dont know, i'm trying to figure out :(
rshetty has quit [Ping timeout: 264 seconds]
sigurding has joined #ruby
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaspertidemann has quit []
<tejas-manohar> can that not be in a configure do block or somethin
rshetty has joined #ruby
chinmay_dd has quit [Ping timeout: 258 seconds]
El3ktra has quit [Ping timeout: 245 seconds]
ptrrr has quit [Quit: ptrrr]
dblessing has joined #ruby
<parabolize> micah: try using p Setting.plugin_redmine_gitlab_hook. #redmine channel might be able to help.
hamakn has quit [Remote host closed the connection]
adamski2600 has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 250 seconds]
<tejas-manohar> anyone have a clue on my issue? the error is preventing me from runnning sinatra server and moving on :(
<micah> parabolize: when I do that, I see its: {:all_branches=>"yes"}
<micah> so its a hash, I guess
<mark06> tejas-manohar: I don't know this lib but I guess you set env to something it returns to you
<mark06> quazimodo: export RUBYLIB=/home/quazimodo/Code/rspec-cli/lib
<tejas-manohar> mark06:what you mean?
<mark06> quazimodo: i.e. add /lib
fotoflo has joined #ruby
rylev has quit [Remote host closed the connection]
<mark06> tejas-manohar: you understand already that 'env' is not defined?
<tejas-manohar> yeah
<tejas-manohar> idk how to fix that tho
<mark06> tejas-manohar: just saying it looks like something the library can give you through its api
<tejas-manohar> yeah its a part of rack afaik
<mark06> tejas-manohar: env = YourLibrary::gives_it(to_you, 'I guess')
quimrstorres has joined #ruby
<tejas-manohar> yeah i guess
<tejas-manohar> hmmm
phutchins has joined #ruby
mahtennek has quit []
<tejas-manohar> well shit i thought sinatra required rack
<tejas-manohar> but apparently i had to explicitly require it
quimrstorres has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Advocation has joined #ruby
Sawbones has joined #ruby
<tejas-manohar> havenwood: wat why this no work then
it0a has joined #ruby
<havenwood> tejas-manohar: http://www.sinatrarb.com/intro.html#Sinatra::Base%20-%20Middleware,%20Libraries,%20and%20Modular%20Apps
<parabolize> micah: you could p its #class
<havenwood> tejas-manohar: require 'sinatra/base'
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<tejas-manohar> havenwood: i re ran bundle
yfeldblum has joined #ruby
<tejas-manohar> is my bundle require code messed up (maybe unrelated)
josephndenton has quit [Ping timeout: 240 seconds]
HYDRO187 has left #ruby ["Textual IRC Client: www.textualapp.com"]
<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]
lbrf has joined #ruby
<havenwood> tejas-manohar: JSON gem ships with Ruby.
<tejas-manohar> oh
timonv_ has quit [Ping timeout: 255 seconds]
<tejas-manohar> havenwood: so i gues in classic style i needa require 'rack' ?
<havenwood> why do you say that?
<tejas-manohar> nvm but its still not working
<tejas-manohar> i dont needa require rack since sinatra does
<tejas-manohar> but i needa do require sinatra/base
<tejas-manohar> ?
<havenwood> tejas-manohar: in Pry, type `require 'sinatra'` then `Rack` and see what happens...
<tejas-manohar> ok yeah it's in good shape
Aswebb has quit [Remote host closed the connection]
<tejas-manohar> i just dont understand why that env is still erroring
<havenwood> because there isn't an `env` defined
Aswebb has joined #ruby
tier has joined #ruby
<havenwood> why would there be?
<tejas-manohar> i thought rack defines it O.o
Akagi201 has quit [Ping timeout: 272 seconds]
lbrf has quit [Ping timeout: 256 seconds]
<havenwood> tejas-manohar: try `require 'rack'` then `env`
<havenwood> expect a NameError
sargas has joined #ruby
<tejas-manohar> yeah ive realized now O.o
fotoflo has quit [Quit: fotoflo]
<tejas-manohar> about defining env
quimrstorres has joined #ruby
efgh has joined #ruby
Sawbones has quit [Remote host closed the connection]
<tejas-manohar> havenwood:
<tejas-manohar> ^
quimrstorres has quit [Remote host closed the connection]
red_horned_rihno has quit [Ping timeout: 258 seconds]
Aswebb has quit [Ping timeout: 260 seconds]
<havenwood> tejas-manohar: save that ^ as `config.ru` and try running it with: rackup
mices has quit []
<tejas-manohar> one sec brb
galeido has quit [Quit: galeido]
Shazaum has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
Channel6 has joined #ruby
Aswebb has joined #ruby
rshetty has joined #ruby
mary5030 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 250 seconds]
<havenwood> tejas-manohar: if Sinatra just has too much going on maybe check out Hobbit. i've had fun playing with it. :)
<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> tejas-manohar: or twitter's: https://dev.twitter.com/rest/public/rate-limiting
<havenwood> tejas-manohar: grabbing breakfast
startupality has quit [Quit: startupality]
El3ktra has joined #ruby
El3ktra is now known as Guest30557
<tejas-manohar> well i mean im not making a public facing API
tristanp has joined #ruby
<havenwood> tejas-manohar: really getting breakfast! back in a few.
<tejas-manohar> sure cya
Stichoza has joined #ruby
mary5030 has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
mary5030 has joined #ruby
tristanp has quit [Remote host closed the connection]
Takle has joined #ruby
tier has quit [Remote host closed the connection]
monsieurp has quit [Quit: Lost terminal]
monsieurp has joined #ruby
Stichoza has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
shock_one has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
boombadaroomba has joined #ruby
St_Marx has quit [Quit: WeeChat 1.0.1]
patsourakos has quit []
St_Marx has joined #ruby
boombadaroomba has quit [Ping timeout: 250 seconds]
Stichoza has joined #ruby
jenrzzz has joined #ruby
Advocation has joined #ruby
Advocation has quit [Client Quit]
yfeldblum has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Aswebb has quit []
Aswebb has joined #ruby
Cyberheb has quit [Quit: Computer has gone to sleep.]
Aswebb has quit [Client Quit]
Aswebb has joined #ruby
Aswebb has quit [Client Quit]
hamakn has joined #ruby
Aswebb_ has joined #ruby
Soda has joined #ruby
rkjaer_ has quit [Quit: Connection closed for inactivity]
NameNotFound has left #ruby [#ruby]
yfeldblum has quit [Ping timeout: 265 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
hamakn has quit [Ping timeout: 252 seconds]
rylev has joined #ruby
rshetty has quit [Remote host closed the connection]
kireevco has quit [Quit: Leaving.]
dopie has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
rylev has quit [Ping timeout: 240 seconds]
banister has joined #ruby
fuhgeddaboudit has joined #ruby
reinaldob has quit [Remote host closed the connection]
reinaldob has joined #ruby
melik_ has joined #ruby
fabrice31 has joined #ruby
lbrf has joined #ruby
<shevy> dumdedum
reinaldob has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
ezioa has quit [Read error: Connection reset by peer]
akaiiro has joined #ruby
ezioa has joined #ruby
melik_ has quit [Ping timeout: 250 seconds]
RedWraith has quit [Ping timeout: 252 seconds]
adriancb has joined #ruby
gccostabr has joined #ruby
Rollabunna has joined #ruby
Darryl__ has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
reinaldob has joined #ruby
goshdarnyou has joined #ruby
lbrf has quit [Ping timeout: 272 seconds]
efgh has quit [Ping timeout: 246 seconds]
Aswebb_ has quit [Remote host closed the connection]
fgo has joined #ruby
adamski2600 has joined #ruby
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 264 seconds]
fotoflo has joined #ruby
Mothore__ has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
sinkensabe has joined #ruby
TeddyMurray has joined #ruby
Hanmac has quit [Remote host closed the connection]
byprdct has joined #ruby
havenwood has joined #ruby
Sgeo_ has quit [Read error: Connection reset by peer]
byprdct has quit [Max SendQ exceeded]
reinaldob has quit [Remote host closed the connection]
<mark06> quazimodo: did it work, did it work :)
sinkensabe has quit [Ping timeout: 245 seconds]
reinaldob has joined #ruby
Ridley5 has quit [Ping timeout: 272 seconds]
CrazyM4n has joined #ruby
Aswebb_ has joined #ruby
jimbach has joined #ruby
<tejas-manohar> how should i strip the id (i.e. "1b2149b097dbe14c94aa") from https://gist.github.com/tejas-manohar/1b2149b097dbe14c94aa
<tejas-manohar> regex it?
uber_hulk has joined #ruby
benzrf|offline is now known as benzrf
<tejas-manohar> just the last 20 chars?
reinaldob has quit [Ping timeout: 256 seconds]
<tobiasvl> split on '/'?
<akaiiro> tejas-manohar, you mean stripping the 'gist:' part?
<eval-in__> mark06 => "1b2149b097dbe14c94aa" (https://eval.in/231628)
<mark06> tejas-manohar: ^
<tejas-manohar> oh
<tejas-manohar> damn thats smart
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejas-manohar> i was gonna do last 20 chars
<mark06> $300
Stalkr_ has joined #ruby
Juanchito has joined #ruby
gccostabr has quit [Quit: See you later!]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<tejas-manohar> lol
ikaros has quit [Quit: Ex-Chat]
<tejas-manohar> whats a good request gem for ruby'
<tejas-manohar> net:http is clunky and im gonna be dealin with a lot of rest apis
Aswebb_ has quit [Remote host closed the connection]
<tejas-manohar> rest-client?
kiyote23 has quit [Remote host closed the connection]
<havenwood> tejas-manohar: HTTPClient is a nice pure Ruby HTTP client: https://github.com/nahi/httpclient#readme
<tejas-manohar> thx
<havenwood> tejas-manohar: or Faraday is a popular option if you want Rack-style middleware with multiple adapters: https://github.com/lostisland/faraday#readme
<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
AUv is now known as Auv
fuhgeddaboudit has joined #ruby
<havenwood> tejas-manohar: i like the interface to this one: https://github.com/tarcieri/http.rb#readme
Aswebb_ has joined #ruby
yfeldblum has joined #ruby
mary5030 has joined #ruby
tristanp has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
<tejas-manohar> havenwood: https://gist.github.com/tejas-manohar/f51a1fa5838d2007f4aa - i have this hash, i wanna get the "content" of that first file w/o relying on file name, how to do this?
konsolebox has joined #ruby
<tejas-manohar> havenwood: that gist represents response['files'] btw
<tejas-manohar> havenwood: i tried response['files'][0]
<tejas-manohar> no luck
yfeldblum has quit [Ping timeout: 252 seconds]
tesaf has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
<havenwood> tejas-manohar: values.map { |h| h['content'] }
Sawbones has joined #ruby
Trieste has quit [Ping timeout: 258 seconds]
<havenwood> tejas-manohar: like: JSON.parse('stuff you pasted').values.map { |h| h['content'] }
<havenwood> eval-in__: with multiple filename keys, you'd get an array of multiple content back
<havenwood> tejas-manohar: rather ^
Trieste has joined #ruby
<havenwood> tejas-manohar: a Hash serialized to JSON is what you have, not a Hash
zzz_Ridley has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
Seich has quit [Ping timeout: 258 seconds]
Seich has joined #ruby
mengu has joined #ruby
kirun has quit [Ping timeout: 244 seconds]
siaw has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
<siaw> why do i get the nomethoderror? https://gist.github.com/siaw23/b18d8e5d8cdbe393d5b0
zzz_Ridley has quit [Ping timeout: 250 seconds]
ta has quit [Remote host closed the connection]
bluOxigen has joined #ruby
Mothore___ has joined #ruby
atomical has quit [Ping timeout: 258 seconds]
anaeem1_ has quit [Remote host closed the connection]
adriancb has quit [Remote host closed the connection]
Mothore__ has quit [Ping timeout: 252 seconds]
Sawbones has quit [Remote host closed the connection]
diego_ar has quit [Remote host closed the connection]
adriancb has joined #ruby
atomical has joined #ruby
<shevy> siaw works fine
Sgeo has joined #ruby
jalcine has quit [Ping timeout: 258 seconds]
dawkirst has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<havenwood> siaw: your gist works
<siaw> give me NoMethod error here and i don’t get why? i’m going crazy!!
kireevco has joined #ruby
<shevy> works fine
<siaw> stack.rb:15:in `<main>': undefined method `take_from_stack' for #<Stack:0x007fc0ea162440 @stack=["one", "two", "three"]> (NoMethodError)
<shevy> try it in irb siaw
fuhgeddaboudit has quit [Ping timeout: 244 seconds]
<siaw> in irb it works :( :( :( :(
kirun has joined #ruby
<shevy> k so you know you are doing something wrong in your setup
<siaw> no
<shevy> probably the require_relative line
<shevy> siaw it will work if you have set it up properly
Seich has quit [Ping timeout: 258 seconds]
jalcine has joined #ruby
<siaw> if i use require ‘stacklike’ alone i get TheRubyist siaw$ ruby stack.rb
<siaw> from /Users/siaw/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
<siaw> from stack.rb:1:in `<main>'
adriancb has quit [Ping timeout: 252 seconds]
<siaw> a LoadError
<siaw> i need a gun to shoot myself in the head :D
lbrf has joined #ruby
<havenwood> siaw: after Ruby 1.8 (which is past end-of-life) '.' is no longer in the $LOAD_PATH, so you'd have to: require './stacklike'
dblessing has joined #ruby
Seich has joined #ruby
_JokerDoomWork has joined #ruby
emmesswhy has joined #ruby
TeddyMurray has quit [Ping timeout: 265 seconds]
<siaw> havenwood: that works. but back to the same error. it’s telling me my ‘take_from_stack’ method is undefined
<havenwood> siaw: check that the file relative to the requiring file contains what you think it does
<shevy> that method will be defined when you have required that file
<shevy> so your file does not include the code that you think it does siaw
chinmay_dd has joined #ruby
chinmay_dd has quit [Client Quit]
<havenwood> siaw: you might sanity check by downloading and trying your gist
fgo has joined #ruby
<siaw> i’m lost :(
<siaw> i copied my code to gist. how should downloading and trying my gist help?
kireevco has quit [Quit: Leaving.]
lbrf has quit [Ping timeout: 250 seconds]
<havenwood> siaw: the code works on Ruby 1.9, 2.0, 2.1, rbx 2.4 and jruby-1.7
<havenwood> siaw: as you have it in the gist
<siaw> i’m using ruby 2.1.5
elusion has joined #ruby
<havenwood> siaw: it works on 2.1.5
chinmay_dd has joined #ruby
<siaw> havenwood: hmmm so why am i getting the no method error?
<siaw> i just don’t know why
Guest30557 has quit [Ping timeout: 250 seconds]
<havenwood> siaw: have you carefully checked that the file you're requiring contains what you think it does?
<siaw> havenwood: what do you mean by that?
ta has joined #ruby
<havenwood> siaw: it is correct as you have it in the gist, so i suspect you don't have it as it is in the gist
<siaw> the gist is the SAME code i have in my file on computer
dawkirst has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 265 seconds]
<shevy> no
Sawbones has joined #ruby
<havenwood> i don't believe you :P
<shevy> siaw if what you write is true then explain why ruby works for everyone else - the way how require works is the same everywhere
arup_r has quit [Quit: Leaving.]
dawkirst has joined #ruby
<shevy> start with the basics
<havenwood> siaw: do you have more than one stackalike.rb?
<shevy> siaw create two NEW files, .rb ending. in one, put: puts 'hello world!', in the second require that file
<shevy> then run the second file
<shevy> IF this works, then CONTINUE and put that code you are trying to run into it
gfp has joined #ruby
<havenwood> siaw: or did you not save your changes?
JokerDoomWork has joined #ruby
Mothore___ has quit [Ping timeout: 258 seconds]
<siaw> i DID save changes
<havenwood> siaw: go cat those files from your terminal
<havenwood> siaw: cat stack*
<siaw> havenwood: sure
Mothore___ has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
zzz_Ridley has joined #ruby
ezioa has quit [Ping timeout: 264 seconds]
zzz_Ridley is now known as Ridley5
Ridley5 has quit [Changing host]
Ridley5 has joined #ruby
<havenwood> siaw: it's stackalike.rb that i'm curious about
melik_ has joined #ruby
_JokerDoomWork has quit [Ping timeout: 250 seconds]
<shevy> hehe
dawkirst has quit [Remote host closed the connection]
_JokerDoomWork has joined #ruby
<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?
ringarin has joined #ruby
<havenwood> siaw: two files same name?
melik_ has quit [Ping timeout: 265 seconds]
<havenwood> different directories?
<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
<tejas-manohar> oh shit wow its all clientside...
jimbach has quit [Remote host closed the connection]
<tejas-manohar> mark06: hmm maybe :)
<tejas-manohar> https://ideone.com/sphere-engine hell yeah
<riceandbeans> tryruby.org
Megtastique has quit []
JokerDoomWork has joined #ruby
__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
<tejas-manohar> like the compiling of code?
<siaw> very very very strange!!
<havenwood> >> 'what to run code in, hem...'
<tejas-manohar> w/o an editor
<eval-in__> havenwood => "what to run code in, hem..." (https://eval.in/231629)
<tejas-manohar> *aAPI
<shevy> siaw your editor tries to outsmart you
yfeldblum has joined #ruby
<tejas-manohar> oh awesome
<tejas-manohar> eval
Kricir has joined #ruby
<siaw> shevy: well my editor proved how stupid it is!
<tejas-manohar> i gotta crack an api
<tejas-manohar> ugh
<siaw> at first i was like, so afterall i know no ruby at all :D :D
<havenwood> https://eval.in
<tejas-manohar> havenwood: no api :(
<havenwood> ideone might be best bet
daynaskully has quit [Quit: quit]
<havenwood> tejas-manohar: you can do some sandboxing with jruby, a la tryruby.org
<mark06> siaw: what editor
<siaw> mark06: sublime text
<tejas-manohar> i guess i like eval cuz many languages, not just ruby
JokerDoom has joined #ruby
<mark06> siaw: saved session? n++ does that
<havenwood> tejas-manohar: docker or other conatainer stuff yourself is what codewars and such tend to use
<siaw> mark06: how do i make it stop misbehaving next time?
<mark06> siaw: I don't use sublime text
Shazaum has quit [Quit: This computer has gone to sleep]
<siaw> ok
havenwood has quit []
fgo has joined #ruby
renderful has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
<tejas-manohar> ah
<tejas-manohar> there should be a good api for this
mark06 has left #ruby ["http://pidgin.renatosilva.me - Pidgin++"]
mbff has joined #ruby
<mbff> I am trying to create create json with variables and I am getting an error.
<mbff> newReleasesJson = { "resultCount": albumTitleArray.length.to_s, "lastupdated" : lastupdated }
<mbff> Can I not use variables when creating json?
djbkd has joined #ruby
tristanp has joined #ruby
_JokerDoom has joined #ruby
<tejas-manohar> havenwood: i need to submit a json list of strings for a parameter on an api
renderful has quit [Ping timeout: 245 seconds]
fgo has quit [Ping timeout: 244 seconds]
<tejas-manohar> havenwood: like "test", "test2" or like { "test", "test2" } or what ?
louism2wash has joined #ruby
<tejas-manohar> havenwood: http://i.imgur.com/gmObKKy.png
_JokerDoom has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_JokerDoom has joined #ruby
JokerDoom has quit [Ping timeout: 240 seconds]
MrIlyas__ has joined #ruby
ta has quit [Remote host closed the connection]
_JokerDoomWork has joined #ruby
JokerDoomWork has quit [Ping timeout: 258 seconds]
yourabi has joined #ruby
sinkensabe has quit [Remote host closed the connection]
banister has joined #ruby
AlexRussia has joined #ruby
sinkensabe has joined #ruby
MrIlyas_ has quit [Ping timeout: 258 seconds]
kiyote23 has quit [Ping timeout: 252 seconds]
asteve has joined #ruby
Sawbones has joined #ruby
Rollabunna has joined #ruby
TgMts has quit [Quit: No Ping reply in 180 seconds.]
fabrice31 has joined #ruby
<asteve> is there a channel dedicated to cs on freenode?
<tejas-manohar> nvm
TgMts has joined #ruby
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
mrnugget has quit [Quit: mrnugget]
<wasamasa> asteve: computer science?
<asteve> ya
dr4_ has joined #ruby
shredding has joined #ruby
<wasamasa> forget that
sinkensabe has quit [Remote host closed the connection]
defam has joined #ruby
<wasamasa> ##programming is just flat out bad
<asteve> bummer
<wasamasa> no, your best bet is reading up on recommendations and grab books
<wasamasa> then studying them
fabrice31 has quit [Ping timeout: 250 seconds]
<asteve> I'm trying to refresh my knowledge and I'm building a BST but I can't wrap my head around the insert
tristanp has quit [Ping timeout: 240 seconds]
<wasamasa> heck, I bet you'd get better answers on a stackexchange or reddit
Squarepy has quit [Ping timeout: 240 seconds]
dr4__ has quit [Ping timeout: 258 seconds]
diego_ar has joined #ruby
Lightsword has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
shock_one has quit [Remote host closed the connection]
Guest30557 has joined #ruby
Photism has quit [Quit: Leaving]
Sawbones has quit [Remote host closed the connection]
vermiform has joined #ruby
Sawbones has joined #ruby
diego_ar has quit [Ping timeout: 260 seconds]
ta has joined #ruby
lbrf has joined #ruby
shock_one has joined #ruby
quimrstorres has joined #ruby
lbrf has quit [Ping timeout: 250 seconds]
enebo has quit [Quit: enebo]
quimrstorres has quit [Remote host closed the connection]
sevvie has quit [Remote host closed the connection]
louism2wash has joined #ruby
ohaibbq has joined #ruby
melik_ has joined #ruby
robustus is now known as robustus|Off
robustus|Off is now known as robustus
poppingtonic has joined #ruby
_ixti_ has joined #ruby
intuxicated has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 255 seconds]
quimrstorres has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
louism2wash has quit [Quit: This computer has gone to sleep]
blackmesa has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest17405
Mothore___ has quit [Quit: Be back later ...]
<mbff> Hello? I am having troubles creating an array
<mbff> err hash
konsolebox has quit [Remote host closed the connection]
<mbff> I am using hash.merge but only the last each do command is being added
MrIlyas has joined #ruby
giuseppesolinas has joined #ruby
<mbff> This is what's going on http://pastebin.com/KbxWVp5P
yfeldblum has joined #ruby
fotoflo has quit [Quit: fotoflo]
MrIlyas__ has quit [Ping timeout: 258 seconds]
<wasamasa> inb4 #.merge is just returning part of the hash
<wasamasa> and you assigning that part to the hash gives you that behaviour
<wasamasa> and you not assigning would give you the expected behaviour because it's modifying the hash in-place
<mbff> so how would I write it so the results array is longer than just one ?
deric_skibotn has quit [Ping timeout: 272 seconds]
Sawbones has quit [Remote host closed the connection]
lbrf has joined #ruby
ta has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 258 seconds]
mikepack has joined #ruby
duncannz has joined #ruby
<apeiros> I think the problem is more related to the fact that merge does not perform a deep merge
<apeiros> @ mbff & wasamasa
<apeiros> >> {a: {b: 1, c: 2}}.merge({a: {c: 3}})
<eval-in__> apeiros => {:a=>{:c=>3}} (https://eval.in/231650)
<apeiros> nested hashes are not merged. a new key/value pair replaces an existing key/value pair at the top-level.
<apeiros> so your :results key is replaced on every iteration. completely.
<mbff> ok...
dopie has quit [Remote host closed the connection]
siaw has quit [Quit: siaw]
<mbff> so is there a deep merge option?
<apeiros> no
<mbff> What should I look for in the docs
<mbff> ?
<apeiros> but Hash#merge accepts a block, which is called when a key exists already in the target hash
<apeiros> you can use that to implement deep merging
fgo has joined #ruby
kiyote23 has joined #ruby
<mbff> alright. It just surprises me there isn't better way of doing this besides implementing deep merges
Akagi201 has joined #ruby
Darryl__ has quit [Quit: Connection closed for inactivity]
robustus is now known as robustus|Off
fgo has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
yourabi has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> mbff: the amount of possible needs for deep merging is *very* large. there's no sensible way to have something like that in core.
Akagi201 has quit [Ping timeout: 244 seconds]
nateberkopec has quit [Quit: Leaving...]
<tejas-manohar> can i do numbers.push line[0,8]
<tejas-manohar> or do i needa use ()
<apeiros> tejas-manohar: that's syntactically valid, yes
<tejas-manohar> yeah
diego_ar has joined #ruby
tttttttttttttttt is now known as weaksauce
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.]
Cyberheb has joined #ruby
SCHAAP137 has joined #ruby
<asteve> could be suboptimal because it's recursive and ruby doesn't do tail recursion
dopie has joined #ruby
ikaros has joined #ruby
ohaibbq has quit [Quit: Leaving...]
CrazyM4n has quit [Remote host closed the connection]
havenwood has joined #ruby
jimmyhoughjr has joined #ruby
Cyberheb has quit [Ping timeout: 245 seconds]
nickjj has quit [Quit: WeeChat 1.0.1]
diego_ar has quit [Remote host closed the connection]
CrazyM4n has joined #ruby
<asteve> I can't think of a way to do it iteratively
<kaspergrubbe> asteve: you mean tail call optimization
timonv_ has quit [Remote host closed the connection]
<kaspergrubbe> according to http://stackoverflow.com/a/13350463/250403 you can enable it in MRI but its experimental
<asteve> yrs
chishiki has quit [Quit: WeeChat 1.0.1]
<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> shevy: http://brause.cc/jain.rb
<wasamasa> shevy: glorious, isn't it
<shevy> hahaha
<shevy> that is even in german
<shevy> # ja 1, 2, "one is two"
<shevy> # nein 1, 1
<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.
<havenwood> shevy: here's a *super fancy* one: https://github.com/peterc/testrocket/blob/master/lib/testrocket.rb
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Obfuscate> asteve: As for TCO, only one of those calls is in tail context anyways, so it would be about half effective.
<shevy> lol
<shevy> now that is what I call minimal havenwood
<havenwood> +-> { 1 + 1 == 2 }
<asteve> Obfuscate: I'm not sure I understand what you're saying with the first line
<havenwood> shevy: for minimal but extensible Oktobertest is neat: https://github.com/patriciomacadden/oktobertest#readme
lnormous has joined #ruby
<havenwood> shevy: but why you no Minitest?
<shevy> havenwood dunno. I want like a miniminitest
<asteve> I mean, I'm pretty sure a BST can have a node with only one child
<shevy> lol
<shevy> oktoberfest
<shevy> what's with those german names
decoponio has quit [Quit: Leaving...]
<wasamasa> havenwood: cool
shock_one has joined #ruby
<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]
SCHAAP137 has joined #ruby
Xiti has quit [Ping timeout: 252 seconds]
TgMts has quit [Client Quit]
KC9YDN has quit [Quit: ZNC - http://znc.in]
chrishough has joined #ruby
spider-mario has quit [Remote host closed the connection]
KC9YDN has joined #ruby
vvivv has quit [Quit: Leaving]
KC9YDN has quit [Client Quit]
TgMts has joined #ruby
KC9YDN has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
<shevy> Obfuscate is your name program?
<shevy> can I peek at your code :>
<Obfuscate> No. I was compiled without the introspection option.
jimbach has quit [Remote host closed the connection]
<shevy> hahaha
chipotle has quit [Ping timeout: 240 seconds]
Areessell has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
Crazy_Atheist has joined #ruby
quimrstorres has joined #ruby
_JamieD_ has joined #ruby
oleo is now known as Guest62097
oleo__ has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
iamninja has joined #ruby
TgMts has quit [Read error: Connection reset by peer]
Guest62097 has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
TgMts has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
zamabe has joined #ruby
vinleod has joined #ruby
adriancb has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<zamabe> Are all comparisons in an if clause checked, or does it only check later conditions if the prior one succeeds? ( if 1==2 and other_check() )
geiltalasdair has joined #ruby
djbkd has quit [Quit: My people need me...]
<apeiros> zamabe: logical operators short-circuit
<zamabe> thanks
kiyote23 has joined #ruby
<apeiros> regardless of whether they're in a if statement or elsewhere
<zamabe> Is juuo a bot?
<zamabe> or are they just PMing me for money unrelated to this channel
<apeiros> spambot
geilt has quit [Ping timeout: 252 seconds]
shock_one has quit [Remote host closed the connection]
<shevy> perhaps if you pay some money it'll stop spamming
<shevy> :>
<shevy> OR
<zamabe> can't imagine you'd be happy unless the money funneled to you
* zamabe scratches your chin
<shevy> it'll go "hey, this thing really works, now I'm gonna increase the amount of spams to get more money!"
<shevy> nah
<shevy> money does not make me happy
fgo has joined #ruby
<shevy> but watching at complaints from other people does! :D
tobago has joined #ruby
havenwood has quit [Remote host closed the connection]
Xiti` has quit [Quit: Xiti`]
LudicrousMango has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
timonv_ has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 245 seconds]
TgMts has quit [Read error: Connection reset by peer]
giuseppesolinas has joined #ruby
LudicrousMango has quit [Ping timeout: 252 seconds]
quimrstorres has quit [Remote host closed the connection]
Xiti has joined #ruby
TgMts has joined #ruby
bMalum has quit [Quit: bMalum]
<mbff> hello I am looking at http://rvm.io/deployment/cron
<mbff> and I don't understand what @projectX is doing
xxneolithicxx has joined #ruby
mikepack has quit [Remote host closed the connection]
Soilent has joined #ruby
<shevy> mbff looks as if it is part of his path
<shevy> ah cron syntax
<shevy> I think he just has this fancy path to his ruby mbff
parabolize has joined #ruby
<mbff> Ok... all I need is to run a rb file with the latest verison of ruby I have installed
<mbff> is there a wrapper for that?
tjohnson has joined #ruby
Xiti` has joined #ruby
jasonwebster has joined #ruby
gr33n7007h has joined #ruby
<xxneolithicxx> do you want to run in cron or in a shell script
<xxneolithicxx> it outlines the two options there
Xiti has quit [Ping timeout: 264 seconds]
The_NetZ has joined #ruby
<mbff> I want to run in cron, but I don't need a custom ruby project
zamabe has left #ruby ["CANADIANS!? WHERE?"]
<mbff> just the normal ruby I have installed
<xxneolithicxx> ok so lets back up did you use rvm to install ruby?
diegoviola has quit [Ping timeout: 256 seconds]
<mbff> ye
<mbff> yes*
<mbff> and I use bundler if that matters
CorySimmons has joined #ruby
<mbff> I am doing this a ubuntu vps.
stormbytes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xxneolithicxx> ok so whats the path to where you put it? Just use "<path to rvm directory>/ruby <your rb script>" based on whats saying there
<mbff> I used the curl installer
<mbff> I don't know where rvm is
alandb has quit [Quit: Saindo]
<mbff> but I think /usr/local/rvm/
<xxneolithicxx> *bad working on my part, <path to rvm created project directory>
<xxneolithicxx> *wording
<mbff> if a go into /usr/local/rvm/enviroments
<mbff> I see default, ruby-2.1.5, ruby-2.1.5@global
ikaros has quit [Quit: Ex-Chat]
<mbff> can I use those?
<mbff> same 3 in /usr/local/rvm/wrappers
phutchins has quit [Ping timeout: 265 seconds]
pwh has joined #ruby
Ancient has quit [Ping timeout: 264 seconds]
<xxneolithicxx> use the wrappers one: /usr/local/rvm/wrappers/ruby-2.1.5/ruby <your ruby script>
tristanp has joined #ruby
phutchins has joined #ruby
havenwood has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<mbff> alright thanks
maletor has quit [Quit: Computer has gone to sleep.]
lnormous has quit [Ping timeout: 240 seconds]
lnormous has joined #ruby
Soilent has quit [Quit: rcirc on GNU Emacs 24.2.1]
TgMts has quit [Quit: No Ping reply in 180 seconds.]
Soda has joined #ruby
DLSteve has quit [Quit: Leaving]
TgMts has joined #ruby
klmlfl has joined #ruby
blizzy has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
<mbff> xxneolithicxx, I don't think it is working
<mbff> How to can I check? Does rvm log somewhere?
pwh has quit []
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
maestrojed has joined #ruby
Stichoza has quit [Quit: Lingo: www.lingoirc.com]
Joufflu has joined #ruby
jimbach has joined #ruby
LudicrousMango has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
tristanp has quit [Remote host closed the connection]
blackmesa has joined #ruby
chrishough has joined #ruby
<havenwood> mbff: yeah, rvm logs to rvm/log. the #rvm channel is probably the best place for RVM questions. having trouble?
jasonwebster has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pixi_ has joined #ruby
Pixi_ has quit [Read error: Connection reset by peer]
<mbff> havenwood, yes I am trying to run a rb script via cron
<mbff> I am using RVM and bundler
<shevy> is there like a guide how many local variables to use for any given method? rule of thumb?
fabrice31 has joined #ruby
Xiti has joined #ruby
<mbff> I don't need to use a special ruby project just the latest version
phutchins has quit [Ping timeout: 245 seconds]
<mbff> 0 0/1 * 1/1 * ? * /usr/local/rvm/wrappers/ <script path>
<mbff> that is what is currently in crontab
<havenwood> shevy: There shall be no more than four method parameters. Thus it has been spoken.
<shevy> no I mean, inside of a method
<havenwood> mbff: so you got as far as the wrapper directory but didn't specify which wrapper or binary
<shevy> for instance I just defined this: pad_n = 80
kireevco has joined #ruby
<shevy> and I feel bad
kireevco has quit [Max SendQ exceeded]
<mbff> alright
<shevy> it is used twice in the method: .ljust(pad_n)
Xiti` has quit [Ping timeout: 256 seconds]
kireevco has joined #ruby
<havenwood> shevy: might it make a nice constant, or no not really? why is it 80? does it change?
<mbff> havenwood, I don't know what you mean
<shevy> dunno, it is a pretty long line and I wanted to have it displayed so that it matches stacked on top of the other lines
<mbff> oh sorry
MrIlyas_ has quit [Read error: Connection reset by peer]
<mbff> I didn't paste the whole thing
<mbff> /usr/local/rvm/wrappers/ruby-2.1.5/ruby
lemur has quit [Remote host closed the connection]
<havenwood> mbff: /usr/local/rvm/wrappers/ruby-2.1.5@bah-humbug-gemsets/ruby
fabrice31 has quit [Ping timeout: 256 seconds]
<mbff> do I need an @project ?
klmlfl has quit [Remote host closed the connection]
<havenwood> mbff: if you want to use a gemset
lemur has joined #ruby
<mbff> I use bundler
<havenwood> mbff: but the gemset you specify should exist
diegoviola has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<havenwood> mbff: so you want to use /usr/local/rvm/wrappers/ruby-2.1.5/ruby then? you tried that and problems?
Stichoza has joined #ruby
<mbff> the problem is it isn't working
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
<mbff> the script updates a file with the time it ran at and the time isn't changing. so no run
tristanp has joined #ruby
fgo has joined #ruby
<havenwood> mbff: what happens if you manually run the cron job?
AlexRussia has quit [Ping timeout: 256 seconds]
<mbff> an error about cannot load httparty
maletor has joined #ruby
<havenwood> so that's your problem
godd2 has joined #ruby
phutchins has joined #ruby
<mbff> but I did a bundle install
lemur has quit [Ping timeout: 258 seconds]
<mbff> also I runs fine if I remove the @global
<havenwood> mbff: if you're not using gemsets, maybe consider disabling gemsets
oleo__ is now known as oleo
fgo has quit [Ping timeout: 260 seconds]
<havenwood> echo "export rvm_ignore_gemsets_flag=1" >> ~/.rvmrc
keen________ has joined #ruby
giuseppesolinas has joined #ruby
<mbff> havenwood, ok.
keen_______ has quit [Ping timeout: 245 seconds]
<havenwood> mbff: and delete any that exist: http://rvm.io/gemsets/deleting
<havenwood> then gemsets shouldn't be a problem, since they wont exist
Lightsword has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<epitron> anyone know of a quick way to parse out the content of JS strings in ruby?
DrCode has quit [Remote host closed the connection]
<epitron> i got some html tags with onmouseover events full of JS that i wanna scrape the data out of
<epitron> it's just like, functionname('data', 'data', 'data')
<epitron> i just wanna make sure i don't mess up the quoting :)
kiyote23 has joined #ruby
arescorpio has joined #ruby
<epitron> i suppose i could use eval :D
<epitron> def functionname(*args); return args; end; eval(onmouseover_thing)
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
TDJACR_ has joined #ruby
<epitron> works like a charm!
<epitron> thanks guys!