<apeiros>
foo= just being defined as `def foo=(value); @foo = value; end` is the common case, though. and most often it's done by using `attr_accessor :foo`
baweaver has joined #ruby
failshell has joined #ruby
lidenskap has quit [Remote host closed the connection]
<ebonics>
apeiros, are there varargs
<apeiros>
foo(*args)
<apeiros>
the *args will collect all remaining arguments into an array
ismaelga has quit [Remote host closed the connection]
<apeiros>
so it remains a single value list ;-)
<adaedra>
ok
<^conner>
is using `extend self` in a module considered good practice? I'd like to use something like this https://gist.github.com/jhoblitt/e6a7d75f4f663028dd62 so that I only have to define methods once that are mixed in as both instance and class methods
<ebonics>
i have no idea what im doing anymore
<apeiros>
^conner: avdi likes it. I prefer module_function
Leef_ has quit [Quit: Leaving]
juanpablo_____ has joined #ruby
FernandoBasso has quit [Quit: leaving]
<^conner>
apeiros, module_function doesn't give you a class method
<apeiros>
^conner: rational in favor of module function: a) Kernel & Math do it that way, b) your module's instance methods should be private (since they're obviously not intended to be used from the outside) and your module's class methods should be public - module_function does that for youc
<apeiros>
^conner: have you even tried it? of course it does.
<^conner>
it give you a class method in the defining module, not the class that's including it
<apeiros>
^conner: um, including *never* gives you class methods
<apeiros>
extend self doesn't change that.
<^conner>
apeiros, explain my example ;)
<apeiros>
def self.included(klass)
<apeiros>
that's a callback
<^conner>
yes
<^conner>
a call back that's called when... ?
<apeiros>
which is called when something includes your module
<apeiros>
and *entirely* unrelated to using extend self or module_function
<^conner>
so your saying that including does give you class methods ;)
<apeiros>
^conner: do you even read?
<^conner>
"<apeiros> ^conner: um, including *never* gives you class methods"
<^conner>
except that it does
<^conner>
which the right magic
<apeiros>
no, including does not give you class methods. the klass.extend does.
<^conner>
in any event, if you remove the self extend, the act of inclusion does not give you both class and instance methods
<apeiros>
*sob*
<apeiros>
wrong
granthatcher has quit []
<^conner>
self#include needs a class method to work with
<apeiros>
you know, you can be all smug when you actually understand what you talk about.
<apeiros>
no
juanpablo_____ has quit [Ping timeout: 245 seconds]
<^conner>
apeiros, ok - I believe you. Can you give me an example that gives me the same result but with a different module implementation?
<apeiros>
>> module A; def foo; "wee"; end; def self.included(k); k.extend self; end; end; class B; include A; end; B.foo
<^conner>
apeiros, I had miss-read the code. I'll have to think about that. Is it simple to make the including methods private?
<apeiros>
^conner: I think you're misusing include/extend. I'd still like to see the actual use-case. I'm pretty sure you could axe a lot of code and just go with YourModule.meth
<ebonics>
apeiros, that.. makes alot more sense lmao
senayar has joined #ruby
senayar has joined #ruby
<ebonics>
although i dont think it will work exactly how i want out of the box
<ebonics>
ima play with it <3 thanks
<apeiros>
yw
<ebonics>
i doubt what i want to do it possible like baweaver implied
<^conner>
apeiros, I could but would need to assign it to constant in the class because the namespace is pretty deep
longfeet has joined #ruby
<^conner>
for readability reasons
<baweaver>
arbitrary vivification can be done in perl, but Ruby uses the same syntax for both hash and array making it a bit difficult if not impossible.
<apeiros>
or you could *cough* include the namespace containing the module
DynamicMetaFlow has joined #ruby
momomomomo has quit [Quit: momomomomo]
* baweaver
tries to grab some popcorn from Radar
<Radar>
thanks :)
<Radar>
oh, I read that as 'for'
<baweaver>
heh
esasse has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<^conner>
apeiros, I'm not following
jerematic has quit [Remote host closed the connection]
<apeiros>
or you could use module_function, not have that ludicrous self.included hook, and just use include/extend appropriately.
<^conner>
those are orthogonal concerns
<^conner>
Not wanting to type ThisReally::Deep::ClassTree::Util is seperate from inclusions vs calling as a class method
<ruboto>
apeiros # => /tmp/execpad-f4734788b0bd/source-f4734788b0bd:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/335781)
<apeiros>
damn
<apeiros>
I thought I counted the ends correctly :D
<ebonics>
it's just a headache cause you need to redefine [] and []= for both
jerematic has joined #ruby
<baweaver>
I'd probably just look for a different way to do whatever you think this might be useful for
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver>
unless it's academic or playing about
<baweaver>
then by all means
<Radar>
^conner: do you have a real example of what you're trying to solve that we can play around with? I think we're having major communication issues here because we're talking about theories.
<baweaver>
Sometimes it can be fun to poke ruby with a stick and see what happens.
GaryOak_ has quit [Remote host closed the connection]
<ebonics>
baweaver, i'm doing it mainly as a learning exercise at this point. initially it was cause i was lazy but i kinda like ruby so i figure it's a good way to learn
<^conner>
Radar, sort of, I have functionality I want to move out of a base class into a mixin
<mwlang>
whoot: Not only did I get selenium and phantomjs working together to log into my bank’s website and get account summaries, I got it under rspec specs with vcr to boot so I can continue developing without alarming my bank with too many logins.
<ebonics>
it's weird
<Radar>
ebonics: An example would really help us to understand what you're talking about.
<ebonics>
i either have to model the object and do that
<baweaver>
Example code would help on that.
<ebonics>
ok 1 sec
<baweaver>
ninja'd
* mwlang
feeling somewhat surprised it all worked out
davedev2_ has quit [Ping timeout: 244 seconds]
rkazak has joined #ruby
pontiki has joined #ruby
jeramy_s has joined #ruby
<^conner>
apeiros, so I think I can use including the an entire module for some utility methods but I don't think that helps me in the case where I have subclasses
<mwlang>
now to try bank #2 and do some refactoring into a more structured library. What shall I call a gem that can aggregate balances from various financial websites (think capital one, fidelity, charles schwab, credit union, bank of america, wells fargo, etc.)
<^conner>
that need to use the included methods
<^conner>
I guess I could refactor that out
<mwlang>
I want to build a standardized library/api structure kinda like Active Merchant
<apeiros>
^conner: I see no point in continuing this without the actual use-case.
<^conner>
there very well could be indent errors. I just squashed about 70 commits worth of history down and had to manually resolve some merge issues
exadeci has quit [Quit: Connection closed for inactivity]
<ebonics>
what Radar
<apeiros>
^conner: no. github sometimes loses all indents. reload helps.
oo_ has joined #ruby
<Radar>
ebonics: that's a lot of code :)
<ebonics>
Radar, it's just a sample
<ebonics>
there's like a shitton more
<ebonics>
hehe
<apeiros>
don't know whether it's only on some browsers, though
<ebonics>
i was just trying to illustrate how it's arbitrary
<Radar>
ebonics: Yeah, it's missing a whole heap of context around it
rkazak has quit [Ping timeout: 250 seconds]
<ebonics>
i'll show you how i'm doing the stuff now
<^conner>
apeiros, #class_variable_set isn't required in that class but it is in the subclasses that come out of a classgenerator that you pass a block too. Bare @@'s get scoped incorrected in that case
<apeiros>
^conner: I think I'll not go and talk about that.
<^conner>
class data is the correct solution in this case. The subclasses need to share the state. Its intentional
frem has quit [Quit: Connection closed for inactivity]
<^conner>
it's the only time I've ever used class variables
<apeiros>
^conner: anyway, I see no `extend self` or `self.included` in that code.
<^conner>
correct
<baweaver>
Well that's one way to vivify
b00b00 has joined #ruby
<b00b00>
hello
<^conner>
I'm asking questions before refactoring ;)
<mwlang>
ebonics: wordpress? :-o
yfeldblu_ has quit [Remote host closed the connection]
<ebonics>
mwlang, it's the wpscan code
<apeiros>
ok. well. bed time for me anyway. good night.
<ebonics>
some library for detecting vulnerabilities in wordpress
<ebonics>
but i want the output in json
yfeldblum has joined #ruby
doodlehaus has joined #ruby
<mwlang>
ebonics: ah, vulnerability scanner.
<b00b00>
i am new with ruby, my question is how i get https page cntent? i get the error "`connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)" , I use (Net::HTTP.get) and require 'net/https' and require 'uri', thanks for help
<b00b00>
with http all working fine
<baweaver>
I'd have to think about that one honestly.
<ebonics>
it's funny because a big reason i'm doing this at all is because i didnt want to touch ruby
<ebonics>
i wrote some middleware to ease the pain
PhantomSpank has quit [Read error: Connection reset by peer]
<ebonics>
but now i think ruby's not so bad so i might just scrap it
<mwlang>
b00b00: personally, I’d use Faraday or RestClient gem or even Mechanize.
Akagi201 has joined #ruby
<baweaver>
yeah, it'd take me more than a few hours to really have a good solution on that one
PhantomS_ has quit [Ping timeout: 276 seconds]
PhantomSpank has joined #ruby
Phantom__ has quit [Ping timeout: 276 seconds]
iteratorP has joined #ruby
<ebonics>
baweaver, it sucks cause this thing is just really poorly designed
<ebonics>
but its functionality is good
PhantomS_ has joined #ruby
<baweaver>
nontrivial at least.
<ebonics>
i would just rewrite the whole thing
DynamicMetaFlow has quit [Quit: Leaving]
mistermocha has joined #ruby
<ebonics>
but the vuln database they use is under their control
<ebonics>
so if they change something fundamental about it then i'm kinda screwed
DynamicMetaFlow has joined #ruby
doodlehaus has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
mistermocha has quit [Read error: Connection reset by peer]
failshell has joined #ruby
mistermocha has joined #ruby
Phantom__ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
uptownhr has joined #ruby
senayar has quit []
PhantomSpank has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
pygospa has joined #ruby
<b00b00>
mwlang: thanks man, worked :)
Astrologos_ has quit []
<b00b00>
mwlang: was read about what you mentioned now, but need something basic for tests
PhantomSpank has joined #ruby
nini1294 has quit [Read error: Connection reset by peer]
<mwlang>
what is the so-called “active” data pattern? I thought it was a term coined by Martin Fowler for CRUD objects that closely mimics underlying tables…but I see all these gems on rubygems named “active[something]” that doesn’t really seem to have that much of a correlation to the active data pattern.
PhantomS_ has quit [Ping timeout: 250 seconds]
<b00b00>
mwlang: can you very shurt explain why that worked? whats this (each{|o| puts o}) ?
<ebonics>
BLOCKS BRO
<mwlang>
b00b00: #each iterates over the lines of the response giving it the variable named “o” puts just prints.
TheHodge has quit [Quit: Connection closed for inactivity]
<b00b00>
i see, thanks again
bricker has quit [Quit: leaving]
PhantomS_ has joined #ruby
<ebonics>
if i call them closures instead am i gonna get flamed
<mwlang>
b00b00: #open works because I included the ‘open-uri’ library….otherwise #open only knows how to open a local file.
failshell has quit [Ping timeout: 265 seconds]
<aewffwea>
mwlang: Martin Fowler is evil... Don't follow him
<ebonics>
block is such a dumb word for a closure considering how well defined they are
Phantom__ has quit [Ping timeout: 276 seconds]
<mwlang>
aewffwea: heh. what’d he do?
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
nini1294 has joined #ruby
Phantom__ has joined #ruby
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<aewffwea>
mwlang: He claimed he "invented" dependency injection, or something like that, and it's the best thing ever, or something like that
<baweaver>
or something like that
doodlehaus has quit [Remote host closed the connection]
* baweaver
is skeptical of the proper founding of aforementioned evil
PhantomSpank has quit [Ping timeout: 276 seconds]
penzur has joined #ruby
<baweaver>
Gang of Four never claimed they invented it, just standardized it into reusable patterns.
<aewffwea>
baweaver: I consider Dependency Injection frameworks to be evil, so anyone who heavily proposes that, it's also evil xD
<mwlang>
aewffwea: oh….he had an Al Gore moment. :-p
<Radar>
mwlang: "active" isnt a patter
<Radar>
n
<ebonics>
why are dependency injection frameworks evil?
<Radar>
mwlang: Active Record is a pattern
<Radar>
Active Support is just following the naming scheme
PhantomSpank has joined #ruby
<aewffwea>
ebonics: Because they promote bad code (not as bad as using global variables), but bad still
<mwlang>
Radar: any idea why we have 100’s of gems starting with the word “active”?
<ebonics>
i highly, highly, highly disagree
<ebonics>
i think it's the complete opposite
charliesome has joined #ruby
<mwlang>
I mean, what’s it supposed to signify?
<baweaver>
naming schemes mainly
<Radar>
mwlang: Why do we have thousands of gems starting with the letter "r"?
<aewffwea>
mwlang: People are afraid of claiming they like "passive" things
<Radar>
mwlang: Why are there a lot of Smiths in the phone book?
<mwlang>
Radar: so you’re saying prefixing a gem’s name with “active” is like prefixing apple product names with “i”?
Mohan_ has quit [Ping timeout: 256 seconds]
<Radar>
mwlang: yes
<aewffwea>
ebonics: It also promotes using "singletons" or whatever you want to call the beans thing... (They are not technically singletons though)
<ebonics>
bindings?
<aewffwea>
ebonics: yes
PhantomS_ has joined #ruby
<ebonics>
those are amazing too wtf
<mwlang>
Radar: there’s lots of smiths because there were black smiths, gold smiths, silver smiths, ad infintum…:-p
<aewffwea>
ebonics: Most people I know use Dependency Injection to use global variables without using global variables directly
<Radar>
mwlang: and there's a lot of active* gems because people are not imaginative
<ebonics>
most people you know suck
<ebonics>
brb need food
<aewffwea>
@Bean("DBConnection") // this is a global variable DBConnection
<baweaver>
ebonics: keep it classy, uncalled for there mate.
noname1 has quit [Ping timeout: 256 seconds]
<aewffwea>
ebonics: I agree... Sadly, most people I don't know suck too...
<ebonics>
i was kidding baweaver
Phantom__ has quit [Ping timeout: 272 seconds]
<ebonics>
it's the way he phrased it himself lol
Mohan_ has joined #ruby
<baweaver>
still a bit harsh
<aewffwea>
ebonics: That's partly the issue with DI frameworks xD
workmad3 has joined #ruby
tcrypt has quit [Remote host closed the connection]
mbff has joined #ruby
<ebonics>
aewffwea, i think as long as the bean is wrapped in an object that's intended to be used by _any_ module
<baweaver>
Speaking of food though, Chipotle is calling. 'night
Phantom__ has joined #ruby
<ebonics>
then that design is perfectly fine
<mwlang>
heh…I’m currently unimaginative…can’t think of a name for my new gem. :-p
<aewffwea>
ebonics: You are also breaking "encapsulation" and "abstraction" when you use DI frameworks
<mbff>
I am trying to use bundler's rake release command to push a gem to rubygems.org however I get an error I haven't gotten before using the same workflow as I am now.
<ebonics>
aewffwea, no you're not
<mbff>
To git@github.com:marshallford/strike_api.git
<mwlang>
thought maybe, “activebank” but seems incredibly unimaginative.
<penzur>
hello, world!
<ebonics>
typically you have ONE singleton with all of the "global" data encapsulated inside
<aewffwea>
ebonics: The fact that your whole application has a big large shared configuration doesn't makes noise to you?
PhantomSpank has quit [Ping timeout: 272 seconds]
baweaver has quit [Remote host closed the connection]
<ebonics>
no i think that's fine
<aewffwea>
ebonics: I don't :)
<ebonics>
fight me then
<ebonics>
brb food :D
Hobogrammer has joined #ruby
<aewffwea>
Why should I fight you?
<aewffwea>
I love peace
avahey has joined #ruby
<penzur>
aw!
PhantomSpank has joined #ruby
<mwlang>
sorry, penzur hello, helloworld, hello-world, hello_world are all taken as gem names. I need a better name. :-)
redjack1964 has quit [Remote host closed the connection]
<aewffwea>
mwlang: hello-mwlang
<penzur>
wtf?
<penzur>
hehe
<aewffwea>
mwlang: That's also cool... You can name your gem WTF as penzur suggested
<aewffwea>
require 'wtf'
<mbff>
The tag gets created on github properly. If I remove the tag on Github and re-run "rake release", it will create the tag again just fine.
<mwlang>
penzur: :-D Just trying to dream up a new gem name. timing of your greeting caught my humor slightly askewed.
PhantomS_ has quit [Ping timeout: 272 seconds]
dfinninger has joined #ruby
<mwlang>
aewffwea: LMAO…that’s a good one.
mrconfused has quit [Remote host closed the connection]
<penzur>
name your gem `try`
<penzur>
haha
<mwlang>
aewffwea: unfortunately, there’s already a gem for that.
kyrylo has quit [Ping timeout: 272 seconds]
doodlehaus has joined #ruby
PhantomS_ has joined #ruby
<penzur>
mwlang: wadiwasi
Phantom__ has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
<mwlang>
penzur: then I’d want to try ‘require’ rather than require ‘try’ it.
<mwlang>
penzur: dipping into foreign vocabularies?
bmurt has joined #ruby
<penzur>
yeah
<penzur>
how about `fish`
<penzur>
haha
doodlehaus has quit [Remote host closed the connection]
<aewffwea>
penzur: require 'quartz' ?
Phantom__ has joined #ruby
failshell has joined #ruby
PhantomSpank has quit [Ping timeout: 240 seconds]
<penzur>
require 'coal' # my awesome gem
tuelz has quit [Ping timeout: 244 seconds]
Phantom__ has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
<mwlang>
maybe I can call it “greed”
<mwlang>
since I’m aggregating bank balances. :-)
PhantomS_ has quit [Ping timeout: 240 seconds]
<aewffwea>
mwlang: require 'money' makes more sense :p
<penzur>
peny
<penzur>
call it perl
<penzur>
haha
mbff has quit [Quit: Leaving]
<aewffwea>
require 'green_franklin'
PhantomS_ has joined #ruby
<mwlang>
aewffwea: but “money” is taken….I’d go for “opm” but it ain’t other people’s money…
<aewffwea>
mwlang: what about my_money?
agent_white has joined #ruby
wallerdev has quit [Ping timeout: 272 seconds]
doodlehaus has joined #ruby
aldarsior has quit [Quit: aldarsior]
<mwlang>
aewffwea: we have a contender.
doodlehaus has quit [Remote host closed the connection]
Phantom__ has joined #ruby
<aewffwea>
mwlangl ?
tuelz has joined #ruby
aldarsior has joined #ruby
PhantomSpank has quit [Ping timeout: 265 seconds]
doodlehaus has joined #ruby
<mwlang>
following the waddiwasi (train of thought)…could call it Glisseo (transforms a staircase into a smooth slide) from Harry Potter.
PhantomSpank has joined #ruby
<mwlang>
which is certainly what I feel like I’m doing with these silly banking websites.
car has joined #ruby
<aewffwea>
o_O
PhantomS_ has quit [Ping timeout: 265 seconds]
<aewffwea>
mwlang: That's slightly nerdish
<aewffwea>
mwlang: What does your app do?
DynamicMetaFlow has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
car_ has joined #ruby
<mwlang>
aewffwea: log into your bank’s website, gets your balance on every account you have there and also transactions (for certain ranges) and reports ‘em back to ya.
<aewffwea>
mwlang: Nice...
<aewffwea>
mwlang: There is no way in hell I'm using that app though...
Phantom__ has quit [Ping timeout: 255 seconds]
<mwlang>
aewffwea: why not? I didn’t say it was a service in the cloud.
<aewffwea>
mwlang: I wouldn't trust it unless it came from a very very very trustworthy publisher, or I reviewed the 100% of the source code, which I'm not going to do
nini1294 has quit [Read error: Connection reset by peer]
Phantom__ has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
PhantomSpank has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
<aewffwea>
mwlang: I think the app is useful though... I'd certainly use it if I had coded it :)
<aewffwea>
mwlang: But the trust issue is too big
tjohnson has quit [Quit: Connection closed for inactivity]
<aewffwea>
Radar: I still wouldn't use pocketbook for the same reason...
<Radar>
Read only access into my bank account
PhantomS_ has quit [Ping timeout: 255 seconds]
<aewffwea>
Radar: How do you guarantee is read only? How do you guarantee a dumb programmer from the companies steals and sells all your data?
<mwlang>
aewffwea: LOL lets get the power of open source going!
aldarsior has quit [Quit: aldarsior]
<aewffwea>
mwlang: I wouldn't trust my bank information to any open source project that doesn't has 1m user and has actually been audited by an external company
<mwlang>
well, I’m gonna use it to save me oodles of time. That’s good enough for me. :-D
Phantom__ has quit [Ping timeout: 272 seconds]
<aewffwea>
Radar: I still don't trust it :)
unreal_ has joined #ruby
nettoweb has quit [Client Quit]
Sembei has quit [Read error: Connection reset by peer]
PhantomS_ has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
PhantomS_ has joined #ruby
<aewffwea>
Radar: Most of those things can only prevent you from an external threat... If someone inside the company is doing something evil, you are still vulnerable
umby24 is now known as umby24|offline
<pontiki>
so you must keep all your money stuffed in your mattress
nobitanobi has quit [Remote host closed the connection]
<aewffwea>
pontiki: I use each banks own website...
<Radar>
^
Sembei has joined #ruby
RegulationD has quit [Remote host closed the connection]
PhantomSpank has quit [Ping timeout: 272 seconds]
<pontiki>
heaven knows a bank couldn't have staff that steals from the customers
<aewffwea>
pontiki: BTW: I've found more than once, that one of the banks uses http images on their https website :/
danzilio has joined #ruby
nettoweb has quit [Client Quit]
<aewffwea>
pontiki: They can, but at least they have audits of the code, and their staff...
<aewffwea>
pontiki: They have regular audits, and systems that are auditing in real time...
nettoweb has joined #ruby
PhantomSpank has joined #ruby
<Radar>
aewffwea: Your tinfoil hat is showing
<aewffwea>
pontiki: tinfoil?
agent_white has quit [Read error: Connection reset by peer]
<pontiki>
not me
nettoweb has quit [Client Quit]
<aewffwea>
pontiki: I used to work for banks...
unreal has quit [Ping timeout: 264 seconds]
<aewffwea>
pontiki: And created part of those systems...
<ebonics>
it obviously depends how much money you have
multi_io has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
<pontiki>
i don't care
<ebonics>
if you have a few grand in your bank then who cares
* sevenseacat
cares
agent_white has quit [Read error: Connection reset by peer]
Guest1421 has quit [Ping timeout: 276 seconds]
<aewffwea>
ebonics: I have 3 billon dollars in my account (?)
<ebonics>
lol
* sevenseacat
cares about all her goddamn money
<Radar>
aewffwea: now we know where Moldova's 1bn went.
agent_white has joined #ruby
<aewffwea>
They had to put me in a special server, because I caused a integer overflow on their server
agent_white has quit [Read error: Connection reset by peer]
moeabdol1 has joined #ruby
<ebonics>
idiots using signed ints
Phantom__ has joined #ruby
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
multi_io has joined #ruby
PhantomS_ has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
uptownhr has quit [Quit: uptownhr]
agent_white has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
mary5030 has joined #ruby
PhantomSpank has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
doodlehaus has quit [Remote host closed the connection]
PhantomSpank has joined #ruby
Phantom__ has quit [Ping timeout: 246 seconds]
moeabdol1 has quit [Ping timeout: 264 seconds]
Phantom__ has joined #ruby
mary5030 has quit [Remote host closed the connection]
cibs has quit [Read error: Connection reset by peer]
car has joined #ruby
cibs has joined #ruby
lidenskap has joined #ruby
MrSamuel has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
rahult has joined #ruby
Eiam_ has joined #ruby
lidenskap has quit [Ping timeout: 250 seconds]
bigmac has quit [Ping timeout: 246 seconds]
rahult is now known as rahult_
mistermocha has quit [Remote host closed the connection]
rahult_ has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
GriffinHeart has quit [Ping timeout: 264 seconds]
wolfleemeta_ has joined #ruby
scripore has joined #ruby
mistermocha has joined #ruby
almostworking has joined #ruby
mary5030 has joined #ruby
wolfleemeta has quit [Ping timeout: 240 seconds]
GriffinHeart has joined #ruby
almostworking has left #ruby [#ruby]
TheNet has joined #ruby
GriffinH_ has joined #ruby
millerti has joined #ruby
<TheNet>
I made a ruby script for managing multiple git names/emails if anyone wants to critique it: https://github.com/iNety/gitu
zenspider has quit [Remote host closed the connection]
juanpablo_____ has joined #ruby
danzilio has quit [Quit: Baiii!]
workmad3 has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
GriffinHeart has quit [Ping timeout: 276 seconds]
<simpyll>
ive been using the netbeans ruby plugin for my IDE. I'm sure its been discussed before but was wondering if anyone has suggestions on an awesome ide
lidenskap has joined #ruby
car has quit [Ping timeout: 256 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
penzur has quit [Quit: quit]
juanpablo_____ has quit [Ping timeout: 272 seconds]
bigmac has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<baweaver>
Though to be fair, that was the third result under ruby regex library
failshell has quit [Ping timeout: 250 seconds]
<ubermonkey>
Oh boy, how could I unnotice this... Thankyou!
jeromelanteri has joined #ruby
<harlen>
i'm of a mixed mined about email regexps. i think it's better to have a basic one that allows too much, and validate it with a confirmation email, rather than risking rejecting something that the regexp hasn't been updated for.
aldarsior has quit [Quit: aldarsior]
tubuliferous_ has joined #ruby
RegulationD has joined #ruby
<baweaver>
harlen: Fair enough, and in this case you're right that it probably should be more lax
<ebonics>
it definitely depends how much traffic you get
<ebonics>
bouncing emails contributes to spam score
<Eiam_>
baweaver: eh, i was looking to see if I could force a datetime into another timezone. im just going to minus my offset from the resulting value
penzur has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ebonics>
baweaver, you're into devops?
<Eiam_>
the deployed server has its timezone set to UTC, and im in PST
<Eiam_>
(datetime.now is an example; I have a datetime object that isn't now)
riotjones has quit [Ping timeout: 252 seconds]
sevvie has quit [Ping timeout: 256 seconds]
<mwlang>
If you don’t mind active_support, then require ‘active_support’; require ‘active_support/time’; Time.now.in_time_zone(-7) => Thu, 07 May 2015 22:12:17 PDT -07:00
duderonomy has joined #ruby
<Eiam_>
rather stay away from active anythign
<Eiam_>
rails monkeypatches so many base classes i forget whats real ruby
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #ruby
<mwlang>
strange, if DateTime’s #to_a actually worked, you could’ve done Time.new(*DateTime.now.to_a)
<mwlang>
Eiam: I used to have that problem until I ditched all things Rails for 4 years. :-)
diegoviola has quit [Quit: WeeChat 1.1.1]
mistermocha has joined #ruby
<Eiam_>
well, hence me trying to avoid all things rails
<Eiam_>
i have not actually done any rails in.. ha maybe 4 years now
moeabdol1 has joined #ruby
failshell has joined #ruby
<sevenseacat>
its all 'real ruby'
<sevenseacat>
anything written in ruby is 'real ruby'
<mwlang>
Eiam: why not DateTime.now.to_time ?
<Eiam_>
sevenseacat: figured someone would take issue after I said that
<mwlang>
sevenseacat: heh…the spirit of his remark was what’s in Ruby core classes vs bolted on by active_whatnot
* baweaver
uses monkeypatches
<sevenseacat>
its was a very poor way to express it
<Eiam_>
baweaver: sure, i monkey patch some things as well, but its all clearly mentioned in my code and its not exported out side my world
<sevenseacat>
and if we're being really honest, half of what we like about ruby isnt in core anyway
<baweaver>
Mainly for getting set-like features for hashes
rkazak has quit [Quit: Sleep.....ing....]
<sevenseacat>
its in stdlib
sevvie has joined #ruby
moeabdol1 has quit [Ping timeout: 264 seconds]
<baweaver>
that, and 'true'.to_bool
<baweaver>
because that's freaking annoying
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<mwlang>
hold on, I got one that takes the cake…lemme find it because I don’t wanna misquote…
gambl0re has quit [Read error: Connection reset by peer]
<hanmac1>
bigsky: did you try to run "gem install binding_of_caller -v '0.7.2'" too?
anurag_ has joined #ruby
<bigsky>
hanmac1: yep, after i updated this gem, another error will come out and telling me i should update another gem, times and times again, i am tired:
<bigsky>
hanmac1: can it install updates automatically?
ubermonkey has quit [Remote host closed the connection]
<hanmac1>
bigsky: looks like either a bundler problem, ask at #bundler or #RubyOnRails
<anurag_>
HI, I am following errorr " can't yield from root fiber (FiberError)" while using 'parallel' gem in sinatra..Anyone has any idea about it?
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
b00b00 has joined #ruby
<b00b00>
hello
lloyd is now known as Lloyd
<Aeyrix>
h
workmad3 has joined #ruby
<b00b00>
i downloaded page content and saw line like "#<StringIO:0x00000002bd5298>" appended to content, how can i get rid of it? thanks
<jhass>
b00b00: not enough context
<Aeyrix>
b00b00: That generally indicates you're trying to output a class.
<Aeyrix>
As in, the class object, not an attribute or the return value of a function call.
<b00b00>
Aeyrix: yes, i created a function to get url content, and it appended at the end of the content
<b00b00>
without this i didnt get the content (https), if there is a better way it would be nice
<shevy>
just look at the examples ;)
<b00b00>
thanks
<shevy>
the object will have specific methods, for example, f.content_type; for obtaining the content of the webpage, usually the .read method can be used
<jhass>
b00b00: there's a bunch of better ways, however it doesn't help if you don't understand them and you won't understand them if you don't understand your own code
<shevy>
I usually use open-uri like that: result = open(URL_GOES_HERE).read
<shevy>
in your case it may have to be a bit more complicated as you seem to want to make use of openssl as well
ta has quit [Remote host closed the connection]
<b00b00>
thanks a lot guys
<jhass>
b00b00: so, there's a bunch of questions you need to know the answer of: what does .each do? what is o? what does puts do? what does that mean for what puts o does?
jenrzzz has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
sevenseacat has quit [Ping timeout: 256 seconds]
startupality has joined #ruby
sevenseacat has joined #ruby
<bigsky_>
can i use rbenv on windows?
bigsky_ is now known as bigsky
valkyrka has joined #ruby
<Aeyrix>
No.
<Aeyrix>
But you don't need to.
startupality has quit [Quit: startupality]
<bigsky>
Aeyrix: confronted with one terrible error when using rails new
<Aeyrix>
Hmm?
<sevenseacat>
whats the error?
<Aeyrix>
I have rails working on Windows.
<Aeyrix>
I'm on OSX now so I can't follow along with you but I only installed it about a month ago.
bruno- has joined #ruby
<Aeyrix>
Also, #rubyonrails
A205B064 has quit [Ping timeout: 250 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bigsky>
Aeyrix: why you change to osx?
<jhass>
it's shiny!
<Aeyrix>
I work in security and as a programmer. It's easier for me to do a lot of the work I do than Windows, and it's actually usable in comparison to Linux.
<Aeyrix>
It's an almost perfect medium between the two.
zotherstupidguy has quit [Ping timeout: 246 seconds]
<Aeyrix>
It takes a lot of getting used to but now I probably wouldn't go back. It's just too easy for me personally.
zotherstupidguy has joined #ruby
Leef_ has joined #ruby
<sevenseacat>
guess no error
<Aeyrix>
Calm down
<Aeyrix>
The conversation moved to OS X.
<sevenseacat>
is cool
bruno- has quit [Ping timeout: 256 seconds]
<hanmac1>
"OSX usable in comparision to Linux" ... while parsing that sentence my brain got a syntax error
denver has joined #ruby
<Aeyrix>
hanmac1: Entirely subjective.
<Aeyrix>
And to state otherwise is purely farcical.
<Aeyrix>
I used Linux for years.
<Aeyrix>
Then I got a Macbook, because my Linux laptop got stolen so I claimed it on insurance.
<Aeyrix>
I cannot see myself going back.
<Aeyrix>
I don't have to fuck with X11 or any other stupid shit.
<jhass>
my main issue would be that you compare a DE to a kernel.... :P
hmsimha_ has quit [Quit: Leaving]
<Aeyrix>
>OS X is a DE
<Aeyrix>
uh
<Aeyrix>
sure
leafybasil has joined #ruby
<sevenseacat>
i miss using linux
<Aeyrix>
I honestly don't.
<hanmac1>
last time i did use OSX i need to compile everything myself because other than on linux you dont have a nice package management
<Aeyrix>
hanmac1: What?
<Aeyrix>
Do you have hemispatial neglect?
<Aeyrix>
>homebrew
<Aeyrix>
>macports
<Aeyrix>
>the app store
<Aeyrix>
??????????
<sevenseacat>
he said nice
<agent_white>
I am using Linux! Friends, come back to the light! Do not stray!
blackmesa has quit [Ping timeout: 256 seconds]
<Aeyrix>
Uh
<Aeyrix>
homebrew is nice
<Aeyrix>
`brew install ruby`
<Aeyrix>
done
<jhass>
well, point is that Linux still is only the kernel
<Aeyrix>
wow so hard
leafybasil has quit [Remote host closed the connection]
<Aeyrix>
jhass: Are you arguing that Ubuntu is fundamentally more different from Fedora than OS X?
leafybasil has joined #ruby
<sevenseacat>
ubuntu 15.04 is rock solid. but now my work machine is a MBP -_-
<jhass>
there are many aspects to compare, so in some yes, in some not
<Aeyrix>
Linux is fantastic as a server.
<Aeyrix>
I would never use anything else.
<agent_white>
jhass: True! But I refuse to acknowledge the other half being GNU. :D
<Aeyrix>
But as a desktop machine it's simply still missing too much.
<hanmac1>
Aeyrix: the stuff i need are not in the app store, and homebrew/macports are not always working as i wanted ... also on ubuntu i like the "apt-get build-dep" command
<jhass>
What's missing?
<Aeyrix>
Meh.
<Aeyrix>
Works for you.
<Aeyrix>
It *worked* for me.
<Aeyrix>
I just prefer OS X.
<Aeyrix>
I hate iOS, I'm in no way a blind fanboy.
* agent_white
shrugs
<Aeyrix>
But I'd be lying if I said OS X wasn't the sleekest OS I've used.
yeticry has quit [Ping timeout: 265 seconds]
<Aeyrix>
(in my experience, for my use, personally)
<Aeyrix>
Again, I work in security and as a programmer. I also play video games.
<agent_white>
If it doesn't have a tiling wm, count me out. I like boxes!
<Aeyrix>
It's a happy medium.
<hanmac1>
i once had a problem that my stuff did not work on osx because i did need a *.app dir or something funcy like that
<Aeyrix>
.app is a uh
<Aeyrix>
how to put this in english
<jhass>
I'm totally willing to accept "I like working with OS X more than working with Gnome", but "I like working with OS X more than with Linux" is like saying "I like hammers more than stone"
<Aeyrix>
jhass: Come on mate, I thought you were better than such an obtuse stance.
<jhass>
(without even specifying the task you like hammers for)
<Aeyrix>
It's entirely subjective.
<Aeyrix>
I also specified my tasks.
<Aeyrix>
[19:51:16] <Aeyrix>Again, I work in security and as a programmer. I also play video games.
<agent_white>
Well it just doesn't make sense.
<Aeyrix>
hanmac1: Hold on let me
<Aeyrix>
work out how to English it
yeticry has joined #ruby
<Aeyrix>
It's almost like a .zip but not compressed.
<agent_white>
Aeyrix: You've seen those DE's that are complete replicas of OSX, right? If you used one, would you know you weren't using OSX?
<Aeyrix>
agent_white: Yes.
<Aeyrix>
Because I wouldn't be able to play Diablo 3.
tubuliferous_ has joined #ruby
* sevenseacat
totally does not understand this conversation
ta has joined #ruby
<agent_white>
Aeyrix: Ah.
failshell has joined #ruby
<Aeyrix>
agent_white: Yes. Once again, it's a *happy medium* for me between Windows and Linux.
<hanmac1>
Aeyrix: i am doing a binding for wxWidgets using ruby scripts ... tell me how i should put that in a .app stuff ? imo it doesnt make much sense when i want a script file but OSX want something different
<Aeyrix>
And I need that medium.
<agent_white>
I only find OSX to be sleek in it's fisher-price UI. Stripped of that, meh.
tubuliferous_ has quit [Ping timeout: 276 seconds]
tuelz has joined #ruby
<Aeyrix>
toretore: I personally dislike tiling WMs tbh.
rocknrollmarc has joined #ruby
<Aeyrix>
Prefer my floaties.
<agent_white>
:(
rocknrollmarc has quit [Max SendQ exceeded]
<agent_white>
But... tiling is the golden ratio.
<Aeyrix>
:(
<Aeyrix>
I have more windows than screen space.
failshell has quit [Ping timeout: 256 seconds]
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
<agent_white>
I didn't think I'd like them. But I realized I don't really use any GUI apps besides a web-browser, and I enjoy movement via my keyboard more than my mouse.
codecop_ has quit [Remote host closed the connection]
chipotle has joined #ruby
<agent_white>
This third monitor I use is basically my dedicated IRC monitor :P The other 2 vary. Generally the one I face straight-foward is my browser for searching, or main code, and to my left is for scrolling logs, less important code, misc stuff
dawkirst has quit [Remote host closed the connection]
<agent_white>
(music player, etc.0
joonty has joined #ruby
* zotherstupidguy
thinkin "the jerk store called... and they're running out of you"
<Aeyrix>
They have plenty of me. :^)
<zotherstupidguy>
agent_white have you tried ncmpcpp before?
reinaldo_ has joined #ruby
reinaldo_ has quit [Remote host closed the connection]
startupality has quit [Client Quit]
<zotherstupidguy>
agent_white you know i always wanted more than one screen but it sucks to use more than one keyboard, is there a way to fix that?
chipotle_ has joined #ruby
<Aeyrix>
zotherstupidguy: There's a program for that actually.
blackmesa has quit [Ping timeout: 264 seconds]
<Aeyrix>
It was made by Stardock.
chipotle has quit [Ping timeout: 264 seconds]
* zotherstupidguy
is deemed to be a linux user
yqt has joined #ruby
<Aeyrix>
Oh.
<Aeyrix>
Maybe there's something
<toretore>
why do you have to use more than one keyboard?
<toretore>
they're not connected to the same computer?
<shevy>
he has 4 hands
dumdedum has quit [Quit: foo]
<adaedra>
zotherstupidguy: look at synergy
<zotherstupidguy>
shevy one pipe and six urethras, who am i?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
bill gates
<zotherstupidguy>
NO, a penis shaped fountain!
AlphaAtom has joined #ruby
<zotherstupidguy>
toretore i got laptops
<shevy>
wat
<shevy>
a fountain??
startupality has joined #ruby
* zotherstupidguy
apologizes! its a joke
<Darkwater>
why can't I define a Config class?
<shevy>
you don't apologize on IRC man
<Darkwater>
it tells me Config is obsolete and that I should use RbConfig
<shevy>
Darkwater do you get an error?
<Darkwater>
yes
<shevy>
aah so you get a warning
<shevy>
the problem was that the name was too common
<Darkwater>
TypeError
timonv has joined #ruby
<shevy>
so the leading "Rb" was added there
<shevy>
RbConfig::CONFIG['sitelibdir']
<Darkwater>
so I should use another name?
<shevy>
you can use another name in a namespace
<shevy>
for instance, if you have a project 'foobar'
<shevy>
module Foobar
<shevy>
class Config
<shevy>
CONFIG
<shevy>
:)
<Darkwater>
meh, I'll just use another name, thanks
<shevy>
hehe
DerisiveLogic has joined #ruby
<shevy>
toplevel names are often already in use; for instance, "module Kernel" or "class Object" or "class Module"
<shevy>
I once tried to write a MUD in ruby. I thought "every object must be of class Object"
<shevy>
I did not use namespaces back then yet and was confused when I got strange behaviour from modifying class Object
<Darkwater>
heh
colorados has quit [Ping timeout: 245 seconds]
<Darkwater>
well I could use namespaces
<shevy>
\o/
<Darkwater>
but it's an application and not a library, so I'm not sure if it'
<Darkwater>
ll be too much of a hassle
<zotherstupidguy>
Darkwater and you can use irb or pry to check if the name is reserved or even ri
<shevy>
yeah, if you use a longer name, it's rare to clash
<zotherstupidguy>
the point taken here is with metaprogramming namespacing kinda matters more
Leef_ has quit [Quit: Leaving]
tuelz has joined #ruby
startupality has quit [Quit: startupality]
mengu has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
dawkirst has joined #ruby
lidenskap has joined #ruby
rodfersou has joined #ruby
<toretore>
Darkwater: just use a namespace; most of your code will be running inside it anyway, so you don't have to actually write it out
<Darkwater>
yeah
tuelz has quit [Ping timeout: 256 seconds]
sigurding has joined #ruby
<toretore>
if it's a program, there will be like one `MyNamespace::App.new.run` at the bottom
RegulationD has joined #ruby
ahmetkapikiran has joined #ruby
<Darkwater>
will I get burned if I use Main as name?
wWw-BukoLay-Com has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deck` has joined #ruby
avril14th has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
<toretore>
Darkwater: not inside a module, no
moeabdol1 has joined #ruby
moeabdol1 has quit [Client Quit]
RegulationD has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
terlar has joined #ruby
workmad3 has joined #ruby
<Darkwater>
kk
iasoon has joined #ruby
<shevy>
I guess Main is not available by default anyway
<shevy>
so you could use class Main too
<shevy>
>> Main.class
<ruboto>
shevy # => uninitialized constant Main (NameError) ...check link for more (https://eval.in/337485)
<shevy>
but it's not very descriptive as a name :D
tuelz has joined #ruby
<shevy>
now you also may begin to understand why there are so many ruby projects with strange names... thor ... rainbow ... puma ... unicorn ... god ...
<shevy>
picking a name can be hard
lidenskap has quit [Ping timeout: 246 seconds]
<Darkwater>
now how would you recommend using rspec with this?
<Darkwater>
if everything's in the same module
rkazak has joined #ruby
<Darkwater>
just describe Module::Class everywhere?
kibou has joined #ruby
<Darkwater>
or maybe there's a flag or something for .rspec/
<Darkwater>
?*
Leef_ has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phutchins1 has joined #ruby
colorados has joined #ruby
rkazak has quit [Ping timeout: 244 seconds]
<shevy>
not sure, I never got far into rspec
ta has joined #ruby
Akagi201 has quit [Remote host closed the connection]
nettoweb has joined #ruby
<jhass>
Darkwater: yeah, just always use the full thing
<Darkwater>
kk
_tpavel has joined #ruby
chipotle_ has quit [Quit: cheerio]
rahult has joined #ruby
jayeshsolanki has quit [Ping timeout: 256 seconds]
kent\n has joined #ruby
_tpavel has quit [Quit: Leaving]
Mohan_ has quit [Ping timeout: 256 seconds]
mike_c_11 has joined #ruby
SouL_|_ has quit [Ping timeout: 256 seconds]
Deck` has quit [Read error: Connection reset by peer]
Mohan has joined #ruby
Mohan is now known as Guest78477
jeromelanteri has joined #ruby
bigsky has quit [Ping timeout: 250 seconds]
jayeshsolanki has joined #ruby
bartkoo has quit [Quit: bartkoo]
bigsky has joined #ruby
ldnunes has joined #ruby
JDiPierro has joined #ruby
tesuji has quit [Ping timeout: 256 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
colorados has quit [Ping timeout: 272 seconds]
gregf_ has quit [Ping timeout: 246 seconds]
gregf_ has joined #ruby
rahult has quit [Read error: Connection reset by peer]
rahult has joined #ruby
shazaum has joined #ruby
tubuliferous_ has joined #ruby
failshell has joined #ruby
iasoon has quit [Ping timeout: 265 seconds]
rahult has quit [Read error: Connection reset by peer]
codecop has joined #ruby
rahult has joined #ruby
valkyrka has quit [Quit: valkyrka]
terlar has quit [Quit: WeeChat 1.1.1]
tubuliferous_ has quit [Ping timeout: 244 seconds]
failshell has quit [Ping timeout: 256 seconds]
kartouch has joined #ruby
rahult has quit [Client Quit]
qwertme has joined #ruby
hewenhong has joined #ruby
rahult has joined #ruby
Squarepy has joined #ruby
SouL_|_ has joined #ruby
selu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
iasoon has joined #ruby
colorados has joined #ruby
mikecmpbll has quit [Ping timeout: 256 seconds]
banister has joined #ruby
sgambino has joined #ruby
startupality has joined #ruby
dvlwrk has joined #ruby
Hirzu has quit [Read error: Connection reset by peer]
Hirzu has joined #ruby
rahult has quit [Quit: Back to the world of zombies]
AlexRussia has quit [Ping timeout: 256 seconds]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Lloyd is now known as lloyd
infoget has quit [Quit: Leaving.]
zenguy_pc has quit [Remote host closed the connection]
juanpablo_____ has joined #ruby
<maxmanders_>
I'm using Thor, and have a subcommand class called SQS... the default banner calls the subcommand 's_q_s' (as per Ruby conventions) but 'sqs' works... any idea how I'd coerce my class to call itself 'sqs' in the help banner that's generated?
<maxmanders_>
Should lib/ in a Ruby gem follow Module structure; or should all the files live flat in lib/ regardless of the modules that may be nested in the files themselves?
<adaedra>
usually, you should follow module structure
<adaedra>
so you can have A::B::C by including 'a/b/c'
sinkensabe has joined #ruby
unreal_ is now known as unreal
thatslifeson has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Remote host closed the connection]
<shevy>
what is the '#' called ideally as short as possible? hash key? hmm
kyrylo has joined #ruby
<banister>
pound
GriffinHeart has joined #ruby
<canton7>
pound / hash. Note that in the UK, 'pound' is £, not #
quimrstorres has quit [Remote host closed the connection]
nini1294 has joined #ruby
CamonZ has joined #ruby
freerobby has quit [Quit: Leaving.]
<pipework>
maxmanders_: Do that which makes sense, and failing that, do what everyone else does.
<johnhame_>
hanmac1: thanks I'll give that a go :)
<jhass>
I'm not sure I'd use method_missing here, probably not
<jhass>
could proxy unwanted methods
tuelz1 has quit [Ping timeout: 244 seconds]
<johnhame_>
jhass: this is true. I can filter by an array of acceptable methods though?
<johnhame_>
I'd also like to have that method in the parent class, RestClient
<johnhame_>
so it's a bit more DRY
<jhass>
if cleaning up the class design is undesired (since all follow up question towards it were ignored), I'd go for %i(...).each do |method| + define_singleton_method + public_send
jobewan has quit [Quit: Leaving]
thatslifeson has quit [Remote host closed the connection]
tuelz1 has joined #ruby
jobewan has joined #ruby
jobewan has quit [Client Quit]
<johnhame_>
oh oops I missed those messages
<mallu>
Can you please take a look at this code snippet and tell me how I can create both preprod and prod project if compartment is null? https://dpaste.de/zeCE
alexherbo2 has joined #ruby
<jhass>
mallu: what does null mean?
aldarsior has quit [Quit: aldarsior]
<jhass>
the none value in Ruby is nil
<jhass>
do you have the String null or...?
<mallu>
jhass; if there is no value in pdata['compartment']
<jhass>
if compartment == "prod" || compartment.nil?; ...; end; if compartment == "preprod" || compartment.nil?; ...; end;
<mallu>
jhass: so I should create a method everything below "# creating project" so that it can iterate over the method and create preprod and prod projects?
nini1294 has quit [Read error: Connection reset by peer]
<mallu>
jhass: My goal is if compartment has no value, I want to create prod and preprod projects
<jhass>
I guess so, there might be a solution more idiomatic to the framework you're using
<jhass>
but that's nothing #ruby can answer
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nini1294 has joined #ruby
<mallu>
jhass: thank you
Caius has quit [Ping timeout: 276 seconds]
mrdmi has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
airdisa_ has quit []
snath has quit [Ping timeout: 255 seconds]
umgrosscol has joined #ruby
DerisiveLogic has joined #ruby
<Porfa>
can anyone help me out solve my loop issue?
<mwlang>
I must be doing something wrong with selenium + phantomjs. “document = Nokogiri::HTML connection.page_source” leads to an HTML request being sent to “/session/772d0660-f591-11e4-80e0-07267ae42b35/source” rather than giving me the HTML of the current page. That, of course, gives 404 response since “source” isn’t a valid route.
<jhass>
Porfa: I'll look at the code after you properly indented it
<Porfa>
jhass: ok, i'll do it know then thank you
Caius has joined #ruby
rbennacer has quit [Remote host closed the connection]
<Porfa>
i'll do it know, thank you*
<Porfa>
NOW*
bMalum has joined #ruby
mrdmi has joined #ruby
Hounddog has quit [Remote host closed the connection]
<jhass>
and here I always thought phantomjs and selenium are alternatives for the same job
shellfu_broke is now known as shellfu
failshell has quit [Remote host closed the connection]
speakingcode has quit [Remote host closed the connection]
<mwlang>
jhass: phantomjs is a driver for selenium.
<mwlang>
selenium automates browser interactions, so the driver can be firefox, chrome, etc. or in my case the headless phantomjs “browser"
vudew has quit [Ping timeout: 256 seconds]
<jhass>
oh, TIL, I always thought selenium is FF only
leafybas_ has quit [Remote host closed the connection]
yalue has joined #ruby
chipotles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gauke has quit [Quit: gauke]
leafybasil has joined #ruby
<jhass>
Porfa: nope, first of all ruby community standard is two spaces. Why did you indent line 19 a level further compared to line 18? and why did you indent line 10ff at all?
vudew has joined #ruby
anisha has quit [Ping timeout: 246 seconds]
<mwlang>
jhass: way back in the day, I think it was FF only.
Bira has quit []
casadei_ has joined #ruby
<wasamasa>
it doesn't need any extras to work in firefox
<wasamasa>
which is pretty cool
<Porfa>
jhass: because I'm a moron i guess, i don't have the code etiquette because i didn't learn it, sorry
<jhass>
Porfa: I'm going hard on you here about it because indentation is key to follow the flow of your own program, being pedantic about it pays off ;)
diegoaguilar has quit [Remote host closed the connection]
<Porfa>
i agree with you and I'm actually thankful, because when i learn online from websites, i don't have a real person to pull my eras, so thank you i guess! :)
<Porfa>
eras/ears
avahey has joined #ruby
Filete has joined #ruby
havenwood has joined #ruby
thatslifeson has joined #ruby
ndrei has joined #ruby
<jhass>
Porfa: so, let's think about it, what's wone inside your loop?
umgrosscol has quit [Ping timeout: 240 seconds]
yqt has quit [Ping timeout: 264 seconds]
mrdmi has quit [Ping timeout: 256 seconds]
snath has joined #ruby
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SilenceTi has joined #ruby
<SilenceTi>
hello
dfinninger has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
<SilenceTi>
`singleton class': undefined method `default_specifications_dir' for class `Class' (NameError)
<SilenceTi>
i'm having this error
<jhass>
SilenceTi: great!
<SilenceTi>
someone knows why? or could give me a little help?
<SilenceTi>
please
<jhass>
maybe if you provide some more information
mrdmi has joined #ruby
<SilenceTi>
sorry
<Darkwater>
looks like the method default_specifications_dir doesn't exist on class
<SilenceTi>
for example when i do this: gem install bundler
<SilenceTi>
error: /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:34:in `singleton class': undefined method `default_specifications_dir' for class `Class' (NameError)
<jhass>
looks like your ruby installation is borked, how did you get it?
dvlwrk has joined #ruby
<SilenceTi>
apt-get install
danman has joined #ruby
startupality has quit [Quit: startupality]
<SilenceTi>
i'm going to remove it
<jhass>
debian I guess?
<SilenceTi>
yes,
<SilenceTi>
ubuntu
pdoherty has joined #ruby
longfeet has joined #ruby
tubuliferous_ has joined #ruby
anisha has joined #ruby
jenrzzz has joined #ruby
bMalum has quit [Quit: bMalum]
doertedev has quit [Quit: Lost terminal]
<hanmac1>
ahh "inch" ... it does look interesting and funny but for now i cant use it yet :/
kblake has joined #ruby
uptownhr has joined #ruby
<SilenceTi>
jhass: any tips? :)
failshell has joined #ruby
<SilenceTi>
i've removed ruby
<jhass>
SilenceTi: try the brightbox packages, recent and less broken
kblake has quit [Read error: Connection reset by peer]
kblake_ has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
rhllor has joined #ruby
alex88 has quit []
momomomomo has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
kblake_ has quit [Read error: Connection reset by peer]
umgrosscol has joined #ruby
kblake has joined #ruby
momomomomo has quit [Client Quit]
danman has quit [Quit: danman]
snockerton has joined #ruby
hanmac1 has quit [Quit: Leaving.]
icebourg has joined #ruby
Channel6 has quit [Quit: Leaving]
kblake has quit [Read error: Connection reset by peer]
kblake_ has joined #ruby
charliesome has joined #ruby
mistermocha has joined #ruby
That1Guy has joined #ruby
demophoon has joined #ruby
kblake_ has quit [Read error: Connection reset by peer]
kblake has joined #ruby
haxrbyte has quit [Remote host closed the connection]
DerisiveLogic has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
connor_goodwolf has joined #ruby
haxrbyte has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
DerisiveLogic has joined #ruby
MasterPiece has quit [Quit: Leaving]
Pupeno has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
jph98 has joined #ruby
Cust0sL1men has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
diegoaguilar has joined #ruby
diegoaguilar has quit [Read error: Connection reset by peer]
moeabdol1 has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
Eiam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rocknrollmarc has joined #ruby
naftilos76 has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
msgodf has quit [Ping timeout: 256 seconds]
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
rocknrollmarc has joined #ruby
momomomomo_ has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
blackmesa has joined #ruby
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
crazydiamond has quit [Ping timeout: 276 seconds]
aldarsior has joined #ruby
psmolen has quit [Ping timeout: 265 seconds]
haxrbyte has quit [Remote host closed the connection]
<naftilos76>
Hi, how can i express the following with a regex condition: tmp = "one"; I want to check if the last char is 'e' and at the same time if the char next to the last one is not 'n' . I know that i can do tmp !~ /e.$/ but i do know how to combine both in one condition. How can i do both at the same time?
konsolebox has quit [Ping timeout: 264 seconds]
<jhass>
naftilos76: negative lookbehind
<jhass>
(google it)
SilenceTi has quit [Quit: Page closed]
<naftilos76>
thanks man
<jhass>
also note that $ is end of line, \z is end of string
<naftilos76>
ok thanks
haxrbyte has joined #ruby
knikolov has quit [Quit: WeeChat 1.2-dev]
gambl0re has joined #ruby
rocknrollmarc has joined #ruby
roolo has joined #ruby
nini1294 has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Max SendQ exceeded]
jph98 has quit [Quit: jph98]
psmolen has joined #ruby
gaboesquivel has quit []
Mohan_ has quit [Ping timeout: 256 seconds]
mistermocha has quit [Remote host closed the connection]
TheNet has joined #ruby
Mohan has joined #ruby
slash_nick has joined #ruby
roolo_ has quit [Ping timeout: 272 seconds]
Mohan is now known as Guest63868
tus has joined #ruby
tuelz1 has quit [Ping timeout: 256 seconds]
Rollabun_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
SouL_|_ has quit [Ping timeout: 246 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mistermocha has joined #ruby
Pupeno has quit [Remote host closed the connection]
ki0 has quit []
momomomomo has quit [Quit: momomomomo]
Pupeno has joined #ruby
sdothum has joined #ruby
jobewan has joined #ruby
gazay_ has joined #ruby
freerobby has quit [Quit: Leaving.]
ebernhardson has joined #ruby
ebernhardson has left #ruby [#ruby]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wWw-BukoLay-Com has quit []
shadoi has joined #ruby
nobitanobi has joined #ruby
TheNet has joined #ruby
momomomomo has joined #ruby
GaryOak_ has joined #ruby
zotherstupidguy has joined #ruby
Guest1421 has quit [Ping timeout: 272 seconds]
<zotherstupidguy>
hi, how to test web apis with minitest?
<momomomomo>
zotherstupidguy: !ask
<zotherstupidguy>
hi, how to test web apis with minitest?
<tuelz1>
gambl0re: try asking a real question if you want a real answer
ndrei has joined #ruby
LJT has joined #ruby
<b00b00>
I have a few lines string variable, what is the best way in ruby if i want to replace or remove a few chars/manipulate each line ?
scripore has quit [Quit: This computer has gone to sleep]
michaeldeol has quit [Client Quit]
<jhass>
.lines.map ?
<zotherstupidguy>
b00b00 ri String
<jhass>
depends on the specifics really
mistermocha has quit [Remote host closed the connection]
<jhass>
.gsub?
<tuelz1>
b00b00: gsub
umgrosscol has joined #ruby
rbennacer has joined #ruby
<jhass>
.tr?
sohrab has joined #ruby
rbennacer has quit [Remote host closed the connection]
<tuelz1>
if I had to guess
<jhass>
[]= ?
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
gambl0re: I get answers in #git all the time, including github questions.
<jhass>
so many possibilities...
rbennacer has joined #ruby
scripore has joined #ruby
mistermocha has joined #ruby
baweaver has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
<gambl0re>
i asked my question in #git also....do you know the tv show The Walking Dead?
<tuelz1>
lolwut
<dudedudeman>
you still haven't asked your question here. :(
<zotherstupidguy>
gambl0re whats ur question?
<mwlang>
b00b00: best ask how to do something specific on that one. interpreted languages almost were born to process strings.
failshell has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
iamninja has joined #ruby
<tuelz1>
unless you're taking a survey of how many github experts have watched the walking dead in the #ruby channel. Those aren't real questions
<tuelz1>
we really would like to help. That's why we're here
<tuelz1>
helping people makes us feel superior
<tuelz1>
the more we help the bigger our heads get
DerisiveLogic has quit [Ping timeout: 264 seconds]
<dudedudeman>
ok, i'll ask a question then. this is activerecord outside of rails, btw. How do i capture and display validation errors within my template? currently my app is catching my validations and not letting my input get written to the database, but i'm trying to figure out how to show my errors associated with that..
blackmesa has quit [Ping timeout: 272 seconds]
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mjuszczak has joined #ruby
poguez_ has joined #ruby
<tuelz1>
dudedudeman: activerecord should be attaching validation errors to the AR object which you can just read from after validation I believe
<mwlang>
dudedudeman: capture the validation messages to a variable at the point you call valid? or otherwise trigger validations on your objects.
thumpba has joined #ruby
gaboesquivel has joined #ruby
rahult is now known as rahult_
DerisiveLogic has joined #ruby
<mwlang>
dudedudeman: or as tuelz1 says…my answer assumes you’re somehow clearing the validation messages from the AR objects.
<dudedudeman>
currently i'm not doing anything with the messages. all i have are my validations within my model, with a message attached to them
<dudedudeman>
so it looks like i need to go down the path of .valid?
<tuelz1>
dudedudeman: the message is attached to the AR object you're building up and then validating, not to some validation object most liekly
choke|work has quit [Remote host closed the connection]
exadeci has joined #ruby
<dudedudeman>
ah, yes. i've created no such object for it
thumpba_ has joined #ruby
jenrzzz has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.1.1]
mjuszczak has quit [Client Quit]
<tuelz1>
so a typical lifecycle might be you take some POST params, build up an AR object - try to save the object which hits validation callbacks and presents you back with the same AR object that now has an error message attached to it...all this depends on what callbacks you hit, etc. though. Stuff I can't remember off the top of my head
rhllor has quit [Quit: rhllor]
<dudedudeman>
so it would be worth creating that object on my post, then. which duh, makes the most sense
<tuelz1>
dudedudeman: sounds reasonable, of course all of this would be easier to verify with a code sample
failshell has joined #ruby
qwertme has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thumpba has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
<dudedudeman>
lemme go attempt to write out what we've been talking about in actual code
<tuelz1>
dudedudeman: ugh that sounds awful
<dudedudeman>
lol
<tuelz1>
talking about code is so much more fun, are sure you wouldn't rather do that?
<dudedudeman>
sure. lemme see if i can do both. lol
<tuelz1>
srta off topic, am I unique in that I hate actually writing the code?
jenrzzz has quit [Ping timeout: 255 seconds]
That1Guy has joined #ruby
<dudedudeman>
no, that would just make you a good senior level dev. :P
<tuelz1>
hahaha I'm aiming for that manager position already!
penzur has quit [Quit: zzzz]
<dudedudeman>
there you go
<tuelz1>
(not really I'm actually still a jr. level idiot who specializes in sounding like I know what's going on)
<dudedudeman>
it would probably also make you a fairly good speaker/presenter because you could lead people through your ideas, and then watch them try to code them to see if they actually work.
* wasamasa
wonders just how many people that skill got a job
<dudedudeman>
hey, fellow junior checking in!
<tuelz1>
wasamasa: at least one ;)
apurcell has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
davedev24_ has joined #ruby
baweaver has joined #ruby
<dudedudeman>
well, fellow one day junior
<wasamasa>
tuelz1: I recall reading an article about people being angry about other people who
<tuelz1>
dudedudeman: the secret to becoming a junior is the same in every field. Fake it until you make it.
<wasamasa>
're less good at programming getting a programming related job
<tuelz1>
wasamasa: I can't help that the interview process is so entirely backwards that I'm the type of person who gets rewarded
ada2358 has joined #ruby
<wasamasa>
tuelz1: yup
gauke has joined #ruby
<b00b00>
mwlang: I actually want in that multiline string, replace the whole line with a specific char, and other lines replace or append the (") char around a few words, but lets start about how to do the first with replace whole line with a specific char, that case first line, thanks
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
<tuelz1>
b00b00: I would regex for the newline character and split the string based on that. Then work with each string however you want
rocknrollmarc has joined #ruby
Spami has joined #ruby
startupality has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
gauke has quit [Client Quit]
deuterium has joined #ruby
rocknrollmarc has joined #ruby
<dudedudeman>
tuelz1: i have some code, but it's in various parts of my app. what's the best way to show it to you?
<jhass>
b00b00: if you want any sane answers, make a gist with your input and expected output
rocknrollmarc has quit [Max SendQ exceeded]
rocknrollmarc has joined #ruby
<tuelz1>
I thought my answer was pretty sane :(
Pupeno has quit [Remote host closed the connection]
<jhass>
for the amount of input given, it is
<tuelz1>
horray #feelingvalidated
<Darkwater>
what about eachh_line?
<scripore>
is there any way I can reduce this code?
<dudedudeman>
tuelz1: word. i'm currently combing through fixing the NoMethodError it's giving me. i know it's doing that, just trying to figure out how to fix it
gauke has joined #ruby
<tuelz1>
scripore: you'll never hurt anyones feelings if your code is more readable than condensed
<tuelz1>
I would actually love to see math formulas translated into ruby. Has anyone done this?
<tuelz1>
I have to imagine it exists somewhere
Guest63868 has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
wldcordeiro_ has joined #ruby
Mohan has joined #ruby
<tuelz1>
dudedudeman: I will say that you should consider it a code smell if you're having a hard time showing the code that is causing a specific problem, although that isn't super useful as I can't really tell you how to do it better yet either
<tuelz1>
but it's still a good idea as a jr. to start recognizing when your code could be structured better even before you know HOW to structure it better
blackmesa has joined #ruby
gazay_ has quit [Quit: gazay_]
<dudedudeman>
the post where i'm trying to create my errors object is the calibration_post.rb, and the index where i'm trying to show my error is the index.rb. though i realized that should be index.erb
paulcsmith has joined #ruby
rocknrollmarc has quit [Ping timeout: 265 seconds]
<tuelz1>
dudedudeman: first thing I notice is that cal is a local variable, does your template have access to that variable? I'm presuming not
n008f4g_ has joined #ruby
lolmaus has joined #ruby
ghostmoth has joined #ruby
<dudedudeman>
let's go with no
<tuelz1>
fix that then debug whether the errors are actually on cal like you expect
<dudedudeman>
so i would just need to @ all of that
<dudedudeman>
ok
<weaksauce>
dudedudeman you are gisting two separate things
Zackio has quit [Remote host closed the connection]
rahult_ has quit [Max SendQ exceeded]
<dudedudeman>
weaksauce: well, i guess it intially started with me wanting to display AR errors in my view. but then i'm quickly realizing that i didn't have an errors object at all
zotherstupidguy has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
<weaksauce>
a redirect probably won't keep those errors btw. it will start another context in the handler for the redirected page
zotherstupidguy has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<weaksauce>
a better approach would be to gist the controller in it's entirety
<dudedudeman>
my entire app.rb?
<weaksauce>
yeah. I assume it's not huge
<dudedudeman>
stand by
<tuelz1>
what routing library are you using OR what framework are you using?
<tuelz1>
haha, I've never used sinatra, but I would imagine redirect would in fact start up another context entirely
SexGirL has joined #ruby
<tuelz1>
if render is a thing in sinatras routing lib I would bet that's what you want
<weaksauce>
erb
<weaksauce>
apparently is render in sinatra
<tuelz1>
gotcha
<dudedudeman>
i'm still getting nomethoderror on nilclass
<weaksauce>
dudedudeman so you are losing your monitor info when you redirect I'd assume.
<tuelz1>
essentially you're telling sintra to drop everything and go down this path instead you should be telling sinatra to build up a view with the current context
scripore has quit [Quit: This computer has gone to sleep]
davedev2_ has joined #ruby
<weaksauce>
the last redirect will never happen dudedudeman
scripore has joined #ruby
<dudedudeman>
i just removed it. don't know what to put in it's place, but i removed it
<weaksauce>
delete that and change the second redirect on line 97 to erb
<dudedudeman>
like this? erb :"/monitors/#{params[:tag]}/calibrations/new"
<weaksauce>
yeah minus the :
<dudedudeman>
done
yvemath has quit [Remote host closed the connection]
BLuEGoD has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 244 seconds]
<dudedudeman>
good to know that's the render then
<weaksauce>
well that's likely not going to work but it's a start
<dudedudeman>
where am i going wrong with my errors on nilclass?
ubermonkey has joined #ruby
<dudedudeman>
WAIT
<weaksauce>
you probably need to use erb with the path to the template.
<tuelz1>
well first find out if @cal exists in the template at all
BLuEGoD has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
SexGirL has quit []
ghr has quit [Ping timeout: 264 seconds]
<dudedudeman>
weaksauce: ok, that would just be erb :monitor_new then
<weaksauce>
yeah.
sohrab has quit [Ping timeout: 265 seconds]
<dudedudeman>
tuelz1: would that be like a cal.inspect?
<weaksauce>
you can send local variables to the template like this dudedudeman
<weaksauce>
erb :something, locals: {list: foos}
gsd has joined #ruby
gsd has quit [Max SendQ exceeded]
<dudedudeman>
ahhhhhh that's what locals is used for!
<tuelz1>
dudedudeman: sure, render that out in your erb. Not my preferred way to debug, but it would work.
<weaksauce>
then inside the template you would use it like <%= list %>
gsd has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<weaksauce>
dudedudeman there are two ways to populate variables from a controller to a view(template).
<weaksauce>
1 is to make it an instance variable to the class. @something = something_else
<tuelz1>
1: magic 2: blackmagic?
<weaksauce>
2. is explicitly send it in via a locals hash
ubermonkey has quit [Ping timeout: 240 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
PhantomSpank has joined #ruby
<tuelz1>
does sinatra use naming conventions to require in classes?
<dudedudeman>
ok, i went hte locals route for this one, and when passing cal(my local) in to the view, i get undefined local variable or method `cal' for #<DreamColorApp:0x00000002ccbdc8>>
<weaksauce>
the locals keys become bound to the view context as local variables. so locals: {this: var1, that: var2} exposes this and that as local variables that you can use inside the view
<tuelz1>
cal != @cal
<dudedudeman>
tuelz1: by making it a local, doesn't that mean i don't need the @?
einarj has quit [Remote host closed the connection]
<weaksauce>
dudedudeman gist your views
<tuelz1>
just making sure you understand the difference. Are you passing in the instance var and calling the local in your view? That SHOULD work.
<dudedudeman>
yes. created the instance variable in my controller, passedi n the local in my view
<pontiki>
i bet the ruby you run under sudo is not the ruby you referenced there
qwertme has joined #ruby
ducklobster has quit [Ping timeout: 272 seconds]
<pgunnars>
correct, dam dass stupid
mtakkman has quit [Ping timeout: 264 seconds]
bigkevmcd has quit [Quit: Outta here...]
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
<pontiki>
a hugely common mistake
<pgunnars>
holy shit rvm is stupid
vudew has quit [Quit: Lost terminal]
<tuelz1>
dudedudeman: okay so what url are you hitting to go to index? Are you sure you're not just hitting something default that isn't even hitting your action that defines cal?
SouL_|_ has joined #ruby
<weaksauce>
dudedudeman you still have the redirect on line 100
scripore has quit [Quit: This computer has gone to sleep]
<tuelz1>
dudedudeman: because I imagine index.erb gets hit with more than just the route we've been eyeballing
<weaksauce>
delete that
<weaksauce>
you shouldn't be redirected to the index at all
<dudedudeman>
deleted. ugh, sorry.
<dudedudeman>
:(
<weaksauce>
try it now
Guest41493 has quit [Ping timeout: 272 seconds]
<tuelz1>
well index.erb is where he is calling all the cal stuff so I think he DOES want to go to index on error
alexherbo2 has quit [Quit: WeeChat 1.1.1]
<tuelz1>
oh, but not REDIRECTED, gotcha
<dudedudeman>
still not working
<tuelz1>
stacktrace
<tuelz1>
XD
scripore has joined #ruby
BLuEGoD has quit [Quit: oh cruel destiny]
zz_Outlastsheep is now known as Outlastsheep
<dudedudeman>
in this case, from the particular url i'm at, i want to stay on the same page. which is calibrations/new. just with it displaying my error.... which oh my god, why am i trying to put these errors on the index then. f*ck
dfinning_ has quit [Remote host closed the connection]
BLuEGoD has joined #ruby
AlphaAtom has joined #ruby
<tuelz1>
dudedudeman: that ISN'T monitor/:stuff/calib/new you're hitting is it? Which is where you're defining cal
startupality has quit [Client Quit]
<dudedudeman>
tuelz1: where i'm writing to my database through AR is on my calibration_new erb template. that's where i want to stay when the errors pop up. currently, before i started attempting any of this, if i hit submit with all fields blank, it would just 'redirect' me back to the same calibration_new erb template, just with no calibration added
AlphaAtom has quit [Max SendQ exceeded]
That1Guy has joined #ruby
<tuelz1>
looks like you're erb'ing show not new
<tuelz1>
or rather hitting show route not new route
<tuelz1>
new route is where you've defined cal
AlphaAtom has joined #ruby
<dudedudeman>
blaah, i see that now
<tuelz1>
this `GET /monitors/753731/calibrations` is the route you're hitting before getting the error
AlphaAtom has quit [Max SendQ exceeded]
startupality has joined #ruby
<tuelz1>
that isn't taking you to your new route
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
alexherbo2 has joined #ruby
<weaksauce>
dudedudeman what's the command you are using to run your app?
<tuelz1>
dudedudeman: nope, gave me wrong stack or you still arent' hitting new with POST
startupality has quit [Client Quit]
wldcordeiro_ has quit [Quit: Konversation terminated!]
<dudedudeman>
the -p and all that extra stuff are just waht i need to get it running in my environment(cloud9)
rbennacer has quit [Remote host closed the connection]
<tuelz1>
the webserver should say something like `POST /mon/#s/calib/new`
* jalcine
cringes at cloud9
<jalcine>
never got that working
kenneth has joined #ruby
startupality has joined #ruby
Morkel has joined #ruby
<tuelz1>
only when you post to the route will you hit the route which defines your crap
<dudedudeman>
jalcine: ha, i hear you. it's actually great for me since i don't work full-time on code, i can just pop up my code on my work computer during downtime(boss approved)
<dudedudeman>
don't have to drag my computer around
<jalcine>
does cloud9 define a means of running webapps? like how heroku recommends using foreman?
<dudedudeman>
tuelz1: i read what you are saying, and it makes sense. then i turn and look at my code and go... dammit.
<dudedudeman>
jalcine: well, i don't think i can host on it. but i can sandbox and dev on it. and run things in multiple types of browers within the ide itself
<tuelz1>
dudedudeman: what exactly are you typing in your url bar in your browser to hit that?
jayeshsolanki has quit [Quit: bye!]
<tuelz1>
dudedudeman: or what is the href of the link you're clicking
startupality has quit [Client Quit]
arashb has quit [Remote host closed the connection]
<tuelz1>
you're hitting the GET LSKJDLSJDF:LJKSDF/new
quimrstorres has quit [Remote host closed the connection]
<tuelz1>
not the POST asdlfkjasd;lfjad/new
<tuelz1>
dudedudeman: I'm PMing you the lines where the route takes you
<dudedudeman>
prior to adding in this error stuff and this chat we have right now, clicking that link was working
startupality has quit [Client Quit]
<tuelz1>
magic?
<dudedudeman>
ha, sure sure
<dudedudeman>
ok, i saw your pm
<dudedudeman>
does that mean i need to be defining all of these errors and the object... somewhere else?
<tuelz1>
dudedudeman: no, that means you need a conditional (I guess I'm not sure what idiomatic sinatra is) that says if cal exists post errors if they exist
<tuelz1>
if it doesn't exist just render the rest of the crap
momomomomo has joined #ruby
<tuelz1>
maybe someone in #sinatra can give you advice on idiomatic sinatra because that feels ugly
<weaksauce>
dudedudeman are you restarting sinatra after you make a change?
<pontiki>
there's no idioms in sinatra like that
<pontiki>
sinatra is a route response framework. controllers and views
<pontiki>
that's it
AlphaAtom has joined #ruby
marr has quit [Ping timeout: 240 seconds]
<pontiki>
you make up everything else
<tuelz1>
I'm too lazy to think about a better way to code that, but feel free to look into it
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
<dudedudeman>
tuelz1: i see exactly what you're saying now
<dudedudeman>
i'm pointing to a route where none of the info i want exists
moeabdol1 has joined #ruby
<tuelz1>
dudedudeman: knowing is half the battle, you're 50% there according to GI Joe
AlphaAtom has quit [Max SendQ exceeded]
b00b00 has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
* tuelz1
wonders if that saying comes from gi joe or whether my brain is fried because I have low stamina with reading code...
b00b00 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<dudedudeman>
yes, that's a GI Joe PSA
<tuelz1>
#winning
PhantomSpank has joined #ruby
rdark has quit [Quit: leaving]
<dudedudeman>
"The show featured physical fighting and high-tech weapons as a way to compensate for toned-down violence and lack of bullets in what was intended to be children's program. The show also featured public service announcements placed at the end of each show. These PSAs ended with the phrase: "Now I know!" "And knowing is half the battle."[25] The series ran for a total of 95 episodes, from 1985 to 1986."
thatslifeson has quit [Remote host closed the connection]
<tuelz1>
damnit dude, fix your code, don't google gi joe crap. I need resolution, and my brain is already fried
<dudedudeman>
tuelz1: trust me, i want to. lol. i was supposed to go to lunch an hour ago :/
<tuelz1>
in aprox 5 minutes I'll actually start making your app worse than it is
<dudedudeman>
:( :(
<tuelz1>
and neither of us will realize it
thatslifeson has joined #ruby
<tuelz1>
until we both give up
PhantomSpank has quit [Read error: Connection reset by peer]
<dudedudeman>
i'm about 5 minutes ahead of you on the giving up part
<tuelz1>
cool, well if you're done I'm cool with that
PhantomSpank has joined #ruby
<tuelz1>
walking away is a legit strat for recognizing problems
<dudedudeman>
ha, i'm desparate to fix this, but i also should have gone to lunch an hour ago
<dudedudeman>
desperate?*
<tuelz1>
I highly recommend walking away once you understand the problem. Then you can come back with fresh eyes on a problem you understand and need to fix
alkoma` has joined #ruby
alkoma has quit [Remote host closed the connection]
<dudedudeman>
ok. then i will graciously do that
alkoma` has quit [Remote host closed the connection]
Guest1421 has quit [Ping timeout: 256 seconds]
<tuelz1>
I think I'm walking away for a few myself. be back in probably 10ish
<dudedudeman>
tuelz1: weaksauce thank you SO much for your help
<tuelz1>
indeed, good luck
<dudedudeman>
i've already learned a lot just talking through this
<tuelz1>
next time make a new branch named poop or I won't help you though
alkoma has joined #ruby
* dudedudeman
off to see the wizard about lunch
chinmay_dd_ has quit [Quit: Leaving]
Hijiri has joined #ruby
drocsid has quit [Ping timeout: 276 seconds]
deuterium has quit [Quit: zzZZZzzz..]
thatslifeson has quit [Ping timeout: 264 seconds]
coventry has joined #ruby
thatslifeson has joined #ruby
dfinninger has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Astrologos_ has joined #ruby
seal has quit [Quit: Ex-Chat]
ghostmoth has quit [Quit: ghostmoth]
<atmosx>
hello
<atmosx>
what's 'the wizard about lunch' ?
lavros_ has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
lavros has quit [Ping timeout: 245 seconds]
<pontiki>
a reference to the wizard of oz, vaguely
<pontiki>
?
<atmosx>
I see. I always confuse 'the wizard of OZ' with 'Alice in wonderland' haven't read neither though
<pontiki>
that's from the movie, the song
<atmosx>
It's not a common reading for Europeans I assume..
<atmosx>
ah
<pontiki>
no one reads them in the US either
<atmosx>
didn't saw the movie either
<pontiki>
popular culture is movies, tv
<atmosx>
pontiki: really? I thought it was kinda like... in the standard reading for a kid you know, in the US.
baweaver has joined #ruby
dorei has quit [Ping timeout: 252 seconds]
<pontiki>
hardly
<atmosx>
hm, I see.
tuelz1 is now known as tuelz
djbkd has quit [Remote host closed the connection]
<shevy>
what is standard reading in the USA anyway
<shevy>
donald duck?
<pontiki>
are you referring to the literature required by public education?
<atmosx>
shevy: Moby Dick
<atmosx>
?
<pontiki>
or typical?
<atmosx>
pontiki: typical
<pontiki>
not any more atmosx
<shevy>
dunno, default school one I would assume
<eam>
we don't read anymore
PhantomS_ has joined #ruby
<shevy>
hehehe
Astrologos_ is now known as dorei
PhantomSpank has quit [Read error: Connection reset by peer]
<jhass>
except for everyones emails you mean
gauke has joined #ruby
<eam>
the material specifics depend on whether the public school has a signed deal with coke or pepsi
workmad3 has quit [Ping timeout: 252 seconds]
towski_ has quit [Remote host closed the connection]
<pontiki>
literature skills are not part of the Great Test
djbkd has joined #ruby
SafeMoneyOnl has joined #ruby
<atmosx>
eam: you're joking right?
<atmosx>
pontiki: what 'great test'?
<eam>
half joking
AlexRussia has joined #ruby
rocknrollmarc has quit [Ping timeout: 272 seconds]
<atmosx>
I totally screwed a rails project lol.
n80 has joined #ruby
<atmosx>
fuck it I'll wipe it and restart from scratch...
<pontiki>
we've long had what's referred to as "Standardized Testing" at a few grade levels.
lrcezimbra has joined #ruby
gauke has quit [Quit: gauke]
<atmosx>
pontiki: yes but you should read things like, I don't know T.S. Eliot for example?
rbennacer has joined #ruby
jtdowney has joined #ruby
<pontiki>
but with the "No Child Left Behind" policies initiated in the Bush era, and continued in the Obama era, the emphasis on raising US test scores has pushed the education system to teaching to the test
<pontiki>
not on learning
<atmosx>
I mean it shoul be standard education or something
<atmosx>
I see
<pontiki>
atmosx: *I* have read TS Eliot, and read him to my kids, to the point they can quote him
<atmosx>
so it's working, no child is left behind? lol
<atmosx>
pontiki: awesome :D
<pontiki>
nope. everyone's shoes are nailed to the starting line the same way.
<eam>
corporate sponsorship is, in fact, bleeding over into public school policies
lkba has joined #ruby
ramfjord has joined #ruby
<eam>
I don't think they're writing the textbooks yet, though
<atmosx>
I can quote only 3 major Greek poets, some shakespeare and hmm maybe Kipling (the most commonly known poem at least).
Astrologos_ has joined #ruby
<eam>
at least not directly
<pontiki>
the deep purpose of education is to prepare the masses to submit to be wage slaves
<atmosx>
pontiki: I like your perspective.
yqt has joined #ruby
<pontiki>
eam: not directly, true, but the funding for the writing, and the funding to push the Texas School Board (biggest influence on textbook publishers in the US)
<pontiki>
let me rephrase slightly: US Education System
A205B064 has joined #ruby
<pontiki>
not education per se
<atmosx>
pontiki: what is your fav poem from TS Eliot, give me something to read :-)
dorei has quit [Ping timeout: 246 seconds]
momomomomo has quit [Quit: momomomomo]
<pontiki>
i confess, it's Old Possum's Book of Practical Cats
benlieb has joined #ruby
<pontiki>
but Four Quartets is probably the most powerful
<atmosx>
pontiki: isn't that for children?
andrew-l has joined #ruby
<atmosx>
The poem begins with two epigraphs taken from the fragments of Heraclitus: ... okay I think I'll order it now.
<atmosx>
it's a collection of just 4 poems?
<shevy>
atmosx follows the long tradition of Sokrates
Outlastsheep is now known as zz_Outlastsheep
<atmosx>
shevy: lol, what's that?
<shevy>
poems I guess?
<shevy>
theater
<atmosx>
shevy: Heraclitus was a pre-socratic philosopher :-P
<shevy>
reading lots of lots of plays
<shevy>
I only know Sokrates and nobody else
BLuEGoD has quit [Remote host closed the connection]
pgunnars has quit [Ping timeout: 246 seconds]
<pontiki>
atmosx: a lot of stuff i read is intended for young people
<atmosx>
ah, yes I love theater, especially shakespear, Greek (ancient) theather... I live near one of the oldest theaters in Greece, I get to see many tragedies in the summer, some of them are well-made others suck. But generally I like more reading about them (before watching them).
mistergibson has quit [Quit: Leaving]
<atmosx>
Reading an analysis of the themes helps you gain a deeper understanding of what you're watching.
<atmosx>
pontiki: hm, why is that?
paulcsmith has quit [Quit: Be back later ...]
<pontiki>
some of it is more honest
BLuEGoD has joined #ruby
<pontiki>
a lot of adult lit is rather banal
<pontiki>
i just finished The Goldfinch, last year's pulitzer prize winner
<pontiki>
i found it rather insufferable
DynamicMetaFlow has joined #ruby
<shevy>
The Goldfish?
<pontiki>
no
<pontiki>
Goldfinch
<shevy>
:)
<pontiki>
the bird
<pontiki>
a painting really
paulcsmith_ has joined #ruby
<atmosx>
pontiki: I was reading the 'immitation game' the book. But it felt like reading an essay on Turing's life more than a book and I stopped.
<pontiki>
everyone's been talking about the art talked about in it
<pontiki>
but the character is a complete weasel
michaeldeol has joined #ruby
baweaver has quit [Remote host closed the connection]
<atmosx>
pontiki: now I'm reading 'A letter to humans' http://www.eglimatologia.gr/letter-in-humans/ ...it's a short essay more than book. But it's incredibly deep. I admire deeply both Ghandi and Tolstoy so it resonates with me...
<pontiki>
good
nobitanobi has quit [Read error: Connection reset by peer]
<atmosx>
weird the title of the book can't be found in English hehe
Hijiri has quit [Ping timeout: 252 seconds]
nobitanobi has joined #ruby
dc has quit []
<atmosx>
It's a collection of letters between Ghandi and Tolstoy and then Einstein and Freud.
<atmosx>
about war, faith and violence.
<pontiki>
i'd love to read that
paulcsmith_ has quit [Ping timeout: 264 seconds]
dc has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
<benlieb>
I use allow_any_instance_of and expect_any_instance_of in rspec pretty often. But I can't find these on the rspec site. Have they been deprecated or replaced?
<atmosx>
That's the first of the book though. I finnished it's pretty powerful. I was amazed by the clearness of Tolstoy view... Also, you'll probably see where many of Ghandi's ideas come from.
nobitanobi has quit [Read error: Connection reset by peer]
cajone has left #ruby [#ruby]
<GaryOak_>
That's so cool to read when really smart people talk to each other
<atmosx>
benlieb: I can see it on v3 of rspec... but I'm more of a minitest guy so I don't know what to tell you.
* dudedudeman
stares at code and wonders how he even got here. what is life? what is code? is this real life? do i exist?
nobitano_ has quit [Ping timeout: 255 seconds]
<SafeMoneyOnl>
Win 20.000-30.000 Euro Per year (1700-2500 Euro per month) With 1 H per day for 365 days. At start you will earn little money but with time your starting to learn much more at start you can win 0.5 euro per day first week and after a month you will earn 10-20 euro per day Its Verry simple just Make an account on my link and i will train you and i will be your guide as much you need Sign Up
<pontiki>
i think it can be simplified, but i haven't brainpower right now
<blahwoop>
i see
<blahwoop>
hmm ok i'll take a look into it
charliesome has quit [Quit: zzz]
<blahwoop>
thank
<blahwoop>
s
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
SouL_|_ has quit [Ping timeout: 244 seconds]
<dudedudeman>
shevy: save me
<shevy>
haha
<atmosx>
blahwoop: the next step would be to put your classes in sep files and write some tests. Write a custom rakefile to execute the script :-)
railsForDaiz has joined #ruby
<shevy>
dudedudeman today I wanna be productive and do high quality stuff
<pontiki>
shevy: get the heck off irc then :D
<shevy>
I'd wish it would be easier to write a GUI and a web-GUI at the same time
* dudedudeman
realizes he is not high quality
lavros_ has quit [Quit: leaving]
blackmesa has quit [Ping timeout: 252 seconds]
<jhass>
blahwoop: have a look at File.readlines and File.foreach
<atmosx>
shevy: an icon tha launches a browser at 127.0.0.1 ...?
<shevy>
pontiki I have to idle to power together with GaryOak_ and dudedudeman!
startupality has joined #ruby
<shevy>
atmosx everything! How did you get into sinatra btw? I mean, to have a fully working and functional thing for your university-related project back then? I still don't have a sinatra-ftp part finished...
<blahwoop>
jhass: i was using that before
marr has joined #ruby
spider-mario has joined #ruby
<jhass>
What's wrong with it?
<atmosx>
shevy: sorry talking to gf. brb :-P
<dudedudeman>
atmosx: you a sinatra guru?
kyrylo has quit [Quit: Konversation terminated!]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<blahwoop>
better to use read_lines instead of open? and do a for_each?
<atmosx>
dudedudeman: nope far from it
<shevy>
blahwoop .foreach may be better for big files
<shevy>
or is it each_line hmmmm
graydot has joined #ruby
<blahwoop>
shevy: im using each_line now
graydot has quit [Client Quit]
<jhass>
blahwoop: yes, it's a call and a level of nesting less
railsForDaiz has quit [Read error: Connection reset by peer]
<shevy>
I know that reading in a 13MB log file through File.readlines isn't the fastest thing in the world
andrew-l has quit [Read error: Connection reset by peer]
andrew-l has joined #ruby
<jhass>
blahwoop: you don't need the to_a on line 20
fawefeawfewa has quit [Ping timeout: 248 seconds]
<blahwoop>
jhass: good catch thanks!
BTRE has quit [Quit: Leaving]
<GaryOak_>
shevy: I haven't written code for work in a few days :(
michaeldeol has joined #ruby
startupality has quit [Quit: startupality]
bigmac has quit [Ping timeout: 264 seconds]
<atmosx>
dudedudeman: I just write sinatra apps, but I don't feel that I have deep knowledge of the framework.
tmi has joined #ruby
scripore has joined #ruby
<atmosx>
dudedudeman: I use a skeleton, which turns sinatra into MVC-like.
<dudedudeman>
atmosx: i have not heard of that...
* dudedudeman
off to visit the wizard of the skeletons
lrcezimbra has quit [Quit: Konversation terminated!]
Soda has quit [Remote host closed the connection]
nobitanobi has joined #ruby
6A4ABYMS5 has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
<dudedudeman>
apparently i've looked in to this before, because that google link is purple
crazydiamond has joined #ruby
<GaryOak_>
atmosx: because the framework isn't that deep
<atmosx>
dudedudeman: but I'm not going to add any other code probably.
lidenskap has quit [Remote host closed the connection]
johnhame_ has quit []
<dudedudeman>
oh that's fine. i like following along with things and end up usually taking methodology from pieces of it. in this case, the folder structure will be something that will be good to look at in the future
Kricir has quit [Remote host closed the connection]
tonyhb has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
woodruffw_ has joined #ruby
woodruffw has quit [Read error: Connection reset by peer]
woodruffw_ is now known as woodruffw
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blahwoop>
jhass: is this better? File.readlines(dictionary).each { |line| self.words << line.downcase.chomp
tuelz has joined #ruby
* jglauche
is wondering if to tinker with nomethoderror to set accessors on-the-fly
<jhass>
blahwoop: just File.foreach(dictionary) do |line|
Akagi201 has quit [Ping timeout: 272 seconds]
bruno- has joined #ruby
gaboesquivel has quit [Remote host closed the connection]
slash_nick has quit [Ping timeout: 255 seconds]
jackjackdripper has quit [Quit: Leaving.]
serivichi has joined #ruby
paulcsmith_ has joined #ruby
yvemath has joined #ruby
SouL_|_ has joined #ruby
postmodern has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
aelevadoan and as what user runs that? seems as if that user has not enough permission
<aelevadoan>
shevy: a regular user
<shevy>
GaryOak_ isn't that misspelled?
<shevy>
aelevadoan yeah but obviously not as the user funga
<aelevadoan>
thats why I did sudo
<aelevadoan>
but it didnt recognize it
aewffwea has joined #ruby
duncannz has quit [Ping timeout: 252 seconds]
Hijiri has quit [Quit: WeeChat 1.0.1]
startupality has joined #ruby
DerisiveLogic has joined #ruby
Rollabunna has joined #ruby
Kricir has quit [Remote host closed the connection]
GaryOak_ has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bruno-_ has joined #ruby
<blahwoop>
hey jhass: the set_neighbor method you showed me only worked for half the board
<blahwoop>
then it just errors out
<shevy>
don't think it has to do with recognizing, the unix permission model is simple. just set the permission to allow everyone to change it aelevadoan and try again
<jhass>
yeah, I guess I couldn't quite decipher your logic
<shevy>
or wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz and compile this
startupality has quit [Client Quit]
<jhass>
"just errors out" means what though?
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<aelevadoan>
shevy: everyone to change what?
TheHodge has quit [Quit: Connection closed for inactivity]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
aelevadoan well I don't know the current permissions, just change to 777 for now, retry, then change it back to the original one?
<jhass>
that sounds like a very bad advice
<aelevadoan>
what permissions should home regularly have?
* jhass
reads logs
<blahwoop>
jhass: it can't set the nieghbors
<jhass>
blahwoop: common, you can do better
<blahwoop>
lol
<jhass>
proper error description please
<shevy>
aelevadoan I have 0755 for my main user
A205B064 has joined #ruby
<baweaver>
shoot, it's weak to 980 vs 909
<jhass>
aelevadoan: let's actually figure out your situation, what's ls -la | grep .rbenv ?
wallerdev has joined #ruby
<aelevadoan>
drwxr-xr-x 9 root root 4096 May 8 15:26 .rbenv
<jhass>
so you ran git clone git://github.com/sstephenson/rbenv.git .rbenv with sudo?
<aelevadoan>
yes
<jhass>
there you go
<jhass>
?root
<ruboto>
I don't know anything about root
<jhass>
meh
ghr has joined #ruby
zotherstupidguy has quit [Ping timeout: 240 seconds]
<aelevadoan>
aha
wallerdev has quit [Client Quit]
noname has joined #ruby
<aelevadoan>
so I should change those permissions to 755
<jhass>
aelevadoan: never run stuff as root/with sudo by default/to fix things, only do it when explicitly instructed or when you know why it can't possibly work otherwise
<aelevadoan>
on both .rbenv
<aelevadoan>
and ~?
<jhass>
no
<aelevadoan>
jhass: I think it didnt let me do git clone without sudo
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sohrab has quit [Ping timeout: 245 seconds]
gizless has joined #ruby
<aelevadoan>
jhass: ok, it works now
mitchellhenke has quit [Quit: Computer has gone to sleep.]
gizmore has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
jwingfi has joined #ruby
bigsky has left #ruby [#ruby]
<jhass>
!fact mk root eneral advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<ruboto>
jhass, I will remember that root is eneral advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
Guest24 is now known as lele
ghr has quit [Ping timeout: 265 seconds]
<blahwoop>
jhass: 78:in `match_word': undefined method `each' for nil:NilClass . trying to figure out what part of it is broken
shazaum has quit [Quit: Leaving]
griffindy has joined #ruby
jackjackdripper has joined #ruby
orion has left #ruby [#ruby]
<jhass>
blahwoop: well, I guess next unless (0...grid.size) === r and next unless (0...grid.size) === c never fired because those can't get true
<shevy>
jhass eneral advise?
<weaksauce>
eternal perhaps
<jhass>
oh, c&p fail, thanks
<shevy>
or veneral
<shevy>
meneral
SafeMoneyOnl has joined #ruby
<jhass>
!fact ed root General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<ruboto>
jhass, I stand corrected that root is General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<shevy>
the english language has too many words anyway
<blahwoop>
yeah
<weaksauce>
venerable it would be
<_blizzy_>
I just typed 'rails db:migrate'
workmad3 has quit [Ping timeout: 255 seconds]
<_blizzy_>
._.
<jhass>
blahwoop: so I guess you build relying on your code not doing what your intent was
moretti has joined #ruby
<shevy>
there are some english novelists who tend to use really strange words that I don't get to read otherwise
<jhass>
blahwoop: "guess you build code relying on your other code not doing what your intent as"
<jhass>
*was, goddammit
Dopagod has quit [Ping timeout: 276 seconds]
<jhass>
I should just give up
<gambl0re>
do i need to install a package in order to use "brew install" command?
<shevy>
a bit off-topic ... because I am trying to clone "ls" in ruby ...
<blahwoop>
i get what youre saying lol
<weaksauce>
you need to install homebrew gambl0re
<gambl0re>
ok
<shevy>
I see option --all, and option --almost-all; the difference seems to be displaying . and .. - are these two useful for display when one performs a "ls"?
<pontiki>
can be, especially if you intend to pipe the output somewhere and not wish to have to worry about stripping those two out
jwingfi has quit [Remote host closed the connection]
<weaksauce>
aelevadoan try ruby-install
Peetooshock has quit [Remote host closed the connection]
<aelevadoan>
weaksauce: i dont understand
<Nilium>
Should use FreeBSD, save you some OS memory ಠ_ಠ
<weaksauce>
apt-get install ruby-install
<aelevadoan>
weaksauce: instead of using rbenv?
<weaksauce>
ruby-install ruby 2.2.2
<Nilium>
rbenv doesn't have its own installer, as far as I know
<Nilium>
It just works with e.g., ruby-install
<weaksauce>
you can use rbenv to switch rubies after you get it installed
lidenskap has joined #ruby
jwingfi has joined #ruby
<Nilium>
Reminds me, I switched to chruby on my new machine, still need to see how that works out in practice since I haven't done anything ruby-based in a while.
<aelevadoan>
weaksauce: bash: ruby-install: command not found
<aelevadoan>
weaksauce: according to the digital ocean documentation, I already have swap
That1Guy has joined #ruby
rocknrollmarc has joined #ruby
Channel6 has quit [Quit: Leaving]
<weaksauce>
according to free you already have it as well
towski_ has joined #ruby
<aelevadoan>
weaksauce: yeah, thats where I checked it out
swgillespie has joined #ruby
Perdomo has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
<shevy>
Nilium you abandoned ruby :(
Hijiri has joined #ruby
<weaksauce>
aelevadoan try `rehash`
<aelevadoan>
weaksauce: if I am out of memory at some point, do I have to wait until less memory is used and then run the program again or what?
<weaksauce>
then try `ruby-install ruby 2.2.2`
swgillespie has quit [Client Quit]
<aelevadoan>
bash: rehash: command not found
<weaksauce>
sudo rehash then
<aelevadoan>
nope
<aelevadoan>
command not found
<weaksauce>
did you install ruby-install?
<weaksauce>
apt-get install ruby-install
lidenskap has quit [Ping timeout: 256 seconds]
<aelevadoan>
E: Unable to locate package ruby-install
<aelevadoan>
weaksauce: and whats the difference of using ruby-install vs. rbenv install
kadoppe has quit [Ping timeout: 265 seconds]
<mwlang>
is it possible to detect that javascripts are actively building a loaded page in selenium? I basically need to reliably wait until all dynamic sections of a page is loaded before moving forward.
<weaksauce>
different ways to achieve the same goal aelevadoan... ruby-install might use less memory etc..
crazydiamond has quit [Remote host closed the connection]
<jhass>
blahwoop: looks like your code was adding the diagonals too, mine isn't
kadoppe has joined #ruby
<mwlang>
Using the webdriver’s Selenium::WebDriver::Wait.new(:timeout => 10) and watching for “Loading” to go away is proving a tad bit unreliable.
codecop has quit [Remote host closed the connection]
s2013 has joined #ruby
s2013 has quit [Client Quit]
<atmosx>
since you're using an ORM you shouldn't anyway
freerobby has joined #ruby
infinitone has quit []
<Nilium>
I'm not using an ORM.
<atmosx>
I'd say if not AR use Sequel
<Nilium>
This is a CLI script.
<Nilium>
I don't need heavy-weight bullshit.
Bira has joined #ruby
<atmosx>
then sequel 100%
<Nilium>
That should probably do it.
<Nilium>
Looks way less awful than mysql2 at least.
scripore has joined #ruby
tubuliferous_ has quit [Ping timeout: 272 seconds]
<atmosx>
of course... that's the point
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<atmosx>
lol, I was about to write another method on my scrapper script and ... the website which was meant to index is in maintainence mode ... go figure.
<atmosx>
never saw that website down or in maint. mode before
<Nilium>
Thanks
<Nilium>
For the sequel pointer
<dudedudeman>
i do dev work for a shopify store and i swear that site goes in to maintenance more than it should
decoponio has quit [Quit: Leaving...]
<ericwood>
I had to work with spree today
<ericwood>
>.<
ubermonkey has quit [Remote host closed the connection]
tonyhb has quit [Quit: peace]
GaryOak_ has joined #ruby
ubermonkey has joined #ruby
Xiti has joined #ruby
bartkoo has joined #ruby
<blahwoop>
jhass: seems like it was broken from the beginning. even adding the diagonals it still gave me the same error but with more word results
<alderamin>
Is there a way to use Enumerable.map on a Hash? I need to perform an (unordered) operation on every value in the hash and return the results.
<jhass>
blahwoop: kay, then I give up deciphering what it did :P
<blahwoop>
haha. thanks jhass
JDiPierro has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
JoshGlzBrk has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshGlzBrk has quit [Client Quit]
enebo has quit [Quit: enebo]
alexherbo2 has quit [Quit: WeeChat 1.1.1]
<elaptics>
b00b00: what do you mean by not using libs? yaml and json are both libraries in ruby's standard lib so you just need to require them, no need to install any gems or anything
Akagi201 has quit [Ping timeout: 276 seconds]
SouL_|_ has quit [Ping timeout: 240 seconds]
redjack1964 has joined #ruby
ghr has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
jobewan has quit [Quit: leaving]
blahwoop has quit [Remote host closed the connection]
jobewan has joined #ruby
jobewan has quit [Client Quit]
tcrypt has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
leafybasil has joined #ruby
yeticry has quit [Ping timeout: 272 seconds]
yeticry has joined #ruby
jackjackdripper has quit [Client Quit]
<b00b00>
elaptics: i mean for text manipulation as they do, i need an example or direction how to do this for some reason , if there is a way, like how to do the text manipulation for that, it would be nice
jackjackdripper has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
Pupeno has joined #ruby
foureight84 has quit [Ping timeout: 272 seconds]
pdoherty has joined #ruby
gsd has quit [Ping timeout: 256 seconds]
bartkoo has quit [Quit: bartkoo]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
digitalextremist has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
meph has joined #ruby
s2013 has joined #ruby
sinkensabe has joined #ruby
steffes has quit []
Pupeno has quit [Quit: Leaving...]
duderonomy has joined #ruby
gsd has quit [Max SendQ exceeded]
diegoaguilar has quit [Ping timeout: 244 seconds]
gsd has joined #ruby
jenrzzz has joined #ruby
dfinninger has quit [Remote host closed the connection]
gsd has quit [Max SendQ exceeded]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 244 seconds]
gsd has joined #ruby
gsd has quit [Max SendQ exceeded]
<elaptics>
b00b00: not sure I understand what you mean
scripore has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gsd has joined #ruby
gsd has quit [Max SendQ exceeded]
tubuliferous_ has joined #ruby
Astrologos_ has joined #ruby
gsd has joined #ruby
jackjackdripper has joined #ruby
<meph>
process_shared fails on ARM, Invalid argument - error in mmap (Errno::EINVAL) from ~/.gem/gems/process_shared-0.2.0/lib/process_shared/posix/shared_memory.rb:62 :(
gsd has quit [Max SendQ exceeded]
ghr has joined #ruby
gsd has joined #ruby
freerobby has quit [Quit: Leaving.]
gsd has quit [Max SendQ exceeded]
baweaver has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
astro-logos has joined #ruby
gsd has joined #ruby
gaboesquivel has joined #ruby
dorei has quit [Ping timeout: 256 seconds]
gsd has quit [Max SendQ exceeded]
astro-logos is now known as dorei
gsd has joined #ruby
scripore has joined #ruby
tubuliferous_ has quit [Ping timeout: 245 seconds]
alexherbo2 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Astrologos_ has quit [Ping timeout: 250 seconds]
gambl0re has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
gsd has quit [Ping timeout: 256 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
avahey has joined #ruby
ebonics has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
gsd has joined #ruby
serivichi has joined #ruby
blackmesa has joined #ruby
gsd has quit [Max SendQ exceeded]
infinitone_ is now known as infinitone
umgrosscol has quit [Remote host closed the connection]
gsd has joined #ruby
mistermo_ has joined #ruby
vickleton has quit [Ping timeout: 240 seconds]
thatslifeson has quit [Remote host closed the connection]
snath has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
michaeldeol has joined #ruby
bricker has quit [Quit: leaving]
lxsameer has quit [Quit: Leaving]
Hirzu_ has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
gaboesquivel has quit [Remote host closed the connection]
casadei_ has quit [Remote host closed the connection]
Kricir has joined #ruby
casadei_ has joined #ruby
<b00b00>
elaptics: i mean just if i have a yml file and i want to format it to jason, what is the best way to do it BUT not using the yam2jason like libs/ways available, i mean if i have line like: (foo: "bar") and i want to convert it to jason like format: ("foo": "bar",)
snath has joined #ruby
gsd has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
tuelz has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
<elaptics>
b00b00: why wouldn't you just use the standard libraries to do it?
gsd has joined #ruby
<elaptics>
b00b00: it can be one line once you've required the libs, e.g.
<willharrison>
baweaver I am confused on what capture is in that documentation. can you help explain it?
gsd has quit [Max SendQ exceeded]
casadei_ has quit [Ping timeout: 276 seconds]
<baweaver>
regex capture groups
<baweaver>
there'll be a lot better documentation in the wild on that, you're going to want to read up on REGEX
<baweaver>
rubular is a good testing ground
hackeron has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GaryOak_>
is there a class pointer in ruby?
gsd has joined #ruby
<willharrison>
baweaver ok, will do. thanks
<baweaver>
It's too large a field
FernandoBasso has quit [Quit: leaving]
dorei has joined #ruby
roolo has quit [Remote host closed the connection]
hackeron has joined #ruby
Squarepy has quit [Quit: Leaving]
Astrologos_ has quit [Ping timeout: 272 seconds]
dorei has quit [Ping timeout: 240 seconds]
<Ellis>
i want to learn how to interact with my computer’s hardware, specifically the webcam. can someone tell me what topic i should read about to begin learning the knkowledge i need to do that
<baweaver>
Probably searching for Ruby webcam gems
<baweaver>
Did we go over this last night?
<baweaver>
seems familiar
dorei has joined #ruby
sankaber has joined #ruby
<Ellis>
baweaver, we did, but i don’t want to use the gem without knowing how everything works. like how do i write code that accesses the camera myself. what topic would i study to learn that?
<willharrison>
Ellis find the gem, read the code
<baweaver>
^
<baweaver>
Honestly I wouldn't know where to start except to dissect something that already does it.
<GaryOak_>
Ellis: this code is calling probably a C/C++ library
icebourg has quit []
thatslifeson has joined #ruby
kyrylo has quit [Ping timeout: 245 seconds]
<baweaver>
Yeah, Ruby doesn't seem like it'd have enough low level bindings itself to swing that.
<willharrison>
yeah the nice ffi is allowing c code
<Ellis>
garyoak_: word …
<Ellis>
so should i learn c?
<Ellis>
ha
<GaryOak_>
Wouldn't hurt :)
<baweaver>
Oh it'll hurt
<GaryOak_>
lol yeah
<willharrison>
lol
dorei has quit [Ping timeout: 244 seconds]
<shevy>
hahaha
<GaryOak_>
unless you can somehow dump the webcam's buffer into a file, and access it as a stream
<Ellis>
haha
<Ellis>
what’s a buffer?
<baweaver>
it'll hurt a lot
<baweaver>
Want a pointer?
bigmac has joined #ruby
<GaryOak_>
*heres_a_pointer
<baweaver>
0xFAE90234
<GaryOak_>
haha
<adaedra>
void *
juanpablo_ has quit [Quit: (null)]
<Ellis>
would a language like english technically be an abstract data type?
<adaedra>
GaryOak_: joke aside, under Linux, webcam stream is surely a node in /dev
juanpablo_ has joined #ruby
<GaryOak_>
yep
Spami has joined #ruby
<shevy>
Ellis dunno. there is lexical analysis from language linguists, like from Noam Chomsky when he was younger
<shevy>
real languages are very fluid
<Ellis>
u don’t like chomsk’s politics?
<shevy>
that was solely towards him as language linguist, politics have little to do with analysis of languages :)
<Ellis>
:)
shellfu is now known as shellfu_afk
<shevy>
in programming language you have a lexer and tokens
<GaryOak_>
A real language has more meaning and intention than is expressed in a programming language
<infinitone>
Noam Chomsky is a freaken saint
<infinitone>
you take that back!
<shevy>
you can specify a grammar to follow, and if errors occur, the parser will scream
<shevy>
imagine if, before you can speak, you must approve all what you want to say prior to saying it
jottr has quit [Ping timeout: 264 seconds]
<GaryOak_>
Or if the parser had a personality and you had to code different based on your history together
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* adaedra
takes that back
juanpablo_ has quit [Ping timeout: 246 seconds]
<GaryOak_>
adaedra: is it not just dumped to a file?
<adaedra>
GaryOak_: the node in /dev? No, should be real access to the webcam stream
<shevy>
in linux everything is a file
<shevy>
in ruby everything is an object
n80 has quit [Quit: n80]
duderonomy has quit [Ping timeout: 240 seconds]
<shevy>
in linby everything is a fibject
uptownhr has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<GaryOak_>
to a king everyone is a subject
<shevy>
haha
<shevy>
yeah
<shevy>
damn dictators
jenrzzz has quit [Ping timeout: 255 seconds]
<shevy>
I always watch monty python's holy grail to cheer me about
haxrbyte_ has joined #ruby
<adaedra>
you silly english knits
<shevy>
Dennis: What I object to is you automatically treat me like an inferior.
<adaedra>
shall I taunt you shevy?
<shevy>
King Arthur: Well, I am king.
<shevy>
Dennis: Oh, king eh? Very nice. And how'd you get that, eh? By exploiting the workers. By hanging on to outdated imperialist dogma which perpetuates the economic and social differences in our society.
<shevy>
adaedra nah I am sort of half sleeping already
<adaedra>
'k
<adaedra>
Fetchez la vache !
<shevy>
haha
havenwood has joined #ruby
<shevy>
qua?
<adaedra>
quoi ?*
<havenwood>
condicio sine qua non
<shevy>
the french must adopt the english language
<adaedra>
no
<shevy>
no baguette
<adaedra>
it's enough that English is the lingua franca
haxrbyte has quit [Ping timeout: 264 seconds]
<shevy>
lingua ingles?
jackjackdripper has joined #ruby
<shevy>
languages should bring people together!
jottr has joined #ruby
<GaryOak_>
lingua omnibus
<adaedra>
"C'est un cadeau!" – "Un quoi ?" – "A present" – "Ah, un cadeau"
<adaedra>
A møøse once bit my sister…
<shevy>
I see that you have memorized all the french parts of said movie
jottr has quit [Read error: Connection reset by peer]
<adaedra>
oh, I memorized some english parts too
<shevy>
the bridge of death
<willharrison>
bravely brave sir robin, rode forth from camelot
<adaedra>
What. is your name.
<shevy>
what is your favourite colour
jottr has joined #ruby
baweaver has quit [Remote host closed the connection]
Sembei has quit [Read error: Connection reset by peer]
<shevy>
actually, that question is a problem
<shevy>
what if you don't have a favourite colour?
<adaedra>
"None"
<adaedra>
"nil"
<shevy>
what now
pipework is now known as spaceghostc2c
<shevy>
you can't give two answers
<shevy>
:)
<shevy>
you'll be tossed into the ... gorge of eternal peril... or whatever it was named
Sembei has joined #ruby
dfinninger has quit [Remote host closed the connection]
<adaedra>
I'll toss the salad
<havenwood>
Schrödinger's monad
jwingfi has quit [Remote host closed the connection]
lidenskap has quit [Remote host closed the connection]
mistermo_ has quit [Remote host closed the connection]