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>
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...
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
<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.
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.
<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.
<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…]
<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>
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>
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
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.
<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.
<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.
<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
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]
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
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]
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…]
<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'
<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
<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]
<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
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]
<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
<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'])
<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
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.
<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]
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]
<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>
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.]
<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.
<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. ^^;
<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>
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.
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]
<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]
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]
<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
<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
<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}]
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
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…]
<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]
<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
<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?
<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
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?
<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.]
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.