apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: 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
axilla has quit [Ping timeout: 264 seconds]
amclain has joined #ruby
bradhe has joined #ruby
duggiefresh has quit [Ping timeout: 240 seconds]
dayepa1 has quit [Quit: dayepa1]
Guest33053 has quit [Ping timeout: 252 seconds]
RealMarc has joined #ruby
s00pcan has quit [Ping timeout: 264 seconds]
dayepa has joined #ruby
d34th4ck3r has joined #ruby
duggiefr_ has quit [Ping timeout: 240 seconds]
codeurge has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
phracker has quit [Ping timeout: 276 seconds]
toastynerd has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
phracker has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
nickgartmann has quit [Quit: Connection closed for inactivity]
andrewjanssen has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
nanoyak has joined #ruby
yfeldblum has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
banister has joined #ruby
supermarin has joined #ruby
nowthatsamatt has joined #ruby
Lutece has quit [Ping timeout: 272 seconds]
except has quit [Ping timeout: 240 seconds]
atraylen has quit [Ping timeout: 240 seconds]
imaleaf has quit [Read error: Connection reset by peer]
snath has quit [Ping timeout: 245 seconds]
<testcore> hey folks, if you're using 2.1.2 these days, what would be your go-to gem for XML parsing?
<testcore> looks like rexml hasn't been updated
<benzrf> testcore: is it ever not nokogiri?
moneydouble has joined #ruby
<testcore> well, I've run into an issue in nokogiri where it won't return an element at a valid xpath, so...
kotk has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit []
supermarin has quit [Ping timeout: 276 seconds]
oops has joined #ruby
<testcore> meh
testcore has quit [Quit: [BX] Who ate my nuggets?!]
mercwithamouth has quit [Ping timeout: 252 seconds]
marr has quit [Ping timeout: 252 seconds]
<centrx> I'm sure you can get it to work...
AlSquire has quit [Quit: This computer has gone to sleep]
kotk_ has quit [Ping timeout: 240 seconds]
ephemerian has quit [Quit: Leaving.]
oo_ has joined #ruby
<oops> this is a fun channel :P
dingus_khan has joined #ruby
aspires has joined #ruby
vlad_starkov has joined #ruby
jaake has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
oops is now known as imaleaf
<centrx> !hooray
jamto11 has joined #ruby
mr_snowf1ake has quit [Quit: Leaving]
maletor has quit [Quit: Computer has gone to sleep.]
sptx00 has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
moneydouble has quit [Quit: Leaving.]
dingus_khan has quit [Ping timeout: 258 seconds]
moritzs has joined #ruby
moneydouble has joined #ruby
zz_karupa is now known as karupa
vlad_starkov has quit [Ping timeout: 245 seconds]
ddv has quit [Ping timeout: 245 seconds]
ddv has joined #ruby
jxf has quit [Ping timeout: 276 seconds]
jenskarlsen has quit [Remote host closed the connection]
combusean has quit [Ping timeout: 240 seconds]
NukePuppy has joined #ruby
samuel02 has joined #ruby
s2013 has joined #ruby
banister_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
s2013_ has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
oo_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
zigomir has quit [Remote host closed the connection]
s2013 has quit [Ping timeout: 245 seconds]
zigomir has joined #ruby
ptierno_ has quit [Quit: leaving]
NukePuppy has quit [Ping timeout: 265 seconds]
ptierno_ has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
ptierno has quit [Quit: leaving]
ptierno_ has quit [Client Quit]
ptierno has joined #ruby
n_blownapart has joined #ruby
<shevy> say I have a file with 20.000 lines
arrubin has joined #ruby
<shevy> I want to obtain the line that starts with: "catfood:"
<shevy> what would be an efficient way to do that?
nopc0de is now known as zz_nopc0de
samuel02 has quit [Ping timeout: 258 seconds]
zigomir has quit [Ping timeout: 240 seconds]
kitak has joined #ruby
s2013_ has quit [Ping timeout: 245 seconds]
<ari-_-e> shevy: assuming the lines are of variable length and aren't sorted in any way, I don't see how you could do better than a linear search
<shevy> ok but specifically how
devdazed has joined #ruby
<ari-_-e> um
b00stfr3ak has quit [Ping timeout: 276 seconds]
<ari-_-e> readlines?
<shevy> ok that's what I am already doing :(
<n_blownapart> ari-_-e: Hey I finally figured out 'a,b = b, a + b' thanks to you ...
<ari-_-e> n_blownapart: yay
<imaleaf> shevy: just run a grep? :P
<benzrf> grenp
<shevy> hmm
<imaleaf> I don't even use ruby, but I'm assuming you can load the file into a string, and then search it using whatever pretty search function you hipsters have :)
<ari-_-e> there is a grep method, actually
* imaleaf waits for everyone to say that they used ruby before rails was cool
<shevy> imaleaf I can't run outside-tools
<n_blownapart> ari-_-e: the other code, ' a = b ; b = a + b ' has a different operator precedence, if I can say it that way
<imaleaf> shevy: I literally just told you how to do it. look up how to load a file into a string, and how to search a string
x1337807x has quit [Ping timeout: 276 seconds]
<shevy> I know how to do it
pu22l3r has quit [Remote host closed the connection]
brunops has joined #ruby
<shevy> hmm I could load until I find it
<ari-_-e> shevy: File includes Enumerable, and it enumerates lines, so you can use Enumerable#grep
andrewjanssen has joined #ruby
<ari-_-e> IO includes Enumerable, rather
<imaleaf> wow that sounds kind of cool. it's all done by objects?
hgl has joined #ruby
mercwithamouth has joined #ruby
pu22l3r has joined #ruby
<imaleaf> with php we have...a load to string function. and some object way, but it's more trouble than it's worth
sgen has joined #ruby
i_s has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
<ari-_-e> n_blownapart: hmm... I think I'd say that it has more to do with the fact that one method has one statement, whereas the other has two
<ari-_-e> so with two statements, one thing happens after the other
<shevy> php is not really a language so it is unfair to compare it to ruby
<shevy> it's more a random collection of functions
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ari-_-e> shevy: the disorganization of its standard library doesn't make it not a language
<n_blownapart> ari-_-e: ok, but a is set to 2 initially so the second statement acts as a doubler sort of method I believe. (b = 2 + 2) instead of fibonacci - type statement.
<shevy> it is not a simple disorganization, ruby's standard lib has inconsistencies just as well. it is the systematic misdesign of a whole ecosystem that plagues php
pu22l3r has quit [Remote host closed the connection]
banister has joined #ruby
rezzack has quit [Quit: Leaving.]
smathieu has quit [Remote host closed the connection]
<ari-_-e> shevy: that still doesn't make it not a language :)
brunops has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
<ari-_-e> just not a very good one
brunops has joined #ruby
axilla has joined #ruby
<shevy> is html5 combined with css3 a programming language
bakflash has quit [Ping timeout: 252 seconds]
teddyp1cker has joined #ruby
tjsousa______ has quit [Quit: Computer has gone to sleep.]
<benzrf> shevy: n
<shevy> what if css will have variables
<ari-_-e> n_blownapart: again, I'd encourage you to think about the problem separately from the fibonacci problem
meatherly has joined #ruby
<ari-_-e> n_blownapart: compare "a, b = b, a" to "a = b; b = a"
<shevy> http://www.php.net/manual/en/function.sort.php I like the new php online docu, it is better than ruby's
<lethjakman> is CSS gonna have variables?
<imaleaf> it already does...
axilla has quit [Ping timeout: 252 seconds]
<lethjakman> shevy: do you do ruby/web stuff? I find it interesting to hear you talk about web all the time...but I never see you in rails
<lethjakman> imaleaf how so?
teddyp1cker has quit [Ping timeout: 252 seconds]
<imaleaf> safari and chrome have already implemented it
<n_blownapart> ari-_-e: I don't know the difference. I thought the addition operator changed the behavior. what is the difference?
<lethjakman> neat
<shevy> lethjakman yeah, most of the time good old .cgi, unsure where to transition to next; rails forces me to do the rails way, it's hard to change habits
<imaleaf> lethjakman: meh, we already have LESS
<lethjakman> shevy: very interesting. if you come up with a cool solution lemme know :)
<lethjakman> coming from rails I rather like it...but it is a bit controlling.
<lethjakman> it's nice for teams because then everyone kinda does it the same way.
<shevy> lethjakman I am working with sinatra since a while so far
<lethjakman> I've heard it's nice
<imaleaf> I don't understand why rails doesn't just reinvent itself as a collection of libraries rather than a rigid framework
<lethjakman> quite a bit faster for a lot of ajax requests and stuff.
<imaleaf> problem solved lol
<lethjakman> imaleaf: it kinda is...
<lethjakman> most t hings are modularized into a gem
<imaleaf> lethjakman: a library can't force practices on you
nanoyak has quit [Quit: Computer has gone to sleep.]
<lethjakman> imaleaf: well the library is kinda a collection of libraries
<lethjakman> so you can take them out
<lethjakman> it's not really forced.
duggiefresh has joined #ruby
<lethjakman> it's just the way the people in the rails community expect it to work.
<imaleaf> hm. so why do people complain about it?
<imaleaf> do they just not know how to use ruby? :P
<lethjakman> ehhh depends on the person
<lethjakman> some people don't like rails code
<lethjakman> I think it's pretty clean personally.
<lethjakman> it's also opinionated
<imaleaf> ahahaha
<lethjakman> which means a lot of default changes if you wana do it another way.
<imaleaf> opinionated
<lethjakman> it's a collection of gemsf
x1337807x has joined #ruby
<lethjakman> you can change it if you really want...
x1337807x has quit [Client Quit]
<imaleaf> I just don't understand how a language is so vastly affected by a single framework
aspires has quit []
<lethjakman> web programming is very prominant now adays
<lethjakman> and rails happens to be one of the bigger frameworks.
shashank_rs has quit [Ping timeout: 252 seconds]
<lethjakman> in my opinion it did a lot for rubies fame.
<imaleaf> with php we have symfony2, which can do everything just fine, but at the same time, you can just use one block of it in a project normally, and ignore the rest without having some sort of conflict
<imaleaf> do you have namespaces?
<imaleaf> I'm trying to understand why you would have to change something to -not- use the framework
<lethjakman> of course
<ari-_-e> imaleaf: CSS variables can do a lot more than a preprocessor can - for example, you can change a variable with javascript and everything that uses that variable will be updated
<lethjakman> most people are discontent with PHP. the code is ugly, the libraries are ugly, the classes are slow.
<imaleaf> ari-_-e: that's a point, but you can also use javascript to do all that to begin with
<benzrf> js sux
<ari-_-e> imaleaf: not really...
<lethjakman> I wish it were implemented everywhere.
<imaleaf> lethjakman: the reality (talking from experience, going through -all- of it), is that most of the issues with php are the people who use it and their assumptions
lyanchih has joined #ruby
<benzrf> imaleaf: lel no
<lethjakman> I'm speaking from experience as well...
moritzs has quit [Ping timeout: 264 seconds]
<benzrf> php blows messy chunks
<benzrf> :^)
<lethjakman> it's an ugly language, and the people who write it tend to write messier code.
<imaleaf> benzrf: yes but we can wrap it all up in objects that isolate the ugliness :P
freezey has quit [Remote host closed the connection]
<lethjakman> definitely not going back.
<benzrf> imaleaf: no
<lethjakman> imaleaf: slow ugly objects?
<benzrf> youre wrong
<lethjakman> yes.
<benzrf> gross
<benzrf> ew
endash has quit [Quit: endash]
<benzrf> php objects ugh
* benzrf shudders
<imaleaf> lethjakman: moderately slow :P
duggiefresh has quit [Ping timeout: 252 seconds]
<lethjakman> ...I was a magento programmer.
<ari-_-e> n_blownapart: no, the addition isn't really relevant here
* lethjakman horrifying memories
shashank_rs has joined #ruby
deric_skibotn has joined #ruby
<ari-_-e> n_blownapart: can you explain what a, b = b, a does?
<ari-_-e> remember that that's the same as a, b = [b, a]
<imaleaf> my main concern is market share. I'm trying to really understand where ruby and php belong, given that the resources at this point and the web is moving towards js both on the server and the client
<benzrf> imaleaf: it isnt
<imaleaf> aside from maintaining existing projects
mercwithamouth has quit [Ping timeout: 258 seconds]
<benzrf> js is cruddy
<imaleaf> benzrf: yes but js owns all the bases :P
<benzrf> if it takes over the backend i will go on a rampage
Slavox is now known as Slavox|AFK
<imaleaf> nodejs? :P
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lethjakman> imaleaf: I haven't seen a TON of JS webservers. that's an ugly language too.
<shevy> js conquers the world
<imaleaf> shevy: it sure looks like it's on its way to
<n_blownapart> it's assigning b to a and a to b. so whatever the values are they are switched. or is that the other expressions?
omosoj has quit [Quit: Leaving]
<n_blownapart> ari-_-e: ^
Royalb15 has quit [Remote host closed the connection]
andrewjanssen has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Ping timeout: 240 seconds]
<imaleaf> ari-_-e: as far as the vars, I'm still not seeing the advantage to putting them in the styling language--it feels like it's crossing into the js realm
<imaleaf> maybe if they make sure their usage is -extremely- limited
tkuchiki has joined #ruby
jamto11 has quit [Remote host closed the connection]
<n_blownapart> In the second expressions, ' a = b ; b = a + b' , a is set to 2, so b uses its own value to add to itself. ari-_-e
robbyoconnor has joined #ruby
r0bby has joined #ruby
snath has joined #ruby
moritzs has joined #ruby
supermarin has joined #ruby
lyanchih has quit [Quit: lyanchih]
lyanchih_ has joined #ruby
aspires has joined #ruby
<n_blownapart> with the expression 'a, b = b, a + b', a remains 1, so b = 1 + 2, so its value is 3 instead of 4. why I don't know really. ari-_-e
binaryhat has quit [Remote host closed the connection]
<imaleaf> ps, just letting everyone know I'm not trying to start flames here, I'm genuinely interested in understanding ruby's place and why it's worth investment
binaryhat has joined #ruby
<imaleaf> php in my opinion simply exists at this point to maintain products already written in it
<ari-_-e> n_blownapart: a, b = b, a is what is known as "parallel assignment"
<wallerdev> php isnt bad for small websites
<wallerdev> really quick to get going with it
<n_blownapart> ok ari-_-e ...
<wallerdev> and really easy to deploy
<imaleaf> eh, I feel like every language is quick to get going and deploy at this point
Slavox|AFK is now known as Slavox
<agent_white> What's the main difference between readline and gets?
<n_blownapart> and the other is multiple assignment. so *where* do they differ.
<wallerdev> i dont think any language is as easy for someone new to programming to delpy as php is
<shevy> agent_white you get cursor support in one but not the other
<ari-_-e> n_blownapart: basically what happens is that it first saves the values on the right and then assigns them to the appropriate variables on the left
<agent_white> shevy: Cursor support in readline?
banister_ has joined #ruby
<shevy> yeah
banister_ has quit [Max SendQ exceeded]
<shevy> and tab completion
<imaleaf> wallerdev: python I feel beats php in that aspect by a mile, especially since the educational resources are so much more refined
<wallerdev> like someone can just get a web server from one of those shared hosts like hostgator, and upload a php file
<wallerdev> and thats it
<ari-_-e> n_blownapart: the important part is that it saves the values before doing any assignment - if it didn't do that, you would have the same problem that you have with a = b; b = a
sepp2k1 has quit [Read error: Connection reset by peer]
<n_blownapart> so ari-_-e it is a matter of precedence, since the addition is relying on a staying = 1
<wallerdev> thats the process
banister_ has joined #ruby
<ari-_-e> n_blownapart: well, once you've saved the values, it doesn't matter what a is
freezey has joined #ruby
supermarin has quit [Ping timeout: 252 seconds]
<ari-_-e> because they no longer depend on a
<imaleaf> wallerdev: eh, I suppose, but at the same time, the other languages often have a built in webserver too
freezey_ has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
<n_blownapart> ok ari-_-e thanks I think I understand it.. hopefully via the correct terms.
<imaleaf> php got that recently (though it's kind of pointless given apache practically does it by default)
lethe has joined #ruby
banister has quit [Ping timeout: 276 seconds]
<agent_white> Ahhh. I'll fix that. And yeah I just asked in #ruby and that's what I was told...
<agent_white> MT
<agent_white> ;D
OffTheRails has joined #ruby
<ari-_-e> n_blownapart: consider this: https://eval.in/155880
bogeyd6 has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
<ari-_-e> n_blownapart: that is, perhaps, a more correct longhand version of a, b = b, a
<n_blownapart> cool ! looking ari-_-e
<ari-_-e> or it at least demonstrates the behavior
<imaleaf> wallerdev: so with that out of the way, php doesn't really have any real..point
Hobogrammer_ has joined #ruby
<n_blownapart> interesting ari-_-e this is coming together many thanks.
robustus has joined #ruby
<shevy> imaleaf are you bashing php here :P
<wallerdev> imaleaf: i dont think any other language has anything as simple as php
<lambo> its crazy => gem i rails fail /// vim Gemfile; source 'http://rubygem.org\n gem 'rails'; bundle install ===> done oO
<wallerdev> like i can upload a file with one line of code named .php to basically every shared webhost and i have php executing inside a webpage
<shevy> ewwww bundle
<shevy> command: "gem install rails"
<shevy> works perfect here lambo
<imaleaf> shevy: I'm coming from the perspective of someone who works with it daily, and has gotten to a level of reasonable competence
dingus_khan has joined #ruby
<lambo> xD
freezey has quit [Ping timeout: 276 seconds]
<lambo> its crazy man
<ari-_-e> n_blownapart: the typical way of swapping values in two variables is to have a temporary variable to save the value of one of the variables being swapped
aspires has quit []
havenwood has joined #ruby
<ari-_-e> n_blownapart: or you can use fancy tricks like xor swap
<imaleaf> wallerdev: well, if it is, it's only because there's a lot of functions that do a bunch of work for you already. but when it comes to actually making something new, I would say other languages are much simpler
<imaleaf> practically entire programs, as functions, really
<wallerdev> i think you overestimate how simple other languages are
<ari-_-e> imaleaf: the distinction between html/css/javascript is a red herring
sinkensabe has quit [Ping timeout: 264 seconds]
<n_blownapart> ari-_-e: yeah I was using 'temp = a + b ; a = b ; b = temp' and that worked for the fibonacci.
<ari-_-e> imaleaf: of course the logic at one point was that HTML is content, CSS is presentation, JS is behavior
<ari-_-e> imaleaf: but that's not really true anymore
<ari-_-e> anyway
<imaleaf> wallerdev: idk, I spent a day learning how to make some things from the ground up in python, and boy was it a lot less stressful :p
centrx has joined #ruby
<wallerdev> im sure it is, but im talking about people who dont program
<imaleaf> but that was once I already understood all the concepts
<imaleaf> point.
<imaleaf> ari-_-e: yes, but do we need to make it worse? :P
havenwood has quit [Remote host closed the connection]
<ari-_-e> imaleaf: what you just said implies that there's something bad about the current situation
<wallerdev> heck if i wanted to make a simple one page app today id use node + angular, but if my dad wanted to make a one page site about his favorite car, id recommend he use php haha
<ari-_-e> imaleaf: it'd be great if people only wanted to create web pages that conformed to a specific vision of what a web page is
dingus_khan has quit [Ping timeout: 258 seconds]
<ari-_-e> but unfortunately people keep wanting to do ridiculous things like making 3d games in web pages and insane animations and shit
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> wallerdev why do you hate your dad so much
<imaleaf> ari-_-e: well to become a web developer nowadays is insane, because there's so much overlap. no clear path--you have to learn things several different ways before you could *possibly* know the best route to take in a given situation
<imaleaf> shevy: :D
<wallerdev> haha if i hated my dad id ask him to learn rails just to make a one page site with a couple images on it
<imaleaf> HAHAHA
<shevy> hahaha
<shevy> wallerdev is truly the channel clown
<ari-_-e> in that environment, not having access to full programming capabilities in any part of the system just doesn't make any sense
<shevy> goattv!
<imaleaf> ari-_-e: you lost me with that one
<ari-_-e> imaleaf: CSS isn't very programmable
* imaleaf beats centrx with a giant mallet
<imaleaf> ari-_-e: well of course not, it's just a style sheet that you can then manipulate with the scripting language
<ari-_-e> there's a set of things you can do with selectors, there are a specific set of rules, etc
duggiefresh has joined #ruby
<ari-_-e> I'm just arguing that having variables in CSS is a useful feature
<wallerdev> thats why scss exists :p
noob101 has joined #ruby
<noob101> HIIII!
<ari-_-e> and that it doesn't matter if that seems too much like putting javascript in CSS
<ari-_-e> wallerdev: read the whole discussion
<noob101> I have good news!
<imaleaf> hm. I guess it would just be nice to be able to keep things from getting too complex, and working more on practices
<noob101> Thanks to people such as shevy and centrx, they have helped me make my game better!
* centrx claps
brunops has quit [Ping timeout: 252 seconds]
<wallerdev> im eating dinner
<wallerdev> lol
<shevy> noob101 what is a global variable
<noob101> I developed a blacjack using ruby to practice my programming skills but the thing is, I have to add a new feature cause I got interviewed for a job.
<noob101> Oh um I got you shevy.
<wallerdev> cant read everything ill just chime in randomly
<wallerdev> :p
<shevy> good
<shevy> wallerdev can not type right now
<noob101> A global variable is a variable that can be accessed anywhere in your program and it makes your program immutable?
<shevy> that is the ideal situation to really type what you wanted to write about him
<noob101> I don't even know what that word means, immutable. I will use google.
<shevy> noob101 what does "it makes your program immutable" mean
<shevy> ok
<shevy> when you use words you don't understand
<shevy> it makes you look as if you are talking out of your ass
<noob101> It can't be changed,
<wallerdev> lol
<centrx> yeah, don't tread on shevy's turf like that
<shevy> the first part of the sentence was fine
momomomomo has quit [Quit: momomomomo]
<shevy> noob101 ok I see what you mean. no, that statement is wrong
<wallerdev> in erlang all variables are immutable
<noob101> But how wouldn't your program be "unchanged" by using a global variable.
<noob101> Oh ok.
<shevy> >> $foo = 5; $foo = 6; puts $foo
<eval-in__> shevy => 6 ... (https://eval.in/155884)
<noob101> To be honest, yesterday someone used the word immutable and I forgot the context.
<shevy> noob101 but here is the same question I asked you back then - why would you want to use a global variable as opposed to a local variable?
<shevy> k your brain tried to trick you
<centrx> I think you are remembering something about how global variables should only be used if the value is not going to change
<shevy> you need to give your brain better rails so it won't try to confuse you
<centrx> immutable -> non-mutate-able
<noob101> shevy, I was reading something and I saw the variable pop up that's all.
samuel02 has joined #ruby
<shevy> ya ya we are already way past that
<shevy> noob101 when do you want to use a global variable
duggiefresh has quit [Ping timeout: 265 seconds]
<noob101> shevy tell me now, what is the significance of the Global variable. Show me how it can mess up your code.
<shevy> no I dont use them, unless I must
<shevy> like ruby predefined variables
<noob101> shevy, I have no idea when to use global variable.
<shevy> $VERBOSE I think
<noob101> Oh wait I have question
<shevy> I think I do $VERBOSE = nil once just to make ruby shut up about some warnings
<shevy> ruby's warning system can really be damn noisy
<noob101> So the methods that ruby has are like global variables that have a block of code to do something on objects?
dingus_khan has joined #ruby
rafaelmagu has quit [Quit: Textual IRC Client: www.textualapp.com]
<noob101> I sound dumb as hell, I know forgive me. I am new, I am just asking for knowledge so I can learn.
<ari-_-e> noob101: you should get a book
<ari-_-e> learning a programming in a test-driven style is nonsense
<ari-_-e> the koans should die in a fire
<ari-_-e> *programming language
<noob101> Can someone give me the URL to the pick axe pdf please
<noob101> :)
<imaleaf> wow, you guys actually give lessons here?
<noob101> imaleaf: Yes they do and they're nice people. Introduce yourself.
<imaleaf> ari-_-e: how do you ever experiment? :P
samuel02 has quit [Ping timeout: 252 seconds]
<imaleaf> noob101: oh don't worry, they already know me as "that asshat from ##php"
dik_dak has quit [Quit: Leaving]
<noob101> Ahhhh ok. Gotchya.
<imaleaf> :)
zorak is now known as zorak8
zorak8 has quit [Quit: Saliendo]
<noob101> I am looking for the free version of the pick axe book on the internet, can anyone help me please. :(
zorak8 has joined #ruby
<ari-_-e> imaleaf: experimentation is important, but it can't be the only thing you do
<imaleaf> true
<ari-_-e> you can only ever have an incomplete understanding if all you do is experiment
jimbow has joined #ruby
<ari-_-e> well
<jimbow> i have a really stupid question
<ari-_-e> at least, you need to do a LOT of experimentation to get a complete understanding
<imaleaf> I misinterpreted, I thought you meant the process, of starting with little tests and developing them into software as you go
<jimbow> how does (amount) work if it hasn't been declared?
<ari-_-e> jimbow: it's an argument
<centrx> jimbow, def deposit(amount) declares it within that method
<jimbow> well please explain, i'm not really intelligent
deric_skibotn has quit [Ping timeout: 240 seconds]
Zenigor has joined #ruby
<noob101> jimbow, hey. Are you doing that exercise on LearnStreet?
<jimbow> no, on treehouse
<noob101> Ah ok, gotchya.
<noob101> I think you're doing well. Keep programming. We are on the same boat man.
<noob101> So is treehouse that good?
<Senjai> jimbow: I did treehouse
<jimbow> good to know that i'm not the only one
<Senjai> jimbow: Im in the industry now
<Senjai> I didnt just do treehouse, I had to read a lot of books after that
shedd has joined #ruby
shedd has quit [Client Quit]
<Senjai> but its a good step
shedd has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<jimbow> i have a few books including pragmatic programmer's guide
<jimbow> it's so thick that it's daunting
shedd has quit [Client Quit]
<Senjai> guide?
<jimbow> so i am resorting to videos and then i'll use that book as a reference
<jimbow> you can kill someone with that book
<noob101> ha ha.
hamakn has quit [Remote host closed the connection]
<imaleaf> the php reference is upwards of 8,000 pages in printed form... :P
wallerdev has quit [Quit: wallerdev]
<jimbow> dear god
Silent__ has joined #ruby
<imaleaf> I think it's a little over 10
<imaleaf> I read...most of it...
<imaleaf> :P
<noob101> I have a question for centrx and shevy.
<jimbow> i love reading the problem is understanding
<imaleaf> it's left me with some psychological trauma. but not too much
rm_ has joined #ruby
RaptorJesus_ has joined #ruby
<benzrf> 2mmmmmmmmmmmmmmmmmmmmmmmmm
<jimbow> my favorite quote is "What use is knowledge if there is no understanding"
<benzrf> oops
<jimbow> but i'm a complete moron so it takes me a long time to get things
<imaleaf> well you don't turn to the next page until you understand the one you are on :P
<imaleaf> so if you spend 4 hours on one page, so be it
<jimbow> but the problem is the answers sometimes lie on the following pages
<noob101> Let's just say I have a variable called cake. cake = "Hello". I want to be able to use cake in a string but when I interpolated it, I don't want the variable cake to put it's value but instead I want cake to put it's variable name which is cake. How can I do that?
segfalt_ has joined #ruby
<noob101> Example: cake = "Hello", puts "I like "#{cake}" #=> "I like cake" How is that possible?
RaptorJesus has quit [Disconnected by services]
RaptorJesus_ is now known as RaptorJesus
<OffTheRails> it isn't?
<noob101> Oh hi benzrf, I forgot about you. Thanks for helping me in general, you're a cool person too.
ziyadb__ has joined #ruby
<jimbow> well noob101 it'd be better to use #{} for input
<jimbow> so cake = gets
<noob101> jimbow I know but this is the task I want to happen.
<ari-_-e> noob101: you just write cake in the string...
<noob101> I don't want input.
Gnubie__ has joined #ruby
<noob101> ari-_-e: here's the catch
<jimbow> then you just write cake in the string without {#}
michaelchum has quit [Quit: Connection closed for inactivity]
<jimbow> #{}
oo_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
<noob101> I don't want to have cake display it's value because I really want cake to have like a number but for the moment I want the variable to display it's name in the string. How do I do that?
julian-delphiki has joined #ruby
<OffTheRails> you want to get the variable name dynamically by using the variable name...
oo_ has joined #ruby
<ari-_-e> noob101: you write cake
<ari-_-e> in the string
<noob101> I just want to use the variable's name cake for like a put's statement.
mary5030 has quit [Remote host closed the connection]
<ari-_-e> without #{}, as jimbow said
<noob101> Ok let me explain I am not explaining myself right.
<jimbow> why the fuck do people put apostrophes after every word that ends with an S >=(
bean has quit [Ping timeout: 240 seconds]
<noob101> So basically remember how I was saying I made my blackjack game?
mary5030 has joined #ruby
Dreamer3__ has joined #ruby
<noob101> Well in the game I created, I created a deck which has elements.
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<imaleaf> he's trying to do a php thing.
<imaleaf> literally :D
<centrx> PHP code is just a collection of strings
<noob101> In the deck array, there are elements such as Queen, Ace, Spades and Hearts.
<zorak8> noob101: why are you puting #{cake} between ""??
<jimbow> may i pm a more knowledgeable programmer?
nerium has quit [Quit: nerium]
jdoes has joined #ruby
<noob101> zorak8: just listen, I am really explaining what I want now and why.
lethjakman has quit [Ping timeout: 240 seconds]
<OffTheRails> explain! people are listening
<zorak8> im noob too, im curoius
<noob101> So continuing, I have these elements in my deck array such as "Queen" and "Hearts" but when I deal a card to user it doesn't have a value
<jimbow> so how does def name(stuff) work exactly?
<noob101> on top of that, I was able to put what card the user would get but it's a string.
<ari-_-e> noob101: can you paste your code?
<jimbow> to be exact
<noob101> ari-_-e: Um it's long are you sure?
<ari-_-e> noob101: not in the channel
<jimbow> how does it know what amount is if it isn't declared?
<ari-_-e> use a paste site
<imaleaf> can't he just use a dictionary, and give the key the name?
lethe has quit []
<noob101> ari-_-e: LOL, you think I am that dumb, I know.
<centrx> noob101, gist.github.com
<OffTheRails> ^^ yes, do what imaleaf just said
<noob101> centrx: Thank you sir.
<imaleaf> I mean..it just sounds simpler...
<noob101> Hi centrx.
shalicke_ has joined #ruby
<jimbow> could someone please explain -__
<jimbow> -_-
<centrx> jimbow, The def declares it
axilla has joined #ruby
<jimbow> but how though
<centrx> jimbow, All method arguments become local variables in the context of that method
<jimbow> oh
<jimbow> thank you
smathieu has joined #ruby
<jimbow> why can't they say that in the courses
<OffTheRails> because it's so basic they overlook it
<imaleaf> jimbow: sometimes you have to read the spec
<jimbow> where is the spec
<imaleaf> courses can't cover every little detail
Hobogrammer_ has quit [*.net *.split]
jaake has quit [*.net *.split]
rm__ has quit [*.net *.split]
Arkaniad has quit [*.net *.split]
ziyadb_ has quit [*.net *.split]
binaryhat has quit [*.net *.split]
shalicke has quit [*.net *.split]
segfalt has quit [*.net *.split]
lkba has quit [*.net *.split]
gregf has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
Gnubie_ has quit [*.net *.split]
enricostn has quit [*.net *.split]
Doppp has quit [*.net *.split]
Sammael has quit [*.net *.split]
<jimbow> nobody told me to read the spec
<centrx> Some Ruby courses are designed for people who have already coded in other languages
shalicke_ is now known as shalicke
<ari-_-e> there isn't one
<imaleaf> ari-_-e: ...what?
ziyadb__ is now known as ziyadb_
<OffTheRails> jimbow, nobody should have to tell you to read the spec
<jimbow> why not?
<centrx> there is no spec
<noob101> ari-_-e: This is my code, dun dun dun! https://gist.github.com/Osagiede/10562512
Zenigor has quit [Remote host closed the connection]
<ari-_-e> ruby doesn't have a formal specification
<imaleaf> don't you have a standard source of documentation?
segfalt_ is now known as segfalt
enricostn has joined #ruby
<noob101> ari-_-e: my blackjack game. It's lame but it's a start.
<centrx> jimbow, Don't read the "spec"
<imaleaf> I mean..how are you supposed to find out the little details
lw has quit [Quit: s]
agjacome has quit [Ping timeout: 240 seconds]
IceDragon has quit [Ping timeout: 258 seconds]
<jimbow> i am so confused now
lkba has joined #ruby
<lambo> why my ruby vim doesnt have the 2 spaces ident since its supposed to be the default?
Zenigor has joined #ruby
<ari-_-e> imaleaf: you try to find blog posts that aren't written in japanese
<imaleaf> jimbow: me too. I feel like I just walked into another planet
<ari-_-e> imaleaf: or read the source of the interpreter
<imaleaf> ari-_-e: seriously?
<ari-_-e> imaleaf: yes
<centrx> jimbow, Reading the Ruby documentation is very useful, but it is oriented around the base classes and their methods
<jimbow> imaleaf: i feel like i walked into a different galaxy in a different dimension
<imaleaf> how do you all function xD
jaake has joined #ruby
<centrx> jimbow, It doesn't cover syntactic things like this
<imaleaf> one second, I'm looking this up, I don't believe anyone right now :P
binaryhat has joined #ruby
<davidcelis> >> sleep 5; puts "hi"
<eval-in__> davidcelis => (https://eval.in/155893)
Arkaniad has joined #ruby
<jimbow> so centrx how do you know the little syntactic things like this?
<ari-_-e> noob101: that's not really that long :)
<ari-_-e> noob101: but continue
CodeBunny has joined #ruby
Hanmac has joined #ruby
lethe has joined #ruby
<OffTheRails> noob101, what exact block/line are you having a problem with here?
<jimbow> knowing these little details are very beneficial to developing an intuitive programmer
<centrx> jimbow, In this case that syntax is common to most normal programming languages.
<imaleaf> I hate you all :P
<jimbow> centrx: i never programmed in other "normal" programming languages
<centrx> jimbow, So tutorials and so forth fill the gap
axilla has quit [Ping timeout: 252 seconds]
gregf has joined #ruby
<ari-_-e> imaleaf: of course, there are various things floating around
<centrx> jimbow, You can think of it like a mathematical function, f(x)
<ari-_-e> imaleaf: but none are complete in themselves
sambao21 has joined #ruby
<jimbow> once i master ruby i am going to make a basic programming course for people to learn programming the "right" way
<imaleaf> these all look very comprehensive..
<noob101> ari-_-e: Oh ok, I am glad.
<noob101> OffTheRails: give me a second please.
rm_ has quit [Remote host closed the connection]
Doppp has joined #ruby
<jimbow> i will explain the basics of the language and write, in detail, about what every thing does
gmas has joined #ruby
<imaleaf> tutorials, lessons, all are good. but getting to dive into the deep stuff for a while gives one a lot more comprehension
moneydouble has quit [Quit: Leaving.]
<noob101> before I start, did you guys run my code?
hamakn has joined #ruby
<OffTheRails> jimbow, read: http://ruby-doc.com/docs/ProgrammingRuby/
<jimbow> and then how the language differs from other languages and what it has in common
<noob101> Did you guys run my game, what do you thinjk?
<noob101> think*
<ari-_-e> I haven't run it
monkegjinni has quit [Remote host closed the connection]
<ari-_-e> but I do see card_suits
<lambo> payloaded xD
<ari-_-e> with "Hearts", "Spades", etc
<ari-_-e> noob101: your question was about that, yes?
<noob101> Ok so basically, do you see in the card values that I have Queen, King, Ace etc
<jimbow> OffTheRails: i have their book
<centrx> jimbow, This might be useful for these kind of basics: https://www.ruby-lang.org/en/documentation/quickstart/
<jimbow> thank you for the link though
<ari-_-e> oh card_values, yes
<OffTheRails> jimbow, and have you read it?
<ari-_-e> I see that
<jimbow> OffTheRails: yes
<noob101> The thing is that I put some code to print out on the screen what random card the get added to the amount of cards they have
<jimbow> but i am trying to supplement the reading with videos because i am a visual learner
<noob101> and when they get like a "Queen of Hearts" it has no value
<jimbow> i can't read about something
<jimbow> i have to actually see how it's being done
<OffTheRails> jimbow, was your question before about name(argument) a joke?
<jimbow> no
<jimbow> it's sad that i'm that stupid that people think my questions are a joke
<noob101> So to make it simple. I want to have the words "Queen" but I want "Queen" to have a value of 10
<OffTheRails> one of the first things discussed is the syntax of methods and method arguments
<ari-_-e> noob101: line 291, right?
<OffTheRails> read it again
<imaleaf> jimbow: chill, breathe, one thought, step, action at a time :)
fgo has joined #ruby
<noob101> ari-_-e: Correcto!
<OffTheRails> no, you're right though, it is better to learn by doing
<OffTheRails> in programming, at least
<noob101> I was about to tell you, I am happy you noticed.
<imaleaf> OffTheRails: yeah, but to be able to inform oneself of how a language is constructed, can also be massively useful. it's a mix of both, like everything
<ari-_-e> noob101: so you do rand_card[1].to_i, but "Queen" can't be converted to an integer
kitak has quit [Remote host closed the connection]
<OffTheRails> imaleaf, agreed
<ari-_-e> that's your issue?
<noob101> ari-_-e: I ran my game in the command prompt. The game printed out what card was being added to user_cards but it user_cards never changed.
<noob101> ari-_-e: I know
<OffTheRails> just have a dictionary like dict = {"Queen": 10} -- then call dict["Queen"]
wallerdev has joined #ruby
spajus has joined #ruby
<noob101> ari-_-e: That's why I was asking how to use the variable in like a string so it can show it's letters in a puts statement but not it's value.
chipotle has joined #ruby
<OffTheRails> centrx, where was I being a dick?
<noob101> ari-_-e: Is there a method or something for that, I hope or does it have to do with formatting, I don't even know.
<ari-_-e> noob101: ok, say there was a syntax for doing that
<ari-_-e> noob101: how would you use it?
<noob101> ari-_-e: Well I don't know but I'll put it like this.
<ari-_-e> just make something up
provokeme has left #ruby ["rcirc on GNU Emacs 24.3.1"]
<noob101> ari-_-e: If I was the creator of ruby and I thought "Hmm, maybe someone may want to put the letters of the variable to the screen instead of the value, let's create a method called String#pvar" This is hypothetical I am just saying
<shevy> what for
<noob101> ari-_-e: I don't know the method, that is what I am asking, I don't know. I don't know how to go with this.
<ari-_-e> noob101: alright, and how would you use that method
<ari-_-e> ?
<ari-_-e> in this program
<centrx> OffTheRails, You're belittling people who are trying to learn by saying they should already know the things that programmers know
binaryhat has quit [Quit: Leaving]
<shevy> noob101 for formatting you can use sprintf()
<shevy> or %
<ari-_-e> noob101: let's just assume it exists for now
kitak has joined #ruby
<noob101> ari-_-e: Well if I said Queen = 10 but I dont want to show the value or use it. I guess it would be Queen.pvar #=> Queen or "Queen" not sure but you either one you get the point
<wallerdev> im home
<wallerdev> yay
<OffTheRails> centrx, no. He said he didn't read the spec because nobody told him to. I'm all for being supportive of those trying to learn
Shidash has joined #ruby
<shevy> noob101 why not p Queen
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
r0bby has quit [Read error: Connection reset by peer]
<noob101> shevy: please explain the formatting and hoe I should experiment with this in irb. Will this print my variable name and not my variable value?
<shevy> noob101 in general, you get a string representation by invoking .to_s
<noob101> hoe = how*
<shevy> no
<imaleaf> noob101: the idea of creating methods for everything internal to the programming language, is how php was formed :P
<shevy> there is no direct way you can get the name of the variable you assign
<shevy> noob101 if you need to keep the names, for whatever reason, keep them in an array
<OffTheRails> I don't understand noob101 , shouldn't this: rand_card = deck[rand(1..52)] -- return e.g. -- ["Clubs", "6"]
<ari-_-e> noob101: what you really want here is to associate "Queen" with 10
<arrubin> noob101: Have you considered creating a card class that contains attributes for these things, as well as suit?
<shevy> OffTheRails yeah but he is a noob
<noob101> shevy: Don't you think that's a good idea though?
nateberkopec has joined #ruby
<centrx> OffTheRails, Whatever your good intentions, "nobody should have to tell you to read the spec" does not come across well.
<centrx> OffTheRails, Also, where is this spec?
<shevy> noob101 why would it be a good idea? you did not give a reason why it would be
<shevy> noob101 in short, it is completely unnecessary
<noob101> OffTheRails: Don't worry about that, I was dual programming with my mentor, that was an example of what a random element can be.
<OffTheRails> centrx, we've already covered that Ruby doesn't have an official spec
smathieu has quit [Remote host closed the connection]
<OffTheRails> noob101, yeh, but the format of the return is important
<noob101> arrubin: Yeah but I am not pro programmer yet that's too confusing I am young and easily confused.
<shevy> noob101 you have already assigned a value to queen; you can output it at any time via p queen or puts queen or print queen, so I do not understand your problem
supermarin has joined #ruby
n_blownapart has quit []
smathieu has joined #ruby
<noob101> shevy: I'll explain again, you probably didn't see what I was explaining.
IceDragon has joined #ruby
<OffTheRails> noob101, instead of explaining. Tell us the exact line, and the output you are looking for
<OffTheRails> that's it
<OffTheRails> we can advise the best approach based on that
<noob101> shevy: In my blackjack game on line 291, it puts the random element that will be added to user_cards
<ari-_-e> OffTheRails: the code was already paste
<ari-_-e> pasted
<OffTheRails> if deck[n] returns format ["Queens", "10"] then deck[n][0] == "Queens"
<noob101> user_cards is a variable that consist of like a sum.
<noob101> The thing is let's say I get a "Queen of Hearts" as a random element right
robbyoconnor has quit [Ping timeout: 245 seconds]
codeurge has joined #ruby
<noob101> When I want to add that to user_cards nothing happens
<ari-_-e> noob101: what do you mean nothing happens?
robbyoconnor has joined #ruby
<noob101> line 294 adds random element to user_cards
<OffTheRails> yes
<noob101> Queens doesn't have an integer value, look in the card_values array, 1, 2, 3, 4, 5 are values
<OffTheRails> from user_cards?
<noob101> that can be added to user_cards
<ari-_-e> ah yes, and "Queen".to_i returns 0, of course
<ari-_-e> stupid
<noob101> OffTheRails: What from user_cards
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arrubin> noob101: http://ideone.com/oj09Bw
<centrx> noob101, Why do the suits have numbers associated with them?
<ari-_-e> (I'm saying that that behavior is stupid)
<OffTheRails> well rand_cards[n] still contains full card element with suit
<OffTheRails> that's the problem
<centrx> noob101, oh nevermind, cancel that remark
<noob101> ari-_-e: You understand why I was saying about the Queen displaying Queen but when it needs to add to user_cards it can use it's value which would be 10?
<OffTheRails> when you add a card to the user to build user_cards, you should be carrying around the whole card element, suit and number
<noob101> centrx: You never said hi to me >:(
<centrx> noob101, oh sorry, Hi!
smathieu has quit [Ping timeout: 252 seconds]
<centrx> noob101, I clapped for your success
supermarin has quit [Ping timeout: 276 seconds]
<shevy> hehe
<noob101> centrx: Yeah I know lol!
<lambo> anyone familiare with ruby-vim?
<noob101> centrx: Thanks Hello.
<OffTheRails> user_cards == 21
<ari-_-e> noob101: what you need to do is somehow specify the value of each card
<noob101> arrubin: Thanks for the link, I can't stop to use your code atm cause this project is due tomorrow for my possible job. I went on interview and the COO asked me to write more code for my gane
<noob101> game*
benzrf is now known as benzrf|offline
<noob101> arrubin: I will save it though, thank you sir for the contribution.
<OffTheRails> noob101, you need to change card_one and card_two = deck[rand(1..52)][1]
<noob101> benzrf|offline: bye bye
<OffTheRails> deck[rand(1..52)][1].to_i
<ari-_-e> noob101: or alternatively, you can specify the names of each the cards
<noob101> OffTheRails: Ahhhhhh, thank you.
<ari-_-e> based on their values
radic_ has quit [Ping timeout: 276 seconds]
<OffTheRails> then change your user_cards = card_one + card_two
<OffTheRails> to: card_one[1] + card_two[1]
<OffTheRails> scratch that
<noob101> OffTheRails: I did already though
<noob101> card_one and card_two are assigned to the deck array and it uses the numbers in the arrays, man this is confusing me myself I am sleeping.
<noob101> I just want to get some shit done man, I have tomorrow to give the COO of Adcade this.
<noob101> He looks forward to seeing my game.
<ari-_-e> noob101: are you aware of Hash?
<OffTheRails> well good luck. we we're almost there
<noob101> ari-_-e: Yes
radic has joined #ruby
<ari-_-e> noob101: do you think that might be useful?
<noob101> ari-_-e: You know what new idea.
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<noob101> ari-_-e: Well not a new idea but can we think of a different and easier approach.
jxf has joined #ruby
<OffTheRails> every card you pass around should have complete details, suit and number
<OffTheRails> if that were the case, you wouldn't have a problem
<noob101> How can I display the words Queen on line 291 but use it's value 10 on line 294 any ideas?
<arrubin> noob101: Also note that decks of cards do not have both an Ace and a 1 card.
<noob101> OffTheRails: It has details, you have to access them I guess.
<OffTheRails> rand_card[0] returns "Queens"
<ari-_-e> noob101: can you think of any uses of Hash?
Bira has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<ari-_-e> in this problem?
<noob101> ari-_-e: nope sorry
<ari-_-e> noob101: can you explain to me what Hashes are for?
<OffTheRails> noob101, on line 291 you are outputting values of a random card
<noob101> ari-_-e: not sure but I know hashes are a database type right or am I wrong
<OffTheRails> noob101, are you saying you now want to output the values of user_cards?
<noob101> OffTheRails: correct
davividal has quit [Quit: Ex-Chat]
<ari-_-e> noob101: uh, sort of? not really
<noob101> OffTheRails: that would be line 298
<noob101> user_cards
<OffTheRails> ahh yes. so Queen is just an example of output on 291?
<OffTheRails> if so, use rand_card[0]
<OffTheRails> which you are already using to output the suit
<ari-_-e> noob101: the reason I was asking you how you would use your method which returns the name of the variable is that you don't actually have any variables called Queen, etc
Avahey_ has joined #ruby
<ari-_-e> you just have them in strings
phao has joined #ruby
moneydouble has joined #ruby
<noob101> ok ok I think I know what to do, I hated to do this option but none of this is helping me tbh it's so confusing since I have 4 people telling me what to do.
<noob101> Not that it's bad but I want to do this fast.
<noob101> So this is what I decided to do.
<noob101> I will use make a variable and I will do something like this
<OffTheRails> what's the rush?
<phao> Hi. I don't mean to start a war in here. But what do you guys think of this http://www.indeed.com/jobtrends?q=ruby%2C+ruby+on+rails&l=
<OffTheRails> rush later when you have work to do
<OffTheRails> this is one of the few pleasures of learning to program. Take your time
<noob101> I went on interview last friday, the compant was Adcade in Ny
<OffTheRails> ruby != ruby on rails
<noob101> I spoke to COO and he gave me an assignment and he told me to report to him this week, he's expecting. He wants me to add new feature to my game.
rm_ has joined #ruby
<noob101> BTW, I am 16. I want to get the job so yeah.
<OffTheRails> and I'd like some insight into that graph
<centrx> phao, Hard to say. It's a percentage of all job postings, so maybe the absolute number increased
<noob101> It will be a summer internship so yeah.
<noob101> Continuing, this is what I will do.
<centrx> phao, Or an observer bias related to indeed.com
<phao> centrx, very good point.
<OffTheRails> noob101, show us update of your code that works please
<OffTheRails> the less than ideal solution you came up with...
<OffTheRails> then maybe I can see exactly what you're hoping for and explain better
<noob101> I will do something like
<noob101> if deck[rand(1..52)][1] == "Queen"
<phao> But then I don't know if this is how much it increased in relation to itself or something other than that...
<noob101> user_cards + 10
dapz has joined #ruby
<ari-_-e> noob101: queen is 12
<noob101> well user_cards += 10
<phao> noob101, you're 16 and you're trying to get a job with programming?
<centrx> phao, That's growth, and probably relative too. Look at Java: http://www.indeed.com/jobtrends?q=java&l=&relative=1
<noob101> ari-_-e: Queen in 21 is 10 lol, what you talking about?
<OffTheRails> that Java graph is dire
<centrx> phao, It's "percentage growth" is crashing but you think you can't find job postings for Java?
<OffTheRails> I'm depressed and I don't even work in Java
<OffTheRails> exactly
<noob101> phao: yes I want experience bad. I am in a special program called PENCIL Fellows and they put me on the interview
<centrx> phao, It's interesting, but it doesn't have much broader implication/scientific accuracy
<ari-_-e> ok, continue
<noob101> There goal is to employ teens in interest of field.
<noob101> Career and college readiness
<phao> noob101, I see. I got into CS to get a degree because I thought it'd make getting a job easier. I still think so, but didn't finish the course to be able to tell.
<phao> centrx, I see.
<OffTheRails> noob101, good luck! Plenty of time yet
<OffTheRails> You'll be thankful you started programming at 16 when you're 25
<noob101> phao: wait huh, you didn't finish the CS curriculum???
<phao> OffTheRails, those are my numbers.
<phao> noob101, I'm still in the university. I should get my degree in 1,5yrs.
<noob101> OffTheRails: HAHAHA, thanks. I know!
<noob101> phao: Oh ok, good for you. Graduate school right?
<phao> Nops. I got into univ with 21.
Zenigor has quit [Remote host closed the connection]
<noob101> What's the difference between college and university?
<phao> I didn't want to get into one. One of the things you'll probably find out by the time in a little while is that most of college isn't worth it.
<phao> I use the two as if they were the same.
<phao> I don't know the difference.
Sammael has joined #ruby
<phao> My institution is a university, for what matters.
<OffTheRails> noob101, ... on your code
<centrx> phao, It is well-known that Rails is no longer the "hot new thing" (current fad). Node.js will decline too (the indeed.com graph would imply it already is)
<ari-_-e> in the US, it's whatever the institution calls itself
<OffTheRails> noob101, do you want to user_cards += 10 if rand_card is a queen?
<noob101> phao: someone told me that college isn't worth it either prior to like programming. Someone told me to do projects and show like companies to get hired and it's possible to get hired without CS degree. Idk, I am skeptical but they encourage younglings to go to college.
<phao> noob101, That is, when I say college, read university.
WishBoy has joined #ruby
samuel02 has joined #ruby
<noob101> OffTheRails: Yes
<phao> Well, you can surely get hired without a diploma, but it's harder.
<OffTheRails> noob101, though that is true, a good background in computer science or related area will help
<noob101> phao: You have to impress the pants off the Google recruiters right?
<phao> Way harder. But you can try, and lots of people do have a job without a diploma.
<phao> Hehehe, in the case of google, you have to do that even though you have the best diploma.
<OffTheRails> don't forget we live in the age of the internet. You can find a remote position quite easily if you're talented
<phao> OffTheRails, how would that work?
<OffTheRails> phao, lot's of remote teams exist
<centrx> The purpose of college for most people nowadays is to serve as a class indicator, and a substitute for employers having an accurate hiring process.
<OffTheRails> hell, from what I remember, Basecamp (guys who created Ruby on Rails) work remotely
<phao> noob101, the worse of college is that professors don't know much about what you want to learn, which is programming.
<phao> And even about CS-only topics, they lack a lot generally (in here).
<phao> OffTheRails, Honestly, if I was confident I could get a job without a degree, I'd drop the course right now.
<phao> centrx, I see.
<OffTheRails> noob101, change this: user_cards = user_cards + rand_card[1].to_i
sambao21 has quit [Quit: Computer has gone to sleep.]
<phao> centrx, I don't know much of the "new cool stuff" like python, ruby and node.js
<OffTheRails> noob101, to this: user_cards += 10 if rand_card[0] == "Queens"
<phao> The "real-world" languages I know are pretty much C++, java and php.
supermarin has joined #ruby
samuel02 has quit [Ping timeout: 240 seconds]
kevinykc_ has quit [Read error: Connection reset by peer]
<OffTheRails> but if this is to be applied dynamically, I'll need further details
<phao> noob101, btw, if you want to get good at programming, try going through SICP (assuming you haven't) =D
<OffTheRails> phao, don't every drop a course mid-term. That's pointless
<imaleaf> noob101: it sounds like a fantastic opportunity, but there is a real advantage to taking (investing) your time into learning this skill thoroughly--because that's what'll make you the whiz kid; really knowing your tools and how to apply them. so even if it means missing one job opportunity to fully understand how to do things, you will be paid back many times over for your investment
<imaleaf> OffTheRails: you mean like I did? :P
<phao> OffTheRails, you mean "ever", right?
kevinykchan has joined #ruby
<OffTheRails> imaleaf, phao ok ok that was a stupid statement
<OffTheRails> my brother is contemplating the same thing
<imaleaf> OffTheRails: college is 90% bullshit
<OffTheRails> but he's 3 months off
<imaleaf> just like highschool
<phao> imaleaf, you're being too generous.
<noob101> OffTheRails: rand_card[1] would be an element in the deck I think
<imaleaf> phao: :D
<OffTheRails> no rand_card == ["Queens", "10"]
<imaleaf> if I had caught on earlier, I would have simply taught myself everything off online docs like I now have, but when I was a kid
<imaleaf> and I'd have a very comfortable life by now :P
teddyp1cker has joined #ruby
<noob101> OffTheRails: Isn't that an element in the deck?
<OffTheRails> I never went college or university
oo_ has quit [Remote host closed the connection]
<noob101> phao: Sorry, I want to converse with you. You said professors don't know about programming? Tell me more please.
<noob101> OffTheRails: Do you have good job?
<OffTheRails> I think lack of background in CS has impeded my ability somewhat
<imaleaf> noob101: careful, realize that we're grumpy
nateberkopec has quit [Quit: Leaving...]
<phao> There isn't much to tell. There are very few professors who are programmers, and even less who are good at it.
<OffTheRails> I do contract work remotely. I will never have a JOB
<noob101> No one every acted grumpy to me, maybe cause I am still a noob.
<imaleaf> every situation, class, professor is different. take advantage of what you find yourself in, but remember to question its effectiveness
mattmcclure has quit [Quit: Connection closed for inactivity]
<imaleaf> not to you, I mean about the topic
<phao> OffTheRails, care to explain me how that works? Sounds like a dream kind of "job"
<centrx> noob101, Computer science theory is different from practical programming
<imaleaf> so we will say college is shit, when that's not totally true
<imaleaf> just mostly :P
oo_ has joined #ruby
<noob101> phao, when you're in the college classroom learning programming, they just teach what they know and they're aren't creative like how does it go?
<centrx> noob101, Many professors have never had a real job outside academia and internships
<phao> noob101, most classes aren't even about programming.
<phao> in a computer science course.
<OffTheRails> phao, it works by freelancing. Read up on it. It's a great way to work if you're determined and self-disciplined
<OffTheRails> I am not
<phao> The ones which are don't leave the basics.
<noob101> phao: Do they be like "Ok class, this is a String. *writes string* hello = "Hi", strings are a data type" does it go like that in college? Is it engaging?
<noob101> phao: What are they about?
<imaleaf> phao: OffTheRails is correct. if one learns self-discipline, the entire world is theirs.
<noob101> centrx: What are computer science theory?
<OffTheRails> well, I'm determined. But.. it's difficult to stay on point when you don't have a boss
<phao> THey teach strings, but then, if they didn't, I'd have left already =D
SCommette has joined #ruby
<noob101> OffTheRails: Are you a freelancer or do you work for yourself?
<phao> I pay attention, but most people either sleep or play on their android phones.
Zenigor has joined #ruby
<OffTheRails> a book I'd highly recommend for that is Brian Tracy's No Excuses: Power of Self-Discipline
<noob101> phao: In college they teach very well right? It's not like high school where the material is garbage or not as engaging or interesting?
Zenigor has quit [Remote host closed the connection]
<OffTheRails> noob101, I'm a freelancer, which means I work for myself
<centrx> noob101, Depends on the college/department and the high school
<noob101> OffTheRails: What do you do, do you make ads or something
<phao> noob101, depends on the college. Some of the professors are good at teaching, but some aren't.
<OffTheRails> noob101, I work with Ruby every day :)
pierre1_ has quit [Ping timeout: 245 seconds]
<OffTheRails> and soon Go, or whatever language I want.. because when you work for yourself, you get to choose your technology
<phao> noob101, there are books teaching you generals and superficials of computer science.
<noob101> phao: Do you get refund if the class they teach is piece of shit? You pay for that class right?
<imaleaf> noob101: ruby is a high-level language, much of it based on -getting stuff done-. and tutorials will focus on that. but understanding the why and the how, is what leads you to creating -better- solutions. it's like learning history--you make better choices. and no, it depends on the teacher. you have to learn to rely on yourself in this world, and take advantage of whatever opportunity you see. if the teacher is good, great--get
<OffTheRails> that's the most important benefit
<imaleaf> everything you can from them. and no, no refunds ;p
<imaleaf> ps that was my explanation on computer science
<phao> noob101, You don't get refund. I don't pay for classes. In Brazil, best universities tend to be free.
<centrx> noob101, Some colleges value teaching. Big universities often assign you to a giant anonymous lecture hall and the most useful teaching is actually done by teaching assistants (TAs)
<noob101> imaleaf: So what is computer science really about? I thought it was just programming. To be honest, I want to be a computer engineer because I want to learn hardware and software.
<noob101> In other words, I want to learn everything about the computer.
<OffTheRails> noob101, that's a major quest
<centrx> noob101, "data structures and algorithms" is a good topic to learn for theory
<OffTheRails> noob101, but I'm sure will be very rewarding
<imaleaf> noob101: all I can really say is, practical programming is putting pieces together. computer science is making the pieces.
<centrx> noob101, e.g. Ruby's Hash is an implementation of a data structure called a hash table.
<noob101> Wait hold on, is computer engineer hard? :(
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imaleaf> noob101: nothing is hard, it's just work
<phao> s.noob101, there are these things called computational problems.
<phao> Computer science is about studying these things and related stuff.
<noob101> phao: OOoh cool, "computational problems"
<centrx> P-NP, Big-O performance analysis
<OffTheRails> noob101, depends on level of intelligence, but yes computer science, engineering, software.. IS hard
moritzs has quit [Ping timeout: 240 seconds]
<imaleaf> anyway, the end idea is ---you're 16, that's freaking awesome. play your cards right, and you won't even need to rely on college, or anything. you have your skill, you are worth money
<OffTheRails> but the difficultly entirely depends on the level you are working
marcdel has joined #ruby
<noob101> OffTheRails: :( I am a very determine person if I have the right tools. I suck in math by the way
<imaleaf> ..so learn math :P
<noob101> But I go for tutoring all the time in school
<imaleaf> eh, I think tutoring just is a way for one to rely on others
<imaleaf> I mean, good in short bursts, like this channel
<OffTheRails> I suck at math and I've been programming professionally for 4 years
<phao> Programming is about part of realizing a software. Part of programming involving implementing solutions to computation problems your software has to solve.
<imaleaf> but learning how to approach problems, and solve them yourself...very good
bmurt has joined #ruby
chipotle has quit [Quit: cya]
<noob101> data structures and algorithms. I know that algorithms are like instructions right?
dapz has joined #ruby
<OffTheRails> yeh
<OffTheRails> but what is your end goal noob101
<phao> So in computer science you'll study about computational solutions to several problems. You'll study several problems which are computable. I mean, you'll study both the solutions and the problems. There are problems which aren't computable. There are problems which are computable, but hard to compute.
<phao> There are some problems which are "general enough" that you will learn about them and their solutions. Some others, not so much.
<noob101> OffTheRails: I want to be computer engineer cause I want to learn everything about computer and web. I want to learn from using command prompt to learning about the web like ports and stuff and IP's and etc
<OffTheRails> what for?
marcdel_ has joined #ruby
<OffTheRails> to be hired?
<phao> For example, you'll learn about sorting, searching, some stuff about optimization (math optimization. not program performance optimization), etc.
<OffTheRails> to be team leader?
<OffTheRails> to build websites, build games, build...?
<OffTheRails> what do you want to create with all these skills?
<phao> You'll learn about what makes a problem computable or not. How do you prove those things.
<noob101> OffTheRails: Not sure but I see myself as maybe fixing computers, programming them, looking in them fixing stuff and like being able to know what I am looking at.
<phao> You'll learn about practical aspects of using computer science in practice, which them will involve programming, software engineering, etc.
<OffTheRails> fixing computers == crap
<noob101> I know no hardware, I don't know the cpu an stuff.
<imaleaf> noob101: I agree with OffTheRails -- rather than focusing on 'learning everything', choose something you -want to do-, and move toward that
<imaleaf> you'll pick the rest up along the way
<OffTheRails> software == god
<OffTheRails> good, too
<imaleaf> and as a bonus, you end up getting very good at something specific, which makes you worth money
marcdel has quit [Ping timeout: 252 seconds]
<imaleaf> and if you have money, education is easier to continue
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
<noob101> phao: that's interesting. Do you guys use programming to solve the computation problems?
<OffTheRails> if you want to challenge you knowledge of computers, from system, to database, browser, network... focus on "full stack web development"
<OffTheRails> that will have you touching every level
except has joined #ruby
<noob101> OffTheRails: oooo ok.
axilla has joined #ruby
agent_wh1te has quit [Read error: Connection reset by peer]
<pontiki> LEARN ALL THE THINGS
<OffTheRails> which is what I do, and I find it fascinating and constantly evolving. Plenty to learn, plenty of opportunities.
<pontiki> but you don't have to do it all at once
<jdoes> Hey guys, I used SelectorGadget to narrow down what I want and scraped and accessed the element with Nokogiri. Now I want to get inside the <> to a value: <blah blah alt="Yes"> How do I get to that Yes?
<phao> noob101, sure, but don't think it's something special.
<OffTheRails> noob101, but on this journey, it is so very important that you are excited about programming
<imaleaf> yeah. focus is as important as discipline when it comes to success
<phao> noob101, a computational problem is just a problem which can be solved through computation.
<phao> It simply means a problem which you can put some kind of computer to solve.
<noob101> OffTheRails: tbh, I find programming hard sometimes, tedious, hard and boring but I do want to learn it.
<OffTheRails> noob101, it is usually tedious in the beginning
<pontiki> jdoes: if you have the element, the attributes are available in [attrname], so blah['alt']
<phao> noob101, as an example, take a string and see if it's a valid email, given a valid e-mail needs some symbols, followed by an @, followed by some symbols.
<OffTheRails> noob101, but if you don't find it fun, if you've not had any fun programming so far... that's not a great sign
<noob101> phao: Explain this computation, what does the computation mean? is it numbers or something, calculus?
<OffTheRails> noob101, I can imagine programming being torturous to somebody who finds it boring
<noob101> OffTheRails: I have had fun with programming but I am just saying, it can be hard sometimes but I want to learn and it's interesting.
<noob101> Maybe cause I am new, who knows.
<phao> Understanding computation isn't about calculus.
<phao> Defining computation turns out to be somewhat difficult. But it's the same as evaluation, or calculation. However, done in a mechanical way.
<phao> That is, done in a way that a machine could do it.
<noob101> phao: Ah ok, I understand better now. Emails, interesting. That's cool.
<phao> automatically*
<pontiki> processing of algorithms
dingus_khan has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: zzz]
<noob101> In computer engineer, I have a lot of math ahead of me rigth?
<noob101> rght*
<phao> Depends.
<noob101> right*, sorry I am typing in dark it's my bedtime
<phao> The CS course will surely requires it.
<jdoes> pontiki: i think i explained it in a way that made your response confusing to me. here's the gist of what i'm working with https://gist.github.com/josomo/d39114304baeefd5416e
pierre1_ has joined #ruby
thesheff17 has joined #ruby
axilla has quit [Ping timeout: 276 seconds]
jdoes is now known as omosoj
<imaleaf> noob101: meh, only some types of programming require math
<phao> noob101, But you can see computation as this automatically finding out answers to computable problems. ANd computable problems are problems you can solve through computations =D
<phao> So you see, it's somewhat of a circular thing.
agent_white has joined #ruby
<imaleaf> if you're doing intense graphical stuff or modeling, making complex algorithms
<OffTheRails> web development rarely involves anything beyond basic math
<imaleaf> most of programming is just putting the pieces together
Spami has quit [Quit: This computer has gone to sleep]
<phao> noob101, the point is... this is somewhat well tied up to programming, but (I don't mean to be arrogant here) it seems you can't see it.
<imaleaf> the tedium is in learning all the different pieces and how to best arrange them
<phao> This is just a taste of how theoretical CS can be.
rm_ has quit [Remote host closed the connection]
<noob101> phao: Right
IceDragon has quit [Ping timeout: 264 seconds]
agent_white has quit [Read error: Connection reset by peer]
<phao> When you process a web page, you solve a bunch of computational problems. Like checking if input fields are valid. Finding data on a database, ... and there are many more.
<imaleaf> well, this was a crazy tangent :P
braincrash has quit [Quit: bye bye]
<noob101> I pray that I do well in college because I want to succeed in life. To be honest, I have a bad life but I am trying to get out the hole and lose this dam stigma.
<phao> Lots of the computation something else (like ruby or your DBMS) will be doing for you. Some, you'll have to code yourself.
<imaleaf> meh, focus on just refining your skill, no matter where you -happen- to be working on it
<OffTheRails> noob101, you are on your way
<OffTheRails> noob101, believe me, all this takes is determination
<imaleaf> college is just another resource
<imaleaf> it's not the end all, be all of anything
<OffTheRails> noob101, you don't even need self-belief
<imaleaf> yeah. anger works too :P
<OffTheRails> noob101, keep programming, keep reading, keep learning, you WILL get better, and you WILL generate value
<imaleaf> that's how I got through the php reference :D
<imaleaf> pure anger
<noob101> OffTheRails: So it's not a matter of difficulty cause in college you can always get help right? it's just a matter of not giving up on the work that needs to be done?
<OffTheRails> noob101, you find better help online
<imaleaf> yes :D
<OffTheRails> noob101, stackoverflow, for e.g.
lethjakman has joined #ruby
<OffTheRails> noob101, hell, this channel!
<phao> noob101, if you stick to programming from now on
<noob101> I like this channel, people here are very nice unlike other channels.
<imaleaf> I'm not +m am I? :p
<phao> It's hard to conceive you'll find college difficult.
<OffTheRails> noob101, careful, don't become an elitist
<OffTheRails> lol
<OffTheRails> Ruby is just one language
<omosoj> pontiki, whoa. figured it out. just needed to do item['alt']
<phao> noob101, have you ever been in ##C? =D
<jimbow> what is the difference between @ and @@?
<phao> Nicest channel in this network.
<imaleaf> testing testing, hello? :P
<noob101> This is my first language kind of and the only language I use and no phao.
<phao> imaleaf, I can read you
<imaleaf> phao: k :P
<phao> noob101, =D don't go in there.
Beoran_ has joined #ruby
agent_white has joined #ruby
<noob101> I got to go to bed, :(. I don't want to feels sluggish in the morning and ok phao.
<noob101> Before I go, I want to tell you guys something.
<phao> ##c people are very hostile, glenfe can vouch for it (I think).
braincrash has joined #ruby
<OffTheRails> noob101, get the hankies!
chrisseaton has quit []
<noob101> So the thing is, I am 16 and I live in New York, Staten Island
<OffTheRails> great islan
<noob101> I want to succeed cause tbh atm, I am in foster care and yeah My life is bad.
<phao> I wish I lived somewhat in there.
<noob101> Been in foster care for 7+ years now and no one helps me really
<OffTheRails> my brother has been in foster care for last 10 years
<OffTheRails> no joke
<imaleaf> wait let him finish :)
<OffTheRails> I actually thought you were him before lol
<OffTheRails> go on
<OffTheRails> sorry
<noob101> I do ok in school, I got 3.0 and I received 87 on lst report card but I did bad freshman year
<noob101> No it's ok
wallerdev has quit [Quit: wallerdev]
<lambo> the hard part is when you get enough to read other ppl code but cant do your own
IceDragon has joined #ruby
<noob101> but I found technology and I like it's interesting. I am always on computer.
<jimbow> how did you get a computer if you can't afford one?
<OffTheRails> he in foster care
<jimbow> so?
<OffTheRails> probably from authorities
<noob101> just to let you know, I am african-american. I have an african background since my dad was nigerian and I'm based on the culture.
<jimbow> oh...
<phao> trolls, I see trolls!!!!
<noob101> but like I ask questions about college cause I am nervous
Beoran has quit [Ping timeout: 252 seconds]
<noob101> Like I am more focus on school then college stuff and I am a junior in high school
<jimbow> 16 i was a senior in high school
<noob101> I registered for SAT but like I don't go to classes or study really but I want to get into city tech
<Nilium> 16 I was in community college. Age isn't a good measure of anything.
jamto11 has joined #ruby
<OffTheRails> let the boy finish my god
<OffTheRails> oh, are you finished noob101 ?
<OffTheRails> haha
<noob101> Like tbh I am going through a lot, I am about to move to a different home again but when I go to different places I don't stop doing school work.
<noob101> Yes.
<noob101> Basically, I hope to be computer engineer and learn how to be independent.
<OffTheRails> noob101, truth is, you can make your way in this world without a pair of legs
<jimbow> OffTheRails: i'd appreciate it if you wouldn't refer to negroids as boys... that's offensive
<OffTheRails> all you need is an internet connection
<noob101> So yeah that's all so thank you guys for being nice to me.
rm_ has joined #ruby
<noob101> centrx, shevy, OffTheRails, thanks guys.
<OffTheRails> noob101, no problem! Keep learning
<omosoj> noob101, gluck :) i'm a noob but i can help in whatever way i can
<imaleaf> noob101: focus, discipline. all you need to get where you want :)
<noob101> I hope I make it especially since I am black. I don't know.
<noob101> I will try though, yeah.
<phao> noob101, read this, http://norvig.com/21-days.html
<jimbow> coercion works well too imaleaf
<phao> fully.
speakingcode has joined #ruby
<imaleaf> doesn't matter what else happens. bad college class or not. skill talks
<OffTheRails> you are any color you choose on the internet
<phao> There is something in there about college education and programming, etc.
<imaleaf> jimbow: that's an advanced technique, for another room :P
<OffTheRails> as I say... no legs? Doesn't matter. You can achieve most anything with a laptop nowadays
<jimbow> lel
rm_ has quit [Remote host closed the connection]
<noob101> phao, thanks I will read.
<pontiki> noob101: i imagine you've already encountered a fair bit of negativity
fgo has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 255 seconds]
<noob101> but I hope I get a full ride because my parents don't take care of me which is why im in foster care.
<noob101> Plus im poor so yeah.
<imaleaf> noob101: I guess the other thing, is that, just know you can, and no one in here has any doubt that you can
<noob101> Oh hi pontiki, I remember you and yes I have.
<OffTheRails> noob101, forget everybody who doesn't support you. Make friends of those who do
<OffTheRails> that's all you need
<pontiki> noob101: there is no possible way i can understand that, but i will say i hope you can see what you want and keep going
<jimbow> noob101: you can make a lot of fast cash... i'll pm you the details because i don't want to get banned
jamto11 has quit [Ping timeout: 245 seconds]
<omosoj> OffTheRails +1
<imaleaf> jimbow: stop it :D
<noob101> jimbow: Oh wow, thanks.
<OffTheRails> jimbow, what is this about fast cash?
agent_white has joined #ruby
<noob101> Thanks guys for the support, I appreciate it. I may not see your faces but I appreciate the advice.
g0bl1n has quit [Ping timeout: 252 seconds]
<OffTheRails> noob101, glad to help. go get some sleep!
<lambo> i need cash too xD
<noob101> OffTheRails: You caught me you're right.
<imaleaf> I'd love cash :D
Fire-Dragon-DoL has quit [Quit: Leaving.]
<OffTheRails> haha
<OffTheRails> look, who is handing out cash and how do I get in touch with them?
<phao> noob101, I don't usually am in this channel, so probably you won't see mine =D
<noob101> jimbow: pm me I will leave the laptop on and thank you.
<noob101> phao: Please stay, I like you. You're very nice to me.
<shevy> oh man
<imaleaf> noob101: jimbow is just trolling
<shevy> love stories on #ruby
<phao> "I don't usually am" hurted me.
<imaleaf> hahahaha
speakingcode has quit [Ping timeout: 252 seconds]
<phao> shevy, so you see.
<OffTheRails> hahaha go to bed noob101 before this gets weird(er)
<phao> It sounds specially weird comming from ##c.
<shevy> noob101 what did you learn toda
<shevy> *today
<OffTheRails> toda: dialect of Yoda
<shevy> hehe
<shevy> is right you is OffTheRails
<OffTheRails> haha
<OffTheRails> Yoda isn't actually a dialect so it doesn't make any sense
speakingcode has joined #ruby
sinkensabe has joined #ruby
<phao> OffTheRails, PM?
<noob101> shevy: I learn that I shouldn't use Global variables in programs.
<shevy> disagree do I not OffTheRails
<noob101> shevy: College isn't hard, I just need determination and it's a lot of work.
<shevy> it takes effort to become rich
<shevy> or luck
<OffTheRails> phao, unless it's about all the money you're wiring to my bank, I'm afraid not :(
<noob101> shevy: Computer Science has to do with computation problems such as analyzing like an email name or something.
<shevy> awesome
<OffTheRails> I'm pretty tired/hungry so might disappear any moment
rm_ has joined #ruby
<centrx> noob101, Also learn regular expressions
<imaleaf> what, is there like an irc channel just for cash dispensal?
<imaleaf> centrx: hahahaha!!!!!
<centrx> imaleaf, Yes, it's called #dogecoin
<phao> noob101, is english your native language?
<imaleaf> centrx: regular expressions are fun :P
<noob101> phao: Yup, I am african-american. I was born here.
<phao> OffTheRails, how can I find more about this freelancing thing?
<OffTheRails> I find regex quite fun at times
<noob101> phao: Why you ask?
<OffTheRails> makes me feel like a ninja
<phao> noob101, nothing, really.
<noob101> phao: No problem, ok.
<noob101> centrx: Sure, I will. Thanks
<noob101> Ok I will go to bed now but one more request if possible.
<OffTheRails> phao, search in google "web development freelancing getting started"
<shevy> noob101 as with any other skill, practice, practice, practice. and then, practice more
St_Marx has quit [Write error: Connection reset by peer]
RaptorJesus has quit [Remote host closed the connection]
sptx00 has quit [Remote host closed the connection]
<noob101> Can someone pretty pretty pretty pretty please with a shiny sparkling clean cherry on top find me an URL to the pick axe book for free please? :(
end_guy has quit [Write error: Connection reset by peer]
tacos1de has quit [Write error: Connection reset by peer]
<phao> ok
<imaleaf> noob101: best be learning how to steal digital media now :P
<phao> pick axe book?
<OffTheRails> my advice: create an account on Elance or oDesk to get started. Work for peanuts and experience, build a portfolio, then start building a network of clients by marketing yourself (big topic)
sinkensabe has quit [Ping timeout: 252 seconds]
<pontiki> it's actually called "Programming Ruby"
<noob101> phao: Yes. I will give you link to the book
<centrx> noob101, http://ruby-doc.com/docs/ProgrammingRuby/ has the first edition. It's a bit old, but it is an excellent resource
<noob101> Yes like pontiki said
<phao> I see.
dingus_khan has joined #ruby
<shevy> OffTheRails did you work at elance or odesk?
<noob101> centrx: Eh good enough I guess, thanks :(
<OffTheRails> noob101, pick axe book is online for free
<OffTheRails> is that the pick axe book? I think so
<omosoj> to move select array elements to another array, is there a quicker way than b<<a[0]<<a[4]<<a[11]?
fatur has joined #ruby
<centrx> OffTheRails, Yes, but it is an old version, the first edition of the book (Ruby 1.6). Not that much has changed though.
<OffTheRails> shevy, yes, I still do source some work from Elance, but I only pay attention to the highest budgeted projects
<OffTheRails> 1.6! that's a bummer
<centrx> noob101, Take a look at the release notes for Ruby 1.9, that is where most/all of the backwards-incompatible changes occurred
<noob101> centrx: I want the book though.
<centrx> noob101, (this is useful anyway because you will find a lot of docs online for Ruby 1.8 since it was the release version for 5 years
<noob101> That's the book I want
<noob101> I use ruby 1.9.2 I think
<OffTheRails> noob101, nobody is going to advocate stealing that book, so don't even ask
fatur has left #ruby [#ruby]
<noob101> Ok I have to go but pm me if you have any details and yeah thanks for helping me.
<OffTheRails> type these questions into google instead. he doesn't care
<imaleaf> OffTheRails: you sure about that?
<imaleaf> I'd advocate it plenty :)
<noob101> Good night guys.
<centrx> Good night
<OffTheRails> see ya
<OffTheRails> imaleaf, not entirely, no
lw has joined #ruby
<imaleaf> :p
<imaleaf> I think that things should always be paid for
<pontiki> wash. is that you?
<imaleaf> but if one is in a situation where they cannot, and need to advance themselves, temporarily borrowing it isn't such a bad thing
<imaleaf> why is phao messaging me
<OffTheRails> problem is you then put it back and don't have to pay for it
<imaleaf> :p
<imaleaf> OffTheRails: if one has any sense of integrity and gratitude for what it gave them, they would
<phao> imaleaf, I prefer PM's
<imaleaf> meh :p
einarj has quit [Ping timeout: 252 seconds]
musl has quit [Quit: WeeChat 0.4.3]
musl has joined #ruby
noop has joined #ruby
St_Marx has joined #ruby
phao has left #ruby ["Leaving"]
tacos1de has joined #ruby
<RubyPanther> PM is a capital offense in at least 17 countries.
<imaleaf> pretty much :)
dingus_khan has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<RubyPanther> I checked the main torrent site and there a dozen copies, if you have to beg for links you don't deserve to pirate anything.
samuel02 has joined #ruby
<RubyPanther> what good are books for the clueless?
<imaleaf> hahahaha
<RubyPanther> Just learn Ruby from youtube
Shidash has quit [Ping timeout: 276 seconds]
supermarin has quit [Quit: Computer has gone to sleep.]
Bira has quit []
yfeldblum has quit [Ping timeout: 252 seconds]
supermarin has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
samuel02 has quit [Ping timeout: 252 seconds]
kevinykchan has joined #ruby
supermarin has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
spajus has quit [Quit: Leaving]
Guest42916 has joined #ruby
parduse is now known as Guest29982
Guest42916 is now known as parduse
parduse has quit [Changing host]
parduse has joined #ruby
<RubyPanther> I can haz RWBY? https://www.youtube.com/watch?v=-sGiE10zNQM
end_guy has joined #ruby
Guest29982 has quit [Ping timeout: 252 seconds]
zorak8 has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
<centrx> RubyPanther, Thanks, this will prove very useful for helping people
<imaleaf> lol :D
eka has quit [Read error: Connection reset by peer]
eka has joined #ruby
bmurt has quit []
<RubyPanther> centrx: Next we can learn to do the Ruby dance https://www.youtube.com/watch?v=qedWObY_JSQ
dseitz has joined #ruby
zorak8 has joined #ruby
kitak has quit [Remote host closed the connection]
MatthewsFace has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby
noop has quit [Ping timeout: 252 seconds]
codeurge has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
kitak has joined #ruby
lethjakman has quit [Ping timeout: 258 seconds]
<lambo> im trying to pass output to remote terminal using $stdout in a drbobject but when i pass it some strings it stuck the local terminal until some key is pressed (in irb anyway) any neat tricks to pipe sdtin and stdout?
<centrx> lambo, Check out Open3, in the Ruby stdlib
vlad_starkov has quit [Ping timeout: 240 seconds]
pierre1_ has quit [Ping timeout: 252 seconds]
sgen has quit [Quit: Leaving]
lyanchih_ has quit [Quit: lyanchih_]
<lambo> nice
Lewix has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dw1 has left #ruby [#ruby]
d34th4ck3r has joined #ruby
koderok has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
s2013 has joined #ruby
dingus_khan has joined #ruby
coder_neo has joined #ruby
shashank_rs has quit [Ping timeout: 252 seconds]
RaptorJesus has joined #ruby
pierre1_ has joined #ruby
marcdel_ has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Ping timeout: 240 seconds]
marcdel has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
robbyoconnor has quit [Ping timeout: 252 seconds]
tobago has joined #ruby
GriffinHeart has joined #ruby
ffranz has quit [Quit: Leaving]
s2013 has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
andrewjanssen has quit [Client Quit]
benlieb has joined #ruby
shashank_rs has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamcalledrob has joined #ruby
einarj has joined #ruby
shashank_rs1 has joined #ruby
shashank_rs has quit [Read error: Connection reset by peer]
einarj has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
b1205 has joined #ruby
ylluminarious|aw has quit [Quit: Linkinus - http://linkinus.com]
chrisramon has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
aspires has joined #ruby
samuel02 has joined #ruby
aspires has quit [Client Quit]
n0n3 has joined #ruby
samuel02 has quit [Ping timeout: 245 seconds]
zorak8 has quit [Ping timeout: 240 seconds]
freezey_ has quit [Remote host closed the connection]
IceDragon has quit [Quit: Space~~~]
lethe has quit []
scottj has joined #ruby
n0n3 has quit [Remote host closed the connection]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dingus_khan has joined #ruby
OffTheRails has quit [Ping timeout: 252 seconds]
foooobear has joined #ruby
teddyp1cker has quit []
mr_snowf1ake has joined #ruby
n0n3 has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
omosoj has quit [Quit: Leaving]
zorak8 has joined #ruby
aganov has joined #ruby
imaleaf has quit [Ping timeout: 252 seconds]
smathieu has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
axilla has joined #ruby
jackneill has joined #ruby
toastynerd has joined #ruby
luckyruby has quit [Ping timeout: 255 seconds]
Morkel has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
dingus_khan has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 276 seconds]
haha_ is now known as haha_afk
fatur has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
zorak8 has quit [Ping timeout: 264 seconds]
enricostn has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
lyanchih has joined #ruby
nari has joined #ruby
JasmeetQA has joined #ruby
doev has joined #ruby
dawkirst has joined #ruby
<jimbow> are the attr methods worth using?
oo_ has joined #ruby
Lewix has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
hgl has quit [Ping timeout: 264 seconds]
n0n3 has quit []
OffTheRails has joined #ruby
combusean has joined #ruby
dawkirst has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
skysploit has quit [Remote host closed the connection]
oo_ has joined #ruby
reference has joined #ruby
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
rm_ has quit [Remote host closed the connection]
iamcalledrob has quit [Read error: Connection reset by peer]
iamcalledrob_ has joined #ruby
<pontiki> they're idiomatic, so yeah
<pontiki> even more than that, they make for cleaner interfaces
eldina_ has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
oo_ has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
jilk23 has joined #ruby
sinkensabe has joined #ruby
_justin has joined #ruby
smathieu has quit [Remote host closed the connection]
Gue______ has joined #ruby
smathieu has joined #ruby
pu22l3r has joined #ruby
Gue______ has quit [Client Quit]
Gue______ has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
Gue______ is now known as fschuindt
amclain has joined #ruby
heftig has quit [Quit: Quitting]
pu22l3r has joined #ruby
moneydouble has quit [Quit: Leaving.]
MrSamuel has quit [Quit: MrSamuel]
moneydouble has joined #ruby
oo_ has joined #ruby
rm_ has joined #ruby
supermarin has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
supermarin has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
toastynerd has quit [Remote host closed the connection]
OffTheRails has quit [Ping timeout: 252 seconds]
amclain has quit [Client Quit]
jprovazn has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
Dr3amc0d3r|away has quit [Ping timeout: 240 seconds]
jimbow has quit [Ping timeout: 264 seconds]
akonny has joined #ruby
mary5030 has quit [Remote host closed the connection]
yfeldblum has joined #ruby
zorak8 has joined #ruby
samuel02 has joined #ruby
shashank_rs1 has quit [Ping timeout: 252 seconds]
tagrudev has joined #ruby
doev has quit [Remote host closed the connection]
charliesome has joined #ruby
Dr3amc0d3r|away has joined #ruby
samuel02 has quit [Ping timeout: 258 seconds]
apeiros has joined #ruby
except has quit [Ping timeout: 265 seconds]
oops has joined #ruby
Hanmac1 has joined #ruby
oops has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 252 seconds]
imaleaf has joined #ruby
centrx has joined #ruby
tanmay_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Dreamer3__ has quit [Ping timeout: 240 seconds]
<RubyPanther> faster, too
<tanmay_> Which is the best method to convert string array to int array( ["1", "2", "3"] to [1 , 2 ,3] ) ?
wallerdev has joined #ruby
<centrx> array.map(&:to_i)
<tanmay_> okay. why not each ?
brunops has joined #ruby
<centrx> array.map(&:to_i) is more concise and meaningful, and the same speed except perhaps if you have billions of items in your array
<centrx> it might be faster too actually
<apeiros> centrx: it used to be slower
Xeago has quit [Read error: Connection reset by peer]
<apeiros> might be different today, though, as it moved into core
<centrx> oh nevermind, array index offsets are just addition
<centrx> that's what I was thinking
Xeago has joined #ruby
gmas has quit [Ping timeout: 252 seconds]
<tanmay_> hmm...okay thx for the help :)
<centrx> actually looks like map is faster on my machine
axilla has joined #ruby
<centrx> ruby 2.1.2
iamcalledrob_ has quit [Quit: Computer has gone to sleep.]
<apeiros> oh, I meant &:to_i being slower than .map { |x| x.to_i }
<centrx> oh yeah there's that too
<apeiros> each vs. map is because each won't do a thing
<apeiros> since it returns the receiver, not the mapped data
JoeGaudet has joined #ruby
<apeiros> >> ["1", "2", "3"].each(&:to_i)
<eval-in__> apeiros => ["1", "2", "3"] (https://eval.in/155934)
canton7 has quit [Remote host closed the connection]
fatur has left #ruby ["WeeChat 0.4.3"]
* apeiros off for commute
apeiros has quit [Remote host closed the connection]
mr_snowf1ake has quit [Ping timeout: 264 seconds]
combusean has quit [Ping timeout: 276 seconds]
sole has joined #ruby
apeiros has joined #ruby
iamcalledrob_ has joined #ruby
<centrx> a.map(&:to_i) 0.570000 0.000000 0.570000 ( 0.572408)
<centrx> a.map { |e| e.to_i } 0.800000 0.000000 0.800000 ( 0.792737)
<centrx> each_with_index 1.110000 0.000000 1.110000 ( 1.105235)
Xeago has quit [Ping timeout: 252 seconds]
<centrx> (100 elements in array)
<imaleaf> wow, a trace. you're serious.
<centrx> imaleaf, It's Benchmark
Gooder has quit [Remote host closed the connection]
<imaleaf> you actually have a function called Benchmark?
<centrx> It's part of Ruby stdlib
axilla has quit [Ping timeout: 276 seconds]
<ari-_-e> doing it with the symbol and with the explicit block should be pretty much identical for performance purposes
<centrx> Benchmark.bmbm
<imaleaf> fascinating
<ari-_-e> since they're pretty much identical in general
Gooder has joined #ruby
dingus_khan has joined #ruby
<centrx> yeah, performance is irrelevant because all are so fast (100,000 iterations on 100 elements, and 10,000,000 iterations on 3 elements)
hololeap has joined #ruby
pu22l3r has joined #ruby
hololeap has quit [Client Quit]
<Hanmac1> centrx: try bigger arrarys, would that make a difference for a.map(&:to_i) vs a.map { |e| e.to_i } ?
apeiros has quit [Ping timeout: 252 seconds]
hololeap has joined #ruby
agent_white has quit [Ping timeout: 255 seconds]
<ari-_-e> my understanding is that those are pretty much the same
<ari-_-e> since Symbol#to_proc returns that block
<centrx> It's handled differently internally for some reason as I recall
<ari-_-e> perhaps
<hololeap> I'm trying to find a gem that passes time intensive jobs to clients over tcp
bal has joined #ruby
relix has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dingus_khan has quit [Ping timeout: 240 seconds]
<imaleaf> that's possible?
<centrx> 10,000,000 elements 5 times:
<hololeap> for example a server that stores a queue and sends each client a url to fetch
<hololeap> and then the clients send the results
<sole> why is there a limitation in apache to max upload size via post?
jhass|off is now known as jhass
<centrx> a.map(&:to_i) 2.870000 0.090000 2.960000 ( 2.956610)
<centrx> a.map { |e| e.to_i } 4.080000 0.070000 4.150000 ( 4.141768)
<centrx> each_with_index 5.500000 0.000000 5.500000 ( 5.488153)
atraylen has joined #ruby
yacks has joined #ruby
chrisramon has quit [Quit: chrisramon]
lyanchih has quit [Quit: lyanchih]
rm_ has quit [Remote host closed the connection]
agent_white has joined #ruby
sole has left #ruby [#ruby]
agent_white has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
echevemaster has quit [Quit: Leaving]
canton7 has joined #ruby
VinceThePrince has joined #ruby
JasmeetQA has quit [Quit: Leaving.]
kenneth has joined #ruby
Dreamer3 has joined #ruby
JasmeetQA has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
lyanchih has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Arkaniad has quit [Remote host closed the connection]
toastynerd has joined #ruby
einarj has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
shvelo has joined #ruby
akemrir has joined #ruby
rdark has joined #ruby
einarj has quit [Remote host closed the connection]
pierre1_ has quit [Ping timeout: 240 seconds]
ddv has quit [Changing host]
ddv has joined #ruby
maestrojed has joined #ruby
phansch has joined #ruby
kiri has joined #ruby
fschuindt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klaut has joined #ruby
apeiros has joined #ruby
_Andres has joined #ruby
claymore has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
tacos1de has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
VinceThePrince has quit [Read error: Connection reset by peer]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agent_white has joined #ruby
tacos1de has joined #ruby
samuel02 has joined #ruby
adnauseam has quit [Ping timeout: 252 seconds]
Macaveli has joined #ruby
adnauseam has joined #ruby
jimbow has joined #ruby
charliesome has joined #ruby
mary5030 has quit [Remote host closed the connection]
starfox21_ has joined #ruby
<lambo> damned drb is so roxor for newbe like me
benlieb has quit [Quit: benlieb]
marcdel has quit []
samuel02 has quit [Ping timeout: 265 seconds]
MrSamuel has joined #ruby
hypnosb has quit [Ping timeout: 252 seconds]
kenneth has joined #ruby
toastynerd has quit [Remote host closed the connection]
adnauseam has quit [Ping timeout: 245 seconds]
lambo has quit [Quit: leaving]
TwinkleHood has joined #ruby
hypnosb has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
adnauseam has joined #ruby
subraminion has joined #ruby
meatherly has quit [Remote host closed the connection]
coderhs has joined #ruby
Gabri has joined #ruby
<agent_white> waty
vlad_starkov has joined #ruby
marcdel has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samuel02 has joined #ruby
skaflem has joined #ruby
<agent_white> This channel needs to wake up at night :(
vlad_sta_ has joined #ruby
anaeem1 has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
dapz has joined #ruby
tesuji has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
lambo has joined #ruby
marcdel has quit [Ping timeout: 252 seconds]
vlad_sta_ has quit [Client Quit]
Darryl has quit [Quit: Connection closed for inactivity]
<imaleaf> I have something I think you all might enjoy. this literally just happened.
<imaleaf> 23:48 <CodePulsar> Why is PHP returning an array when I have a query like this 'select encode(id, 'hex') as id from bla bla' and $res[0]['id'] is an array , WHAT?
<imaleaf> 23:50 <imaleaf> yeahhh
<imaleaf> 23:50 <imaleaf> but sometimes when you store it into a variable, and then access it, it's no longer an array?
<imaleaf> 23:51 <CodePulsar> I don't store it into a variable
<imaleaf> 23:51 <CodePulsar> I concatenate it with a string
<imaleaf> 23:51 <imaleaf> no I'm saying, I noticed sometimes if I save it into a variable first, it's no longer an array, but if I access it that way, it sends me an array
marcdel has joined #ruby
<imaleaf> 23:56 <CodePulsar> imaleaf: YOU ARE RIGHT!!!!!
<imaleaf> 23:56 <CodePulsar> imaleaf: Why in the world?
<imaleaf> :)
akonny has quit [Quit: akonny]
b00stfr3ak has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
roolo has quit [Quit: Leaving...]
yfeldblu_ has joined #ruby
zigomir has joined #ruby
dingus_khan has joined #ruby
bigkevmcd has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Quit: MrSamuel]
ayaz has joined #ruby
adnauseam has quit [Ping timeout: 240 seconds]
bigkevmcd has joined #ruby
adnauseam has joined #ruby
dingus_k_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
dingus_khan has quit [Ping timeout: 240 seconds]
ta has joined #ruby
toastynerd has joined #ruby
popo44 has joined #ruby
samuel02 has quit [Remote host closed the connection]
popo44 has left #ruby [#ruby]
samuel02 has joined #ruby
dingus_k_ has quit [Ping timeout: 245 seconds]
<imaleaf> really, no one? :p
<imaleaf> or was I muted. I can't tell
<apeiros> no. my contempt for php is too big to even comment on that. :o)
<imaleaf> :D
<imaleaf> it's gotten to the point where i'm starting to wonder if I would code better, drunk
<apeiros> with php it doesn't matter
fabrice31 has joined #ruby
jamto11 has joined #ruby
<apeiros> whether you code drunk or sober, your code is still php
<imaleaf> I just don't understand why it does that, it's like a type issue
<imaleaf> :p
<ari-_-e> imaleaf: just look at the spec :)
<imaleaf> ari-_-e: :D I actually would love to find where that's documented, but I'm not sure where to look for something so obscure
<ari-_-e> imaleaf: the interpreter
samuel02 has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<lambo> what would be the easiest way of emulate a gotoxy c++ stuff?
<ari-_-e> lambo: continuations
<imaleaf> ari-_-e: unfortunately I don't know how to work with C yet, nor gdb
<ari-_-e> see Kernel#callcc
adnauseam has quit [Ping timeout: 252 seconds]
<ari-_-e> lambo: but you really shouldn't have to
nighter has quit [Ping timeout: 245 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
dEPy has joined #ruby
<lambo> ari-_-e what do you mean?
iamcalledrob_ has quit [Quit: Computer has gone to sleep.]
<ari-_-e> lambo: you're asking how to do something like goto, right?
anarang has joined #ruby
<lambo> right
_justin has quit [Quit: _justin]
shredding has joined #ruby
<ari-_-e> lambo: there's no good reason to use goto in ruby
<imaleaf> :D
meatherly has joined #ruby
_justin has joined #ruby
<lambo> ^^ ok its for a litle chat room but as you say i dont really need it
meatherly has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
Rahul_Roy has joined #ruby
adnauseam has joined #ruby
nighter has joined #ruby
Silent__ has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 240 seconds]
<lambo> i wonder why when we pass the stdout to a remote terminal with nested drb object it blocks the local when passing strings from the remote one?
Doppp has quit [Quit: leaving]
Burgestrand has joined #ruby
elabs-developer has joined #ruby
dayepa has quit [Quit: dayepa]
dangerousdave has joined #ruby
bal has quit [Quit: bal]
<lambo> i thought drb was taking care about the synchronisation stuff??
toastynerd has quit [Remote host closed the connection]
bal has joined #ruby
sk87 has joined #ruby
davedev24_ has quit [Remote host closed the connection]
Doppp has joined #ruby
glenfe has quit [Ping timeout: 252 seconds]
<TwinkleHood> Wat, goto is phantastic. Much better than whiney stuff like "methods" and "classes".
yfeldblu_ has quit [Remote host closed the connection]
<TwinkleHood> Real cowboys write all their code in one document and use goto for all flowcontrol.
benlieb has joined #ruby
yfeldblum has joined #ruby
<tanmay_> wow...I was not expecting such a informative discussion...thats the power of irc :) ... thx guys<centrx><apeiros><imaleaf>
<imaleaf> tanmay_: of course :p
jimbow has quit [Ping timeout: 258 seconds]
<tanmay_> imaleaf: true :)
krz has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<lambo> http://pastie.org/9200727 still my gem weird stuff i alraydy asked a bunch of times : its broke but i can bundle install stuff isnt it weird? i got the same shit with 2 differntes boxes (both archlinux) its realy boring
centrx has joined #ruby
cycorld has joined #ruby
Xeago has joined #ruby
LiohAu has joined #ruby
<apeiros> whatdidido???
oetjenj has joined #ruby
coderhs has quit [Ping timeout: 258 seconds]
tanmay_ has quit [Ping timeout: 240 seconds]
centrx has quit [Quit: All this computer hacking is making me thirsty]
iamcalledrob_ has joined #ruby
Morkel_ has joined #ruby
nvrch has joined #ruby
ta has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 265 seconds]
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
tanmay_ has joined #ruby
renklaf has joined #ruby
Macaveli has quit [Quit: Leaving]
blackmes1 has quit [Ping timeout: 240 seconds]
Darryl has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
roolo has joined #ruby
iamcalledrob_ has quit [Ping timeout: 252 seconds]
hgl has joined #ruby
Macaveli has joined #ruby
mercerist has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
shvelo has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
Dreamer3 has quit [Ping timeout: 258 seconds]
timonv has joined #ruby
coderhs has joined #ruby
jambolina has joined #ruby
imaleaf has quit [Ping timeout: 245 seconds]
dumdedum has joined #ruby
<Macaveli> How do I sanitize the following string " \t•\tzef" remove the bullet and the \t
coder_neo has quit [Quit: Leaving]
<Macaveli> But in the future I also want to remove all non standard chars
wallerdev has quit [Quit: wallerdev]
<brunops> Macaveli: define "standard chars"
frogssgy has joined #ruby
oo_ has quit [Remote host closed the connection]
<apeiros> Macaveli: \t is a tab
<Macaveli> like ! ç à è
Valesk has quit [Ping timeout: 240 seconds]
<apeiros> and you can delete chars using String#delete and/or #gsub
dingus_khan has joined #ruby
robbyoconnor has joined #ruby
<oddmunds> Macaveli: you probably mean ASCII
<Macaveli> Yes
<apeiros> and the bullet seems to be http://www.fileformat.info/info/unicode/char/95/index.htm - odd one
coderhs has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
<apeiros> well, \t is ascii
<apeiros> so he wants even only a subset of ascii
MrSamuel has joined #ruby
<Macaveli> self.gsub(/[\x80-\xff]/,replacement) does not work
frosgy has quit [Ping timeout: 245 seconds]
<apeiros> "does not work" is not a usable problem description.
olivier_bK has joined #ruby
<Macaveli> RegexpError: invalid multibyte character: /\/\[\x80\-\xFF\]\//
<apeiros> better
<apeiros> you need your string to be binary and mark the regex as binary too
dingus_khan has quit [Ping timeout: 240 seconds]
<apeiros> String#b gets you a binary encoded string
<apeiros> /foo/n gets you a binary encoded regex
<apeiros> (the /n flag part)
Doppp has quit [Quit: leaving]
<Macaveli> Can't I just use it on a string without the String Class
oo_ has quit [Remote host closed the connection]
frobrob has joined #ruby
timonv has quit [Read error: Connection reset by peer]
ghr has joined #ruby
timonv has joined #ruby
oo_ has joined #ruby
dawkirst has joined #ruby
ayaz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
<Macaveli> Euhm I'm at ruby 1.9.3
<jhass> no
LadyRainicorn has joined #ruby
yacks has joined #ruby
nfk has joined #ruby
timonv_ has joined #ruby
Dreamer3 has joined #ruby
meatherly has joined #ruby
tanmay_ has quit [Ping timeout: 258 seconds]
ferr has joined #ruby
<Hanmac1> Macaveli:
<Hanmac1> >> /[#{"\x80-\xff".b}]/
<eval-in__> Hanmac1 => /[\x80-\xFF]/ (https://eval.in/155979)
timonv has quit [Ping timeout: 265 seconds]
<Macaveli> Hanmac1, let me try
yacks has quit [Ping timeout: 265 seconds]
<Hanmac1> Macaveli: or as apeiros says: use the /n flag, and if your ruby does not support that, then update
kiri has quit [Quit: Leaving]
<apeiros> Hanmac1: lolwut? :)
b00stfr3ak has quit [Ping timeout: 240 seconds]
Hanmac1 is now known as Hanmac
<apeiros> Macaveli: btw., your regex looks broken
<apeiros> /\/\[\x80\-\xFF\]\// should probably be /[\x80\-\xFF\]/
yacks has joined #ruby
<apeiros> urgs, still brokwn!
<apeiros> *broken
<hololeap> s.gsub(/^[:print:]/,'')
<Macaveli> indeed
roolo has quit [Quit: Leaving...]
<apeiros> /\/\[\x80\-\xFF\]\// should probably be /[\x80-\xFF]/
<apeiros> hololeap: that ^ is in the wrong place. that's an anchor like that.
<hololeap> Would that work/
<Hanmac> i found a gem that uses "make -j 5" internally ... and it might not work because of "internal compiler error" *angry face*
Advocation has joined #ruby
zz_nopc0de is now known as nopc0de
thesheff17 has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 252 seconds]
<hololeap> s.gsub(/[^[:print:]]/,'')
jhass is now known as jhass|off
cycorld has quit []
klaut has quit [Remote host closed the connection]
dEPy has quit [Quit: Lingo - http://lingoirc.com]
coderhs has joined #ruby
dawkirst has quit [Remote host closed the connection]
obs has joined #ruby
<Hanmac> funny thing when you try to install a gem, but it does not work because your ruby version is to new, but then it was fixed in the github repo of that gem, but not commited on rubygems ...
Gabri has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
samuel02 has joined #ruby
moneydouble has quit [Quit: Leaving.]
Doppp has joined #ruby
<Macaveli> damn it I have it working
roolo has joined #ruby
agent_white has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
<Macaveli> but I don't think emails are processed correctly
MrSamuel has quit [Quit: MrSamuel]
ndrei has joined #ruby
<Macaveli> Never mind needed to restart form :)
dangerou_ has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
andrewlio has joined #ruby
ephemerian has joined #ruby
<Macaveli> apeiros, hololeap Hanmac I went with nathans option -> http://stackoverflow.com/questions/1268289/how-to-get-rid-of-non-ascii-characters-in-ruby
frogsy has joined #ruby
akonny has joined #ruby
frogssgy has quit [Ping timeout: 258 seconds]
Macaveli has quit [Read error: Connection reset by peer]
jhass|off is now known as jhass
nerium has joined #ruby
Macaveli has joined #ruby
samuel02 has quit [Remote host closed the connection]
frosgy has joined #ruby
frogsy has quit [Ping timeout: 258 seconds]
toastynerd has joined #ruby
nerium has quit [Client Quit]
elaptics`away is now known as elaptics
samuel02 has joined #ruby
tanmay_ has joined #ruby
hololeap has quit [Quit: Bye]
frogssgy has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
<Hanmac> need a gem that was updated yesterday, it has bunlded c++ lib inside ... (not that a big problem ..) but my own system lib from years ago is a few times newer than the bunldled gem that was updated YESTERDAY!!!
LekeFly has joined #ruby
frosgy has quit [Ping timeout: 258 seconds]
toastynerd has quit [Ping timeout: 258 seconds]
samuel02 has quit [Ping timeout: 252 seconds]
_justin has quit [Quit: _justin]
d34th4ck3r has quit [Quit: zzz]
noop has joined #ruby
canton7-mac has joined #ruby
canton7-mac has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
<GriffinHeart> is there a difference in Concerns between def a method on included block and a method outside?
kyb3r_ has quit [Read error: Connection reset by peer]
<GriffinHeart> Arg! wrong channel :)
kyb3r_ has joined #ruby
imaleaf has joined #ruby
iamcalledrob_ has joined #ruby
<imaleaf> did I miss anything cool?
d34th4ck3r has joined #ruby
nerium has joined #ruby
toastynerd has joined #ruby
banister has joined #ruby
ayaz has joined #ruby
moritzs has joined #ruby
iamcalledrob_ has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
frogsy has joined #ruby
jimeh has left #ruby [#ruby]
_justin has joined #ruby
klaut has joined #ruby
relix has joined #ruby
jimeh has joined #ruby
smathieu has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
axilla has joined #ruby
frogssgy has quit [Ping timeout: 252 seconds]
agent_wh1te has joined #ruby
danijoo has joined #ruby
klaut has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
magri has joined #ruby
matrixis1 is now known as matrixise
jilk23 has quit [Quit: jilk23]
jxf has quit [Ping timeout: 264 seconds]
zartoosh has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 264 seconds]
axilla has quit [Ping timeout: 240 seconds]
agent_wh1te is now known as agent_white
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
frogsy has quit [Ping timeout: 245 seconds]
dapz has joined #ruby
foooobear_ has joined #ruby
frogsy has joined #ruby
marcdel has quit []
dingus_khan has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
rostam has joined #ruby
dapz has quit [Client Quit]
foooobear has quit [Ping timeout: 252 seconds]
klaut has joined #ruby
mr_snowf1ake has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
oo_ has quit [Remote host closed the connection]
dapz has joined #ruby
foooobear__ has joined #ruby
jamto11 has joined #ruby
dingus_khan has quit [Ping timeout: 276 seconds]
relix has joined #ruby
subraminion has quit [Quit: Computer has gone to sleep.]
ra4king has quit [Quit: Leaving]
_Andres has quit [Read error: Connection reset by peer]
marr has joined #ruby
_bart has joined #ruby
foooobear_ has quit [Ping timeout: 245 seconds]
<_bart> Hi, what would be the :content_type of a CSV document exactly?
timonv has joined #ruby
ra4king has joined #ruby
<_bart> it is basically text/plain but I guess that's not it?
oo_ has joined #ruby
azuri5 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
alem0lars has joined #ruby
jamto11 has quit [Ping timeout: 276 seconds]
frosgy has joined #ruby
<agent_white> _bart: `cat /etc/mime.types | grep csv`
kaku has joined #ruby
<agent_white> It is indeed a text/csv.
<agent_white> Intead of text/plain.
subraminion has joined #ruby
<_bart> Thanks! Should I also check for just 'csv', or only 'text/csv'?
<_bart> (because I noticed the /etc/mime.types has both)
frogsy has quit [Ping timeout: 245 seconds]
meatherly has joined #ruby
nerium has quit [Quit: nerium]
<_bart> Super useful command by the way, thanks
ra4king has quit [Client Quit]
ra4king has joined #ruby
foooobear___ has joined #ruby
<Macaveli> still not fixed...
<Macaveli> I will make a gist
Gabri has joined #ruby
ferr has quit [Ping timeout: 240 seconds]
d34th4ck3r has quit [Quit: zzz]
foooobear__ has quit [Ping timeout: 245 seconds]
ferr has joined #ruby
meatherly has quit [Ping timeout: 264 seconds]
monkegjinni has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
shredding has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Remote host closed the connection]
<agent_white> _bart: Haha I'm actually writing my own httpd as we speak, just learned of that today! So far for my "Content-Type"
shredding has joined #ruby
<agent_white> I've used the first in the mime.types list that it finds.
<agent_white> Otherwise, it may be a bit more application-specific.
shredding has quit [Remote host closed the connection]
shredding has joined #ruby
tkuchiki_ has joined #ruby
AlSquire has joined #ruby
decoponio has joined #ruby
_Andres has joined #ruby
timonv has quit [Ping timeout: 258 seconds]
Emmanuel_Chanel has quit [Read error: No route to host]
brunops has quit [Quit: leaving]
<Hanmac> agent_white: how to destory Harddrives so that no agency can get them again: http://frank.geekheim.de/?p=2423
foooobear___ has quit [Ping timeout: 252 seconds]
<agent_white> Hanmac: Cool. You been hacked?
tkuchiki has quit [Ping timeout: 258 seconds]
moritzs has quit [Ping timeout: 240 seconds]
<Hanmac> nope but i found the end result of this blog page funny ... because at the end you have raw iron/metal that you could use to make new harddrives ;P
<agent_white> Hanmac: Phew. How you phrased that sounded like a spammer in a channel hahahah.
jimbow has joined #ruby
<Hanmac> agent_white: did you see the page? they used Thermit to destroy the HDDs ;P
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<_bart> agent_white: the text/csv worked fine, no need to add the 'csv'
<agent_white> Hanmac: Kevin Rose also did that! https://www.youtube.com/watch?v=4PKB5nnHGAk
<agent_white> _bart: Good deal :)
<frosgy> I want to generate checksums for large (500+ MB) files without reading the entire file into memory, like File.read seems to. What method should I use instead?
timonv has joined #ruby
<apeiros> frosgy: open + read with an amount
Squarepy has joined #ruby
<apeiros> frosgy: but I think openssl has a method to generate the checksum for a file
<imaleaf> I'm still surprised rose never got arrested for that trick :p
mercerist has joined #ruby
fabrice31 has joined #ruby
jimbow has quit [Ping timeout: 252 seconds]
<apeiros> Digest::SHA1.file(path).hexdigest
<agent_white> Well it's not illegal! Right?
<imaleaf> he was doing it on a city street! :p
toastynerd has quit [Remote host closed the connection]
<frosgy> Damn, didn't know that method existed. Thanks a ton, apeiros
st0rmz has joined #ruby
jmeeuwen has quit [Ping timeout: 252 seconds]
Advocation has joined #ruby
tvw has joined #ruby
ferr has quit [Ping timeout: 252 seconds]
havenwood has quit []
GriffinHeart has quit [Remote host closed the connection]
nerium has joined #ruby
thomasxie has joined #ruby
<lambo> how do i set a hash key to nil? foo.has_key? bar i need it to nil or delete the key/value pair
pen has joined #ruby
alem0lars has quit [Quit: alem0lars]
Emmanuel_Chanel has joined #ruby
dpaulus has quit [Quit: ZNC - http://znc.in]
sk87 has joined #ruby
rails426 has joined #ruby
iamcalledrob_ has joined #ruby
<agent_white> >> h = Hash.new; h["x"] = nil;
<eval-in__> agent_white => nil (https://eval.in/156028)
mfmfmfmfmfmf has joined #ruby
<agent_white> >> h = Hash.new; h["
<eval-in__> agent_white => /tmp/execpad-1d674f93037e/source-1d674f93037e:5: syntax error, unexpected tGVAR, expecting ']' ... (https://eval.in/156029)
<agent_white> oops
nopc0de is now known as zz_nopc0de
<agent_white> >> h = Hash.new; h[:x] = "foo"; h.delete(:x); h[:x];
<eval-in__> agent_white => nil (https://eval.in/156030)
<Hanmac> lambo: if you want that has_key? returns false you need Hash#delete
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azuri5 has quit [Ping timeout: 258 seconds]
zz_nopc0de is now known as nopc0de
iamcalledrob_ has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 240 seconds]
MrSamuel has joined #ruby
schickung has joined #ruby
<lambo> thx
DaniG2k has joined #ruby
axilla has joined #ruby
WishBoy has quit [Remote host closed the connection]
subraminion has quit [Remote host closed the connection]
ahri has joined #ruby
subraminion has joined #ruby
subraminion has quit [Changing host]
subraminion has joined #ruby
nerium has quit [Quit: nerium]
<ahri> hi, i have ruby 1.9.3 (win32) installed, and when i load up irb and type "ENV['PATH']" i get an empty string; it's not inheriting the system path variable... any ideas why this might be? (i've verified that the path does contain stuff via the command prompt) -- when i search google all i get is information on how to add ruby to my system path, which isn't an issue!
<agent_white> ahri: What does "ENV" print?
<agent_white> Or... ENV["PATH"].key?
<agent_white> Should be 'true'.
<ahri> lots of (valid) stuff, e.g. ANDROID_HOME is being sourced, which i set in my env
starfox21_ has quit [Quit: starfox21_]
<ahri> NoMethodError: undefined method `key?' for "":String
thomasxie has quit [Ping timeout: 264 seconds]
thomasxie1 has joined #ruby
<agent_white> Unless ENV["PATH"].key? == true; then it is not in your ENV.
doev has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
<ahri> ENV['ANDROID_HOME'] => "c:/android/sdk"
<agent_white> ENV["ANDROID_HOME"].key?
<ahri> > ENV['ANDROID_HOME'].key? NoMethodError: undefined method `key?' for "c:/android/sdk":String
tkuchiki_ has quit [Remote host closed the connection]
moritzs has joined #ruby
<ahri> i think though you may have pointed me in the right direction
koderok has quit [Ping timeout: 245 seconds]
<ahri> because when i fire up irb from the windows command prompt i do get a path, but from git bash i do not, so i'll investigate that
<agent_white> ahri: Good! :)
<agent_white> ahri: WAIT
<agent_white> ahri: It should be... ENV.key? "ANDROID_HOME"
CorpusCallosum has joined #ruby
<ahri> yeah, i think ruby in win32 downcases all the env variables; and i've specifically unset "path" in favour of "PATH", so it'll be checking "path" and not finding it
dingus_khan has joined #ruby
<agent_white> ahri: Just first enter `ENV`
<agent_white> And you'll see the keys you have available.
<agent_white> I'm not familiar with Ruby on windows, so I do not know anymore. :P
MrSamuel has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
<ahri> > ENV.key? 'PATH' => true
<agent_white> `ENV["PATH"]`
<agent_white> `ENV["PATH"] if ENV.key? "PATH"`
<agent_white> Or whatevers.
<ahri> > `ENV["PATH"]` Errno::ENOENT: No such file or directory - ENV["PATH"]
<agent_white> Do not use ` 's
Xeago has quit [Read error: Connection reset by peer]
<agent_white> >> ENV["PATH"]
<eval-in__> agent_white => nil (https://eval.in/156031)
<agent_white> ;{
<agent_white> :P
Xeago has joined #ruby
<ahri> > `echo %PATH%` => "0\xEAG\n"
<agent_white> ahri: Do not use " ` "
<ahri> hmm, my PATH var is being replaced with something
<agent_white> don't use backtics
dfinly has joined #ruby
<agent_white> ENV["PATH"] NOT `ENV["PATH"]`
dfinly has quit [Max SendQ exceeded]
<ahri> > ENV['PATH'] => ""
<agent_white> ahri: `ENV` ... without bactics
<agent_white> Look at that list, and see where "PATH" is.
dfinly has joined #ruby
dingus_khan has quit [Ping timeout: 258 seconds]
rails426 has quit []
fabrice31 has quit [Remote host closed the connection]
dfinly has quit [Max SendQ exceeded]
<ahri> PATH is in there, in alphabetical order
Caius has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ahri> path is also in there: "path"=>"0\xEAG"
tjsousa______ has joined #ruby
koderok has joined #ruby
<agent_white> ahri: Hmmmm... you may need to see "ruby env path windows" in google.
<agent_white> ahri: I think it might differ quite a bit between linux and windows.
doev has quit [Read error: No route to host]
MrSamuel has joined #ruby
yacks has quit [Ping timeout: 252 seconds]
doev has joined #ruby
roolo has quit [Quit: Leaving...]
bamyojo14335 has joined #ruby
lyanchih has quit [Ping timeout: 276 seconds]
<ahri> yeah i think it does... but searching just tells me how to add ruby to the windows path, which is trivial and not helpful :)
<ahri> thanks anyway, i'll trawl the google results and see whether it's explained anywhere!
JBreit has joined #ruby
bamyojo14335_ has joined #ruby
bamyojo14335_ has left #ruby [#ruby]
bamyyyooo14335 has joined #ruby
monkegjinni has joined #ruby
JBreit has left #ruby [#ruby]
Rahul_Roy has quit [Ping timeout: 245 seconds]
segfalt has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 245 seconds]
mfmfmfmfmfmf has quit [Remote host closed the connection]
dioms_ has quit [Ping timeout: 245 seconds]
flughafen has quit [Quit: WeeChat 0.4.1]
genta has quit [Ping timeout: 245 seconds]
Advocation has quit [Quit: Advocation]
ziyadb_ has quit [Ping timeout: 245 seconds]
shvelo has joined #ruby
bamyojo14335 has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 245 seconds]
genta has joined #ruby
dioms_ has joined #ruby
im0b has joined #ruby
Rahul_Roy has joined #ruby
segfalt_ has joined #ruby
nari has joined #ruby
Rahul_Roy has quit [Client Quit]
Gabri has quit [Ping timeout: 264 seconds]
ziyadb__ has joined #ruby
tototutu has joined #ruby
<tototutu> hi
<tototutu> someone could help on csv parsing problem ?
dEPy has joined #ruby
frogsy has joined #ruby
<dEPy> is there a way to alias private methods?
ayaz has quit [Ping timeout: 240 seconds]
ta has joined #ruby
<tsunamie> noob questions. id I have a line that reads the content of a file into a variable called since. and I want to output that variable to the log. Why does'nt this work? @logger.info("I am reading the since db file now," last time was #{since})
agent_white has quit [Quit: goodnight]
fabrice31 has joined #ruby
<tsunamie> noob questions. id I have a line that reads the content of a file into a variable called since. and I want to output that variable to the log. Why does'nt this work? @logger.info("I am reading the since db file now, ast time was" #{since})
<dEPy> tsunamie: no need to repeat question 2 times
subraminion has quit [Remote host closed the connection]
<tsunamie> dEPy, sorry I thought it would correct my last statment but it did'nt
subraminion has joined #ruby
m8 has joined #ruby
nerium has joined #ruby
frosgy has quit [Ping timeout: 258 seconds]
nvrch has quit [Quit: nvrch]
banister has joined #ruby
davedev24_ has joined #ruby
Advocation has joined #ruby
ayaz has joined #ruby
<tsunamie> depy do you know the answer?
azuri5 has joined #ruby
tototiti has joined #ruby
<tototiti> hi someone to help me on this problem ? https://gist.github.com/anonymous/3e7c01b715c04879ce4d
nerium has quit [Ping timeout: 264 seconds]
<tsunamie> k looks like this is the answer @logger.info("The value I got from the since file was #{since}")
mfmfmfmfmfmf has joined #ruby
bamyyyooo14335_ has joined #ruby
blackmes1 has joined #ruby
<canton7> tototiti, what does your question mean? :1961 isn't a valid symbol name
tototutu has quit [Ping timeout: 264 seconds]
<tototiti> ah ok
<canton7> well, let me expand on that. you can write :"hello", and it's the same as :hello
bamyyyooo14335 has quit [Ping timeout: 240 seconds]
<tototiti> yes but if I want to use 1961
<canton7> similar you can write :"1961", but not :1961. If you *could* write :1961, it would be the same as :"1961"
bamyyyooo14335 has joined #ruby
koderok has quit [Ping timeout: 245 seconds]
<canton7> make sense?
dEPy has quit [Quit: Lingo - http://lingoirc.com]
<tototiti> can i write my_hash[:1961] or it is absolutely forbidden on symbol name ?
MrSamuel has quit [Ping timeout: 240 seconds]
<canton7> no. symbols, like methods, can't start with a number
<tototiti> okay
<canton7> you can write hash[:"1961"]
<tototiti> thanks a lot :)
<ari-_-e> they can, but you have to quote them
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ari-_-e> symbols can also contain spaces, but again you have to quote them in that case
<canton7> ari-_-e, did you read the backlog?
<tototiti> yes but i feel it less natural
<canton7> just like you can't write 'def 123abc'
<canton7> but you can still define a method of that name using other means
<tototiti> yes sure
<tototiti> thank you for the answer, bye :)
MrSamuel has joined #ruby
tototiti has left #ruby [#ruby]
yacks has joined #ruby
Lewix has joined #ruby
Advocation has quit [Quit: Advocation]
bamyyyooo14335_ has quit [Ping timeout: 276 seconds]
<ari-_-e> canton7: can you call a method that begins with numbers any way other than send?
<canton7> I don't think so
shashin has joined #ruby
roolo has joined #ruby
shashin has quit [Remote host closed the connection]
kyb3r_ has quit [Read error: Connection reset by peer]
kaku has quit [Quit: Leaving...]
agjacome has joined #ruby
Shidash has joined #ruby
lkba has joined #ruby
timgauthier has joined #ruby
dawkirst has joined #ruby
shashin has joined #ruby
shashin has quit [Changing host]
shashin has joined #ruby
monkegjinni has quit [Remote host closed the connection]
heftig has joined #ruby
Hanmac1 has joined #ruby
blackmes1 has quit [Quit: WeeChat 0.4.3]
dapz has joined #ruby
bcseda has joined #ruby
slmorton has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
kitak has quit [Remote host closed the connection]
MrSamuel has quit [Ping timeout: 258 seconds]
<tsunamie> hey guys, can someone help me code an exception for the following comand object.delete()
<tsunamie> I want to know when this command fails to run reading throught this tut http://phrogz.net/programmingruby/tut_exceptions.html
iamcalledrob_ has joined #ruby
Advocation has joined #ruby
MrSamuel has joined #ruby
tesuji has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
momomomomo has joined #ruby
monkegjinni has joined #ruby
iamcalledrob_ has quit [Ping timeout: 276 seconds]
Advocation has quit [Quit: Advocation]
nerium has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
MrSamuel has quit [Ping timeout: 264 seconds]
bcseda has quit [Quit: bcseda]
Lewix has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
axilla has joined #ruby
MrSamuel has joined #ruby
mfmfmfmfmfmf has quit [Remote host closed the connection]
germanstudent has quit [Quit: raus]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
JasmeetQA has quit [Read error: Connection reset by peer]
Lewix has quit [Ping timeout: 265 seconds]
sski has joined #ruby
monkegjinni has quit [Remote host closed the connection]
axilla has quit [Ping timeout: 276 seconds]
dangerou_ has quit []
dangerousdave has joined #ruby
_justin has quit [Quit: _justin]
dingus_khan has joined #ruby
reference has quit [Remote host closed the connection]
MrSamuel has quit [Ping timeout: 245 seconds]
reference has joined #ruby
noob101 has quit [Ping timeout: 240 seconds]
krz has quit [Read error: Connection reset by peer]
MrSamuel has joined #ruby
bakflash has joined #ruby
reference has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reference has joined #ruby
jamto11 has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
monkegjinni has joined #ruby
poushkar has joined #ruby
g0bl1n has joined #ruby
<jhass> tsunamie: make a gist of your whole code and add pseudo code (comments) of what you want
<poushkar> How do I make a method that takes hash argument first, then regular argument?
yfeldblum has quit [Ping timeout: 240 seconds]
jmeeuwen has joined #ruby
<jhass> poushkar: just make the hash explicit: foo({a: 'a', b: 'b'}, 'c', 'd')
karupa is now known as zz_karupa
jamto11 has quit [Ping timeout: 264 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
timfoo_ has quit [Quit: leaving]
xbob has joined #ruby
frosgy has joined #ruby
<poushkar> jhass: I want it to take variable amount of arguments first, then one regular argument. Like here: foo(age: 49, eyes: 'brown', 'Matz’), the last argument is required, first two are not
frogsy has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
frogssgy has joined #ruby
oo_ has joined #ruby
shredding has quit [Quit: shredding]
frosgy has quit [Ping timeout: 245 seconds]
reference has quit [Remote host closed the connection]
gyre007_ has joined #ruby
reference has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
dapz has joined #ruby
alem0lars has joined #ruby
mfmfmfmfmfmf has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
poushkar has quit [Quit: poushkar]
_Andres has quit [Read error: Connection reset by peer]
krz has joined #ruby
MrSamuel has joined #ruby
hiall has joined #ruby
dumdedum has quit [Quit: foo]
bamyyyooo14335 has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
reference has quit [Remote host closed the connection]
bamyyyooo14335 has joined #ruby
reference has joined #ruby
andrewjanssen has joined #ruby
bamyyyooo14335_ has joined #ruby
andrewjanssen has quit [Client Quit]
thomasxie1 has quit [Ping timeout: 252 seconds]
maoko has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bamyyyooo14335 has quit [Ping timeout: 240 seconds]
bamyyyooo14335_ is now known as bamyyyooo14335
thomasxie has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
ahri has quit [Ping timeout: 240 seconds]
ayaz has quit [Read error: Connection reset by peer]
subraminion has quit [Quit: Computer has gone to sleep.]
MrSamuel has quit [Ping timeout: 276 seconds]
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
nopc0de is now known as zz_nopc0de
kartouch has quit [Ping timeout: 252 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
zz_nopc0de is now known as nopc0de
yfeldblum has joined #ruby
relix has joined #ruby
obs_ has joined #ruby
relix has quit [Client Quit]
AndChat| has joined #ruby
ndrei has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
lkba has quit [Ping timeout: 258 seconds]
obs_ has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
MrSamuel has joined #ruby
phoo1234567 has joined #ruby
sambao21 has joined #ruby
iamcalledrob_ has joined #ruby
moritzs has quit [Ping timeout: 245 seconds]
kartouch has joined #ruby
subraminion has joined #ruby
subraminion has quit [Remote host closed the connection]
lw has quit [Quit: s]
subraminion has joined #ruby
doodlehaus has joined #ruby
iamcalledrob_ has quit [Ping timeout: 245 seconds]
kartouch has quit [Ping timeout: 240 seconds]
kartouch has joined #ruby
akonny has quit [Quit: akonny]
setra has joined #ruby
jhass is now known as jhass|off
eka has joined #ruby
MrSamuel has quit [Ping timeout: 258 seconds]
eka has quit [Client Quit]
MrSamuel has joined #ruby
reference-lost has joined #ruby
eka has joined #ruby
nari has joined #ruby
ziyadb__ has quit [Quit: Connection closed for inactivity]
ltdl has joined #ruby
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
kith has joined #ruby
ldnunes has joined #ruby
jhass|off is now known as jhass
reference has quit [Ping timeout: 240 seconds]
DaniG2k has quit [Quit: leaving]
mercerist has quit [Quit: Computer has gone to sleep.]
Advocation has joined #ruby
doodlehaus has quit [Remote host closed the connection]
qwyeth has joined #ruby
doodlehaus has joined #ruby
mercerist has joined #ruby
atraylen has quit [Ping timeout: 276 seconds]
dawkirst has quit [Remote host closed the connection]
MindfulMonk has quit [Ping timeout: 240 seconds]
subraminion has quit [Quit: Computer has gone to sleep.]
doodlehaus has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
axilla has joined #ruby
subraminion has joined #ruby
MindfulMonk has joined #ruby
subraminion has quit [Remote host closed the connection]
subraminion has joined #ruby
lambo has quit [Quit: leaving]
bmurt has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjsmith2 has joined #ruby
Squarepy has quit [Quit: Leaving]
cheeti has joined #ruby
zorak8 has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
mjsmith2 has quit [Remote host closed the connection]
nvrch has joined #ruby
mjs2600 has joined #ruby
momomomomo has quit [Remote host closed the connection]
momomomomo has joined #ruby
yakko_ has joined #ruby
ferr has joined #ruby
bmurt has quit []
bmurt has joined #ruby
germanstudent has joined #ruby
yakko has quit [Ping timeout: 255 seconds]
azuri5 has quit [Ping timeout: 240 seconds]
axilla has quit [Ping timeout: 240 seconds]
john3213 has joined #ruby
francisfish has joined #ruby
benzrf|offline is now known as benzrf
Jetchisel has joined #ruby
paulfm has joined #ruby
MindfulMonk has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
ghr has quit []
_Andres has joined #ruby
oo_ has quit [Remote host closed the connection]
Megtastique has joined #ruby
danshultz has joined #ruby
ghr has joined #ruby
timonv has quit [Remote host closed the connection]
MindfulMonk has joined #ruby
Bira has joined #ruby
<tsunamie> https://github.com/elasticsearch/logstash/blob/master/lib/logstash/inputs/s3.rb on line 147 and 150 I want to out put to logger at level info thate value in the variables. How do I do that?
nateberkopec has quit [Client Quit]
<tsunamie> jhass - does that hel;p?
zorak8 has joined #ruby
axilla has joined #ruby
john3213 has left #ruby [#ruby]
sk87 has joined #ruby
st0rmz has left #ruby [#ruby]
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
moritzs has joined #ruby
tier has joined #ruby
<momomomomo> tsunamie: I didn't see the original question, but this looks like a logstash question
<tsunamie> :)
alexju has joined #ruby
<tsunamie> momomomomo, yes, just want to add debugging to find where an issue is
sk87 has quit [Client Quit]
<momomomomo> you can use a ruby debugger, or if this is in dev, use something like the Pry repl
<momomomomo> erm * ruby loggers
mercerist has quit [Quit: Computer has gone to sleep.]
alexju has quit [Remote host closed the connection]
zorak8 has quit [Ping timeout: 245 seconds]
dblessing_ has joined #ruby
cocotton has joined #ruby
anaeem1 has quit [Remote host closed the connection]
shvelo has quit [Ping timeout: 245 seconds]
bmcorser has joined #ruby
yfeldblum has joined #ruby
segfalt_ is now known as segfalt
<tsunamie> momomomomo, tried doing this @logger.debug("since value is #{since}") hwoever that did'nt work
sambao21 has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
<momomomomo> tsunamie: google
jigy has joined #ruby
Advocation has quit [Quit: Advocation]
<shevy> the ideal situation is to write so awesome ruby code that it will never need any debugging
danshultz has quit [Remote host closed the connection]
simono has joined #ruby
<tsunamie> momomomomo, I have already read throught that and I can't see an example of where you can output the value of variables/objects to log
timonv has joined #ruby
tier has quit [Remote host closed the connection]
zorak8 has joined #ruby
danshultz has joined #ruby
ari-_-e has quit [Read error: Connection reset by peer]
sski has quit [Remote host closed the connection]
<timgauthier> shevy writes rubycode so good that it can self replicate as php
dawkirst has joined #ruby
sski has joined #ruby
<momomomomo> shevy: that's just a silly comment to make
<segfalt> tsunamie: Your snippet is probably correct, just the logs are either being sent to a file, or the logging level is not set high enough to actually log debug messages.
yfeldblum has quit [Ping timeout: 264 seconds]
Shidash has quit [Quit: Leaving.]
vpretzel has joined #ruby
OffTheRails has joined #ruby
bmcorser has left #ruby [#ruby]
<shevy> momomomomo so you write code that requires a debugger
<momomomomo> shevy: when I'm in the process of writing code, or figuring out a problem, I don't have the luxury of being omnipotent
<momomomomo> ie: I expect that my program runs as expected and tested, but what happens if something occurs that I don't expect?
<momomomomo> I know that I don't know what would happen, so I send output to my logs to check if something does occur
simono has quit [Quit: Textual IRC Client: www.textualapp.com]
jigy has quit []
blackmesa has quit [Quit: WeeChat 0.4.3]
danshultz has quit [Ping timeout: 276 seconds]
<momomomomo> case in point: most systems bigger than a small script outputs stderr and stdout to a logfile
iamcalledrob_ has joined #ruby
sski has quit [Ping timeout: 252 seconds]
simono has joined #ruby
mercerist has joined #ruby
<momomomomo> * to check in the event that something does occur
tier has joined #ruby
doodlehaus has joined #ruby
fixxxermet has joined #ruby
thesheff17 has joined #ruby
<tsunamie> segfalt, ty
mengu has quit [Remote host closed the connection]
akonny has joined #ruby
zorak8 has quit [Ping timeout: 252 seconds]
<fixxxermet> I'm having trouble getting the aws-sdk gem to load. Probably a dumb issue on my part. Could someone look here http://pastie.org/private/u3njjiuuekvll5n63gyexw and tell me what I'm missing?
sk87 has joined #ruby
iamcalledrob_ has quit [Ping timeout: 258 seconds]
<segfalt> fixxxermet: I see that you have rubygems installed, but have you installed the aws-sdk *gem*?
<segfalt> Wait, I see that now too, why is it in /var/lib/gems?
<segfalt> Hm, okay I guess that's just your install. Looks good...
<segfalt> fixxxermet: Did you require 'rubygems' before require 'aws-sdk'? That's required before Ruby 1.9.
pierre1_ has joined #ruby
<momomomomo> fixxxermet: aws-sdk is not supported on 1.8x
<fixxxermet> and that was it - I needed to require rubygems.
<segfalt> momomomomo: That's not true.
workmad3 has joined #ruby
<momomomomo> at least, by default; you'll need to install a version of nokogiri <= 1.5.0
<fixxxermet> Had a newer ruby on my dev box that on prod :)
<momomomomo> segfalt: "If you are using a version of Ruby older than 1.9, you may encounter problems with Nokogiri. The authors dropped support for Ruby 1.8.x in Nokogiri 1.6. To use aws-sdk, you'll also have to install or specify a version of Nokogiri prior to 1.6, like this:"
ferr has quit [Ping timeout: 276 seconds]
geggam has quit [Ping timeout: 252 seconds]
dangerou_ has quit [Read error: Connection reset by peer]
<segfalt> Huh. I guess we do that then.
dangerousdave has joined #ruby
<segfalt> Would you look at that: s.add_runtime_dependency('aws-sdk', ['= 1.33.0'])
<segfalt> s.add_runtime_dependency('nokogiri', ["= 1.5.9"])
<segfalt> Learn something new every day.
<momomomomo> segfalt: Might be better to check the actual support before confirming true/false :p
* Hanmac does not help users that want to use 1.8 ruby
lxsameer has quit [Quit: Leaving]
<segfalt> momomomomo: Perhaps. I was going out on a limb with, "We use 1.8.7 and aws-sdk every day." :-)
<momomomomo> doesn't mean you're using the latest version segfalt
reference-lost has quit [Ping timeout: 240 seconds]
<momomomomo> 1.41 (in the pastie) is latest
setra has quit [Ping timeout: 265 seconds]
<segfalt> wow, we just upgraded not long ago, they've been busy.
<momomomomo> ha, it came out last night
<segfalt> Hanmac: Sometimes people are stuck on old versions. Our platform is on 1.8.7 :-(.
<momomomomo> I don't use the gem, but saw on the GH page
banister has joined #ruby
<Hanmac> segfalt: let me quess ... outdated centos version?
<segfalt> No, three versions of Ubuntu, some Hardy systems in the wild.
* segfalt is working to deploy 3 versions of Ruby to all systems.
ctp_ has joined #ruby
shvelo has joined #ruby
<segfalt> I miss yum.
ndrei has quit [Ping timeout: 252 seconds]
<segfalt> repo management in yum was stupidly easy.
cocotton has quit [Remote host closed the connection]
bob_f has joined #ruby
ari-_-e has joined #ruby
bob_f has left #ruby [#ruby]
LadyRainicorn has quit [Remote host closed the connection]
duggiefresh has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
benzrf is now known as benzrf|offline
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
cocotton has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
cocotton has quit [Remote host closed the connection]
dingus_khan has joined #ruby
cocotton has joined #ruby
azuri5 has joined #ruby
<tsunamie> segfalt It was down to the loglevel of the jvm and when I lowered it to info it showed the output.
Jetchisel has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
benzrf|offline is now known as benzrf
<segfalt> tsunamie: sounds good, then?
zorak8 has joined #ruby
wowzers has joined #ruby
wowzers is now known as rbb
monkegjinni has quit [Remote host closed the connection]
mfmfmfmfmfmf has quit [Remote host closed the connection]
<tsunamie> segfalt, I have been reading the following document and was hoping you could expand on it for me.http://rubylearning.com/satishtalim/ruby_exceptions.html I don't understand how to format the exception or how information is parsed around
mfmfmfmfmfmf has joined #ruby
OffTheRails has quit [Ping timeout: 252 seconds]
* segfalt looks
ayaz has joined #ruby
jamto11 has joined #ruby
<tsunamie> segfalt, I know that in the following code https://github.com/elasticsearch/logstash/blob/master/lib/logstash/inputs/s3.rb on line 229 that something in there blows up. However I am trying to add exception catchs so that it does'nt fk up and start reloading the whole log again
<segfalt> Can you show me the stack trace from when things blow up?
<tsunamie> segfalt, I want to set it up so I can look at the specific line it chokes on. However a bit stuck on how to do that
<ddv> omg that register method
<segfalt> The stack trace should provide that.
<ddv> way too big
donnoc has joined #ruby
dingus_khan has quit [Ping timeout: 258 seconds]
roolo has quit [Quit: Linkinus - http://linkinus.com]
sailias has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
<segfalt> ddv: I've seen much worse :P
sambao21 has joined #ruby
<segfalt> tsunamie: It sounds like the stack trace *should* be giving you the information you need.
alexju has joined #ruby
<segfalt> I don't know much about jruby, but I assume it still provides good ol' stack traces.
<tsunamie> segfalt, it just tells me that it chokerd on UTF-8 character and was not expecting it
<segfalt> tsunamie: That's ALL it says?
zorak8 has quit [Ping timeout: 265 seconds]
<segfalt> Like, you type jruby something something and it just says that?
sski has joined #ruby
akonny has quit [Quit: akonny]
<tsunamie> {:timestamp=>"2014-05-23T13:13:30.181000+0000", :message=>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: <LogStash::Inputs::S3 bucket=>\"secret\", region=>\"secret\", credentials=>[\"secret\", \"secret\"], add_field=>{\"Service\"=>\"secret\", \"Environment\"=>\"PROD\"}, sincedb_path=>\"/opt/logstash/.sincedb_secret\", type=>\"secret\", prefix=>\"secret\", region_endpoint=>\"secret\">\n Error:
<tsunamie> invalid byte sequence in UTF-8", :level=>:error
mfmfmfmfmfmf has quit [Ping timeout: 264 seconds]
LadyRainicorn has joined #ruby
jamto11 has quit [Ping timeout: 258 seconds]
<segfalt> Gotcha, whatever manages plugins for logstash is eating the stacktrace and providing an error.
dangerousdave has joined #ruby
<tsunamie> segfalt, thats all I get in the log when it blows up. Everything else is just it loading values and happly swallowing it. This is at info level. Debug is just creazy.
lw has joined #ruby
<tsunamie> segfalt, is there a way of adding an exception catcher in there that will tell me the "lin" value when it blows up?
<segfalt> sure, but do you know what line it's blowing up at?
<segfalt> without a stacktrace, you probaly don't.
frobrob has quit [Ping timeout: 240 seconds]
<tsunamie> 221
<tsunamie> segfalt, I am guessing at the moment
<segfalt> Seems to indicate that they have a debug version of that output when you're in debug mode.
<segfalt> Check this out:
<segfalt> If @logger.debug? it uses the full output with a stack trace, that will tell you what line it blows up on. You might have to sift through some nasty logs first, but you know what to search for.
SCommette has joined #ruby
Guest__ has joined #ruby
<tsunamie> segfalt, what do I search for??? sorry trying to follow
meatherly has joined #ruby
meatherly has quit [Remote host closed the connection]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<segfalt> The first link is the translations file for english, it shows that you get the string "A plugin had an unrecoverable error. Will restart this plugin." when a plugin fails. If you enable debug, then search the logs for that you should get the same output, but with an Exception and Backtrace line.
monkegjinni has joined #ruby
pu22l3r has joined #ruby
<segfalt> Exception and Stack, they call it, apparently.
<tsunamie> segfalt, aahhh okay thanks
mjsmith2 has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
nateberkopec has joined #ruby
pu22l3r has quit [Remote host closed the connection]
jhass is now known as jhass|off
pu22l3r has joined #ruby
Ankhers has joined #ruby
ltdl has quit [Ping timeout: 252 seconds]
troulouliou_dev has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
bamyyyooo14335 has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
zorak has joined #ruby
donnoc has quit [Ping timeout: 258 seconds]
trhodes_ has quit [Quit: ZNC - http://znc.in]
<axilla> morning all, how do I validate_acceptance_of on a checkbox with id permission_3 if some case and display a error message to errors.add :base
except has joined #ruby
chipotle has joined #ruby
<axilla> that was meant more for rails chat, sorry
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
lukec has joined #ruby
ghr has quit []
supermarin has joined #ruby
jimbow has joined #ruby
shashin has quit [Remote host closed the connection]
<tsunamie> segfalt, sighs, I ran in debug for a about 5 minutes and produced a log 2GB large. did a search in it via vi for "A plugin had an unrecoverable error" and nothing shows up
Guest__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<segfalt> tsunamie: Wow, 2G. That's verbose. :-) Not sure, code seems to indicate that if you're getting that error with logging set to info, it should post the same error with more info on debug. Might try reaching out on their issue tracker?
azuri5 has left #ruby ["Leaving"]
<tsunamie> segfalt, wait just did a cat, that seems to be more reliable. Got it
<tsunamie> segfalt, one sec will pastbin it
<TwinkleHood> Best way to do string.chomp('/') in both ends of the string. string.chomp('/').reverse.chomp('/') seems bad.
fixxxermet has left #ruby [#ruby]
jimbow has quit [Ping timeout: 252 seconds]
Rainicorn has joined #ruby
tanmay_ has quit [Remote host closed the connection]
trhodes_ has joined #ruby
ghr has joined #ruby
lethjakman has joined #ruby
zB0hs has joined #ruby
zB0hs has quit [Max SendQ exceeded]
LadyRainicorn has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
yfeldblum has joined #ruby
<segfalt> TwinkleHood: Do you have other slashes you need to keep?
<segfalt> Or do you just want to eradicate slashes?
<apeiros> TwinkleHood: .gsub(%r{\A/|/\z/, '')
echevemaster has joined #ruby
<apeiros> also your bad solution is missing a .reverse in the end ;-)
larissa has joined #ruby
coderhs has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
marr has quit [Ping timeout: 245 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mjs2600 has quit []
<TwinkleHood> segfalt, I need a generic way.
moritzs has quit [Ping timeout: 265 seconds]
<TwinkleHood> apeiros Yeah, I thought about regexing it. Seems like a fairly basic functionality, werid having to mixin for.
<TwinkleHood> apeiros, lol, true.
<segfalt> TwinkleHood: If you're concerned about performance you could probably write something faster than Regexp.
<TwinkleHood> segfalt, I'm just curious why the string class doesn't support this. Thought there might be an easy way I'd overlooked.
<segfalt> using String#[] with indexes and ranges.
paulfm has quit []
mjs2600 has joined #ruby
<segfalt> Yeah, like if #ltrim took chars to trim?
<segfalt> That would be nice.
zorak has quit [Ping timeout: 252 seconds]
<TwinkleHood> Indeed.
<TwinkleHood> That was my first thought too.
iamcalledrob_ has joined #ruby
<apeiros> segfalt: I doubt it
<apeiros> regex is quite fast
<apeiros> and method overhead is big in ruby
<segfalt> that's true
<segfalt> could be a fun experiment
<TwinkleHood> But if you do want at least one method.
<tsunamie> segfalt, sorry this is what it pumped out http://pastebin.com/KQH3Ch4c everything else seems to be legitimate around this stacktrace
<apeiros> you can monkey-patch a custom method on string
<TwinkleHood> apeiros, I'm perfectly aware.
<segfalt> oh man how I *LOVE* programs that dump JSON.
paulfm has joined #ruby
<segfalt> or, hash inpect i guess
<segfalt> whatever, it sucks
<apeiros> class String; def strip_string(substr); gsub(/\A#{Regexp.escpae(substr)}|#{Regexp.escpae(substr)}\z/, ''); end
<apeiros> + end
<TwinkleHood> Do you think that's as fast as it gets?
<TwinkleHood> That's a lot of method overhead.
<apeiros> a c extension would be faster
<apeiros> but other than that… you can factor out the escape
donnoc has joined #ruby
SCommette has quit [Quit: SCommette]
cocotton has quit [Remote host closed the connection]
iamcalledrob_ has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
rm_ has joined #ruby
ehc has quit [Client Quit]
dik_dak has joined #ruby
ehc has joined #ruby
<TwinkleHood> Idunno. I think I'll benchmark it against conditional slicing.
aganov has quit [Remote host closed the connection]
paulfm has quit [Read error: Connection reset by peer]
shvelo has quit [Ping timeout: 265 seconds]
paulfm has joined #ruby
<segfalt> Is this a high-performance area of code, or just academic curiosity?
<TwinkleHood> academic curiousity.
<segfalt> tsunamie: Hm, do they recommend using it with jruby?
<apeiros> TwinkleHood: slicing requires matching first, though
<tsunamie> segfalt, ?? not following
<segfalt> tsunamie: You're running logstash with jruby, is that what is recommended?
<apeiros> TwinkleHood: but please do benchmark and paste code + results
akemrir has quit [Quit: WeeChat 0.4.3]
<tsunamie> segfalt, yes, as jruby is deployed with the logstash bundle
sk87 has joined #ruby
zorak has joined #ruby
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segfalt> tsunamie: Not sure then, you may have to try the logstash devs :-( Something seems very broken.
<segfalt> TwinkleHood: Are you expecting '//Hello' to return '/Hello', or 'Hello'?
* segfalt is also writing an implementation rather than doing his job.
mikehaas763 has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<tsunamie> segfalt, ty for your help. Learned alot
codabrink has quit [Read error: Connection reset by peer]
<segfalt> tsunamie: np
<mikehaas763> vb.customize [
<mikehaas763> "modifyvm", :id,
<mikehaas763> "--memory", deploy_config["memory"],
<mikehaas763> "--cpus", deploy_config["cpu"]
<mikehaas763> ]
<mikehaas763> oops sorry
<mikehaas763> didn't mean to paste that
Macaveli has quit [Ping timeout: 252 seconds]
<mikehaas763> Is it a pretty typical convention to have brackets in the same position (space) when on different lines? Like so: https://gist.github.com/anonymous/5f0a37a81e9ba708b598 My IDE (intellij) keeps formatting it that way.
<TwinkleHood> segfalt '/hello' :)
<TwinkleHood> segfalt That's the curse of ruby. Implementing stuff is fun.
<segfalt> right?
<segfalt> lol
Guest__ has joined #ruby
<segfalt> mikehaas763: The paste you pasted they are not lined up? But yeah, I either line them up, or align the closing one with the v in vb.customize
<mikehaas763> * Idk why but that gist offset the last 4 lines even more
zorak has quit [Ping timeout: 252 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
yokel has quit [Quit: leaving]
cocotton has joined #ruby
jdoes has joined #ruby
<mikehaas763> ddv: thanks I didn't realize that was covered in the style guide.
gyre007_ has left #ruby [#ruby]
dingus_khan has joined #ruby
cocotton has quit [Remote host closed the connection]
<mikehaas763> segfalt: Looks like the style guide actually never mentions aligning them on the same space. Either at the v like you said or put the whole literal after the identifier on new lines
codabrink has joined #ruby
zorak has joined #ruby
mr_snowf1ake has quit [Ping timeout: 264 seconds]
endash has joined #ruby
<segfalt> mikehaas763: Sounds right. I have Rubocop integrated in my editor, and I just do whatever it tells me to so it stops highlighting my bad code.
freezey has joined #ruby
_justin has quit [Quit: _justin]
geggam has joined #ruby
mfmfmfmfmfmf has joined #ruby
dingus_khan has quit [Ping timeout: 276 seconds]
mr_snowf1ake has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
mary5030 has joined #ruby
cocotton has joined #ruby
mary5030 has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
OffTheRails has joined #ruby
SCommette has joined #ruby
zB0hs has joined #ruby
hrs has joined #ruby
eka has joined #ruby
freezey has joined #ruby
LekeFly has quit [Ping timeout: 240 seconds]
endash has quit [Read error: Connection reset by peer]
endash_ has joined #ruby
`ph8 is now known as ph8
ph8 has quit [Changing host]
ph8 has joined #ruby
supermarin has quit [Quit: Computer has gone to sleep.]
mikesplain has joined #ruby
supermarin has joined #ruby
kotakotakota has joined #ruby
ryanleesipes has joined #ruby
enebo has joined #ruby
tagrudev has quit [Remote host closed the connection]
moneydouble has joined #ruby
mercerist has joined #ruby
mr_snowf1ake has quit [Ping timeout: 276 seconds]
supermarin has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
mengu has quit []
bamyyyooo14335_ has joined #ruby
ponga has joined #ruby
bamyyyooo14335 has quit [Ping timeout: 265 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
bamyyyooo14335_ is now known as bamyyyooo14335
zorak has quit [Ping timeout: 252 seconds]
EagleDelta has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
kevind has joined #ruby
subraminion has quit [Quit: Lingo - http://lingoirc.com]
zorak has joined #ruby
ta has quit [Quit: Leaving...]
Guest__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ankhers has quit [Ping timeout: 272 seconds]
banister has joined #ruby
sambao21 has joined #ruby
snath has quit [Ping timeout: 240 seconds]
centrx has joined #ruby
centrx has quit [Client Quit]
shvelo has joined #ruby
acrussell has joined #ruby
supermarin has quit [Quit: Computer has gone to sleep.]
LadyRainicorn has joined #ruby
supermarin has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
yokel has joined #ruby
hrs has quit [Quit: Textual IRC Client: www.textualapp.com]
treehug88 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
Rainicorn has quit [Ping timeout: 252 seconds]
glenfe has joined #ruby
supermarin has quit [Ping timeout: 258 seconds]
bbloom has quit [Quit: Textual IRC Client: www.textualapp.com]
arrubin has joined #ruby
phutchins has joined #ruby
Ankhers has joined #ruby
SOLEIL has joined #ruby
supermarin has joined #ruby
jprovazn is now known as jprovazn_afk
fantazo has joined #ruby
Advocation has joined #ruby
kotk_ has joined #ruby
donnoc has quit [Ping timeout: 276 seconds]
bal has quit [Quit: bal]
kotk__ has joined #ruby
maoko has joined #ruby
kotk has quit [Ping timeout: 252 seconds]
endash_ has quit [Quit: endash_]
tobago has quit [Remote host closed the connection]
danijoo has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
zorak has quit [Ping timeout: 265 seconds]
except has quit [Ping timeout: 240 seconds]
lmickh has joined #ruby
zorak has joined #ruby
kotk_ has quit [Ping timeout: 276 seconds]
samuel02 has joined #ruby
Rahul_Roy has joined #ruby
<samuel02> Is there any nicer way of doing: Regexp.new(Regexp.escape(foo)) =~ bar || Regexp.new(Regexp.escape(bar)) =~ foo ?
hgl has quit [Read error: Connection reset by peer]
iamcalledrob_ has joined #ruby
danman has joined #ruby
donnoc has joined #ruby
monkegjinni has quit []
<apeiros> samuel02: bar.include?(foo) || foo.include?(bar)
<samuel02> apeiros: thanks
noop has quit [Ping timeout: 252 seconds]
<samuel02> works in 1.9.3 as well?
dangerousdave has quit [Read error: Connection reset by peer]
codeurge has joined #ruby
marcdel has joined #ruby
anarang has quit [Ping timeout: 245 seconds]
dangerousdave has joined #ruby
jhass|off is now known as jhass
marcdel_ has joined #ruby
iamcalledrob_ has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
toastynerd has joined #ruby
ponga has quit []
<hiall> Is there an optimal way fo converting an array of hashes into nested arrays? using .each doesn’t seem to work? http://paste2.org/sG2AkG9N
marcdel has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<segfalt> hiall: In that paste, what output are you looking to get?
<apeiros> hiall: `obj.each …` *always* returns obj
yekta has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
JumpMast3r_ has joined #ruby
<apeiros> and collect does not mutate the receiver
<apeiros> so nothing really happens in your code (except wasted cpu cycles)
<Hanmac> hiall:
<Hanmac> >> list = [{:one=>1, :two=>2}, {:nine=>6, :seven=>7}]; list.map(&:values)
<eval-in__> Hanmac => [[1, 2], [6, 7]] (https://eval.in/156190)
<hiall> segfalt: [[1,2],[6,7]]
Xeago has quit [Remote host closed the connection]
<hiall> thats it haha. epic thanks guys
endash has joined #ruby
<apeiros> hiall: list.map(&:values)
<hiall> thank you
<segfalt> make sure you capture the return value, list is not going to change.
jrhe has joined #ruby
<apeiros> will return that. it won't convert the existing array.
<apeiros> hiall: check the docs on map vs. map!
<hiall> will do
<apeiros> (map/collect are aliases)
NukePuppy has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Client Quit]
meatherly has joined #ruby
supermarin has quit [Quit: Computer has gone to sleep.]
dfinly has joined #ruby
supermarin has joined #ruby
sinkensabe has quit [Ping timeout: 245 seconds]
kotk has joined #ruby
mikepack has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
bbloom has joined #ruby
mikepack has joined #ruby
zorak has quit [Ping timeout: 245 seconds]
danijoo has joined #ruby
Advocation has joined #ruby
kotk__ has quit [Ping timeout: 265 seconds]
Advocation has quit [Client Quit]
Advocation has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
elabs-developer has quit [Quit: elabs-developer]
hamakn has quit [Remote host closed the connection]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
freezey has quit [Remote host closed the connection]
supermarin has quit [Ping timeout: 252 seconds]
lyanchih has joined #ruby
Rylee has quit [Max SendQ exceeded]
hamakn has joined #ruby
endash has quit [Quit: endash]
yekta has quit [Quit: yekta]
jobewan has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 264 seconds]
Bira has quit []
dingus_khan has joined #ruby
rm_ has quit [Remote host closed the connection]
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
rm_ has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
noop has joined #ruby
nopc0de is now known as zz_nopc0de
marcdel_ has quit []
anarang has joined #ruby
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
diegoviola has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
zz_nopc0de is now known as nopc0de
jamto11 has joined #ruby
frogssgy has quit [Read error: Connection reset by peer]
tier has quit [Remote host closed the connection]
frogssgy has joined #ruby
dingus_khan has quit [Ping timeout: 265 seconds]
dideler|work has quit [Ping timeout: 240 seconds]
Rylee has joined #ruby
stormy3 has joined #ruby
toastynerd has quit [Remote host closed the connection]
<stormy3> any one able to help, i'm trying to run " rake1.9.1 RAILS_ENV=production db:migrate
Rylee has quit [Client Quit]
<stormy3> rake aborted!
<stormy3> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
Rylee has joined #ruby
<stormy3> and get that error, any one ideas?
maximski has joined #ruby
Sigma00 has quit [Ping timeout: 276 seconds]
Bira has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
tier has joined #ruby
marcdel has joined #ruby
hl has quit [Quit: Quit]
blackmesa has quit [Ping timeout: 240 seconds]
<jhass> stormy3: change into a directory containing a Rakefile
hl has joined #ruby
dideler|work has joined #ruby
heftig has quit [Quit: Quitting]
jamto11 has quit [Ping timeout: 258 seconds]
<benzrf> guise
<benzrf> main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
netf has quit [Ping timeout: 255 seconds]
lethjakman has joined #ruby
<benzrf> ^i managed to decipher this im porund
<benzrf> *proud
marcdel_ has joined #ruby
netf has joined #ruby
<stormy3> jhass: where would i find one? sorry to be thick!
<jhass> in the project you're trying to run
ponga has joined #ruby
freezey has joined #ruby
jamto11 has joined #ruby
donnoc has quit [Ping timeout: 265 seconds]
mjs2600 has joined #ruby
marcdel has quit [Ping timeout: 258 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
Sigma00 has joined #ruby
bradhe has quit [Remote host closed the connection]
Deele has joined #ruby
panga has joined #ruby
francisfish has quit []
eldina_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140428115719]]
hamakn has joined #ruby
Xeago has joined #ruby
fresham has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<stormy3> school boy error!
<Sp4rKy> .W 40
<stormy3> install the correct software on the correct server!
<stormy3> fixed jhass :D
samuel02 has quit []
b00stfr3ak has joined #ruby
ponga has quit [Ping timeout: 265 seconds]
hamakn has quit [Remote host closed the connection]
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
hamakn has joined #ruby
phutchins has quit [Ping timeout: 252 seconds]
nerium has quit [Quit: nerium]
tier has quit [Remote host closed the connection]
snath has joined #ruby
jwang has quit [Quit: Leaving]
gverri has joined #ruby
Fire-Dragon-DoL has joined #ruby
bluenemo has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
bamyyyooo14335 has joined #ruby
nvrch has quit [Quit: nvrch]
jdoes has quit [Ping timeout: 252 seconds]
G________ has joined #ruby
benzrf|offline is now known as benzrf
blackmesa has joined #ruby
benzrf is now known as benzrf|offline
tvw has quit []
Retroid has quit [Ping timeout: 240 seconds]
mark_locklear has joined #ruby
<tsunamie> segfalt, you still there?
bamyyyooo14335 has quit [Ping timeout: 240 seconds]
ffranz has joined #ruby
vpretzel has quit [Remote host closed the connection]
lethjakman has quit [Ping timeout: 252 seconds]
vpretzel has joined #ruby
Toger has joined #ruby
centrx has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
maletor has joined #ruby
zigomir has quit []
Advocation has quit [Quit: Advocation]
iamcalledrob_ has joined #ruby
Hanmac1 has joined #ruby
rm_ has quit []
_justin has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
Retroid has joined #ruby
gregf has joined #ruby
freezey has quit [Remote host closed the connection]
yfeldblum has joined #ruby
nerium has joined #ruby
maestrojed has joined #ruby
vpretzel_ has joined #ruby
i_s has joined #ruby
apeiros has quit []
b1205 has joined #ruby
timonv has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
kaleido has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
supermarin has joined #ruby
timonv has joined #ruby
s2013 has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 252 seconds]
jimbow has joined #ruby
timonv has quit [Remote host closed the connection]
schickung has quit [Quit: schickung]
combusean has joined #ruby
anaeem1 has joined #ruby
sski has quit [Remote host closed the connection]
bradhe has joined #ruby
iamcalledrob_ has quit [Quit: Computer has gone to sleep.]
sski has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
arianit has joined #ruby
arianit has quit [Changing host]
arianit has joined #ruby
RandyT has quit [Ping timeout: 255 seconds]
_justin has quit [Quit: _justin]
SOLEIL has quit [Quit: MegaIRC v4.06 http://ironfist.at.tut.by]
RandyT has joined #ruby
ehc has quit [Quit: ehc]
jamto11 has quit [Remote host closed the connection]
ehc has joined #ruby
benzrf|offline is now known as benzrf
Xeago has quit [Remote host closed the connection]
smathieu has joined #ruby
SCommette has quit [Quit: SCommette]
sski has quit [Ping timeout: 265 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
aspires has joined #ruby
panga has quit []
ponga has joined #ruby
Hobogrammer has joined #ruby
nowthatsamatt has joined #ruby
fantazo has quit [Ping timeout: 252 seconds]
freezey has joined #ruby
AndChat| has quit [Ping timeout: 258 seconds]
Kabaka has joined #ruby
nowthatsamatt has quit [Client Quit]
moritzs has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
jambolina has quit [Ping timeout: 245 seconds]
b1205 has quit [Ping timeout: 252 seconds]
vpretzel_ is now known as vpretzel
|nxr| has joined #ruby
chipotle has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
except has joined #ruby
|nxr| has quit [Client Quit]
thomasxie has quit [Quit: Leaving.]
blackmesa has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
chipotle has quit [Client Quit]
s2013 has joined #ruby
fresham has left #ruby [#ruby]
fresham has joined #ruby
b1205 has joined #ruby
akonny has joined #ruby
lethjakman has joined #ruby
JumpMast3r_ has quit [Quit: JumpMast3r_]
jimbow has quit [Quit: leaving]
freerobby has joined #ruby
anarang has quit [Ping timeout: 264 seconds]
shvelo has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
baroquebobcat has joined #ruby
mjs2600 has joined #ruby
jimbow has joined #ruby
franzip has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
<jimbow> why does this code produce nil?
mjs2600 has quit [Remote host closed the connection]
<toretore> define produce nil
carraroj has joined #ruby
<jimbow> idk, => nil ?
<jimbow> i'm still a ruby neophyte
<toretore> that doesn't tell me anything
<toretore> need more information
ctp_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby
<jhass> jimbow: hm, that should raise a NoMethodError
<toretore> are you running this file with ruby?
<centrx> jimbow, Look at the documentation for Kernel#puts
<centrx> jimbow, You'll see puts returns nil
lw has quit [Ping timeout: 245 seconds]
<jhass> >> class MyClass; private; def say_hello; puts "Hello world!"; end; end; MyClass.new.say_hello
<eval-in__> jhass => private method `say_hello' called for #<MyClass:0x415122a0> (NoMethodError) ... (https://eval.in/156198)
CorpusCallosum has quit [Read error: Connection reset by peer]
maletor has joined #ruby
Hobogrammer has quit [Ping timeout: 252 seconds]
<jimbow> thanks centrx and jhass
timonv has joined #ruby
sinkensabe has joined #ruby
dawkirst has quit [Remote host closed the connection]
<toretore> you are way too quick to answer; let people think for themselves for a bit, define their expectations
<jimbow> how long did it take you to get the hang of programming when you were a neophyte?
toastynerd has quit [Remote host closed the connection]
<jimbow> toretore: i've been reading the documentations and they're pretty confusing
<LadyRainicorn> 10000 hours
<LadyRainicorn> ;p
phinfonet has joined #ruby
lw has joined #ruby
<jimbow> that diagram for me is really confusing
<jimbow> it looks like gibberish to me
<toretore> jimbow: i was talking to everyone else; it was pretty clear that there were multiple levels of this code you didn't still understand
<toretore> i wanted to get you to think and explain how you're thinking
<jimbow> oh
coderhs has quit [Ping timeout: 240 seconds]
<toretore> that way you'll learn more
<jimbow> i want to learn as much as i can
dawkirst has joined #ruby
<jimbow> a lot of these examples in the docs don't really explain the "basics" too well
wallerdev has joined #ruby
Xeago has quit [Remote host closed the connection]
tier has joined #ruby
bamyyyooo14335 has joined #ruby
arianit has quit [Ping timeout: 240 seconds]
alpha123 has joined #ruby
Megtastique has quit []
noop has quit [Ping timeout: 240 seconds]
<toretore> in this example, it's pretty simple
<toretore> first of all, if this was the code you were really running, it would have produced a NoMethodError like jhass mentioned
<toretore> because you've marked the method as private
<toretore> then, we're assuming that by "produce nil" you mean the return value of the method
<toretore> which, as centrx said, returns nil
<toretore> it only causes a side effect
jaake has quit [Ping timeout: 240 seconds]
anarang has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
yacks has quit [Ping timeout: 252 seconds]
dawkirst has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 276 seconds]
<jimbow> why would you use private instead of public?
MatthewsFace has joined #ruby
sinkensabe has quit [Remote host closed the connection]
einarj has joined #ruby
<toretore> a private method can only be called from inside the object
<toretore> that is, from another method defined on the same class
<toretore> (or subclass)
<ponga> as a security reason?
sinkensabe has joined #ruby
<toretore> mostly it is to hide it from the outside world
<terrellt> Helps define the boundaries of your application.
<ponga> jimbow it may not bee ruby-specific answer but i use private so it wouldn't be modified as i not wanted so
<canton7> if you write a library, which are people are going to use, it means you can specify which methods other people can and can't call
_bart has quit [Quit: leaving]
marcdel_ has quit []
magri has quit [Read error: Connection reset by peer]
<canton7> if they're allowed to call all of your methods, then you can't change how any of them behave without breaking other peoples' code
<terrellt> Your public methods need to maintain their interface without a major version hop. Private methods can do whatever.
Shidash has joined #ruby
<canton7> if you restrict them to only calling the methods you want them to call, then you can change everything else whenever you like
fresham has left #ruby [#ruby]
<canton7> this also applies, perhaps more strongly, when you're writing a library for yourself, or as part of your application. reminding yourself what you are and aren't meant to do is very useful
binaryhat has joined #ruby
tkuchiki has joined #ruby
<toretore> or you could think more about your interfaces ;)
ponga has left #ruby [#ruby]
<canton7> I was trying to avoid concepts like APIs and interfaces :P
<toretore> it's easy to think "i'll just shove this into a private method" instead of being careful about designing the interface
ponga has joined #ruby
einarj has quit [Remote host closed the connection]
ponga has left #ruby [#ruby]
<terrellt> Shove everything in a private method. Ninja programming.
Hobogrammer has joined #ruby
<ericwood> that's the spirit
<terrellt> (MyModel.methods - Object.methods) == []
sinkensabe has quit [Ping timeout: 245 seconds]
jaimef has quit [Excess Flood]
marr has joined #ruby
x1337807x has joined #ruby
<LadyRainicorn> methods(false) is often helpful
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
ghr has joined #ruby
magri has joined #ruby
axilla has joined #ruby
Spami has joined #ruby
<jimbow> i know this is going to be another silly question, but is there a diagram or picture explaining how private methods differ from public and what they're supposed to be used for?
jaimef has joined #ruby
<jhass> jimbow: private methods are methods you can't call outside of a class
<centrx> jimbow, It is a way of organizing your code so you do not call a method you did not mean to outside the class.
<jhass> you use them to compose the functionality of your public methods without repeating code or letting them get very long
<jimbow> oh
hamakn has quit [Remote host closed the connection]
<jimbow> wow, it's like something clicked in my head
<jimbow> thanks a lot!
<centrx> jimbow, It's also useful for building APIs/libraries/gems, limiting the public interface that your users have access to
hamakn has joined #ruby
<terrellt> Just be careful, if you use the wrong number of private methods it summons Cthulhu.
<jimbow> haha
<jhass> hm
<jhass> I think that number is 0 :P
<terrellt> puts "Hello World", Cthulhu summoned.
<jhass> \o/
Valesk has joined #ruby
tiguser has quit [Ping timeout: 252 seconds]
<jimbow> i've always thought hp lovecraft was british
kaspergrubbe has quit [Remote host closed the connection]
helpa has quit [Remote host closed the connection]
lagweezle has joined #ruby
helpa has joined #ruby
<lagweezle> Arg. Feeling dumb that I can't find this ... what does &= do in ruby?
_Andres has quit [Quit: jazz]
<certainty> lagweezle: assign the rhs if the lhs is truthy
<jhass> that's &&=
<certainty> woops
<certainty> i thought that was a typo
<jhass> a &= b is a = a & b
eka_ has joined #ruby
teddyp1cker has joined #ruby
<jhass> maybe, we don't know
endash has joined #ruby
<lagweezle> No, I really did mean &=.
<jhass> lagweezle: it's the same for all operators, a op= b is a = a op b
<jhass> lagweezle: just &&= and ||= are special
ascarter_ has joined #ruby
<lagweezle> jhass: Good to remember! Hopefully I do. ^^;
<certainty> >> 3 ^= 0
<eval-in__> certainty => /tmp/execpad-63deba746e31/source-63deba746e31:2: syntax error, unexpected tOP_ASGN, expecting keyword_end ... (https://eval.in/156200)
<certainty> :(
<centrx> >> ["K", "H", (65.chr * rand(30)), "N"].flatten.join
<centrx> eval-in__, fu
<centrx> >> ["K", "H", (65.chr * rand(30)), "N"].flatten.join
<eval-in__> centrx => "KHAAAAAAAAAAAAAAAAAAAN" (https://eval.in/156201)
<eval-in__> centrx => "KHAAAN" (https://eval.in/156202)
<lagweezle> Cute.
mjs2600 has joined #ruby
eka has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
<lagweezle> Interesting. & works as a logical AND only for nil, true, and false (and anything YOU define #& for with that behavior) ...
JoeGaudet has joined #ruby
<lagweezle> logical / boolean
Megtastique has joined #ruby
<Mon_Ouie> Also it's still different from &&, because && w
<Mon_Ouie> will shortcircuit evaluation
<Mon_Ouie> >> false && (puts 'no need to evaluate this bit')
<eval-in__> Mon_Ouie => false (https://eval.in/156204)
<Mon_Ouie> >> false & (puts 'no need to evaluate this bit')
<eval-in__> Mon_Ouie => no need to evaluate this bit ... (https://eval.in/156205)
fresham has joined #ruby
iceden has quit [Read error: Connection reset by peer]
Shidash has quit [Ping timeout: 252 seconds]
<terrellt> Uh
<terrellt> Of course it does that.
<Mon_Ouie> The point is & doesn't do that
deric_skibotn has joined #ruby
<terrellt> Of course they work differently, since & isn't a logical AND operator. It's an intersect operator.
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<terrellt> It better evaluate the second one, otherwise I can't do...
<terrellt> >> 5 & 3
<terrellt> eval-in__: Hate you too
toastynerd has joined #ruby
<LadyRainicorn> >> def x()return & 5; end; x
<eval-in__> LadyRainicorn => /tmp/execpad-fba8e473e99e/source-fba8e473e99e:2: block argument should not be given (https://eval.in/156206)
<LadyRainicorn> >> def x() return() & 5; end; x
<eval-in__> LadyRainicorn => false (https://eval.in/156207)
maoko has joined #ruby
jambolina has joined #ruby
coderhs has joined #ruby
TwinkleHood has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<terrellt> But yeah, it's for things like..
fresham is now known as CodyFrazer
<terrellt> >> [1,2,3,4] & [3,2]
<eval-in__> terrellt => [2, 3] (https://eval.in/156209)
CodyFrazer is now known as CodyF
<terrellt> >> [1,2,3,4] & [3,2,5]
<eval-in__> terrellt => [2, 3] (https://eval.in/156210)
ghr has quit [Ping timeout: 252 seconds]
lkba has joined #ruby
<terrellt> Should be a set intersect too, so it should be unique..
<terrellt> >> [1,2,3,4] & [3,3,2,5]
<eval-in__> terrellt => [2, 3] (https://eval.in/156211)
<terrellt> lagweezle: ^
<LadyRainicorn> >> [1,1] & [1]
<eval-in__> LadyRainicorn => [1] (https://eval.in/156212)
<lagweezle> Aye. I saw the set intersect bits as well. :)
setra has joined #ruby
<LadyRainicorn> >> [1,1] & [1,1]
<eval-in__> LadyRainicorn => [1] (https://eval.in/156213)
english- has joined #ruby
cocotton has joined #ruby
<terrellt> Relational algebra turned out to be surprisingly useful.
cocotton has quit [Remote host closed the connection]
<lagweezle> I guess it'd ... hm.
aspires has quit []
<lagweezle> >> [true, true] & [true]
<eval-in__> lagweezle => [true] (https://eval.in/156214)
<lagweezle> >> [true, true] & [false]
<eval-in__> lagweezle => [] (https://eval.in/156215)
cocotton has joined #ruby
<lagweezle> >> [true] & [false]
<eval-in__> lagweezle => [] (https://eval.in/156217)
<terrellt> Might want to use IRB for your tests.
momomomomo has quit [Quit: momomomomo]
<terrellt> I get more use out of the union operator.
aspires has joined #ruby
_justin has joined #ruby
<terrellt> >> [6,2,1,3,4] | [7,7,7,7,7,9,2]
<eval-in__> terrellt => [6, 2, 1, 3, 4, 7, 9] (https://eval.in/156219)
Freddan962 has joined #ruby
<Freddan962> Hello - would anyone like to work on a game project together using the Gosu 2D library?
timonv has quit [Ping timeout: 265 seconds]
cocotton has quit [Ping timeout: 245 seconds]
jhulten has joined #ruby
SCommette has joined #ruby
timonv has joined #ruby
klaut has quit [Remote host closed the connection]
mfmfmfmfmfmf has quit [Remote host closed the connection]
english- has left #ruby ["Leaving"]
chrisseaton has joined #ruby
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maximski has quit []
lukec has quit [Quit: lukec]
iceden has joined #ruby
jhulten has quit [Ping timeout: 265 seconds]
CodyF is now known as CodyF|lunch
jxf has joined #ruby
alex88 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
paulfm has quit []
mjsmith2 has quit [Remote host closed the connection]
_justin has quit [Quit: _justin]
mjsmith2 has joined #ruby
<shevy> Freddan962 sounds like a lot of work
ndrei has quit [Ping timeout: 240 seconds]
mikehaas763 has quit [Remote host closed the connection]
paulfm has joined #ruby
saarinen has joined #ruby
aspires has quit []
aspires has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
AlSquire has quit [Quit: Quitte]
nateberkopec has quit [Quit: Leaving...]
aspires has quit [Client Quit]
havenwood has joined #ruby
<havenwood> fri += 1
aspires has joined #ruby
jhulten has joined #ruby
<Hanmac1> havenwood: and? do you have time for DoctorWho at this weekend?
<havenwood> Hanmac1: yes! :D
Hanmac1 is now known as Hanmac
<terrellt> Wha?
<havenwood> Hanmac1: been a hectic week, so glad for weekend
<centrx> Who?
<Hanmac> havenwood: what was your last episode or didnt you watch any recently?
<havenwood> Doctor Wha?
<havenwood> Hanmac: no progress
wallerdev has quit [Quit: wallerdev]
mjsmith2 has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
ndrei has joined #ruby
obs has quit [Quit: Saliendo]
zB0hs has joined #ruby
wallerdev has joined #ruby
SegFaultAX has quit [Excess Flood]
dingus_khan has joined #ruby
wallerdev has quit [Client Quit]
yfeldblum has joined #ruby
except has quit [Ping timeout: 252 seconds]
lukec has joined #ruby
SegFaultAX has joined #ruby
hamakn has quit [Read error: No route to host]
nerium has quit [Quit: nerium]
hamakn has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
chrisseaton has quit []
cocotton has joined #ruby
anarang has quit [Quit: Leaving]
mjsmith2 has joined #ruby
asramos has joined #ruby
skysploit has joined #ruby
skysploit has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
supermarin has quit [Quit: Computer has gone to sleep.]
chrisseaton has joined #ruby
supermarin has joined #ruby
ta has joined #ruby
x1337807x has joined #ruby
wallerdev has joined #ruby
cocotton has quit [Remote host closed the connection]
paulfm has quit []
alem0lars has quit [Quit: alem0lars]
pietr0 has joined #ruby
eka_ is now known as eka
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
Sawbones has joined #ruby
cocotton has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
<jimbow> how do you load a ruby program?
benzrf is now known as benzrf|offline
Hanmac1 has joined #ruby
<jimbow> load in irb right?
supermarin has quit [Ping timeout: 240 seconds]
<jimbow> or ruby + path/to/file?
<jhass> ruby file.rb
<jhass> avoid using load unless you know what you're doing
soulcake has joined #ruby
BRMatt has joined #ruby
olivier_bK has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
<havenwood> jimbow: from irb you'd use `require` or `require_relative`
saarinen has quit [Quit: saarinen]
<jimbow> thanks guys
<jimbow> something is not right and i am going to try to find out what it is
aspires has quit []
<havenwood> jimbow: to see the options available with `ruby your_ruby_code.rb` checkout: man ruby
thesheff17 has quit [Quit: Leaving]
meatherly has quit [Remote host closed the connection]
<jimbow> fancy stuff... i'm going to make a sample program
chipotle has joined #ruby
<havenwood> jimbow: ruby -e "puts 42"
thesheff17 has joined #ruby
aspires has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrisseaton has quit []
<jimbow> that's interesting it did nothing but leave a blank space on the terminal and then it went back to normal
<jimbow> Last login: Fri May 23 10:25:46 on ttys003
jprovazn_afk has quit [Quit: Odcházím]
<jimbow> rubyans-imac:~ admin$ ruby -e puts 42
<jimbow> yans-imac:~ admin$
<havenwood> jimbow: The quotes aren't optional.
nanoyak has joined #ruby
<havenwood> jimbow: (it just did the puts)
postmodern has joined #ruby
<jimbow> oh silly me forgetting that this is ruby syntax
pen has joined #ruby
<havenwood> jimbow: it's shellword splitting just the "puts" unless you put them together with "puts 42"
<havenwood> eval
Hanmac has joined #ruby
replay has quit [Quit: Lost terminal]
RaptorJesus has quit [Ping timeout: 272 seconds]
mikesplain_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
nateberkopec has joined #ruby
Hanmac1 has quit [Ping timeout: 276 seconds]
chipotle has quit [Quit: cya]
<jimbow> shellword splitting is a completely new thing to me and i don't really get what it does, but it's interesting nonetheless
paulfm has joined #ruby
chrisseaton has joined #ruby
sjkaliski has joined #ruby
Eyess has quit [Read error: Connection reset by peer]
nateberkopec has quit [Read error: Connection reset by peer]
zorak has joined #ruby
mikesplain has quit [Ping timeout: 258 seconds]
mikesplain_ is now known as mikesplain
x1337807x has quit [Ping timeout: 240 seconds]
Eyes has joined #ruby
tkuchiki has quit [Remote host closed the connection]
meatherly has joined #ruby
lyanchih has quit [Quit: lyanchih]
mercerist has joined #ruby
<havenwood> jimbow: just how bash etc split up commands: https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html
nateberkopec has joined #ruby
<havenwood> >> require 'shellwords'; ['ruby -e puts 42'.shellsplit, 'ruby -e "puts 42"'.shellsplit]
<eval-in__> havenwood => [["ruby", "-e", "puts", "42"], ["ruby", "-e", "puts 42"]] (https://eval.in/156220)
<jimbow> whoa is that a ruby interpreter?
<havenwood> jimbow: ya, eval-in
<jimbow> super cool
mjs2600 has quit [Remote host closed the connection]
sjkaliski has quit [Ping timeout: 240 seconds]
<jimbow> that's it, after ruby, i'm learning bash scripting
<certainty> :/
<certainty> once you did you can start script bashing
pu22l3r has joined #ruby
<havenwood> #bash won't take my suggestion to call themselves bashelors, they insist on nothing but if they must be labelled, bashers
Freddan962 has quit [Ping timeout: 258 seconds]
ghr has joined #ruby
<synfin> havenwood: That's because they are afraid someone may spell it bash lors and forget to quote the string
User458764 has joined #ruby
pu22l3r_ has joined #ruby
<jimbow> can't you just type a backslash instead of quoting the string?
hiall has quit [Ping timeout: 240 seconds]
<havenwood> synfin: ha
<synfin> jimbow: you can, I was making a pun
<jimbow> oh lol
cocotton has quit [Remote host closed the connection]
<synfin> jimbrow: bash gets moody if you do, for example, var="value with spaces", and then, eg, if [ $var == "value with spaces" ]
<havenwood> jimbow: writing portable shell code isn't fun and error handling will make you pull your hair out
nateberkopec has quit [Ping timeout: 240 seconds]
<synfin> what havenwood said
G________ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jimbow> i'm overwhelmed with knowledge right now :P
<synfin> bash is a tool. It is very good at certain tasks, horrible at others. Make sure you use it for the right job.
<jimbow> i wish the courses i'm reading explain why each ruby command works the way it does and where its use is best suitable
<havenwood> jimbow: bash, zsh, csh, mksh, dash, ash, rabbit hole!
<havenwood> fish :O
<wallerdev> dont forget rush
<headius> tsunamie: figure out your jruby/logstash issue?
codecop has joined #ruby
pu22l3r has quit [Ping timeout: 276 seconds]
ghr has quit [Ping timeout: 252 seconds]
x1337807x has joined #ruby
endash has quit [Read error: Connection reset by peer]
<synfin> jimbrow: Eg, right now I'm writing a 20-30 line BASH script that is wrapped within a python deployment program. BASH is doing the untarring, moving things around on the FS, etc. But Python is handling all the orchestration, string manipulation, database backend, etc
nobitanobi has joined #ruby
cocotton has joined #ruby
<jimbow> wow synfin i wish i had your knowledge =D
cocotton has quit [Remote host closed the connection]
chrisseaton has quit []
cocotton has joined #ruby
endash has joined #ruby
Bira has quit [Remote host closed the connection]
chrisseaton has joined #ruby
SegFaultAX has quit [Excess Flood]
supermarin has joined #ruby
Bira has joined #ruby
kenneth has joined #ruby
<wallerdev> i also use python as my database backend
SegFaultAX has joined #ruby
<wallerdev> just dump all my json into python strings and save to py files
chabill has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
<synfin> wallerdev: I was referring to an ORM against relational databases.
<Sigma00> wallerdev: noob. Directory-and-file-based database backends are where it's at
mercerist has quit [Quit: Computer has gone to sleep.]
aspires has quit []
<wallerdev> why use directories, you can just indent things to different levels in python and represent directories that way
kirun has joined #ruby
mercerist has joined #ruby
dilated_dinosaur has joined #ruby
OffTheRails has quit [Ping timeout: 264 seconds]
RaptorJesus has joined #ruby
mercerist has quit [Client Quit]
jobewan has quit [Ping timeout: 258 seconds]
mjs2600 has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
rdark has quit [Quit: leaving]
axilla_ has joined #ruby
dblessing_ has quit [Quit: dblessing_]
jonahR has joined #ruby
Hanmac1 has joined #ruby
qwyeth has quit [Ping timeout: 258 seconds]
LekeFly has joined #ruby
LekeFly has quit [Client Quit]
jamto11 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
axilla has quit [Ping timeout: 276 seconds]
mercerist has joined #ruby
treehug8_ has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
benzrf|offline is now known as benzrf
jespada has joined #ruby
<benzrf> i got interviewed for a classmates radio show for the local community radio
<benzrf> i got myself credited as 'a seasoned node.css developer'
ruukasu has joined #ruby
<wallerdev> lol
<alpha123> lol
<havenwood> wow
<ruukasu> benzrf pls repaste
<jonahR> damn lol
<Sigma00> benzrf: which kind of seasoning did they use? paprika?
<benzrf> Sigma00: :^)
lethjakman is now known as lethjakman-mobil
treehug88 has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
jimbow_ has joined #ruby
ghr has joined #ruby
lethjakman-mobil is now known as lethjakman-cell
jimbow has quit [Read error: Connection reset by peer]
dapz has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
<benzrf> i only hope nobody listening thinks it's a legitimate mistake
qwyeth has joined #ruby
aspires has joined #ruby
cocotton has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
alex88 has quit [Ping timeout: 276 seconds]
cocotton has joined #ruby
anaeem1 has joined #ruby
aspires has quit [Client Quit]
lethjakman-cell is now known as lethjakman
ghr has quit [Ping timeout: 276 seconds]
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
pushpak has joined #ruby
anaeem1 has quit [Remote host closed the connection]
treehug88 has joined #ruby
ruukasu has left #ruby ["Leaving"]
<shevy> wat
<shevy> benzrf is a css guru
<shevy> and a node guru
<shevy> more power to him!
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
jimbow_ is now known as jimbow
treehug8_ has quit [Ping timeout: 252 seconds]
maroloccio has joined #ruby
codabrin_ has joined #ruby
Ankhers has quit [Ping timeout: 272 seconds]
aspires has joined #ruby
dingus_khan has joined #ruby
Sawbones_ has joined #ruby
codabrink has quit [Ping timeout: 240 seconds]
cocotton has quit [Remote host closed the connection]
Shidash has joined #ruby
Shidash has quit [Client Quit]
zorak has quit [Ping timeout: 265 seconds]
Es0teric has joined #ruby
ari-_-e has quit [Read error: Connection reset by peer]
tiguser has joined #ruby
saarinen has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
mjs2600 has quit [Remote host closed the connection]
Sawbones has quit [Ping timeout: 240 seconds]
zorak has joined #ruby
dingus_khan has quit [Ping timeout: 276 seconds]
magri has quit [Ping timeout: 265 seconds]
Nogbit has joined #ruby
<Nogbit> how does one change their photo on RubyGems.org....the button is simply a link to to the base Gravatar url
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
agjacome has quit [Quit: leaving]
<jimbow> is a value always true unless it's specifically stated to be false?
mjs2600 has joined #ruby
<jhass> it's truthy unless it's nil or false
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
<jimbow> that's confusing
<jhass> why?
<jimbow> i don't really get what that means
<jimbow> maybe programming isn't for me
alem0lars has joined #ruby
<jimbow> but i want to learn it
marcdel has joined #ruby
dblessing_ has joined #ruby
<havenwood> jimbow: `false` and `nil` are the only things that aren't truthy, that's just how it is in Ruby
<jhass> if obj; truthy; else; falsey; end
<havenwood> jimbow: easy to remember, since everything will be truthy except those two. if it isn't `false` or `nil` it'll be truthy.
<shevy> jimbow obviously if your value is "false" then it can not be true
Eyes is now known as Eyess
<jimbow> wouldn't truthy mean "kinda true"
phutchins has joined #ruby
<shevy> there is no kinda
jonahR_ has joined #ruby
<shevy> true means true, false means false, that seems rather simple!
<jimbow> oh
<jimbow> why do they call it truthy?
<shevy> I have no idea
<jimbow> thanks guys
<shevy> I don't understand why a string object called 'hi man' should be true or false
<havenwood> jimbow: because `true` is a particular object, while 'truthy' is any object other than `false` and `nil`.
<jhass> there's true and false in most languages, those are values of the class TrueClass / FalseClass respectively (or commonly boolean in other languages)
bradhe has quit [Remote host closed the connection]
<synfin> shevy: I have found it convenient as a means of testing if something was set.
<shevy> >> 'hi man' == true
<eval-in__> shevy => false (https://eval.in/156231)
<havenwood> jimbow: `while nil; puts 'y' end` and `while false; puts 'y' end` print nothing, but `while :whatever_else; puts 'y' end` will print a bunch of y's.
AlexRussia has quit [Ping timeout: 240 seconds]
<jhass> truthy means it's interpreted just like true if a boolean answer is needed, that is for example in if, while, until etc.
CodyF|lunch has quit [Read error: Connection reset by peer]
s2013 has quit [Ping timeout: 252 seconds]
jonahR has quit [Ping timeout: 258 seconds]
<shevy> look jimbow
<shevy> >> puts 'yeah' if 'hi man'
<eval-in__> shevy => /tmp/execpad-0a19b2733ba9/source-0a19b2733ba9:2: warning: string literal in condition ... (https://eval.in/156232)
<havenwood> jimbow: in Ruby there're fewer falsey things than most other languages, just two to remember!
<shevy> oops
<shevy> >> puts 'yeah' if 'hi man' == true
<eval-in__> shevy => nil (https://eval.in/156233)
<jimbow> wow
AlexRussia has joined #ruby
<shevy> !!!
franzip has quit [Quit: ...]
<shevy> I thought it was truthy!
<jhass> >> puts 'yeah'.==(true)
<eval-in__> jhass => false ... (https://eval.in/156234)
<shevy> >> puts 'yeah' if true == true
<eval-in__> shevy => yeah ... (https://eval.in/156235)
dawkirst has joined #ruby
<jhass> == is a method call that returns false in this case
anaeem1_ has joined #ruby
<havenwood> shevy: puts 'yeah' if !!'hi man'
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hah
jonahR_ has quit [Quit: ¡Adios amigos, me fui para el carajo!]
<jhass> >> obj = 'yeah'; puts 'hi' if obj
<eval-in__> jhass => hi ... (https://eval.in/156236)
<shevy> >> puts 'hi' if 'yeah'
<eval-in__> shevy => /tmp/execpad-fb97b2a86868/source-fb97b2a86868:2: warning: string literal in condition ... (https://eval.in/156237)
<shevy> !!!
<jhass> >> obj = 'yeah'; puts 'hi' if obj
<eval-in__> jhass => hi ... (https://eval.in/156238)
<jhass> !!!
<shevy> you really think you have more ! than I have don't you :)
<shevy> I can import them any time from greece
<havenwood> shevy: !!?! #=>
axilla_ is now known as axilla
<shevy> havenwood that isn't valid is it?
<havenwood> >> !!?!
<eval-in__> havenwood => /tmp/execpad-5c94db7f6331/source-5c94db7f6331:2: warning: string literal in condition ... (https://eval.in/156239)
<shevy> >> ?a
<eval-in__> shevy => "a" (https://eval.in/156240)
<havenwood> shevy: a warning, but returns: true
<shevy> wat
<shevy> >> puts 'are you nuts' if !!?!
<eval-in__> shevy => /tmp/execpad-df71c004d3aa/source-df71c004d3aa:2: warning: string literal in condition ... (https://eval.in/156241)
<shevy> eval-in__ is beginning to annoy me...
mfmfmfmfmfmf has joined #ruby
<shevy> why does he favour the warning over the output :(
<havenwood> shevy: if you click the eval-in link though you see it did print :P
<shevy> man clicking is STRENOUS on my click finger!
<shevy> you only have so many clicks per day
nanoyak has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
sekhmet_ has joined #ruby
jamto11 has quit [Remote host closed the connection]
_justin has joined #ruby
<sekhmet_> hey im trying to get rails onto my mac 10.9.6 download suggestions, using gem command has continually got me errors
<sekhmet_> ?
<shevy> type the command with more enthusiasm
Sawbones_ has quit []
<sekhmet_> lol
<wallerdev> there are so many errors in the world, what errors are you specifically talking about?
<shevy> what erorr did gem give you btw
<shevy> "no kitten in kitchen left for sacrifice"
<sekhmet_> Failed to build gem native extension.
<shevy> ah that one is bad
coldmethod1 has joined #ruby
andrewjanssen has joined #ruby
<shevy> that means you have something that lacks something, usually .h files but perhaps a .so file
<wallerdev> prboably has to do with clang
<shevy> or that!
<wallerdev> whats the actual error
<shevy> you need to identify the guilty party
<wallerdev> paste it somewhere, the whole thing
<shevy> and then fix that guilty party before retrying gem install rails
<sekhmet_> paste the error?
<shevy> of the specific program that fails
<sekhmet_> ERROR: Error installing rails: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb creating Makefile make "DESTDIR=" compiling generator.c linking shared-object json/ext/generator.bundle clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgrad
<shevy> clang!
<shevy> wallerdev was right!
<wallerdev> i am genius
<baweaver> Anyone have an idea how I could proxy stdin/out? Trying to intercept both and forward them on like normal.
<sekhmet_> lol :) great where should i find info for fixing clang?
<wallerdev> what gem is it failing on?
<wallerdev> oh json
<baweaver> probably use rvm or use sudo to install. It'll tell you your dependencies.
<wallerdev> try ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install json
<shevy> wallerdev is a pool of knowledge and information
coldmethod1 has left #ruby ["PONG :asimov.freenode.net"]
chrisseaton has quit []
<shevy> also he likes his dad
<wallerdev> im a pool of mac os x compile errors thanks to clang deciding to treat all unrecognized flags as errors lol
<shevy> <wallerdev> haha if i hated my dad id ask him to learn rails just to make a one page site with a couple images on it
<wallerdev> wow stalking me
<shevy> well I couldn't even help on osx
paulfm has quit []
LimeBlast has joined #ruby
<shevy> wallerdev just collecting epic IRC quotes in general
<shevy> april 2014: <benzrf> EXPLODE UR MindfulMonk
lw has quit [Ping timeout: 240 seconds]
<shevy> where is platzhirsch ... I also have some quotes from him
User458764 is now known as User458764_NotHe
descala has quit [Ping timeout: 264 seconds]
zorak has quit [Ping timeout: 240 seconds]
alex88 has joined #ruby
ElManu has joined #ruby
mfmfmfmfmfmf has quit []
paulfm has joined #ruby
descala has joined #ruby
<baweaver> If only I could find a way to get $stdin/out to take a proc or something... Pesky pesky
pen has quit [Ping timeout: 245 seconds]
lw has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
scottj has left #ruby [#ruby]
LimeBlast has quit [Quit: Leaving]
User458764_NotHe has quit [Ping timeout: 252 seconds]
tjsousa______ has quit [Quit: Computer has gone to sleep.]
anaeem1_ has quit [Remote host closed the connection]
zorak has joined #ruby
LadyRainicorn has quit [Ping timeout: 252 seconds]
lw has quit [Ping timeout: 245 seconds]
brunops has joined #ruby
vadzimt has joined #ruby
LadyRainicorn has joined #ruby
<havenwood> baweaver: set $stdout and $stdin to a proxy that redirects io to STDOUT and STDIN
klaut has joined #ruby
<baweaver> Tried, they want files (unless I've done something off)
phutchins has joined #ruby
timonv has joined #ruby
felixjet has joined #ruby
pen has joined #ruby
jmurray has quit [Quit: jmurray]
<havenwood> baweaver: you could use StringIO or if you need more flexibility, pipes
<baweaver> Hm, reading the docs
Bira has quit [Remote host closed the connection]
lw has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<baweaver> Pipe is referring to IO#pipe?
<havenwood> baweaver: yup
<baweaver> danke
ixti has joined #ruby
<havenwood> baweaver: paired with IO#repopen
<baweaver> Tweaking with something that's going to make a really useful tool
sunya7a has joined #ruby
soulcake has quit [Quit: ZNC - http://znc.in]
<baweaver> Think automated pry for live coding
cocotton has quit [Remote host closed the connection]
<baweaver> record your workflow, and allow it to be re-executed or printed to human readable format
cocotton has joined #ruby
Deejay_ has joined #ruby
vakt has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supermarin has joined #ruby
<baweaver> won't work too well with edit, you'd still have to do that part right
anaeem1_ has joined #ruby
<baweaver> either way, recording a pry workflow for replay would be useful
end_guy has quit [Remote host closed the connection]
end_guy has joined #ruby
soulcake has joined #ruby
dinoex has quit [Ping timeout: 252 seconds]
<baweaver> The fun part is writing it. Already have a basic typing faker made
b1205 has quit [Ping timeout: 264 seconds]
mercerist has quit [Quit: Computer has gone to sleep.]
bmurt has quit []
<slash_nick> "ah, i'm tired of working... let me just replay this workflow for a while"
<baweaver> essentially: 'string'.each_char { |ch| print ch; sleep rand(0.1..0.3) }
smathieu has quit [Remote host closed the connection]
<baweaver> 0.1 is ~ 550 cpm, or 110 wpm
SHyx0rmZ has joined #ruby
supermarin has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
dinoex has joined #ruby
smathieu has joined #ruby
<baweaver> If you have a process of workflows, you can make pry macros
centrx has joined #ruby
zorak has quit [Ping timeout: 245 seconds]
anaeem1_ has quit [Remote host closed the connection]
<sekhmet_> do you guys use ide's
<havenwood> sekhmet_: nope
<havenwood> sekhmet_: terminal and a text editor
<havenwood> sekhmet_: and Pry for a REPL
Spami has quit [Quit: This computer has gone to sleep]
<sekhmet_> yeah, im trying to set up my rails in terminal, wondering if it would be easier in conjunction with an ide...
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<shevy> it's simple
x1337807x has joined #ruby
<shevy> just don't run into any "can not compile native extension" problems
<slash_nick> sekhmet_: what OS?
mercwithamouth has quit [Ping timeout: 252 seconds]
<sekhmet_> 10.9.6
agjacome has joined #ruby
<slash_nick> hehe... never heard of that one... I guess it's OS X
pu22l3r has joined #ruby
JoeGaudet has joined #ruby
pu22l3r_ has quit [Ping timeout: 252 seconds]
<havenwood> slash_nick: except OS X is only up to 10.9.3
<shevy> hehe slash_nick
<havenwood> sekhmet_: time traveler?
<slash_nick> damn...
mikesplain_ has joined #ruby
<slash_nick> maybe he's got the prerelease
<shevy> so not only did he not name the OS, he also gave a wrong version number!
<sekhmet_> she lol and typo i meant 2
mjs2600 has quit [Remote host closed the connection]
jonr22 has joined #ruby
<shevy> why are you guys all on osx :(
dangerou_ has quit [Read error: Connection reset by peer]
<ada_> brew install rbenv/rvm
<slash_nick> shevy: i'm not on osx yet, have to save my lunch money for a while longer
dangerousdave has joined #ruby
<ada_> rvm install <version>
<shevy> slash_nick yay my linux brother! \o/
<ada_> gem install rails
geggam has quit [Remote host closed the connection]
ada_ is now known as ada
fenak has joined #ruby
LastWhisper has joined #ruby
mikesplain has quit [Ping timeout: 265 seconds]
mikesplain_ is now known as mikesplain
LastWhis_ has joined #ruby
bamyyyooo14335 has joined #ruby
LastWhisper has quit [Disconnected by services]
LastWhis_ is now known as LastWhisper
jonr22 has quit [Client Quit]
Freddan962 has joined #ruby
havenwood has quit [Remote host closed the connection]
axisys_ has quit [Quit: leaving]
<sekhmet_> seriously there is no other way to download rails?
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axisys has joined #ruby
<Freddan962> Lets say foo inherits from Entity and inherits the method "help". Is there a way to add more code to foo:help without overwriting Entity:help's code? Hope you understand what I am asking for
havenwood has joined #ruby
mercerist has joined #ruby
mercerist has quit [Read error: Connection reset by peer]
axisys has quit [Changing host]
axisys has joined #ruby
<havenwood> baweaver: Here's the simple way (without #pipe and #reopen): https://gist.github.com/havenwood/3370ec8f2e808d81b84a
geggam has joined #ruby
<havenwood> baweaver: a caveat being it wont capture output from a sub shell, but there's IO#pipe and IO#reopen for that
<ada> sekhmet_: what's wrong with gem install rails?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> baweaver: There's a good RubyTapas on Redirecting Output but it looks like it isn't one of the free ones.
bamyyyooo14335 has quit [Client Quit]
momomomomo has joined #ruby
<baweaver> Ah avdi
<baweaver> I subscribe to that one
<baweaver> good stuff
<havenwood> baweaver: Oh good, then look at 029!
acrussell has quit [Remote host closed the connection]
<baweaver> Know the number? I can just look it up if not
<sekhmet_> returns errors, I apparently have dev tools missing
<baweaver> ah
<baweaver> beat me to that.
<ada> sekhmet_: which error? it probably leads you in the right direction
treehug8_ has joined #ruby
dingus_khan has joined #ruby
<havenwood> sekhmet_: What OS/distro are you on? How'd you install Ruby?
<havenwood> sekhmet_: Getting Ruby setup with RubyGems working is important.
<ada> ^
decoponio has quit [Quit: Leaving...]
<sekhmet_> failed to build native gem extensions , 10.9.2, ruby works
<havenwood> sekhmet_: How'd you install Ruby?
<havenwood> sekhmet_: Ah, so not Mavericks.
<havenwood> sekhmet_: Update to Mavericks. :P
andrewlio has quit [Quit: Leaving.]
<havenwood> oh that is mav, just not latest?
* havenwood is confused
benzrf is now known as benzrf|offline
<ada> missing dependencies or compiler problem
lsmola has quit [Quit: Leaving]
<sekhmet_> rvm
treehug88 has quit [Ping timeout: 258 seconds]
<sekhmet_> oh, mavericks
<sekhmet_> ok
<havenwood> sekhmet_: xcode-select --install
<havenwood> sekhmet_: ^ then click "Install"
blackmesa has joined #ruby
zorak has joined #ruby
<havenwood> sekhmet_: OS X doesn't come with build tools installed. You need to be able to build C-extensions. So install Xcode build tools ^
dingus_khan has quit [Ping timeout: 265 seconds]
<sekhmet_> yes, you totally saved me, I was trying to find xcode-select
<sekhmet_> also how do i say your name? in message
<havenwood> sekhmet_: i type the first couple letters, then hit `tab`
<sekhmet_> havenwood: :)
nanoyak has joined #ruby
chipotle has joined #ruby
shvelo has joined #ruby
mjs2600 has joined #ruby
Bira has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
<Freddan962> Lets say foo inherits from Entity and inherits the method "help". Is there a way to add more code to foo:help without overwriting Entity:help's code?
andrewjanssen has quit [Remote host closed the connection]
nanoyak has joined #ruby
<centrx> Freddan962, Use super inside the method in the child, that will call the parent class's method
acrussell has joined #ruby
b1205 has joined #ruby
<jhass> def help; before_entity_help; super; after_entity_help; end
<Freddan962> centrx: Thank you so very much! :)
asramos has quit [Quit: C'ya folks]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
moritzs has quit [Ping timeout: 252 seconds]
pierre1_ has quit [Quit: Leaving]
dawkirst has quit [Remote host closed the connection]
Bira has quit [Ping timeout: 240 seconds]
rezzack has joined #ruby
User458764 has joined #ruby
larissa has quit [Quit: Leaving]
havenwood has quit []
b1205 has quit [Ping timeout: 245 seconds]
ktosiek has joined #ruby
sekhmet_ has quit [Quit: Page closed]
Naoe-Kanno has joined #ruby
<Freddan962> Centrx: Is there any better way to go about this? https://gist.github.com/Freddan962/a4587976ae399fb49eaf (Line 28)
codabrin_ has quit [Ping timeout: 265 seconds]
endash has quit [Read error: Connection reset by peer]
tier has quit [Remote host closed the connection]
phinfonet has quit [Ping timeout: 252 seconds]
LadyRainicorn has quit [Ping timeout: 276 seconds]
endash has joined #ruby
<centrx> Freddan962, There's no need to define initialize in the child if you are not going to do anything differently in it
<Freddan962> centrx: Thanks! :)
<centrx> Freddan962, Also with super if the arguments are the same in both the child and the parent, you don't need to pass any arguments to super, it will use them automatically
SHyx0rmZ has quit [Ping timeout: 276 seconds]
<Freddan962> centrx: Yeah, thank you Centrx! Appreciate it!
treehug88 has joined #ruby
<jhass> velocity_y was probably meant to be @velocity_y
<jhass> also consistently use two spaces to indent
acrussell has quit [Ping timeout: 240 seconds]
treehug8_ has quit [Ping timeout: 252 seconds]
jxf has quit [Ping timeout: 252 seconds]
chabill has quit [Ping timeout: 240 seconds]
<jhass> constant names are typically SCREAMING_SNAKE_CASE or CamelCase Foo_Bar is uncommon from my experience
<slash_nick> i like ostrichCase
chabill has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
s2013 has joined #ruby
tier has joined #ruby
atraylen has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
<alpha123> aCCIDENTALcAPSlOCKcASE is where it's at :P
alex88 has quit [Quit: Leaving...]
combusean has quit [Ping timeout: 258 seconds]
benzrf|offline is now known as benzrf
freerobby has quit [Ping timeout: 276 seconds]
User458764 is now known as User458764_NotHe
<eam> prefix every constant with a unicode omega and then just name them normally
wallerdev has joined #ruby
acrussell has joined #ruby
nemesit|znc has joined #ruby
anaeem1 has joined #ruby
<jhass> omega is boring, how about snowman?
anaeem1 has quit [Remote host closed the connection]
binaryhat has quit [Quit: Leaving]
JumpMast3r has joined #ruby
<wallerdev> are we talking about pokemon
bradhe has joined #ruby
<eam> I don't think snowman is a capital character
fantazo has joined #ruby
<shevy> I only talk about fuckemon
Lightsword has joined #ruby
<Freddan962> Jhass: I always use double space for indentation - however, Sublime automatically does tab indenting :/
<shevy> is there any popular ruby library out there that actually uses unicode characters?
marahin has left #ruby ["Leaving..."]
<eam> shevy: well, all ruby source code is unicode
<jhass> Freddan962: you can configure it to not to, right click on the thing on the lower right. I think you can switch the default somewhere but I forgot
User458764_NotHe has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
<shevy> cool
<Lightsword> Is there a way to use ruby eventmachine to do scp file transfers? I need to scale up scp management to thousands of devices simultaneously. So far I only found a gem for eventmachine ssh and not scp https://github.com/simulacre/em-ssh
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
dilated_dinosaur has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1 has joined #ruby
JumpMast3r has quit [Ping timeout: 245 seconds]
anaeem1 has quit [Remote host closed the connection]
maestrojed has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
Morkel has quit [Ping timeout: 240 seconds]
jambolina has quit [Ping timeout: 252 seconds]
sunya7a has quit [Ping timeout: 264 seconds]
Morkel has joined #ruby
yalue has quit [Quit: Leaving]
brunops has quit [Ping timeout: 258 seconds]
MrSamuel has joined #ruby
s2013 has quit [Remote host closed the connection]
Vivekananda has quit [Ping timeout: 240 seconds]
moneydouble has quit [Quit: Leaving.]
<shevy> how do you know these weird things
<jhass> how don't you?
subbyyy has joined #ruby
<shevy> I wouldn't know how anyone would know that
<shevy> .codepoints.to_a is pretty cool
moneydouble has joined #ruby
<shevy> "Use the Unicode character class [[:space:]] to match Unicode's idea of what whitespace is and convert all matches into vanilla ASCII whitespace."
g0bl1n has quit [Ping timeout: 245 seconds]
supermarin has joined #ruby
alex88 has joined #ruby
<shevy> well
<shevy> so we convert unicode to ascii again
<shevy> I thought unicode solves everything
FifthWall is now known as bye
pu22l3r has quit [Ping timeout: 245 seconds]
aspires has quit []
bye is now known as FifthWall
<jhass> well, ascii is a subset of unicode
g0bl1n has joined #ruby
xrq has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
chen_dong has joined #ruby
maoko has joined #ruby
aspires has joined #ruby
<benzrf> shevy: unicode and ascii are not the same kind of thing
<shevy> right
fenak has quit [Ping timeout: 245 seconds]
<shevy> unicode is *better*
supermarin has quit [Ping timeout: 240 seconds]
<shevy> yet that guy on the blog converts strings back into ascii :(
MatthewsFace has joined #ruby
acrussell has quit [Quit: Leaving.]
havenwood has joined #ruby
<shevy> hmm
chen_dong has left #ruby [#ruby]
<shevy> can I, with readline ...
acrussell has joined #ruby
<shevy> press alt+left arrow key ... and intercept that instantly
chen_dong has joined #ruby
mikesplain_ has joined #ruby
<shevy> like say: "if user presses alt + left arrow key, puts 'Hello world!'"
acrussell has quit [Client Quit]
EagleDelta has quit []
g0bl1n has quit [Ping timeout: 258 seconds]
<benzrf> shevy: not what readline is for
chen_dong has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
combusean has joined #ruby
<eam> when you call readline() the unix kernel is actually parsing out the \n
<eam> the ruby process only gets the line after it's typed
KanKava has joined #ruby
timonv has quit [Remote host closed the connection]
mikesplain has quit [Ping timeout: 276 seconds]
mikesplain_ is now known as mikesplain
freerobby has joined #ruby
<havenwood> shevy: char = STDIN.getch
<havenwood> shevy: but arrow keys, hem
<shevy> NoMethodError: undefined method `getch' for #<IO:<STDIN>>
<havenwood> shevy: Ruby version?
<shevy> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
<jhass> arrow keys want #raw first, though not sure if that catches alt too
moneydouble has quit [Quit: Leaving.]
chipotle has quit [Quit: cya]
maestrojed has quit [Quit: Computer has gone to sleep.]
<havenwood> shevy: oh, right: require 'console'
<shevy> I'm gonna learn C if that is what I have to do to make key combinations available!
<shevy> LoadError: cannot load such file -- console
alex88 has quit [Quit: Leaving...]
<jhass> io/console
<shevy> hehe
<shevy> havenwood! are you drunk again!!!
<havenwood> >.>
<segfalt> It's 5 o'clock somewhere.
andrewlio has joined #ruby
yubrew has quit [Remote host closed the connection]
<shevy> funny
<shevy> when I press left arrow key, I first get \e
<shevy> but I then also get [ and D
<jhass> yep
<jhass> that's normal
<havenwood> shevy: ah, it was 'console' in 1.9.3, now 'io/console'
s2013 has joined #ruby
x1337807x has joined #ruby
<jhass> shevy: it get's funny if you want to handle Esc too, that's just \e
ctp_ has joined #ruby
zzzbra has joined #ruby
<shevy> huh
kevind has quit [Quit: kevind]
yubrew has joined #ruby
<shevy> well
<shevy> that seems one char in total
<shevy> the arrow keys seem to fill in more than one
<shevy> perhaps there should be something like .keystroke or .key
rmill has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Ping timeout: 252 seconds]
rmill has joined #ruby
MrSamuel has joined #ruby
n_blownapart has joined #ruby
Xeago has joined #ruby
<eam> the thing is there's no real concept of keys in terminals, just characters and escape sequences
pu22l3r has joined #ruby
mikesplain_ has joined #ruby
codecop has quit [Ping timeout: 252 seconds]
<benzrf> ok guys
Arkaniad|Laptop has joined #ruby
Arkaniad has joined #ruby
Arkaniad|Laptop has quit [Read error: Connection reset by peer]
codecop has joined #ruby
<benzrf> can u figure out how this code works:
<benzrf> main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
Hanmac has joined #ruby
dingus_khan has joined #ruby
mikesplain has quit [Ping timeout: 240 seconds]
mikesplain_ is now known as mikesplain
<benzrf> ^prints 'unix', write by david korn
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
sunya7a has joined #ruby
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> wow, i just realized, that's valid ruby syntax in addition to C isn't it
<benzrf> lol
<benzrf> >> main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
<eval-in__> benzrf => /tmp/execpad-4604f2814f06/source-4604f2814f06:2: syntax error, unexpected ',', expecting ')' ... (https://eval.in/156286)
jhass is now known as jhass|off
Hanmac1 has quit [Ping timeout: 265 seconds]
<benzrf> ...guess not o=
<benzrf> pretty close though!
<RubyPanther> Ruby is supposed to have "Perl/C syntax" so it is normal for it to be close
<benzrf> >> this(&has, to_go_last)
<eval-in__> benzrf => /tmp/execpad-b47318930639/source-b47318930639:2: syntax error, unexpected ',', expecting ')' ... (https://eval.in/156287)
<benzrf> i see
<benzrf> >Ruby is supposed to have "Perl/C syntax"
<benzrf> top lel
<benzrf> RubyPanther: can you decipher that one liner
<benzrf> o.o
jdoes has joined #ruby
<RubyPanther> but we don't have casting, so that one isn't going to parse easily
mercerist has joined #ruby
<RubyPanther> benzrf: <3 <3 <3 C
dingus_k_ has joined #ruby
jdoes is now known as omosoj
<vakt> I understand how that would work in C, but no in Ruby.
<benzrf> RubyPanther: that's not a cast ;)
<benzrf> vakt: it's not a polyglot
dingus_khan has quit [Read error: Connection reset by peer]
arrubin has quit []
mark_locklear has quit [Quit: Leaving]
merceris_ has joined #ruby
dapz has joined #ruby
treehug88 has quit []
Naoe-Kanno has quit [Ping timeout: 264 seconds]
Deejay_ has quit [Quit: Computer has gone to sleep.]
LiohAu has quit [Quit: LiohAu]
teddyp1cker has quit []
mercerist has quit [Ping timeout: 276 seconds]
unholycrab has joined #ruby
zorak has quit [Ping timeout: 265 seconds]
pu22l3r has quit [Ping timeout: 252 seconds]
pu22l3r has joined #ruby
keen____ has quit [Ping timeout: 252 seconds]
treehug88 has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
<unholycrab> this might be a dumb question! how do i access a rest api that requires HTTP authentication? `curl http://user:pass@example.com/api` works in my terminal, for example, but using open-uri and open('http://user:password@example.com/api') will return a 401 Unauthorized (OpenURI::HTTPError)
akonny has quit [Quit: akonny]
<RubyPanther> benzrf: Ruby doesn't have dereferencing either, so it wouldn't know that it isn't a cast; or what to do with it
michaelchum has joined #ruby
chipotle has joined #ruby
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
skaflem has quit [Quit: Leaving]
merceris_ has quit [Quit: Computer has gone to sleep.]
<RubyPanther> it is certainly a contender for "most disgusting assignment ever"
qwyeth has quit [Ping timeout: 240 seconds]
Atrumx has joined #ruby
Deejay_ has joined #ruby
<RubyPanther> crap like that is why you shouldn't even try to learn manipulate strings with C. When in C... use a string lib. :)
MrSamuel has joined #ruby
akonny has joined #ruby
<unholycrab> nice. its open('http://example.com/api', :http_basic_authentication=>[user, pass])
<unholycrab> thanks guys !
arrubin has joined #ruby
tier has quit []
danman has quit [Quit: danman]
LiohAu has joined #ruby
anaeem1 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
b1205 has joined #ruby
mary5030 has joined #ruby
jamto11 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
zzzbra has quit [Remote host closed the connection]
nanoyak has joined #ruby
mary5030 has joined #ruby
zzzbra has joined #ruby
SHyx0rmZ has joined #ruby
G________ has joined #ruby
MrSamuel has quit [Ping timeout: 240 seconds]
cocotton has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 252 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
Morkel has quit [Quit: Morkel]
rezzack has quit [Quit: Leaving.]
workmad3 has joined #ruby
MrSamuel has joined #ruby
zzzbra has quit [Ping timeout: 258 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
heftig has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
cocotton has joined #ruby
andrewjanssen has joined #ruby
freezey has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
<havenwood> shevy: Hash['A['.upto('D[').zip %i{up down right left}][STDIN.read_nonblock(2) rescue nil] if char == "\e"
jxf has joined #ruby
<divbell> that's sick
Xeago_ has joined #ruby
<divbell> and people said perl was cryptic
cocotton has joined #ruby
vadzimt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cocotton has quit [Remote host closed the connection]
<havenwood> >> Hash['A['.upto('D[').zip %i{up down right left}]
<eval-in__> havenwood => {"A["=>:up, "B["=>:down, "C["=>:right, "D["=>:left} (https://eval.in/156295)
Xeago has quit [Read error: Connection reset by peer]
cocotton_ has joined #ruby
treehug88 has quit []
chen_dong has joined #ruby
toastynerd has quit [Remote host closed the connection]
chen_dong has left #ruby [#ruby]
alpha123 has quit [Ping timeout: 240 seconds]
chrisseaton has joined #ruby
phinfonet has joined #ruby
G________ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fantazo has quit [Ping timeout: 245 seconds]
alem0lars has quit [Quit: alem0lars]
NukePuppy has quit [Ping timeout: 252 seconds]
cocotton_ has quit [Ping timeout: 240 seconds]
andrewjanssen has quit [Ping timeout: 276 seconds]
sepp2k has joined #ruby
b1205 has joined #ruby
freezey has joined #ruby
<RubyPanther> divbell: http://stuff.rubypanther.com/perl.rb (Ruby 1.8 only)
lw has quit [Quit: s]
paulfm has quit []
omosoj has joined #ruby
<RubyPanther> If you check out code golf, Perl usually wins, but Ruby wins a few too
ctp_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ctp_ has joined #ruby
marcdel has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
chrisseaton has quit []
wldcordeiro_work has joined #ruby
supermarin has joined #ruby
<jaequery> hi guys, i just installed rvm on my ubuntu 13.10 w/ \curl -sSL https://get.rvm.io | bash -s stable , but after install, i dont see ~/.rvm folder , any ideas why?
wldcordeiro_work has left #ruby [#ruby]
babykosh has joined #ruby
wldcordeiro_work has joined #ruby
<wallerdev> does the rvm command work?
<jaequery> i see it installed in /usr/local/rvm/bin/rvm
<jaequery> from there it works fine
Deejay_ has quit [Quit: Computer has gone to sleep.]
m8 has quit [Read error: Connection reset by peer]
<jaequery> why .rvm not copied?
<jaequery> its not there
<wallerdev> i dont have rvm on this machine so i forget how it works, but what do you need inside of .rvm ?
workmad3 has quit [Ping timeout: 252 seconds]
<wallerdev> like why is it an issue that that directory doesnt exist in your home dir
m8 has joined #ruby
<havenwood> jaequery: a ill advised system install instead of user install?
maestrojed has joined #ruby
chrisseaton has joined #ruby
<jaequery> at first i installed as user root, and then i didnt want that so i did, rvm implode, rm -rf /usr/local/rvm
<jaequery> and then i reinstalled rvm as single user
<havenwood> jaequery: i think you still installed with `sudo`
axilla has quit [Ping timeout: 264 seconds]
<havenwood> jaequery: install as a non-root user *without* sudo
<havenwood> jaequery: there's an #rvm channel too
codecop has quit [Quit: Išeinu]
marcdel has joined #ruby
<jaequery> $ ls -l /usr/local/rvm/bin/
<jaequery> total 32
<jaequery> -rwxrwxr-x 1 jae jae 1440 May 23 16:51 rvm
<jaequery> lrwxrwxrwx 1 jae jae 9 May 23 16:51 ruby-rvm-env -> rvm-shell
<jaequery> well its owned as jae
<havenwood> jaequery: like i said
supermarin has quit [Ping timeout: 264 seconds]
<havenwood> jaequery: oh, hem
<havenwood> jaequery: try #rbvm
<havenwood> #rvm**
<jaequery> ok
KanKava has quit [Quit: leaving]
<havenwood> oops, i meant '[A'.upto('[D' >.>
<havenwood> )
mary5030_ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
Lucky_ has joined #ruby
freezey has quit [Remote host closed the connection]
toastynerd has joined #ruby
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
MrSamuel has quit [Ping timeout: 265 seconds]
<babykosh> ruby Gods…I have an SO question for you…https://stackoverflow.com/questions/23838343/what-is-inside-my-ruby-array
workmad3 has joined #ruby
combusean has quit [Ping timeout: 252 seconds]
Martxel has joined #ruby
<wallerdev> you have an array of instances of a class named Followers
<havenwood> shevy: i'm sure there's a better way, hem: https://gist.github.com/havenwood/b922bd416d78a8f620e3
<wallerdev> >> class Followers; end; [Follower.new]
<eval-in__> wallerdev => uninitialized constant Follower (NameError) ... (https://eval.in/156311)
<wallerdev> pls
phansch has quit [Quit: WeeChat 0.4.3]
<wallerdev> >> class Followers; end; [Followers.new]
<eval-in__> wallerdev => [#<Followers:0x41836418>] (https://eval.in/156312)
<babykosh> @wallerdev thank you
<wallerdev> #yourewelcome
MatthewsFace has quit [Quit: This computer has gone to sleep]
hihihihihhi has joined #ruby
dblessing_ has quit [Quit: dblessing_]
skysploit has quit [Remote host closed the connection]
wldcordeiro_work has quit [Read error: Connection reset by peer]
duggiefresh has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
sputnik13 has joined #ruby
Megtastique has quit []
MrSamuel has joined #ruby
<shevy> #urmomisnot
mjsmith2 has quit [Remote host closed the connection]
<n_blownapart> hi
<wallerdev> hi
mary5030 has joined #ruby
<n_blownapart> I am a retard
sunya7a has quit [Ping timeout: 240 seconds]
_justin has quit [Quit: _justin]
<shevy> life moves on man live moves on
mikesplain has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
ldnunes has quit [Quit: Leaving]
maestrojed has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030_ has quit [Ping timeout: 258 seconds]
KanKava has joined #ruby
dapz has joined #ruby
skysploit has joined #ruby
hihihihihhi has quit [Ping timeout: 240 seconds]
<n_blownapart> shevy: no thanks just showing a friend this chatroom. I am eternally optimistic and shevy I love doing math problems in ruby. I gave up on rails.
jp123 has joined #ruby
n_blownapart has quit [Remote host closed the connection]
meatherly has quit [Remote host closed the connection]
<shevy> :D
<havenwood> try Sinatra or Hobbit
frosgy has joined #ruby
skysploit has quit [Remote host closed the connection]
n_blownapart has joined #ruby
momomomomo has quit [Quit: momomomomo]
n_blownapart has quit [Remote host closed the connection]
<dacamp> Coming from a rails heavy background, I've always found sinatra to be a bit underwhelming.
<havenwood> nasty hobbitses
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> dacamp: ever checkout padrino?
<havenwood> dacamp: the code for lotus is looking really nice: https://github.com/lotus
frogssgy has quit [Ping timeout: 258 seconds]
momomomomo has joined #ruby
<havenwood> i think lotus said june release, so brand new but nicely done
chabill has quit [Ping timeout: 240 seconds]
<havenwood> dacamp: did you not like being underwhelmed instead of overwhelmed? :P
claymore has quit [Quit: Leaving]
<xybre> Sinatra isn't for typical web apps in my opinion and there's some parts thats are just as broken as Rails.
shvelo has quit [Ping timeout: 265 seconds]
<xybre> But it's smaller and simpler and makes setting up API endpoitns practically free.
Valesk_ has joined #ruby
iceden has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
axilla has joined #ruby
endash has quit [Quit: endash]
Nahra has quit [Remote host closed the connection]
akonny has quit [Quit: akonny]
<dacamp> yeah the smaller part was what drew me in... for something like internal tools i want to love sinatra, but just haven't.
<dacamp> havenwood: i'll check out padrino, haven't heard of it
chabill has joined #ruby
<dacamp> havenwood: I'd prefer overwhelmed... that's easy to fix
pu22l3r has quit [Ping timeout: 252 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> xybre: I like the idea of webmachine-ruby but hard to find docs and frameworks are nascent: https://github.com/celluloid/lattice
<havenwood> Ruby off Rack :O
<dacamp> Ruby cgi!!!! :)
dapz has joined #ruby
momomomomo has quit [Quit: momomomomo]
ari-_-e has joined #ruby
nateberkopec has quit [Quit: Leaving...]
axilla has quit [Ping timeout: 245 seconds]
dapz has quit [Client Quit]
b1205 has quit [Ping timeout: 258 seconds]
duncannz has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
vpretzel has quit [Quit: Adios!]
<xybre> dacamp: I built a blog in Sinatra from scratch, it was really enlightening to see how much I do and don't use from Rails.
<wallerdev> now build a blog in C
<dacamp> Yeah, I guess I haven't done the 'from scratch' thing yet... Last Sinatra app I did used the Dashing framework.
MrSamuel has joined #ruby
<xybre> wallerdev: I could do that too
<havenwood> dacamp: that is pretty spiffy looking, but never used it
<havenwood> dacamp: good or bad experience?
<xybre> havenwood: Yeah same, Celluloid looks great but I feel like a lot of it is still "theoretical".
mjs2600 has joined #ruby
<arrubin> Or use Jekyll/Middleman.
<dacamp> havenwood: actually really great experience
<havenwood> dacamp: nice
<dacamp> It's still slightly immature, but they are actively working on it
<dacamp> and it's nothing you can't work aroun
agent_white has joined #ruby
ValicekB has quit [Ping timeout: 240 seconds]
<dacamp> but it makes the Javascript event sending easy
<dacamp> which is great since I pretty much hate Java*
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
<dacamp> If I had to build a blog in C I'd probably start with this http://lwan.ws/
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_wh1te is now known as agent_white
<dacamp> arrubin: we use middleman here some. seems like it's a lot more helpful for development... not as much for production
agent_white has left #ruby [#ruby]
<arrubin> dacamp: I do not follow.
agent_white has joined #ruby
shevy has quit [Ping timeout: 276 seconds]
<arrubin> Static content is great for production.
shevy has joined #ruby
dapz has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<dacamp> arrubin: eh, i guess i wasn't using it right thne... I just ran middleman run (or whatever) and it gave me a sitemap and other metrics i didn't care about
<arrubin> dacamp: It is a static site generator.
<arrubin> Similar to Jekyll.
<arrubin> Which is perfect for most blogs.
brunops has joined #ruby
sunya7a has joined #ruby
agent_wh1te has joined #ruby
<dacamp> oh, nice!
agent_wh1te has left #ruby [#ruby]
enebo has quit [Quit: enebo]
ehc has quit [Quit: ehc]
Guest___ has joined #ruby
Martxel has quit [Read error: Connection reset by peer]
rbb has quit [Quit: rbb]
klaut has quit [Remote host closed the connection]
dapz has quit [Ping timeout: 240 seconds]
shevy has quit [Ping timeout: 245 seconds]
marcdel has quit [Ping timeout: 264 seconds]
b1205 has joined #ruby
MatthewsFace has joined #ruby
<wallerdev> probably should be using the rails activerecord methods to do that check in the sql haha
shevy has joined #ruby
duggiefresh has joined #ruby
dingus_k_ has quit [Remote host closed the connection]
<wallerdev> Follower.find_by_follower_id(239xxxx) or whatever
<babykosh> ah I see thank you @arrubin
kaspergrubbe has joined #ruby
sunya7a has quit [Ping timeout: 265 seconds]
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
duggiefr_ has joined #ruby
Maple__ has quit [Quit: bbl]
Xeago has quit [Read error: Connection reset by peer]
anaeem1 has quit [Remote host closed the connection]
dik_dak has quit [Ping timeout: 252 seconds]
Lightsword_ has joined #ruby
alpha123 has joined #ruby
Lightsword has quit [Ping timeout: 252 seconds]
Lightsword_ is now known as Lightsword
echevemaster has quit [Remote host closed the connection]
<dacamp> babykosh: this is only a hunch, but is this array created through an association like user.followers? you can use user.followers.find(id) if so
duggiefresh has quit [Ping timeout: 240 seconds]
<dacamp> oh you said ruby, not rails nvm
blackmesa has joined #ruby
<wallerdev> hes using rails haha
Takle has joined #ruby
Maple__ has joined #ruby
<havenwood> rails is like the worms from Dune
duggiefr_ has quit [Ping timeout: 240 seconds]
dinoex has quit [Ping timeout: 245 seconds]
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
MrSamuel has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
dinoex has joined #ruby
freezey has joined #ruby
s2013_ has joined #ruby
marcdel has joined #ruby
lagweezle has left #ruby [#ruby]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
<havenwood> or maybe more of a sandtrout
ryanleesipes has quit [Quit: Leaving]
MrSamuel has joined #ruby
<havenwood> "They proliferated beyond the capability of existing ecosystems to deal with them. Sandtrout encysted the available free water, made this a desert planet ... and they did it to survive. In a planet sufficiently dry, they could move to their sandworm phase."
marcdel has quit [Max SendQ exceeded]
s2013 has quit [Ping timeout: 276 seconds]
<dacamp> I watched Dune for the first time a few months ago... I couldn't watch the whole thing, so still no clue what you're talking about. Guess it's one of those films you gotta watch in segments.
danshultz has joined #ruby
sailias has quit [Quit: Leaving.]
<xybre> Dune isn't a film you can watch.
<Sigma00> no.. you should read the books
epochwolf is now known as atomicwolf
<Sigma00> all 27 of them
<havenwood> <3 lynch, but books!
marcdel has joined #ruby
<xybre> Really only the book can be read. It's a great book, but its a shame, it should have made for a great movie.
Nahra has joined #ruby
<xybre> The scope is jsut too wide and the budget would be too much.
<xybre> But no, the films are just.. not useful.
kyb3r_ has joined #ruby
marcdel has quit [Max SendQ exceeded]
Freddan962 has quit [Ping timeout: 258 seconds]
supermarin has joined #ruby
<dacamp> Oh I'm sure Michael Bay will reboot it into a 10 part movie series
<havenwood> for talk title?, "Rails is a Sandtrout, behold the Sandworm"
coderhs has joined #ruby
<shevy> dune was a good movie
baweaver has quit [Remote host closed the connection]
marcdel has joined #ruby
<shevy> it felt super rushed though, to have a narrator tell 25% of the storyline rather than see it...
kaspergrubbe has quit [Remote host closed the connection]
omosoj has quit [Quit: Leaving]
chabill has quit [Quit: WeeChat 1.0-dev]
SegFaultAX has quit [Excess Flood]
jxf has quit [Ping timeout: 265 seconds]
dinoex has quit [Read error: Permission denied]
SegFaultAX has joined #ruby
dik_dak has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dinoex has joined #ruby
supermarin has quit [Ping timeout: 252 seconds]
sleepee has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
bradhe has quit []
blackmesa has quit [Ping timeout: 258 seconds]
pietr0 has quit [Quit: pietr0]
combusean has joined #ruby
blackmesa has joined #ruby
brunops has quit [Changing host]
brunops has joined #ruby
n_blownapart has joined #ruby
jackneill has quit [Read error: Connection reset by peer]
combusean has quit [Ping timeout: 264 seconds]
momomomomo has joined #ruby
ta_ has joined #ruby
Lightsword_ has joined #ruby
Lightsword_ has quit [Client Quit]
snath has quit [Ping timeout: 252 seconds]
MatthewsFace has joined #ruby
Lightsword_ has joined #ruby
momomomomo has quit [Client Quit]
Lightsword_ has quit [Client Quit]
dinoex has quit [Ping timeout: 252 seconds]
dinoex has joined #ruby
marcdel has quit [Ping timeout: 264 seconds]
Lightsword_ has joined #ruby
deric_skibotn_ has joined #ruby
SegFaultAX has quit [Ping timeout: 265 seconds]
MrSamuel has quit [Ping timeout: 265 seconds]
deric_skibotn has quit [Ping timeout: 265 seconds]
canton7 has joined #ruby
canton7 has quit [Ping timeout: 265 seconds]
deric_skibotn_ is now known as deric_skibotn
Lightsword has quit [Ping timeout: 265 seconds]
Lightsword_ is now known as Lightsword
ta has quit [Ping timeout: 265 seconds]
lmickh has quit [Ping timeout: 265 seconds]
helpa has quit [Ping timeout: 265 seconds]
ra4king has quit [Ping timeout: 265 seconds]
<Lightsword> I'm trying to split a string into an array using | as the delimiter but it doesn't seem to be working ARGV[0].split("|") is what I"m doing
<havenwood> Lightsword: what does your first arg look like?
helpa has joined #ruby
<terrellt> >> "a|b|c".split("|")
<eval-in__> terrellt => ["a", "b", "c"] (https://eval.in/156321)
lmickh has joined #ruby
<terrellt> Totally works, something's wrong with your ARGV[0]
SegFaultAX has joined #ruby
ra4king has joined #ruby
zzzbra has joined #ruby
<Lightsword> hmm I'm running it like this ruby api-example.rb summary|test
<dacamp> if it's cli args on a unixy env, you'll find it a pain to pass in '|'
<Lightsword> oh
<dacamp> try api-example.rb -- sample|test
<dacamp> or just change your input to csv
gverri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pu22l3r has joined #ruby
<Lightsword> whats the standard ruby delimeter for passing multiple string as an array?
<Lightsword> just ","?
<dacamp> a comma, yeah
<dacamp> or just space seperated
<AntelopeSalad> are you sure you don't need argv[1]?
<dacamp> depends what you're trying to do really
<AntelopeSalad> i thought [0] is always the file name
<Lightsword> I am using argv[1] for something else
<AntelopeSalad> but maybe not, i haven't worked directly with args in ruby
<dacamp> if you just use space seperated then ARGV is already an array
<havenwood> Lightsword: use ARGV.last for your else?
<Lightsword> well, the amount of variables can change that get passed
kotakotakota has quit [Quit: Leaving]
<wallerdev> this is why there are option parsers
<AntelopeSalad> what if you just did ARGV.each then?
<havenwood> trollop, slop or cocaine
<havenwood> or thor
<havenwood> if you have a complicated usecase
<havenwood> Freya's Day \o/
<wallerdev> long weekend hype
<havenwood> that
<Lightsword> well, how would I distinguish which variable gets passed to what? if I don't use a delimiter it would seem the 2nd argument would be tricky to specify where it goes
<havenwood> Lightsword: flags letcha specify what to what
<dacamp> Lightsword: yeah listen to havenwood, just use an opt parser
babykosh has quit [Quit: babykosh]
n_blownapart has quit [Remote host closed the connection]
SegFaultAX has quit [Excess Flood]
<Lightsword> kk
dinoex has quit [Ping timeout: 245 seconds]
MatthewsFace has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 264 seconds]
combusean has joined #ruby
sambao21 has joined #ruby
n_blownapart has joined #ruby
andrewjanssen has joined #ruby
ezradavis has joined #ruby
n_blownapart has quit [Client Quit]
SegFaultAX has joined #ruby
ezradavis has left #ruby [#ruby]
sambao21 has quit [Client Quit]
MatthewsFace has joined #ruby
axilla has joined #ruby
sambao21 has joined #ruby
<shevy> yeah
<shevy> I am with havenwood when it comes to drugs
dinoex has joined #ruby
<shevy> gem install Hobbit on cocaine
atraylen has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
centrx has joined #ruby
_sambao21 has joined #ruby
mercwithamouth has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
nerium has joined #ruby
babykosh has joined #ruby
<nerium> I've a frozen thread I'm trying to figure out why
sambao21 has quit [Ping timeout: 265 seconds]
<nerium> Any idea why it froze?
maroloccio has quit [Ping timeout: 240 seconds]
vim_shim has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 252 seconds]
mgomezch has joined #ruby
thomasxie has joined #ruby
freerobby has quit [Quit: Leaving.]
nanoyak has quit [Quit: Computer has gone to sleep.]
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
geggam has quit [Quit: weekend]
binaryhat has joined #ruby
lmickh has quit [Remote host closed the connection]
jamto11 has joined #ruby
pu22l3r has quit [Remote host closed the connection]
marcdel has joined #ruby
nanoyak has joined #ruby
combusean has quit [Ping timeout: 264 seconds]
andrewjanssen has quit [Ping timeout: 276 seconds]
aspires has quit []
zorak has joined #ruby
babykosh has quit [Quit: babykosh]
pasties has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
Guest___ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pasties has joined #ruby
babykosh has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
ktosiek has quit [Read error: Connection reset by peer]
duncannz has quit [Ping timeout: 240 seconds]
wald0 has quit [Ping timeout: 240 seconds]
babykosh has quit [Client Quit]
marcdel has quit [Ping timeout: 264 seconds]
dingus_khan has joined #ruby
mjs2600 has joined #ruby
endash has joined #ruby
Megtastique has joined #ruby
wald0 has joined #ruby
havenwood has left #ruby [#ruby]
bluenemo has quit [Quit: Verlassend]
jaequery has joined #ruby
Hobogrammer has quit [Ping timeout: 276 seconds]
sleepee has quit [Quit: Leaving]
Guest___ has joined #ruby
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dingus_khan has quit [Ping timeout: 252 seconds]
GriffinHeart has joined #ruby
Valesk_ has joined #ruby
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
Toger has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
jamto11 has joined #ruby
dingus_khan has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dilated_dinosaur has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
brunops has quit [Ping timeout: 252 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
jtdowney has joined #ruby
jtdowney has quit [Client Quit]
jamto11 has quit [Ping timeout: 240 seconds]
frobrob has joined #ruby
OffTheRails has joined #ruby
LiohAu has quit [Quit: LiohAu]
SCommette has quit [Quit: SCommette]
andrewlio has quit [Quit: Leaving.]
freezey has quit [Ping timeout: 240 seconds]
supermarin has joined #ruby
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
mercwithamouth has quit [Ping timeout: 265 seconds]
jtdowney has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
mercerist has joined #ruby
marcdel has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
dangerou_ has quit [Ping timeout: 265 seconds]
m8 has quit [Quit: Sto andando via]
marcdel has joined #ruby
marcdel has quit [Client Quit]
rmill has quit [Changing host]
rmill has joined #ruby
merceris_ has joined #ruby
chipotle has quit [Quit: cya]
s3ri0us has joined #ruby
merceris_ has quit [Client Quit]
mercerist has quit [Ping timeout: 240 seconds]
mercerist has joined #ruby
dingus_khan has quit [Remote host closed the connection]
Lightsword has quit [Ping timeout: 252 seconds]
n_blownapart has joined #ruby
aloysius21 has joined #ruby
baweaver has joined #ruby
mjs2600 has quit [Remote host closed the connection]
s2013_ has quit [Ping timeout: 252 seconds]
zzzbra has quit [Remote host closed the connection]
michaelchum has quit [Quit: Connection closed for inactivity]
sdwrage has joined #ruby
mjs2600 has joined #ruby
RubyPanther has quit [Ping timeout: 245 seconds]
baweaver has quit [Ping timeout: 240 seconds]
torresga has joined #ruby
<nobitanobi> Any tips on how to read an image from remote URL and store in my /tmp folder, so that after managing and reupload it I can remove that tmp file?
<nobitanobi> I am looking at http://www.ruby-doc.org/stdlib-2.1.0/libdoc/tempfile/rdoc/Tempfile.html , but fail to see how to read from URL into tmp
dinoex has quit [Ping timeout: 252 seconds]
endash has quit [Quit: endash]
Lightsword has joined #ruby
kaspergrubbe has joined #ruby
dingus_khan has joined #ruby
nopc0de is now known as zz_nopc0de
danman has joined #ruby
freerobby has joined #ruby
BRMatt has quit [Quit: Connection closed for inactivity]
codeurge has joined #ruby
danman has quit [Client Quit]
jtdowney has quit []
lobstah has left #ruby ["And if your head explodes with dark forbodings too..."]
Es0teric has quit [Quit: Computer has gone to sleep.]
aef has quit [Read error: Connection reset by peer]
codeurge has quit [Ping timeout: 240 seconds]
marr has quit []
dinoex has joined #ruby
predator117 has joined #ruby
_sambao21 has quit [Quit: Computer has gone to sleep.]
<centrx> nobitanobi, Use OpenURI to get the file from the URL, then write to the tempfile
<nobitanobi> centrx: doing it! Thanks :) This was helpful: http://viget.com/extend/make-remote-files-local-with-ruby-tempfile
RubyPanther has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 264 seconds]
axilla has joined #ruby
aspires has joined #ruby
<wallerdev> theres a blog on everything these days
<wallerdev> lol
xbob has quit []
mjs2600 has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 245 seconds]
MrSamuel has joined #ruby
jhulten has quit []
sambao21 has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
_sambao21 has joined #ruby
dik_dak has quit [Quit: Leaving]
iamcalledrob has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
codeurge has joined #ruby
<n_blownapart> tied to the apron-strings again...trying to understand this prog. that finds the largest prime number of a large number: https://gist.github.com/anonymous/019c24ada0ef50e71c2e
Bira has joined #ruby
jamto11 has joined #ruby
zz_nopc0de is now known as nopc0de
sarlalian has quit [Quit: WeeChat 0.4.0]
sarlalian has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
<n_blownapart> no clue where to begin... ^
<centrx> that's not really idiomatic ruby
Lutece has joined #ruby
<Lutece> Hi, could someone help me with some socket stuff, I'm trying to send a string over a tcp socket but it seems to only send the first line, how would i get arorund that?
babykosh has joined #ruby
<centrx> maybe those loops are the only way to do this particular thing not sure
jambolina has joined #ruby
ElManu has quit [Ping timeout: 240 seconds]
<centrx> seems unlikely
<n_blownapart> centrx: hi. well it's one interpretion of the so-called euler project #3.
<n_blownapart> there are other solutions that are quite similar. ^
<centrx> Which parts do you understand?
<n_blownapart> line 8 is where modulo determines if a number is divisible only by itself or 1 ?
duncannz has joined #ruby
<n_blownapart> but yeah centrx good question .. not a whole lot is understood.
<centrx> n.modulo(i) == 0 or n % i == 0 (or n.multiple_of?(i) in Rails)
nfk has quit [Quit: yawn]
<centrx> "multiple of" should clarify that line
maestrojed has quit [Quit: Computer has gone to sleep.]
jambolina has quit [Ping timeout: 258 seconds]
jambolina has joined #ruby
benzrf is now known as benzrf|offline
coderhs has quit [Ping timeout: 276 seconds]
<n_blownapart> the euler series went from that fibonacci sequence problem to this... phew...
gmas has joined #ruby
<n_blownapart> I mean, do most people go through that euler series as a rite of passage?
<centrx> n_blownapart, it might help to find a mathematical description of how this factorize algorithm works
<nobitanobi> Hi guys, I have the following https://gist.github.com/novito/0f1b218c253f6b23268b -- And when I try to do local = LocalResource.new(URI.parse('http://www.google.com')): local_resource.file.path - I get 'private method `open' called for #<URI::Generic:0x007fb535a58df8>'
benzrf|offline is now known as benzrf
alexju has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<n_blownapart> thanks centrx its a bit much for this whiz kid.
setra has quit [Ping timeout: 245 seconds]
<shevy> n_blownapart I just write stuff in ruby
<ari-_-e> #python has "NO PROJECT EULER" in the topic
<ari-_-e> right after "NO LOL"
<shevy> is python 2 finally dead?
<ari-_-e> no
elaptics is now known as elaptics`away
<n_blownapart> ari-_-e: oh is that in python on stackoverflow ?
<ari-_-e> the #python channel
<ari-_-e> on freenode
smathieu has quit [Remote host closed the connection]
smathieu_ has joined #ruby
einarj has joined #ruby
<n_blownapart> shevy: give me something to study . It was fun for a while to do these math problems.
Lutece has quit [Quit: WeeChat 0.4.3]
<shevy> n_blownapart study real existing problems
Megtastique has quit []
<n_blownapart> like the holes in my shoe leather? shevy
<iamcalledrob> I'm building a module that contains several methods – most of which don't need to be accessible from any class that include's the module. What's best practice for naming+defining these methods to avoid collisions? Here's an example: https://gist.github.com/anonymous/dfbf0572175f07e01e13
<shevy> n_blownapart no, something useful, do you not have a todo list of cool things you want to have available?
<n_blownapart> shevy: ari-_-e is it not worth working on this sort of thing? seems like whatever I work on is irrelevent.
<n_blownapart> shevy: like what?
<centrx> n_blownapart, Have you tried Ruby Koans or Ruby Monk yet?
<shevy> n_blownapart no real idea for you; I myself am working through some sinatra tutorials right now to deepen the little I know about it, and I use it to extend some things with "web apps" when available
nanoyak has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Quit: Leaving]
<n_blownapart> yeah I went through a book too .. Well Grounded Rubyist. shevy I like math it would be cool to get into security after I learn ruby suffieciently.
iamcalledrob has quit [Quit: Computer has gone to sleep.]
<shevy> n_blownapart one entry on my todo list is to make ftp-connections available through sinatra + ruby
toretore has quit [Quit: This computer has gone to sleep]
<shevy> see, we come from a different angle, I hate math but I like to build anything that eventually saves me time
<shevy> (minus the initial time spent to write it)
<n_blownapart> I have plenty of time. I looked at padrino but there wasn't much to read about it... rails was a bitch.
jambolina has quit [Quit: Nettalk6 - www.ntalk.de]
<n_blownapart> shevy:
<shevy> hehe
<shevy> I dont like maximalism
<shevy> minimalism fits to my natural laziness
thomasxie has quit [Quit: Leaving.]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<n_blownapart> I want to learn math and security / encryption maybe. yeah shevy you say rails is maximalism?
toastynerd has quit [Remote host closed the connection]
<shevy> sure, it has a gazillion of features
nobitanobi has quit [Remote host closed the connection]
ascarter_ has quit [Ping timeout: 240 seconds]
nanoyak has joined #ruby
babykosh has quit [Quit: babykosh]
<n_blownapart> bnagy told me to stick with pure oop as it is a *transferable* skill. I m sticking with that advice.
mikecmpbll has quit [Quit: i've nodded off.]