havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
user1138 has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
ndrei has quit [Ping timeout: 268 seconds]
Azure has joined #ruby
nk8 has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
jun_ has quit [Remote host closed the connection]
arescorpio has joined #ruby
Jackneill has quit [Remote host closed the connection]
sanjayu has quit [Ping timeout: 255 seconds]
maletor_ has joined #ruby
nk8 has quit [Client Quit]
mistermocha has quit [Remote host closed the connection]
decoponio has joined #ruby
tkuchiki has joined #ruby
northfurr has joined #ruby
decoponyo has joined #ruby
decoponio has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
mdih has quit [Ping timeout: 250 seconds]
enlil has quit [Remote host closed the connection]
decoponyo has quit [Read error: Connection reset by peer]
ericjphillips has quit [Quit: Leaving.]
Bellthoven has quit []
decoponio has joined #ruby
decoponio has quit [Client Quit]
jsuth has joined #ruby
Zamyatin has joined #ruby
mdih has joined #ruby
mdih has quit [Max SendQ exceeded]
user1138 has joined #ruby
mdih has joined #ruby
califerno has joined #ruby
rushed has joined #ruby
l_tonz has quit [Remote host closed the connection]
prestorium has joined #ruby
mistermocha has joined #ruby
decoponio has joined #ruby
jamto11 has joined #ruby
yosemitesam has quit [Quit: Lost terminal]
blackmesa has quit [Ping timeout: 264 seconds]
apt-get has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
kalusn has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
kayloos has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Quit: Leaving...]
nk8 has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
CloCkWeRX has joined #ruby
nk8 has quit [Client Quit]
dikaio has joined #ruby
maletor_ has joined #ruby
Zamyatin has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
Porfa has joined #ruby
RainBowww has joined #ruby
nk8 has joined #ruby
jun_ has joined #ruby
nk8 has quit [Client Quit]
n008f4g_ has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has quit [Read error: Connection reset by peer]
jun_ has quit [Read error: Connection reset by peer]
riotjones has joined #ruby
jun_ has joined #ruby
iamjarvo_ has joined #ruby
nk8 has joined #ruby
dikaio has joined #ruby
mistermocha has joined #ruby
raazdaan has joined #ruby
nk8 has quit [Client Quit]
raazdaan has quit [Client Quit]
riotjones has quit [Ping timeout: 268 seconds]
tier has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
mistermocha has quit [Ping timeout: 240 seconds]
jpfuente_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
l_tonz has joined #ruby
jamto11 has quit [Remote host closed the connection]
dikaio has quit [Quit: ........]
Zamyatin has joined #ruby
livcd has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
nk8 has joined #ruby
wildlander has joined #ruby
Musashi007 has joined #ruby
YankNYC_ has joined #ruby
michael_mbp has quit [Excess Flood]
RegulationD has joined #ruby
nk8 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
speakingcode has joined #ruby
wildlander has quit [Max SendQ exceeded]
michael_mbp has joined #ruby
wildlander has joined #ruby
wildlander has quit [Client Quit]
northfurr has quit [Quit: northfurr]
RegulationD has quit [Ping timeout: 268 seconds]
_blizzy_ has joined #ruby
shevy has joined #ruby
tkuchiki has joined #ruby
YankNYC_ is now known as YankNYC
mikecmpbll has quit [Quit: i've nodded off.]
tkuchiki has quit [Ping timeout: 240 seconds]
l_tonz has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Musashi007 has quit [Quit: Musashi007]
bruno- has quit [Ping timeout: 268 seconds]
maletor_ has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
tier has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 264 seconds]
UtkarshRay has joined #ruby
pocketprotector- has joined #ruby
nateberkopec has quit [Quit: Leaving...]
tier has joined #ruby
mm_ has joined #ruby
stardiviner has joined #ruby
l_tonz has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
tier has quit [Remote host closed the connection]
raazdaan has joined #ruby
prestorium has quit [Ping timeout: 255 seconds]
jsuth has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> Is there a gem-inbuilt way to find out where the "credentials" file will be stored at?
raazdaan has quit [Client Quit]
wildlander has joined #ruby
benlieb has quit [Quit: benlieb]
oetjenj has joined #ruby
kalusn has quit [Remote host closed the connection]
bnagy_ is now known as bnagy
nettoweb has joined #ruby
Porfa has quit [Read error: Connection reset by peer]
tier has joined #ruby
Porfa has joined #ruby
tkuchiki has joined #ruby
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
diegoaguilar has joined #ruby
nettoweb has quit [Client Quit]
kies^ has joined #ruby
postmodern has quit [Quit: Leaving]
pocketprotector- has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
diegoaguilar has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
nk8 has joined #ruby
jamto11 has quit [Remote host closed the connection]
Bozza has quit [Ping timeout: 260 seconds]
riotjones has joined #ruby
samukasmk has joined #ruby
tmtwd has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
samukasmk__ has joined #ruby
oetjenj has quit [Ping timeout: 252 seconds]
zotherstupidguy has joined #ruby
CrazyEddy has quit [Ping timeout: 264 seconds]
Zamyatin has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
unclouded has quit [Ping timeout: 240 seconds]
<zotherstupidguy> how to get the indices of a certain character in a String?
oetjenj has joined #ruby
iateadonut has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<shevy> one way would be via regex, then you have the start location
ishikawa91 has quit [Quit: Connection closed for inactivity]
<zotherstupidguy> "stuff".index("f") returns 3
maletor_ has quit [Quit: Computer has gone to sleep.]
<zotherstupidguy> hmmm
<shevy> yeah
<shevy> starts at 0
<shevy> >> "stuff" =~ /f/
<ruboto> shevy # => 3 (https://eval.in/448498)
l_tonz has quit [Quit: Leaving...]
<zotherstupidguy> i still dont know how to get the other f
<zotherstupidguy> ?
oetjenj has quit [Client Quit]
<zotherstupidguy> slice then run again??
<zotherstupidguy> not a very happy ruby moment
jun_ has quit [Remote host closed the connection]
Blaguvest has quit []
RegulationD has joined #ruby
<shevy> hmm
<shevy> there is probably a simple way
<shevy> but if everything fails, you could always manually iterate over your string and store the indices in an array upon a match
finisherr has quit [Quit: finisherr]
<[k-> here's a funny solution:
<zotherstupidguy> thats what i am too lazy to do :)
<[k-> just let me type it out first
<shevy> zotherstupidguy you may well be even lazier than me!
ValicekB has quit [Ping timeout: 240 seconds]
<[k-> is there a scanl in Ruby?
<shevy> what is a scanl doing? is it like ripper?
califerno has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<[k-> it incrementally builds up an array
Zamyatin has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<zotherstupidguy> shouldnt be there a fucntion that just returns a hash of the letters and their indices in a string!
<zotherstupidguy> charachters*
mikecmpbll has joined #ruby
jamto11 has joined #ruby
diego1 has joined #ruby
nettoweb has joined #ruby
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mondayrain has joined #ruby
diego1 is now known as diegoviola
<zotherstupidguy> "ABC".indices :)
Ox0dea has joined #ruby
RainBowww has left #ruby ["Leaving"]
<Ox0dea> >> 'abc'.each_char.with_index.to_a # zotherstupidguy
<ruboto> Ox0dea # => [["a", 0], ["b", 1], ["c", 2]] (https://eval.in/448513)
<Ox0dea> [k-!
maletor_ has joined #ruby
Dopagod has quit [Ping timeout: 272 seconds]
<zotherstupidguy> love :)
Zamyatin has quit [Ping timeout: 255 seconds]
ValicekB has joined #ruby
patdohere has joined #ruby
patdohere has quit [Client Quit]
<Ox0dea> >> 'foobar'.each_char.with_index.group_by(&:first).map { |c, i| [c, i.map(&:last)] }.to_h
<ruboto> Ox0dea # => {"f"=>[0], "o"=>[1, 2], "b"=>[3], "a"=>[4], "r"=>[5]} (https://eval.in/448514)
<Ox0dea> zotherstupidguy: That one's more in line with exactly what you asked for.
<Ox0dea> It is a shame there isn't a cleaner way to do it. :<
<zotherstupidguy> yeah, a more direct way!
jdawgaz has joined #ruby
<Ox0dea> But hey, we can define methods!
patdohere has joined #ruby
<[k-> Ox0dea !
<[k-> >> o = "abdbfsktnskffndmtlepdlfleflejrkef".split(?f).map { |a| a.length + 1 }; Array.new(o.length) { |i| o[0..i].reduce(:+) }
<ruboto> [k- # => [5, 12, 13, 23, 26, 33] (https://eval.in/448517)
<[k-> i was trying out this
<[k-> but it isnt really correct
<[k-> and it is not an optimal solution
bruno- has joined #ruby
amystephen has quit [Quit: amystephen]
samukasmk__ has quit [Read error: No route to host]
samukasmk has quit [Read error: No route to host]
<Ox0dea> What even.
<Ox0dea> How is that a map of characters to their indices?
patdohere has quit [Client Quit]
<shevy> this is the haskell solution
<[k-> Ox0dea: he only wanted the indices of a character
<Ox0dea> > shouldnt be there a fucntion that just returns a hash of the letters and their indices in a string!
aaeron has joined #ruby
<[k-> i began on the solution before he decided to change his requirements
<zotherstupidguy> [k- my first time to read .reduce, thanks for that :) cheers
<[k-> it is also known as inject, but reduce is a better name!
<[k-> >> o = "abdbfsktnskffndmtlepdlfleflejrkef".split(?f).map { |a| a.length + 1 }; Array.new(o.length) { |i| o[0..i].reduce(:+) - 1 }
<ruboto> [k- # => [4, 11, 12, 22, 25, 32] (https://eval.in/448518)
<[k-> i guess this will be more correct
<shevy> it started a bit earlier
<shevy> <zotherstupidguy> how to get the indices of a certain character in a String?
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby
<Ox0dea> > Where you walk in, you get injected, inspected, detected, infected Neglected and selected.
mary5030 has joined #ruby
<Ox0dea> "Alice's Restaurant Massacree" is the origin of many of Smalltalk's Enumerable methods, and thus Ruby's.
<Ox0dea> Who knew?
PhantomSpank has quit [Read error: Connection reset by peer]
[k-_ has joined #ruby
<Ox0dea> [k-: Haskell was supposed to have taught you to worship generality by now.
<[k-_> i could also do a recursive solution
[k- has quit [Ping timeout: 240 seconds]
PhantomSpank has joined #ruby
<[k-_> that might be more efficient
manveru has quit [Read error: Connection reset by peer]
tonini has quit [Ping timeout: 264 seconds]
<[k-_> Ox0dea: generalisation comes at a cost
<Ox0dea> Pfft.
[k-_ is now known as [k-
<Ox0dea> Have you started learning C or something
djbender has quit [Ping timeout: 252 seconds]
lipoqil has quit [Read error: Connection reset by peer]
alxndr has quit [Ping timeout: 268 seconds]
cek has quit [Read error: Connection reset by peer]
maletor_ has quit [Quit: Computer has gone to sleep.]
diegoaguilar has joined #ruby
hellschreiber has quit [Ping timeout: 240 seconds]
ELCALOR has quit [Ping timeout: 246 seconds]
leafybasil has quit [Remote host closed the connection]
pizzaops has quit [Read error: Connection reset by peer]
tier has quit [Remote host closed the connection]
pfg has quit [Ping timeout: 252 seconds]
nyandoge has quit [Ping timeout: 252 seconds]
leafybasil has joined #ruby
jeregrine has quit [Ping timeout: 264 seconds]
<[k-> no
skmp has quit [Read error: Connection reset by peer]
n1ftyn8_ has quit [Ping timeout: 252 seconds]
system64 has quit [Read error: Connection reset by peer]
adambeynon has quit [Ping timeout: 250 seconds]
<Ox0dea> I wonder if it's possible for an object to determine when and if it's being returned or yielded.
vcoinminer has quit [Read error: Connection reset by peer]
<[k-> but i got state under my belt
YankNYC has quit [Read error: Connection reset by peer]
halfdan has quit [Read error: Connection reset by peer]
avdi has quit [Ping timeout: 264 seconds]
<Ox0dea> I think there might should ought to maybe probably be some such hook(s).
nateberkopec has joined #ruby
charles81 has quit [Ping timeout: 268 seconds]
<[k-> Ox0dea: the overhead would be enormous
zzak has quit [Ping timeout: 250 seconds]
gyre007 has quit [Ping timeout: 250 seconds]
<Ox0dea> rollDie feeds rollDie, you say?
tkuchiki has joined #ruby
kellabyte has quit [Read error: Connection reset by peer]
<Ox0dea> [k-: I don't see why that should be so. A patch landed not too awful long ago to make the did_you_mean gem acceptably performant.
MiracleBlue has quit [Ping timeout: 264 seconds]
bcavileer has quit [Ping timeout: 264 seconds]
chrisseaton has quit [Ping timeout: 252 seconds]
<[k-> Ox0dea, >> means then
cstrahan has quit [Ping timeout: 246 seconds]
<shevy> did_you_mean that really Ox0dea
<[k-> do_this (then >>) do_this
cardoni has quit [Ping timeout: 250 seconds]
<shevy> what is that... that's not ruby
<Ox0dea> But it could be.
<[k-> you also arent ruby but we love you all the same, shevy
deimos_ has quit [Ping timeout: 268 seconds]
bjeanes has quit [Ping timeout: 246 seconds]
tejasmanohar has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
<Ox0dea> ?shevy
<ruboto> shevy is the hound of baskerville (see http://irclog.whitequark.org/ruby/2015-08-13#13699759)
schaary has quit [Ping timeout: 268 seconds]
leafybasil has quit [Ping timeout: 250 seconds]
rfv has quit [Ping timeout: 246 seconds]
<Ox0dea> Not a massive change, of course, but there nonetheless.
<Ox0dea> I suppose it didn't end up mattering much on account of nobu's rewriting the extension bits to be incredibly concise and elegant for such a useful feature.
nitrix- has quit [Changing host]
nitrix- has joined #ruby
bonhoeffer has joined #ruby
nitrix- is now known as nitrix
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Ox0dea> Is it possible to invoke instance methods of singleton classes?
bryancp has quit [Ping timeout: 250 seconds]
ksteck has joined #ruby
<shevy> I don't understand the change
cmoneylulz has joined #ruby
nk8 has joined #ruby
<shevy> then again I also don't understand the did_you_mean gem either
<[k-> >> Array.singleton_class.[](1,2,3)
<shevy> but it seems to be fairly minor
<ruboto> [k- # => undefined method `[]' for #<Class:Array> (NoMethodError) ...check link for more (https://eval.in/448519)
<[k-> it is defined!
<shevy> Ox0dea have you finally embraced frozen strings with your full heart?
<Ox0dea> shevy: No, of course not.
<Ox0dea> >> ('foo'.bar rescue $!).receiver
<ruboto> Ox0dea # => undefined method `receiver' for #<NoMethodError: undefined method `bar' for "foo":String> (NoMethodE ...check link for more (https://eval.in/448520)
<Ox0dea> shevy: That's "foo" in 2.3+.
<shevy> wat
<Ox0dea> That did_you_mean can just hook NameErrors and NoMethodErrors to determine the object on which to search for corrections is pretty convenient.
<[k-> >> Array.singleton_class.new(3)
<ruboto> [k- # => can't create instance of singleton class (TypeError) ...check link for more (https://eval.in/448521)
patdohere has joined #ruby
<Ox0dea> [k-: You simply cannot create instances of singleton classes, mate.
<Ox0dea> But we can define instance methods just fine: `class << Class.new; def foo; end; end`.
<Ox0dea> So how to call the damned things?!
rewzn has quit [Quit: WeeChat 1.3]
mikecmpbll has quit [Quit: i've nodded off.]
<shevy> ugly
<Ox0dea> Guess whose face.
<[k-> >> Math.sin(1.0/0x0dea)
<ruboto> [k- # => 0.00028074115296576846 (https://eval.in/448522)
<Ox0dea> It's not the worst number.
v4n has joined #ruby
jun_ has joined #ruby
mikecmpbll has joined #ruby
<Ox0dea> >> 2236081408416666 ** 2 # [k-
<ruboto> Ox0dea # => 5000060065066660656065066555556 (https://eval.in/448523)
<Ox0dea> I like that one.
<Ox0dea> It's one of the precious few single-element OEIS sequences.
<Ox0dea> In this case, the numbers which are squares containing only {0,5,6}.
nitrix has quit [Quit: EOF]
<[k-> >> 1/998001
<ruboto> [k- # => 0 (https://eval.in/448524)
<[k-> >> 1/998001.0
<ruboto> [k- # => 1.002003004005006e-06 (https://eval.in/448525)
jsuth has joined #ruby
nateberkopec has quit [Quit: Leaving...]
maletor_ has joined #ruby
<[k-> >> 1/9
<ruboto> [k- # => 0 (https://eval.in/448526)
<[k-> >> 1/9.0
<ruboto> [k- # => 0.1111111111111111 (https://eval.in/448527)
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<[k-> >> 1/99.0
<ruboto> [k- # => 0.010101010101010102 (https://eval.in/448528)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ziggles has joined #ruby
<[k-> 98, 9801, 998001, 99980001, 9999800001
sdothum has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
ksteck has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ziggles has quit []
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dorei has quit []
tkuchiki has joined #ruby
Porfa has quit [Quit: Porfa]
mikecmpbll has quit [Quit: i've nodded off.]
michael_mbp has quit [Excess Flood]
jun_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<bonhoeffer> if i have a mitee.h file and i want to access those functions — can i use ffi directly, or do i need a .o to work with
rewzn has joined #ruby
sankaber has joined #ruby
michael_mbp has joined #ruby
mrtomme has quit [Ping timeout: 264 seconds]
gener1c_ has joined #ruby
alxndr has joined #ruby
ELCALOR has joined #ruby
<Ox0dea> bonhoeffer: That would be translation, really, not FFI.
mrtomme has joined #ruby
<bonhoeffer> the question is if i need to write c application code — or can i work with the C interface
<bonhoeffer> mylibrary.h
<Ox0dea> You've failed to clarify anything.
avdi has joined #ruby
pfg has joined #ruby
<bonhoeffer> here it looks like I can’t include or call anything without writing the application code: https://github.com/ffi/ffi/wiki/Examples
patdohere has quit [Quit: Textual IRC Client: www.textualapp.com]
<bonhoeffer> in that example: /* mylibrary.h */ has “double calculate_something(int a, float b);” — i would like to call this function in ruby
<bonhoeffer> but the ffi_lib is ffi_lib "path/to/mylibrary.so" — not to the header file
gener1c has quit [Ping timeout: 268 seconds]
Ox0dea has quit [Read error: No route to host]
Channel6 has joined #ruby
Ox0dea has joined #ruby
<Ox0dea> bonhoeffer: Yes, you need an object file, otherwise you'd be asking for a C-to-Ruby translator.
user1138_ has joined #ruby
<bonhoeffer> got it — so the object file might do nothing more than include the header
braincrash has quit [Quit: bye bye]
jeff_laplante has quit [Read error: Connection reset by peer]
<Ox0dea> For what it's worth, you shouldn't be defining functions in header files.
<Ox0dea> Declaring, sure.
cmoneylulz has quit [Remote host closed the connection]
Oog has joined #ruby
kies^ has quit [Ping timeout: 240 seconds]
<bonhoeffer> true
cek has joined #ruby
kellabyte has joined #ruby
<Ox0dea> Macros are fine in header files, but those "compile away" except where they're used.
jun_ has joined #ruby
zenguy_pc has joined #ruby
<bonhoeffer> i’m hoping to have the methods defined in this file: https://github.com/mit-nlp/MITIE/blob/master/mitielib/include/mitie.h
<Ox0dea> bonhoeffer: These are all function declarations, not definitions.
<bonhoeffer> so no logic in this file — just declarations
<Ox0dea> Right.
yaogwai has joined #ruby
<Ox0dea> Well, function declarations give them their types, which is arguably "logic" after a fashion.
user1138 has quit [Ping timeout: 246 seconds]
<Ox0dea> The C++ file I linked contains the function definitions.
<Ox0dea> I don't know whether you'll be able to compile it standalone, though.
<bonhoeffer> in the include directory
gix has quit [Ping timeout: 250 seconds]
<Ox0dea> In any case, the Makefile does compile mitie.cpp into mitie.o, so you may well be able to use just those functions you're interested in.
dopie has joined #ruby
tkuchiki has quit [Remote host closed the connection]
nitrix has joined #ruby
pizzaops has joined #ruby
<bonhoeffer> ah — so it looks like the functions are all written in cpp
Oog has quit []
charles81 has joined #ruby
n1ftyn8_ has joined #ruby
<Ox0dea> An immaterial detail for your purposes, I would imagine, but yes.
<bonhoeffer> got it
mikecmpbll has quit [Quit: i've nodded off.]
Musashi007 has joined #ruby
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
<Ox0dea> bonhoeffer: Eh, I can't get mitie.cpp to build standalone + shared. :/
<bonhoeffer> sorry — i think you have to use the makefile
<Ox0dea> Right, but that won't give you a standalone shared object.
Vile` has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
braincrash has joined #ruby
gix has joined #ruby
jsuth has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bonhoeffer> hmm . . . good point — they call it from python though
Vile` has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
<Ox0dea> bonhoeffer: Aye, but they're bringing in the entirety of libmitie.
jun_ has quit [Read error: Connection reset by peer]
<Ox0dea> Not just those functions in mitie.cpp.
<bonhoeffer> how would one do that with ruby?
<bonhoeffer> "bringing in the entirety of libmitie"
<Ox0dea> Build MITIE with its Makefile, find libmitie.so, and feed that to FFI.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun_ has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
<Ox0dea> bonhoeffer: http://git.io/vCn4I
zenguy_pc has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bonhoeffer> got it — ok
<Ox0dea> Dynamic libraries are .so on Linux, .dylib on OS X, and .dll on Windows.
<Ox0dea> Be advised that libmitie is much, *much* more than just the functions in mitie.cpp.
<bonhoeffer> what kind of other stuff?
Zamyatin has joined #ruby
<Ox0dea> ~ $ find MITIE/dlib/dlib/ | wc -l
<Ox0dea> 1319
<bonhoeffer> i’ll poke at it
<bonhoeffer> so i could use ffi to pull in the so functions
<bonhoeffer> on my mac: /usr/local/lib/libmitie.so
mary5030 has quit [Ping timeout: 250 seconds]
<bnagy> not really how ffi works
<bnagy> you define ruby FFI funcs and ruby calls into the binary directly
<bonhoeffer> not: ffi_lib ‘./usr/local/lib/libmitie.so’
cmoneylulz has joined #ruby
<bonhoeffer> ?
<Ox0dea> bnagy: Dynamic libraries are "binaries", for all intensive porpoises, mind.
cmoneylulz has quit [Remote host closed the connection]
<bnagy> so you'll need to make ruby-level wrappers for all the functions you want to use
<bonhoeffer> and then i should be able to do: attach_function
<bnagy> yes
<bonhoeffer> ok — got it
<bonhoeffer> thanks so much
<Ox0dea> Happy to have helped.
<bnagy> you can often munge the .h to do that
<bonhoeffer> very appreciative
bonhoeffer has quit [Quit: bonhoeffer]
<bnagy> especially for simple function signatures
darkf has joined #ruby
mistermocha has joined #ruby
popnfloss has joined #ruby
mistermocha has quit [Remote host closed the connection]
<bnagy> btw if it's a C++ API you might have a lot of trouble unless they expose a C-style API as well
<popnfloss> ruby on rails? more like ruby on fails! amirite??? :D :D :D
<bnagy> you can try swig but you might also accidentally open a portal to azathoth
mistermocha has joined #ruby
v4n has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeregrine has joined #ruby
bcavileer has joined #ruby
cardoni has joined #ruby
<Ox0dea> popnfloss: Please elaborate.
<Ox0dea> Ah, I did forget about name mangling. :<
moeabdol has quit [Quit: WeeChat 1.3]
leafybasil has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby
mistermocha has quit [Remote host closed the connection]
<shevy> mame nangling?
theery has joined #ruby
raazdaan has joined #ruby
<Ox0dea> shevy: Polymorphic compiled languages like C++ have to differentiate between functions of the same name with different signatures.
<Ox0dea> They do so by attaching the necessary additional information to the name, thus "mangling" it.
jun_ has quit [Read error: Connection reset by peer]
leafybasil has quit [Ping timeout: 250 seconds]
jun_ has joined #ruby
swgillespie has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.4-dev]
zenguy_pc has joined #ruby
riotjones has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
theery has quit []
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 252 seconds]
prestorium has joined #ruby
riotjones has quit [Ping timeout: 268 seconds]
_blizzy_ has quit [Ping timeout: 268 seconds]
aaeron has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: i've nodded off.]
bluOxigen has joined #ruby
thesheff17 has quit []
mikecmpbll has joined #ruby
thesheff17 has joined #ruby
<noethics> note that overloading isn't necessarily a language feature in every polymorphic compiled language ^_^
baweaver has quit [Remote host closed the connection]
<noethics> or even restricted to polymorphic or compiled languages
unclouded has joined #ruby
<noethics> and.. name mangling isn't the only solution.. but this is the limit of my pedantry
v4n has joined #ruby
lipoqil has joined #ruby
mistermocha has joined #ruby
adambeynon has joined #ruby
hellschreiber has joined #ruby
Cyther has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
raazdaan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jun_ has joined #ruby
gyre007 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mistermocha has quit [Ping timeout: 260 seconds]
deimos_ has joined #ruby
simplyianm has joined #ruby
bjeanes has joined #ruby
tonini has joined #ruby
Musashi007 has quit [Quit: Musashi007]
mikecmpbll has quit [Quit: i've nodded off.]
pili has joined #ruby
mikecmpbll has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
rfv has joined #ruby
mclee_ has quit [Ping timeout: 252 seconds]
skmp has joined #ruby
bryancp has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
mclee_ has joined #ruby
mistermocha has joined #ruby
coetry has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
zzak has joined #ruby
system64 has joined #ruby
bonhoeffer has joined #ruby
uberjar has joined #ruby
testkj has quit [Quit: Page closed]
tejasmanohar has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
uberjar has quit [Quit: uberjar]
mikecmpbll has joined #ruby
CloCkWeRX has joined #ruby
vcoinminer has joined #ruby
patrick_star has quit [Ping timeout: 240 seconds]
aaeron has joined #ruby
shinnya has quit [Ping timeout: 264 seconds]
YankNYC has joined #ruby
halfdan has joined #ruby
nyandoge has joined #ruby
braincra- has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
braincrash has quit [Ping timeout: 240 seconds]
leafybasil has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
l_tonz has joined #ruby
keen__________10 has joined #ruby
Zamyatin has quit [Ping timeout: 264 seconds]
jsuth has joined #ruby
keen___________9 has quit [Ping timeout: 250 seconds]
leafybasil has quit [Ping timeout: 265 seconds]
s00pcan has quit [Remote host closed the connection]
justin_pdx has joined #ruby
jpfuente_ has joined #ruby
dc_ has joined #ruby
dc_ has quit [Client Quit]
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
sanjayu has joined #ruby
djbender has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
woodruff- is now known as woodruffw
jpfuente_ has quit [Client Quit]
mikecmpbll has joined #ruby
riotjones has joined #ruby
s00pcan has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jsuth has quit [Read error: Connection reset by peer]
jsuth has joined #ruby
jun_ has joined #ruby
[k- has quit [Ping timeout: 240 seconds]
patrick_star has joined #ruby
bruno- has joined #ruby
dikaio has joined #ruby
mistermocha has joined #ruby
Channel6 has quit [Ping timeout: 255 seconds]
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest96475
diego1 is now known as diegoviola
riotjones has quit [Ping timeout: 250 seconds]
manveru has joined #ruby
michael_mbp has quit [Excess Flood]
Guest96475 has quit [Ping timeout: 252 seconds]
aaeron has quit [Quit: Leaving.]
nk8 has joined #ruby
michael_mbp has joined #ruby
Oog has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
beauby has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
nk8 has quit [Client Quit]
Zamyatin has joined #ruby
ledestin has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
yaogwai has left #ruby ["Using Circe, the loveliest of all IRC clients"]
aaeron has joined #ruby
grenierm has quit [Quit: grenierm]
nk8 has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
diegoviola has quit [Ping timeout: 240 seconds]
wldcordeiro has joined #ruby
mikecmpbll has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
jun_ has quit [Remote host closed the connection]
schaary has joined #ruby
jpfuente_ has joined #ruby
jun_ has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
awakpig has joined #ruby
baweaver has joined #ruby
awakpig has left #ruby [#ruby]
diegoviola has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
pawnbox has joined #ruby
Oog has quit []
jsuth has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
Zamyatin has quit [Ping timeout: 272 seconds]
Dopagod has joined #ruby
[k- has joined #ruby
chrisseaton has joined #ruby
aaeron has quit [Quit: Leaving.]
MiracleBlue has joined #ruby
arescorpio has quit [Quit: Leaving.]
cstrahan has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby
greister_ has joined #ruby
justin_pdx has joined #ruby
Zamyatin has joined #ruby
arup_r has joined #ruby
robbyoconnor has joined #ruby
moeabdol has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
tkuchiki has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
UtkarshRay has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
sanjayu has quit [Ping timeout: 265 seconds]
riotjones has joined #ruby
jamto11 has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 246 seconds]
grzegorz has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
sanjayu has joined #ruby
koolkidzklub has joined #ruby
<koolkidzklub> what is the tdifference between object literal and constructor
mikecmpbll has joined #ruby
jamto11 has joined #ruby
sapslaj has quit [Remote host closed the connection]
solocshaw has joined #ruby
riotjones has quit [Ping timeout: 250 seconds]
claw has quit [Ping timeout: 265 seconds]
claw has joined #ruby
pili-t has joined #ruby
sanjayu has quit [Ping timeout: 272 seconds]
pili has quit [Ping timeout: 240 seconds]
SylarRuby has joined #ruby
aaeron has joined #ruby
lxsameer has joined #ruby
robbyoconnor has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
jamto11 has quit [Remote host closed the connection]
karapetyan has joined #ruby
mikecmpbll has joined #ruby
yeshacker has joined #ruby
Zamyatin has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
yardenbar has joined #ruby
sanjayu has joined #ruby
Oog has joined #ruby
v4n has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zamyatin has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
yeticry has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
mloy_ has joined #ruby
mikecmpbll has joined #ruby
Guest36 has joined #ruby
Guest36 is now known as Ambidexter
v4n has joined #ruby
yeticry has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
<Ambidexter> Anyone in here have experience setting ruby on rails up on a cpanel wbhost?
<Ambidexter> web*
v4n has quit [Client Quit]
arup_r has joined #ruby
mikecmpbll has quit [Client Quit]
sanjayu has quit [Ping timeout: 240 seconds]
<mozzarella> I thought it was a php-only thing
<Ambidexter> I mean it has the option
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ambidexter> but it seems to be a real pain in the ass
<Ambidexter> and im not getting any straight results.
<Ambidexter> although ruby is very similar to php
solocshaw has joined #ruby
decoponio has quit [Quit: Leaving...]
<Ambidexter> sigh
<Ambidexter> another dead end
<Ambidexter> guess im not using it on my personal website lol
mistermocha has joined #ruby
<Ambidexter> hah well thanks.
coetry has quit [Ping timeout: 240 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has quit [Quit: This computer has gone to sleep]
mistermocha has quit [Ping timeout: 244 seconds]
craysiii has quit [Remote host closed the connection]
justin_pdx has quit [Quit: justin_pdx]
finisherr has joined #ruby
Channel6 has joined #ruby
psy_ has quit [Ping timeout: 255 seconds]
Channel6 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
aaeron has quit [Quit: Leaving.]
<Radar> Diabolik: Get the 2nd edition
<Radar> Diabolik: 2nd edition has the most up-to-date content :)
<Ambidexter> cpanel 2.0?
riotjone_ has joined #ruby
rippa has joined #ruby
<Ambidexter> because its just on my host
<Ambidexter> is there a better alternative than cpanel on a different host, excluding like heroku.
pocketprotector- has joined #ruby
<Ambidexter> can you be more specific please?
houhouli_ has joined #ruby
riotjone_ has quit [Ping timeout: 272 seconds]
houhoulis has quit [Ping timeout: 250 seconds]
Oog has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
nk8 has joined #ruby
alveric_ has quit [Remote host closed the connection]
Ambidexter has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
xcesariox has joined #ruby
pocketprotector- has quit [Remote host closed the connection]
vdamewood has joined #ruby
heyimwill has quit [Ping timeout: 240 seconds]
krasnus has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
pawnbox has quit [Remote host closed the connection]
leafybasil has joined #ruby
maletor_ has joined #ruby
pawnbox has joined #ruby
psy has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ZucchiniZe is now known as ZucchiniZe-
ZucchiniZe- is now known as ZucchiniZe
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ZucchiniZe is now known as ZucchiniZe-
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
leafybasil has quit [Ping timeout: 240 seconds]
mdih has quit [Ping timeout: 255 seconds]
jamto11 has quit [Ping timeout: 272 seconds]
ta has quit [Remote host closed the connection]
heyimwill has joined #ruby
jun_ has quit [Remote host closed the connection]
jun_ has joined #ruby
tkuchiki has joined #ruby
last_staff has quit [Quit: last_staff]
maletor_ has quit [Quit: Computer has gone to sleep.]
psy has quit [Remote host closed the connection]
psy has joined #ruby
finisherr has quit [Quit: finisherr]
tkuchiki has quit [Ping timeout: 265 seconds]
Guest36 has joined #ruby
<Guest36> yo?
benlieb has joined #ruby
Guest36 is now known as whois
<whois> is heroku the best place to configure rails?
blackmesa has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
jpfuente_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 250 seconds]
rushed has quit [Quit: rushed]
finisherr has joined #ruby
stardiviner has joined #ruby
firstdayonthejob has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
Gnomethrower has joined #ruby
oetjenj has joined #ruby
arup_r has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
MasterNayru has joined #ruby
krasnus has joined #ruby
CloCkWeRX has joined #ruby
Dopagod has quit [Ping timeout: 240 seconds]
k3asd` has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
whois has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbowlby has joined #ruby
jamesaxl has joined #ruby
yeticry has quit [Quit: leaving]
Or1on has quit [Ping timeout: 246 seconds]
rbowlby has quit [Remote host closed the connection]
solocshaw has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
leafybasil has joined #ruby
blackmesa has joined #ruby
wildlander has quit [Quit: Saliendo]
rbowlby has joined #ruby
leafybasil has quit [Ping timeout: 265 seconds]
rbowlby has quit [Remote host closed the connection]
mloy_ has quit [Ping timeout: 272 seconds]
blackmesa has quit [Read error: Connection reset by peer]
triangles2 has joined #ruby
triangles has quit [Ping timeout: 244 seconds]
kalusn has joined #ruby
user1138_ has quit [Quit: Leaving]
Soda has joined #ruby
nk8 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
l_tonz has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
beast has quit [Quit: Leaving]
dc_ has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
k3asd` has quit [Ping timeout: 268 seconds]
sheperson has joined #ruby
<sheperson> Hi
blackmesa has joined #ruby
finisherr has quit [Quit: finisherr]
Guest36 has joined #ruby
avdi has quit [Remote host closed the connection]
halfdan has quit [Remote host closed the connection]
pfg has quit [Remote host closed the connection]
lipoqil has quit [Remote host closed the connection]
adambeynon has quit [Remote host closed the connection]
kellabyte has quit [Remote host closed the connection]
hellschreiber has quit [Remote host closed the connection]
rfv has quit [Remote host closed the connection]
zzak has quit [Remote host closed the connection]
bcavileer has quit [Remote host closed the connection]
deimos_ has quit [Remote host closed the connection]
vcoinminer has quit [Remote host closed the connection]
MiracleBlue has quit [Remote host closed the connection]
chrisseaton has quit [Remote host closed the connection]
cardoni has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
YankNYC has quit [Remote host closed the connection]
charles81 has quit [Remote host closed the connection]
djbender has quit [Remote host closed the connection]
nyandoge has quit [Remote host closed the connection]
schaary has quit [Remote host closed the connection]
manveru has quit [Remote host closed the connection]
alxndr has quit [Remote host closed the connection]
cek has quit [Remote host closed the connection]
n1ftyn8_ has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
system64 has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
cstrahan has quit [Remote host closed the connection]
ELCALOR has quit [Remote host closed the connection]
skmp has quit [Remote host closed the connection]
pizzaops has quit [Remote host closed the connection]
bjeanes has quit [Remote host closed the connection]
jeregrine has quit [Remote host closed the connection]
tejasmanohar has quit [Remote host closed the connection]
pili-h has joined #ruby
bruno- has joined #ruby
karapetyan has joined #ruby
vcoinminer has joined #ruby
jun_ has quit [Remote host closed the connection]
avdi has joined #ruby
jeregrine has joined #ruby
pili-t has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
jun_ has joined #ruby
freezevee has joined #ruby
bjeanes has joined #ruby
alxndr has joined #ruby
<freezevee> I have an array a = [2,4,6,8] and I am trying to iterate for all elements except a[2]
<freezevee> how can I do it ?
pawnbox has joined #ruby
schaary has joined #ruby
adambeynon has joined #ruby
system64 has joined #ruby
hellschreiber has joined #ruby
<freezevee> I can do a.reject {|k| k == 2 } but I can't iterate over the results in place(.each) without saving the changes (.reject!)
<Mon_Ouie> You can use each (or each__with_index) and just use 'next' to skip an element that meets some condition
jgt has joined #ruby
pizzaops has joined #ruby
jun_ has quit [Ping timeout: 246 seconds]
<freezevee> next ?
n1ftyn8_ has joined #ruby
yeshacker has quit [Ping timeout: 240 seconds]
shoutsid has quit [Remote host closed the connection]
sagittarian has joined #ruby
<freezevee> you mean a simple conditional ? like running .each and if index == 2 continue to next iteration ?
gyre007 has joined #ruby
lipoqil has joined #ruby
ELCALOR has joined #ruby
shoutsid has joined #ruby
bryancp has joined #ruby
cek has joined #ruby
weihan has joined #ruby
<Mon_Ouie> next is a keyword that skips the next element
deimos_ has joined #ruby
<Mon_Ouie> that skips to the next element*
<Mon_Ouie> (Which is the same as just warping the entire rest of the block in a big if)
charles81 has joined #ruby
halfdan has joined #ruby
bcavileer has joined #ruby
manveru has joined #ruby
<sheperson> Date, DateTime, Time and String objects respond to to_time
<sheperson> is there any other class that responds to to_time?
<freezevee> Mon_Ouie: thank you
crdpink has quit [Ping timeout: 246 seconds]
crdpink has joined #ruby
<Mon_Ouie> >> "foo".to_time
<ruboto> Mon_Ouie # => undefined method `to_time' for "foo":String (NoMethodError) ...check link for more (https://eval.in/448594)
kellabyte has joined #ruby
<apeiros> String#to_time is rails
<sheperson> yes, sorry
<apeiros> and there, the AS Time classes also respond to to_time iirc
<sheperson> any other classes?
n008f4g_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbender has joined #ruby
rfv has joined #ruby
crdpink has quit [Client Quit]
darkxploit has joined #ruby
crdpink has joined #ruby
<apeiros> sheperson: ObjectSpace.each_object(Class).select { |c| c.method_defined?(:to_time) }
<apeiros> enjoy
<sheperson> :O
skmp has joined #ruby
charliesome has joined #ruby
cstrahan has joined #ruby
MiracleBlue has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
chrisseaton has joined #ruby
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
yeshacker has joined #ruby
nyandoge has joined #ruby
speakingcode has quit [Ping timeout: 250 seconds]
pfg has joined #ruby
speakingcode has joined #ruby
l_tonz has joined #ruby
beauby has quit [Ping timeout: 240 seconds]
l_tonz has quit [Remote host closed the connection]
AlexRussia has quit [Quit: WeeChat 1.4-dev]
tonini has joined #ruby
pawnbox has quit [Remote host closed the connection]
jamto11 has joined #ruby
pawnbox has joined #ruby
Helius has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
peteykun has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
cardoni has joined #ruby
zzak has joined #ruby
AlexRussia has joined #ruby
DEA7TH has joined #ruby
jamto11 has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
sheperson has quit [Ping timeout: 255 seconds]
pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
t_mmyv has quit [Quit: Textual IRC Client: www.textualapp.com]
solocshaw has joined #ruby
YankNYC has joined #ruby
<[k-> :o i would have used respond_to? there and then
<[k-> that wouldn't have worked though
prateekp has joined #ruby
speakingcode has quit [Ping timeout: 268 seconds]
<prateekp> i have a gem which has dependency on rake for installation
<prateekp> how can i make sure that if rake is not installed on the system it throws error
<prateekp> i am calling from extconf.rb in system("rake mytask")
_blizzy_ has joined #ruby
Jackneill has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.4-dev]
AlexRussia has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
KensoDev_ has quit [Ping timeout: 255 seconds]
_blizzy_ has joined #ruby
<grzegorz> prateekp you can do "require 'rake'" and something like "raise RuntimeError, 'missing rake' unless defined?(Rake)
<grzegorz> but if you add rake as dependency to your gemspec, it should be installed when your gem is installed
karapetyan has quit [Remote host closed the connection]
<grzegorz> so there should never be a situation where rake is not present in the system, right?
<prateekp> so how should i do that
<prateekp> hmm right
<prateekp> i can do without rake as well. But rake makes thing look good
<grzegorz> hmm, but calling "system('rake')" might not be the best idea
<grzegorz> for example, I use "bundle exec rake" to select the proper rake version
<prateekp> ahh "system('rake')" is not good?
houhouli_ has quit [Remote host closed the connection]
<grzegorz> I think you should rather use "Rake::Task['mytask'].invoke"
ndrei has joined #ruby
karapetyan has joined #ruby
<prateekp> hmm yeah i should try it
<jhass> prateekp: extracting things so that you can do MyGem::ExtensionBuilder.build in both the task and extconf.rb would certainly be a lot nicer
<prateekp> jhass: i dint get that
houhoulis has joined #ruby
koolkidzklub has quit [Ping timeout: 246 seconds]
<jhass> build a class that does whatever your task currently does, call it from the task and extconf.rb directly
tejasmanohar has joined #ruby
<prateekp> hmm seems nice
<prateekp> and that class should be somewhere in lib/ ?
<jhass> yes
<jhass> somewhere in lib/your_gem to be specific
shoutsid has quit [Remote host closed the connection]
<prateekp> i am currently having only one file in lib/
<prateekp> no folders
<prateekp> is that the wrong way to go abt it
<prateekp> though i can make lib/your_gem and require that lib/your_gem/file in lib/mygem.rb
<prateekp> which is a better way to do
Pro| has quit [Ping timeout: 240 seconds]
<jhass> it's not wrong
<jhass> if you add stuff it should just be inside your namespace
<prateekp> yeah right
Guest36 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<prateekp> so in that case i should add some utility class in my gem's namespace
<prateekp> and then call it from both extconf and rakefile
benlieb has quit [Quit: benlieb]
Pro| has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
dikaio has quit [Quit: ........]
<prateekp> but that class should be private
<prateekp> and not public
mmasaki has quit [Quit: bye]
KensoDev has joined #ruby
houhoulis has quit [Remote host closed the connection]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
shoutsid has joined #ruby
sanjayu has joined #ruby
SCHAAP137 has joined #ruby
shoutsid has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<karapetyan> hi there
<karapetyan> does anyone know how to solve it?
shoutsid has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
bowl323 has joined #ruby
shoutsid has quit [Remote host closed the connection]
<bowl323> Hello.
<jhass> hi
bowl323 has left #ruby [#ruby]
shoutsid has joined #ruby
<jhass> karapetyan: there's probably some math trick for it, but why don't you start with a naive iterative approach?
bubbys has quit [Ping timeout: 250 seconds]
bubbys has joined #ruby
shoutsid has quit [Remote host closed the connection]
subscope has joined #ruby
xcesariox has joined #ruby
Helius has quit [Ping timeout: 240 seconds]
<prateekp> hi jhass: i am getting bit confused
<prateekp> where should i make the class
shoutsid has joined #ruby
<prateekp> and using system('rake mytask') in extconf.rb does nothing when rake is not present
<prateekp> it does not throw error as well
<prateekp> how can i make sure rake is installed by user along with gem
<prateekp> should i add it in runtime dependency?
<karapetyan> jhass: cause it's endless sequence and when i generating new member of sequence i can't compare with element's that was not generated yet
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 has joined #ruby
<jhass> prateekp: the point of introducing a class is to get rid of system("rake") or any Rake dependency
sdothum has joined #ruby
<jhass> karapetyan: write me a method that returns Pn for a given n
jamto11 has joined #ruby
solocshaw1 is now known as solocshaw
<prateekp> jhass: should i define the class in extconf itslef
<prateekp> ?
shoutsid has quit [Remote host closed the connection]
shoutsid has joined #ruby
<jhass> prateekp: unless you want to keep your rake task too that's a possibility
sameerynho has joined #ruby
<prateekp> ok suppose i make a class in lib/mygem/util.rb, then how would i access it in extconf
<prateekp> by using require 'mygem'
stamina has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> prateekp: with require_relative
lxsameer has quit [Ping timeout: 240 seconds]
<jhass> karapetyan: not what I asked for
jamto11 has quit [Ping timeout: 255 seconds]
<karapetyan> jhass: ok
khebbie has joined #ruby
atmosx has quit [Quit: WeeChat 0.4.4-dev]
<prateekp> ok
<prateekp> jhass: now tell me the best location to keep such class
<prateekp> in lib/
<prateekp> ?
apt-get has joined #ruby
<jhass> lib/foo/extension_builder.rb? depends on what you want to name it
<jhass> karapetyan: that's a class printing it to stdout, not a method returning it
kies^ has joined #ruby
mm_ has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
<jhass> karapetyan: still a class for no reason
<jhass> pe will have no useful value
<karapetyan> jhass: ok
<karapetyan> jhass: what next? :)
<jhass> karapetyan: memoize the computation, eg. cache the results in a hash. Setting Hash#default_proc might come in handy
<karapetyan> memoize?
<karapetyan> :/
Salehi has joined #ruby
<jhass> remember, cache
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sanjayu has quit [Ping timeout: 255 seconds]
Voker57 has joined #ruby
karapety_ has joined #ruby
<karapety_> hi
spider-mario has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
nfk has joined #ruby
roshanavand has joined #ruby
decoponio has joined #ruby
wallerdev has quit [Quit: wallerdev]
BTRE has quit [Quit: Leaving]
<prateekp> jhass: i added class and removed rake.
<prateekp> but now tell me a good place to keep this class
<prateekp> should i keep in it in lib/
<prateekp> or what about bin/ ?
<prateekp> whats the best practice?
<jhass> prateekp: didn't I already?
<prateekp> actually files in lib/ belong to gem, right?
PaulCape_ has joined #ruby
<prateekp> so i was a bit confused
<prateekp> hmm but its ok i think
<prateekp> lets go with lib/util/extenion_builder.rb
bruno- has joined #ruby
PaulCapestany has quit [Ping timeout: 240 seconds]
roshanav_ has joined #ruby
<Diabolik> Radar, around?
<Diabolik> I didn't see your reply because i got too many messages :(
roshanavand has quit [Ping timeout: 246 seconds]
Salehi has quit [Quit: Leaving]
grzegorz has quit [Remote host closed the connection]
<jhass> ?logs
<ruboto> You can find a log of this channel at http://irclog.whitequark.org/ruby/
Chau has joined #ruby
karapety_ has quit [Remote host closed the connection]
jgt has joined #ruby
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doddok has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
vedis has joined #ruby
joonty has joined #ruby
BTRE has joined #ruby
tkuchiki has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
perrier_ has quit [Read error: Connection reset by peer]
rosenberg has joined #ruby
mikecmpbll has joined #ruby
rosenberg has left #ruby [#ruby]
_blizzy_ has quit [Ping timeout: 264 seconds]
prateekp has quit [Ping timeout: 246 seconds]
UtkarshRay has quit [Ping timeout: 246 seconds]
khebbie has quit [Ping timeout: 260 seconds]
UtkarshRay has joined #ruby
htmldrum has quit [Ping timeout: 272 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.2]
DanKnox has quit [Quit: Textual IRC Client: www.textualapp.com]
jamto11 has joined #ruby
lolmaus has joined #ruby
PhantomS_ has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
PhantomSpank has quit [Ping timeout: 240 seconds]
ohcibi has joined #ruby
skade has joined #ruby
<shevy> <Radar> Diabolik: Get the 2nd edition
<shevy> <Radar> Diabolik: 2nd edition has the most up-to-date content :)
pawnbox_ has quit [Remote host closed the connection]
<ohcibi> hi, i have a time like "13:00" and i want to add minutes... i'm not adding more than 200 minutes, so there is no daychange involved and I dont need to mess with timezones or anything, i just want to be able to 13:00 + 80 = 14:20.. can I do this with the Time class somehow? all i'm finding is adding or deleting times to a specific date
pawnbox has joined #ruby
<Diabolik> shit i just bough the first edition :(
<shevy> ohcibi you can use + for seconds
<jhass> ohcibi: or simply strptime it
<shevy> so 80 minutes would be (80 * 60) seconds
mm_ has joined #ruby
<ohcibi> shevy: read what I wrote.... i'm asking how to do this without referencing a specific date and time, which is all I found in google..
<apeiros> nonono @strptime
<apeiros> Time != Duration, and "13:00" in the sense of "13 hours" is a duration, not a time.
beauby has joined #ruby
karapetyan has joined #ruby
shoutsid has quit [Remote host closed the connection]
<jhass> ohcibi: might be 13:00 o'clock, question was vague in that regard
<jhass> er, apeiros ^
kalusn has quit [Remote host closed the connection]
<ohcibi> its NOT 13 o clock
<ohcibi> its 13 hours and zero minutes
<apeiros> jhass: ok, true. but now we have clarification :)
<shevy> aaaah
<ohcibi> 13 hours and zero minutes can usually be displayed as 13:00
<ohcibi> same as 13 o clock would be displayed
<shevy> yes!
<jhass> 13 minutes and 0 seconds is too
<shevy> haha
<ohcibi> so i want to add 20 minutes to 13 hours and zero minutes and not to 13 o clock
<jhass> well see my link and add :00 to make it unambiguous
<shevy> I needed something like that for calculating how much video to cut away via ffmpeg once
roshanav_ has quit [Read error: Connection reset by peer]
<ohcibi> so there is no builtin class that can deal with this, is this kind of math hardcoded into the Time class? i'd expect that the Time class uses some independent module to do such calculations?
<jhass> doesn't it use libc for most of that stuff?
YankNYC has quit [Quit: Connection closed for inactivity]
<jhass> so no, there isn't
<jhass> Time deals with points in time only, not duration
<ohcibi> idk... its terribly hard to google for this, as 99% is related to "Time" and not "Duration" problems
<shevy> didn't apeiros have some gem called chronos or so for that?
<ohcibi> nah i dont want to use an extra gem
<ohcibi> i'm writing a rakefile and the only thing I want to expect from the users is that they have ruby installed
<jhass> hours, minutes = .split(":").map(&:to_i) works too I guess
<shevy> :)
skade has quit [Quit: Computer has gone to sleep.]
<ohcibi> what I need is the other way around, but yes, it'll work
<jhass> "the other way around" is a simple divmod
<ohcibi> i know
<ohcibi> but i dont need to do this when dealing with Time
<ohcibi> so i've asked if this is possible with durations but not with Time
<jhass> you're not dealing with times though, you're dealing with durations
<ohcibi> yes
<ohcibi> thats what we learned some lines above 8-)
<jhass> and the answer is no, stdlib doesn't have any duration handling
peteykun has quit [Ping timeout: 250 seconds]
<shevy> stdlib understands time though!
joonty has quit [Quit: joonty]
<ohcibi> jhass: youve already told me that 8-)
<shevy> jhass: you already told him that several times!
<jhass> then why are we still talking?
<ohcibi> jhass: idk
<ohcibi> shevy: time but not duration
<shevy> perhaps a Time.duration method
sheperson has joined #ruby
mllie has joined #ruby
<shevy> but duration is not time!
<shevy> assumingly ruby core would not want to add a new Duration toplevel namespace either
<jhass> the question is if Time#-(Time) is duration
bowl323 has joined #ruby
<jhass> shevy: in Crystal we're calling it Time::Span for now
<shevy> aha
<bowl323> I'm looking to learn either Ruby or Python, which is the better choice?
<jhass> bowl323: Ruby. Now ask #python and get Python as reply.
<mllie> Hello! I've just updated rvm and got some warnings: http://pastebin.com/eYTdeUw6. What's that?
<ruboto> mllie, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5adba66e501412b33d41
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<shevy> no idea if python has such an interview
<shevy> I still wonder what would have been different if I would have picked python back then
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<jhass> mllie: seems pretty clear, any questions?
<jhass> ?better bowl323
<ruboto> bowl323, "Best" and "better" are subjective. Try to use a different term.
shoutsid has joined #ruby
<shevy> you could also try to go with perl 6 past 2015 bowl323 :)
pawnbox has quit [Remote host closed the connection]
<mllie> jhass: Yes, for example what does rvm cleanup all?
<shevy> larry wall's keynote was all about hobbits
pawnbox has joined #ruby
<havenn> mllie: You can read about the `rvm cleanup all` command with `rvm help cleanup`.
<jhass> mllie: I would expect rvm help cleanup explains it
leafybasil has joined #ruby
lkba has joined #ruby
<havenn> shevy: hobbitses do make good programmers
<mllie> jhass: Alright, and what do I need to fix for these warnings then? And how do I recheck if I've done right?
<jhass> you did read them, right?
tk__ has joined #ruby
bowl323 has left #ruby [#ruby]
bonhoeffer has joined #ruby
<mllie> jhass: yes
<jhass> so what do you think you would need to do?
<mllie> jhass: And I also think it's look a bit weird in my path variable with all these rvm-paths. Is that correct?
CloCkWeRX has quit [Ping timeout: 240 seconds]
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
pili-h has quit [Ping timeout: 250 seconds]
shoutsid has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 250 seconds]
<jhass> isn't RVM just telling you it isn't?
leafybasil has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
<mllie> jhass:true
karapetyan has joined #ruby
riotjone_ has joined #ruby
<havenn> mllie: `PATH="$PATH:/stuff"` is appending to PATH. `PATH="/stuff:$PATH"` is prepending to PATH. One of the RVM warnings is that you're nuking PATH like `PATH="/stuff:/existing/path/ignored"`.
<havenn> mllie: ^ Make any sense?
<mllie> havenn: Yes. That's fixed now
<mllie> havenn: This is the last warning though: Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see: https://github.com/wayneeseguin/rvm/issues/3212
charliesome has joined #ruby
khebbie has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
riotjone_ has quit [Ping timeout: 255 seconds]
<sheperson> The each_with_object method has been deprecated in Rails and moved to Ruby, am I right?
<sheperson> not moved, added
<Mon_Ouie> It's been part of Ruby since 1.9.something
<havenn> mllie: You might consider rerunning the install script to setup your dotfiles for you: rvm get head --auto-dotfiles
roshanavand has quit [Ping timeout: 240 seconds]
roshanav_ has joined #ruby
<mllie> havenn: Tried it before, but now it worked also :D
<havenn> mllie: \o/
phutchins has joined #ruby
htmldrum has joined #ruby
<mllie> havenn: How do you do to auto change gemset + ruby when changing directory?
pandaant has joined #ruby
vedis has quit []
<havenn> mllie: Use a .ruby-version and if you like a .ruby-gemset file.
<mllie> havenn: I have that
roshanav_ has quit [Remote host closed the connection]
<bougyman> using rvm or chruby or rbenv?
CloCkWeRX has joined #ruby
<mllie> havenn: Haha, lol. Now it works... So much magic you provided :D
<mllie> Thanks havenn and jhass !!
<havenn> bougyman: Twas RVM.
<bougyman> cool.
tkuchiki has joined #ruby
tkuchiki_ has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
pili has joined #ruby
skade has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
kalusn has joined #ruby
peteykun has joined #ruby
PaulCapestany has joined #ruby
shoutsid has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
PaulCape_ has quit [Ping timeout: 268 seconds]
bonhoeffer has quit [Read error: Connection reset by peer]
arup_r has quit [Quit: Leaving]
bonhoeffer has joined #ruby
jamto11 has joined #ruby
Affix has quit [Ping timeout: 272 seconds]
<mllie> havenn: do you know ruby on rails as well?
yie has quit [Ping timeout: 272 seconds]
janno has quit [Ping timeout: 272 seconds]
yie has joined #ruby
khebbie has quit [Ping timeout: 250 seconds]
janno has joined #ruby
Affix has joined #ruby
async_prince has quit [Ping timeout: 272 seconds]
Affix is now known as Guest34461
async_prince has joined #ruby
shoutsid has quit [Remote host closed the connection]
<jhass> ?rails mllie
<ruboto> mllie, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
dvarrui has joined #ruby
jamto11 has quit [Ping timeout: 250 seconds]
roshanav_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
pili has quit [Quit: Leaving]
andykingking has joined #ruby
shoutsid has joined #ruby
codecop has joined #ruby
shoutsid has quit [Remote host closed the connection]
PaulCape_ has joined #ruby
apt-get has quit [Remote host closed the connection]
bonhoeffer has quit [Quit: bonhoeffer]
PaulCapestany has quit [Ping timeout: 250 seconds]
shoutsid has joined #ruby
Azure has joined #ruby
roshanavand has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
shoutsid has quit [Remote host closed the connection]
<noethics> D: ruby's json functionality sucks
roshana__ has joined #ruby
shoutsid has joined #ruby
roshanav_ has quit [Ping timeout: 240 seconds]
leafybasil has joined #ruby
<shevy> you so evil!
roshanavand has quit [Ping timeout: 240 seconds]
shoutsid has quit [Remote host closed the connection]
<noethics> :'(
<[k-> did i hear evil???
<noethics> what is the preferred method of encoding arbitrary objects to json
bluOxigen has joined #ruby
rewzn has quit [Quit: WeeChat 1.1]
rewzn has joined #ruby
blueOxigen has quit [Ping timeout: 272 seconds]
<noethics> bnagy, pls i need the socratic method
<shevy> hehe
<noethics> fwiw i'm amazed that .to_json doesn't actually introspect my object
<noethics> how is it even useful
shoutsid has joined #ruby
weihan has quit [Read error: Connection reset by peer]
weihan has joined #ruby
tier has joined #ruby
mfb2 has joined #ruby
<shevy> to pass strings over the www!
weihan has quit [Max SendQ exceeded]
stardiviner has joined #ruby
<noethics> so long as your object is a hash or array!
weihan has joined #ruby
_blizzy_ has joined #ruby
nettoweb has joined #ruby
<noethics> otherwise you get a lovely to_s
tier has quit [Remote host closed the connection]
karapetyan has joined #ruby
xcesariox has joined #ruby
shoutsid has quit [Remote host closed the connection]
amystephen has joined #ruby
shoutsid has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
mllie has quit [Quit: Page closed]
dvarrui has quit [Ping timeout: 264 seconds]
shoutsid has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 250 seconds]
prestorium has quit [Ping timeout: 268 seconds]
_blizzy_ has joined #ruby
rodfersou has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: leaving]
shoutsid has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DEA7TH has quit [Quit: DEA7TH]
leafybasil has quit [Remote host closed the connection]
mm_ has joined #ruby
Kendos-Kenlen has joined #ruby
stardiviner has quit [Ping timeout: 246 seconds]
stardiviner has joined #ruby
nettoweb has joined #ruby
acke has joined #ruby
<[k-> ruby doesn't even know what is the purpose of your object
<[k-> and json doesn't know the way your object should be represented
<[k-> how do you expect a representation to pop out of nowhere?
shoutsid has quit [Remote host closed the connection]
psy has quit [Ping timeout: 246 seconds]
psy has joined #ruby
<shevy> we want intelligent systems
shredding has joined #ruby
nettoweb has quit [Ping timeout: 250 seconds]
shoutsid has joined #ruby
rgtk has joined #ruby
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
segmond has quit [Ping timeout: 240 seconds]
beauby has quit [Ping timeout: 244 seconds]
rgtk has quit [Client Quit]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Kendos-Kenlen has joined #ruby
dc_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
jamto11 has joined #ruby
odt has left #ruby ["Leaving"]
jamto11 has quit [Ping timeout: 250 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
shoutsid has quit [Remote host closed the connection]
jdawgaz has joined #ruby
bonhoeffer has joined #ruby
ndrei has joined #ruby
sheperson has quit [Ping timeout: 250 seconds]
ItSANgo has joined #ruby
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
DEA7TH has joined #ruby
The_Phoenix has joined #ruby
bonhoeffer has quit [Client Quit]
shoutsid has joined #ruby
rgtk_ has joined #ruby
roshana__ has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
Kendos-Kenlen has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
Kendos-Kenlen has joined #ruby
_blizzy_ has joined #ruby
rodfersou has quit [Quit: leaving]
skweek has quit [Remote host closed the connection]
mistermocha has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
sgambino has joined #ruby
Bellthoven has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
Encapsulation has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
nanoz has joined #ruby
bonhoeffer has joined #ruby
atomical has joined #ruby
David27 has joined #ruby
Encapsulation has joined #ruby
Kendos-Kenlen has quit [Ping timeout: 250 seconds]
gambl0re has quit [Ping timeout: 240 seconds]
leafybasil has joined #ruby
Kendos-Kenlen has joined #ruby
cout_ is now known as cout
jessemcgilallen has joined #ruby
karapetyan has joined #ruby
mdst has quit [Ping timeout: 264 seconds]
davidt has quit [Ping timeout: 250 seconds]
gambl0re has joined #ruby
kalusn has quit [Remote host closed the connection]
mjmac has quit [Quit: ZNC - http://znc.sourceforge.net]
CrazyEddy has joined #ruby
roshanavand has joined #ruby
ThaiWood has quit [Ping timeout: 255 seconds]
dawkirst has joined #ruby
acke has quit [Remote host closed the connection]
khebbie has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
dorei has joined #ruby
michael_mbp has quit [Excess Flood]
acke has joined #ruby
michael_mbp has joined #ruby
spider-mario has quit [Ping timeout: 240 seconds]
AustinIncognito has quit [Remote host closed the connection]
AustinMatherne has joined #ruby
<noethics> same way serializing to json works in like every other language ;p
davidt has joined #ruby
<bonhoeffer> does anyone know what might be going on here: https://gist.github.com/tbbooher/ffff9e6a5d4cc63da00a
<bonhoeffer> i get this as an output: ��+��
arup_r has quit [Ping timeout: 240 seconds]
spider-mario has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
mdst has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
zapata has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
jamesaxl|2 has joined #ruby
DoubleMalt has joined #ruby
tk__ has quit [Quit: ばいばい]
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Ping timeout: 246 seconds]
brunto has joined #ruby
jamto11 has joined #ruby
PaulCapestany has joined #ruby
lkba_ has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
PaulCape_ has quit [Ping timeout: 250 seconds]
PaulCapestany has quit [Max SendQ exceeded]
stardiviner has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 264 seconds]
jamto11 has quit [Ping timeout: 244 seconds]
PaulCapestany has joined #ruby
SylarRuby has quit []
sameerynho has quit [Quit: Leaving]
Zamyatin has joined #ruby
DoubleMalt has joined #ruby
Soda has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grzegorz has joined #ruby
ericjphillips has joined #ruby
arup_r has joined #ruby
The_Phoenix has quit [Ping timeout: 268 seconds]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
<yardenbar> Hi all, can anyone suggest how to connvet from a ruby 1.8.6 script(yep, can't upgrade) to a Vertica node?
<shevy> what is a vertica node
dawkirst has quit [Quit: Leaving...]
The_Phoenix1 has joined #ruby
ericjphillips has quit [Quit: Leaving.]
ericjphillips has joined #ruby
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shredding has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Ping timeout: 255 seconds]
mm_ has joined #ruby
<[k-> we don't even know if such a thing as a vertical node exists
<[k-> and all these weird nomenclature floating around doesnt help!
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> yeah and people using 1.8.6
<shevy> it's like the past comes alive!
shinnya has joined #ruby
mm_ has quit [Ping timeout: 240 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
tkuchiki_ has quit [Remote host closed the connection]
freezevee has quit [Ping timeout: 260 seconds]
<yardenbar> I meant HP Vertica
ruurd has joined #ruby
jdawgaz has joined #ruby
jamto11 has joined #ruby
freezeve_ has joined #ruby
karapetyan has joined #ruby
<noethics> step 1. find someone who knows ruby and vertica
<noethics> step 2. hire them
freezeve_ has quit []
freezevee has joined #ruby
roshanavand has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<yardenbar> Done :)
apt-get has joined #ruby
chipotle has quit [Quit: cheerio]
roshanavand has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
brunto has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has joined #ruby
karapetyan has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Emmanuel_Chanel> Hello! Is there a good web explanation how to save IMAP folder's mails into local Maildir?
<bougyman> what did you google for?
<bougyman> fetchmail should be able to cut that pretty easily.
<bougyman> are you looking for a ruby solution, or just a solution?
<Emmanuel_Chanel> I saw some ruby scripts. And I edited one into my own script reading an IMAP folder and saving them into my local IMAP server.
<Emmanuel_Chanel> It categorize those mails to some. But I don't want to show my local shell password.
<jhass> fetchmail + sieve ?
<Emmanuel_Chanel> Ruby solution.
<Emmanuel_Chanel> ok. I check.
apt-get has quit [Ping timeout: 250 seconds]
<jhass> for example pigeonhole for dovecot
Xiti has quit [Quit: Xiti]
<shevy> yardenbar well when it comes to ruby, such as syntax problems, you can always put problematic code on a pastie and people can try to help; HP Vertica though, I don't think many people know it, I never heard of it before for instance
lolmaus has joined #ruby
Cyther has quit [Quit: Leaving]
<yardenbar> shevy, thank you, I'll persue a solution through Vertica and not deal with ruby stuff
guardianL has joined #ruby
mfb2 has quit [Quit: Leaving.]
<yardenbar> Its not a must
guardianL has left #ruby [#ruby]
Mia has quit [Read error: Connection reset by peer]
<DEA7TH> def A.bar '' end - after I did that, can I undo it?
grenierm has joined #ruby
<DEA7TH> I need to mock a method, but instead of returning a constant value, I want the output to depend on the input
<adaedra> You can override it by re-defining it again
<noethics> if i had a module embedded in a class, how do i access stuff inside the module with an instance of the class?
<DEA7TH> I want to restore the original implementation, but I don't want to copypaste it.
vdamewood has quit [Ping timeout: 252 seconds]
<shevy> DEA7TH you can knock out methods; remove_method; undefine_method, however had if you have not captured the original implementation somewhere then there is no way to restore to it
<noethics> >> class A; module B; def C(); puts 'o'; end; end; end; a = new A::B; a.C()
<ruboto> noethics # => undefined method `new' for main:Object (NoMethodError) ...check link for more (https://eval.in/448628)
acke_ has joined #ruby
acke has quit [Read error: Connection reset by peer]
<noethics> A::B.new
<noethics> ?
<shevy> a non-ruby user!!!
<noethics> >> class A; module B; def C(); puts 'o'; end; end; end; a = A.new; a::B.C()
<ruboto> noethics # => #<A:0x4083bd60> is not a class/module (TypeError) ...check link for more (https://eval.in/448629)
<shevy> he put the new on the left side !
<noethics> :'(
fon has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
tier_ has joined #ruby
riskish has joined #ruby
<fon> In Ruby, what exactly is the top-level scope? Is it a class? A module?
sankaber has joined #ruby
sankaber has quit [Remote host closed the connection]
<jhass> fon: an anonymous instance of Object called main
<noethics> you pretty much do what you want
sankaber has joined #ruby
<shevy> hmmm
<adaedra> >> p self # fon
<ruboto> adaedra # => main ...check link for more (https://eval.in/448630)
<shevy> anonymous with a name ...
peteykun has quit [Ping timeout: 250 seconds]
<adaedra> meh, thought there would me more shown :|
<jhass> shevy: anonymous in the sense that you don't have an identifier to refer to except the toplevel self
<fon> So the code at the top-level scope is essentially inside an instance?
<jhass> >> self.class
<ruboto> jhass # => Object (https://eval.in/448631)
<shevy> fon the mother of everything! class Object!
<noethics> HOW
<noethics> :(
<jhass> dunno, I don't do repl.it, it's horrible
<noethics> well i put the code here
<shevy> how can a.B. work there noethics
<adaedra> that's not modules work
<shevy> B is not a method
<noethics> idk, i legit have no idea how to access C
<jhass> include or extend B somewhere
grenierm has quit [Quit: grenierm]
tier_ has quit [Ping timeout: 260 seconds]
<jhass> &ri Module#include Module#extend Module#prepend
<shevy> `derpy! you are back!
<noethics> `derpy!!!
roshanavand has joined #ruby
<adaedra> shevy: it was gone?
<fon> shevy: I don't quite get this. Where can I learn more about this?
<shevy> we need more bots that can show links!
<noethics> i need a bot to show me code to use C
<jhass> fon: do you have some more specific question perhaps?
jamto11 has quit [Remote host closed the connection]
<adaedra> noethics: C is a module, you have to include it somewhere to use methods inside.
<noethics> ive read these docs
<noethics> but they dont show an instance like this
apt-get has joined #ruby
<noethics> do i refer to it with A::B and extend that?
<jhass> yes
<fon> jhass: I just don't understand how the top-level scope is an instance of Object. That must mean the code at the top-level is being writting inside an instance of Object. How can we write code inside an instance?
<noethics> ruby is like the wild west of languages
<jhass> &ri Object#instance_eval @fon
<noethics> you do whatever you want legit
<DEA7TH> Am I supposed to use remove_method like this https://gist.github.com/VelizarHristov/ab6e11db75f4c41aea95
<noethics> "Am i supposed to".... yes
<noethics> jk ignore me
<DEA7TH> my goal is to restore to 'Original'
<jhass> noethics: don't drink and IRC
<fon> I want to read The Programming Language by Matz but it's too old.
<fon> The Ruby Programming Language*
<jhass> DEA7TH: Write delegator and unwrap. See SimpleDelegator in the delegate stdlib
roshanavand has quit [Ping timeout: 250 seconds]
<jhass> Write a *
lubarch has joined #ruby
<fon> jhass: Okay what happens when we require a file? Does the file get executed in a top-level scope that's above the main scope?
moeabdol has joined #ruby
_blizzy_ has quit [Ping timeout: 268 seconds]
<jhass> fon: each file gets its own main instance, local variables are local to a file
<DEA7TH> jhass: that only seems to work for instances, but I'm using a class method
<shevy> if we have class Foo; end, and two different modules, can we uninclude one module, then attach the second one, then remove the second one again, and attach the first one? like module flip-flopping?
diegoaguilar has joined #ruby
justin_pdx has joined #ruby
<jhass> fon: the definee is Object, so constants get childs of the Object namespace, methods get private methods on Object
<jhass> DEA7TH: a class is just an instance of Class
<jhass> shevy: delegator for you too
<noethics> ok team i did it
Mon_Ouie has quit [Ping timeout: 272 seconds]
<noethics> i dont understand why the author of this code decided to do this
<jhass> solve your problems with composition, not inheritance
pawnbox has quit [Remote host closed the connection]
<DEA7TH> ugh. Is there a simple way to stub a method so that it returns a value depending on the input? And then unstub it
ruurd has quit [Quit: ZZZzzz…]
<jhass> DEA7TH: are you doing this for testing?
<noethics> whats the point of putting a module in a class if you can't reference the module with an instance of the class
justin_pdx has quit [Client Quit]
pawnbox has joined #ruby
<noethics> are there legitimate use cases?
<jhass> noethics: the fact that it's a class is irrelevant, it's simply used as a namespace here
<DEA7TH> jhass: Yes. The tested method takes an array and saves the adjacency matrix for its elements. Internally it uses a class to query Google Maps API in order to get the distances.
<DEA7TH> I want to stub the internal class so that it returns certain things, which then I expect to be saved to the DB
<DEA7TH> It sometimes recursively calls itself, and I don't want to tightly couple tests to that. I want to test for correct behavior only
<noethics> jhass, oh
yardenbar has quit [Ping timeout: 252 seconds]
<DEA7TH> But I have a simple solution as long as I can make a dynamic stub
ruurd has joined #ruby
<jhass> DEA7TH: ideally you would make that class a parameter so you could pass a stub one in your class. But which testing framework?
<jhass> * in your tests
<DEA7TH> jhass: TestUnit with shoulda-context, mocha and factory girl.
candelabra has joined #ruby
<shevy> aha so all of them
fon has quit [Quit: Page closed]
<candelabra> If I'm trying to programatically access the data at this url: https://transcription.si.edu/json/October062015TransGeo.json and I have the username and password it's asking for, whats the best approach? What would you call that type of authentication?
andykingking has quit [Quit: Leaving.]
<jhass> DEA7TH: so use mocha?
<DEA7TH> will try that
<jhass> candelabra: that's called basic auth most commonly
Xiti has joined #ruby
<candelabra> jhass: Would I use net/http for that? open-uri?
<jhass> I *think* most convenience wrappers will parse it in formats like https://user:password@transcript....
ttilley has quit [Read error: Connection reset by peer]
<jhass> &ri Net::HTTP.get_response
<jhass> worth a shot ^
<candelabra> thanks guys
<jhass> the variant that takes an URI of course
<jhass> ?guys candelabra
<ruboto> candelabra, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<candelabra> thanks everyone*
<jhass> :)
<candelabra> i immediately said guys and almost said "and/or gals" and should have
<candelabra> but everyone, folks, all would have been better
<jhass> it's fine, no worries
roshanavand has joined #ruby
Dopagod has joined #ruby
<shevy> yo girls
<jhass> shevy: hey ponycorn
<shevy> hah
<shevy> huh
<shevy> we have really strange terms in ruby
<shevy> "Un-monkey patching"
<shevy> Ugh Ugh!
<jhass> DEA7TH: so throw out mocha and implement your own mocking framework I guess
<DEA7TH> jhass: I hope that for the remaining 99%, it will work fine
<jhass> because not invented here or something
CloCkWeRX has quit [Ping timeout: 272 seconds]
<jhass> if it doesn't work for that it's a worthless pile of junk
<dorei> is monkey patching a subtle reference to monkeys typing random stuff that'll eventually type shakespear's works? :D
<DEA7TH> jhass: mocha didn't support that use case
<DEA7TH> it was a very obscure use of recursion where each recursive call won't call itself again. And I wanted to test in a certain way.
bluOxigen has quit [Ping timeout: 260 seconds]
<jhass> sounds like you test implementation instead of observable behavior
s00pcan has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 256 seconds]
weihan has quit [Quit: Leaving...]
ndrei has quit [Ping timeout: 240 seconds]
<shevy> dorei good question, not entirely sure how it originated. I think monkeys are awesome but it's often used as if it were a bad thing to be able to modify core behaviour (except for not being able to restore to the tabula rasa state, I think ruby should offer that for core/stdlib components)
roshanavand has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
simplyianm has quit [Remote host closed the connection]
s00pcan has joined #ruby
simplyianm has joined #ruby
cashnguns has joined #ruby
codecop has quit [Remote host closed the connection]
<shevy> one day monkeys may be able to program
<shevy> bonobos can do sign language, for about 300 or 400 elements
<shevy> hmm nope... I meant to say, they can *understand* it... I don't think they can do so on their own
bonhoeffer has joined #ruby
tkuchiki has joined #ruby
<noethics> they can play games on ipads
vdamewood has joined #ruby
<shevy> I see them in the subway!
moeabdol has quit [Ping timeout: 240 seconds]
<DEA7TH> (Actually I had to use Foo.singleton_class.send(:alias_method, :old_bar, :bar) for class methods but it works now)
fooxbar has joined #ruby
<noethics> i'm not sure that i like ruby at all
<noethics> everything feels like i'm doing reflection
tkuchiki has quit [Ping timeout: 265 seconds]
patdohere has joined #ruby
SylarRuby has joined #ruby
peteykun has joined #ruby
rippa has joined #ruby
The_Phoenix1 has quit [Ping timeout: 264 seconds]
<shevy> reflection?
CloCkWeRX has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<noethics> "Foo.singleton_class", "Foo.class_eval", "Foo.instance_methods"
soosfarm has quit [Ping timeout: 268 seconds]
<noethics> like i'm referring to runtime variables because of limitations in the language or something
soosfarm has joined #ruby
<noethics> i feel like maybe if i wrote this codebase then i could design it the way i want and not have to rely on this stuff though
<DEA7TH> it is a rare use case
<noethics> so maybe slightly biased opinion
kalusn has joined #ruby
acke has joined #ruby
The_Phoenix has joined #ruby
soosfarm has quit [Excess Flood]
soosfarm has joined #ruby
<noethics> i learn ruby again every 6 months it seems like
<shevy> the names can be strange yeah
<shevy> .instance_eval versus .class_eval
<noethics> like the fact that using that is even a thing
<noethics> i could see if you were doing it for serialization or instrumentation
<shevy> I don't think I ever had to do Foo.singleton_class though
<[spoiler]> they can be useful
<noethics> but it's totally normal to use these runtime thingies in common code
rgtk_ has quit []
<noethics> which seems bad to me intuitively
<[spoiler]> instance_eval can be useful when you're making a DSL, altho other than that I'd not use it unless it's debugging
acke_ has quit [Ping timeout: 255 seconds]
tmtwd has joined #ruby
Coldblackice_ has quit [Ping timeout: 244 seconds]
jsuth has joined #ruby
<noethics> fwiw .to_json should do whatever YAML::dump does. i ended up dumping to YAML, passing it to a proper language, parsing the YAML and dumping the json
<shevy> why
<shevy> yaml is different to json isn't it?
<noethics> you can represent everything that YAML::dump marshals as json
shoutsid has quit [Remote host closed the connection]
EllisTAA has joined #ruby
patdohere has quit [Read error: Connection reset by peer]
jessemcgilallen has joined #ruby
Kerber0s has joined #ruby
Kerber0s has quit [Client Quit]
<shevy> we need that in ruby too, noethics will be the main author :)
jamto11 has joined #ruby
<noethics> " based on whether the language makes it difficult for its developers to write error-free code"
<noethics> Kappa
stamina has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
<shevy> computers should program
sczizzo has joined #ruby
jamto11_ has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
tier_ has joined #ruby
jamto11 has quit [Ping timeout: 260 seconds]
sczizzo has quit []
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
nerium has joined #ruby
Kerber0s has joined #ruby
<jhass> yaml is a superset of json these days
mistermocha has joined #ruby
PaulCape_ has joined #ruby
jgt has joined #ruby
<nerium> If I have a pam file (SSL root certificate), do I need to add it to my servers list of certificates or can I just pass it a long when doing the request?
PaulCapestany has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
_Kerber0s_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
tmtwd has joined #ruby
_Kerber0s_ has quit [Client Quit]
<jhass> I like to peek into faraday for a quickref of what one can set in a http library, https://github.com/lostisland/faraday/blob/master/lib/faraday/adapter/net_http.rb#L98-L109
shoutsid has quit [Remote host closed the connection]
lubarch has quit [Ping timeout: 244 seconds]
bigmac has joined #ruby
<DEA7TH> A lot of pywhat makes sense. Some is really weird. `False == False in [False]` returns True
lubarch has joined #ruby
shoutsid has joined #ruby
<jhass> well, that's just precedence rules?
<DEA7TH> No.
<DEA7TH> all possible precedence would return False
candelabra has quit [Ping timeout: 240 seconds]
tmtwd has left #ruby ["Leaving"]
shoutsid has quit [Remote host closed the connection]
jsuth has quit [Remote host closed the connection]
darkxploit has quit [Ping timeout: 252 seconds]
<jhass> mmh
UtkarshRay has joined #ruby
Jardayn has joined #ruby
mistermocha has joined #ruby
<shevy> it's the way of the slithering scales
dopie has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
bonhoeffer has joined #ruby
UtkarshRay has quit [Ping timeout: 246 seconds]
_blizzy_ has joined #ruby
shoutsid has quit [Remote host closed the connection]
sepp2k has joined #ruby
Or1on has joined #ruby
Zamyatin has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
darkxploit has joined #ruby
shoutsid has joined #ruby
tkuchiki has joined #ruby
Kendos-Kenlen has quit [Ping timeout: 252 seconds]
<havenn> good mornin'
_blizzy_ has quit [Read error: Connection reset by peer]
pandaant has quit [Remote host closed the connection]
northfurr has joined #ruby
RobertBirnie has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
fooxbar has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
codecop has joined #ruby
_blizzy_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 250 seconds]
tmtwd has joined #ruby
Kendos-Kenlen has joined #ruby
Zamyatin has joined #ruby
tier_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
hanmac has quit [Ping timeout: 240 seconds]
Kendos-Kenlen has quit [Client Quit]
modern has quit [Quit: Leaving]
armyriad has quit [Quit: Leaving]
benlieb has joined #ruby
havenwood has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
benlieb has quit [Client Quit]
shredding has joined #ruby
mistermocha has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
havenwood has joined #ruby
lapide_viridi has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
simplyianm has quit [Remote host closed the connection]
ruurd has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
ndrei has joined #ruby
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
Zamyatin has quit [Ping timeout: 255 seconds]
lubarch has quit [Ping timeout: 250 seconds]
lubarch has joined #ruby
ruurd has quit [Ping timeout: 260 seconds]
havenwood has quit [Changing host]
havenwood has joined #ruby
inteq has quit [Remote host closed the connection]
maletor_ has joined #ruby
davedev24 has joined #ruby
last_staff has joined #ruby
ericjphillips has quit [Quit: Leaving.]
hanmac has joined #ruby
grzegorz has quit [Remote host closed the connection]
<bonhoeffer> are there any docs for ffi inputs, etc — for example, should [:string] stand for an array that contains a tokenized copy of the input text
jgt has quit [Ping timeout: 264 seconds]
eminencehc has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
stamina has joined #ruby
Kendos-Kenlen has joined #ruby
speakingcode has joined #ruby
otherj has joined #ruby
Zamyatin has joined #ruby
ruurd has joined #ruby
grzegorz has joined #ruby
jamto11_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
atmosx has joined #ruby
karapetyan has joined #ruby
mistermocha has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
aaeron has joined #ruby
aaeron has quit [Client Quit]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
framling has joined #ruby
bonhoeffer has joined #ruby
vdamewood has quit [Quit: Life beckons.]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<bonhoeffer> what does output like this mean: 8a��� — i’m exporting char** to :string in ffi
mistermocha has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
inteq has joined #ruby
northfurr has quit [Quit: northfurr]
Zamyatin has quit [Ping timeout: 265 seconds]
tinyhippo is now known as cowconfirmer
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
beauby has joined #ruby
grenierm has joined #ruby
exadeci has joined #ruby
swgillespie has joined #ruby
grenierm has quit [Client Quit]
stamina has quit [Quit: WeeChat 1.3]
ruurd has quit [Ping timeout: 256 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
ruurd has joined #ruby
Zamyatin has joined #ruby
lokson has joined #ruby
cowconfirmer is now known as tinyhippo
jamto11 has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
jamto11 has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
<nerium> jhass: Sorry, missed your message.
peteykun has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
<nerium> jhass: Yeah, that must be the same thing as adding the certificate to the server directly
<jhass> CertStore is in memory iirc
nk8 has joined #ruby
finisherr has joined #ruby
<mehwork> i'm really confused about when to use 'and' vs '&&' and this is making it more confusing https://github.com/bbatsov/ruby-style-guide/commit/5920497452c1f6f604742a735f5684e86d4c0003
Kerber0s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bonhoeffer has joined #ruby
<mehwork> they seem to be doing the same things in ruby 2.2.3 for me
roshanavand has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
<jhass> mehwork: I have an easy rule for myself: never use and for anything, always use && :P
<jhass> the difference is precedence
dopie has joined #ruby
michael_mbp has quit [Excess Flood]
grenierm has joined #ruby
<jhass> >> [(foo = 1 && 2), foo, (bar = 1 and 2), bar]
<mehwork> hmm puts 3 and 5 and 7 and false and 9 says 3 and puts 3 && 5 && 7 && false && 9 says false
<ruboto> jhass # => [2, 2, 2, 1] (https://eval.in/448666)
grenierm has quit [Client Quit]
Cache_Money has joined #ruby
northfurr has joined #ruby
<mehwork> shouldn't what i did print 7 or false if it's short circuiting once it reaches something false
<jhass> yup, former is (puts 3) and 5 ..., latter is puts(3 && 7 ...)
ruurd has quit [Quit: ZZZzzz…]
<Cache_Money> How do I get rid of all of these notifications when I run a Ruby file? https://gist.github.com/anonymous/2c790b691e6b92de3b1c
<jhass> mehwork: you're just discovering why "and is just not worth it" :P
<mehwork> oh it's parens, this says false: puts (3 and 5 and 7 and false and 9)
<jhass> Cache_Money: did you "try"?
<mehwork> alright thanks
atomical has quit [Read error: No route to host]
michael_mbp has joined #ruby
gregoriokusowski has joined #ruby
atomical has joined #ruby
ruurd has joined #ruby
rakm has joined #ruby
swgillespie is now known as swgillespie[ATL]
prateekp has joined #ruby
<Cache_Money> jhass: yes, still looking...
<prateekp> i wanted to add documentation to my gem page
bonhoeffer_ has joined #ruby
<prateekp> but on clicking documentation link rubygems.org/mygem it does not generate documentation
<shevy> it usually takes a while
bonhoeffer has quit [Ping timeout: 250 seconds]
bonhoeffer_ is now known as bonhoeffer
<prateekp> how can i link my lib file
nitrix is now known as ThePolice
<shevy> drink a wine and look again tomorrow
<Cache_Money> jhass: is it a simple solution?
Coldblackice_ has joined #ruby
<shevy> check on the documentation link prateekp - what is the name of the gem?
<jhass> Cache_Money: the message contains a suggestion
<havenwood> I did the PR to make the Try suggestion runnable but it'd be nice to make a single copy-pasteable block.
chipotle has joined #ruby
blackmesa has joined #ruby
ThePolice is now known as nitrix
<prateekp> it just puts README.md which i am passing through extra_rdoc_files option in gempec
ericjphillips has joined #ruby
Zamyatin has quit [Ping timeout: 252 seconds]
<Cache_Money> jhass: I tried `gem pristine --all` didn't work. I've tried running `gem prestine <gem>` before and it didn't get rid of the notifications
<prateekp> i think the reason is that the directory of source is differnect
<prateekp> its like project/dir/ruby/lib/*
<prateekp> oops
<prateekp> projectdir/ruby/lib/*
<jhass> probably
toretore has joined #ruby
<havenwood> Cache_Money: Try my comment on your gist.
<prateekp> shevy: can i specifically build only project/dir/ruby/lib/* sources documentation
<jhass> prateekp: why not put your C stuff into ext and have everything in ruby/ at the root?
ramfjord has joined #ruby
<Cache_Money> havenwood: I tried `gem pristine eventmachine --version 1.0.3` and got `ERROR: While executing gem ... (Gem::Exception) Failed to find gems ["eventmachine"] = 1.0.3`
<jhass> that be a much more standard structure and give you less similar surprises
shredding has joined #ruby
beast has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
<shevy> ah, a C-gem. no idea how to work with C-gems really
<prateekp> hmm
<havenwood> Cache_Money: Did EM 1.0.3 get uninstalled since you did the initial gist?
tier_ has joined #ruby
<havenwood> Cache_Money: Update your gist with the latest output.
<prateekp> can i hide documentation link?
<jhass> I don't think so
k3asd` has joined #ruby
shinnya has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
roshanavand has joined #ruby
ericjphillips has quit [Quit: Leaving.]
ruurd has quit [Read error: Connection reset by peer]
Chau has quit [Ping timeout: 252 seconds]
<Cache_Money> havenwood: No, I haven't uninstalled EM since the initial gist. Here's the output again (looks the same as before) https://gist.github.com/anonymous/6eb8a6e3e65dbd043735
<havenwood> Cache_Money: I don't see EventMachine in your update.
darkf has quit [Quit: Leaving]
<havenwood> Cache_Money: Commented.
<Cache_Money> havenwood: you're right. maybe when I ran `gem pristine eventmachine --version 1.0.3` it worked?
Zamyatin has joined #ruby
otherj has quit [Quit: .]
<Cache_Money> havenwood: Is there a reason why `gem pristine --all` didn't work?
kalusn has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 264 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
ruurd has joined #ruby
kimegede has joined #ruby
dagda1_ has joined #ruby
<havenwood> Cache_Money: It's hard to say without seeing the exact output from the command.
<kimegede> Hey, which ruby manager should I use on my mac? rbenv or rvm?
<havenwood> kimegede: chruby
<kimegede> havenwood: Will take a look thanks
<havenwood> kimegede: using Homebrew?
tomphp has joined #ruby
<kimegede> havenwood: Yeah, looking on it. Should I remove the 2 others? I apparently got both them installed.
speakingcode has quit [Ping timeout: 244 seconds]
prateekp has quit [Ping timeout: 246 seconds]
<kimegede> (Yes I got brew love it! :))
bonhoeffer has quit [Quit: bonhoeffer]
<havenwood> kimegede: Yeah, `rvm implode` then `rm -rf ~/.rvm` and `rm -rf ~/.rbenv` and remove any traces from your dotfiles.
ishikawa91 has joined #ruby
<havenwood> kimegede: brew install chruby --HEAD
<Cache_Money> havenwood: running all of the those commands got rid of them
<Cache_Money> thanks
<havenwood> kimegede: Then setup your dotfiles for chruby: https://github.com/postmodern/chruby#auto-switching
mozzarella has joined #ruby
leafybas_ has joined #ruby
<havenwood> kimegede: Then install Rubies with ruby-install: brew install ruby-install --HEAD
lapide_viridi has quit [Quit: Leaving]
devbug has joined #ruby
roshanavand has joined #ruby
<havenwood> kimegede: For Ruby 2.2.3: ruby-install ruby
<kimegede> Thanks havenwood almost there
bluOxigen has joined #ruby
<havenwood> kimegede: Just restart your terminal for chruby to detect newly installed Rubies.
<havenwood> kimegede: If you want to set Ruby 2.2.3 as your default Ruby in your home dir: echo "ruby-2.2.3" > ~/.ruby-version
leafybasil has quit [Ping timeout: 272 seconds]
ruurd has quit [Read error: Connection reset by peer]
<havenwood> kimegede: It'll autoswitch when .ruby-version files are detected.
<havenwood> It does fuzzy matching so you can: ruby-2.2
khebbie has quit [Ping timeout: 240 seconds]
<kimegede> Yeah I got that setuped by rbenv but with my double ruby it got fuzzy
<kimegede> Ran it to this one
<mehwork> speaking of rbenv, is there a way to make it rehash automatically somehow? I hate having to type 'rbenv rehash' every time i install any command
leafybas_ has quit [Ping timeout: 272 seconds]
<havenwood> kimegede: This way no shims to have to reshim and it uses your Homebrew OpenSSL.
<havenwood> mehwork: Switch to chruby? :P
<kimegede> :D
<mehwork> i just switched to rbenv from rvm
<havenwood> mehwork: You can even use your rbenv-installed Rubies still if you'd like: RUBIES+=(~/.rbenv/versions/*)
<mehwork> how do i know switching to chruby won't require switchign to somehing else in a week :p
<havenwood> mehwork: It's a 100 lines shell script. It just works. It'll keep working.
yardenbar has joined #ruby
diegoaguilar has quit [Ping timeout: 240 seconds]
<mehwork> all i hear is 100 lines of hell
<havenwood> mehwork: Better than > 10,000 lines of hell. :P
<mehwork> i use zsh, will that matter?
<havenwood> mehwork: Fully supported.
<havenwood> mehwork: I use zsh and test chruby and ruby-install against it.
<mehwork> i guess i'll try it after i upgrade to el capitan
oetjenj has joined #ruby
<havenwood> mehwork: Tested with El Capitan as well.
<havenwood> mehwork: Actually has tests!
<mehwork> cool
Kendos-Kenlen has quit [Quit: Konversation terminated!]
matugm has joined #ruby
Kendos-Kenlen has joined #ruby
nk8 has quit [Quit: Textual IRC Client: www.textualapp.com]
kalusn has joined #ruby
tier_ has quit [Remote host closed the connection]
grzegorz has quit [Remote host closed the connection]
ruurd has joined #ruby
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
sagittarian has quit [Ping timeout: 260 seconds]
eikood has joined #ruby
kies^ has joined #ruby
<shevy> got a question
<shevy> >> '1.14.3' < '1.14.2'
<ruboto> shevy # => false (https://eval.in/448673)
<shevy> I can understand why it works for numbers, but why can we actually compare strings to one another?
<DEA7TH> shevy: alphabetical ordering?
speakingcode has joined #ruby
<jhass> more ASCII ordering
k3asd` has quit [Ping timeout: 250 seconds]
<DEA7TH> those are similar
<jhass> sure
symm- has joined #ruby
framlinqp has joined #ruby
<kimegede> havenwood: Got issues with openssl - https://gist.github.com/kimegede/c4e9d2642bd7ba3347ff
diegoaguilar has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> well, actually whatever encoding the strings are in
<shevy> hmm
<shevy> so I could sort by unicode snowman
framling has quit [Ping timeout: 268 seconds]
<jhass> shevy: it's a.each_codepoint.zip(b.each_codepoint).all? {|a, b| a < b } essentially
ruurd has quit [Read error: Connection reset by peer]
<shevy> I don't think I have ever seen .each_codepoint before
<jhass> + some border conditions if a.size != b.size
<jhass> >> "1.14.3".codepoints
<ruboto> jhass # => [49, 46, 49, 52, 46, 51] (https://eval.in/448674)
<kimegede> havenwood: Fixed it, uninstalled openssl and installed it again.
eikood has quit [Remote host closed the connection]
finisherr has left #ruby [#ruby]
gregf has quit [Quit: WeeChat 1.3]
eikood has joined #ruby
lokson has quit [Quit: WeeChat 1.0.1]
tier_ has joined #ruby
ruurd has joined #ruby
<benlieb> can I pipe code to execute to ruby?
ruurd has quit [Client Quit]
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
<benlieb> I know about -e, but
<benlieb> jhass: don't be silly
<benlieb> the question is how
<apeiros> jhass: in ruby I it's always .each_byte, even with unicode
<benlieb> not can I
<shevy> I shall declare - the next year will be the year of Hurd, with systemd AND the desktop of the year!
atmosx has quit [Quit: Lost in trance]
<jhass> benlieb: I don't think you tried
<benlieb> jhass: jesus
eikood has quit [Remote host closed the connection]
<shevy> jhass: god
<shevy> just wanted to get spiritual :-)
<jhass> there's only one godess and its Eris
<jhass> I'm a pope though
eikood has joined #ruby
<apeiros> benlieb: your question literally was "can I". and yes, you can. and how - the same way piping works with all other exes, with a | sign.
<apeiros> benlieb: so jhass ?try was a quite adequate answer.
l_tonz has joined #ruby
jun_ has joined #ruby
shoutsid has quit [Remote host closed the connection]
eikood has quit [Remote host closed the connection]
tkuchiki has joined #ruby
bonhoeffer has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
eikood has joined #ruby
framlinqp has quit [Remote host closed the connection]
gregf has joined #ruby
framlinqp has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<shevy> benlieb there is a cool way to pipe ruby code on the commandline and have it colourized, via the gem "coderay", this should work when code is installed: "cat foo.rb | coderay -ruby"
l_tonz has quit [Ping timeout: 260 seconds]
leafybasil has joined #ruby
lkba_ has quit [Remote host closed the connection]
gregoriokusowski has quit [Quit: gregoriokusowski]
tkuchiki has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 240 seconds]
zapata has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
subscope has quit [Quit: Leaving]
speakingcode has quit [Ping timeout: 244 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
shoutsid has joined #ruby
mozzarella has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
Alina-malina has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
jun_ has quit [Remote host closed the connection]
l_tonz has joined #ruby
zapata has joined #ruby
jamto11 has quit [Remote host closed the connection]
patdohere has joined #ruby
devbug_ has joined #ruby
jamto11 has joined #ruby
patdohere has quit [Max SendQ exceeded]
ZucchiniZe- is now known as ZucchiniZe
yardenbar has quit [Ping timeout: 255 seconds]
devbug has quit [Ping timeout: 250 seconds]
shoutsid has quit [Remote host closed the connection]
shoutsid has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
codecop has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has quit [Ping timeout: 256 seconds]
jun_ has joined #ruby
nettoweb has joined #ruby
roshanavand has joined #ruby
fastAndSlow has joined #ruby
<dorei> i've got a hash and i want to compare it with another hash for equality but dont take into account one the keys, what's the most elegant way to do it?
maletor_ has quit [Quit: Computer has gone to sleep.]
beauby has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
<toretore> you should do it the other way around probably: explicitly enumerat the keys you want to compare
<toretore> %w[foo bar baz].all?{|k| h1[k] == h2[k] }
<havenwood> >> {aim: true, ignore: true}.tap { |h| h.delete :ignore } == {aim: true}
<ruboto> havenwood # => true (https://eval.in/448694)
<havenwood> i guess you don't want to mutate the Hash >.>
some_body has joined #ruby
<dorei> it's part of a spec for a rest service and i can't possibly know beforehand what id will be assigned to it
<some_body> im trying to read a regular .txt file with File.readlines, but I'm getting an invalid byte sequence in US-ASCII error, and I'm trying to call .split on each line
<some_body> my code also has the magic comment # encoding: utf-8, so how can I read a txt file in as utf8?
patdohere has joined #ruby
<havenwood> >> {aim: true, ignore: true}.reject { |k, _| k == :ignore } == {aim: true}
<toretore> some_body: put the entire file on gist.github.com and link here
<ruboto> havenwood # => true (https://eval.in/448695)
patdohere has quit [Max SendQ exceeded]
<havenwood> dorei: How about #reject the key you don't want then compare?
jun_ has quit [Remote host closed the connection]
finisherr has joined #ruby
<dorei> havenwood: yeah, i'm doing that, but i'm looking for something more elegant, bcoz i dont want to repeat that for almost every expect in the spec
<finisherr> How can I get option parser to give me summary info about ARGV[1]?
mloy_ has joined #ruby
shoutsid has joined #ruby
eikood has quit [Remote host closed the connection]
Channel6 has joined #ruby
<havenwood> dorei: I don't understand what the rules for them being equal are. You have a Hash. You want to check if all of its keys/value pairs are present in another Hash? Can the other Hash have unlimited additional key/value pairs you don't know about and you don't care?
eikood has joined #ruby
<havenwood> dorei: Or are there only certain additional keys allowed? Say more?
beauby has joined #ruby
Rollabunna has quit [Remote host closed the connection]
wallerdev has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
shoutsid has quit [Remote host closed the connection]
<havenwood> dorei: Or Gist examples.
<dorei> havenwood: i want all the values be equal except for the value of :id keys which i dont know beforehand
dstarh has joined #ruby
<havenwood> dorei: so the :id key should be there but you don't know the value?
<dorei> yeap
Kerber0s has joined #ruby
<kimegede> havenwood: After upgrading to 2.2.3 I need to reinstall all gems right?
<yorickpeterse> hi
<finisherr> I’m just going to have it be a param to a flag and call it a day
<yorickpeterse> After spending the weekend continueing work on porting Addrinfo to Rubinius, I can see why people drink
odt has joined #ruby
<havenwood> kimegede: I'd suggest installing gems fresh in your case. If you set `gem: "--env-shebang"` in your ~/.gemrc you'll not need to reinstall gems with 2.2.4 but you'll always need to with MINOR version bumps like this Christmas with 2.3.0.
<havenwood> kimegede: If you don't need local docs might as well also skip that to make it go quickly: gem: "--no-document --env-shebang"
casadei has joined #ruby
<havenwood> yorickpeterse: hi
<odt> would i be correct in assuming ERB is the way to go to convert yaml into some other format, ie. m3u file?
<karapetyan> what's wrong with that solution: https://gist.github.com/karapetyan/901ce0b98983ae41f833
<dorei> havenwood: hmm, i think i've found a solution :) i'll make it a configuration option so that method will return the hash without that key :)
<havenwood> karapetyan: Does it work?
<karapetyan> havenwood: no.
<havenwood> dorei: ;)
alexherbo2 has joined #ruby
jenrzzz has joined #ruby
riotjone_ has joined #ruby
<kimegede> havenwood: Okay cool makes sense.
<kimegede> Thanks again
<havenwood> kimegede: You're welcome
<havenwood> kimegede: Happy coding!
<toretore> some_body: and journal.txt ?
<jhass> &ri Fixnum#abs @karapetyan
<karapetyan> sorry don't understand
<karapetyan> why i need use absolute value?
lxsameer has joined #ruby
devoldmx has joined #ruby
<jhass> >> 10 - 12
<ruboto> jhass # => -2 (https://eval.in/448696)
riotjone_ has quit [Ping timeout: 256 seconds]
Rickmasta has joined #ruby
mistermocha has joined #ruby
<jhass> btw no need for the ugly for, use Range#each or Fixnum#upto
ramfjord has quit [Ping timeout: 264 seconds]
<some_body> toretore: its plain text, and my journal. nothing but ascii and newlines
arabellatrix has joined #ruby
patdohere has joined #ruby
patdohere has quit [Max SendQ exceeded]
fastAndSlow has quit [Ping timeout: 244 seconds]
<toretore> some_body: can you gist *something* that will reproduce the error?
patdohere has joined #ruby
<arabellatrix> Hello.
patdohere has quit [Client Quit]
<jhass> karapetyan: mmh, it might work actually, just take forever since you do _a lot_ of work twice
roshanavand has joined #ruby
tier_ has quit [Remote host closed the connection]
patdohere has joined #ruby
apt-get has quit [Ping timeout: 250 seconds]
patdohere has quit [Max SendQ exceeded]
<karapetyan> jhass: when i run app it's just hangs
towski_ has joined #ruby
gregoriokusowski has joined #ruby
tier_ has joined #ruby
<karapetyan> jhass: and no any output i don't know why
<karapetyan> jhass: do you know how to optimize it?
<jhass> karapetyan: well, you only have output when you found it
craysiii has joined #ruby
<jhass> karapetyan: don't do stuff over and over again
kobain has joined #ruby
<some_body> toretore: i just confirmed that not all files produce the error, but what characters could be responsible?
jun_ has joined #ruby
<some_body> its got punctuation and quotes, parens, etc
<karapetyan> memoize ?
<jhass> karapetyan: when your iteration didn't find a result you add an item and start all over again testing all the things you know already
benlieb has joined #ruby
<karapetyan> ehm
<jhass> well, you memoize already, just don't start over
arabellatrix has left #ruby [#ruby]
<karapetyan> jhass: actually i have no experience and i wonder how to develop this alghorithm :(
<jhass> for each j in 1 to infinity test P(j) with each
simplyianm has joined #ruby
<jhass> er, sorry hit enter too early
SylarRuby has quit [Remote host closed the connection]
<toretore> some_body: non-ascii
<jhass> for each j in 1 to infinity test P(j)+P(k) and P(j)-P(k) with k from 1 to j
<jhass> karapetyan: ^
<some_body> yeah but why is ruby reading it as ascii instead of utf8? when I do 'locale' on my machine, its all utf 8
<karapetyan> jhass: o_O
roshanavand has quit [Ping timeout: 240 seconds]
tier_ has quit [Ping timeout: 246 seconds]
<jhass> karapetyan: currently you reiterate j after computing the next P(j)
roshanavand has joined #ruby
chipotle has quit [Quit: cheerio]
jenrzzz has quit [Ping timeout: 244 seconds]
patdohere has joined #ruby
jun_ has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 265 seconds]
patdohere has quit [Max SendQ exceeded]
roshanavand has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
shoutsid has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 1.3]
<odt> so is there a ruby way to do this instead of all the brackets? 10 puts "#{source["name"]} #{source["url"]} #{source["type"]}"
simplyianm has quit [Remote host closed the connection]
dionysus69 has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<karapetyan> jhass: sorry, but i don't understand this: for each j in 1 to infinity test P(j)+P(k) and P(j)-P(k) with k from 1 to j
Kerber0s_ has joined #ruby
Cyther has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> karapetyan: "I don't understand this" is not useful, try to ask a specific question
dstarh has joined #ruby
rakm has joined #ruby
sabesto has joined #ruby
sabesto has left #ruby [#ruby]
Kerber0s has quit [Ping timeout: 260 seconds]
dstarh has quit [Client Quit]
<mozzarella> odt: something like this? ['name', 'url', 'type'].map { |x| source[x] }.join(' ')
maletor_ has joined #ruby
dstarh has joined #ruby
<jhass> %w[name url type]
l_tonz has quit [Remote host closed the connection]
jamto11 has joined #ruby
VeryBewitching has joined #ruby
<mozzarella> yeah, you could also use that
<odt> that looks sexy, thanks
apt-get has joined #ruby
<mozzarella> I can never remember which letter it is, though, do you have a trick to remember?
dstarh has quit [Client Quit]
dstarh has joined #ruby
<mozzarella> %w(name url type).map { |x| source[x] }.join(' ')
<jhass> source.values_at(*%w[name url type]).join(" ")
<jhass> and no, gotta memorize that
phutchins has joined #ruby
simplyianm has joined #ruby
towski_ has quit [Remote host closed the connection]
maletor_ has quit [Client Quit]
dstarh has quit [Client Quit]
ruurd has joined #ruby
<toretore> w for words
<jhass> r for regexp, but q, i?
<havenwood> quoted
<havenwood> interned
apt-get_ has joined #ruby
<havenwood> dunno
jamto11 has quit [Ping timeout: 240 seconds]
ruurd has quit [Read error: Connection reset by peer]
jgt has joined #ruby
l_tonz has joined #ruby
<shevy> lol
jun_ has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apt-get has quit [Ping timeout: 256 seconds]
phutchins has quit [Ping timeout: 264 seconds]
simplyianm has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 240 seconds]
simplyianm has joined #ruby
apt-get_ has quit [Remote host closed the connection]
wildlander has joined #ruby
l_tonz_ has joined #ruby
l_tonz has quit [Ping timeout: 255 seconds]
darkxploit has quit [Quit: Leaving]
acke has joined #ruby
tier_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
shoutsid has joined #ruby
weemsledeux has joined #ruby
eikood has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving]
khebbie has joined #ruby
MasterNayru has quit [Remote host closed the connection]
psy has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
chipotle has joined #ruby
dc_ has joined #ruby
eikood has joined #ruby
Vile` has quit [Ping timeout: 244 seconds]
Vile` has joined #ruby
shoutsid has joined #ruby
ruurd has joined #ruby
dc_ has quit [Remote host closed the connection]
riotjone_ has joined #ruby
l_tonz_ has quit [Remote host closed the connection]
kimegede has quit [Quit: Linkinus - http://linkinus.com]
l_tonz has joined #ruby
Soda has joined #ruby
swgillespie[ATL] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
riotjone_ has quit [Ping timeout: 250 seconds]
swgillespie has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
saddad has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has joined #ruby
dc_ has joined #ruby
lxsameer has quit [Remote host closed the connection]
tkuchiki has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
dc_ has quit [Remote host closed the connection]
mbff has joined #ruby
karapetyan has joined #ruby
sagittarian has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mbff> Hello! I am trying to get guard to run when any .rb file changes recursively. How can I do this?
natevick has joined #ruby
ruurd has joined #ruby
blackmesa has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
nullFxn has quit [Quit: leaving]
khebbie has quit [Ping timeout: 250 seconds]
Zamyatin has joined #ruby
Zamyatin has quit [Client Quit]
natevick has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
roshanavand has joined #ruby
karapetyan has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 268 seconds]
michael_mbp has quit [Excess Flood]
ruurd has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
platzhirsch has joined #ruby
alexherbo2 has joined #ruby
Channel6 has quit [Ping timeout: 272 seconds]
roshanavand has quit [Ping timeout: 256 seconds]
Zamyatin has joined #ruby
nerium has quit [Quit: nerium]
<mbff> Any ideas?
dc_ has joined #ruby
nerium has joined #ruby
Guest36 has joined #ruby
ruurd has joined #ruby
kimegede has joined #ruby
dagda1_ has joined #ruby
some_body has quit [Ping timeout: 246 seconds]
kimegede has quit [Client Quit]
jessemcgilallen has joined #ruby
Kerber0s_ has quit [Read error: Connection reset by peer]
jamto11 has joined #ruby
dagda1_ has quit [Client Quit]
<jhass> "recursively"?
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
yfeldblum has joined #ruby
patdohere has joined #ruby
davedev2_ has joined #ruby
nerium has quit [Quit: nerium]
patdohere has quit [Max SendQ exceeded]
davedev24 has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 250 seconds]
casadei has quit [Remote host closed the connection]
nerium has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
shinnya has joined #ruby
yardenbar has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
cornerman has quit [Read error: Connection reset by peer]
dagda1_ has joined #ruby
cornerman has joined #ruby
chipotle has quit [Quit: cheerio]
yfeldblum has quit [Ping timeout: 264 seconds]
ruurd has joined #ruby
simplyianm has quit [Remote host closed the connection]
Limix has joined #ruby
simplyianm has joined #ruby
nerium has quit [Quit: nerium]
<Guest36> anyone have a guide of making an app with rails?
devbug has joined #ruby
nerium has joined #ruby
<mbff> jhass, as in every folder level including root
<mbff> root of project...
<jhass> it does so by default?
Rollabunna has joined #ruby
sepp2k1 has joined #ruby
<jhass> ?rails Guest36
<ruboto> Guest36, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
solocshaw has joined #ruby
<mbff> jhass, guard watch defaults to that?
sepp2k has quit [Ping timeout: 265 seconds]
devbug_ has quit [Ping timeout: 264 seconds]
<jhass> pretty sure it does
lubarch has quit [Quit: leaving]
hahuang65 has quit [Ping timeout: 255 seconds]
<mbff> can you give an example? Like I said before guard watch all rb files.
ruurd has quit [Read error: Connection reset by peer]
<jhass> how about we rather look at your current Guardfile to find out why it doesn't?
diegoaguilar has quit [Ping timeout: 250 seconds]
<jhass> mbff: it's a regular expression, not a glob pattern
<jhass> .*\.rb
<jhass> or .+\.rb
Rollabunna has quit [Ping timeout: 264 seconds]
Zamyatin has quit [Ping timeout: 255 seconds]
Zamyatin has joined #ruby
<toretore> >> clearing :on; guard :minitest do; watch(%r{*.rb); end
<ruboto> toretore # => /tmp/execpad-91748c3e4883/source-91748c3e4883:2: unterminated regexp meets end of file ...check link for more (https://eval.in/448716)
simplyianm has quit [Remote host closed the connection]
MasterNayru has joined #ruby
simplyianm has joined #ruby
<jhass> yeah, also that
riotjone_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
<mbff> true....
nerium has quit [Quit: nerium]
califerno has joined #ruby
riotjone_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
nerium has joined #ruby
riotjone_ has joined #ruby
l_tonz has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
Kerber0s has joined #ruby
Jackneill has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MasterNayru has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
jun_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
gwendall has joined #ruby
beauby has quit [Ping timeout: 246 seconds]
jun_ has joined #ruby
riotjone_ has quit [Ping timeout: 255 seconds]
l_tonz has joined #ruby
RobertBirnie has quit [Client Quit]
SenpaiSilver has quit [Quit: Leaving]
rakm has joined #ruby
MasterNayru has joined #ruby
Kerber0s has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
fastAndSlow has joined #ruby
Kerber0s has joined #ruby
cashnguns has quit [Ping timeout: 240 seconds]
l_tonz has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
nerium has quit [Quit: nerium]
Zamyatin has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 252 seconds]
nerium has joined #ruby
sheperson has joined #ruby
<sheperson> Hi
baroquebobcat has joined #ruby
<sheperson> I am really confused
<sheperson> I have a class, with attr_accessor :data
marr has joined #ruby
<sheperson> and in the initializer I set the data to hash
<sheperson> but when I try to read it, it is nil
solocshaw has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jessemcgilallen has quit [Quit: jessemcgilallen]
MasterNayru has quit [Ping timeout: 244 seconds]
l_tonz has joined #ruby
charliesome has joined #ruby
MasterNayru has joined #ruby
patdohere has joined #ruby
rushed has joined #ruby
swgillespie has joined #ruby
podman has joined #ruby
monod has joined #ruby
jobewan has joined #ruby
MasterNayru has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 264 seconds]
cdolan has joined #ruby
nerium has quit [Quit: nerium]
<shevy> not possible
<shevy> show code
Zamyatin has joined #ruby
nerium has joined #ruby
jokke has quit [Quit: WeeChat 1.3]
patdohere has quit [Read error: Connection reset by peer]
sheperson has quit [Ping timeout: 268 seconds]
sheperson_ has joined #ruby
l_tonz has joined #ruby
jokke has joined #ruby
tkuchiki has joined #ruby
sheperson_ has quit [Client Quit]
acke has quit [Remote host closed the connection]
bb010g has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
perturbation has joined #ruby
S_Walker has quit [Ping timeout: 264 seconds]
finisherr has quit [Quit: finisherr]
l_tonz has quit [Ping timeout: 264 seconds]
SenpaiSilver has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
benlieb_ has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
naftilos76 has joined #ruby
wallerdev has quit [Quit: wallerdev]
matp has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
S_Walker has joined #ruby
l_tonz has joined #ruby
matp has joined #ruby
matp has quit [Max SendQ exceeded]
matp has joined #ruby
tubuliferous has joined #ruby
freezevee has quit [Ping timeout: 264 seconds]
haylon has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
jamesaxl|2 is now known as jamesaxl
tier_ has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 244 seconds]
cdolan has quit [Quit: Textual IRC Client: www.textualapp.com]
Soda has quit [Remote host closed the connection]
l_tonz has joined #ruby
Vile` has joined #ruby
basil has joined #ruby
basil is now known as Guest82630
eikood has quit [Remote host closed the connection]
mistermocha has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
skweek has joined #ruby
spider-mario has quit [Remote host closed the connection]
l_tonz has quit [Ping timeout: 264 seconds]
mbff has quit [Quit: Leaving]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eikood has joined #ruby
naftilos76 has quit [Remote host closed the connection]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
baweaver has joined #ruby
Guest36 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 240 seconds]
eikood has quit [Remote host closed the connection]
l_tonz has joined #ruby
xrlabs has joined #ruby
simplyianm has quit [Remote host closed the connection]
craysiii has quit [Remote host closed the connection]
joneshf-laptop has joined #ruby
rakm has joined #ruby
l_tonz has quit [Ping timeout: 264 seconds]
riotjones has joined #ruby
yfeldblum has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
framlinqp has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
blueOxigen has joined #ruby
andykingking has joined #ruby
jokke has quit [Quit: WeeChat 1.3]
baroquebobcat_ has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
Guest36 has joined #ruby
fastAndSlow has quit [Quit: Lost terminal]
riotjones has quit [Ping timeout: 252 seconds]
bkulbida has quit [Read error: Connection reset by peer]
l_tonz has joined #ruby
bkulbida has joined #ruby
devbug has quit [Read error: Connection reset by peer]
devbug has joined #ruby
gwendall has quit []
mikecmpbll has quit [Quit: ciao.]
rushed has quit [Quit: rushed]
mgorbach has quit [Ping timeout: 240 seconds]
haylon has quit [Quit: Leaving]
l_tonz has quit [Remote host closed the connection]
mgorbach has joined #ruby
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
hakunin has joined #ruby
l_tonz has joined #ruby
hakunin has left #ruby [#ruby]
exadeci has quit [Quit: Connection closed for inactivity]
califerno has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
johnzorn_ has quit [Ping timeout: 250 seconds]
htmldrum has joined #ruby
based_pdev_ has joined #ruby
hakunin_ has joined #ruby
headius has quit [Ping timeout: 250 seconds]
johnzorn_ has joined #ruby
hakunin_ has left #ruby [#ruby]
patdohere has joined #ruby
headius has joined #ruby
Guest36 has quit [Ping timeout: 260 seconds]
`based_pdev` has quit [Ping timeout: 260 seconds]
l_tonz has quit [Ping timeout: 264 seconds]
towski_ has joined #ruby
neanderslob has joined #ruby
Igorshp has joined #ruby
l_tonz has joined #ruby
rushed has joined #ruby
ruurd has joined #ruby
shmilan has joined #ruby
l_tonz has quit [Ping timeout: 264 seconds]
DarthGandalf has quit [Quit: Bye]
bkulbida has quit [Ping timeout: 255 seconds]
firstdayonthejob has quit [Ping timeout: 252 seconds]
ruurd has quit [Ping timeout: 264 seconds]
user1138 has joined #ruby
towski_ has quit [Quit: Leaving...]
moeabdol has joined #ruby
DarthGandalf has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jokke has joined #ruby
l_tonz has joined #ruby
kalusn has quit [Remote host closed the connection]
gregoriokusowski has quit [Quit: gregoriokusowski]
solocshaw has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
patdohere has quit [Ping timeout: 264 seconds]
<shevy> hmm a simpler way to do .delete('-').delete(':').delete('/') ?
towski_ has joined #ruby
patdohere has joined #ruby
nanoz has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 256 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEA7TH has quit [Quit: DEA7TH]
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
l_tonz has joined #ruby
charliesome has joined #ruby
Ropeney has joined #ruby
benlieb_ has quit [Quit: benlieb_]
Igorshp has quit [Remote host closed the connection]
kalusn has joined #ruby
dcunit3d has joined #ruby
Igorshp has joined #ruby
platzhirsch has left #ruby [#ruby]
dcunit3d has quit [Client Quit]
<snapcase> .tr('-:/', '')
dc_ has quit []
Rollabunna has joined #ruby
dc_ has joined #ruby
<Coraline> .tr?
dc_ is now known as dcunit3d
l_tonz has quit [Ping timeout: 264 seconds]
n008f4g_ has quit [Ping timeout: 264 seconds]
l_tonz has joined #ruby
<snapcase> >> "t-e:s/t".tr('-:/', '')
<ruboto> snapcase # => "test" (https://eval.in/448733)
<shevy> cool thanks
<Coraline> Oh, I thought you were dealing with an array for some reason.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
l_tonz has quit [Remote host closed the connection]
<shevy> both of you said .tr anyway :)
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
Rollabunna has quit [Ping timeout: 255 seconds]
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
l_tonz has joined #ruby
jaygen has quit [Read error: Connection reset by peer]
didier has joined #ruby
didier has left #ruby ["Leaving"]
jaygen has joined #ruby
bkulbida has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
riotjones has joined #ruby
sdothum has joined #ruby
jun_ has quit [Remote host closed the connection]
jdawgaz has joined #ruby
patdoher_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 240 seconds]
f1dget has joined #ruby
CloCkWeRX has joined #ruby
xrlabs has quit [Quit: Verlassend]
stardiviner has joined #ruby
patdohere has quit [Ping timeout: 252 seconds]
patdoher_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
root____5 has joined #ruby
l_tonz_ has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
l_tonz has quit [Ping timeout: 264 seconds]
<dorei> >> "az by df in xf"[/(.*) (by|in)/]
<ruboto> dorei # => "az by df in" (https://eval.in/448734)
root____5 has joined #ruby
<dorei> is there a way to make it stop at by and not in?
bkulbida has quit [Ping timeout: 246 seconds]
candelabra has joined #ruby
tkuchiki has joined #ruby
trodai has joined #ruby
trodai has quit [Client Quit]
chipotle has joined #ruby
<bnagy> >> "az by df in xf"[/(.*?) (by|in)/]
<ruboto> bnagy # => "az by" (https://eval.in/448735)
<bnagy> non-greedy
chipotle has quit [Client Quit]
root____5 has quit [Client Quit]
<dorei> oh, let me try it :)
rushed has quit [Quit: rushed]
<dorei> it works :) thanx bnagy
arescorpio has joined #ruby
benlieb has quit [Quit: benlieb]
allcentury has joined #ruby
candelabra has quit [Client Quit]