<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
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…]
<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?
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
<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
<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?
<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!!!!!]
<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.))]
<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?
<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
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>
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 ?
<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?
<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?
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.
<ruboto>
apeiros # => /tmp/execpad-1ebf0ca460f1/source-1ebf0ca460f1:2: warning: modifying $= is deprecated ...check link for more (https://eval.in/479920)
<ruboto>
gregf_ # => /tmp/execpad-04f877ef40bb/source-04f877ef40bb:2: warning: variable $= is no longer effective ...check link for more (https://eval.in/479924)
<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)
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
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
<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]
<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
<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…]
<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 ?
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
<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.
<__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…]
<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
<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]
<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. :)
<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.
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…]