orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
pilne has joined #ruby
nunchuck has quit [Ping timeout: 240 seconds]
zachk has quit [Quit: night]
mwlang has quit [Quit: mwlang]
DipoleHourglass is now known as nadir
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
cagomez has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
bambanx has quit [Quit: Leaving]
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Algebr>
and now I am in directory of compiled code, with a .so and .rb, and I did require './unf_ext' but I get LoadError: cannot load such file -- unf_ext.so. The arch is the right one...so...why can't it load?
__Yiota has joined #ruby
bmurt has joined #ruby
<Algebr>
okay, I did $: << "." (also what is $:, GEM PATH? LOAD PATH?), and tried using library and got seg fault.
ivanskie has joined #ruby
orbyt_ has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
troys is now known as troys_
ramfjord has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
ramfjord has joined #ruby
vee_ has quit [Quit: WeeChat 1.9]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
sp4rrow has joined #ruby
ramfjord has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
marxarelli is now known as marxarelli|afk
ramfjord has quit [Ping timeout: 240 seconds]
imode has joined #ruby
elsevero has joined #ruby
workmad3_ has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 has joined #ruby
Alina-malina has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
<Algebr>
does ruby have an equivalent of python's import pdb; pdb.set_trace()
<Burgestrand>
dionysus69 it should contain an array of strings, what version of ruby are you using and are you positive that you typed it correctly?
<dionysus69>
btw are any of you into cryptocurrency? looking for bitcoin core ruby implementation
<dionysus69>
ye I just did `$LOADED_FEATURES` I have 2.4.1
<Burgestrand>
>> $LOADED_FEATURES
<ruby[bot]>
Burgestrand: # => ["enumerator.so", "thread.rb", "rational.so", "complex.so", "/execpad/interpreters/ruby-2.3.0/lib/ru ...check link for more (https://eval.in/868218)
jphase has quit [Ping timeout: 252 seconds]
<dionysus69>
ok I thought by `` you meant bash call
<dionysus69>
only outputs rails related locations, nothing external
<dionysus69>
weird
<matthewd>
dionysus69: Are you confused about the source of the entire Antpool::* namespace, or just 'API'?
jphase has joined #ruby
<dionysus69>
just entire Antpool class
<dionysus69>
it has to be defined somewhere in order for me initialize it right
<dionysus69>
ok I ll post the location when I find it :D
<Burgestrand>
Pry might be helpful, by the way, it has a `show-source` command that allows you to target a module and I guess it pretty much looks up everything in it
<matthewd>
$LOADED_FEATURES.grep(/ant/i)
tvw has quit [Remote host closed the connection]
<matthewd>
git grep -i ant Gemfile
<matthewd>
And then failing either of those, just pore over `git grep Antpool`
sekmo has joined #ruby
<matthewd>
Oh, you were looking at other class methods
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldepandis|away has quit [Ping timeout: 264 seconds]
nankyoku_ has joined #ruby
jphase has joined #ruby
cschneid_ has joined #ruby
ts_ has quit [Ping timeout: 248 seconds]
ts_ has joined #ruby
nankyokusei has quit [Ping timeout: 255 seconds]
<dionysus69>
ok found it
<matthewd>
That's app/lib
<dionysus69>
I was looking at root/lib stupid me
<dionysus69>
never heard of anyone using app/lib before now
cschneid_ has quit [Ping timeout: 255 seconds]
ams__ has joined #ruby
dronov has joined #ruby
dronov has quit [Client Quit]
ldepandis has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 246 seconds]
jphase has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
tvw has joined #ruby
t-recx has joined #ruby
quobo has joined #ruby
mkali has quit [Quit: mkali]
ramfjord has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ruby
mkali has joined #ruby
mkali has quit [Client Quit]
sekmo has quit [Read error: Connection reset by peer]
ldepandis has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
wald0 has joined #ruby
ts_ has quit [Ping timeout: 260 seconds]
ldepandis is now known as ldepandis|away
ldepandis|away is now known as ldepandis
ldepandis is now known as ldepandis|away
ldepandis|away is now known as ldepandis
ldepandis is now known as ldepandis|away
ldepandis|away is now known as ldepandis
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sagax has joined #ruby
sagax has quit [Client Quit]
sagax has joined #ruby
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
ldepandis has joined #ruby
rafadc has joined #ruby
selim has quit [Ping timeout: 252 seconds]
tcopeland has quit [Quit: tcopeland]
selim has joined #ruby
dextrey has joined #ruby
apparition has joined #ruby
ldepandis has quit [Read error: Connection reset by peer]
phaul has quit [Ping timeout: 248 seconds]
InfinityFye has quit [Ping timeout: 240 seconds]
InfinityFye has joined #ruby
Qchmqs__ has joined #ruby
Qchmqs__ is now known as Qchmqs
clemens3 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LazerCat has joined #ruby
woodruffw has quit [Ping timeout: 260 seconds]
raynold has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
InfinityFye has quit [Read error: Connection reset by peer]
bhator3 has joined #ruby
<bhator3>
Hi ! My name is Siddharth Bhatore. I am a research student at IIIT Hyderabad. I am using Ruby in my Rails application for 3 years. Now, I want to contribute back to the community. Can someone get me started ?
jordanm has quit [Remote host closed the connection]
coreteam has joined #ruby
coreteam has quit [Max SendQ exceeded]
Xiti` has joined #ruby
bmurt has joined #ruby
jordanm has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
Xiti has quit [Ping timeout: 248 seconds]
tamouse__ has joined #ruby
banisterfiend has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
oleo has joined #ruby
chouhoulis has joined #ruby
claudiuinberlin has joined #ruby
Siyfion has joined #ruby
tamouse__ has quit [Ping timeout: 248 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rafadc has joined #ruby
synthroid has quit [Remote host closed the connection]
griffindy has joined #ruby
aupadhye has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
synthroid has joined #ruby
bmurt has joined #ruby
uZiel has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
mson has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
polishdub has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has quit [Client Quit]
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
ShalokShalom_ has joined #ruby
dionysus69 has quit [Quit: dionysus69]
bmurt has joined #ruby
dionysus69 has joined #ruby
ShalokShalom has quit [Ping timeout: 252 seconds]
Rapture has joined #ruby
workmad3 has joined #ruby
bmurt has quit [Client Quit]
nobitanobi has quit [Remote host closed the connection]
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
rafadc has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
samlisl_ has joined #ruby
theunraveler has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
dinfuehr has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #ruby
dinfuehr has joined #ruby
mkroman has quit [Read error: Connection reset by peer]
mkroman has joined #ruby
NicolasHov has joined #ruby
rabajaj has quit [Quit: Leaving]
apparition has joined #ruby
dachi has joined #ruby
shime has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
chouhoul_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dachi>
hello. could you help me with passing hash as argument that should as "outer" params? let's say we call t("something", var1: "val1", var2: "val2"). let's say I have h={var1: "val1"}. How can I pass h? t("something", h).
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 246 seconds]
cschneid_ has joined #ruby
<dminuoso>
dachi, have you tried.. maybe exactly that?
bronson has joined #ruby
<dminuoso>
dachi, the thing you have to know, is that Ruby has some automagic when it comes to hashes and kwargs.
<dminuoso>
t("something", var1: "val1", var2: "val2") is actually just short for t("something", { var1: "val1", var2: "val2" }) (this is not entirely accurate, but it'll work for now)
snickers has quit [Ping timeout: 240 seconds]
<dachi>
ok thanks a lot
nobitanobi has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
<teatime>
dachi: if however you want to mix keyword args & a hash of more keyword args, google for the splat operator **
im0nde has quit [Quit: im0nde]
morfin has joined #ruby
<morfin>
hello
Qchmqs has quit [Quit: Konversation terminated!]
<morfin>
i forgot - only way to call method is using obj.send(:method_name)?
<dminuoso>
If you ever use .send its probably wrong.
<dminuoso>
If you need dynamic dispatch, use .public_send
<dminuoso>
.send should only be used when you want to purposefully break encapsulation.
centrx has joined #ruby
John__ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
synthroid has quit [Remote host closed the connection]
NicolasHov has left #ruby ["WeeChat 1.7"]
<morfin>
hah it can call protected/private things as i remember)
apparition has quit [Quit: Bye]
<morfin>
and totally break encapsulation
apparition has joined #ruby
synthroid has joined #ruby
sp4rrow has joined #ruby
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
NicolasHov has joined #ruby
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
claudiuinberlin has joined #ruby
Serpent7776 has quit [Quit: Leaving]
<dminuoso>
morfin, that being said, Im a hypocrite because before I used autocomplete, I cba to type out public_send all the time. ;p
sepp2k1 has joined #ruby
sepp2k has quit [Disconnected by services]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
sepp2k1 has quit [Ping timeout: 240 seconds]
rawste has joined #ruby
r3QuiEm_cL has joined #ruby
NicolasHov has quit [Quit: WeeChat 1.7]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 240 seconds]
yeticry_ has quit [Ping timeout: 264 seconds]
apparition has quit [Quit: Bye]
yeticry has joined #ruby
claudiuinberlin has joined #ruby
TomyLobo has joined #ruby
aufi has quit [Quit: Leaving]
fyrril has joined #ruby
sepp2k has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang007 has joined #ruby
orbyt_ has joined #ruby
<ruby-lang007>
Hi I'm trying to make gtk3 native apps with Ruby. Any tips or resources? I've searched and I didn't find much.
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
mikecmpbll has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
nadir has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
r3QuiEm_cL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest24 has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
DTZUZU has joined #ruby
raynold has joined #ruby
dviola has joined #ruby
<dminuoso>
ruby-lang007, that's because Ruby is rarely if ever used natively in combination with graphical frontends.
bronson has joined #ruby
<dminuoso>
ruby-lang007, either do it the other way around (for example using mruby inside your C++ application), use some communication (sockets, pipelines, message queues) method between a ruby program and the frontend, or -> and that's how most seem to do it -> avoid GTK3 and provide webcontent instead.
coreteam has joined #ruby
coreteam has left #ruby ["Leaving"]
rawste has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Remote host closed the connection]
r3QuiEm_cL has joined #ruby
r3QuiEm_cL has quit [Client Quit]
hahuang65 has quit [Ping timeout: 248 seconds]
marxarelli has joined #ruby
minimalism has joined #ruby
ruby-lang007 has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 240 seconds]
lacuna has joined #ruby
dachi has quit [Ping timeout: 260 seconds]
tolerablyjake has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
r3QuiEm_cL has joined #ruby
voodoofish430 has joined #ruby
r3QuiEm_cL has quit [Client Quit]
jphase has quit []
orbyt_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lacuna has quit [Read error: Connection reset by peer]
lxsameer has quit [Quit: WeeChat 1.7]
lxsameer has joined #ruby
mtkd has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
* teatime
lols slightly at "utf8=✓"
Toledo is now known as croberts
jphase has joined #ruby
croberts is now known as Toledo
eckhardt has joined #ruby
<morfin>
it's because of crap called IE
lxsameer has quit [Ping timeout: 240 seconds]
<Zarthus>
ruby programmers using IE should just be purged though
* teatime
googles it... neat workaround.
wald0 has quit [Quit: Lost terminal]
mark_66 has quit [Remote host closed the connection]
ShalokShalom_ is now known as ShalokShalom
lagweezle_away is now known as lagweezle
d5sx43 has joined #ruby
Neptu has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
skweek has joined #ruby
voice_ftp has quit [Remote host closed the connection]
voice_ftp has joined #ruby
s2013 has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
SeepingN has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
uZiel has quit [Remote host closed the connection]
armyriad has joined #ruby
d5sx43 has quit [Quit: Leaving...]
uZiel has joined #ruby
chouhoulis has joined #ruby
vee_ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
kies has joined #ruby
blindMoe has quit [Quit: Yeap]
<dminuoso>
darix, ah well - was not aware this existed.
Cohedrin_ has joined #ruby
kies has quit [Ping timeout: 240 seconds]
<morfin>
well, rails utf8=✓ appeared because of IE
<morfin>
as i know
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
poofjavelin has joined #ruby
dionysus69 has joined #ruby
ruby618 has joined #ruby
charliesome has quit [Client Quit]
phaul has quit [Ping timeout: 248 seconds]
zachk has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
mim1k has joined #ruby
hahuang65 has joined #ruby
workmad3 has joined #ruby
uZiel has quit [Remote host closed the connection]
hahuang65 has quit [Client Quit]
enterprisey has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
troys has joined #ruby
jphase has quit []
jamesst20 has joined #ruby
milardovich has quit [Remote host closed the connection]
nobitanobi has joined #ruby
__Yiota has joined #ruby
opekktar has joined #ruby
nobitanobi has quit [Remote host closed the connection]
uZiel has joined #ruby
jphase has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
sepp2k has joined #ruby
dviola has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
tvw has quit [Remote host closed the connection]
PaulCapestany has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit [Remote host closed the connection]
opekktar has quit [Quit: WeeChat 1.9]
milardovich has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
brent__ has joined #ruby
claudiuinberlin has joined #ruby
PaulCapestany has joined #ruby
jacm93 has joined #ruby
jamesst20 has quit [Ping timeout: 260 seconds]
brent__ has quit [Client Quit]
jacm93 has quit [Client Quit]
milardovich has quit [Ping timeout: 252 seconds]
brent__ has joined #ruby
orbyt_ has joined #ruby
bronson has quit [Remote host closed the connection]
ElDoggo has quit [Remote host closed the connection]
ElDoggo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo has quit [Ping timeout: 248 seconds]
Guest87067 has joined #ruby
troys is now known as troys_
bambanx has joined #ruby
hahuang65 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
mikecmpbll has joined #ruby
lxsameer has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
milardovich has joined #ruby
cschneid_ has quit [Ping timeout: 252 seconds]
centrx has quit []
jamesst20 has joined #ruby
uZiel has joined #ruby
enterprisey has quit [Remote host closed the connection]
sp4rrow has joined #ruby
dcluna has quit [Ping timeout: 264 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
dcluna has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
conta1 has joined #ruby
tolerablyjake has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
kies has joined #ruby
jenrzzz has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta1 has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
cschneid_ has joined #ruby
nocaberi has quit [Ping timeout: 240 seconds]
tamouse__ has joined #ruby
workmad3 has joined #ruby
cdg has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
jamesaxl has quit [Read error: Connection reset by peer]
kapil___ has joined #ruby
tamouse__ has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
jinie has joined #ruby
jamesaxl has joined #ruby
mjolnird has quit [Remote host closed the connection]
mjolnird has joined #ruby
uZiel has quit [Remote host closed the connection]
Dimik has joined #ruby
workmad3 has joined #ruby
FrostCandy has joined #ruby
ElDoggo has joined #ruby
<FrostCandy>
If I have array = [], I can create a new key with array['newkey'] = thing. How can I say array['newkey']['new_inner_thing'] = thing ?
Guest24 has quit [Read error: Connection reset by peer]
<FrostCandy>
Basically i'm trying to add an array to a dynamically created key in the main array.
ged has quit [Read error: Connection reset by peer]
sp4rrow has joined #ruby
harai has quit [Ping timeout: 248 seconds]
Neptu has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
<FrostCandy>
myarray['newkey'][:fields] = fieldarray should work
jamesaxl has quit [Read error: Connection reset by peer]
uZiel has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 252 seconds]
rafadc has joined #ruby
jamesaxl has joined #ruby
tgragnato has joined #ruby
rabajaj has joined #ruby
ta_ has joined #ruby
Guest87067 is now known as Algebr
<tobiasvl>
FrostCandy: just the same way?
<tobiasvl>
array['newkey'] = []
<tobiasvl>
but what are array string indices...
<FrostCandy>
tobiasvl: yup im so stupid, I wanted to add another key, so i needed a hash instead of an array - array['newkey'] = {:field => "thing"}
<FrostCandy>
too old for programming :D lol
<matthewd>
If you're using 'newkey', then "array" isn't an array either
<FrostCandy>
right it's also a hash, too used to associative arrays i guess
uZiel has quit [Ping timeout: 248 seconds]
Slinky_Pete has joined #ruby
jamesst20 has quit [Quit: No answer received, but problem solved]
oetjenj has joined #ruby
jc-guy has joined #ruby
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jc-guy>
Can anyone tell me what the non def blocks are in a ruby class?
<jc-guy>
example:
noobineer has quit [Ping timeout: 248 seconds]
<jc-guy>
oops mt ^^
govg has quit [Ping timeout: 248 seconds]
<tobiasvl>
they're blocks
<tobiasvl>
that is literally what they're called ;P
troys_ is now known as troys
charliesome has joined #ruby
tgragnato has quit [Read error: Connection reset by peer]
<jc-guy>
are they used to overwrite/monkey patch methods declared in an interface/parent ?
jamesaxl has quit [Read error: Connection reset by peer]
synthroid has quit [Remote host closed the connection]
jamesaxl has joined #ruby
frojnd has joined #ruby
<frojnd>
Hi there
skweek has quit [Ping timeout: 240 seconds]
<havenwood>
frojnd: hi
<frojnd>
How can I define class "Something" and methhod "sum" so this `Something.new(100).sum` call will work when I call it in console? Better yet what should I read in order to understand argument call upon .new and after that call of method?
<havenwood>
frojnd: What should your example return?
tvw has joined #ruby
goyox86__ has joined #ruby
<frojnd>
sum of first 100 numbers... it's not how i implement this sum of first 100 numbers but the structure of the class and methods
<dwn>
so I'm trynna ingest IP ranges in a user-friendly way, so that you don't need to know CIDR well: 10.0.*.1 is 255 addresses with that octet changing. 10.0.*.* is == 10.0.0.0/16. maybe also syntax like 10.0.50-100.1 for only those 50 IPs. is there a lib that handles this and doing comparisons already?
nobitanobi has joined #ruby
Ouchy has quit [Ping timeout: 246 seconds]
<havenwood>
dwn: Check IPAddr in the stdlib.
<dwn>
yeah it doesn't
<dwn>
netaddr::cidr looks good too -- but only for cidr
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
Ouchy has joined #ruby
Ouchy has quit [Changing host]
Ouchy has joined #ruby
Ouchy`w has quit [Ping timeout: 248 seconds]
Ouchy`w has joined #ruby
nobitanobi has quit [Ping timeout: 248 seconds]
goyox86_ has quit [Quit: goyox86_]
goyox86_ has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
<adam12>
dwn: If you find anything that supports that, I'd be very surprised.
<dwn>
do you mean in ruby? plenty of things outside will parse that in a user friendly way
ta_ has quit [Remote host closed the connection]
<lupine>
urgh
<dwn>
I'm thinking I'll just build wildcard/x-y support on top of netaddr::cidr
<lupine>
that is the nastiest format I've seen for IPs for a while
<lupine>
don't forget ipv6 support btw
r3QuiEm_cL has joined #ruby
<dwn>
meh
<dwn>
nmap does it fine
rafadc has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
rafadc has quit [Ping timeout: 240 seconds]
vee_ has quit [Quit: WeeChat 1.9.1]
<jc-guy>
so I guess I’m a little confused on how ruby blocks are working. I see blocks being used all the time in ruby classes where no def is used. Although when I play around with the language and try that i get a “no method” error
goyox86_ has quit [Quit: goyox86_]
goyox86_ has joined #ruby
bambanx has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
jc-guy: You're presumably seeing calls to methods that were defined elsewhere
<tobiasvl>
jc-guy: can you gist some of the code that's confusing you?
<tobiasvl>
not sure if you're seeing blocks or what you are seeing
__Yiota has joined #ruby
erlend has quit [Read error: Connection reset by peer]
<clemens3>
[ 1, 2, 3 ].each { |n| puts n } gives a code block to the each method.. is totally basic concept in ruby, maybe you just have to get used to it..
nowhere_man has joined #ruby
<tobiasvl>
I guess maybe I misunderstood you earlier, and you weren't talking about blocks at all
nobitanobi has joined #ruby
orbyt_ has joined #ruby
erlend has joined #ruby
synthroid has quit [Remote host closed the connection]
<jc-guy>
ok so one example I see on a file is someone using Sidekiq and using a `sidekiq_retries_exhausted do |msg, e| end`
<tobiasvl>
oh, ok. that is a block.
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<tobiasvl>
the `do |msg, e| ... end` part is a block
<matthewd>
jc-guy: Yes, that's calling the sidekiq_retries_exhausted method, which is (I assume) defined by sidekiq
sp4rrow has joined #ruby
nobitanobi has quit [Remote host closed the connection]
goyox86_ has quit [Quit: goyox86_]
<clemens3>
jc-guy: there are methods that expect a code block... inside that method, some values are so called yielded to that code block..
goyox86_ has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
<jc-guy>
ok so i assume that is coming from a module. Now is that method call executed upon instantiation?
<clemens3>
most classical example are the iterator methods.. as said, each.. map.. have a look at the docu for array and how you invoke those methods with a code block.. if the method doesnt expect a code block, than you get an error i guess.. it is much less often that you write a method yourself that expects a code block maybe..
s3nd1v0g1us has quit [Quit: tempusfugit]
sp4rrow has quit [Ping timeout: 248 seconds]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
<clemens3>
that depends on your program entrance..
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
<clemens3>
i don't know anything about sidekiq what it does etc.
<Algebr>
I see that `bundle install --local` exists, but for my usage of --local, I want it to first look in vendor/cache and if the gem is not there then hit up rubygems.org, but it seems that its an all or nothing thing
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
hlmjr has quit [Read error: Connection reset by peer]
herbmillerjr has joined #ruby
Alina-malina has quit [Ping timeout: 260 seconds]
mkroman has quit [Ping timeout: 248 seconds]
<havenwood>
Algebr: You can point the Gemfile to whatever location you'd like.
<Algebr>
so I have a directory where the .gem file is at for a gem dependency, and doing :path => '.' since the gem is in the same directory but still get could not find in sources =/
<Algebr>
when I use bundle install
<Algebr>
./ as well
marxarelli is now known as marxarelli|afk
<Algebr>
(tried absolute path as well)
mim1k has joined #ruby
Ishido has quit [Remote host closed the connection]
eckhardt has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mim1k has quit [Ping timeout: 240 seconds]
mkroman has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Ping timeout: 248 seconds]
__Yiota has joined #ruby
nankyoku_ has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
troys_ is now known as troys
<Algebr>
ugh, ruby crossplatform bundling is nightmare =/
<Algebr>
for me
nankyokusei has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has quit [Quit: Connection closed for inactivity]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai has joined #ruby
tcopeland has quit [Quit: tcopeland]
workmad3 has joined #ruby
nofxx has quit [Remote host closed the connection]
eckhardt has joined #ruby
iszak has quit [Ping timeout: 252 seconds]
iszak has joined #ruby
Slinky_Pete has joined #ruby
marxarelli|afk is now known as marxarelli
chouhoulis has quit [Ping timeout: 240 seconds]
andygeorge has quit [Remote host closed the connection]
pilne has joined #ruby
skweek has joined #ruby
orbyt_ has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
dviola has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby
theunrav_ has quit []
Slinky_Pete has quit [Remote host closed the connection]