apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p598: 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
enebo has quit [Quit: enebo]
apeiros_ has joined #ruby
BRMatt has left #ruby [#ruby]
<havenwood> fedora_newb: It seems yajl does have a number of Windows issues with open pull requests. redis-dump has been alpha for an awfully long time, I'm not sure it'll ever be revived?
awerush has joined #ruby
Xiti has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
<TheNet> say I have an array that stores references to objects. then I clone that array. does the new array reference the original objects or cloned objects?
TgMts_ has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
CpuID2 is now known as CpuID
iMe has joined #ruby
TgMts has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
FrancisClampazzo has joined #ruby
apeiros_ has quit [Ping timeout: 255 seconds]
<fedora_newb> Error installing redis-dump:
<fedora_newb> ERROR: Failed to build gem native extension. Rolled back to ruby 1.9 and getting this now
livingstn has joined #ruby
FrancisClampazzo has left #ruby [#ruby]
jimms has quit [Remote host closed the connection]
Sawbones has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL has quit []
<meatchicken> fedora_newb: do you have build tools installed for your platform?
flaccid_ has joined #ruby
<fedora_newb> meatchicken, not sure?
<fedora_newb> new to ruby
atomical has joined #ruby
<havenwood> fedora_newb: If only you were on Fedora... :)
<fedora_newb> lol
<fedora_newb> old nick from back in the day ;)
<havenwood> fedora_newb: They have a great, up-to-date package.
tunaCanBruh has quit [Ping timeout: 255 seconds]
Prawnzy has quit [Quit: ZNC - http://znc.in]
<fedora_newb> Well, I am trying to install this redis-dump but keeps on failing
<fedora_newb> :(
craigp has quit [Remote host closed the connection]
<havenwood> fedora_newb: Looks like they have a number of pull requests pending that fix Windows Ruby issues. You might be able to use those patches, but it looks like a pain to sort out for Win with that Gem.
<havenwood> fedora_newb: Not all gem authors with native extensions play nice with Win.
<meatchicken> I didn't even know he was on windows
<meatchicken> did he state that?
tvw has quit []
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> meatchicken: The pastebin revealed so.
<meatchicken> ah
<meatchicken> fedora: there is a ruby-devkit package that usually solves gem building errors
<meatchicken> fedora_newb: **
<jhass> TheNet: let's try:
flaccid_ has quit [Ping timeout: 246 seconds]
<fedora_newb> D:\Projects> gem install ruby-devkit
<fedora_newb> ERROR: Could not find a valid gem 'ruby-devkit' (>= 0) in any repository
<jhass> >> a = ["foo"]; b = a.clone; a.first.equal? b.first
<eval-in__> jhass => true (https://eval.in/287409)
<jhass> TheNet: so the answer is yes
Dreamer3__ has quit [Quit: Leaving...]
JoshGlzBrk has joined #ruby
<meatchicken> fedora_newb: Never mind - I just checked out your pastebin. You already have it
<havenwood> meatchicken: It looks DevKit was already added to the PATH. I think it's the gem's extension not being compatible with Win.
mroach has joined #ruby
TgMts_ has quit [Quit: http://quassel-irc.org - Bate-papo confortável em qualquer lugar.]
rubytor has quit [Ping timeout: 256 seconds]
<jhass> >> a = ["foo"]; b = a.dup; a.first.equal? b.first # TheNet same for dup, shallow too
<eval-in__> jhass => true (https://eval.in/287410)
jlast has joined #ruby
qhartman has joined #ruby
<meatchicken> fedora_newb: The quick solution is
<meatchicken> stop developing on windows. Use something like nitrous.io for now
TgMts has joined #ruby
<fedora_newb> Well, I have an ubuntu vm
<fedora_newb> I could use
<TheNet> jhass: thanks
<meatchicken> That would work too
rbennacer has joined #ruby
<TheNet> jhass: is there a better way to do something like this then?: a = "foo"; b = [a.clone]? (not that I'm complaining, that's pretty concise)
<TheNet> ignore that second question mark...
jenrzzz has joined #ruby
<jhass> if you need just that one layer, I'd say do b = a.map(&:dup)
sudog has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
jottr has quit [Quit: WeeChat 1.1.1]
Rollabunna has joined #ruby
fungoat has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
skj3gg has joined #ruby
multi_io_ has joined #ruby
fungoat has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
fungoat has joined #ruby
ixti has joined #ruby
jlast has quit [Ping timeout: 246 seconds]
zorak_ has quit [Quit: Leaving]
multi_io has quit [Ping timeout: 246 seconds]
zorak8 has joined #ruby
valkyrka has joined #ruby
it0a has joined #ruby
shaquile has quit [Ping timeout: 252 seconds]
shaquile has joined #ruby
<meatchicken> TheNet: what's wrong with b = ["foo".clone]
fungoat has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheNet> meatchicken: absolutely nothing
paradisaeidae has joined #ruby
<jhass> meatchicken: with literally that expression? you make a useless instance of "foo"
CpuID has quit [Quit: This computer has gone to sleep]
oo_ has joined #ruby
Yzguy has joined #ruby
<meatchicken> jhass: Well for his example. not that literal expression. if he were receiving "foo" as an arg for example
joast has joined #ruby
rbennacer has quit [Remote host closed the connection]
<jhass> I guess we're both jus guessing what their real problem is
joast has quit [Client Quit]
<TheNet> meatchicken: I just didn't want to write .clone for every object in the array
centrx has quit [Ping timeout: 265 seconds]
<TheNet> wasn't familiar with .map
skj3gg has quit [Quit: ZZZzzz…]
freerobby has joined #ruby
Lemur has joined #ruby
pwnz0r has joined #ruby
oo_ has quit [Remote host closed the connection]
skj3gg has joined #ruby
Lemur has quit [Remote host closed the connection]
iMe has quit [Ping timeout: 256 seconds]
rbennacer has joined #ruby
jen_ has left #ruby [#ruby]
oo_ has joined #ruby
iMe has joined #ruby
rbennacer has quit [Remote host closed the connection]
joast has joined #ruby
joast has quit [Client Quit]
devdazed has joined #ruby
sevenseacat has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
bim has joined #ruby
goodenough has quit [Remote host closed the connection]
bim_ has joined #ruby
bim has quit [Client Quit]
FooMunki_ has joined #ruby
ghr has joined #ruby
valkyrka has quit [Ping timeout: 252 seconds]
iwishiwerearobot has joined #ruby
bim_ has left #ruby [#ruby]
karmatr0n has quit [Remote host closed the connection]
rbennacer has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
rubytor has joined #ruby
centrx has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
CpuID has joined #ruby
sargas has joined #ruby
reinaldob has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
skj3gg has joined #ruby
<shadoi> I'm curious why you are cloning strings?
nb_bez___ has quit [Quit: Connection closed for inactivity]
iwishiwerearobot has quit [Ping timeout: 250 seconds]
ghr has quit [Ping timeout: 264 seconds]
pwnz0r has quit [Remote host closed the connection]
nii236|irssi has joined #ruby
pwnz0r has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sawbones has joined #ruby
nii236|irssi is now known as nii236
flaccid_ has joined #ruby
BlakeRG has quit [Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!]
danofsatx-lt has joined #ruby
danofsatx-lt has left #ruby ["So long, y'all!"]
pwnz0r has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nobitanobi has joined #ruby
goodenough has joined #ruby
reinaldob has joined #ruby
dopiee has quit [Quit: Leaving]
reinaldob has quit [Remote host closed the connection]
iMe has quit [Ping timeout: 256 seconds]
dopie has joined #ruby
tmtwd has quit [Remote host closed the connection]
reinaldob has joined #ruby
iMe has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
<dopie> on the ruby instagram gem how do limit the amount of tweets that appear??
<dopie> lik ei only want the first 3 tweets to appear
<sevenseacat> tweets from instagram?
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<sevenseacat> whats next, likes on twitter?
skj3gg has quit [Quit: ZZZzzz…]
Tuxero has quit [Quit: Tuxero]
reinaldob has quit [Ping timeout: 264 seconds]
tunaCanBruh has joined #ruby
<dopie> hahahahaha
JoshGlzBrk has joined #ruby
<dopie> crap
<dopie> on the ruby twitter gem how do limit the amount of tweets that appear??
<sevenseacat> what code do you have so far?
flaccid_ has quit [Quit: flaccid_]
TgMts has quit [Ping timeout: 255 seconds]
TgMts has joined #ruby
tunaCanBruh has quit [Ping timeout: 250 seconds]
<sevenseacat> so what does home_timeline return
josephndenton has quit [Ping timeout: 244 seconds]
tokik has joined #ruby
<dopie> an array
Channel6 has joined #ruby
zachrab has joined #ruby
<sevenseacat> and how do you only select the first three elements of an array?
<dopie> .take(2)
<dopie> .take(3)
<dopie> ?
skj3gg has joined #ruby
<sevenseacat> try it?
<dopie> sevenseacat, meh
<dopie> :)
ixti has quit [Ping timeout: 264 seconds]
<dopie> i was doing limit instead of take
<dopie> :)
jlast has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
zcreative has quit [Quit: (null)]
Megtastique has joined #ruby
blackmesa has quit [Quit: WeeChat 1.1.1]
baroquebobcat has joined #ruby
tokik has quit [Client Quit]
sudog has joined #ruby
joufflu has joined #ruby
zachrab has quit [Ping timeout: 264 seconds]
rubytor has quit [Ping timeout: 244 seconds]
flaccid_ has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
tokik has joined #ruby
nii236 has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
Sawbones has quit [Remote host closed the connection]
quazimodo has joined #ruby
rubytor has joined #ruby
vt102 has quit [Ping timeout: 250 seconds]
nii236 has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
iMe has quit [Ping timeout: 264 seconds]
mloveless has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
pierre1_ has quit [Quit: Leaving]
oleo is now known as Guest61683
longfeet has quit [Ping timeout: 252 seconds]
oleo__ has joined #ruby
jaequery has joined #ruby
Sawbones has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
BlakeRG has joined #ruby
iMe has joined #ruby
karmatr0n has joined #ruby
dualbus is now known as nausicaa
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest61683 has quit [Ping timeout: 264 seconds]
jaredrhine has joined #ruby
jaequery has quit [Client Quit]
<TheNet> shadoi: I'm sure this isn't the answer you were looking for but I'm working on a better prompt for my app
<TheNet> shadoi: one that does get overridden by puts statements and that has a functioning history
bwilson has joined #ruby
bwilson has quit [Client Quit]
psy__ has quit [Quit: Leaving]
<shadoi> I see
marr has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
joast has joined #ruby
Hobogrammer has joined #ruby
<shadoi> If you're still looking for a short way to dup all strings in an array use: arr.map(&:dup)
nilobject has quit [Quit: nilobject]
joast has quit [Remote host closed the connection]
<TheNet> shadoi: yep that's what I'm doing :D
baroquebobcat has quit [Quit: baroquebobcat]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
AlienPickle has joined #ruby
joast has joined #ruby
rbennacer has quit [Remote host closed the connection]
oo_ has joined #ruby
<AlienPickle> I have a ridiculous question, and I think this is the place to ask it. I've been talking to some VC people about an idea I have for a site - and the closest comperable sort of thing (altho this has NOTHING to do with dating) is an eHarmony or similar type site, where you're matching users by interests. They asked me to get 3x estimates of what that would cost in coder time to put together. I have no clue how to figure that out.
<sevenseacat> AlienPickle: so who's going to code this site
<AlienPickle> So, not beautification but just to put the structure of it in place. Database, sign up and profile creating areas, etc
Lemur has joined #ruby
<sevenseacat> you need to sit down with them and put together a quote
<AlienPickle> well, that's the thing... we'd be hiring it out. But it won't even get that far without having a ballpark of time / cost to begin with
<sevenseacat> and "beautification" is part of the site design
<AlienPickle> well, I mean photoshop time beautification
<AlienPickle> What concerns me is getting the database and the means to get things in and out of it running
<sevenseacat> thats trivial
<sevenseacat> what would concern me is that youve described very vague pieces of functionality, like 'profile creating areas, etc.'
<AlienPickle> I haven't done any rails at all, but I worked at a place that did cloud application metering on a site coded in Ruby. So I've seen a site built but it was a team of like 10 guys banging at it for a year
<sevenseacat> you need to actually expand on what the site needs t odo
<sevenseacat> in detail
<shadoi> AlienPickle: look at the sloccount tool, it has a formula you can tweak for cost of code
<sevenseacat> then sit with a developer and get them to estimate the time for each task
<shadoi> it's mostly bullshit, but .. it's something :)
<AlienPickle> Shadoi, that's interesting. Never heard of it but it might be enough for a start
startupality has quit [Quit: startupality]
<sevenseacat> its not mostly bullshit, its totally bullshit
<AlienPickle> Ok, so essentially the site would allow people who are hunting for news stories to sign up and say "I want to write about products in genre X, Y, Z" and then on the other side the creators of those things sign up and say "My product is in genre X, and here's the full profile about it"
<AlienPickle> matchmaking press to creators who need exposure
<sevenseacat> i didnt say expand on it here
<sevenseacat> i'm telling you what you need to do to put an estimate together
TheNet has quit [Remote host closed the connection]
<AlienPickle> well, that's the gist of it... and my intention is to sketch out exactly what data I need to collect and what we'll do with it. Then I'm going to need a couple people to actually knock it together for us if it goes that far.
Rollabunna has quit [Ping timeout: 245 seconds]
<sevenseacat> sounds like you have a plan.
<AlienPickle> Since I've seen Ruby/rails used before to put sites together fairly rapidly it seemed like the better option if we're going to scratch build something
<AlienPickle> I've been through rubymonk a couple times, so I know enough to be dangerous, but not enough to say "yeah, I can build that"
ghr has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
<AlienPickle> so, as I build this profile of an idea, what's important information to have handy? What's actually a factor in code time in a site like that?
ismaelga has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<AlienPickle> To me it's all web forms that get injected into a database, and then we figure out some algorithm for handing back search results that the user would want to see. I can write all that on paper or pseudo-code. So, what is actually the time consuming part after that?
iMe has joined #ruby
dorei has quit []
ghr has quit [Ping timeout: 250 seconds]
<AlienPickle> I have a perhaps false assumption that behind the magic curtain are gotchas that I'm totally unaware of, like optimizing it for running under load, or something
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
meatchicken has quit [Quit: Page closed]
iamjarvo has joined #ruby
baroquebobcat has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
arescorpio has joined #ruby
freerobby has joined #ruby
robustus|Off has joined #ruby
Lemur has quit [Remote host closed the connection]
robustus|Off is now known as robustus
<quazimodo> i'm on ruby 2.2.0p0 (2014-12-25 revision 49005) [i686-linux]
<quazimodo> getting /home/quazimodo/.rubies/ruby-2.2.0/bin/ruby: warning: RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.
<quazimodo> to be expected?
Lemur has joined #ruby
<sevenseacat> if you're using RUBY_HEAP_MIN_SLOTS, then probably.
havenwood has quit []
<michael_imac> morning guys
michael_imac is now known as michael_mbp
<michael_mbp> QQ.. how can I monkey-patch a method defined in `Module` itself?
mkaesz has joined #ruby
flaccid_ has quit [Quit: flaccid_]
mostlybadfly has joined #ruby
deric_skibotn has joined #ruby
Lemur has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<quazimodo> sevenseacat: no idea where I am :/
<sevenseacat> probably in some special GC fix you added somewhere
<sevenseacat> or whatever you're using to install ruby, added somewhere
Deele has quit [Ping timeout: 245 seconds]
banister has joined #ruby
mkaesz has quit [Ping timeout: 256 seconds]
TgMts has quit [Ping timeout: 246 seconds]
zacts has joined #ruby
Sawbones has quit [Remote host closed the connection]
TgMts has joined #ruby
awerush has quit [Ping timeout: 246 seconds]
lys has joined #ruby
it0a has quit [Quit: WeeChat 1.1.1]
zyxelthrone has joined #ruby
razieliyo has quit [Ping timeout: 255 seconds]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
djbkd has joined #ruby
mloveless has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<eam> michael_mbp: like this
jlast has joined #ruby
<eam> >> Module.class_eval { def Module.class_eval; "here's what I do now"; end }; Module.class_eval
<eval-in__> eam => "here's what I do now" (https://eval.in/287474)
Rollabunna has quit [Quit: Leaving...]
it0a has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
jonathanwallace has quit [Ping timeout: 252 seconds]
<dopie> sevenseacat, btw thank you!!
<sevenseacat> yw :)
hamakn has joined #ruby
<dopie> although you don't have a dick I consider you a dick but a stern mentor
jlast has quit [Ping timeout: 250 seconds]
<sevenseacat> i take that back
hamakn has quit [Read error: Connection reset by peer]
iMe has joined #ruby
<dopie> hahahahahahhahaa!!!!!
hamakn has joined #ruby
Akagi201_ has quit []
jlast has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
<dopie> sevenseacat, I LIKE you :) hehehe
hamakn has quit [Read error: Connection reset by peer]
hamakn_ has joined #ruby
TgMts has quit [Quit: No Ping reply in 180 seconds.]
JDiPierro has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
amclain has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
braincra- has joined #ruby
Takle has quit [Remote host closed the connection]
longfeet has joined #ruby
TgMts has joined #ruby
braincrash has quit [Ping timeout: 250 seconds]
jonr22 has quit [Remote host closed the connection]
TgMts has quit [Client Quit]
neoxquick has quit [Read error: Connection reset by peer]
iwishiwerearobot has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TgMts has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
mailo has quit [Quit: Leaving...]
zacts has joined #ruby
TgMts has quit [Quit: No Ping reply in 180 seconds.]
BigRonnieRon has joined #ruby
rbennacer has joined #ruby
FooMunki_ has quit [Quit: FooMunki_]
davedev24_ has quit []
it0a has quit [Ping timeout: 256 seconds]
iMe has quit [Ping timeout: 240 seconds]
jen_ has joined #ruby
ghr has joined #ruby
towski_ has quit [Remote host closed the connection]
greenbagels has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
iMe has joined #ruby
greenbagels has joined #ruby
ismaelga has joined #ruby
towski_ has quit [Remote host closed the connection]
uptownhr has joined #ruby
michael_mbp has quit [Excess Flood]
jen_ has left #ruby [#ruby]
michael_mbp has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
ismaelga has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cheerio]
tunaCanBruh has joined #ruby
skj3gg has joined #ruby
TgMts has joined #ruby
triple_b has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tuxdna has quit [Ping timeout: 250 seconds]
gr33n7007h has quit [Ping timeout: 250 seconds]
lynxman has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
tuxdna has joined #ruby
gr33n7007h has joined #ruby
lynxman has joined #ruby
rbennacer has quit [Remote host closed the connection]
atomi has quit [Quit: leaving]
mkaesz has joined #ruby
rbennacer has joined #ruby
chipotle has joined #ruby
tunaCanBruh has quit [Ping timeout: 245 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
TgMts has quit [Ping timeout: 246 seconds]
zachrab has joined #ruby
Synthbread has joined #ruby
gsd has joined #ruby
gsd has quit [Max SendQ exceeded]
goodenough has quit [Remote host closed the connection]
nobitanobi has joined #ruby
gsd has joined #ruby
JDiPierro has quit [Remote host closed the connection]
cajone has quit [Remote host closed the connection]
TheNet has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
iamninja has quit [Ping timeout: 240 seconds]
mkaesz has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Remote host closed the connection]
cajone has joined #ruby
adriancb has quit [Remote host closed the connection]
iamninja has joined #ruby
chipotle has quit [Quit: cheerio]
nobitanobi has joined #ruby
adriancb has joined #ruby
krz has joined #ruby
flaccid_ has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
iMe has joined #ruby
claptor has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
shum has quit [Client Quit]
skj3gg has quit [Quit: ZZZzzz…]
flaccid_ has quit [Ping timeout: 250 seconds]
shum has joined #ruby
flaccid_ has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
tus has quit []
<quazimodo> sevenseacat: kitty cat
<quazimodo> i had another interview today
OrbitalKitten has joined #ruby
<sevenseacat> cool.
gr33n7007h has joined #ruby
gr33n7007h has quit [Changing host]
bootstrappm has quit [Ping timeout: 244 seconds]
three18ti has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
luriv_ has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DivineEntity has joined #ruby
FooMunki_ has joined #ruby
jhankins has joined #ruby
oo_ has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
OrbitalKitten has quit [Client Quit]
flaccid_ has quit [Quit: flaccid_]
luriv has quit [Ping timeout: 245 seconds]
codeurge has joined #ruby
ishikawa91 has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
uptownhr has quit [Quit: uptownhr]
Takle has joined #ruby
youngstar has joined #ruby
OrbitalKitten has joined #ruby
versatiletech has joined #ruby
<youngstar> can anyone help me set up a ruby on rails app ongithub
skj3gg has joined #ruby
<jhass> youngstar: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
piotrj has joined #ruby
youngstar has left #ruby [#ruby]
Takle has quit [Ping timeout: 256 seconds]
iMe has quit [Ping timeout: 264 seconds]
brandon__ has joined #ruby
crazymykl has quit [Quit: Konversation terminated!]
crazymykl has joined #ruby
geefolk has joined #ruby
twopoint7182 has joined #ruby
twopoint7182 has quit [Client Quit]
iMe has joined #ruby
nausicaa is now known as dualbus
duncannz has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
lys has quit [Quit: lys]
skj3gg has joined #ruby
assembledbits has joined #ruby
<assembledbits> Hello, anyone here?
ghr has joined #ruby
<assembledbits> I'm having some issues updating gems, certificate issues
<assembledbits> nevermind, fixed it.. sources conflict
<assembledbits> later!
assembledbits has left #ruby ["Leaving"]
ismaelga has joined #ruby
boombadaroomba has quit [Ping timeout: 246 seconds]
athan has quit [Ping timeout: 240 seconds]
maknz has joined #ruby
CpuID has quit [Quit: Leaving]
ghr has quit [Ping timeout: 252 seconds]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
ismaelga has quit [Ping timeout: 256 seconds]
tunaCanBruh has joined #ruby
hakunin has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
adriancb has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
paradisaeidae has quit [Read error: Connection reset by peer]
iMe has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
freerobby has quit [Quit: Leaving.]
jlast has quit [Ping timeout: 265 seconds]
maximski has joined #ruby
mloveless has quit [Read error: Connection reset by peer]
it0a has joined #ruby
mkaesz has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
boombadaroomba has joined #ruby
braincra- has quit [Quit: bye bye]
TheRinger_ has quit [Read error: Connection reset by peer]
kapil___ has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
braincrash has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
mkaesz has quit [Ping timeout: 264 seconds]
BigRonnieRon has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
markfletcher has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjbiddle has joined #ruby
BigRonnieRon has joined #ruby
<tjbiddle> Is there a ruby idom for "If x is greater than y, set x to y" and "If x is lower than y, set x to y" ?
BigRonnieRon has quit [Remote host closed the connection]
<sevenseacat> that just sounds like x = y to me
<shadoi> x > y ? x = y : y = x
<shadoi> or whatever :)
<tjbiddle> Thanks shadoi
OrbitalKitten has joined #ruby
QualityAddict has quit []
iMe has quit [Ping timeout: 250 seconds]
longfeet has quit [Ping timeout: 255 seconds]
jonr22 has joined #ruby
maximski has quit []
iMe has joined #ruby
iwishiwerearobot has joined #ruby
athan has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
psyprus has quit [Ping timeout: 245 seconds]
kyb3r_ has joined #ruby
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Wolfram74 has joined #ruby
<Wolfram74> hey, I have a question
ghostpl_ has joined #ruby
<Wolfram74> I'm trying to pull data from an api
<Wolfram74> but the api doesn't do https requests, so I can't do it client side, it has to be server side
<Wolfram74> i'm using ruby and the sinatra framework, is this a thing that can happen?
<shadoi> do what client side?
jlast has joined #ruby
<Wolfram74> do the api-call and get the data
athan has quit [Read error: Connection reset by peer]
<Wolfram74> I've been learning how to do it with ajax in javascript
Lewix has quit [Remote host closed the connection]
<Wolfram74> but since that's going to be unreliable, I'm wondering if you can make a ruby script do api calls
<shadoi> If you're asking if a client can ask the server to make a request to itself the answer is almost always no.
<Wolfram74> more like client is asking server A to make a request to server B
<Wolfram74> and then server A is going to chew on it and spit something back to client
<TheNet> maybe it would help to say what api?
athan has joined #ruby
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sargas has quit [Quit: This computer has gone to sleep]
<shadoi> as a client you can only ask the server to do what is defined in the API, if the API allows you to make a request elsewhere then tell the API to do that.
<Wolfram74> I understand that the API limits what can be asked from server B
<Wolfram74> I'm wondering how to make server A make the request on behalf of the client
<shadoi> If you have some way to do RPC to the server then you could do what you want with RPC calls
<Wolfram74> googling RPC
Limix has joined #ruby
goodenough has joined #ruby
<shadoi> What you're asking for is basically a way to make a server do anything you ask it to. Which is usually not something that would be publicly accessible, since you could abuse other systems with it.
jlast has quit [Ping timeout: 250 seconds]
it0a has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Ping timeout: 246 seconds]
<Wolfram74> client is using HTTPS, server B is using HTTP, client can not use the API directly, so I make an inbetween so that client asks server A to make the specified API call for it
<Wolfram74> this is not "anything you ask it to"
<shadoi> an SSL proxy?
arescorpio has quit [Excess Flood]
<shadoi> look at tinyproxy (simple) or haproxy (more powerful but complex)
n008f4g_ has quit [Ping timeout: 264 seconds]
amystephen has quit [Quit: amystephen]
sargas has joined #ruby
markfletcher has left #ruby [#ruby]
ebbflowgo has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
Takle has joined #ruby
Aswebb_ has joined #ruby
lightstalker has joined #ruby
iMe has joined #ruby
psyprus has joined #ruby
Soda has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
zachrab has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
rubytor has quit [Remote host closed the connection]
jhankins has quit [Ping timeout: 246 seconds]
ismaelga has joined #ruby
oo_ has quit [Remote host closed the connection]
it0a has joined #ruby
zachrab has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
ismaelga has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
<Wolfram74> somebody in the bathroom suggested looking at httparty
rbennacer has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
Pharaoh2 has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
Pharaoh2 has quit [Max SendQ exceeded]
Pharaoh2 has joined #ruby
ponga has joined #ruby
iMe has joined #ruby
swgillespie has joined #ruby
jaequery has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Deele has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
cobragoat has joined #ruby
krz has quit [Ping timeout: 252 seconds]
werelivinginthef has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
dfinninger has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
psy_ has quit [Ping timeout: 265 seconds]
iMe has quit [Ping timeout: 246 seconds]
iamninja has quit [Ping timeout: 245 seconds]
amclain has quit [Quit: Leaving]
zyxelthrone has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iMe has joined #ruby
kyote has quit [Quit: Updating details, brb]
FooMunki_ has quit [Quit: FooMunki_]
jlast has joined #ruby
psy_ has joined #ruby
FooMunki has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
djellemah has joined #ruby
Aswebb_ has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
Aswebb_ has quit [Read error: Connection reset by peer]
Aswebb_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
krz has joined #ruby
zyxelthrone has joined #ruby
St1gma has joined #ruby
Aswebb_ has quit [Ping timeout: 252 seconds]
Wolfram74 has quit [Remote host closed the connection]
geefolk has quit [Read error: Connection reset by peer]
FooMunki has quit [Quit: FooMunki]
iMe has quit [Ping timeout: 246 seconds]
phutchins has quit [Ping timeout: 264 seconds]
shaquile has quit [Ping timeout: 245 seconds]
<TheNet> dammit Wolfram74 I just wrote your script for you... why'd you have to leave >:L https://gist.github.com/iNety/b43237844b8715448b11
shaquile has joined #ruby
iMe has joined #ruby
yellowgh0st has joined #ruby
Channel6 has quit [Quit: Leaving]
duncannz has quit [Ping timeout: 264 seconds]
it0a has quit [Quit: WeeChat 1.1.1]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tunaCanBruh has joined #ruby
net has joined #ruby
net has quit [Client Quit]
_tpavel has joined #ruby
chrishough has joined #ruby
goodenough has quit []
tunaCanBruh has quit [Ping timeout: 250 seconds]
nahtnam has joined #ruby
ismaelga has joined #ruby
sent1nel has quit [Remote host closed the connection]
sinkensabe has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfinninger has quit [Remote host closed the connection]
Lemur has joined #ruby
duncannz has joined #ruby
ismaelga has quit [Ping timeout: 250 seconds]
lolmaus has quit [Quit: Konversation terminated!]
athan has quit [Ping timeout: 264 seconds]
iMe has quit [Ping timeout: 250 seconds]
iMe has joined #ruby
piotrj has quit [Ping timeout: 246 seconds]
thomas1_ has joined #ruby
piotrj has joined #ruby
josephcs has joined #ruby
josephcs has left #ruby [#ruby]
thomas1_ has quit [Client Quit]
ishikawa91 has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
anarang has joined #ruby
atomi has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
_tpavel has quit [Quit: Leaving]
_tpavel has joined #ruby
mkaesz has joined #ruby
TheRinger_ has joined #ruby
craigp has joined #ruby
kyb3r_ has quit [Quit: Leaving]
jonr22 has joined #ruby
agrinb has quit [Remote host closed the connection]
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iwishiwerearobot has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
jonr22 has quit [Ping timeout: 240 seconds]
mkaesz has quit [Ping timeout: 244 seconds]
deric_skibotn has quit [Ping timeout: 240 seconds]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
tobago has joined #ruby
iMe has quit [Ping timeout: 264 seconds]
jlast has joined #ruby
sinkensabe has quit [Remote host closed the connection]
iMe has joined #ruby
ghostpl_ has joined #ruby
Limix has quit [Quit: Limix]
jlast has quit [Ping timeout: 244 seconds]
_tpavel has quit [Quit: Leaving]
ghostpl_ has quit [Ping timeout: 246 seconds]
sargas has quit [Quit: This computer has gone to sleep]
AlecTaylor has joined #ruby
<AlecTaylor> hi
<AlecTaylor> How do I call a lambda with `.call`?
<AlecTaylor> *without
St1gma has quit [Ping timeout: 250 seconds]
werelivinginthef has joined #ruby
<mozzarella> >> ->(x) { puts x }.('wut')
<eval-in__> mozzarella => wut ... (https://eval.in/287643)
<mozzarella> AlecTaylor: ^
<sevenseacat> thats just a syntactic shortcut for call though, isnt it?
<mozzarella> I think
zyxelthrone has quit [Quit: WeeChat 1.1.1]
iMe has quit [Ping timeout: 252 seconds]
Soda has joined #ruby
werelivinginthef has quit [Ping timeout: 244 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
iMe has joined #ruby
phutchins has joined #ruby
zachrab has joined #ruby
chrishough has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
ikeike443 has joined #ruby
TheNet has quit [Quit: Leaving...]
St1gma has joined #ruby
zachrab has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
versatiletech has quit [Quit: versatiletech]
yellowgh0st has quit [Quit: yellowgh0st]
sinkensabe has joined #ruby
hvxgr has quit [Ping timeout: 252 seconds]
<AlecTaylor> :q
AlecTaylor has quit [Quit: Page closed]
kohgpat has joined #ruby
kohgpat has quit [Client Quit]
<certainty> moin
agrinb has quit [Ping timeout: 265 seconds]
<certainty> lelele xD
baweaver has quit [Read error: Connection reset by peer]
Deithrian has joined #ruby
tagrudev has joined #ruby
sameerynho has joined #ruby
<sevenseacat> lol
jlast has joined #ruby
ismaelga has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
diegoviola has quit [Remote host closed the connection]
rhg135 is now known as rhg135|zzz
jlast has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
ismaelga has quit [Ping timeout: 250 seconds]
DonOtreply has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
yellowgh0st has joined #ruby
jlast has joined #ruby
ghostlines has joined #ruby
iMe has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Soda has quit [Remote host closed the connection]
MasterPiece has joined #ruby
yellowgh0st has quit [Ping timeout: 246 seconds]
yellowgh0st has joined #ruby
Timgauthier has joined #ruby
_Andres has joined #ruby
AlienPickle has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 265 seconds]
nii236 has quit [Quit: Lost terminal]
nii236|irssi has joined #ruby
nii236|irssi is now known as nii236
Pharaoh2 has joined #ruby
zorak8 has joined #ruby
nuck has joined #ruby
yellowgh0st has quit [Client Quit]
djbkd has quit [Quit: Leaving...]
elaptics_away is now known as elaptics
Pharaoh2 has quit [Client Quit]
yellowgh0st has joined #ruby
Mon_Ouie has quit [Ping timeout: 265 seconds]
Megtastique has quit []
Morkel has joined #ruby
aganov has joined #ruby
lolmaus has joined #ruby
mkaesz has joined #ruby
CpuID has joined #ruby
CpuID has joined #ruby
Pharaoh2 has joined #ruby
hvxgr has joined #ruby
fabrice31 has joined #ruby
CpuID has quit [Client Quit]
firc4b4ad0f5 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
firc4b4ad0f5 has quit [Client Quit]
last_staff has joined #ruby
bal has joined #ruby
CpuID has joined #ruby
mkaesz has quit [Ping timeout: 240 seconds]
DEA7TH has joined #ruby
CpuID has quit [Remote host closed the connection]
CpuID has joined #ruby
wldcordeiro has joined #ruby
CpuID has quit [Remote host closed the connection]
CpuID has joined #ruby
Timgauthier has quit [Read error: Connection reset by peer]
CpuID has quit [Changing host]
CpuID has joined #ruby
CpuID has quit [Remote host closed the connection]
CpuID has joined #ruby
jlast has joined #ruby
havenwood has joined #ruby
DEA7TH has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
yellowgh0st_ has joined #ruby
wldcordeiro has quit [Ping timeout: 265 seconds]
yellowgh0st has quit [Ping timeout: 250 seconds]
Crisix has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
karmatr0n has quit [Remote host closed the connection]
Crisix has left #ruby [#ruby]
Morkel has quit [Quit: Morkel]
codecop has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
ARaza has joined #ruby
n1x has joined #ruby
CpuID has quit [Quit: CpuID]
<ARaza> #fuel
Spami has joined #ruby
CpuID has joined #ruby
aapole has joined #ruby
tunaCanBruh has joined #ruby
andikr has joined #ruby
Macaveli has joined #ruby
TheRinger_ has quit [Remote host closed the connection]
agrinb has joined #ruby
CpuID has quit [Remote host closed the connection]
CpuID has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_Andres has quit [Ping timeout: 246 seconds]
CpuID has quit [Remote host closed the connection]
rdark has joined #ruby
CpuID has joined #ruby
tunaCanBruh has quit [Ping timeout: 265 seconds]
yellowgh0st_ has quit [Quit: yellowgh0st_]
apurcell has quit [Quit: Be back later ...]
agrinb has quit [Ping timeout: 265 seconds]
_Andres has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
<ericwood> ruby is dead all hail the csriptinging of ajava
ghostlines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has quit [Remote host closed the connection]
Musashi007 has joined #ruby
fabrice31 has joined #ruby
lxsameer_ has joined #ruby
ghostpl_ has joined #ruby
mkaesz has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
The_Phoenix has joined #ruby
sameerynho has quit [Ping timeout: 255 seconds]
mathie has joined #ruby
lxsameer_ has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Ping timeout: 252 seconds]
leat1 has joined #ruby
ismaelga has joined #ruby
sent1nel has joined #ruby
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
strixd has joined #ruby
rbennacer has joined #ruby
fantazo has joined #ruby
ismaelga has quit [Ping timeout: 250 seconds]
sent1nel has quit [Ping timeout: 265 seconds]
iMe has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
Takle has joined #ruby
rbennacer has quit [Ping timeout: 246 seconds]
iMe has joined #ruby
razieliyo has joined #ruby
iwishiwerearobot has joined #ruby
lidaaa has quit [Ping timeout: 252 seconds]
jonr22 has quit [Ping timeout: 265 seconds]
Takle has quit [Ping timeout: 246 seconds]
<Silex> apeiros: :/
mkaesz has quit [Read error: Connection reset by peer]
iwishiwerearobot has quit [Ping timeout: 250 seconds]
lkba has joined #ruby
_Andres has quit [Ping timeout: 246 seconds]
shredding has joined #ruby
mkaesz has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
_Andres has joined #ruby
lkba_ has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
pwnz0r has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
joonty has joined #ruby
joufflu has quit [Read error: Connection reset by peer]
systemd0wn_ has joined #ruby
jlast has joined #ruby
AlienPickle has joined #ruby
systemd0wn has quit [Ping timeout: 250 seconds]
piotrj has quit [Read error: Connection reset by peer]
DogHackit has quit [Ping timeout: 250 seconds]
DogHackit has joined #ruby
pwnz0r has quit [Ping timeout: 240 seconds]
psy_ has joined #ruby
defrang has joined #ruby
lioninawhat has joined #ruby
psy_ has quit [Max SendQ exceeded]
AlienPickle has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
DEA7TH has joined #ruby
DEA7TH has joined #ruby
qba73 has joined #ruby
terlar has joined #ruby
jlast has joined #ruby
Hobogrammer has quit [Ping timeout: 246 seconds]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
psy_ has quit [Max SendQ exceeded]
einarj has joined #ruby
psy_ has joined #ruby
li0ninawhat has quit [Ping timeout: 265 seconds]
marr has joined #ruby
Takle has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
zachrab has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
dumdedum has joined #ruby
defrang has left #ruby [#ruby]
livathinos has joined #ruby
robbyoconnor has joined #ruby
DonM has joined #ruby
Takle has quit [Ping timeout: 264 seconds]
zacts has joined #ruby
agrinb has joined #ruby
zachrab has quit [Ping timeout: 252 seconds]
Jetchisel has joined #ruby
mkaesz has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
mistermocha has joined #ruby
mkaesz has joined #ruby
Morkel has joined #ruby
agrinb has quit [Ping timeout: 250 seconds]
phutchins has joined #ruby
piotrj has joined #ruby
CustosL1men has quit [Ping timeout: 255 seconds]
mistermocha has quit [Ping timeout: 245 seconds]
n88 has quit [Remote host closed the connection]
olivier_bK has joined #ruby
Zai00 has joined #ruby
Pharaoh2 has joined #ruby
Pharaoh2 has quit [Client Quit]
sinkensabe has quit [Remote host closed the connection]
Bounga has joined #ruby
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
phutchins has quit [Ping timeout: 250 seconds]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
ghostpl_ has joined #ruby
svoop has joined #ruby
alex88 has joined #ruby
Pharaoh2 has joined #ruby
Pharaoh2 has quit [Max SendQ exceeded]
Pharaoh2 has joined #ruby
starfox_sf has joined #ruby
mathie has joined #ruby
Lemur has quit [Remote host closed the connection]
arup_r has joined #ruby
Lemur has joined #ruby
allenn has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
sinkensabe has quit [Remote host closed the connection]
iMe has joined #ruby
Lemur has quit [Ping timeout: 244 seconds]
sinkensabe has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
phansch has joined #ruby
apeiros_ has joined #ruby
davidhq has joined #ruby
ismaelga has joined #ruby
antgel has joined #ruby
sent1nel has joined #ruby
davidhq has quit [Max SendQ exceeded]
sinkensa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
kalusn has joined #ruby
nii236 has quit [Quit: leaving]
davidhq has joined #ruby
sevenseacat has quit [Remote host closed the connection]
havenwood has quit []
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has joined #ruby
ismaelga has quit [Ping timeout: 245 seconds]
mkaesz has quit [Read error: Connection reset by peer]
sent1nel has quit [Ping timeout: 264 seconds]
fabrice31 has quit [Read error: No route to host]
fabrice31 has joined #ruby
chthon has joined #ruby
msgodf has joined #ruby
anarang has quit [Quit: Leaving]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kerrick_ has quit [Ping timeout: 264 seconds]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CustosL1men has joined #ruby
nuck has quit [Quit: Computer has gone to sleep.]
mkaesz has joined #ruby
jimms has joined #ruby
sieve has joined #ruby
Deithrian has quit [Ping timeout: 255 seconds]
jaequery has joined #ruby
davidhq has quit [Ping timeout: 246 seconds]
<featheryahn_> can i used ActionMailer deliver_later on the heroku (basic)? or must i buy a dyno also for testing env?
<featheryahn_> it is compliacated
siso has joined #ruby
<featheryahn_> i know this is the wronge channel maybe
<ddv> heroku is overpriced bs
<featheryahn_> ddv: i know but it is easy
<featheryahn_> ddv: i do not use rails much and this helps with keepting alive something i got inherited (the project)
krz has quit [Ping timeout: 245 seconds]
Number2 has joined #ruby
<featheryahn_> ddv: have you got some alternative with same kinde of management ease?
jlast has joined #ruby
siso has quit [Client Quit]
<featheryahn_> ddv: i do like to send email async... with new rails backgrounde jobs
<ddv> featheryahn_: we use sidekiq for backgrounding
<featheryahn_> ddv: ok but own server yes?
<ddv> yeah
<featheryahn_> ddv: =(
shaquile has quit [Remote host closed the connection]
Deithrian has joined #ruby
livathinos has quit []
jlast has quit [Ping timeout: 265 seconds]
siso has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
jlast has joined #ruby
ajaiswal has joined #ruby
Takle has joined #ruby
davidhq has joined #ruby
jusmyth has joined #ruby
tunaCanBruh has joined #ruby
agrinb has joined #ruby
tesuji has joined #ruby
craigp has joined #ruby
sevvie has quit [Ping timeout: 240 seconds]
mkaesz has quit [Read error: No route to host]
jlast has quit [Ping timeout: 250 seconds]
r08o has joined #ruby
livathinos has joined #ruby
sevvie has joined #ruby
bengalol has joined #ruby
tunaCanBruh has quit [Ping timeout: 240 seconds]
jusmyth1 has joined #ruby
bengalo has quit [Ping timeout: 244 seconds]
agrinb has quit [Ping timeout: 250 seconds]
jusmyth has quit [Ping timeout: 264 seconds]
hs366 has joined #ruby
mkaesz has joined #ruby
kt2 has quit [Quit: ...]
leat1 has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 265 seconds]
amundj has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
m8 has joined #ruby
jusmyth1 has quit [Client Quit]
kt2 has joined #ruby
rdark has quit [Quit: leaving]
iMe has quit [Ping timeout: 264 seconds]
iMe has joined #ruby
jusmyth has joined #ruby
jusmyth has quit [Client Quit]
amundj has joined #ruby
Darryl___ has joined #ruby
aapole has quit [Ping timeout: 246 seconds]
leat has joined #ruby
joonty_ has joined #ruby
amundj has quit [Ping timeout: 246 seconds]
joonty has quit [Ping timeout: 250 seconds]
joonty_ is now known as joonty
tkuchiki has quit [Ping timeout: 252 seconds]
jespada has joined #ruby
paolooo has joined #ruby
jonr22 has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davidhq has joined #ruby
lukaszk has joined #ruby
davidhq has quit [Client Quit]
iwishiwerearobot has joined #ruby
krz has joined #ruby
leafybasil has quit [Remote host closed the connection]
<arup_r> Why not getting the message as I wrote to output - https://gist.github.com/aruprakshit/63c06a405f6b03557407#file-request_process-rb-L56
<arup_r> ?
mkaesz has quit [Read error: No route to host]
rap has joined #ruby
jonr22 has quit [Ping timeout: 250 seconds]
mkaesz has joined #ruby
iwishiwerearobot has quit [Ping timeout: 252 seconds]
ismaelga has joined #ruby
sent1nel has joined #ruby
siso has quit [Quit: siso]
amundj has joined #ruby
lkba_ has quit [Ping timeout: 265 seconds]
ismaelga has quit [Ping timeout: 264 seconds]
sent1nel has quit [Ping timeout: 265 seconds]
decoponio has joined #ruby
duncannz has quit [Remote host closed the connection]
Devoth has joined #ruby
rap has quit [Remote host closed the connection]
siso has joined #ruby
Takle has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CustosL1men has quit [Ping timeout: 246 seconds]
n008f4g_ has joined #ruby
sieve has quit [Quit: Leaving.]
davzie has left #ruby ["WeeChat 0.3.0"]
craigp has quit [Read error: No route to host]
krz has quit [Ping timeout: 255 seconds]
arup_r_ has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
nii236|irssi has joined #ruby
mikecmpbll has joined #ruby
krz has joined #ruby
arup_r has joined #ruby
sieve has joined #ruby
<arup_r> I have fixed my issue as https://gist.github.com/aruprakshit/63c06a405f6b03557407#file-request_process-rb-L86 .. One suggested https://www.ruby-forum.com/topic/208856#908859 .. But where should I put the line STDOUT.sync =true ?
iMe has quit [Ping timeout: 246 seconds]
zachrab has joined #ruby
arup_r_ has quit [Ping timeout: 256 seconds]
jlast has joined #ruby
iMe has joined #ruby
mfoo has joined #ruby
piotrj_ has joined #ruby
CustosL1men has joined #ruby
Allaman has joined #ruby
craigp has joined #ruby
agrinb has joined #ruby
piotrj has quit [Ping timeout: 264 seconds]
zachrab has quit [Ping timeout: 240 seconds]
jlast has quit [Ping timeout: 250 seconds]
mkaesz has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
piotrj_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
mkaesz has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
agrinb has quit [Ping timeout: 250 seconds]
Deithrian has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
Deithrian has joined #ruby
piotrj has joined #ruby
aswen has joined #ruby
starfox_sf has quit [Ping timeout: 255 seconds]
bayarja has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
piotrj has quit [Read error: Connection reset by peer]
GoT has joined #ruby
<bayarja> hello guys
<bayarja> i'm using ruby-2.1.2
<bayarja> with grape api
piotrj has joined #ruby
<bayarja> and how to upload multiple images through grape api
<bayarja> ?
<Devoth> Hey guys. is it possible to strip all line breaks from inside a HTML paragraph in ruby? I'm trying to do it with a regex, but it kinda breaks… /(?<=<p>)((\n[\t ]*)*([^\n])*)+(?=<\/p>)/
<apeiros_> Devoth: you should not use regex to process html
<wasamasa> ^
<apeiros_> use e.g. nokogiri
<DonM> ^
<wasamasa> use nokogiri to get the textual content of a paragraph node, then use regex on it to strip line breaks
<apeiros_> Devoth: obligatory link re regex & html: http://stackoverflow.com/a/1732454/764342
lepht has quit [Quit: Connection closed for inactivity]
<apeiros_> wasamasa: could also use nokogiri to remove <br> nodes
<Devoth> apeiros_: thanks - will check it out
<wasamasa> apeiros_: oh, right
<apeiros_> IMO the better way, since p tags may contain other tags which would get stripped
<wasamasa> apeiros_: well, I thought of CRLF
Takle has joined #ruby
krz has quit [Ping timeout: 255 seconds]
tokik has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
tkuchiki has joined #ruby
sieve has quit [Quit: Leaving.]
leafybasil has joined #ruby
sieve has joined #ruby
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<bayarja> guys how to upload multi images using grape api
lolmaus has quit [Remote host closed the connection]
<apeiros_> bayarja: loop over your images and upload one by one?
<Devoth> apeiros_: One more question if I may - is nokogiri also the preferred way to deal with HTML that comes from exporting docx files as html (I use command line `textutil`)? I'm asking as these HTML files are pure junk. :)
nii236|irssi has quit [Quit: leaving]
<apeiros_> Devoth: pure junk as in invalid syntax, or pure junk as in semantical nonsense?
lolmaus has joined #ruby
<Devoth> apeiros_: semantical nonsense (i use tidy just after textutil)
<apeiros_> then nokogiri, yes
<Devoth> ok, thank you :)
<Devoth> will continue reading :)
piotrj has quit [Remote host closed the connection]
<apeiros_> nokogiri is only not advised when the html is not valid. nokogiri will sanitize it. so depending on whether you can live with its sanitation it's good or bad to use it.
ponga has quit [Quit: Leaving...]
jgt has joined #ruby
<Devoth> got it
fantazo has quit [Quit: Verlassend]
wallerdev has quit [Quit: wallerdev]
ponga has joined #ruby
AlienPickle has joined #ruby
<Macaveli> How to split a string?
<apeiros_> Macaveli: use String#split
<Macaveli> the split string is "_splithere_"
mkaesz has quit [Read error: Connection reset by peer]
<Macaveli> I was looking at wrong split: Splits a BigDecimal number into four parts, returned as an array of values.
<Macaveli> :D
<Macaveli> my bad
livathinos has quit []
livathinos has joined #ruby
mkaesz has joined #ruby
TgMts has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
joonty has quit [Quit: joonty]
piotrj has joined #ruby
<gregf_> >>"foo_splithere_bar_splithere_baz".split("_splithere_")
<eval-in__> gregf_ => ["foo", "bar", "baz"] (https://eval.in/287786)
<bayarja> apeiros_:it with post if post submit failed then it's temp file created unused images
<apeiros_> bayarja: I don't understand
rdark has joined #ruby
<bayarja> sorry my poor english
<Devoth> Macaveli: I'm just starting to learn ruby and had the same thing - seeing people use sub() for replacing strings, whereas in the manual it said it's for substracting numbers ^^
<bayarja> submit form inlcude text information and multiple images
ismaelga has joined #ruby
sent1nel has joined #ruby
livathinos has quit []
livathinos has joined #ruby
ismaelga has quit [Ping timeout: 255 seconds]
sent1nel has quit [Ping timeout: 250 seconds]
reinaldob has joined #ruby
mathie has joined #ruby
amacou has joined #ruby
jgt has quit [Ping timeout: 256 seconds]
psyprus has quit [Ping timeout: 245 seconds]
paolooo has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
avril14th has joined #ruby
reinaldob has quit [Ping timeout: 252 seconds]
mfoo has quit [Quit: Leaving]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reinaldob has joined #ruby
The_Phoenix has quit [Ping timeout: 255 seconds]
psyprus has joined #ruby
<arup_r> Anybody would like to tell me if I understand this principal or not http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern ? My code is https://gist.github.com/aruprakshit/797686aac92d498a2fac
<arup_r> Sorry wrong question I asked
<arup_r> My question is can I improve this code in OOP sense?
tunaCanBruh has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
mkaesz has quit [Read error: Connection reset by peer]
livathinos has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
livathinos has joined #ruby
livathinos has quit [Client Quit]
mkaesz has joined #ruby
iMe has joined #ruby
livathinos has joined #ruby
jlast has joined #ruby
psyprus has quit [Remote host closed the connection]
geefolk has joined #ruby
psyprus has joined #ruby
timonv has joined #ruby
tunaCanBruh has quit [Ping timeout: 264 seconds]
amacou has quit [Remote host closed the connection]
joonty has joined #ruby
amacou has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
lampd1 has quit [Read error: Connection reset by peer]
lampd1 has joined #ruby
jlast has joined #ruby
<avril14th> morning
<arup_r> avril14th: moin
<avril14th> yo arup_r
<arup_r> yo
amacou has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
Guest76 has joined #ruby
Guest76 has quit [Client Quit]
jlast has quit [Ping timeout: 265 seconds]
rshetty has joined #ruby
arup_r has quit [Remote host closed the connection]
loveablelobster has joined #ruby
loveablelobster has quit [Client Quit]
olivier_bK has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
loveablelobster has joined #ruby
<avril14th> arup_r what's wrong with your code?
<ddv> is it possible for a http request to succeed initially, but still calling rescue eventually?
<avril14th> ddv: never managed to get that working
<ddv> I mean the http request succeeded but sometimes it still hits the rescue block
siso has quit [Quit: siso]
<avril14th> I don't get it then :)
jheg has joined #ruby
craigp has quit [Read error: Connection reset by peer]
lxsameer_ has joined #ruby
craigp has joined #ruby
dANO has joined #ruby
qba73 has quit []
jgt has joined #ruby
sinkensa_ has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 264 seconds]
sinkensabe has joined #ruby
systemd0wn has joined #ruby
jonr22 has joined #ruby
jheg has quit [Quit: jheg]
craigp has quit [Ping timeout: 256 seconds]
siso has joined #ruby
iwishiwerearobot has joined #ruby
systemd0wn_ has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
mkaesz has quit [Read error: Connection reset by peer]
serivich has joined #ruby
sieve has quit [Quit: Leaving.]
mkaesz has joined #ruby
startupality has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Ping timeout: 255 seconds]
craigp has joined #ruby
psy_ has quit [Remote host closed the connection]
AlienPickle has quit [Ping timeout: 250 seconds]
Pharaoh2_ has joined #ruby
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
fabrice31 has quit [Remote host closed the connection]
Pharaoh2 has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
startupality has quit [Quit: startupality]
Troy^ has joined #ruby
sent1nel has joined #ruby
ismaelga has joined #ruby
<Troy^> Hi guys I'm using rbenv the global version is set to 2.2.0. But when I use ruby from cli it uses version 2.0.0. This is on osx. How do i force the version to be 2.2.0
Deele has quit [Ping timeout: 245 seconds]
<oddmunds> you can run rbenv local 2.2.0 in your project root
awerush has joined #ruby
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<oddmunds> and it'll make a .ruby-version file that sets 2.2.0
craigp_ has joined #ruby
<oddmunds> sorry, i think rbenv global 2.2.0 is what you're looking for
Mon_Ouie has joined #ruby
<Troy^> i used both and still no luck everytime i type ruby --version i get 2.0.0
sent1nel has quit [Ping timeout: 245 seconds]
<Troy^> .ruby-version shows 2.2.0 when opened in a text editor but that's it.
craigp has quit [Read error: Connection reset by peer]
ismaelga has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
piotrj has quit [Remote host closed the connection]
<Troy^> it's installed /Users/TroyIrvine/.rbenv/versions/2.2.0/bin/ruby is where it's installed
greenbagels has quit [Read error: Connection reset by peer]
rshetty has quit [Remote host closed the connection]
<Troy^> i guess i could source the directory?
zachrab has joined #ruby
iMe has quit [Quit: Bye Bye]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deele has joined #ruby
Darryl___ has quit [Quit: Connection closed for inactivity]
rsavage has joined #ruby
bayarja has quit [Quit: Leaving]
zachrab has quit [Ping timeout: 250 seconds]
gmcintire has quit [Quit: Connection closed for inactivity]
rshetty has joined #ruby
Vivex has joined #ruby
starfox_sf has joined #ruby
aryaching has quit []
dualbus has quit [Quit: WeeChat 1.1]
bruno- has joined #ruby
ismaelga has joined #ruby
jonr22 has joined #ruby
r08o has quit [Quit: Leaving]
craigp has joined #ruby
arup_r has joined #ruby
ajaiswal has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
vtunka has joined #ruby
fabrice31_ has joined #ruby
starfox_sf has quit [Ping timeout: 250 seconds]
mmochan_ has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
bruno- has joined #ruby
craigp_ has quit [Ping timeout: 245 seconds]
startupality has joined #ruby
Allaman has quit [Ping timeout: 250 seconds]
Allamann has joined #ruby
Takle has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 250 seconds]
eshy has joined #ruby
g-nom3 has quit [Ping timeout: 250 seconds]
_Andres has joined #ruby
bruno- has joined #ruby
jlast has joined #ruby
rshetty has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 255 seconds]
jlast has quit [Ping timeout: 245 seconds]
yellowgh0st has joined #ruby
blackmesa has joined #ruby
ixti has joined #ruby
jheg has joined #ruby
rshetty has joined #ruby
shum has joined #ruby
yellowgh0st has quit [Client Quit]
krz has joined #ruby
Nahra has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
Morkel has joined #ruby
Nahra has joined #ruby
aryaching has joined #ruby
g-nom3 has joined #ruby
g-nom3 has quit [Max SendQ exceeded]
arup_r_ has joined #ruby
g-nom3 has joined #ruby
g-nom3 has quit [Max SendQ exceeded]
bruno- has joined #ruby
MasterPiece has quit [Quit: Leaving]
Nahra has quit [Remote host closed the connection]
blizzy has joined #ruby
g-nom3 has joined #ruby
claptor has quit [Quit: this channel is bakas]
g-nom3 has quit [Max SendQ exceeded]
arup_r has quit [Ping timeout: 245 seconds]
g-nom3 has joined #ruby
postmodern has quit [Quit: Leaving]
g-nom3 has quit [Max SendQ exceeded]
g-nom3 has joined #ruby
DadoCe has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
_ixti_ has joined #ruby
joshbamboo1 has joined #ruby
yellowgh0st has joined #ruby
gfawcettpq has joined #ruby
ixti has quit [Ping timeout: 253 seconds]
speakingcode has quit [Ping timeout: 250 seconds]
sieve has joined #ruby
phutchins has joined #ruby
speakingcode has joined #ruby
piotrj has joined #ruby
WildBamboo-Josh has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
joonty has quit [Quit: joonty]
jgt has quit [Ping timeout: 246 seconds]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
paolooo has joined #ruby
cajone has quit [Remote host closed the connection]
rhg135|zzz is now known as rhg135
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
rshetty has quit [Remote host closed the connection]
davedev24_ has joined #ruby
rshetty has joined #ruby
mathie has joined #ruby
yfeldblum has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
TgMts has quit [Ping timeout: 252 seconds]
Troy^ has joined #ruby
ARaza has quit [Remote host closed the connection]
yellowgh0st has quit [Quit: yellowgh0st]
bruno- has quit [Ping timeout: 246 seconds]
yellowgh0st has joined #ruby
cajone has joined #ruby
hiyosi has joined #ruby
nfk has quit [Quit: yawn]
Takle has joined #ruby
allenn has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
cmdr_Red has joined #ruby
sent1nel has joined #ruby
grn has joined #ruby
matled has quit [Remote host closed the connection]
<cmdr_Red> Hello, I'm trying to build Ruby 2.2.0 from source on Linux Mint 17.1 using rbenv ruby-build plugin and I get a build error that Mint is using another build (1.9.1) how can I install the new version?
matled has joined #ruby
jespada has quit [Ping timeout: 246 seconds]
m8 has quit [Quit: Sto andando via]
tunaCanBruh has joined #ruby
agrinb has joined #ruby
matled has quit [Remote host closed the connection]
jespada has joined #ruby
sent1nel has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
matled has joined #ruby
kapil___ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
alfakini has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 264 seconds]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
spyderman4g63 has joined #ruby
gfawcettpq has quit [Remote host closed the connection]
quazimodo has joined #ruby
sameerynho has joined #ruby
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roolo has joined #ruby
roolo has quit [Remote host closed the connection]
shtirlic has quit [Quit: ZNC - http://znc.in]
<avril14th> arup_r_: what do you want to better?
roolo has joined #ruby
roolo has quit [Remote host closed the connection]
lxsameer_ has quit [Ping timeout: 252 seconds]
<avril14th> ah wait
roolo has joined #ruby
shtirlic has joined #ruby
<arup_r_> I'm too much sure.. someone will write better way the same version... so I'm looking for that advises...
snath has quit [Ping timeout: 245 seconds]
livingstn has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Remote host closed the connection]
spyderma_ has joined #ruby
jm0 has joined #ruby
jimms has quit [Remote host closed the connection]
jlast has joined #ruby
tkuchiki has joined #ruby
<avril14th> ok
<avril14th> I'm tweaking it
spyderman4g63 has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
<arup_r_> avril14th: thanks
<jheg> is there a cleaner way to do this …
<jheg> lets say I have a string with is a url
<jheg> str = “some-really-long-url-with-a-number-on-the-end-1333555"
yellowgh0st has quit [Remote host closed the connection]
<jheg> during a while loop im checking to see if that slug already exists
yellowgh0st has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
<jheg> if it doesnt its fine but if it is I need to take off the -1333555
<jheg> this is currently how I do that ...
<jheg> str.split('-').slice(0..-2).join('-')
<apeiros> sub(/\-\d+\z/, '')
jlast has joined #ruby
<apeiros> isn't the point of the number in the slug to make it unique?
Azure has quit [Quit: My MBP went to sleep.]
<jheg> yeah it was a dumb example but after this I then increment a counter and append it back on
joonty has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
mathie has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<apeiros> that sounds still like your underlying approach was, hm, lets say "unconventional"
<jheg> Im pretty sure I’ll never run into an instance where there are 1,333,555 iterations before I find a unique url :)
paolooo_ has joined #ruby
<jheg> I gist my current code
<apeiros> not necessary
tvw has joined #ruby
<apeiros> but afaik, one slug approach is to always append the id and never actually use the slug to find the record
fantazo has joined #ruby
paolooo has quit [Ping timeout: 246 seconds]
ismaelga has joined #ruby
<avril14th> arup_r_: https://gist.github.com/muichkine/66e5735cc97dabfa8a06 I think you could do even better (reduce the whole process to one class).
shredding has quit [Quit: shredding]
<avril14th> it's funny I wrote something similar
<avril14th> mixed up with sidekiq
<jheg> ah that would defo be unique apeiros
yellowgh0st has quit [Quit: yellowgh0st]
dANO has quit [Read error: Connection reset by peer]
<avril14th> to pass jobs around
<arup_r_> let me see
jlast has quit [Ping timeout: 250 seconds]
<jheg> but it would mean that all my urls had a number appended on the end and wouldnt look quite as nice
wpp has joined #ruby
yellowgh0st has joined #ruby
dANO has joined #ruby
wpp has quit [Client Quit]
DadoCe has quit [Remote host closed the connection]
DadoCe has joined #ruby
iwishiwerearobot has joined #ruby
bruno- has joined #ruby
yellowgh0st has quit [Client Quit]
yellowgh0st has joined #ruby
tmtwd has joined #ruby
<apeiros> *sob*, some stuff at the beginning is hard. like: what out of those 100 things I still have to do should I do first?
<jheg> also apeiros the url could have a number in it
<avril14th> arup_r_: I would write the behavior of chain in a module and then have a class tree for the 'usage' of the chain. where you could reduce code by a ton (all redundant code between managers).
AlexRussia has quit [Ping timeout: 255 seconds]
lioninawhat has joined #ruby
yellowgh0st has quit [Client Quit]
yellowgh0st has joined #ruby
<avril14th> then just one class on the side for creating the process and you should be perfect
yellowgh0st has quit [Client Quit]
<arup_r_> You mean mixing ?
<apeiros> jheg: if it always has the id at the end, that doesn't matter
yellowgh0st has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
iwishiwerearobot has quit [Ping timeout: 250 seconds]
<jheg> true
<apeiros> it only matters in your "sometimes there's a number in it"
jimms has joined #ruby
fabrice31 has joined #ruby
<avril14th> arup_r_: yes
<arup_r_> ok
bruno- has quit [Ping timeout: 246 seconds]
<avril14th> and you don't even need to store the list of approvers once the thing is built
<avril14th> so your chain is self contained
yellowgh0st has quit [Client Quit]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<keksike> what is the "!" after method names used for, like def approve!
<avril14th> keksike: methods that change the state of the object its called on
<apeiros> keksike: it's not after the name. it's part of the name
<keksike> avril14th thanks
<avril14th> and yes its part of the name
<keksike> apeiros yeah thats what I meant
TgMts has joined #ruby
siso has quit [Quit: siso]
<avril14th> keksike: it's just a naming convention though
<apeiros> and as per matz himself, ! just means "be careful".
<keksike> yeah
<apeiros> not all mutating methods are named with a !
<keksike> I see
<keksike> thank you
<apeiros> but so far all occasions of a method existing with and without ! means no-! = return new, modified object, while with-! means mutate the object in place.
<jhass> for Ruby core that is
<apeiros> stdlib too, no?
<keksike> should with-! also return the mutated object, or a boolean if the mutation succeeded or not?
<jhass> mh, yeah
<apeiros> keksike: many core methods return nil if there's no change
<keksike> ok
<jhass> but I've seen plenty of gems where it doesn't hold
<apeiros> see String#gsub!, #tr!, #delete! etc.
bjornar has quit [Remote host closed the connection]
<apeiros> sadly there's no consistency. even in ruby core iirc.
<avril14th> true
<avril14th> some array bang methods always return to chain them
<avril14th> some don't
<avril14th> it's a pain
<keksike> so return modified object if success, return nil of no success, this is the "correct" way?
<apeiros> keksike: general rule of thumb: don't chain on bang methods.
<keksike> if no success*
psy_ has quit [Remote host closed the connection]
<apeiros> it's not so much success/no success, but change occurred/no change occurred
<keksike> right
<avril14th> keksike: most common is return nil if state didn't change, otherwise return self
<keksike> allright, thanks :)
<apeiros> yw
JDiPierro has joined #ruby
soulcake has quit [Quit: Quack.]
<apeiros> btw., anybody interested in building a website for this channel?
<apeiros> I'd provide a server
soulcake has joined #ruby
jgt has joined #ruby
<apeiros> or help building
<avril14th> what would that bring? :)
lxsameer_ has joined #ruby
<apeiros> add things like FAQ, public log (if whitequark lets me embedd his log :D), links to resources
ghostpl_ has joined #ruby
jm0 has quit [Ping timeout: 244 seconds]
jm0 has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
Tamae has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
JBreit has joined #ruby
JDiPierro has quit [Remote host closed the connection]
karmatr0n has joined #ruby
JBreit has left #ruby [#ruby]
<waxjar> i'd be happy to help :)
<waxjar> as long as its written in php
piotrj_ has joined #ruby
arup_r_ has quit []
<apeiros> where's that trout when you need it?
<jheg> I’d be happy to help aperios - not sure what I could add but I know enough css and front end
<avril14th> me hands apeiros a trout
krz has quit [Ping timeout: 250 seconds]
* apeiros smacks waxjar around a bit with avril14th's trout
piotrj has quit [Ping timeout: 246 seconds]
<apeiros> jheg: if you can create a nice look, that'd help tremendously
<jheg> btw apeiros lots of code I know but this was it only appends a number if its a duplicate
<apeiros> it's the part where I'm very slow
<jheg> well happy to give it a go
sameerynho has joined #ruby
apurcell has joined #ruby
<apeiros> I can make a public github repo with a rail 4.2 app
<jheg> if its an informational site doesnt need to be flashy - Im guessing just nicely laid out, responsive and easy to navigate
joonty has quit [Quit: joonty]
lxsameer_ has quit [Ping timeout: 244 seconds]
Trynemjoel has quit [Ping timeout: 256 seconds]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
yfeldblum has joined #ruby
iamjarvo has joined #ruby
zachrab has joined #ruby
jm0 has quit [Ping timeout: 246 seconds]
Trynemjoel has joined #ruby
triple_b has joined #ruby
JDiPierro has joined #ruby
<apeiros> yeah, I'd say that fits
krz has joined #ruby
cmdr_Red has quit [Quit: Leaving]
joonty has joined #ruby
<avril14th> I'll do trout support if anyone needs
yfeldblum has quit [Ping timeout: 264 seconds]
<avril14th> got a bunch around
<apeiros> great, great. you shall henceforth be known as the trouter.
zachrab has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
craigp has quit [Ping timeout: 265 seconds]
tier has joined #ruby
apurcell has quit [Ping timeout: 246 seconds]
sent1nel has joined #ruby
craigp has joined #ruby
starfox_sf has joined #ruby
dblessing has joined #ruby
ArchRogem has joined #ruby
dfinninger has quit [Remote host closed the connection]
vtunka has quit [Quit: Leaving]
jgt has quit [Ping timeout: 256 seconds]
utvxee has joined #ruby
hamakn_ has quit [Remote host closed the connection]
piotrj has joined #ruby
iamninja has joined #ruby
Parker0 has joined #ruby
Nahra has joined #ruby
tunaCanBruh has joined #ruby
adriancb has joined #ruby
sent1nel has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
yellowgh0st has joined #ruby
tus has joined #ruby
starfox_sf has quit [Ping timeout: 256 seconds]
piotrj_ has quit [Ping timeout: 265 seconds]
sankaber has joined #ruby
vtunka has joined #ruby
karmatr0n has quit [Remote host closed the connection]
shum has quit [Quit: WeeChat 1.1.1]
shum has joined #ruby
jgt has joined #ruby
livingstn has joined #ruby
coinrookie has quit [Quit: Leaving]
tunaCanBruh has quit [Ping timeout: 252 seconds]
mathie has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
SOLDIERz has quit [Quit: Be back later ...]
reinaldob has quit [Read error: Connection reset by peer]
reinaldo_ has joined #ruby
brb3 has joined #ruby
fmcgeough has joined #ruby
livingstn has quit [Ping timeout: 250 seconds]
ych4k3r has joined #ruby
it0a has joined #ruby
paulfm has joined #ruby
livingstn has joined #ruby
bruno- has joined #ruby
zenith_ has joined #ruby
codeurge has joined #ruby
nateberkope has quit [Quit: Linkinus - http://linkinus.com]
jlast has joined #ruby
skj3gg has joined #ruby
rbennacer has joined #ruby
tkuchiki has quit [Remote host closed the connection]
skj3gg has quit [Client Quit]
pizzaops has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo has joined #ruby
hamakn has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 255 seconds]
ismaelga has quit [Remote host closed the connection]
hamakn_ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
hamakn has joined #ruby
rbennacer has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 250 seconds]
hamakn has quit [Read error: Connection reset by peer]
oleo__ has quit [Ping timeout: 256 seconds]
hamakn has joined #ruby
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
mroach has quit [Quit: mroach]
hamakn has quit [Read error: Connection reset by peer]
jlast has joined #ruby
oleo has quit [Quit: Verlassend]
paulfm has quit [Ping timeout: 240 seconds]
oleo has joined #ruby
Synthbread has quit [Ping timeout: 272 seconds]
amacou has joined #ruby
jlast has quit [Ping timeout: 246 seconds]
aclearman037 has joined #ruby
lioninawhat has quit [Read error: Connection reset by peer]
lioninawhat has joined #ruby
<shevy> trouteiros
<shevy> apeiros with a trout face!
karmatr0n has joined #ruby
ArchRogem has joined #ruby
rbennacer has joined #ruby
amacou has quit [Ping timeout: 264 seconds]
karmatr0n has quit [Remote host closed the connection]
karmatr0n has joined #ruby
Takle has quit [Remote host closed the connection]
tjohnson has joined #ruby
rbennacer has quit [Remote host closed the connection]
jxpx777 has joined #ruby
n1x has quit [Remote host closed the connection]
vyorkin has joined #ruby
amacou has joined #ruby
bruno- has quit [Quit: Lost terminal]
ArchRogem has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
ismaelga has joined #ruby
ArchRogem has joined #ruby
Takle has joined #ruby
banister has joined #ruby
devdazed has joined #ruby
jgt has quit [Ping timeout: 256 seconds]
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
avril14th has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
rbennacer has joined #ruby
paulfm has joined #ruby
zorak8 has quit [Ping timeout: 265 seconds]
amdbcg has joined #ruby
zenith_ has quit [Ping timeout: 255 seconds]
lxsameer_ has joined #ruby
jmignault has joined #ruby
rbennacer has quit [Remote host closed the connection]
sameerynho has quit [Ping timeout: 250 seconds]
jerius has joined #ruby
Parker0 has quit [Ping timeout: 255 seconds]
jlast has joined #ruby
yellowgh0st has quit [Quit: yellowgh0st]
bonhoeffer has quit [Ping timeout: 252 seconds]
zorak8 has joined #ruby
kobain has joined #ruby
charliesome has quit [Quit: zzz]
freerobby has joined #ruby
aclearma_ has joined #ruby
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
centrx has joined #ruby
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
doodlehaus has joined #ruby
centrx has quit [Client Quit]
hs366 has quit [Quit: Leaving]
aclearman037 has quit [Ping timeout: 246 seconds]
skj3gg has joined #ruby
agrinb has joined #ruby
ArchRogem has joined #ruby
sankaber has joined #ruby
bruno- has joined #ruby
mkaesz has quit [Read error: No route to host]
livingstn has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
rbennacer has joined #ruby
devdazed has quit [Quit: Bye]
livingstn has joined #ruby
sambao21 has joined #ruby
last_staff has quit [Remote host closed the connection]
lolmaus has quit [Quit: Konversation terminated!]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agrinb has quit [Ping timeout: 265 seconds]
lolmaus has joined #ruby
aclearma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toretore has joined #ruby
mary5030 has joined #ruby
mathie has joined #ruby
jmignault has quit [Quit: jmignault]
akkmaxon has joined #ruby
aclearman037 has joined #ruby
jmignault has joined #ruby
tunaCanBruh has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
snath has joined #ruby
iamjarvo has joined #ruby
jgt has joined #ruby
sent1nel has joined #ruby
werelivinginthef has joined #ruby
yellowgh0st has joined #ruby
DonOtreply has quit [Quit: DonOtreply]
lxsameer_ has quit [Quit: Leaving]
FooMunki has quit [Quit: FooMunki]
TgMts has quit [Remote host closed the connection]
sent1nel has quit [Ping timeout: 250 seconds]
FooMunki has joined #ruby
tier_ has joined #ruby
mleung has joined #ruby
yxejamir has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
mwlang has joined #ruby
blizzy has quit [Ping timeout: 264 seconds]
jgt has quit [Ping timeout: 246 seconds]
Soda has joined #ruby
zenith_ has joined #ruby
<mwlang> So I am reverse-engineering an existing application which I’ve written some rspec specs independent of the existing app (characterization tests). That app talks to a 3rd party server via SOAP, so I also implemented a mock SOAP server to return the expected response with Sinatra. What I’d like to do is automatically launch the existing app and the sinatra server prior to running the rspec suite. Is Foreman the best way to go about this or
<mwlang> there newer/simpler options nowadays?
tier has quit [Ping timeout: 245 seconds]
ghostpl_ has quit [Remote host closed the connection]
woodyb23 has joined #ruby
djcp has joined #ruby
lampd1 has quit []
nateberkopec has joined #ruby
<jhass> I'd just spawn it in a rake task, store the pid (or use systemd-run if systemd only systems is an option) and take it down with an at_exit hook I guess
<jhass> foreman seems like "I want to run the same stuff as in production" to me
<jhass> then make the spec task depend on said rake task
zenith_ has quit [Read error: Connection reset by peer]
<ponga> shevy: you there
dmbennett has joined #ruby
<shevy> sort of yeah
<yxejamir> Hi all, is there any canonical documentation of Ruby keywords for newer versions of the language than http://ruby-doc.org//docs/keywords/1.9/?
<ponga> shevy: happy new year from korea
<ponga> :)
<shevy> huh? it is new year there?!
<ponga> lunar calendar new year
<shevy> well happy new year to you too! be it taekwondo or bboying, koreans rule
<ponga> china/korea biggest day
<shevy> aha. I am only semi-oblivious as to calendars elsewhere :)
<ponga> 100 million population migration in china
<ponga> lol
<ponga> 100million+ actually
zenith_ has joined #ruby
shellfu has joined #ruby
gr33n7007h has joined #ruby
phansch has left #ruby ["Leaving"]
phansch has joined #ruby
bruno- has joined #ruby
<yxejamir> Also, is there any more official documentation of the language itself than http://www.zenspider.com/Languages/Ruby/QuickRef.html? I mean, anything remotely close to what Python has?
<yxejamir> Thanks, jhass!
<ponga> hm
<ponga> yxejamir: you mean syntax?
<ponga> and style , advice, sort of?
<shevy> keywords_rdoc.html is generated automatically?
yellowgh0st has quit [Quit: yellowgh0st]
yellowgh0st has joined #ruby
yellowgh0st has quit [Client Quit]
yellowgh0st has joined #ruby
<ponga> everytime i hear the word 'oblivious' it sounds kinky and lustful to me
zenith_ has quit [Remote host closed the connection]
Kricir has joined #ruby
<shevy> lol
<ponga> perhaps its because english isn't my first language
<ponga> the sound, you know
DaniG2k has joined #ruby
<shevy> I kind of use oblivious in the sense of not-knowing and forgetful
ghostpl_ has joined #ruby
<ponga> shevy: that's what its supposed to mean sir
<ponga> lol
aclearman037 has quit [Quit: I'm out!]
<shevy> I couldn't even tell you when the arabic world has their starting year
<ponga> but to me " i'm oblivious " = "i love sex and drug"
<ponga> kind of
<shevy> hehe
_1_awslyc has joined #ruby
<ponga> i don't know why, i ask myself many times
<yxejamir> jhass, that page is the portal for built-in classes and methods, the core library, not the language itself. It is like Python’s https://docs.python.org/3/library/index.html. What I am looking for is something anything close to Python’s Language Reference: https://docs.python.org/3/reference/index.html
iwishiwerearobot has joined #ruby
<yxejamir> So yes, syntax &c.
<jhass> yxejamir: you're neglecting the Files section
aclearman037 has joined #ruby
<yxejamir> Oh, cool, so glad I asked. Thanks again, jhass!
_1_awslyc has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aganov has quit [Quit: Leaving]
craigp has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 252 seconds]
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
vtunka has quit [Quit: Leaving]
iwishiwerearobot has quit [Ping timeout: 246 seconds]
zenith_ has joined #ruby
tobago has quit [Remote host closed the connection]
zachrab has joined #ruby
Ankhers has joined #ruby
tagrudev has quit [Remote host closed the connection]
utvxee has quit [Remote host closed the connection]
axl_ has joined #ruby
lolmaus_ has joined #ruby
shredding has joined #ruby
jobewan has joined #ruby
rbennacer has joined #ruby
zachrab has quit [Ping timeout: 250 seconds]
lolmaus has quit [Ping timeout: 240 seconds]
shellfu has quit [Read error: Connection reset by peer]
oleo has quit [Ping timeout: 240 seconds]
d10n-work has joined #ruby
oleo has joined #ruby
mary5030 has quit [Remote host closed the connection]
shellfu has joined #ruby
akkmaxon has quit [Ping timeout: 246 seconds]
akkmaxon has joined #ruby
mleung has quit [Quit: mleung]
johnrover has joined #ruby
jlast_ has joined #ruby
pu22l3r has joined #ruby
jobewan has quit [Remote host closed the connection]
mikepack has joined #ruby
Channel6 has joined #ruby
_tpavel has joined #ruby
Macaveli has quit [Ping timeout: 255 seconds]
johnrover has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 265 seconds]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnrover has joined #ruby
johnrover has left #ruby [#ruby]
n1x has joined #ruby
n1x has joined #ruby
mathie has joined #ruby
jespada has quit [Ping timeout: 245 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
DonM has quit [Quit: DonM]
crueber has joined #ruby
piotrj has quit [Remote host closed the connection]
akkmaxon has quit [Ping timeout: 240 seconds]
banister is now known as banisterfiend
jespada has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
iamninja has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
tagster has joined #ruby
apurcell has joined #ruby
lmickh has joined #ruby
rippa has joined #ruby
agrinb has joined #ruby
anarang has joined #ruby
Dopagod has quit [Ping timeout: 252 seconds]
<mwlang> jhass: I think you may be right about foreman. I also can’t seem to run the servers with specific ruby versions when launched via foreman. What is the at_exit hook?
joonty_ has joined #ruby
dANO__ has joined #ruby
joonty has quit [Ping timeout: 244 seconds]
joonty_ is now known as joonty
rubytor has joined #ruby
SOLDIERz has joined #ruby
apurcell has quit [Ping timeout: 245 seconds]
centrx has joined #ruby
agrinb has quit [Read error: No route to host]
athan has joined #ruby
starfox_sf has joined #ruby
<mwlang> jhass: nvm — that one was easily googleable.
Eiam has quit [Read error: Connection reset by peer]
dANO has quit [Read error: Connection reset by peer]
<jhass> mwlang: well, you can run any command via foreman, no?
SOLDIERz has joined #ruby
bonhoeffer has joined #ruby
akkmaxon has joined #ruby
<mwlang> jhass: I thought I could, but something like this “cd ../2.1 && rvm use 1.8.6 && script/server” doesn’t seem to be working as expected.
sinkensabe has quit [Remote host closed the connection]
<jhass> 1.8.6 oO
<bonhoeffer> i’m seeing text like this from cat, “URCHASES ^M^L^MTo contact us regarding your ac” is there a way to find the control characters?
<jhass> mwlang: but probably needs to go through a shell, wrap in /bin/bash -c
<mwlang> the rvm part will complain that its not a shell script, but if I remove that, then the .ruby-version file in the ../2.1 folder isn’t honored.
<mwlang> jhass: Ah! I didn’t think of that trick.
<bonhoeffer> like, what is the hex value from ^M ? or even what is the encoding/header of the file?
jmignault has quit [Quit: jmignault]
agrinb has joined #ruby
havenwood has joined #ruby
<jhass> bonhoeffer: ^M means Ctrl+C, so just ruby -r'io/console' -e "p STDIN.getch" ;)
starfox_sf has quit [Ping timeout: 250 seconds]
<jhass> er, Ctrl+M
jonr22 has joined #ruby
akkmaxon has quit [Quit: akkmaxon]
<mwlang> ^M is DOS/Windows CR/LF
<jhass> bonhoeffer: and man ascii ;)
<bonhoeffer> where is the documentation on this?
<jhass> mwlang: just \r here
rubytor has quit [Ping timeout: 264 seconds]
<jhass> bonhoeffer: what this specifically now?
<bonhoeffer> how do i tell if the file is ascii or UTF-8 ?
_ixti_ has quit [Ping timeout: 244 seconds]
<bonhoeffer> and where is something like ^M documented?
markfletcher has joined #ruby
<bonhoeffer> in the ascii spec?
<jhass> uh, probably somewhere in POSIX and/or the vt101 stuff
hollywood has joined #ruby
<mwlang> jhass: you’re right. bonhoeffer: http://www.robelle.com/smugbook/ascii.html
Morkel has quit [Quit: Morkel]
<jhass> bonhoeffer: and you have to know basically, though the `file` command is pretty good at guessing it
guanophobic has quit [Quit: leaving]
<jhass> re file encoding
_ixti_ has joined #ruby
<bonhoeffer> interesting — so what does f.each_line parse off of
wottam has joined #ruby
<jhass> what?
<bonhoeffer> (i guess i could look at source . . . ) — but cr + lf or similar
bal has quit [Quit: bal]
<jhass> still not getting you there
mikecmpb_ has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
<bonhoeffer> sublime opens the file in what i call correct formatting, but f.each_line seems to jumble it all together
mikecmpbll has quit [Read error: Connection reset by peer]
<bonhoeffer> more displays everything with ^M
<bonhoeffer> cat puts everything on one line . . .
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<mwlang> bonhoeffer: more than likely, its ASCII, then since only the CR Hex 0D is present and marking EOL (end of line).
nolic has joined #ruby
<bonhoeffer> agreed — how can i see the hex?
DonOtreply has joined #ruby
<jhass> hexdump
amacou has quit [Remote host closed the connection]
alex88_ has joined #ruby
guanophobic has joined #ruby
<bonhoeffer> interesting . . . thanks
<mwlang> I’s suggest trying f.read.map{|m| m.split(“\r”)} if you’re wanted to load the file and each line as an array of strings.
sent1nel has joined #ruby
<mwlang> c/wanted/wanting/
joonty has quit [Ping timeout: 245 seconds]
adamjleonard has joined #ruby
joonty has joined #ruby
<bonhoeffer> hmm . . . or convert the file to something that each_line parses the way i want
sambao21 has quit [Quit: Computer has gone to sleep.]
<bonhoeffer> i can save from sublime with any encoding
krz has joined #ruby
triple_b has joined #ruby
alex88 has quit [Ping timeout: 240 seconds]
<jhass> maybe you just don't specify the right encoding when you open that file and Encoding.default_external doesn't match it either
<bonhoeffer> agreed
<jhass> so I'd make sure your system locale is a UTF-8 one and that the file is saved as UTF-8
ZoanthusR has joined #ruby
sent1nel has quit [Ping timeout: 265 seconds]
jaequery has joined #ruby
sambao21 has joined #ruby
jaequery has quit [Max SendQ exceeded]
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
jaequery has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
piotrj has joined #ruby
arup_r has joined #ruby
DadoCe has quit [Remote host closed the connection]
adamjleonard has quit [Quit: Leaving...]
bootstrappm has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
mkaesz has quit [Read error: Connection reset by peer]
bootstrappm has quit [Remote host closed the connection]
krz has joined #ruby
yellowgh0st has quit [Quit: yellowgh0st]
mkaesz has joined #ruby
versatiletech has joined #ruby
piotrj has quit []
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
ZoanthusR has quit [Ping timeout: 276 seconds]
chrishough has joined #ruby
yellowgh0st has joined #ruby
lolmaus_ has quit [Quit: Konversation terminated!]
gfawcettpq has joined #ruby
Rapier- has joined #ruby
jmignault has joined #ruby
Doc_X has quit [Quit: 0.4.3]
bruno- has quit [Read error: Connection reset by peer]
Doc_X has joined #ruby
bonhoeffer has joined #ruby
fabrice31 has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 264 seconds]
wpp has joined #ruby
fabrice31 has joined #ruby
|insufficientfun has joined #ruby
livathinos has quit []
nobitanobi has joined #ruby
|insufficientfun has left #ruby [#ruby]
sinkensabe has joined #ruby
zenith_ has quit [Ping timeout: 256 seconds]
Doc_X has quit [Client Quit]
Doc_X has joined #ruby
<bonhoeffer> i’m definitely not getting a match . . . https://gist.github.com/tbbooher/f376ff97688a39e14073
adrianpacala has joined #ruby
<bonhoeffer> strange — inside sublime regex, the match works great
<bonhoeffer> system is utf-8, file is saved correctly
TgMts has joined #ruby
sent1nel has joined #ruby
<jhass> bonhoeffer: try an unconditional p(line)
zenith_ has joined #ruby
Pharaoh2 has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
<jhass> as a style note, always use the block form of File.open, also check File.foreach
adriancb has quit [Remote host closed the connection]
<bonhoeffer> ok — p(line) shows \r line breaks
Pharaoh2 has quit [Max SendQ exceeded]
<jhass> more importantly does it show the numbers correctly?
dblessing has joined #ruby
Pharaoh2 has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bonhoeffer> yes as \r10/17 SPRINGHILL SUITES MANCHES
<jhass> also, your sample text looks like spam
<jhass> are you writing a spam bot?
<bonhoeffer> i want to match in ^\d{2}\/\d{2}
<bonhoeffer> nospam
<jhass> ah, ^ matches \n, having plain \r without \n's is silly
jheg has quit [Quit: jheg]
<jhass> what's that for then?
Macaveli has joined #ruby
<bonhoeffer> yeah — interesting — i should be able to save it with the correct line returns
hollywood has quit [Ping timeout: 244 seconds]
<bonhoeffer> this is a just a credit card statement — i’m trying to pull the transactions from the pdf for tax planning
<toretore> it's splitting on \n, thus the first character is \r, not \d
<toretore> each_line(/\r?\n/)
dfinninger has joined #ruby
dfinninger has quit [Remote host closed the connection]
wpp has quit [Quit: ZZZzzz…]
<bonhoeffer> ah — that makes sense
dfinninger has joined #ruby
<jhass> toretore: that should leave trailing \r's not preceding ones, no?
stunder has joined #ruby
<toretore> though actually \r should be last on each line
<toretore> yeah
<jhass> bonhoeffer: so you copy pasted that from a PDF?
_tpavel has quit [Quit: Leaving]
<toretore> hard to say more without information
<bonhoeffer> nope — saved pdf as text
<bonhoeffer> via acrobat
shepherd has joined #ruby
<jhass> mmh, might still explain why it's so strange
adriancb has joined #ruby
<bonhoeffer> you can save as text (plain) or text (accessible)
<bonhoeffer> from acrobat
<toretore> gist: 1) the entire ruby script 2) the entire source file 3) the entire output
<arup_r> toretore: Long time no see.. How are you ?
<toretore> i'm good, how ar eyou?
<toretore> as separate files
<arup_r> fine.. learning Ruby...
nobitanobi has quit [Remote host closed the connection]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> not shoved together into one
dmbennet_ has joined #ruby
<arup_r> shevy: is missing from this channel
DaniG2k has quit [Ping timeout: 245 seconds]
Takle has quit [Ping timeout: 240 seconds]
DivineEntity has quit [Ping timeout: 256 seconds]
einarj has quit [Remote host closed the connection]
codeurge has joined #ruby
Livadi has quit [Ping timeout: 276 seconds]
neoxquick has joined #ruby
dmbennett has quit [Ping timeout: 244 seconds]
chinmay_dd has joined #ruby
DaniG2k has joined #ruby
FooMunki has quit [Quit: FooMunki]
ghostlines has joined #ruby
Devoth has quit [Ping timeout: 250 seconds]
gr33n7007h has quit [Remote host closed the connection]
<toretore> there's no \r in the file you gisted, unless github is doing something with it
<toretore> anyway, doesn't your bank let you download other formats?
<bonhoeffer> not far back
<toretore> ok
Takle has joined #ruby
<bonhoeffer> just 90 days — and there are 10 different bank i’m trying to automate this for . . . plus i’m trying to learn as well how to do text processing
<bonhoeffer> learning a good bit already — very appreciative
gattie has joined #ruby
mistermocha has joined #ruby
<toretore> irb(main):005:0> File.read('txt').each_line.each_with_object([]){|l,a| a << l.chomp if l =~ /^\d/ }
<toretore> => ["01/21 AUTOMATIC PAYMENT - THANK YOU -57.34 ", "01/12 NETFLIX.COM NETFLIX.COM CA 7.99 "]
cpt_yossarian has quit [Remote host closed the connection]
thebastl has joined #ruby
<havenwood> bonhoeffer: File.readlines('chase_amazon_text3.txt').grep(/^\d{2}\/\d{2}/).map(&:chomp)
<bonhoeffer> readlines . . .
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> bonhoeffer: That'd ^ be the lines starting with two digits, a slash then two more digits, then whatever.
<bonhoeffer> all works if i copy and paste into a new text file and save
mistermo_ has joined #ruby
sieve has quit [Quit: Leaving.]
phutchins has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
nobitanobi has joined #ruby
gattie has quit [Client Quit]
FooMunki_ has joined #ruby
hollywood has joined #ruby
<toretore> p File.read(file); #then gist it
n1x has quit []
Macaveli has quit [Ping timeout: 240 seconds]
mistermocha has quit [Ping timeout: 246 seconds]
<bonhoeffer> ok — one sec — this is interesting — i’ve been getting my code to convert all transactions from the pdf into csv
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sent1nel has quit [Read error: Connection reset by peer]
mxrguspxrt has joined #ruby
sent1nel has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<toretore> anyone ever had native code gem installs fail without an error? Error installing unicorn: ERROR: Failed to build gem native extension. /opt/rubies/1.9.3-p392/bin/ruby extconf.rb
baroquebobcat has joined #ruby
dualbus has joined #ruby
mary5030 has quit [Ping timeout: 265 seconds]
mathie has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<toretore> i can go and manually run extconf.rb and it works
DrShoggoth has joined #ruby
gsd has joined #ruby
psy_ has joined #ruby
cpt_yossarian has joined #ruby
psy_ has quit [Max SendQ exceeded]
<jhass> toretore: btw 1.9.3 has less than a week till EOL ;)
psy_ has joined #ruby
<toretore> i know, don't care ;)
<havenwood> toretore: Your Ruby will turn into a zombie, hide the brains!
<toretore> bonhoeffer: so why is this file different from the last one?
<jhass> mmh, should've guessed from not even running the latest patchlevel
<bonhoeffer> that is what i’m trying to figure out
woodyb23 has quit [Ping timeout: 252 seconds]
<toretore> well, to begin with, it's obviously not the same file. so where did this one come from?
<toretore> and where did the previous one come from?
<toretore> they have different histories
balazs has joined #ruby
R1chK has joined #ruby
paolooo_ has quit [Quit: Page closed]
<bonhoeffer> yep — the first comes from saving from acrobat — the other is a copy of those contents from sublime and paste into sublime
DivineEntity has joined #ruby
giuseppesolinas has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobogrammer has joined #ruby
<toretore> so then you know..
<toretore> and there is no more problem
cajone has quit [Remote host closed the connection]
<bonhoeffer> yes — so i can copy/paste the file — but it would be great to know why — i’ll keep poking around and share if i find anything interesting
danman has joined #ruby
Bounga has quit [Quit: Bounga]
<toretore> the why is hidden inside acrobat reader, the pdf spec and the way it interacts with your os' copy/paste mechanism
Freelusion has joined #ruby
zenith_ has quit [Read error: Connection reset by peer]
<toretore> meaning, don't waste time on it
<toretore> use the export function
gfawcettpq has quit [Ping timeout: 264 seconds]
skj3gg has quit [Quit: ZZZzzz…]
<bonhoeffer> fair enough
<bonhoeffer> thanks for the help
<toretore> np
mikecmpbll has joined #ruby
<toretore> now someone help me or i'll call the police
Tuxero has joined #ruby
<shevy> lol
tunaCanBruh has quit [Ping timeout: 244 seconds]
mikecmpb_ has quit [Ping timeout: 245 seconds]
Lemur has joined #ruby
<jhass> please call the police and record the reaction for our entertainment
<shevy> toretore I've had these errors sometimes when I ran something indirectly, like bundler or so. when I was in the same directory, and run extconf.rb directly, I (almost) always know which error there is
<toretore> but when i run it directly it doesn't fail
<toretore> it's as if it doesn't even try
DrShoggoth has quit [Quit: Leaving]
<shevy> toretore sometimes an error can be "masked" when something higher on the chain fails; I had such failures with GNU autoconfigure + libtool, sometimes not even config.log showed the real error
<toretore> shit
<shevy> yeah, it's weird that running things directly often works better
<toretore> just what i need
<ponga> shevy:
<ponga> have you heard of openworm project
bonhoeffer has quit [Quit: bonhoeffer]
<shevy> I know what an earthworm is but I don't know of openworm
<shevy> ponga to be honest, I mostly only know a bit about ruby these days, I have forgotten most everything else :)
cajone has joined #ruby
banister has joined #ruby
pengin has joined #ruby
<ponga> shevy: no its not about ruby
<ponga> its a project where they claim they created a fully functioning creature thingi
mxrguspxrt has quit [Remote host closed the connection]
<ponga> like they coded the whole neuron map
Pawky|2 has joined #ruby
phansch has quit [Ping timeout: 255 seconds]
DrShoggoth has joined #ruby
<ponga> entire thing
<toretore> but does it have a soul?
<ponga> toretore: it seems to claim to go beyond that :p
<ponga> i wonder if its a scam, it raised $120K in kickstarter
<Pawky|2> I am trying to convert ruby code to perl, having no clue about ruby, could any of you help me out a bit? :-) http://pastebin.com/h4kmCqcJ
<shevy> ponga ah ok. Well I am biased... I think to build real intelligence you need to model things just as they are in real life, and you can't do that with the hardware of today really
<toretore> Pawky|2: first step, stop using pastebin
<ponga> shevy: exactly same as my opinion
<Pawky|2> toretore: ehh thats a worlds first...
shredding has quit [Quit: shredding]
<ponga> you know im on NLP side of ai, and i believe we need correct hardware
<Pawky|2> everywhere else if not using it people go nuts, now using it you go nuts... has the world come to an end?
zenith_ has joined #ruby
<toretore> Pawky|2: 2nd step: don't try to convert, just rewrite the thing in perl
<ponga> Pawky|2: people who are in IT are nuts
giuseppesolinas is now known as Peppuz
<ponga> this is the answer
<toretore> Pawky|2: what i'm saying is use gist.github.com or pastie.org instead
<Pawky|2> toretore: thanks for that suggestion, but as the API I am trying to use has no example code whatsoever, this is my only option
<toretore> pastebin sucks horse cock
CustosL1men has quit [Ping timeout: 246 seconds]
DivineEntity has quit [Ping timeout: 264 seconds]
msgodf has quit [Ping timeout: 240 seconds]
strixd has quit [Quit: 500]
<Pawky|2> toretore: well, I respect your oppinion, but I think it will work for now, don't you think.. I mean its already pasted..
spyderma_ has quit [Ping timeout: 252 seconds]
<shevy> ponga that worm, C. elgans, is kinda cool though. it always has a fixed amount of cells. 131 cells die through apoptosis (=self-programmed cell death) in the course of its development
<toretore> so what you want is to understand what the ruby code does?
<ponga> ah yeah, shevy you learnt some chemistry right?
<ponga> bio thingi
<shevy> I think 959 for hermaphrodites, and 1031 for female XX worms survive
Takle has quit [Remote host closed the connection]
<shevy> ponga yeah
<ponga> shevy: so what they claim is they coded the full map of C.elgans neuron map, implemented it into a physics engine that provides liquid for the worm to move on top
alex88_ has quit []
<shevy> they drew the whole fate map of it (e. g., what happens when you start from 1 cell, to all the other cells in the C. elegans adult body -> http://staffweb.hkbu.edu.hk/zyzhao/images/briggsae.jpg the thing on top is the "founder" cell
<ponga> and saying that just by providing the code of neuron map, it acts just like real life C.elgans
sieve has joined #ruby
iwishiwerearobot has joined #ruby
<Pawky|2> The complexity of the original API is that I do not understand how to create the correct HTML requests, the API here is one written to work with the API against the server, thus I am trying to figure out what it does.
<ponga> i mean, can you 'code' C.elgans in programming language?
<ponga> *neuron
<shevy> ponga well
<ponga> can you code neuron
<ponga> in lang
<shevy> ponga the problem is... neurons can change
<Pawky|2> I have figured out how to make the encrypted connection, but beyond that I haven't been able to figure out the other reqests..
<Pawky|2> take the touch method by example..
<shevy> sometimes neurons die, sometimes they can make new connections or intensify existing connections
<shevy> I guess in theory you can simulate it all
maximski has joined #ruby
<Pawky|2> there is some code that goes "res = perform! do |conn| "
<shevy> but I dunno :\
nobitanobi has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 255 seconds]
cajone has quit [Remote host closed the connection]
<Pawky|2> I am very unsure what the |conn| does, I cannot see conn being defined or anyting..
<ponga> shevy: my question is more like, i know there is whole map and all of it, but can you convert that into a program code
<ponga> they claim they did it
maximski has quit [Client Quit]
<jhass> Pawky|2: do end is like an anonymous function, it's called a block, the generic term is closure. The |conn| defines a parameter it takes
balazs has quit [Ping timeout: 252 seconds]
<Pawky|2> more or less any help on figuring out what the requests will be for touch and logout, will give me a head start on how to communicate with the server
sargas has joined #ruby
Lemur has quit [Remote host closed the connection]
<shevy> yeah in theory I suppose... it's a finite problem so it could be solved... but I really don't know. there is the whole field of modeling all cells, such as system biology... but how old is that field, 20 years; artifical intelligence as a whole is how old... 60 years or less?
<toretore> Pawky|2: conn is whatever is returned by the `connection` method
<shevy> I am a notorious sceptic!
<Pawky|2> ok.. :-)
<ponga> shevy: and they say its open source
<ponga> hm
<ponga> they even got github
sent1nel has quit [Remote host closed the connection]
Lemur has joined #ruby
<toretore> shevy: but, but, but... singularity
<Pawky|2> let me think a bit.. :-)
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thumpba has joined #ruby
craigp has joined #ruby
<ponga> toretore: are we getting in the quantum level here
Lildirt has quit [Read error: Connection reset by peer]
DrShoggoth has quit [Remote host closed the connection]
<ponga> but anyway, they seemed to by providing only python api
<ponga> :(
iwishiwerearobot has quit [Ping timeout: 245 seconds]
<ponga> provide ruby too!
pkrzywicki__ has quit [Ping timeout: 246 seconds]
craigp_ has joined #ruby
adriancb has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
<Pawky|2> ok, so so "|conn|" is a block defined when calling "perform!" (where ! means it will modify the block), correct?
bonhoeffer has joined #ruby
<Pawky|2> huh.. that sounded a bit weird..
<jhass> no, the ! is just part of the methods name
nolic has quit [Remote host closed the connection]
<jhass> do |conn| .. end is the block
adriancb has joined #ruby
<jhass> |conn| is the part that defines its parameter
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
Spooner has joined #ruby
Lildirt has joined #ruby
<jhass> yield(connection) is where it's called
mistermocha has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
bricker has joined #ruby
Lemur has quit [Ping timeout: 250 seconds]
<Pawky|2> jhass: can you see what HTTP request will be created in the end when using these functions?... because thats what I am after in the end :-)
joonty has quit [Quit: joonty]
zenith_ has quit [Ping timeout: 250 seconds]
<jhass> conn.put touch_path
davidhq has joined #ruby
zachrab has joined #ruby
skj3gg has joined #ruby
<jhass> which of the HTTP verbs could that be.. ;)
craigp has quit [Ping timeout: 256 seconds]
<Pawky|2> jhass: "login/#{session}" :-)
jmignault has quit [Quit: jmignault]
<jhass> session is @session (defined through the attr_reader at the top)
<Pawky|2> welll.. i meant put.. as a verb of course
<jhass> exactly ;)
tunaCanBruh has joined #ruby
<toretore> session is a string
<toretore> session key
<toretore> set by login
<Pawky|2> jhass: ok... does the "#{ }" mean anything specific for ruby?
OrbitalKitten has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
<Pawky|2> toretore: that i got :-)
jmignault has joined #ruby
Freelusion has quit [Quit: leaving]
DivineEntity has joined #ruby
<jhass> it's efficient and short for "foo " + bar.to_s + " baz"
<ponga> shevy: https://www.youtube.com/watch?v=YWQnzylhgHc it says it implemented the worm into robot
<Pawky|2> i can create the session key.. i just cannot use it afterwards when troing to follow the original API instuctions :-/
<ponga> i wonder if its not fake
<eam> >> "#{%}#{%}#{%}#{%}#{%} }}}}}}}}}}"
<eval-in__> eam => " " (https://eval.in/288112)
<toretore> Pawky|2: is this the api you're using? https://api.test.nordnet.se/projects/api/wiki/REST_API_documentation
<Pawky|2> toretore: yes
kaspertidemann has joined #ruby
<toretore> that looks like documentation to me..
dblessing has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
zachrab has quit [Ping timeout: 264 seconds]
<Pawky|2> toretore: Well... might, but when trying to use it like doing logout like DELETE http://test.api.nordnet/1/NEXTAPI/135232523523525252345 <--- session key it doesnt work..
shum has joined #ruby
ghostlines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Pawky|2> (written from memory
<Pawky|2> )
tjbiddle has joined #ruby
Takle has joined #ruby
deol has joined #ruby
<Pawky|2> toretore: to me, the logout states, just put the session key in the end an it should logout... but no no, no can do :'(
<Pawky|2> so after a long search, the only code found was ruby code.. thats why I am trying to understand it :-)
<jhass> you're probably not using the right HTTP verb
dmbennet_ has quit []
n008f4g_ has joined #ruby
<Pawky|2> et states DELETE for logout..
balazs has joined #ruby
<jhass> yeah
<Pawky|2> PUT for doing a touch..
<jhass> yes
<toretore> who has a session for api users
<Pawky|2> I believe there might be some headers needed
timonv has quit [Ping timeout: 256 seconds]
<Pawky|2> toretore: it that a question?
<toretore> rhetorical
<toretore> it's stupid
dmbennett has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maximski has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> Pawky|2: looks like the ruby script sets HTTP Basic Auth headers
Takle has quit [Remote host closed the connection]
<Pawky|2> toretore: well.. you could always tell that to nordnet.. ;-)
bootstrappm has joined #ruby
<Pawky|2> I just want to use it..
<jhass> with the session key as both user and password
<jhass> it also sets the content type
<jhass> but that you figured I guess
<toretore> which is exactly what the docs say
<Pawky|2> jhass: hmm.. yeah, i thought that was to be done, but their TEST server still screams not authenticated, when using their session-key given in the call before...
dmbennet_ has joined #ruby
cajone has joined #ruby
<Pawky|2> toretore: and its exactly what I am doing, but their #%!! server tells me its wrong :-(
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
<Pawky|2> it is due to their very limited docs and examples making me turn to you guys, you are my obi one kenobies... ;-) (or how its spelled)
<Pawky|2> "my only hope"... B-)
<jhass> Pawky|2: maybe just get wireshark and compare the dumps of the working script vs your script ;)
<Pawky|2> jhass: wont see much will I, its encrypted..
DadoCe has joined #ruby
ismaelga has quit [Remote host closed the connection]
<toretore> login problems are likely because you're not base64-ing and encrypting properly
<jhass> mmh
<jhass> let me try to remember that https proxy name
phutchins has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
<Pawky|2> toretore: hmm.. well.. I am doing it all correctly when authenticating, ass I do get the session-key and the time limit of 300 secs etc..
<Pawky|2> its this session key I am unsure what to do with, any tests gives a negative result.. :-(
dmbennett has quit [Ping timeout: 252 seconds]
<jhass> Pawky|2: http://mitmproxy.org/
yxejamir has quit [Ping timeout: 250 seconds]
rbennacer has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
dmbennet_ has quit [Client Quit]
<Pawky|2> jhass: hmm :-)
DonOtreply has quit [Quit: DonOtreply]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m10n has joined #ruby
JDiPierro has quit [Remote host closed the connection]
DadoCe has quit [Ping timeout: 265 seconds]
JDiPierro has joined #ruby
DonOtreply has joined #ruby
<Pawky|2> jhass: Will give it a go... :-)
yellowgh0st has quit [Quit: yellowgh0st]
jobewan has joined #ruby
<toretore> from the js example it looks like the session key is given as part of the json payload
<Pawky|2> toretore: jhass: Thank you for your help so far, I will try some proxies to see what it does..
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bonhoeffer> toretore: https://gist.github.com/anonymous/5526eb092b5191787b96 — the end result — it is working, but i would love some feedback
avahey has joined #ruby
pandaant has quit [Remote host closed the connection]
<Pawky|2> toretore: what code are you looking upon?
<toretore> system("perl -pi -e 's/\r/\n/g' #{file_in}") ouch
apurcell has joined #ruby
<jhass> lol
<Pawky|2> toretore: yeah.. I had that coming hadn't i?....
<toretore> i don't know why you still have \r in your file
<shevy> ack
<shevy> eam look what they do!
<toretore> Pawky|2: that wasn't your code it was bonhoeffer's
Kricir has joined #ruby
<Pawky|2> toretore: lol... I realised it :-)
<Pawky|2> thanks so far, will hack some more :-)
AlienPickle has joined #ruby
<bonhoeffer> toretore: yeah — looking for a better option . . . but that works on adobe saveas
<bonhoeffer> text (accessible) or (plain) not sure what the difference is
maximski has quit []
<bonhoeffer> would be great to have a pure ruby solution though
<toretore> but those didn't have \r
cajone has quit [Remote host closed the connection]
<bonhoeffer> \r === ^M as far as i can tell
<bonhoeffer> have to run for a minute
reinaldo_ is now known as reinaldob
<Pawky|2> toretore: just one question, when you did look upon the Nordnet API, did you interpret the logout to be anythinge more than just the api.test.nordnet.se/NEXTAPI/1/ someblahahsessionkeygiven ?
<eam> toretore: why not just ruby -p -e'$_.gsub! /\r/, "\n"'
centrx has joined #ruby
riotjone_ has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
apurcell has quit [Ping timeout: 246 seconds]
mathie has joined #ruby
starfox_sf has joined #ruby
<toretore> Pawky|2: well, that's what it says: DELETE -> https://BASE_URL/API_VERSION/login/<session_key>
<jhass> Pawky|2: uh, do you actually put a space in front there?
checkit has joined #ruby
<toretore> but.. it may require that request to be authenticated
mikecmpbll has quit [Ping timeout: 240 seconds]
<Pawky|2> jhass: no space, i write from my memory i dont have the exact syntax infront of me...
<jhass> why not?
<jhass> your browser has no tabbing support?
<toretore> lol
<checkit> Hey guys... I'm a rails newb but I'm not new to development. I'm trying to figure out how to use Active record to select 'col_name' instead of select *... Any thoughts here?
<jhass> I'd say try the proxy and verify the requests actually look right
<Pawky|2> toretore: aha.. this sounds interesting, I am believeing that is the case as well.. the request to be authenticated
<toretore> checkit: #rubyonrails
<jhass> no offense, but your "from memory" is not very good
<Pawky|2> jhass: Well.. I am trying to steal as little time from you guys as possible... so I skip switching...
<jhass> so there's a good chance your script is just not generating the request you think it does generate
<toretore> Pawky|2: you need to get your shit together, sit down and read the api, start experimenting and understanding exactly how it works
<toretore> instead of just trying random shit
JDiPierro has quit [Remote host closed the connection]
<Pawky|2> toretore: duh.. its exactly what I am doing..
triple_b has joined #ruby
kalusn has quit [Remote host closed the connection]
<toretore> no
<toretore> "from memory" is not how that's done
<Pawky|2> toretore: Iam not trying random stuff, but my interpretation seems to be wrong, and I have no one to ask...
<toretore> ok fair
sevvie has quit [Ping timeout: 265 seconds]
paulfm_ has joined #ruby
jonr22 has joined #ruby
sevvie has joined #ruby
<jhass> Pawky|2: then don't worry about stealing time or shit like that, ask proper questions that show you actually understood the API
starfox_sf has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
<toretore> but there's nothing more useful than just getting a big cup of coffee, sitting down and just getting into the bowels of the thing
<Pawky|2> toretore: well.. I just meant, I maybe I didnt write exactly correct, like api.test.nordnet instead of test.api.nordnet... which was secondary to the question..
<jhass> so far your "from memory" it should look like where all either too inprecise or just incorrect
<Pawky|2> jhass: I get it I get it... i will hack some more with a proxy and get back with more "precise" requests. :-)
uptownhr has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
jxpx777 has quit [Quit: Leaving...]
paulfm has quit [Ping timeout: 240 seconds]
<Pawky|2> it is more about wether all that was needed was a session key after the uri, or if I also need to set some headers....
mxrguspxrt has joined #ruby
jaequery has joined #ruby
rbennacer has joined #ruby
<toretore> the docs say to use http basic, but none of the code i've seen actually does
nobitanobi has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
C1V0 has joined #ruby
Macaveli has quit [Ping timeout: 265 seconds]
psy_ has quit [Read error: No route to host]
<toretore> oh wait
sent1nel has joined #ruby
<toretore> conn.basic_auth session, session if session
<arup_r> As we know strings are immutable, then why getting so unexpected result ?
<arup_r> >> {"" => "", "" => ""}
<eval-in__> arup_r => /tmp/execpad-84cdec2ebce2/source-84cdec2ebce2:2: warning: duplicated key at line 2 ignored: "" ... (https://eval.in/288117)
wpp has joined #ruby
<arup_r> why so?
<toretore> strings are mutable
<arup_r> any way it is giving {"" => ""}
<arup_r> I expected to get {"" => "", "" => ""}
kaspertidemann has quit []
<arup_r> sorry..**mutable
<toretore> >> "".hash == "".hash
<eval-in__> toretore => true (https://eval.in/288123)
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r> Ohh! I see
<arup_r> that way
kaspertidemann has joined #ruby
vyorkin has quit [Quit: WeeChat 1.0.1]
<arup_r> toretore: thanks
aclearman037 has quit [Ping timeout: 252 seconds]
rbennacer has quit [Ping timeout: 252 seconds]
kaspertidemann has left #ruby [#ruby]
sieve has quit [Quit: Leaving.]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
Mon_Ouie has quit [Ping timeout: 250 seconds]
apurcell has joined #ruby
<jhass> arup_r: also Hash special cases strings, they're copied and frozen when used as keys and not frozen already
Jackneill has joined #ruby
cajone has joined #ruby
<arup_r> means ?
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
cobragoat has quit [Remote host closed the connection]
Eiam has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
<toretore> Pawky|2: here's what the ruby code does: 1) all requests encode their parameters in the query string 2) this also applies to the login, where the (pre-formatted) credentials are given in the form of ?service=s&auth=creds 3) all subsequent requests take the session key from the login response and put it into the http auth headers
<toretore> and that's basically it
ghr has quit [Ping timeout: 245 seconds]
<jhass> >> a = ""; k = {a => nil}.keys.first; [a.frozen?, k.frozen?, a.equal?(k)]
<eval-in__> jhass => [false, true, false] (https://eval.in/288124)
leafybasil has quit [Remote host closed the connection]
mxrguspxrt has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
<jhass> >> "".freeze << "b"
<eval-in__> jhass => can't modify frozen String (RuntimeError) ... (https://eval.in/288125)
<Pawky|2> toretore: hmmm :-)
Dopagod has joined #ruby
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<toretore> all the paths are /next/1/<endpoint name>
<Pawky|2> toretore: thats exactly how I have interpret it as well :-) but it doesnt work against their demo machine, atleast not for logout and touch... :-/
<toretore> hostname doesn't show
Cyberheb has joined #ruby
JDiPierro has joined #ruby
<toretore> does it work for other endpoints?
<Pawky|2> toretore: I have only succeeded to login and get the session-key
rdark has quit [Quit: leaving]
<toretore> meaning?
<toretore> did you try any other endpoints?
<Pawky|2> ... only touch and logout...as they are the simplest.... :-/
TgMts has quit [Remote host closed the connection]
<toretore> well try it dummy
rbennacer has quit [Remote host closed the connection]
<Pawky|2> to prove wether I got the syntax right..
<toretore> to prove whether your http auth is working
<Pawky|2> toretore: but they are even more complex..
<toretore> oh no
djbkd has joined #ruby
<toretore> there's tons of simple gets in there
<Pawky|2> give me one to try :-)
<Pawky|2> and Ill implement it... :-)
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga> toretore: can i have a minute
<toretore> GET /next/1/accounts
<ponga> excuse me
<Pawky|2> toretore: will do
nahtnam has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
Allamann has quit [Remote host closed the connection]
psy_ has joined #ruby
dANO__ has quit []
mkaesz has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
djbkd has quit [Client Quit]
blizzy has joined #ruby
mitchellhenke has joined #ruby
ismaelga has joined #ruby
Kricir has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
shadoi has quit [Client Quit]
mleung has joined #ruby
mxrguspxrt has joined #ruby
Hobogrammer has quit [Ping timeout: 244 seconds]
terlar has quit [Ping timeout: 255 seconds]
mitchellhenke has quit [Read error: Connection reset by peer]
terlar has joined #ruby
mathie has joined #ruby
blizzy has quit [Ping timeout: 250 seconds]
banister has joined #ruby
blizzy has joined #ruby
josephndenton has joined #ruby
djbkd has joined #ruby
wallerdev has joined #ruby
jgt has joined #ruby
shadoi has joined #ruby
djcp has quit [Ping timeout: 244 seconds]
blueOxigen has joined #ruby
hesco has quit [Ping timeout: 245 seconds]
andikr has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 240 seconds]
spyderman4g63 has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
athan has quit [Ping timeout: 252 seconds]
bigkevmcd has joined #ruby
mkaesz has joined #ruby
<Pawky|2> toretore: http://pastebin.com/myFn9xCt
<Pawky|2> :'(
dfinninger has quit [Remote host closed the connection]
lightstalker has quit [Ping timeout: 245 seconds]
aclearman037 has joined #ruby
multi_io_ has quit [Read error: Connection reset by peer]
mkaesz has quit [Client Quit]
<bonhoeffer> toretore: thanks for get_transactions.rb
<toretore> Pawky|2: well, then your http auth isn't working
g-nom3 has quit [Ping timeout: 250 seconds]
anarang has quit [Quit: Leaving]
<Pawky|2> toretore: it sure does http://pastebin.com/drUPZamm
<Pawky|2> :-)
towski_ has joined #ruby
qhartman has quit [Quit: Ex-Chat]
BeLucid_ has quit [Remote host closed the connection]
ptrrr has joined #ruby
<toretore> that is not http basic, that's the response you're getting from a regular get
longfeet has joined #ruby
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> you need to set the http basic headers
starfox_sf has joined #ruby
* Pawky|2 running far far away to read up about basic headers
<toretore> sigh
<jhass> oh my... there's perl in those pastebins
* jhass runs
chrishough has joined #ruby
mleung has quit [Ping timeout: 245 seconds]
g-nom3 has joined #ruby
g-nom3 has quit [Max SendQ exceeded]
ellisTAA has joined #ruby
<ellisTAA> pmoc10
vire has joined #ruby
<jhass> that's a bit short for a password
ghr has joined #ruby
<ellisTAA> i cant find the ruby folder on my macbook
g-nom3 has joined #ruby
<ellisTAA> i went to Library but it’s not there
<ellisTAA> anyone know how to find it?
g-nom3 has quit [Max SendQ exceeded]
<Pawky|2> //garbage_bin ?
jen_ has joined #ruby
<jen_> roolo: hey, I fixed the issue
<waxjar> "the ruby folder"?
<jhass> ellisTAA: gem env knows
<Pawky|2> waxjar: the folder with the "ruby tuesday" song... probably
commmmodo has joined #ruby
<jen_> One of my files was using outdated credentials - had nothing to do with ruby!
g-nom3 has joined #ruby
<jhass> ellisTAA: what's pmoc10?
<ellisTAA> jhass: idk
<ellisTAA> copy and past
<jhass> then why you wrote it?
VBlizzard has joined #ruby
fabrice31 has joined #ruby
<roolo> jen_: But it was complaining about certificate :/
amystephen has joined #ruby
<Pawky|2> perl mocking session 10 ?
g-nom3 has quit [Max SendQ exceeded]
<ellisTAA> copy and pasted it when i entered
<arup_r> Guys: Opinion to improve this code - https://gist.github.com/aruprakshit/797686aac92d498a2fac (It is working.)
<jhass> why?
<ellisTAA> i didnt mean to, the program was laggging and it did it without my intention
<jen_> i know. I commented out those credentials and it worked. No warning roolo
<roolo> jen_: Weird, but important is it is working
Matadoer has quit [Ping timeout: 244 seconds]
<jen_> yes. thanks. Did you get the small tip?
<ellisTAA> jhass: do u know how i can find where my ruby folder is? it isn’t in library
<gregf_> arup_r: ETOOMUCHCODEZ
aob_ is now known as aob
<roolo> jen_: yes thx
ghostpl_ has joined #ruby
djcp has joined #ruby
<roolo> jen_: Also got the email
g-nom3 has joined #ruby
<jhass> ellisTAA: did you try my suggestion?
<jen_> roolo: ok
<roolo> jen_: Still thinking about it
<ellisTAA> jhass: no
<jen_> ok
<jen_> no rush
Peppuz has quit [Quit: This computer has gone to sleep]
<arup_r> gregf_: means ?
<jhass> ellisTAA: why not?
<jen_> ping me via email if you have questions...
g-nom3 has quit [Max SendQ exceeded]
<jen_> i will sign off from IRC now.
Peppuz has joined #ruby
<ellisTAA> jhass: i didnt see it it
blizzy has quit [Ping timeout: 250 seconds]
jen_ has quit [Client Quit]
<ellisTAA> jhass: unknown environment option [knows]
<jhass> arup_r: I think PurchasePower wants to be a module and I'd just strip the method on line 6
<jhass> ellisTAA: ...
g-nom3 has joined #ruby
wallerdev has quit [Quit: wallerdev]
<jhass> the 'knows' is not part of the command
g-nom3 has quit [Max SendQ exceeded]
wallerdev has joined #ruby
<ellisTAA> jhass: lol
<ellisTAA> jhass: yeah it says it is in library/ruby but the ruby folder is not in libarry …
<arup_r> jhass: why mixin you'd prefer ?
hesco has joined #ruby
g-nom3 has joined #ruby
<jhass> arup_r: because it seems to make no sense to have an instance of PurchasePower
yehh_ has joined #ruby
VBlizzard is now known as _blizzy_
g-nom3 has quit [Max SendQ exceeded]
yehh_ has quit [Max SendQ exceeded]
<arup_r> umm
fabrice31 has quit [Ping timeout: 256 seconds]
<waxjar> there's a lot of very similar code in the classes for the position-classes arup_r
ghr has quit [Ping timeout: 264 seconds]
<ellisTAA> nvm found it
<jhass> arup_r: line 20, the and return will never fire as puts always returns nil
<jhass> also I hate that style personally
g-nom3 has joined #ruby
<arup_r> nah! it fired.
<waxjar> *in the position-classes
<arup_r> ohh! got it
<jhass> >> puts("hi") and raise
<eval-in__> jhass => hi ... (https://eval.in/288139)
<arup_r> got it
<toretore> >> raise
Kricir has joined #ruby
<eval-in__> toretore => (RuntimeError) ... (https://eval.in/288140)
<arup_r> hehehe
<waxjar> Approvers is such a thin wrapper it might as well be an Array
<toretore> just cgecki
<toretore> checking
<arup_r> waxjar: Let me first apply what jhass said
<arup_r> then i'll come back
<jhass> if !foo.nil? -> if foo IMO
<waxjar> sure :)
geefolk has quit [Ping timeout: 252 seconds]
<waxjar> btw, arup_r, you might like codereview.stackexchange.com. specifically for questions like this and the feedback is often very good :)
<jhass> arup_r: another small one maybe: prefixing a variable with _ is used to denote that you're not interested in actually using it
<waxjar> especially mine >.>
terlar has quit [Ping timeout: 264 seconds]
<arup_r> Then the site will be flooded.... waxjar :
<arup_r> :)
uptownhr has quit [Quit: uptownhr]
spyderman4g63 has quit [Remote host closed the connection]
<Pawky|2> toretore: do you really mean I never had set those headers in that earlier pastebin?
<arup_r> jhass: that's for `next`
<arup_r> I wanted to avoid it...
<arup_r> but you are right
<jhass> arup_r: no issue in getting verbose: next_approver
spyderman4g63 has joined #ruby
<arup_r> yes.. :)
jgt has quit [Ping timeout: 252 seconds]
<hollywood> hey guise, do you know how to select the part of a string that contains regex and everything that comes after it?
bonhoeffer has quit [Quit: bonhoeffer]
<jhass> hollywood: provide sample input and desired output and what you tried so far, if it's > 3 lines use gist.github.com
yeticry has quit [Ping timeout: 250 seconds]
<hollywood> sure
<hollywood> I have this: "TOLBUTAMIDUM O 1-D 0,5 G"
<toretore> Pawky|2: i'm not familiar enough with the http library you use to say
yeticry has joined #ruby
<hollywood> the 0 1-D can be expressed as regex since the numbers and letters change
longfeet has quit [Ping timeout: 246 seconds]
Tuxero has quit [Ping timeout: 252 seconds]
<hollywood> but I want to select whatever comes after O 1-D
<Pawky|2> toretore: ok... thanks, thats valuable info as well :-)
<hollywood> and remove it from the string
aapole has joined #ruby
<toretore> don't say remove if you mean extract
<bricker> I'm cross-posting from #rubyonrails because I meant to post it here: is it realistic to be concerned about SecureRandom.uuid's (lack of) uniqueness when generating maybe 100 per day?
<shadoi> hollywood: rubular.com
<toretore> you'll get wrong answers
<hollywood> yep, already opened.
kalusn has joined #ruby
<shadoi> try: /\w\d-\w(.*)/
riotjones has joined #ruby
<toretore> bricker: use the uuid gem
<shadoi> $1 will contain what's in ()
yfeldblum has joined #ruby
<toretore> chances of collisions with uuid are miniscule
<pipework> bricker: What do you mean lack of uniqueness?
<hollywood> Hmm
<shadoi> \w\s\d\w rather
<shadoi> since there's a space
<pipework> It pulls from the cprng's that come with your OS.
ponga has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
mitchellhenke has joined #ruby
<jhass> hollywood: you yet have to clarify what part you're interested in, do you want to continue to work with "TOLBUTAMIDUM " or "0,5 G"
<pipework> If you want to enforce uniqueness in the event of a collision (wat), store them and enforce a uniqueness constraint.
<hollywood> Okay, thanks. I might be able to solve this
adamjleonard has joined #ruby
m8 has joined #ruby
<pipework> bricker: At work we generate a metric crapton of uuids without collision.
<hollywood> Just remove the part that matches the regex and everything after
<jhass> okay, sounds like you don't want to answer
<toretore> bricker: actually, SR.uuid should work just fine
<pipework> ^
<jhass> uuid gem helps of you want to guarantee uniqueness across machines that don't share a common database
ellisTAA has quit [Read error: Connection reset by peer]
<bricker> yeah I guess it's pretty unlikely
jespada has quit [Quit: Leaving]
<jhass> since afaik SecureRandom doesn't have the MAC address incorporating version
riotjones has quit [Ping timeout: 246 seconds]
<bricker> jhass: I could design it to check uniqueness and keep trying until it's unique, but I wonder if that overhead is worth it when the probabily of collisions is like .0000000000002
yfeldblum has quit [Ping timeout: 255 seconds]
r0bby_ has joined #ruby
<bricker> 2.710498492319857e-12 according to one SO post
Macaveli has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<jhass> the question how much tolerance for failures you have ;)
robbyoconnor has quit [Ping timeout: 255 seconds]
<jhass> it may be unlikely, yes, the question is whether you need an absolute guarantee
crueber has quit [Quit: Leaving.]
<toretore> the more you generate, the greater the chances of collission and the more of a pita to enforce uniqueness :P
<hollywood> Ok, (.*) did the job
<bricker> jhass: Good point!
<hollywood> Thanks
djbkd has quit [Remote host closed the connection]
ellisTAA has joined #ruby
<arup_r> jhass: if I make as you said `module`, then after mixing `::base` is not being avaiable to the mixed in classed.. and I am getting no method error
<jhass> arup_r: uh, yeah, I wondered why that's not a constant anyhow
<arup_r> Umm.. I never thought about it too..
* arup_r wondering why the module indeed needed.. as it doesn't contain anything now
baweaver has joined #ruby
<jhass> maybe to hold the constant? :P
towski_ has quit [Quit: Leaving...]
Macaveli has quit [Ping timeout: 250 seconds]
ismaelga has quit [Remote host closed the connection]
Macaveli has joined #ruby
<arup_r> pointless.. I modifed a Java code to write it in Ruby... And all code got vanished in Ruby platform
<arup_r> :)
havenwood has quit [Remote host closed the connection]
<shevy> arup_r you write java?
<arup_r> NO :-( Wikipedia does
<pipework> I thought they wrote PHP.
mikecmpbll has joined #ruby
kirun has joined #ruby
<shadoi> hollywood: remember that basically that's a vulnerability to garbage injection. you probably want to make use of \A and \z
mxrguspxrt has quit [Remote host closed the connection]
jkyle1 has quit [Ping timeout: 264 seconds]
Freelusion has joined #ruby
mxrguspxrt has joined #ruby
dfinninger has joined #ruby
iamjarvo has joined #ruby
kalusn has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
Freelusion has quit [Client Quit]
djbkd has joined #ruby
iwishiwerearobot has joined #ruby
kalusn has joined #ruby
<pipework> If you need lots of random-quality data.
skj3gg has quit [Quit: ZZZzzz…]
<jhass> arup_r: I'm not sure why attr_accessor :successor is private
<jhass> you seem to consider it part of your public API and circumvent that it's private with send
vire has quit [Remote host closed the connection]
<jhass> if a successor shouldn't be changable after initialization, you should just take it in the constructor
maletor_ has joined #ruby
<jhass> or if that really is in no way an option writing a public method that only sets it if it isn't set yet
spyderman4g63 has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
baweaver has joined #ruby
werelivinginthef has joined #ruby
Xiti has joined #ruby
triple_b has quit [Read error: Connection reset by peer]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
triple_b has joined #ruby
aapole has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Quit: tjbiddle]
rjc has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
werelivinginthef has quit [Ping timeout: 240 seconds]
lampd1 has joined #ruby
tvw has quit []
zachrab has joined #ruby
n008f4g_ has quit [Ping timeout: 245 seconds]
lidaaa has joined #ruby
Takle has joined #ruby
baweaver has quit [Remote host closed the connection]
sambao21 has joined #ruby
mathie has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
roolo has quit [Quit: Leaving...]
zachrab has quit [Ping timeout: 256 seconds]
pdoherty has joined #ruby
jheg has joined #ruby
ducklobster has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
<shevy> are you guys still doing cool things in ruby
havenwood has joined #ruby
jacky has joined #ruby
ducklobster has quit [Remote host closed the connection]
<centrx> yes
mxrguspxrt has joined #ruby
<centrx> always
tier_ has quit [Remote host closed the connection]
tier has joined #ruby
ducklobster has joined #ruby
GoT has quit [Quit: Leaving]
baweaver has joined #ruby
tuxdna has quit [Quit: Leaving]
<wallerdev> i mostly just do random stuff in irb or one off scripts with ruby
mxrguspxrt has quit [Read error: Connection reset by peer]
<wallerdev> been doing all javascript lately
mxrguspxrt has joined #ruby
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tunaCanBruh has quit [Ping timeout: 264 seconds]
<shevy> yeah
<shevy> that's a bit how I do things too
<shevy> little things here and there... and that was it
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> I feel the grandness and greatness is missing :(
rjc has quit [Quit: Konversation terminated!]
<centrx> shevy, AI
<shevy> well
werelivinginthef has joined #ruby
OrbitalKitten has joined #ruby
djcp has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
lmickh has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
C1V0 has quit []
Hanmac has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
Aswebb_ has joined #ruby
AlienPickle has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jm0 has joined #ruby
Rollabunna has joined #ruby
dol37__ has joined #ruby
svoop has joined #ruby
jacky has quit [Quit: ZNC - http://znc.in]
strsep has quit [Quit: ZNC - http://znc.in]
chinmay_dd has quit [Quit: Connection closed for inactivity]
rbennacer has joined #ruby
adamjleonard has quit [Quit: Leaving...]
<arup_r> "you should just take it in the constructor" That I tried.. there is an implementation problem I founf
<arup_r> jhass:
drdq has joined #ruby
<jhass> that is?
DonOtreply has quit [Quit: DonOtreply]
commmmodo has quit [Quit: commmmodo]
himsin has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
himsin is now known as manshu
jonr22 has joined #ruby
baroquebobcat has joined #ruby
DonOtreply has joined #ruby
rbennacer has quit [Remote host closed the connection]
skj3gg has joined #ruby
Peppuz has quit [Quit: This computer has gone to sleep]
<arup_r> I meant I couldn't :p
DrShoggoth has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
commmmodo has joined #ruby
wallerdev has quit [Quit: wallerdev]
My_Hearing has quit [Ping timeout: 265 seconds]
dumdedum has quit [Ping timeout: 264 seconds]
tunaCanBruh has joined #ruby
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
bluOxigen has joined #ruby
djcp has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
OrbitalKitten has joined #ruby
Freelusion has joined #ruby
blueOxigen has quit [Ping timeout: 252 seconds]
Freelusion has quit [Client Quit]
wallerdev has joined #ruby
julio_menendez has joined #ruby
Hanmac has joined #ruby
Xeago has joined #ruby
Matadoer has joined #ruby
Nogbit has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
sumeet_ocs has joined #ruby
DonOtreply has quit [Quit: DonOtreply]
OrbitalKitten has quit [Client Quit]
ponga has joined #ruby
sumeet_ocs has left #ruby [#ruby]
baweaver has quit [Remote host closed the connection]
Matadoer has quit [Client Quit]
BlakeRG has quit [Ping timeout: 250 seconds]
_Mon_Ouie_ has joined #ruby
My_Hearing has quit [Ping timeout: 264 seconds]
cphrmky has joined #ruby
yellowgh0st has joined #ruby
Matadoer has joined #ruby
mxrguspxrt has joined #ruby
Soda has quit [Remote host closed the connection]
ponga has quit [Ping timeout: 250 seconds]
sent1nel has quit [Remote host closed the connection]
aswen has quit [Ping timeout: 245 seconds]
c355E3B has joined #ruby
lolmaus has joined #ruby
pengin has quit [Remote host closed the connection]
Sailistices has joined #ruby
giuseppesolinas has joined #ruby
giuseppesolinas has quit [Client Quit]
Soda has joined #ruby
pengin has joined #ruby
Sailistices has left #ruby [#ruby]
xtsee has quit [Remote host closed the connection]
<weaksauce> softinio it's a good book but it's a very low level book and explains everything in great detail like you've never programmed before
<weaksauce> I found it a bit too slow.
sinkensabe has joined #ruby
mkaesz has joined #ruby
pengin has quit [Read error: Connection reset by peer]
<weaksauce> if you know the basics of ruby, eloquent ruby is an excellent book to teach you the idiomatic ruby way
maknz has joined #ruby
pengin has joined #ruby
<softinio> I need a super quick start to the language
tier has quit [Ping timeout: 265 seconds]
beneggett has joined #ruby
<c355E3B> may help
<softinio> c355E3B: nice thanks
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/2015010900]]
Xeago_ has joined #ruby
<weaksauce> softinio for that I'd suggest doing the ruby branch of codeacademy.com
<shevy> softinio go with the pickaxe. even though you won't need most of it.
<weaksauce> it's free and done well
mkaesz has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
Jackneill has quit [Quit: Leaving]
mkaesz has joined #ruby
tier has joined #ruby
sinkensabe has quit [Ping timeout: 255 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
yellowgh0st has quit [Quit: yellowgh0st]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Doc_X has quit [Ping timeout: 256 seconds]
triple_b has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
_Mon_Ouie_ has quit [Ping timeout: 246 seconds]
Doc_X has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
<drdq> Is that like team treehouse?
baweaver has quit [Remote host closed the connection]
<drdq> Why can't you just read a book?
aryaching_ has joined #ruby
siso has joined #ruby
cphrmky has quit [Quit: Textual IRC Client: www.textualapp.com]
julio_menendez has left #ruby ["Textual IRC Client: www.textualapp.com"]
aryaching has quit [Ping timeout: 244 seconds]
<waxjar> ooh that's handy c355E3B
yellowgh0st has joined #ruby
Guest28391 has joined #ruby
Guest28391 is now known as akkmaxon
lmickh has joined #ruby
<softinio> @weaksauce but does the grounded rubyist serve as a good reference ?
The_Phoenix has quit [Quit: Leaving.]
skj3gg has quit [Quit: ZZZzzz…]
c355E3B has quit [Ping timeout: 255 seconds]
crueber has joined #ruby
pdoherty has quit [Ping timeout: 246 seconds]
turtil has quit [Quit: WeeChat 1.1.1]
<pipework> softinio: Yes.
skj3gg has joined #ruby
Dopagod has quit [Ping timeout: 245 seconds]
DonOtreply has joined #ruby
zachrab has joined #ruby
<weaksauce> softinio yes. but I usually look things up on the ruby-doc site instead
<weaksauce> drdq you can read a book if that's what you'd like to do. codeacademy is a good way to get experience quickly.
<weaksauce> and there is a lot of reading anyway
tubuliferous has joined #ruby
Dopagod has joined #ruby
lmickh has quit [Remote host closed the connection]
djcp has quit [Ping timeout: 252 seconds]
DivineEntity has quit [Ping timeout: 256 seconds]
<drdq> weaksauce, I can't imagine that 7 hours of video would teach you much about anything at all.
<weaksauce> there is 0 video drdq
<weaksauce> I take it you didn't look at it at all then?
zachrab has quit [Ping timeout: 250 seconds]
<weaksauce> the general format is text description of the concept (like a paragraphs from a book
<drdq> How is it better than a book?
<weaksauce> ) and then an interactive script editor in the middle and an output on the right
DivineEntity has joined #ruby
<weaksauce> try it out drdq it's free
<drdq> I don't think it would be useful for my particular skillset.
<odigity> is there an easy way to divide two date Ranges? I'm trying to calculate a proration factor on rent in an app
Number2 has quit [Remote host closed the connection]
skj3gg has quit [Quit: ZZZzzz…]
jimms has quit [Remote host closed the connection]
fabrice31 has joined #ruby
last_staff has joined #ruby
<weaksauce> drdq you can skip to the later chapters
<weaksauce> it's more for beginners though
alfakini has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drdq> odigity, a la (DateTime.now..1.hour.from_now).step(2.hour.to_f / 1.day.to_f).to_a.l or something?
tasaif_ has joined #ruby
<tasaif_> please to help
<drdq> weaksauce, I still think pickaxe would be a better way to spend 9 hours.
sambao21 has quit [Quit: Computer has gone to sleep.]
<weaksauce> but I think it's better than a book because by actually being forced to type things and watching them run the concepts will stick
<drdq> Brb.
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<tasaif_> Error running '__rvm_with ruby-2.1.4 gemset_pristine'
<odigity> drdq, something like that
OrbitalKitten has joined #ruby
wallerdev has quit [Quit: wallerdev]
<tasaif_> While trying to rvm reinstall 2.1.4 --disable-binary
bluOxigen has quit [Ping timeout: 265 seconds]
turtil has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
OrbitalKitten has quit [Client Quit]
hashpuppy has joined #ruby
shellfu is now known as shellfoood
hashpuppy has left #ruby [#ruby]
dstarh has joined #ruby
sargas has quit [Quit: This computer has gone to sleep]
lightstalker has joined #ruby
nobitanobi has quit [Remote host closed the connection]
iceden has joined #ruby
Deithrian has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
FooMunki_ has quit [Quit: FooMunki_]
thoffmeyer has joined #ruby
ghostpl_ has joined #ruby
<shevy> hmm
<shevy> if we could use {} for defining a method alone
djcp has joined #ruby
xtsee has joined #ruby
pragmatism has joined #ruby
xtsee has quit [Client Quit]
xtsee has joined #ruby
fryguy9 has joined #ruby
<pragmatism> I'm debugging interaction in a gem I've written. Do Pry bindings work inside a gem when the called by the application requiring the gem?
pengin has quit [Remote host closed the connection]
naftilos76 has joined #ruby
pengin has joined #ruby
<pragmatism> Or does Pry have some cleverness around caller specifically so this doesn't happen?
ghostpl_ has quit [Ping timeout: 246 seconds]
<tasaif_> well... apparently doing rvm remove 2.1.4 && rvm install 2.1.4 fixed it
<tasaif_> I feel like such a scrub
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
zenith_ has joined #ruby
pengin has quit [Ping timeout: 250 seconds]
fantazo has quit [Quit: Verlassend]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Cyberheb has quit [Quit: Computer has gone to sleep.]
rsavage has quit [Quit: Konversation terminated!]
Matadoer has quit [Quit: ZNC - http://znc.in]
jenrzzz has quit [Ping timeout: 245 seconds]
chrishough has joined #ruby
Matadoer has joined #ruby
zenith__ has joined #ruby
Matadoer has quit [Client Quit]
zenith_ has quit [Read error: Connection reset by peer]
<drdq> I. Don't. Want. No. Scrub.
Matadoer has joined #ruby
bonhoeffer has joined #ruby
uptownhr has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
sambao21 has quit [Quit: Computer has gone to sleep.]
Matadoer has quit [Client Quit]
<shevy> TLC!
jheg has quit [Quit: jheg]
Matadoer has joined #ruby
sargas has joined #ruby
greenbagels has joined #ruby
Prometheian has joined #ruby
OrbitalKitten has joined #ruby
ponga has joined #ruby
Zai00_ has joined #ruby
hollywood has quit [Quit: Leaving]
centrx has quit [Quit: Shutting down, Please wait...]
sambao21 has joined #ruby
shellfoood is now known as shellfu
tasaif_ has quit [Quit: leaving]
Zai00 has quit [Ping timeout: 246 seconds]
Zai00_ is now known as Zai00
postmodern has joined #ruby
iwishiwerearobot has joined #ruby
ponga has quit [Ping timeout: 252 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VBlizzard has joined #ruby
pdoherty has joined #ruby
shum has joined #ruby
yellowgh0st has quit [Quit: yellowgh0st]
baweaver has joined #ruby
_blizzy_ has quit [Ping timeout: 256 seconds]
valkyrka has joined #ruby
craigp_ has quit [Remote host closed the connection]
willharrison has joined #ruby
yellowgh0st has joined #ruby
iamninja has joined #ruby
iwishiwerearobot has quit [Ping timeout: 264 seconds]
mxrguspxrt has quit [Remote host closed the connection]
Xeago has joined #ruby
akkmaxon has quit [Ping timeout: 255 seconds]
smcquaid has joined #ruby
OrbitalKitten has joined #ruby
mxrguspxrt has joined #ruby
yfeldblum has joined #ruby
Renich has joined #ruby
nolic has joined #ruby
tmtwd has quit [Remote host closed the connection]
<jhass> jeez, how are you supposed to deal with stuff like "\u2021#\u200eUSA\u202c" when parsing out your hashtags...
govg has joined #ruby
<apeiros> gsub + pack("U")
<apeiros> or .chr(Encoding::UTF_8)
Xeago_ has quit [Ping timeout: 252 seconds]
<apeiros> well, actually you also have to translate it from hex I think :D
smcquaid has quit [Client Quit]
zyxelthrone has joined #ruby
Xeago has quit [Remote host closed the connection]
<apeiros> >> "\u2021#\u200eUSA\u202c".gsub(/\\u(\h{4})/) { $1.to_i(16).chr(Encoding::UTF_8) }
jaredrhine has quit [Remote host closed the connection]
<apeiros> eval-in dead again?
<jhass> \u202a, not \u2021, sorry
olivier_bK has joined #ruby
tjbiddle has joined #ruby
<apeiros> hm, those chars are not printable? I wonder what they are about…
<apeiros> or did you mean "how do I remove that?"
VBlizzard is now known as _blizzy_
pu22l3r_ has joined #ruby
<jhass> I know how to remove them, I'm more wondering whether I should
<jhass> U+200E LEFT-TO-RIGHT MARK
adamjleonard has joined #ruby
<jhass> U+202A LEFT-TO-RIGHT EMBEDDING
<jhass> U+202C POP DIRECTIONAL FORMATTING
<shevy> JHASS IS ALL CAPS TODAY
<apeiros> direction changes are a known attack vector
<jhass> huh?
<apeiros> not sure how much worth they are as such in hashtags, though
<jhass> how so? you mean as in busting validations?
<apeiros> yeah, e.g. urls
siso has quit [Quit: siso]
<apeiros> write mi<RTL>sorc<LTR>oft.com, looks like microsoft.com
<jhass> mmh, so .gsub(/\p{Format}/, '') straight on the user input might actually be justified
<apeiros> or something like that. no security expert :)
naftilos76 has quit [Remote host closed the connection]
djcp has quit [Ping timeout: 264 seconds]
Kricir has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 255 seconds]
Azure has joined #ruby
<jhass> I think we might try that for a while and see what breaks
sent1nel has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
craigp has joined #ruby
KC9YDN is now known as Ethan
craigp has quit [Read error: Connection reset by peer]
craigp has joined #ruby
decoponio has quit [Quit: Leaving...]
sent1nel has quit [Remote host closed the connection]
Troy^ has joined #ruby
beneggett has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
startupality has joined #ruby
Troy^ has quit [Client Quit]
sambao21 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<shevy> [Famous last words]
Hijiri has quit [Quit: WeeChat 1.0.1]
<shevy> [jhass is flying to Saturn]
Scriptonaut has joined #ruby
<Scriptonaut> have you guys ever seen an activeresource: timeout error?
<Scriptonaut> I want to make this error not happen
Troy^ has joined #ruby
pengin has joined #ruby
<Scriptonaut> but I can't find out where the timeout limit is set
<apeiros> hah, nice nick
<Scriptonaut> me?
<apeiros> yes
<Scriptonaut> thanks
<apeiros> with AR questions you're probably better off in #rubyonrails
Yonose2000 has joined #ruby
<Scriptonaut> I asked there first :P
<Scriptonaut> *crickets*
mjuszczak has joined #ruby
<apeiros> Scriptonaut: uh, you should tell that you cross-post.
jheg has joined #ruby
<Scriptonaut> cross-post?
mxrguspxrt has joined #ruby
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cajone has quit [Ping timeout: 246 seconds]
leat has quit [Ping timeout: 250 seconds]
spyderma_ has joined #ruby
Yonose2000 has quit [Client Quit]
sent1nel has joined #ruby
mjuszczak has quit [Client Quit]
PaulCapestany has quit []
markfletcher has left #ruby [#ruby]
spyderman4g63 has quit [Ping timeout: 265 seconds]
spyderman4g63 has joined #ruby
djcp has joined #ruby
Musashi007 has joined #ruby
beneggett has joined #ruby
PaulCapestany has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spyderma_ has quit [Ping timeout: 250 seconds]
Troy^ has joined #ruby
Troy^ has quit [Client Quit]
aryaching_ has quit []
Goodbeard has joined #ruby
cr3 has joined #ruby
<cr3> is there a way to get an object from somewhere up the caller stack? caller() only returns string descriptions of the stack, so how can I get objects?
SOLDIERz has quit [Quit: Be back later ...]
<waxjar> why would you need them cr3?
camilasan has quit [Ping timeout: 252 seconds]
deric_skibotn has joined #ruby
<cr3> waxjar: I suspect tests aren't doing what they should, so I'm logging stuff from a hook and I'd like the test name from one of the callers
<cr3> waxjar: so, this is not for production code but mostly to validate that stuff is getting done and I don't want to have to modify hundreds of tests
jonr22 has joined #ruby
<waxjar> i see. i don't think it's possible, easily
<cr3> waxjar: if, by your question, you're implying that since there should be no reason to go up the stack then there should be no way, that's cool too :)
willharrison has quit [Quit: Textual IRC Client: www.textualapp.com]
markfletcher has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
<waxjar> oh look at that, would http://devdocs.io/ruby/kernel#method-i-caller_locations do what you want?
<cr3> waxjar: cool! I'll try it out, thanks man!
<waxjar> hmm, or aren't they actual objects
wallerdev has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
camilasan has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
jonr22 has quit [Ping timeout: 265 seconds]
pdoherty has quit [Ping timeout: 252 seconds]
<cr3> waxjar: they look like strings, like caller. I have a hard time telling the difference between caller and caller_locations
aapole has joined #ruby
tvw has joined #ruby
roolo has joined #ruby
riotjones has joined #ruby
Dopagod has quit [Ping timeout: 256 seconds]
kobain has quit [Ping timeout: 244 seconds]
<waxjar> yeah, it just seems to wrap the location strings in pretty object. i read objects, got excited :P
<waxjar> i suppose you could use set_trace_func (?) with some filters to achieve what you want
DonOtreply has quit [Quit: DonOtreply]
Goodbeard has quit [Quit: Leaving]
paulfm has joined #ruby
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
paulfm_ has quit [Ping timeout: 252 seconds]
riotjones has quit [Ping timeout: 250 seconds]
jmignault has quit [Quit: jmignault]
<jhass> cr3: is https://github.com/banister/binding_of_caller what you want?
<cr3> jhass: I'll definately have a look after playing around a bit more with set_trace_func
paulfm_ has joined #ruby
<jhass> cr3: if it indeed is pry + pry+stack_explorer will be of interest too
sambao21 has quit [Quit: Computer has gone to sleep.]
baweaver has quit [Remote host closed the connection]
paulfm has quit [Ping timeout: 250 seconds]
skj3gg has joined #ruby
skj3gg_ has joined #ruby
sambao21 has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
ponga has joined #ruby
DonOtreply has joined #ruby
wpp has quit []
wallerdev has quit [Quit: wallerdev]
olivier_bK has quit [Ping timeout: 252 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
_br_ has quit [Ping timeout: 264 seconds]
cajone has joined #ruby
Cadillactica has joined #ruby
OrbitalKitten has joined #ruby
ponga has quit [Ping timeout: 256 seconds]
skj3gg_ has quit [Quit: ZZZzzz…]
DadoCe has joined #ruby
sent1nel has quit [Remote host closed the connection]
jenrzzz has joined #ruby
ismaelga has joined #ruby
sent1nel has joined #ruby
hesco has quit [Ping timeout: 250 seconds]
pragmatism has joined #ruby
crdpink has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Rapier- has quit [Quit: (null)]
skj3gg_ has joined #ruby
markfletcher has left #ruby [#ruby]
zachrab has joined #ruby
_br_ has joined #ruby
ismaelga has quit [Ping timeout: 246 seconds]
kobain has joined #ruby
psyprus has quit [Ping timeout: 245 seconds]
<uptownhr> if i want to convert an arr of hashes to another array of hashes, how would i do that?
zachrab has quit [Ping timeout: 246 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pragmatism> a = b.
<apeiros> you would run it through a conversion method
zenith__ has quit [Remote host closed the connection]
<uptownhr> having a hard time explaning what i want
skj3gg_ has quit [Quit: ZZZzzz…]
mkaesz has quit [Quit: Leaving...]
<uptownhr> end result would look something like arr[1][1,2,3,4,5]
skj3gg_ has joined #ruby
<apeiros> hash[trx.mid_id] = [], not hash = []
<apeiros> also in inject you must return the value which should be in the accumulator the next iteration
<apeiros> (in `hash` in your case)
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OrbitalKitten has joined #ruby
<apeiros> for this, you probably should use each_with_object, not inject.
Takumo has quit [Ping timeout: 256 seconds]
<apeiros> also why are you pushing the same value twice?
<uptownhr> that was just a test
tier_ has joined #ruby
AlienPickle has joined #ruby
<shevy> let's hang him!
<uptownhr> updated
skj3gg_ has quit [Client Quit]
JimmyNeutron has quit [Read error: Connection reset by peer]
<uptownhr> it’s not accumulating the [trx.mid_id]
Soda has quit [Remote host closed the connection]
dmbennett has joined #ruby
<uptownhr> the end result is just an array of ids
<uptownhr> without the group id
last_staff has quit [Remote host closed the connection]
<apeiros> uptownhr: I'll repeat
davidhq has joined #ruby
<apeiros> 22:54 apeiros: also in inject you must return the value which should be in the accumulator the next iteration
fabrice31 has joined #ruby
_br_ has quit [Ping timeout: 255 seconds]
<uptownhr> tried returning ….
<uptownhr> results in error
<apeiros> you don't
<apeiros> you tried using `return` keyword?
<uptownhr> yes
<apeiros> that does not return from the block
sambao21 has quit [Quit: Computer has gone to sleep.]
crdpink2 has joined #ruby
<apeiros> just let `hash` be the last statement in your inject block
<apeiros> but seriously, use each_with_object.
tier has quit [Ping timeout: 250 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
crdpink has quit [Ping timeout: 265 seconds]
<uptownhr> but why doesn’t inject work?
sevvie has quit [Ping timeout: 252 seconds]
<uptownhr> i’m just trying to learn and understand
checkit has quit [Ping timeout: 244 seconds]
AlienPickle has quit [Ping timeout: 246 seconds]
snath has quit [Ping timeout: 264 seconds]
_br_ has joined #ruby
<apeiros> sure, I can tell you the same a third time…
adriancb has quit [Remote host closed the connection]
<apeiros> because you don't return the correct value for your accumulator in your inject block
jm0 has quit [Ping timeout: 245 seconds]
bricker has quit [Ping timeout: 245 seconds]
adriancb has joined #ruby
<uptownhr> ah ic
<uptownhr> then what is the difference between inject and with_each_object?
skj3gg_ has joined #ruby
freerobby has quit [Quit: Leaving.]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> each_with_object doesn't care about the block's return value
fabrice31 has quit [Ping timeout: 264 seconds]
alexherbo2 has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<uptownhr> got it
<uptownhr> so why this over inject in my case?'
mloveless has joined #ruby
<apeiros> get both to work and check the difference.
<uptownhr> i have
tier_ has quit [Ping timeout: 246 seconds]
skj3gg_ has quit [Client Quit]
<apeiros> you have working code with both? update your gist then with both versions.
<pragmatism> > accumulator in your inject block
<pragmatism> that's the different.
<pragmatism> difference*
<uptownhr> yea i know
<uptownhr> i’m just asking why one over the other
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousbeans has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skj3gg has quit [Quit: welp, see you later.]
beneggett has joined #ruby
adriancb has quit [Ping timeout: 240 seconds]
olivier_bK has joined #ruby
sevvie has joined #ruby
_Mon_Ouie_ has joined #ruby
sambao21 has joined #ruby
_br_ has quit [Ping timeout: 265 seconds]
hcnewsom has joined #ruby
Guest79923 has joined #ruby
snath has joined #ruby
m10n has quit [Quit: Lost terminal]
Renich has quit [Quit: leaving]
aclearman037 has quit [Quit: I'm out!]
ghostpl_ has joined #ruby
<waxjar> uptownhr: inject/reduce takes the return value of the block and uses that as the accumulator for the next iteration
JDiPierro has quit [Remote host closed the connection]
psyprus has joined #ruby
<waxjar> each_with_object always uses the initial object as the "accumulator"
highbass has joined #ruby
<softinio> on a vps can you have web apps using different versions of Ruby. I come from a python background and we have virtualenv there to do this
<softinio> I know locally I can using things like rvm or chruby
<waxjar> (and returns it too)
paulfm_ has quit [Quit: Zzzzz...]
ellisTAA has quit [Ping timeout: 256 seconds]
AlienPickle has joined #ruby
serivich has joined #ruby
jerius has quit []
werelivinginthef has quit [Remote host closed the connection]
ghostpl_ has quit [Ping timeout: 256 seconds]
jobewan has quit [Read error: Connection reset by peer]
nuck has joined #ruby
lioninawhat has joined #ruby
<highbass> hey guys.. i am a complete newb to ruby and just trying to make a simple change.. trying to pass a argument through commandline and trying to get it assigned to a variable...
SOLDIERz has joined #ruby
dojobo has joined #ruby
<highbass> used to shell scripting
<dojobo> hi guys
<highbass> can somone tell me whats wrong with the following command.
<highbass> sorry code&**
balazs has quit [Ping timeout: 252 seconds]
<dojobo> anyone know if i can use file test operators via ftp?
djcp has quit [Ping timeout: 245 seconds]
<dojobo> i want to get a list of files, but only if their ctime is a certain date
deryl has joined #ruby
<dangerousbeans> highbass: ‘puts’ is your friend
<dangerousbeans> puts everything
djbkd has quit [Remote host closed the connection]
<highbass> so replace $instance_port with puts instance_port
wallerdev has quit [Quit: wallerdev]
<dangerousbeans> yeah just for debugging, then see if it writes it out
<highbass> ok
psyprus has quit [Ping timeout: 245 seconds]
startupality has quit [Quit: startupality]
<dangerousbeans> or, incase it’s just empty string, do somthing like: puts “OUTPUT COMING OMG: #{instance_port}”
<dangerousbeans> so you know that if you see just: “OUTPUT COMING OMG: “
<dangerousbeans> something is wrong :3
gr33n7007h has joined #ruby
<dojobo> oh wait, i think i just found the answer to my question
<waxjar> softinio: you can use those on a server too :)
<dojobo> had to figure out the right way to google it to get the right stackoverflow page :P
skj3gg has joined #ruby
<dangerousbeans> highbase: from reading the code, it looks like a problem with string stuff, like to put a variable into a string, you need to do something like: “String I want to add #{stuff_variable} to”
Lexun has joined #ruby
Lexun has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
<dangerousbeans> #{} is magical ‘put ruby code here inside a string’ magic
djbkd has joined #ruby
Troy^ has joined #ruby
Jetchisel has quit [Ping timeout: 245 seconds]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<highbass> dangerousbeans: ahh ok
RandyT has quit [Quit: ZNC - http://znc.in]
<highbass> dangerousbeans: i tried a simple test that you suggested
SOLDIERz has quit [Ping timeout: 256 seconds]
ccooke has quit [Quit: brb, rebooting for some patches]
<highbass> and get following error ./newrelic_redis_agent:5: syntax error, unexpected end-of-input
<highbass> for this line puts “OUTPUT COMING OMG: #{instance_port}”
RandyT has joined #ruby
skj3gg has quit [Client Quit]
<highbass> i am passing ./newrelic_redis_agent test1 test2
Aswebb_ has quit [Remote host closed the connection]
longfeet has joined #ruby
leafybasil has joined #ruby
joufflu has joined #ruby
<dangerousbeans> that sounds like an error from earlier in the file
Zai00 has quit [Quit: Zai00]
<dangerousbeans> like left open ‘(‘ or similar
FooMunki_ has joined #ruby
ghr has joined #ruby
<highbass> http://pastebin.com/s86jBFKy thats the complete file
zachrab has joined #ruby
<highbass> sorry these are very begineer questions ...
chipotle has quit [Quit: cheerio]
zachrab has quit [Remote host closed the connection]
<dangerousbeans> highbass: ah okay, you’ve got weird quotes
<dangerousbeans> that’s whats going on there
<highbass> ah bah
lioninawhat has quit [Remote host closed the connection]
<highbass> ok i see it now it works...
<highbass> thanks a lot!!
<dangerousbeans> if you’re on windows, you’re probably gunna have a bad time
<dangerousbeans> but it’ll help if you use a good editor
<dangerousbeans> sublime text is pretty awesome
wald0 has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
<dangerousbeans> no worries everyone was new once :]
<dangerousbeans> this is a pretty good pathway to ruby enlightenment, if you’re keen to learn more: http://rubykoans.com/
<deryl> love that site
hesco has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<highbass> dangerousbeans: great thank you very much!! will def check that out
Ankhers has quit [Ping timeout: 245 seconds]
<dangerousbeans> no worries :>
<dangerousbeans> that is the wrong smiley >:[
<dangerousbeans> urgh emoticions why do you exist
sevvie has quit [Ping timeout: 244 seconds]
jheg has quit [Quit: jheg]
baweaver has quit [Remote host closed the connection]
rbennacer has joined #ruby
<havenwood> highbass: Atom is another text editor option that is based on Sublime but open source and free: https://atom.io
thebastl has quit [Quit: Leaving...]
<dangerousbeans> <happyface>
ccooke has joined #ruby
<dangerousbeans> oh cool, not tried Atom
* dangerousbeans tries.
wallerdev has joined #ruby
mxrguspxrt has joined #ruby
<deryl> also check out Bracket
sent1nel has quit [Remote host closed the connection]
<weaksauce> is there any difference between require and load other than the duplicate import detection that require has?
iwishiwerearobot has joined #ruby
wallerdev has quit [Client Quit]
iceden has quit [Ping timeout: 250 seconds]
balazs has joined #ruby
versatiletech has quit [Quit: versatiletech]
last_staff has joined #ruby
wottam has joined #ruby
<jhass> not that I'm aware of
<deryl> weaksauce, require searches the entire library path for your requirement. load does not. Which is why you have to provide the full pathname to load (or use require_relative)
TheNet has joined #ruby
startupality has joined #ruby
Limix has joined #ruby
it0a has quit [Quit: WeeChat 1.1.1]
TheNet has quit [Client Quit]
<jhass> I yet have to see a usecase for load beyond code reloading anyway
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> thanks deryl
wallerdev has joined #ruby
highbass has quit []
brb3 has quit [Quit: <.<]
<deryl> weaksauce, no problem
doodlehaus has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
wottam has quit [Client Quit]
rbennacer has quit [Ping timeout: 255 seconds]
wallerdev has quit [Client Quit]
skj3gg has joined #ruby
mxrguspxrt has quit [Ping timeout: 244 seconds]
<weaksauce> jhass yeah useful for reloading code from within irb
baweaver has joined #ruby
_br_ has joined #ruby
iwishiwerearobot has quit [Ping timeout: 264 seconds]
kalusn has quit [Remote host closed the connection]
skj3gg has quit [Client Quit]
_ixti_ is now known as ixti
sevvie has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
diegoviola has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
adriancb has joined #ruby
<deryl> weaksauce, hehe *I* learned something new (autoload())
<weaksauce> yeah that was interesting
ponga has joined #ruby
spyderman4g63 has quit [Ping timeout: 252 seconds]
Scriptonaut has left #ruby [#ruby]
codeurge has joined #ruby
wallerdev has joined #ruby
crdpink2 has quit [Quit: q term]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has quit [Ping timeout: 250 seconds]
DrShoggoth has quit [Quit: Leaving]
amdbcg has quit [Ping timeout: 256 seconds]
iceden has joined #ruby
<maletor_> is there any better way to write this? (tries -= 1).zero?
crdpink has joined #ruby
jgt has quit [Read error: Connection reset by peer]
manshu has quit [Quit: manshu]
jgt has joined #ruby
<waxjar> you could use tries.pred.zero?
m8 has quit [Quit: Sto andando via]
<waxjar> or just tries == 1 :)
leafybasil has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
crdpink has quit [Client Quit]
leafybasil has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Prometheian has quit [Remote host closed the connection]
psyprus has joined #ruby
skj3gg has joined #ruby
skj3gg has quit [Client Quit]
_br_ has quit [Ping timeout: 246 seconds]
dmbennett has quit [Remote host closed the connection]
alyosha has joined #ruby
nosleep77 has joined #ruby
OrbitalKitten has joined #ruby
<nosleep77> hi guys how do i check if my ruby install has yaml support
matrixfox has joined #ruby
<jhass> just try to load a yaml file
sent1nel has joined #ruby
<weaksauce> require 'yaml'
<shevy> require 'ur_mom'
josephndenton has quit [Ping timeout: 264 seconds]
dangerousbeans has quit [Quit: dangerousbeans]
<shevy> ruby -e "require 'yaml'; puts 'hi'"
Soda has joined #ruby
<jhass> ruby -ryaml -e ''
<dojobo> net/ftp's list and nlst are really annoying
icarus has joined #ruby
sinkensabe has quit [Remote host closed the connection]
jkyle1 has joined #ruby
<jhass> that's because ftp is really annoying
<nosleep77> thanks..
DEA7TH has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
livingstn has quit []
<dojobo> when i call list with a param, it just returns an empty array
pdoherty has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
pietr0 has joined #ruby
Hijiri has joined #ruby
uptownhr has quit [Quit: uptownhr]
toretore has quit [Quit: Leaving]
dmbennett has joined #ruby
ghostpl_ has joined #ruby
Troy^ has joined #ruby
deryl is now known as ddd
hakunin has quit []
<shevy> dojobo hehe
<shevy> ftp is so old
Azure has quit [Quit: My MBP went to sleep.]
<jhass> isn't IRC older actually?
<nosleep77> this ruby script I am trying to use to send data from puppet to zabbix using zabbix_sender is reporting an error that it failed in puppet log. is there any way I can see more into where exactly is it failing?
<shevy> dojobo I wrote a crappy wrapper over ftp so that I don't have to use ftp directly
<dojobo> i don't know enough about sftp or the daemon in question to know whether it's supported
<shevy> jhass dunno, I would assume no
iamjarvo has joined #ruby
<lampd1> rsync > ftp
<jhass> IRC is 79 iirc
* lampd1 drops mic
ebbflowgo has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
<shevy> "Over the past decade IRC usage has been declining: since 2003 it has lost 60% of its users (from 1 million to about 400,000 in 2014) and half of its channels (from half a million in 2003)."
<shevy> guys
<shevy> we are declining
<shevy> :(
<jhass> oldest ftp rfc is 80
<jhass> so about the same age
zachrab has joined #ruby
nateberkopec has joined #ruby
<dojobo> irc could make a comeback though
ebbflowgo has joined #ruby
<dojobo> not as a very mainstream tech
<lampd1> just add a cloud in there somewhere, people will love it
<dojobo> but among devs and such
<lampd1> oh wait irccloud is already a think
<lampd1> thing*
beneggett has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
aapole has quit [Ping timeout: 264 seconds]
<shevy> no it is declining
<shevy> you read it on wikipedia first
olivier_bK has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
<shevy> I'm gonna check on TIOBE
<jhass> dojobo: sftp is an entirely different protocol btw, the secure variant of ftp is ftps
<shevy> Ruby: Rank 20
<shevy> :(
<dojobo> jhass: ah thanks, didn't know that
<lampd1> should we add the decline of irc to the list of hoaxes?
DadoCe has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<shevy> lampd1 I think it's not an important enough hoax
<shevy> we'll idle into our decline
DadoCe has joined #ruby
<shevy> "Snappy & friends Supposed animated show with the Kellogg's characters"
<shevy> lol
jonr22 has joined #ruby
ptrrr has quit [Quit: ptrrr]
Rhainur1 has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
Rhainur has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
jgt has joined #ruby
Evan_ has quit [Ping timeout: 264 seconds]
bricker has joined #ruby
ddd has quit [Quit: leaving]
pdoherty has quit [Quit: Leaving]
blackmesa has quit [Quit: WeeChat 1.1.1]
Evan_ has joined #ruby
DadoCe has quit [Ping timeout: 264 seconds]
jonr22 has quit [Ping timeout: 250 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Lucky___ has joined #ruby
codecop has quit [Remote host closed the connection]
tokik has joined #ruby
ismaelga has joined #ruby
djbkd has quit [Remote host closed the connection]
uptownhr has joined #ruby
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
neoxoen has joined #ruby
shellfu is now known as shellfu_afk
djbkd has joined #ruby
kostitas has joined #ruby
gsd has joined #ruby
SOLDIERz has joined #ruby
neoxquick has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Quit: Musashi007]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DogH has joined #ruby
Azure has joined #ruby
Musashi007 has joined #ruby
dmbennett has quit [Remote host closed the connection]
_br_ has quit [Ping timeout: 256 seconds]
dmbennett has joined #ruby
SOLDIERz has quit [Ping timeout: 264 seconds]
lioninawhat has joined #ruby
gr33n7007h has quit [Quit: WeeChat 0.3.8]
ghr has joined #ruby
Troy^ has joined #ruby
deric_skibotn has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
werelivinginthef has joined #ruby
djbkd has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
dmbennett has quit [Ping timeout: 245 seconds]
triple_b has joined #ruby
triple_b has quit [Client Quit]
centrx has joined #ruby
Troy^ has quit [Client Quit]
<centrx> shevy, I found a new language for you: http://hhvm.com/
djbkd has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
ackpacket has joined #ruby
_br_ has joined #ruby
sinkensabe has joined #ruby
<ackpacket> Given an array of strings, are there any built in methods that can get me a has where retval['some string from list'] = 1?
<ackpacket> *get me a hash
<ackpacket> Or am I stuck writing a loop or some such
<centrx> not clear what the output is supposed to be
<centrx> is that a count?
werelivinginthef has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 245 seconds]
<centrx> count of each string in the array?
jaequery has quit [Quit: Textual IRC Client: www.textualapp.com]
yellowgh0st has quit [Quit: yellowgh0st]
ghr has joined #ruby
<ackpacket> just a 1
<ackpacket> constant
PanzerModern has quit [Remote host closed the connection]
<ackpacket> for every string present
Troy^ has joined #ruby
jobewan has joined #ruby
<centrx> ackpacket, array_of_strings.uniq.map { |x| [x, 1] }.to_h
<shevy> centrx I am actually looking at nim again
yellowgh0st has joined #ruby
<shevy> I am still surprised that php is so wide-spread
sinkensabe has quit [Ping timeout: 255 seconds]
<ackpacket> to_h creates a hash?
<ackpacket> using a list of tuples?
<centrx> yes
<centrx> There are several alternate ways to do it, but to_h is the cleanest/simplest looking one
<weaksauce> ackpacket
<weaksauce> >> Hash[*["a","b","c"].zip([1] * 3).flatten]
<eval-in__> weaksauce => {"a"=>1, "b"=>1, "c"=>1} (https://eval.in/288329)
<centrx> I think
_br_ has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 264 seconds]
diegoviola has quit [Remote host closed the connection]
_br_ has joined #ruby
<apeiros_> weaksauce: no need for flatten and splat
<weaksauce> that's true
<apeiros_> >> Hash[["a","b","c"].zip([1] * 3)]
<eval-in__> apeiros_ => {"a"=>1, "b"=>1, "c"=>1} (https://eval.in/288330)
<apeiros_> less work for you and ruby :)
wldcordeiro has quit [Ping timeout: 264 seconds]
jgt has quit [Ping timeout: 264 seconds]
siso has joined #ruby
<ackpacket> I think Cen's way looks the most programmer friendly, but let me try and understand the others
sevvie has quit [Ping timeout: 265 seconds]
<ackpacket> .zip is doing what?
<ackpacket> intertwining two arrays into an array of tuples?
sevvie has joined #ruby
<centrx> like a zipper
<ackpacket> is there an interpreter here i can use? !rb or something?
<weaksauce> >> ["a","b","c"].zip([1]*3)
<eval-in__> weaksauce => [["a", 1], ["b", 1], ["c", 1]] (https://eval.in/288335)
<ackpacket> ok, got that
ponga has joined #ruby
<ackpacket> and Hash[something] is the same as something.to_h?
<centrx> >> getch.chomp.zip a dee do
<eval-in__> centrx => /tmp/execpad-eed71022bdaa/source-eed71022bdaa:3: syntax error, unexpected keyword_rescue ... (https://eval.in/288336)
<weaksauce> >> ["a","b","c"].zip([1]*3).to_h
<eval-in__> weaksauce => {"a"=>1, "b"=>1, "c"=>1} (https://eval.in/288337)
<apeiros_> ackpacket: yes
adriancb has quit [Remote host closed the connection]
<weaksauce> >> ["a","b","c"].zip([1]*3).to_h.to_h
<eval-in__> weaksauce => {"a"=>1, "b"=>1, "c"=>1} (https://eval.in/288339)
<apeiros_> but Hash[] supports alternative formats too
<apeiros_> and to_h is only available in newer rubies
<ackpacket> on first glance, weaksauce's might look cleaner, but when you add in the fact that you have to put somelist.length in the zip...
Kricir has joined #ruby
BlakeRG has joined #ruby
JBreit has joined #ruby
last_staff has quit [Remote host closed the connection]
<ackpacket> Hash[somelist.zip([1]*somelist.length)] VS somelist.map {|x| [x, 1]}.to_h
<ackpacket> why is the zip less work?
<apeiros_> >> ["a","b","c"].zip([1].cycle).to_h
<eval-in__> apeiros_ => {"a"=>1, "b"=>1, "c"=>1} (https://eval.in/288340)
<TheNet> say I have a string string = 'test01' and I want to split it into 'test' and 01, how would I do this?
<centrx> TheNet, regex
<weaksauce> ackpacket it might not be. just something to chew on for other problems that you might have down the road
<apeiros_> TheNet: str[0,4] and str[-2,2]
<ackpacket> weaksauce: okie dokie, ty
<apeiros_> TheNet: but I guess you have more strings, so maybe you want to tell the rule behind the split
ponga has quit [Ping timeout: 250 seconds]
<TheNet> apeiros_: split at integer
<apeiros_> TheNet: and you need both components?
<TheNet> apeiros_: could be 'word503'
<TheNet> apeiros_: yes
<apeiros_> match(/(\D+)(\d+)/).captures
<apeiros_> or .split(/(?=\d)/, 2)
<weaksauce> ackpacket zip might make sense if you have two arrays that you want to join together like that and make a hash for instance
charliesome has quit [Quit: zzz]
fabrice31 has joined #ruby
<TheNet> apeiros_: .split works well
kirun has quit [Quit: Client exiting]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<TheNet> apeiros_, centrx: thanks
havenwoo_ has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
enterprisedc has quit [Quit: enterprisedc]
sargas has quit [Quit: This computer has gone to sleep]
tvw has quit []
fabrice31 has quit [Ping timeout: 245 seconds]
enterprisedc has joined #ruby
nateberkopec has quit [Quit: Leaving...]
djbkd has quit [Remote host closed the connection]
boombadaroomba has quit [Ping timeout: 240 seconds]
jobewan has quit [Quit: Leaving]
yfeldblu_ has joined #ruby
Yzguy has joined #ruby
crueber has quit [Quit: Leaving.]
ghostpl_ has quit [Remote host closed the connection]
jlast_ has quit [Remote host closed the connection]
charliesome has joined #ruby
sargas has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
jlast has joined #ruby
nateberkopec has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d10n-work has quit [Quit: Connection closed for inactivity]