havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.3; 2.2.6; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
ascarter has quit [Client Quit]
antoniobeyah has joined #ruby
ascarter has joined #ruby
OTORelic2 has quit [Ping timeout: 245 seconds]
nankyokusei has quit [Ping timeout: 265 seconds]
h1fuelcell has joined #ruby
cdg has joined #ruby
symm- has quit [Ping timeout: 248 seconds]
Yzguy has joined #ruby
sp4rrow has joined #ruby
muelleme has joined #ruby
sp4rrow has quit [Client Quit]
sp4rrow has joined #ruby
toretore has quit [Ping timeout: 244 seconds]
Vile` has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
cdg has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 248 seconds]
h1fuelcell has quit [Remote host closed the connection]
Yxhuvud has joined #ruby
raul782 has joined #ruby
Snickers has quit [Quit: Snickers]
awc has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
h1fuelcell has joined #ruby
Cra2yZer0 has joined #ruby
jeyraof has quit [Quit: Leaving]
ELLIOTTCABLE is now known as ELLINIMINO
SteenJobs has quit [Quit: SteenJobs]
claudiuinberlin has quit []
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Jameser has joined #ruby
SteenJobs has joined #ruby
OTORelic4 has joined #ruby
h1fuelcell has quit [Ping timeout: 268 seconds]
Jameser has quit [Client Quit]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
OTORelic3 has quit [Ping timeout: 264 seconds]
Cra2yZer0 has quit [Ping timeout: 248 seconds]
whathappens has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
whathappens has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
h1fuelcell has quit [Remote host closed the connection]
aaronwed1 has joined #ruby
minimalism has joined #ruby
whathappens has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 246 seconds]
johnny56_ has joined #ruby
x77686d has quit [Quit: x77686d]
GodFather has joined #ruby
sp4rrow has quit [Read error: Connection reset by peer]
sp4rrow has joined #ruby
mahlon has joined #ruby
SteenJobs has quit [Quit: peaceee]
SpiffTR has joined #ruby
SpiffTR has quit [Ping timeout: 246 seconds]
montanonic has quit [Ping timeout: 260 seconds]
Azure has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
harai has joined #ruby
nettoweb has quit [Client Quit]
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
h1fuelcell has joined #ruby
nankyokusei has joined #ruby
kuSuSE has joined #ruby
jcao219 has quit [Ping timeout: 246 seconds]
ELLINIMINO is now known as ELLIOTTCABLE
nankyokusei has quit [Ping timeout: 252 seconds]
x77686d has joined #ruby
awc has quit [Quit: Mutter: www.mutterirc.com]
Yzguy has quit [Quit: Zzz...]
Channel6 has quit [Quit: Leaving]
tpendragon has quit [Ping timeout: 245 seconds]
al2o3-cr_ has joined #ruby
bmurt has joined #ruby
al2o3-cr has quit [Ping timeout: 252 seconds]
raul782 has joined #ruby
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
x77686d has quit [Quit: x77686d]
raul782 has quit [Ping timeout: 268 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
arescorpio has joined #ruby
x77686d has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
BlaDe^ has joined #ruby
<BlaDe^> hi... i'm trying to debug why a build script is failing, could anyone help me parse an error?
<BlaDe^> build/maven_fetcher_debug:95:in `get_var': undefined method `get_var' for nil:NilClass (NoMethodError)
<BlaDe^> the line is: first_text(@doc.root, "properties/#{k}") || parent.get_var(k)
<BlaDe^> if I do puts parent I get an xml pom file (not nil) and k is project.groupId ... which exists in the pom
<matthewd> Then the line is being executed more than once, and the one you're seeing output from is not the one that's failing
<BlaDe^> that makes perfect sense.. since I see project.groupId twice
<BlaDe^> so now I need to figure out why the xml isn't present on the second iteration.. thanks
<BlaDe^> why doesnt print foo show nil when it's nil? is there something else I should be using than puts?
<matthewd> >> nil.to_s
<ruby[bot]> matthewd: # => "" (https://eval.in/694746)
<BlaDe^> is there something better than puts for debugging?
<matthewd> You want #p
<BlaDe^> ack, ty
<matthewd> p(x) == puts(x.inpect)
* BlaDe^ doesn't know ruby ;)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Madplatypus has joined #ruby
SpiffTR has joined #ruby
<BlaDe^> ha, nil.to_s isn't implicit? in `+': no implicit conversion of nil into String (TypeError)
bturker has joined #ruby
<baweaver_away> >> x = 5; p(x) == puts(x.inspect) # Not strictly so
<ruby[bot]> baweaver_away: # => 5 ...check link for more (https://eval.in/694747)
baweaver_away is now known as baweaver
<baweaver> nope, it's touchy on that one
<BlaDe^> do I need to do foo || foo.to_s on the variables i'm trying to print?
<z64> nah
yeticry has quit [Ping timeout: 258 seconds]
<baweaver> foo.to_s works fine
<baweaver> though you may want to consider sane defaults.
yeticry has joined #ruby
<BlaDe^> i didn't write this :( but it is the bane of my existence whenever I touch this particular system
<baweaver> gotta jet
bturker has quit [Ping timeout: 256 seconds]
SpiffTR has quit [Ping timeout: 268 seconds]
Hink has quit [Quit: quit from client]
nankyokusei has joined #ruby
Hink has joined #ruby
Azure has quit [Remote host closed the connection]
<BlaDe^> can I make this expand to ... not a pointer? #<REXML::Elements:0x007f9faa9fbe28>
<z64> #inspect it
<matthewd> That looks like it *is* the inspect output
<z64> nah, if you just puts an object it will be like that
nankyokusei has quit [Ping timeout: 250 seconds]
tomlynn[m] has quit [Remote host closed the connection]
<BlaDe^> gotcha ok
Azure has joined #ruby
frozengeek has quit [Quit: frozengeek]
ta_ has joined #ruby
heftig has quit [Read error: Connection reset by peer]
heftig has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h1fuelcell has joined #ruby
emerson has quit [Quit: leaving]
emerson has joined #ruby
<BlaDe^> is there something like bash -x for ruby? :D
<z64> ah, as a bash rookie.. what exactly does that do?
<z64> oh.
<BlaDe^> not quite the same, set -x in bash will enable debug mode, which basically traces every command and its output
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<matthewd> TracePoint.new(:line) {|tp| puts "#{tp.path}:#{tp.lineno}: #{File.read(tp.path).lines[tp.lineno - 1]}" }.enable
<matthewd> (yes, you reallllly want to change that to cache the file contents... but still.)
f4 has quit [Remote host closed the connection]
swills has quit [Read error: Connection reset by peer]
swills has joined #ruby
gloscombe has quit [Quit: gloscombe]
h1fuelcell has quit [Remote host closed the connection]
<apeiros> matthewd: could make that into a gem
mountpoint has joined #ruby
<BlaDe^> what does that actually do / how do I use it?
kuSuSE has quit [Quit: Konversation terminated!]
<matthewd> BlaDe^: What you asked for / run it at the top of your script
dviola has quit [Quit: WeeChat 1.6]
h1fuelcell has joined #ruby
<BlaDe^> oh hey this looks awesome. understandbly slower, turns out this script does quite a lot :D
<matthewd> apeiros: Dunno... it seems you'd want to apply a bunch of filtering to distinguish "code I care about" from "implementation detail". By the time you do that, you've written more code than the thing that does the thing.
<BlaDe^> yeah, for example in my case it spends most of its tine in rexml which I don't really care about
<BlaDe^> one day maybe I'll learn to ruby and do things myself :p
drorp24[m] has joined #ruby
<matthewd> BlaDe^: Right.. so you can add an `if` around the puts, to ignore it if the path is in rexml
kuSuSE has joined #ruby
mountpoint has quit [Client Quit]
<matthewd> BlaDe^: It's just running the block of code inside the braces, for each line executed -- so the block can be as complex as you need
<BlaDe^> so I could do maybe |tp| unless tp.path.include?"rexml" puts ... ?
<matthewd> Yup
<tau> hi
<tau> i'm drunk.
h1fuelcell has quit [Ping timeout: 248 seconds]
<tau> does someone want to talk
<tau> about something
<tau> ?
<matthewd> BlaDe^: Alternatively, just exclude the path to your ruby stdlib; you likely don't care about anything happening in there
x77686d has quit [Quit: x77686d]
<matthewd> (i.e., the part of the rexml path before 'rexml')
<tau> i have been thinknig about some projects in ruby. is there something like event in ruby?(something similar to that that there is in javascript)?
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mountpoint has joined #ruby
<BlaDe^> matthewd: that worked awesome!
<matthewd> tau: There's the concurrent-ruby library... it probably has the most similar concepts
<matthewd> tau: (it also has an Event class, but that's something different)
<BlaDe^> for someone that knows how to ruby.... is the issue obvious to you? http://pastebin.com/nkdY06Dq
<ruby[bot]> BlaDe^: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0294cdeb4a52f4a5b5b3c522ef61eebe
<ruby[bot]> BlaDe^: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<BlaDe^> thanks ruby[bot]
* BlaDe^ rolls eyes
ByronJohnson has quit [Ping timeout: 246 seconds]
<tau> matthewd i'm considering to port this work to ruby https://github.com/iogf/untwisted
<tau> matthewd i'm wondering whether there is something similar in ruby.
ByronJohnson has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
<matthewd> BlaDe^: @doc.elements["project/parent"] is nil
enterprisey has joined #ruby
<BlaDe^> matthewd: yeah, but on the second iteration it says that.. i'm not sure why it does two iterations, the xml file I printed has <project xmls=...."> <version>4</version> </project>
<BlaDe^> this recursively iterates through dozens of xml files so it's a little hard to debug, and it just randomly breaks every few months, this is the most confusing breakage i've had tho
nikivi has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
giraffe has quit [Quit: ZNC - http://znc.in]
<matthewd> BlaDe^: Best guess, then, is that it's breaking on a different blob of XML than you're looking at
d0nn1e has quit [Ping timeout: 258 seconds]
<BlaDe^> yeah, blergh, perhpas this is a Monday task
Dobler has joined #ruby
d0nn1e has joined #ruby
<matthewd> tau: I'm not sure what that's doing
xlegoman has joined #ruby
mountpoint has quit [Quit: Konversation terminated!]
giraffe has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Dobler has quit [Ping timeout: 252 seconds]
tpendragon has joined #ruby
mountpoint has joined #ruby
nankyokusei has joined #ruby
jcao219 has joined #ruby
SpiffTR has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
SpiffTR has quit [Ping timeout: 248 seconds]
moei has quit [Quit: Leaving...]
moei has joined #ruby
ta_ has quit [Remote host closed the connection]
boon_ has joined #ruby
swills has quit [Read error: Connection reset by peer]
jomakasi[m] has joined #ruby
Luca[m] has joined #ruby
multivac[m] has joined #ruby
davix[matrix] has joined #ruby
kineticrootkit[m has joined #ruby
tobyn[m] has joined #ruby
Xi[m] has joined #ruby
coreyja[m] has joined #ruby
eliotk[m] has joined #ruby
laithshadeed[m] has joined #ruby
Michael5[m] has joined #ruby
fjj[m] has joined #ruby
riotgsmport[m] has joined #ruby
daveyboi[m] has joined #ruby
M-shine has joined #ruby
kp666[m] has joined #ruby
bascht has joined #ruby
meaggan[m] has joined #ruby
n[m] has joined #ruby
guanjian[m] has joined #ruby
M-manveru has joined #ruby
Giphy[m] has joined #ruby
M-mistake has joined #ruby
cpfeilschifter[m has joined #ruby
velu_aon[m] has joined #ruby
philidor[m] has joined #ruby
Donalmartin[m] has joined #ruby
serah[m] has joined #ruby
h42r62[m] has joined #ruby
vma[m] has joined #ruby
fladson[m] has joined #ruby
tomlynn[m] has joined #ruby
mountpoint has quit [Quit: Konversation terminated!]
sepp2k has quit [Quit: Leaving.]
mountpoint has joined #ruby
mountpoint has quit [Max SendQ exceeded]
optiz0r has quit [Ping timeout: 260 seconds]
libastral has quit [Ping timeout: 256 seconds]
solocshaw has joined #ruby
aknagi has quit [Remote host closed the connection]
libastral has joined #ruby
nikivi has quit [Quit: irc]
mountpoint has joined #ruby
rfv has quit [Read error: Connection reset by peer]
rfv has joined #ruby
agent_white has joined #ruby
CloCkWeRX has joined #ruby
jetpack_joe has joined #ruby
heftig has quit [Quit: heftig]
heftig has joined #ruby
solocshaw1 has joined #ruby
solocshaw1 has quit [Client Quit]
solocshaw has quit [Ping timeout: 258 seconds]
aryaching has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
aryaching has joined #ruby
jetpack_joe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aaronwed2 has joined #ruby
aaronwed1 has quit [Ping timeout: 264 seconds]
zukin has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
harai has quit [Ping timeout: 258 seconds]
x77686d has joined #ruby
zukin has quit [Ping timeout: 268 seconds]
hanmac has quit [Ping timeout: 258 seconds]
SpiffTR has joined #ruby
swills has joined #ruby
bturker has joined #ruby
SpiffTR has quit [Ping timeout: 245 seconds]
bturker has quit [Ping timeout: 256 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
yeticry has quit [Ping timeout: 245 seconds]
hanmac has joined #ruby
yeticry has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
x77686d has quit [Quit: x77686d]
railssmith has joined #ruby
JeanCarloMachado has joined #ruby
ericsupreme has joined #ruby
ericsupreme has quit [Remote host closed the connection]
OTORelic4 has quit [Ping timeout: 250 seconds]
Immune_ has joined #ruby
raul782 has joined #ruby
bonhoeffer has joined #ruby
<bonhoeffer> why: '7'.unpack('H*') => 37
Immune has quit [Ping timeout: 245 seconds]
<bonhoeffer> '7'.hex => 7
<bonhoeffer> and '7'.unpack('H')
<bonhoeffer> => 3
<bonhoeffer> >> '7'.unpack('H')
<ruby[bot]> bonhoeffer: # => ["3"] (https://eval.in/694760)
enterprisey has quit [Remote host closed the connection]
raul782 has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
cdg has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
<matthewd> bonhoeffer: unpack obviously doesn't do what you expect.. and is thus likely not what you want
jz has joined #ruby
bonhoeffer has quit [Ping timeout: 260 seconds]
jz is now known as Guest53688
Jameser has joined #ruby
Guest53688 is now known as johnzorn
bmurt has joined #ruby
nofxxxx has joined #ruby
arescorpio has quit [Quit: Leaving.]
nofxxx has quit [Ping timeout: 248 seconds]
optiz0r has joined #ruby
<zenspider> >> '7'.ord.to_s 16
<ruby[bot]> zenspider: # => "37" (https://eval.in/694761)
<zenspider> makes sense to me...
<zenspider> but... I read docs
cyphase has quit [Ping timeout: 250 seconds]
Lewoco has quit [Quit: Page closed]
cyphase has joined #ruby
SpiffTR has joined #ruby
pagios has quit [Read error: Connection timed out]
ixti has quit [Ping timeout: 258 seconds]
cyphase has quit [Ping timeout: 246 seconds]
SpiffTR has quit [Ping timeout: 268 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
dmarr has quit [Quit: Goodbye]
harai has joined #ruby
armando has quit [Quit: WeeChat 1.4]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
armando has joined #ruby
c-pin has joined #ruby
<c-pin> hey on my irc bot how do i set a part reason
<c-pin> i looked at the docs doesnt make much sense to me
<c-pin> oh im using cinch
<ruby[bot]> c-pin: How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
<zenspider> ?answers c-pin
<c-pin> zenspider, do you want a hastebin or something of my bot
nankyokusei has joined #ruby
<zenspider> mostly I want you to ask a good question so _someone_ in here has a chance of helping...
Jameser has quit [Ping timeout: 245 seconds]
<c-pin> oh so i have this bot that i posted, and id like to set a part reason, like c-bot has left(you are a fish)
<c-pin> i want to do it in cinch
<c-pin> i looked at the docs but it says #part reason = so that doesnt look like a code snippet i can use
Jameser has joined #ruby
gix has quit [Ping timeout: 256 seconds]
<zenspider> looking at the docs ... something I'm prone to do... looks really straight forward to me...
<zenspider> signature: #part(message = nil); Parameters: message (String) (defaults to: nil) — the part message.
<c-pin> i get an error when i use this code, so i guess i got it wrong somewhere
<c-pin> oh it just doesnt give me a part message thats whats wrong
JeanCarloMachado has quit [Ping timeout: 248 seconds]
<adam12> zenspider: I'm loving me some stdlib browsing lately. Always find something new, even after all these years.
<zenspider> ugh. reading this code is giving me the creeps. I sincerely hope you're 12
<c-pin> sorry im competing with even MORE stupid bots
<zenspider> adam12: stdlib is a mixed bag... some of it is sooo old and crufty. some is just really weird
nankyokusei has quit [Ping timeout: 268 seconds]
<c-pin> is my code right then though?
Derderderd has quit [Ping timeout: 246 seconds]
<c-pin> wait if it was right it would give me the part message. which it doesnt
<adam12> zenspider: Like 'Matrix'? or 'Math'? Trying to find a usecase for them... ;)
<zenspider> reading through net or webrick... a lot that came from pre 1.8
<adam12> I haven't gone into those, but I've been fiddling with DRb and Rinda lately...
gix has joined #ruby
<adam12> And the examples folder have been interesting.
<zenspider> *nod*
<adam12> I need a good source of exciting gems people are working on.
pagios has joined #ruby
kuSuSE has quit [Ping timeout: 248 seconds]
<zenspider> exciting? minitest is SOOOO (un)exciting.
<adam12> lol. I already know and use minitest.
<zenspider> but have you READ it?
<adam12> Only when I can't remember an assertion. Hah.
<baweaver> I have a few interesting ones for later, but for now I'm switching to Scala for a fairly beastly one.
chouhoulis has quit [Remote host closed the connection]
<baweaver> Basically transposing some of the ideas from lichess.org to playtak.com to get ready for a fairly nasty scale surge coming up fast.
cdg has quit [Remote host closed the connection]
pabloh_ has joined #ruby
<baweaver> That, and I've wanted a good excuse to make a massively concurrent system completely functionally for a while.
<adam12> You're using Scala for it?
<baweaver> Yep.
<adam12> Cool.
<baweaver> Going to document most of the process as I go along
<baweaver> the guys on #lichess are pretty awesome about talking tech stacks
<baweaver> Most of the orchestration will be in Ruby / Sensu
z64 has quit [Ping timeout: 250 seconds]
<baweaver> Current goal is being able to take 20k+ concurrent users without bending
pabloh has quit [Ping timeout: 240 seconds]
c-pin has left #ruby ["Leaving"]
<adam12> Why Scala?
<baweaver> JVM mainly. A lot of resources to leverage.
<baweaver> I'd considered Haskell or Elixir
<baweaver> but I don't want to go writing a lot of rating systems or other things that are already existing
<adam12> Right.
<baweaver> I'd thought to use JRuby, but static types and being able to write a non-trivial functional app were a bit too tempting for me
djellemah_ has joined #ruby
<adam12> I'm bouncing around lately. Dug into Elixir and Crystal, enjoying both. But there is something about Ruby for me.
z64 has joined #ruby
<adam12> I did some concurrent-rb stuff a few weeks ago and could see myself reaching for JRuby if it hit any type of scale.
ponga has quit []
kies has quit [Ping timeout: 250 seconds]
slash_nick has joined #ruby
slash_nick has quit [Client Quit]
Puffball has quit [Remote host closed the connection]
slash_nick has joined #ruby
borodin has joined #ruby
<borodin> howdeeee!
Yzguy has joined #ruby
<borodin> anybody know of a bundler debug command - something that'll tell you whether the network will support bundler installing stuff?
pabloh__ has joined #ruby
<borodin> inside the build of a docker container, I'm getting "Resolving dependencies.... Network error while fetching"
<borodin> can't figure out what's wrong
Derderderd has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pabloh__ has quit [Client Quit]
pabloh_ has quit [Ping timeout: 264 seconds]
kies has joined #ruby
pabloh has joined #ruby
nankyokusei has joined #ruby
bturker has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
s2013 has joined #ruby
cibs has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
bturker has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 264 seconds]
zotherstupidguy has joined #ruby
aryaching has joined #ruby
montanonic has joined #ruby
Hyuk has joined #ruby
Channel6 has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
Yzguy has quit [Quit: Cya]
Puffball has joined #ruby
ofkors has quit [Ping timeout: 245 seconds]
XV8 has quit [Read error: Connection reset by peer]
XV8 has joined #ruby
Sammichmaker has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
ryan_notabot has joined #ruby
jz has joined #ruby
jz is now known as Guest36023
Puffball has quit [Remote host closed the connection]
govg has joined #ruby
codfection has joined #ruby
johnzorn has quit [Ping timeout: 264 seconds]
Puffball has joined #ruby
aryaching has quit [Ping timeout: 258 seconds]
Coldblackice has quit [Ping timeout: 268 seconds]
SpiffTR has joined #ruby
SpiffTR has quit [Ping timeout: 246 seconds]
Salih has joined #ruby
tachyons[m] has joined #ruby
Coldblackice has joined #ruby
awc has joined #ruby
nowz has joined #ruby
sp4rrow has joined #ruby
tmtwd has joined #ruby
matp has quit [Remote host closed the connection]
matp has joined #ruby
nankyokusei has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
dionysus69 has joined #ruby
_sfiguser has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
awc has quit [Quit: Mutter: www.mutterirc.com]
agent_white has quit [Ping timeout: 258 seconds]
govg has quit [Quit: leaving]
awc has joined #ruby
_sfiguser has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
harai has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
aryaching has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
SteenJobs has joined #ruby
yeticry has joined #ruby
h1fuelcell has joined #ruby
nankyokusei has joined #ruby
nofxxx has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
nofxxxx has quit [Ping timeout: 258 seconds]
SpiffTR has joined #ruby
awc has quit [Quit: Mutter: www.mutterirc.com]
bturker has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.6]
SpiffTR has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
tau has quit [Remote host closed the connection]
montanonic has quit [Ping timeout: 264 seconds]
jcao219 has quit [Ping timeout: 260 seconds]
Derderderd has quit [Remote host closed the connection]
Derderderd has joined #ruby
bradleyprice has joined #ruby
blackwind_123 has joined #ruby
Guest32241 has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
Channel6 has quit [Quit: Leaving]
jinie has joined #ruby
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest32241 has quit [Remote host closed the connection]
charliesome has joined #ruby
pandaant has joined #ruby
CrashOverride has joined #ruby
tpendragon has quit [Ping timeout: 258 seconds]
Cork has quit [Quit: .]
tildes has joined #ruby
futilegames has joined #ruby
SpiffTR has joined #ruby
nankyokusei has joined #ruby
futilegames has quit [Client Quit]
Cork has joined #ruby
SpiffTR has quit [Ping timeout: 258 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
giraffe has quit [Quit: ZNC - http://znc.in]
Guest36931 has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
muelleme has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tau has joined #ruby
Mr_Pancake has quit [Ping timeout: 245 seconds]
Jameser has quit [Ping timeout: 265 seconds]
giraffe has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
Definity has quit [Ping timeout: 265 seconds]
tpendragon has joined #ruby
maattdd has joined #ruby
inerkick has joined #ruby
Mon_Ouie has joined #ruby
maattdd has quit [Ping timeout: 258 seconds]
StoBrendo has joined #ruby
<zenspider> borodin: nope. not that I know of. I think ping might be your first bet. followed by netcat or other basic tooling
chouhoulis has joined #ruby
antoniobeyah has joined #ruby
jtdoncas_ has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
claudiuinberlin has joined #ruby
hogetaro has quit [Quit: Leaving...]
chouhoulis has quit [Ping timeout: 268 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
inerkick has quit [Quit: Leaving]
symm- has joined #ruby
muelleme has quit [Ping timeout: 268 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
hahuang65 has quit [Quit: WeeChat 1.4]
hogetaro has joined #ruby
tildes has quit [Ping timeout: 250 seconds]
dinoangelov has joined #ruby
Jameser has joined #ruby
djbkd has joined #ruby
Fernando-Basso has joined #ruby
Guest62 has joined #ruby
nankyokusei has joined #ruby
CrashOverride has quit [Quit: Textual IRC Client: www.textualapp.com]
tildes has joined #ruby
Vile` has quit [Ping timeout: 264 seconds]
SpiffTR has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
bturker has joined #ruby
pandaant has quit [Remote host closed the connection]
harai has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
nofxxx has quit [Ping timeout: 248 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #ruby
tildes has quit [Ping timeout: 258 seconds]
toretore has joined #ruby
sarlalian has quit [Ping timeout: 265 seconds]
grh has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
SpiffTR has quit [Quit: Leaving.]
tjbiddle has joined #ruby
conta has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
mikecmpbll has joined #ruby
djbkd has quit []
sarlalian has joined #ruby
tmtwd has quit [Ping timeout: 265 seconds]
yaewa has joined #ruby
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
moei has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 268 seconds]
conta has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
Hyuk has joined #ruby
konsolebox has joined #ruby
pabloh has quit [Quit: Leaving]
aryaching has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
Ishido has joined #ruby
tildes has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
Ishido has quit [Read error: Connection reset by peer]
SpiffTR has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
Ishido has joined #ruby
grh has quit [Ping timeout: 252 seconds]
grh has joined #ruby
cibs has joined #ruby
aaronwed2 has quit [Ping timeout: 264 seconds]
tjbiddle has joined #ruby
saneax-_-|AFK is now known as saneax
Jackneill_ has joined #ruby
inerkick has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
nankyokusei has joined #ruby
SpiffTR has quit [Quit: Leaving.]
aidalgol has quit [Quit: zZzZZzz]
maloik has quit [Remote host closed the connection]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maloik has joined #ruby
Cra2yZer0 has joined #ruby
Jameser has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Quit: tjbiddle]
charliesome has joined #ruby
sarlalian has quit [Ping timeout: 240 seconds]
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
saneax is now known as saneax-_-|AFK
sarlalian has joined #ruby
Jameser has quit [Max SendQ exceeded]
aryaching has joined #ruby
fedruantine_ has joined #ruby
Jameser has joined #ruby
conta has quit [Ping timeout: 268 seconds]
Snickers has joined #ruby
Guest36931 has quit [Remote host closed the connection]
tonytony1an has left #ruby [#ruby]
fedruantine has quit [Quit: client exited: Ex-Chat]
sphex has quit [Read error: No route to host]
sphex has joined #ruby
maattdd has joined #ruby
nankyokusei has joined #ruby
dinoangelov has quit [Quit: (null)]
dasher00 has quit [Ping timeout: 246 seconds]
inerkick has quit [Quit: Leaving]
Cra2yZer0 has quit []
Ishido has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 240 seconds]
aryaching_ has joined #ruby
tau has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
LoneHermit has quit [Read error: Connection reset by peer]
montanonic has joined #ruby
LoneHermit has joined #ruby
DoubleMalt has joined #ruby
raul782 has joined #ruby
lenwood has joined #ruby
raul782 has quit [Ping timeout: 264 seconds]
rodfersou has joined #ruby
dasher00 has joined #ruby
maattdd has quit [Ping timeout: 256 seconds]
aryaching_ has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snickers has quit [Quit: Snickers]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
johnny56_ has quit [Ping timeout: 246 seconds]
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
johnny56_ has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Rufus has joined #ruby
Snickers has quit [Client Quit]
tvsutton has quit [Changing host]
tvsutton has joined #ruby
tvsutton has left #ruby [#ruby]
nankyokusei has joined #ruby
triangles has joined #ruby
SpiffTR has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
Jameser has joined #ruby
bturker has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
SpiffTR has quit [Quit: Leaving.]
DoubleMalt has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.6]
nankyokusei has joined #ruby
zacts has quit [Ping timeout: 246 seconds]
conta has joined #ruby
tildes has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 252 seconds]
inerkick has joined #ruby
grh has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
inerkick has quit [Client Quit]
nankyokusei has joined #ruby
Cra2yZer0 has joined #ruby
Cra2yZer0 has quit [Client Quit]
blackbombay has joined #ruby
DoubleMalt has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
maattdd has joined #ruby
nankyokusei has joined #ruby
inerkick has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
lenwood has joined #ruby
ryan_notabot has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 258 seconds]
symm- has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
<codfection> What could've gone wrong
<codfection> Connection Error :(
ta_ has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
inerkick has quit [Ping timeout: 256 seconds]
bturker has quit [Ping timeout: 256 seconds]
<codfection> nvm
SpiffTR has joined #ruby
blackbombay has quit [Ping timeout: 248 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maattdd has quit [Ping timeout: 256 seconds]
Guest62 has quit [Quit: Textual IRC Client: www.textualapp.com]
blackbombay has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.6]
nadir has joined #ruby
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
lenwood has quit [Ping timeout: 252 seconds]
SpiffTR has quit [Quit: Leaving.]
SpiffTR has joined #ruby
SpiffTR has quit [Read error: Connection reset by peer]
SpiffTR has joined #ruby
SpiffTR has quit [Client Quit]
nettoweb has joined #ruby
sdothum has joined #ruby
konsolebox has quit [Ping timeout: 265 seconds]
muelleme has joined #ruby
c355e3b has joined #ruby
konsolebox has joined #ruby
bturker has joined #ruby
raul782 has joined #ruby
hutch34 has joined #ruby
raul782 has quit [Ping timeout: 265 seconds]
warrshrike has joined #ruby
<warrshrike> what is the cleanest way to access instance variables from a class instance
montanonic has quit [Ping timeout: 250 seconds]
<hanmac> warrshrike: instance_variable_get ?
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<warrshrike> works thnk
lxsameer has quit [Quit: WeeChat 1.6]
harfangk has joined #ruby
kuSuSE has joined #ruby
rodfersou has quit [Quit: leaving]
muelleme has quit [Ping timeout: 246 seconds]
<yorickpeterse> warrshrike: expose them via a method
pandaant has joined #ruby
<warrshrike> yorickpeterse: too much work
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pandaant has quit [Remote host closed the connection]
<yorickpeterse> what?
<yorickpeterse> `def foo; @foo; end` isn't that much work
shinnya has joined #ruby
<yorickpeterse> certainly not more than adding `some_thing.instance_variable_get(:@foo)`
<yorickpeterse> unless you're trying to get an instance variable from some object exposed by code you don't control (e.g. a Gem)
conta has joined #ruby
lenwood has joined #ruby
<warrshrike> Well no but
<warrshrike> im comparing ten fields of two objects
xrlk has quit [Remote host closed the connection]
<warrshrike> its like a recursive equality
xrlk has joined #ruby
<warrshrike> so it seems awfully UnDRY to make 10 getter methods
d^sh has joined #ruby
<warrshrike> its like this node1.fuzzyMatch(node2)
<warrshrike> where all the fields are compared in fuzzeMatch
<yorickpeterse> Aah
millerti has joined #ruby
<yorickpeterse> Then you probably want something like `foo.instance_variables.each { |ivar| foo.instance_variable_get(ivar) == ... }`
<yorickpeterse> or something along those lines
jcao219 has joined #ruby
<warrshrike> well thats the issue. it isnt a simple == match rather some separate processing for each element of node is needed
d^sh has quit [Client Quit]
j416 has quit [Quit: o/]
byte512 has joined #ruby
GodFather has quit [Quit: Ex-Chat]
d^sh has joined #ruby
GodFather has joined #ruby
djellemah_ has quit [Ping timeout: 265 seconds]
GodFather has quit [Client Quit]
yaewa has quit [Quit: Leaving...]
GodFather has joined #ruby
moei has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
lenwood has quit [Ping timeout: 246 seconds]
blackbom1 has joined #ruby
Jameser has joined #ruby
jetpack_joe has joined #ruby
blackbombay has quit [Ping timeout: 256 seconds]
lenwood has joined #ruby
conta has quit [Ping timeout: 250 seconds]
h1fuelce_ has joined #ruby
<warrshrike> Whats the slickest and cleanest possible regexp solution to parse the following string "int i(java.lang.String,java.lang.String)" to give the java return type and parameter types and nil if they don't exits
<warrshrike> exist*
<warrshrike> I'm doing an int based solution but curious on what a good way to do it would look like
jetpack_joe has quit [Ping timeout: 250 seconds]
pior has quit [Quit: Connection closed for inactivity]
h1fuelcell has quit [Ping timeout: 246 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
jtdoncas_ has joined #ruby
h1fuelcell has joined #ruby
<warrshrike> yorickpeterse:
conta has joined #ruby
subscope has joined #ruby
h1fuelce_ has quit [Ping timeout: 248 seconds]
jtdoncas_ has quit [Ping timeout: 250 seconds]
<al2o3-cr_> >> "int i(java.lang.String,java.lang.String)".match(/\A([\w\*\s]+)[\*\s]\w+\((.*?)\)?\z/).captures
<ruby[bot]> al2o3-cr_: # => ["int", "java.lang.String,java.lang.String"] (https://eval.in/695093)
x77686d has joined #ruby
nanoz has joined #ruby
nanoz] has joined #ruby
nankyokusei has joined #ruby
rodfersou has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
SteenJobs has joined #ruby
cinderhaze has joined #ruby
<cinderhaze> Hello everyone! Question for you.. I'm working on adventofcode.com day 7 problem, and I have a question about regular expressions and .match
<cinderhaze> My initial implementation, I matched a regular expression like this, because I assumed it was in the form of pre[hyper]post... /^(?<pre>[^\[]*)\[(?<hyper>.*)\](?<post>.*)$/
<cinderhaze> what it actually is is more like this nonhyper[hyper]nonhyper[hyper]nonhype etc...
<elomatreb> What ?<stuff> does is give matching groups a name, I don't think that's what you wanted?
<cinderhaze> I ALMOST have an expression that works at http://rubular.com/r/lCfXceN3bC but it shows 'match1, match2, match3' giving each of the named capture groups multiple times
<cinderhaze> ok, now that I've put out my context, time for the actual question....
<cinderhaze> is it possible to return a structure from .match where I can interate over it to pull out the values?
<cinderhaze> like in the example link to rubular, it does Match 1 (outer, inner, hyper), match2(outer, inner, hyper) etc..
conta has quit [Ping timeout: 246 seconds]
<cinderhaze> elomatreb: ?<stuff> was just for making the sections have names to make it a bit clearer what each part of the regex was for and to auto assign it to a variable name, not to actually match the parts
lenwood has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
<elomatreb> cinderhaze: Sorry, from your initial question I thought you misunderstood what that does
<cinderhaze> what my initial regex does is match all non[ or ] chars in the first matchgroup, then match a [, then match all non [ or ] chars in the second matchgroup, then match ], then match all chars into a third matchgroup
<cinderhaze> elomatreb: no problem... I just wasn't sure how to ask this question cleanly :)
konsolebox has quit [Quit: Leaving]
grh has joined #ruby
konsolebox has joined #ruby
<apeiros> cinderhaze: str.scan(regex) { $~ }
zotherstupidguy has joined #ruby
<zotherstupidguy> how to test Refinements? (minitest/spec)
cdg has joined #ruby
petrichorx has joined #ruby
<warrshrike> thanks a bunch al2o3-cr_ !
<warrshrike> I did this "int i(java.lang.String,java.lang.String)".split(' ')[1].split('(')[1].split(')')[0].split(',')
<warrshrike> >> "int i(java.lang.String,java.lang.String)".split(' ')[1].split('(')[1].split(')')[0].split(',')
<ruby[bot]> warrshrike: # => ["java.lang.String", "java.lang.String"] (https://eval.in/695106)
<warrshrike> yours is much better >> "int i(java.lang.String,java.lang.String)".match(/\A([\w\*\s]+)[\*\s]\w+\((.*?)\)?\z/).captures
<cinderhaze> apeiros: Thanks! mystr.scan(regex) is what I was looking for!
<cinderhaze> now what would be even nicer is if it had the named groups in it and you could pull them out like a hash, or if it was an array of MatchGroups or something, but that should be workable for my needs!
<cinderhaze> oh... I see... in your above example, you CAN see the matchgroups in the block that you pass
<zotherstupidguy> is it even possible to test aganist refinements in ruby??
jcao219 has quit [Ping timeout: 256 seconds]
x77686d has quit [Quit: x77686d]
<Zarthus> why wouldn't it be
SteenJobs has quit [Quit: SteenJobs]
<Zarthus> tests are regular ruby code, after all
<Zarthus> just write a mock or dummy class that implements the refinement
<warrshrike> al2o3-cr_: your regex doesnt work in this case
<warrshrike> >> "android.location.Location g(android.content.Context)".match(/\A([\w\*\s]+)[\*\s]\w+\((.*?)\)?\z/).captures
<ruby[bot]> warrshrike: # => undefined method `captures' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/695108)
psychicist__ has joined #ruby
<warrshrike> though it works here
<warrshrike> >> "void c(java.lang.String,java.lang.String)".match(/\A([\w\*\s]+)[\*\s]\w+\((.*?)\)?\z/).captures
<ruby[bot]> warrshrike: # => ["void", "java.lang.String,java.lang.String"] (https://eval.in/695109)
<warrshrike> I'm trying to the return and parameter types. though come to think of it having the parameters as separate array elems would be better
cinderhaze has left #ruby ["WeeChat 0.3.8"]
<warrshrike> any. ideas. ?
<zotherstupidguy> Zarthus you speakin from experiance? could you show an example?
<zotherstupidguy> Zarthus i am stuck at `RuntimeError: Module#using is not permitted in methods
<Zarthus> Refinements work at class level as far as I know
<zotherstupidguy> but the methods they provide are lexically scoped thus i can't use :respond_to or similar
psychicist__ has quit [Ping timeout: 240 seconds]
brendan- has joined #ruby
h1fuelce_ has joined #ruby
_sfiguser has quit [Ping timeout: 256 seconds]
h1fuelcell has quit [Ping timeout: 250 seconds]
ponga has joined #ruby
nettoweb has joined #ruby
SteenJobs has joined #ruby
<rob_> i thought you could do a multi-line ||= assignment but cant remember the syntax, can anyone refresh my memory?
ruby549 has joined #ruby
cdg has quit [Remote host closed the connection]
<ruby549> puts "enter your name" name = gets.chomp name.each do |i| i.scan(/w/) puts i end
<ruby549> why ruby is complaining undefine method .each for string class if example i enter name "john"
rodfersou has quit [Quit: leaving]
<warrshrike> does ruby have a goto
raul782 has joined #ruby
<warrshrike> or unconditional jump
<ruby549> since i get a input from the user which is string
<elomatreb> warrshrike: No, and it really doesn't need it
<elomatreb> ruby549: #each is not defined for String. If you want to iterate over all the characters you could do .chars.each
_sfiguser has joined #ruby
bradleyprice has quit [Remote host closed the connection]
klaas has joined #ruby
bradleyprice has joined #ruby
raul782 has quit [Ping timeout: 250 seconds]
<ruby549> @elomatreb ok it works
<ruby549> but why do have to .char?
<apeiros> or #each_char
<apeiros> if you want to avoid the intermediary array
<elomatreb> each iterates over every element in a collection (usually an Array). A String is not a collection nor an Array, so there is nothing to iterate over, thus each is not defined
djellemah_ has joined #ruby
bradleyprice has quit [Ping timeout: 256 seconds]
<ruby549> but the thing is name = gets.chomp is considered array?
<apeiros> no
<apeiros> why do you think that ruby549?
<elomatreb> Try putting `p name.class` in your code to see what class it is
<ruby549> string
gloscombe has joined #ruby
<elomatreb> So, not an Array ;)
<ruby549> ok thx alot man
<ruby549> i appreciate it
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
d0nn1e has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ruby
jcao219 has joined #ruby
kuSuSE has quit [Quit: Konversation terminated!]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_sfiguser has quit [Ping timeout: 264 seconds]
ruby549 has quit [Ping timeout: 260 seconds]
subscope has quit [Quit: Leaving]
warrshrike has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_sfiguser has joined #ruby
brendan- has joined #ruby
nettoweb has joined #ruby
ryan_notabot has joined #ruby
TilakeTikka has joined #ruby
cdg has joined #ruby
ryan_notabot has quit [Remote host closed the connection]
tpendragon has quit [Quit: ZNC - http://znc.in]
giraffe has quit [Quit: ZNC - http://znc.in]
ryan_notabot has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xlegoman has joined #ruby
grh has quit [Ping timeout: 250 seconds]
SteenJobs has quit [Quit: SteenJobs]
chopin_ has quit [Remote host closed the connection]
SteenJobs has joined #ruby
chopin has joined #ruby
brendan- has joined #ruby
aryaching has joined #ruby
jphase has quit [Ping timeout: 245 seconds]
giraffe has joined #ruby
tpendragon has joined #ruby
chopin has quit [Ping timeout: 248 seconds]
nickjj has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
djellemah_ has quit [Quit: Leaving]
TilakeTikka has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
FreshDumbledore has joined #ruby
<FreshDumbledore> hi, when using array.sort_by on an array of hashes, it does work for single-digit numbers but the double-digit ones break it. like 1,2,21,3.. instead of 1,2,3..21 - how to fix it? :)
conta has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
<adam12> How did a hash turn into a fixnum?
bradleyprice has joined #ruby
frozengeek has joined #ruby
synthroid has quit [Remote host closed the connection]
<adam12> FreshDumbledore: Show some code.
synthroid has joined #ruby
<FreshDumbledore> adam12, the hashes always have a label string and a value number. i want to sort by the number.
<FreshDumbledore> i think i found a solution now, let me try
<FreshDumbledore> nope doesnt work.. showing code, sec
<adam12> Are you comparing integers? or are they strings.
conta has quit [Ping timeout: 248 seconds]
<FreshDumbledore> i will put it on one line here as its so little relevant code: geohash.each do |key, falue|
<FreshDumbledore> itemz << { label: key, value: falue.to_s } end
<FreshDumbledore> itemz.sort_by! { |k| k[:value] }
<FreshDumbledore> they are strings
<FreshDumbledore> i apply to_s to it
<FreshDumbledore> should i dont do that?
<adam12> A string likely sorts by length.
<FreshDumbledore> why would it put the 21 right in the middle of the single digit numbers then?
<adam12> Actually it might sort by "alpha" value.
<adam12> Try converting to a whole number.
<apeiros> FreshDumbledore: do you really have numbers or strings?
cdg_ has joined #ruby
<apeiros> because "21" < "3", but 21 > 3
<FreshDumbledore> apeiros, inside are numbers but im not sure if the interface i provide the data to requires strings or not.. but even if it does i could first sort and then convert each entry again i guess?
<FreshDumbledore> currently its type is strings
<FreshDumbledore> but it are numbers, actually (:
bradleyprice has quit [Ping timeout: 250 seconds]
cdg has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
<apeiros> well, that'd be why
<apeiros> convert to numbers
<apeiros> strings aren't numbers
<adam12> O_o
<FreshDumbledore> works when not doing the string convert.. thanks! checking if i really need to provide strings.. and if, ima sort and convert after
<adam12> FreshDumbledore: Just call to_i in your sort_by method. No big deal.
<FreshDumbledore> yep. i just dont call .to_s and it already works :D
Guest12932 has joined #ruby
<adam12> apeiros: tell me more about these strings that aren't numbers ;)
<FreshDumbledore> i thought i need to deliver strings.. im using this dashing website thing
<toretore> also make sure before you convert them that they actually are numbers
<FreshDumbledore> they are, i create that hash array from scratch based on a list of ip adresses and the geoip gem :)
gloscombe has quit [Quit: gloscombe]
<toretore> sometimes you will get "numbers in strings" but they should not really be treated as numbers
<FreshDumbledore> just counting where people come from xD
<FreshDumbledore> why is the ruby syntax so.. 'special' ? :) never used it before
<FreshDumbledore> havent seen similar in other languages.. like .sort_by! { |k| k[:value] }
mercerist has joined #ruby
<adam12> Are you trying to sort IP addresses??
zacts has joined #ruby
<FreshDumbledore> adam12, no im getting their country code, doing a sum of each country and sort by the amount of ips from each country
<adam12> Oh OK.
<FreshDumbledore> now i would like to sort descending, i tried with itemz.reverse but it doesnt work :|
<FreshDumbledore> works in irb though
<adam12> Ruby has syntax "borrowed" from many other languages. If you dont' recognize the syntax, you might have not worked with that particular language. Smalltalk, etc.
<FreshDumbledore> gonna check
Vile` has joined #ruby
<adam12> Are you still calling sort_by! ? pairing that with reverse might not work.
<FreshDumbledore> adam12, yes i do. hmm did the same in irb thouhg and there it was fine
<FreshDumbledore> itemz.sort_by! { |k| k[:value] }
<FreshDumbledore> itemz.reverse
<elomatreb> reverse just returns a new reversed array, itemz is not modified
<adam12> There is a difference between bang and non-bang methods. (the bang is a method with a ! at the end)
<FreshDumbledore> oh, thanks elomatreb
<FreshDumbledore> so i create a new array from the reverse output i guess
<FreshDumbledore> adam12, yes as far as google told me ! is to do in place
<FreshDumbledore> is there a reverse!?
<adam12> Yes.
<FreshDumbledore> thanks
nanoz] has quit [Quit: <3]
nanoz] has joined #ruby
<FreshDumbledore> works :) thanks again
ncthom91 has joined #ruby
ryan_notabot has quit [Remote host closed the connection]
<apeiros> adam12: "12" is not 12
<apeiros> "12" is compared to "3" by comparing "1" to "3", then it's already done.
<apeiros> "3" > "1", hence "3" > "12". even if the numerical value is 3 < 12
nanoz] has quit [Quit: <3]
<toretore> what if its a hex number
* apeiros smacks toretore
<adam12> lol
<toretore> couldn't resist, sorry :P
SteenJobs has quit [Quit: SteenJobs]
<FreshDumbledore> my dashing project shows bruteforcers trying to access my ssh server xD
<FreshDumbledore> yolo funproject
<FreshDumbledore> china is far in the lead
zacts has quit [Quit: WeeChat 1.6]
unshadow has joined #ruby
zacts has joined #ruby
ramfjord has joined #ruby
southeastpaw has joined #ruby
bradleyprice has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
bradleyprice has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 248 seconds]
bradleyprice has joined #ruby
symm- has joined #ruby
brent__ has joined #ruby
TilakeTikka has joined #ruby
mountpoint has quit [Ping timeout: 248 seconds]
raul782 has joined #ruby
Definity has joined #ruby
TilakeTikka has quit [Remote host closed the connection]
nettoweb has joined #ruby
crowd42 has joined #ruby
raul782 has quit [Ping timeout: 256 seconds]
nickjj has joined #ruby
petrichorx has quit [Quit: Connection closed for inactivity]
boon_ is now known as boon
boon is now known as boon_
mercerist has quit [Quit: Computer has gone to sleep.]
gbgdev has joined #ruby
tWust has joined #ruby
tWust has left #ruby [#ruby]
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
DLSteve has joined #ruby
DLSteve has quit [Client Quit]
bradleyprice has quit [Ping timeout: 240 seconds]
preyalone has joined #ruby
drale2k has quit [Quit: ZNC - http://znc.in]
drale2k has joined #ruby
muelleme has joined #ruby
jooni has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
SteenJobs has joined #ruby
DoubleMalt has quit [Ping timeout: 258 seconds]
jooni has joined #ruby
jooni has quit [Max SendQ exceeded]
muelleme has quit [Ping timeout: 258 seconds]
bturker has joined #ruby
unshadow has quit [Quit: leaving]
ule_ is now known as ule
ule has quit [Changing host]
ule has joined #ruby
shinnya has quit [Ping timeout: 246 seconds]
muelleme has joined #ruby
enterprisey has joined #ruby
brendan- has joined #ruby
jtdoncas_ has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.6]
DoubleMalt has joined #ruby
jtdoncas_ has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
nankyokusei has joined #ruby
x77686d has quit [Quit: x77686d]
aphprentice has quit [Quit: Connection closed for inactivity]
raul782 has quit [Ping timeout: 264 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
DoubleMalt has quit [Ping timeout: 260 seconds]
<zacts> hi
<zacts> I want to make little cli apps with Ruby
<zacts> I have a problem, however
<zacts> how can I bundle gems with my apps, without necessarily needing a network connection?
<zacts> I want these tools to be used for a gnu/linux distro
<zacts> and they may not have network access initially
BTRE has quit [Quit: Leaving]
djbkd has quit [Remote host closed the connection]
ryan_notabot has joined #ruby
SpiffTR has joined #ruby
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest12932 has quit [Remote host closed the connection]
lenwood has joined #ruby
BTRE has joined #ruby
Rufus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lenwood has quit [Ping timeout: 250 seconds]
nofxx has joined #ruby
bradleyprice has joined #ruby
Lord_of_Life has quit [Excess Flood]
nanoz has quit [Read error: Connection reset by peer]
jphase has joined #ruby
Lord_of_Life has joined #ruby
x77686d has joined #ruby
sp4rrow has joined #ruby
tmtwd has joined #ruby
jaguarmagenta has joined #ruby
chadhs has joined #ruby
Derderderd has quit [Ping timeout: 258 seconds]
Azure has quit [Ping timeout: 260 seconds]
SpiffTR has quit [Quit: Leaving.]
Vile` has quit [Quit: .]
byte512 has quit [Ping timeout: 250 seconds]
baweaver is now known as baweaver_away
maattdd has joined #ruby
DoubleMalt has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
jtdoncas_ has joined #ruby
southeastpaw has quit [Quit: Leaving]
spikefoo has joined #ruby
enterprisey has quit [Remote host closed the connection]
conta has joined #ruby
SpiffTR has joined #ruby
blackbom1 has quit [Ping timeout: 258 seconds]
maattdd has quit [Ping timeout: 256 seconds]
Derderderd has joined #ruby
lenwood has joined #ruby
tmtwd has quit [Quit: Leaving]
conta has quit [Ping timeout: 248 seconds]
chadhs has quit [Quit: Textual IRC Client: www.textualapp.com]
enterprisey has joined #ruby
Derderderd has quit [Ping timeout: 258 seconds]
marr has joined #ruby
mercerist has joined #ruby
mercerist has quit [Remote host closed the connection]
pawnbox has joined #ruby
claudiuinberlin has quit [Read error: Connection reset by peer]
claudiuinberlin has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
spikefoo has quit [Quit: WeeChat 1.6]
last_staff has joined #ruby
<havenwood> zacts: That sounds like `bundle package` for an app (see `bundle help package`) or you could move the gems yourself with RubyGems: http://help.rubygems.org/kb/rubygems/installing-gems-with-no-network
<zacts> havenwood: oh, perfect! thanks
preyalone has quit [Quit: Connection closed for inactivity]
maattdd has joined #ruby
ncthom91 has joined #ruby
ncthom91 has quit [Max SendQ exceeded]
ncthom91 has joined #ruby
maattdd has quit [Ping timeout: 252 seconds]
SesMan has joined #ruby
roychri has quit [Ping timeout: 252 seconds]
x77686d has quit [Quit: x77686d]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
DoubleMalt has quit [Ping timeout: 260 seconds]
Channel6 has joined #ruby
raul782 has joined #ruby
Salih has quit [Quit: Leaving]
nankyokusei has joined #ruby
<PaulePanter> Hi. How can I work with bitmasks?
<PaulePanter> 0b10 & 2
<PaulePanter> … returns 2.
<PaulePanter> … which is fine.
<PaulePanter> Error on my side, I guess. Sorry.
raul782 has quit [Ping timeout: 248 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
Derderderd has joined #ruby
DoubleMalt has joined #ruby
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest36023 has quit [Ping timeout: 240 seconds]
* PaulePanter was bitten by the fact, that 0 is true.
<PaulePanter> Now everything works.
<zacts> PaulePanter: heh, yeah that was tricky for me intially as well
djbkd has joined #ruby
<PaulePanter> I am always open for suggestions regarding my implementation of a simulation of a problem: http://paste.debian.net/901724/
muelleme has quit [Ping timeout: 250 seconds]
antoniobeyah has joined #ruby
nchambers is now known as god
nettoweb has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
synthroid has quit []
kies has quit [Ping timeout: 250 seconds]
jtdoncas_ has quit [Ping timeout: 260 seconds]
lenwood has quit [Ping timeout: 250 seconds]
bradleyprice has quit [Ping timeout: 248 seconds]
bradleyprice has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
boon_ has left #ruby [#ruby]
<z64> PaulePanter: do you have a description of the problem this addresses?
kies has joined #ruby
pskosinski has quit [Ping timeout: 256 seconds]
<z64> thanks :) i'll take a look
antoniobeyah has joined #ruby
pskosinski has joined #ruby
antoniobeyah has quit [Client Quit]
johnzorn has joined #ruby
jtdoncas_ has joined #ruby
reverberations has quit [Ping timeout: 265 seconds]
baweaver_away is now known as baweaver
tildes has joined #ruby
vqrs has quit [Ping timeout: 246 seconds]
reverberations has joined #ruby
Azure has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
ryan_notabot has quit [Write error: Connection reset by peer]
frozengeek has quit [Remote host closed the connection]
frozengeek____ has joined #ruby
ryan_notabot has joined #ruby
Channel6 has quit [Quit: Leaving]
dasher00 has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
nettoweb1 has joined #ruby
tildes has quit [Ping timeout: 245 seconds]
nettoweb has quit [Ping timeout: 258 seconds]
_djbkd has joined #ruby
frozengeek____ has quit [Quit: frozengeek____]
frozengeek____ has joined #ruby
djbkd has quit [Ping timeout: 258 seconds]
dopamean_ has joined #ruby
Jackneill_ has quit [Remote host closed the connection]
Dimik has joined #ruby
dopamean1 has quit [Ping timeout: 246 seconds]
skweek has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 256 seconds]
SteenJobs has joined #ruby
Snickers has joined #ruby
frozengeek____ has quit [Quit: frozengeek____]
frozengeek____ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
symm- has joined #ruby
enterprisey has quit [Ping timeout: 252 seconds]
scootaloo has joined #ruby
GodFather has quit [Remote host closed the connection]
scootaloo has quit [Client Quit]
bturker has quit [Ping timeout: 256 seconds]
DLSteve has joined #ruby
enterprisey has joined #ruby
<z64> that was fun :D lol
<z64> i usually take the OOP road.
<z64> I got 42
<z64> well, rounding up, anyway
workmad3 has joined #ruby
last_staff has quit [Quit: last_staff]
<PaulePanter> z64: Then i have an error.
<PaulePanter> With my implementation I got 32.4.
<PaulePanter> *31.4
<PaulePanter> Though 42 sounds more like it.
SteenJobs has joined #ruby
ryan_notabot has quit [Ping timeout: 250 seconds]
TheHodge has joined #ruby
hinbody has quit [Quit: leaving]
<z64> yeah, to be honest, i wasn't sure what your maths was up to with the bitwise stuff. never actually used that operator.
<z64> is this page recent..? (will they publish the correct answer, anyway?)
<PaulePanter> z64: They will publish it after December 31st.
<z64> cool :)
<PaulePanter> z64: I think I ignore the last six cookies.
Definity has quit [Ping timeout: 252 seconds]
dasher00 has joined #ruby
cdg_ has quit [Remote host closed the connection]
<z64> i see. yeah, i *think* i implemented all the rules correctly.
<z64> what i'm curious is how you account that there are three elves?
<z64> the only thing thats not so obvious to me reading your snippet
johnzorn has quit [Ping timeout: 258 seconds]
skweek has joined #ruby
pia has joined #ruby
pia has quit [Client Quit]
dopamean_ has quit [Ping timeout: 250 seconds]
dopamean_ has joined #ruby
sonOfRa has quit [Quit: Bye!]
CloCkWeRX has joined #ruby
GodFather has joined #ruby
<PaulePanter> z64: Reading the problem/question, I don’t see how it’s relevant, that there are three elves.
montanonic has joined #ruby
<PaulePanter> z64: Isn’t in the end only asked for how many cookies are eaten in total?
sonOfRa has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
ihme-TTilus has quit [Ping timeout: 252 seconds]
shaman42 has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
cdg has joined #ruby
muelleme has joined #ruby
shaman42 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
raul782 has joined #ruby
raul782 has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 250 seconds]
antoniobeyah has joined #ruby
_djbkd has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
TTilus has joined #ruby
nowz has quit [Quit: Leaving]
tildes has joined #ruby
djbkd has quit [Ping timeout: 258 seconds]
dopamean_ has quit [Ping timeout: 260 seconds]
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codfection has quit [Remote host closed the connection]
SpiffTR has joined #ruby
SpiffTR has quit [Client Quit]
tildes has quit [Ping timeout: 256 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
zapata has quit [Quit: WeeChat 1.6]
bturker has joined #ruby
<borodin> is there a bundler debug flag - I'm trying to run bundle inside a docker container, but I
<borodin> I'm getting 'Network error while fetching'
<borodin> wondering what network error it wa
claudiuinberlin has quit []
zapata has joined #ruby
<toretore> there's a --verbose
bturker has quit [Ping timeout: 256 seconds]
dopamean_ has joined #ruby
Snickers has quit [Quit: Snickers]
z64 has quit [Ping timeout: 246 seconds]
skweek has quit [Ping timeout: 256 seconds]
Definity has joined #ruby
Channel6 has joined #ruby
naprimer_2 has quit [Ping timeout: 252 seconds]
blackbom1 has joined #ruby
s2013 has joined #ruby
modin has quit [Ping timeout: 246 seconds]
sami has quit [Ping timeout: 246 seconds]
sami has joined #ruby
matp has quit [Remote host closed the connection]
dimasg has joined #ruby
matp has joined #ruby
dimasg has quit [Client Quit]
modin has joined #ruby
johnzorn has joined #ruby
z64 has joined #ruby
_sfiguser has quit [Ping timeout: 250 seconds]
grh has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
h1fuelce_ has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
_sfiguser has joined #ruby
harai has quit [Ping timeout: 258 seconds]
god is now known as nchambers
baweaver is now known as baweaver_away
Coldblackice has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
erlend has quit [Ping timeout: 256 seconds]
Coldblackice has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Puffball has quit [Remote host closed the connection]
enterprisey has quit [Ping timeout: 248 seconds]
erlend has joined #ruby
jenrzzz has joined #ruby
grh has quit [Ping timeout: 246 seconds]
Puffball has joined #ruby
SpiffTR has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
<zacts> ok, philosophical question.
<zacts> well perhaps not philosophical, but
<zacts> if I start a little web app in Sinatra, I wonder if it would be hell to reimplement it into Ruby on Rails later on
FastJack has quit [Ping timeout: 264 seconds]
<zacts> like how well does Sinatra scale to large projects?
Coldblackice has joined #ruby
<zacts> I wonder if I should just start from scratch with RoR from the beginning, if I think it will need to scale?
<zacts> I just want to implement a little chat system for fun, but it may become semi-serious eventually
SpiffTR has quit [Ping timeout: 258 seconds]
erlend has quit [Ping timeout: 252 seconds]
<nofxx> zacts, just go with ror and experiment with actioncable on the chat
erlend has joined #ruby
naprimer has joined #ruby
reverberations has quit [Read error: Connection reset by peer]
reverberations has joined #ruby
Puffball has quit [Remote host closed the connection]
koooge has joined #ruby
<zacts> nofxx: ok, thanks
<zacts> I'll do this
Puffball has joined #ruby
s2013 has quit [Read error: No route to host]
<adam12> zacts: There's always Padrino
konsolebox has quit [Quit: Leaving]
<zacts> oh, I've never heard of it
<zacts> looks cool adam12
<zacts> ooh Padrina sounds awesome actually
<zacts> It sounds like it might suit my web app
<Papierkorb> zacts: If you want to look at yet another web framework, see `Roda` by jeremy evans, the guy who also maintains `sequel` if you ever heard of that
reverberations has quit [Read error: Connection reset by peer]
reverberations has joined #ruby
<adam12> zacts: No ActionCable obviously but I've been thinking about a messagebus plugin for Padrino...
<zacts> Oh someone linked roda to me once, but I didn't really look at it much
<zacts> adam12: how much of Padrino still needs to be / or is planned to be implemented