millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blue_deref has joined #ruby
northfurr has quit [Quit: northfurr]
user1138 has joined #ruby
lannonbr has joined #ruby
rubie has joined #ruby
northfurr has joined #ruby
clarkenciel has quit [Ping timeout: 272 seconds]
paulcsmith has quit [Quit: Be back later ...]
jackjackdripper has quit [Quit: Leaving.]
paulcsmith has joined #ruby
frozen3 has joined #ruby
hololeap has quit [Ping timeout: 250 seconds]
Me has joined #ruby
Me is now known as VeganGreg
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
framling has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
mleung has quit [Quit: mleung]
juanpablo__ has joined #ruby
tmtwd has quit [Ping timeout: 245 seconds]
northfurr has quit [Quit: northfurr]
bruno- has joined #ruby
juanpablo__ has quit [Ping timeout: 246 seconds]
renderful has quit [Remote host closed the connection]
zendrix_ has quit []
renderful has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
atomical has joined #ruby
icarus has quit [Quit: Lost terminal]
Vile` has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
iamninja has quit [Ping timeout: 246 seconds]
frozen3 has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Vile` has joined #ruby
Chau has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
casadei_ has joined #ruby
Nieralyte has quit [Quit: Nieralyte]
Rickmasta has joined #ruby
bodie__ has joined #ruby
_seanc_ has joined #ruby
workmad3 has joined #ruby
Oog has quit []
mondo has quit [Ping timeout: 240 seconds]
bodie_ has quit [Ping timeout: 240 seconds]
bodie__ is now known as bodie_
<baweaver>
pontiki - I'll let you know what I find out on it.
Yzguy has quit [Quit: Zzz...]
Torrieri has quit [Quit: Be back later ...]
Oog has joined #ruby
<baweaver>
would pm, but you have that turned off.
Oog has quit [Client Quit]
dr3w has joined #ruby
keen____ has joined #ruby
jpfuente_ has quit [Read error: Connection reset by peer]
tubulife- has quit [Ping timeout: 240 seconds]
yh has quit [Ping timeout: 260 seconds]
jpfuentes2 has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
dopamean_ has joined #ruby
marr has quit [Ping timeout: 245 seconds]
rehat has joined #ruby
<hays>
hey im trying to use http://www.rubydoc.info/gems/rmodbus/ModBus/TCPClient such that i can have mutiple threads access the connection, but still have the connection itself gracefully fail and try to re-establish. i've no idea how to actually do this.. can someone point me in the right direction
oo_ has joined #ruby
keen___ has quit [Ping timeout: 264 seconds]
Oog has joined #ruby
saddad has quit [Ping timeout: 260 seconds]
dr3w has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
oo_ has joined #ruby
dr3w has joined #ruby
Oog has quit [Client Quit]
jobewan has joined #ruby
<hays>
right now if the connection fails it raises an exception
jhack has quit [Ping timeout: 244 seconds]
<hays>
so you can write a do loop that catches the connection and re-establishes
<drbrain>
hays: to start, you have mutual exclusion around access to the connection, right?
podman has quit [Quit: Connection closed for inactivity]
<drbrain>
but for your original question, you'll need to add an accessor that rescues the failure, re-establishes the connection, then retries
<drbrain>
ruby has syntax for that part:
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain>
begin; try_to_send_a_thing; rescue ConnectionFailure; re_establish_connection; retry; end
<drbrain>
you'll want a counter around retries
<hays>
drbrain: yeah i think ive figured out the semaphore part
Musashi007 has joined #ruby
timanema has joined #ruby
lucyinthesky has joined #ruby
<hays>
so the accessor will be what catches the exception ok
<drbrain>
yeah, s/accessor/method that accesses the socket
<hays>
is "cl" the socket
lucyinthesky has left #ruby ["Leaving"]
bricker has quit [Quit: leaving]
<drbrain>
cl?
<hays>
in the example code
_seanc_ has quit [Quit: _seanc_]
<drbrain>
oh, yes
<hays>
TCPClient.connect('127.0.0.1', 502) do |cl|
_seanc_ has joined #ruby
s2013 has joined #ruby
<hays>
so that socket is a private member basically
<drbrain>
I suppose they use it as short for "client" in this example
<drbrain>
you can usually operate without the block as well
<hays>
and i control access by whenever i access it, wrap it in a mutex and catch the exceptions to reattempt connection
<drbrain>
but I didn't read the source
<drbrain>
yes
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hays>
cool. makes sense. i will try that
troyready has quit [Remote host closed the connection]
ivanf has quit [Ping timeout: 256 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lwu has quit [Ping timeout: 245 seconds]
lwu has joined #ruby
RegulationD has joined #ruby
ivanf has joined #ruby
lannonbr has quit [Ping timeout: 246 seconds]
dr3w has quit [Ping timeout: 246 seconds]
cgrieger^away has quit [Ping timeout: 256 seconds]
oo_ has quit [Read error: Connection reset by peer]
oo__ has joined #ruby
crazydiamond has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has quit [Ping timeout: 260 seconds]
speakingcode has joined #ruby
baweaver has quit [Remote host closed the connection]
howdoico1 has joined #ruby
uwa667 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 252 seconds]
j3r0 has quit [Ping timeout: 260 seconds]
Zamyatin has joined #ruby
cgrieger^away has joined #ruby
psayian has joined #ruby
foureight84 has joined #ruby
michaeldeol has joined #ruby
<psayian>
Anyone have any books the recommend for a beginner learning ruby.
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
atomical has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
Pupeno has joined #ruby
coban2k has joined #ruby
banister has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has quit [Remote host closed the connection]
scripore has joined #ruby
rubie has joined #ruby
blarghlarghl has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
<blarghlarghl>
Hi all. I got a question about rake and tests. I have a heroku app and a scheduled heroku task, 'rake refresh'. My rakefile also includes "RSpec::Core::RakeTask.new(:spec)", with the require 'rspec/core/rake_task' as well. However running this Rakefile dies in production since the require dies - since rspec is not in the production Gemfile group.
<blarghlarghl>
So, how do I write my Rakefile so that it doesn't choke on the require?
rubie has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
mary5030 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has quit [Read error: Connection reset by peer]
frozen3 has joined #ruby
<Ox0dea>
nofxx: Do you promise that these mysterious strings are not of your making?
rubie has joined #ruby
tkuchiki has joined #ruby
framling has joined #ruby
<hays>
Ox0dea: not really bad, its a language wart im well used to
rubie has quit [Read error: Connection reset by peer]
<Ox0dea>
Why do you consider it a wart, though?
rubie has joined #ruby
pyon has joined #ruby
<hays>
it requires awareness of integers vs. floats
<Ox0dea>
Onoes!
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
<hays>
and its a lot of implicit casting to just get a fraction. but i get it. no real clean solution without swallowing the infinite precision baby whole
<Ox0dea>
What casting?
rubie_ has quit [Read error: Connection reset by peer]
<hays>
im really just surprised. not in a bad way at all
rubie has joined #ruby
<hays>
well ruby's version of casting anyway
rubie has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
rubie_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
<Ox0dea>
Ruby provides as complete a numerical tower as any other language; you're bickering about syntax without realizing it, I think.
rubie has joined #ruby
rubie_ has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
<hays>
im really just surprised
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
northfurr has quit [Client Quit]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
bustrarm has joined #ruby
<Ox0dea>
In any case, here's something I think Ruby really does get wrong:
rubie has quit [Read error: Connection reset by peer]
gwendall has joined #ruby
rubie has joined #ruby
duderonomy has joined #ruby
rubie has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
rubie has joined #ruby
northfurr has joined #ruby
Pupeno_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Read error: Connection reset by peer]
bstrrm has joined #ruby
bustrarm has quit [Ping timeout: 265 seconds]
rubie has joined #ruby
rubie_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 246 seconds]
bstrarm has quit [Ping timeout: 240 seconds]
<hays>
>>"xaxbx.split('x',-1)
rubie_ has quit [Read error: Connection reset by peer]
beefcakeba has joined #ruby
<ruboto>
hays # => /tmp/execpad-8732af49fe3b/source-8732af49fe3b:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/416523)
<psayian>
sevenseacat: Is this good fro a beginner in ruby?
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<sevenseacat>
psayian: its good for everyone.
Pupeno has joined #ruby
freerobby has joined #ruby
rubie has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
rubie has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
lannonbr has quit [Ping timeout: 272 seconds]
c_nick has joined #ruby
pdoherty has quit [Quit: Leaving]
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
hydrozen has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
Pupeno_ has joined #ruby
rubie has quit [Read error: Connection reset by peer]
rubie has joined #ruby
c_nick has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 244 seconds]
<Ox0dea>
Since when is 1.6 not best Ruby?
fedexo has joined #ruby
northfurr has quit [Quit: northfurr]
Pupeno_ has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
cabreraM516 has joined #ruby
baweaver has joined #ruby
<psayian>
Thanks sevenseacat
Hal_9000_ has quit [Quit: Hal_9000_]
Pupeno has quit [Ping timeout: 256 seconds]
c_nick has joined #ruby
<c_nick>
I am executing an Excel worksheet through my Ruby Framework using COM, My binaries are 64-bit, my Excel is 64 bit do i need Ruby 64 bit too ?
TheNet has joined #ruby
northfurr has joined #ruby
<RickHull>
Ox0dea: i'm guessing 2003
<c_nick>
i mean ideally it should but y
<RickHull>
2005 maybe?
<Ox0dea>
c_nick: Why not?
<Ox0dea>
RickHull: Nonsense.
<Ox0dea>
1.6 has everything you need and nothing you don't.
<sevenseacat>
lol
fedexo has quit [Ping timeout: 244 seconds]
<Ox0dea>
With the added bonus of compiling in an eyeblink or two.
michael_mbp has quit [Excess Flood]
<jtdoncas>
you can say that about assembly!
<RickHull>
i need oniguruma and sytactic sugar for hash key symbols
<c_nick>
Ox0dea: because ruby is just executing the sheet i mean ofcorse it should but i am not sure why
ascarter has joined #ruby
<Ox0dea>
jtdoncas: And I do! :P
<Ox0dea>
c_nick: Well, are you on a 64-bit platform?
<c_nick>
yes
Pupeno has joined #ruby
<Ox0dea>
Case closed, I reckon.
michael_mbp has joined #ruby
dr3w has quit [Ping timeout: 265 seconds]
<nofxx>
Ox0dea, I promise... hehe, sorry had to leave. They are supposedly a 44 digit [0-9] key followed by a pipe | followed by some chars that doesn't have use
<monoprotic>
particularly: You must use the rocket for symbols that require quoting: :'where.is' => x is valid but 'where.is': x is not. Ruby 2.2 has fixed this problem so you can say 'where.is': x in Ruby 2.2+.
clarkenciel has quit [Ping timeout: 246 seconds]
<rehat>
monoprotic: ok cool thanks. I copied that from Programming Collective Intelligence which is in python and I was surprised that still worked in ruby on my work computer but I ran into that error on my personal computer. :)
linuxboytoo has joined #ruby
<RickHull>
at work, it works. on personal, it gets personal ;)
<rehat>
lol
bweston92 has quit [Read error: Connection reset by peer]
Pupeno has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cheerio]
<toretore>
it was not a bug that was fixed; it was an additional feature added in 2.2
<monoprotic>
go on?
bweston92 has joined #ruby
<toretore>
=> is still the main syntax for hash literals; the key: syntax is syntax sugar that translates to `:key =>`
twohlix has quit [Ping timeout: 244 seconds]
fumduq- has quit [Read error: Connection reset by peer]
wheresmyjetpack has joined #ruby
shtirlic has quit [Ping timeout: 246 seconds]
fumduq has joined #ruby
<monoprotic>
oh, i thought you had typed "accidental"
<toretore>
2.2 added `'key':` -> `:'key' =>`
LBRapid has quit [Ping timeout: 244 seconds]
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
gregf_ has quit [Ping timeout: 245 seconds]
eam has quit [Ping timeout: 245 seconds]
eam has joined #ruby
<wheresmyjetpack>
how would you initialize an array as an instance var that calls a function on all values pushed to it?
tmtwd has quit [Read error: Connection reset by peer]
gregf_ has joined #ruby
hagabaka has joined #ruby
<toretore>
wheresmyjetpack: elaborate. what is the purpose?
LBRapid has joined #ruby
twohlix has joined #ruby
shtirlic has joined #ruby
havenwood has joined #ruby
<RickHull>
wheresmyjetpack: write a class. probably composition rather than inheritance
<wheresmyjetpack>
hanmac: thats exactly what i wanted thank you
jtdoncas has quit [Ping timeout: 252 seconds]
<RickHull>
wheresmyjetpack: really? it doesn't match at all
howdoico1 has joined #ruby
<RickHull>
that won't do shit if you @var.push(val)
<toretore>
Ox0dea: what makes you think that?
<hanmac>
wheresmyjetpack: PS: " [*inputarray] " also shows that i meaned an array, inputarray.map also works
<Ox0dea>
toretore: The Symbol syntax for Hashes didn't work for all Symbols? Definitely a bug.
<wheresmyjetpack>
RickHull: what doesn't match
<toretore>
it wasn't meant to work for all symbols
<toretore>
i doubt it was an oversight in 2.1
s00pcan has quit [Ping timeout: 272 seconds]
<Ox0dea>
wheresmyjetpack: You indicated that you wanted the function called on new elements as well.
<toretore>
it would have been very obvious
<Ox0dea>
You'd be surprised, I guess.
<hanmac>
RickHull: he might only want to do that while initialize the variable for what my thing is enough. if he wants to do it in the future with other elements too, than its not enough
<Ox0dea>
> on all values pushed to it
scripore has quit [Quit: This computer has gone to sleep]
<RickHull>
hanmac: wheresmyjetpack: sure, not my problem :) but the solution does not match the problem statement imho
s00pcan has joined #ruby
scripore has joined #ruby
<wheresmyjetpack>
RickHull no you're right. i am pushing to the array after initialization
<wheresmyjetpack>
jumped the gun there
<toretore>
wheresmyjetpack: what is this for?
tmtwd has joined #ruby
<Ox0dea>
wheresmyjetpack: Define either #push or #<< on the array's singleton class, and define it in terms of the other.
<wheresmyjetpack>
toretore i am passing a child class into parent.array, and would like the parent to update the parent reference inside of the child
tmtwd has quit [Remote host closed the connection]
<Ox0dea>
wheresmyjetpack: Arrays are already passed by reference.
<toretore>
you shouldn't manipulate the parent's internal data structures from the child
<toretore>
def add_child
<toretore>
or from outside the parent instance, i should say
<wheresmyjetpack>
toretore: RickHull: ok that helps. i was not manipulating the parent from within the child. the child just needed to refer back to the parent
s00pcan has quit [Ping timeout: 260 seconds]
<RickHull>
Ox0dea: yeah, i should have named it ActiveResource
<RickHull>
my previous example was: blah blah "Debian" where it matched (and highlighted / bolded) Linux
ruby-lang678 has quit [Ping timeout: 246 seconds]
<RickHull>
but i can't make it do that anymore
neruda has quit [Quit: Page closed]
khebbie has joined #ruby
<RickHull>
dunno if i was caught in an A/B treatment at that time
shmilan has quit [Ping timeout: 255 seconds]
<Ox0dea>
In any case, you weren't *full* of shit, so I'd like to offer an apology for being so abrasive on the matter.
<RickHull>
no worries, fully accepted and not needed :)
<RickHull>
I needled you pretty good in response ;)
khebbie has quit [Remote host closed the connection]
Wolland has joined #ruby
Wolland has quit [Client Quit]
juanpablo__ has joined #ruby
Thomas-0725 has joined #ruby
<Aeyrix>
High quantity of memes in this sector.
howdoico1 has joined #ruby
<Ox0dea>
Aeyrix! <3
fedexo has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
<Aeyrix>
Yooooo
<Aeyrix>
I'm trying to decide between private IRC net or Slack
<Aeyrix>
because my old one got a nice ddos
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<RickHull>
free Slack is pretty damn good
<RickHull>
we use it at $work
<Ox0dea>
Aeyrix: Y U NO ufw?
<Aeyrix>
wtf is ufw
<Aeyrix>
Slack is p good yeah
<Aeyrix>
but the barrier to entry is slightly higher than IRC for my group of people
<Aeyrix>
security focussed / conscious
<Ox0dea>
ufw is iptables for retards. /s
<RickHull>
that's kind of funny
<Aeyrix>
In my experience people are less likely to log in to Slack than IRC, because they're probably in other IRC nets
<Aeyrix>
:\
<Aeyrix>
Ox0dea: oh right
<RickHull>
yeah, so the barrier is cultural rather than technical
<RickHull>
that is sensible enough
<Aeyrix>
also iptables master race
<Aeyrix>
yeah
juanpablo__ has quit [Ping timeout: 244 seconds]
<Ox0dea>
Confirmed.
<Aeyrix>
Also
<Aeyrix>
iptables wouldn't help against
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx>
Aeyrix, grove?
<Aeyrix>
multi-gbit ddos
psayian has quit [Ping timeout: 246 seconds]
<Aeyrix>
nofxx: maybe maybe
<Aeyrix>
i do have one running
<Aeyrix>
irc net, that is
<Aeyrix>
i'm torn between how nice Slack is and how much control you have on an IRC net
<Aeyrix>
it was about 150 people last time
<nofxx>
Aeyrix, yeah, we need a solid good web client irc, but there ain't one
yosafbridge has joined #ruby
<nofxx>
isn't*
<Aeyrix>
I use IRCCloud for multi-server client.
fedexo has joined #ruby
<RickHull>
i say start with IRC. if you run into headaches, either with users or sysadmin, then try Slack
_seanc_ has joined #ruby
<Aeyrix>
I'm just conscious of shifting people
<Aeyrix>
and them getting irritated
<RickHull>
or what about ejabberd?
<Aeyrix>
multi user chats with XMPP are hell
RegulationD has quit [Ping timeout: 260 seconds]
<Aeyrix>
realistically it's just a (large) group of people trying to reach terminal memelocity
<Aeyrix>
but we also talk about software engineering / security a lot
kidoz has quit [Quit: Ухожу я от вас]
<nofxx>
also, slack should be rolling out the irc bridge anytime now
<Aeyrix>
It's out, it's just
<Aeyrix>
t r a s h
<Aeyrix>
r
<Aeyrix>
a
<Aeyrix>
s
<Aeyrix>
h
<nofxx>
heeh
<Aeyrix>
Like if I were to recommend Slack, I'd sufface that by saying "don't use the IRC bridge though"
<Aeyrix>
it really is bad
<sevenseacat>
yeah I've tried it before. it's quite bad.
<Aeyrix>
That's not Slack's fault, that's just how feature-rich Slack is versus IRC>
yardenbar has joined #ruby
saddad has quit [Ping timeout: 272 seconds]
j4cknewt has joined #ruby
_seanc_ has quit [Quit: _seanc_]
fedexo has quit [Quit: No Ping reply in 180 seconds.]
<nofxx>
Aeyrix, have some examples?
<Aeyrix>
Of what?
<nofxx>
features left of on irc
<nofxx>
slack*
<Aeyrix>
Anything media-rich.
<Aeyrix>
Emojis, inline uploads, etc
<Aeyrix>
they're just not send by the bridge
fedexo has joined #ruby
<nofxx>
damn..irc can do files haha, almost forgot this. I remember ppl using this for porn.
<nofxx>
DCD ? DCC DDC .. anyways, not implemented in slack bridge than
<sevenseacat>
any integrations, things like reactions, etc.
<nofxx>
can irc transfer files behind nat?
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
<Aeyrix>
yes
<nofxx>
Aeyrix, you are using irccloud? It's possible to get ppl to login directly on it? As in give a link to someone and he's talking in a channel in my private server.
<Aeyrix>
Yes, no.
<Aeyrix>
You can give people a link that, post-signup, will put them in the channel
<Aeyrix>
but there's no direct link a la KiwiIRC or Mibbit.
<Aeyrix>
idk what I'll do if I move back to Slack
<Aeyrix>
I'll gravitate off IRC most likely.
<nofxx>
irccloud signup, email and pass. Hm at least some google fb oauth would be nice than.
<Aeyrix>
I wish I knew what Slack's stack was.
<Aeyrix>
I know some of it due to selective probing, but not all of it.
axl_ has quit [Quit: axl_]
<Aeyrix>
I want to know how their backend functions. They won't tell me. :(
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhjondoh has joined #ruby
dseitz has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
lwu has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 272 seconds]
mpicci has joined #ruby
BigRubyFan has joined #ruby
<BigRubyFan>
I have a question. My form is saving this select tag properly, but on page reload, it's not loading the selected option in the select dropdown by default.
<BigRubyFan>
I researched :selected =>, but I'm reading that's depreciated. I also tried simply using current_user.profile.choice_1 at the end of the select tag, after options_for_select, and that throws an exception
<BigRubyFan>
Anyone familiar? It's because I'm using an options_for_select where a user has a dropdown consisting of "Bread", "Cheese", and "Steak", but the value is an integer, 1, 2, and 3 respectively
frozen3 has joined #ruby
christia_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<Aeyrix>
BigRubyFan: Hit up #rubyonrails fam.
<Aeyrix>
Much more likely able to help you.
<Aeyrix>
The overlap is here but some domain expertise is only in #ror.
<BigRubyFan>
Ahh, thank you.
foureight84 has quit [Quit: Be back later ...]
aganov has joined #ruby
j4d has joined #ruby
<mpicci>
Aeyrix: hey irccloud is really nice client. Got even inline gists! I'm nofxx
<Aeyrix>
Yeah it's pretty good.
<Aeyrix>
Some bugs to iron out that I've found but mostly pretty nice.
<mpicci>
Aeyrix: how this file upload works? clickable for folks to download?
<Aeyrix>
I'll be honest, I'm unsure. Never used.
j4d has quit [Client Quit]
BigRubyFan has quit [Quit: Page closed]
frozen3 has quit [Ping timeout: 256 seconds]
<Aeyrix>
BigRubyFan never joined #rubyonrails.
<Aeyrix>
I even went to go look for a solution. (:
<Aeyrix>
:( *
symm- has joined #ruby
warmonk has joined #ruby
<mpicci>
Aeyrix: yeah, only one way if you think of. browser -> irccloud:80 -> irc -> url://
<Aeyrix>
mpicci: I just have a domain combined with a small app I wrote to upload images.
<Aeyrix>
Deletes the images after 7 days.
<mpicci>
very fancy, would even give it a try, but I'll need to login everytime it seems. 2 hours inactivity on free accounts.
<Aeyrix>
You get 7 days of free permanent presence.
dseitz has joined #ruby
<Aeyrix>
I just pay the $5/mo because I'm on a bunch of networks all the time.
<Aeyrix>
Like 8.
oo_ has quit [Remote host closed the connection]
warmonk has quit [Client Quit]
warmonk has joined #ruby
warmonk has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
oo_ has joined #ruby
amclain has quit [Quit: Leaving]
foureight84 has joined #ruby
sectionme has joined #ruby
fedexo has quit [Ping timeout: 244 seconds]
shock_one has joined #ruby
mesamoo has quit [Remote host closed the connection]
sectionm1 has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
rbowlby has joined #ruby
Psi-Jack has joined #ruby
Billias has quit [Read error: Connection reset by peer]
Billias has joined #ruby
<Psi-Jack>
Hmm.. What would be the proper way to actually determine if a variable is not defined, in an if statement expecting to be true or false, or similar? So far, I have if (defined?(event[:check][:type])).nil?, but that looks silly, to me.
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Psi-Jack>
But, it's the only way, I've found so far, to actually do it, and run the code within that condition result.
freerobby1 has quit [Quit: Leaving.]
rubie has quit [Remote host closed the connection]
sectionm1 has joined #ruby
rubie has joined #ruby
sbhatore has quit [Read error: Connection reset by peer]
skakri has quit [Ping timeout: 245 seconds]
<Psi-Jack>
Hmm. Though, unless might work, if I can tack on an elsif in there?
<Ox0dea>
Psi-Jack: Never combine `unless` and `elsif`.
<Aeyrix>
So long as event[:check] is always going to exist.
<Psi-Jack>
It should, yes. ;)
<Aeyrix>
Otherwise you'll field a NoMethodError, because event[:check] would be nil, and NilClass doesn't have `[]` as a function.
<Aeyrix>
s/function/method.
<Psi-Jack>
Standard sensu event object always has event[:client] and event[:check] at least.
sectionme has joined #ruby
<Psi-Jack>
Just that... event[:check][:type] isn't always defined, though it should be, (bug report already filed).
xcesariox has joined #ruby
<Aeyrix>
Yeah that's what my code will catch.
<Psi-Jack>
Writing Sensu extensions, plugins, and bridges, to better fill my knowledge of ruby. So far my ruby knowledge has only come from Chef, so, still learning.
<Aeyrix>
Good on you.
<Aeyrix>
:>
<Aeyrix>
RickHull Ox0dea
<Ox0dea>
Qua?
<Aeyrix>
Another thing Slack does well: Inline code.
<Aeyrix>
It's lovely tbqh.
postmodern has joined #ruby
<Psi-Jack>
So, cool, yeah. just event[:check][:type].nil? is good. Cleaner.
psy_ has quit [Ping timeout: 256 seconds]
<Aeyrix>
Yep.
* Ox0dea
realizes he should've added syntax highlighting to WeeChat ages ago.
araujo has quit [Quit: Leaving]
<Aeyrix>
I had someone tell me irssi was a proper client today.
<Psi-Jack>
And covers future cases where event[:check][:type] might actually have something else. ;)
<Aeyrix>
Following on from "I can't click this link."
sectionm1 has quit [Ping timeout: 265 seconds]
<Psi-Jack>
Heh, in Konsole, even in irssi, a link would be clickable. :)
* Psi-Jack
ducks.
<Aeyrix>
I can only assume it was cmd irssi
<Aeyrix>
:^)
<Psi-Jack>
But, I don't use irssi, I use konversation. :)
<Ox0dea>
hanmac: Single quotes + interpolation = bad time.
<Psi-Jack>
Okay, Both have valid points, and could be used more effectively.
foureight84 has quit [Quit: Be back later ...]
<hanmac>
Ox0dea: yeah ok i ddint checked that too
<hanmac>
is am still sleepy
araujo has joined #ruby
<Psi-Jack>
Afterall, my logic changes whether it's "metric" or "standard", for "unknown" I'll be tossing anyway since I won't know how to handle a new check type specifically until it's actually available. :)
bruno- has joined #ruby
<Psi-Jack>
IF ever. :)
workmad3 has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
<Psi-Jack>
The File.write is pretty much just for debugging.
<Ox0dea>
Psi-Jack: In that case, `return unless event[:check][:type]` should make things cleaner.
<Psi-Jack>
Seeing the raw json event dump directly so I could see things like,... well, event[:check][:type] not being set for standard checks. :)
<Psi-Jack>
Ox0dea: But, I will be handling "metric" /and/ "standard" (but standard is nil)
<Ox0dea>
Wat.
foureight84 has joined #ruby
<Psi-Jack>
yeah.. I know.. It's stupid.. :)
<Ox0dea>
Psi-Jack: I think you want `Hash#has_key?`.
<Psi-Jack>
Threw me off when I was trying to get "standard" check types, and not being able to catch it in the hash as expected. But, standard checks are the default checks, in Sensu. metric checks do basically the same thing, but handle the event differently.
<Ox0dea>
You can't differentiate between nonexistence and a nil value with Hash#[].
<Psi-Jack>
Well, no WONDER people aren't writing good extensions for this thing. So, based on what I said... event[:check][:type] can be "metric", or without a value (standard), or possibly soemthing else in the future but I don't care about those IF they exist, future-proofing.
shock_one has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
youngbaks has joined #ruby
<hanmac>
Psi-Jack: ActiveSupport has something for that ... i think it was called try ... but i dont like ActiveSupport
<Ox0dea>
Psi-Jack: So you want `return if event[:check][:type] unless event[:check][:type] == 'metric'`, which is a little crazy.
<Aeyrix>
help
<Psi-Jack>
Ox0dea: Hmm, but if event[:check][:type] is not a key, I still need to handle it, treating it as "standard".
<Psi-Jack>
I want to handle both "metric" and "standard" but not anything else. heh
<Ox0dea>
Psi-Jack: But where "standard" is indicated with a nil value for event[:check][:type]?
shock_one has joined #ruby
<Psi-Jack>
I guess, technically it's not nil if it's just not defined as a hash key, correct?
<Ox0dea>
Well, therein lies the rub.
<Psi-Jack>
Heh
<Psi-Jack>
I mean, I'm pesturing the sensu devs about why the heck type isn't being defined for "standard" when it should be, since it's in the spec.
<Ox0dea>
Psi-Jack: My most recent suggestion will bail early if event[:check][:type] has any value at all *unless* its value is 'metric', which seems to be the behavior you're after.
<Psi-Jack>
Well, again, no.. I want to handle both "metric" and if event[:check][:type] doesn't exist, but if event[:check][:type] isn't "metric" and isn't defined (or set, or is a key), to stop processing.
<Psi-Jack>
And possibly, if event[:check][:type] is not defined OR is "standard", for in case they fix this. LOL
oo_ has joined #ruby
leat has joined #ruby
TomyLobo has joined #ruby
Philipp__ has joined #ruby
nhhagen has joined #ruby
youngbaks has quit [Quit: WeeChat 1.2]
<Psi-Jack>
Hmmm, so, if event[:check].has_key?("type"); type = event[:check][:type]; else type = "standard"
<[spoiler]>
flush the ruby IO buffer into the OS buffer
<[spoiler]>
(didn't look at the code)
<Psi-Jack>
Oh, no. I restarted sensu with the new code in place which was working until the code change.
framling has quit [Remote host closed the connection]
<Psi-Jack>
Heh, with how many things my sensu already monitors, both metrics and standard checks, those files would be flooding with stuff. And hmmm.. Moved my if..else..end into the Proc.new portion of code, and I get a lovely NoMethodError. :/
<Psi-Jack>
for has_key.
casadei_ has quit [Remote host closed the connection]
hs366 has joined #ruby
<Ox0dea>
Psi-Jack: You forgot the question mark.
<Psi-Jack>
D'oh
audiodude has joined #ruby
nhhagen has joined #ruby
<Psi-Jack>
Yeah, that was it. Thank you.
<Ox0dea>
Sure thing.
audiodude has left #ruby [#ruby]
<Psi-Jack>
Hmm, though. now it's just writing everything to /tmp/sensu_standard.json, instead.
swgillespie has joined #ruby
juanpablo__ has joined #ruby
TomyLobo has quit [Ping timeout: 246 seconds]
<RickHull>
Aeyrix: i must admit to being happy with slack's markdown features, certainly w.r.t. inline code or `cmdline snippets`
bzf has left #ruby ["WeeChat 1.2"]
<Psi-Jack>
if event[:check].has_key?("type") <-- So this isn't ever finding itself to be true. :/
<Psi-Jack>
Even when event[:check][:type] == "metric" is true.
<apeiros>
Psi-Jack: "type" and :type are not the same key
ChasedSpade has quit [Quit: No reason specified.]
Trynemjoel has quit [Ping timeout: 245 seconds]
<Psi-Jack>
Oh..
<apeiros>
>> hash = {"x" => "I'm a String"; :x => "I'm a Symbol"}; hash["x"]
<ruboto>
apeiros # => /tmp/execpad-c83fbc7e36b8/source-c83fbc7e36b8:2: syntax error, unexpected ';', expecting '}' ...check link for more (https://eval.in/416570)
<apeiros>
>> hash = {"x" => "I'm a String", :x => "I'm a Symbol"}; hash["x"]
GeissT has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<Psi-Jack>
.key?(:type) certainly works. Leading me to believe that .has_key? might actually definitely believe it according to searching has_key deprecated. ;)
GeissT has joined #ruby
<Ox0dea>
Psi-Jack: #key? is just an alias for #has_key?, but the latter "reads" better and is unlikely to be removed from the language any time soon.
greenarrow has joined #ruby
djbkd has joined #ruby
<Ox0dea>
#include? is yet another alias for #has_key?, and I do believe this is the only standard method with three distinct names, so maybe one of them will go eventually.
<Psi-Jack>
heh
<Ox0dea>
Make that four! There's also #member?.
<Ox0dea>
Utter madness.
<Psi-Jack>
heh
<Psi-Jack>
Cool. Progress..
<Psi-Jack>
Now sleepy time. Thank you all for your help. Have a better understanding of hashes in general from this. :)
<Psi-Jack>
I know many languages, just every language has their specifics. :)
GeissT has quit [Ping timeout: 260 seconds]
code1o6 has quit [Ping timeout: 265 seconds]
sectionm1 has joined #ruby
sectionme has quit [Read error: Connection reset by peer]
code1o6 has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.3-dev]
mary5030 has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
jenrzzz has quit [Ping timeout: 255 seconds]
mary5030 has joined #ruby
<Psi-Jack>
On a side note. Totally random. I cured myself of some insanity. One of my two monitors kept constantly tripping up and cycling through video inputs. DVI->VGA.. OSD would pop up as if the button to switch was hit, and cycled until it stopped long enough to select, sometimes causing the display to switch to VGA input. Cracked the sucker open and found a little dustball on the circuit board to the buttons.. Problem solved. :D
jack_rabbit has joined #ruby
<[spoiler]>
Psi-Jack: damn
AlexRussia has joined #ruby
<RickHull>
dustballs can't melt fuel beams
dh64 has joined #ruby
<Psi-Jack>
Heh
<Psi-Jack>
Hours... And hours... of frustration solved.
<[spoiler]>
I'd probably decide the monitor is shit and buy a new one
<[spoiler]>
Yours is a much more economically efficient solution :P
lessless has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
_ht has joined #ruby
jack_rabbit has quit [Remote host closed the connection]
dh64 has quit [Client Quit]
jack_rabbit has joined #ruby
Musashi007 has quit [Client Quit]
arooni-mobile has joined #ruby
maletor has joined #ruby
hahuang65_ has quit [Quit: Connection closed for inactivity]
Macaveli has joined #ruby
zeroDivisible has quit [Ping timeout: 252 seconds]
roolo has quit [Remote host closed the connection]
iamninja has joined #ruby
<ljarvis>
RickHull: i'd certainly consider it
<Psi-Jack>
[spoiler]: LOL. I almost tossed it, but I have these handy dandy tools to gently pry open snapped-together frames, like monitors and tablets tend to use.
arup_r has joined #ruby
<Psi-Jack>
Plastic shivs/pries basically. SO I put them to the test. I've also repaired my own monitors before. Capaciters sometimes blow making you think it's an unrepairable issue, but really a $2 fix.
yfeldblum has quit [Ping timeout: 244 seconds]
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
<[spoiler]>
Psi-Jack: Hmm, I'd actually be most afraid of breaking stuff while I open it up
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]>
I tend to overestimate sturdiness of things
<Psi-Jack>
heh
cibs has quit [Ping timeout: 272 seconds]
frank_____ has quit [Quit: Connection closed for inactivity]
cibs has joined #ruby
arta82 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dseitz has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
tomphp has joined #ruby
arta82 has joined #ruby
arta82 has quit [Max SendQ exceeded]
bernardio has joined #ruby
DLSteve has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
<ytti>
i got some suggestions yesterday from thermatix and darix on graphing timeseries (x/y, like mrtg) in ruby
<ytti>
i'm really looking just ruby library, to which I can feed data points, and have it puke PNG
arta82 has quit [Client Quit]
Pathfinder has joined #ruby
curses has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<[spoiler]>
ytti: I am not aware of a gem that does it; you could always make one! :)
<Ox0dea>
"Be the change you wish to see in the world."
nhhagen has joined #ruby
<[spoiler]>
Ox0dea: that is a nice saying
rbowlby has quit [Remote host closed the connection]
<Ox0dea>
[spoiler]: Gandhi was pretty good for that.
<ytti>
[spoiler], no way i'd get work hours sanctioned to do that
<Ox0dea>
ytti: And shelling out is out of the question?
<RickHull>
i'm a big fan of that maxim. particularly in social situations
<ytti>
i'll probably do something with gnuplot
<RickHull>
be the party you want to see/have
<RickHull>
make this party *the* party. it's up to you, and noone else
bernardio has quit [Quit: bernardio]
<Ox0dea>
I don't think that survives anything but cursory scrutiny, but I'll hold my tongue beyond that.
<RickHull>
wfm :toot:
<Ox0dea>
thank mr skeltal
<RickHull>
look, nerds can be social and don't you dare deny it
<[spoiler]>
RickHull: what does social mean? Sounds like a disease...
<RickHull>
you have to watch out for contagions
<RickHull>
especially maymays
<Ox0dea>
RickHull: That's certainly not the pillar of your theory I would've gone after.
<[spoiler]>
ytti: make it a gem
zenspider has quit [Quit: bye]
<[spoiler]>
and open-source it, maybe someone else is looking for something similar
terlar has joined #ruby
<RickHull>
be the change you're looking for. that's all i'm saying. i agree with Ox
arta82 has joined #ruby
<RickHull>
someone has to step up and ringlead the circus. it may as well be you, so long as you can hold their attention
workmad3 has joined #ruby
Musashi007 has joined #ruby
quimrstorres has joined #ruby
<[spoiler]>
RickHull: I don't like monkeys
<[spoiler]>
or clowns
<RickHull>
what about bears on roller skates?
<[spoiler]>
they can keep their fucking circus
<RickHull>
ice skates, even?
sinkensabe has joined #ruby
<RickHull>
what about electric skateboards, or hoverboards, even?
<ytti>
[spoiler], i just need the results, i don't have time to productize it
<ytti>
[spoiler], i wish i had, i'd be happy to do it, if someone paid me to do it :)
bruno- has joined #ruby
<RickHull>
open source =/= productizing
<RickHull>
often times you can get a dev boost, i.e. unpaid labor, by open sourcing
nhhagen has quit [Read error: Connection reset by peer]
bronson has joined #ruby
<RickHull>
not something to count on -- by far most open source projects have a single developer
nhhagen has joined #ruby
<Ox0dea>
> =/= in a programming channel
<RickHull>
> quoating meam arrows
jenrzzz has joined #ruby
<Ox0dea>
> failing to greentext
maletor has quit [Quit: Computer has gone to sleep.]
<RickHull>
> nooooah
cibs has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
<RickHull>
ok, i have to head home. some of us actually sleep, uknow
cibs has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
RickHull has left #ruby [#ruby]
MatthewRock has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
krz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
workmad3 has quit [Ping timeout: 245 seconds]
olistik has joined #ruby
ruby-lang189 has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
<MatthewRock>
Hello. I'm new to ruby. I want to do the following: given path /some/path/keyword/rest/of/path/file.extension, I want to get /rest/of/path -> so path after keyword, without file. I know how to use sed to alter string like that, but I don't know how to call sed in Ruby on string.
<MatthewRock>
So is there a way to use sed like that, or does ruby has something similar?
<apeiros>
oh dear deary me… why do I do this all wrong again…
dionysus69 has joined #ruby
xcesariox has joined #ruby
<apeiros>
anybody know how to get the directory of a gem via ruby code?
<apeiros>
i.e. similar to how Gem.datadir("gemname") gets you the data directory
shredding has joined #ruby
chichou has joined #ruby
quimrstorres has quit [Remote host closed the connection]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yh has joined #ruby
bodgix has joined #ruby
einarj has joined #ruby
leafybasil has quit [Remote host closed the connection]
f4cl3y has joined #ruby
f4cl3y has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
leafybasil has joined #ruby
MatthewRock has quit [Ping timeout: 246 seconds]
flegercovateam has quit [Quit: Leaving.]
flegercovateam has joined #ruby
quimrstorres has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
user1138 has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
<jhass>
datadir is File.join spec.full_gem_path, "data", gem_name
bernardio has quit [Ping timeout: 250 seconds]
user1138 has joined #ruby
yh has quit [Ping timeout: 244 seconds]
leafybasil has quit [Ping timeout: 246 seconds]
face has quit []
<jhass>
so Gem.loaded_specs[gem].full_gem_path ?
jenrzzz has quit [Ping timeout: 272 seconds]
krz has quit [Read error: Connection reset by peer]
<apeiros>
got distracted
* apeiros
tries that
yh has joined #ruby
<apeiros>
yupp
<apeiros>
that works
<apeiros>
great. now on to emulate rails' "lets add all directories under <gem>/app to the load path" (though, rails actually adds it to its own autoloading mechanism)
RegulationD has joined #ruby
<apeiros>
rabbit holes… I should learn to recognize them and not go down…
<DaniG2k>
they are basically all the same in that they check if @tknz; do something, else set_tokens and do something
<DaniG2k>
I want to basically write one method that can define these on the fly if possible
<yorickpeterse>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<ljarvis>
DaniG2k: just set_tokens before you ever call any of those methods
<DaniG2k>
ljarvis: I tried that but it turns out that doesnt do what I expected
<jhass>
DaniG2k: rename set_tokens to tokens and use only it to access
olistik has quit [Remote host closed the connection]
oo_ has joined #ruby
<ljarvis>
also that
<DaniG2k>
yorickpeterse girls and boys
<sevenseacat>
its not the first time you've been hit with that factoid DaniG2k
terlar has quit [Quit: WeeChat 1.2]
terlar has joined #ruby
Tempesta has joined #ruby
radgeRayden_ has quit [Ping timeout: 265 seconds]
Meow-J has joined #ruby
olistik has joined #ruby
sectionme has quit [Ping timeout: 256 seconds]
cornerma1 has joined #ruby
khebbie has joined #ruby
sectionme has joined #ruby
rdark has quit [Quit: leaving]
terlar has quit [Quit: WeeChat 1.2]
stamina has joined #ruby
<DaniG2k>
ok thanks guys
chichou has joined #ruby
<DaniG2k>
will try using define_method in a clever way :)
terlar has joined #ruby
duncannz has quit [Ping timeout: 264 seconds]
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
Ropeney has joined #ruby
oo_ has quit [Remote host closed the connection]
terlar has quit [Client Quit]
<sevenseacat>
...
<sevenseacat>
no seriously.
<ashleyhindle>
hahaha
iamninja has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
_blizzy_ has quit [Ping timeout: 240 seconds]
<ashleyhindle>
Some guys never learn :(
<apeiros>
that actually marks the first time I ponder a ban based on ?guys.
terlar has joined #ruby
einarj has quit []
mattp- has quit [Quit: WeeChat 1.1.1]
<apeiros>
anyway, DaniG2k, you're cutting yourself off of a lot of goodwill by your behavior. at least for me you're one of those people I'll probably not help.
conor_ has quit [Remote host closed the connection]
bruno- has joined #ruby
NightMonkey has quit [Ping timeout: 250 seconds]
abdoudjanifresh has joined #ruby
conor_ has joined #ruby
leat has quit [Ping timeout: 256 seconds]
oo_ has quit [Remote host closed the connection]
Kalov has quit []
sigurding has quit [Quit: sigurding]
<atmosx>
aloha
Vile` has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
kidoz has joined #ruby
oo_ has joined #ruby
<adaedra>
welcome
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
DaniG2k has quit [Quit: leaving]
phutchins1 has joined #ruby
<ekleog>
Hi there! Is there a way for object A to modify a variable internal to object B, if both belong to the same class? I'm hurt by the "unexpected tIVAR" syntax error :/
Vile` has joined #ruby
<apeiros>
ekleog: only via a method
<apeiros>
i.e., provide a method to perform that modification. if only objects from the same class should be able to call that method, mark the method as protected.
guardian has joined #ruby
<guardian>
hello I need a quick hand with httparty. I want to issue a post request http://example.com?foo=bar -- should I inject "?foo=bar" myself to the URL or should I use :query ?
jimms has joined #ruby
shazaum_ has quit [Quit: This computer has gone to sleep]
<ekleog>
apeiros: Thanks!
njr has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 260 seconds]
shock_one has joined #ruby
<apeiros>
ekleog: yw
chipotle has joined #ruby
<apeiros>
guardian: if httparty provides a method to generate the url params, use that
<apeiros>
it'll correctly encode it and all
<[spoiler]>
guardian: I think when you use the methods, it will encode them
<[spoiler]>
what he said ^
bernardio has quit [Quit: bernardio]
rodfersou has joined #ruby
sarkyniin has joined #ruby
<guardian>
yep apparently when you use :query it forges a query string
<guardian>
damn this gem is so poorly documented :/
<guardian>
also it seems setting :query to something and at the same time :body to nil makes it not forge the query string
<adaedra>
it's not a party if you don't have FUN!
phutchins has quit [Quit: WeeChat 1.1.1]
phutchins1 has quit [Quit: WeeChat 1.1.1]
<guardian>
it's definitely not one :)
robh71 has joined #ruby
joonty has quit [Ping timeout: 265 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest24 has quit [Ping timeout: 240 seconds]
lele has joined #ruby
youngbaks has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
sectionme has quit [Ping timeout: 256 seconds]
Trynemjoel has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
sectionme has joined #ruby
conor_ has quit [Remote host closed the connection]
chichou has quit []
krz has joined #ruby
shock_one has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 250 seconds]
lele is now known as Guest24
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robh71 has joined #ruby
Ropeney has joined #ruby
User458764 has joined #ruby
wedgwood has quit [Ping timeout: 246 seconds]
solars has quit [Quit: WeeChat 0.4.2]
robh71 has quit [Client Quit]
olistik has quit [Remote host closed the connection]
wedgwood has joined #ruby
solars has joined #ruby
phutchins has joined #ruby
mattp_ has joined #ruby
mattp_ has left #ruby [#ruby]
chipotle has quit [Quit: cheerio]
pyon has quit [Quit: fix config]
user1138 has quit [Remote host closed the connection]
VeganGreg has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
j4cknewt has quit [Remote host closed the connection]
user1138 has joined #ruby
pyon has joined #ruby
j4cknewt has joined #ruby
robh71 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
Ropeney has joined #ruby
thiagovsk has joined #ruby
user1138 has quit [Remote host closed the connection]
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
hs366 has quit [Quit: Leaving]
sigurding has joined #ruby
sectionm1 has joined #ruby
rikkipitt has quit [Quit: Leaving...]
frem has quit [Quit: Connection closed for inactivity]
sectionme has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
lucyinthesky has joined #ruby
but3k4 has joined #ruby
youngbaks has quit [Quit: WeeChat 1.2]
lucyinthesky has quit [Quit: Leaving]
<ekleog>
Already back: I use assert_output from Minitest to check that a given function outputs something. However, I just changed the function from using puts to print ; and suddenly assert_output finds there is nothing outputted. Do you know why ?
bruno- has quit [Ping timeout: 246 seconds]
monsieurp has quit [Quit: Lost terminal]
<[spoiler]>
ekem: did you flush?
<[spoiler]>
ekleog: * oops
faces has joined #ruby
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
iamninja has joined #ruby
face has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
bronson has joined #ruby
tuxero has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timanema has quit [Ping timeout: 272 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
hs366 has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 246 seconds]
banister has joined #ruby
robh71 has joined #ruby
intuxicated has joined #ruby
sshuff|gone is now known as sshuff
Zackio has quit [Remote host closed the connection]
Jammyhammy|Work has quit [Read error: Connection reset by peer]
skinofstars has quit [Ping timeout: 256 seconds]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[k-_ has joined #ruby
Zackio has joined #ruby
robh71 has joined #ruby
<atmosx>
ekleog: does print add a newline ? \n
<al2o3-cr>
atmosx: no
juanpablo__ has joined #ruby
<atmosx>
can't recall
<shevy>
print just prints without modification
ldnunes has joined #ruby
<atmosx>
then this might be the problem (or maybe not, try adding a newline manually and see what happens)
basmoura has joined #ruby
<atmosx>
shevy: how's life?
flou has joined #ruby
lannonbr has joined #ruby
oo_ has quit [Remote host closed the connection]
<ekleog>
atmosx: Actually that was the point of switching to print ; and assert_output gives me a diff that shows nothing is displayed ; but now debugging I seem to have much deeper problems in my code (eg. a theoretically minor change just made a seemingly trivial test infinite-loop...)
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
juanpablo__ has quit [Ping timeout: 246 seconds]
<atmosx>
ekleog: awesome -P
basmoura_ has joined #ruby
<ekleog>
Oh. My. God.
<ekleog>
Switching from print to puts just makes the infinite loop go away
VeganGreg has quit [Ping timeout: 240 seconds]
<ekleog>
Now I just wonder wtf is going on
<apeiros>
well
<apeiros>
?code ekleog
<ruboto>
ekleog, We can't help you without your code, please post it to https://gist.github.com
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nveselinov has joined #ruby
skinofstars has joined #ruby
basmoura has quit [Ping timeout: 245 seconds]
quimrstorres has quit [Remote host closed the connection]
nettoweb has joined #ruby
sdwrage has joined #ruby
quimrstorres has joined #ruby
twohlix has quit [Ping timeout: 245 seconds]
Philipp__ has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
yh has quit [Ping timeout: 245 seconds]
quimrstorres has quit [Ping timeout: 250 seconds]
twohlix has joined #ruby
unver has joined #ruby
VeganGreg has joined #ruby
yh has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Read error: Connection reset by peer]
mujou has joined #ruby
Pumukel has joined #ruby
jimms has quit [Remote host closed the connection]
rbennacer has joined #ruby
leat has joined #ruby
<[k-_>
is he goonneeee
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
conor_ has joined #ruby
<ekleog>
(no, just trying to find a minimal non-working example)
<[k-_>
you can just point us to the part that is causing the error
<[k-_>
additional code surrounding it might help, who knows?
uwa667 has joined #ruby
atomical has joined #ruby
olistik has joined #ruby
j3r0 has joined #ruby
<shevy>
atmosx it's way too hot here
<shevy>
atmosx 34.6°C I can't code at such a temperature
<shevy>
and that isn't even peak for today :(
<[k-_>
where does you live
<[k-_>
i predict northern hemisphere!
<apeiros>
shevy: aren't you in austria?
<shevy>
central europe - there is an ongoing heatwave
<[k-_>
at low altitudes!
<shevy>
yeah
<[k-_>
far away from the sea!
<apeiros>
wow, didn't know it's that much hotter over there
<[k-_>
with low cloud cover!
<shevy>
Zurich: Temperature 21°C I envy you guys :(
<apeiros>
shevy: yeah, that's just today
<shevy>
[k-_ I miss Hong Kong
<apeiros>
but indeed, I'm happy temperatures finally fell
<[k-_>
that is because the sun's ray strikes the earth's surface at an angle
<[k-_>
and the earth is tilted on it's axis at 23.5 deg C
<[k-_>
its*
sepp2k has joined #ruby
<[k-_>
in august, the northern hemisphere will be tilted towards the sun, as the earth revolves around the sun
<ljarvis>
?ot
<ruboto>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<[k-_>
but shevy isnt in ot :(
ishahnaz has joined #ruby
<ekleog>
OMG just found why ; stupid mistake...
_blizzy_ has joined #ruby
<ekleog>
My lambda was calling print, but located inside a member function called print...
d10n-work has joined #ruby
sgambino has joined #ruby
* ekleog
feels stupid
ghoti has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<[k-_>
dont name things things that are used in kernel then
<maloik>
what's the best (easiest?) way to compare memory usage when using %x(), Kernel#system, Kernel#` and a couple Chef-specific things?
<maloik>
my colleagues suspect that some of the ones they use completely duplicate the process making the server go out of memory, but I'm actually not sure of how to compare them
sectionm1 has quit [Ping timeout: 245 seconds]
<jhass>
launch your script in a memory accounting cgroup and watch that ones memory usage
sectionme has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
<jhass>
that's not the easiest way, but the most reliable one to get a significant number
StevenXL has quit [Ping timeout: 240 seconds]
juanpablo__ has joined #ruby
Hal_9000_ has quit [Quit: Hal_9000_]
dorei has joined #ruby
<maloik>
sounds somewhat hard, especially considering we're talking about chef runs in this case
<maloik>
any other options come to mind?
cabreraM516 has joined #ruby
<jhass>
well, it's a couple cgexec calls and then watching /sys/fs/cgroup/.../measure/memory.usage_in_bytes
<[k-_>
this sounds like the kind of things people would write in a blogpost hm
rbennacer has quit [Remote host closed the connection]
NeverDie has joined #ruby
NeverDie has quit [Remote host closed the connection]
bodgix has left #ruby [#ruby]
rbennacer has joined #ruby
hashrocket has joined #ruby
msnyon has joined #ruby
rubie has quit [Remote host closed the connection]
joonty has quit [Ping timeout: 245 seconds]
CorySimmons has joined #ruby
keen_____ has joined #ruby
<shevy>
hehehe
<shmilan>
Hello, everyone. I was wondering if there was a way to not return to an "if" statement when iterating through an array during an if/elsif loop once the elsif statement has been reached?
<socialjackie>
Can you post an example?
<[k-_>
"not to return to an \"if\" statement?"
lucyinthesky has left #ruby ["Leaving"]
jobewan has joined #ruby
<shmilan>
Sure. Can I link to github the example I am working with?
<finisherr>
Quick question. When I assign a var to a var, am i copying that value or assining by reference?
<[k-_>
by ref
rubie has joined #ruby
<finisherr>
so if the value of one var changes, both change correct?
blackmesa has quit [Quit: WeeChat 1.2]
<machinewar>
yep you will indeed update the referenced object if you do that, be careful
<machinewar>
might want to clone or dup
<finisherr>
just as suspected. Thanks!
lwu has quit [Ping timeout: 256 seconds]
Helheim has quit [Ping timeout: 256 seconds]
_blizzy_ has joined #ruby
finisherr has quit [Client Quit]
<socialjackie>
shmilan, do you mean the `break` statement?
soc42 has quit [Remote host closed the connection]
Helheim has joined #ruby
northfurr has quit [Quit: northfurr]
rbennacer has quit [Remote host closed the connection]
ruby-lang817 has quit [Quit: Page closed]
tkuchiki has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
<shmilan>
I tried using it but I don't think it works to what I am trying to do.. I think I need to rework the method.
<[k-_>
what are you trying to do
christiandsg has quit [Remote host closed the connection]
rcvalle has joined #ruby
khebbie has joined #ruby
Chau has quit [Quit: Leaving]
khebbie has quit [Remote host closed the connection]
nettoweb has joined #ruby
_blizzy_ has joined #ruby
coban2k has joined #ruby
psy has joined #ruby
christiandsg has joined #ruby
coban2k_ has joined #ruby
northfurr has joined #ruby
psy has quit [Max SendQ exceeded]
psy has joined #ruby
blue_deref has joined #ruby
<shmilan>
I'm checking to see if one array has the same symbol in the same index as a second array, or if they have the same symbols but different indexes.
<shmilan>
Socialjackie, I am going to be honest and say that that solution is a bit over my head :). I am going to work through it and try to understand it
nonparfumee has joined #ruby
sectionm1 has joined #ruby
<shmilan>
Lol jhass, I was working with numbers and switched to colors. That would be my fault.
rsl has joined #ruby
<[k->
>> [(a = %i[blue purple green blue red]; b = a.shuffle; a.map.with_index { |item,i| [item,b.index(item) == i] }), a, b]
<ruboto>
[k- # => [[[:blue, false], [:purple, true], [:green, false], [:blue, false], [:red, false]], [:blue, :purple, ...check link for more (https://eval.in/416843)
<jhass>
shmilan: you should answer my question nonetheless ;)
<[k->
yes momomomomo? does your ruby not return true?
<momomomomo>
nah just bored
sshuff is now known as sshuff|gone
<momomomomo>
ah my cluster is up now :D
pdoherty has joined #ruby
<jhass>
momomomomo: we got a hangman game over in #ruby-offtopic for those occasions ;)
<[k->
it's worth noting that index returns the first index
<shmilan>
I want to count two main similarities between the two arrays; if they have the same symbol and index, and if they have the same symbols but different indexes.
sectionme has quit [Ping timeout: 252 seconds]
DoubleMalt has quit [Remote host closed the connection]
<shmilan>
I am sorry if I am being confusing. I am a beginner, but everyone here is being very tolerable of me and I appreciate that.
<momomomomo>
jhass: haha
<[k->
same symbols would be using & and checking the length
bronson has quit [Ping timeout: 244 seconds]
<momomomomo>
shmilan: this might help
LMity has joined #ruby
<momomomomo>
shmilan: !ask
<[k->
index would require iterating
chouhoul_ has quit [Remote host closed the connection]
blackoperat has quit [Remote host closed the connection]
<jhass>
shmilan: try to be precise, what specific answer do you want for what input? eg, compare([:blue, :red], [:blue, :orange]) #=> 1 or #=> false or ...?
shock_one has quit [Remote host closed the connection]
RTG` has joined #ruby
JoshL has quit []
sectionm1 has quit [Ping timeout: 250 seconds]
psy has quit [Disconnected by services]
tvw has joined #ruby
troyready has joined #ruby
psy_ has joined #ruby
shock_one has joined #ruby
amclain has joined #ruby
pragmatism has joined #ruby
pauly_oc has joined #ruby
shock_one has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 246 seconds]
lwu has joined #ruby
sectionme has quit [Ping timeout: 244 seconds]
pothibo has joined #ruby
pothibo has quit [Client Quit]
mleung has joined #ruby
gwendall has joined #ruby
tomphp has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JoshL has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
rakm has joined #ruby
wldcordeiro has joined #ruby
rakm has quit [Client Quit]
rbennacer has joined #ruby
ramfjord has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
<greedo>
3
<jhass>
4
darkxploit has joined #ruby
<greedo>
yes jhass /win fail
sectionme has joined #ruby
uwa667 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
basmoura has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
ghoti_ has joined #ruby
sdwrage has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 240 seconds]
<[k->
97.32
<Nilium>
ruboto is just shy.
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
jeadr has quit [Read error: Connection reset by peer]
soc42 has quit [Remote host closed the connection]
tens0r has joined #ruby
swgillespie has quit [Client Quit]
Seich has quit [Ping timeout: 244 seconds]
hanmac has joined #ruby
flegercovateam has quit [Quit: Leaving.]
ghoti_ has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
[Butch] has joined #ruby
wldcordeiro has quit [Ping timeout: 244 seconds]
leafybasil has joined #ruby
tvw has quit []
jeadr has joined #ruby
einarj has joined #ruby
victortyau has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
leafybasil has quit [Ping timeout: 260 seconds]
ishahnaz has quit []
DelDotB has joined #ruby
rubie has quit [Remote host closed the connection]
DelDotB has quit [Client Quit]
rakm has joined #ruby
victortyau has joined #ruby
pietr0 has joined #ruby
symm- has joined #ruby
Lucky__ has joined #ruby
michaeldeol has joined #ruby
momomomomo has quit [Quit: momomomomo]
rubie has joined #ruby
lannonbr has joined #ruby
dseitz has quit [Ping timeout: 252 seconds]
Guest24 has quit [Quit: Coyote finally caught me]
fantazo has joined #ruby
bricker has joined #ruby
VeganGreg has joined #ruby
saddad has quit [Ping timeout: 256 seconds]
juanpaucar has quit [Remote host closed the connection]
RegulationD has joined #ruby
wldcordeiro has joined #ruby
VeganGreg has quit [Ping timeout: 240 seconds]
f4cl3y has quit [Ping timeout: 250 seconds]
juanpaucar has joined #ruby
juanpaucar has quit [Read error: Connection reset by peer]
juanpaucar has joined #ruby
stan has quit [Ping timeout: 244 seconds]
mephistophocles has quit [Remote host closed the connection]
benlieb has joined #ruby
User458764 has quit [Remote host closed the connection]
blackoperat has quit []
Seich has joined #ruby
tens0r has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
bmurt has joined #ruby
clarkenciel has joined #ruby
Jackneill has joined #ruby
DoubleMalt has joined #ruby
Vile` has quit [Ping timeout: 260 seconds]
<shevy>
a truly modest bot
<cschneid_>
If I make a regex a constant, it'll be only compiled once, and then reused, but if it's a literal in the code path, it'll get recompiled every time?
danieli has joined #ruby
Vile` has joined #ruby
tens0r has joined #ruby
Motoservo has quit [Quit: Over & out.]
frigidcode has quit [Quit: WeeChat 0.4.2]
<shevy>
not sure if compile is the right word but I believe it will be set anew when you have it as a variable assignment every time you assign to the variable, whereas if you stored it in a constant, you probably only just refer to the same value lateron again
steven__ has joined #ruby
rbennacer has joined #ruby
arooni-mobile has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cschneid_>
shevy: well, regexes get parsed & compiled into the state machine. But I want to use the same regex over and over, so it'd make sense to only do that once
<cschneid_>
a constant will probably do it.
<cschneid_>
TRAILING_SPACES = /\s+$/.freeze for instance
<cschneid_>
I just remember something about new versions of ruby auto-reusing strings or something if you froze them
EllisTAA has joined #ruby
sectionme has quit [Quit: leaving]
j4cknewt has joined #ruby
tvw has joined #ruby
jbw has quit [Ping timeout: 256 seconds]
jbw has joined #ruby
kirun has joined #ruby
lele has joined #ruby
kies has quit [Ping timeout: 250 seconds]
Torrieri has quit [Read error: Connection reset by peer]
arta82 has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Rutix has joined #ruby
Rutix has joined #ruby
conor_ has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
steven__ has quit [Quit: leaving]
nicechap has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
TheNet has quit [Quit: Leaving...]
arta82 has quit [Max SendQ exceeded]
pengin has joined #ruby
baroquebobcat_ has joined #ruby
pengin has quit [Client Quit]
tvw has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
baroquebobcat has quit [Ping timeout: 244 seconds]
baroquebobcat_ is now known as baroquebobcat
dseitz has joined #ruby
shock_one has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
laudo has joined #ruby
juanpaucar has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
alakra has quit [Quit: WeeChat 0.4.2]
alakra has joined #ruby
carlosoliveira has joined #ruby
sshuff|gone is now known as sshuff
codecop has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
<krz>
so @product.small_image_url.include?('/tmp/') returns true. why does [@product.small_image_url, @product.medium_image_url, @product.large_image_url].include?('/tmp/') return false?
hobodave has quit [Quit: Computer has gone to sleep.]
benlieb has quit [Quit: benlieb]
<unver>
tubbo: thanks, I'll consider using an || structure
<[k->
unclosed [
<jhass>
krz: because Array#include? isn't String#include?
<[k->
oh it's closed
troulouliou_div2 has quit [Quit: Leaving]
<[k->
derp
<jhass>
krz: check Array#grep
runinsquares has joined #ruby
platzhirsch has left #ruby [#ruby]
<krz>
ok thanks
christiandsg has quit [Remote host closed the connection]
jbw has joined #ruby
vondruch has joined #ruby
tacotaco_ has left #ruby [#ruby]
<krz>
jhass: so if i wanted to search form "/temp/", it would look like .grep(/\/tmp\//) right?
<krz>
form=for
<jhass>
yeah, %r{/tmp/} for some less ugly regex literal
yh has quit [Ping timeout: 246 seconds]
kidoz has quit [Quit: Ухожу я от вас]
jackjackdripper has quit [Quit: Leaving.]
<krz>
ah kk ty
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
dr3w has quit [Ping timeout: 240 seconds]
Torrieri has quit [Quit: Be back later ...]
<apeiros>
tmp vs. temp
<apeiros>
not that you trip over a typo ;-)
Aswebb_ has quit [Remote host closed the connection]
iamse7en has joined #ruby
tvw has joined #ruby
Aswebb_ has joined #ruby
<iamse7en>
Is there a way to round to the nearest .5? e.g. 1.1 becomes 1 and 1.3 becomes 1.5?
<Mon_Ouie>
Yes, #round
juanpaucar has joined #ruby
<Mon_Ouie>
Oh, sorry I misread
<darix>
uhm math rules are saying differently though
<iamse7en>
i guess I'll just have to make my own method and spell it all out
braincrash has joined #ruby
<shmilan>
(x*2.0).round / 2.0, where x is your number
[Butch] has joined #ruby
<gregf_>
krz: grep is on an enumerable, not a string :/
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
iamse7en: ^ what shmilan said
<gregf_>
krz: like so: ["foo bar /tmp/", "quux" ].grep(%r{/tmp/}) and for a string: "foo bar /tmp/" =~ %r{/tmp/}
jobewan has quit [Ping timeout: 255 seconds]
olistik has quit []
<socialjackie>
shmilan, there's also Numeric#fdiv for float division: (x*2).round.fdiv(2)
<iamse7en>
shmilan: awesome, working great, thanks!
<socialjackie>
wait nvm
symm- has quit [Ping timeout: 240 seconds]
bmurt has quit []
<[k->
since the first number, x, is already a float, the .0 is redundant
<[k->
in the second case, it is not
bmurt has joined #ruby
dr3w has joined #ruby
nettoweb has joined #ruby
axl_ has quit [Quit: axl_]
einarj has quit [Remote host closed the connection]
<shmilan>
^^ you're correct, [k-
<iamse7en>
right, thanks
lkba has joined #ruby
baweaver has joined #ruby
Musashi007 has joined #ruby
<shmilan>
iamse7en: no problem
scripore has quit [Quit: This computer has gone to sleep]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DoubleMalt has quit [Ping timeout: 245 seconds]
mpistone has joined #ruby
ascarter has joined #ruby
baweaver has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lwu has quit [Quit: This computer has gone to sleep]
wviana has joined #ruby
jobewan has joined #ruby
<wviana>
Hi, could you help me to get what's wrong with it ? <%= l.bandeira.try(:nome) << l.especificidade_loja_hb ? " HB" : ""%>
<jhass>
wviana: what do you think << does?
towski_ has quit [Remote host closed the connection]
<wviana>
jhass: concatenate strings, doesn't ?
hobodave has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
<jhass>
okay
<jhass>
what does .try return?
<socialjackie>
what if l.bandeira.try(:nome) is nil?
rbennacer has joined #ruby
<wviana>
jhass, socialjackie: It's a string.
<jhass>
always?
<[k->
:o try is a monad
djbkd has joined #ruby
<socialjackie>
but try sometimes returns nil.
<[k->
well somewhat
<[k->
actually im talking nonsense
thiagovsk has quit [Quit: Connection closed for inactivity]
<jhass>
any news captain obvious?
<wviana>
socialjackie: What if I do l.bandeira.nome ? It could return nil too.
<socialjackie>
If l.bandeira is nil, l.bandeira.try(:nome) would be nil instead of blowing up. That's why try exists
<jhass>
wviana: I think that expression doesn't make a whole lot of sense even if we get the errors out
<[k->
yes, it's like maybe
<jhass>
wviana: what do you want to do?
<wviana>
jhass: concatenate the " HB" if l.especificidade_loja_hb is true
djbkd has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<socialjackie>
would this work? l.especificidade_loja_hb ? "#{l.bandeira.nome} HB" : l.bandeira.nome
<[k->
better.
<jhass>
wviana: just <%= l.banderia.try(:nome) %><%= "HB" if l.especificidade_loja_hb %>
<wviana>
socialjackie: yeap
dopie has quit [Quit: This computer has gone to sleep]
<wviana>
socialjackie: Thank you very much
<socialjackie>
that works too
benlieb has joined #ruby
cball has quit [Quit: Leaving]
<wviana>
jhass: a good one too.
bmurt has quit []
ruby-lang727 has joined #ruby
<wviana>
thank you guys
<wviana>
:)
<jhass>
?guys wviana
<ruboto>
wviana, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
devoldmx has joined #ruby
prudi-ruby has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
<wviana>
folks ?
<jhass>
folks!
<[k->
not everything has to be written in an overly complex/clever way
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
((.).(.).(.)) is something you can do in haskell, and it is complex
<bricker>
[k-: unless you're a java developer
<jhass>
[k-: why don't you join #haskell already
<[k->
java code isnt clever
tens0r has joined #ruby
vondruch has joined #ruby
<[k->
haskell is toomuchtext4me
<jhass>
then stop bringing it up?
<[k->
it was just an example
<jhass>
no, not just one
<jhass>
you're talking about nothing else for days
<jhass>
it's nice that you learn haskell
<jhass>
but this channel is about ruby
sgambino has joined #ruby
lordkryss has joined #ruby
<[k->
it's the most complex code that is the shortest i know of :/
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
<prudi-ruby>
Hi! When do a Task must depend on :enviroment?
<jhass>
?rails prudi-ruby
<ruboto>
prudi-ruby, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
basmoura has quit []
thiagovsk has joined #ruby
<prudi-ruby>
My mistake! Sorry!
mephistophocles has joined #ruby
symm- has joined #ruby
mephistophocles has quit [Read error: Connection reset by peer]
mephistophocles has joined #ruby
pdoherty has quit [Remote host closed the connection]
knrz has joined #ruby
renanoronfle has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
prudi-ruby has quit [Quit: Page closed]
prudi has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeadr has joined #ruby
nzst has joined #ruby
prudi has quit [Client Quit]
dopie has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
swgillespie has joined #ruby
lele is now known as Guest24
towski_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MasterPiece has quit [Quit: Leaving]
cball has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
postmodern has joined #ruby
baweaver has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
DLSteve has joined #ruby
DLSteve has quit [Remote host closed the connection]
mephistophocles has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
DLSteve has joined #ruby
ghoti_ has joined #ruby
lessless has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghoti_ has quit [Read error: Connection reset by peer]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
sideshowcoder has quit [Quit: Connection closed for inactivity]
benlieb has joined #ruby
renanoronfle has joined #ruby
Guest24 has quit [Quit: Coyote finally caught me]
lwu_ has joined #ruby
laudo has quit [Quit: Page closed]
towski_ has quit [Remote host closed the connection]
ndrei_ has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
NeverDie has joined #ruby
christiandsg has joined #ruby
quimrstorres has quit [Remote host closed the connection]
hobodave has joined #ruby
wldcordeiro has quit [Ping timeout: 240 seconds]
csmb has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei_ has quit [Remote host closed the connection]
momomomomo has joined #ruby
ndrei has joined #ruby
bumbar_ has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
RobertBirnie has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
yalue has quit [Read error: Connection reset by peer]
<Bobsz>
Howdy, I am using optparse, but my system needs to be able to take arbitray options. That is there are so many that we can't predefine them but can assume good use input. Is there anyway to do that?
<apeiros>
jhass: yeah, then I got you correctly. can't be used in another method :)
sarkyniin has quit [Ping timeout: 260 seconds]
mwlang has joined #ruby
<apeiros>
Bobsz: I don't think optparse can do that
momomomomo has quit [Quit: momomomomo]
<jhass>
pff, details
shmilan has joined #ruby
<apeiros>
might be that you can trigger the tokenizing yourself, though
<jhass>
just use a constant
<apeiros>
jhass: then I'd have to rewrite the code which uses the method, so nope :)
<apeiros>
I prefer just using private
<miah>
ARGV is just an array, parse away =)
<jhass>
you know I'm not serious?
NeverDie has quit [Max SendQ exceeded]
<Bobsz>
miah: yes but it's nicer to use optparse
<apeiros>
jhass: it's friday evening, my non-serious detector is even less functional than normally
arup_r has joined #ruby
tvw has quit []
* aperios
slaps apeiros' seriousness detector
<apeiros>
why do you break it? :(
<jhass>
who? you did it all on your own!
<apeiros>
I know it's no good, but it worked at least sometimes
<dfockler>
yuung: it's using a mix in and calling a method called 'base_uri'
<jhass>
yeah
<yuung>
ah i see. thanks
<dfockler>
with an argument 'google.com'
<Bobsz>
There are metrics in a database and then you just give the script the metric and the item you watch to check and it sends the query. It's rather simple
<apeiros>
from which we can conclude that HTTParty does evil things on self.included
jackjackdripper1 has quit [Quit: Leaving.]
wviana has quit []
jenrzzz has joined #ruby
vondruch has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
mephistophocles has quit [Remote host closed the connection]
<yorickpeterse>
Attributes are attached to an element, sure, but you can query/use them separately
<yorickpeterse>
e.g. foo/@class would get you a list of all "class" attributes of all "foo" nodes
<jhass>
imperator: Rails/AS?
<imperator>
jhass, nah, sending a request to the azure api
thermatix has quit [Ping timeout: 255 seconds]
<imperator>
using rest-client under the hood
psy_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<jhass>
data = {location: location}; data[:tags] = tags if tags; data.to_json is what I'd do
diegoviola has quit [Quit: WeeChat 1.2]
psy_ has quit [Max SendQ exceeded]
revoohc has quit [Quit: revoohc]
sigurding has quit [Quit: sigurding]
codecop has quit [Quit: Išeinu]
Torrieri has quit [Quit: Be back later ...]
<ljarvis>
yorickpeterse: right yeah i know they can be queried separately but i guess i expected that to do a nested query into the nodes to search for and map attributes, but i guess that makes little sense
<ljarvis>
yorickpeterse: is that to make querying attributes easier/faster?
radgeRayden_ has joined #ruby
<yorickpeterse>
No, that's "just" how it works
<yorickpeterse>
:P
<ljarvis>
heh right
<yorickpeterse>
There are basically two types of node sets in Oga:
<jhass>
but yeah, in Crystal you'd probably do convenience methods that do some casting, node_by_xpath, attribute_by_xpath etc
<yorickpeterse>
1) regular node sets
<yorickpeterse>
2) owned node sets
<yorickpeterse>
owned sets are those that belong directly to an XML::Node
<yorickpeterse>
e.g. the child elements of another element
<yorickpeterse>
in such a case the NodeSet is owned by the parent element
<ljarvis>
right yeah
<yorickpeterse>
XPath queries produce regular NodeSet instances
<yorickpeterse>
that just contain references to the actual objects
<ljarvis>
i see
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oxpom has quit [Ping timeout: 264 seconds]
<yorickpeterse>
The reason XML::Attribute is not a child of XML::Node is because Node has methods such as "parent", "next", "previous", etc, which make no sense for attributes
tommek has joined #ruby
<apeiros>
yorickpeterse: are xml attributes not considered to be ordered?
<apeiros>
(parent could be the node owning the attribute)
quimrstorres has quit [Remote host closed the connection]
<yorickpeterse>
ordered yes, but they don't have parents for example
gwendall has quit [Remote host closed the connection]
<yorickpeterse>
so next/previous would make some sense
<yorickpeterse>
but I've yet to see somebody do something like getting attribute 1, then calling "next" on it
hazelux has quit [Remote host closed the connection]
gwendall has joined #ruby
<apeiros>
I'd more expect people to rely on something like attributes being reproduced in the same order
<yorickpeterse>
There are also a bunch of other methods in Node that don't make sense for Attribute
<yorickpeterse>
some don't even belong in Node, such as "children" :/
<yorickpeterse>
but can't change that now
shmilan has quit [Ping timeout: 260 seconds]
<yorickpeterse>
apeiros: attributes are stored in an array internally
stallmen has joined #ruby
<stallmen>
how should i learn ruby
<apeiros>
ok, so order is retained
<ljarvis>
?books stallmen
<ruboto>
stallmen, I don't know anything about books
<ljarvis>
o
<yorickpeterse>
IIRC I didn't pick Hash because of some potential caching conflicts
<ljarvis>
?learn
<ruboto>
I don't know anything about learn
<yorickpeterse>
Ah yes
<yorickpeterse>
If you'd update the attribute name you'd also have to update the Hash key
<yorickpeterse>
I mainly stick to certain patterns because breaking away from them is too painful after years
quimrstorres has joined #ruby
<yorickpeterse>
the next step will be deciding on cutting down YARD crap
<ljarvis>
meh, I poke fun but apart from the insane amount of YARD (which I don't really like anyway), oga is very well written
<yorickpeterse>
e.g. I want a way to remind my future self (and others) what input/output types an object can operate on, but YARD tags are starting to annoy me too much
<yorickpeterse>
I've yet to find a decent way, hence I'm sticking with YARD atm
howdoico1 has joined #ruby
<yorickpeterse>
for some code it's really not obvious what the input is by just looking at the method
<yorickpeterse>
I also really need to cut down the indent levels in the compiler somehow
Me has joined #ruby
<ljarvis>
I mean I'd just name it node or input_node or something
<ljarvis>
*shrug*
<yorickpeterse>
ljarvis: the trick here is that there are different nodes
Me is now known as Guest61636
<yorickpeterse>
e.g. there's AST::Node from the "ast" Gem
<yorickpeterse>
but there's also Oga::Ruby::Node
<yorickpeterse>
both are quite different
<ljarvis>
xml_node
quimrstorres has quit [Ping timeout: 250 seconds]
<ljarvis>
:D
<ljarvis>
ah
<ljarvis>
meh
NeverDie has quit [Max SendQ exceeded]
<mwlang>
in Jekyll templates, is it possible to include a dynamically constructed path? I’m working on versioned documentation where I generate the documentation for each gem version released. So, instead of {% include toc.html %} I have page.version (on the page’s front-matter) like “v0.4”. and I want to include the toc.html for v0.4, so {% include “v0.4/” + footer.html %} or something along these lines…
Musashi007 has quit [Quit: Musashi007]
ledestin has joined #ruby
<yorickpeterse>
if YARD wasn't dumb as a brick I could probably cut down a lot of @return tags
<tubbo>
^
<ljarvis>
meh you have some patience, I just flat out refuse to use yard
<tubbo>
it would be nice if YARD could somehow evaluate my code as well as statically analyze it
<yorickpeterse>
it should be able to determine that based on what the false() method returns
amclain has joined #ruby
<yorickpeterse>
ljarvis: the HTML output is blergh
<tubbo>
ljarvis: what do you use to document code? we've been resorting to the Slate middleman template for our APIs and just a regular middleman site for the guides
<yorickpeterse>
But I prefer the tags over the freeform style of rdoc/tomdoc
<ljarvis>
it's all blergh for me
bougyman has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
hasB4K has left #ruby ["WeeChat 1.2"]
<ljarvis>
tubbo: I use tomdoc but I don't care much about the HTML output and have a custom rdoc generator
<tubbo>
RABID: Really? A Better and more Informative Documentation
<ljarvis>
yeah I really like the freeform style
Guest61636 has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
<ljarvis>
but probably cause I usually read documentation inside the code
<yorickpeterse>
ljarvis: the problem I have with it is that one person will write "This method returns XXXX" while somebody else will, somewhere at the bottom of a docblock, write "returns XXXX"
<ljarvis>
and not some shitty html template
<yorickpeterse>
so scanning for what it actually returns can be hard at times
<tubbo>
i'm a huge fan of tomdoc
<ljarvis>
yeah I agree there's pitfalls
The_Phoenix has quit [Quit: Leaving.]
* yorickpeterse
actually has comments folded by default
<yorickpeterse>
"In all cases “R” is replaced by a rating topic (e.g. “overall”). There can be multiple rating topics in a single object. Each rating object has the following fields:"
NeverDie has joined #ruby
<yorickpeterse>
There's no clear way to describe that sadly. I thought about using JSON schemas, but those are a PITA to read
<ljarvis>
ah I didn't get that far
<yorickpeterse>
and I've yet to find a good visualization tool for it
NeverDie has quit [Max SendQ exceeded]
<ljarvis>
k it's been 13 hours, im getting off the computer
<lagweezle>
From what I'm reading in the docs, File.open('/file_that_does_not_exist', 'w') should create a new file, but I instead get "Errno::ENOENT: No such file or directory" ... What am I missing? >.<
<ljarvis>
probably a directory doesn't exist that you're going into
chabil has joined #ruby
<ljarvis>
k actually going
jalcine is now known as jacky
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<mwlang>
nevermind, it’s just liquid (didn’t realize that right away!). So setting a toc_file_path variable in the page’s front matter makes it work.
sigurding has quit [Ping timeout: 252 seconds]
sigurding_ is now known as sigurding
s00pcan has quit [Ping timeout: 250 seconds]
blarghlarghl has joined #ruby
benlieb has quit [Quit: benlieb]
<lagweezle>
Oh. I feel rather silly now. Thank you, ljarvis ...
benlieb has joined #ruby
phutchins has joined #ruby
s00pcan has joined #ruby
chipotle has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has joined #ruby
<blarghlarghl>
I have a lot of rspec files all over the place. Our codebase is rather large. Is there a smart way to have a 'run all tests' rake task?
imperator has left #ruby ["Leaving"]
rodfersou has quit [Quit: leaving]
Spami has quit [Quit: This computer has gone to sleep]
jackjackdripper has quit [Quit: Leaving.]
<yorickpeterse>
blarghlarghl: dump them in spec/project-name
<yorickpeterse>
then run "rspec spec"
gard has quit [Ping timeout: 260 seconds]
<yorickpeterse>
alternatively run "rspec directory1 directory2 directory3"
crankharder has quit [Ping timeout: 240 seconds]
<blarghlarghl>
yorickpeterse: yeah, i was thinking of moving them into one 'spec' directory in the root, i.e. /spec/module1, /spec/module2, etc.
phutchins has quit [Ping timeout: 252 seconds]
<blarghlarghl>
yorickpeterse: will rspec spec then run all specs in those subdirectories too?
<yorickpeterse>
Yes
Yzguy has joined #ruby
<yorickpeterse>
It grabs all *_spec.rb files recursively
<blarghlarghl>
yorickpeterse: great, i'll go and do that then.
rubie has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
rubie has joined #ruby
bruno- has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ZeeNoodleyGamer>
Anyone here use Passenger?
j4cknewt has quit [Read error: Connection reset by peer]
<sivsushruth>
yes
loly0 has joined #ruby
casadei_ has joined #ruby
j4cknewt has joined #ruby
mary5030 has quit [Remote host closed the connection]
skade has joined #ruby
<ZeeNoodleyGamer>
I'm having trouble getting anything to show up, I can see the index, but the index file(index.rb) doesn't show, and any file just downloads instead of runs, and they are all executable
mary5030 has joined #ruby
dgutierrez1287 has joined #ruby
<ZeeNoodleyGamer>
I have apache, and have tried going through all the docs for passenger, but to no avail
skade has quit [Client Quit]
sparrk has joined #ruby
<sparrk>
Quick question. Why does URI report that '/' as relative?
<sparrk>
isn't that an absolute uri?
casadei_ has quit [Ping timeout: 260 seconds]
loly0 has left #ruby [#ruby]
<Ox0dea>
sparrk: How do you mean?
darwingr has joined #ruby
<ZeeNoodleyGamer>
I always thought absolute meant with the domain, and relative, is within the / but without the domain
mary5030 has quit [Ping timeout: 255 seconds]
<Ox0dea>
Aye, I believe sparrk has conflated URIs with filesystem paths.
<Ox0dea>
But I'm almost certain there's some gotcha to beware of with href="/".
<sparrk>
Whew. Well I'm happy to learn a gotcha, but now I'm calling into question things like relative and absolute. Writing a web crawler has been very crazy. (did you guys know about the <base> element?!)
<Ox0dea>
Fun fun.
<sparrk>
Ok, I'll ask one of the URI maintainers for further instructions. Thanks for the help!
<Ox0dea>
sparrk: URI#relative? is not behaving incorrectly.
jeadr has quit [Remote host closed the connection]
<ZeeNoodleyGamer>
sivsushruth: any input on my perdicament?
<Ox0dea>
sparrk: It's returning whether the URI in question is "domain-relative".
<sparrk>
ahhh
<sparrk>
Thank you
<sivsushruth>
ZeeNoodleyGamer: hold on
<Ox0dea>
Sure thing.
chills42 has joined #ruby
<sivsushruth>
ZeeNoodleyGamer: it should be index.html.erb
darkxploit has joined #ruby
<sivsushruth>
and remove the index.html from public/
jeadr has joined #ruby
<Ox0dea>
sparrk: More specifically, #relative? is defined as !#absolute?, which returns whether the URI has any scheme at all.
<[spoiler]>
sparrk: an absolute URI must contain the scheme, authority (which consist of an optional username, password and a mandatory hostname), and a path;
thiagovsk has quit [Quit: Connection closed for inactivity]
<Ox0dea>
[spoiler]: Not according to Ruby's URI library.
<sparrk>
[spoiler] Thanks for the explanation. I assumed that I could treat what "relative" and "absolute" mean in the browser.
workmad3 has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 264 seconds]
<Ox0dea>
sparrk: Your assumption was correct?
<Ox0dea>
The existence of a scheme is what makes a URI absolute.
symm- has quit [Ping timeout: 250 seconds]
<[spoiler]>
sparrk: might be that I am going off from an outdated URI RFC (I read it a long time ago), maybe it was updated; or maybe I just incorrectly remember which parts were mandatory
chills42 has quit [Ping timeout: 272 seconds]
<[spoiler]>
(for it to be considered absolute)
gard has quit [Ping timeout: 265 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
<Ox0dea>
[spoiler]: A service could register the "a" protocol and consider the empty string to be valid, in which case rejecting "a:" as a valid URI would be incorrect.
dfockler has joined #ruby
<[spoiler]>
Ox0dea: good point
<ZeeNoodleyGamer>
heck
wldcordeiro has quit [Read error: Connection reset by peer]
<ZeeNoodleyGamer>
amazon could do some weird stuff
<ZeeNoodleyGamer>
being their getting into different things
einarj has quit [Ping timeout: 264 seconds]
robh71 has joined #ruby
<[spoiler]>
Ox0dea: yes you're right, I was talking about the original URI proposal, which is was obsoleted a few times in the past two decades :/
wldcordeiro has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<Mon_Ouie>
For some reason I read "past two weeks" and was quite confused
<[spoiler]>
Mon_Ouie: that's jsut for websockets :P
<[spoiler]>
just*
jobewan has quit [Quit: Leaving]
<[spoiler]>
RFC1738 seems to be the latest one (+ updates in RFC3986, RFC6874 and RFC7320)
<[spoiler]>
<scheme>:<scheme-specific-part>
nfk has joined #ruby
<[spoiler]>
Only the scheme is mandatory for the path to be considered absolute (for a generic URI)
j4cknewt has quit [Remote host closed the connection]
<[spoiler]>
what I said is still valid for HTTP URIs
Jackneill has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 244 seconds]
Motoservo has joined #ruby
spider-mario has quit [Remote host closed the connection]
havenwood has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
Yzguy has joined #ruby
decoponio has joined #ruby
phutchins has quit [Read error: Connection reset by peer]
<[spoiler]>
yuung: you can use `extend` inside a class body, too
<Ox0dea>
You can use #extend anywhere. :)
<yuung>
[spoiler], Ox0dea, shevy, thanks
Musashi007 has joined #ruby
<[spoiler]>
Erm sorry i linked the wrong thing *sigh*
foureight84_ has quit [Quit: Be back later ...]
Musashi007 has quit [Client Quit]
<[spoiler]>
but yes the point still stands
<shevy>
it's getting late again
<shevy>
[spoiler] may omit some individual characters
<[spoiler]>
LOL :D
<[spoiler]>
shevy: It's pretty much like being speech impaired in a digital sense.
EllisTAA has joined #ruby
rehat_ has quit [Remote host closed the connection]
<[spoiler]>
type-impaired
modern has joined #ruby
modern has joined #ruby
howdoico1 has quit [Ping timeout: 245 seconds]
TheNet has joined #ruby
chills42 has quit [Ping timeout: 244 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Ping timeout: 244 seconds]
XoRoN has joined #ruby
Encapsulation has joined #ruby
jeadr has quit [Remote host closed the connection]
DLSteve has quit [Quit: Leaving]
jeadr has joined #ruby
stardiviner has joined #ruby
ff7f00 has joined #ruby
ruurd_ has quit [Quit: ZZZzzz…]
sivsushruth has quit [Ping timeout: 252 seconds]
lannonbr has quit [Quit: WeeChat 1.2]
hinbody has quit [Quit: leaving]
TomyLobo has quit [Ping timeout: 244 seconds]
lannonbr has joined #ruby
<ff7f00>
Hi #ruby, I was wondering if anyone has heard of efforts to implement afl-fuzz instrumentation for Ruby code (similar to python-afl https://bitbucket.org/jwilk/python-afl)?
sivsushruth has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
rcvalle has quit [Quit: rcvalle]
redpants has joined #ruby
pengin has joined #ruby
avitzurel has joined #ruby
howdoico1 has joined #ruby
jtdoncas has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Changing host]
troulouliou_div2 has joined #ruby
benlieb has joined #ruby
blue_deref has quit [Quit: bbn]
sepp2k has joined #ruby
christiandsg has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Torrieri has quit [Quit: Be back later ...]
blackmesa has joined #ruby
Lucky__ has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]