jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
rubie has joined #ruby
Chunlea has joined #ruby
bratchle1 is now known as bratchley
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 250 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
mistermocha has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
_kfpratt has quit [Remote host closed the connection]
wethu has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
<Dimik> is there a way to get around .to_i cutting off decimal points ?
boontdustie has quit [Remote host closed the connection]
<baweaver> round
<smathy> Dimik, the i stands for integer.
<Dimik> that's a very messed up solution
<Dimik> i'm aware
<Radar> Dimik: use .to_f
<Radar> great
<Dimik> can i do calculations with to_f ?
<smathy> Dimik, so integers don't have decimal components.
avenj_ is now known as avenj
avenj has quit [Changing host]
avenj has joined #ruby
<baweaver> ?xy
<baweaver> !xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<smathy> Dimik, how are you going to make an integer without cutting off .... yeah ^ that actually.
<baweaver> aha
<Dimik> <3
<Radar> ?try Dimik
<ruby[bot]> Dimik: Why don't you try it and see for yourself?
<Dimik> i am
y2mq37 has quit [Quit: Leaving]
<Dimik> thank you very much for your help
workmad3 has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Ping timeout: 252 seconds]
<myntcake> hahaha
djbkd has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby
djbkd has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
Ropeney has joined #ruby
hxegon has quit [Ping timeout: 252 seconds]
Alayde has quit [Ping timeout: 244 seconds]
Gasher has quit [Quit: Leaving]
<baweaver> myntcake: ?
rbennacer has quit [Remote host closed the connection]
ruralhack has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
mustmodify_ has left #ruby [#ruby]
myntcake has quit [Ping timeout: 246 seconds]
<ruralhack> Hi ruby friends, please watch this video: https://www.youtube.com/watch?v=tyV-cAC9PKc
ruralhack has left #ruby ["Leaving"]
znz_jp has joined #ruby
polyidus has quit [Quit: Later]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> !troll ruralhack
kfpratt has quit [Remote host closed the connection]
GodFather has joined #ruby
sdwrage has joined #ruby
<baweaver> !ban ruralhack
Xeago has joined #ruby
<Dimik> wow
<Dimik> is that guy on meth or what
ramfjord has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
Ebok has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
smathy is now known as smathy_afk
<shevy> Dimik probably just an auto-bot
Aswebb_ has joined #ruby
rubie has quit [Remote host closed the connection]
Suntzu has joined #ruby
Aswebb_ has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Quit: Leaving.]
jenrzzz has joined #ruby
freerobby has joined #ruby
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami_ has quit [Quit: This computer has gone to sleep]
makenoise has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
cpup has quit [Ping timeout: 248 seconds]
cpup has joined #ruby
johnny` has joined #ruby
johnny` has left #ruby [#ruby]
baweaver has quit []
johnny` has joined #ruby
johnny` has left #ruby [#ruby]
baweaver has joined #ruby
maletor has joined #ruby
wpww88 has joined #ruby
wpww88 has quit [K-Lined]
wool has joined #ruby
sgambino has joined #ruby
goodroot has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
trosborn has joined #ruby
<havenwood> i need to release a new version of this pure Ruby SHA3 gem since someone contributed a FIPS 202 compliance patch. how could it be improved?: https://github.com/havenwood/sha3-pure-ruby/blob/master/lib/sha3-pure-ruby.rb
irick has quit [Ping timeout: 246 seconds]
<havenwood> i'm curious if there are any substantial performance improvements to be had
goodroot has quit [Ping timeout: 268 seconds]
<havenwood> i suppose setting up benchmarks would help
MuffinPimp has quit [Remote host closed the connection]
<baweaver> eam or xshay would be the best to ask
<havenwood> or other improvements
<baweaver> though xshay is rarely on
<baweaver> tenderlove as well
Guest73204 has quit [Remote host closed the connection]
<havenwood> this gem needs FIPS 202 ported over from the Node version's C ext: https://github.com/phusion/digest-sha3-ruby
<havenwood> it's a nicely done gem too!
rmulligan has quit [Remote host closed the connection]
irick has joined #ruby
hahuang61 has joined #ruby
<baweaver> probably best to avoid each with object and similar methods
tatsuo has joined #ruby
<havenwood> baweaver: good point
<baweaver> they tend to be slower than a for loop, but that'd be at the point of shaving hairs
<baweaver> same with times I'd guess
sp4rrow has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
chipotle has quit [Quit: cheerio]
<baweaver> pretty much pretend you're writing C if you _really_ need performance
bkxd has joined #ruby
<baweaver> better yet, make an extension if there's not a stipulation of pure ruby
<Radar> Rewrite in Elixir for maximum speed.
<havenwood> it'd be nice to bring the digest-sha3-ruby up to spec and propose it for Ruby stdlib
<havenwood> Radar: :D
vdamewood has joined #ruby
<havenwood> Radar: Err, is there a FIPS 202 compliant Erlang/Elixir implementation? :O
<Radar> no idea
wool has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 264 seconds]
<havenwood> With a quick search I just found early Erlang reference implementations.
vdamewood has quit [Max SendQ exceeded]
bkxd has quit [Ping timeout: 240 seconds]
<havenwood> It must exist. Might be fun to write.
<baweaver> also the buffer = @buffer is going to be slow
rodfersou has joined #ruby
<baweaver> ivars are faster
<havenwood> baweaver: locals are faster yet
<baweaver> not by that
<baweaver> checking
<havenwood> (it's a local)
x77686d has quit [Quit: x77686d]
sneakerhax has quit [Ping timeout: 240 seconds]
<baweaver> user system total real
<baweaver> @var 4.780000 0.000000 4.780000 ( 4.778361)
<baweaver> var 5.190000 0.000000 5.190000 ( 5.197689)
<baweaver> @var = 4.740000 0.000000 4.740000 ( 4.742167)
<baweaver> self.var = 5.650000 0.010000 5.660000 ( 5.663195)
<baweaver> run on a 2.1.2
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> baweaver: that... doesn't seem right :O
<havenwood> benchmark ips?
makenoise has quit []
<baweaver> see that link above
<baweaver> copied the code directly
<baweaver> installing / testing on 2.3, give me a bit
chipotle has joined #ruby
mistermocha has joined #ruby
<baweaver> If it is true, should probably patch Puma for it.
trosborn has quit [Quit: trosborn]
mistermocha has quit [Ping timeout: 246 seconds]
dc2 has joined #ruby
trinaldi has quit [Quit: WeeChat 1.5-dev]
lemur has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
goodroot has joined #ruby
<shevy> hmm
<shevy> @ivars are faster?
cdg has quit [Remote host closed the connection]
mistermocha has joined #ruby
Inside has joined #ruby
lemur has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
drewo has joined #ruby
skweek has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
last_staff has quit [Quit: last_staff]
mistermo_ has quit [Remote host closed the connection]
<havenwood> conflating getting and setting on this particular machine it doesn't seem so: https://gist.github.com/havenwood/da706eeb1a3b80aaac980743cb21a0b2
mistermocha has joined #ruby
<shevy> lol the title
aep has quit [Ping timeout: 276 seconds]
edwinvdg_ has joined #ruby
blackmesa has joined #ruby
<shevy> I always get ips wrong... the higher the faster right?
cdg has quit [Ping timeout: 276 seconds]
moredhel has quit [Ping timeout: 276 seconds]
<havenwood> shevy: more iterations
<havenwood> shevy: per second
<shevy> aha
<shevy> now I get the name :D
<shevy> omg it's a speed war!
donnoc_ has quit [Ping timeout: 276 seconds]
Log1x has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<baweaver> I'd have to play with it a lot more honestly
donnoc has joined #ruby
moredhel has joined #ruby
<havenwood> Method calls are slow for sure.
code_ has quit [Ping timeout: 260 seconds]
jtdowney has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 260 seconds]
Esya has quit [Ping timeout: 260 seconds]
Jamo__ has quit [Ping timeout: 260 seconds]
perry has quit [Ping timeout: 260 seconds]
<baweaver> I wonder what'd happen with lambda vs method
Beladona has joined #ruby
<havenwood> lambdas in methods versus methods in lambdas
<Beladona> hi
edwinvdgraaf has quit [Ping timeout: 260 seconds]
oz has quit [Ping timeout: 260 seconds]
rcs has quit [Ping timeout: 260 seconds]
<havenwood> Beladona: hi
uglybandersnatch has quit [Ping timeout: 276 seconds]
Guest73810 has quit [Ping timeout: 276 seconds]
slackR has quit [Ping timeout: 276 seconds]
<shevy> I assume that lambdas would be slower than regular methods
<Beladona> My new redmine installation is just showing directory files and not redmine page. I think I have old ruby. How to check havenwood ?
valeri_ufo has quit [Ping timeout: 276 seconds]
Jamo has joined #ruby
maletor has joined #ruby
<baweaver> lambda is about twice as slow
dextertzu has quit [Quit: WeeChat 1.3]
julieeharshaw has quit [Ping timeout: 276 seconds]
<havenwood> baweaver: i wonder how long the method chain has to be to hit the point of inflection :)
PaulePanter has quit [Ping timeout: 276 seconds]
<Beladona> gem install rails -v=2.3.5 - rails's executable "rails" conflicts with railties Overwrite the executable? [yN] nERROR: Error installing rails: "rails" from rails conflicts with installed executable from railties
uglybandersnatch has joined #ruby
Moosashi has quit [Quit: Moosashi]
perry has joined #ruby
perry has joined #ruby
<baweaver> we must poke it
jtdowney has joined #ruby
jtdowney has joined #ruby
oz has joined #ruby
Log1x has joined #ruby
htmldrum has quit [Ping timeout: 250 seconds]
<baweaver> wait, redmine runs on 2.x?
blackmesa has quit [Ping timeout: 276 seconds]
julieeharshaw has joined #ruby
code_ has joined #ruby
valeri_ufo has joined #ruby
apeiros has joined #ruby
C0deMaver1ck has joined #ruby
rodfersou has quit [Quit: leaving]
slackR has joined #ruby
PaulePanter has joined #ruby
Esya has joined #ruby
htmldrum_ has quit [Ping timeout: 250 seconds]
aep has joined #ruby
C0deMaver1ck is now known as Guest69884
<Beladona> baweaver, how can I be sure?
<baweaver> gem install rails -v=2.3.5
<Beladona> gem install rails -v=2.3.5 - rails's executable "rails" conflicts with railties Overwrite the executable? [yN] nERROR: Error installing rails: "rails" from rails conflicts with installed executable from railties
<baweaver> that's 5 years ago
wool has joined #ruby
<benzrf> railties royalties
vdamewood has joined #ruby
<baweaver> a ton has changed since then
<Beladona> ok a) how to check current version b) whcih version to install?
<baweaver> what have you looked at to install it?
dextertzu has joined #ruby
<Beladona> I dont know honestly
<havenwood> Beladona: a) ruby -v b) 2.3.0
<darix> the latest redmine uses 4.2
<Beladona> $ ruby -v
<Beladona> ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu]
<havenwood> Beladona: oh, current Rails version you mean
rcs has joined #ruby
<darix> Beladona: which redmine version do you try to install?
benlieb has quit [Quit: benlieb]
lyoshajapan has joined #ruby
<Beladona> 3.x
diegoaguilar has quit [Ping timeout: 260 seconds]
<darix> Beladona: unpack the tarball and then bundle install
hotpancakes has joined #ruby
<Beladona> I just did gem install rails -v=4.2.0
<darix> Beladona: no
<darix> Beladona: bundle install in the unpacked dir
jschoolcraft has quit [Quit: peace]
<darix> bundle install will pick up all the things mentioned in that file
<darix> oh you need to configure your database before
tatsuo has quit [Remote host closed the connection]
<Beladona> hm
bronson has joined #ruby
<Beladona> very slow
<Radar> better than the alternative
<darix> Beladona: better than you typing all the gem install manually ;)
sorbo_ has joined #ruby
<Beladona> I mean the gem install is slow
<darix> especially when you use wrong arguments :p
<Beladona> hm
<Beladona> I have no idea what ruby and ror is
<darix> Beladona: you dont need 4.2.0 (which has security bugs)
<Beladona> hm
<havenwood> Beladona: Ruby is a language.
bronson has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 264 seconds]
<Beladona> and ror is fw
<Beladona> that I know
vale_tudo has quit [Ping timeout: 244 seconds]
darkf has quit [Read error: Connection reset by peer]
<Beladona> nothing else
<havenwood> Beladona: Rails is one of many Ruby gems, which are Ruby code as distributable packages.
<Beladona> I think its an issue of passanger. Thats what I got last time
darkf has joined #ruby
<Beladona> havenwood, hm
<Beladona> maybe the apache .conf file?
<Beladona> I better come tomorrow.
baweaver has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
Marsupermammal has joined #ruby
<Beladona> thanks guys
leon_e has joined #ruby
idletask has quit [Quit: .]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: brb]
diegoaguilar has joined #ruby
agent_white has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
DTZUZU has joined #ruby
|gwep has joined #ruby
juria_roberts has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
idletask has joined #ruby
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
Beladona has quit [Remote host closed the connection]
dvinciguerra__ has quit [Ping timeout: 252 seconds]
wool has quit [Quit: leaving]
jdawgaz has joined #ruby
DLSteve has joined #ruby
tatsuo has joined #ruby
brt has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
uglybandersnatch has quit [Ping timeout: 244 seconds]
B1n4r10 has joined #ruby
rigsby has quit [Read error: Connection reset by peer]
tatsuo has quit [Remote host closed the connection]
babblebre has joined #ruby
uglybandersnatch has joined #ruby
leon_e has quit [Ping timeout: 240 seconds]
leon_e has joined #ruby
mistermocha has quit [Remote host closed the connection]
sudoubuntu has joined #ruby
sudoubuntu has quit [Client Quit]
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
bkxd has joined #ruby
dfockler has quit [Ping timeout: 244 seconds]
spuk has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
sudoubuntu has joined #ruby
davedev2_ has quit []
hotpancakes has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
uglybandersnatch has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 260 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
nikger has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
troynt has quit [Quit: Leaving]
DTZUZU has quit [Ping timeout: 260 seconds]
barajasfab has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
rubie has joined #ruby
sdwrage has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon has joined #ruby
nikger has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Ping timeout: 252 seconds]
amclain_ has joined #ruby
Chagel has joined #ruby
Aswebb_ has joined #ruby
amclain has quit [Ping timeout: 276 seconds]
postmodern has quit [Quit: Leaving]
GodFather has quit [Ping timeout: 276 seconds]
lyoshajapan has quit [Ping timeout: 268 seconds]
djbkd has quit [Remote host closed the connection]
krobzaur_ has joined #ruby
djbkd has joined #ruby
decoponio has joined #ruby
lyoshajapan has joined #ruby
<shevy> hmmm
Aswebb_ has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
<shevy> but I can't decide if it is prettier
<shevy> it definitely is more verbose
krobzaur_ has quit [Client Quit]
djbkd has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
Es0teric has joined #ruby
sorbo_ has quit [Remote host closed the connection]
sgambino has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Ebok has quit [Quit: This computer has gone to sleep]
sorbo_ has joined #ruby
B1n4r10 has quit [Ping timeout: 248 seconds]
jt__ has joined #ruby
moeabdol2 has joined #ruby
tomatoes has joined #ruby
tomatoes has quit [Client Quit]
rubie has quit [Remote host closed the connection]
hahuang61 has joined #ruby
barajasfab has joined #ruby
GnuYawk has quit [Read error: Connection reset by peer]
xlegoman has quit [Quit: xlegoman]
rubie has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
uglybandersnatch has joined #ruby
brt has quit [Quit: peace]
freerobby has quit [Quit: Leaving.]
braincrash has quit [Quit: bye bye]
kam270 has quit [Ping timeout: 276 seconds]
torandu has quit [Ping timeout: 260 seconds]
Aviio has quit [Quit: Leaving.]
diegoaguilar has quit [Remote host closed the connection]
nanoz has joined #ruby
torandu has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
tatsuo has joined #ruby
braincrash has joined #ruby
Nawn has joined #ruby
duncannz has joined #ruby
vdamewood has quit [Quit: Life beckons.]
uglybandersnatch has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
FooMunki has quit [Quit: FooMunki]
zast has joined #ruby
uglybandersnatch has joined #ruby
merida has joined #ruby
sorbo_ has quit [Remote host closed the connection]
darkf has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 248 seconds]
TheGreatGudsby has joined #ruby
Nawn has quit [Quit: Leaving]
darkf has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Nawn has joined #ruby
phredus has joined #ruby
helpa has quit [Remote host closed the connection]
astrobunny has joined #ruby
helpa has joined #ruby
blackmesa has joined #ruby
chipotle has quit [Quit: cheerio]
hxegon has quit [Quit: BRB]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
Nawn has quit [Quit: Leaving]
gregf has joined #ruby
baweaver has joined #ruby
bkxd has joined #ruby
tatsuo has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
merida has quit [Remote host closed the connection]
merida has joined #ruby
sudoubuntu has joined #ruby
hxegon has joined #ruby
|gwep has quit [Read error: Connection reset by peer]
blackgoat has quit [Quit: WeeChat 1.4]
blackmesa has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 250 seconds]
rubie has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
gwep| has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
russt has quit [Remote host closed the connection]
gwep| has quit [Read error: Connection reset by peer]
hotpancakes has quit [Ping timeout: 268 seconds]
tatsuo has joined #ruby
rubie has joined #ruby
gix has joined #ruby
RegulationD has joined #ruby
sgambino has joined #ruby
Chagel has quit [Ping timeout: 252 seconds]
davee_ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Eiam_ has joined #ruby
RegulationD has quit [Ping timeout: 268 seconds]
BTRE has quit [Ping timeout: 248 seconds]
BTRE has joined #ruby
hk238 has joined #ruby
jdawgaz has joined #ruby
hxegon has quit [Quit: BRB]
<shevy> does anyone happen to know if one can selectively enable only individual problems for rubocop to check? e. g. "only auto-indent" for the autocorrect option
benlieb has joined #ruby
TheGreatGudsby has quit [Quit: You're gonna carry that weight...]
GitGud has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: brb]
torandu has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
Chagel has joined #ruby
sudoubuntu has joined #ruby
tatsuo has quit [Ping timeout: 244 seconds]
hotpancakes has joined #ruby
codecop_ has joined #ruby
torandu has joined #ruby
merida_ has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
Es0teric has joined #ruby
lyoshajapan has joined #ruby
chipotle has joined #ruby
merida has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
sneakerhax has joined #ruby
lyoshajapan has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
trosborn has joined #ruby
astrobunny has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 260 seconds]
<brent_> any specific reason why ruby doesn't throw an error or return extra nil values for when you specify a range beyond an array?
<brent_> like arr = [0, 1] arr[0..4] => [0, 1]
ivanskie has joined #ruby
r1nuz has quit [Ping timeout: 244 seconds]
trosborn has quit [Quit: trosborn]
<shevy> returning extra elements would probably be incorrect
r1nuz has joined #ruby
N1GG3R54R3G4Y has joined #ruby
N1GG3R54R3G4Y was kicked from #ruby by ChanServ [Banned: Unacceptable nick - http://ruby-community.com/pages/user_rules#rule_2_10]
<havenwood> !badnick N1GG3R54R3G4Y
rubie has quit [Remote host closed the connection]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
<brent_> but when you call arr[5] => nil, why wouldn't arr[0..3] => [0, 1, nil, nil]?
merida has joined #ruby
trosborn has joined #ruby
<shevy> arr[5] returns nil but there never was a nil there
<mahlon> Because if you call arr[1,10000000], vs calling arr[12123345] -- that's a million Nil objects instead of 1.
theRealAlexz has quit [Ping timeout: 252 seconds]
rubie has joined #ruby
<mahlon> (arr[1..10000000] rather)
merida_ has quit [Ping timeout: 248 seconds]
sgambino has joined #ruby
merida has quit [Remote host closed the connection]
theRealAlexz has joined #ruby
theRealAlexz has quit [Changing host]
theRealAlexz has joined #ruby
<shevy> I don't think it can add more nil elements since they were never part of its collection. it's like you have a glass of 5 strawberries, you try to take out 6 but you'll only get five
merida has joined #ruby
solocshaw has joined #ruby
wldcordeiro has quit [Ping timeout: 240 seconds]
<Ox0dea> brent_: The observed behavior is the "do what I mean" that the majority of users would expect.
hxegon has joined #ruby
<Ox0dea> It certainly shouldn't throw an error (not very conducive to programmer happiness), and explicitly filling in the `nil`s is wasteful.
eljimmy has quit [Quit: Leaving]
<brent_> ruby is merciful
d0nn1e has quit [Ping timeout: 244 seconds]
sorbo_ has joined #ruby
merida has quit [Ping timeout: 240 seconds]
merida has joined #ruby
d0nn1e has joined #ruby
blackmesa has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
Chagel has joined #ruby
mdw has joined #ruby
Aswebb_ has joined #ruby
blackgoat has joined #ruby
<brent_> Ox0dea: is there a way to find index of element in a 2d-array
trosborn has quit [Quit: trosborn]
Chagel has quit [Ping timeout: 248 seconds]
<Ox0dea> brent_: y,x-wise, you mean?
<brent_> yes
<brent_> not finding anything specific
<brent_> sounds like i just need to iterate through the 2d and call .index on each sub array
<Ox0dea> There's nothing tailor-made, but you've got all the bricks you need. :)
rubie has quit [Remote host closed the connection]
merida_ has joined #ruby
hays has quit [Ping timeout: 252 seconds]
wanker has joined #ruby
wool has joined #ruby
<baweaver> !ban wanker
wanker was kicked from #ruby by ruby[bot] [bannable offense, see http://ruby-community.com/pages/user_rules]
<Ox0dea> Egregious?
Aswebb_ has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
hotpancakes has joined #ruby
<Radar> Ox0dea: it's a kiwiirc user, on a name that we haven't seen before.
blackmesa has quit [Ping timeout: 268 seconds]
<Radar> Ox0dea: Most likely a trol
<Radar> troll*
<Radar> they can plead their case in #ruby-banned.
<wool> isn't it dangerous to have a bot ban/kick people on request?
<wool> !kick wool
<wool> nvm
<Ropeney> lol'd
<baweaver> PM'd me
<baweaver> was warning ##javascript
merida has quit [Ping timeout: 268 seconds]
<havenwood> there's usually a backstory
bronson has joined #ruby
hays has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<havenwood> wool: The bot knows best.
hotpancakes has quit [Ping timeout: 276 seconds]
lyoshajapan has joined #ruby
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<Ox0dea> brent_: This seems to be the cleanest way to do it without "checking it twice": https://eval.in/544683
<Ox0dea> As soon as you find the sub-array that contains the target element, you've got both coordinates, but there's no way to get both of 'em back out from an #index call without introducing some state. :/
<brent_> this is what i came up with https://eval.in/544684
<havenwood> A few days shy of a year, but here's another RVM release for your Travis!: https://rvm.io/blog/2016/03/rvm-1-27-0
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zast has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
<havenwood> (There are plans for more frequent version-only releases since it's in maintenance mode.)
<adam12> What ever happened to RVM2?
<havenwood> adam12: It's in the works.
<havenwood> adam12: It may even use chruby for Ruby version switching, you'd have to ask mpapis.
<adam12> I was just curious. I have no skin in the game
<adam12> I just remember a $50k bountysource and was wondering status.
<havenwood> adam12: I think mpapis has more than earned what he was paid on that but I know he's still working on it.
moeabdol2 has quit [Ping timeout: 240 seconds]
uglybandersnatch has quit [Ping timeout: 246 seconds]
Guest32 has joined #ruby
<havenwood> adam12: <3 ruby-install + chruby
helpa has quit [Remote host closed the connection]
hxegon has quit [Quit: BRB]
helpa has joined #ruby
<adam12> havenwood: That's what I run currently ;)
<havenwood> adam12: nice
hahuang61 has joined #ruby
<havenwood> adam12: simple made easy :)
<adam12> I was more curious than anything.
radarislame has joined #ruby
radarislame has quit [Client Quit]
bronson has joined #ruby
Inside has quit [Ping timeout: 276 seconds]
uglybandersnatch has joined #ruby
skade has joined #ruby
<brent_> Ox0dea: here's my start for the maze https://github.com/brentgsw/appAcademy/blob/master/prep/maze.rb
hahuang61 has quit [Ping timeout: 268 seconds]
radar_and_baweav has joined #ruby
ivanskie has quit [Ping timeout: 240 seconds]
radar_and_baweav has quit [Client Quit]
sauvin has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
niceperl has joined #ruby
<wool> I was wondering
* baweaver stares intently
<wool> wait I don't want to start a war
<wool> can I mention a certain competitor scripting language?
<Ox0dea> Nah.
<Radar> competitor
<Radar> what
<baweaver> Never
<baweaver> blasphemy
<baweaver> go for it
<wool> lol
<havenwood> I don't accept the premise of your question.
<baweaver> It's a trap!
<Ox0dea> brent_: Strings essentially behave like character arrays, so that could really just be `@maze = File.readlines(@file)`.
astrobunny has joined #ruby
sorbo_ has quit [Remote host closed the connection]
<wool> anyway I was thinking
<wool> I noticed that ruby is.. well.. superior, to python
* wool takes cover
<wool> why is python then way more mainstream?
benlieb has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
<baweaver> Probably Google
<brent_> Ox0dea: yeah, i thought about that, can you make those []/[]= methods though?
<Radar> SciPy, NumPy, taught in universities more, etc.
<Ox0dea> brent_: Oui.
<baweaver> Anything Google does is programming law
<wool> Radar: oh yes that makes sense
<havenwood> Again, I don't accept the premise of your question.
<wool> google uses python?
<wool> I thought they'd use Go
<baweaver> they use both
<wool> I see
<havenwood> wool: Ruby is roughly as popular as Python. Pick your metric.
howdoi has joined #ruby
<wool> well.. I've met dozens of people who know python but have just heard about ruby
<Ox0dea> And you can't fathom that the inverse might also be true?
<wool> sure, I just haven't met them
<baweaver> Go to San Francisco
<baweaver> they're everywhere.
<wool> oh I see
<wool> of course.. rails
<wool> rails and SV
solocshaw has quit [Ping timeout: 252 seconds]
astrobunny has quit [Ping timeout: 264 seconds]
<baweaver> That and Chef
<wool> Chef?
astrobunny has joined #ruby
<brent_> Ox0dea, if i saved every position that CPU touched a cpu instance variable, does it make sense to have Maze check player.touched_pos or does it make more sense to mark touched positions and have Maze check if it's been marked?
<baweaver> In the SysAdmin / DevOps world it's the most widely used tool for deploying and provisioning servers
<brent_> so, pass the player object to Maze methods or just have Maze check itself for marked spots?
<baweaver> well, one of if not the largest rather
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> brent_: It certainly makes more sense for the Maze to know that about itself.
spuk has quit [Ping timeout: 240 seconds]
uglybandersnatch has quit [Ping timeout: 268 seconds]
mistermocha has joined #ruby
<brent_> okay, so for valid_pos? have it check if it's been marked
<brent_> and for cpu moving logic, have it use it's touched positions
jkahn has quit [Ping timeout: 260 seconds]
arescorpio has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
User458764 has joined #ruby
Chagel has joined #ruby
IvanSuftin has quit [Ping timeout: 276 seconds]
wool has quit [Read error: Connection reset by peer]
Suntzu has joined #ruby
LoneHerm_ has joined #ruby
julieeharshaw has quit [Ping timeout: 246 seconds]
uglybandersnatch has joined #ruby
krz has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
jkahn has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
hotpancakes has joined #ruby
merida has joined #ruby
avenj has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
Devalo has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
avenj has joined #ruby
agent_white has quit [Quit: brb]
hotpancakes has quit [Ping timeout: 240 seconds]
merida_ has quit [Ping timeout: 276 seconds]
merida_ has joined #ruby
sp4rrow has joined #ruby
Macaveli has joined #ruby
Jameser has joined #ruby
merida has quit [Ping timeout: 252 seconds]
agent_white has joined #ruby
hinbody has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
julieeharshaw has joined #ruby
y2mq37 has joined #ruby
ramfjord has joined #ruby
y2mq37 has quit [Quit: Leaving]
jorum has joined #ruby
uglybandersnatch has quit [Ping timeout: 248 seconds]
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
uglybandersnatch has joined #ruby
merida has joined #ruby
Chagel has joined #ruby
x77686d has quit [Quit: x77686d]
merida_ has quit [Ping timeout: 252 seconds]
minimalism has quit [Quit: minimalism]
twistedpixels_ is now known as twistedpixels
blackmesa has joined #ruby
the_drow has joined #ruby
pawnbox has quit [Remote host closed the connection]
clyster has joined #ruby
f4cl3y has joined #ruby
e4xit has quit [Quit: e4xit]
Don_John has quit [Read error: Connection reset by peer]
LaT0rtue has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
LoneHerm_ has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
jaruga has joined #ruby
scepticulous has joined #ruby
ur5us has quit [Remote host closed the connection]
Jameser has quit [Remote host closed the connection]
niceperl has quit []
quazimodo has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
merida__ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
nando293921 has quit [Ping timeout: 276 seconds]
merida has quit [Ping timeout: 244 seconds]
LoneHerm_ has joined #ruby
hotpancakes has joined #ruby
blackgoat has quit [Ping timeout: 248 seconds]
LaT0rtue has joined #ruby
Cohedrin has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
lyoshajapan has joined #ruby
pawnbox has joined #ruby
Timba-as_ has joined #ruby
minimalism has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
drewo has quit [Ping timeout: 268 seconds]
yfeldblum has joined #ruby
aufi has joined #ruby
symm- has joined #ruby
Aswebb_ has joined #ruby
elifoster has quit [Remote host closed the connection]
User458764 has joined #ruby
andikr has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
solars has joined #ruby
skade has joined #ruby
jt__ has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
aganov has joined #ruby
Aswebb_ has quit [Ping timeout: 260 seconds]
amclain_ has quit [Quit: Leaving]
edwinvdg_ has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
pawnbox has quit [Remote host closed the connection]
haraoka has joined #ruby
vale_tudo has joined #ruby
astrobunny has quit [Remote host closed the connection]
the_drow has joined #ruby
agent_white has quit [Ping timeout: 264 seconds]
futilegames has joined #ruby
AlexJakeGreen has joined #ruby
domaldel has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
sandstrom has joined #ruby
pawnbox has joined #ruby
sandstrom has quit [Client Quit]
wethu has quit [Quit: This computer has gone to sleep]
merida has joined #ruby
IvanSuftin has joined #ruby
dikaio_ has quit [Quit: Textual IRC Client: www.textualapp.com]
hinbody has quit [Quit: leaving]
ur5us has joined #ruby
astrobunny has joined #ruby
vale_tudo has quit [Ping timeout: 248 seconds]
merida__ has quit [Ping timeout: 248 seconds]
hotpancakes has joined #ruby
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrgrieves has joined #ruby
davee_ has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
Xeago has joined #ruby
dede has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
LaT0rtue has quit [Ping timeout: 244 seconds]
DoubleMalt has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
agit0 has quit [Quit: zzzZZZ….]
hotpancakes has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
Chagel has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
pawnbox has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davee_ has joined #ruby
pawnbox has joined #ruby
biberu has joined #ruby
jt__ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
David27 has joined #ruby
David27 has quit [Client Quit]
kies has quit [Ping timeout: 260 seconds]
Chagel has joined #ruby
neanderslob has joined #ruby
LaT0rtue has joined #ruby
ur5us has joined #ruby
drewo has joined #ruby
djellemah_ has quit [Remote host closed the connection]
sandstrom has joined #ruby
quazimodo has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
Chagel has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
dc2 has quit [Ping timeout: 276 seconds]
uglybandersnatch has quit [Ping timeout: 264 seconds]
benlieb has quit [Quit: benlieb]
Couch has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
hotpancakes has joined #ruby
araujo__ has quit [Read error: Connection timed out]
Dimik has joined #ruby
agit0 has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
araujo__ has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
merida_ has joined #ruby
Chagel has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
symm- has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
domaldel has quit [Quit: Leaving]
robbyoconnor has joined #ruby
htmldrum has quit [Quit: Lost terminal]
htmldrum_ has quit [Quit: Lost terminal]
merida has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Guest32 has joined #ruby
AnoHito has quit [Read error: Connection reset by peer]
AnoHito has joined #ruby
CustosLimen has quit [Ping timeout: 260 seconds]
monoprotic has quit [Read error: Connection reset by peer]
monoprotic has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
SenpaiSilver has quit [Read error: Connection reset by peer]
moeabdol2 has joined #ruby
M-mistake has quit [Ping timeout: 260 seconds]
SenpaiSilver has joined #ruby
CustosLimen has joined #ruby
jt__ has quit [Remote host closed the connection]
Snowy has joined #ruby
SenpaiSilver has quit [Max SendQ exceeded]
bronson has joined #ruby
SenpaiSilver has joined #ruby
futilegames has left #ruby [#ruby]
RegulationD has joined #ruby
SenpaiSilver has quit [Max SendQ exceeded]
Xeago_ has quit [Read error: Connection reset by peer]
SenpaiSilver has joined #ruby
SenpaiSilver has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 252 seconds]
SenpaiSilver has joined #ruby
jt__ has joined #ruby
User458764 has joined #ruby
mikecmpbll has joined #ruby
M-mistake has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
LaT0rtue has quit [Ping timeout: 244 seconds]
mark2 has joined #ruby
lyoshajapan has joined #ruby
merida_ has quit [Remote host closed the connection]
merida has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
LaT0rtue has joined #ruby
hotpancakes has joined #ruby
kam270 has joined #ruby
b|ackwolf has quit [Ping timeout: 260 seconds]
kam270 has quit [Max SendQ exceeded]
kam270 has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
kam270 has quit [Max SendQ exceeded]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kam270 has joined #ruby
Xeago has joined #ruby
blackmesa has joined #ruby
marr has joined #ruby
weaksauce has quit [Ping timeout: 260 seconds]
brent_ has quit [Quit: Connection closed for inactivity]
Moosashi has joined #ruby
kam270 has quit [Max SendQ exceeded]
kam270 has joined #ruby
dc2 has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Chagel has quit [Ping timeout: 268 seconds]
Ishido has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
minimalism has quit [Quit: minimalism]
harryk has joined #ruby
TheHodge has joined #ruby
mikecmpbll has joined #ruby
Chagel has joined #ruby
vikas027 has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
vikas027 has left #ruby [#ruby]
<harryk> Hello! I have a strange issue for me. I have some module which I include to different classes, and when I include it more than once in one application - the self.included(subclass) method of module receives wrong (first) including class as an argument. Can anyone tell me what's wrong?
joonty has joined #ruby
skade has joined #ruby
zenergi has quit [Remote host closed the connection]
binaryplease1 has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
<apeiros> ?code harryk
<ruby[bot]> harryk: We can't help you without your code, please post it to https://gist.github.com
jt__ has quit [Remote host closed the connection]
ferr has joined #ruby
<harryk> oh, looks I've found the problem, I use self.module_eval method inside this module and methods created by first inclusion remain unchanged during next inclusions
<apeiros> specifically - try to create a minimal reproducible example.
ferr has quit [Client Quit]
elaptics`away is now known as elaptics
the_drow has joined #ruby
dionysus69 has joined #ruby
ferr has joined #ruby
<harryk> apeiros: ok, thanks ;)
al2o3-cr has quit [Ping timeout: 246 seconds]
LaT0rtue has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
hotpancakes has joined #ruby
Moosashi has quit [Quit: Moosashi]
benlovell has joined #ruby
ur5us has quit [Remote host closed the connection]
krz has quit [Ping timeout: 244 seconds]
Moosashi has joined #ruby
al2o3-cr has joined #ruby
baweaver has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
Aswebb_ has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
vircung has joined #ruby
krz has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Aswebb_ has quit [Ping timeout: 260 seconds]
ferr has quit [Ping timeout: 268 seconds]
ferr has joined #ruby
blackgoat has joined #ruby
zeroDivisible has joined #ruby
Ropeney has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
djbkd has quit [Quit: My people need me...]
tvw has quit []
blackgoat has quit [Read error: Connection timed out]
blackgoat has joined #ruby
moeabdol2 has quit [Quit: WeeChat 1.4]
kbni has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
NightMonkey has quit [Ping timeout: 244 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
<kbni> Can anyone here recommend libraries similar to her that offer the ability to make working with REST APIs simpler?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weckl has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
evidex has joined #ruby
lxsameer has joined #ruby
Guest32 has quit [Quit: Textual IRC Client: www.textualapp.com]
kariolis has joined #ruby
kariolis is now known as karioleez
<gregf_> kbni: as in clients?
<kbni> Yes, sorry.
hotpancakes has joined #ruby
<gregf_> well, theres plenty :)
<kbni> Similiar to http://www.her-rb.org/
<gregf_> oh - her.... hmmm
<apeiros> aaahaha, User.new(fullname: "Tobias Fünke")
<apeiros> somebody watched arrested development :D
CloCkWeRX has joined #ruby
<apeiros> ?toolbox kbni
<ruby[bot]> kbni: https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
<gregf_> kbni: thats something new... to me... but something like a wrapper i would imagine?
n008f4g_ has joined #ruby
<apeiros> but out of curiosity - something not good about her-rb that you look for others?
<karioleez> /msg NickServ VERIFY REGISTER karioleez tonatnhbmqbv
<gregf_> *cries*
bkxd has joined #ruby
<kbni> apeiros, well, mainly hoping for feedback about this or similar libraries - I can't seem to find anything similar
<apeiros> boy are you lucky that irc filters passwords and all we saw was "/msg NickServ VERIFY REGISTER karioleez *****"
<kbni> figured asking migth result in finding something possibly better
<karioleez> apeiros: lol
<gregf_> apeiros: haha
lyoshajapan has quit [Remote host closed the connection]
<karioleez> shit happens
<kbni> -NickServ- Invalid password for karioleez.
<gregf_> humans...
blackmesa has quit [Ping timeout: 250 seconds]
<kbni> I must commend you on quick reaction to that..
<apeiros> meatbags
drewo has joined #ruby
<karioleez> what 's the worst that could happen ?
<karioleez> :P lol
hotpancakes has quit [Ping timeout: 268 seconds]
<karioleez> I made me laugh sometimes
<apeiros> somebody taking over your identity, I'd guess
<gregf_> identity theft is so widespread
<apeiros> irc-identity only if you use different passwords on different services
<kbni> A cheeky GHOST would have been amusing. :P
moeabdol has joined #ruby
<karioleez> kbni: kbni!~kbni@192.184.95.245 failed to login to karioleez. There has been 1 failed login attempt since your last successful login.
<karioleez> one already
<gregf_> karioleez: we now know your bank login password as well.... is it ********?
<kbni> Nah, I only tried to GHOST.
<karioleez> good to know
<kbni> Because I'd need to remove you before assuming your identity.
<apeiros> kbni: I see :) (your answer to my question)
<karioleez> yep I was quick
<karioleez> well the bank account's password doesn't need the same kind of security
<gregf_> karioleez: btw, you were registering, not identifying yourself :P
<karioleez> no I haven't entered 12341234 as a password to irc
<karioleez> no problem
<karioleez> it's good to know that I've burnt out myself
<karioleez> but I am not married to my nick
<gregf_> karioleez: no need to worry, i've accidentally chatted my password too... i've lost count :|
<karioleez> :D
drewo has quit [Ping timeout: 264 seconds]
<karioleez> btw are the connections encrypted ?
<karioleez> I mean "can" they be ?
<kbni> for IRC? sure
<karioleez> ssl maybe ? freenode
<kbni> it's not forced, and you may not be using it yourself
<kbni> You are not.
<canton7> freenode has some ssl ports, and some non-ssl ports
<karioleez> :)
<karioleez> ha ok
<karioleez> I could try I guess
<canton7> make sure you're connecting to an ssl port, and tell your client to use ssl
<canton7> ... also look at sasl to identify with servies, rather than typing your nickserv password manually
<canton7> saves telling it to everyone :)
bkxd has quit [Ping timeout: 260 seconds]
karioleez has quit []
<apeiros> iirc all ports of freenode are ssl capable
<apeiros> but iirc 7000 requires ssl (i.e. is not non-ssl capable)
<apeiros> not sure, though. check with freenode docs :)
bkxd has joined #ruby
djellemah has quit [Quit: Leaving]
karioleez has joined #ruby
djellemah has joined #ruby
<apeiros> sasl auth also has the benefit of being guaranteed to be before channel join
<karioleez> hell yeah
<apeiros> which has benefits
<karioleez> I am in my SSLed version
<canton7> I thought irc didn't support something STARTSSL-like - a connection was either initiated as ssl, or not? Could be wrong.
* apeiros remembers railsconf where you could see everybody's irc passwords in plaintext
djbkd has joined #ruby
lyoshajapan has joined #ruby
<apeiros> canton7: could be. but I think you don't need to have the ports separate. fuzzy on that :)
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
<A124> Heya! I would like to do range expansion of expressions, example: Number [1:9] goes into box [1:20]. Which way would be good to implement this? Given there might be more then one expansion and range could be up to million. Recursion does not seem to me feasible.
<kbni> canton7, it might also be a non-standard add-on to the irc daemon
Spami has joined #ruby
<apeiros> A124: I don't follow
workmad3 has joined #ruby
hotpancakes has joined #ruby
djbkd has quit []
Olipro has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
Olipro has joined #ruby
wethu has joined #ruby
pandaant has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
Begi has joined #ruby
Ebok has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Ebok has quit [Client Quit]
bronson has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 252 seconds]
sgambino has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
n008f4g_ has quit [Ping timeout: 244 seconds]
DarthGandalf has quit [Ping timeout: 276 seconds]
Begi1 has joined #ruby
LaT0rtue has joined #ruby
Ebok has joined #ruby
Begi has quit [Ping timeout: 250 seconds]
Begi1 is now known as Begi
mosez has quit [Quit: Switching back to real life]
quazimodo has joined #ruby
svisjm has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby
hotpancakes has joined #ruby
astrobunny has quit [Remote host closed the connection]
<A124> apeiros Ups, late reaction it should expand into multiple lines, with those ranges.
nanoz] has joined #ruby
<A124> Number 1 goes into box 1.
<A124> Number 1 goes into box 2. ... etcetera
Xeago has quit [Remote host closed the connection]
devyn has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
DTZUZU has joined #ruby
<djellemah> A124: do you mean a cross-product?
benlovell has quit [Ping timeout: 264 seconds]
<apeiros> A124: what's a box? why does no. 1 go into box 1 AND 2?
nanoz has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
<apeiros> A124: you probably should make a (small) complete example and put it on gist.github.com
benlovell has joined #ruby
Xeago has joined #ruby
skade has joined #ruby
skade has quit [Client Quit]
<A124> Yeah, well its a generic text, its a string input from user.
<A124> I need to make the expansion, and there may be 0 to n expansions in the string. In real life just a few max usually, though.
Chagel_ has joined #ruby
araujo__ has quit [Quit: Leaving]
MrSamuel has joined #ruby
<A124> I am sorry to not describe the problem well, I hope its clear now.
Ebok has quit [Quit: Leaving]
<apeiros> not really, no. you're still leaving out massive amounts of context.
<apeiros> ping me when you've got a proper example on gist.
Moosashi has quit [Quit: Moosashi]
Chagel has quit [Ping timeout: 248 seconds]
<apeiros> the example should include at least one input with a complete output/result.
<A124> That's impossible as I am not sure what example I shuld make.
Ropeney has joined #ruby
<apeiros> ok. can't help you then.
<A124> Ok, not gist but will do.
blackmesa has quit [Ping timeout: 260 seconds]
Moosashi has joined #ruby
lyoshajapan has joined #ruby
FooMunki has joined #ruby
FooMunki has quit [Client Quit]
lyoshajapan has quit [Ping timeout: 276 seconds]
devyn has joined #ruby
Begi has quit [Quit: Begi]
Begi has joined #ruby
<apeiros> .vhdl?
Begi has quit [Client Quit]
<apeiros> interesting language choice
uglybandersnatch has joined #ruby
<apeiros> A124: so you indeed want the cartesian product.
<A124> Well, it autoselects.
<apeiros> >> [*1..2].product([*1..3])
<ruby[bot]> apeiros: # => [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3]] (https://eval.in/544973)
<apeiros> seems the autoselect was in a haste
Xeago has quit [Remote host closed the connection]
Moosashi has quit [Quit: Moosashi]
LHdez has joined #ruby
hotpancakes has joined #ruby
<A124> Thank you, that is excellent to know about.
FooMunki has joined #ruby
Timba-as_ has quit [Quit: Lingo: www.lingoirc.com]
<A124> It eats a lot of memory though, as it does first make the result then iterates.
joonty has quit [Ping timeout: 248 seconds]
<apeiros> define "lot of memory". but even if you happen to have large ranges - if you care to read the documentation of Array#product, you'll see that it takes a block.
dvinciguerra__ has joined #ruby
<A124> 800MB for few millions. Also have no idea how to use that in case I have more then two ranges.
<A124> Actually, I did use a block, but maybe in wrong way, will read on.
pawnbox has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
<apeiros> for numeric cartesian products, you can also simply use a nested loop:
<apeiros> >> result = []; 1.upto(2) do |x| 1.upto(3) do |y| result << [x, y] end; end; result
<ruby[bot]> apeiros: # => [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3]] (https://eval.in/544981)
joonty has joined #ruby
SCHAAP137 has joined #ruby
andywojo has quit [Ping timeout: 252 seconds]
mrmortondk has joined #ruby
lxsameer has joined #ruby
last_staff has joined #ruby
polysics has joined #ruby
sepp2k has joined #ruby
baweaver has joined #ruby
<hanmac> apeiros: or maybe with flat_map and map? works for non-arrays too
<hanmac> >> (1..2).flat_map {|i| (1..3).map {|j| [i, j] } }
<ruby[bot]> hanmac: # => [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3]] (https://eval.in/544982)
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
<apeiros> hanmac: that gives you the large result array A124 wants to avoid
<A124> Thank you very much. I did use the block wrong way. It does work, and seems to work in manner I need.
<apeiros> but having to enumerate millions of those smells
<A124> Only caveat is it cannot, or do not know how to make steps, if the range is not continuous.
<apeiros> reeks of xy problem
<apeiros> A124: the quality of the help you get hinges on the quality of information you give.
<kbni> Does anyone here use Cloud9 or similar? I am using Cloud9 and I love it. I'm slightly keen for a hosted solution, though.
<kbni> self-hosted*
<A124> Well, millions was to strech it. Currently 600k is what I will use. .. Yes I am aware of XY, I am helper in another channel.
vondruch has quit [Quit: Ex-Chat]
lxsameer has quit [Ping timeout: 250 seconds]
<al2o3-cr> >> [*1.step(10, 2)].product([*1..3]) # though not sure that is what you want
<ruby[bot]> al2o3-cr: # => [[1, 1], [1, 2], [1, 3], [3, 1], [3, 2], [3, 3], [5, 1], [5, 2], [5, 3], [7, 1], [7, 2], [7, 3], [9, ...check link for more (https://eval.in/544983)
<A124> apeiros My goal is both to be able iterate web links, pages, and at the same time generate arbitrary lists for simple input to other sequential programs. So millions was a strech. When I use the block correctly it works grat.
baweaver has quit [Ping timeout: 250 seconds]
Aswebb_ has joined #ruby
<A124> al2o3-cr It is! I missed the notation, I think I use other, which did work, but took again a lot of memory as I had to convert to array.
LHdez has quit [Ping timeout: 250 seconds]
<A124> I was using (1..10).step(2)
<al2o3-cr> ah, i ok
lxsameer has joined #ruby
<al2o3-cr> easy mistake to make
<A124> But it still converts to array, doesn't? by using [] parenteses
<apeiros> (1..10).step(2) does the same as 1.step(10, 2)
<apeiros> and neither of those uses an array
Moosashi has joined #ruby
<A124> No, its does not, but product expects array.
<apeiros> you can create an array from both by appending .to_a
uglybandersnatch has quit [Ping timeout: 246 seconds]
<apeiros> if you want to avoid even the input arrays, then you'll have to implement your own logic to build the product. it's not that difficult.
<A124> Which leads to the memory growth. ... Anyway I think I can live by that for now. .. I still have problems of GCing the unused stuff sometimes.
yfeldblum has quit [Ping timeout: 250 seconds]
Aswebb_ has quit [Ping timeout: 260 seconds]
<A124> Yes, logic. Which is back to original question, how would I implement such logic efficiently?
solars has joined #ruby
siaw has left #ruby [#ruby]
<A124> And efficiency in this case refers to memory, not speed.
<apeiros> either have a single integer from 0 to max-combinations and calculate from it
pawnbox_ has quit [Remote host closed the connection]
<apeiros> or have an Enumerator for each "digit" of your product and handle overflow
sandstrom has joined #ruby
Azure has quit [Remote host closed the connection]
LaT0rtue has quit [Ping timeout: 252 seconds]
sdothum has joined #ruby
uglybandersnatch has joined #ruby
<apeiros> i.e. digits = [(1..10).step(2), (5..15).step(3)]; in your loop: digits[0].next on each iteration
pawnbox has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
<apeiros> if it raises a StopIteration, rewind it and call .next on the next digit
Azure has joined #ruby
<A124> Love you. Not a way I imagined, but a way to go. Very much appreciated.
duncannz has quit [Remote host closed the connection]
<djellemah> A124: lazy enumerators are good for memory efficiency when you have large sets
davee_ has quit [Ping timeout: 276 seconds]
quazimodo has quit [Read error: Connection reset by peer]
impi0us has joined #ruby
Azure has quit [Remote host closed the connection]
millerti has joined #ruby
<apeiros> as for the single integer solution: it works the same as you count and get the individual digits of a number
vasilakisfil has joined #ruby
<apeiros> i.e. 000-999 is the cartesian product of the digits 0-9 on 3 positions. and you get all numbers by counting from 0 to 999, and the individual digits by `a,b,c = num/10*2 % 10, num/10*1 % 10, num/10*0 % 10`
<vasilakisfil> is it possible to create another object and behave like Proc ? for instance f = Foobar.new{ puts 'hey!' };
wedgwood has joined #ruby
<apeiros> vasilakisfil: any method can take a block and you can store it. so can initialize.
<apeiros> class Foobar; def initialize(&block); @block = block; end; end # then call the block whenever you want.
<apeiros> for ruby to treat it like a proc, you should implement to_proc, call and []
MrSamuel has quit [Remote host closed the connection]
<A124> apeiros Oh, yes. I got the modulo idea. But that would first mean having to exctract that somhow, and enumerators should be efficient enough. Thank you for examples.
<A124> Yeah, I am kind of noob. Started with Ruby 1.8, but since I had life difficulties that had effect on my brain and memory. So everything is hard for me now. Trying to live by.
drewo has joined #ruby
roelof has joined #ruby
skade has joined #ruby
yaewa has joined #ruby
<roelof> Hello, for learning to programm I have to sort a array but I m not allowed to use sort. Must I then write my own sort method ?
lxsameer has joined #ruby
<apeiros> roelof: that's probably the idea, yes
hotpancakes has joined #ruby
<n1colas> Hello
<roelof> apeiros: Oke I always thought that writing sorting algoritmes is hard to do
<adaedra> depends which ones.
blackmesa has joined #ruby
moei has quit [Ping timeout: 250 seconds]
<adaedra> Let's start with some theory: https://youtu.be/lyZQPjUT5B4
<apeiros> roelof: many sorting algorithms are trivial
<apeiros> roelof: the hard things is to come up yourself with a good one
drewo has quit [Ping timeout: 244 seconds]
Moosashi has quit [Quit: Moosashi]
<djellemah> vasilakisfil: looks like you want to have your initialize method work with a block argument. There are several other ways to make object instances behave like procs.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<A124> roelof Wikipedia has a lot of theory. Some sorts are expensive on reads and some on writes. https://www.youtube.com/watch?v=ZZuD6iUe3Pc
Chagel_ has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
<vasilakisfil> basically what I want is something else: I want a proc to always set as the referencing environment, the environment that is called from (using some magic + instance_exec) and not the environment that was defined. But I doubt I can do it.
vale_tudo has joined #ruby
spiman has joined #ruby
platzhirsch has joined #ruby
<djellemah> vasilakisfil: Not sure I understand what you're after, but you might be able to call binding, and pass the result of that to a method. OTOH, there's probably a better way to do what you want.
GodFather has joined #ruby
<ferr> How would I make this line of code work? array << obj.empty? ? '' : "#{object},"
andywojo has joined #ruby
<vasilakisfil> djellemah I want to define a proc in point A: proc{ return params[:foo]} and use it in point B where params variable has changed and be able to return the new params value
<vasilakisfil> how would you do that ?
mtkd has quit [Ping timeout: 276 seconds]
<djellemah> ferr: try Array#select and Array#join
yfeldblum has joined #ruby
mtkd has joined #ruby
roelof has quit [Quit: Page closed]
bkxd has quit [Ping timeout: 260 seconds]
Moosashi has joined #ruby
impi0us has quit [Ping timeout: 250 seconds]
<ferr> thanks djellemah
bkxd has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
<djellemah> >> a = 1; l = ->{a}; a = 2; l.call # vasilakisfil
<ruby[bot]> djellemah: # => 2 (https://eval.in/544994)
GodFather has quit [Ping timeout: 276 seconds]
myntcake has joined #ruby
<djellemah> vasilakisfil: in other words, a proc/lambda binds the variable, not the value of the variable. Unless A and B are in different methods/classes where you could define params as a method differently for A and B
benlovell has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
rodfersou has joined #ruby
<apeiros> s/binds/closes over/
siaw has joined #ruby
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
* djellemah can rely on apeiros to tighten up imprecision ;-)
<apeiros> always
araujo has joined #ruby
* apeiros has "master pedant" on his business card
<apeiros> not sure people spot it besides all the other titles, though.
Rickmasta has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
benlovell has joined #ruby
sgambino has joined #ruby
johnmilton has joined #ruby
hotpancakes has joined #ruby
<adaedra> You're trying to over-pedant Ox0dea?
<djellemah> collective nouns: school of fish, pod of whales, giggle of teenage girls, wunch of bankers, actually of pedants.
skade has joined #ruby
<jhass> Ox0dea: yup, you remembered right about playpen
yfeldblum has quit [Ping timeout: 248 seconds]
benlovell has quit [Ping timeout: 240 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
stannard has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
m8 has joined #ruby
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
benlovell has joined #ruby
Aswebb_ has joined #ruby
dvinciguerra__ has quit [Ping timeout: 248 seconds]
ELCALOR_ is now known as ELCALOR
benlovell has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
al2o3-cr has quit [Ping timeout: 248 seconds]
GitGud has quit [Quit: You're gonna carry that weight...]
madgen_ has joined #ruby
al2o3-cr has joined #ruby
benlovell has joined #ruby
sdothum has joined #ruby
bronson has joined #ruby
Moosashi has quit [Quit: Moosashi]
skade has quit [Read error: Connection reset by peer]
haraoka has quit [Ping timeout: 240 seconds]
LaT0rtue has joined #ruby
RegulationD has joined #ruby
ldnunes has joined #ruby
skade has joined #ruby
vikas027 has joined #ruby
drewo has joined #ruby
joonty has quit [Ping timeout: 244 seconds]
rodferso1 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
rodferso1 has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 276 seconds]
rodferso1 has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
Xeago has joined #ruby
rodfersou has quit [Ping timeout: 260 seconds]
wethu has quit [Quit: This computer has gone to sleep]
spiman has quit [Ping timeout: 264 seconds]
drewo has quit [Ping timeout: 246 seconds]
spiman has joined #ruby
hotpancakes has joined #ruby
benlovel1 has joined #ruby
but3k4 has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
Vile` has joined #ruby
krz has quit [Ping timeout: 246 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
benlovell has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
roelof has joined #ruby
jdawgaz has quit [Client Quit]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
myntcake has quit [Ping timeout: 264 seconds]
hotpancakes has quit [Ping timeout: 276 seconds]
dc2 has quit [Ping timeout: 244 seconds]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
<roelof> somone who can help me with this problem :https://gist.github.com/rwobben/7149ccb9a0a0da9e24edf3b1e0a3d3ea
freerobby has joined #ruby
<scepticulous> is there a way to get the number of currently allocated objects in jruby ?
<scepticulous> just interactively and without starting sample code with the profiler
GodFather has quit [Ping timeout: 260 seconds]
nanoz] has quit [Read error: Connection reset by peer]
benlovel1 has quit [Ping timeout: 264 seconds]
<guardian> hello, I added require 'pry' ; binding.pry inside an "it" block in rspec, but when I execute bundle exec rspec then it doesn't stop
<guardian> how can I debug rspec tests?
<apeiros> scepticulous: check ObjectSpace docs
vasilakisfil has quit [Ping timeout: 250 seconds]
<apeiros> roelof: please set the filename to anything with .rb as suffix for proper highlight. you can gist the plaintext explanation in a separate file in the same gist.
itgoner has joined #ruby
<roelof> apeiros:
<apeiros> roelof: also since line 25 in your gist (which the exception refers to) is an empty line, please provide information for how to map the line number.
<roelof> sorry, I will repaste it again
<apeiros> you can update the gist
sgambino has joined #ruby
<apeiros> no need to make a new one
sgambino has quit [Client Quit]
<roelof> apeiros: gists updated
getbrandao has joined #ruby
<roelof> I think there is a bug on the code in the book. Also when I copy the original I see a error message
<apeiros> roelof: add a `p hundreds: hundreds`, I'm pretty sure it's nil
<apeiros> ah, and I see why
leon_e has quit [Quit: Konversation terminated!]
bollullera has joined #ruby
<apeiros> your method does `puts numString` in the end. i.e. your englishNumber method always returns nil
<apeiros> (because puts returns nil)
<roelof> I do not see it. I just copied the code from the learning programming book
spiman has quit []
<apeiros> hard copy or ebook?
tvw has joined #ruby
<roelof> ebook
<apeiros> though, I'd check for errata in both cases
SCHAAP137 has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
LaT0rtue has quit [Ping timeout: 244 seconds]
<apeiros> roelof: you understood what you have to change?
<roelof> yep. the code is working , thanks
freerobby has quit [Quit: Leaving.]
jorum has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Ping timeout: 252 seconds]
roelof has quit [Quit: Page closed]
vasilakisfil has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
j3r0 has joined #ruby
Dysp has joined #ruby
joonty has joined #ruby
aryaching has quit [Client Quit]
aupadhye has joined #ruby
hotpancakes has joined #ruby
stannard has quit [Remote host closed the connection]
stan has quit [Quit: Leaving]
stan has joined #ruby
<Dysp> I have a hard time understanding array creation. I am creating a hash with an already existing array (volt-array). It should be "time" => "volt-array". I therefore need to create the time-array based on the size of the existing array. I cannot wrap my head around how to do this.
<Dysp> hash = Array.new(volt.size){|x| x * 1}.zip(volt).to_h
<Dysp> This is what I have so far.
pandaant has quit [Remote host closed the connection]
<Dysp> I creates the array alright; it just starts at the array.size and counts up from there.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
tildes has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
LaT0rtue has joined #ruby
baweaver has joined #ruby
senayar has joined #ruby
senayar was kicked from #ruby by ruby[bot] [was banned before]
<Dysp> Actually, that is not true. It counts up from zero, but it always adds one. Should only add 0.001:
<Dysp> hash = Array.new(volt.size){|x| x + 0.001}.zip(volt).to_h
<Dysp> apeiros: My savior. My mentor. The legend.
baweaver has quit [Ping timeout: 250 seconds]
BTRE has quit [Ping timeout: 264 seconds]
rodferso1 has quit [Ping timeout: 250 seconds]
drewo has joined #ruby
rodfersou has joined #ruby
dvinciguerra__ has joined #ruby
zzz__ has joined #ruby
<Dysp> Anyone? :( Im so stuck.
Suntzu has quit [Read error: Connection reset by peer]
barajasfab has quit [Ping timeout: 260 seconds]
<shevy> I did not even understand the problem description but from the code above, I am absolutely sure there is a simpler way!
Vile` has quit [Ping timeout: 244 seconds]
drewo has quit [Ping timeout: 260 seconds]
jmgxgc has joined #ruby
rbennacer has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
dubek has left #ruby ["Leaving"]
<Dysp> shevy: Probably. This is the first time ever I am coding in anything. So help is appreciated.
Chagel has joined #ruby
pawnbox has quit [Remote host closed the connection]
jorum has joined #ruby
svisjm has quit [Ping timeout: 246 seconds]
<Dysp> Basicly, what I wanna do is take predefined array (volt) and turn it into a hash that says "time" => "volt". Time should be 0.001, 0.002 and so forth. Basicly adding 0.001 each count. The size of the "time" array should be equal to the size of "volt".
<guardian> I'm a rspec/ruby beginner. Rspec tells me I can't use allow() in a describe group. I would like to have allow(Digest::SHA1).to_receive(:file).with(foo).and_return('xxx') for all "it" blocks
<guardian> is this possible?
benlovell has joined #ruby
<shevy> Dysp well build up the two arrays first, then merge/zip them into the hash? if you have them as: [1,2,3] and [0.001,0.002,0.003] that's proper right?
<Dysp> Yes. But the volt array changes size
jorum has quit [Ping timeout: 260 seconds]
BTRE has joined #ruby
<Dysp> So I cannot predefine what it should contain, only that it should count from 0 to whatever size the other array is, adding 0.001 pr step.
<Dysp> It's easy to do I am sure. I just can't wrap my head around how :P
quazimodo has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
<Dysp> hash = Array.new(volt.size){|x| x + 0.001}.zip(volt).to_h - And this works. It just doesn't count properly. It says 1.001, 2.001 etc.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
benlovell has quit [Ping timeout: 250 seconds]
hiyosi has joined #ruby
madgen_ has quit [Ping timeout: 244 seconds]
<shevy> I have no idea why you must do this all in one line
<shevy> if the sole problem is that 1.001 should be 0.001 then simply apply a .map or .map! on the Array before .zipping
swills has quit [Quit: Leaving]
jdawgaz has joined #ruby
<canton7> how do you turn 0 into 0.001, 1 into 0.002, 2 into 0.003, etc? ;)
<canton7> (simple primary-school-style series stuff)
sudoubuntu has joined #ruby
vondruch has joined #ruby
sudoubuntu has quit [Client Quit]
zzz__ has quit [Quit: Leaving...]
benlovell has joined #ruby
sdothum has joined #ruby
nfk|laptop has joined #ruby
pawnbox has joined #ruby
<Dysp> canton7: Sure it is. But I am a medical professional working with research about statins. I haven't worked with basic maths/calculations for many years ;)
fexilal has joined #ruby
<canton7> you know how to turn 0 into 1 though, and you know how to turn 1 into 0.001
<canton7> likewise you know how to turn 1 into 2, and you know how to turn 2 into 0.002
ssiris has quit [Remote host closed the connection]
f3ttX] has joined #ruby
<Dysp> I do. But it doesnt seem to work.
benlovell has quit [Ping timeout: 244 seconds]
<Dysp> hash = Array.new(volt.size){|x| (x + 1)/1000}.zip(volt).to_h
<adaedra> What do you mean by "doesn't work"
<Dysp> This only gives me 3 elements
Moosashi has joined #ruby
CausaMortis has joined #ruby
nando293921 has joined #ruby
swills has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<Dysp> If I go back to hash = Array.new(volt.size){|x| (x}.zip(volt).to_h, then it gives me them all (3000+)
pawnbox has joined #ruby
<Dysp> without the parentesis
<djellemah> Dysp: time = 0.0; volt.map{|v| rv = [time,v]; time += 0.001; rv}.to_h
merida has quit [Remote host closed the connection]
<adaedra> Be careful with floats if you need precision.
madgen_ has joined #ruby
<Dysp> djellemah: Hmm. Du er dansk, ikke?
jorum has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
<djellemah> Yes, although I'm guessing the data will end up in a chart of some kind.
GodFather has joined #ruby
<Dysp> Oh it will.
Suntzu has joined #ruby
<Dysp> Checking for the kicking speed in elderly statin users
Aswebb_ has joined #ruby
<djellemah> Dysp: Not dansk.
<Dysp> djellemah: It works for the first few elements, then it begins to fuck it up
Snowy has quit [Remote host closed the connection]
ssiris has joined #ruby
<djellemah> That's the precision problem.
Moosashi has quit [Quit: Moosashi]
<Dysp> Probably.
<adaedra> >> 0.1 + 0.2
<ruby[bot]> adaedra: # => 0.30000000000000004 (https://eval.in/545092)
benlovell has joined #ruby
<adaedra> If you need absolute precision, use rationals.
<adaedra> >> 0.1r + 0.2r
<ruby[bot]> adaedra: # => (3/10) (https://eval.in/545093)
blackmesa has joined #ruby
<djellemah> volt.each_with_index.map{|v,i| [i/1000.0,v]}.to_h
ssiris has quit [Client Quit]
<canton7> Dysp, I meant...
ssiris has joined #ruby
<canton7> >> Arran.new(5){ |x| (x + 1) / 100 }
<ruby[bot]> canton7: # => uninitialized constant Arran ...check link for more (https://eval.in/545094)
<canton7> ack
<Dysp> :D
_stu_ has joined #ruby
<adaedra> Dat fail.
blackgoat has quit [Quit: WeeChat 1.4]
<canton7> >> Array.new(5){ |x| (x + 1) / 1000.0 }
<ruby[bot]> canton7: # => [0.001, 0.002, 0.003, 0.004, 0.005] (https://eval.in/545095)
<canton7> wrong thing in my clipboard ><
jorum has quit [Ping timeout: 268 seconds]
madgen__ has joined #ruby
<Dysp> canton7: That actually works perfectly. Hm.
<Dysp> I thought I already tried that
andywojo_ has joined #ruby
oz` has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
plonk has quit [Read error: Connection reset by peer]
oz has quit [Read error: Connection reset by peer]
oz` is now known as oz
plonk has joined #ruby
plonk has joined #ruby
<Dysp> canton7: Thank you. And also thx to anyone else who helped.
shadoi1 has joined #ruby
<canton7> like I said... turn 0 into 1, turn 1 into 0.0001. primary school stuff :P
ledestin has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 248 seconds]
shadoi has quit [Ping timeout: 248 seconds]
atmosx has quit [Ping timeout: 248 seconds]
_dev has quit [Ping timeout: 248 seconds]
redondos has quit [Ping timeout: 248 seconds]
adgtl has quit [Ping timeout: 248 seconds]
<Dysp> If you work every day with codes and math, then yes.
<Dysp> But I guess you don't know how to draw blood? ;)
<adaedra> o.O
<Dysp> Or take muscle biopsies
kies has joined #ruby
duoi has quit [Excess Flood]
<adaedra> What does it have to do with current discussion?
madgen_ has quit [Ping timeout: 248 seconds]
vcoinminer has quit [Ping timeout: 248 seconds]
c355e3b has quit [Ping timeout: 248 seconds]
Ikzi has quit [Quit: No Ping reply in 180 seconds.]
rolha has joined #ruby
duoi has joined #ruby
<canton7> no, but I write the software which controls the machine which analyses the blood sample in the lab :P
andywojo has quit [Ping timeout: 248 seconds]
_blizzy_ has quit [Ping timeout: 248 seconds]
adgtl has joined #ruby
Xeago has quit [Remote host closed the connection]
Ikri has joined #ruby
<Dysp> canton7: And that is so cool :D
redondos has joined #ruby
sgambino has joined #ruby
_blizzy_ has joined #ruby
atmosx has joined #ruby
<Dysp> adaedra: It's conversation. He implied I couldn't do simple math and I agreed; because my focus is elsewhere.
felltir has joined #ruby
_dev has joined #ruby
<djellemah> Dysp is less interested in learning to code and more interested in getting the data into the shape needed.
<canton7> I'm saying that I think you're overcomplicating it in your head
myntcake has joined #ruby
roshanavand has joined #ruby
<Dysp> canton7: I probably am. There are many new things to learn when beginning to code. Especially if you start from scratch.
jimeh has quit [Ping timeout: 248 seconds]
codepete has quit [Ping timeout: 248 seconds]
<adaedra> First one is that very often, most simple solution is the best.
vcoinminer has joined #ruby
ChiefAlexander has joined #ruby
<Dysp> djellemah: Yes and no. It's a learning experience. I have learned tonnes already; but when I get really stuck, I like getting help. Because I also have a boss to answer to. I were to do the data calculations manually with copy/pasting in Excel.
c355e3b has joined #ruby
codecop_ has quit [Remote host closed the connection]
roshanavand has quit [Client Quit]
gix has joined #ruby
<Dysp> And I thought.. Well, that's an opportunity to learn how to code! But if it takes waaaaaaaaaaay longer than it would have doing it manually, then it's harder for me to defend spending the time on it.
codepete has joined #ruby
jimeh has joined #ruby
quinnie has joined #ruby
<workmad3> Dysp: how often do you do similar calculations?
astrobunny has joined #ruby
<Dysp> What do you exactly mean?
<Dysp> How often the same calculations should be done?
<workmad3> Dysp: yeah... how often do you run the same (or similar) calculations by copy-pasting data into excel
nando293921 has quit [Ping timeout: 268 seconds]
<Dysp> A lot. A very much lot. But I am assessing a problem they do not consider a problem. It is simply how it is done.
hotpancakes has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<workmad3> Dysp: yeah, it's always 'simply how it is done' until someone automates it :)
<Dysp> I am slowly trying to introduce optimizations. But you must understand that I work with doctors and professors in exercise physiology; they don't know anything of this world.
benlovell has joined #ruby
vasilakisfil has quit [Ping timeout: 268 seconds]
<workmad3> Dysp: but if you're doing it a lot, that means you can also timebox a certain amount of time with automation for each time you have to do this task
<Dysp> Exactly. But if I spend a year learning basic Ruby before I can produce anything that can prove that it is a better solution, then I'll probably not be able to do it.
Ropeney has quit [Ping timeout: 244 seconds]
quazimodo has joined #ruby
IrishGringo has joined #ruby
<djellemah> It's fairly common in research environments. Researchers need the data, but they're not programmers. Sometimes researchers learn a little coding to help their job. But it's a different focus from learning to be a developer.
<adaedra> But look at all the things you'll be able to automate!
<Dysp> There are tonnes of different calculations that could so easily be done with code, but I kinda need to show them and convince them to let me learn it.
Ropeney has joined #ruby
<Dysp> And that is what I am doing with this problem. And I am still learning a lot, I just must also focus a bit on getting shit done too ;) My actual job.
hostess has quit [Quit: No Ping reply in 180 seconds.]
<Dysp> djellemah: Indeed it is. And that is actually also one of the reasons why I wanna learn how to code - so I can become a developer that can help research labs optimize their data handling. There is a huge marked for it, I believe. Problem is, though..
<adaedra> If I may, it may be something you want to experiment for yourself for a while, if it's not your primary job.
<workmad3> ^ kinda what I was hinting at
skade has quit [Quit: Computer has gone to sleep.]
<Dysp> Developers don't no shit about health science and health science professionals don't no shit about developing. So there is a connection that must be done first; and that connection is me - knowing both worlds (in the future)
benlovell has quit [Read error: Connection reset by peer]
<Dysp> For an example..
rkazak has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
hostess has joined #ruby
benlovell has joined #ruby
<Dysp> In my lab, there has been maaaaaaaaany projects throughout the decades. Basicly they are doing the same tests on different subjects. But ALL the data is put into individual excel sheets for their individual projects.
skade has joined #ruby
<Dysp> But because it is the same test, then it would be absolutely wonderful to compare test results between different projects.
kp666 has quit [Remote host closed the connection]
sudoubuntu has joined #ruby
<Dysp> And there is no way of doing that, unless you wanna go all manual on even more excel sheets. And every project does their own excel sheets - the data handling is not standardized.
<Dysp> And that is just my lab.
<adaedra> I'm not denying your goal or anything; just, maybe not try to merge it right now if you're starting development. Do it for yourself, as an extra activity, then, once you're good enough, you can try bring it with way better efficiency
<Dysp> Oh yes indeed. This little project is simply to teach me how to code.
<Dysp> And teach me how to handle data.
<Dysp> I am not bringing out the big guns when I have absolutely nothing to show and no skills to back it up.
<adaedra> You have many places online with exercices to help you grasp on things, if you want.
hotpancakes has joined #ruby
drewo has joined #ruby
shakes has joined #ruby
<Dysp> I've tried several resources and learned basic stuff from them. But in the end I just sit there staring at the screen, because I am not motivated to create a "text editor". I need a specific goal and teach my way through it.
cdg has joined #ruby
<Dysp> And getting help from skilled programmers when I get stuck is sufficient. It has worked so far.
kp666 has joined #ruby
<adaedra> Becoming a skilled developer is way better.
<Dysp> I mean. I have created a tool that automatically searched the directory for excel files, pulls data out and creates a graph and outputs it as an excel sheet. I have figured pretty much everything out on my own and have required help twice, I believe.
<Dysp> So it's not like I just come here asking for help for every step :P
LaT0rtue has quit [Ping timeout: 244 seconds]
<Dysp> outputs as PDF. my bad.
<adaedra> right
<Dysp> It's just when I can't get it right after several tries that I seek out help.
<Dysp> And google doesn't help me.
whippythellama has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewo has quit [Ping timeout: 252 seconds]
zadrot_ebaniy has quit [Ping timeout: 240 seconds]
astrobunny has quit [Remote host closed the connection]
freerobby has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
freerobby has quit [Client Quit]
kobain has joined #ruby
floatingpoint has joined #ruby
vikas027 has quit [Read error: Connection reset by peer]
krz has joined #ruby
bronson has joined #ruby
saneax is now known as saneax_AFK
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
freerobby has joined #ruby
stannard has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit [Ping timeout: 252 seconds]
jdawgaz has joined #ruby
gevans has joined #ruby
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
synthroid has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
TvL2386 has joined #ruby
vasilakisfil has joined #ruby
synthroid has quit [Client Quit]
malconis has joined #ruby
scepticulous has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
roshanavand has joined #ruby
AckZ has joined #ruby
axl_ has joined #ruby
tvw has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
<myntcake> what exactly is enum/enumerator? does it do something? is it useful? ._.
User458764 has joined #ruby
<havenwood> myntcake: Enumerable and Enumerator both do things!
Chagel has quit [Ping timeout: 246 seconds]
LoneHerm_ has joined #ruby
schemanic has joined #ruby
<myntcake> havenwood: like i've kind of skimmed through the Enum method in Ruby doc, but i'm unsure of what it does
<gevans> myntcake: Enumerator/Enumerable is what lets you iterate (loop) over collections like Hash and Array.
<myntcake> Like, yesterday i was looking through arrays i think, and somewhere in there( I forgot..) it said that if i don't specify the default will be an Enum.
<havenwood> myntcake: Enumerable is mixed into a bunch of Classes, like Array, Range, Hash, Struct and even Enumerator. See this object model: https://www.gliffy.com/go/publish/5152080
voodo has joined #ruby
LaT0rtue has joined #ruby
<havenwood> myntcake: So the Enumerable methods are available from all these classes.
hotpancakes has quit [Remote host closed the connection]
<havenwood> myntcake: Here're a handful of examples of using Enumerator: https://github.com/havenwood/elixir.rb/blob/master/lib/elixir/stream.rb
edwinvdgraaf has joined #ruby
hotpancakes has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
malconis has quit [Remote host closed the connection]
<gevans> havenwood: That Stream#interval method is pretty awesome.
frozen3 has joined #ruby
<myntcake> hmm, so it's a class?
<havenwood> gevans: :D
LoneHerm_ has quit [Ping timeout: 268 seconds]
<havenwood> myntcake: Enumerator is a class like Hash or Array. Enumerable is a module that's mixed into some widely-used core classes and you can mix-it-in yourself.
voodo has quit [Client Quit]
hotpancakes has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<myntcake> havenwood: i don't know what a module is yet :D, I guess my program will teach me about it sooner or later haha
<shevy> a module is: module Foo; end
solocshaw has joined #ruby
<shevy> so Enumerable is: module Enumerable; end
malconis has joined #ruby
<myntcake> shevy: that just looks like a method but just changing def with module haha
darkf has quit [Quit: Leaving]
<djellemah> 23>> enum = (3..11).map; loop{ enum.feed(enum.next * 2) }
<ruby[bot]> djellemah: # => [6, 8, 10, 12, 14, 16, 18, 20, 22] (https://eval.in/545122)
hxegon has joined #ruby
Snowy has joined #ruby
<Dysp> def mean(array) array.inject(array.inject(0) { |sum, x| sum += x } / array.size.to_f) end
<Dysp> Why does that produce a type error?
skade has quit [Ping timeout: 250 seconds]
<apeiros> why the double inject?
<shevy> myntcake yeah you can add methods to a module
<djellemah> Dysp: ^ that, and what's in array?
<Dysp> I thought about that too, but I followed an example.
symm- has joined #ruby
<Dysp> Floats.
<apeiros> bad example it seems.
<apeiros> Dysp: break your code up into more lines, see which line it breaks, add a binding.pry there and inspect the values
<Dysp> It sure does seem!
<apeiros> also check again whether that double inject is really there.
<Dysp> Double inject was the problem indeed.
<Dysp> Example was from Ruby Cookbook
<apeiros> does it really do `sum += x`?
Snowy has quit [Ping timeout: 246 seconds]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
<apeiros> anyway, bad things about that solution:
<shevy> Dysp see now even apeiros tells you to break up things into more lines!
<apeiros> a) inject with += is bad, it's just +, and then it can be shortened to just .inject(0, :+)
sdwrage has joined #ruby
<Dysp> And he is, indeed, my mentor. Even if he doesn't like it.
russt has joined #ruby
<djellemah> array.reduce(:+) / array.size.to_f :-p
vasilakisfil_ has joined #ruby
<apeiros> b) / array.size.to_f -> .quo(array.size), gets you proper Rational instead of Float in case of all integers
<Dysp> Maybe the book I was using is from old verisons of Ruby.
hotpancakes has joined #ruby
<apeiros> c) depending on your point of view, NaN as value of mean for the empty set may be less preferable over nil
CloCkWeRX has quit [Remote host closed the connection]
quinnie has quit [Quit: Bye]
<Dysp> Array consists of floats and integers I believe.
Xeago has joined #ruby
<apeiros> quo existed in old versions of ruby too
<Dysp> What do I know ;D
blackmesa has quit [Ping timeout: 276 seconds]
benlovell has quit [Ping timeout: 246 seconds]
<apeiros> inject(:+) is newer
rubie has joined #ruby
<apeiros> 19>> [1,2].inject(:+)
<ruby[bot]> apeiros: # => 3 (https://eval.in/545128)
<apeiros> well, 1.9 already supported inject(:+), and 1.9 is *old*
<Dysp> So ultimately, what do you suggest me doing?
davedev24 has joined #ruby
<Dysp> Currently doing this. array.inject(0) { |sum, x| sum += x } / array.size.to_f
mtkd has joined #ruby
<apeiros> depends. what do you want for `mean([])`? nil or Float::NaN?
<Dysp> Not of much relevance, as the array is never gonna be empty.
<apeiros> haha, spoken like a true newbie ;-p
<Dysp> But I sure do get that it would be optimal to provide solution that wouldn't break the program if that would be the case.
ChiefAlexander has quit [Remote host closed the connection]
<Dysp> Haha, indeed. But I am the one making all the input files, so I know they won't be empty ^^
<apeiros> IME, if your method expects a non-empty array of integers or floats, you'll get an empty array, an array of strings, a hash, nil, anything else
<Dysp> IME?
<apeiros> in my experience
<Dysp> Kay
bogn has joined #ruby
vasilakisfil has quit [Ping timeout: 276 seconds]
<apeiros> but there's something to be said for not actively asserting correctness
fmcgeough has joined #ruby
<apeiros> well, in that case: array.inject(:+).quo(array.size)
haylon has joined #ruby
<haylon> ruby-offtopic
<apeiros> aaaactually since "array" is a horrible variable name:
kies has quit [Ping timeout: 240 seconds]
johnny56_ is now known as johnny56
<apeiros> numbers.inject(:+).quo(numbers.size) # slightly better
<Dysp> I will follow your example!
blackmesa has joined #ruby
<Dysp> And now you are forcing me to look up .quo
<Dysp> You know what you are doing!
karioleez has quit [Remote host closed the connection]
sdwrage has quit [Quit: Leaving]
jmignault has joined #ruby
<apeiros> if you know how to look up .quo, you're already ahead of so many people visiting this channel
<Dysp> Now, apeiros - if I were to only find the mean of the first, say, 100 elements in the Array, could I still use the same method as you just described? I'll do with a yes or no and then figure it out myself.
<Dysp> I just did ^_^
benlovell has joined #ruby
<Dysp> And added at comment to the code explaining it
<apeiros> yes, with a piece of code added either when calling the method, or in the method
Ropeney has quit [Quit: Leaving]
<apeiros> the first 100 elements in an array are an array themselves ;-)
<Dysp> Okay, Ill have a go at it tomorrow! Time to go home. Thank you so much for your help. I sincerely appreciate it.
<Dysp> Oh the hints!
drewo has joined #ruby
stunder has joined #ruby
Emmanuel_Chanel has joined #ruby
Dysp has quit [Quit: Page closed]
drewo has quit [Ping timeout: 244 seconds]
Guest36566 is now known as Cyrus
lyoshajapan has joined #ruby
Cyrus has quit [Changing host]
Cyrus has joined #ruby
frem has joined #ruby
jdawgaz has joined #ruby
madgen__ has quit [Quit: leaving]
wldcordeiro has joined #ruby
baweaver has joined #ruby
madgen_ has joined #ruby
madgen_ has quit [Client Quit]
rubie has quit [Remote host closed the connection]
bry4n_ has joined #ruby
lyoshajapan has quit [Ping timeout: 248 seconds]
madgen_ has joined #ruby
aganov has quit [Remote host closed the connection]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has quit [Ping timeout: 268 seconds]
m8 has quit [Ping timeout: 276 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
schemanic has quit [Ping timeout: 276 seconds]
madgen_ is now known as madgen
dopamean_ has joined #ruby
zast has joined #ruby
rubie has joined #ruby
solocshaw has quit [Quit: solocshaw]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 260 seconds]
madgen has quit [Quit: leaving]
solocshaw has joined #ruby
roelof has joined #ruby
ChiefAlexander has joined #ruby
<roelof> how can I change the output so I can see the age in years not some big number ? Code ; https://gist.github.com/rwobben/6e2dc2dd6d2b2c8cfa292591c6e83732
<roelof> I now see something like ; 1552315789.689355
rippa has joined #ruby
<apeiros> roelof: a) use Time.now, not Time.new (even if it works now), Time#- returns seconds, so the question is - how many seconds are in a year? :)
RegulationD has joined #ruby
<roelof> apeiros: oke, so the answer is in seconds
<roelof> that problem I can solve
rubie has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 244 seconds]
<gregf_> roelof: what about validations and exceptions?
whippythellama has quit [Ping timeout: 246 seconds]
sgambino has joined #ruby
kfpratt has joined #ruby
<_br___> There is a gem for that as well btw. https://github.com/tmlee/time_difference
<roelof> gregf_: I did not know that validations are needed on learning programming book ?
fedexo has joined #ruby
<gregf_> ah - sorry about that :|
antranigv has joined #ruby
Vitor has joined #ruby
itgoner has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
antranigv has quit [Client Quit]
Snowy has joined #ruby
Vitor is now known as Guest49024
davee_ has joined #ruby
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
zeroDivisible has quit [Quit: WeeChat 1.3]
madgen has joined #ruby
Xeago has quit [Remote host closed the connection]
blackmesa has joined #ruby
GodFodder has joined #ruby
schemanic has joined #ruby
<roelof> gregf_: NP , you could not known that
timeout has joined #ruby
roelof has quit [Quit: Page closed]
<timeout> When I print something using cups, it spawns a process-- how do I wait for the process to end?
<timeout> from inside a ruby script, of course.
<gregf_> >> (Time.now.to_i - Time.new(2000, 03, 30).to_i)/(365*24*60*60) # roelof
<ruby[bot]> gregf_: # => 16 (https://eval.in/545147)
dhollinger has joined #ruby
uglybandersnatch has joined #ruby
whippythellama has joined #ruby
timeout has quit [Quit: leaving]
andikr has quit [Remote host closed the connection]
<gregf_> bah , no wonder i has to type h(ie)(sr) name :/
<gregf_> would've been better writing er/sie/es :(
timeout has joined #ruby
rubie has joined #ruby
x77686d has joined #ruby
nfk|laptop has quit [Ping timeout: 244 seconds]
Spami has quit [Ping timeout: 250 seconds]
n008f4g_ has joined #ruby
bdilly has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
rubie has quit [Read error: Connection reset by peer]
hotpancakes has quit []
rubie has joined #ruby
machinewar has joined #ruby
saneax_AFK is now known as saneax
Xeago has joined #ruby
<djellemah> timeout: Process.waitpid and friends, but I've only used that for child processes and I'm not sure that applies in your situation.
DroidBurgundy has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
angrywombat has joined #ruby
bdilly has left #ruby [#ruby]
<machinewar> How to require all ruby files nested under two directories w/ possible subdirectories This works for every ruby file starting in current directory Dir["**", "*.rb"]. but i want to start from something like Dir["directory1**", "directory2**", "*.rb"]
angrywombat has left #ruby [#ruby]
angrywombat has joined #ruby
angrywombat has left #ruby [#ruby]
angrywombat has joined #ruby
<eam> machinewar: call it twice
angrywombat has left #ruby [#ruby]
angrywombat has joined #ruby
<adaedra> Dir["directory{1,2}/**/*.rb"] may work
dc2 has joined #ruby
bkxd has joined #ruby
<machinewar> Dir["{dir_1,dir_2}/**/*.rb"]
<machinewar> seems to work!
angrywombat has left #ruby [#ruby]
puddy1 has joined #ruby
elifoster has joined #ruby
benlovell has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Ping timeout: 276 seconds]
skweek has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
benlovell has joined #ruby
LaT0rtue has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
bkxd has joined #ruby
kies has joined #ruby
<apeiros> gregf_: that's only an approximation, though (that's what I wanted to get at, but had to go afk, and now roelof is offline)
benlovell has quit [Ping timeout: 268 seconds]
cwenner has joined #ruby
poguez_ has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
Guest32 has joined #ruby
infernix has quit [Ping timeout: 264 seconds]
davedev2_ has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
davedev24 has quit [Ping timeout: 248 seconds]
_stu_ has quit [Read error: Connection reset by peer]
kt2 has joined #ruby
nugit has quit [Read error: Connection reset by peer]
brendan- has quit [Read error: Connection reset by peer]
elifoster has quit [Read error: Connection reset by peer]
elifoster has joined #ruby
monoprotic has quit [Read error: Connection reset by peer]
monoprotic has joined #ruby
pietr0 has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
nugit has joined #ruby
solocshaw has quit [Remote host closed the connection]
dc2 has quit [Read error: Connection reset by peer]
pietr0 has joined #ruby
fmcgeough has quit [Read error: Connection reset by peer]
_stu_ has joined #ruby
dc2 has joined #ruby
x77686d has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
tvw has quit [Remote host closed the connection]
zast has quit [Ping timeout: 244 seconds]
x77686d has joined #ruby
pandaant has joined #ruby
KensoDev has joined #ruby
fmcgeough has joined #ruby
Snowy has quit [Quit: ragequit]
hays_ has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
maletor has joined #ruby
hays has quit [Ping timeout: 276 seconds]
skade has joined #ruby
merida has joined #ruby
kt2 has quit [Quit: ...]
ChiefAlexander has quit [Remote host closed the connection]
zast has joined #ruby
mtkd has quit [Ping timeout: 252 seconds]
ChiefAlexander has joined #ruby
Xeago has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
GnuYawk has joined #ruby
GnuYawk has joined #ruby
bronson has joined #ruby
<manveru> what do you guys use for domain validation these days?
GnuYawk has quit [Client Quit]
<manveru> addressable still says 'something,co|uk' is a valid url, and URI.parse is fine with 'something,co,uk'
puddy1 has left #ruby [#ruby]
mtkd has joined #ruby
pandaant has quit [Remote host closed the connection]
<apeiros> simpleidn (iirc) + a custom expression if I don't want to perform a dns lookup
<apeiros> I can gist the relevant code
LoneHermit has joined #ruby
freerobby has quit [Quit: Leaving.]
Guest32 has quit [Ping timeout: 246 seconds]
<manveru> ah, that's a good idea :)
nando293921 has joined #ruby
<manveru> at least for serverside validation
benlovell has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<manveru> we already depend on addressable indirectly, so i wanted to use that for the IDN transformations
bogn has quit [Quit: Leaving.]
User458764 has joined #ruby
StyXman has joined #ruby
aufi has quit [Ping timeout: 264 seconds]
<apeiros> haha, ok, it does look awkward when a window "unslurps" from the dock on your rightmost screen onto your leftmost screen
peteykun has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
<StyXman> I'm thinking of extending rdoc to handle chef repositories, so it recognizes roles, recipies and other stuff. does noybody know any docs about extending rdoc?
s00pcan has quit [Ping timeout: 244 seconds]
benlovell has quit [Ping timeout: 260 seconds]
jaruga has quit [Quit: jaruga]
amclain has joined #ruby
mistermocha has joined #ruby
<apeiros> manveru: https://gist.github.com/apeiros/1282959a5b3754f9a53ad4183540e371 - this part isn't yet in production, though. so if I'm doing something wrong, please tell :) Idn.to_ascii is just a wrapper around simpleidn which performs some additional checks related to encoding.
agent_white has joined #ruby
agit0 has joined #ruby
sorbo_ has joined #ruby
s00pcan has joined #ruby
Spami has joined #ruby
agit0 has quit [Client Quit]
marxarelli has joined #ruby
<darix> StyXman: drbrain could give you some pointers, but he isnt here atm.
SCHAAP137 has quit [Remote host closed the connection]
brent_ has joined #ruby
wilbert has joined #ruby
<manveru> apeiros: thanks, gonna see how it goes :)
timeout has quit [Quit: leaving]
<manveru> we shouldn't get too wild domains, but i'd love to have not to fix this every month
<darix> manveru: dont worry. you will. wait until people just allow more crazy things
bollullera has quit [Excess Flood]
<apeiros> manveru: I want to add stuff like multi-plane detection for idn
<darix> people still sometimes think you can validate a TLD with [A-Z]{2,3} :p
<apeiros> errr, rather multi-script
pawnbox has quit [Remote host closed the connection]
<apeiros> i.e. mixing of greek and latin letters to deceive people
<apeiros> s/i.e./e.g./
<manveru> awesome.みんな
* darix thinks apeiros could just roll his code into a gem
<darix> :p
<apeiros> darix: it is
<apeiros> just not released yet since there's still some kinks and I didn't have time
davedev24 has joined #ruby
symm- has joined #ruby
B1n4r10 has joined #ruby
<apeiros> it's a complete value validation and adaptation gem
<manveru> doing your job title full justice
davedev2_ has quit [Ping timeout: 244 seconds]
<apeiros> how is that related to my master pedant title? :-O
edwinvdgraaf has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
stunder has quit [Ping timeout: 268 seconds]
<guardian> hello, I added require 'pry' then binding.pry inside a spec test. Then when I run bundle exec rspec it doesn't stop to let me debug
<guardian> any idea please?
crazydiamond has joined #ruby
vasilakisfil_ has quit [Quit: Konversation terminated!]
Jardayn has joined #ruby
<apeiros> guardian: probably just means that the code isn't executed
machinewar has quit [Remote host closed the connection]
dikaio has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrgrieves has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
joonty has quit [Ping timeout: 264 seconds]
stunder has joined #ruby
baweaver has joined #ruby
s00pcan has quit [Ping timeout: 248 seconds]
_blizzy_ has quit [Quit: Leaving]
<guardian> hmm looking more into it
agit0 has joined #ruby
agit0 has quit [Client Quit]
s00pcan has joined #ruby
alvin_ has joined #ruby
Couch has quit [Ping timeout: 268 seconds]
fedexo has quit [Ping timeout: 250 seconds]
sp4rrow has joined #ruby
Cohedrin has joined #ruby
syner2 has joined #ruby
sorbo_ has quit [Remote host closed the connection]
sneakerhax has quit [Ping timeout: 260 seconds]
infernix has joined #ruby
anisha has quit [Quit: Leaving]
weemsledeux has joined #ruby
drewo has joined #ruby
f4cl3y has quit [Ping timeout: 244 seconds]
rehat has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
mistermo_ has joined #ruby
blackmesa has joined #ruby
sandstrom has joined #ruby
rodfersou is now known as rodfersou|lunch
CausaMortis has quit [Ping timeout: 248 seconds]
Spami_ has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
Alayde has joined #ruby
getbrandao has quit [Quit: Leaving]
Spami has quit [Ping timeout: 244 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
BSaboia has joined #ruby
jkahn has quit [Ping timeout: 276 seconds]
IrishGringo has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
alvin_ has quit [Ping timeout: 250 seconds]
hightower3 has joined #ruby
agit0 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
hightower2 has quit [Ping timeout: 244 seconds]
weemsledeux has quit [Max SendQ exceeded]
jorum has joined #ruby
GnuYawk has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
syner2 has quit [Read error: Connection reset by peer]
syner2 has joined #ruby
ixti has quit [Ping timeout: 260 seconds]
Tisho has joined #ruby
Tisho has left #ruby [#ruby]
roshanavand has quit [Quit: This computer has gone to sleep]
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
GnuYawk has quit [Quit: WeeChat 0.4.2]
freerobby has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
GodFodder has quit [Ping timeout: 268 seconds]
mistermocha has joined #ruby
BSaboia has joined #ruby
codecop has joined #ruby
polyidus has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
Devalo has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
baweaver has quit [Remote host closed the connection]
mark2 has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
TheMoonMaster has quit [Ping timeout: 244 seconds]
skade has joined #ruby
sgambino has joined #ruby
CausaMortis has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
syner2 has quit [Quit: Konversation terminated!]
weckl has quit [Quit: Leaving]
symm- has quit [Ping timeout: 264 seconds]
syner2 has joined #ruby
shinnya has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
TheMoonMaster has joined #ruby
SCHAAP137 has joined #ruby
frozen3_ has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
Balzrael has joined #ruby
polyidus has quit [Quit: Later]
mikecmpbll has joined #ruby
felltir has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 260 seconds]
LaT0rtue has joined #ruby
sneakerhax has joined #ruby
frozen3 has joined #ruby
frozen3_ has quit [Read error: Connection reset by peer]
zast has quit [Remote host closed the connection]
IrishGringo has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
madgen has quit [Ping timeout: 246 seconds]
jdawgaz has joined #ruby
cpup has quit [Ping timeout: 264 seconds]
y2mq37 has joined #ruby
binaryplease1 has quit [Quit: Goodbye cruel world]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has joined #ruby
holmser has joined #ruby
<holmser> I'm working on a script that needs unique filenames
cpup has joined #ruby
binaryplease has joined #ruby
sandelius has joined #ruby
choke has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
<holmser> Basically I'm checking against a hash of existing filenames, and if it exists I'm incrementing a serial value in the filename
<holmser> I have a sneaking suspicion that there is a much more "rubyish" way to accomplish what I'm doing, but I can't quite figure it out
pfg__ has quit []
<workmad3> holmser: you could try `Dir["prefix*"].sort[-1].succ` if there's no extension on the filename
pfg has joined #ruby
<holmser> workmad3: I'm actually pulling the filenames (actually object names) from Swift in openstack, so it's just a hash
frozen3 has quit [Read error: Connection reset by peer]
jmgxgc has quit [Remote host closed the connection]
zacts has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 276 seconds]
<holmser> I'm going to sanitize the code and throw it in a gist
<workmad3> holmser: ok, so hsh.values.sort[-1].succ then :)
frozen3 has joined #ruby
wilbert has quit [Ping timeout: 246 seconds]
<workmad3> holmser: essentially, I'm pointing you at String#succ, which will take a string like "foobar1" and turn it into "foobar2" (although it can have some issues at "foobar9", so maybe it's no good for your situation)
bronson has joined #ruby
merida has quit [Remote host closed the connection]
merida has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<holmser> this is what I've got... it just bugs me that I have to use that name line 2x
frozen3 has quit [Read error: Connection reset by peer]
frozen3 has joined #ruby
maletor has joined #ruby
spider-mario has joined #ruby
<apeiros> holmser: nowadays I just append a SecureRandom.uuid
<apeiros> why bother with a complex algorithm
Es0teric has joined #ruby
polyidus has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
jdawgaz has quit [Quit: Textual IRC Client: www.textualapp.com]
<holmser> apeiros: I just want it to be clear when the backup was taken by the filename
jdawgaz has joined #ruby
<apeiros> if your OS is decent, a file can have 255 chars
<apeiros> so that shouldn't stop you
blandflakes has joined #ruby
SCHAAP137 has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
Emmanuel_Chanel has joined #ruby
d0nn1e has quit [Ping timeout: 246 seconds]
Dimik has joined #ruby
wilbert has joined #ruby
dfockler has joined #ruby
yuung has joined #ruby
d0nn1e has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Remote host closed the connection]
duckpuppy has joined #ruby
<schemanic> Hi everyone
schemanic has quit [Quit: Leaving]
schemanic has joined #ruby
djbkd has joined #ruby
<adaedra> Hi
<schemanic> Can anyone tell me why in irb Date/Time/DateTime gives me NameError: uninitialized constant DateTime
platzhirsch has left #ruby [#ruby]
<apeiros> schemanic: because you forgot to require 'date'?
SCHAAP137 has joined #ruby
<apeiros> though, Time in that list won't give you a NameError
<schemanic> sigh. Okay. I'm sorry - the Ruby doc code example didn't have the requirement statement so I didn't understand that it wasn't standard
DoubleMalt has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
GodFather is now known as rccie
<apeiros> it is standard, but not core ;-)
stannard has quit [Remote host closed the connection]
<apeiros> (core = loaded with the interpreter, standard = comes with ruby but must be required to use)
stannard has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
GnuYawk has joined #ruby
GodFather has joined #ruby
vF3hNGxc47h8 has joined #ruby
noway has quit [Ping timeout: 246 seconds]
vF3hNGxc47h8 has quit [Client Quit]
vF3hNGxc47h8 has joined #ruby
GodFather has quit [Disconnected by services]
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
sandelius has joined #ruby
rccie is now known as GodFoddar
GodFoddar is now known as rccie
bkxd has joined #ruby
hahuang61 has joined #ruby
wilbert has quit [Ping timeout: 248 seconds]
phaza has quit [Ping timeout: 260 seconds]
dmr8 has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
blackmesa has joined #ruby
bronson has joined #ruby
rccie is now known as GodFodder
<shevy> schemanic huh you are right ruby-doc.org/stdlib/libdoc/date/rdoc/DateTime.html
<shevy> I'll file an issue request
sepp2k has joined #ruby
Devalo has joined #ruby
GodFodder is now known as GodFoddar
GodFoddar is now known as GodFodder
bkxd has quit [Ping timeout: 276 seconds]
GnuYawk` has joined #ruby
GnuYawk has quit [Quit: WeeChat 0.4.2]
GnuYawk` has quit [Remote host closed the connection]
jt__ has joined #ruby
duckpuppy has quit [Quit: WeeChat 1.4]
<schemanic> thanks for the confirm shevy
ChiefAlexander has joined #ruby
GodFoddar has joined #ruby
GodFoddar has quit [Max SendQ exceeded]
GodFodder has quit [Quit: Leaving]
yaewa has quit [Quit: Leaving...]
<Zarthus> neat
GodFather has joined #ruby
moei has joined #ruby
<Zarthus> i never knew the differences between datetime/time
* Zarthus has been using Time successfully without knowing \o/!
Devalo has quit [Ping timeout: 250 seconds]
<shevy> I still don't know it either!
baweaver has joined #ruby
duckpuppy has joined #ruby
<shevy> I know I can't rely on the docs so I must tinker :D
edwinvdgraaf has joined #ruby
<apeiros> it's less relevant now
<Zarthus> the docs for datetime paint a funny picture regardless
<Zarthus> the introduction at least
<Zarthus> the rest of it was nerdy programmer talk
<shevy> ah
GnuYawk has joined #ruby
<shevy> I just skip the part above and look for examples
<Zarthus> i read the first line and was interested enough to keep reading
<Zarthus> i like how they're basically saying "you're in need of timezones? well good luck!"
<shevy> but it's indeed not always trivial... I have a namespace DateTime... but I pull it in via requiring 'date' ... or optionparser... OptionParser but you need to require 'optparse' ... well at least optionparser page shows the require line http://ruby-doc.org/stdlib-2.3.0/libdoc/optparse/rdoc/OptionParser.html
<Zarthus> yeah i have no idea why some requires differ from their class names
<Zarthus> openstruct is ostruct as well, really annoying
vF3hNGxc47h8 has quit [Ping timeout: 268 seconds]
moos3 has joined #ruby
<shevy> I think there even used to be or still are ways to require with capitalized letters... but I can't remember right now
User458764 has joined #ruby
tubuliferous_ has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
rodfersou|lunch is now known as rodfersou
GodFather has quit [Ping timeout: 250 seconds]
DroidBur_ has joined #ruby
<apeiros> require does not care about the case, only the FS does
baweaver has quit [Ping timeout: 248 seconds]
moos3 has quit [Client Quit]
smathy has joined #ruby
DroidBur_ has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
aldodelgado has joined #ruby
madgen has joined #ruby
iceden has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
lyoshajapan has joined #ruby
iceden has quit [Client Quit]
DroidBurgundy has quit [Ping timeout: 252 seconds]
B1n4r10 has quit [Ping timeout: 244 seconds]
GnuYawk has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
dopie has joined #ruby
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
lyoshajapan has quit [Ping timeout: 248 seconds]
GnuYawk has quit [Client Quit]
TheHodge has quit [Quit: Connection closed for inactivity]
bkxd_ has joined #ruby
mistermo_ has quit [Remote host closed the connection]
yeticry has joined #ruby
duckpuppy has quit [Quit: WeeChat 1.4]
mistermocha has joined #ruby
hahuang61 has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
LHdez has joined #ruby
chouhoulis has quit [Remote host closed the connection]
roshanavand has joined #ruby
chouhoulis has joined #ruby
yuung has quit [Ping timeout: 240 seconds]
yuung has joined #ruby
ssiris has quit [Quit: End of Line]
Guest49024 has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
itaipu has joined #ruby
bkxd_ has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
postmodern has joined #ruby
IrishGringo has quit [Ping timeout: 268 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Client Quit]
duckpuppy has joined #ruby
rmulligan has joined #ruby
shakes has quit [Quit: Leaving]
roshanavand has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jero_ has joined #ruby
mistermocha has joined #ruby
User458764 has joined #ruby
eljimmy has joined #ruby
j3r0 has quit [Ping timeout: 248 seconds]
B1n4r10 has joined #ruby
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
baweaver has joined #ruby
tubuliferous_ has joined #ruby
infernix has quit [Ping timeout: 268 seconds]
maxxe has joined #ruby
acerna has quit [Ping timeout: 260 seconds]
agit0 has joined #ruby
freerobby has joined #ruby
bb010g has joined #ruby
GnuYawk has joined #ruby
acerna has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
agit0 has quit [Client Quit]
Jeff_D has joined #ruby
Gasher has joined #ruby
y2mq37 has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 248 seconds]
merida_ has joined #ruby
symm- has joined #ruby
baweaver has quit [Remote host closed the connection]
hunter42 has joined #ruby
merida has quit [Ping timeout: 276 seconds]
<hunter42> i'm trying to use "flash" and am getting this error: undefined local variable or method `flash' for SessionsController:Class ---- anyone know why?
<apeiros> ?rails hunter42
<ruby[bot]> hunter42: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
hunter42 is now known as hunter99
ferr has quit [Quit: WeeChat 1.4]
<Jeff_D> Regexp question: say I have content like `<p>This is <a id="note-27-begin"></a><a id="note-9-begin"></a>sample<a id="note-27-end"></a> content.<a id="note-9-end"></a></p>`; is it possible to craft a Regexp that will correctly match/extract the overlapping “node” pairs, or do I have to break out Nokogiri or equivalent?
_stu_ has quit [Quit: _stu_]
<apeiros> hm, what was the factoid again?
<apeiros> ?regexxml
<ruby[bot]> apeiros: I don't know anything about regexxml
<apeiros> ?regex_xml
<ruby[bot]> Don't use Regexp to parse XML or HTML. Use an XML parser like nokogiri or oga. See also: http://stackoverflow.com/a/1732454/2199687
polyidus has quit [Quit: Later]
<apeiros> sooo close
blackmesa has quit [Ping timeout: 248 seconds]
<Jeff_D> I’ve tried /<a id="note-(\d+)-begin"><\/a>(.+)<a id="note-\1-end"><\/a>/ — which picks up only the first item
<apeiros> Jeff_D: ^
<Jeff_D> OK; thanks; that makes perfect sense
<Jeff_D> sorry, my eyes aren’t as young as I used to be; hard to read and type at the same time. Thanks, all, and calling it a night at 0230 here :P
<apeiros> you can extract it with a regex, but it'll break for all kinds of changes which don't change anything semantically about the xml
Jeff_D has quit [Quit: JMP $]
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
mistermocha has quit [Remote host closed the connection]
hunter99 has quit [Client Quit]
polyidus has joined #ruby
dc2 has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
skade has joined #ruby
skade has quit [Read error: Connection reset by peer]
tomchapin has joined #ruby
skade has joined #ruby
mistermocha has joined #ruby
tomchapin has quit [Client Quit]
_djbkd has joined #ruby
skade has quit [Client Quit]
CausaMortis has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
LoneHermit has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dhollinger has joined #ruby
djbkd has quit [Ping timeout: 248 seconds]
elaptics is now known as elaptics`away
mistermo_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
solars has joined #ruby
dionysus69 has joined #ruby
cdg has quit [Remote host closed the connection]
kloeri has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 264 seconds]
kloeri has joined #ruby
<atmosx> Hello! Do we have any ruby-ML moderator hanging out here? My email apparently was "too long" and went to moderation queue :-/
yuung has quit [Quit: leaving]
mistermo_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
sandelius has joined #ruby
ljames has quit []
jackjackdripper has joined #ruby
<adaedra> tl;dr
<shevy> hah
jorum has quit [Ping timeout: 268 seconds]
<shevy> you must use short words!
<shevy> "money ??? profit"
agit0 has joined #ruby
Eiam_ has joined #ruby
zens has joined #ruby
<atmosx> adaedra: ... lol ... I thought my problem understood but apparently wasn't, so I had to write a paragraph or two :-P
infernix has joined #ruby
blackmesa has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
zens has left #ruby [#ruby]
ramfjord has joined #ruby
LHdez has quit [Ping timeout: 264 seconds]
mjuszczak has joined #ruby
nachoman has joined #ruby
<ramfjord> What's up guys? Does anyone know a clean way of converting a Date to a Time at midnight in UTC regardless of the system time? I'm messing around with using a ActiveSupport::TimeZone.parse and converting the date to a String, but it looks pretty ugly
mjuszczak has quit [Client Quit]
<shevy> most active* gem users are on #rubyonrails, in the event that nobody here can answer the question (I know I can't because I know next to nothing about the various active* gems)
<ramfjord> I'm not wedded to ActiveSupport/rails, but I don't know of any other gems that handle timezones well
<atmosx> Date.parse('2015-01-01').to_time ?
Eiam_ has quit [Ping timeout: 260 seconds]
DTZUZU has quit [Ping timeout: 276 seconds]
<apeiros> ramfjord: you're talking of code in rails?
<shevy> hmm there were some other gems... can't recall right now... chronos or something
<ramfjord> I'm not using rails, I'm just using activesupport
<apeiros> ok, I'd still go to #rubyonrails then, since those additions come from there
<atmosx> shevy: tbh there are more time related-rails gems (some do very trivial staff) than I can count
<ramfjord> ok, I'll give it a shot
<shevy> atmosx yeah
<ramfjord> atmosx: I'm pretty sure that uses the system timezone, which is exactly what I'm trying to avoid
<Ox0dea> atmosx: Chronic is pretty nifty, though.
<atmosx> ramfjord: I used tzinfo in the past to avoid the system's timezone.
dstarh has joined #ruby
symm- has quit [Ping timeout: 268 seconds]
<atmosx> Ox0dea: good to know
GnuYawk has quit [Remote host closed the connection]
shadoi has joined #ruby
GnuYawk has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
peteykun has quit [Quit: Leaving]
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
<duckpuppy> ©24
<duckpuppy> Well, that didn't work.
sp4rrow has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
sp4rrow has quit [Ping timeout: 276 seconds]
centrx has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
kobain has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Quit: Leaving]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uglybandersnatch has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ChiefAlexander has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
sp4rrow has joined #ruby
IntoTheWild27 has joined #ruby
<IntoTheWild27> ciao
<IntoTheWild27> !lista
IntoTheWild27 has left #ruby [#ruby]
polyidus has quit [Quit: Later]
uglybandersnatch has quit [Ping timeout: 244 seconds]
p0wn3d has joined #ruby
stunder has quit [Ping timeout: 248 seconds]
skade has joined #ruby
polyidus has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<adaedra> ...of course?
dionysus69 has joined #ruby
ChiefAlexander has joined #ruby
karioleez has joined #ruby
rbennacer has quit [Remote host closed the connection]
_stu_ has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
Macaveli has joined #ruby
centrx has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
<shevy> !siesta
mistermocha has quit [Ping timeout: 260 seconds]
theery has joined #ruby
hxegon is now known as hxegon_AFK
GodFather has joined #ruby
jt__ has quit [Remote host closed the connection]
p0wn3d has quit [Quit: WeeChat 1.2]
stannard has quit [Remote host closed the connection]
ixti has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
baweaver has joined #ruby
ur5us has joined #ruby
mistermocha has joined #ruby
jenrzzz has joined #ruby
stannard has joined #ruby
ur5us_ has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
ChiefAlexander has quit [Remote host closed the connection]
tvw has joined #ruby
sandstrom has joined #ruby
polyidus has quit [Quit: Later]
BSaboia has quit [Quit: Leaving]
the_drow has quit [Quit: This computer has gone to sleep]
polyidus has joined #ruby
Gooer has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
ekinmur has joined #ruby
jdawgaz has joined #ruby
hostess has quit [Quit: No Ping reply in 180 seconds.]
baweaver has joined #ruby
hostess has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Sonja has joined #ruby
ChiefAlexander has joined #ruby
<Sonja> hello
merida_ has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
uglybandersnatch has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
uglybandersnatch has joined #ruby
syner2 has quit [Quit: Konversation terminated!]
hxegon_AFK is now known as hxegon
drewo has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
theery has quit []
dionysus69 has quit [Ping timeout: 244 seconds]
codecop has quit [Remote host closed the connection]
skade has joined #ruby
yfeldblum has joined #ruby
<itaipu> how to force a gem to be installed ? I'm trying to install sup (gem install sup) but it failed to install ruby-xapian, but I installed xapian (gem install xapian) and I don't want to install ruby-xapian because is somehow broken in debian sid
dfockler has quit [Ping timeout: 264 seconds]
mistermocha has quit [Remote host closed the connection]
skade has quit [Client Quit]
<apeiros> itaipu: -y, or --no-dependencies iirc
<apeiros> see `gem help install`
<itaipu> apeiros: thks
<fexilal> what is rubinius trying to accomplish? good idea but poor execution?
<apeiros> hi Sonja
<apeiros> fexilal: what are you referring to?
<fexilal> apeiros : most benchmarks show mri performing better than rubinius.
<apeiros> fexilal: so?
lemur has joined #ruby
<shevy> fexilal the goals changed several times as did maintainers/contributors
<Dimik> say guys
<Dimik> how can i list all table names and params from sqlite3 db
<fexilal> oh
baweaver has quit [Remote host closed the connection]
<shevy> Dimik have you tried on #sqlite
tekk has quit [Quit: ZNC - http://znc.in]
<fexilal> apeiros : I thought rubinius:mri::pypy:cpython
freerobby has quit [Quit: Leaving.]
ramfjord_ has joined #ruby
<Dimik> thx <#
<apeiros> I don't know the aims of neither pypy nor cpython.
baweaver has joined #ruby
<havenwood> fexilal: Actually Topaz is quite literally written in RPython so it'd be the PyPy. :P
jkahn has joined #ruby
polyidus has quit [Quit: Later]
ramfjord has quit [Ping timeout: 248 seconds]
rodfersou is now known as rodfersou|afk
CausaMortis has joined #ruby
polyidus has joined #ruby
lemur has quit [Ping timeout: 276 seconds]
<havenwood> fexilal: http://docs.topazruby.com/
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<chrisseaton> fexilal: PyPy is written almost entirely in Python (actually RPython, but it's almost the same), Rubinius' JIT and VM internals and things like that are mostly C++, so it's not quite the same thing as what PyPy are trying
frozen3 has quit [Read error: Connection reset by peer]
Apocalypse has quit [Ping timeout: 250 seconds]
frozen3 has joined #ruby
<itaipu> gem install sup -f didn't work as expected: https://gist.github.com/marcoarthur/2281bc7c3f0438c337654a717f0096e1
DoubleMalt has joined #ruby
ceej has quit [Ping timeout: 246 seconds]
<itaipu> it can't be forced ?
<fexilal> ah I see
sandelius has joined #ruby
<shevy> itaipu you must compile something
<shevy> itaipu if it would be pure ruby you could just install it and put it into the right places; but for compiling something, on linux at least you need some generated .so file
cout has quit [Ping timeout: 240 seconds]
ceej has joined #ruby
Apocalypse has joined #ruby
<shevy> you need to find out what failed exactly, usually it is some missing .h header file
jenrzzz_ has joined #ruby
cout has joined #ruby
polyidus has quit [Ping timeout: 276 seconds]
ta__ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
frozen3_ has joined #ruby
Sonja has quit [Ping timeout: 248 seconds]
frozen3 has quit [Read error: Connection reset by peer]
chouhoulis has quit [Remote host closed the connection]
Ikri has quit [Quit: No Ping reply in 180 seconds.]
ta_ has quit [Ping timeout: 246 seconds]
yatish27 has joined #ruby
sp4rrow has quit [Ping timeout: 276 seconds]
Ikri has joined #ruby
<itaipu> shevy: that is a bit odd, since I successfuly installed the xapian 1.2.18 and the dependencie described is for at least 1.2.15
vikaton has joined #ruby
cdg has joined #ruby
<itaipu> I'm not ruby dev, but I could read the rake file
<shevy> itaipu there is no other possibility than to find out what exactly failed
aldodelgado has quit [Quit: aldodelgado]
<shevy> this does not say the compile error
<itaipu> yeah it doesn't, but that was wall that was logged in .log file
blackmesa has quit [Ping timeout: 276 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nfk|laptop has joined #ruby
blackmesa has joined #ruby
<shevy> the .log file is often useless, I always extract the gem, then work in the directory itself
<shevy> you can extract via "gem unpack"
<StyXman> darix: ack
abyx has joined #ruby
frozen3_ has quit [Ping timeout: 264 seconds]
<shevy> inside there, should be a file called extconf.rb usually which you can run; sometimes rake is used but it never works for me
<abyx> Does anyone have recommendations for upgrading from Ruby 1.9.3 to Ruby 2.3?
<shevy> once you compile, you will quickly see the specific error
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> abyx depends on how much you must change. do you have legacy code? the biggest problems I had was with encoding; smaller issues were psych, and some syntax changes like the : notation for hash
frozen3 has joined #ruby
rodfersou|afk is now known as rodfersou
ur5us_ has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
rideh has quit [Ping timeout: 244 seconds]
tvw has quit []
DarkBushido_ has quit [Ping timeout: 248 seconds]
<abyx> oh i'm not doing any ruby dev myself, i just need to upgrade to make use of compass
<abyx> shevy,
Ikri has quit [Quit: No Ping reply in 180 seconds.]
Aswebb_ has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
Ikri has joined #ruby
<abyx> also do you guys recommend installing RVM?
Bounga` has quit [Remote host closed the connection]
<adaedra> chruby!
nfk|laptop has quit [Ping timeout: 260 seconds]
rideh has joined #ruby
* havenwood beats the chruby war drums
<adaedra> favorited by both guys and gals!
<apeiros> apeirae still use rvm
<apeiros> but then again, apeirae are older than time itself
<havenwood> apeiros: A new release! https://rvm.io/blog/2016/03/rvm-1-27-0
<apeiros> havenwood: great! and it's only -14 months until rvm2 comes out!
DarkBushido has joined #ruby
DarkBushido has joined #ruby
elifoster has quit [Ping timeout: 244 seconds]
shadoi has quit [Quit: Leaving.]
LHdez has joined #ruby
skade has joined #ruby
<havenwood> abyx: Which distro/os? Do you need more than one Ruby?
quazimodo has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 250 seconds]
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elifoster has joined #ruby
LoneHerm_ has joined #ruby
<madgen> rbenv is out of fashion now, is it?
mistermocha has joined #ruby
<adaedra> ?rbenv
<ruby[bot]> Missing command under rbenv? Did you try `rbenv rehash`?
Don_John has joined #ruby
<adaedra> joke aside, I don't think it is.
nando293921 has quit [Ping timeout: 244 seconds]
<abyx> havenwood, i'm running Ubuntu 14.04.3 LTS in a vagrant VM
<abyx> i'm not sure if i'll need multiple rubies though.... probably not
tvon has joined #ruby
<havenwood> abyx: Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
_djbkd has quit [Quit: My people need me...]
LoneHerm_ has quit [Ping timeout: 244 seconds]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
<abyx> havenwood, oh sweet! thanks
bkxd has joined #ruby
<havenwood> abyx: A single Ruby 2.3.0 package ^ is the simplest thing. If you want more Rubies there's ruby-install/chruby--here's an Ubuntu guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
<benlieb> can anyone help me with a strange issue involving a byte sequence error during a paypal post back? http://stackoverflow.com/questions/36319174/ruby-2-3-0-paypal-ipn-invalid-byte-sequence-in-utf-8
myntcake has quit [Ping timeout: 268 seconds]
FooMunki has quit [Quit: FooMunki]
benlovell has joined #ruby
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
<shevy> abyx always the source - wget ftp://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.xz
shadoi has joined #ruby
x77686d has quit [Quit: x77686d]
bkxd has quit [Ping timeout: 248 seconds]
<smathy> benlieb, looks like you have some extended latin where you're expecting utf8
tvon has joined #ruby
<adaedra> shevy: why so?
kobain has joined #ruby
<benlieb> smathy: yeah, just not sure what to do
<shevy> adaedra because it is superior in every way
<adaedra> shevy: why so?
<shevy> adaedra use gobolinux then you understand
<adaedra> ah it's just light trolling, gotcha.
<shevy> mods
<benlieb> havenwood: that looks like exactly what I need. Have you used it?
ixti has quit [Quit: WeeChat 1.4]
<havenwood> benlieb: nope
<havenwood> benlieb: or there's: https://github.com/singlebrook/utf8-cleaner
maletor has quit [Quit: Computer has gone to sleep.]
yqt has joined #ruby
LHdez has quit [Ping timeout: 244 seconds]
<benlieb> havenwood: both look to be used the same amount by the community.
blackgoat has joined #ruby
maletor has joined #ruby
<benlieb> havenwood: I'm always nervous to add a gem that will affect EVERYTHING
GitGud has joined #ruby
andywojo_ has quit [Ping timeout: 276 seconds]
<havenwood> benlieb: the former uses `&&=` so it's got that in it's favor!
<havenwood> a nice treat ;)
<apeiros> the unicorn operator!
<benlieb> havenwood: haha, I just installed the latter one
<apeiros> benlieb: y u hate unicorns?!?
FooMunki has quit [Quit: FooMunki]
duckpuppy has quit [Ping timeout: 250 seconds]
<benlieb> who me?
<benlieb> lol
<benlieb> It just required not extra config
<adaedra> unicorn operator?
<apeiros> adaedra: because it's just as rarely seen in the wild ;-)
choke has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
finisherr has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
drewo has joined #ruby
baweaver has quit [Remote host closed the connection]
<benlieb> havenwood: from gem install to happy customer in 5 mins :)
<benlieb> now lunch bye
uglybandersnatch has quit [Ping timeout: 276 seconds]
elifoster has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 246 seconds]
<benlieb> havenwood: thanks for the recommendations
<havenwood> benlieb: you're welcome
hahuang61 has joined #ruby
agit0 has joined #ruby
dmr8 has quit [Quit: Leaving]
mistermocha has quit [Ping timeout: 250 seconds]
barajasfab has joined #ruby
vdamewood has joined #ruby
rodfersou has quit [Quit: leaving]
ChiefAlexander has quit [Remote host closed the connection]
fexilal has quit [Ping timeout: 260 seconds]
finisherr has quit [Ping timeout: 276 seconds]
solars has quit [Quit: WeeChat 0.4.2]
ixti has joined #ruby
schemanic has quit [Ping timeout: 260 seconds]
ChiefAlexander has joined #ruby
malconis has quit [Remote host closed the connection]
zzz has joined #ruby
malconis has joined #ruby
<floatingpoint> what is the easiest way to copy the contents of a directory into another directory wholesale (same permissions, same ownership, etc.)?
<apeiros> probably FileUtils.cp_r
<smathy> benlieb, I put my answer in your SO post, essentially: str.force_encoding("iso-8859-1").encode("utf-8")
<apeiros> almost always people who use iso-8859-1 want windows-1252 instead (strict superset)
hiyosi has joined #ruby
dstarh has quit [Read error: Connection reset by peer]
<apeiros> that is, if you're converting *from*. when converting *to* it depends of course on the target system.
<floatingpoint> apeiros perhaps, but the documentation isn't clear on how to do it properly
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
baweaver has joined #ruby
x77686d has joined #ruby
Azure has joined #ruby
ldnunes has quit [Quit: Leaving]
biberu has quit []
<smathy> benlieb, apeiros is right, there's no downside to using "windows-1252" (instead if "iso-8859-1") and it might catch some extra chars.
DoubleMalt has quit [Remote host closed the connection]
<benlieb> smathy: I just used the https://github.com/singlebrook/utf8-cleaner gem
<smathy> benlieb, ok, and that doesn't just remove the characters?
last_staff has quit [Quit: last_staff]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> smathy: why do it correctly when you can do it quickly
* apeiros sobs
<smathy> benlieb, oh hey, look at that, there's an ActiveSupport method: http://devdocs.io/rails/activesupport/multibyte/chars#method-i-tidy_bytes
cwenner has quit [Ping timeout: 252 seconds]
<benlieb> it looks like it cleaned the chars instead of removedthem
lxsameer has joined #ruby
<slash_nick> what a cute method name
<smathy> apeiros, yeah, I misread it initially. All good.
ssiris has joined #ruby
<apeiros> smathy: hm, what? I think you misunderstood me :)
<benlieb> Or actually no, the city went from G\xF6teborg to Gteborg
<apeiros> I view using utf8-cleaner as doing it quickly (and wrong)
<smathy> apeiros, sorry, meant for benlieb
<apeiros> whereas I view your approach as correct
<smathy> Looks like I didn't misread afterall :)
bollullera has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benlieb> Street from to Kung\xE4lvsgatan Kunglvsgatan
<smathy> benlieb, right, it's just stripping them.
<benlieb> ug
<apeiros> of course. it's not magic.
<smathy> Should have gone to Kungälvsgatan
<apeiros> welcome to the world of encodings.
<benlieb> yeah, well it's better than choking
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benlieb> i guess
<apeiros> if you don't know the source encoding, you're fucked.
<smathy> apeiros, no, if it used tidy_bytes on everything then it would ahve worked.
jdawgaz has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
<apeiros> smathy: haha, yeah, because it *guesses windows-1252*
<apeiros> always
<benlieb> paypal actually provides the encoding in the params,
<apeiros> how very western-euro-centric
<apeiros> def tidy_bytes(string, force = false); return string if string.empty?; return recode_windows1252_chars(string) if force; string.scrub { |bad| recode_windows1252_chars(bad) }; end
<smathy> apeiros, right, but if you know that's what your incoming strings are, then it would have worked.
* apeiros goes barf in a corner
<benlieb> maybe the https://github.com/whitequark/rack-utf8_sanitizer is better since it tries to coerce the bad data into good data
yfeldblum has joined #ruby
<apeiros> if you know your incoming encoding, you can just straight do the right thing and set the e/i encoding of the IO
Aviio has joined #ruby
<apeiros> I'm amazed how many programmers cling to guess-working solutions over solid solutions. makes me kinda sad.
<benlieb> but if this is choking inside of rails while trying to parse params, it's not easy to clean it myself
<smathy> benlieb, yep, that's using basically the same code I showed you.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has quit [Quit: Leaving...]
<smathy> benlieb, just be aware, it's middleware, so it's going to process everything.
bollullera has left #ruby [#ruby]
<rik> i had to def (Sequel::Model.db).connection_pragmas the other day. I don't understand the brackets there. Can anyone help me with the language part of that? why did I need those brackets, and how should I fugure out next time that I do?
symm- has joined #ruby
<benlieb> smathy: I know, scary, but it's either that or write the middleware myself.
<smathy> apeiros, the "IO" is just arriving in a http callback, can't set it on the IO object itself.
<smathy> benlieb, umm, no, just put the code I showed you in your model.
aupadhye has quit [Quit: Leaving]
<benlieb> smathy: but that only solves the problem for that model...
<smathy> ...or controller might be better.
sp4rrow has joined #ruby
<apeiros> smathy: if your IO is used for multiple encodings, the proper source encoding is binary, using .force_encoding on substrings of a known encoding.
<smathy> benlieb, how many callbacks from Paypal are you processing?
<apeiros> scrubbing is a fallback for scenarios where specifications are bad
<apeiros> or for actually invalid input - though then I prefer using a bat on the supplier.
gregf has quit [Quit: WeeChat 1.4]
<benlieb> smathy: just that one, but the problem is that any user can submit funky encodings
<smathy> apeiros, the supplier is PayPal, good luck with that.
<benlieb> I'm not an encoding expert by any means
<smathy> benlieb, how?
lxsameer has quit [Quit: WeeChat 1.4]
<smathy> benlieb, where else are you getting input strings from?
lxsameer has joined #ruby
<apeiros> smathy: it's not unlikely that they give the proper encoding. http has an encoding header after all.
<benlieb> smathy: various services (stripe etc)
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
bkxd has joined #ruby
lxsameer has quit [Client Quit]
<smathy> apeiros, not a request header (AFAIK), servers just infer the type from the accept-encoding or accept-charset, whatever it is, AFAIK.
skweek has joined #ruby
lxsameer has joined #ruby
<smathy> benlieb, and they're sending non-UTF8 as well?
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> smathy: content-type usually contains the encoding
<smathy> apeiros, that's a response header, not a request header.
<smathy> These are callbacks coming into the server.
<apeiros> smathy: um, yes, if you have a body, there's content-type
<apeiros> in the request too
<apeiros> because - surprise - you can have different types of content in a body
<smathy> apeiros, oh cool, TIL.
<apeiros> it *might* be differently named
jenrzzz_ has quit [Ping timeout: 268 seconds]
<apeiros> but iirc it was just content-type too
B1n4r10 has quit [Ping timeout: 264 seconds]
<smathy> Seems sensible.
<apeiros> without a body it makes no sense of course and therefore isn't present. so good luck on url params :-/
<smathy> Well, they should be URI encoded right?
<apeiros> again, iirc. it's been a while since I worked through that swamp
<smathy> ...oh, but to what :)
<apeiros> yes, but that means it's just bytes
<apeiros> and you don't know how those bytes are supposed to be mapped to characters
<smathy> Yeah.
<apeiros> which is what an encoding does :)
<smathy> Fun.
<smathy> Unless URI encoding has a set charset.
<apeiros> ask me again in ~6 months
<apeiros> in the hopes that I've written those parts of my webframework until then. because I'll have to get up to speed with the current situation for that.
bkxd has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 276 seconds]
<apeiros> smathy: re content-type in requests - the most fun I have so far is multipart with xml+pdf :) (part of a soap api we use)
kobain has joined #ruby
<smathy> apeiros, heh, I'm sure.
haylon has quit [Quit: WeeChat 1.4]
andywojo has joined #ruby
Madplatypus has joined #ruby
<apeiros> the most common is probably www-url-form-encoded or whatever the precise spelling was
dangeranger has joined #ruby
<apeiros> second most common is probably either json or xml
<Madplatypus> Hello everyone
polysics has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
polysics has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
frozen3_ has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
nachoman has quit []
bb010g has quit [Quit: Connection closed for inactivity]
frozen3 has quit [Ping timeout: 264 seconds]
mrmortondk has joined #ruby
polysics has quit [Ping timeout: 252 seconds]
n008f4g_ has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
Trynemjoel has quit [Ping timeout: 264 seconds]
dangeranger has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
karioleez has quit [Remote host closed the connection]
lemur has joined #ruby
itaipu has quit [Ping timeout: 276 seconds]
prodigel has joined #ruby
f3ttX] has quit [Remote host closed the connection]
f3ttX] has joined #ruby
<prodigel> Hey all. Ruby noob here, trying to use mina to make a deploy and I get an error I'm not sure I understand: Errno::ENOENT: No such file or directory @ rb_sysopen - /usr/lib/ruby/data/deploy.sh.erb. Am I missing an app/gem/etc? Is the deploy task broken? So many questions ... :D
uglybandersnatch has joined #ruby
lkba has joined #ruby
marxarelli has joined #ruby
f3ttX] has quit [Remote host closed the connection]
f3ttX] has joined #ruby
lemur has quit [Ping timeout: 248 seconds]
ur5us has quit [Ping timeout: 268 seconds]
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
PaulCape_ has joined #ruby
baweaver has quit [Changing host]
baweaver has joined #ruby
Balzrael has quit [Quit: Leaving]
abyx has joined #ruby
spk has quit [Ping timeout: 260 seconds]
chrisja has joined #ruby
chrisja has quit [Client Quit]
chrisja has joined #ruby
Xeago has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
PaulCapestany has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
spk has joined #ruby
benlieb has quit [Client Quit]
apeiros has quit [Changing host]
apeiros has joined #ruby
rkazak has joined #ruby
wethu has joined #ruby
blackjid has quit [Max SendQ exceeded]
davee_ has quit [Quit: Leaving]
blackjid has joined #ruby
stannard has quit [Remote host closed the connection]
havenwood has quit [Changing host]
havenwood has joined #ruby
rkazak has quit [Ping timeout: 240 seconds]
choke has joined #ruby
n008f4g_ has quit [Ping timeout: 276 seconds]
ledestin has joined #ruby
Radar has quit [Changing host]
Radar has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<smathy> prodigel, how did you install mina?
<shevy> it tries to find a file at that path but there is no file there
madgen has quit [Ping timeout: 248 seconds]
helpa has quit [Changing host]
helpa has joined #ruby
LoneHerm_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
baweaver is now known as lemur
mistermocha has joined #ruby
lemur is now known as baweaver
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
itaipu has joined #ruby
CausaMortis has quit [Ping timeout: 244 seconds]
LoneHerm_ has quit [Ping timeout: 250 seconds]
axl_ has quit [Quit: axl_]
Moosashi has joined #ruby
uglybandersnatch has quit [Ping timeout: 248 seconds]
aeterne has joined #ruby
baweaver is now known as lemur
lemur is now known as baweaver
darkf has joined #ruby
ruby-lang930 has joined #ruby
<ruby-lang930> Is there a way to setup common test data across minitest tests? ie. I want to use the same object for testing in several of my tests.
tzhuang has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
<prodigel> smathy, I finally run bundle install and that fixed the issue
<prodigel> I guess it generated that missing file
<smathy> Well, it installed the gem, yes :)
maletor has joined #ruby
bry4n_ has quit [Ping timeout: 244 seconds]
ruby[bot] has joined #ruby
lkba_ has joined #ruby
ur5us has joined #ruby
spider-mario has quit [Remote host closed the connection]
phpwebdev has joined #ruby
_stu_ has quit [Quit: _stu_]
holmser has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 276 seconds]
Aviio has quit [Remote host closed the connection]
Aviio has joined #ruby
prodigel has quit [Quit: Ex-Chat]
radar_is_gey has joined #ruby
<radar_is_gey> boo
Es0teric has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
radar_is_gey has quit [Client Quit]
dopamean_ has quit [Ping timeout: 248 seconds]
n008f4g_ has joined #ruby
GnuYawk has quit [Ping timeout: 260 seconds]
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
<Ox0dea> But why?
<shevy> lol
myntcake has joined #ruby
tvon has joined #ruby
duoi has quit [Max SendQ exceeded]
stantona has joined #ruby
duoi has joined #ruby
duoi has quit [Changing host]
duoi has joined #ruby
DTZUZU has joined #ruby
<stantona> What is ruby-timer-thr?
Cohedrin_ has joined #ruby
<Ox0dea> stantona: The currently executing thread of your Ruby process.
zenlot6 has joined #ruby
Moosashi has quit [Ping timeout: 276 seconds]
<stantona> Thanks
<Ox0dea> Sure thing.
quazimodo has joined #ruby
Cohedrin has quit [Ping timeout: 276 seconds]
zenlot has quit [Ping timeout: 246 seconds]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
baweaver has quit [Remote host closed the connection]
roshanavand has quit [Read error: Connection reset by peer]
sp4rrow has joined #ruby
whippythellama has quit [Ping timeout: 248 seconds]
roshanavand has joined #ruby
wilbert has joined #ruby
dvinciguerra__ has quit [Ping timeout: 244 seconds]
SCHAAP137 has quit [Quit: Leaving]
tzhuang has quit [Ping timeout: 260 seconds]
madgen has joined #ruby
Cohedrin has joined #ruby
johnmilton has quit [Remote host closed the connection]
Cohedrin_ has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
bkxd has joined #ruby
uglybandersnatch has joined #ruby
<ruby-lang930> Is there a way to setup common test data across minitest tests? ie. I want to use the same object for testing in several of my tests.
bkxd has quit [Ping timeout: 244 seconds]
FooMunki has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
<Ox0dea> ruby-lang930: You want a "subject".
mistermocha has joined #ruby
uglybandersnatc- has joined #ruby
_blizzy_ has joined #ruby
freerobby has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
mistermocha has quit [Remote host closed the connection]
Gooer has quit [Ping timeout: 244 seconds]
frozen3_ has quit [Read error: Connection reset by peer]
roshanavand has quit [Quit: This computer has gone to sleep]
uglybandersnatc- has quit [Ping timeout: 244 seconds]
Cohedrin_ has joined #ruby
DarthGandalf has joined #ruby
mistermocha has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
smathy has quit [Changing host]
smathy has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
frozen3 has joined #ruby
uglybandersnatch has joined #ruby
Cohedrin has quit [Ping timeout: 276 seconds]
saneax_AFK is now known as saneax
mistermocha has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Changing host]
mikecmpbll has joined #ruby
uglybandersnatch has quit [Ping timeout: 246 seconds]
chrisja has quit [Quit: leaving]
CloCkWeRX has joined #ruby
Xeago has joined #ruby
russt has quit [Remote host closed the connection]
sysodaff has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
roshanavand has joined #ruby
sysodaff has quit [Remote host closed the connection]
f3ttX] has quit [Remote host closed the connection]
kies has quit [Ping timeout: 268 seconds]
bronson has quit [Remote host closed the connection]
evidex has quit [Remote host closed the connection]
<ruby-lang930> Is there a way to setup common test data across minitest tests? ie. I want to use the same object for testing in several of my tests.
<baweaver> ruby-lang930: read up, Ox0dea answered you a while back
mistermocha has joined #ruby
gregf has joined #ruby
ccc999 has joined #ruby
myntcake has quit [Ping timeout: 250 seconds]
ccc999 is now known as c999
<ruby-lang930> Hmm, seems that subjects only apply to rspec (BDD). Is there something similar for TDD unit tests?
benlieb has joined #ruby
<ruby-lang930> baweaver: Hmm, seems that subjects only apply to rspec (BDD). Is there something similar for TDD unit tests?
dfockler has joined #ruby
<baweaver> remember that having shared state is generally bad
c999 has quit [Client Quit]
<baweaver> you could always look into helpers (not incredibly familiar with minitest admittedly)
<baweaver> that looks to cover some of it.
agit0 has quit [Read error: Connection reset by peer]
decoponio has quit [Quit: Leaving...]
edwinvdgraaf has quit [Remote host closed the connection]
phpwebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IrishGringo has joined #ruby
russt has joined #ruby
LaT0rtue has quit [Read error: Connection reset by peer]
idletask has quit [Ping timeout: 248 seconds]
Xeago has quit [Ping timeout: 240 seconds]
whippythellama has joined #ruby
itaipu has quit [Ping timeout: 260 seconds]
<smathy> ruby-lang930, a subject in rspec doesn't maintain state between `it` blocks you know.
tzhuang has joined #ruby
<smathy> ruby-lang930, ie. it's really just the same as: def setup; @subject = something; end in xunit.
bronson has joined #ruby
xlegoman has joined #ruby
<ruby-lang930> smathy: I dont think that's really what I'm looking for then. I think what I need is something akin to fixtures in Rails (but in my case I don't need to deal with a database).
<bodgix> hey everyone. this question has been bothering me for some time now. are there any reasons for using polymorphism in ruby or more generally dynamically typed languages? I mean unless there's common functionality which can be extracted into the base class, I don't see many reasons to create class hierarchies, duck typing could be used instead? Anyone has any ideas why class hierarchies would be better besides the organization of code?
DTZUZU has quit [Ping timeout: 260 seconds]
<baweaver> !poodr
<baweaver> no? Ah well
<smathy> ruby-lang930, so just write it.
<baweaver> Practical Object Oriented Design in Ruby is a good read on that bodgix
<bodgix> I've read it iirc. There's an example with bicycles?
<baweaver> yeah
<baweaver> normally ruby uses module inclusion though
<ruby-lang930> smathy: I mean that I don't want to write the same setup for several tests.
<baweaver> kinda akin to interfaces in other languages.
<bodgix> I think I'll read this chapter again
gix has quit [Quit: Client exiting]
<bodgix> the thing is that technically it's not needed in ruby as opposed to java for example
<smathy> ruby-lang930, right, of course not. Write it in one place and use it wherever you need to.
<ruby-lang930> smathy: Sorry I'm not sure I understand. You mean write a module and include the require the code into my tests?
idletask has joined #ruby
<Ox0dea> ruby-lang930: Sounds like you want a before block.
goglosh has joined #ruby
<smathy> ruby-lang930, yes, could be a module that you include, some methods in your test_helper.rb, or a class you call from your tests. Whatever you want.
maletor has quit [Quit: Computer has gone to sleep.]
<smathy> You could write a base class for all your tests with the methods in it if you wanted. This is ruby, there are many ways of using the same functionality in multiple places.
gix has joined #ruby
Alayde has quit [Ping timeout: 244 seconds]
cdg has quit [Remote host closed the connection]
skade has joined #ruby
ramfjord_ has quit [Ping timeout: 244 seconds]
cdg has joined #ruby
hiyosi has quit [Ping timeout: 248 seconds]
benlieb has quit [Quit: benlieb]
Aswebb_ has joined #ruby
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
cdg has quit [Ping timeout: 248 seconds]
maletor has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
sepp2k has quit [Read error: Connection reset by peer]
russt has quit [Quit: That's all, folks!]
Aswebb_ has quit [Ping timeout: 260 seconds]
dfockler has quit [Quit: Leaving]
DLSteve has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
teej has joined #ruby
russt has joined #ruby
chouhoulis has joined #ruby
lemur has joined #ruby
<riceandbeans> what's a safe way to check if a variable exists?
spuk has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
millerti has quit [Client Quit]
<apeiros> read your code. and if that's not sufficient, you probably are doing something wrong.
QualityAddict has joined #ruby
<riceandbeans> no that ain't it
<riceandbeans> I think I want if defined?(foo)
<baweaver> !xy
<baweaver> ?xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<baweaver> aha
<apeiros> and I think if you want that, you do indeed something quite wrong
<Ox0dea> Is `defined?` never justified?
<apeiros> baweaver: all factoids are ? prefixed
* baweaver keeps forgetting
<apeiros> Ox0dea: IMO exceedingly rarely justified
<Radar> baweaver: apeiros and I conspired to ensure maximum factoid prefix confusion
<riceandbeans> well, basically I have an ERB file, I just want some chunks of template to exist if a variable is set, if the variable isn't set to anything I don't care and it doesn't need to go in the template
<baweaver> >> v = nil; if v then 'foo' else 'bar' end
<ruby[bot]> baweaver: # => "bar" (https://eval.in/545287)
<apeiros> riceandbeans: use a proper control variable which states that intent