apeiros changed the topic of #ruby to: Ruby 2.1.4; 2.0.0-p594; 1.9.3-p550: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
livingstn has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
papal has quit [Ping timeout: 260 seconds]
diegovio1 has joined #ruby
diegoviola has quit [Ping timeout: 265 seconds]
pauly_oc has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
manzo has quit [Ping timeout: 264 seconds]
dkphenom has joined #ruby
diegovio1 is now known as diegoviola
DLSteve_ has quit [Quit: Leaving]
razieliyo_ has joined #ruby
razieliyo has quit [Read error: No route to host]
tlarevo has quit [Remote host closed the connection]
papal has joined #ruby
tlarevo has joined #ruby
geggam has quit [Ping timeout: 260 seconds]
mdarby has joined #ruby
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
mdarby has quit [Max SendQ exceeded]
axl_ has quit [Quit: axl_]
axl_ has joined #ruby
mdarby has joined #ruby
freerobby has joined #ruby
TPBallbag has joined #ruby
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
aspires has quit []
MrSamuel has joined #ruby
klaut has quit [Remote host closed the connection]
pauly_oc has quit [Ping timeout: 264 seconds]
mdarby has quit [Max SendQ exceeded]
charliesome has quit [Quit: zzz]
aspires has joined #ruby
sheepman has quit [Ping timeout: 245 seconds]
mdarby has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
axl_ has quit [Ping timeout: 245 seconds]
Cheezebox has joined #ruby
mdarby has quit [Max SendQ exceeded]
charliesome has joined #ruby
mdarby has joined #ruby
sheepman has joined #ruby
mdarby has quit [Max SendQ exceeded]
Aranshada|W has joined #ruby
mdarby has joined #ruby
TPBallbag has quit [Ping timeout: 256 seconds]
<omosoj> why do people say js is so great?
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
hakunin has joined #ruby
<pipework> omosoj: They like prototypes?
soasme has joined #ruby
snath has quit [Ping timeout: 256 seconds]
mdarby has quit [Max SendQ exceeded]
oo_ has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
oo_ has quit [Remote host closed the connection]
<jenrzzz> omosoj: it's got a pretty interesting object model buried under the kludgey syntax and design warts
<omosoj> hm, what are prototypes? are they like objects with default values already?
oo_ has joined #ruby
mdarby has joined #ruby
reinaldob has joined #ruby
<jenrzzz> omosoj: yehuda explains it better than i can: http://yehudakatz.com/2011/08/12/understanding-prototypes-in-javascript/
<wasamasa> mdarby: fix your connection
<omosoj> jenrzzz, thanks
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
goodenough has joined #ruby
jhwhite has quit [Quit: jhwhite]
mdarby has quit [Max SendQ exceeded]
baroquebobcat has quit [Quit: baroquebobcat]
tvw has quit []
mdarby has joined #ruby
ghormoon has quit [Ping timeout: 255 seconds]
mdarby has quit [Max SendQ exceeded]
Cheezebox has quit [Remote host closed the connection]
mdarby has joined #ruby
<tmoore> I think the honest answer is "because it runs in web browsers"
mdarby has quit [Max SendQ exceeded]
<jenrzzz> tmoore: it runs pretty much anywhere! it's the lingua franca of the 2010s
<tmoore> maybe, but I think that's an effect, not a cause
<jenrzzz> yeah, of course
<omosoj> tmoore, yeah that seems like a big reason, but i've also heard that "anything that can be coded in js will be", so it seems to extend beyond browsers
jdj_dk has quit [Ping timeout: 244 seconds]
<tmoore> lots of languages/runtimes can run in different places, but JS is the only one that can run in most web browsers
ghormoon has joined #ruby
mdarby has joined #ruby
<tmoore> so, since it is a given that people will need to know JS, some people think it's better to use the same language everywhere, warts and all
icarus_ has quit [Ping timeout: 265 seconds]
<omosoj> i see
<zenspider> horseshit. beyond browsers (and servers) js has NOT taken over in the slightest
mdarby has quit [Max SendQ exceeded]
snath has joined #ruby
_whitelogger has joined #ruby
<jenrzzz> Davey: no. there isn't an equivalent construct in any other language than PHP
<Davey> jenrzzz: thanks
mikecmpbll has quit [Quit: i've nodded off.]
<jenrzzz> (AFAIK)
<JDHankle> Rack handles POST, I believe.
rshetty has joined #ruby
<zenspider> I don't think github is a good indicator of much
drPoggs has joined #ruby
<zenspider> knowing that bootstrap has 28k forks means what exactly?
ptrrr has joined #ruby
<omosoj> zenspider, what do you think is the reason for js's supposed fame? just that it will run on client browsers?
<jenrzzz> zenspider: it doesn't mean anything, really. but do you have any data that indicates a different trend?
goodenough has quit [Remote host closed the connection]
beef-wellington has joined #ruby
chipotle has joined #ruby
<JDHankle> JS isn't as popular as Github would make it seem. Most JS stuff is open source because well, you can't compile JS and it ends up in a browser where anyone can read it anyway.
Peleus has joined #ruby
<JDHankle> Not to say there isn't closed source JS.
<jenrzzz> Davey, JDHankle: it's a bit different in Rack. classic PHP without FPM runs a new interpreter for each request and the web server will set variables like $_POST with the request parameters
mattstratton has joined #ruby
<JDHankle> jenrzzz: right, you have to implement some sort of server interface before you can handle POST in ruby.
gr33n7007h has quit [Ping timeout: 265 seconds]
gr33n7007h has joined #ruby
northfurr has joined #ruby
rshetty has quit [Read error: No route to host]
<JDHankle> Which is what I was getting at.
rshetty has joined #ruby
<Peleus> Hey all, trying to use rvm. In one directory I'm showing ruby version as 1.9.3p547, in another directory it's showing 1.9.3p550. I want to use p550 everywhere but when I say rvm --default use 1.9.3p550 it's coming up with ruby 1.9.3p550 isn't installed. Ideas?
ghostmoth has quit [Quit: ghostmoth]
<jenrzzz> rvm implode
<jenrzzz> brew install rbenv
<jenrzzz> brew install ruby-install
<northfurr> how can i use the value of an array as the index of another array? I was trying array1[array2[0]] for example…
<JDHankle> Peleus: you have a .ruby-version file in those dirs
<Peleus> JDHankle, cheers
<jenrzzz> northfurr: what's not working?
<Davey> am I wrong that the bcrypt gem doesn't support the new $2y$ version of the algorithm ?
<zenspider> jenrzzz: you ask me for counter data? you stated "I *IMAGINE* there are a greater number of programmers that know JS than any other language". Do _you_ have any data?
ghormoon has quit [Ping timeout: 256 seconds]
<jenrzzz> zenspider: yeah, i just cited the github data and my personal experience
<JDHankle> jenrzzz: that brew install rbenv made me lol
<zenspider> jenrzzz: JDHankle stated it well. open source isn't indicative of much.
<zenspider> northfurr: that indexes array1 at the index indicated in the first entry of array2
<zenspider> if array2[0] was 42, it'd return with array1[42]
<zenspider> what are you trying to do?
<northfurr> that’s what I thought it should be doing but it’s acting weird Oo
<zenspider> well... what is it doing?
balazs has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 255 seconds]
<zenspider> the plural of anecdote is not data
mikepack has quit [Remote host closed the connection]
<northfurr> zenspider: Okay so the first array is, stocks = [17,3,6,9,15,1,10] and the second is [1,4]
<zenspider> I'd expect 3 given your code above
<northfurr> zenspider: when I call puts prices[best_prices[0]] it gives me 6
rshetty has quit [Ping timeout: 265 seconds]
<northfurr> errr… prices = stocks
<northfurr> best_prices is [1,4]
ghormoon has joined #ruby
<zenspider> I don't think you have the data you think you do
<zenspider> >> stocks = [17,3,6,9,15,1,10]; best_prices = [1,4]; prices[best_prices[0]]
<eval-in__> zenspider => undefined local variable or method `prices' for main:Object (NameError) ... (https://eval.in/216931)
<zenspider> damnit
Peleus has left #ruby [#ruby]
<zenspider> >> stocks = [17,3,6,9,15,1,10]; best_prices = [1,4]; stocks[best_prices[0]]
<eval-in__> zenspider => 3 (https://eval.in/216932)
sevenseacat has joined #ruby
<northfurr> I added another puts… you’re right
<jenrzzz> zenspider: i think open source trends can be a good indicator of mindshare, which is what i'm arguing
mistermocha has joined #ruby
<jenrzzz> zenspider: i.e. everyone has at least one JS interpreter installed on their computer, and pretty much all web developers know javascript
<zenspider> northfurr: the puts shouldn't matter?
<northfurr> well i’m doing something weird in this method
jasooon has joined #ruby
<jenrzzz> northfurr: put the whole thing in a gist (https://gist.github.com)
<jenrzzz> i'm not trying to prove this obviously unprovable claim
<jenrzzz> do you think there is another language that more developers know? maybe Java or C?
<zenspider> everyone has at least one shell command processor on their computer. doesn't make shell scripting the most popular language either.
ghormoon has quit [Ping timeout: 255 seconds]
<JDHankle> Everyone on Unix has a BASH interpreter. How many OSX users know that? The data on github is no more creditable to the popularity of something than google trends
_maes_ has quit [Ping timeout: 272 seconds]
<northfurr> why does sell_prices.shift cause me to lose the first value in prices as well?
<zenspider> northfurr: `ri Array.shift`
<zenspider> because that's what it does
<northfurr> i know
<northfurr> but if i store sell_prices = prices then call sell_prices.shift I figured it wouldn’t effect the original argument
pietr0 has quit [Quit: pietr0]
<northfurr> :(
finisherr has quit [Quit: finisherr]
<JDHankle> It's like saying "Windows is less popular than OSX because everyone on Google is searching more for OSX" is it? Or is everyone on Windows using Bing?
<tmoore> northfurr: saying sell_prices = prices doesn't copy the array, it just gives it two names
<tmoore> try sell_prices = prices.dup if you want a separate copy
<wallerdev> lol
<wallerdev> just bing it
<zenspider> JDHankle: that's kinda my point. jenrzzz suffers from confirmation bias and isn't owning up to it.
<zenspider> conflating "developers" with "web developers" is not helping matters at all
<zenspider> wallerdev: hah! then you can have some porn with your code!
<pipework> My preferences are the popular ones, I know because I live in an echo chamber.
<jenrzzz> i'm not arguing it's popularity though. i'm just saying JS has a unique position in programming language market/mindshare due to the fact that it runs in browsers and many web devs who use other languages also need to know javascript to build shit
jasooon has quit [Ping timeout: 245 seconds]
<jenrzzz> but you're right zenspider, i should have been clearer about that
jottr has joined #ruby
<wallerdev> i feel like js is the next big thing right now for what its worth
<jenrzzz> also, all humans suffer from confirmation bias :)
<northfurr> Ah i didn’t know that
<wallerdev> not sure how long thatll last though
<northfurr> thanks tmoore and zenspider
<northfurr> :)
<pipework> I feel like JS isn't a big thing, really.
ghormoon has joined #ruby
<wallerdev> it seems pretty big here, but i live in the bubble of SF lol
charliesome has quit [Quit: zzz]
<zenspider> jenrzzz: a unique position in **WEB** programming language market share
<JDHankle> jenrzzz: I'm actually popping into this argument a bit late. It's really that you used Github that put a bad taste in my mouth. People seem to think Github is this amazing source of programming trends and it's not.
<pipework> It's surely popular, I'll admit to that, but being a big thing and just having a lot of fuss about it might not be the same.
<JDHankle> I'll tell you the trend in my area is not JS or even Ruby for that matter.
<jenrzzz> zenspider: what makes a *web* programming language?
<wallerdev> well i do JS full time so the more hyped JS gets the better
<wallerdev> :p
<zenspider> jenrzzz: jesus christ. quite being obtuse.
<pipework> jenrzzz: It being used by webmasters.
<zenspider> consider the bozo bit flipped. I'm done.
<pipework> wallerdev: JS was my first programming language. Good stuff, but I don't like a lot of the rubbish out there now.
<wallerdev> JS was my first language too!
<jenrzzz> any language can be a web programming language if you build a webapp with it
<pipework> Unless it doesn't have networking.
<wallerdev> back in middle school i was amazed that i could make the numbers 1-1000 appear on a webpage by typing like 3 lines of code
<pipework> Then it's not a web programming langauge.
<wallerdev> thats what got me into programming
<jenrzzz> and on the flip side, people build non-webapps with JS. so i don't think that's a particularly useful distinction
moritzs has quit [Remote host closed the connection]
<omosoj> JDHankle, what is the trend in your area?
<JDHankle> omosoj: PHP
<JDHankle> in web anyway
<omosoj> JDHankle, what general area are you in?
<JDHankle> New York, Capital Region.
<omosoj> JDHankle, i'm in philly. seems like there's a lot of php here too
<jenrzzz> zenspider: i'm interested in finding the truth. i can only speak from what I know, though
nateberkopec has quit [Quit: Leaving...]
mostlybadfly has joined #ruby
<tmoore> there's a big gap between what gets the most use and what gets the most hype/buzz/press/blog posts
tlarevo has quit [Remote host closed the connection]
<JDHankle> omosoj: yeah I'm having a hard time finding any data that has pointed me to say anything other than PHP is the big kid in town, but I can't speak for everywhere.
<pipework> Yeah, I mean people make a big deal out of meteor.
<tmoore> but when I say that, it's not to discount the latter, because it's often a leading indicator of what will be popular in use a few years down the line
<wallerdev> when i lived in michigan .NET / java were the big ones for web dev
<tmoore> so, yeah, sure PHP is popular and will surely remain so, but it's not leading any trends IMO
<wallerdev> lots of insurance companies too
<omosoj> .NET/java are big in philly too. heh
tlarevo has joined #ruby
<JDHankle> Of course there is a scoping issue there as well. In my area enterprise is not a big thing.
robustus has quit [Ping timeout: 250 seconds]
lw has joined #ruby
<JDHankle> Most firms do websites for small businesses or simple web applications. Very few are tailoring to the .NET and Java enterprise infrastructures.
<JDHankle> Again, in my area.
jonr22 has joined #ruby
<JDHankle> you can go 4 hours south of here and get a _completely_ different story.
<omosoj> lots of job postings around here are actually for rails devs who can convert a php dev to rails.
<JDHankle> good ol NYC
robustus has joined #ruby
<pipework> omosoj: Rewrite!
tokik has joined #ruby
<wallerdev> rewrites are fun
TinkerTyper has joined #ruby
<omosoj> yeah, seems like they do it piece by piece. seems like a stressful project
<wallerdev> til you have to release them
<JDHankle> Now that I think about it, the number of users in a channel on IRC is probably a better statistic than Github's lol.
<jenrzzz> hahaha
<jenrzzz> it doesn't really matter. i think these things only become clear in hindsight anyways
tkuchiki has joined #ruby
<JDHankle> It's just too much of a black area to really put into a number.
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
<JDHankle> I can tell you one thing though, JS is more popular than POWER ASM.
jonr22 has quit [Ping timeout: 255 seconds]
<JDHankle> lol
Spami has quit [Quit: This computer has gone to sleep]
<jenrzzz> should CS programs still be teaching intro classes in java?
<benzrf> nu
mdarby has joined #ruby
<omosoj> jenrzzz, what is their reason for doing that?
<mdarby> wasamasa: No doubt! chat.freenode is freaking out
<jenrzzz> they've been doing it that way since circa-2000 :P
<omosoj> i've heard criticisms of it but never heard the justification
<wallerdev> my intro to CS course from my school switched to python after i graduated
<mdarby> JS is a shined turd.
axl_ has joined #ruby
mdarby has quit [Max SendQ exceeded]
<JDHankle> I saw one professor has moved to Python in his CS course.
<wallerdev> but that class was taken by lots of people, not just CS majors
<JDHankle> Which isn't a bad idea.
<omosoj> rofl mdarby
mdarby has joined #ruby
thagomizer has quit [Quit: Leaving.]
Channel6 has joined #ruby
<jenrzzz> pedagogically, it's a OO language with simple and verbose syntax, which I guess is a reasonable way to introduce basic programming constructs?
Timgauthier has joined #ruby
<wallerdev> i think java or c# are great for learning things like inheritance, interfaces, OO in general
<mdarby> I teach it with Ruby.
<omosoj> i see
rpag has joined #ruby
<wallerdev> ruby seems too flexible for learning the basics
mdarby has quit [Max SendQ exceeded]
<rpag> basics of?
<JDHankle> I think Java teaches you a lot about CS. Something that JavaScript any ruby don't really do.
<jenrzzz> i think MIT used to do Scheme in it's intro course but switch to python a couple years ago
<wallerdev> programming concepts
sparr_ has quit [Changing host]
sparr_ has joined #ruby
skolman has quit [Remote host closed the connection]
hephaestus_rg has quit [Ping timeout: 245 seconds]
mdarby has joined #ruby
sparr_ is now known as sparr
<rpag> imo ruby makes you hate other languages especially the older ones
<zenspider> SICP was amazing
<jenrzzz> oh, was that the textbook they usewd?
<jenrzzz> used*
<omosoj> yeah
<JDHankle> Ruby will teach you about Objects and stuff sure, but you're there to learn about memory and WHY things like ruby work.
Wolland_ has joined #ruby
mdarby has quit [Max SendQ exceeded]
<JDHankle> That's what is important. WHY things in CS work.
<JDHankle> not teaching you how to program
fabrice31 has joined #ruby
TPBallbag has joined #ruby
<JDHankle> Programming is just the application of your understanding of a computer.
mdarby has joined #ruby
<JDHankle> Any dope can program, I mean, I can do it.
<zenspider> CS? A computer has nothing to do with it.
<JDHankle> and I'm a moron.
mdarby has quit [Max SendQ exceeded]
reinaldob has quit [Remote host closed the connection]
<rpag> my mum can't program or even use a computer
<JDHankle> bet she can make a mean apple pie though
<rpag> haha
<JDHankle> lol
<rpag> yeah :)
mdarby has joined #ruby
axl_ has quit [Ping timeout: 265 seconds]
VanillaGoat_ has joined #ruby
Wolland has quit [Ping timeout: 258 seconds]
jasooon has joined #ruby
kireevco1 has joined #ruby
mary5030_ has joined #ruby
<pipework> I love the SICP book. We've got a book club on it at work.
mdarby has quit [Max SendQ exceeded]
<pipework> It's the most refreshing stuff because it makes me think about the more pure theory of computer science.
Juanchito has quit [Quit: Connection closed for inactivity]
mdarby has joined #ruby
<pipework> zenspider might be able to confirm this: Computer Science is all about redstone and minecraft.
robbyoconnor has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Ping timeout: 258 seconds]
kireevco has quit [Read error: Connection reset by peer]
TPBallbag has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 250 seconds]
<zenspider> SICP, the (little|seasoned|reasoned) schemer series, and nand2tetris have been the best books I've read / worked through in decades
mdarby has quit [Max SendQ exceeded]
VanillaGoat has quit [Ping timeout: 258 seconds]
<JDHankle> I was just saying that programming itself is just an application on your understanding of computer science and theory much like you speaking English is just an application of your knowledge of the English.
omosoj has quit [Quit: leaving]
mdarby has joined #ruby
<JDHankle> I butchered that sentence. but you get my point.
louism2wash has joined #ruby
<Toba> ___ is just applied ___
mdarby has quit [Max SendQ exceeded]
<jenrzzz> JDHankle: by programming, do you mean typing words into a computer to make it do things, or solving problems with software?
<Toba> is the oldest slippery slide in the book
dmyers has quit [Ping timeout: 264 seconds]
<pipework> Doing a thing is just the application of knowledge of a thing to achieve some thing you're doing
mdarby has joined #ruby
Timgauthier is now known as timgauthier_away
mdarby has quit [Max SendQ exceeded]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghormoon has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
mdarby has joined #ruby
Wolland has joined #ruby
danman has quit [Quit: danman]
arescorpio has joined #ruby
mdarby has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
<jenrzzz> has anyone used typhoeus with sidekiq? i'm not sure if it will destroy the universe
<jenrzzz> probably just gonna play it safe with resque
Wolland_ has quit [Ping timeout: 255 seconds]
ghormoon has joined #ruby
<JDHankle> jenrzzz: I'm not sure I understand the question. What's the difference between making a computer do things or solving problems with software? They're inclusive of one another are they not?
marr has quit [Read error: Connection reset by peer]
<rpag> jenrzzz, i haven't but im not sure why it would break anything?
<wallerdev> software only involves the soft part of the computer like the silicon
<JDHankle> you obtain one by doing the other, no?
<jenrzzz> JDHankle: the latter involves other people
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenrzzz> rpag: i'm not sure how a Typhoeus::Hydra, which is a wrapped libcurl multi will cope in a multithreaded environment
<JDHankle> jenrzzz: ah, I was speaking to the 'typing nonsense into a text editor to make the computer do the damn thing it's supposed to' bit.
<jenrzzz> also the sidekiq docs say not to usei t
renderful has joined #ruby
gsd has joined #ruby
doug1 has quit [Ping timeout: 245 seconds]
<rpag> ah if the docs say avoid it there's a reason then id guess
<jenrzzz> that was like 2 years ago, though, so i'm not sure if it's been fixed in the meantime
beef-wellington has quit [Ping timeout: 265 seconds]
eka has joined #ruby
porfa has joined #ruby
bafbomb has joined #ruby
djbkd has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby
skolman_ has joined #ruby
djbkd_ has quit [Ping timeout: 264 seconds]
Joufflu has joined #ruby
apeiros has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
lw has quit [Quit: s]
apeiros has joined #ruby
kireevco1 has quit [Ping timeout: 256 seconds]
devdazed has joined #ruby
moritzs has joined #ruby
ptrrr has quit [Quit: ptrrr]
bklane has quit []
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
ptrrr has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
banister has joined #ruby
stunder has quit [Quit: Screw you guys I'm going home]
tier has joined #ruby
kobain has quit [Quit: Changing server...]
Cheezebox has joined #ruby
KC9YDN has joined #ruby
lw has joined #ruby
bricker has quit [Ping timeout: 258 seconds]
KC9YDN has quit [Remote host closed the connection]
doug1 has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
kobain has joined #ruby
jamto11 has joined #ruby
jshultz has quit [Quit: Connection closed for inactivity]
TinkerTyper has quit [Ping timeout: 250 seconds]
KC9YDN has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
Takle has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
Joufflu has quit [Read error: Connection reset by peer]
<hakunin> why would sidekiq threads randomly fail to find a bin file to execute…
<hakunin> at some point they all just lose PATH or osmething
aspires has quit []
<hakunin> convert: command not found type of thing, after a while
<hakunin> has someone ever run into it
mistermocha has quit [Remote host closed the connection]
hamakn has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
arup_r has joined #ruby
ghormoon has quit [Ping timeout: 255 seconds]
<jenrzzz> hakunin: how are you invoking `convert'?
<hakunin> jenrzzz: via posix-spawn, simply "convert" (no path) and eventually start getting /bin/sh: 1: convert: not found
siwica has quit [Quit: siwica]
siwica has joined #ruby
Kilobyte|StupidC has joined #ruby
<hakunin> jenrzzz: i kind of suspect that having too many parallel threads might exacerbate the problem, since this problem very rarely occurs in normal production, but became frequent when i filled up 40 threads per machine with non stop convert
Kilo`byte has quit [Ping timeout: 260 seconds]
Cheezebox has quit [Remote host closed the connection]
<hakunin> jenrzzz: (almost 100k jobs of convert)
<hakunin> jenrzzz: just tried reducing limit from 40 to 20, and seeing if it will happen less, but the question remains
<hakunin> jenrzzz: nope, just started happening again on one of the machines
<jenrzzz> yeah, that's pretty weird
hippyphysicist has joined #ruby
<jenrzzz> can you check what the value of ENV['PATH'] is when you see the issue?
<hakunin> jenrzzz: with some kind of trace thing?
lampd1 has joined #ruby
ghormoon has joined #ruby
louism2wash has joined #ruby
<jenrzzz> hakunin: or just write it to a log file
Hijiri has joined #ruby
hippyphysicist has quit [Read error: Connection reset by peer]
<siwica> I want to have a method foo that can be called with or without a symbol, e.g. foo or foo(:green). Is it possible to only allow for a certain set of symbols (e.g. :red, :green, :blue) to be passed to foo?
<jenrzzz> rescue the call to posix-spawn and dump the env to a file or something
tlarevo has quit []
Scotteh_ has joined #ruby
<jenrzzz> siwica: raise ArgumentError unless [:red, :green, :blue].include?(sym)
<siwica> jenrzzz: ok, thanks!
<hakunin> jenrzzz: just tried checking via strings -a (just googled and learned about it) - the path containing convert is there
tlarevo has joined #ruby
<siwica> jenrzzz: Now I need a variable color to take different strings depending on what symbol was passed. How do I do that?
<porfa> what would be best? trying to join all my puts requests to output what i want in the format i want, or formating the text output after? if so, what could i use to format it after?
doug1 has quit [Ping timeout: 245 seconds]
<porfa> i need to make every ruby newline into a ; but i dont know how.
mdarby has joined #ruby
<mdarby> Damn LAN, I WILL CONQUER YOU
<siwica> jenrzzz: e.g. color = "1.0 1.0 1.0 1.0" if :white is passed, "1.0 0.0 0.0 1.0" if :red is passed, ...
<jenrzzz> hakunin: well, we know that ruby starts with the correct environment since it works sometimes. that doesn't necessarily explain why forking from some worker threads doesn't inherit the whole environment
Scotteh has quit [Ping timeout: 260 seconds]
tlarevo has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
<hakunin> jenrzzz: right it might modify it in ruby's PATH, which probably wouldn't reflect in process env
<jenrzzz> siwica: color = case sym; when :white then "1.0 1.0 1.0 1.0"; when :red then "1.0" .... should do the trick
tlarevo has joined #ruby
<jenrzzz> do you mutuate PATH anywhere?
wallerdev has quit [Quit: wallerdev]
<hakunin> jenrzzz: definitely would never myself, and this happens randomly. i'm trying to change code directly on server now to investigate
<jenrzzz> sounds like fun!
ValicekB has quit [Ping timeout: 272 seconds]
Cat_1 has quit []
oleo is now known as Guest29468
oleo__ has joined #ruby
dkb20k has joined #ruby
<hakunin> jenrzzz: yeah… what's more fun is that i'm stuck with 80k jobs that are enqueued and must be processed, and workers start failing randomly forcing me to manually restart when i notice retries showing up, and this could take days
<hakunin> jenrzzz: so i have 2 options - spend days by the computer, or figure out a fix or a hack
rshetty has joined #ruby
<jenrzzz> can you hard-code the path to convert?
tuelz has joined #ruby
amclain has joined #ruby
<hakunin> looking into that
banister is now known as banister_
devdazed has quit [Ping timeout: 272 seconds]
Guest29468 has quit [Ping timeout: 272 seconds]
ghormoon has quit [Ping timeout: 256 seconds]
krz has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Virtualize|away has joined #ruby
zorak8 has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
reinaldob has joined #ruby
ValicekB has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<jenrzzz> -+
allcentury has quit [Ping timeout: 244 seconds]
reinaldob has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
<siwica> jenrzzz: thank you. Would that be the "ruby way" to do it? https://gist.github.com/anonymous/cf8f4a8935d3724068f3
Virtualize|away has quit [Quit: Leaving...]
it0a has joined #ruby
ghormoon has joined #ruby
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Virtualize|away has joined #ruby
triple_b has joined #ruby
<siwica> jenrzzz: Or would you do it more elegantly so that I would only have to edit one line when adding another color?
rshetty has quit [Remote host closed the connection]
mint has joined #ruby
jamto11 has quit []
triple_b has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
Virtualize|away has quit [Quit: Leaving...]
vyorkin has quit [Ping timeout: 265 seconds]
mikeg has joined #ruby
jimms has quit []
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fuhgeddaboudit has joined #ruby
jimms has joined #ruby
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
moritzs has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
lw has quit [Read error: Connection reset by peer]
<arup_r> What is the equivalent of Rspec match_array in Test::Unit ?
lw has joined #ruby
michael_mbp has quit [Excess Flood]
goshdarnyou has joined #ruby
mdarby has joined #ruby
michael_mbp has joined #ruby
oo_ has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
Wolland_ has joined #ruby
mdarby has quit [Max SendQ exceeded]
mint has quit [Remote host closed the connection]
mdarby has joined #ruby
koderok has joined #ruby
Virtualize|away has joined #ruby
kireevco has joined #ruby
mdarby has quit [Max SendQ exceeded]
Trynemjoel has quit [Ping timeout: 265 seconds]
Wolland has quit [Ping timeout: 256 seconds]
mdarby has joined #ruby
mary5030_ has quit [Remote host closed the connection]
arup_r_ has joined #ruby
KC9YDN has quit [Read error: Connection reset by peer]
tier has quit [Remote host closed the connection]
diegovio1 has joined #ruby
CustosLimen has joined #ruby
mdarby has quit [Max SendQ exceeded]
Trynemjoel has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
mdarby has joined #ruby
jimms has quit []
arup_r_ has quit [Remote host closed the connection]
mdarby has quit [Max SendQ exceeded]
TinkerTyper has joined #ruby
mdarby has joined #ruby
tlarevo_ has joined #ruby
jonr22 has joined #ruby
mdarby has quit [Max SendQ exceeded]
radic_ has quit [Read error: Connection reset by peer]
radic has joined #ruby
diegovio1 is now known as diegoviola
mdarby has joined #ruby
t_mmyv has quit [Quit: Textual IRC Client: www.textualapp.com]
larissa has quit [Quit: Leaving]
oo_ has joined #ruby
tlarevo has quit [Ping timeout: 256 seconds]
mdarby has quit [Max SendQ exceeded]
troyready has quit [Remote host closed the connection]
mdarby has joined #ruby
tyll_ has quit [Ping timeout: 255 seconds]
zz_jrhorn424 is now known as jrhorn424
mdarby has quit [Max SendQ exceeded]
tier has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
mdarby has joined #ruby
tyll has joined #ruby
lw has quit [Quit: s]
kireevco has quit [Quit: Leaving.]
<jenrzzz> siwica: you could possibly put the color mappings into a hash or something, but what you have there seems fine to me
<pipework> jenrzzz: Answered already in #rubyonrails
mdarby has quit [Max SendQ exceeded]
<jenrzzz> oh damn, time flies
axl_ has joined #ruby
wallerdev has joined #ruby
<siwica> jenrzzz: ok, I think this is better https://gist.github.com/anonymous/9ec232b5482eed708944
<jenrzzz> i agree :)
chrishou_ has joined #ruby
<pipework> siwica: Don't need the color_string = part, just use puts with it.
<pipework> Also, instead of having a local, use a constant.
<siwica> pipework: yes, ok
<pipework> In the class do COLORS = {}.freeze; where you fill in the hash with the white and whatnot.
yetanotherdave has quit [Ping timeout: 258 seconds]
<pipework> Then just puts COLORS.fetch(color) { raise ... }
<pipework> One-line method :D
tier has quit [Remote host closed the connection]
chrishough has quit [Ping timeout: 255 seconds]
jimmyhoughjr has joined #ruby
wallerdev has quit [Ping timeout: 265 seconds]
<siwica> pipework: actually I am using the string later, but in the minimal example you are right :)
<siwica> thank you!
axl_ has quit [Ping timeout: 255 seconds]
<pipework> I'd also call #to_sym on color when you pass it to #fetch
<pipework> Just so you can have some win there.
<siwica> pipework: why that?
<siwica> in case sb passes a string?
<pipework> siwica: So that you can support being passed any object that knows #to_sym. Hopefully it returns a symbol.
<pipework> String supports #to_sym
<siwica> oh ok
<siwica> is this common to do it?
<pipework> Yeah, supporting strings and symbols interchangeably?
<siwica> I thought I would want to prevent unconsistent use of the method?
TinkerTyper has quit [Ping timeout: 272 seconds]
<siwica> ok, guess thats a question of philosophy :)
<pipework> siwica: Egh, strings and symbols aren't a big deal to use interchangeably in most things.
<siwica> probably true
<siwica> and as a ruby beginner, I'll just do it:)
Scotteh__ has joined #ruby
chudler has quit [Ping timeout: 260 seconds]
ryao has quit [Ping timeout: 260 seconds]
ryao__ has joined #ruby
skolman_ has joined #ruby
Scotteh_ has quit [Ping timeout: 260 seconds]
fuhgeddaboudit has quit [Remote host closed the connection]
<pipework> Usually you'll want to depend on the interface of objects and not their types, but in the case of indexing into a hash, you can have some fun with it by returning the same value for :white as well as 'white'
<siwica> ok
mdarby has joined #ruby
chudler has joined #ruby
mdarby has quit [Max SendQ exceeded]
catfishlar has joined #ruby
<benzrf> types forr lifee
RastaqWhere has joined #ruby
<benzrf> static typing is a good
arescorpio has quit [Excess Flood]
fuhgeddaboudit has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
RastaqWhere has quit [Client Quit]
TinkerTyper has joined #ruby
Numdox has quit [Quit: ....]
chrishou_ has quit [Quit: Textual IRC Client: www.textualapp.com]
chrishough has joined #ruby
jottr has joined #ruby
<pipework> benzrf: It might make things easier, but all things have their own benefits and drawbacks.
<benzrf> whats it bad
livingstn has quit []
Soda has joined #ruby
RastaqWhere has joined #ruby
RastaqWhere has quit [Client Quit]
Areessell_ has quit [Quit: (null)]
jottr has quit [Ping timeout: 245 seconds]
magic_ has joined #ruby
Takle has joined #ruby
xenomorph is now known as {xenomorph}
Aranshada|W has left #ruby [#ruby]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
serena has joined #ruby
{xenomorph} is now known as xenomorph
serena has left #ruby [#ruby]
luriv has quit [Ping timeout: 250 seconds]
Takle has quit [Ping timeout: 255 seconds]
Lutece has joined #ruby
gsd has joined #ruby
<benzrf> bye
northfurr has quit [Quit: northfurr]
benzrf is now known as benzrf|offline
aewffwea has joined #ruby
michael3 has quit [Ping timeout: 265 seconds]
Virtualize|away has quit [Quit: Leaving...]
siwica has quit [Ping timeout: 256 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmurt has quit []
kotk has quit [Read error: Connection reset by peer]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kotk has joined #ruby
rshetty has joined #ruby
tenseiten is now known as seitensei
Joufflu has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
louism2wash has quit [Quit: This computer has gone to sleep]
echooo1 has joined #ruby
rshetty_ has joined #ruby
hexaphixylix has joined #ruby
balazs has joined #ruby
ndrei_ has joined #ruby
ndrei has joined #ruby
echooo has quit [Ping timeout: 258 seconds]
rshetty has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
jerius has joined #ruby
KC9YDN has joined #ruby
jaequery has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
mikepack has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
o0oo0o has quit [Quit: WeeChat 0.4.3]
tlarevo_ has quit [Remote host closed the connection]
tlarevo has joined #ruby
aspires has joined #ruby
oo_ has quit [Remote host closed the connection]
rshetty_ is now known as rshetty
oo_ has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
j_mcnally has joined #ruby
tlarevo has quit [Remote host closed the connection]
<pontiki> hola
tlarevo has joined #ruby
TinkerTyper has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
<Lutece> o/
wallerdev has joined #ruby
daed has quit [Ping timeout: 240 seconds]
j_mcnally has quit [Client Quit]
axl_ has joined #ruby
hexaphixylix has left #ruby [#ruby]
tlarevo has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
axl_ has quit [Ping timeout: 240 seconds]
wallerdev has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
jrhorn424 is now known as zz_jrhorn424
red_horned_rihno has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chishiki has quit [Remote host closed the connection]
red_horned_rihno has quit [Max SendQ exceeded]
TinkerTyper has joined #ruby
dh64 has joined #ruby
red_horned_rihno has joined #ruby
rshetty has quit [Remote host closed the connection]
x1337807x has joined #ruby
reinaldob has quit [Ping timeout: 264 seconds]
red_horned_rihno has quit [Max SendQ exceeded]
parabolize has joined #ruby
hmsimha_ has joined #ruby
arup_r has quit [Quit: Leaving.]
red_horned_rihno has joined #ruby
aspires has quit []
jusmyth has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
red_horned_rihno has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattmcclure has quit [Quit: Connection closed for inactivity]
red_horned_rihno has joined #ruby
red_horned_rihno has quit [Read error: Connection reset by peer]
TinkerTyper has quit [Ping timeout: 250 seconds]
triple_b has joined #ruby
aspires has quit [Client Quit]
magic is now known as magical_mystery
jerius has quit []
maestrojed has quit [Quit: Computer has gone to sleep.]
rshetty has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
triple_b has quit [Client Quit]
chishiki has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
Takle has joined #ruby
jaequery has joined #ruby
TinkerTyper has joined #ruby
mdarby has joined #ruby
Joufflu has joined #ruby
maestrojed has joined #ruby
mdarby has quit [Max SendQ exceeded]
supermanBlack has joined #ruby
Soda has quit [Remote host closed the connection]
supermanBlack is now known as shortCircuit__
shortCircuit__ is now known as supermanPlasticP
supermanPlasticP is now known as supermanYellow
Musashi007 has joined #ruby
Takle has quit [Ping timeout: 272 seconds]
maestrojed has quit [Client Quit]
<porfa> heya
<porfa> can i use ruby to follow links? for ie: doc.xpath('//*[contains(concat( " ", @class, " " ), concat( " ", "image", " " ))]//a ')[1]["href"] Outputs "/doc.ashx?211787" but i want it t?o give me this ?KB-7499_a.jpg"
jenrzzz has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
goodenough has joined #ruby
dc_ has joined #ruby
x1337807x has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 244 seconds]
redjack1964 has quit [Remote host closed the connection]
goodenough has quit [Remote host closed the connection]
<porfa> ohoh mechanize..!
swilr has quit [Read error: Connection reset by peer]
swilr has joined #ruby
ramfjord has joined #ruby
mbytes has joined #ruby
mbytes has quit [Remote host closed the connection]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
rshetty has quit [Remote host closed the connection]
sinequanon has joined #ruby
kyb3r_ has joined #ruby
jonr22 has joined #ruby
louism2wash has joined #ruby
j_mcnally has joined #ruby
psy_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
jonr22 has quit [Ping timeout: 250 seconds]
mdarby has joined #ruby
ARCADIVS has joined #ruby
mdarby has quit [Max SendQ exceeded]
siwica has joined #ruby
adriancb has quit [Remote host closed the connection]
mbytes has joined #ruby
mbytes has quit [Remote host closed the connection]
mdarby has joined #ruby
TPBallbag has joined #ruby
oo_ has quit [Remote host closed the connection]
rshetty has joined #ruby
it0a has quit [Ping timeout: 256 seconds]
Channel6 has quit [Quit: Leaving]
oo_ has joined #ruby
mistermocha has joined #ruby
dkb20k_ has joined #ruby
goodenough has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
TPBallbag has quit [Ping timeout: 265 seconds]
dkb20k has quit [Ping timeout: 265 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 244 seconds]
oo_ has quit [Ping timeout: 272 seconds]
Channel6 has joined #ruby
wallerdev has joined #ruby
allcentury has joined #ruby
mbytes has joined #ruby
mbytes has quit [Remote host closed the connection]
earfin has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
oo_ has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hijiri has quit [Ping timeout: 256 seconds]
wallerdev has quit [Ping timeout: 255 seconds]
allcentury has quit [Ping timeout: 264 seconds]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<shevy> hmm
<shevy> how to generate rdoc docs again from a .rb file?
jottr has quit [Ping timeout: 244 seconds]
siwica has quit [Ping timeout: 260 seconds]
tlarevo has joined #ruby
<shevy> oh
<shevy> simply 'rdoc bla.rb'
Morkel has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
ddellacosta has joined #ruby
sinequanon has quit [Remote host closed the connection]
<shevy> lol
<shevy> "One longstanding weakness with the Ruby community is subpar documentation."
<ddellacosta> I am having trouble installing riemann-tools, not sure how to deal with this, any tips? "Make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13/ruby/config.h', needed by `yajl.o'. Stop."
dseitz has joined #ruby
<ddellacosta> not sure where to begin with it
<sevenseacat> start with gisting the command you ran and the full error
jdj_dk has joined #ruby
Hijiri has joined #ruby
kireevco has joined #ruby
<sevenseacat> ok, so whats in the results file
mikeg has quit [Ping timeout: 264 seconds]
bluehavana has quit [Quit: Connection closed for inactivity]
dyu has joined #ruby
<ddellacosta> sevenseacat: the same thing
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
mbytes has joined #ruby
koderok has quit [Quit: koderok]
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinequanon has joined #ruby
BlackGear has joined #ruby
<sevenseacat> chalk up another win for google
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
swilr has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
swilr has joined #ruby
<ddellacosta> sevenseacat: sorry, I wasn't sure what to google, I did in fact try beforehand though.
<sevenseacat> i googled the error message :P
<ddellacosta> I did as well
<ddellacosta> anyways, thanks
akamel has quit [Quit: Leaving.]
<sevenseacat> yw
<ddellacosta> good to see #ruby hasn't changed
ddellacosta has left #ruby [#ruby]
arup_r_ has joined #ruby
<sevenseacat> christ, you help people and they still hate you
chrishou_ has joined #ruby
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #ruby
<ericwood> :D
Musashi007 has quit [Quit: Musashi007]
godd2 has joined #ruby
mbytes has quit [Ping timeout: 244 seconds]
<godd2> When would you pass a block to a method and then call it vs yielding and vice versa?
<porfa> i need help with ruby synthax.. :( my specs = specs = ?doc.xpath(' //*[(@id = "Gegevens")]//li').collect {|node| node.text.strip}? when i ?puts specs? the text comes out perfect andhow i need it, but if i ?puts ?#{specs}? it comes out missing some special characters like ?e, o? .. how can i bypass this? i would be fine with just ?puts specs? but it spits out all the text in new lines and i want it alltogheter
<godd2> Or are they jsut two ways of doing the same thing?
arup_r has quit [Ping timeout: 264 seconds]
psyprus has quit [Ping timeout: 258 seconds]
chrishough has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
<porfa> goddamit, even my irc client is all crap, sorry
Lutece has quit [Quit: .]
mdarby has quit [Remote host closed the connection]
Scotteh has joined #ruby
Alina-malina has joined #ruby
<shevy> godd2 you only have to yield specifically when you need to write a method
<shevy> if you use something like array.each then obviously you can just use the block without having to burden yourself with yield
<shevy> godd2 a block is available to every method in ruby all the time, but by default if you have not used yield in your method, it won't care about the block
chrishou_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> it is like an additional argument to your methods
chrishough has joined #ruby
CustosLimen has quit [Ping timeout: 265 seconds]
mdarby_ has joined #ruby
<shevy> I should also like to point out that people like apeiros at one point in the life wanted to be able to use more than one block :)
arup_r_ has quit [Ping timeout: 264 seconds]
Scotteh__ has quit [Ping timeout: 260 seconds]
mdarby_ has quit [Max SendQ exceeded]
Axy has joined #ruby
Axy has joined #ruby
klaut has joined #ruby
DarkCthulhu has joined #ruby
psyprus has joined #ruby
<porfa> why doesn?t this work? ? specs2 = "#{specs}".text.strip ?
<DarkCthulhu> Does ruby mix in the Enumerable mixin into every class by default?
<godd2> DarkCthulhu no
<DarkCthulhu> godd2: Why did the sort method work for me just after defining the spaceship operator?
<DarkCthulhu> without including the Enumerable mixni
<DarkCthulhu> *mixin
<shevy> DarkCthulhu I think either Kernel or Object has it
<godd2> DarkCthulhu in irb type Array.ancestors to see what's in the ancestor chain, and then do Object.ancestors and you will see that Enumerable is missing
Mia has quit [Ping timeout: 244 seconds]
<shevy> cool
<DarkCthulhu> ahh
<DarkCthulhu> So, array has it mixed in by default
<DarkCthulhu> Why does it show up as an ancestor? Isn't it technically a module, which isn't a part of some inheritance chain?
rshetty_ has joined #ruby
<shevy> Hash also has it mixed in
<shevy> probably most of those ruby core classes
<shevy> DarkCthulhu but that is how it always works
<shevy> >> module Bar; end; class Foo; include Bar; end; Foo.ancestors
<eval-in__> shevy => [Foo, Bar, Object, Kernel, BasicObject] (https://eval.in/216951)
<shevy> chain is Foo -> Bar -> Object -> Kernel -> BasicObject
<DarkCthulhu> Hmm.. I see
<shevy> modules are a bit like crippled objects
<DarkCthulhu> Foo < Bar and class Foo; include Bar; end; would produce the same chain of ancestors then?
rshetty has quit [Ping timeout: 250 seconds]
<godd2> DarkCthulhu technically yes, but in the first, Bar would have to be a class, and in the second you listed, Bar would have to be a Module
Musashi007 has joined #ruby
<DarkCthulhu> >> class Bar; end; class Foo < Bar; end; Foo.ancestors
<eval-in__> DarkCthulhu => [Foo, Bar, Object, Kernel, BasicObject] (https://eval.in/216952)
<godd2> The output from ancestors doesn't distinguish between modules and classes
<DarkCthulhu> I see
<DarkCthulhu> godd2: It seems like ancestors is then just the order in which missing methods calls are propagated
<godd2> >> class Foo; end; Foo.ancestors.map(&:class)
<eval-in__> godd2 => [Class, Class, Module, Class] (https://eval.in/216953)
havenwood has joined #ruby
<shevy> DarkCthulhu I guess so
<godd2> DarkCthulhu that is close to correct
ndrei has quit [Ping timeout: 258 seconds]
<DarkCthulhu> godd2: What is that syntax you used with (&:class)?
<shevy> that is just a shortcut
wallerdev has joined #ruby
<godd2> in truth, the output from ancestors lies to you about eigenclasses
<DarkCthulhu> :class is a symbol, what is &?
jdj_dk has quit [Ping timeout: 265 seconds]
ndrei_ has quit [Ping timeout: 265 seconds]
<shevy> Foo.ancestors.map(&:class) is Foo.ancestors.map {|entry| entry.class }
<shevy> obviously it is less work to call the first way
<godd2> ^
<ericwood> & is syntactic sugar for turning the symbol into a proc
<DarkCthulhu> ahhh
<shevy> but I think it is slightly slower
<ericwood> it's slightly more awesome
<DarkCthulhu> a lot more awesome! wow
<shevy> I don't have a test case to validate my statement though
<shevy> DarkCthulhu I think I use the & most oftenly with something like to_s
<shevy> >> [1,2,3,4,5].map &:to_s
<eval-in__> shevy => ["1", "2", "3", "4", "5"] (https://eval.in/216954)
ndrei has joined #ruby
<shevy> >> [1,2,3,4,5].map {|e| e.to_s }
<eval-in__> shevy => ["1", "2", "3", "4", "5"] (https://eval.in/216955)
<shevy> hmm
<DarkCthulhu> ah.. right. When you have nothing to do with the arguments but pass them to the chained call.
<shevy> not a huge difference in syntax... but being able to omit both {} and || is quite nifty
<shevy> yeah
<shevy> you are a quick learner!
<shevy> you can't be a newcomer
<DarkCthulhu> I can program in other languages :)
chipotle has joined #ruby
<shevy> you aren't going to invoke Cthulhu in Ruby are you?
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<shevy> I am an old php fugitive as well
<DarkCthulhu> shevy: :D I'll try not to.
<shevy> I also have to admit that I like php more than perl :\
<shevy> (*liked)
<shevy> I quickly forgot the syntax in perl
<DarkCthulhu> Half my rep on stackoverflow is from PHP. That's the only reason why I don't show people my profile :/
<shevy> haha cool
<DarkCthulhu> ah.. yes. Perl has way too many magic variables
<godd2> oh don't worry, ruby has them too
<shevy> I can't grow on stackoverflow... insulting people is not good for karma gain
<godd2> >> $$
<eval-in__> godd2 => 16580 (https://eval.in/216956)
<DarkCthulhu> error code?
<shevy> well ruby also has the longer names
parabolize has joined #ruby
kireevco has quit [Quit: Leaving.]
<shevy> but they are not worth equal as you have to require 'english' :(
wallerdev has quit [Ping timeout: 244 seconds]
<shevy> >> require 'english'; $PROCESS_ID
<eval-in__> shevy => cannot load such file -- english (LoadError) ... (https://eval.in/216957)
<shevy> gah
<shevy> is it capitalized?
<DarkCthulhu> I was looking at poetry mode just now. It's awesome and all, but there is good reason why we don't program in natural languages like English, so why are we trying to turn it into that?
<ericwood> there's a nice middleground
<shevy> DarkCthulhu well - fully written English can be quite verbose
<DarkCthulhu> and imprecise
<shevy> ruby is a bit like terse english
<ericwood> it's all about whatever fits your brain the best...I found ruby gels really well with mine
<shevy> or japanese english ... hahahaha
jenrzzz has joined #ruby
<shevy> "if object responds to this, call that method, else call this method"
<shevy> if object.respond_to? :bla then foo() else bla() end
<shevy> I guess that won't work in one line hmm
ndrei_ has joined #ruby
<DarkCthulhu> yeah, that is nice
<shevy> it would be interesting to see a programming language that would support branching based on syntax
Channel6 has quit [Quit: Leaving]
<shevy> make condition check here
<shevy> / \
<shevy> here comes true condition here comes false condition
<DarkCthulhu> but with something like RSpec and the ".should be > something". I'd much rather write .should(be() > 5) so I know what the components of that line are
<shevy> damn... my spacing sucked
mistermocha has joined #ruby
<DarkCthulhu> haha.. I understand what you mean
<shevy> aha
<shevy> rspec is a bit strange
<sevenseacat> rspec is awesome
<godd2> DarkCthulhu go get your hands/eyes on Metaprogramming Ruby
<godd2> It's not as advanced as it sounds.
louism2wash has joined #ruby
<godd2> It's where I learned about the nuances of Ruby's inheritance and a bunch of other good stuff
<DarkCthulhu> godd2: Looks interesting. Will try :) ty
<shevy> >> require 'English'; $PROCESS_ID
<eval-in__> shevy => 16634 (https://eval.in/216958)
<shevy> DarkCthulhu ^^^ now you see that it works
<ericwood> I'm more of a minitest kind of guy
<shevy> stupid capitalization
<DarkCthulhu> shevy: I see...
<godd2> >> require 'english'; $PID
<eval-in__> godd2 => cannot load such file -- english (LoadError) ... (https://eval.in/216959)
<shevy> I guess the filename must be English.rb
<godd2> >> require 'English'; $PID
<eval-in__> godd2 => 16648 (https://eval.in/216960)
<shevy> /Programs/Ruby/2.1.4/lib/ruby/2.1.0/English.rb
Rahul_Roy_ has joined #ruby
<shevy> yeah... require is really super primitive
<godd2> that's odd, lowercase english worked in my irb...
<DarkCthulhu> I'm using Rails for one of my projects coming up. Coming from the PHP/CodeIgniter/Framework of the week side, convention over configuration is a little irksome at times :/
<sevenseacat> its awesome
<shevy> this cat is like a cheering one
<sevenseacat> there is absolutely no comparison between something like codeigniter, and rails
Takle has joined #ruby
<ericwood> some of the convention takes a little getting used to but it flows very naturally after that
<ericwood> and of course you can go in and muck with things if you really want to
<shevy> godd2 have you been using the & syntax to pass blocks to different methods in your code yet?
axl_ has joined #ruby
goodenough has quit [Remote host closed the connection]
<godd2> I haven't quite found the need yet. Nothing I've built has been that involved, but I have yielded in my code
<DarkCthulhu> sevenseacat: Yeah, rails does a lot more, but I'd like it more if it did it up front.
<godd2> I have a Sound::Device class that can yield the opened device to a block and closes it automatically after the block finishes. I took after the File class behavior.
<ericwood> tbh I don't write a lot of methods on my own that require blocks being passed in...
<ericwood> it's more something I found I do when *writing* frameworks for stuff
oo_ has quit [Remote host closed the connection]
chipotle_ has joined #ruby
oo_ has joined #ruby
psy_ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Quit: Connection closed for inactivity]
oo_ has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
reinaldob has joined #ruby
axl_ has quit [Ping timeout: 255 seconds]
chipotle has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
<DarkCthulhu> Have you guys written Python as well? How would you say it compares?
<DarkCthulhu> to Ruby
<DarkCthulhu> (controversial but bear with me :)0
<godd2> never learned it; don't have an opinion
chipotle_ has quit [Ping timeout: 250 seconds]
mistermocha has quit [Remote host closed the connection]
<aewffwea> DarkCthulhu: I havent, but the small python I've seen, I prefer ruby
<DarkCthulhu> aewffwea: Why?
mistermocha has joined #ruby
<ericwood> I started out on python
bluehavana has joined #ruby
<ericwood> I found both comparable but Ruby gelled better with me and I enjoyed writing it more
<ericwood> it just felt right
michaeldeol has quit [Quit: Textual IRC Client: www.textualapp.com]
atraylen has quit [Ping timeout: 240 seconds]
<DarkCthulhu> Open classes are the most awesome thing I've seen so far in Ruby. I don't know of any other language that has them the same way
IceDragon has quit [Quit: Space~~~]
<DarkCthulhu> But again, the downside would be that you don't really know for sure what even a core class does
<aewffwea> DarkCthulhu: I like brackets
sevenseacat has left #ruby [#ruby]
sevenseacat has joined #ruby
<DarkCthulhu> aewffwea: Does idiomatic ruby code have that many brackets? Most of the code I've seen does not
<aewffwea> DarkCthulhu: Almost all scripting and dynamic languages have an equivalent feature
reinaldob has quit [Ping timeout: 256 seconds]
<aewffwea> DarkCthulhu: You can also use do and end...
<DarkCthulhu> aewffwea: Which ones? Python does not for one.
<DarkCthulhu> Yeah, do..end is what I've seen and was what I thought was more ruby-ish.
<DarkCthulhu> ruby-style
skolman_ has quit [Remote host closed the connection]
<ericwood> I only use brackets when chaining
<aewffwea> anyway, I told you I don't know python, so mine might not be the best opinion ever
<DarkCthulhu> Hmm..
<aewffwea> Ruby seems nicer than Python
<godd2> erichmenge you can chain off end also
<ericwood> yeah but it's ugly
<ericwood> also that's the wrong person
<godd2> ah dammit
rshetty_ has quit [Remote host closed the connection]
<DarkCthulhu> yeah, map do ... end.something works. Just looks a little weird at first, chaining from "end".
<ericwood> just use brackets for that
<ericwood> it conveys what's happening better
<DarkCthulhu> yep.. definitely one place I'd use brackets
CustosLimen has joined #ruby
CustosLimen has quit [Changing host]
CustosLimen has joined #ruby
wallerdev has joined #ruby
VanillaGoat__ has joined #ruby
rshetty has joined #ruby
<ericwood> tbh it's best to only use them there and on one-liners
<ericwood> but those are just my opinions
klaut_ has joined #ruby
x1337807x has joined #ruby
Morkel_ has joined #ruby
amclain has quit [Quit: Leaving]
mumm_ra has quit [Quit: leaving]
josephndenton has quit [Ping timeout: 244 seconds]
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
zartoosh has joined #ruby
catfishlar_ has joined #ruby
Spami has joined #ruby
<parabolize> for me python had better GUI libraries but it uses so much of its line space with 4 space indentation and references to self. Also, the python folks seem to hate marcos.
<porfa> can anyone help me out with this please? https://gist.github.com/anonymous/7a4f066918088001c9fc the output i get form specs is wrong, i need to get ?Botoeso maos-livres? instead of ?Bot\u00E3o m\u00E3os-livres?
<DarkCthulhu> parabolize: Aren't macros almost always evil?
<aewffwea> parabolize: I like references to self :)
emmesswhy has joined #ruby
<aewffwea> DarkCthulhu: Macros aren't evil... Some people that use macros are...
Sp4rKy__ has joined #ruby
wallerdev has quit [Ping timeout: 245 seconds]
<DarkCthulhu> porfa: Looks like an issue with encoding. Those look like unicode escape sequences.
BadQuanta has joined #ruby
skolman_ has joined #ruby
<shevy> DarkCthulhu I preferentially use {} because it is visualize easier to distinguish it for me
oo_ has quit [Remote host closed the connection]
<shevy> def foo
<shevy> bla.each {
<shevy> }
<shevy> end
<shevy> *visually
<shevy> nokogiri is so ugly
<DarkCthulhu> shevy: Hmm.. With the right indentation, I don't mind do..end or the brackets.
<shevy> I hate using lots of indented end's
<shevy> there was a troll suggestion once to introduce enddd as a keyword
n3b_ has joined #ruby
lorn_ has joined #ruby
kartouch_ has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
dreamfighter has joined #ruby
<DarkCthulhu> porfa: Nokogiri::HTML(..) takes an additional encoding argument that you can pass in as 'utf-8'. That may work for you
oo_ has joined #ruby
qz has joined #ruby
klaut has quit [*.net *.split]
catfishlar has quit [*.net *.split]
djbkd has quit [*.net *.split]
VanillaGoat_ has quit [*.net *.split]
DTSCode has quit [*.net *.split]
Azure has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
drkyro has quit [*.net *.split]
rostam has quit [*.net *.split]
keen_________ has quit [*.net *.split]
larsam has quit [*.net *.split]
lorn has quit [*.net *.split]
Sp4rKy_ has quit [*.net *.split]
20WAAC7EF has quit [*.net *.split]
aboudreault has quit [*.net *.split]
n3b has quit [*.net *.split]
kartouch has quit [*.net *.split]
havenwood has quit [*.net *.split]
DrCode has quit [*.net *.split]
St_Marx has quit [*.net *.split]
atmosx has quit [*.net *.split]
end_guy has quit [*.net *.split]
catfishlar_ is now known as catfishlar
JBreit has joined #ruby
djbkd has joined #ruby
<DarkCthulhu> and we have netsplit.
Abhijit has joined #ruby
<qz> heya. is .instance_eval {} still changing object somehow? i get different results with JSON.pretty_generate(obj) and obj.instance_eval {} ; JSON.pretty_generate(obj)
Spami has quit [Ping timeout: 258 seconds]
mistermocha has quit [Remote host closed the connection]
n_blownapart has joined #ruby
mistermocha has joined #ruby
djbkd_ has joined #ruby
sinequanon has quit [Remote host closed the connection]
BadQuanta1 has joined #ruby
sigurding has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
aboudreault has joined #ruby
kaspergrubbe has joined #ruby
BadQuanta has quit [Ping timeout: 265 seconds]
mistermo_ has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
DTSCode has joined #ruby
atraylen has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ruby
jusmyth has left #ruby [#ruby]
keen_________ has joined #ruby
<n_blownapart> hello I'm learning about array elements. why does line 8 return an empty [] and line 10 returns nil ? thanks http://pastie.org/9694716
kaspergrubbe has quit [Ping timeout: 260 seconds]
oleo__ has quit [Quit: Verlassend]
catfishlar has quit [Quit: catfishlar]
mistermo_ has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
<porfa> DarkCthulhu: it was my terminal.app that come ?wrongly? configure for ssh..
<porfa> it?s working now!
<DarkCthulhu> ah.. okay :)
sinequanon has joined #ruby
jusmyth1 has joined #ruby
Alina-malina has quit [Ping timeout: 265 seconds]
Alina-malina has joined #ruby
tagrudev has joined #ruby
synergyz_ has joined #ruby
<DarkCthulhu> n_blownapart: :-o that i some crazy behavior. I'd like to know as well why that is happening.
Xeago has joined #ruby
balazs has quit [Ping timeout: 258 seconds]
<n_blownapart> I'll put up the link again DarkCthulhu for others: http://pastie.org/9694716
synergyz has quit [Ping timeout: 272 seconds]
<DarkCthulhu> n_blownapart: http://stackoverflow.com/q/3568222/759019 seems to have an answer
<n_blownapart> shouldn't line 8 and 10 have the same behavior? ^
<n_blownapart> DarkCthulhu, looking thanks
jusmyth1 has quit [Ping timeout: 265 seconds]
jusmyth has joined #ruby
sinequanon has quit []
nrsk has joined #ruby
jonr22 has joined #ruby
Alina-malina has quit [Ping timeout: 265 seconds]
leslie2 has joined #ruby
Spleeze has quit [Ping timeout: 272 seconds]
<n_blownapart> DarkCthulhu, I had a hunch but couldn't put it to words. that is odd.
kireevco has joined #ruby
<DarkCthulhu> shevy: godd2: http://repl.it/3Jw What am I missing here? Some import?
davedev24_ has quit []
<shevy> that pastie sucks ;)
jle` has quit [Quit: WeeChat 1.1-dev]
soasme has quit [Remote host closed the connection]
<DarkCthulhu> shevy: It takes a little while to load. Maybe ideone is better though
<shevy> well the thing is
neoxquick has quit [Read error: Connection reset by peer]
<shevy> I don't need that interactive thing to the right
<shevy> at least you did not capture it as an image :D
soasme has joined #ruby
<DarkCthulhu> shevy: The interactive thing serves as the output console when you run the code as well.
<shevy> is this code correct?
<shevy> is this the desired result?
<shevy> I don't wanna have to use something else :P
<shevy> I have my editor, irb, kde konsole
<shevy> I don't quite understand the yield
<DarkCthulhu> It is testing closures, that is all
<shevy> i is 4
<shevy> yeah but I do that locally
<DarkCthulhu> surprisingly, it doesn't error out on ideone
jonr22 has quit [Ping timeout: 256 seconds]
arup_r has quit [Remote host closed the connection]
<DarkCthulhu> shevy: err.. It seems correct. Yields random numbers below the supplied "limit", "num" times
Spleeze has joined #ruby
<shevy> aha
jusmyth has left #ruby [#ruby]
<DarkCthulhu> Something fishy about it though. it always seems to be yielding numbers in increasing order
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<DarkCthulhu> oh wait
<DarkCthulhu> nvm
<DarkCthulhu> I'm stupid :)
<Abhijit> how to install ruby headers in fedora?
Macaveli has joined #ruby
bigmac has quit [Ping timeout: 244 seconds]
AndChat| has quit [Quit: Bye]
dkb20k_ is now known as dkb20k
fabrice31 has joined #ruby
<shevy> DarkCthulhu yeah I did not grok it but something looked really weird there
<shevy> Abhijit usually you must uncripple it; it often is in a dev- package. on debian based it should be like ruby-dev or something
dyu has quit [Quit: Leaving.]
Darryl_ has joined #ruby
<diegoviola> I have an array of hashes with a date key/values and some other key/values that are not duplicates, how do I merge them?
emmesswhy has quit [Quit: This computer has gone to sleep]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> best build a new one
goodenough has joined #ruby
arup_r has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<diegoviola> right
<Abhijit> shevy, ok
rshetty has quit [Ping timeout: 244 seconds]
<shevy> diegoviola I guess you could also use .map or .map! on your array to yield the desired structure, but I often found it easier to understand if I re-build my data structure little by little until I have what I want
<shevy> if you need to throw out stuff you don't want to, you can use .select or .reject prior to rebuilding
<leslie2> rubyonrails channel disappeared? I have some questions to ask
<sevenseacat> it didnt disappear.
<diegoviola> shevy: thanks
<shevy> leslie2 /join #RubyOnRails
<leslie2> I could not join it, I do not know why shevy!
<Hijiri> requires registration maybe?
<Hijiri> I was able to join
<leslie2> maybe
aspires has joined #ruby
jottr has joined #ruby
<sevenseacat> it does require registration, as the alert tells you.
<shevy> leslie2 yeah you must be identified + registered
<shevy> leslie2 stay here with us, we don't force you to lower your pants like they do :>
<shevy> it's their way of telling you that they don't want you!
<shevy> if you do /join #python and are not identified then you get redirected to #python-unregistered
pontiki has joined #ruby
<shevy> where there are more people than on #ruby
nopoliti1a has joined #ruby
<shevy> :\
<shevy> :/
<sevenseacat> works for me.
<leslie2> haha, nicely you guys
<shevy> I guess there must be +1500 on #python but I don't know as I am an ILLEGAL IRC RESIDENT without registration
DjDeaf has joined #ruby
<sevenseacat> 1467 actually.
ptrrr has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> ack :(
<DjDeaf> Hi, Any way I can put conditional statements inside an API call? (Using hashes)
<shevy> DjDeaf probably you can use the ternary operator
Alina-malina has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
<DjDeaf> @shevt ternary won't help as I cannot use it inside Faraday's put call
<DjDeaf> http://pastebin.com/SxP3KNLM - here's the code
noop has joined #ruby
<leslie2> is it possible to add a location pointing to a static dir and the rest of the configuration working for Unicorn?
theRoUS has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
codecop has joined #ruby
theRoUS has joined #ruby
Akagi201 has quit []
<DjDeaf> So, anyone? I can I choose which params to send over an API call? Code: https://gist.github.com/anonymous/3df036df008676a76567
mityaz has joined #ruby
aspires has quit []
<shevy> I don't get the question
<shevy> what this is is basically a Hash right?
<shevy> so you can build up your Hash before you send it into some other method
Xeago has joined #ruby
<DjDeaf> Yes, In the code I first build the Hash using tap
<pontiki> i can't even read that
<DjDeaf> The second action is to use the values and send them to the API
<DjDeaf> but if a value is not set, How can I "Remove" it from the call?
<shevy> .delete(:key_here) on your Hash
wallerdev has joined #ruby
<shevy> I dont know why you must do this all inside the {} - can't you rebuild your hash exactly how you want to have it?
bal has joined #ruby
<DjDeaf> I'm using tap so no need for delete. At the end, I get a hash build up of only keys I need
<shevy> good, so you have the final Hash already
<pontiki> why not set up options with the parameters you want, and just pass that into the call?
<DjDeaf> Yes
<DjDeaf> because, I need the API call to pass all values that has been inserted.
<pontiki> looks like you just need to add checkid and encryption
<pontiki> and?
<shevy> it only confuses me because a few lines before you said that you don't know how to remove a value if it is not set, yet you also just now said that the hash is final, and thus ready ;)
<DjDeaf> If someone passed more parameters, i will pass them too
<DjDeaf> Ok, a few remarks:
<pontiki> you're building it right there, who else is going to put in parameters?
<DjDeaf> 1) 'options' hash is building my hash, and working perfect - at the end, i get a hash of only the things I need
<shevy> DjDeaf what I would do is use a method which will ensure that my hash is valid, before I then put it into the next method call
<shevy> good
<DjDeaf> 2) @conn.put part where I send this values to the API, and if I don't have a value in one parameters (or key is not exist) it will pop an error.
<DjDeaf> I want to know how to do a selective API call, but still dynamic
<shevy> then use a second hash that is valid for that @conn.put line
leslie2 has quit [Ping timeout: 244 seconds]
SouL has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
<DjDeaf> what do you mean?
wallerdev has quit [Ping timeout: 240 seconds]
theRoUS has quit [Ping timeout: 265 seconds]
<DjDeaf> the user is going to put parameters
<DjDeaf> This is used to modify a check on Pingdom, and most values are optional
<pontiki> oh, well *that* is new information you haven't said before
Xeago has quit [Remote host closed the connection]
<DjDeaf> sorry :)
<shevy> I still don't see the problem
leslie1 has joined #ruby
<shevy> you are in full control of the code that is sent to @conn.put
<shevy> so build up the Hash precisely how you want it?
<pontiki> it still doesn't make sense to me that you have to create two hashes where one merely has the fields copied from the other
<DjDeaf> I have ni problem building the hash
Joufflu has quit [Ping timeout: 265 seconds]
<DjDeaf> no*
<pontiki> exactly
koderok has joined #ruby
<pontiki> so why build it twice?
<DjDeaf> the second one does not created a new hash, it assign values
<shevy> the knights who said ni
skolman_ has quit [Remote host closed the connection]
<pontiki> it so very much is building another hash
<DjDeaf> Or maybe I get something way off?
<pontiki> @conn.put url, hash_of_options
<DjDeaf> oh. you have a point. sec :)
theRoUS has joined #ruby
sinkensabe has joined #ruby
vyorkin has joined #ruby
parduse has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
rdark has joined #ruby
parduse has joined #ruby
<DjDeaf> Well, brilliant. that worked. Thanks pontiki!!
<shevy> lol
<shevy> so you did pass in your hash finally
mistermocha has joined #ruby
vyorkin has quit [Ping timeout: 255 seconds]
<pontiki> if you want to make it a bit more consise, DjDeaf, take a look at the third form of conn.get on this page: http://www.rubydoc.info/gems/faraday
rippa has joined #ruby
<pontiki> passing in a block to #get you can set the parameters directly
ClarusCogitatio has quit [Ping timeout: 256 seconds]
<DjDeaf> checking. and yes, I just passed the hash as you suggested: result = @conn.put "/api/2.0/checks/#{checkid}", options
louism2wash has quit [Quit: This computer has gone to sleep]
kamil has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
ClarusCogitatio has joined #ruby
louism2wash has joined #ruby
louism2wash has quit [Client Quit]
jenrzzz has joined #ruby
<DjDeaf> Hi, pontiki, what example did you mean in that page?
ptrrr has quit [Quit: ptrrr]
<pontiki> the third one for conn.get, where you pass a block
tvw has joined #ruby
<pontiki> i can whittle that down even futher, but it might get a bit obfuscated
atraylen has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
<shevy> your code becomes obfuscated?
jusmyth has joined #ruby
jusmyth has left #ruby [#ruby]
<DjDeaf> That's cool , that way I can save the two separated actions into one
<pontiki> \o/
<DjDeaf> Thanks a lot!
tlarevo_ has joined #ruby
<pontiki> i can't guarantee that will work as i haven't tested it, but at least the form makes more sense
ClarusCogitatio has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
ClarusCogitatio has joined #ruby
<pontiki> params might not make sense on a conn.put, forex, but that's easily fixed
tlarevo has quit [Ping timeout: 245 seconds]
aganov has joined #ruby
Wolland has joined #ruby
Wolland has quit [Remote host closed the connection]
mkaesz has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
Wolland has joined #ruby
b1nd has quit [Ping timeout: 258 seconds]
b1nd has joined #ruby
Wolland_ has quit [Ping timeout: 265 seconds]
anarang has joined #ruby
<DTSCode> so just out of curiosity, i want to know ruby, but if im not going to use it for anything professional, whats the advantage of using it over say python
Wolland has quit [Ping timeout: 256 seconds]
klaut_ has quit [Remote host closed the connection]
axl_ has joined #ruby
<DTSCode> or just writing a dsl?
<pontiki> none
<pontiki> pleasure
<DTSCode> oh
niKeITA has joined #ruby
<pontiki> potential for great money, fame, fortune and being shevy's friend
goshdarnyou has joined #ruby
<DTSCode> how good is it with web dev?
<pontiki> pretty boss
<pontiki> but so is python
sinkensabe has joined #ruby
<DTSCode> hmmm...
<pontiki> i gotta tell ya, this question is hugely pointless
<DTSCode> o rly? ok then
<DTSCode> ill just learn it then just to say i did
<pontiki> for most things it hardly matters which language you use
<shevy> hey
<pontiki> but if you want to be shevy's friend, you have to learn ruby
<shevy> shevy's friendship is more expensive!
* DTSCode wants to be shevys friend
<shevy> omg
<shevy> DTSCode as to the question - both ruby and python fill very similar niches
<DTSCode> thats what i figured
<pontiki> i have learned tons of different languages, but ruby is, for me, a joy to use on a daily basis
<DTSCode> why so?
<shevy> DTSCode the main difference is the philosophy
<pontiki> i can't personally compare it to python, because i've never felt compelled to learn it
<DTSCode> it looks a lot more elegant than python tbh which is why i want to learn it
<DTSCode> shevy, makes senes
<tmoore> DTSCode: my possibly useless opinion is that most people tend to gravitate toward one or the other based on personal style/taste
<DTSCode> sense even
<shevy> DTSCode what sold me on ruby was this interview: http://www.artima.com/intv/rubyP.html if you have not read it yet, you should read it once
reinaldob has joined #ruby
<tmoore> try both and see what you like
<pontiki> why so? that's like asking an artist why painting watercolour is such a joy. the answer is simply because it is
<DTSCode> will do shevy
<pontiki> it's an aesthetic
<shevy> other than that, you also have to keep in mind that there are significantly more python users and devs out there
<DTSCode> tmoore, good point
axl_ has quit [Ping timeout: 264 seconds]
<DTSCode> there are? oh.
<shevy> yeah
<tmoore> if Ruby looks more elegant to you, then it's probably a good way to go
<tmoore> some people think Python looks more elegant, for whatever reason
<DTSCode> i used to, i think it looks nice, but hacky
<pontiki> python is currently the most popular language taught to people who need to write programs but are not software developers
<DTSCode> same with c and c++
<shevy> DTSCode that indirectly affects other people too. many use C++ and then pick only one scripting language, and then often pick python. look at the list of bindings to scripting languages (and other languages) here: http://www.gtk.org/language-bindings.php
<shevy> perl users are mostly fossil coders :)
<shevy> waiting for perl 6 ...
<pontiki> haha, not
niKeITA is now known as niKeITA_away
<DTSCode> huh. interesting. thanks shevy
<DTSCode> so any good tuts?
<shevy> DTSCode one really huge advantage you get with ruby is that "there is more than one way to write and use ruby"
fabrice31 has joined #ruby
<shevy> in python you get the uniform military coding style
<pontiki> here's my list, DTSCode : http://blog.tamouse.org/pages/learning/
<shevy> code looks like a clone of drone hackers
<shevy> and they still can not decide whether python 2 or python 3 is the better version
<shevy> but the real difference is the philosophy really
<DTSCode> i like 2
<shevy> hehehe
<shevy> shouldn't you like 3 more?
lampd1 has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
<DTSCode> ive never tried 3
<DTSCode> cause i dont need to
leslie1 has quit [Ping timeout: 240 seconds]
reinaldob has quit [Ping timeout: 258 seconds]
leslie1 has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
jenrzzz has quit [Ping timeout: 265 seconds]
<shevy> I dunno
<shevy> I wanted to pick up on python a few times
<shevy> the last time I tried, I hated the python 2 vs. python 3. I'm just gonna wait until python 2 is dead
<shevy> (*transition)
Andriamanitra has quit [Ping timeout: 244 seconds]
mkaesz has quit [Ping timeout: 250 seconds]
<DTSCode> thanks shevy! found the perfect link
leslie1 has quit [Ping timeout: 240 seconds]
Andriamanitra has joined #ruby
leslie1 has joined #ruby
niKeITA_away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
terlar has joined #ruby
BadQuanta has joined #ruby
govg has quit [Quit: leaving]
BadQuanta1 has quit [Ping timeout: 265 seconds]
shredding has joined #ruby
ClarusCogitatio has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
mkaesz has joined #ruby
ClarusCogitatio has joined #ruby
RitterJack has joined #ruby
andrewlio has joined #ruby
doev has joined #ruby
wallerdev has joined #ruby
agjacome has joined #ruby
<supermanYellow> i have a new assignment , open a new terminal with irb
TomyWork has joined #ruby
bluehavana has quit [Quit: Connection closed for inactivity]
<pontiki> oh that sounds like fun!
<pontiki> OS-independent?
<shevy> hehehe
bayed has joined #ruby
magic_ has quit [Quit: Leaving]
magic_ has joined #ruby
magic_ has quit [Remote host closed the connection]
luriv has joined #ruby
last_staff has joined #ruby
wallerdev has quit [Ping timeout: 265 seconds]
<godd2> WindowsKey+R, i, r, b, Enter
existensil has quit [Ping timeout: 256 seconds]
<pontiki> maybe i had the wrong idea
<godd2> That might not work everywhere
<pontiki> i thought you were in irb, and wanted to open a terminal from inside it
sk87 has joined #ruby
niKeITA has joined #ruby
hanmac1 has joined #ruby
zorak8 has joined #ruby
<godd2> `irb` ?
jenrzzz has joined #ruby
BadQuanta has quit [Ping timeout: 265 seconds]
<godd2> no nevermind that didn't work
alex88 has joined #ruby
<shevy> man guys
<shevy> supermanYellow does not say anything
einarj has joined #ruby
<shevy> godd2 what terminal do you use?
<supermanYellow> oh. i was busy watching the rails gem install fail. its linux OS
<shevy> lol
<shevy> this is the exciting thing you have
<shevy> the fails
<godd2> I'm on Winblows
<shevy> wow
<shevy> do you at least use somehing like MSYS?
<godd2> I don't know what that is.
<shevy> :(
<shevy> it is a kind of primitive terminal
<shevy> but better than cmd.exe
<supermanYellow> Its just an idea, that when i come to my office, i have 3 projects to work on, so i just go to the root directory and state the names of the projects, it opens up 3 terminals running bundle exec rails c
<shevy> supermanYellow cant you use ruby for th is?
<pontiki> supermanYellow: oh, you imght take a look at using tmux
<shevy> you have system()
jonr22 has joined #ruby
<supermanYellow> that is what i was asking if its possible to write do this in ruby.
* supermanYellow google tmux
<godd2> shevy I have msys.bat in my MinGW isntall should I try that?
<godd2> supermanYellow: vid about tmux with vim and ruby: https://www.youtube.com/watch?v=gB-JSh1EVME
<shevy> godd2 hmm not sure but yeah
<shevy> I only used msys and avoided mingw
<supermanYellow> i uses emacs though .
<shevy> which was funny because I wanted to first use mingw because cygwin was annoying
<shevy> reason I used msys was because I could use a shell on windows too, like on linux. I need a good shell! I do everything via the shell...
<pontiki> last time i used windows, i had cygwin installed
earfin has joined #ruby
<godd2> ok what makes MSYS better than cmd?
<pontiki> that was ages and ages and ages ago
tesuji has joined #ruby
<pontiki> supermanYellow: you know, emacs has a dandy shell mode
<supermanYellow> yes. M-x shell ?
<supermanYellow> but until now (2 months) i have used it run simple commands
Takle has joined #ruby
<zenspider> I live in it
<zenspider> got one open right next to this irc buffer
<godd2> shevy keep in mind Ive only ever used a command line to navigate a file system and run a program or two. nothing more sophisticated than that
<pontiki> i've never tried running rails console inside emacs shell, but it might be cool
<godd2> shevy I guess what I'm asking is, what can MSYS do that cmd cant? after all, it looks like they can both navigate file systems and i can run a program from them
jonr22 has quit [Ping timeout: 272 seconds]
<supermanYellow> Umm, i have a question , how do you run the emacs shell as login shell. other than that rails c doesnot run
existensil has joined #ruby
abuzze has quit [Read error: Connection reset by peer]
TPBallbag has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
abuzze has joined #ruby
lolmaus has joined #ruby
<pontiki> it's working super fine for me, just tried it out
* supermanYellow retrying
<godd2> supermanYellow are you inside your rails app root?
goodenough has quit [Remote host closed the connection]
<pontiki> rails console doesn't care if it's running in a login shell or not...
<supermanYellow> oh eff. the bundle install isn't complete yes. yes. i am inside my app root, i can see the app/ bin/ config/ directories
<supermanYellow> ow
goodenough has joined #ruby
rshetty has joined #ruby
<supermanYellow> I did see some error .. but I can't remember what.
TPBallbag has quit [Ping timeout: 264 seconds]
<supermanYellow> This tmux video a 5:58 is awsome
<godd2> supermanYellow :)
mengu has joined #ruby
<supermanYellow> (y)
<godd2> There's lots of awesome rubyconf and railsconf talks on youtube.
dumdedum has joined #ruby
adac has joined #ruby
<godd2> One of my favorites is Rich Hickey (creator of Clojure) giving a talk at RailsConf about simplicity.
lkba has joined #ruby
danjordan has joined #ruby
timonv_ has joined #ruby
Takle has quit [Remote host closed the connection]
red_horned_rihno has joined #ruby
<supermanYellow> today is a sad day. I have been installing for a lot of hours. i started at 12, its now 2:15 .
n_blownapart has quit [Remote host closed the connection]
AlexRussia has quit [Quit: WeeChat 1.1-dev]
bal has quit [Ping timeout: 264 seconds]
earfin has quit [Quit: Leaving]
bal has joined #ruby
existensil has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
philwantsfish has quit [Ping timeout: 256 seconds]
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
robbyoconnor has joined #ruby
jenrzzz_ has joined #ruby
eka has joined #ruby
siwica has joined #ruby
anarang has quit [Ping timeout: 244 seconds]
<godd2> on the plus side, you're much more familiar with the process :)
jenrzzz has quit [Ping timeout: 255 seconds]
qba73 has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
lsmola has joined #ruby
iwishiwerearobot has joined #ruby
arup_r has joined #ruby
rshetty has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
rshetty has joined #ruby
nopoliti1a has quit [Quit: leaving]
sigurding has quit [Quit: sigurding]
chthon has joined #ruby
tvw has quit []
kaspergrubbe has joined #ruby
mkaesz has quit [Ping timeout: 255 seconds]
govg has joined #ruby
anarang has joined #ruby
livathinos has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
mikecmpbll has joined #ruby
klaut has joined #ruby
jack_rabbit has quit [Ping timeout: 256 seconds]
psy_ has quit [Remote host closed the connection]
fandi has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
livathinos is now known as sliv
sliv is now known as spyrosl
Juanchito has joined #ruby
sevenseacat has quit [Remote host closed the connection]
spyrosl is now known as sliv
DLSteve has joined #ruby
red_horned_rihno has quit [Quit: Leaving]
sliv is now known as livathinos
Takle_ has joined #ruby
lugub has joined #ruby
livathinos is now known as sliv
timonv_ has quit [Ping timeout: 258 seconds]
Azure has joined #ruby
siwica has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
joonty has joined #ruby
wallerdev has joined #ruby
ta has quit [Quit: Leaving...]
siwica has joined #ruby
olivier_bK has joined #ruby
AlexRussia has joined #ruby
ta has joined #ruby
dblessing has joined #ruby
troulouliou_dev has joined #ruby
dblessing has quit [Client Quit]
sliv is now known as livathinos
zorak8 has quit [Ping timeout: 258 seconds]
wallerdev has quit [Ping timeout: 260 seconds]
agjacome has quit [Quit: leaving]
sigurding has joined #ruby
timonv_ has joined #ruby
terlar has quit [Ping timeout: 244 seconds]
agjacome has joined #ruby
ClarusCogitatio has quit [Ping timeout: 244 seconds]
<gregf__> haha, confreaks
<gregf__> pontiki++
ClarusCogitatio has joined #ruby
<hanmac1> hm does Complex-Domains in Rails have an ı-Part too? ;P
moritzs has joined #ruby
mikecmpb_ has joined #ruby
AkashicLegend has joined #ruby
ephemerian has joined #ruby
Alina-malina has quit [Ping timeout: 244 seconds]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
elaptics`away is now known as elaptics
<banister_> hanmac1 you're awake too early, go back to sleep
<banister_> ;)
mikecmpbll has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
<hanmac1> banister_: my local time is 10:30 ... i am awake since 5:30
<banister_> hanmac1 why awake so early? (5:30)
AlexRussia has quit [Quit: WeeChat 1.1-dev]
<hanmac1> because i normaly begin to work at 7:00
AlexRussia has joined #ruby
oo_ has quit [Remote host closed the connection]
<banister_> hanmac1 really? you mean you work in your own time or you have to actually be at office by 7am ?
<banister_> that's crazy
<DLSteve> banister_, It's 4:32 am where I am at >.>
oo_ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
<banister_> DLSteve haha, and why are you awake so early? :)
<banister_> let me guess, u haven't slept yet?
<banister_> stil up smoking weed and watching anime? ;)
emmesswhy has joined #ruby
oo_ has joined #ruby
<DLSteve> banister_, It's my off day I actually slept in :-P I usualy get up at 3am to be at work by 4.
JohnBat26 has joined #ruby
<banister_> DLSteve interesting, what kind of work is that?
Boohbah has joined #ruby
St_Marx has joined #ruby
<hanmac1> banister_: currently i am working form workplace again again, and i am early at work (7:00) because so i can go early home again
<DLSteve> banister_, I work for a retail chain in logistics.
<lugub> if I'm wanting to use a website which uses scrubbed data from soundcloud - I could host the site with rails but do the actual hosting with rails right?
Boohbah is now known as Guest34823
axl_ has joined #ruby
St_Marx has quit [Remote host closed the connection]
Guest34823 has quit [Write error: Connection reset by peer]
<banister_> hanmac1 i dont' start work until 10am, sometimes even later :D (in fact i can more or less work my own hours :)
<DLSteve> banister_, Honestly though I like getting up early as it is nice and quite, also starbucks opens at 5 am :-P
<banister_> DLSteve cool, how does ruby figure into that?
zartoosh has quit [Changing host]
zartoosh has joined #ruby
dreamfighter has quit [Changing host]
dreamfighter has joined #ruby
Darryl_ has quit [Changing host]
Darryl_ has joined #ruby
noop has quit [Changing host]
noop has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<banister_> DLSteve i woke up this morning at 8:30am, that's the earliest i've got up in about 3 years :)
andikr has quit [Changing host]
andikr has joined #ruby
goshdarnyou has quit [Changing host]
goshdarnyou has joined #ruby
<DLSteve> banister_, It doesn't, ruby is a hobby of mine right now, In the process of learning rails.
bayed has quit [Changing host]
bayed has joined #ruby
<banister_> DLSteve oh cool, want to make a career change or just keep ruby as a hobby?
anarang has quit [Changing host]
anarang has joined #ruby
Juanchito has quit [Changing host]
Juanchito has joined #ruby
<DLSteve> banister_, I do freelance web design for extra money and was looking at geting into full time web dev.
snovity has joined #ruby
<banister_> DLSteve nice, there's a bunch of remote positions for ruby devs these days, those are the sweetest deal if you can land one IMO
sinkensabe has quit [Read error: Connection reset by peer]
terlar has joined #ruby
axl_ has quit [Ping timeout: 258 seconds]
reinaldob has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
niKeITA has quit [Ping timeout: 244 seconds]
lkba has quit [Ping timeout: 260 seconds]
niKeITA has joined #ruby
tlarevo_ has quit [Read error: Connection reset by peer]
Alina-malina has quit [Ping timeout: 244 seconds]
tlarevo has joined #ruby
Alina-malina has joined #ruby
ghr has joined #ruby
timonv_ has quit [Ping timeout: 250 seconds]
b1nd has quit [Ping timeout: 255 seconds]
ghr has quit [Client Quit]
<DLSteve> banister_, Yah that would be awesome, as where I live is nice and cheap but is a bit of a drive from all the tech jobs.
b1nd has joined #ruby
<banister_> DLSteve nice, get a remote job based in NYC/SF, they usually pay around 85K+/year even for an entry level position
sinkensabe has joined #ruby
<DLSteve> banister_, That would work as they are in the same timezone as me.
<banister_> NYC and SF are not in the same timezone ;)
soasme has quit [Quit: Leaving...]
<DLSteve> NYC I meant :-P
DrCode has joined #ruby
<DLSteve> SF would be a 3 hour delay
reinaldob has quit [Ping timeout: 260 seconds]
<DLSteve> Of course I am ahead so I would get to sleep in!
klaut has quit [Remote host closed the connection]
<hanmac1> banister_: hm maybe i will do that later ... first i need to push my rwx project a bit more and get co-workers for it (2 workers already look 100% more better than 1 worker ;P )
Scotteh has quit [Ping timeout: 244 seconds]
<DLSteve> rwx project?
existensil has joined #ruby
<hanmac1> DLSteve: wxWidgets binding for ruby ... like wxRuby reloaded ;P
<DLSteve> ah ok
<hanmac1> is for desktop gui developing
<DLSteve> just looked it up :-P, so it is along the lines of QT.
<shevy> or ruby-gnome!
marr has joined #ruby
<hanmac1> DLSteve: recently wxWidgets got a QT-port too ...
nfk has joined #ruby
<DLSteve> haha
<banister_> hanmac1 nice
<DLSteve> Looks nice as it uses native API for the interfaces instead of just making one up.
Alina-malina has quit [Ping timeout: 264 seconds]
livathin_ has joined #ruby
niKeITA is now known as niKeITA_away
niKeITA_away is now known as niKeITA
timonv_ has joined #ruby
<DLSteve> ill bbl, going to starbucks
DLSteve has quit [Quit: Leaving]
livathinos has quit [Ping timeout: 250 seconds]
lugub has quit [Quit: Bye]
<soahccc> Anyone knows what Ctrl-C in a telnet windows sends to the remote? In Ruby I get two lines of input but the first is ???? and the second is ??
kyb3r_ has quit [Quit: Leaving]
anarang_ has joined #ruby
livathin_ has quit [Remote host closed the connection]
<soahccc> And it also breaks the response in the terminal so I guess it's some sort of escape sequence? http://files.sven.bmonkeys.net/images/_dev_Volumescode_privatemcl__bash__14035__1_2014-11-04_11-00-25.png
Takle_ has quit [Remote host closed the connection]
anarang has quit [Ping timeout: 250 seconds]
goodenough has quit [Remote host closed the connection]
tvw has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
dANO_ has joined #ruby
livathinos has joined #ruby
mengu has quit [Remote host closed the connection]
<jhass> soahccc: print the .bytes of the received input
dANO_ has quit [Client Quit]
<soahccc> hmm [255, 244, 255, 253, 6] and [255, 251, 6] but I think I'm not going to handle it... Telnet is just a fallback option if you don't have the ruby client
dANO_ has joined #ruby
Hobogrammer has quit [Ping timeout: 250 seconds]
relix has joined #ruby
<jhass> 255 says here comes a telnet command
<jhass> 244 is IP, Interrupt process
<jhass> 253 6 says some expected response or so
<jhass> 251 says he'll do 6, not sure what 6 is yet
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<jhass> apparently user defined on the protocol level
sk87 has joined #ruby
wallerdev has joined #ruby
<jhass> ah, apparently some synchronization stuff
rdark has joined #ruby
DjDeaf has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 255 seconds]
<zenspider> are you implementing telnet?
<zenspider> otherwise ,you shouldn't see that
himsin has joined #ruby
<hanmac1> banister_: did you see: http://xkcd.com/1442/ ? ;P
<soahccc> zenspider: I'm working on a socket command server. I try to use unix sockets but it fallbacks to TCP and in that case you can connect via telnet as well (not as pretty, but you could invoke stuff) without the need of the ruby client script
wallerdev has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
<soahccc> zenspider: It's just a bit annoying that if you press Ctrl-C nothing happens and you have to press enter twice (to send the two messages) until you can send a normal command again
niKeITA is now known as niKeITA_away
vyorkin has joined #ruby
niKeITA_away is now known as niKeITA
<zenspider> are you trying to ^c your local process?
arup_r_ has joined #ruby
TPBallbag has joined #ruby
<shevy> zenspider is very inquisitive today :)
<shevy> soahccc I remember the good old days where folks played MUDs via telnet
<shevy> man that was awful ...
DaniG2k has joined #ruby
arup_r has quit [Ping timeout: 250 seconds]
rshetty has quit [Remote host closed the connection]
<soahccc> zenspider: well I actually just don't know how to press the telnet escape character on a german keyboard and I always try to press it to "get out of there" :)
klaut has joined #ruby
vyorkin has quit [Ping timeout: 255 seconds]
timonv_ has joined #ruby
<jhass> Ctrl+Alt gr+8
<soahccc> shevy: yeah... telnet towel.blinkenlights.nl
tokik has quit [Ping timeout: 264 seconds]
<shevy> german keyboards are keyboards that require discipline!
<shevy> 9 months ago at my old work place, they gave me a windows machine (win xp) ... and an english keyboard. man, I typoed all the time...
josephndenton has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
<soahccc> that's mean :D
TPBallbag has quit [Ping timeout: 260 seconds]
jzinedine has joined #ruby
<shevy> it actually hurt my head in the beginning
<shevy> after a week or so it felt natural
jzinedine has left #ruby [#ruby]
speakingcode has quit [Ping timeout: 258 seconds]
<shevy> I always mix up class_eval with instance_eval
<shevy> I just did it again right now ...
<soahccc> jhass: ctrl+alt+8 makes {
<shevy> AND I also mixed up alias foo bar with alias bar foo too
<jhass> soahccc: that's 7 on my keyboard
<jhass> also AltGr
fandi has quit [Remote host closed the connection]
<soahccc> jhass: there is no such thing on os x, ctrl+alt+5 give ^[ but doesn't do a thing
dh64 has quit [Ping timeout: 265 seconds]
timgauthier_away is now known as Timgauthier
vyorkin has joined #ruby
timonv_ has quit [Remote host closed the connection]
<jhass> oh, you only target nix? how about suggesting netcat as fallback?
josephndenton has quit [Ping timeout: 245 seconds]
<jhass> bah, and the escape is ] not [, sorry
<soahccc> jhass: let me install netcat and I take a look
<soahccc> btw it's ctrl+ü
ramfjord has quit [Ping timeout: 240 seconds]
<soahccc> jhass: thanks for the suggestion, that is the fallback for *nix for sure and telnet for windows (which I do support)
ChoiKyuSang has quit [Quit: Going offline, see ya! ( www.adiirc.com]
<hanmac1> my keyboard layout has altgr-shift- "~" for "¯"
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
* jhass should finally learn neo2
andrewlio has quit [Ping timeout: 272 seconds]
DjDeaf has joined #ruby
niKeITA is now known as niKeITA_away
theotherstupidgu has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
theotherstupidgu has joined #ruby
rshetty has joined #ruby
ldnunes has joined #ruby
DaniG2k has quit [Read error: Connection reset by peer]
andrewlio has joined #ruby
DLSteve has joined #ruby
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
DaniG2k has joined #ruby
Timgauthier has joined #ruby
niKeITA_away is now known as niKeITA
gnzh has joined #ruby
reinaldob has joined #ruby
<hanmac1> jhass: we need something like that which does change with the keyboard layout ;p http://www.artlebedev.com/everything/optimus/tactus/
jottr has quit [Ping timeout: 256 seconds]
niKeITA is now known as niKeITA_away
niKeITA_away is now known as niKeITA
<jhass> oh, there's a new optimus
<jhass> that one looks actually useful
gnzh has quit [Client Quit]
reinaldob has quit [Ping timeout: 255 seconds]
<niKeITA> something like a touch keyboard
klaut has quit [Remote host closed the connection]
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<niKeITA> not useful for programmers
govg has quit [Quit: leaving]
<niKeITA> need a phisical click
einarj has quit [Ping timeout: 264 seconds]
<hanmac1> hm maybe in the future i will have an AR-keyboard ;p
<niKeITA> ...and switches
<shevy> AR?
<shevy> ActiveRecord?!?!?!
einarj has joined #ruby
<niKeITA> Augumented Reality Keyboard?
speakingcode has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy> hehe
<shevy> that would be quite nice actually
<shevy> where I could type anywhere, without actual physical keyboard, and it would just work
<hanmac1> niKeITA: yeah that would be awesome ;P
niKeITA is now known as niKeITA_away
andrewlio has quit [Ping timeout: 245 seconds]
<shevy> quite nice
<shevy> there also are the LED keyboards
<shevy> but they are way too expensive
<shevy> I will wait until LEDs become super-cheap and super-widespread so you can have them all in your flat for very little extra cost
<shevy> or rather OLEDs
niKeITA_away is now known as niKeITA
DjDeaf has quit [Remote host closed the connection]
klaut has joined #ruby
Spami has joined #ruby
andrewlio has joined #ruby
DjDeaf has joined #ruby
sk87 has joined #ruby
Macaveli_ has joined #ruby
klaut has quit [Remote host closed the connection]
Spami has quit [Client Quit]
godd2 has quit [Ping timeout: 264 seconds]
Macaveli has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
Takle has joined #ruby
Macaveli_ has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
fsapo has joined #ruby
ChoiKyuSang has joined #ruby
anarang_ has quit [Ping timeout: 264 seconds]
larsam has joined #ruby
Fire-Dragon-DoL has joined #ruby
DjDeaf has quit [Remote host closed the connection]
Macaveli has quit [Client Quit]
leslie2 has joined #ruby
timonv_ has joined #ruby
sigurding has quit [Quit: sigurding]
leslie1 has quit [Ping timeout: 255 seconds]
DjDeaf has joined #ruby
supermanYellow is now known as superSadFace
Takle has quit [Remote host closed the connection]
<arup_r_> In my file I wrote require_relative '../../models/product_1.rb' require_relative '../../models/product_2.rb' require_relative '../../models/product_3.rb' .. How can I write it in one line ? require_relative '../../models/*.rb' didn't work
wallerdev has joined #ruby
anarang_ has joined #ruby
Takle has joined #ruby
Imofftopic has joined #ruby
theotherstupidgu has quit [Ping timeout: 245 seconds]
zly has quit [Changing host]
zly has joined #ruby
klaut has joined #ruby
zly has quit [Quit: Reconnecting]
zly has joined #ruby
zly has quit [Changing host]
zly has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
klaut has quit [Remote host closed the connection]
Macaveli has joined #ruby
niKeITA is now known as niKeITA_away
niKeITA_away is now known as niKeITA
theotherstupidgu has joined #ruby
Dude007 has joined #ruby
wallerdev has quit [Ping timeout: 244 seconds]
Imofftopic has quit [Client Quit]
shredding has quit [Quit: shredding]
RitterJack has quit [Remote host closed the connection]
krz has joined #ruby
ixti has joined #ruby
moritzs has quit [Remote host closed the connection]
<hanmac1> arup_r_: you cant because you cant trust the order
Soda has joined #ruby
<arup_r_> Ok,,, So I need to do the way I am doing now.. No one liner?
<hanmac1> i would say this: Dir['../../models/*.rb'].sort.each {|s| require_relative s }
arup_r_ has quit [Remote host closed the connection]
theotherstupidgu has quit [Ping timeout: 255 seconds]
davidhq has joined #ruby
josephndenton has joined #ruby
mengu has joined #ruby
theotherstupidgu has joined #ruby
niKeITA is now known as niKeITA_away
niKeITA_away is now known as niKeITA
fabrice31 has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 245 seconds]
tuelz has quit [Quit: WeeChat 1.0]
jenrzzz_ has quit [Ping timeout: 255 seconds]
_whitelogger has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
drPoggs has joined #ruby
TPBallbag has joined #ruby
arup_r has joined #ruby
charliesome has joined #ruby
francisfish has joined #ruby
anarang has joined #ruby
<wasamasa> /away works perfectly fine without having to change your nickname
DjDeaf has quit [Remote host closed the connection]
govg has joined #ruby
drawingthesun has joined #ruby
zorak8 has joined #ruby
<hanmac1> the other Hanmac is never away ;P
<wasamasa> the other wasa is never away either
<wasamasa> can't take over an unregistered nick in use, meh
tchebb has quit [Ping timeout: 258 seconds]
drawingthesun has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
niKeITA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
jenrzzz has joined #ruby
<shevy> you clones scare me
<pontiki> send in the clones
charliesome has quit [Quit: zzz]
<shevy> one pontik is enough
<shevy> erm, pontiki
DarthGandalf has quit [Ping timeout: 265 seconds]
<shevy> though there was ponbiki or something or ponwiki here... a while ago
<shevy> on #nixos there is shlevy and sometimes shlevo from Georgia is here on #ruby
<pontiki> not a clone; maybe an imposter
fabrice31 has joined #ruby
larsam has quit []
rshetty has quit [Remote host closed the connection]
theotherstupidgu has quit [Ping timeout: 250 seconds]
tchebb has joined #ruby
timonv_ has joined #ruby
theotherstupidgu has joined #ruby
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
aaronrl has quit [Ping timeout: 272 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
sigurding has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
<hanmac1> pontiki: or a backup copy?
last_staff has quit [Quit: bbl]
DLSteve has joined #ruby
DarthGandalf has joined #ruby
niKeITA has joined #ruby
mostlybadfly has joined #ruby
DjDeaf has joined #ruby
<niKeITA> it's ok now?
yeticry has quit [Ping timeout: 255 seconds]
timonv_ has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
Shazaum has joined #ruby
adriancb has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
emmesswhy has quit [Quit: This computer has gone to sleep]
<shevy> hey
banister has joined #ruby
Takle has quit [Remote host closed the connection]
<shevy> does one of you have an idea if there is something out there that does this:
banister has quit [Max SendQ exceeded]
aaronrl has joined #ruby
<shevy> - give it a remote webpage
<shevy> - visit it, collect all resources
<shevy> hmmm
<shevy> and then simplify it
Timgauthier is now known as timgauthier_away
<shevy> nope, let me think again before asking ...
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
razieliyo has joined #ruby
razieliyo has joined #ruby
banister has quit [Max SendQ exceeded]
mkaesz has joined #ruby
timonv_ has joined #ruby
jonr22 has joined #ruby
workmad3 has joined #ruby
banister has joined #ruby
adriancb has quit [Ping timeout: 264 seconds]
siwica has quit [Ping timeout: 245 seconds]
<shevy> I guess I need something different
drawingthesun has joined #ruby
<shevy> not a dump of static files but instead a dynamic description of any remote webpage. something like a minimal and optimized clone
sk87 has joined #ruby
<pontiki> can you provide an example?
psy_ has quit [Ping timeout: 265 seconds]
<niKeITA> shvevy, you mean text resource?
<shevy> hmm
<shevy> I do not know what is text resource
jonr22 has quit [Ping timeout: 265 seconds]
<shevy> I guess starting from a dump of a remote webpage for now is ok, where one analyzes all the data found there
<niKeITA> what u mean with "collect all resources" what type of resources?
superSadFace has quit [Ping timeout: 255 seconds]
shredding has joined #ruby
<niKeITA> images, media, video files, pdf ??
psy_ has joined #ruby
User458764 has joined #ruby
<shevy> well yeah, everything
<arup_r> Why order matter?
<shevy> let me perhaps provide some more context
kp666 has joined #ruby
<shevy> it is useful because basically you just search for the relevant exams, and if you are lucky you can simply download these
<shevy> obviously that is a php page
<shevy> I grew fond of the design of pages like that. There are many other pages that are also student pages, and provide something similar, but they suck
atmosx has joined #ruby
<shevy> since that student is no longer active, others could want to take over
<shevy> but I'll never maintain php code myself so it would not be me
Takle has joined #ruby
<shevy> now I could look at the source of that html/css and probably manually extract all parts that are important
lkba has joined #ruby
<shevy> but I figured I might need to do this again eventually
<shevy> so anything that could be automatized would be helpful
Takle has quit [Remote host closed the connection]
timgauthier_away is now known as Timgauthier
spastorino has joined #ruby
wallerdev has joined #ruby
<pontiki> are you just looking to scrape and republish the page somehow?
oo_ has quit [Remote host closed the connection]
banister has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
oo_ has joined #ruby
koderok has quit [Quit: koderok]
niKeITA has quit [Quit: ZZZzzz…]
wallerdev has quit [Ping timeout: 250 seconds]
aaronrl has quit [Ping timeout: 245 seconds]
oo_ has quit [Ping timeout: 264 seconds]
<soahccc> Does one know about a collection of cinch plugins? Could find much more than the examples
workmad3 has quit [Ping timeout: 255 seconds]
Darryl_ has quit [Quit: Connection closed for inactivity]
jottr has joined #ruby
<arup_r> hanmac1: Why #sort is needed here? Dir['../../models/*.rb'].sort.each {|s| require_relative s } What is the significance ?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<hanmac1> arup_r: you can not trust file system order
Virtualize|away has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r> But not clear.. I am requiring all files at the top of the script then.. using the module or classes whatever.. But then why does it matter - "The order" ?
kp666 has quit [Read error: Connection reset by peer]
<hanmac1> arup_r: " Note that case sensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as does the order in which the results are returned."
<hanmac1> arup_r: if your models have dependencies between each other you might get problems
larsam has joined #ruby
<arup_r> Ahh! makes sense now.. *dependency between requiring files.."
<arup_r> hanmac1: Thanks for your time...
krz has quit [Quit: WeeChat 1.0.1]
jottr has quit [Ping timeout: 244 seconds]
tlarevo has quit [Remote host closed the connection]
banister has joined #ruby
ptrrr has joined #ruby
Takle has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle_ has joined #ruby
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
rshetty has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
anarang has quit [Quit: Leaving]
zorak8 has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: zzz]
tlarevo has joined #ruby
DaniG2k has quit [Quit: leaving]
sk87 has joined #ruby
aaronrl has joined #ruby
psy_ has quit [Remote host closed the connection]
<shevy> pontiki hmm in the short term I guess so, but in the long run I think I need to transform the dumped html into my autogenerator
<shevy> where <div style="color:blue; border: 1px solid green">hey there</div>" would become something like div('blue 1px_solid_green') { 'hey there' } ... or something like that
Hightower666 has joined #ruby
<shevy> I need to clear my mind first, it's not clear yet what I really need or want
danjordan has quit [Quit: danjordan]
triple_b has joined #ruby
danjordan has joined #ruby
gr33n7007h has quit [Quit: Leaving]
jenrzzz has joined #ruby
klaut has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
<shevy> hey Timgauthier what's up
<Timgauthier> hey hey
<Timgauthier> back in germany, passed my basic german test, playing vidjeo games and pretending to know what the hell i'm doing
michael_mbp has joined #ruby
<Timgauthier> you?
triple_b has quit [Ping timeout: 264 seconds]
<Timgauthier> dropshare stopped working :()
<shevy> wheee
<shevy> now I can talk to you in bavarian slang!
<Timgauthier> ew
<Timgauthier> :P
ndrei__ has joined #ruby
<Timgauthier> no, saschen bitte
<shevy> no please
<Timgauthier> besides, its only A1
jenrzzz has quit [Ping timeout: 256 seconds]
<shevy> bavarian german is the only german dialect we from austria can accept to hear
<shevy> and sächsisch is the most horrible of them all
<Timgauthier> haha
<Timgauthier> why is my dropshare broken :(
<shevy> I only know dropbox
TPBallbag has quit [Remote host closed the connection]
<shevy> are you still using ruby?
<Timgauthier> i need to reinstall the actual release of yosemite, my safari dies after sleeping
<Timgauthier> no, .erb
<shevy> or have you abandoned towards pph
<Timgauthier> ;)
<shevy> php
flak has joined #ruby
<shevy> you need to come to linux!
flak is now known as Guest18765
<Timgauthier> my current projects are in. middleman (2x) kirby (php), and craftcms (php but you don't write php at all)
<shevy> then you can randomly break shit and try to figure out how to rescue this crap
<Timgauthier> naw
<Timgauthier> i enjoy it enough on mac
<shevy> hehe
<shevy> one day I shall learn rails...
<Timgauthier> yeah?
<Timgauthier> why would you do that to yourself
<Timgauthier> i need to restart my shitty computer :(I
ndrei has quit [Ping timeout: 260 seconds]
zorak8 has joined #ruby
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
ndrei_ has quit [Ping timeout: 260 seconds]
dkphenom has joined #ruby
vyorkin has quit [Ping timeout: 265 seconds]
tesuji has quit [Ping timeout: 265 seconds]
Timgauthier has joined #ruby
rippa has quit [Ping timeout: 244 seconds]
larsam has quit []
AkashicLegend has quit [Ping timeout: 244 seconds]
TPBallbag has joined #ruby
<Timgauthier> okay, that was fast, but doesn't seem to have really solved the problem
<shevy> Timgauthier dunno... so that I understand the rails world mostly
gr33n7007h has joined #ruby
<shevy> because I don't even really understand why we need rack
AkashicLegend has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
Guest18765 has quit [Ping timeout: 272 seconds]
psy_ has joined #ruby
manzo has joined #ruby
niKeITA has joined #ruby
jxf has quit [Remote host closed the connection]
adriancb has joined #ruby
RitterJack has joined #ruby
timonv^ has joined #ruby
agjacome_ has joined #ruby
workmad3 has joined #ruby
sevenseacat has joined #ruby
superSadFace has joined #ruby
timonv__ has joined #ruby
<Timgauthier> its just a webserver to make dev easier
ndrei__ has quit [Ping timeout: 240 seconds]
timonv_ has quit [Ping timeout: 250 seconds]
<Timgauthier> you don't have to host on rack in the live world.. or maybe you do.. i dunno, ruby is hard
axl_ has joined #ruby
agjacome has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
<visof> hi
vyorkin has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby
<visof> how can i remove all chars \n \ANYTHING from a string?
<visof> so i can remove all special chars which start with \ ?
<gr33n7007h> visof, .strip
blackjid_ has joined #ruby
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Takle has joined #ruby
drPoggs has joined #ruby
arup_r has quit [Remote host closed the connection]
DjDeaf has quit [Remote host closed the connection]
rshetty has quit [Read error: No route to host]
livingstn has joined #ruby
rshetty has joined #ruby
sigurding has quit [Quit: sigurding]
matrixise has joined #ruby
twistedpixels has quit [Ping timeout: 244 seconds]
beef-wellington has joined #ruby
droidburgundy has joined #ruby
zumbi has joined #ruby
twistedpixels has joined #ruby
rshetty has quit [Ping timeout: 258 seconds]
elcheckito has joined #ruby
Alina-malina has joined #ruby
ptrrr has quit [Quit: ptrrr]
arup_r_ has joined #ruby
tlarevo_ has joined #ruby
dawkirst has joined #ruby
Kricir has joined #ruby
tlarevo_ has quit [Read error: Connection reset by peer]
vyorkin has joined #ruby
tlarevo_ has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
byprdct has joined #ruby
tlarevo has quit [Ping timeout: 244 seconds]
beef-wellington has quit [Ping timeout: 244 seconds]
mleone has joined #ruby
<gregf__> >> class String; def trans; return %w{\n \r \b \\}.include?(self) ? self.gsub(/\\(.)/, %q{\1}) : self;end;end ; puts %q{\n \\ \r \ANYTHING}.gsub!(/\\(.)/,&:trans)
<eval-in__> gregf__ => n \ r \ANYTHING ... (https://eval.in/217335)
elcheckito has quit [Quit: WeeChat 0.3.8]
<gregf__> visof ^^
unshadow has joined #ruby
reinaldob has quit [Remote host closed the connection]
jxf has joined #ruby
Takle has quit [Remote host closed the connection]
elcheckito has joined #ruby
User458764 has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
jottr has joined #ruby
sk87 has joined #ruby
oo_ has joined #ruby
<unshadow> Is there a way to replace multiple items in a string ? like this: a = "cat dog snake fish" now replace cat and snake to "tree" so a is now "tree dog tree fish", I know you can do those one by one with: a.gsub("cat","tree").gsub("snake
arup_r_ has quit [Remote host closed the connection]
<unshadow> ","tree")
DjDeaf has joined #ruby
tier has joined #ruby
<gregf__> prolly /(cat|dog)/, "tree"
<gregf__> >> "cat dog snake fish".gsub!(/(cat|dog)/, "tree" )
tier has quit [Remote host closed the connection]
<eval-in__> gregf__ => "tree tree snake fish" (https://eval.in/217337)
<unshadow> ohhhh cool
<unshadow> thanks !
<gregf__> heh
tier has joined #ruby
<Timgauthier> shevy lol http://dsh.re/4d361 what do you think of the text so far? :P
sigurding has joined #ruby
Kricir has quit [Remote host closed the connection]
jonr22 has joined #ruby
moritzs has joined #ruby
User458764 has joined #ruby
it0a has joined #ruby
ClarusCogitatio has quit [Ping timeout: 264 seconds]
<zumbi> which is good place to ask about assets (ruby rails)?
Musashi007 has joined #ruby
tier_ has joined #ruby
<shevy> Timgauthier lol armed rebels?
<shevy> is this like Rambo I
Takle has joined #ruby
<Timgauthier> haha
fmcgeough has joined #ruby
<Timgauthier> what else do you call a group in kenya that has attacked MSF convoys in a conflict zone?
tier_ has quit [Remote host closed the connection]
<hanmac1> zumbi: hm what do you mean with "assets" ?
tier has quit [Read error: Connection reset by peer]
<shevy> Timgauthier dunno. depending on the press, freedom fighters or terrorists
akamel has joined #ruby
ClarusCogitatio has joined #ruby
tier has joined #ruby
bmurt has joined #ruby
vyorkin has quit [Ping timeout: 256 seconds]
<Timgauthier> well this is written by the Private security company that killed them...
<hanmac1> zumbi: #rubyonrails
<zumbi> thanks
jonr22 has quit [Ping timeout: 245 seconds]
aspiers has quit [Ping timeout: 240 seconds]
manzo has quit [Remote host closed the connection]
visof has quit [Quit: Lost terminal]
elcheckito has quit [Quit: WeeChat 0.3.8]
zwer has joined #ruby
zwer has left #ruby [#ruby]
zwer has joined #ruby
agjacome has joined #ruby
linojon has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
viet_power has joined #ruby
bmurt has quit []
bmurt has joined #ruby
agjacome_ has quit [Ping timeout: 245 seconds]
Musashi007 has quit [Quit: Musashi007]
rkalfane has joined #ruby
jerius has joined #ruby
Takle has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ruber has joined #ruby
adriancb has joined #ruby
elcheckito has joined #ruby
porfa has quit [Quit: porfa]
Hightower666 has quit [Ping timeout: 244 seconds]
<ruber> What is the generally accepted (Ruby) solution for dynamic URL shortening, ie. where the query string is unique when the URL is mailed?
mityaz has quit [Quit: Leaving]
mengu has joined #ruby
<ruber> Preferably free :)
mostlybadfly has quit [Quit: Connection closed for inactivity]
porfa has joined #ruby
mkaesz has quit [Remote host closed the connection]
elcheckito has quit [Client Quit]
elcheckito has joined #ruby
elcheckito has quit [Client Quit]
axl_ has joined #ruby
tlarevo has joined #ruby
Abhijit has quit [Quit: Leaving]
Kricir has joined #ruby
jimbach has joined #ruby
nateberkopec has joined #ruby
Takle has joined #ruby
kobain has joined #ruby
shortCircuit__ has quit [Remote host closed the connection]
bmurt has quit [Max SendQ exceeded]
<hanmac1> ruber: hm i dont know ... its a long time ago since i have seen URL shorter ...
ARCADIVS has quit [Ping timeout: 250 seconds]
bmurt has joined #ruby
IceDragon has joined #ruby
Eduard_Munteanu has joined #ruby
<Eduard_Munteanu> Hi. What does 'bundle' use plain http for? I'm blocking it and it breaks.
tlarevo_ has quit [Ping timeout: 244 seconds]
<ruber> hanmac1: May not even be possible. Bit.ly etc. seem to require preconfigured URLs.
davidhq has joined #ruby
Virtualize|away has quit [Read error: Connection reset by peer]
josephndenton has joined #ruby
Virtualize|away has joined #ruby
mdarby_ has joined #ruby
<hanmac1> Eduard_Munteanu: i think you might have a problem with the gem source or something?
<Eduard_Munteanu> Hm, could be, it's generated by wagn.
axl_ has quit [Ping timeout: 264 seconds]
<Eduard_Munteanu> Ah, yes... source 'http://rubygems.org'
<hanmac1> Eduard_Munteanu: can you make a gist of the Gemfile or a link to the prossible repository?
Timgauthier is now known as timgauthier_away
wallerdev has joined #ruby
croOoOoak has joined #ruby
<hanmac1> Eduard_Munteanu: that source is blocked now because of security issues ... so it should generate https sources now or your script or what ever need to be updated
<hanmac1> apeiros: croOoOoak spambot
<Eduard_Munteanu> Right, thanks.
niKeITA has joined #ruby
<Eduard_Munteanu> Congrats to Rubyists for implementing verified downloads, by the way.
<Eduard_Munteanu> So much other stuff doesn't. :(
cpruitt has joined #ruby
sigurding has quit [Quit: sigurding]
josephndenton has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
reinaldob has joined #ruby
rippa has joined #ruby
Kricir has quit [Remote host closed the connection]
jenrzzz has joined #ruby
wallerdev has quit [Ping timeout: 245 seconds]
freezey has joined #ruby
timonv__ has quit [Remote host closed the connection]
Channel6 has joined #ruby
gr33n7007h has quit [Ping timeout: 264 seconds]
davedev24_ has joined #ruby
zartoosh has quit [Remote host closed the connection]
<hanmac1> hm i need to check if my gems are signed/verified too ... hm as far as i knew i think they are not ... (or are they?)
sailias has joined #ruby
red_horned_rihno has joined #ruby
msmith_ has joined #ruby
phutchins has joined #ruby
<Eduard_Munteanu> hanmac1, bundle/gem seems to download over https only
haroldwu has quit [Ping timeout: 250 seconds]
Wolland has joined #ruby
klaut has quit [Remote host closed the connection]
beef-wellington has joined #ruby
<Eduard_Munteanu> I just got spammed by croOoOoak.
ruber has quit [Quit: BitchX: the ONLY three day cure!]
gizmore has joined #ruby
haroldwu has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
freezey has quit [Ping timeout: 245 seconds]
Akuma has quit [Quit: So long sukkas!]
freezey has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvw has quit [Remote host closed the connection]
Wolland has quit [Ping timeout: 240 seconds]
adac has quit [Quit: Leaving]
rostam has joined #ruby
Virtualize|away has quit [Read error: Connection reset by peer]
virt|work has joined #ruby
rshetty has joined #ruby
mdarby_ is now known as mdarby
fsapo has quit [Ping timeout: 250 seconds]
<hanmac1> Eduard_Munteanu: i already ping apeiros he might be able to kick it
<hanmac1> banister: hm doesnt you have OP rights in this channel there too?
oleo has joined #ruby
banister is now known as banisterfiend
vyorkin has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
alem0lars|away is now known as alem0lars
ta has quit [Read error: Connection reset by peer]
croOoOoak was banned on #ruby by banisterfiend [*!~roak@84.78.23.203]
croOoOoak was kicked from #ruby by banisterfiend [Your behavior is not conducive to the desired environment.]
mary5030 has joined #ruby
<cpruitt> I’m drawing a blank on the right search term to use for search. Am I misremembering or is there a feature in ruby where text “data” can be included at the end of a ruby file after the end of the executable code?
devdazed has joined #ruby
klaut has joined #ruby
dh64 has joined #ruby
moritzs has quit [Ping timeout: 244 seconds]
<cpruitt> banisterfiend: That’s the one. Thanks. :-)
rshetty has quit [Ping timeout: 264 seconds]
gr33n7007h has joined #ruby
timonv_ has joined #ruby
<Nilium> Huh, I did not know you could do that, and I've been using Ruby long enough that I feel like I should've O_o
rismoney1 has quit [Ping timeout: 264 seconds]
moritzs has joined #ruby
mattstratton has joined #ruby
Darryl_ has joined #ruby
drawingthesun has quit [Ping timeout: 272 seconds]
zz_jrhorn424 is now known as jrhorn424
klaut has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
Jon30 has quit []
banister has joined #ruby
snath has quit [Ping timeout: 245 seconds]
banister has quit [Max SendQ exceeded]
viet_power has quit [Ping timeout: 250 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mikepack has joined #ruby
banister has joined #ruby
last_staff has quit [Quit: last_staff]
banister has quit [Max SendQ exceeded]
mikepack has quit [Remote host closed the connection]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
Akuma has joined #ruby
julian37 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
jrhorn424 is now known as zz_jrhorn424
<julian37> hi, I have this problem where ruby(2.1.3)+rspec+capybara+poltergeist sometimes just exits silently -- exit code 0, nothing in the logs, nothing on STDOUT. google comes up empty. how could I go about diagnosing this?
banister has joined #ruby
<julian37> is there a flag to make ruby be verbose about which signals it receives?
banister has quit [Max SendQ exceeded]
banister has joined #ruby
jzinedine has joined #ruby
banister has quit [Max SendQ exceeded]
IceDragon has quit [Quit: Space~~~]
IcyDragon has joined #ruby
nucatus has joined #ruby
IcyDragon is now known as IceDragon
<hanmac1> apeiros: banister is having MaxSendQ problems again ... ;P
banister has joined #ruby
banister has quit [Max SendQ exceeded]
zorak8 has quit [Ping timeout: 245 seconds]
banister has joined #ruby
zz_jrhorn424 is now known as jrhorn424
kaspertidemann has joined #ruby
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
freezey has quit [Remote host closed the connection]
nrsk has joined #ruby
enebo has joined #ruby
rodfersou has joined #ruby
TPBallbag has joined #ruby
az7ar_away is now known as az7ar
nateberkopec has quit [Quit: Leaving...]
_1_Dog has joined #ruby
tlarevo has quit [Remote host closed the connection]
oleo is now known as Guest35719
oleo__ has joined #ruby
sevenseacat has quit [Quit: Leaving.]
mleone has quit [Ping timeout: 245 seconds]
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
Guest35719 has quit [Ping timeout: 244 seconds]
Kricir has joined #ruby
Takle has quit [Remote host closed the connection]
<hanmac1> welcome back banister ;P
<banister> thx
<hanmac1> i see you did had "MaxSendQ" problems again
Akuma has quit [Quit: So long sukkas!]
jaequery has joined #ruby
mkaesz has joined #ruby
timgauthier_away is now known as Timgauthier
Hijiri has quit [Quit: WeeChat 1.0.1]
Akuma has joined #ruby
bluenemo has joined #ruby
allcentury has joined #ruby
danjordan has quit [Quit: danjordan]
paulfm has quit [Ping timeout: 265 seconds]
_1_Dog has quit [Quit: WhatsChat IRC Android APP]
paulfm has joined #ruby
rshetty has joined #ruby
freezey has joined #ruby
shredding has quit [Quit: shredding]
mengu has quit []
mikepack has joined #ruby
louism2wash has joined #ruby
tagrudev has quit [Remote host closed the connection]
ta has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
BlackGear has quit [Ping timeout: 250 seconds]
Akuma has quit [Quit: So long sukkas!]
tercenya has quit []
luckyruby has joined #ruby
ypasmk has joined #ruby
Zackio has quit [Quit: ZNC - http://znc.in]
<shevy> "Edition 1.14, for bash Version 1.14. August 1994"
<ypasmk> hey guys stupid question … can anyone tell me why this is not working http://pastebin.com/UcvtLcpJ
<shevy> how cool must bash have been in 1994
paulfm has quit []
Takle has joined #ruby
<shevy> ypasmk well
<shevy> where is the second "
jonathan_alban has joined #ruby
<shevy> also, (buffer == @lines) is true
<ypasmk> well it’s missing from the script .. but even if it seems that I’m going inside the loop
niKeITA has quit [Quit: ZZZzzz…]
<shevy> what loop
<shevy> on the snippet you show there is no loop
<ypasmk> no my problem is exactly that … it’s going in the loop
<shevy> what loop!
<ypasmk> sorry in the if statement
<shevy> ok you have this there:
<shevy> if variable and not true
<shevy> but it is true
fandi has joined #ruby
jherbst has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> so I would reckon that it can not enter the if condition
hamakn has quit [Remote host closed the connection]
josephndenton has joined #ruby
hamakn has joined #ruby
<shevy> what happens if you omit the "not" part?
Macaveli has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
lkba has quit [Ping timeout: 244 seconds]
TPBallbag has quit [Remote host closed the connection]
jobewan has joined #ruby
<Timgauthier> IF WUH
<shevy> lol
louism2wash has quit [Quit: This computer has gone to sleep]
hamakn has quit [Ping timeout: 245 seconds]
<shevy> Timgauthier did you use a language with upcased IFs before?
jhwhite has joined #ruby
<Timgauthier> nope
<Timgauthier> i just like my capslock cruise control to cool
josephndenton has quit [Ping timeout: 250 seconds]
tercenya has joined #ruby
klaut has joined #ruby
wallerdev has quit [Ping timeout: 264 seconds]
bigmac has joined #ruby
ursooperduper has joined #ruby
lkba has joined #ruby
louism2wash has joined #ruby
ndrei has joined #ruby
ssyrain_ has joined #ruby
paulfm has joined #ruby
max96at|off is now known as max96at
freerobby has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
niKeITA has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
francisfish has quit [Remote host closed the connection]
rylev has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
larsam has joined #ruby
IrishGringo has joined #ruby
unshadow has quit [Quit: leaving]
virt|work has quit [Quit: Leaving...]
<shevy> hehe
rylev has quit [Read error: Connection reset by peer]
louism2wash has quit [Quit: This computer has gone to sleep]
jshultz has joined #ruby
TPBallbag has joined #ruby
<shevy> Timgauthier ohhh there was this gunnut in canada lately
<shevy> but I guess you were safe and sound in germany!
<Timgauthier> ja
<Timgauthier> sad though :(
rylev has joined #ruby
sk87 has joined #ruby
TinkerTyper has quit [Quit: ZNC restarting...]
<DjDeaf> Any good resource for learning blocks and yields on ruby? It seems I can't get to digest this concept
renderful has joined #ruby
snath has joined #ruby
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
Akuma has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
az7ar is now known as az7ar_away
Guest81482 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
az7ar_away is now known as az7ar
jimmyhoughjr has joined #ruby
rshetty has quit [Remote host closed the connection]
davidhq has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
exgf has joined #ruby
noop has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
hanmac1 has quit [Quit: Leaving.]
grepwood has quit [Quit: Leaving]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ypasmk has quit [Quit: ypasmk]
arup_r has joined #ruby
jonr22 has quit [Ping timeout: 258 seconds]
Dude007 has quit []
MrDoctor has joined #ruby
jrhorn424 is now known as zz_jrhorn424
jzinedine has quit [Ping timeout: 272 seconds]
oleo__ has quit [Quit: Verlassend]
viet_power has joined #ruby
DjDeaf has quit [Remote host closed the connection]
larsam has quit [Ping timeout: 250 seconds]
sambao21 has joined #ruby
sdk has quit [Quit: Leaving]
sdk has joined #ruby
oleo has joined #ruby
Timgauthier is now known as timgauthier_away
sdk has quit [Client Quit]
sdk has joined #ruby
sdk is now known as sidik
sidik is now known as reek
mdarby has joined #ruby
mikepack has quit [Remote host closed the connection]
mdarby has quit [Max SendQ exceeded]
mdarby has joined #ruby
rdark has quit [Read error: Connection reset by peer]
bal has quit [Quit: bal]
rdark has joined #ruby
timonv_ has quit [Ping timeout: 244 seconds]
Sou|cutter has quit [Quit: reboot]
timgauthier_away is now known as Timgauthier
mikepack has joined #ruby
fsapo has joined #ruby
diegoviola has joined #ruby
shredding has joined #ruby
louism2wash has joined #ruby
Jarboe has joined #ruby
axl_ has joined #ruby
Hightower666 has joined #ruby
timonv_ has joined #ruby
Neozonz has joined #ruby
emmesswhy has joined #ruby
perrier has quit [Read error: Connection reset by peer]
emmesswhy has quit [Client Quit]
shredding has quit [Client Quit]
dkb20k has quit [Remote host closed the connection]
CustosLimen has quit [Ping timeout: 244 seconds]
axl_ has quit [Ping timeout: 240 seconds]
rfi_ has quit [Ping timeout: 245 seconds]
<akamel> does anyone have an example set of code that uses mechanize to log into a url and from there download a xls or any file type?
fabrice31 has quit [Read error: No route to host]
rfi has joined #ruby
fabrice31 has joined #ruby
ramfjord has joined #ruby
<shevy> I think I am drunk
User458764 has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
<tercenya> shevy: go go balmer curve?
<pontiki> balmer peak
<tercenya> some hope that it has a long tail....
klaut has quit [Remote host closed the connection]
himsin has quit [Quit: himsin]
tvw has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rshetty has joined #ruby
Takle has quit [Remote host closed the connection]
<jonathan_alban> DjDeaf I found the Pragmatic Programmers guide explained it very well. Also the Poignant Guide to Ruby has some really good ways of explaining things. I've had a number of AHA moments reading it
fabrice31 has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
spyderman4g63 has joined #ruby
larsam has joined #ruby
troulouliou_dev has quit [Client Quit]
<akamel> pontiki: thank you!
troulouliou_dev has joined #ruby
atomical has joined #ruby
j_mcnally has joined #ruby
ssyrain_ has quit [Remote host closed the connection]
<shevy> is it only me or has the buzzword count increased on the www?
geggam has joined #ruby
<shevy> I mean read a blog like https://blog.mozilla.org/
<shevy> or at https://www.kde.org/ "Experience Freedom!"
<shevy> am I oversensitive?
az7ar is now known as az7ar_away
spyderman4g63 has quit [Ping timeout: 255 seconds]
Takle has joined #ruby
jaequery has joined #ruby
<gizmore> shevy: you are counterproductive *buzzzz*
chipotle has joined #ruby
treehug88 has joined #ruby
<shevy> lol
rfi has quit [Ping timeout: 250 seconds]
<shevy> I have a hard time getting to the real objective view, as in describing functionality or features when things are loudly praised
gr33n7007h has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
Akuma has quit [Ping timeout: 255 seconds]
rfi has joined #ruby
<txdv> next thing you know KDE FREEDOM will get delivered via bombs at a location you choose for for just an additional 50k dollars
wallerdev has joined #ruby
renderful has quit [Remote host closed the connection]
<shevy> well it's a slogan but what does it mean
az7ar_away is now known as az7ar
<shevy> freedom compared to what
<shevy> either a feature or functionality is there or it is not
dawkirst has quit [Remote host closed the connection]
<txdv> usually they mean that it is open source
jimmyhoughjr has joined #ruby
<shevy> ok but so is gnome xfce fluxbox wxwidgets
sigurding has quit [Quit: sigurding]
Akuma has joined #ruby
<txdv> now let the inner troll out of you, register on their forums and teach them how shitty their blog is
az7ar is now known as az7ar_away
jaequery has quit [Ping timeout: 256 seconds]
renderful has joined #ruby
<txdv> "At least provide a footnote with specific points what your FREEDOM means and how it is better than the other toolkits FREEDOM"
DLSteve has joined #ruby
Takle has quit [Remote host closed the connection]
<pontiki> with a side of tactical bacon
<txdv> "fucking noobs, have you ever been to the internet?"
<txdv> we cereal biznez here
<DLSteve> yes
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
otherj has joined #ruby
<txdv> >>> "shevy " * 1000
<eval-in__> txdv => /tmp/execpad-9404dec23ac4/source-9404dec23ac4:2: syntax error, unexpected '>' ... (https://eval.in/217395)
ta has quit [Read error: Connection reset by peer]
wallerdev has quit [Ping timeout: 256 seconds]
<txdv> >> "shevy " * 1000
<eval-in__> txdv => "shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy sh ... (https://eval.in/217396)
<txdv> go tell duschendestroyer and co, they will probably help you
jaequery has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Virtualize|away has joined #ruby
User458764 has joined #ruby
skolman_ has joined #ruby
moritzs has quit [Ping timeout: 244 seconds]
zz_jrhorn424 is now known as jrhorn424
Ankhers has joined #ruby
skolman_ has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
thegmanehack has joined #ruby
workmad3 has quit [Ping timeout: 258 seconds]
skolman has joined #ruby
skolman has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
skolman_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
<thegmanehack> open question, has any taken the "ruby programmer silver" certification? I realize most thing the certification is a joke, but I am required to take it. Was wondering if anyone had any suggested study material.
Virtualize|away has quit [Read error: Connection reset by peer]
red_horned_rihno has quit [Quit: Leaving]
louism2wash has quit [Quit: This computer has gone to sleep]
rfi has quit [Ping timeout: 255 seconds]
Wolland has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
rfi has joined #ruby
louism2wash has joined #ruby
siwica has joined #ruby
hmsimha_ has quit [Ping timeout: 255 seconds]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Client Quit]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
supermanBlack has joined #ruby
supermanBlack is now known as shortCircuit__
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Client Quit]
aganov has quit [Quit: Leaving]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
Phonetiki has joined #ruby
thegmanehack has left #ruby [#ruby]
<Phonetiki> hey
otherj has quit [Quit: .]
kaspertidemann has quit []
Wolland has quit [Ping timeout: 240 seconds]
thegmanehack has joined #ruby
tier_ has joined #ruby
CustosLimen has joined #ruby
_maes_ has joined #ruby
klaut has joined #ruby
byprdct_ has joined #ruby
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
otherj has joined #ruby
byprdct has quit [Ping timeout: 265 seconds]
preller has quit [Ping timeout: 245 seconds]
otherj has quit [Client Quit]
tier has quit [Ping timeout: 244 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has joined #ruby
iamjarvo has joined #ruby
balazs has joined #ruby
SouL_ has joined #ruby
tier_ has quit [Remote host closed the connection]
mdarby has joined #ruby
jaequery has joined #ruby
otherj has joined #ruby
tier has joined #ruby
jherbst has quit [Quit: Textual IRC Client: www.textualapp.com]
Hijiri has joined #ruby
jherbst has joined #ruby
preller has joined #ruby
tier has quit [Read error: Connection reset by peer]
tier has joined #ruby
Areessell_ has joined #ruby
renderful has quit [Remote host closed the connection]
<siwica> I have an object foo1 containing a list of objects foo2 each containing a list of objects type foo3, each object foo3 has a value foo3.x. Whats the best method of finding the lowest value of x in foo1?
ixti has quit [Ping timeout: 265 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
niKeITA has quit [Quit: ZZZzzz…]
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
chudler has left #ruby ["ISON kauffman@irc.cs.uchicago.edu NickServ"]
gsd has joined #ruby
Timgauthier is now known as timgauthier_away
Ankhers has quit [Remote host closed the connection]
<eam> siwica: if I'm understanding you correctly, you want to flatten your nested arrays. You can use #flatten for this
<eam> and to find the lowest value: #min_by
niKeITA has joined #ruby
moritzs has joined #ruby
ta has joined #ruby
ypasmk has joined #ruby
jrhorn424 is now known as zz_jrhorn424
vyorkin has quit [Quit: WeeChat 1.0.1]
Ankhers has joined #ruby
otherj has quit [Quit: .]
Phonetiki has quit [Quit: Disconnected]
livathinos has quit []
TomyWork has quit [Ping timeout: 250 seconds]
terlar has quit [Ping timeout: 272 seconds]
himsin has joined #ruby
rylev_ has joined #ruby
mpajor has quit [Ping timeout: 272 seconds]
julian37 has quit [Ping timeout: 240 seconds]
rylev has quit [Ping timeout: 265 seconds]
rylev has joined #ruby
sk87 has joined #ruby
doev has quit [Quit: Verlassend]
bruno- has joined #ruby
bruno- has quit [Client Quit]
larissa has joined #ruby
SouL_ has quit [Ping timeout: 260 seconds]
Soda has quit [Quit: Soda]
devdazed has quit [Read error: Connection reset by peer]
devdazed_ has joined #ruby
sk87 has quit [Client Quit]
tlarevo has joined #ruby
mpajor has joined #ruby
spyderman4g63 has joined #ruby
klaut has quit [Remote host closed the connection]
rylev_ has quit [Ping timeout: 272 seconds]
ypasmk has quit [Quit: ypasmk]
Pupeno has joined #ruby
Pupeno has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gregf__> siwica: what eam said. something like : foo1.foo2.arroffoo3.min_by{ |obj| obj.x } ?
<siwica> I am looking for something for an arbitrary nestting depth
dkb20k has joined #ruby
triple_b has joined #ruby
josephndenton has joined #ruby
mikecmpb_ is now known as mikecmpbll
<siwica> eam: its not a matter of flattening an array, foo1, foo2, ... are objects and have other variables, too
Xeago has joined #ruby
troyready has joined #ruby
kamil has joined #ruby
djbkd has joined #ruby
TPBallbag has quit [Remote host closed the connection]
bricker has joined #ruby
djbkd_ has quit [Ping timeout: 265 seconds]
thagomizer has joined #ruby
josephndenton has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mattmcclure has joined #ruby
nichtdiebohne has joined #ruby
timonv_ has quit [Remote host closed the connection]
sk87 has joined #ruby
devdazed_ has quit [Remote host closed the connection]
dkb20k has quit [Ping timeout: 244 seconds]
devdazed has joined #ruby
sk87 has quit [Client Quit]
Eduard_Munteanu has quit [Ping timeout: 272 seconds]
rylev has quit [Remote host closed the connection]
kaspergr_ has quit [Remote host closed the connection]
Hijiri has quit [Quit: WeeChat 1.0.1]
HolyWinner has quit [Quit: Nettalk6 - www.ntalk.de]
ndrei has quit [Ping timeout: 258 seconds]
einarj_ has joined #ruby
kaspertidemann has joined #ruby
qba73 has quit []
rshetty has quit [Remote host closed the connection]
TPBallbag has joined #ruby
rylev has joined #ruby
einarj has quit [Ping timeout: 255 seconds]
<jhass> siwica: maybe you want the composite pattern?
shortCircuit__ has quit [Ping timeout: 258 seconds]
wallerdev has joined #ruby
TPBallbag has quit [Remote host closed the connection]
Wolland has joined #ruby
jottr_ has joined #ruby
renderful has joined #ruby
speakingcode has quit [Ping timeout: 265 seconds]
<siwica> jhass: maybe, what is that?
<jhass> wikipedia it
jottr has quit [Ping timeout: 265 seconds]
TinkerTyper has joined #ruby
jjasonclark has joined #ruby
Takle has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 260 seconds]
kwd has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
happyface_ is now known as happyface
<siwica> jhass: ok, but my datastructure is fix, and cant be changed
<jhass> why?
shortCircuit__ has joined #ruby
<siwica> jhass: time issues
<siwica> :)
<jhass> so you waste time finding an ugly workaround instead
<siwica> In that particular case, yes
wallerdev has quit [Ping timeout: 264 seconds]
<jhass> hf
<siwica> I have to make a whole project work till tuesday next week
<pontiki> then it can break?
<eam> siwica: if you have weird constraints you should share code to illustrate them
timgauthier_away is now known as Timgauthier
<eam> otherwise we end up playing 20 questions
Timgauthier is now known as timgauthier_away
dANO_ has quit []
<pontiki> or just not responding after a while
jottr_ has quit [Ping timeout: 265 seconds]
Xeago has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
pietr0 has joined #ruby
ghostmoth has joined #ruby
olivier_bK has quit [Ping timeout: 250 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
Hobogrammer has joined #ruby
jonr22 has joined #ruby
speakingcode has joined #ruby
rylev has quit [Remote host closed the connection]
einarj_ has quit [Remote host closed the connection]
alex88 has quit []
<gregf__> siwica: if this helps(its horrible tho): https://gist.github.com/anonymous/e71705bbeac70dcdd0f6
Xeago has quit [Remote host closed the connection]
rkalfane has joined #ruby
jottr_ has joined #ruby
chipotle_ has joined #ruby
moritzs has quit [Ping timeout: 260 seconds]
rshetty has joined #ruby
KC9YDN has quit [Ping timeout: 245 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
jonr22 has quit [Ping timeout: 264 seconds]
timgauthier_away is now known as Timgauthier
Wolland has quit [Remote host closed the connection]
KC9YDN has joined #ruby
hornairs has joined #ruby
Timgauthier is now known as timgauthier_away
freezey has quit [Remote host closed the connection]
Wolland has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Remote host closed the connection]
drPoggs has quit [Ping timeout: 256 seconds]
KC9YDN-2 has joined #ruby
drPoggs has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
rshetty has quit [Ping timeout: 255 seconds]
beneggett has joined #ruby
last_staff has joined #ruby
timonv_ has joined #ruby
KC9YDN has quit [Ping timeout: 245 seconds]
Wolland has quit [Ping timeout: 250 seconds]
shortCircuit__ is now known as ohNoo
lkba has joined #ruby
b1nd has quit [Ping timeout: 264 seconds]
altamic has joined #ruby
altamic has joined #ruby
b1nd has joined #ruby
<siwica> ok in my specific case I have A Class "Geometry", a Geometry has an attribute mesh_parts (array of elements each being of class "Mesh"), each mesh has an attribute mesh_polygons (array of elements each being of class "Polygon"), each polygon has an attribute points (array of elements each being of class "Point", each Point has the attributes x,y,z.
<siwica> I want to find the lowest z.coordinate of a geometry
chrisja has joined #ruby
<siwica> *z-coordinate
shredding has joined #ruby
rodfersou has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
<siwica> jhass: with composite pattern I could use a simple recursion?
moritzs has joined #ruby
<jhass> you would implement a min_z_coordinate in each class
linojon has quit [Quit: linojon]
<jhass> Point simply returns z
lsmola has quit [Ping timeout: 264 seconds]
axl_ has joined #ruby
Areessell_ has quit [Quit: (null)]
<jhass> Polygon does points.min_by(&:min_z_coordinate)
<jhass> or .map.min if you want just the value
pyon has quit [Ping timeout: 265 seconds]
<jhass> Mesh would do polygons.min_by(&:min_z_coordinate)
<jhass> and so on
<jhass> then you simply can call it
<niKeITA> how to check if a webpage contain a youtube video? (and scrape the url)
<eam> siwica: do you want the z coordinate or do you want the Geometry which contains the least z coordinate?
<jhass> and if you add other layers or types later, you at most need to implement an additional method and maybe change one
<siwica> eam: I want the z-coordinate
<siwica> jhass: ok, that sounds reasonable
<siwica> how would you implement that in ruby?
<jhass> just do it
<siwica> ^^
<siwica> just additional methods for each class?
jerematic has quit [Remote host closed the connection]
<siwica> or would you abstract it away somehow?
Spami has quit [Quit: This computer has gone to sleep]
<jhass> no, just methods
<jhass> we don't need an inheritance chain for this pattern in ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<siwica> ok, thats easy
<siwica> it makes sense
axl_ has quit [Ping timeout: 256 seconds]
<siwica> sorry for being stubborn at the beginning
linojon has joined #ruby
ohNoo has quit [Ping timeout: 264 seconds]
<siwica> thank you
<jhass> you're welcome
ramfjord has quit [Ping timeout: 244 seconds]
RitterJack has quit [Remote host closed the connection]
aewffwea has quit [Ping timeout: 256 seconds]
ohNoo has joined #ruby
mityaz has joined #ruby
ohNoo is now known as shortCircuit__
<siwica> jhass: I my case I need min and max for each of the three coordinates, would you have 6 methods in this case or abstract it into one?
<jhass> depends, do you always need both?
<jhass> for all coords?
<siwica> jhass: no
Wolland has joined #ruby
<siwica> jhass: mostly just either one of these
i_s has joined #ruby
<jhass> mmh, I'd probably extract into a helper to generate them
<jhass> let me play around a bit
<siwica> jhass: actually I am asking this for ruby without rails
<jhass> didn't had any rails impressions :)
<siwica> :P
rshetty has joined #ruby
tier has quit [Read error: Connection reset by peer]
<siwica> def extreme_coordinate(min_max, coordinate)
tier has joined #ruby
<siwica> passing symbols like extreme_coordinate(:min, :x)
<siwica> and raising ArgumentError if not :man/:min, :x/:y/:z is passed
<siwica> maybe?
oo_ has quit [Read error: Connection reset by peer]
<siwica> It probably doesnt matter, but I would be curious when you decide to abstract things in Ruby and when you decide to not do it
User458764 has quit [Ping timeout: 260 seconds]
sailias has quit [Quit: Leaving.]
therod has joined #ruby
oo__ has joined #ruby
sailias has joined #ruby
ramfjord has joined #ruby
rshetty has quit [Ping timeout: 250 seconds]
shortCircuit__ has quit [Ping timeout: 272 seconds]
Norrin has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
User458764 has joined #ruby
larissa has quit [Quit: Leaving]
triple_b has quit [Ping timeout: 245 seconds]
<jhass> siwica: I'd probably end up with something like http://paste.mrzyx.de/pqecp7jae (untested but shows the idea)
nevans has quit [Ping timeout: 264 seconds]
<jhass> er, -hardcoded min_by :P
niKeITA has quit [Quit: Textual]
govg has joined #ruby
shortCircuit__ has joined #ruby
bbloom_ has quit [Quit: Computer has gone to sleep.]
jottr_ has joined #ruby
wallerdev has joined #ruby
<siwica> jhass: ok, I think I need to ask you a couple questions for this
hmsimha_ has joined #ruby
doug1 has joined #ruby
bbloom has joined #ruby
<siwica> alias_method makes min_z and z equivalent?
<jhass> yeah
<jhass> note I always mess up the argument order there ;P
Norrin has joined #ruby
claw___ has quit [Remote host closed the connection]
danijoo has quit [Quit: Leaving...]
<jhass> but I think it's right this time
claw___ has joined #ruby
<siwica> I would need to define those for max_x, ... too I guess?
<jhass> yeah
danijoo has joined #ruby
<siwica> can I do this in one alias method?
Todd has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
otherj has joined #ruby
Musashi007 has joined #ruby
<jhass> no
<jhass> alias_method :"min_#{attribute}", attribute
<jhass> ;)
therod has quit [Quit: leaving]
timonv_ has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
Morkel has quit [Read error: Connection reset by peer]
jxf has quit [Ping timeout: 260 seconds]
dkphenom has joined #ruby
thegmanehack has left #ruby [#ruby]
<siwica> jhass: does that work?!
Morkel has joined #ruby
<jhass> sure
shortCircuit__ has quit [Ping timeout: 260 seconds]
viet_power has quit [Ping timeout: 255 seconds]
<siwica> jhass: so :"string" makes :string?
<jhass> yes
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<jhass> it's not a string, it's still a symbol literal
<jhass> similar like you can write a sting array as ["foo", "bar"] and %w(foo bar)
ndrei has joined #ruby
<jhass> *string
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
patrick99e99 has joined #ruby
rdark has quit [Quit: leaving]
bayed has quit [Quit: Connection closed for inactivity]
JimmyNeutron has joined #ruby
benzrf|offline is now known as benzrf
govg has quit [Ping timeout: 245 seconds]
DTSCode is now known as dTSCode
therod has joined #ruby
<siwica> jhass: I still dont get it
noop has joined #ruby
doug1 has quit [Quit: WeeChat 0.4.3]
TPBallbag has joined #ruby
ixti has joined #ruby
jenrzzz has joined #ruby
<siwica> jhass: what makes alias_method :"min_#{attribute}", attribute superior to alias_method :min_x, :x ?
<siwica> ok I get it now
<jhass> 4 lines instead of 6
<jhass> with no duplication
mikecmpbll has quit [Quit: i've nodded off.]
<siwica> thats some fine ruby here^^
<jhass> (you change one, you change all)
viet_power has joined #ruby
mikecmpbll has joined #ruby
altamic has quit [Quit: altamic]
cashnguns has joined #ruby
mikepack has joined #ruby
bbloom has quit [Quit: Textual IRC Client: www.textualapp.com]
nucatus has quit [Remote host closed the connection]
tier_ has joined #ruby
TPBallbag has quit [Ping timeout: 260 seconds]
therod has quit [Quit: leaving]
jenrzzz has quit [Read error: Connection reset by peer]
psyprus has quit [Ping timeout: 258 seconds]
i8igmac has quit [Ping timeout: 244 seconds]
michael_mbp has quit [Excess Flood]
jenrzzz has joined #ruby
michael_mbp has joined #ruby
therod has joined #ruby
therod has quit [Client Quit]
<siwica> jhass: would you also put attr_accessor attribute in this block?
Timgauthier has joined #ruby
<jhass> mmh, probably, though no strong opinion
therod has joined #ruby
therod is now known as rodehau
tier has quit [Ping timeout: 260 seconds]
tier_ has quit [Remote host closed the connection]
<jhass> it deduplicates the attribute list, which is nice I guess
bbloom has joined #ruby
tier has joined #ruby
rodehau has quit [Client Quit]
Morkel has quit [Quit: Morkel]
<siwica> just as offtopic: is there some shorter way of writing:
<siwica> def initialize(x,y,z) @x=x; @y=y; z=z end ?
<siwica> *@z
<siwica> this always bothers me
<jhass> Struct.new :P
bbloom has quit [Client Quit]
<siwica> In a class?
<jhass> nah, like I demonstrated
nevans has joined #ruby
kwd has joined #ruby
ascarter has joined #ruby
bbloom has joined #ruby
<siwica> but if Point is a Class not a Struct?
<siwica> it has additional methods in my case
ascarter has quit [Client Quit]
<jhass> Struct < Class
<jhass> in my case too
kireevco has joined #ruby
nucatus has joined #ruby
nucatus has quit [Remote host closed the connection]
<siwica> whats the difference to a class then?
nucatus has joined #ruby
<jhass> it does the attribute boilerplate, look at the docs
ascarter has joined #ruby
<siwica> ok, so nothing moreß
<siwica> ?
beef-wellington has quit [Ping timeout: 244 seconds]
cassianoleal has quit [Quit: (null)]
iamjarvo has joined #ruby
<jhass> not much
<siwica> ok
silkfox has joined #ruby
shredding has quit [Quit: shredding]
chrishough has joined #ruby
ephemerian has quit [Quit: Leaving.]
<siwica> jhass: I have all my classes in a module, so ExtremeReaders would just be a submodule to that?
<jhass> yeah
nettoweb_ has joined #ruby
<jhass> doesn't matter much where you put it
goodenough has joined #ruby
Hijiri has joined #ruby
kaspertidemann has quit []
shredding has joined #ruby
Morkel has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
Neozonz|Disc has joined #ruby
Neozonz|Disc has joined #ruby
lolmaus has joined #ruby
Timgauthier has quit [Max SendQ exceeded]
spider-mario has joined #ruby
cashnguns has quit [Read error: Connection reset by peer]
Timgauthier has joined #ruby
Neozonz has quit [Ping timeout: 255 seconds]
cashnguns has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
cpruitt has quit [Quit: cpruitt]
govg has joined #ruby
psyprus has joined #ruby
ascarter has left #ruby ["Textual IRC Client: www.textualapp.com"]
kaspergrubbe has joined #ruby
kaspertidemann has joined #ruby
<siwica> so what does public_send do?
freezey has joined #ruby
<jhass> do you now what send does?
chrishough has quit [Ping timeout: 260 seconds]
<siwica> does it call a method on an object?
<rpag> yup
<jhass> yes. public_send does the same, it just errors on private methods
<jhass> send does not
triple_b has joined #ruby
<siwica> oh ok
<rpag> it is useful for dynamic dispatch: name = "foobar"; obj.public_send(name)
<siwica> still dont quite get the usecase
shredding has quit [Quit: shredding]
jherbst has quit [Quit: Textual IRC Client: www.textualapp.com]
lmickh has joined #ruby
Hightower666 has quit [Ping timeout: 244 seconds]
<rpag> if you are given a string and want to dispatch a method with that string, public_send/send is useful
chrishough has joined #ruby
<rpag> you can't say obj.#{name}, it'd be a syntax error
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rpag> i see it a lot in method_missing implementations that delegate to another object
Timgauthier is now known as timgauthier_away
beef-wellington has joined #ruby
cashnguns has quit [Read error: Connection reset by peer]
silkfox has quit [Ping timeout: 244 seconds]
verto_ has quit [Ping timeout: 245 seconds]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rylev has joined #ruby
cashnguns has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goodenough has quit [Remote host closed the connection]
marr has quit [Ping timeout: 245 seconds]
zorak8 has joined #ruby
postmodern has joined #ruby
max96at is now known as max96at|off
rylev has quit [Remote host closed the connection]
otherj_ has joined #ruby
josephndenton has joined #ruby
<siwica> ok, I understand
goodenough has joined #ruby
<siwica> I just dont get the difference from send and public_send
<rpag> jhass just explained that
<jhass> you know what a private method is?
<siwica> yes, sure
otherj has quit [Ping timeout: 265 seconds]
<rpag> send will call a method even if it is private or not, public_send will raise a NoMethodError if the method is private
s00pcan has joined #ruby
<jhass> send(:a_private_method) will work. public_send(:a_private_method) will error
User458764 has quit [Ping timeout: 265 seconds]
jaequery has joined #ruby
<siwica> ok, so basically just another kind of error is raised?
jaequery has quit [Max SendQ exceeded]
<rpag> >> Object.new.public_send(:puts, "Hi") # NoMethodError
<eval-in__> rpag => private method `puts' called for #<Object:0x40a44f94> (NoMethodError) ... (https://eval.in/217432)
<rpag> >> Object.new.send(:puts, "Hi") # works
<eval-in__> rpag => Hi ... (https://eval.in/217433)
jaequery has joined #ruby
axl_ has joined #ruby
hmsimha_ has quit [Ping timeout: 255 seconds]
shredding has joined #ruby
dkb20k has joined #ruby
michael3 has joined #ruby
jxf has joined #ruby
silkfox has joined #ruby
Synthead has joined #ruby
<diegoviola> I want to contribute to some project but I don't know which one
cashnguns has quit [Read error: Connection reset by peer]
<diegoviola> :/
cashnguns has joined #ruby
<rpag> contribute to one you're interested in?
entrenador has joined #ruby
josephndenton has quit [Ping timeout: 264 seconds]
beef-wellington has quit [Read error: Connection reset by peer]
<diegoviola> right
<rpag> happy to help :D
zlude has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> diegoviola write your own one man
jaequery has quit [Client Quit]
<shevy> right now I am (again) rewriting my konsole colours gem, this time I layout how to use it first before writing it
rylev has joined #ruby
<zlude> Hello! I have a newbie question, if i do @book = Book.find(1) and then @book.delete will it delete record from my database? or i need @book.save ? or @book.save is just to return if true or false?
dkb20k has quit [Ping timeout: 258 seconds]
<rpag> zlude, try #rubyonrails for those type of questions
<diegoviola> I want to write an audio player, just for fun
jdj_dk has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
<zlude> rpag, thx
<Hijiri> will the decoding/encoding be in ruby too?
ramfjord has joined #ruby
<diegoviola> Hijiri: that would be nice
<zlude> rpag, but i'm really not using rails, hehe. I'm using ruby with activerecord. just.
klaut has joined #ruby
rylev has quit [Remote host closed the connection]
<jhass> zlude: still the rails people work everyday with AR, which you can't say of all the people here
<rpag> zlude, it's still a better channel for just AR but to answer your question .save will persist the record *into* the database, delete/destroy removes the record
robbyoconnor has quit [Ping timeout: 256 seconds]
benzrf is now known as benzrf|offline
<rpag> calling save after delete/destroy would just undo the delete
dumdedum has quit [Quit: foo]
<zlude> rpag, good! so, don't make any sense .save in a delet action.
<zlude> rpag, just on a new record action.
cashnguns has quit [Read error: Connection reset by peer]
<siwica> jhass: could you just explain the
<siwica> public_send(collection)
<siwica> .public_send("#{extreme}_by") {|item| item.public_send(name) }
<siwica> .public_send(name)
<siwica> part to me?
cashnguns has joined #ruby
tier has quit [Read error: Connection reset by peer]
nichtdiebohne has left #ruby [#ruby]
tier has joined #ruby
<jhass> it effectively results in things like points.min_by {|item| item.public_send(:min_x) }.min_x
<rpag> zlude, yeah
neoxquick has joined #ruby
<jhass> meshes.max_by {|item| item.max_z }.max_z
<jhass> and so on
<siwica> jhass: ok
<siwica> I will try it now ;)
<rpag> that code looks very ugly
joonty has quit [Ping timeout: 265 seconds]
x1337807x has joined #ruby
hmsimha_ has joined #ruby
_djbkd has joined #ruby
<shevy> hahaha
<shevy> let's spank siwica
<Hanmac> jhass: max_by can return nil, so you need to take care of that
<shevy> ok
<shevy> let's spank jhass
amargherio has joined #ruby
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Wolland has joined #ruby
<rpag> lets figure out why on earth you would write code that way :P
<jhass> to not write 18 methods that are mostly the same
moritzs has quit [Ping timeout: 240 seconds]
<rpag> i missed the original question
triple_b has joined #ruby
<rpag> but if i wrote code like that, i'd want to find another way to do it
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has joined #ruby
<rpag> it reminds me of .try(:foo).try(:bar).try(:baz) but slightly worse
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<jhass> I think you make it worse than it is
<rpag> i dont think so tbh, its pretty bad
louism2wash has quit [Quit: This computer has gone to sleep]
auxbuss has joined #ruby
<jhass> why?
<rpag> because it's a really long chain of method calls all of which are dynamic
<rpag> probably breaks demeter's law too
<jhass> no it doesn't
livinded has joined #ruby
robertt_dex has joined #ruby
<siwica> rpag: I does not break demeters law
<livinded> How can I silence the rake stack trace when my tests fail?
<livinded> it spits out a huge one saying the command failed to run
<siwica> jhass: could you just explain what extends ... does exactly? :)
<jhass> siwica: do you know include?
<siwica> I want to know the difference
<jhass> and singleton ("class") methods?
<rpag> jhass, if you deconstruct that to what it expands to, i see: array.method_call.method_call { |item| item.method_call }.method_call
<rpag> it's messy and hard to follow, but perhaps thats just me
jheg has joined #ruby
<jhass> extend adds the modules methods as singleton methods (technically it inserts the module into the singleton class ancestry chain)
jonr22 has joined #ruby
<siwica> jhass: methods that are available only for a specific object?
<jhass> yes
<jhass> in this case the Class object
<jhass> but it works on all objects
<siwica> and what does include do?
<rpag> except BasicObject
<jhass> rpag: it's get_enumerable.one_of_two_methods {item| item.method_call }.method_call
<jhass> siwica: adds the modules methods as instance methods by inserting the module into the Classes ancestry chain
<rpag> get_enumerable, one_of_two methods, are method calls too
skolman_ has quit [Remote host closed the connection]
<rpag> and everyone of em is dynamic
<jhass> still one less than you said
<jhass> the dynamic parts are directly defined above
<jhass> but I'm happy to see your version of http://paste.mrzyx.de/pdzifbned ;)
skolman has joined #ruby
amargherio has quit [Read error: Connection reset by peer]
keen__________ has joined #ruby
_djbkd has quit [Remote host closed the connection]
zlude has quit [Quit: Page closed]
<twohlix> so the guy who i can git blame for this line of code isn't around and my googling is coming up with nothing:
<shevy> hmm with define_method I can add a method to a module dynamically, but how do I add the same method both as a normal instance method and also a class method?
* twohlix #noinspection RubyArgCount
<shevy> something like: module Foo; def foo; def self.foo
kirun has joined #ruby
_djbkd has joined #ruby
keen_________ has quit [Ping timeout: 245 seconds]
jonr22 has quit [Ping timeout: 260 seconds]
<jhass> shevy: I think define_method respects a prior call to module_function
<shevy> ah
<shevy> module_function
<jhass> note that it makes the instance method private
<shevy> hum
jottr has joined #ruby
iwishiwerearobot has joined #ruby
jottr_ has quit [Ping timeout: 265 seconds]
_djbkd has quit [Read error: No route to host]
botwin has joined #ruby
<rpag> jhass, yeah trying to untangle that doesn't look easy tbh
jherbst has joined #ruby
<aep> how do i add a method to a class in a module?
skolman has quit [Remote host closed the connection]
iwishiwerearobot has quit [Ping timeout: 260 seconds]
skolman_ has joined #ruby
mistermocha has joined #ruby
<rpag> what do you mean?
<jhass> aep: module Foo; class Bar; def foobar; "yay"; end; end; end;
jzinedine has joined #ruby
<aep> nah that didnt work. still undefined method foobar
<aep> for an instance of Foo::Bar
<rpag> you'd have to say Foo::Bar.new.foobar for it to work
<aep> yes did.
<aep> well i didnt do the new
<rpag> the new is the important part
<aep> the new was inside the module
<aep> meh
<aep> ok i'll just use external helpers(Foo)
<rpag> i have no idea what you're trying to do
<jhass> aep: Please share your code on https://gist.github.com
ryao__ has quit [Changing host]
ryao__ has joined #ruby
[gmi] has joined #ruby
x1337807x has joined #ruby
<aep> nah too lazy to reduce to readable stuff. basically i'm getting some stuff from a database library and i was hoping i can just add methods to their instances
chipotle_ has quit [Ping timeout: 250 seconds]
<siwica> aep: you could also do if you dont want instance methods module Foo; class Bar; def self.foobar; "yay"; end; end; end;
<aep> like Foo::Bar.get_all_the_bars().first.my_new_thing
<aep> nah, i wanted instance
<aep> the lib kinda works like activerecord
dc_ has quit [Remote host closed the connection]
<aep> it creates objects from api calls
hmsimha_ has quit [Ping timeout: 245 seconds]
<aep> and i wanted to add some helpers to prettify stuff. not critical. i'll just do it different
<jhass> then get_all_bars doesn't return Foo::Bar's
<aep> thanks!
<aep> uh yeah it does
[gmi] has quit [Client Quit]
<jhass> also get rid of that empty parens :(
mdarby has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Areessell_ has joined #ruby
ryao__ is now known as ryao
<aep> yeah yeah :D
<rpag> too javascript-y
lolmaus has quit [Quit: Konversation terminated!]
timonv_ has joined #ruby
lolmaus has joined #ruby
timonv_ has quit [Remote host closed the connection]
jerematic has joined #ruby
jerematic has quit [Max SendQ exceeded]
jerematic has joined #ruby
jerematic has quit [Max SendQ exceeded]
Musashi007 has quit [Quit: Musashi007]
neoxquick has quit [Quit: Miranda NG! Smaller, Faster, Easier. http://miranda-ng.org/]
Areessell_ has quit [Ping timeout: 264 seconds]
linojon has quit [Quit: linojon]
Musashi007 has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
djstorm has joined #ruby
jheg has quit [Quit: jheg]
dseitz has joined #ruby
mrgrieves has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
linojon has joined #ruby
jheg has joined #ruby
<akamel> anyone familar with tenderlove's rkelly? code examples much?
entrenador has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> lol
michael_mbp has joined #ruby
chrishou_ has joined #ruby
zorak8 has quit [Ping timeout: 244 seconds]
m8 has joined #ruby
jdj_dk has quit [Remote host closed the connection]
chrishough has quit [Ping timeout: 265 seconds]
Guest81482 has quit [Remote host closed the connection]
thumpba has joined #ruby
lolmaus_ has joined #ruby
sambao21 has joined #ruby
jdj_dk has joined #ruby
<siwica> jhass: just confirming it works :)
<siwica> thanks!
yetanotherdave has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goodenough has quit [Remote host closed the connection]
josephndenton has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
tlarevo has quit [Remote host closed the connection]
failshell has joined #ruby
vifino has quit [Remote host closed the connection]
<siwica> is there some style advice on whether to use "return" in a method or not?
<shevy> siwica if it is on the last line of the method, you can omit it
sambao21_ has joined #ruby
<shevy> if you use more than one return in your code, you have to be explicit
<siwica> I know, but it is not discouraged?
jdj_dk has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
arup_r has quit [Quit: Leaving.]
<shevy> by who?
<shevy> the central ruby committee?
<rpag> it's not a common idiom to always use return if you don't have to
<siwica> I dont know, just askin'
<jhass> most styleguides say to omit it where you can
josephndenton has quit [Ping timeout: 265 seconds]
<shevy> people write ruby code in many different ways
<shevy> the ultimate authority is whether the ruby parser accepts it or not
<siwica> sure, but the community sticks to certain style guidelines that I try to follow
sambao21 has quit [Ping timeout: 264 seconds]
sambao21_ is now known as sambao21
<shevy> siwica then there are some advantages like saving a few characters if you omit it
kaspergrubbe has quit [Remote host closed the connection]
<shevy> really?
<siwica> I know all that :/
<shevy> :)
<shevy> rpag, to which style guide do you adhere to?
rodfersou has quit [Remote host closed the connection]
jimmyhoughjr has joined #ruby
mkaesz has quit [Remote host closed the connection]
<siwica> looked it u myself
<siwica> *up
slester has joined #ruby
<shevy> cool
<shevy> is this the guy who designed ruby?
neoxquick has joined #ruby
iamjarvo has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
zorak8 has joined #ruby
jheg has quit [Quit: jheg]
<siwica> shevy: You are free to use anything you want, but I find many people sticking to this
moritzs has joined #ruby
<shevy> ;)
MrDoctor has quit [Quit: Leaving]
<siwica> and I think the guide is quite useful
<siwica> mr troublemaker
<shevy> that's the rack author
<siwica> it does say "* Avoid return where not required."
<siwica> so discussion over! :)
kireevco has left #ruby [#ruby]
<shevy> yeah
<shevy> I think it is the original style guide
<shevy> created "chneukirchen authored on Dec 28, 2008"
<shevy> and this bbatsov copy pasted it
thumpba has quit []
ramfjord has quit [Ping timeout: 264 seconds]
<siwica> but since you cant link to individual points it's kinda useless for discussing things
<shevy> yeah he copy pasted it
<shevy> "* Use OptionParser for parsing complex command line options and ruby -s for trivial command line options."
<siwica> whatever
<shevy> and extended it in a few areas + added style elements to it
<shevy> siwica ah you can highlight on github
<siwica> I dont care who deserves credit for this
<siwica> its just useful
<shevy> ok so if I write up another style guide
fsapo has quit [Remote host closed the connection]
<shevy> will you consider this as just useful as well?
<rpag> shevy, i don't really adhere to a style guide, but i follow most of the common stuff: snake_case methods/variables, SCREAM_CASE_CONSTANTS, CamelCase classes/modules.
<siwica> if its good and accepted by many
chrishou_ has quit [Ping timeout: 272 seconds]
Musashi007 has quit [Quit: Musashi007]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> you can try to run rubocop on your ruby code
<shevy> gem install rubocop
sinkensabe has quit [Remote host closed the connection]
<shevy> then watch how it screams :D
<siwica> what does it do?
<siwica> stylechecks?
<shevy> oooooh
<jhass> yeah, most people here hate its default config though ;P
chrishough has joined #ruby
<shevy> might be that batsov actually wrote or contributed to rubocop
<shevy> jhass siwica will love it
<shevy> after all that guy wrote the favourite style guide
<shevy> Last release 0.27.0 October 30, 2014 (913 KB) so perhaps the default config has been improved
<shevy> I last tried it perhaps a year ago or so
<shevy> it actually was useful!
<shevy> (10% of it)
<shevy> it discovered some "end " elements :D
<shevy> and I think one or two more things that I could fix, actually
kaspergrubbe has joined #ruby
<shevy> siwica you should try it on some ruby code you wrote, ideally on a bit longer code... some hundred lines of code
jzinedine has quit [Quit: Textual IRC Client: www.textualapp.com]
noop has quit [Ping timeout: 250 seconds]
moritzs has quit [Remote host closed the connection]
jzinedine has joined #ruby
otherj_ has quit [Quit: .]
mikeg has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<siwica> shevy: I guess that will usually result in some hundred warnings?
Juanchito has quit [Quit: Connection closed for inactivity]
shazaum has quit [Quit: Leaving]
jaequery has joined #ruby
rylev has joined #ruby
jaequery has quit [Max SendQ exceeded]
<shevy> yeah
<shevy> but try it!
Musashi007 has joined #ruby
jaequery has joined #ruby
<siwica> it is very useful for detecting blank lines it seems :)
<siwica> what is a recommended final blank line for?
sigurding has joined #ruby
<rpag> at the end of a file?
ldnunes has quit [Quit: Leaving]
jxf has quit [Remote host closed the connection]
jjasonclark has quit [Quit: jjasonclark]
<shevy> siwica dunno, perhaps you forgot to remove it
pietr0_ has joined #ruby
pietr0 has quit [Ping timeout: 240 seconds]
pietr0_ is now known as pietr0
<siwica> no, its encouraged
Musashi007 has quit [Client Quit]
rylev has quit [Ping timeout: 258 seconds]
<siwica> "C: Final newline missing."
ephemerian has joined #ruby
marr has joined #ruby
<siwica> ok, its semi useful
<shevy> hehe
coderhs has joined #ruby
linojon has quit [Quit: linojon]
<siwica> I dont like it complaining about the blank lines I insert for readability
<rpag> whats readable to you isnt readable to someone else though
<rpag> i find empty lines to just be noise
m8 has quit [Quit: Sto andando via]
sambao21 has quit [Ping timeout: 265 seconds]
<siwica> sure
sambao21 has joined #ruby
<siwica> But if I dont commit to a public project the final instance on these matters is myself
mikeg has quit [Ping timeout: 260 seconds]
elaptics is now known as elaptics`away
<siwica> but in some cases it's actually useful
emmesswhy has joined #ruby
jenrzzz has joined #ruby
renderful has quit [Remote host closed the connection]
<shevy> aaah now you understand why there is no community guideline :D
linojon has joined #ruby
wallerdev has quit [Quit: wallerdev]
reinaldob has quit [Remote host closed the connection]
<jhass> there's none because we have no authoritative place to establish one
Blizzy has quit [Ping timeout: 255 seconds]
cashnguns has quit [Read error: Connection reset by peer]
cashnguns has joined #ruby
speakingcode has quit [Quit: leaving]
speakingcode has joined #ruby
<siwica> shevy: I dont say you are forced to stick with each aspect, but when in doubt I generally tend to use the recommendation
dc has joined #ruby
timonv_ has joined #ruby
engineered_acade has joined #ruby
ptrrr has joined #ruby
engineered_acade is now known as Cat_1
JohnBat26 has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vyrus001 has joined #ruby
maasha has joined #ruby
jenrzzz has quit [Quit: leaving]
<siwica> Just curious, what are you doing for a living here in the channel?
mois3x has joined #ruby
<maasha> regex challenge: substitute all . with .\n unless . is within a pair of matching ()
<siwica> (*wondering if its mostly professionals or not)
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
spyderma_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spyderman4g63 has quit [Read error: Connection reset by peer]
tier_ has joined #ruby
<siwica> directly within? "(a.)" too?
benzrf|offline is now known as benzrf
<maasha> siwica: yes, that too
<siwica> (.(.() so all these too?
<maasha> I mean, any . within () should be spared.
<maasha> siwica: no, there is no nested parens.
<siwica> ok
Jake232 has joined #ruby
<siwica> I'll think about it when I have time
northfurr has joined #ruby
<maasha> siwica: two steps is ok as well.
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<shevy> siwica I just idle to power here
<maasha> I was thinking substituting all . inside parens first to something like #, then substitute remaining . to .\n, and then substituting # back to .
<maasha> crufty
_djbkd is now known as djbkd_
P-NuT has joined #ruby
iamjarvo has joined #ruby
<P-NuT> Hi all, How do I take a variable and check what type it is?
tier has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
<jhass> P-NuT: .class. Yet better get pry and do ls foo
yfeldblum has joined #ruby
<jhass> maasha: got a test string?
ramfjord has quit [Client Quit]
Blizzy has joined #ruby
jjasonclark has joined #ruby
<maasha> foo.bar(".").bleh.blah().tyt
<maasha> off to rubular :o)
dkb20k has joined #ruby
<benzrf> maasha: why the ()
<maasha> benzrf: just to have an ugly test string
russt has joined #ruby
<maasha> benzrf: helps trap weird corner cases
<jhass> so that's ruby method calls?
<maasha> jhass: yeah
Areessell_ has joined #ruby
<jhass> what about foo.bar(baz.bar).blub
<siwica> Is there a ruby library to zip files?
vifino has joined #ruby
<maasha> jhass: the baz.bar dot should not be substituted, but the rest should.
<jhass> kay
<jhass> I fear you need to tokenize
chrishough has joined #ruby
chrishough has quit [Client Quit]
chrishough has joined #ruby
emmesswhy has quit [Quit: Leaving]
nobitanobi has joined #ruby
godd2 has joined #ruby
dkb20k has quit [Ping timeout: 250 seconds]
kyoshero has joined #ruby
<maasha> jhass: well, I don't really want to go with look-around-assertions - they are messy. Thus I am willing to accept a number of steps, I was hoping it could be solved with a number of substitutes.
jzinedine has left #ruby ["Textual IRC Client: www.textualapp.com"]
P-NuT has quit [Ping timeout: 245 seconds]
<jhass> lookaround won't help anyway, they're fixed width
botwin has quit [Remote host closed the connection]
Musashi007 has joined #ruby
tier_ has quit [Remote host closed the connection]
<crome> how about stateful "parsing"?
tier has joined #ruby
<crome> just go through the input character by character and watch parentheses and dots
mdarby has joined #ruby
tier has quit [Read error: Connection reset by peer]
tier has joined #ruby
<jhass> you gonna hate me:
<jhass> >> 'a.b(c.d).e.f().g(".").h'.split('.').flat_map {|item| item.include?('(')...item.include?(')') ? [item] : [item, "\n"] }.join('.')
<eval-in__> jhass => "a.\n.b(c.d).e.\n.f().g(\".\").h.\n" (https://eval.in/217485)
josephndenton has joined #ruby
rbrs has joined #ruby
<jhass> meh, it's missing the ). case there
rylev has joined #ruby
* maasha hates jhass
<maasha> :o)
rylev has quit [Remote host closed the connection]
jxf has joined #ruby
JBreit has left #ruby ["Leaving"]
goodenough has joined #ruby
<jhass> kay, doesn't work, was just an attempt :P
<maasha> sure, I'll find a way
mdarby has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
mdarby has joined #ruby
robertt_dex has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 255 seconds]
siwica has quit [Ping timeout: 260 seconds]
psyprus has quit [Ping timeout: 258 seconds]
jottr has joined #ruby
<shevy> hehe
josephndenton has quit [Ping timeout: 250 seconds]
jheg has joined #ruby
renderful has joined #ruby
sambao21_ has joined #ruby
dc has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 255 seconds]
sambao21_ is now known as sambao21
<shevy> I have this code http://pastie.org/9696350 - how can I alias from the method, to point to the class method? right now the code is duplicated
<jhass> >> 'a.b(c.d).e.f().g(".").h'.split('.').flat_map {|item| item.include?('(')...item.include?(')') ? item.include?(')') ? [item, "\n"] : [item] : [item, "\n"] }.join('.').gsub(".\n.", ".\n").chop.chop
<eval-in__> jhass => "a.\nb(c.d).\ne.\nf().\ng(\".\").\nh" (https://eval.in/217486)
* jhass hides
<shevy> damn it doesn't even work anyway
jdj_dk has joined #ruby
silkfox has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
djbkd_ has quit [Remote host closed the connection]
centrx has joined #ruby
_djbkd has joined #ruby
mityaz has quit [Quit: See ya!]
g0bl1n has quit [Quit: g0bl1n]
Morkel has quit [Quit: Morkel]
<shevy> ok I am confused
<shevy> if I use Foo.
<shevy> it does not quite work
<shevy> but if I use
<shevy> self.class.
<shevy> it works
<shevy> omg
<shevy> I am dumb
jdj_dk has quit [Ping timeout: 240 seconds]
<benzrf> kek
<shevy> Module.class_eval works
<diegoviola> what open source projects do you guys contribute to?
<cashnguns> Shevy, I feel your pain
<jhass> >> 'a.b(c.d).e.f().g(".").h'.scan(/[^.]+\(.*?\)|[^.(]+/).join(".\n") # maasha
<eval-in__> jhass => "a.\nb(c.d).\ne.\nf().\ng(\".\").\nh" (https://eval.in/217488)
jenrzzz has joined #ruby
<jhass> since you said no nested parens
_djbkd has quit [Ping timeout: 258 seconds]
<maasha> gotit, two steps with sub: s.gsub!(/\)\./, ").\n") and s.gsub!(/^(\w+)\./, "\\1.\n")
<shevy> what are you guys doing
<jhass> maasha: look at my last one, one step and quite sane
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<maasha> shevy: breaking a ruby method chain so that the chaining dot becomes .\n
freezey has quit [Ping timeout: 260 seconds]
* jhass prefers breaking chains with \n.
<maasha> jhass: sure
<shevy> wat
<maasha> breaking with .\n allows copy pasting to irb
sailias has quit [Quit: Leaving.]
<jhass> if I want to do that (I very rarely do) I select it and press Ctrl+J Ctrl+C Ctrl+Z :P
auxbuss has quit [Quit: I'm gone.]
raddazong is now known as madhatter
coderhs has quit [Ping timeout: 264 seconds]
skolman_ has quit [Remote host closed the connection]
madhatter is now known as Guest21406
<maasha> right
thumpba has joined #ruby
skolman_ has joined #ruby
ypasmk has joined #ruby
<shevy> hmmm
<shevy> if I have an array
Xeago has joined #ruby
<shevy> and wish to invoke class methods on Foo
siwica has joined #ruby
<shevy> is there an alternative to using .send ?
<jhass> public_send
bluenemo has quit [Quit: Verlassend]
claymore has quit [Ping timeout: 250 seconds]
<shevy> hehe
Wolland_ has joined #ruby
<jenrzzz> shevy: why don't you want to use #send?
<shevy> I use it already
<shevy> it feels weird though because I know the name of the method
<shevy> I mean it is stored in the variable
claymore has joined #ruby
<jenrzzz> yeah, that's what #send is for!
dc has joined #ruby
Zackio has joined #ruby
diegovio1 has joined #ruby
<jhass> no #public_send is for that
diegoviola is now known as Guest44162
<jhass> #send is for when you want to invoke a private method but are normally forbidden to
jjasonclark has quit [Quit: jjasonclark]
DjDeaf has joined #ruby
Xiti has quit [Quit: Leaving]
Musashi007 has quit [Quit: Musashi007]
axl_ has quit [Quit: axl_]
kamil has quit [Quit: Linkinus - http://linkinus.com]
fmcgeough has quit [Quit: fmcgeough]
Guest44162 has quit [Ping timeout: 256 seconds]
kaspertidemann has quit []
Wolland has quit [Ping timeout: 272 seconds]
Pupeno_ has joined #ruby
<jenrzzz> i mean the whole class of #send methods
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gizmore> RFC R1425: Ruby newbies should be called rewbies
ypasmk has left #ruby [#ruby]
<gizmore> wheras beautiful female rewbies should be called Rudies
<gizmore> thx
<benzrf> rudies
<benzrf> wut
<jenrzzz> wat
Pupeno has quit [Ping timeout: 265 seconds]
komecoconuit has joined #ruby
linojon has quit [Quit: linojon]
komecoconuit has left #ruby [#ruby]
DjDeaf_ has joined #ruby
Zackio has quit [Ping timeout: 250 seconds]
lolmaus_ has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
DjDeaf has quit [Ping timeout: 240 seconds]
<maasha> O_o
_djbkd has joined #ruby
goodenough has quit [Remote host closed the connection]
axl_ has joined #ruby
DjDeaf_ has quit [Read error: Connection reset by peer]
ruby-help has joined #ruby
DjDeaf has joined #ruby
axl_ has quit [Client Quit]
linojon has joined #ruby
reinaldob has joined #ruby
thumpba has quit [Remote host closed the connection]
klaut_ has joined #ruby
axl_ has joined #ruby
jhwhite has quit [Quit: jhwhite]
ptrrr has quit [Quit: ptrrr]
jherbst has quit [Quit: Textual IRC Client: www.textualapp.com]
sigurding has quit [Quit: sigurding]
axl_ has quit [Client Quit]
<shevy> o_O
klaut has quit [Ping timeout: 256 seconds]
mattstratton has joined #ruby
<ruby-help> hi, im looking to take the output of a command like "curl ifconfig.me" and based on the out put do something with it. I've tried with "system" and "exec" but this seems that any response from stdout is "true"
<jenrzzz> ruby-help: output = `curl ifconfig.me`
<jenrzzz> the backticks will return a string with the stdout of running the command
<mg^> or use a pipe and read the output like you would any file
vyrus001 has left #ruby [#ruby]
reinaldob has quit [Ping timeout: 255 seconds]
Xiti has joined #ruby
Xiti has quit [Changing host]
Xiti has joined #ruby
axl_ has joined #ruby
Musashi007 has joined #ruby
northfurr has quit [Quit: northfurr]
jaequery_ has joined #ruby
<jhass> or use open-uri
<benzrf> llooll
Xiti` has joined #ruby
diegovio1 is now known as diegoviola
<jhass> require 'open-uri'; ip = open('http://ifconfig.me', &:read)
shredding has quit [Quit: shredding]
DjDeaf has quit [Read error: Connection reset by peer]
<wallerdev> lol
<wallerdev> yeah why would you need to shell out to curl
x1337807x has joined #ruby
DjDeaf has joined #ruby
JohnBat26 has quit [Ping timeout: 272 seconds]
Lucky__ has joined #ruby
IrishGringo has quit [Ping timeout: 260 seconds]
jaequery has quit [Ping timeout: 264 seconds]
hephaestus_rg has joined #ruby
cpruitt has joined #ruby
silkfox has joined #ruby
jjasonclark has joined #ruby
hhutch has joined #ruby
DjDeaf has quit [Remote host closed the connection]
zB0hs has joined #ruby
<benzrf> is open-uri in base ruby-help
<benzrf> er
<benzrf> *ruby
<jhass> yes, stdlib
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
Xiti` has quit [Quit: Leaving]
<shevy> benzrf you forgot ruby!
beef-wellington has joined #ruby
Xiti has quit [Quit: Leaving]
<shevy> all that haskell made you senile
Xiti has joined #ruby
<mg^> I didn't even read that the command was curl :) I saw output of a command blah blah system exec
<jhass> I start to assume X/Y problem by default ;)
<ruby-help> i have an api that uses curl to give an output to a set of vpn tunnels. im looking at displaying an alert if one of these tunnels is down. so i need to run around 400 curl command every say 30 seconds
devdazed has quit [Quit: Bye]
<ruby-help> output would be "active", "down" or "unknown"
<jhass> ruby-help: use the typhoeus gems hydra
<jhass> 1000x times faster (no kidding)
<jenrzzz> +1 for typhoeus
<ruby-help> ah ok ill take a look at that
silkfox has quit [Quit: WeeChat 0.4.3]
<ruby-help> thanks
jottr has quit [Ping timeout: 255 seconds]
<ruby-help> i am however intrigued on how to output the curl command without any gems
havenwood has joined #ruby
<mg^> you can do it all in stdlib
rbrs has quit [Quit: Leaving]
<jhass> you've been shown the solution plus a solution for you example in pure ruby without curl
djbkd_ has joined #ruby
maasha has quit [Ping timeout: 246 seconds]
<ruby-help> curl = 'ifconfig.me' puts curl ?
<mg^> no
paulfm has quit []
<ruby-help> curl = `ifconfig.me` puts curl ?
thumpba has joined #ruby
Zackio has joined #ruby
kireevco has joined #ruby
<jenrzzz> ruby-help: try it.
siwica has quit [Ping timeout: 264 seconds]
<ruby-help> i did it failed /curl.rb:3:in ``': No such file or directory - ifconfig.me (Errno::ENOENT)
djbkd has quit [Ping timeout: 260 seconds]
<jenrzzz> why do you think that is?
sambao21 has quit [Quit: Computer has gone to sleep.]
siwica has joined #ruby
jottr has joined #ruby
<shevy> ruby-help that file was not found
<shevy> I don't even know what .me is, what is that ruby-help
timonv_ has quit [Remote host closed the connection]
<ruby-help> the fie is curl.rb
hhutch has quit [Ping timeout: 264 seconds]
<shevy> you have a file called curl.rb ?
<jenrzzz> jhass: i didn't know the X-Y problem had a name!
<n3b_> ip = `curl http://ipecho.net/plain` ?
<mg^> huh, that ifconfig.me site looks kind of interesting
<shevy> hehehe
<ruby-help> its clearly wrong i get that..
<shevy> ruby-help who told you to use this
thagomizer has quit [Quit: Leaving.]
<shevy> <jenrzzz> ruby-help: output = `curl ifconfig.me`
<shevy> <jhass> require 'open-uri'; ip = open('http://ifconfig.me', &:read)
<shevy> <ruby-help> curl = `ifconfig.me`
<shevy> *ponder*
aclearman037 has quit [Quit: I'm out!]
<ruby-help> i cant use the open-ri method as i need to use curl
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
<ruby-help> as shevy has pointed out the back ticks answer was given above
<jhass> shevy: .me is the top level domain of montenegro
<mg^> why do you 'need' to use curl?
<mg^> anything curl can do, ruby can do without forking a subprocess invoked through a shell
sambao21 has joined #ruby
<shevy> that is a cool name for a domain
<ruby-help> well that entirely true i can get the answer with either curl or wget
<jhass> typhoeus uses libcurl under the hood btw.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> I'm gonna register awesome.me
<ruby-help> i use awesome as my windows manager :-)
<jhass> shevy: pretty sure that's taken
<jhass> shevy: you can have shevy.sucks in a few months though
<mg^> haha
<shevy> nah
<ruby-help> if i do exec(curl ifconfig.me) i get the answer
<shevy> I shall delegate towards jhass.girly
<ruby-help> but i dont know how to do something with it
<shevy> how is exec() different from the `` solution given by jenrzzz
<jhass> shevy: no such gtld, I'm sorry
<ruby-help> because it works ?
<jhass> ruby-help: exec replaces the current process
<shevy> jhass well I have to shorten it perhaps... jhass.gal
<shevy> man
<shevy> we need more domains
<gr33n7007h> ruby-help, require 'net/http'; require 'json'; Net::HTTP.get_response(URI.parse("http://ifconfig.me/all.json")) {|r| r = JSON.parse(r.body, :symbolize_names => true); puts r.fetch :ip_addr }
P-NuT has joined #ruby
timonv_ has joined #ruby
<jhass> shevy: https://gtldresult.icann.org/applicationstatus/applicationdetails/1074 can work, even delegated already!
<ruby-help> thanks gr33n7007h but that doesnt help me as i need to get the response based on running a curl command
Musashi007 has quit [Quit: Musashi007]
Rahul_Roy_ has quit [Quit: Connection closed for inactivity]
<gr33n7007h> ruby-help, oh, missed that lol
tier has quit [Remote host closed the connection]
<P-NuT> Hi all,
<ruby-help> thanks thought, that looks awesome
<shevy> hmmm
<shevy> that sounds brasilian
<P-NuT> Can anyone tell me how to get an epoch date to a date and a time?
josephndenton has joined #ruby
sailias has joined #ruby
<shevy> ruby-help ok. curl is availble? so ... result = `curl URL_HERE`
<ruby-help> i cant find an example of the syntax online. i check these here http://stackoverflow.com/questions/6338908/ruby-difference-between-exec-system-and-x-or-backticks
<jhass> P-NuT: .to_i for example
ndrei has quit [Ping timeout: 272 seconds]
<jhass> ruby-help: you link is full of examples?
<ruby-help> i know! none of which help
<jhass> ruby-help: you really need to work on your reading comprehension, you've been provided a working example
<ruby-help> which example ?
<jhass> the first one you've been given
<ruby-help> the backticks example throws an error
<jhass> no it doesn't
<jhass> your misadaption of it does
decoponyo has quit [Read error: Connection reset by peer]
bmurt has quit []
diegoviola has quit [Read error: Connection reset by peer]
timonv_ has quit [Ping timeout: 265 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
decoponio has joined #ruby
<shevy> ruby-help your brain modified it
<shevy> and turned it into fault
<ruby-help> lol
j_mcnally has quit [Ping timeout: 245 seconds]
<ruby-help> maybe, im just trying to work out how to solve a problem
<shevy> hehehe
<mg^> irb(main):008:0> ip = open('http://ifconfig.me/ip', &:read)
<mg^> => "50.196.28.193\n"
diegovio1 has joined #ruby
ramfjord has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
<jhass> [113] pry(main)> `curl ifconfig.me 2>/dev/null`
<jhass> => "77.21.50.166\n"
<mg^> forget curl, really
<gr33n7007h> ruby-help, use silent `curl -s ifconfig.me`
<shevy> ok guys I just finished a benchmark
<shevy> reading a .pdf
<jhass> yeah, just proving the point here
<ruby-help> its not a chice thing
<shevy> File.read vs. File.binread
<shevy> what do you think are the results?
Musashi007 has joined #ruby
siwica has quit [Remote host closed the connection]
Areessell_ has quit [Quit: (null)]
<jhass> ruby-help: as said, for that amount of requests use typhoeus' hydra
siwica has joined #ruby
diegovio1 is now known as diegoviola
mois3x has quit [Quit: mois3x]
sepp2k has quit [Quit: Konversation terminated!]
<shevy> File.read 3.810000 0.480000 4.290000 ( 4.395935)
<shevy> File.binread 0.010000 0.640000 0.650000 ( 0.663950)
msmith_ has quit [Remote host closed the connection]
TeresaP has joined #ruby
slester has quit [Remote host closed the connection]
<ruby-help> jhass: as said, i will look into that
sambao21 has quit [Quit: Computer has gone to sleep.]
pietr0 has quit [Ping timeout: 255 seconds]
<shevy> have you finished that curl request already
<jhass> shevy: how does it compare to sysread and read with encoding: 'ascii-8bit' ?
<shevy> jhass hmm
<shevy> let's see
pietr0 has joined #ruby
znst has quit [Ping timeout: 264 seconds]
<shevy> hmm
<TeresaP> Is there a clean way to check if a module contains a variable with a given value? https://gist.github.com/TeresaP/895cac347875f4314cbb
<shevy> I have to give sysread a number?
Xeago has quit [Remote host closed the connection]
razieliyo has quit [Remote host closed the connection]
<jhass> shevy: yeah, just choose something larger than the filesize
<mg^> ruby-help: I'm trying to comprehend how you don't have a choice about calling curl. You want to call 400 curl commands every 30 seconds, and process the output in ruby. That's going to be rather "interesting" to implement if you can't omit curl, from an efficiency standpoint. Since you have ruby, why not use the tools it provides? Including getting the output from a URL, and managing doing that a
<mg^> gazillion times.
x1337807x has joined #ruby
<jhass> TeresaP: [Foo::LEFT, Foo::RIGHT].include?(dir)
<jenrzzz> TeresaP: Foo.constants.include?(dir)
x1337807x has quit [Max SendQ exceeded]
sailias has quit [Ping timeout: 250 seconds]
<jhass> ^ if you can guarantee Foo contains nothing but the allowed values
<jenrzzz> wait, i'm not clear on what you're trying to do there, TeresaP
x1337807x has joined #ruby
<jhass> and actually it doesn't check the constants values
<jenrzzz> yeah
spider-mario has quit [Remote host closed the connection]
x1337807x has quit [Max SendQ exceeded]
<shevy> cool
einarj has joined #ruby
<shevy> it seems as if sysread is even faster than binread
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
<shevy> I added a few more iterations... but File.read really becomes awfully slow
<TeresaP> Basically I'm trying to create a minimized way to check if the user passed in one of :left, :right: :up, :down without the need for a long unless statement, but I think I might go that route
b3itz has joined #ruby
<shevy> File.read 7.620000 0.810000 8.430000 ( 8.501393)
<shevy> File.binread 0.010000 0.820000 0.830000 ( 0.833040)
<shevy> IO#sysread 0.010000 0.700000 0.710000 ( 0.712706)
<TeresaP> It's not that big of a deal
x1337807x has joined #ruby
<ruby-help> i have a set of routers that will respond to a curl or wget command with a username and password ip address and tunnel name.
<TeresaP> jhass' solution does work though
<jhass> TeresaP: I'm not sure why you assign those constants in the first place though
<b3itz> hey guys, so for an assignment, i have to read in a .txt file, then parse it into an array.. i cant figure out how to get the .txt file passed to the program using an ARGV...
<jhass> usually we just write the symbols where we want them
<TeresaP> Sometimes it's a simple as a direction
<TeresaP> Other times it is not
<TeresaP> I'm just trying to learn something
<jhass> TeresaP: %i(left right).include? dir
Musashi007 has quit [Quit: Musashi007]
<TeresaP> thanks jhass
diegoviola has quit [Ping timeout: 264 seconds]
<jenrzzz> TeresaP: you might be better off putting the symbols in a frozen set or hash and checking for inclusion if you're gonna need to access them in a lot of different places
<jhass> after all the point of symbols is to have identifiers, no need to a level of indirection to get identifiers ;)
<jhass> *add a
DjDeaf has joined #ruby
<jenrzzz> const lookup will be a lot slower
diegovio1 has joined #ruby
Ankhers has quit [Ping timeout: 250 seconds]
russt has quit [Quit: russt]
<benzrf> b3itz: ARGV
<gkra> hey, WTF is up with the latest rubocop gem? it's giving me a crapload of "Assignment Branch Condition size for <method_name> is too high" failures that never existed before. ??
Musashi007 has joined #ruby
diegovio1 is now known as diegoviola
russt has joined #ruby
dTSCode is now known as DTSCode
dc has quit [Remote host closed the connection]
<jhass> b3itz: also check the docs on ARGF
<mg^> I'm just saying you can do whatever curl is doing with ruby directly and avoid creating subprocesses. Someone else has pointed out that the Thyphoeus gem would also help you manage doing 400 of them.
<jhass> and actually uses curl!
jheg has quit [Quit: jheg]
DjDeaf has quit [Read error: No route to host]
jhwhite has joined #ruby
vifino has quit [Ping timeout: 240 seconds]
DjDeaf has joined #ruby
<TeresaP> cool I have not used Sets yet jenrzzz
<TeresaP> thanks for the info
<jenrzzz> shevy: is #read that much slower just because of encoding and error handling stuff?
<shevy> possibly
<shevy> I am not a C expert
<mg^> Any time you are thinking about capturing the output of a curl command in any language besides a unix shell, be it Ruby, Perl, C, whatever, it's time to re-evaluate what you're doing.
<b3itz> i'm receiving this error when running my .rb in ubuntu "ruby: no Ruby script found in input (LoadError)" andy ideas?
<b3itz> any
<jenrzzz> ^ amen
<jenrzzz> b3itz: how are you running it?
sambao21 has joined #ruby
<b3itz> ruby Assignment3.rb
DjDeaf has quit [Read error: Connection reset by peer]
<shevy> b3itz does the file exist there
<b3itz> yes
<P-NuT> How do I take a time string like "Mon Sep 29 08:37:36 2014" and return "2014-10-29" and "08:37:36"
<shevy> LoadError means that it must load some other file b3itz
DjDeaf has joined #ruby
<shevy> b3itz normally it tells you the name of the file
<shevy> have a look at Assignment3.rb what it loads up
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<b3itz> shevy: hold on one sec
<b3itz> shevy: what do you mean loads up?
momomomomo has joined #ruby
<b3itz> shevy: http://pastebin.com/eP0y7wmX thats my code, obviously its a mess and its not done
<b3itz> ohhh shit shevy i had the bin bash wrong
<jenrzzz> P-NuT: require 'date'; d = Date.parse("Mon Sep 29 08:37:36 2014"); d.strftime('%Y-%m-%d')
<jhass> P-NuT: do you already have a Time, Date or DateTime object?
<jhass> since you asked how to convert such to epoch
<shevy> b3itz well i you use ruby to invoke it anyway, the shebang line won't be invoked
_djbkd has quit [Remote host closed the connection]
<P-NuT> Yes I do, it returns that exact string. The variable is details[1]
<shevy> but yeah, using bin/bash for ruby code is weird
<shevy> *if you use ruby
<b3itz> thanks boss
<shevy> b3itz but that error does not make any sense really
<jenrzzz> P-NuT: just call #strftime on the datetime
<P-NuT> brilliant, thansk mate
<b3itz> you're right, it doesn't... but idk it works now lol
<jenrzzz> P-NuT: http://foragoodstrftime.com might be of use
<shevy> you are not loading other files so the above message about a LoadError should not occur
<shevy> good!
sepp2k has joined #ruby
djbkd has joined #ruby
DjDeaf_ has joined #ruby
it0a has quit [Ping timeout: 264 seconds]
benzrf is now known as benzrf|offline
nucatus has quit [Remote host closed the connection]
DjDeaf has quit [Ping timeout: 245 seconds]
livinded has left #ruby ["WeeChat 1.0"]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimbach has quit [Remote host closed the connection]
andrewlio has quit [Remote host closed the connection]
razieliyo has joined #ruby
b3itz has quit [Ping timeout: 246 seconds]
vifino has joined #ruby
jimmyhoughjr has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
KC9YDN-2 has quit [Remote host closed the connection]
jerius has quit []
DjDeaf_ has quit [Ping timeout: 265 seconds]
DjDeaf has joined #ruby
<P-NuT> jenrzzz: That works great for a date object, but the time does not work...
jhwhite has quit [Quit: jhwhite]
<zenspider> yes it does
janmuffino has quit [Quit: Page closed]
<P-NuT> I get 00:00
allcentury has quit [Ping timeout: 245 seconds]
lmickh has quit [Remote host closed the connection]
<apeiros> jnylen, P-NuT: DateTime, not Date
<jenrzzz> P-NuT: #strftime or Date.parse?
DjDeaf has quit [Read error: No route to host]
DjDeaf_ has joined #ruby
himsin has quit [Quit: himsin]
<jenrzzz> since the year is at the end of that string for some reason, it can't automatically parse it
<zenspider> just use Time
<zenspider> it works great
JerryRishna has quit [Ping timeout: 240 seconds]
<apeiros> Date does not have a time part
<apeiros> which is why you get 0 for hour & minute if you use Date instead of DateTime
<zenspider> >> require "time"; Time.parse "Mon Sep 29 08:37:36 2014"
<eval-in__> zenspider => 2014-09-29 08:37:36 +0000 (https://eval.in/217505)
<jenrzzz> derp
Darryl_ has quit [Quit: Connection closed for inactivity]
JerryRishna has joined #ruby
<zenspider> parsing works fine with the year on the end... not sure WHY it should... but it does
<jenrzzz> lol
dkb20k has joined #ruby
<zenspider> >> require "time"; Time.parse "Mon Sep 29 08:37:36 2015"
<eval-in__> zenspider => 2015-09-29 08:37:36 +0000 (https://eval.in/217506)
x1337807x has joined #ruby
<zenspider> >> require "time"; Time.parse("Mon Sep 29 08:37:36 2015").strftime("%Y-%m-%d")
<eval-in__> zenspider => "2015-09-29" (https://eval.in/217507)
<jenrzzz> >> require 'time'; Time.parse 'Mon Sep 08:37:36 29 2015'
<eval-in__> jenrzzz => 2015-09-29 08:37:36 +0000 (https://eval.in/217508)
<jenrzzz> that shit is magical
luckyruby has quit [Ping timeout: 255 seconds]
<jenrzzz> >> require 'time'; Time.parse 'Sep Mon 08:37:36 2015 29'
<eval-in__> jenrzzz => 2015-09-29 08:37:36 +0000 (https://eval.in/217509)
<jenrzzz> whaaat
DjDeaf_ has quit [Remote host closed the connection]
theotherstupidgu has quit [Ping timeout: 272 seconds]
BAMbanda has joined #ruby
<zenspider> it's not magical... it's just gross and slow as a result
<jenrzzz> you can always use strptime if you know the format
<BAMbanda> Hello, I'm trying to install -v 1.8.1 of the json gem, but am getting an intall error
dkb20k has quit [Ping timeout: 244 seconds]
<zenspider> "Cannot allocate memory"
<zenspider> seems important
jhwhite has joined #ruby
<BAMbanda> yeah but what would be the cause of that?
<zenspider> wait... what the fuck?
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> BAMbanda: how about no free memory
<jenrzzz> BAMbanda: what command did you run?
<zenspider> looks like you're pasting the console terminal output into the terminal
<zenspider> -bash: Cannot: command not found
<zenspider>
DjDeaf has joined #ruby
<BAMbanda> nah i think that was a mistake when trying to copy the terminal output from putty
<BAMbanda> putty doesn't like right clicks
<hakunin> completely bizarre… still trying to figure out what jenrzzz i believe tried to help with last night
<P-NuT> jenrzzz: It's strftime
<BAMbanda> jhass, how much memory does a simple json gem need?
<jhass> BAMbanda: not much. Compiling it probably a bit more
<jenrzzz> BAMbanda: it's compiling native extensions
<BAMbanda> how do i get it to not do so?
<jenrzzz> don't install it
<jhass> by not using it
<zenspider> BAMbanda: then don't paste an error to us and expect us to be able to help
<BAMbanda> zenspider, woah, did i do something wrong?
<zenspider> we're happy to help, but not with misinformation like that
<apeiros> I find it amazing how people insist that ruby should figure out the format for them when parsing the time. instead of just providing it with the format…
<jenrzzz> hakunin: what about what?
<hakunin> sidekiq runs a bunch of jobs (at concurrency 20), but eventually stops finding the "convert" command on all 3 servers, i hardcoded convert path to /usr/local/bin/convert, so now it just errors out on that command without a message after like 5-10minutes of processing thousands of jobs
<apeiros> IMO it should be Date.guess
<apeiros> instead of Date.parse
<zenspider> BAMbanda: yes, you pasted your terminal output into your input and expected us to be able to help
<zenspider> try again
<apeiros> maybe people would be less inclined to blindly use it…
<jenrzzz> hakunin: what error?
<zenspider> Date/Time.guess would be awesome
<jenrzzz> apeiros: +1 for that
spyderma_ has quit [Remote host closed the connection]
<hakunin> jenrzzz: no message, just that the convert command fialed
spyderman4g63 has joined #ruby
<zenspider> if Time.parse was FAST and only provided 3-4 formats, I'd LOVE that
spyderman4g63 has quit [Remote host closed the connection]
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has quit [Quit: Leaving]
<hakunin> so basically i am forced to sit here and restart sidekiq every 10-20minutes
<hakunin> to get through this batch
<jenrzzz> hakunin: convert failed, or the same "convert not found" we had yesterday?
<apeiros> I'd prefer Time.parse not guessing formats
<hakunin> jenrzzz: no, this time no longer command not found, STDERR is empty
<zenspider> hakunin: running out of pids or other resources?
<jenrzzz> whaaat
<apeiros> it could provide some symbolized formats for "quick access". and for the rest - format string.
<hakunin> jenrzzz: but posix-spawn reports this as an error
<hakunin> zenspider: i was frantically checking ram, and lsof | wc -l
<BAMbanda> zenspider: http://pastie.org/9696544
<BAMbanda> same thing
<hakunin> zenspider: those are far within limits
<jenrzzz> BAMbanda: free -m ?
agjacome has quit [Quit: leaving]
<hakunin> zenspider: i wonder what other resources these could be
<hakunin> hdd space is fine
dkphenom has joined #ruby
<jenrzzz> hakunin: have you tried rescuing the call to convert(1) in your worker and retrying it?
<BAMbanda> jenrzzz: http://pastie.org/9696547
<hakunin> jenrzzz: i tried rescuing and logging, but that somehow never ran
<hakunin> (i re-raise it)
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BAMbanda> solid 135 mb
<hakunin> jenrzzz: zenspider: these operations are also S3 upload/download bound, but if i launch a console and try to the rendering manually (while server is failing non stop) it works
P-NuT has quit [Quit: Leaving]
<jenrzzz> BAMbanda: yeah, you're probably gonna need at least 300 MB to compile it
freerobby has quit [Quit: Leaving.]
<hakunin> so it's not throttling or anything…
oo__ has quit [Remote host closed the connection]
<jenrzzz> BAMbanda: but if that's a problem, you can just use the pure-Ruby JSON module in stdlib
<hakunin> another thing i did - disabled newrelic, and it held on for closer to 20 minutes without failing
<zenspider> turn swap on
<BAMbanda> cool thanks guys
BAMbanda has quit []
<hakunin> i have no idea if that was coincidence
<hakunin> zenspider: not enough pids - is that the same as lsof? or different resource
<jenrzzz> how many converts do you have running at once?
<hakunin> ah different
DjDeaf has quit [Remote host closed the connection]
<hakunin> jenrzzz: each of the 20 concurrent threads runs one identify/convert/file at a time
<hakunin> so 20
<hakunin> i mean, inside thread it's procedural of course
jobewan has quit [Quit: Leaving]
<jenrzzz> hmmm
Takle has quit [Remote host closed the connection]
<hakunin> huh i actually have a fairly low limit on pids
<hakunin> wonder how to find out how many are in use
<hakunin> only 32k limit
<hakunin> maybe not that low
<jenrzzz> ps aux | wc -l ?
<hakunin> if that shows everything, then only 100 in use currently, but not sure if it's all of them
<hakunin> when i run strace - i see never-ending "attaching […]"
<jenrzzz> strace against the sidekiq process or convert?
<hakunin> sidekiq
<hakunin> at that point no more convert
<hakunin> when it fails convert never starts
<hakunin> and each job just goes to retry
x1337807x has joined #ruby
timonv_ has joined #ruby
<jenrzzz> does it take a while for sidekiq to get into that state or do jobs start failing right away?
oo_ has joined #ruby
<jenrzzz> also what ruby are you running?
Deele has quit [Ping timeout: 260 seconds]
<hakunin> jenrzzz: always takes a while
<hakunin> jenrzzz: sometimes 5-15mins
<hakunin> jenrzzz: on these machines 2.1.3p242
lw has joined #ruby
lw has quit [Max SendQ exceeded]
<hakunin> (bootstrapped them just days ago)
jonr22 has joined #ruby
lw has joined #ruby
jhwhite has quit [Quit: jhwhite]
<hakunin> so after restart sidekiq definitely doesn't fail
claw has joined #ruby
<hakunin> for a while
lw has quit [Max SendQ exceeded]
axl_ has quit [Quit: axl_]
einarj_ has joined #ruby
<hakunin> and in console manually on the same machines they don't fail
claw___ has quit [Ping timeout: 264 seconds]
<jenrzzz> you said you're using posix-spawn, right? have you tried with Kernel#system or something else in stdlib?
badhatter has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
<hakunin> jenrzzz: i can hack that in to replace posix-spawn
jack_rabbit has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
<hakunin> jenrzzz: actually both paperclip and my posix-spawn fial
<hakunin> fail
badhatter has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<hakunin> jenrzzz: paperclip auto-selects a strategy with their cocain lib
Kricir has quit [Remote host closed the connection]
lw has joined #ruby
melik has joined #ruby
<hakunin> jenrzzz: i really think this is so obscure that almost hopeless to debug without some deep tracing…
lw has quit [Max SendQ exceeded]
<hakunin> jenrzzz: unless you've seen it before specifically :(
livingstn has quit []
<jenrzzz> hakunin: oh, so it's actually paperclip that's invoking convert?
oo_ has quit [Ping timeout: 265 seconds]
<hakunin> jenrzzz: there are 2 things that invoke convert, paperclip, and my own lib that uses posix-spawn directly
lw has joined #ruby
<hakunin> jenrzzz: both are involved
lw has quit [Max SendQ exceeded]
einarj has quit [Ping timeout: 258 seconds]
g0bl1n has joined #ruby
lw has joined #ruby
<hakunin> jenrzzz: right now i have things in failing state, let me paste some log exactly
<jenrzzz> hakunin: hmmm. yeah, maybe you could remove posix-spawn and change your lib's invocation and see if shit's still broke
lw has quit [Max SendQ exceeded]
jonr22 has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
lw has joined #ruby
jimbach has joined #ruby
jaequery_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xuerian has quit [Ping timeout: 258 seconds]
allcentury has quit [Ping timeout: 244 seconds]
KC9YDN has joined #ruby
<hakunin> jenrzzz: wtf… now (having not changed anything yet) i'm consistently seeing another error, and no longer the command error. This error is paperclip
<hakunin> jenrzzz: paperclip's validation of mime type claiming it's "spoofed"
<hakunin> jenrzzz: but from experience i know that this is often because image file is corrupt or similar
<hakunin> jenrzzz: it uses file command to check it and fails
kirun has quit [Quit: Client exiting]
<hakunin> not hdd space issue, not lsof issue, not ram issue
<jenrzzz> hakunin: what distro are you using, and what is it running on?
<hakunin> digitalocean ubuntu 14.04
<hakunin> 8gb servers
treehug88 has quit []
<jenrzzz> have you checked your syslog for anything extraordinary?
<jenrzzz> or dmesg
jimbach has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 264 seconds]
<hakunin> jenrzzz: yes and syslog is devoid of any problems
Pupeno has joined #ruby
larissa has joined #ruby
<hakunin> dmesg too
failshell has quit [Remote host closed the connection]
<DTSCode> does ruby have a compiler?
DrCode has joined #ruby
<jenrzzz> i think removing posix-spawn would probably be the next thing to try
<jenrzzz> since everything that uses it seems to be failing
pietr0 has quit [Ping timeout: 244 seconds]
<jenrzzz> DTSCode: not really
Pupeno_ has quit [Ping timeout: 244 seconds]
<hakunin> jenrzzz: i have also seen many "command not found" errors coming from cocaine before, as i was changing things, and so i hardly suspect posix-spawn, although can try of course
codecop has quit [Remote host closed the connection]
* DTSCode knows his next project
sinkensabe has joined #ruby
<jenrzzz> i think cocaine will use posix-spawn if it's available though, right?
<hakunin> jenrzzz: i really appreaciate how much effort you put into investigating this, it seems pretty hopeless without some hands-on digging… i was hoping to do auto-restart but even that is difficult because sidekiq sometimes gets stuck on trying to stop
<jenrzzz> you're distracting me from boring work
<jhass> DTSCode: you might be interested in crystal-lang.org
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenrzzz> also i'm still not sure if i want to use resque or sidekiq in this project
<akamel> hey does anyone know where im selecting these html elements incorrectly. I keep getting watir.rb:17:in `block in <main>': undefined method `inner_html' for nil:NilClass (NoMethodError)
<jenrzzz> so this is useful experience
<hakunin> jenrzzz: heh, sidekiq has been solid aside from this
skolman_ has quit [Remote host closed the connection]
<hakunin> jenrzzz: my main suspicion has been that somewhere ENV is lost, or PATH
skolman_ has joined #ruby
<hakunin> jenrzzz: in ruby threads
<hakunin> but i can't recall any reason why threads would lose ENV or PATH
<hakunin> it definitely smells like a race condition
<DTSCode> interesting
<jenrzzz> akamel: use listing.at_css
<jenrzzz> akamel: or listing.css.first
<akamel> ill try it
<akamel> thank you jenrzzz
thagomizer has joined #ruby
<hakunin> btw not sure if relevant but i've seen quite a lot of "-1 EAGAIN (Resource temporarily unavailable)" in strace, but google seemed to not care for it
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Ping timeout: 250 seconds]
hamakn has joined #ruby
tokik has joined #ruby
sinkensabe has quit [Ping timeout: 250 seconds]
<jenrzzz> hakunin: how does posix-spawn invoke a process?
nfk has quit [Quit: yawn]
pietr0 has joined #ruby
<hakunin> jenrzzz: great question… the answer is somewhere in here: https://github.com/rtomayko/posix-spawn/blob/master/ext/posix-spawn.c
<hakunin> jenrzzz: i read about its special use of pfork or something
timonv_ has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
<jenrzzz> akamel: what's wrong?
Wolland_ has quit [Remote host closed the connection]
jaequery has quit [Max SendQ exceeded]
oo_ has joined #ruby
<akamel> jenrzzz: i pm'ed you
<jenrzzz> yeah lets do it here though
<jenrzzz> most people are smarter than me
jaequery has joined #ruby
Pupeno_ has joined #ruby
<akamel> both methods seemed not to work when trying css.first or at_css(
Pupeno has quit [Ping timeout: 245 seconds]
<akamel> Error when trying `first': undefined method `times' for "td>h5>a":String (NoMethodError)
<akamel> from watir.rb:16:in `block in <main>'
<akamel> code object[:address] = listing.css.first("td>h5>a").inner_html
<jenrzzz> akamel: you're passing the argument to #first. it should go to #css
<jenrzzz> akamel: listing.css('td > h5 > a').first
Musashi007 has quit [Quit: Musashi007]
zorak8 has quit [Ping timeout: 272 seconds]
mois3x has joined #ruby
porfa has quit [Quit: porfa]
einarj_ has quit [Remote host closed the connection]
<akamel> jenrzzz: so i got rid of inner_html on line 16 and it ran
porfa has joined #ruby
<akamel> thank you!
mois3x has left #ruby [#ruby]
<akamel> now i just need to get the inner html
<jenrzzz> akamel: it ran, but did it do the right thing?
<akamel> lol
icarus has joined #ruby
<akamel> would .content or .text work for nokogiri
icarus has quit [Changing host]
icarus has joined #ruby
<akamel> rather than inner_html
oo_ has quit [Ping timeout: 258 seconds]
<jenrzzz> hakunin: i suppose you could glean something from reading the posix_spawnp(3) man page, but we don't know if that's actually related to the problem
<jenrzzz> hakunin: really need more data :/
benzrf|offline is now known as benzrf
<hakunin> jenrzzz: i know i know
Authenticator has joined #ruby
bluehavana has joined #ruby
MattB has joined #ruby
<MattB> Hi, is there a better way to manipulate an array than Array#map, if not using the enumerated values directly?
<MattB> Let me give an example:
<MattB> by_week = [5,4,3,2,1]
<MattB> by_week.map!.with_index { |v, i| by_week[i..by_week.count].sum}
<MattB> => [15,10,6,3,1]
<eam> why do you have map! at all?
<zenspider> don't use bang methods unless you really mean it
<zenspider> and you don't
<eam> it's a no-op
lampd1 has joined #ruby
<MattB> Well, I don't need the values of the array after the transformation, but regardless, using map without using the enumerated value seems... wrong
<eam> sorry, not a no-op
<akamel> jenrzzz: thanks for pointing me to the cheat sheet
<akamel> i didnt realize by using .first you could no longer run a method on it
freerobby has joined #ruby
<zenspider> if you don't need the values, then map is exactly the wrong method to use
<zenspider> what are you ACTUALLY trying to do?
lampd1 has quit [Remote host closed the connection]
<akamel> jenrzzz: i removed first and just used .inner_text and it worked
<MattB> [5,4,3,2,1] => [15,10,6,3,1]
lampd1 has joined #ruby
<MattB> so, each element of the array becomes the sum of itself plus all values that follow it...
<zenspider> if you don't need the values, then [5,4,3,2,1] => <void>
<jenrzzz> akamel: sweet! yeah you may want to read up on the API docs cause it sounds like you're a little fuzzy on what objects you're actually working with
<MattB> I don't need the original values, hence map!
mattstratton has joined #ruby
<Authenticator> MattB: Would you like something more like by_week.length.times.collect {|i| by_week[i..-1].sum }
<MattB> But is there a better way?
<Authenticator> MattB: That might be clearer that you're collecting the result of a function of i, not v and i... Is that what you want?
<MattB> Authenticator, that could work.
<jenrzzz> wait what, ranges have a #sum method?
<zenspider> (n**2 + n)/2 == (1..n).sum
<zenspider> no need to do a sum at all
<MattB> Ah, sorry, forgot that the sum method is a Rails value add...
<zenspider> >> 5.times.map { |n| n+=1; (n*n + n) / 2 }.reverse
<eval-in__> zenspider => [15, 10, 6, 3, 1] (https://eval.in/217528)
<MattB> lets just pretend :)
<zenspider> >> 5.downto(1).map { |n| (n*n + n) / 2 }
<eval-in__> zenspider => [15, 10, 6, 3, 1] (https://eval.in/217529)
<gr33n7007h> p = Proc.new{ |n| (1..n).inject(:+) }; [5,4,3,2,1].map(&p)
eshy has quit [Remote host closed the connection]
<zenspider> ugh
<zenspider> no
<jenrzzz> lol
<jenrzzz> MattB: what are you actually trying to do here?
<Authenticator> It depends, is the [5,4,3,2,1] a constant - can we simplify it, or are those just sample numbers?
<MattB> Just a sample...
<MattB> Could be any quantity of any numbers.
eshy has joined #ruby
<zenspider> >> 100.downto(1).map { |n| n+=1; (n*n + n) / 2 }
<eval-in__> zenspider => [5151, 5050, 4950, 4851, 4753, 4656, 4560, 4465, 4371, 4278, 4186, 4095, 4005, 3916, 3828, 3741, 3655, 3570, 3486, 3403, 3321, 3240, 3160, 3081, 3003, 2926, 2850, 2775, 2701, 2628, 2556, 2485, 2415, 23 ... (https://eval.in/217530)
<zenspider> still easy and closed form. no work
djstorm has quit [Ping timeout: 264 seconds]
<MattB> I also then need to convert those numbers to a percentage of the total of all the number in the array.
<MattB> by_week.map! { |v| (v.to_f/total*100.0) }
snath has quit [Ping timeout: 264 seconds]
<MattB> (where total is [array].sum or equiv
<jenrzzz> MattB: why do you need to do this?
<MattB> I have them both as one map operation: by_week.map!.with_index{|v, i| (by_week[i..by_week.count].sum.to_f/total*100.0)}
<MattB> User chort analysis
<MattB> cohort
oo_ has joined #ruby
<MattB> Percentage of users logging in n weeks after sign-up
Spami has joined #ruby
<zrl> I have some text with new lines in it. Something along the lines of "Lorem\nipsum". I'd like to create a regex to check whether that text matches the string "Lorem ipsum". It's currently not matching due to the new lines.
jimms has joined #ruby
<zenspider> >> a = 5.downto(1).map { |n| (n*n + n) / 2 }; sum = a.inject(&:+).to_f; a.map! { |n| n / sum }; a
<eval-in__> zenspider => [0.42857142857142855, 0.2857142857142857, 0.17142857142857143, 0.08571428571428572, 0.02857142857142857] (https://eval.in/217531)
<jenrzzz> zrl: add multiline option /regex/m
<zenspider> again, not hard and doesn't require all that index crap
<zenspider> zrl: that's because it _doesn't_ match "Lorem ipsum"
<zrl> jenrzzz: i have that. to my understanding, that allows . to match newlines as well as any character.
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<MattB> @zenspider - Give me a minute to get my head around that one! :-)
<zrl> zenspider: right. what's an example regex that would allow newlines or spaces in the string?
<zenspider> zrl: you should bookmark the ruby quickref
<zenspider> this is exactly what it is for
<jenrzzz> zrl: http://rubular.com
<zenspider> but to answer your question: /[\n ]/ or /(\n| )/ would both work. just say exactly what you want and regexps will behave
Axy has quit [Ping timeout: 255 seconds]
TinkerTyper has quit [Ping timeout: 250 seconds]
<zrl> zenspider: thanks! bookmarked, had no idea that existed and it looks super useful. thanks for putting that together!
<jenrzzz> zenspider: ditto
oo_ has quit [Ping timeout: 255 seconds]
thumpba has quit [Ping timeout: 256 seconds]
<zenspider> my pleasure. enjoy
TinkerTyper has joined #ruby
<zrl> jenrzzz: rubular is awesome! i should have been far clearer in my original question, but i do appreciate you bringing it up again.
Musashi007 has joined #ruby
<jenrzzz> zrl: it was clear enough, i just didn't read it well :P
vifino has quit [Ping timeout: 244 seconds]
linojon has quit [Quit: linojon]
nateberkopec has quit [Quit: Leaving...]
<MattB> @zenspider, that's so much better, thank you!
<zenspider> and O(n)
<MattB> Let me throw in one last wrinkle. The values start off in a hash, not an array, and I need them as an array with numeric (index) keys. (Don''t ask!)
renderful has quit [Remote host closed the connection]
Areessell_ has joined #ruby
<MattB> {indifferent_key => 5, key2 =>7, blah_key => 2}
russt has quit [Quit: russt]
<mdarby> I can't exist without Rubular
<jenrzzz> MattB: do you want them in the same order as they are in the hash, or is there some mapping between hash key and array index?
<MattB> Same order, so it would end up with {0 => percent, 1 => percent2 etc...}
<MattB> I'm doing {}.values, then finishing up with Hash[result]
<Authenticator> What I mean is, is it just a trivial math problem? The sum of a range of integers? (n..N).to_a.sum? Or is the point of it the index manipulation and the example was just poor?
<MattB> Just wanted to check that I'm not missing a trick
<Authenticator> vowels = %w(a e i o u) ; vowels.length.times.collect {|i| vowels[i..-1].sum } => ["aeiou", "eiou", "iou", "ou", "u"]
Areessell__ has joined #ruby
<MattB> With: values = Hash[(0...by_week.size).zip(by_week)]
AlSquirrel has quit [Ping timeout: 245 seconds]
Areessell_ has quit [Ping timeout: 272 seconds]
michael3 has quit [Ping timeout: 240 seconds]
roger_rabbit has joined #ruby