havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
devbug has joined #ruby
akem has quit [Remote host closed the connection]
gusTester has joined #ruby
<Someone_Else> ripper doesn't compile
<havenwood> Someone_Else: Huh?
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
finisherr has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
<Someone_Else> havenwood: http://pastebin.com/Fgh69KCC
<ruboto> Someone_Else, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
jessemcgilallen has joined #ruby
<havenwood> amincd: The docs actually probably don't make much sense if you don't already know what a capture group is. :)
finisherr__ has joined #ruby
finisherr_ has quit [Ping timeout: 246 seconds]
<amincd> havenwood: yeah I'm still trying to make snese of it
<havenwood> amincd: Maybe try playing with Rubular, here's a simple example to start with: http://rubular.com/r/5TGwRZ85tM
<Someone_Else> havenwood: Excuse me for pastbin, but I don't like to have things online forever (pastebin allows a time limit)
<havenwood> Someone_Else: Ripper is in the stdlib.
<havenwood> Someone_Else: You can delete a Gist.
diego2 has joined #ruby
<amincd> havenwood: thanks
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
ur5us has joined #ruby
<Someone_Else> havenwood: By default within ruby?
<al2o3-cr> Someone_Else: yeah
<havenwood> Someone_Else: Yeah, it's in the standard library so just: require 'ripper'
based_pdev_ has quit [Ping timeout: 245 seconds]
dotix has quit [Ping timeout: 260 seconds]
diego3 has joined #ruby
rakm has left #ruby ["Textual IRC Client: www.textualapp.com"]
finisherr has quit [Ping timeout: 250 seconds]
finisherr__ is now known as finisherr
h99h9h88 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
diego3 is now known as diegoviola
al2o3-cr1 has joined #ruby
diego2 has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Quit: Leaving]
al2o3-cr has quit [Ping timeout: 246 seconds]
al2o3-cr1 has quit [Client Quit]
al2o3-cr has joined #ruby
roxtrongo has quit [Remote host closed the connection]
h99h9h88 has quit [Ping timeout: 250 seconds]
nateberkopec has quit [Ping timeout: 260 seconds]
diegoviola has quit [Ping timeout: 260 seconds]
symm-_ has quit [Ping timeout: 260 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djstorm has quit [Ping timeout: 245 seconds]
AndyBotwin has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
peterhil_ has quit [Ping timeout: 246 seconds]
chamby has joined #ruby
chamby has quit [Remote host closed the connection]
chamby has joined #ruby
baweaver has joined #ruby
chamby has quit [Remote host closed the connection]
<jhass> ethe: = is assignment, a = b creates/assigns the local variable a, always, a.b = c calls the method named b= on the object a and passes it c as parameter. << is always a method call, a << b calls the method named << on a and passes it b as first parameter
chamby has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
<heftig> is there some kind of terrible bug with sprintf in ruby 2.2? look at this: https://repl.it/B51M/0 It's full of \u0000
Snowy has joined #ruby
<heftig> so far repl.it is the only service that replicates local ruby (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]) behavior here
KnownSyntax_ has joined #ruby
<Radar> heftig: I can also reproduce locally.
<havenwood> heftig: I'm not seeing it happen in 2.1 but am seeing it happen in 2.2 locally as well.
<Radar> Looks like you might've found a bug.
<heftig> aww, thanks
KnownSyntax_ is now known as KnownSyntax
iateadonut has joined #ruby
<havenwood> Still \u0000s in ruby-2.3.0-preview1
<agent_white> Radar: Noticed your latest posting on your site just earlier today. Thank you for all your hard work in OSS :)
<Radar> agent_white: aw, thanks :)
diegoviola has joined #ruby
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> agent_white: It was a hard decision to make but a necessary one.
<agent_white> No doubt. Life stops for nobody!
phreakocious has joined #ruby
alindeman has joined #ruby
<amincd> havenwood: I finally got it, thank you again
amincd has quit [Quit: Page closed]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<havenwood> amclain: nice, you're welcome!
<havenwood> amclain: Oops, misstell.
rikkipitt has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
DLSteve has joined #ruby
ICantCook has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
h99h9h88 has joined #ruby
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<heftig> >> "%8.1f %8.1f" % [1r, 1r]
<ruboto> heftig # => " \u0000\u0000\u0000" (https://eval.in/479487)
lemur has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
infernix has quit [Ping timeout: 245 seconds]
jobewan has quit [Quit: Leaving]
lemur has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 260 seconds]
ledestin has joined #ruby
infernix has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cryptsting has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Client Quit]
InvGhost has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
opencard has quit [Read error: Connection reset by peer]
wldcordeiro has joined #ruby
djbkd has joined #ruby
allcentury has joined #ruby
ascarter has joined #ruby
<diegoviola> does the benchmark module has a way to tell me if the interval/value of a benchmark is seconds, milliseconds, and so on?
<diegoviola> I didn't found that in the docs
krobzaur has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
jackjackdripper has quit [Quit: Leaving.]
djbkd has quit [Ping timeout: 260 seconds]
vikaton has joined #ruby
<diegoviola> how can I figure that out?
simplyianm has quit [Remote host closed the connection]
davedev2_ has quit [Ping timeout: 260 seconds]
Bellthoven has joined #ruby
jackjackdripper has joined #ruby
davedev24 has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
cwong_on_irc has quit [Quit: Leaving.]
karapetyan has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
B1n4r10 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dotix has joined #ruby
h99h9h88 has joined #ruby
xfbs has quit []
jackjackdripper has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
danielpclark has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Client Quit]
simplyianm has joined #ruby
diegoviola has quit [Ping timeout: 250 seconds]
nateberkopec has joined #ruby
diego1 has joined #ruby
replay has joined #ruby
dotix has quit [Ping timeout: 260 seconds]
Porfa has quit [Read error: Connection reset by peer]
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
unreal has joined #ruby
chamby has quit [Remote host closed the connection]
djbkd has joined #ruby
Porfa has joined #ruby
chamby has joined #ruby
michaeldeol has quit [Quit: Connection closed for inactivity]
cdg has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 246 seconds]
Vivekananda has quit [Ping timeout: 250 seconds]
<ethe> jhass thank you
Ruby_Rocks_007 has joined #ruby
Ruby_Rocks_007 has quit [Client Quit]
dlitvak has joined #ruby
krobzaur has quit [Ping timeout: 260 seconds]
myztic has quit [Quit: Lost terminal]
danielpclark has joined #ruby
yonatankoren_ has joined #ruby
Porfa has quit [Quit: Porfa]
Porfa has joined #ruby
zapata has joined #ruby
Robert__ has joined #ruby
gusTester has quit [Quit: Leaving.]
yonatankoren_ is now known as yonatankoren
dlitvak has quit [Remote host closed the connection]
opencard has joined #ruby
skweek has joined #ruby
maloik has joined #ruby
waynerade has joined #ruby
snockerton has quit [Quit: Leaving.]
Yzguy has joined #ruby
Gnut has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
Porfa has quit [Read error: Connection reset by peer]
akem has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
allcentury has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 260 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krobzaur has joined #ruby
rontec76_ has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
alindeman has joined #ruby
Vivekananda has joined #ruby
B1n4r10 has quit [Ping timeout: 260 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has quit []
marr has quit [Ping timeout: 250 seconds]
finisherr has quit [Quit: finisherr]
pdoherty has joined #ruby
ascarter has joined #ruby
replay_ has joined #ruby
replay_ has quit [Max SendQ exceeded]
replay_ has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
colegatron has quit [Ping timeout: 246 seconds]
replay has quit [Ping timeout: 246 seconds]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
replay_ has quit [Client Quit]
allcentury has joined #ruby
jessemcgilallen has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
sondr3 has joined #ruby
sankaber has joined #ruby
sfmk has left #ruby [#ruby]
shinenelson has quit [Quit: Connection closed for inactivity]
<argoneus> I suppose this isn't a channel to ask about db schemas, right
peterhil_ has joined #ruby
tulak has quit [Remote host closed the connection]
mary5030 has joined #ruby
colegatron has joined #ruby
NeverDie_ has quit [Quit: http://radiux.io/]
<shevy> give it a try!
NeverDie has joined #ruby
<argoneus> basically, I have an event, that can have n users
paradisaeidae has quit [Ping timeout: 260 seconds]
<argoneus> and the event can also have sub-events, which can have a subset of these users
<argoneus> and I'm not sure how I'm supposed to put this in a schema
peterhil_ has quit [Ping timeout: 260 seconds]
myztic has joined #ruby
<argoneus> I want to do queries like "find all users on this event who haven't been to any sub-events"
<argoneus> and the reverse "find all users on this event who've been to at least 1 sub-event"
avahey has joined #ruby
gf3 has quit [Ping timeout: 245 seconds]
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
gf3 has joined #ruby
nateberkopec has joined #ruby
opencard has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
dotix has quit [Ping timeout: 260 seconds]
lacuna_ has joined #ruby
ethe has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
lacuna has quit [Ping timeout: 250 seconds]
nateberkopec has quit [Ping timeout: 250 seconds]
grzegorz has joined #ruby
grzegorz is now known as Arnvald
poguez_ has joined #ruby
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jessemcgilallen has joined #ruby
Robert__ has quit [Ping timeout: 260 seconds]
auzty has joined #ruby
dorei has quit []
davedev2_ has quit [Ping timeout: 250 seconds]
Robert__ has joined #ruby
davedev24 has joined #ruby
Bellthoven has quit []
peterhil_ has joined #ruby
RobertBirnie has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
s00pcan has joined #ruby
paradisaeidae has joined #ruby
houhoulis has joined #ruby
baweaver has quit [Remote host closed the connection]
_djbkd has joined #ruby
Asher has joined #ruby
Robert__ has quit [Ping timeout: 245 seconds]
hahuang61 has quit [Ping timeout: 264 seconds]
peterhil_ has quit [Ping timeout: 246 seconds]
Yzguy has quit [Quit: Zzz...]
pdoherty has quit [Quit: Leaving]
NeverDie has joined #ruby
dlitvak has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
threh has quit [Remote host closed the connection]
akem has quit [Remote host closed the connection]
_djbkd has quit [Ping timeout: 246 seconds]
symbol has joined #ruby
rontec76_ has quit [Ping timeout: 245 seconds]
Robert__ has joined #ruby
simplyianm has quit [Remote host closed the connection]
wldcordeiro has quit [Quit: WeeChat 1.3]
TheBloke has quit [Read error: Connection reset by peer]
TheBloke- has joined #ruby
wldcordeiro has joined #ruby
Rickmasta has joined #ruby
Xeago has joined #ruby
RegulationD has joined #ruby
Oog has joined #ruby
vdamewood has joined #ruby
csguest has joined #ruby
<csguest> hello
DurstBurger has joined #ruby
minimalism has joined #ruby
vdamewood has quit [Max SendQ exceeded]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<csguest> how can I have a hash map that the same different keys point to the same database
<csguest> database being an array
<shevy> the same different keys?
<csguest> well
<csguest> "this" & "theirs" would point to the same array [1, 2, 3]
<csguest> instead of them both containing their own same copy of the array
aadam21_ has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saddad has joined #ruby
aadam21_ has quit [Client Quit]
wldcordeiro has quit [Quit: WeeChat 1.3]
baweaver has joined #ruby
<csguest> is that even possible
ibouvousaime has quit [Ping timeout: 260 seconds]
krobzaur has quit [Ping timeout: 250 seconds]
aadam21 has quit [Ping timeout: 245 seconds]
wldcordeiro has joined #ruby
hanmac has joined #ruby
Cantaberry has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
rgrmatt has joined #ruby
<agent_white> I... think I understand metaclasses and metaprogramming a bit.
<agent_white> \o/
* agent_white squeels
devbug has quit [Quit: No Ping reply in 180 seconds.]
lacuna_ has quit []
Gnut has joined #ruby
<csguest> yo
<csguest> weird question
<csguest> like
<csguest> wtf
IrishGringo has quit [Ping timeout: 250 seconds]
<ruboto> csguest, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/229a20e71d6bf3b8a9b4
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<csguest> hear me out ruboto.
<csguest> seriously, when I type first and then type random stuff that does not match
<csguest> it still returns stuff as if it's correct matched
bb010g has joined #ruby
symbol has quit [Quit: WeeChat 1.1]
Trynemjoel has quit [Ping timeout: 264 seconds]
simplyianm has joined #ruby
elton has joined #ruby
<slash_nick> csguest: ruboto is a bot
<csguest> i know :)
<csguest> but why is this?
<slash_nick> oh, proceed then
<csguest> none of the variables are remaining the same
<slash_nick> procede?
aphprentice has quit [Quit: Connection closed for inactivity]
chamby has quit [Remote host closed the connection]
casadei has quit [Remote host closed the connection]
colleenmcguckin has quit []
elton has quit [Remote host closed the connection]
<slash_nick> Proceed. whoa, cool, i just realized ruboto gisted your pastebin...
allcentury has quit [Ping timeout: 246 seconds]
<csguest> do you have any idea why this is so?
cwong_on_irc has joined #ruby
elton has joined #ruby
shanemcd has quit [Remote host closed the connection]
dotix has joined #ruby
Gnut has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
wprice has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
wprice has quit [Client Quit]
<slash_nick> csguest: what do you mean? what is "it" in it still returns stuff as if it's correct?
<csguest> yes
<csguest> when it should hedge
purplexed- has quit [Ping timeout: 245 seconds]
devbug has joined #ruby
<csguest> so if you type "hey"
<csguest> itll return hedges
<csguest> once you send first
<csguest> itll only return one, two and three even if say hey
nateberkopec has joined #ruby
dotix has quit [Ping timeout: 246 seconds]
devbug has quit [Remote host closed the connection]
devbug has joined #ruby
jbrhbr has quit [Quit: Leaving.]
solocshaw has joined #ruby
IrishGringo has joined #ruby
dlitvak has quit [Remote host closed the connection]
frem has quit [Quit: Connection closed for inactivity]
<slash_nick> what's that method supposed to do?
nateberkopec has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
Ishido has joined #ruby
Oog has quit [Remote host closed the connection]
rakm has joined #ruby
<slash_nick> csguest: are we solving your interview questions for you or something?
<csguest> na
hahuang61 has joined #ruby
<slash_nick> homework?
s00pcan has quit [Ping timeout: 260 seconds]
<csguest> why do they look fishy
<csguest> sorta..
<csguest> not really
<csguest> i wrote it in scheme and need to convert it to ruby
<slash_nick> csguest: well, what is that line supposed to do?
<csguest> context?
maloik has quit [Ping timeout: 250 seconds]
dimik has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
<csguest> its supposed to see if you wrote first, second, or third
<slash_nick> lines 48 and 49 in the gist ruboto was kind enough to regist for you... i linked just above
<csguest> then tell weak-cues that you did it
<slash_nick> csguest: it looks like it's supposed to take two arguments... it also looks like it only uses one.
s00pcan has joined #ruby
<csguest> oh
<csguest> sh!t
Miron has joined #ruby
<slash_nick> csguest: that's fishy :)
vdamewood has joined #ruby
elton has quit [Remote host closed the connection]
<csguest> get_context(costellos_words, old_context)
<csguest> it takes two though
krobzaur has joined #ruby
<slash_nick> it does... what's it do with "old_context"?
<csguest> good point
elton has joined #ruby
<csguest> oh
<csguest> oh
<slash_nick> :D
<csguest> no if there was no context
<csguest> no new context
<csguest> you return the old one
<csguest> that was recursed from last time
<csguest> oh
<csguest> im an idiot
<slash_nick> nah
<csguest> lmao
hahuang61 has quit [Ping timeout: 260 seconds]
<csguest> its supposed to do this isnt it
<csguest> let me pull out the scheme version
<slash_nick> csguest: what happens if you leave that method's contents the same, but change it's signature from `def get_context(costellos_words, old_context)` to `def get_context(costellos_words, context)`
<slash_nick> notice, no "old_" before `contect` at the end there
<slash_nick> context.
Yzguy has joined #ruby
B1n4r10 has joined #ruby
<csguest> oh well
<csguest> you go through the context array
<csguest> theyre different
hxegon has joined #ruby
<slash_nick> lol... does that just fix a different bug?
arescorpio has joined #ruby
<csguest> wait
<csguest> i just realized why I use old context
<slash_nick> but you weren't using it lol
devbug has quit [Ping timeout: 250 seconds]
senayar has joined #ruby
<csguest> what do you mean?
<csguest> im sorry
<csguest> its late ive been programming all day
senayar has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
unsymbol has quit [Quit: cheerio]
waynerade has quit [Remote host closed the connection]
<csguest> ruby.rb:82:in `try_weak_cues': undefined method `length' for nil:NilClass (NoMethodError)
<csguest> what is a nomethoderror
edj has joined #ruby
<edj> did anyone here learn ruby as their first language?
<slash_nick> http://rubykoans.com/ there is no nomethoderror
arup_r has joined #ruby
krobzaur has quit [Ping timeout: 260 seconds]
elton has quit [Remote host closed the connection]
waynerade has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
saddad has quit [Quit: WeeChat 1.4-dev]
InvGhost has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinenelson has joined #ruby
B1n4r10 has joined #ruby
krobzaur has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
nbdy has joined #ruby
baweaver has joined #ruby
nbdy has quit [Max SendQ exceeded]
nbdy has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
maloik has joined #ruby
yqt has quit [Ping timeout: 246 seconds]
howdoicomputer has joined #ruby
JammyHammy has joined #ruby
<edj> as a first language how long should ruby take to learn?
devbug has joined #ruby
<jhass> that's very individual. Also it's hard to define a point where you ever "learned" a language
maloik has quit [Ping timeout: 250 seconds]
Robert__ has quit [Ping timeout: 260 seconds]
hahuang61 has joined #ruby
Robert__ has joined #ruby
akem has joined #ruby
Trynemjoel has quit [Quit: Quitting]
Vivekananda has quit [Quit: Leaving]
Yzguy has quit [Quit: Zzz...]
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
rgrmatt has quit [Remote host closed the connection]
stannard has quit [Read error: Connection reset by peer]
stannard_ has joined #ruby
dlitvak has joined #ruby
<pontiki> it might take a while, otoh, you might be productive in weeks. with you're first language you are actually learning two very different things: how to write in the language and how to solve problems programmatically
dotix has joined #ruby
<mozzarella> >you're
braincrash has quit [Quit: bye bye]
Trynemjoel has joined #ruby
maloik has joined #ruby
shanemcd has joined #ruby
jessemcgilallen has quit [Read error: Connection reset by peer]
<TheCompWiz> norc & apeiros: thanks much for pointing me to Kernel.switch. That's exactly what I needed... I guess.
<TheCompWiz> I was able to spawn 500 processes... (consuming 96gb RAM and 24 CPU cores) ... and all the data was returned properly.
dotix has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
<edj> ive been dabling for a while but now im getting more serious about it. is "well grounded rubyist" going to teach me enough?
<pontiki> none of us could say, edj
<edj> oh
maloik has quit [Ping timeout: 245 seconds]
<pontiki> it is a great place to start
shanemcd has quit [Ping timeout: 260 seconds]
paradisaeidae has quit [Read error: Connection reset by peer]
<pontiki> WGR's early incarnation was wonderful for me, but ruby was far from my first language. WGR is an excellent book, black is an excellent author and guide
<pontiki> the process and practice of learning is highly individual, however
Robert__ has quit [Ping timeout: 250 seconds]
zast has joined #ruby
<edj> yea i think im trying to rush and make too much of a plan for learning
chamby has joined #ruby
<pontiki> maybe. but at the beginning, don't think too much at all about "how long is this going to take me" and "i need to carefully plan it out"
braincrash has joined #ruby
<pontiki> just keep practicing what you read, work the koans someone mentioned above, try out exercism.io, rubymonks, etc.
kp666 has joined #ruby
krobzaur has quit [Ping timeout: 250 seconds]
<pontiki> i just bought a book last night that contains a bunch of problems to solve when you're beyond the initial steps; highly useful to apply to any new language
<edj> whats it called?
devbug has quit [Read error: Connection reset by peer]
<pontiki> but, yeah, you can't learn it all in a day or a week
<pontiki> i have to go look :)
skweek has joined #ruby
<edj> so one monthish?
<pontiki> "exercises for programmers"
chamby has quit [Remote host closed the connection]
<pontiki> i wouldn't expect someone stepping out for the first time to be productive in a month. but being able to know enough to keep going? sure
<edj> how many hours a week should i devote?
<pontiki> idk
<edj> is 12 hours a day unreasonable?
<pontiki> probably
<pontiki> just seems like a lot to devote to any single practice
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki> a person needs time to obsorb their learning, too
<edj> so this 1000 page book should take me a month or so?
<edj> i was aiming at a week but thats unrealistic
<pontiki> you keep asking these questions which are not answerable
<edj> ah
<edj> i dont know why i do that
<pontiki> it's okay, it's not like we don't all do that
<edj> i try to make an equation and a plan out of absolutely everything
<jhass> edj: Chris Pine's "Learn to program" is generally recommended and might be an easier start before you head into the well grounded rubyist
<pontiki> i've only made your acquaintance, what, 10 minutes ago? i can't possibly know what you're capable of
<pontiki> really excellent book, too, edj; thanks jhass
<edj> pontiki: i know lmao
<edj> jhass: ive already gone through a track on treehouse and a few paths on code academy. would you still advise i read the book?
<edj> jhass
<edj> jhass: will it give a better foundation regaurdless?
<jhass> it can't harm, just speed through the stuff that's already clear to you
<edj> jhass: ok ill order it
<pontiki> i'd also say treehouse and code academy are covering that first part of first-language learning. pine's book actually covers a lot of the second part: the actual part about learning how to solve problems programmatically
<jhass> as pontiki pointed out so well earlier, your learning your first language is less about the language but more about learning to think like a programmer
<jhass> and beat me to it
<pontiki> how to break down a problem, how to know what algorithms and data structures to bring to a problem, how to organize your thoughts, your code
<pontiki> how to debug, how to test, etc
<pontiki> there's another book that's devoted just to that second part, sproul's "how to think like a programmer"
<pontiki> but i'd go with pine
elton has joined #ruby
TheBloke- has quit [Read error: Connection reset by peer]
TheBloke has joined #ruby
dlitvak has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 264 seconds]
elton has quit [Remote host closed the connection]
elton has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
gix has joined #ruby
Xeago has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
edj has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Ping timeout: 260 seconds]
csguest has quit [Quit: Leaving]
TheBloke has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 250 seconds]
tomchapin has joined #ruby
TheBloke has joined #ruby
tvon has quit [Ping timeout: 260 seconds]
B1n4r10 has quit [Ping timeout: 246 seconds]
krz has joined #ruby
jivemeat has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
<jivemeat> hey ruby
<jivemeat> how does one gets an entire line from console?
TheBloke- has joined #ruby
<Radar> jivemeat: What have you tried?
shadoi has quit [Quit: Leaving.]
<jivemeat> gets.chomp
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jivemeat> oh wait
<jivemeat> shit
<jivemeat> nvm
<jivemeat> its how i coded my problem
TheBloke has quit [Ping timeout: 260 seconds]
astrobun_ has joined #ruby
vdamewood has quit [Remote host closed the connection]
sarkis has joined #ruby
maloik has joined #ruby
<Radar> happy to help
vikaton has quit [Quit: Connection closed for inactivity]
Arnvald has quit [Remote host closed the connection]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarkis has quit [Ping timeout: 264 seconds]
skweek has joined #ruby
<jivemeat> ty :)
maloik has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
sarkis has joined #ruby
dotix has joined #ruby
kp666 has quit [Remote host closed the connection]
Eiam_ has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
davedev24 has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
davedev24 has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
dotix has quit [Ping timeout: 260 seconds]
akem has quit [Read error: Connection reset by peer]
DurstBurger has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
akem has joined #ruby
norc has quit [Ping timeout: 252 seconds]
maloik has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
juddey has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
jameswatling has joined #ruby
dlitvak has joined #ruby
deepu has joined #ruby
<deepu> I'm a student of ruby and wanted to learn how to create .to_<something>. I'm trying to search for .to_<something>
<deepu> but not sure what to search for
sarkis has joined #ruby
<deepu> what do you call .to_someting. It is a method correct?
robbyoconnor has joined #ruby
spt0 has quit [Ping timeout: 260 seconds]
iateadonut has quit [Quit: Leaving.]
dlitvak has quit [Ping timeout: 245 seconds]
amclain has quit [Quit: Leaving]
skweek has quit [Ping timeout: 250 seconds]
yardenbar has quit [Ping timeout: 260 seconds]
ss_much has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
<deepu> anyone?
sarkis has quit [Ping timeout: 245 seconds]
davedev24 has joined #ruby
<baweaver> class Fixnum; def to_reddit; 42 end end; 1.to_reddit
<baweaver> >> class Fixnum; def to_reddit; 42 end end; 1.to_reddit
<ruboto> baweaver # => 42 (https://eval.in/479509)
davedev24 has quit [Read error: Connection reset by peer]
<baweaver> it's a method
<baweaver> just like anything else
<baweaver> there's nothing special about to_s or to_h or anything else, all methods
davedev24 has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
<deepu> baweaver: but you call a method like method() correct?
<baweaver> don't need to
<baweaver> ruby is fairly paren free
<baweaver> so method and method() are the same thing
jameswatling has quit []
kies has joined #ruby
<baweaver> I would consider reading through a basic ruby tutorial or two, perhaps get a book if I were you
<deepu> so I can do def to_hi; puts hi; end
<baweaver> you could
<baweaver> though remember I only use semicolons for oneliners on IRC
<baweaver> I would avoid doing that in actual code
<deepu> baweaver: ok thank you...
sarkis has joined #ruby
<deepu> baweaver: def to_hello(name); puts "hello {name}"; end
Arnvald has joined #ruby
<deepu> baweaver: deepu.to_hello NameError: undefined local variable or method `deepu' for main:Object
akem has quit [Remote host closed the connection]
<baweaver> you have to define it on a class for it to work with that
<baweaver> read a ruby book
<deepu> baweaver: ok.. just trying to understand
<baweaver> it'll answer far more questions far faster than asking on here at this stage of your experience
devoldmx has quit [Remote host closed the connection]
djbkd has joined #ruby
payload has joined #ruby
mooe has joined #ruby
Asher has quit [Quit: Leaving.]
sarkis has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
Asher has joined #ruby
colegatron has joined #ruby
rghose has joined #ruby
sarkis has joined #ruby
darkf has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
davedev24 has quit [Ping timeout: 250 seconds]
ayaz_ has joined #ruby
<baweaver> pontiki: shiny
<baweaver> will read after Doctor Who
erbesharat has joined #ruby
ohaibbq has joined #ruby
hxegon_ has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
arescorpio has quit [Quit: Leaving.]
<hxegon_> hi! in erb, is there a way to give tags of a css selector an attribute? for example, give_attr('body #list-name li', 'onclick="alert('foo')')
<hxegon_> minus the quote escaping nightmare of course
skweek has joined #ruby
<hxegon_> tried googling, but I'm pretty new to frontend stuff so not sure what to search for.
sarkis has joined #ruby
saneax_AFK is now known as saneax
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
devbug has joined #ruby
maloik has joined #ruby
RobertBirnie has quit [Ping timeout: 246 seconds]
hxegon has quit [Quit: leaving]
arup_r has quit [Remote host closed the connection]
hxegon_ has quit [Quit: leaving]
yes`r has joined #ruby
arup_r has joined #ruby
EveryNickIsTaken has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
hxegon has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
arup_r has quit [Ping timeout: 250 seconds]
slucx has joined #ruby
payload has left #ruby [#ruby]
EveryNickIsTaken has quit [Quit: Leaving]
deepu has quit [Ping timeout: 252 seconds]
RobertBirnie has joined #ruby
sarkis has joined #ruby
troys has joined #ruby
psy_ has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
TheBloke- has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 245 seconds]
elton has quit [Remote host closed the connection]
TheBloke has joined #ruby
arup_r has joined #ruby
elton has joined #ruby
maloik has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
sarkis has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
kies has quit [Ping timeout: 260 seconds]
penzur has joined #ruby
erbesharat has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 260 seconds]
elton has quit [Remote host closed the connection]
crazydiamond has joined #ruby
elton has joined #ruby
skade has joined #ruby
Macaveli has joined #ruby
Gnut has joined #ruby
nateberkopec has joined #ruby
sarkis has joined #ruby
ibouvousaime has joined #ruby
sekrit has joined #ruby
maloik has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
sigurding has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
cscheib has joined #ruby
RegulationD has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
sarkis has joined #ruby
prasselpikachu has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
trautwein has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
SOLDIERz has joined #ruby
rakm has joined #ruby
sarkis has joined #ruby
jetpackjoe has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
troys has quit [Quit: Bye]
ta has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
maloik has joined #ruby
djbkd has quit [Quit: My people need me...]
kxc0re has joined #ruby
aufi has joined #ruby
codecop has joined #ruby
slucx has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
DurstBurger has joined #ruby
sarkis has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
tildes has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
sarkis has quit [Ping timeout: 260 seconds]
Eiam has quit [Ping timeout: 245 seconds]
desmondhume has joined #ruby
DurstBurger has quit [Ping timeout: 260 seconds]
minimalism has quit [Ping timeout: 250 seconds]
SolarSailor has joined #ruby
sandstrom has joined #ruby
kxc0re has quit [Read error: Connection reset by peer]
juddey has joined #ruby
tvw has joined #ruby
gaussblurinc1 has joined #ruby
favadi has joined #ruby
sarkis has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
ur5us has quit [Remote host closed the connection]
desmondhume has quit [Ping timeout: 250 seconds]
escape_ has joined #ruby
moeSeth has joined #ruby
maloik has joined #ruby
dlitvak has joined #ruby
elton has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
dotix has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
SolarSailor has quit [Ping timeout: 260 seconds]
BlackCoyote has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
maloik has quit [Ping timeout: 246 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
penzur has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
sarkis has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
solars has joined #ruby
Gnut has quit [Ping timeout: 246 seconds]
solars has quit [Client Quit]
penzur has joined #ruby
DoubleMalt has joined #ruby
solars has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
joneshf-laptop has quit [Remote host closed the connection]
tomaz_b has joined #ruby
nateberkopec has joined #ruby
joneshf-laptop has joined #ruby
SolarSailor has joined #ruby
sarkis has joined #ruby
SolarSailor has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
cubicme has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
yardenbar has joined #ruby
lubekpl has joined #ruby
gamer has joined #ruby
<gamer> given code variable named "longestTurnInterval" what would you name it?
nateberkopec has quit [Ping timeout: 245 seconds]
desmondhume has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
gamer has quit [Client Quit]
yardenbar has quit [Ping timeout: 250 seconds]
bluOxigen has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
Anderson69s has joined #ruby
devoldmx has joined #ruby
desmondhume has quit [Ping timeout: 260 seconds]
yardenbar has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
NeverDie has quit [Quit: http://radiux.io/]
vdamewood has joined #ruby
sarkis has joined #ruby
ruby-lang217 has joined #ruby
<ruby-lang217> hello
<ruby-lang217> is anyone here
<ruby-lang217> ??
TheBloke- has joined #ruby
<ruby-lang217> hello
<ruby-lang217> what kind of chatroom is this?
<ruby-lang217> ?
astrobun_ has quit [Remote host closed the connection]
<ruby-lang217> i needed some help
<ruby-lang217> with ruby code
<ruby-lang217> ?
TheBloke has quit [Read error: Connection reset by peer]
<ruby-lang217> anyone?
devoldmx has quit [Ping timeout: 250 seconds]
anisha has joined #ruby
<ruby-lang217> can anyone help me
<ruby-lang217> with ruby code?
<ruby-lang217> hello?
ruby-lang217 has left #ruby [#ruby]
yardenbar has quit [Ping timeout: 250 seconds]
skade has joined #ruby
ruby-lang757 has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
nofxx has quit [Ping timeout: 246 seconds]
User458764 has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
h99h9h88 has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
ruby-lang757 has quit [Ping timeout: 252 seconds]
norc has joined #ruby
yardenbar has joined #ruby
sarkis has joined #ruby
minimalism has joined #ruby
Wsewolod has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
TomyWork has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
juddey has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
norc has quit [Client Quit]
ta has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
jack has joined #ruby
jack is now known as Guest79105
<Guest79105> uh huh
<Guest79105> anyone here
andersh has quit [Ping timeout: 264 seconds]
<duckson> Hello
h99h9h88 has quit [Remote host closed the connection]
<Guest79105> hi
<Guest79105> i needed help with ruby
<Guest79105> would you be able to help me?
<duckson> That's not a lot of replies out of 967 people in this channel. :)
h99h9h88 has joined #ruby
andersh has joined #ruby
<Guest79105> i know...
revengeofbigd has quit [Quit: Connection closed for inactivity]
<duckson> Depends on the question, I'll try to have a look
howdoicomputer has joined #ruby
<Guest79105> well so I have to do this basic ruby challenge
<Guest79105> I'm a beginner
<Guest79105> I have to write a code which when the user enters 5 words
<Guest79105> the code
<Guest79105> arranges the words in alphabetical order
<Guest79105> and then every word is capitalized
sandstrom has quit [Quit: My computer has gone to sleep.]
<Guest79105> and every other word is lowercase
h99h9h88 has quit [Remote host closed the connection]
sarkis has joined #ruby
Cantaberry has quit [Ping timeout: 260 seconds]
<Guest79105> duckson?
<Guest79105> this is the code i have so far words = [] 5.times do puts "Please enter a word" words << gets.chomp end puts words.sort.upcase.downcase
<duckson> Ok
maloik has joined #ruby
<slash_nick> lots of people asking stdin questions tonight
<Guest79105> stdin?
tagrudev has joined #ruby
<slash_nick> standard in...
<Guest79105> sorry, new to all this
<duckson> It's fine. :) Your code doesn't work because upcase/downcase can't be called on the array itself. They must be called on the array elements
<duckson> You can use a loop, or array.map to do that
<Guest79105> how would i use a loop to do that?
timonv has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
astrobun_ has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
Arnvald has quit [Read error: Connection reset by peer]
ruby-lang139 has joined #ruby
<duckson> Guest79105: Using a for-loop like "for element in array"
Arnvald has joined #ruby
<duckson> But a common way in ruby is array.each { |element| }
norc has joined #ruby
dlitvak has joined #ruby
<duckson> So words.sort.each { |word| word.upcase }
rgrmatt has joined #ruby
<slash_nick> >> words = []; 5.times {|i| words << (i % 2 == 0 ? 'aaa'.upcase : 'aaa'.downcase) }; words
<ruboto> slash_nick # => ["AAA", "aaa", "AAA", "aaa", "AAA"] (https://eval.in/479597)
penzur has quit [Quit: WeeChat 1.3]
e7d has joined #ruby
<duckson> You could use something like words.each_with_index.map { |word,i| if (i % 2 == 0) word.upcase else word.downcase end }
<slash_nick> >> 5.times.map {|i| i % 2 == 0 ? 'aaa'.upcase : 'aaa'.downcase }
<ruboto> slash_nick # => ["AAA", "aaa", "AAA", "aaa", "AAA"] (https://eval.in/479598)
arup_r has quit []
ibouvousaime has quit [Ping timeout: 246 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 246 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
sarkis has joined #ruby
<slash_nick> just replace those 'aaa's with your `gets.chomp`
rgrmatt has quit [Ping timeout: 246 seconds]
Pupp3tm4_ has joined #ruby
elton has joined #ruby
<slash_nick> Guest79105: 5.times.map {|i| i % 2 == 0 ? gets.chomp.upcase : gets.chomp.downcase }...
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<slash_nick> (that doesn't do the sort)
<Guest79105> slash_nick: being completely honest, i am a complete newb at this and my instructor gave me the assignment to finish using the very basics of ruby
unsymbol has joined #ruby
monthy has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 250 seconds]
sarkis has quit [Ping timeout: 260 seconds]
<Guest79105> so i need to be able to complete it using basic loops, methods, conditionals, objects,
<Guest79105> but thank you
<ljarvis> yes that's exactly how it should be done if you're learning
karapetyan has quit [Ping timeout: 245 seconds]
<ljarvis> what's wrong with your original code?
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
brunto has joined #ruby
<slash_nick> Guest79105: 5.times.map { gets.chomp }.sort.map {|x| x % 2 == 0 ? x.upcase : x.downcase }
<Guest79105> i've gotten to this so far words = [] 5.times do puts "Please enter a word" words << gets.chomp end words.each do |word|
<ljarvis> ok, does it work?
<Guest79105> halfway there
<Guest79105> a little more than halfway
<ljarvis> great, half way is good
<ljarvis> are you stuck?
<Guest79105> but still don't know how to get every other word to be in complete uppercase
<Guest79105> and every other word to be lower case
<Guest79105> yes im stuck
<ljarvis> do you know about Array#map?
<slash_nick> ahhah: 5.times.map { gets.chomp }.sort.map.with_index {|x,i| i % 2 == 0 ? x.upcase : x.downcase }
elton has quit [Ping timeout: 250 seconds]
desmondhume has joined #ruby
<Guest79105> no
<ljarvis> &ri Array#map
<`derpy> method `Array#map`: Invokes the given block once for each element of +self+. Creates a new array con… • http://rubydoc.info/stdlib/core/Array#map-instance_method
<ljarvis> check out that link, maybe map would be useful here?
<slash_nick> >> 5.times.map { 'abc' }.sort.map.with_index {|x,i| i % 2 == 0 ? x.upcase : x.downcase }
<ruboto> slash_nick # => ["ABC", "abc", "ABC", "abc", "ABC"] (https://eval.in/479609)
<ljarvis> slash_nick: seriously?
<Guest79105> thanks a lot i will one sec
janno has joined #ruby
sarkis has joined #ruby
desmondhume has quit [Client Quit]
araujo has quit [Ping timeout: 245 seconds]
<ljarvis> Guest79105: also, since you already know the format that you need, you can preemtively either downcase or upcase the input as it's received. That way you only need to do one more operation
<slash_nick> ljarvis: gotta upcase or downcase based on the sorted position, so gotta have all inputs first
krz has quit [Ping timeout: 250 seconds]
<ljarvis> ah ok thanks, scrub that suggestion then
<ljarvis> I didn't see that requirement
cscheib has left #ruby [#ruby]
blaxter has joined #ruby
<slash_nick> ljarvis: i was serious about the solution... and didn't mean to be unhelpful. it's time for me to say goodnight now though
<ljarvis> slash_nick: your solution is fine, i was just trying to talk through the problem so it was a bit annoying :) -- goodnight!
<slash_nick> ljarvis: ah... didn't mean to interrupt. had been iterating on the solution myself
araujo has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
sandstrom has joined #ruby
Macaveli has quit [Ping timeout: 260 seconds]
aspiers has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
Macaveli has joined #ruby
gaussblurinc1 has joined #ruby
karapetyan has joined #ruby
gaussblurinc1 has quit [Client Quit]
rattatmatt has joined #ruby
huyderman has joined #ruby
Hounddog has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarkis has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Client Quit]
jas02 has joined #ruby
SegFaultAX has joined #ruby
RegulationD has joined #ruby
<norc> Hi. I have the need to display various versions of a GET /cities (one version displays additional associated data, others include extra columns).
nettoweb has joined #ruby
<norc> And wrong channel
<norc> :-)
hxegon has quit [Ping timeout: 260 seconds]
ruby-lang139 has quit [Ping timeout: 252 seconds]
blackjid has joined #ruby
aps has joined #ruby
skarn has joined #ruby
aps is now known as Guest15488
sarkis has quit [Ping timeout: 245 seconds]
karapetyan has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 250 seconds]
alem0lars has joined #ruby
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Guest79105 has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
sarkis has joined #ruby
Fredrich010 has joined #ruby
boxrick1 has joined #ruby
symm- has joined #ruby
sarkis has quit [Ping timeout: 245 seconds]
Cohedrin has joined #ruby
passerine has joined #ruby
minimalism has quit [Quit: leaving]
sigurding has quit [Quit: sigurding]
Cohedrin has quit [Client Quit]
krz has joined #ruby
agent_white has joined #ruby
Cohedrin has joined #ruby
smokey has joined #ruby
sarkis has joined #ruby
testetest has joined #ruby
minimalism has joined #ruby
<testetest> !statistic
<testetest> hey guys
yes`r has quit [Ping timeout: 245 seconds]
danielpclark has quit [Ping timeout: 246 seconds]
zast has left #ruby [#ruby]
sarkis has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
bhaveshletter has joined #ruby
sigurding has joined #ruby
howdoicomputer has joined #ruby
jinie has joined #ruby
testetest has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
testetest has joined #ruby
sarkis has joined #ruby
joonty has joined #ruby
tulak has joined #ruby
testetest has quit [Client Quit]
skade has joined #ruby
yes`r has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
testetest has joined #ruby
ismaelga has joined #ruby
rgrmatt has joined #ruby
c0m0 has joined #ruby
howdoi has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
sarkis has quit [Ping timeout: 260 seconds]
danielpclark has joined #ruby
sorah has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
rgrmatt has quit [Ping timeout: 250 seconds]
TheBloke- has quit [Read error: Connection reset by peer]
lkba has joined #ruby
TheBloke has joined #ruby
nateberkopec has joined #ruby
marr has joined #ruby
opencard has joined #ruby
sarkis has joined #ruby
last_staff has joined #ruby
joonty has quit [Quit: joonty]
yfeldblum has joined #ruby
joonty has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
ohaibbq has quit [Quit: Leaving...]
sarkis has quit [Ping timeout: 260 seconds]
Hounddog has quit [Ping timeout: 260 seconds]
gener1c has joined #ruby
Hounddog has joined #ruby
ur5us has joined #ruby
sarkis has joined #ruby
SCHAAP137 has joined #ruby
escape_ has left #ruby [#ruby]
lkba has quit [Ping timeout: 245 seconds]
Snowy has joined #ruby
InvGhost has joined #ruby
casadei has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Macaveli has quit [Ping timeout: 246 seconds]
troulouliou_div2 has joined #ruby
joonty has quit [Ping timeout: 250 seconds]
rdark has joined #ruby
rdark has joined #ruby
devoldmx has joined #ruby
tvw has quit []
gaussblurinc1 has joined #ruby
xfbs has joined #ruby
xfbs has quit [Max SendQ exceeded]
<Bish> hello my friends!
sarkis has joined #ruby
Snowy has quit []
<shevy> yo Bish
xfbs has joined #ruby
shanemcd has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
<Bish> i missed you guys, time to annoy you with stupid ruby related questions!
shanemcd has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 260 seconds]
<apeiros> ey girl, missed you too ;-)
<Bish> im totally :male
<apeiros> eh, from the "guys" I figured it didn't matter :)
<ljarvis> heh
last_staff has quit [Quit: last_staff]
ur5us has quit [Remote host closed the connection]
baweaver has joined #ruby
<Bish> im not a native speaker, never got whats gay about that
Macaveli has joined #ruby
sarkis has joined #ruby
<apeiros> oh, it's not gay. it's just in many cultural contexts understood as men only. i.e. you only greet half the channel.
banister has joined #ruby
<Papierkorb> *it may result in ^
Macaveli has quit [Client Quit]
<Bish> ohhh right i forgot about all the women in cs /irony
peterhil_ has joined #ruby
<ljarvis> ...
<adaedra> ...
* Papierkorb zZzZzZ
<apeiros> ...
<Bish> well, you can't say im wrong about that
<apeiros> I can say you're being an asshole about it.
<apeiros> but well, I shall call you girl henceforth.
Macaveli has joined #ruby
bronson has quit [Remote host closed the connection]
<Bish> well i actually didn't mean men-only with guys
cornerman has quit [Ping timeout: 245 seconds]
<apeiros> oh, don't worry. girl in my cultural context isn't women only either.
<apeiros> it totes includes men.
banister has quit [Client Quit]
<Papierkorb> Bish: don't even try to argue, neither side will even care enough to move a single inch in any direction
<adaedra> Unfortunately.
<apeiros> Papierkorb: wrong.
<apeiros> I learned guys as universal and changed.
sarkis has quit [Ping timeout: 260 seconds]
<Bish> which direction? people in the internet are asexual for me, neither do i just mean men with "guys"
<Bish> don't try to push me somewhere, what the f is wrong with you
baweaver has quit [Ping timeout: 260 seconds]
<adaedra> tssk tssk tssk.
<apeiros> Bish: see, then you have no problem calling you girl.
<apeiros> otherwise you'd push me somewhere.
<Bish> yeah, well and i am the asshole. right?
cornerman has joined #ruby
<apeiros> right.
<Bish> okay, you win
<apeiros> hey, I'm just following your logic.
<Papierkorb> apeiros: this is the only channel where I don't use "guys" because of that, nowhere else. I'm just being honest.
<apeiros> Papierkorb: thank you.
Jackneill has joined #ruby
<ljarvis> please take this talk to #ruby-offtopic if it's likely to continue
<apeiros> agreed
ismaelga has quit [Remote host closed the connection]
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
<Diabolik> how can i run an rspec test that isn't for a specific class?
<Diabolik> i get uninitialized constant for whatever i put in the describe at the top
<Papierkorb> Diabolik: just use a string for the describe method
sarkis has joined #ruby
<Bish> there is no logic, you're just having anger issues connected with gender somehow, i don't care what sexuality people in irc have, while you do
<Papierkorb> Diabolik: if it's a feature-test esque thing you can also use 'scenario' instead of 'context' in the spec
<ljarvis> yeah describe just casts the name to a string anyway, so it's only really used for the `described_class` macro
<ljarvis> Bish: again, for a second (and last) time, please take it to #ruby-offtopic
<Bish> well.. sorry for making the mistake of greeting people, im done
<ljarvis> thank you
smokey has quit [Read error: Connection reset by peer]
testetest has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Oog has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
e7d has quit [Read error: Connection reset by peer]
tulak has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 260 seconds]
sarkis has quit [Ping timeout: 245 seconds]
Arnvald has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
howdoicomputer has quit [Ping timeout: 245 seconds]
GreatSUN has joined #ruby
tomaz_b has quit [Quit: Leaving]
waynerade has quit [Remote host closed the connection]
<ljarvis> this looks interesting https://github.com/clearwater-rb/clearwater
<ljarvis> in before yet another
rikkipitt has joined #ruby
Hounddog has quit [Ping timeout: 250 seconds]
passerine has quit [Quit: Leaving]
sarkis has joined #ruby
symm-_ has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
nhhagen has joined #ruby
Peg-leg has joined #ruby
<Papierkorb> ljarvis: I do something similar, though I'm using HAML. Feels way more natural to me
<ljarvis> yeah I'm a HAML fan
* apeiros moved on from haml to slim
Hounddog has quit [Excess Flood]
Hounddog has joined #ruby
<shevy> from haml to slim to thin to anorexia
rodfersou has joined #ruby
* adaedra moved from HAML to Slim and moved back
<apeiros> adaedra: oh? interesting. why's that?
<shevy> yeah adaedra don't give in to less cuisine!
sarkis has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
<Papierkorb> I used Haml from the get-go. a friend recommended it, and I don't have a reason to switch.
<norc> >> o = Object.new; def o.call; puts "called"; end; o.()
<ruboto> norc # => called ...check link for more (https://eval.in/479690)
<adaedra> apeiros: I kept forgetting the ' in the text-lines, and HAML hash-like attributes are nice.
<norc> Fancy. Has this always been there?
<adaedra> 18>> o = Object.new; def o.call; puts "called"; end; o.()
<ruboto> adaedra # => /tmp/execpad-406f76439e50/source-406f76439e50:2: syntax error, unexpected '(' ...check link for more (https://eval.in/479691)
Hounddog has quit [Excess Flood]
elton has joined #ruby
<adaedra> seems not.
<ljarvis> yeah it's new, like the stabby operator
Hounddog has joined #ruby
<ljarvis> >> -> {}.()
platzhirsch has joined #ruby
<ruboto> ljarvis # => nil (https://eval.in/479692)
astrobun_ has quit [Remote host closed the connection]
<norc> Interesting because I was sad the other day that we don't have op(). Seems like we do after all.
<norc> Sort of at least. :-)
<apeiros> we have op[]
<Papierkorb> thank god we've got more magic
<ljarvis> yeah methods in ruby aren't first class. It's my wish list item for Ruby that'll never happen
<apeiros> eh, any sufficiently analyzed magic is indistinguishable from science
nocontrol has joined #ruby
<Papierkorb> ljarvis: you mean just typing "some_variable" would invoke it if it's a method?
<ljarvis> Papierkorb: correct
<norc> Papierkorb: Depends on what the parser has in its cache.
<apeiros> problem is - you can't have sigil-less method calls and callable variables
<adaedra> Science ALL the things!
<apeiros> you have to sacrifice one
<ljarvis> also people seem to like optional parens over that feature. Satanists
<apeiros> yep. parens would be one kind of sigils.
Hounddog has quit [Excess Flood]
<apeiros> I chose another route in my toy language. I use .foo
<norc> ljarvis: My head hurts from all the strange and bizarre parser errors you get when leaving out parens all the time.
Hounddog has joined #ruby
<norc> They are optional. Sometimes. In trivial cases.
<apeiros> so it's got a prefixed sigil, but no mandatory parens.
atmosx_ is now known as atmosx
<adaedra> I dislike the idea of "remove all parenthesis you can"
<ljarvis> everything is "callable" in my language. "foo"() []() 1()
<norc> apeiros: Im wondering whether this is just a tool to give more options for writing DSL
<norc> op.() I mean
sarkis has joined #ruby
<shevy> adaedra there we go to meme it up http://shevegen.square7.ch/SCIENCE_ALL_THE_THINGS.png
bhaveshletter has quit [Quit: Leaving]
<adaedra> shevy: those pixels.
<apeiros> norc: it's because people didn't like the look of op.call()
<shevy> adaedra beautiful isn't it
<norc> apeiros: ?
elton has quit [Ping timeout: 260 seconds]
<adaedra> vade retro, 20th century.
<Papierkorb> well I guess your image converter wasn't so sciency with its use of pixels
<apeiros> norc: I mean it's not a tool providing more options, it's a cosmetic "trick"
<apeiros> the options have already been there. they just looked a bit less nice.
<apeiros> since .() is just syntax "sugar" for .call()
<norc> apeiros: Oh. Method#call you mean?
<apeiros> no
<apeiros> .() is .call(). literally. in every sense. it's not (necessarily) Method#call.
<apeiros> just like a + b is a.+(b)
<norc> apeiros: Think it's just a misunderstanding. :)
Hounddog has quit [Ping timeout: 260 seconds]
<apeiros> ok :)
sarkis has quit [Ping timeout: 264 seconds]
peterhil_ has quit [Ping timeout: 260 seconds]
ismaelga has joined #ruby
sarkis has joined #ruby
Tempesta has joined #ruby
banister has joined #ruby
spt0 has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
<Takumo> Hi all, I'm using Savon to call a SOAP API but I'm getting an error: "Server was unable to read request. ---> There is an error in XML document (1, 598). ---> The string '24 Jun 2016' is not a valid AllXsd value."
<Takumo> How do I inspect the serialized request to check the issue?
xfbs has quit []
ibouvousaime has joined #ruby
rikkipitt has quit [Remote host closed the connection]
aswen has joined #ruby
aswen has quit [Client Quit]
lkba has joined #ruby
Hounddog has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
tvw has joined #ruby
sarkis has joined #ruby
Hounddog has joined #ruby
ldnunes has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
krz has quit [Ping timeout: 260 seconds]
nixmaniack has joined #ruby
luca768 has left #ruby ["undefined"]
bkxd has joined #ruby
Hounddog has quit [Excess Flood]
rikkipitt has joined #ruby
Hounddog has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
aswen has joined #ruby
Hounddog has quit [Excess Flood]
agit0 has joined #ruby
Hounddog has joined #ruby
aswen has joined #ruby
Hounddog has quit [Excess Flood]
rikkipitt has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
sarkis has joined #ruby
<gregf_> :q!
<gregf_> oops :/
kam270 has joined #ruby
<shevy> vimster!
Arnvald has quit [Remote host closed the connection]
SolarSailor has joined #ruby
Arnvald has joined #ruby
bronson has joined #ruby
solocshaw has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
tvw has quit []
Oog has quit []
TheBloke- has joined #ruby
TheBloke has quit [Read error: Connection reset by peer]
EbokianKnight has joined #ruby
Arnvald has quit [Ping timeout: 245 seconds]
bronson has quit [Ping timeout: 246 seconds]
aswen has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
dravine_ has joined #ruby
TheBloke has joined #ruby
TheBloke- has quit [Read error: Connection reset by peer]
sarkis has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
dravine_ is now known as dravine
ereslibre has joined #ruby
ereslibre has quit [Changing host]
ereslibre has joined #ruby
kam270 has quit [Ping timeout: 260 seconds]
ruby-lang558 has joined #ruby
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
nfk|laptop has joined #ruby
howdoicomputer has joined #ruby
hostess_ has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
nateberkopec has joined #ruby
othll0 has joined #ruby
pwnd_nsfw has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
Hounddog has joined #ruby
waynerade has joined #ruby
krz has joined #ruby
rgrmatt has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
ruby-lang558 has quit [Quit: Page closed]
vdamewood has quit [Quit: Life beckons.]
waynerade has quit [Ping timeout: 260 seconds]
rgrmatt has quit [Ping timeout: 260 seconds]
ibouvousaime has quit [Ping timeout: 260 seconds]
TheHodge has joined #ruby
waynerade has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
gix has quit [Ping timeout: 245 seconds]
gix has joined #ruby
tulak has joined #ruby
dravine_ has joined #ruby
elton has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
gener1c has quit [Ping timeout: 245 seconds]
<norc> apeiros: Did you got ruby-oci8 working on El Capitan eventually?
kam270 has joined #ruby
dravine has quit [Ping timeout: 260 seconds]
dravine_ is now known as dravine
goodcodeguy has joined #ruby
dmcp has joined #ruby
sarkis has joined #ruby
DoubleMalt has quit [Ping timeout: 245 seconds]
x0f has joined #ruby
elton has quit [Ping timeout: 245 seconds]
tulak has quit [Remote host closed the connection]
peterhil_ has joined #ruby
opencard has quit [Remote host closed the connection]
auzty has quit [Quit: Leaving]
tulak has joined #ruby
sigurding has quit [Quit: sigurding]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danielpclark has quit [Ping timeout: 246 seconds]
hfp__work has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
hfp__work is now known as hfp_work
houhoulis has quit [Remote host closed the connection]
CoderPuppy has joined #ruby
edwinvdgraaf has joined #ruby
sdothum has joined #ruby
karapetyan has joined #ruby
toretore has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
azgil has joined #ruby
senayar has quit []
aibot has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
tulak_ has joined #ruby
rsc___ has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
tulak has quit [Ping timeout: 250 seconds]
colegatron has quit [Ping timeout: 246 seconds]
Rotwang has joined #ruby
tulak_ has quit [Remote host closed the connection]
<Rotwang> hi
Mon_Ouie has joined #ruby
<Rotwang> I have a bundler question, hope it is the right place to ask
sarkis has quit [Ping timeout: 260 seconds]
<Rotwang> can I somehow add an additional path to bundler to look for gems?
tulak has joined #ruby
<adaedra> yep, using source
<Rotwang> the exact problem I have is that I'm trying to add a gem to the gitlab omnibus package (which I already have installed)
<Rotwang> adaedra: could you elaborate a bit more?
danielpclark has joined #ruby
devoldmx has joined #ruby
DoubleMalt has joined #ruby
<adaedra> Or, for only one gem, the path/git/github/bitbucket options
IrishGringo has joined #ruby
opencard has joined #ruby
sarkis has joined #ruby
testetest has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
B5X has joined #ruby
waynerade has quit [Remote host closed the connection]
B5X has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 250 seconds]
lxsameer has quit [Quit: Leaving]
colegatron has joined #ruby
<Rotwang> adaedra: thanks, somehow gitlab omnibus doesn't want to cooperate, but I'm at least a step closer
sarkis has joined #ruby
testetest has left #ruby [#ruby]
test has joined #ruby
test is now known as Guest75404
bronson has joined #ruby
aibot has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
rikkipitt has joined #ruby
vdamewood has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 260 seconds]
Bish has quit [Excess Flood]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
entropie has joined #ruby
dlitvak has quit [Remote host closed the connection]
Bish has joined #ruby
Xeago has joined #ruby
casadei has quit [Remote host closed the connection]
DurstBurger has joined #ruby
howdoicomputer has joined #ruby
symm-_ has quit [Ping timeout: 246 seconds]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
ismaelga has quit [Remote host closed the connection]
prestorium has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
peterhil_ has quit [Ping timeout: 260 seconds]
Guest75404 has left #ruby [#ruby]
smokey has joined #ruby
nbdy has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
pwnd_nsfw has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
DurstBurger has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
symm- has joined #ruby
sepp2k has joined #ruby
tulak has quit [Remote host closed the connection]
xfbs has joined #ruby
brunto has joined #ruby
ismaelga has joined #ruby
testBot_1234_518 has joined #ruby
Rickmasta has joined #ruby
Robert__ has joined #ruby
elton has joined #ruby
ismaelga has quit [Remote host closed the connection]
sarkis has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
Cantaberry has joined #ruby
bigkevmcd has joined #ruby
prestorium has quit [Read error: Connection timed out]
ismaelga has joined #ruby
krobzaur has joined #ruby
Robert__ has quit [Ping timeout: 260 seconds]
elton has quit [Ping timeout: 245 seconds]
ICantCook has quit [Ping timeout: 245 seconds]
sarkis has quit [Ping timeout: 260 seconds]
x0f has quit [Ping timeout: 264 seconds]
sarkis has joined #ruby
nateberkopec has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
krobzaur has quit [Ping timeout: 260 seconds]
sandstrom has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
Jet4Fire has joined #ruby
<Jet4Fire> hello!
<adaedra> Hi
InvGhost has joined #ruby
x0f has joined #ruby
<Jet4Fire> how is going?
nateberkopec has quit [Ping timeout: 246 seconds]
sarkis has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
<jhass> we ask you!
<apeiros> we do?
Pumukel has quit [Ping timeout: 260 seconds]
<jhass> well, I just did
<adaedra> he did, didn't he?
sigurding has joined #ruby
yessir has joined #ruby
startupality has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
<apeiros> you did!
<yessir> question, can I dynamically add "?" to a method whose name is passed as a variable to the method? Or is .send("#{name}?") the right way?
sarkis has joined #ruby
<apeiros> .send(:"#{name}?") is dynamically adding a ? to the name ;-)
<apeiros> also, use public_send, not send.
jackcom has joined #ruby
<yessir> yes I realize it is :) but is there another way or is that the 'best' way?
jackcom has left #ruby [#ruby]
<apeiros> or put differently: there's no dynamic method names. yes, public_send/send is the name to go with variable method names.
<yessir> thanks apeiros
dmcp has quit [Ping timeout: 245 seconds]
ruid has quit [Ping timeout: 260 seconds]
dmcp has joined #ruby
Lena has joined #ruby
Pumukel has joined #ruby
tulak has joined #ruby
Lena has quit []
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
waynerade has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
tulak has quit [Remote host closed the connection]
startupality has quit [Ping timeout: 260 seconds]
tulak has joined #ruby
loechel has joined #ruby
sankaber has joined #ruby
wprice has joined #ruby
waynerade has quit [Ping timeout: 246 seconds]
skweek has quit [Ping timeout: 246 seconds]
sankaber has quit [Client Quit]
Pumukel has quit [Ping timeout: 250 seconds]
loechel is now known as Pumukel
icey has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
<shevy> hehe kinda funny that the first example to come up is .send() and then the very next line says to not use .send() but .public_send() instead; I wonder if the brain just likes the shorter variant more :D
sarkis has joined #ruby
<jhass> shevy: no, public_send is still comparably new and all the stuff on the internet just refers to send still
krz has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
startupality has joined #ruby
decoponio has joined #ruby
danielpclark has quit [Ping timeout: 245 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arian0n has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
sarkis has quit [Ping timeout: 250 seconds]
ibouvousaime has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
chrisco has joined #ruby
chrisco has left #ruby [#ruby]
startupality has quit [Ping timeout: 246 seconds]
Pupp3tm4st3r has joined #ruby
casadei has joined #ruby
DurstBurger has joined #ruby
howdoicomputer has joined #ruby
hostess_ is now known as hostess
yessir has quit [Ping timeout: 252 seconds]
rsc___ has quit [Quit: rsc___]
civil_ has joined #ruby
Pupp3tm4_ has quit [Ping timeout: 246 seconds]
chamby has joined #ruby
casadei has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 246 seconds]
DurstBurger has quit [Ping timeout: 246 seconds]
moei has quit [Quit: Leaving...]
Xeago has joined #ruby
ismaelga has quit [Remote host closed the connection]
danielpclark has joined #ruby
civil_ has quit [Quit: Lost terminal]
saneax is now known as saneax_AFK
chamby has quit [Quit: leaving]
dlitvak has joined #ruby
febre has joined #ruby
<febre> hellow
danzilio has quit []
danzilio has joined #ruby
<febre> i have no sperience with ruby ... some one knows why i can run a programm inside the /opt folder and when i run in my home folder i get a error?
<apeiros> febre: if you tell us *what* error you get, we might have a chance.
gusTester has joined #ruby
gusTester has left #ruby [#ruby]
tulak_ has joined #ruby
<febre> sorry for my bad writing. I don´t speak inglish. My error is: .rvm/rubies/ruby-2.1.6/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'metasploit-framework' (>= 0) among 136 total gem(s) (Gem::LoadError)
<febre> Checked in 'GEM_PATH=/home/motoko/.rvm/gems/ruby-2.1.6:/home/motoko/.rvm/gems/ruby-2.1.6@global', execute `gem env` for more information
<febre> from /home/motoko/.rvm/rubies/ruby-2.1.6/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:324:in `to_spec'
<febre> from /home/motoko/.rvm/rubies/ruby-2.1.6/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
<febre> from /home/motoko/.rvm/gems/ruby-2.1.6/bin/msfconsole:22:in `<main>'
<febre> from /home/motoko/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `eval'
<febre> from /home/motoko/.rvm/gems/ruby-2.1.6/bin/ruby_executable_hooks:15:in `<main>'
shanemcd has joined #ruby
gusTester has joined #ruby
<apeiros> and you say you can run (msfconsole, I assume) with the same user in /opt?
sulky has quit [Ping timeout: 260 seconds]
tulak_ has quit [Remote host closed the connection]
<febre> yes
<febre> with the same user
moei has joined #ruby
elton has joined #ruby
tulak has quit [Read error: Connection reset by peer]
tulak_ has joined #ruby
<apeiros> when you're in /opt, what does `which ruby` and `which msfconsole` say? and what does it say when you're in ~?
sulky has joined #ruby
<febre> i have to go to /opt and use the 'rvm use 2.1.6 --default' inside the folder
<febre> the i run the msfconsole
Mon_Ouie has quit [Ping timeout: 260 seconds]
<jhass> do you run the rvm use command in your home folder too?
<apeiros> well, if you did 'rvm use 2.1.6 --default' once, then you shouldn't have to use rvm anymore.
<apeiros> (as it sets 2.1.6 as the default ruby)
<febre> metasploit-framework git:(master) which ruby
<febre> /home/motoko/.rvm/rubies/ruby-2.1.6/bin/ruby
<febre> ➜ metasploit-framework git:(master) which msfconsole
<jhass> anyway, probably a topic for #metasploit
<febre> /home/motoko/.rvm/gems/ruby-2.1.6/bin/msfconsole
<febre> ➜ metasploit-framework git:(master)
Cantaberry has quit [Ping timeout: 260 seconds]
<jhass> ?flood
<ruboto> Please use https://gist.github.com for more than three lines of text!
brujoand has joined #ruby
testBot_1234_824 has joined #ruby
testBot_1234_824 has quit [Read error: Connection reset by peer]
<apeiros> eeep, sorry, afk
vdamewood has quit [Quit: Life beckons.]
elton has quit [Ping timeout: 260 seconds]
YP-QMUL-W has joined #ruby
<brujoand> hi, I usually don't work with ruby so I'll hope you'll excuse my ignorance. But I often find my self in need of a particular ruby gem and/or ruby version. So I tried rvm. And sky grew dark, whilst all life withered and died. So I went for rbenv. But at that point I was exhausted. So in stead of trying all the things, I wanted to ask someone who actually works with ruby. How do you manage your ruby env with
<brujoand> regards to version, gems etc?
opencard has quit [Remote host closed the connection]
<jhass> RVM is probably still the most popular but chruby is gaining marketshare rapidly. Rbenv is the least popular
chocho has joined #ruby
tulak has joined #ruby
<chocho> hi
allcentury has joined #ruby
testBot_1234_329 has joined #ruby
testBot_1234_329 has quit [Read error: Connection reset by peer]
<chocho> I am trying to learn Ruby long time, I red 3 different books, but in terms of understanding how to write and think of designing program I suck
CloCkWeRX has joined #ruby
<chocho> when I reach some level in Programming Ruby book i stop understanding what is there, so i want to ask
testBot_1234_304 has joined #ruby
testBot_1234_304 has quit [Read error: Connection reset by peer]
<chocho> please give me a book that I can read and will help me to bring my ideas in code
d0nn1e has joined #ruby
smokey has quit [Read error: Connection reset by peer]
<darix> chocho: Sandy Metz
<chocho> book that i may read 3 times, but that will bring me inside real programming
tulak_ has quit [Ping timeout: 260 seconds]
<brujoand> jhass: thanks. I'll have a look at chruby
<chocho> darix, object oriented design ?
<chocho> since I am young I use computers, now I am 25 i don't see my future in another place, and ruby make me feel i can really do it, but i really feel like i am very stupid sometimes(even if i know it's not right)
<darix> chocho: but yes start with her book
<chocho> tnx, please let me know whatever you think can help me
skweek has joined #ruby
<chocho> something else you know that will bring me in practice with learning?
goodcodeguy has joined #ruby
moeSeth has quit []
xfbs has quit []
moeSeth has joined #ruby
<shevy> just write as much code as possible, trivial code at first
<darix> what he said
<darix> chocho: and install pry
<darix> and learn about binding.pry
<darix> which gives you a nice way to play with your code and data
<shevy> I got all sorts of weird things on my todo list ... "write a libtool-fix script" ... another thing is to re-look into what apeiros wrote (that thing that turns strings like "[1,2,3]" into ruby array object), ... actually I have way too many things to do and not enough time :(
Xeago has quit [Remote host closed the connection]
nixmaniack has quit [Remote host closed the connection]
<chocho> i have joomla website, the company using it is making big amount of money
<chocho> i have wordpress website, and my sister is making good money on it as well
<chocho> but I want do more, a lot more
<chocho> and i really get sad sometimes, because i want, but I somehow cant find the way ..
<chocho> tnx for help guys rly
Tempesta has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Pupp3tm4_ has joined #ruby
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
<Jet4Fire> chocho: "i have wordpress website, and my sister is making good money on it as well" >> link please!
kobain has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
<chocho> Jet4Fire, it's wp + theme + customization, but let me know why you ask for link
Trynemjoel has joined #ruby
ismaelga has joined #ruby
sankaber has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
GinoManWorks has joined #ruby
alcy has joined #ruby
<alcy> hello folks, why does "azz".succ return "baa" instead of "aaa" ?
tjad has joined #ruby
<Jet4Fire> chocho: just interesting to look
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<canton7> alcy, why would it return "aaa"?
nixmaniack has joined #ruby
cwong_on_irc has joined #ruby
<canton7> alcy, why happens when you do 099 + 1? Do you get 000, or 100?
<canton7> *what happens
InvGhost has quit [Ping timeout: 260 seconds]
<alcy> canton7: trying to wrap my head around string incrementation ... so, does it do ascii code math underneath ?
haylon has joined #ruby
bkxd has joined #ruby
sgambino has joined #ruby
<canton7> so incrementing "a" results in a "carry", as indicated by the doc
<canton7> *incrementing "z", rather
<alcy> gotcha
cubicme has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 250 seconds]
saneax_AFK is now known as saneax
Macaveli_ has joined #ruby
rsc___ has joined #ruby
tjad has quit [Ping timeout: 260 seconds]
Arnvald has joined #ruby
cdg has joined #ruby
Macaveli has quit [Ping timeout: 260 seconds]
allcentury has quit [Ping timeout: 246 seconds]
ir2ivps3__ has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 250 seconds]
lurch_ has joined #ruby
rikkipitt has quit [Remote host closed the connection]
moeabdol has joined #ruby
dukedave has quit []
dukedave has joined #ruby
The_Phoenix has joined #ruby
jhill has quit []
jhill has joined #ruby
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #ruby
atomical has joined #ruby
YP-QMUL-W has quit [Read error: Connection reset by peer]
mroth has quit []
mroth has joined #ruby
peterhil_ has quit [Ping timeout: 246 seconds]
DurstBurger has joined #ruby
adac has joined #ruby
InvGhost has joined #ruby
Xeago has joined #ruby
Anderson69s has joined #ruby
<adac> What is the best way to check if there are values in "options[:keywords]" and only then add them to a string array?
<adac> %w[keyword1 keyword2 keyword3 ] << options[:keywords]
kappy has joined #ruby
danielpclark has quit [Ping timeout: 260 seconds]
Vitor_ has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
<kramsee> I'd say the simplest way is to add it to the array and doing a array.uniq afterwards
tvon has joined #ruby
linocisco has joined #ruby
brujoand has left #ruby [#ruby]
krobzaur has joined #ruby
<linocisco> how to learn ruby quickly for ruby and rails?
<adaedra> By practicing.
TomPeed has joined #ruby
<kramsee> adac: see above
radgeRayden has joined #ruby
<adac> kramsee, yes that sounds nice
ICantCook has joined #ruby
<kramsee> check out uniq! as well. maybe that suits you better
mustmodify has joined #ruby
elton has joined #ruby
<adaedra> >> %w[keyword1 keyword2 keyword3] | %w[keyword2 keyword4] # adac
<ruboto> adaedra # => ["keyword1", "keyword2", "keyword3", "keyword4"] (https://eval.in/479842)
nateberkopec has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
<adaedra> you can use Hash#fetch to have an empty array if :keywords is not set
<adac> thanks kramsee and adaedra!
InvGhost has quit [Ping timeout: 260 seconds]
maikowblue has joined #ruby
<kramsee> oh adaedra, that's more elegant! :>
<mustmodify> I'm doing something dumb. I swear I've been using Ruby forever, though it obviously isn't showing right now. Why am I getting back an enumerator instead of a list here? https://gist.github.com/mustmodify/1b8f0fdfa7a0c09a1109
dmcp has quit [Ping timeout: 250 seconds]
<adaedra> because the do acts on puts and not map, I'd say.
rikkipitt has joined #ruby
<apeiros> mustmodify: because the do/end block belongs to puts
<adaedra> Use {} instead of do end for a quick fix.
<apeiros> use {}
<apeiros> ^5 adaedra
<mustmodify> apeiros: d'Oh!
ItSANgo has joined #ruby
ItSANgo_ has joined #ruby
arup_r has joined #ruby
gizmore has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has joined #ruby
nixmaniack has quit [Remote host closed the connection]
elton has quit [Ping timeout: 260 seconds]
ItSANgo has quit [Client Quit]
nixmaniack has joined #ruby
<mustmodify> apeiros: looks like that was it. Thanks very much.
<mustmodify> That's what happens on Monday mornings. I mean, Thursday mornings.
ir2ivps3 has joined #ruby
<adac> adaedra, hmm wondering hwo this Hash#fetch does work
casadei has joined #ruby
<adac> *how
<adaedra> adac: look at ri:Hash#fetch documetation?
<`derpy> adac: method `Hash#fetch`: Returns a value from the hash for the given key. If the key can't be found, ther… • http://rubydoc.info/stdlib/core/Hash#fetch-instance_method
<adac> ah there is an example! very good, thanks adaedra
allcentury has joined #ruby
lukeasrodgers has joined #ruby
opencard has joined #ruby
sarkis has joined #ruby
InvGhost has joined #ruby
skweek has joined #ruby
rsc___ has quit [Quit: rsc___]
alcy has quit [Quit: leaving]
rsc___ has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
danielpclark has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
Pumukel has quit [Ping timeout: 250 seconds]
stan has joined #ruby
malconis has joined #ruby
B1n4r10 has joined #ruby
saneax is now known as saneax_AFK
freerobby has joined #ruby
<norc> >> Process.kill(:SEGV, $$)
<ruboto> norc # => (https://eval.in/479853)
p0wn3d has joined #ruby
shanemcd has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<norc> Why doesn't this produce the standard seg fault screen?
<adaedra> You mean "Segmentation fault" message?
<adaedra> This one is outputted by your shell
<norc> ruboto does it too if it crashes
<norc> >> require 'fiddle'; Fiddle::Pointer.new(0)[0]
<ruboto> norc # => NULL pointer dereference (Fiddle::DLError) ...check link for more (https://eval.in/479854)
<norc> >> require 'fiddle'; Fiddle::Pointer.new(1)[0]
<ruboto> norc # => /tmp/execpad-4bbdd5e1775f/source-4bbdd5e1775f:2: [BUG] Segmentation fault at 0x000001 ...check link for more (https://eval.in/479855)
benlovell has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Ping timeout: 260 seconds]
linocisco has quit [Ping timeout: 245 seconds]
<norc> But not with SIGSEGV, which is weird since the same signal should be sent in both instances
tvw has joined #ruby
<adaedra> That's strange indeed
allcentury has quit [Ping timeout: 246 seconds]
benlovell has quit [Client Quit]
bkxd has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<norc> adaedra: Is it possible that this might have something to do with ruboto forking for each >> statement?
<adaedra> That's eval-in and ruby internals
TomyWork has quit [Ping timeout: 246 seconds]
<adac> within my ruby console merging two arrays just works fine: i.e. (testarray1 + ['test']).uniq
<adac> however in rails helper it does not
<adac> any ideas why?
<adac> it is the exact same code
solars has quit [Ping timeout: 260 seconds]
<adaedra> are you sure the source objects are the same (i.e. Model result vs Array) ?
pandaant has joined #ruby
mustmodify has left #ruby [#ruby]
<norc> adaedra: Im just thinking that the only reasonable explanation is that both are handled by different signal handlers for SEGV - and the only way this makes sense is if they get sent to different processes.
mostlybadfly has quit [Quit: Connection closed for inactivity]
bigkevmcd has quit [Ping timeout: 245 seconds]
<norc> Because afaik a segmentation fault is just the linux kernel sending SIGSEGV to the offending process.
babblebre has joined #ruby
Pumukel has joined #ruby
<adaedra> Sending a SIGSEGV, either from an external process than from Ruby itself shows the [BUG] screen for me. (OS X, tho)
yes`r has quit [Ping timeout: 246 seconds]
<norc> Same on Ubuntu Linux.
<norc> adaedra: But then again it should be possible to recover it from it using Charlie Somervilles hack.
bigkevmcd has joined #ruby
<norc> Which does not work if I sent a SIGSEGV in ruboto
<norc> (Or eval.in rather)
roxtrongo has joined #ruby
tvon has quit [Ping timeout: 245 seconds]
whippythellama has joined #ruby
based_pdev_ has joined #ruby
kam270 has quit [Ping timeout: 246 seconds]
borodin has joined #ruby
aryaching has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
rodfersou is now known as rodfersou|lunch
NeverDie has joined #ruby
<ja> How would I get ['january', 'february', 'march', …] in the cleanest way possible?
<adaedra> %w[january february march ...]
<adaedra> mh, give me a second.
imperator has joined #ruby
<ja> >> (1..12).map { |i| Date.new(Date.current.year, i).strftime('%B').downcase }
<ruboto> ja # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/479866)
<ja> >.<
bronson has quit [Ping timeout: 245 seconds]
<ja> >> require 'rails'; (1..12).map { |i| Date.new(Date.current.year, i).strftime('%B').downcase } # :—P
<ruboto> ja # => cannot load such file -- rails (LoadError) ...check link for more (https://eval.in/479867)
<ja> adaedra: Can you beat that though?
<havenwood> >> require 'date'; Date::MONTHNAMES.drop(1).map(&:downcase)
<ruboto> havenwood # => ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", " ...check link for more (https://eval.in/479868)
<ja> havenwood: whoa, thanks!
hanmac has quit [Ping timeout: 260 seconds]
<adaedra> >> require 'date'; 7.times.each_with_object(Date.new(2007, 1, 1)) { |d| d.strftime('%B'); d << 1 }
<ruboto> adaedra # => undefined method `strftime' for 0:Fixnum (NoMethodError) ...check link for more (https://eval.in/479869)
<adaedra> ok lol.
<ja> haha, thanks for your effort, adaedra
aibot has quit [Ping timeout: 250 seconds]
hxegon has joined #ruby
Azulinho has quit [Ping timeout: 260 seconds]
mostlybadfly has joined #ruby
karapetyan has joined #ruby
peterhil_ has joined #ruby
dhollinger has joined #ruby
frem has joined #ruby
allcentury has joined #ruby
howdoicomputer has joined #ruby
tvon has joined #ruby
imperator has left #ruby ["Leaving"]
lubarch has joined #ruby
roxtrong_ has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
ismaelga has quit [Remote host closed the connection]
Gamer-Pro has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
roxtrongo has quit [Ping timeout: 260 seconds]
rikkipitt has quit [Quit: Leaving...]
devbug has joined #ruby
peterhil_ has quit [Ping timeout: 246 seconds]
c0ncealed has joined #ruby
lurch_ has quit [Ping timeout: 260 seconds]
Pupp3tm4_ has quit [Remote host closed the connection]
Arnvald has quit [Remote host closed the connection]
yes`r has joined #ruby
hanmac has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
ta has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 264 seconds]
atomical_ has joined #ruby
nixmaniack has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 250 seconds]
I has joined #ruby
I is now known as Guest24358
elton has joined #ruby
Guest79754 has quit [Ping timeout: 246 seconds]
lubarch has quit [Quit: leaving]
Gamer-Pro has quit []
Laaw has quit [Quit: ZNC - http://znc.in]
aibot has joined #ruby
ethe has joined #ruby
p0wn3d has quit [Ping timeout: 245 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elton has quit [Ping timeout: 260 seconds]
tagrudev has quit [Remote host closed the connection]
rghose has quit [Quit: Leaving.]
Arnvald has joined #ruby
lubekpl has joined #ruby
robbyoconnor has joined #ruby
psy_ has joined #ruby
danielpclark has quit [Ping timeout: 245 seconds]
nixmaniack has joined #ruby
shanemcd has joined #ruby
gusTester1 has joined #ruby
casadei has quit [Remote host closed the connection]
gusTester has quit [Ping timeout: 260 seconds]
Azulinho has joined #ruby
ibouvousaime has quit [Ping timeout: 245 seconds]
gusTester1 has quit [Client Quit]
norc has quit [Ping timeout: 252 seconds]
treehug88 has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
Laaw has joined #ruby
devoldmx has joined #ruby
xfbs has joined #ruby
Fluent has quit [Disconnected by services]
Fluent has joined #ruby
Fluent has quit [Disconnected by services]
last_staff has joined #ruby
Fluent_ has joined #ruby
ismaelga has joined #ruby
baweaver has joined #ruby
Jardayn has joined #ruby
adac has quit [Quit: Leaving]
kies has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
iateadonut has joined #ruby
entropie has quit [Excess Flood]
varunwachaspati has joined #ruby
entropie has joined #ruby
joonty has joined #ruby
danielpclark has joined #ruby
baweaver has quit [Remote host closed the connection]
Guest24358 has quit [Quit: This computer has gone to sleep]
RegulationD has joined #ruby
arup_r has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 260 seconds]
grotewold has joined #ruby
grotewold has quit [Client Quit]
casadei has joined #ruby
momomomomo has quit [Quit: momomomomo]
jds has joined #ruby
kies has quit [Ping timeout: 260 seconds]
x0f has quit [Ping timeout: 264 seconds]
howdoicomputer has joined #ruby
aufi has quit [Quit: Konversation terminated!]
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
demonlove has joined #ruby
arup_r has joined #ruby
theery has joined #ruby
x0f has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lubekpl has joined #ruby
favadi has joined #ruby
favadi has quit [Client Quit]
ethe has quit [Quit: Textual IRC Client: www.textualapp.com]
gusTester has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
Macaveli_ has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
saddad has joined #ruby
tvon has quit [Ping timeout: 260 seconds]
lubekpl has quit [Ping timeout: 245 seconds]
johnzorn has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
momomomomo has quit [Quit: momomomomo]
psy_ has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
maikowblue has quit [Ping timeout: 246 seconds]
momomomomo has joined #ruby
maikowblue has joined #ruby
maikowblue has quit [Client Quit]
last_staff has quit [Read error: Connection reset by peer]
lurch_ has joined #ruby
last_staff has joined #ruby
vondruch has quit [Quit: Ex-Chat]
johnny56 has quit [Ping timeout: 264 seconds]
grill has joined #ruby
theery has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
peterhil_ has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 260 seconds]
johnny56 has joined #ruby
devoldmx has joined #ruby
anisha has quit [Quit: Leaving]
hxegon has quit [Quit: leaving]
jobewan has joined #ruby
andikr has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
theery has joined #ruby
skweek has joined #ruby
nocontrol has quit [Remote host closed the connection]
IrishGringo has joined #ruby
lurch_ has quit [Quit: lurch_]
tvw has quit []
geekbri has joined #ruby
Gnut has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
dmcp has joined #ruby
nfk|laptop has quit [Quit: yawn]
tvon has joined #ruby
Anderson69s has joined #ruby
maloik has joined #ruby
momomomomo has quit [Quit: momomomomo]
Arnvald has quit [Remote host closed the connection]
Arnvald has joined #ruby
Macaveli has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
Zai00 has joined #ruby
dlitvak has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
wildlander has joined #ruby
jackjackdripper has quit [Client Quit]
karapetyan has joined #ruby
devoldmx has quit [Remote host closed the connection]
djstorm has joined #ruby
atm0sphere has joined #ruby
simplyia_ has joined #ruby
theery has quit [Remote host closed the connection]
Arnvald has quit [Ping timeout: 260 seconds]
simplyianm has quit [Read error: Connection reset by peer]
Jet4Fire has joined #ruby
pandaant has quit [Remote host closed the connection]
mary5030 has joined #ruby
demonlove has quit [Ping timeout: 245 seconds]
SCHAAP137 has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
blaxter has quit [Quit: foo]
nbdy has joined #ruby
I has joined #ruby
demonlove has joined #ruby
atm0sphere has quit [Ping timeout: 246 seconds]
I is now known as Guest82752
ethe has joined #ruby
ArgylePwnage has joined #ruby
jgorak_ has joined #ruby
cwong_on_irc has joined #ruby
nbdy has quit [Client Quit]
roxtrong_ has quit [Remote host closed the connection]
dlitvak has joined #ruby
<ArgylePwnage> Hello
lkba has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 260 seconds]
SOLDIERz has quit [Ping timeout: 250 seconds]
<adaedra> Hi
Wsewolod has joined #ruby
<demonlove> hweee
brunto has quit [Ping timeout: 245 seconds]
peterhil_ has joined #ruby
rodfersou|lunch is now known as rodfersou
Hounddog has quit [Read error: Connection reset by peer]
ArgylePwnage has quit [Quit: leaving]
roshanavand has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
Hounddog has joined #ruby
Hounddog has quit [Excess Flood]
B1n4r10 has quit [Ping timeout: 246 seconds]
Macaveli has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
Macaveli has joined #ruby
moeabdol has joined #ruby
Hounddog has quit [Excess Flood]
Jet4Fire has quit [Ping timeout: 245 seconds]
hobodave has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
waynerade has joined #ruby
nixmaniack has joined #ruby
<TheCompWiz> apeiros: Just wanted to say thanks for yesterday... I've never used Kernel.switch before... and it did the trick. (I know norc suggested it initially... but he's not here... )
<apeiros> Kernel.select, I assume? :)
<apeiros> you're welcome
<TheCompWiz> yeah... /sigh. It has been a day. :D
Hounddog has quit [Excess Flood]
Hounddog has joined #ruby
cubicme has joined #ruby
<apeiros> and nope, it was indeed me to suggest it
<apeiros> unless norc suggested it a whole day earlier ;-)
roshanavand has joined #ruby
jottr has joined #ruby
WizJin has joined #ruby
<apeiros> but norc started a lot earlier than I helping you
crazydiamond has quit [Ping timeout: 250 seconds]
<apeiros> all I did at the beginning was snarky comments related to threads vs. processes ;D
howdoicomputer has quit [Ping timeout: 246 seconds]
<TheCompWiz> o.O I wasn't here on Tuesday. I guess someone else was also persuing something similar ...
jmhmccr has joined #ruby
[Butch] has joined #ruby
ELLIOTTCABLE has quit []
B1n4r10 has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> "unless". I didn't check a day earlier. I only checked yesterday :)
IrishGringo has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
<TheCompWiz> yeah.... but I still contend that the differences between threads and attached processes are very minimal... unless you're wanting to use shared memory.
agentmeerkat has joined #ruby
Macaveli_ has joined #ruby
waynerade has quit [Ping timeout: 246 seconds]
<apeiros> ok, I guess we disagree on that then. I see no point in discussing it :D
<apeiros> so: glad you solved your problem! :)
CoderPuppy has quit [Ping timeout: 250 seconds]
<TheCompWiz> LOL me too.
Hounddog has quit [Read error: Connection reset by peer]
<eam> TheCompWiz: be aware that ruby threads inherently have issues with shared memory whether you're using it or not
babblebre has quit [Quit: Connection closed for inactivity]
Zai00 has quit [Ping timeout: 260 seconds]
<havenwood> TheCompWiz: The differences are real.
<havenwood> More different than soup and cereal.
<eam> the interpreter needs to worry about how things are or aren't shared too
Macaveli has quit [Ping timeout: 245 seconds]
<TheCompWiz> eam: no desire to attack shared memory... today. but yes... I'm aware.
<eam> it's true that conceptually they're kinda similar -- at an abstract level removed from say, a ruby implementation :)
sigurding has quit [Quit: sigurding]
ELLIOTTCABLE has joined #ruby
Hounddog has joined #ruby
<eam> it's all clone() on linux
entropie has quit [Excess Flood]
Jet4Fire has quit [Ping timeout: 246 seconds]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> I maintain that cereal is a cold soup!
[Butch]_ has joined #ruby
entropie has joined #ruby
<eam> havenwood: it is
<havenwood> eam: Agreed.
poguez_ has joined #ruby
bronson has joined #ruby
shinenelson has joined #ruby
<eam> fondue is a dipping sauce
<apeiros> but it is!
<apeiros> tasty yummi dipping sauce
chrisarcand has joined #ruby
<TheCompWiz> what do you call a fondue when you dump a bunch of "dipping items" into it?
<havenwood> TheCompWiz: Cereal?
<TheCompWiz> lol
<TheCompWiz> no clue.
<TheCompWiz> but it still is delicious.
sepp2k has quit [Ping timeout: 260 seconds]
<apeiros> if you dump it in? wasted.
tulak has quit [Remote host closed the connection]
<apeiros> you don't *dump* stuff into a fondue.
<apeiros> tsssk
<TheCompWiz> I'm more of a steak kinda guy.
sepp2k has joined #ruby
[Butch] has quit [Ping timeout: 245 seconds]
[Butch]_ is now known as [Butch]
<eam> fon-do's and fon-don'ts
<apeiros> a fendant is certainly not wrong to a fondue.
<adaedra> apeiros is swiss, don't mess with fondue
karapety_ has joined #ruby
<apeiros> indeed!
<apeiros> our warriors did well to invent it :D
Hounddog has quit [Ping timeout: 260 seconds]
* adaedra dips baguette in fondue
towski_ has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 246 seconds]
<eam> what's your stance on chocolate fondue
Jet4Fire has joined #ruby
<adaedra> Wait, this is #ruby, i thought this was #ruby-offtopic
<TheCompWiz> depends... do you qualify "white chocolate" as chocolate?
<adaedra> TheCompWiz: stop your racism.
<apeiros> right
<apeiros> chocolates don't have races
<apeiros> anyway, off to #ruby-offtopic with us!
Anderson69s has joined #ruby
* TheCompWiz is going back to banging face on keyboard.
frog0909_ has joined #ruby
Hounddog has joined #ruby
<apeiros> TheCompWiz: I hear that's the fastest way to produce good code. confirm?
<TheCompWiz> only if it is perl.
<adaedra> huhu.
<gregf_> >> "Perl" == "perl"
<ruboto> gregf_ # => false (https://eval.in/479918)
<gregf_> we're good!
<adaedra> >> class String; def ==; true; end; end; "Perl" == "perl"
<ruboto> adaedra # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/479919)
<adaedra> duh.
rsc___ is now known as rstacruz
<Papierkorb> perl is a hard nut to crack
<adaedra> adaedra.failures += 1
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
Jet4Fire has quit [Ping timeout: 260 seconds]
<gregf_> class String; def == other; false; end; end; "Perl" == "perl"
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<apeiros> 18>> $= = true; "Perl" == "perl"
<ruboto> apeiros # => /tmp/execpad-1ebf0ca460f1/source-1ebf0ca460f1:2: warning: modifying $= is deprecated ...check link for more (https://eval.in/479920)
rghose has joined #ruby
nofxx has joined #ruby
rghose has quit [Max SendQ exceeded]
nofxx has quit [Changing host]
nofxx has joined #ruby
<adaedra> ahah
cubicme has quit [Ping timeout: 246 seconds]
<adaedra> >> "Perl" =~ /perl/i
<ruboto> adaedra # => 0 (https://eval.in/479922)
<adaedra> right.
bb010g has quit [Quit: Connection closed for inactivity]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<apeiros> 18>> require 'stringio'; $stderr=StringIO.new; $= = true; "Perl" == "perl"
<ruboto> apeiros # => true (https://eval.in/479923)
<gregf_> >> [ $=, $/, $\ ]
<ruboto> gregf_ # => /tmp/execpad-04f877ef40bb/source-04f877ef40bb:2: warning: variable $= is no longer effective ...check link for more (https://eval.in/479924)
<apeiros> there. got ruby to shut up.
<eam> $VERBOSE = nil oughta do it
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<apeiros> 18>> $VERBOSE=nil; $= = true; "Perl" == "perl"
<ruboto> apeiros # => true (https://eval.in/479925)
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
babblebre has joined #ruby
<apeiros> nice. keep forgetting that the default `false` has a different effect than `nil`
<Papierkorb> >> $=
<ruboto> Papierkorb # => /tmp/execpad-c7563493ecd5/source-c7563493ecd5:2: warning: variable $= is no longer effective ...check link for more (https://eval.in/479926)
joonty has quit [Quit: joonty]
<adaedra> >> $stdout.close; "Perl" == "perl"
<ruboto> adaedra # => /tmp/execpad-945d5747a6d4/source-945d5747a6d4:1:in `p': closed stream (IOError) ...check link for more (https://eval.in/479927)
febre has quit [Ping timeout: 245 seconds]
rghose has joined #ruby
<apeiros> lol
rghose has quit [Max SendQ exceeded]
<adaedra> What if
rghose has joined #ruby
<adaedra> >> $stdout.close; $stderr.close; "Perl" == "perl"
<ruboto> adaedra # => /tmp/execpad-e029174ed2e9/source-e029174ed2e9:1:in `p': closed stream (IOError) ...check link for more (https://eval.in/479928)
rghose has quit [Max SendQ exceeded]
<adaedra> But where does it outputs :o
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<ethe> I wonder if you could modify the ruby interpreter to make it interpret perl (with a ruby script)
<eam> >> $stderr.reopen "/dev/null"; $stdout.reopen "/dev/null"; "Perl" == "perl"
<ruboto> eam # => (https://eval.in/479929)
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<adaedra> `exec('perl')`, ethe.
freerobby has quit [Quit: Leaving.]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<adaedra> Ah, I would have thought eval.in would not allow reopens.
B1n4r10 has quit [Ping timeout: 246 seconds]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
<ethe> adaedra, not that :P I mean like, changing operators, builtins and whatnot to make it interpret perl
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
Jet4Fire has joined #ruby
Macaveli_ has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has quit [Remote host closed the connection]
rstacruz has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
rgrmatt has joined #ruby
<eam> adaedra: I don't see why it should care, dup() isn't any more dangerous than open()
Jet4Fire has quit [Ping timeout: 245 seconds]
<adaedra> I was remembering it for not allowing open() in fact.
edwinvdgraaf has quit [Ping timeout: 260 seconds]
<adaedra> >> File.open('/dev/null').tap(&:read)
<ruboto> adaedra # => #<File:/dev/null> (https://eval.in/479937)
dorei has joined #ruby
jobewan has quit [Quit: Leaving]
* adaedra launches a memtest on his brain
<eam> >> File.open('/dev/zero').tap(&:read)
<ruboto> eam # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/479939)
rgrmatt has quit [Ping timeout: 246 seconds]
<eam> wheeee
justinweiss has joined #ruby
RegulationD has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
momomomomo has joined #ruby
toretore has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
rsc___ has joined #ruby
karapetyan has joined #ruby
ruby-lang250 has joined #ruby
SCHAAP137 has joined #ruby
<ruby-lang250> hello
skade has quit [Quit: Computer has gone to sleep.]
ruby-lang250 has quit [Client Quit]
imperator has joined #ruby
amclain has joined #ruby
cpup has joined #ruby
howdoicomputer has joined #ruby
karapety_ has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
norc has joined #ruby
norc is now known as Guest23257
<Guest23257> Hi. Is there
Guest23257 has left #ruby [#ruby]
acidrainfall has joined #ruby
<acidrainfall> Hey all. I'm creating a config file via .erb template, using an iterated hash value for each conf section
<acidrainfall> But the config expects integers to be non-quoted
<acidrainfall> and bools
<acidrainfall> So I did <% if value.is_a?(Integer) || value.is_a?(TrueClass) || value.is_a?(FalseClass) %>
jetpackjoe has joined #ruby
<acidrainfall> This works *perfectly* except for `max-wal-size = "104857600"`
<acidrainfall> Is 104857600 too big for int?
<apeiros> no
devoldmx has joined #ruby
jetpackjoe has quit [Client Quit]
<acidrainfall> Why would it not match (Integer) when all the others do?
minimalism has quit [Quit: leaving]
opencard has quit [Quit: opencard]
<apeiros> >> 121034823105342305812031481234 + 12475367385726466278212417
<ruboto> apeiros # => 121047298472728032278309693651 (https://eval.in/479968)
<acidrainfall> hahaha
<acidrainfall> ok
<hanmac> eam & adaedra i think you guys does like File::NULL too ;P
<adaedra> ?
<apeiros> acidrainfall: you probably have a string in there?
<hanmac> >> File::NULL
<ruboto> hanmac # => "/dev/null" (https://eval.in/479971)
<apeiros> i.e. you don't have it as an integer in your hash
<gregf_> >> 104857600 + 1
<ruboto> gregf_ # => 104857601 (https://eval.in/479973)
<acidrainfall> Hm
Jet4Fire has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
<acidrainfall> Oh weird that's not coming from yaml
jottr_ has joined #ruby
johnny56_ has joined #ruby
<acidrainfall> Oh I see, it's coming from default params. I'm doing a hash merge
aphprentice has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
<acidrainfall> and this is how it looks in the params: max-wal-size => 104857600,
norc has joined #ruby
<acidrainfall> So maybe my merge is actually turning it into a string...
hxegon has joined #ruby
<apeiros> um, it certainly doesn't look like that
opencard has joined #ruby
<apeiros> max-wal-size is not a valid bareword
<apeiros> and merge doesn't turn values into something
jottr has quit [Ping timeout: 245 seconds]
<acidrainfall> This is coming out of a puppet file
aryaching has quit [Ping timeout: 246 seconds]
<apeiros> but without meaningful information I won't be able to help.
<acidrainfall> it accepts max-wal-size...
devoldmx has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
<acidrainfall> apeiros: what do you need?
dmcp has quit [Ping timeout: 260 seconds]
demonlove has quit [Quit: Leaving]
<apeiros> code & inspects of the relevant values
Jet4Fire has quit [Ping timeout: 260 seconds]
threh has joined #ruby
<acidrainfall> There's the code at least
<acidrainfall> I'm not a ruby guy :/
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #ruby
Amnez777- has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
momomomomo has quit [Quit: momomomomo]
Amnez777 has quit [Ping timeout: 245 seconds]
n1x has joined #ruby
banister has joined #ruby
Amnez777 has joined #ruby
Amnez777 has quit [Changing host]
Amnez777 has joined #ruby
lkba has joined #ruby
aryaching has joined #ruby
edwinvdgraaf has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
Jet4Fire has joined #ruby
<acidrainfall> apeiros: am I supposed to quote those barewords?
<apeiros> acidrainfall: sorry, missed your paste. that first file is a puppet file you say?
<apeiros> ah, when you said "merge" you were not talking about ruby
<apeiros> I think you should take this to #puppet
rontec76 has joined #ruby
Amnez777- has quit [Ping timeout: 260 seconds]
<acidrainfall> I figured I had made a mistake in my erb file
<acidrainfall> sorry that was why I came here
<acidrainfall> I'll ask in Puppet thanks
<apeiros> yw
Jet4Fire has quit [Ping timeout: 246 seconds]
ledestin has joined #ruby
bronson has joined #ruby
benlieb has joined #ruby
<norc> >> Signal.trap(:SEGV)
<ruboto> norc # => can't trap reserved signal: SIGSEGV (ArgumentError) ...check link for more (https://eval.in/480010)
momomomomo has joined #ruby
<norc> Anyone know a hack from the top off their head how I can trap it regardless?
baweaver has joined #ruby
xfbs has quit []
jackjackdripper has joined #ruby
<eam> norc: you could always use FFI to wrap the libc calls
jessemcgilallen has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
<norc> eam: That will be difficult in eval.in :-)
<eam> I imagine SEGV is blocked because some implementations may use it -- like for example SEGV is used by the GC on java/jruby
colegatron has joined #ruby
<eam> if you watch a jvm you'll see it constantly segfaulting
<norc> Or maybe I can mmm
<norc> eam: Really?
<eam> yup, try it
solocshaw has quit [Ping timeout: 250 seconds]
aspiers has quit [Ping timeout: 246 seconds]
jottr_ has quit [Quit: WeeChat 1.3]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
Jet4Fire has joined #ruby
Eiam has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
zast has joined #ruby
mrtomme has quit [Ping timeout: 246 seconds]
jbrhbr has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
solocshaw has joined #ruby
mrtomme has joined #ruby
<acidrainfall> apeiros: Ok yeah it's a puppet problem, but now back to you
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<acidrainfall> puppet does turn it into a string, but I need it to be an integer in the file
nettoweb has joined #ruby
<norc> eam: Yeah I think I might. And just realized that eval.in does not come with FFI sadly.
<norc> eam: Which leaves me only with Fiddle to somehow achieve my goal.
Jet4Fire has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
freerobby has quit [Remote host closed the connection]
freerobby has joined #ruby
freerobby has quit [Client Quit]
freerobby has joined #ruby
freerobby has quit [Client Quit]
freerobby has joined #ruby
skade has joined #ruby
nyandoge has quit [Quit: Connection closed for inactivity]
Peg-leg has quit [Quit: Leaving.]
calderonroberto has joined #ruby
h99h9h88 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
rakm has joined #ruby
<acidrainfall> Basically if I have a string "100001111001" and I need to detect that what's inside the quotes is a valid int format, what's the best way? Regez?
<acidrainfall> Regex*
Luming has quit [Ping timeout: 245 seconds]
<jmonreal> jhass: how are you?
Jet4Fire has joined #ruby
<jhass> huh, why?
<jmonreal> just asking
<Papierkorb> acidrainfall: either a regex, or you can parse it with Integer(the_value) which raises if it's invalid
<acidrainfall> how would that look in if statement format?
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
h99h9h88 has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
Eiam_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saddad has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
bodgix has left #ruby [#ruby]
<lukeasrodgers> Integer(the_value) might incorrectly handle some cases, e.g. if you want to fail on '3000' because the_value should only be a binary string
philtr has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
<acidrainfall> oh
<acidrainfall> no that was just an example number
cmoneylulz has joined #ruby
rsc___ has quit [Quit: rsc___]
ec\_ has quit [Ping timeout: 260 seconds]
rsc___ has joined #ruby
<lukeasrodgers> i think Papierkorb is right then
Jet4Fire has joined #ruby
<acidrainfall> Papierkorb: hell yes
<acidrainfall> thanks
<Papierkorb> cheers
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
rgrmatt has joined #ruby
banister has joined #ruby
calderonroberto has quit [Quit: Leaving]
TeresaP has joined #ruby
<jmonreal> When I run this code https://bpaste.net/show/00df324e9578 without parameters works(without the parameters set) but when I set the parameters I get the error run.rb:41:in `block (2 levels) in parse': undefined method `<<' for nil:NilClass (NoMethodError)
<jmonreal> what am I doing wrong?
<jmonreal> and I am setting just one parameter
<gregf_> >> nil << foo
<ruboto> gregf_ # => undefined local variable or method `foo' for main:Object (NameError) ...check link for more (https://eval.in/480025)
<gregf_> >> nil << "foo"
<ruboto> gregf_ # => undefined method `<<' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/480026)
rehat has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
<eam> be aware, Integer() and to_i use different rules - eg "0123" will differ in value
<TeresaP> If I want to embed a module within a class and that module contains a class variable I want to access, how do I get to it? I tried setting attr_accessor to the variable but no dice.
<TeresaP> How do I get to it from outside the class, I mean
colleenmcguckin has joined #ruby
c0m0 has quit [Ping timeout: 250 seconds]
h99h9h88 has joined #ruby
rgrmatt has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
<acidrainfall> Papierkorb: lukeasrodgers: run: parse config: Type mismatch for 'run.Config.data': Type mismatch for 'tsdb.Config.max-wal-size': Expected integer but found 'string'.
<acidrainfall> Oh
<acidrainfall> Dangit
<acidrainfall> Detail: can't convert false into Integer
<acidrainfall> So it's performing an action, not asking a questino
<acidrainfall> questino*
<acidrainfall> UGH
momomomomo has quit [Quit: momomomomo]
<acidrainfall> whatever. Should I do `integer(value)?` ?
g3funk is now known as braidn
<shevy> all those cute little questinos
<TeresaP> .to_i?
<acidrainfall> Oh would that work too?
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<acidrainfall> No
h99h9h88 has quit [Remote host closed the connection]
<acidrainfall> Detail: can't convert false into Integer
<acidrainfall> Stupid clipboard
<acidrainfall> Detail: undefined method `to_i?' for false:FalseClass
DoubleMalt has quit [Ping timeout: 260 seconds]
<TeresaP> Oh you're trying to convert a boolean
<acidrainfall> No
<acidrainfall> I'm trying to check for integers
<acidrainfall> But some of the integers (because fuck puppet that's why) come in as strings
<TeresaP> bool_val ? 1 : 0
<acidrainfall> So doing .is_a(Integer)? doesn't work
<acidrainfall> That's the source data
<acidrainfall> I need to detect bool and int, and place them in the template file unquoted
<acidrainfall> Everything else gets quoted
diegoviola has joined #ruby
<lukeasrodgers> i would probably just do .to_i and rescue NoMethodError
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<lukeasrodgers> do you want to handle false, or ignore it?
<TeresaP> shevy do you have an answer for my lame question by any chance? :)
<acidrainfall> lukeasrodgers: Well, I am handling booleans
RegulationD has quit [Ping timeout: 246 seconds]
`based_pdev` has joined #ruby
kirun has joined #ruby
karapetyan has quit [Remote host closed the connection]
<acidrainfall> lukeasrodgers: http://fpaste.org/297141/67106144/
RegulationD has joined #ruby
karapetyan has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> TeresaP hmm
bryancp has quit [Ping timeout: 264 seconds]
<shevy> TeresaP with class variables you mean @@foo ?
Azulinho has quit [Ping timeout: 260 seconds]
bryancp has joined #ruby
solocshaw has quit [Remote host closed the connection]
based_pdev_ has quit [Ping timeout: 245 seconds]
iateadonut has quit [Ping timeout: 246 seconds]
shanemcd has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
opencard has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
solocshaw has joined #ruby
<TeresaP> @foo
<shevy> ok
<acidrainfall> I'm just going to do a match I think
<shevy> the simplest way is to just use methods to access/query/set it
<TeresaP> So that's my mistake probably
ItSANgo_ has quit [Quit: Leaving...]
j0bk has joined #ruby
<TeresaP> because that's an instance variable
Ox0dea has joined #ruby
arup_r has quit []
SirCmpwn has joined #ruby
<shevy> so say you h ave: class Foo; module Bar; end; end; if you have @yo in Bar, you could add a Bar.yo method to return it, and just keep on using that method invocation
<Ox0dea> Alternatively, use #instance_variable_get.
<shevy> so in principle, that is the same as when you define instance methods on your class, you just define it via a: def self.yo
<TeresaP> attr_reader wouldn't expose it then?
<Ox0dea> It would.
hahuang61 has joined #ruby
peterhil_ has quit [Ping timeout: 260 seconds]
<shevy> you can if you call it on the right variant, e. g. self.instance_eval { }
platzhirsch has left #ruby [#ruby]
<Ox0dea> TeresaP: Oh, sorry, no, not for module-level instance variables.
cmoneylulz has quit [Remote host closed the connection]
<TeresaP> Ox0dea if I change it to @@foo, it doesn't seem to affect it either
<Ox0dea> >> module M; @v = 42; singleton_class.send :attr_reader, :v; end; M.v # TeresaP
<ruboto> Ox0dea # => 42 (https://eval.in/480033)
ec\ has joined #ruby
<Ox0dea> That could also have been `class << self; attr_reader :v; end`, but the principle is the same.
<TeresaP> Hmm I was hoping to be able to call it like UpdateContent::Operation.modify_entity
<Ox0dea> So what you actually want is a singleton method?
darkf has quit [Quit: Leaving]
<Ox0dea> How did class and instance variables become involved?
brunto has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
nertzy has joined #ruby
<TeresaP> I just want to set some options for a user that happen to map to strings
shanemcd has joined #ruby
jbrhbr has quit [Quit: Leaving.]
toretore has joined #ruby
p8952 has left #ruby ["Leaving"]
casadei has quit [Remote host closed the connection]
<shevy> TeresaP just stick to @foo anyway
<shevy> and you can do the above
DoubleMalt has joined #ruby
<TeresaP> Thanks shevy
shanemcd has quit [Remote host closed the connection]
<Ankhers> This works, but is there a more ruby way of doing this? http://lpaste.net/146427
<Ox0dea> TeresaP: Don't you have many of these variables?
simplyia_ has quit [Remote host closed the connection]
simplyianm has joined #ruby
shadoi has joined #ruby
<Ankhers> Ox0dea: That isn't order dependent. It is calling a login function and I don't want to write the same test N times for each user type.
<norc> Ox0dea: You probably have the most experience at segfaulting eval.in - why doesn't the standard sigsegv handler kick in?
p0wn3d has joined #ruby
<norc> >> Signal.kill(:SEGV, $$)
xfbs has joined #ruby
<ruboto> norc # => undefined method `kill' for Signal:Module (NoMethodError) ...check link for more (https://eval.in/480046)
<norc> >> Process.kill(:SEGV, $$)
<ruboto> norc # => (https://eval.in/480047)
sucks has joined #ruby
moeSeth has quit [Quit: Connection closed for inactivity]
<Ox0dea> norc: Couldn't say. :/
toretore has quit [Quit: Leaving]
<norc> >> require 'fiddle'; Fiddle::Pointer.new(1)[0]
<ruboto> norc # => /tmp/execpad-36d2418e1cce/source-36d2418e1cce:2: [BUG] Segmentation fault at 0x000001 ...check link for more (https://eval.in/480048)
testBot_1234_932 has joined #ruby
testBot_1234_932 has quit [Read error: Connection reset by peer]
<norc> Just to show that it does have a handler somewhere.
jbrhbr has joined #ruby
<Ox0dea> Because I've never seen an eval.in segfault? :P
<Ox0dea> I suppose it might be to do with however Charlie is sandboxing the execution.
<norc> Looking at my initial reason for asking you... :D
waynerade has joined #ruby
jpfuentes2 has joined #ruby
<Ox0dea> But really, sending SIGSEGV and actually hitting a segfault aren't quite the same operation.
snockerton has joined #ruby
<TeresaP> Ox0dea yes one of them has a bunch
<norc> Ox0dea: When you trigger an access violation the kernel just sends a SIGSEGV to the process.
<Ox0dea> TeresaP: And you intend to take shevy's "advice" and write a bunch of explicit accessors?
goodcodeguy has joined #ruby
InvGhostt has joined #ruby
Lorn has joined #ruby
<norc> Ox0dea: So I don't see how they are not.
roshanavand has joined #ruby
<Ox0dea> norc: What sort of reporting could such a "fake" segfault do?
toretore has joined #ruby
<TeresaP> Ox0dea It would be ugly, but I'm considering it.
<norc> Ox0dea: The same as usual. Break execution, show you the current stack trace, registers.
<TeresaP> I suppose I could move the modules out of the class as well
InvGhosttt has joined #ruby
<Ox0dea> norc: Aye, but where did the fault occur?
brunto_ has joined #ruby
<eam> Ox0dea: you can allocate more memory and then re-run the problematic code
<eam> boom fixed it
InvGhost has quit [Ping timeout: 260 seconds]
<norc> Ox0dea: I have no idea. I mean in a regular access violation a cpu interrupt makes this easy.
smokey has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
<norc> Ox0dea: All I know is that all Ruby implementations I have tried produce the regular Bug/Seg Fault screen when you manually send SIGSEGV
<norc> Except eval.cin
bot_9474 has joined #ruby
myztic has quit [Quit: leaving]
test_5443 has joined #ruby
<eam> norc: perhaps eval.in masks it
Mon_Ouie has joined #ruby
<eam> scratch that, it's not ignorable
myztic has joined #ruby
shanemcd has joined #ruby
InvGhostt has quit [Ping timeout: 264 seconds]
gaussblurinc1 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<agent_white> Does segfault raise a "fatal" exception?
<eam> it can be handled
sandstrom has joined #ruby
<eam> some memory allocators work by waiting for a segv, then increasing address space
ascarter has joined #ruby
<eam> the java JVM does this
test_5443 has quit [Read error: Connection reset by peer]
bot_9474 has quit [Read error: Connection reset by peer]
TeresaP is now known as _TeresaP
smokey has quit [Read error: Connection reset by peer]
<eam> (maybe not exactly like that, but it regularly faults during operation)
myztic has quit [Client Quit]
TeresaP has joined #ruby
yardenbar has joined #ruby
sucks has quit [Ping timeout: 246 seconds]
<norc> eam: Out of all the signals, why use SEGV for that though?
dionysus69 has joined #ruby
baweaver has quit [Remote host closed the connection]
<eam> because that's the signal you get when you reference outside your address space
fantazo has joined #ruby
testBot_1234_620 has joined #ruby
testBot_1234_620 has quit [Read error: Connection reset by peer]
<eam> norc: imagine for example you have a braindead simple allocator that just uses sbrk() to increase the data segment size
<eam> and a stack machine
jmonreal has left #ruby [#ruby]
Wsewolod has quit [Quit: Leaving]
craysiii has joined #ruby
<eam> you just go nuts and when you segv because you went outside the data segment you call sbrk() which makes it bigger, then keep going
n1x has quit [Read error: Connection reset by peer]
bot_4173 has joined #ruby
InvGhosttt has quit [Ping timeout: 264 seconds]
jackjackdripper has joined #ruby
nixmaniack has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
test_9182 has joined #ruby
_TeresaP has quit [Ping timeout: 252 seconds]
`based_pdev` has quit [Read error: Connection reset by peer]
<apeiros> acidrainfall: got your question answered?
<apeiros> TeresaP: got your question answered?
`based_pdev` has joined #ruby
<norc> eam: Oh well, I guess it could greatly simplify the allocation process
roshanavand has quit [Ping timeout: 260 seconds]
testBot_1234_920 has joined #ruby
testBot_1234_920 has quit [Read error: Connection reset by peer]
<shevy> you people got your question answered!!!
myztic has joined #ruby
yardenbar has quit [Ping timeout: 246 seconds]
shanemcd has quit [Remote host closed the connection]
revengeofbigd has joined #ruby
testBot_1234_678 has joined #ruby
testBot_1234_678 has quit [Read error: Connection reset by peer]
tulak has joined #ruby
tulak has quit [Remote host closed the connection]
<acidrainfall> Hahaha
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
<acidrainfall> apeiros: yes thank you, it took ` if ( value =~ /^[\d]+$/ ) || value.is_a?(Integer) || value.is_a?(TrueClass) || value.is_a?(FalseClass) || value.is_a?(Float)`
<acidrainfall> but it works
<acidrainfall> For some reason the regex was still missing some integers, even though they were perfectly formatted. I give up.
<acidrainfall> Trying to debug puppet is just... no.
<apeiros> [\d] is a verbose way to say \d ;-)
testBot_83753_77 has joined #ruby
testBot_83753_77 has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
<acidrainfall> old habits die hard
Jardayn has quit [Read error: Connection reset by peer]
<acidrainfall> I'll be damned if I have to do another :%s/// command today
<acidrainfall> lol
towski_ has quit [Remote host closed the connection]
atomical has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
atomical_ has quit [Ping timeout: 245 seconds]
testBot_83753 has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
johnzorn has quit [Ping timeout: 245 seconds]
xfbs has quit []
spider-mario has joined #ruby
weaksauce has joined #ruby
Puppet` has joined #ruby
shanemcd has joined #ruby
calderonroberto has joined #ruby
geekbri has quit []
<norc> acidrainfall: You can simply case when for it though.
<acidrainfall> The single if kinda did it
<acidrainfall> It's only two cases
<acidrainfall> If string or if not
<acidrainfall> but like I said, some integer values were being turned into strings by puppet, which was a problem
<norc> >> case "3" when /^[\d]+$/, Integer, TrueClass, FalseClass, Float then true else false end
<ruboto> norc # => true (https://eval.in/480051)
<acidrainfall> What differentiates that from an if?
<norc> acidrainfall: Reads a bit easier when you indent it nicely than a large convoluted if (exp) || (exp) || (exp)
<acidrainfall> Oh
<norc> using is_a? here, and =~ here
<acidrainfall> neat, I'll swap it then
<acidrainfall> you're right it is easier
rgrmatt has joined #ruby
tildes has joined #ruby
<norc> acidrainfall: https://eval.in/480054
dionysus69 has quit [Quit: dionysus69]
<norc> Also naming it test isn't probably the brightest idea. :-)
nixmaniack has quit [Read error: Connection reset by peer]
Ishido has quit [Ping timeout: 246 seconds]
krz has quit [Ping timeout: 245 seconds]
n1x has joined #ruby
rgrmatt has quit [Ping timeout: 260 seconds]
zast has quit [Remote host closed the connection]
testBot_83753 has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
jessemcgilallen has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
<Ankhers> http://lpaste.net/146428 -- normally I would want to call each of these functions lazily. What is the suggested approach in Ruby?
waynerade has quit []
<adaedra> Ankhers: idea you can use: You can use &ri:Object#public_send to call a method dynamically.
<`derpy> Ankhers: method `Object#public_send`: Invokes the method identified by _symbol_, passing it any arguments specified. U… • http://rubydoc.info/stdlib/core/Object#public_send-instance_method
h99h9h88 has joined #ruby
<Ankhers> adaedra, `derpy: Thanks. I will look into that.
shanemcd has quit [Remote host closed the connection]
sucks has joined #ruby
baweaver has joined #ruby
shanemcd has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 264 seconds]
gaussblurinc1 has quit [Quit: Leaving.]
roshanavand has joined #ruby
testBot_83753 has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
testBot_83753_25 has joined #ruby
testBot_83753 has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
testBot_83753_25 has quit [Read error: Connection reset by peer]
KensoDev has joined #ruby
tulak has joined #ruby
shanemcd has quit [Remote host closed the connection]
<norc> Seeing how the entire method dispatch uses .send, why do we have Method#call at all?
h99h9h88 has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
baweaver has quit [Remote host closed the connection]
<adaedra> To have a standard way of calling things
<adaedra> We define a callable object as something that responds to call (hello duck typing)
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juddey has joined #ruby
atomical has joined #ruby
zeroDivisible has joined #ruby
<norc> adaedra: That makes sense to me when thinking about JavaScript where functions are first class objects.
<norc> "callable objects" is not something I have heard of in Ruby though.
dlitvak has quit [Remote host closed the connection]
<norc> Are there parts in the stdlib that invoke obj.call ?
BlackCoyote has joined #ruby
Ishido has joined #ruby
Xeago has quit [Remote host closed the connection]
<norc> Oh wait.
<norc> Damn. Procs. Lambda.
<norc> adaedra: So that basically gives me a unified interface to take a proc, lambda or a method and call it.
<agent_white> >> def is_this_the_krusty_krab?; "No. This is Patrick."; end
<ruboto> agent_white # => :is_this_the_krusty_krab? (https://eval.in/480069)
<adaedra> Procs, lambdas, methods, boundmethods, and everything that has call.
tvon has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
cmoneylulz has joined #ruby
Puppet` has quit [Read error: Connection reset by peer]
<norc> Alright.
<norc> adaedra: And that brings us back to the topic from earlier today (or yesterday?) about .()
<norc> Which now makes sense to me.
marcosantoniocar has joined #ruby
<norc> >> proc{ |a| puts a }.(1)
<ruboto> norc # => 1 ...check link for more (https://eval.in/480070)
<norc> That actually looks a ton more beautiful than with #call. :)
<norc> Or just callable.(1)
calderonroberto has quit [Ping timeout: 246 seconds]
Puppet` has joined #ruby
<apeiros> I don't like it
<adaedra> I just wonder though.
<apeiros> but I didn't like ->{} either, and now I use it
<apeiros> so I guess I'll get used to it.
testBot_83753 has joined #ruby
cschneid_ has joined #ruby
testBot_83753_80 has joined #ruby
testBot_83753 has quit [Read error: Connection reset by peer]
testBot_83753_80 has quit [Read error: Connection reset by peer]
brunto_ has quit [Ping timeout: 246 seconds]
<adaedra> >> a = []; def [].call(*); end; def z; yield; end; z &a
<ruboto> adaedra # => /tmp/execpad-6ff5a989b13b/source-6ff5a989b13b:2: syntax error, unexpected '.', expecting ';' or '\n' ...check link for more (https://eval.in/480071)
testBot_83753 has joined #ruby
<adaedra> what did I do
bluOxigen has quit [Ping timeout: 246 seconds]
testBot_83753_92 has joined #ruby
testBot_83753 has quit [Read error: Connection reset by peer]
testBot_83753_92 has quit [Read error: Connection reset by peer]
<adaedra> What is this
bluOxigen has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
jessemcgilallen has joined #ruby
testBot_83753 has joined #ruby
calderonroberto has joined #ruby
testBot_83753_50 has joined #ruby
testBot_83753_50 has quit [Read error: Connection reset by peer]
testBot_83753 has quit [Read error: Connection reset by peer]
ibouvousaime has joined #ruby
<adaedra> >> a = []; def a.call(*); end; def z; yield; end; z &a # duh
<ruboto> adaedra # => wrong argument type Array (expected Proc) (TypeError) ...check link for more (https://eval.in/480072)
pwnd_nsfw has joined #ruby
<adaedra> ok, that's what I was thinking.
minimalism has quit [Quit: leaving]
<apeiros> adaedra: you want to_proc, not call
<adaedra> apeiros: no, I did exactly what I wanted. I wanted to see if having #call was sufficient to consider it passable as &arg, but I expected it to be restricted to Procs.
<apeiros> >> a = []; def a.to_proc(*); ->{}; end; def z; yield; end; z &a
<ruboto> apeiros # => nil (https://eval.in/480073)
<apeiros> I see
<adaedra> I guess defining to_proc to `method(:call)` would do the trick to make it work.
atomical_ has joined #ruby
myztic has quit [Ping timeout: 246 seconds]
<apeiros> might, may have to do the .to_proc yourself, though
shanemcd has joined #ruby
calderonroberto has quit [Ping timeout: 246 seconds]
dstarh has joined #ruby
dimik has joined #ruby
JDiPierro has joined #ruby
<apeiros> return of the wizards
sandstrom has quit [Quit: My computer has gone to sleep.]
maloik has joined #ruby
minimalism has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
grotewold has joined #ruby
tvon has joined #ruby
bluOxigen has joined #ruby
fabrice31 has joined #ruby
s00pcan has quit [Ping timeout: 260 seconds]
s00pcan has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
tvon has quit [Client Quit]
yqt has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
shanemcd has quit [Remote host closed the connection]
NeverDie has quit [Quit: http://radiux.io/]
nettoweb has joined #ruby
shanemcd has joined #ruby
SolarSailor has joined #ruby
<TeresaP> apeiros kindof
<TeresaP> basically I need to either create a whole bunch of functions to return strings or pull the modules out of my class
yardenbar has joined #ruby
fantazo has quit [Quit: Verlassend]
baweaver has quit [Ping timeout: 260 seconds]
gusTester has quit [Quit: Leaving.]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Client Quit]
benlieb_ has joined #ruby
atomical_ has quit [Ping timeout: 260 seconds]
towski_ has joined #ruby
benlieb has quit [Ping timeout: 246 seconds]
benlieb_ is now known as benlieb
ta has joined #ruby
gaussblurinc1 has joined #ruby
atomical has joined #ruby
solocshaw has quit [Remote host closed the connection]
test has joined #ruby
solocshaw has joined #ruby
shanemcd has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
test is now known as Guest47994
yardenbar has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
stannard has joined #ruby
blarghlarghl has left #ruby [#ruby]
othll0 has quit [Read error: Connection reset by peer]
yardenbar has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
duncannz has joined #ruby
stannard_ has quit [Ping timeout: 245 seconds]
p0wn3d has quit [Ping timeout: 246 seconds]
cjbottaro has joined #ruby
othll0 has joined #ruby
bot_4173 has quit [Read error: Connection reset by peer]
test_9182 has quit [Read error: Connection reset by peer]
Guest47994 has quit [Read error: Connection reset by peer]
grotewold is now known as grotewold[afk]
sandstrom has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
towski_ has quit [Remote host closed the connection]
p0wn3d has joined #ruby
Jet4Fire has joined #ruby
testBot has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
testetset has joined #ruby
ixti has joined #ruby
codecop has joined #ruby
testBot is now known as Guest41267
Guest41267 has quit [Read error: Connection reset by peer]
grotewold[afk] is now known as grotewold
testetesteteste has joined #ruby
shanemcd has joined #ruby
testetesteteste has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 260 seconds]
testetset has quit [Client Quit]
mooe has joined #ruby
momomomomo has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
NeverDie has joined #ruby
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
Jet4Fire has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
elton has joined #ruby
yfeldblum has joined #ruby
p0wn3d has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Client Quit]
IrishGringo has joined #ruby
Jet4Fire has joined #ruby
p0wn3d has joined #ruby
djbkd has joined #ruby
jbrhbr has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 246 seconds]
codecop has quit [Remote host closed the connection]
agit0 has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
duckpuppy has joined #ruby
Encapsulation has joined #ruby
elton has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
Jet4Fire has joined #ruby
Gadgetoid has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 260 seconds]
grotewold is now known as grotewold[afk]
kadoppe has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
VStestat has joined #ruby
testetest has joined #ruby
<testetest> hey
skweek has quit [Ping timeout: 260 seconds]
<blub> hi testetest
weemsledeux has quit [Max SendQ exceeded]
Azulinho has joined #ruby
VStestat has quit [Read error: Connection reset by peer]
testetest has quit [Client Quit]
kies has joined #ruby
kadoppe has joined #ruby
baweaver has joined #ruby
al2o3-cr has joined #ruby
mary5030_ has joined #ruby
Jet4Fire has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
ruid has quit [Ping timeout: 246 seconds]
mobson has joined #ruby
<mobson> why am I getting a negative argument error
<mobson> a= (updist < downdist) ? (('+'*updist)) : (('-'*downdist))
momomomomo has quit [Quit: momomomomo]
<blub> im guessing either updist or downdist is negative
<blub> why do you have so many brackets
<havenwood> >> '' * -1
<ruboto> havenwood # => negative argument (ArgumentError) ...check link for more (https://eval.in/480092)
sdwrage has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
IrishGringo has quit [Ping timeout: 245 seconds]
<TeresaP> Well that was dumb. I forgot modules with constants can be accessed with Module::CONSTANT so I don't have to go through making functions to return the strings.
chocho has quit [Ping timeout: 245 seconds]
othll0 has quit [Read error: Connection reset by peer]
sucks_ has joined #ruby
chocho has joined #ruby
uri has joined #ruby
Wsewolod has joined #ruby
gusTester has joined #ruby
whippythellama has quit [Ping timeout: 264 seconds]
<acidrainfall> norc: you'll have to explain what you wrote
Jet4Fire has joined #ruby
<acidrainfall> You're defining a function?
<acidrainfall> Interesting... that is way smarter
* acidrainfall doesn't think like a programmer :(
<norc> acidrainfall: Just don't name it test. Please. :-P
<acidrainfall> Hahahahaha
<acidrainfall> ok
tvw has joined #ruby
kies has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sucks has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<norc> acidrainfall: I'm just using the fact that case compares its object using === knowing that Regexp#=== ends up calling =~ # the whole construct was done to do something exactly like my snippet. Well or maybe with multiple when switches.
<norc> Or let me correct myself it does not end up calling =~ - but it does about the same thing.
Jet4Fire has quit [Ping timeout: 260 seconds]
<acidrainfall> What's significant about ===?
weemsledeux has joined #ruby
<norc> acidrainfall: It is the operator used for case/when :-)
skade has joined #ruby
based_pdev_ has joined #ruby
<acidrainfall> Oh
<norc> acidrainfall: For a Class (like Fixnum) it checks whether the object is a kind of that class. For a Regexp (like /\d/) it tests whether the object matches against that Regexp.
<norc> For symbols/fixnums/strings it tests for equality
<norc> For a range it tests whether its inside
<norc> etc.
<norc> Basically whatever makes most sense for case/when
<acidrainfall> Oh I see
<acidrainfall> That's actually really nice
grotewold[afk] is now known as grotewold
Azulinho has quit [Ping timeout: 245 seconds]
<norc> Generally there never is a reason to call it directly. If you ever see code like Class === object # throw it away.
jessemcgilallen has quit [Read error: Connection reset by peer]
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acidrainfall> hahahahaha
<acidrainfall> duly noted
luigi has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
Azulinho has joined #ruby
<luigi> hi all
`based_pdev` has quit [Ping timeout: 245 seconds]
opencard has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
akem has joined #ruby
<luigi> I'm writing a C ruby extension, but I'm not sure how garbage collection works
opencard has quit [Remote host closed the connection]
<norc> luigi: mark and sweep.
nertzy has joined #ruby
<luigi> I have this snippet of code: VALUE obj = rb_class_new_instance(0, NULL, <class name>);
al2o3-cr has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
naftilos76 has joined #ruby
<luigi> if I just keep obj variable in the C side, without assigning it to any Ruby variables, is it gonna be automatically garbage collected?
<luigi> how would I prevent that?
duckpuppy has quit [Ping timeout: 260 seconds]
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
<norc> luigi: rb_gc_mark
Jet4Fire has quit [Ping timeout: 260 seconds]
sankaber has quit [Remote host closed the connection]
Hounddog has quit [Remote host closed the connection]
<luigi> norc: thanks! so obj would be collected only when the ruby program terminates?
rehat has quit [Ping timeout: 246 seconds]
<luigi> is there also a way to signal ruby that it's time to collect obj? something like rb_gc_unmark ?
NeverDie has quit [Quit: http://radiux.io/]
<norc> luigi: Just remember you have to wrap your object with Data_Wrap_Struct
momomomomo has joined #ruby
akem has quit [Remote host closed the connection]
kies has joined #ruby
revengeofbigd has quit [Quit: Connection closed for inactivity]
sankaber has joined #ruby
duckpuppy has joined #ruby
tvw has quit []
myztic has joined #ruby
<luigi> norc: thanks!
<acidrainfall> Say I want to print $key = '$value'
<acidrainfall> would puts "$key = '$value'" not print value because single quotes?
<acidrainfall> Or are the single quotes quoted?
<norc> This article might be of interest to you.
Azulinho has quit [Ping timeout: 246 seconds]
<acidrainfall> I guess I should probably just write a test script
<norc> acidrainfall: This is not Perl.
nofxx has quit [Ping timeout: 245 seconds]
<acidrainfall> hahaha well that's why I was afraid
<acidrainfall> The last language I worked in that was like Ruby was perl a long time ago
<acidrainfall> "long time" being like a couple years
<Ankhers> acidrainfall: puts "#{key} = '#{value}'" should be fine.
<acidrainfall> but I'm out of therapy now
<acidrainfall> Oh, not $?
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
ItSANgo has joined #ruby
<norc> acidrainfall: $ as a prefix is a reference to a global variable.
cdg has joined #ruby
<Ankhers> $ is used in PHP, perl and I'm sure a couple others.
<norc> Ankhers: Ruby too. :-)
<Ankhers> Right, I forgot about global vars. I avoid those.
Jet4Fire has joined #ruby
<norc> Ankhers: There are some useful ones out there like $LOADED_FEATURES for example
<luigi> norc: great, thanks!
<Ankhers> norc: I agree they can be useful. I just don't put everything into a global var.
<norc> Ankhers: Or $$, $!
<acidrainfall> oh interesting
<acidrainfall> #{} then
<acidrainfall> Puppet uses $
<acidrainfall> I figured it was a ruby convention
alakra has quit [Ping timeout: 245 seconds]
Pupp3tm4st3r has joined #ruby
<Ankhers> acidrainfall: Only within double quotes though.
NeverDie has joined #ruby
<acidrainfall> right
<acidrainfall> that much is pretty standard
<Ankhers> "#{var}" works, '#{var}' does not.
aspiers has joined #ruby
<norc> >> %Q{#{1+1}}
<ruboto> norc # => "2" (https://eval.in/480096)
<norc> This works too. :)
nixmaniack has joined #ruby
<acidrainfall> So #{} is what, an evaluate?
<acidrainfall> like $() in bash?
<norc> acidrainfall: No. It is just string interpolation.
<norc> acidrainfall: It is the same as "%s" % (1+1) (which is another form of string interpolation.
<acidrainfall> That's how my friend writes python
<acidrainfall> I hate it
n1x has quit [Ping timeout: 245 seconds]
<acidrainfall> it's just %s %s %s %s
<acidrainfall> lol
<acidrainfall> or whatever the python convention is
<acidrainfall> Why do it that way, out of curiosity?
yardenbar has joined #ruby
<Ankhers> acidrainfall: I've seen people do that in quite a few languages. It becomes really hard to understand what is happening.
Jet4Fire has quit [Ping timeout: 246 seconds]
<norc> acidrainfall: Generally I follow the guideline that single interpolation is done with #{} - anything more and I use the % syntax.
<norc> (Or when I need formatting)
<acidrainfall> When you say single interpolation
alakra has joined #ruby
<norc> You can also to named string interpolation
<acidrainfall> you mean as opposed to ${((1+1)+6)*2} ?
rgrmatt has joined #ruby
<norc> >> "Hello %{user} size %{foo}" % {user: "norc", foo: 1}
<ruboto> norc # => "Hello norc size 1" (https://eval.in/480098)
<norc> Not very common, but pretty elegant.
Vitor_ has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
<norc> acidrainfall: Nah more like "str #{exp} morestr #{another exp}"
<acidrainfall> So, what I'm doing
<acidrainfall> you'd use %s for
luigi has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
whippythellama has joined #ruby
<norc> acidrainfall: think Kernel#sprintf
<acidrainfall> yeah that's what it reminds me of
<acidrainfall> Ruby is quite different from any other language I've scripted in
<acidrainfall> It's fun to learn
nixmaniack has quit [Remote host closed the connection]
<norc> acidrainfall: The important bit is that with String interpolation "#{a}" you are still in the same execution scope around the string
<norc> So something like this is possible>
nomadicoder has quit []
<norc> >> @foo = "world"; puts "hello #{@foo}"
<ruboto> norc # => hello world ...check link for more (https://eval.in/480099)
grilled-cheese has joined #ruby
cpup has quit [Ping timeout: 246 seconds]
myztic has quit [Quit: leaving]
Jet4Fire has joined #ruby
rgrmatt has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
momomomomo has quit [Quit: momomomomo]
<norc> >> >> arr = [[1],[2,3]]; puts "blah: #{arr.map(&:length) }
<ruboto> norc # => /tmp/execpad-e6b8817800e8/source-e6b8817800e8:2: syntax error, unexpected >> ...check link for more (https://eval.in/480102)
<norc> >> arr = [[1],[2,3]]; puts "blah: #{arr.map(&:length) }
<ruboto> norc # => blah: [1, 2] ...check link for more (https://eval.in/480103)
Xeago has quit [Ping timeout: 245 seconds]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
myztic has joined #ruby
Encapsulation has quit [Ping timeout: 245 seconds]
B1n4r10 has quit [Ping timeout: 245 seconds]
Pupp3tm4st3r has joined #ruby
Guest82752 has quit [Quit: This computer has gone to sleep]
Jet4Fire has quit [Ping timeout: 260 seconds]
h99h9h88 has joined #ruby
cpup has joined #ruby
bkxd has joined #ruby
dlitvak has joined #ruby
fabrice31 has quit []
momomomomo has joined #ruby
dlitvak has quit [Remote host closed the connection]
Encapsulation has joined #ruby
tildes has joined #ruby
<naftilos76> Hi everyone, i am using tcpsocket/server but couldn't find any examples about enabling ssl com. Can anybody help me?
yfeldblum has quit [Ping timeout: 260 seconds]
RobertBirnie has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
rgtk has joined #ruby
opencard has joined #ruby
<norc> And that
devoldmx has joined #ruby
SenpaiSilver has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
j0bk has quit [Ping timeout: 245 seconds]
dlitvak has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
j0bk has joined #ruby
Encapsulation has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diego2 has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
rontec76 has quit [Ping timeout: 260 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
ethe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 246 seconds]
Jackneill has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 260 seconds]
quaristice has joined #ruby
ethe has joined #ruby
h99h9h88 has quit [Ping timeout: 260 seconds]
nhhagen has joined #ruby
skweek has joined #ruby
nhhagen has quit [Remote host closed the connection]
Xeago has joined #ruby
nhhagen has joined #ruby
lkba has quit [Read error: Connection reset by peer]
akem has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
cmoneylulz has joined #ruby
Xeago has quit [Remote host closed the connection]
maloik has joined #ruby
roshanavand has joined #ruby
Azulinho has joined #ruby
<naftilos76> norc, thanks but i need something more elaborating with examples where i can easily substitute values and strings to match my case. I do not enough experience with ssl internals to know the how-tos
<naftilos76> have
ta has quit [Remote host closed the connection]
linduxed has quit [Quit: WeeChat 1.3]
maloik has quit [Ping timeout: 260 seconds]
cashnguns has joined #ruby
Xeago has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
maloik has joined #ruby
<norc> naftilos76: Have you considered learning it maybe?
<naftilos76> norc, it is very low in my priorities list right now :)
<norc> naftilos76: So your time is more valuable than ours? :-)
SCHAAP137 has quit [Quit: Leaving]
kies has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
Xeago has quit [Remote host closed the connection]
roxtrongo has joined #ruby
h99h9h88 has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
bigkevmcd has quit [Ping timeout: 260 seconds]
<naftilos76> norc, absolutely not, no offence. It is just that i am struggling on a project that will hopefully help me get a job or even better customers
<norc> naftilos76: The job cannot be that important to you, if learning what you are doing is very low on your priorities.
maloik_ has joined #ruby
jpfuentes2 has joined #ruby
momomomomo has quit [Quit: momomomomo]
nospam has joined #ruby
djstorm has quit [Ping timeout: 260 seconds]
<nospam> is programming while high a good idea?
<norc> nospam: TIAS.
<naftilos76> norc, learning is everything to me but i have to comprimise and prioritise!
h99h9h88 has quit [Remote host closed the connection]
<norc> naftilos76: If its crucial to your job, but understanding it very low on your priorities, then you must enjoy your current state.
roshanavand has quit [Ping timeout: 260 seconds]
<nospam> norc: What is a TIAS?
<norc> nospam: Try it and see. ;-)
maloik has quit [Ping timeout: 246 seconds]
<nospam> i just did a line of coke behind my manager's back
<norc> Note: You may want to do the review after sobering up before assessing your findings.
<nospam> she turned around when i was snorting and i told her i had to sneeze
<nospam> i'm so high right now
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
<apeiros> ?ot nospam
<ruboto> nospam, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<norc> naftilos76: Sorry we don't work for you here. You will have to hire somebody for that.
<norc> I should know, I have buggered apeiros with enough questions that I could have solved myself - now I spend the bulk of my time in the corner - in shame.
<naftilos76> norc, you are being absurd. I ased for a link if handy.
<naftilos76> asked
mary5030_ has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> norc: you did? and you do?
sdwrage has quit [Quit: This computer has gone to sleep]
<baweaver> naftilos76: we're not here to enable your bad habit
<norc> apeiros: Okay, I may have lied about one part of that sentence.
nhhagen has quit [Ping timeout: 246 seconds]
rodfersou has quit [Quit: leaving]
<naftilos76> baweaver, bad habit? What are you talking about?
grotewold has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
momomomomo has joined #ruby
<norc> naftilos76: You are asking us to spoonfeed you with the resources to just replace your values because its crucial for your job.
<baweaver> ^
<naftilos76> ok i get it
<grilled-cheese> Can you write a class which contains another class?
<norc> grilled-cheese: Yes.
<Sou|cutter> yes
haylon has quit [Quit: Leaving]
ismaelga has joined #ruby
<norc> >> class Foo; class Bar; end; end; Foo::Bar.new
<ruboto> norc # => #<Foo::Bar:0x407a3f74> (https://eval.in/480110)
<grilled-cheese> so you can have a fancy container class which contains a validating member class
<norc> grilled-cheese: ^=
<grilled-cheese> cool
<baweaver> normally the container is a module
<norc> grilled-cheese: If you say "container class" you probably want a module.
BlackCoyote has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<grilled-cheese> I basically need a container class to hold an array of a class and to perform some aggregating functions on it, or return specific items as needed
<baweaver> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
duckpuppy has quit [Ping timeout: 246 seconds]
nhhagen has joined #ruby
kappy has quit [Quit: leaving]
hxegon has joined #ruby
kappy has joined #ruby
rgtk has quit []
<baweaver> This seems like a problem of interfaces more than anything, and a class with an array of classes sounds hacky
allcentury has quit [Ping timeout: 260 seconds]
craysiii has quit [Quit: Leaving.]
<baweaver> better solution is to have a common interface in a module (let's call it Actionable) that you put in each class that has an action method it adds
tomchapin has joined #ruby
<baweaver> Then just put the objects into an array and use Enumerable methods on them
jbrhbr has joined #ruby
<grilled-cheese> not sure I follow
douglass_ has left #ruby [#ruby]
douglass_ has joined #ruby
maikowblue has joined #ruby
<norc> grilled-cheese: Present your full problem/code in a gist.
p0wn3d has quit [Ping timeout: 260 seconds]
<norc> >> Pair = Struct.new(:l, :r) { def self.[](a, b); self.new(a, b); end }; puts Pair[1, 2]
<ruboto> norc # => #<struct Pair l=1, r=2> ...check link for more (https://eval.in/480117)
grotewold has quit [Quit: Textual IRC Client: www.textualapp.com]
uri has quit [Ping timeout: 245 seconds]
<baweaver> !mute nospam
<norc> Struct really is one of the best things in Ruby I think.
<norc> Just downright neat.
theery has joined #ruby
cmoneylulz has joined #ruby
theery has quit [Client Quit]
<lukeasrodgers> norc that's cool, didn't know you could define methods in a block passed to Struct.new
crdpink has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 260 seconds]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> lukeasrodgers: Indeed. Together with OpenStruct you suddenly get to reduce some boiler plate code of initializer and accessor methods. :)
<naftilos76> norc, baweaver : just found a spoonfeeder at : http://docs.ruby-lang.org/en/2.2.0/OpenSSL.html . Thought you might be interested.
<norc> naftilos76: Thanks. It's there to be found. :)
nettoweb has joined #ruby
benlieb has quit [Quit: benlieb]
baweaver has quit [Remote host closed the connection]
glenny has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
cmoneylulz has quit [Read error: Connection reset by peer]
douglass_ has left #ruby [#ruby]
nettoweb has quit [Client Quit]
dlitvak has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
icedp has joined #ruby
chouhoulis has joined #ruby
ltp has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
__fps__ has joined #ruby
entropie has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
momomomomo has quit [Quit: momomomomo]
<__fps__> hello friends, is there a tutorial to convert the c++ binding for python to ruby?
baweaver has joined #ruby
skade has joined #ruby
<acidrainfall> norc: what does struct do exactly?
axl_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Xeago has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 260 seconds]
InvGhosttt has joined #ruby
amclain has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
shanemcd has quit [Remote host closed the connection]
crdpink has quit [Client Quit]
<lukeasrodgers> __fps__ which python c++ binding are you talking about?
shanemcd has joined #ruby
ascarter has joined #ruby
diego2 has quit [Ping timeout: 260 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildlander has quit [Quit: Saliendo]
yfeldblum has joined #ruby
amclain has joined #ruby
naftilos76 has quit [Ping timeout: 246 seconds]
<__fps__> lukeasrodgers: there is a framework called 'Bond' which provide data transfer prototocols. Like 'Protocol Buffers'. They support C++, Python and C# at the moment. I wanted to contribute there for Ruby implementation so we have one more choice in Rails community. :)
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acidrainfall> norc: still around?
<acidrainfall> norc: sorry I got pulled into meetings
s2013 has joined #ruby
allcentury has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
shanemcd has quit [Ping timeout: 245 seconds]
howdoicomputer has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
crdpink has joined #ruby
ismaelga has quit [Ping timeout: 246 seconds]
<acidrainfall> norc: if you are, this is what I wrote http://fpaste.org/297225/49182206/
nhhagen has joined #ruby
<lukeasrodgers> __fps__ i don't know too much about ruby calling other languages, but afaik ruby can generally interface with c-like language through either ffi or fiddle. i don't know c++ but it looks like that bond code is (among other things) just defining method names/signatures that python can call via a dylib or something? if so, a very similar approach would probably work for ruby.
<lukeasrodgers> there's not a lot of tutorials out there on this, though, afaik
<acidrainfall> haha and it... did *not* work
<lukeasrodgers> i have some code that might be informative here: https://github.com/lukeasrodgers/ruby-fortran-ffi-poc
<lukeasrodgers> calling fortran from ruby
<lukeasrodgers> that all uses ffi. i'm also working on doing the same with fiddle
skweek has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<norc> acidrainfall: Absolutely. You are printing the value to STDOUT.
momomomomo has joined #ruby
<__fps__> lukearodgers: thanks alot! I didn't knew about ffi and fiddle stuff. Are they two different calling conventions at ABI level to other languages?
wprice has quit [Ping timeout: 246 seconds]
<acidrainfall> norc: oh damn
<acidrainfall> norc: :(
<norc> __fps__: fiddle is the builtin libffi wrapper
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jbrhbr> suppose i have `d = {}`. is there a shortcut like d.field_with_default(:foo).push(3) that would result in `d[:foo] = [3]` in the case where that key was nil at the start?
wprice has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
crdpink2 has joined #ruby
<norc> jbrhbr: Yes. Use ||=
nhhagen has quit []
sdwrage has quit [Quit: This computer has gone to sleep]
crdpink has quit [Ping timeout: 260 seconds]
<norc> >> a ||= 1;
<ruboto> norc # => 1 (https://eval.in/480120)
<lukeasrodgers> __fps__: what norc said. ffi is a gem. you may have more luck with ffi — afaict it has much greater adoption by other libraries, you will probably have an easier time figuring out how to use it. also it seems to have slightly better ergonomics, and also better documentation
<jbrhbr> that doesn't really do the trick
saneax is now known as saneax_AFK
ascarter has joined #ruby
duncannz has quit [Ping timeout: 245 seconds]
<jbrhbr> since if i run the same code again, it would override the assignment of the array with the next push
<jbrhbr> i want "push with default of [] if the key doesn't exist"
<jbrhbr> not necessary of course :)
<__fps__> norc: thanks. What I envisioned was that ruby might have way to interact with C++ library as Python, so I may get those few .h files for `c++ to python` contract to form a c++ to ruby contract and be a happy rails camper by the end of the day. But seems like a steeper learning curve. :)
diego2 has joined #ruby
<norc> >> a = { k: 1 }; a[:k] ||= 2; p a
<ruboto> norc # => {:k=>1} ...check link for more (https://eval.in/480123)
<norc> Mhmm
<norc> I see.
<norc> Well it would override nil/false obviously.
<__fps__> lukeasrodgers: i will dig into ffi and thanks for the link to your repo. I will try to do some analogous coding and find a shortcut to cut a PR. otherwise count on someone else :D
ascarter has quit [Client Quit]
<jbrhbr> norc: i wanted the result there to be [1, 2]
<jbrhbr> ie push with a default, not "set if not set"
<norc> jbrhbr: You can define a default value for a Hash.
<jbrhbr> ok i'll stop pestering you
<jbrhbr> that doesn't really fit it either
<jbrhbr> thanks though!
krobzaur has quit [Ping timeout: 245 seconds]
<lukeasrodgers> __fps__ i may be misunderstanding you but: you probably don't want to open a PR on my repo. it's just for my own experiemtnation, basically
<norc> jbrhbr: There is Hash#fetch which does exactly what you want.
<norc> Third one puts the nail in the coffin. :)
gusTester has left #ruby [#ruby]
<norc> >> {}.fetch(:foo, 1)
<ruboto> norc # => 1 (https://eval.in/480126)
<adaedra> >> a = Hash.new { |k| 3 }; a[:z] ||= 2; a
<ruboto> adaedra # => {} (https://eval.in/480127)
<adaedra> duh.
aelevadoan has joined #ruby
<__fps__> lukeasrodgers: nono, i was talking about pr to provide subsitute implementation for ruby against this python binding -> https://github.com/Microsoft/bond/tree/f800503/python/inc/bond/python
<aelevadoan> o/
<lukeasrodgers> gotcha
<__fps__> (for Bond repo I mean)
<lukeasrodgers> cheers
<__fps__> :D
<jbrhbr> heh nice, thanks!
<aelevadoan> im trying to install a version of ruby in rbenv but i dont have enough space in /tmp
lkba has joined #ruby
<aelevadoan> can i define another dir?
<norc> aelevadoan: rbenv does not care where it resides.
djbkd has quit [Remote host closed the connection]
<aelevadoan> norc: when I do 'rbenv install 2.2.3' it generates the file in /tmp
<havenwood> aelevadoan: It looks like you can set the: TMPDIR="/arbitrary/location"
last_staff has quit [Quit: last_staff]
<aelevadoan> havenwood: where?
<havenwood> aelevadoan: ENV var.
<aelevadoan> in .bash_profile, havenwood?
dlitvak has joined #ruby
<havenwood> aelevadoan: Just in your terminal before you run the command.
<havenwood> aelevadoan: Or yeah, in your dotfiles if you want it to persist.
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
Yzguy has joined #ruby
dlitvak has quit [Remote host closed the connection]
<norc> aelevadoan: Just set TMPDIR before running that, which will cause ruby-build to use a different directory for its tmp files.
dlitvak has joined #ruby
<aelevadoan> norc: havenwood: thanks
<norc> havenwood: Oh I completely skipped that line.
workmad3 has quit [Ping timeout: 250 seconds]
h99h9h88 has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
maloik_ has quit [Ping timeout: 260 seconds]
colegatron has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
Amnez777 has quit [Ping timeout: 260 seconds]
linduxed has joined #ruby
linduxed has quit [Client Quit]
duckpuppy has joined #ruby
h99h9h88 has quit [Ping timeout: 260 seconds]
bronson has quit [Remote host closed the connection]
tomchapin has joined #ruby
stannard has quit [Remote host closed the connection]
linduxed has joined #ruby
linduxed has quit [Client Quit]
Vitor has joined #ruby
<aelevadoan> norc: havenwood: I put "TMPDIR="/~/TMP" in ~/.bash_profile and it still downloads in /tmp
<norc> aelevadoan: Sigh...
<norc> TMPDIR=/wherever rbenv install 2.2.3
<norc> Just throw that into bash and watch it succeed. :)
<aelevadoan> ok
nertzy has quit [Quit: This computer has gone to sleep]
gizmore has quit [Ping timeout: 260 seconds]
linduxed has joined #ruby
Amnez777 has joined #ruby
imperator has quit [Quit: Leaving]
hahuang61 has quit [Ping timeout: 246 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
linduxed has quit [Client Quit]
aspiers has quit [Ping timeout: 260 seconds]
jessemcgilallen has joined #ruby
linduxed has joined #ruby
Keltia has joined #ruby
akem has quit [Remote host closed the connection]
linduxed has quit [Client Quit]
colegatron has joined #ruby
tulak has quit []
<mobson> Can I use combination on array without the argument. I want something like a=[1, 2, 3,4] to become [1, 2],[1, 3],[1, 4],[2,3],[2,4],[3,4],[1, 2, 3],[1,2,4],[1,3,4]..and so on
Vitor has quit [Ping timeout: 246 seconds]
<adaedra> There's ri:Array#combination, but you'll have to work a bit on it for variable size
<adaedra> Mh, bot crashed?
nertzy has joined #ruby
<adaedra> &ri Array#combinations
rgrmatt has joined #ruby
howdoicomputer has quit [Ping timeout: 245 seconds]
<adaedra> So it's without s anyway
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gizmore has joined #ruby
<adaedra> >> a = [1, 2, 3, 4]; (2..a.count).flat_map { |n| a.combination(n).to_a }
<ruboto> adaedra # => [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4], [1, 2, ...check link for more (https://eval.in/480133)
<adaedra> mobson: ^
ethe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has joined #ruby
Yzguy has quit [Quit: Zzz...]
shanemcd has joined #ruby
<mobson> cool, thank you
rgrmatt has quit [Ping timeout: 260 seconds]
vdamewood has joined #ruby
rdark has quit [Ping timeout: 246 seconds]
SCHAAP137 has quit [Quit: Leaving]
bluOxigen has quit [Read error: Connection reset by peer]
toretore has quit [Ping timeout: 246 seconds]
shanemcd has quit [Ping timeout: 260 seconds]
akem has joined #ruby
TomPeed has joined #ruby
s00pcan has quit [Ping timeout: 246 seconds]
s00pcan has joined #ruby
MTeck has left #ruby [#ruby]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
dlitvak has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
devoldmx has joined #ruby
thang has quit [Ping timeout: 245 seconds]
kies has quit [Ping timeout: 260 seconds]
axl_ has left #ruby [#ruby]
baweaver has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 260 seconds]
RegulationD has quit [Remote host closed the connection]
mooe has quit [Quit: Connection closed for inactivity]
kirun has quit [Quit: Client exiting]
Pupp3tm4st3r has quit [Remote host closed the connection]
dmcp has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Quit: Leaving...]
shanemcd has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
nertzy has quit [Quit: This computer has gone to sleep]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
duncannz has joined #ruby
ruid has quit [Ping timeout: 246 seconds]
duncannz has quit [Max SendQ exceeded]
crazydiamond has joined #ruby
duncannz has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
nateberkopec has joined #ruby
momomomomo has quit [Quit: momomomomo]
NeverDie has quit [Quit: http://radiux.io/]
momomomomo has joined #ruby
dkam has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
momomomomo has quit [Client Quit]
howdoicomputer has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
bronson has joined #ruby
colegatron has joined #ruby
cmoneylulz has joined #ruby
duckpuppy has joined #ruby
wprice has quit [Ping timeout: 260 seconds]
alindeman has joined #ruby
juddey has quit [Ping timeout: 246 seconds]
h99h9h88 has joined #ruby