havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
milardovich has quit []
bruno- has joined #ruby
bruno- has quit [Client Quit]
bruno- has joined #ruby
bruno- has quit [Client Quit]
Guest67763 has joined #ruby
duckpuppy has joined #ruby
Guest67763 has quit [Client Quit]
aryaching has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
shayan_ has quit [Quit: shayan_]
bruno-_ has quit [Client Quit]
duckpuppy has quit [Ping timeout: 240 seconds]
enterprisey has quit [Ping timeout: 255 seconds]
AndBobsY_ has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
bruno-_ has joined #ruby
bruno-_ has quit [Client Quit]
masondesu has joined #ruby
flying has quit []
enilsen16 has quit [Quit: enilsen16]
enterprisey has joined #ruby
AndBobsY_ has quit [Ping timeout: 255 seconds]
sepp2k has quit [Quit: Leaving.]
AndBobsYourUncle has joined #ruby
braincrash has joined #ruby
Pupeno has quit [Remote host closed the connection]
<fishcooker> thanks for the sample of rb code, eelster... *err offline eval.in is new to me thankyou... ytti you got my point. I think there is time difference because the crontab is not even show the scheduled time
<fishcooker> looks like the rb apps config not respect the server time
masondesu has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshS has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
aremaref has joined #ruby
username_ has quit [Ping timeout: 240 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
masondesu has joined #ruby
masondesu has quit [Client Quit]
masondesu has joined #ruby
iffyuva has quit [Ping timeout: 256 seconds]
cdg_ has quit [Remote host closed the connection]
reverberations has joined #ruby
masondesu has quit [Changing host]
masondesu has joined #ruby
Anonymoose2 has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
reverberations has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
masondesu has quit [Quit: Textual IRC Client: www.textualapp.com]
masondesu has joined #ruby
sneakerhax has joined #ruby
TreyG has joined #ruby
enyo_ has joined #ruby
enyo_ has quit [Ping timeout: 255 seconds]
reverberations has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
dcunit3d has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
polysics has joined #ruby
Guest32445 is now known as ged
fredolinhares has joined #ruby
ged is now known as Guest51888
duckpuppy has joined #ruby
polysics has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
marr has quit [Ping timeout: 245 seconds]
nikivi has quit [Quit: irc]
arescorpio has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
saneax is now known as saneax-_-|AFK
aryaching has joined #ruby
reverberations has quit [Ping timeout: 248 seconds]
aeontech has joined #ruby
duckpuppy has joined #ruby
testuser1 has joined #ruby
sneakerhax has quit [Quit: Back later]
brent__ has joined #ruby
ianmethyst has quit [Quit: WeeChat 1.6]
Lord_of_Life has quit [Excess Flood]
AndBobsYourUncle has joined #ruby
Lord_of_Life has joined #ruby
charliesome has joined #ruby
reverberations has joined #ruby
charliesome has quit [Client Quit]
fredolinhares has quit [Quit: WeeChat 1.6]
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
polysics has joined #ruby
aremaref has quit [Ping timeout: 240 seconds]
reverberations has quit [Read error: Connection reset by peer]
darix has quit [Quit: may the packets be with you...]
darix has joined #ruby
polysics has quit [Ping timeout: 260 seconds]
Kaze_FX has quit [Quit: WeeChat 1.0.1]
eelster has joined #ruby
Blaguvest has quit []
Gasher has quit [Quit: Leaving]
tmtwd has joined #ruby
sneakerhax has joined #ruby
reverberations has joined #ruby
<eelster> So here's a kinda fun question, what stdlib class do you use that you think is highly underused.
Guest51888 is now known as ged
ged is now known as Guest65828
bronson has joined #ruby
brent__ has quit [Remote host closed the connection]
domgetter has quit [Ping timeout: 240 seconds]
araujo has quit [Read error: Connection timed out]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<zenspider> fishcooker: huh?
<zenspider> maybe it is utc?
<zenspider> eelster: rinda
brent__ has joined #ruby
<eelster> zenspider: Never even heard of it. What does it do?
<blackbom1> eelster: net/http
<blackbom1> rexml
<eelster> net/http is fantastic
<zenspider> oooh I have to disagree there... rexml is _terrible_
<zenspider> and yes, streaming or whole. don't care.
<eelster> I don't use rexml
<blackbom1> true
<blackbom1> net/http deserves more love tho
<eelster> So rinda is for tuples?
<zenspider> eelster: rinda is a linda-tuplespace written in a few hundred lines of ruby
<zenspider> distributed multiprocess tuples, yes
reverberations has quit [Ping timeout: 260 seconds]
<blackbom1> stdlib feels unmaintained sometimes
<eelster> That's brilliant
<eelster> blackbom1: Some of it kinda is
<blackbom1> imo it'd be great if net/http provided less APIs
<zenspider> some of it definitely is. rexml is a prime example of that
<eelster> Remember that whole openssl problem
<blackbom1> i think thats what confuses peole
<zenspider> tsort
<eelster> So, I might be a moron, but why is require 'rinda' not working?
<blackbom1> emapper
<eelster> Oh, you can't req the entire module
<eelster> Or you can but you need to do 'rinda/rinda'
<zenspider> you probably want rinda/tuplespace too, but separate file
<eelster> zenspider: Thanks!
<zenspider> there's also a talk, MIGHT be recorded... http://blog.nicksieger.com/articles/2006/10/21/rubyconf-rinda-in-the-real-world/
<zenspider> actually fuck that... this has both sides really clearly illustrated https://en.wikipedia.org/wiki/Rinda_(Ruby_programming_language)
<eelster> Ah thank you!
<eelster> English is a weird module, but I like it
<eelster> And coverage is awesome
bronson has quit [Remote host closed the connection]
<blackbom1> tracepoint
<eelster> I thought tracepoint wasn't in STDLIB
<eelster> Also, why isn't nokogiri in STDLIB?
enyo_ has joined #ruby
dcunit3d has quit [Ping timeout: 258 seconds]
bronson has joined #ruby
<blackbom1> depends on libxml
enyo_ has quit [Ping timeout: 240 seconds]
dcunit3d has joined #ruby
<eelster> blackbom1: But it's such an essential lib to ruby. I feel like including both libxml and nokogiri in stdlib would be logical
brent__ has quit [Remote host closed the connection]
<zenspider> eelster: if anything... why aren't all these things we've mentioned gems and NOT in stdlib?
AndBobsYourUncle has joined #ruby
<zenspider> nokogiri doesn't belong in stdlib. it versions too fast for ruby
AndBobsYourUncle has quit [Remote host closed the connection]
<eelster> zenspider: That's true.
<adam12> and some people prefer Oga
marcdel has quit [Ping timeout: 240 seconds]
<zenspider> rdoc and rake and others should be jettisoned ... all of them really
AndBobsYourUncle has joined #ruby
<zenspider> then ruby should install gems on install
<zenspider> what's oga?
<eelster> Ruby's STDLIB is weird because most languages have essential modules in their stdlib, like Java, but ruby doesn't really need its stdlib.
<adam12> zenspider: similar to nokogiri, but no lib dependency.
<zenspider> eelster: we're wierd that way. we have core AND stdlib where most have one or the other
<zenspider> adam12: oh... it's that pure ruby one, isn't it? done by someone who used to be in here... forget
<adam12> zenspider: aye
<eelster> zenspider: Honestly, I rarely use stdlib stuff.
d^sh has quit [Ping timeout: 248 seconds]
<adam12> pure ruby with small c lib I believe.
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
<zenspider> right. because it uses ragel. yeah. that guy. no thanks.
d^sh has joined #ruby
<zenspider> I'll stick to nokogiri
binaryplease has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
<adam12> Anyways, my point was to agree - nokogiri or similar shouldn't be in libxml
Bob8989|2 has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<adam12> err, stdlib
<adam12> apparently I can't word tonight
hanmac has quit [Ping timeout: 240 seconds]
<zenspider> wordsing is hard
<adam12> didn't nokogiri replace one of _why's libs?
<adam12> "replace" as in new hotness at the time.
<zenspider> yeah... it directly targeted it's api because it was popular but pretty buggy
<zenspider> (and because the api was a good design)
<eelster> To be honest, I'm very sad _why is no longer in deving because he made the best stuff.
<adam12> Hpricot maybe.
<zenspider> that one. I was thinking fruit but my brain is... um... altered
<adam12> lol
araujo has quit [Read error: Connection timed out]
<adam12> I kinda miss _why. Not that we should be idolizing people, but he released _fun_ stuff
<zenspider> eelster: eh. I think he did a good job at what he wanted to do. I appreciated his contributions if not his actual code...
<zenspider> (that was to the previous comment, but applies to both)
araujo has joined #ruby
<eelster> I am not huge into idolizing people. I just on the whole enjoyed his contributions more than most others.
<eelster> Also, _why's poignant guide was amazing.
TreyG_ has joined #ruby
bronson has quit [Remote host closed the connection]
Channel6 has quit [Read error: Connection reset by peer]
TreyG has quit [Ping timeout: 240 seconds]
polysics has joined #ruby
eelster has quit [Quit: leaving]
hanmac has joined #ruby
polysics has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
Vile` has joined #ruby
hahuang61 has joined #ruby
nettoweb has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 255 seconds]
dcunit3d has quit [Ping timeout: 245 seconds]
Guest65828 is now known as ged
TreyG has joined #ruby
ged is now known as Guest40231
blandflakes has joined #ruby
TreyG_ has quit [Ping timeout: 260 seconds]
blandflakes has quit [Client Quit]
nettoweb1 has joined #ruby
houhoulis has quit [Remote host closed the connection]
aremaref has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
nettoweb has quit [Ping timeout: 260 seconds]
empty_cup has joined #ruby
houhoulis has joined #ruby
braincrash has quit [Ping timeout: 258 seconds]
jcao219 has quit [Ping timeout: 256 seconds]
TreyG has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 240 seconds]
TreyG has joined #ruby
fishcooker has quit [Ping timeout: 240 seconds]
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has joined #ruby
A_Drone has joined #ruby
A_Drone has quit [Client Quit]
aeontech has quit [Quit: aeontech]
charliesome has joined #ruby
aeontech has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
<zenspider> poignant guide never worked for me...
testuser1 has quit [Quit: Leaving.]
braincrash has joined #ruby
nankyokusei has joined #ruby
charliesome has quit [Client Quit]
ponga has quit []
Azure has quit [Ping timeout: 240 seconds]
aremaref has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
masondesu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
fishcooker has joined #ruby
fishcooker has quit [Max SendQ exceeded]
fishcooker has joined #ruby
fishcooker has quit [Max SendQ exceeded]
roamingdog has joined #ruby
polysics has joined #ruby
conta has joined #ruby
braincrash has quit [Ping timeout: 260 seconds]
brent__ has quit [Remote host closed the connection]
Azure has joined #ruby
polysics has quit [Ping timeout: 245 seconds]
conta has quit [Ping timeout: 258 seconds]
aryaching has quit [Ping timeout: 258 seconds]
AndBobsYourUncle has quit [Remote host closed the connection]
Karunamon has quit [Quit: Later!]
AndBobsYourUncle has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
fishcooker has joined #ruby
Pupeno has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
enyo_ has joined #ruby
eelster has joined #ruby
aremaref has joined #ruby
Karunamon has joined #ruby
enyo_ has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
Karunamon is now known as Necoco
Necoco is now known as Karunamon
arescorpio has quit [Quit: Leaving.]
dionysus69 has joined #ruby
Guest40231 is now known as ged
aeontech has left #ruby [#ruby]
ged is now known as Guest76403
TreyG has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bazzy has quit [Quit: ZNC - http://znc.in]
JoshS has quit [Ping timeout: 258 seconds]
duckpuppy has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pilne has quit [Quit: Quitting!]
gix has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
JoshS has joined #ruby
<dionysus69> hey
<dionysus69> ok i want to achieve something specific
<dionysus69> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a
<dionysus69> that returns 3 arrays lengthes are 4 4 2
<dionysus69> how can I modify it so it returns 4 4 4 but the 2 elements that it lacks, it randomly*** picks
bazzy has joined #ruby
bronson has joined #ruby
<eelster> You can do [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.select while i.length < 4}
<eelster> >> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i <<
<ruby[bot]> eelster: # => /tmp/execpad-4e5a690e3464/source-4e5a690e3464:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/711692)
braincrash has joined #ruby
<eelster> >> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.select while i.length < 4}
<ruby[bot]> eelster: # => [nil, nil, nil] (https://eval.in/711693)
<eelster> >> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.select while i.length < 4; i}
<ruby[bot]> eelster: # => [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, #<Enumerator: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:select>, #<Enumer ...check link for more (https://eval.in/711694)
<eelster> >> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.sample while i.length < 4; i}
<dionysus69> hmm that block is chinese for me :D
<eelster> >> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.sample while i.length < 4; i}
<eelster> The last one (that for some reason is not being evaluated by ruby bot) is the one you want
<dionysus69> i think it broke :D
<dionysus69> ok let me check it in a sec in console
dcluna has joined #ruby
<eelster> It worked for me in the console
bronson has quit [Ping timeout: 240 seconds]
polysics has joined #ruby
<dionysus69> ok it works!
<eelster> What that black does, is it adds a random element from the range (1..10) to each sub-array until the lenth is 4
<dionysus69> each slice 4 produces 3 arrays how is that?
<eelster> What do you mean?
shayan_ has joined #ruby
<dionysus69> [1,2,3,4,5,6,7,8,9,10].each_slice(4).to_a.map{|i| i << (1..10).to_a.sample while i.length < 4; i} this produces array of 3 arrays
<dionysus69> wonder why its not 4 :)
<eelster> Isn't that what you wanted?
<dionysus69> well this is just one scenario
<dionysus69> 4 will be a variable so I need to understand how it works :D
<dionysus69> to adapt :)
<dionysus69> I will do lots of adaptations actually and I ll post final product :P
<eelster> So, on the whole, let's say you have the array `a` and the slice size `k`
<dionysus69> ohhh I see
<eelster> It can be generalized like this a.each_slice(k).to_a.map{|i| i << a.sample while i.length < k; i}
<dionysus69> it divides array of length by 10 by 4 so its 3 arrays that can be created
<dionysus69> you are good with ruby arent you mate haha
<eelster> It's my job so I hope I'd be haha
polysics has quit [Ping timeout: 245 seconds]
<dionysus69> you came up with this pretty quick, its impressive for me ^.^ i would spend maybe couple ten minutes just to find correct methods xD
<eelster> The number of arrays you get is the ceiling of the length of a devided by k
<eelster> The more you practice the more you'll figure out the methods.
hahuang61 has joined #ruby
<adam12> The postfixed while was creative
<dionysus69> i am still on the problem i posted yesterday
<adam12> I ended up sampling with a value required.
<eelster> Modifiers are a huge plus in ruby
<dionysus69> aiming to randomly distribute pool of types into packs
<adam12> >> (1..10).each_slice(4).to_a.tap {|*_, b| b.push(*(1..10).to_a.sample(4 - b.length)) }
<ruby[bot]> adam12: # => [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 3, 5]] (https://eval.in/711695)
<adam12> Tho I have no idea what would happen if I needed 0.
<eelster> I believe that if you were to use map instead of tap, you could just do |b|
<adam12> Likely, but I only wanted to append to the last.
<adam12> without iterating the entire array.
<eelster> ooh, pattern matching. I like it.
<eelster> That makes your code O(1)
<eelster> (I think?)
<eelster> Although I believe the splat is * O(N) so never mind :/
<eelster> I think there is a O(1) solution, but it's not a one liner.
CloCkWeRX has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 255 seconds]
<dionysus69> just saw difference between map and tap and it was negligible for this example
<zenspider> ugh. tap. blech
<dionysus69> i dont care about performance thaat much here
<zenspider> O(N) isn't bad in the case of a splat. honestly it's often worth it for usability
<zenspider> and not having to do worse
<eelster> If ruby had a constant time splat, the tap solution would be more efficient, but because ruby's splat is O(N), the performance is the same
roamingdog has quit [Remote host closed the connection]
<zenspider> blah blah blah
roamingdog has joined #ruby
<eelster> I wish Ruby documented the time complexity of their methods on the whoel though
<zenspider> oh shit. I accidentally typed 'h' in my terminal while ffmpeg was running and now it is barfing everywhere
roamingdog has quit [Remote host closed the connection]
<eelster> zenspider: That's not a fun mistake
roamingdog has joined #ruby
nikivi has joined #ruby
ianmethyst has joined #ruby
<zenspider> man page is no help
<eelster> CTRL+C?
<eelster> CTRL+D?
<eelster> One of the two should help
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
<zenspider> well... if I want to kill it off, sure
roamingdog has joined #ruby
<eelster> zenspider: I normally find that when something is barfing I should just kill it then restart.
roamingdog has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 248 seconds]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
<zenspider> -nostdin... good
<eelster> zenspider: Ah good good
<zenspider> man I hate this tool... does WAY too much. doesn't document half of it.
<zenspider> I found the -nostdin and mention of "interaction", but no documentation of it
<eelster> That's such an annoying notation in my opinion. I hate it when multi-character flags are single dashes
<dionysus69> what do you guys think about this
<dionysus69> Array.new(2) { [1,2,3,4].sample(3) }
<dionysus69> i think this is a shorter way of what i was aiming for
<dionysus69> btw, someone here helped me with this too dont think i came up with it alone :D
Joufflu has joined #ruby
Joufflu has quit [Remote host closed the connection]
<dionysus69> >>Array.new(2) { [1,2,3,4].sample(3) }
<eelster> Yeah that works pretty well! It is slightly different from what you were talking about earlier
<ruby[bot]> dionysus69: # => [[4, 3, 2], [3, 4, 1]] (https://eval.in/711696)
<dionysus69> well its same, other than it randomly distributes into n packs
<dionysus69> well i added shuffle to the previous version but then it was doing repetitions
<dionysus69> i was like oh damn I cant fix that :D
<eelster> This could theoretically do repetitions
<dionysus69> how
<dionysus69> I did this run for 10 times
<dionysus69> no repetition per pack
<eelster> 10 times is not a large enough sample
<dionysus69> but idea of sample is for it to not repeat right?
<eelster> I just ran it 1000 times and got 37 repition occurances.
<eelster> By repitions do you mean within the array or the 2 arrays are the same?
<dionysus69> within one array
<eelster> Oh, yes it avoids that
<dionysus69> i understand there will be repetitions accross arrays
<eelster> Sorry, I was very confused. I was like, there will be repititions across arrays
testuser1 has joined #ruby
<dionysus69> ye my yesterdays problem was that i have 100 questions that i want to share with 10 students, 20 question for each student :D
<dionysus69> it even has its own failsafe, if sample argument is more than the array itself, it still doesnt repeat
<eelster> Sample is a good pseudo-random, but don't use it for security .
<dionysus69> no its just for university quiz question distribution so should be enough
lxsameer has joined #ruby
<dionysus69> i ll have to explore the inside algorithm and explain it to audience, hope ruby won't betray me :D
<dionysus69> I ll be like, you see, i could come up with algorithm myself but no need when ruby is so cool xD
jenrzzz has quit [Ping timeout: 240 seconds]
sneakerhax has quit [Ping timeout: 240 seconds]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
nikivi has quit [Quit: irc]
sdothum has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
Guest76403 is now known as ged
ged is now known as Guest94327
<dionysus69> anyways thanks for input eelster adam12
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
last_staff has joined #ruby
blackwind_123 has quit [Ping timeout: 248 seconds]
the_drow has joined #ruby
lxsameer has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
blackwind_123 has joined #ruby
ianmethyst has quit [Quit: WeeChat 1.6]
nankyokusei has joined #ruby
eelster has quit [Ping timeout: 260 seconds]
lxsameer has quit [Read error: Connection reset by peer]
<zenspider> >> (1..4).to_a.permutation(3).to_a.sample 2
<ruby[bot]> zenspider: # => [[2, 4, 1], [3, 1, 2]] (https://eval.in/711700)
nankyokusei has quit [Ping timeout: 240 seconds]
enyo has joined #ruby
* zenspider shrugs
jenrzzz has quit [Ping timeout: 240 seconds]
<zenspider> perverse... I'm using emacs as my web browser to do a tutorial so I can stay entirely within a full screened emacs session.
bronson has joined #ruby
<dionysus69> ha thats also interesting
enyo has quit [Ping timeout: 258 seconds]
<dionysus69> zenspider: ye thats also a great solution
<zenspider> not so sure about that... but it IS succinct and clear
bronson has quit [Ping timeout: 240 seconds]
<dionysus69> it is ^.^
<dionysus69> thanks to you too, added to my ruby crazy enum file xD
nopacienc3 has joined #ruby
<blackbom1> zenspider: when are you gonna learn rust
<baweaver> Huh.
<baweaver> Rust reminds me a lot of Scala
A124 has quit [Ping timeout: 255 seconds]
<dionysus69> syntax is too complicated for me, would require lots of effort to learn
<baweaver> Yeah, Rust is definitely Scala / Ruby / SML inspired.
<baweaver> with some touch of OCaml in there
<zenspider> blackbom1: I have a bit... I hate it
<zenspider> I really tried to like it too... but damn...
<baweaver> oh?
<baweaver> Reading through it I'm way more likely to try it than Go again.
<zenspider> actually going to take another stab at ML instead... I want to keep at a language that takes me out of my comfort zone
<baweaver> Then again I'm also a Ruby/Scala/JS primary, so...
<baweaver> Haskell on that list?
<zenspider> that feels like apples and oranges to me (rust and go)... one is trying to replace C and the other? maybe java? I dunno. the go code I've read is... not fun
<baweaver> Same. Correct me if I'm off but Rust is a C alt and Go is a generic binary language
<zenspider> Haskell is not currently on the list (tho I just bookmarked the "school of haskell" tutorials)... I like code I can read
<zenspider> tho I can read it better now that I've studied ML
<zenspider> somewhat
<baweaver> Have you ever seen bitemyapp's book?
<zenspider> The way go IO works looks and feels like java to me
<zenspider> no, url?
<baweaver> He says it's far easier than Learn You a Haskell
<baweaver> I'm inclined to agree from what I've read
<baweaver> one sec
<blackbom1> zenspider: lol. at least you tried. i hated it since i saw it :p
empty_cup has quit [Quit: leaving]
<zenspider> I'm about to hit up http://beautifulracket.com and make a bunch of languages in racket
<baweaver> Find his free section real quick. I do like that he'll give discounts to newbies without cashflow though
AndBobsYourUncle has joined #ruby
<zenspider> oh. I was pointed to that at rubyconf ... tho I never looked at it. isn't it $$? I'm not sold on haskell so I'm not willing to shell out yet
<baweaver> he made a huge list earlier.
<baweaver> If it makes my life easier or entertains me I'll shell out for it.
<zenspider> oooh. I like this section: Factoring out patterns: Foldable Traversable Reader State Parsers Composing Types Monad Transformers
<zenspider>
<baweaver> He has a 95 page sample on there
<baweaver> you can also whack him on #haskell or #haskell-beginners
dionysus69 has quit [Remote host closed the connection]
<baweaver> Rust looks like an easy language for me to learn at least
domgetter has joined #ruby
<baweaver> I may give it some time later, I need a C-like language on my roster.
<zenspider> baweaver: it's such a PITA... good luck. lemme know how it goes
<baweaver> Will do, might do a writeup on it
<baweaver> then make a few hundred rust puns
<baweaver> better steel yourself for it.
connor_g1odwolf is now known as connor_goodwolf
dionysus69 has joined #ruby
<baweaver> I really want to make something larger in Scala first though because I need to get a solid 3rd language
<zenspider> that haskell book does look good
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
<zenspider> that common patterns section alone might be worth shelling out and then seeing how much of it applies to my other functional languages
<baweaver> I'd argue that I'm highly proficient in Ruby and JS, decent with Python, Scala, and Java.
Pupeno has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<baweaver> and at least familiar with some 20 other languages, but I hardly count that.
<baweaver> Ah, also decent with C# and VB.
<baweaver> though I never use them
SuperLag has joined #ruby
Pupeno has quit [Ping timeout: 240 seconds]
czerasz has joined #ruby
last_staff has quit [Quit: last_staff]
elh9 has joined #ruby
roamingdog has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
duckpuppy has joined #ruby
ifctj has joined #ruby
JoshS has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 245 seconds]
Guest94327 is now known as ged
ged is now known as Guest42086
pawnbox has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
nadir has quit [Quit: Connection closed for inactivity]
tarvos has joined #ruby
vuoto has joined #ruby
jackjackdripper has joined #ruby
bronson has joined #ruby
alan_w has joined #ruby
houhoulis has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 240 seconds]
araujo has quit [Read error: Connection timed out]
coyo has quit [Quit: Heaven is not a place, Bartleby, it's being with people who love you.]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
hahuang61 has joined #ruby
Channel6 has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
govg has quit [Quit: leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
alan_w_ has quit [Quit: WeeChat 1.4]
alan_w_ has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
astrobunny has joined #ruby
pawnbox has joined #ruby
astrobunny has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 240 seconds]
dikaio_ has joined #ruby
a7d7p has quit [Quit: a7d7p]
xen0fon has joined #ruby
osboxes has joined #ruby
enyo has joined #ruby
duckpuppy has joined #ruby
enyo has quit [Ping timeout: 248 seconds]
<dionysus69> rvm doesnt have 2.4.0 version yet
duckpuppy has quit [Ping timeout: 248 seconds]
<dionysus69> anyone know when it will?
rippa has joined #ruby
nankyokusei has joined #ruby
andrzejku has joined #ruby
x00r__ has joined #ruby
dikaio_ is now known as help
<zenspider> funny... they raised a bunch of money to help the maintainer focus on it... /s
help is now known as Guest43008
<dionysus69> rvm list known shows [ruby-]2.4[.0-rc1] as latest
<zenspider> dionysus69: it is available in ruby-install (I use that plus rbenv instead)
<dionysus69> thats not latest though is it?
<zenspider> nope
<dionysus69> rbenv is same as rvm right?
<zenspider> no, not at all
<zenspider> 2.4.0p0 is the latest
<fishcooker> sorry im kinda new to ruby eelster + zenspider ... that's why i drop by here
<zenspider> fishcooker: why are you apologizing?
<dionysus69> ok let me look what is ruby-install
nankyokusei has quit [Ping timeout: 240 seconds]
<zenspider> rbenv is 4814 lines of code... rvm is a monster in comparison
<zenspider> 20k+ lines last I heard
<zenspider> and does way too much
<dionysus69> oh lol
the_drow has joined #ruby
Guest42086 is now known as ged
fishcooker has quit [Ping timeout: 255 seconds]
ged is now known as Guest59705
Guest43008 has quit [Quit: leaving]
<zenspider> ged! nooooooo
polysics has joined #ruby
skweek has joined #ruby
polysics_ has joined #ruby
polysics has quit [Read error: Connection reset by peer]
vuoto has quit [Remote host closed the connection]
ur5us has joined #ruby
guzzlefry has joined #ruby
guzzlefry has left #ruby ["Leaving"]
czerasz_ has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
polysics_ has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
czerasz has quit [Ping timeout: 240 seconds]
unshadow has joined #ruby
polysics has joined #ruby
SuperLag has quit [Remote host closed the connection]
hahuang61 has joined #ruby
Pupeno has joined #ruby
SuperLag has joined #ruby
Pupeno has quit [Ping timeout: 245 seconds]
harai has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
Channel6 has quit [Quit: Leaving]
Devalo has quit [Read error: Connection timed out]
Devalo has joined #ruby
ledestin has joined #ruby
aremaref has quit [Ping timeout: 258 seconds]
djbkd_ has joined #ruby
meocs has joined #ruby
ur5us has joined #ruby
duckpuppy has joined #ruby
conta has joined #ruby
dikaio has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 240 seconds]
dikaio has joined #ruby
AndBobsYourUncle has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
_main_ has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
Fernando-Basso has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
bronson has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
dikaio has quit [Quit: leaving]
bronson has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
nadir has joined #ruby
hotpancakes has quit [Remote host closed the connection]
brent__ has quit [Ping timeout: 240 seconds]
dikaio has joined #ruby
Guest59705 is now known as ged
ged is now known as Guest40013
connor_goodwolf has quit [Ping timeout: 248 seconds]
osboxes has quit [Ping timeout: 258 seconds]
Derperpe1 has quit [Quit: WeeChat 1.5]
nowhereFast has joined #ruby
v01 has joined #ruby
shayan_ has quit [Quit: shayan_]
conta has quit [Ping timeout: 258 seconds]
Devalo has quit [Read error: Connection timed out]
Devalo has joined #ruby
ur5us has quit [Remote host closed the connection]
saneax-_-|AFK is now known as saneax
djbkd_ has quit [Remote host closed the connection]
<dionysus69> oh btw this solution is Not good
<dionysus69> (1..200).to_a.permutation(20).to_a.sample(10)
<dionysus69> nearly crashed my pc took all of the ram and swap was 10% left when i noticed xD
djbkd_ has joined #ruby
renchan has joined #ruby
<apeiros> dionysus69: you could rewrite that in a much more efficient manner. calculate how many permutations there are. create a method to calculate the Nth permutation. then Array.new(10) { permutation_at(rand(0...permutation_possibilities)) }
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
enyo has joined #ruby
djbkd_ has quit [Ping timeout: 258 seconds]
<dionysus69> well I wont bother with it because I already found a solution and its much shorter :)
<dionysus69> >> Array.new(5) { (1..200).to_a.sample(5) }
<ruby[bot]> dionysus69: # => [[7, 3, 11, 144, 162], [36, 176, 139, 55, 106], [143, 43, 59, 20, 17], [189, 64, 76, 49, 62], [57, 7 ...check link for more (https://eval.in/711744)
<dionysus69> sample in my case is much faster that permutation, I dont really need all the billion possible combinations
enyo has quit [Ping timeout: 260 seconds]
saneax is now known as saneax-_-|AFK
spyder55 has joined #ruby
arnovr has joined #ruby
JeanCarloMachado has joined #ruby
Yxhuvud has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
saneax-_-|AFK is now known as saneax
connor_goodwolf has joined #ruby
<zenspider> I never said it was good... in fact, I believe I said the opposite
<dionysus69> yes I remember
<dionysus69> I just didnt realize why it wasnt good
<dionysus69> worked fine for less than 8 permutations
<dionysus69> more than that and it goes into seconds processing
greister has joined #ruby
nankyokusei has joined #ruby
<domgetter> Generating all the permutations is factorial, so it's "Pretty Bad"TM
nowhereFast has left #ruby [#ruby]
greister has quit [Client Quit]
Yxhuvud has joined #ruby
charliesome has joined #ruby
testuser1 has quit [Quit: Leaving.]
testuser1 has joined #ruby
testuser1 has quit [Client Quit]
testuser1 has joined #ruby
greister has joined #ruby
testuser1 has quit [Client Quit]
dhollinger has quit [Ping timeout: 245 seconds]
testuser1 has joined #ruby
testuser1 has quit [Client Quit]
testuser1 has joined #ruby
harfangk has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
testuser1 has quit [Client Quit]
harai has quit [Ping timeout: 240 seconds]
testuser1 has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Remote host closed the connection]
testuser1 has quit [Client Quit]
DarthGandalf has joined #ruby
DarthGandalf has quit [Read error: Connection reset by peer]
DarthGandalf has joined #ruby
DarthGandalf has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
bronson has joined #ruby
pingwin4ik has joined #ruby
aries_liuxueyang has joined #ruby
conta has joined #ruby
harai has joined #ruby
gigetoo has quit [Ping timeout: 258 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Devalo has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
xen0fon has quit [Quit: xen0fon]
charliesome has joined #ruby
armyriad has joined #ruby
hotpancakes has joined #ruby
charliesome has quit [Client Quit]
conta has quit [Ping timeout: 248 seconds]
<dionysus69> xD
last_staff has quit [Quit: last_staff]
A124 has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Read error: Connection reset by peer]
bukashenka has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Remote host closed the connection]
Guest40013 is now known as ged
ged is now known as Guest29728
dhollinger has joined #ruby
xen0fon has joined #ruby
Fernando-Basso has quit [Ping timeout: 240 seconds]
gloscombe has quit [Quit: gloscombe]
Fernando-Basso has joined #ruby
milardovich has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
gloscombe has joined #ruby
tomphp has joined #ruby
rt has quit [Quit: Life is too short to wait.]
rt has joined #ruby
gloscombe has quit [Quit: gloscombe]
DarthGandalf has joined #ruby
duckpuppy has joined #ruby
anisha has joined #ruby
dionysus69 has quit [Remote host closed the connection]
aidalgol has quit [Quit: zZzZZz]
Fernando-Basso has quit [Ping timeout: 245 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
ddffg has joined #ruby
saneax is now known as saneax-_-|AFK
shinnya has joined #ruby
AndBobsYourUncle has joined #ruby
Fernando-Basso has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
warrshrike has joined #ruby
<warrshrike> hey
<warrshrike> i need algo help with mah ruby code
<domgetter> warrshrike what's the issue?
<warrshrike> a circle starts at 50, 50. radius of the circle is 50
<warrshrike> the circle is used to show a progress bar
<warrshrike> so 10% means 10/100 of the circle is black. rest is white
ifctj has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
<warrshrike> given an angle and x,y coord pair, tell if coord is in back part of circle
<warrshrike> domgetter: tell me what you think
<domgetter> When you say "an angle" do you mean the percentage?
<domgetter> Or do you mean an angle? And is the angle given in radians or degrees?
<domgetter> i.e. 25% -> pi/2 radians -> 90 degrees
<domgetter> When the circle is filling up, does it start at the top and fill clockwise? counterclockwise?
<warrshrike> its given in degrees
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
<warrshrike> i converted to radians in code
<warrshrike> yeah its clock wise
<warrshrike> and percentage is out of 100 we manually convert it
lxsameer has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
<warrshrike> make sense?
<domgetter> Yes, I'm looking at your code now
SpiffTR has joined #ruby
saneax-_-|AFK is now known as saneax
<warrshrike> okay thanks a lot. you can skip the part about those if else...r=+ its just a performance optimization binary search style
<warrshrike> Whenever a point (X, Y) is queried, it's guaranteed that all points within a distance of 10-6 of (X, Y) are the same color as (X, Y).
<warrshrike> thats why im doing the dist thing
scootaloo has joined #ruby
<apeiros> warrshrike: atan2 might be of interest
<domgetter> fun fact: you can just write 1E-6 for the 0.000001
<warrshrike> oh
<warrshrike> lol cool il replace that
Jackneill_ has joined #ruby
<warrshrike> whose atan2?
<Mon_Ouie> atan2(y, x) gives you the angle between (x, y) and (0, 0)
<domgetter> Will the radius always be the same as the coordinate of the circle? So like, if the center is at (15,15), will the radius be 15?
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<warrshrike> domgetter: the radius is fixed at 50 with mid point 50,50
<warrshrike> does that answer your question?
milardovich has quit [Remote host closed the connection]
<domgetter> For this problem yes. I didn't know if you wanted a more general solution for knowing if a point is inside a portion of a circle
<warrshrike> no just this one problem will do. its an interview question actually
milardovich has joined #ruby
<warrshrike> from facebook
bilgekagan has joined #ruby
<domgetter> ah okay. Let me ask you this. Why is there a loop? That is, what are you using the while loop to do?
dhollinger has quit [Ping timeout: 245 seconds]
<warrshrike> so in a nutshell heres my approach: -> for every angle 0->provided angle: -> keep increasing r from 0 to 50 until either the 'circle edge' of is less than 10^-6 away from goal or continue till end
SpiffTR has quit [Quit: Leaving.]
dhollinger has joined #ruby
<domgetter> Will that tell you if the point is inside the pie piece, or will it tell you if the point is inside the circle as a whole?
<warrshrike> just inside the pie
<warrshrike> since outer loop 0-pie piece angle
<warrshrike> and inner goes 0-50 for each of said angle
enyo has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
<warrshrike> to test whether the 'point on circle edge at current angle for current dist' is < 10^-6 from goal
<warrshrike> if so then its in pie piece
<domgetter> Okay I now see the correctness of your algorithm
arnovr has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
<domgetter> You're trying a bunch of points throughout the pie piece, and if one of them is close enough, then the point is in the pie piece
<warrshrike> exactly
<warrshrike> brute force
milardovich has joined #ruby
enyo has quit [Ping timeout: 240 seconds]
bilgekagan has left #ruby [#ruby]
<domgetter> I think there's a few ways we can leverage geometry to get a better algorithm
<warrshrike> on a related note how can i make a ruby for loop increase by 0.1 instead of 1? for i in 0..10
<warrshrike> domgetter: I'm all ears
<apeiros> &ri step warrshrike
<al2o3-cr> warrshrike: step
<apeiros> urgh, date?
<apeiros> well…
<apeiros> &ri Numeric#step warrshrike
<warrshrike> My algo is currently correct for 4/5 test cases. while the algo is correct, the 10^-6 nearness guarantee is two granular
<domgetter> well we can rule out points that are definitely outside the circle by first doing the distance formula from the point to the center of the circle
<warrshrike> too*
milardovich has quit [Ping timeout: 245 seconds]
<warrshrike> okay yeah. those can be eliminated straight away
Dobler has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter> Once we've ruled out all outside points, we can check if the point is above/below/leftward/rightward of a line to see if it must then be in the pie piece
<warrshrike> domgetter: look at those if else thingies. my cheapo attempt at binary search it does yield a large speed up anecdotally
<domgetter> and since by then we've ruled out outsiders, we must be only checking for candidates in the circle, even though we're comparing to whole lines
Guest29728 is now known as ged
<domgetter> warrshrike that is a pretty clever way of speeding up the linear search. But we can get a constant-time algo :)
rodfersou has joined #ruby
ged is now known as Guest65151
<warrshrike> domgetter: id love linear time :D
<warrshrike> domgetter: so what lines do we check for?
<warrshrike> constant*
<domgetter> I think there are two main cases: <50% filled, and >50% filled.
<warrshrike> id love constant time I meant*
rodfersou has joined #ruby
<domgetter> then we can just look to see if the point is above the line y = mx+b which is the "fill line"
<warrshrike> right so first we check if its in left half or right half
<domgetter> if >50% and y_t > 50, we must be in the circle
<domgetter> that sort of logic
osboxes has joined #ruby
<domgetter> we must be in the filled part*
<warrshrike> domgetter: okay so we check if its above the 'angle line'
<domgetter> That's right
<warrshrike> and we know its in left half
<warrshrike> and we know its within circular bounds
<warrshrike> okay yeah i can see where youre going with this
<domgetter> yeah, ruling out points which are outside the circle is what lets us do these quicker checks
<warrshrike> so left and right is easy. also we can easily check if above or below
<apeiros> your task is to test whether a point is in a circular sector?
<warrshrike> the y intercept
<domgetter> There might be an even simpler way with some vector math, but this is only a handful of cases, so it's pretty straightforward
<warrshrike> apeiros: Yep
<warrshrike> whether its within 10^-6 of the nearest coloured sector to be precise
<apeiros> you're given the center of the circular sector, the radius of it, and the point - what's the angle you're given for?
<warrshrike> apeiros: clock wise angle from 'north'
<warrshrike> think of it like a circular progress bar
<apeiros> angle of what? the circular sector?
<warrshrike> apeiros: we're given percentage of progress bar and percent/100*360 gives the angle of black sector
<warrshrike> yeah
<apeiros> ok, so you aren't given an angle, you're given a progress percentage, and you calculated the angle from that?
<warrshrike> yep
<apeiros> calculate the angle of the given point to the center of the circle
osboxes has quit [Ping timeout: 240 seconds]
<warrshrike> go on...
<apeiros> I thought the rest would be obvious
<warrshrike> it is
<warrshrike> but it really cant be this simple
<warrshrike> ~_~
<apeiros> if the angle is bigger than the angle of the end of your circular section, then it's outside
<warrshrike> i've been speeding up linear search for the past two haars
<apeiros> (after adjusting for start points and direction that is)
<warrshrike> apeiros: yeah i get it
<apeiros> plus of course the distance test domgetter already mentioned
<apeiros> distance test -> within circle
<apeiros> angle test -> within section
<domgetter> warrshrike yeah my line-making version is worse than just checking the relative angle
giovdk has joined #ruby
<giovdk> hi
<warrshrike> yeah. so we have here a constant time algorithm. Lemme code this up and come back with results
<apeiros> hi giovdk
<warrshrike> Hey buddy long time no see
Pupeno has joined #ruby
Pupeno has joined #ruby
<giovdk> I'm using ruby 2.3.3 and if I do 19.95 * 3 on irb I get 59.849999999999994 instead of 59.85
jackjackdripper has quit [Quit: Leaving.]
<apeiros> ?float giovdk
<ruby[bot]> giovdk: Your numbers don't add up? You get "weird" results? read http://floating-point-gui.de/
<domgetter> giovdk are you using decimal numbers for money?
<giovdk> yes
govg has joined #ruby
<domgetter> I am going to strongly suggest that you don't use floats for money
<warrshrike> do Float.round
<apeiros> warrshrike: that's bad advice.
<domgetter> That being said. In that particular case, you could do (19.95 * 3).round(2)
<al2o3-cr> use bigdecimal
<apeiros> they'll just get errors on other places.
tarvos has quit [Quit: Page closed]
pandaant has joined #ruby
<domgetter> For a real application in production that works on real money, do not use what I wrote
<warrshrike> apeiros: ma bad. im jus' a backwards country boy
<apeiros> don't use floats for decimal values where precision is required. there isn't much to add to that.
<domgetter> I'm half surprised that Rails doesn't have Money.new(19.95)
<apeiros> warrshrike: what I said was not meant as an insult to you. it's only related to your advice.
<giovdk> thanks. I'm coming from php and it is usually safe to multiply / add floats. I'll give bigdecimal a look thanks :)
<apeiros> giovdk: you're mistaken
<apeiros> php shares the same problems with regards to floats as all other systems which use binary based floats
<apeiros> php even has some additional problems due to its weak typing system
<domgetter> In PHP it's also "bad" to use floats for money. ("Bad" here means that occasionally there will be errors which could be prevented by using a "correct" number type)
howdoi has joined #ruby
<warrshrike> apeiros: ofc not im just messing around :)
duckpuppy has joined #ruby
<giovdk> apeiros: in php it is also called "double" but it should be the same as float, isn't it?
rodfersou has quit [Quit: leaving]
<giovdk> if I do 0.1 + 0.2 I get 0.3 and if I do 19.95 * 3 I get 59.85. But probably this is where the typing system comes in correct?
<domgetter> doubles have the same precision problems as floats, yes
<apeiros> giovdk: yes. both ruby and php's float values use 64bit (aka double) floating point
sepp2k has joined #ruby
pandaant has quit [Remote host closed the connection]
nankyokusei has joined #ruby
<giovdk> thanks! but if so, is php doing something to prevent that to happen?
duckpuppy has quit [Ping timeout: 258 seconds]
<apeiros> giovdk: no
<giovdk> in php if I do $a = 19.95; echo gettype($a); echo 19.95 * 3; the result is correct
<domgetter> giovdk for money, it's reccomended that you keep everything in pennies (or whatever the smallest unit is in your currency) and round to pennies when you have to do certain calculations like interest and taxes
<apeiros> giovdk: it probably does not show you the complete value
<domgetter> (and then you have to keep in mind that "round" doesn't have a single definition either)
<apeiros> giovdk: iirc php has printf too, try it
<warrshrike> how does one sin inverse in ruby?
<Mon_Ouie> Math.asin(x)
<warrshrike> Ah
<apeiros> php > printf("%.40f", 19.95 * 3);
<apeiros> 59.8499999999999943156581139191985130310059
<apeiros> giovdk: ^ that's what php gives me
<apeiros> which - of course - is identical to the ruby result
<apeiros> so what you *see* is not what you *have*.
<giovdk> ;)
<domgetter> php is one of the exceptions where 0.1 + 0.2 is 0.3, but that's because it converts to string intermediately
nankyokusei has quit [Ping timeout: 240 seconds]
<giovdk> yep, I was trying just printf("%F", (19.95*3));
<apeiros> domgetter: I doubt it's because of that
<apeiros> it's default representation of floats is probably just less precise
<domgetter> From the website: PHP converts 0.30000000000000004 to a string and shortens it to "0.3".
<domgetter> I guess that's not "intermediate" in a certain sense
AndBobsYourUncle has joined #ruby
<apeiros> i.e. less precise ;-)
<giovdk> thanks apeiros and domgetter, it makes sense now :)
<al2o3-cr> could possibly use Float(19.95r * 3)
<giovdk> I'm gonna have a read at this one http://blog.bigbinary.com/2013/01/14/handling-money-in-ruby.html
<apeiros> giovdk: there's also a Money gem. might be useful too.
<warrshrike> apeiros: given circle center 50, 50 how can i find the angle to any given point?
<warrshrike> without using atan2
<warrshrike> domgetter:
<apeiros> why without?
<Mon_Ouie> Why couldn't you use atan2?
<warrshrike> Learning exercise
<warrshrike> that, and it shows moral fiber
bronson has joined #ruby
<warrshrike> okay im sorry i thought
<domgetter> warrshrike what are you allowing yourself to use? asin and acos?
<apeiros> warrshrike: two points form a vector. I'm sure you learned at school how to calculate the angle of a vector.
Ax has joined #ruby
<warrshrike> atan2 was some was magical math library when it actually was just tan inverse
<Mon_Ouie> it's atan(y/x) except it accounts for the sign of y and x to give you the correct angle
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
<apeiros> ^
<warrshrike> okay so i just give it the displacement x,y from zero?
<warrshrike> assuming circle center at zero
<domgetter> assuming the circle is at zero, atan2 will give you a number between -pi and pi. that number will tell you, starting from the top, how far around the circle that point is
<domgetter> if you get -pi/2 that means the point was directly to the left
<warrshrike> domgetter: right so its the angle in radians?
<domgetter> Yes
andrzejku has quit [Ping timeout: 258 seconds]
bronson has quit [Ping timeout: 240 seconds]
<warrshrike> Okay. Here's what i thought
<domgetter> it's also annoying not from 0 to 2pi, and annoyingly not counterclockwise from the point (1,0)
Pupeno has quit [Remote host closed the connection]
govg has quit [Quit: leaving]
<domgetter> s/annoying not/annoyingly not/
<warrshrike> the parametric equations x = cx + r * cos(a) y = cy + r * sin(a)
<warrshrike> give us x and y points on circumference of any circle
milardovich has joined #ruby
<warrshrike> so doing acos(x-cx/r)
JoshS has joined #ruby
<warrshrike> should give us the angle too?
<domgetter> that might only give the principle angle. I'd have to do a few examples to know for sure
<domgetter> (arcsin and arccos are only defined between 0 and pi)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Mon_Ouie> acos only returns an angle between 0 and pi, you'll get the wrong result for negative values of y, and a similar issue if you only use asin
hotpancakes has joined #ruby
<warrshrike> Oh. Yeah I didn't think of that
Ax has quit [Quit: Ax]
<warrshrike> I need to brush up my trig
<domgetter> atan2 will let you check angles in any direction
milardovich has quit [Ping timeout: 240 seconds]
<warrshrike> got it
<warrshrike> so i got that part working
<warrshrike> now to check if its 'outside the circle'
<domgetter> distance check is the easy part :)
<warrshrike> I can use the angle i just calculated and check what x, y i get for 50 radius?
jair has quit [Remote host closed the connection]
elh9 has quit [Ping timeout: 255 seconds]
<domgetter> yes
<domgetter> x= r*cos(a), y = r*sin(a) :)
<domgetter> (plus the 50,50 offset)
<warrshrike> c_ang = Math.atan2((x_t-50),(y_t-50)) if c_ang < a.degrees && (50 + 50*Math.cos(c_ang)) >= x_t puts "yes" end
<warrshrike> Woo. It seems to work :)
<warrshrike> domgetter: it still doesnt work for one case a=87 x=20 y=40
<warrshrike> just like my linear search solution
<domgetter> does it work for any other cases of >50% ?
<domgetter> is 20,40 right on the line for 87% ?
<warrshrike> but this isnt > 50%
<warrshrike> hmm not sure its just said this should be black
<domgetter> ? Is 87 not > 50 ?
<zenspider> wow... I missed a lot.
<warrshrike> oh yeah sorry i confused angle with %
<warrshrike> stupid me
<warrshrike> it does work for 99, 99, 99
<warrshrike> which is in black part but out of circle bounds
<domgetter> right, distance check is the easy part
blackwind_123 has quit [Ping timeout: 248 seconds]
<domgetter> keep in mind that atan2 is NOT returning a value between 0 and 2pi starting at the top of the circle going clockwise
<warrshrike> right it gives a negative value
tomphp has joined #ruby
<warrshrike> i just saw
<warrshrike> so i need to +180 deg
<warrshrike> if -ve?
<domgetter> so I think you'll need 4 cases: when the circle is >50% and the point is on the left, when it's >50% and the point is on the right, <50% and on the right, >50% and on the left
<zenspider> warrshrike: what are you drawing in?
<domgetter> the alternative is to convert "circle filled" coordinates into your atan2 coordinates
<domgetter> so that you're comparing apples and apples
harai has quit [Ping timeout: 255 seconds]
<warrshrike> right circled filled is out of 360
<domgetter> zenspider it's a kata for checking if a point is inside a filled arc of a circle
<warrshrike> how can i convert that?
<warrshrike> also whats a kata
<domgetter> warrshrike a kata is a small programming problem designed to sharpen your skills
<warrshrike> domgetter: oh
<zenspider> just monte carlo?
<zenspider> can't you do that w/ a simple distance formula?
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<warrshrike> well idk if it sharpen my skills ~_~
<domgetter> warrshrike just generate the point with r*sin(theta), r*cos(theta)
<warrshrike> and then atan2 again?
<zenspider> why does http://0.30000000000000004.com have the world's most arbitrary ordering?
<domgetter> Yes, and you're going to atan2 both the test point and the point on the circle
<warrshrike> ah
<domgetter> warrshrike be sure to treat >50% different from <50% since the circle fills in "backward" after that
<domgetter> The only way to make the math better is by rotating the axes, but that makes the math worse for a little bit
hotpancakes has quit [Ping timeout: 255 seconds]
<warrshrike> domgetter: calculating again with atan2 makes it says yes for every wrong case
<domgetter> Can I see your code at this point?
<warrshrike> it works for 13, 55, 55 if i compare with a.degrees in if condition
<domgetter> You'll need to treat the two halves of the circle separately
<warrshrike> but 13 and 55, 55 is the same half!
<warrshrike> but in current state it says yes to everything
aremaref has joined #ruby
<Mon_Ouie> Where is #degrees defined and what does it return?
<domgetter> Can you make a gist of the test points?
<warrshrike> sure
tercenya has quit [Ping timeout: 245 seconds]
<warrshrike> degrees gives radians
pawnbox has quit [Remote host closed the connection]
<warrshrike> you can view it in beginning of this https://gist.github.com/anonymous/cf972cdb15ec1cca3112434456ea019a
pawnbox has joined #ruby
tercenya has joined #ruby
<Mon_Ouie> I was just confused by the name, I was expecting something called degrees to return degrees
<warrshrike> oh yeah come to think of it should have called it .to_rads
<warrshrike> ~_~
lxsameer has quit [Quit: WeeChat 1.6]
aremaref has quit [Ping timeout: 248 seconds]
Guest65151 is now known as ged
ged is now known as Guest23568
hightower2 has joined #ruby
warrshrike_ has joined #ruby
<warrshrike_> sorry pc died
<warrshrike_> lemme know if i missed anything
<domgetter> nothin
tk__ has joined #ruby
<warrshrike_> ah
<warrshrike_> so any idea with those test cases?
warrshrike has quit [Ping timeout: 260 seconds]
<warrshrike_> h
duckpuppy has joined #ruby
giovdk has quit [Ping timeout: 260 seconds]
<domgetter> warrshrike_ alright I have the code that makes those 5 cases pass
<warrshrike_> lets see it
<domgetter> The mistake was that we needed to do 50*Math.cos(Math::PI/2 - a.degrees) in order to convert from "regular" angles to filled-in-circle angles
<domgetter> that gives the correct point on the curve, which in turn gives the correct atan2 values
<warrshrike_> what is a 'regular' angle?
<warrshrike_> sorry im blanking out a bit
<domgetter> I put it in quotes because it's not a real thing
duckpuppy has quit [Ping timeout: 240 seconds]
<domgetter> I just mean the angles I'm used to from trig. That is, on the unit circle, you start at the point (1,0) and move counter-clockwise
<domgetter> so PI/2 is straight up, and PI is to the left
<domgetter> but for the circle in the problem, 0 is straight up, and we're going clockwise
<domgetter> So I have to negate the angle and add PI/2
<warrshrike_> ah
<warrshrike_> makes sense now
<domgetter> I could have made it more clear with something like 50*Math.cos(circle_degrees_to_normal_degrees(theta))
<warrshrike_> you're a bloody genius
<warrshrike_> yeah but good enough
<domgetter> I think there are still edge cases of the circle being exactly half filled, and whether or not there is a fudge factor to take into account
<domgetter> the "<" on line 20 won't work if the values are equal
<warrshrike_> whats a fudge factor?
<domgetter> oh, nvm, I'm tired and it will just say "no"
<warrshrike_> should i make it <=?
spyder55 has quit []
<domgetter> By "fudge factor" I meant like, "should the method return true if it's within 0.000001"
AndBobsYourUncle has joined #ruby
<domgetter> warrshrike_ we don't need to make it <= in this case, but it might not do what is asked in the case where they are equal, so that's why I said to be wary of it as an edge case
<warrshrike_> well im supposed to run this on 10000 testcases
<warrshrike_> and can only do so once
<domgetter> Ah
<domgetter> then hold on
<domgetter> what should it do if A) the circle is exactly half-filled, and B) the point is on that line?
<warrshrike_> if its half filled we should just make sure the angle of the coords is <= 180?
<domgetter> Sorry if I wasn't clear, I'm asking about the specific case where both the circle is half-filled, and the test point is on the fill border
<domgetter> so like, the point is at (50,25)
<warrshrike_> oh
<warrshrike_> hmm
<domgetter> Now that I think about it, I think it should be <= for all cases
<domgetter> But I have one more question
<warrshrike_> yeah thats what i thought it
<warrshrike_> it could always be on the fill line...
<domgetter> what should the answer be if the circle is 0% filled, and the point is at (50,75) ?
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
<warrshrike_> hmm
milardovich has joined #ruby
<warrshrike_> shoudnt <= work here too?
<domgetter> if the answer is "the return value should be 'no' if the circle is 0% no matter what", then we should add that as a special case before the distance check
<warrshrike_> angle is zero rads
<warrshrike_> oh i get what you mean now
<warrshrike_> i think
<warrshrike_> if its zero than
<warrshrike_> always retur no
<warrshrike_> like you said
<warrshrike_> yeah its definitely that
enyo has joined #ruby
<domgetter> I updated my gist to account for both edge cases
<warrshrike_> so we need <= and a separate if condition
<warrshrike_> lemme see
<warrshrike_> okay lets run this bad boy
sdothum has joined #ruby
SpiffTR has joined #ruby
enyo has quit [Ping timeout: 240 seconds]
<domgetter> warrshrike_ good luck. It's time for bed ehre
<warrshrike_> okay
<warrshrike_> thanks a lot!
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
domgetter has quit []
pawnbox has quit [Quit: gotta go guys.]
iffyuva has joined #ruby
veloutin has quit [Ping timeout: 258 seconds]
elh9 has joined #ruby
charliesome has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
govg has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.6]
charliesome has quit [Client Quit]
veloutin has joined #ruby
ocbtec has joined #ruby
elh9 has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 1.6]
elh9 has joined #ruby
Lord_of_Life has quit [Excess Flood]
Gasher has joined #ruby
Lord_of_Life has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
toretore has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
minimalism has quit [Quit: minimalism]
polysics_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polysics has quit [Ping timeout: 258 seconds]
Guest23568 is now known as ged
ged is now known as Guest26038
tvw has joined #ruby
tomphp has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
Pupeno has quit [Remote host closed the connection]
nankyokusei has joined #ruby
koldbrutality has quit [Ping timeout: 258 seconds]
cdg has joined #ruby
JeanCarloMachado has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
yfumi has joined #ruby
charliesome has joined #ruby
AndBobsYourUncle has joined #ruby
bronson has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
DoubleMalt has quit [Ping timeout: 258 seconds]
tmtwd has joined #ruby
slyslick has joined #ruby
milardovich has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 245 seconds]
saneax is now known as saneax-_-|AFK
dasher00 has joined #ruby
sepp2k has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
petrichorx_ has joined #ruby
SpiffTR has quit [Quit: Leaving.]
DoubleMalt has joined #ruby
Kaze_FX has joined #ruby
tomphp has joined #ruby
tk__ has quit [Quit: ばいばい]
conta has joined #ruby
hotpancakes has joined #ruby
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
Pupeno has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
_main_ is now known as __main__
milardovich has joined #ruby
anuxivm has joined #ruby
ksteck has joined #ruby
pilne has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
futilegames has joined #ruby
DoubleMalt has quit [Ping timeout: 260 seconds]
yfumi has quit [Quit: Leaving]
duckpuppy has joined #ruby
davic is now known as Taco
Taco is now known as Takko
Takko is now known as davic
newbie1 has joined #ruby
cdg has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 258 seconds]
enyo_ has joined #ruby
DoubleMalt has joined #ruby
futilegames has quit [Quit: futilegames]
rikkipitt has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Guest26038 is now known as ged
ged is now known as Guest62830
enyo_ has quit [Ping timeout: 255 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
futilegames has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slyslick has quit [Remote host closed the connection]
Pupeno has joined #ruby
charliesome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
tmtwd has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
gloscombe has joined #ruby
Pupeno has quit [Remote host closed the connection]
jshjsh has joined #ruby
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
binaryplease has joined #ruby
SpiffTR has joined #ruby
nettoweb1 has joined #ruby
aryaching has joined #ruby
nettoweb has quit [Ping timeout: 248 seconds]
unshadow has quit [Quit: leaving]
xen0fon has quit [Quit: xen0fon]
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
masondesu has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
masondesu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
Gadgetoid has quit [Read error: No route to host]
nettoweb has joined #ruby
Gadgetoid has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
polysics_ has quit [Remote host closed the connection]
scootaloo has quit [Remote host closed the connection]
polysics has joined #ruby
Gadgetoid has quit [Read error: No route to host]
scootaloo has joined #ruby
f4 has joined #ruby
bmurt has joined #ruby
Gadgetoid has joined #ruby
x00r__ has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
polysics has quit [Ping timeout: 248 seconds]
Welkin has joined #ruby
nankyokusei has joined #ruby
<Welkin> could anyone explain the syntax used here?
<Welkin> `render plain: params[:article].inspect`
polysics has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Welkin> `{ :plain => params[:article].inspect }` should be the same, correct?
<Welkin> it is a single element hashmap
<Papierkorb> Welkin, in long form that'd be: `render({ :plain => params[:article].inspect })`
rikkipitt has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 248 seconds]
<Welkin> okay
rikkipitt has joined #ruby
polysics has quit [Client Quit]
<Welkin> and if you omit parentheses, you still need to include the commas between the function parameters
brendan- has joined #ruby
<Papierkorb> Yes of course
nankyokusei has quit [Ping timeout: 258 seconds]
BlueDragons has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
BlueDragons has quit [Client Quit]
rikkipitt has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 258 seconds]
x00r__ has joined #ruby
bronson has joined #ruby
Pupeno has joined #ruby
AndBobsYourUncle has joined #ruby
brent__ has joined #ruby
bruno- has joined #ruby
conta1 has joined #ruby
bruno- has quit [Client Quit]
the_drow has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
Guest62830 is now known as ged
brent__ has quit [Ping timeout: 248 seconds]
ged is now known as Guest22004
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
conta1 has quit [Ping timeout: 240 seconds]
BlkDynmt has quit [Quit: BlkDynmt]
SpiffTR has quit [Quit: Leaving.]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SpiffTR has joined #ruby
ifctj has joined #ruby
futilegames has quit [Quit: futilegames]
SpiffTR has quit [Client Quit]
Vile` has joined #ruby
eelster has joined #ruby
Pupeno has quit [Remote host closed the connection]
<eelster> I have a question that I have, on the whole, been unable to find an answer to.
<eelster> Does ruby have an sum type, like union in C/
dmin7b5 has joined #ruby
rikkipitt has joined #ruby
<eelster> I meant to say a sum type. I don't know why I typed an
<Welkin> you don't work with types directly, afaik
<Welkin> like with any dynamically typed language
<Welkin> you just use hashmaps
<eelster> So generally classes are fine for what I want, but I was working with something where memory efficiency is essential. I was trying to see if I could use ruby instead of C, but I'll probably just use C for it.
bigkevmcd has quit [Ping timeout: 245 seconds]
<eelster> Now that I think about it, because of Ruby's dynamic typing, I guess I could just use a single variable in place of a union.
<matthewd> I'm not sure what a ruby equivalent of a union would look like
scootaloo has quit [Remote host closed the connection]
<matthewd> .. but if memory efficiency really matters, you're likely to have a bad time anyway
petrichorx_ has quit [Quit: Connection closed for inactivity]
jhack has joined #ruby
<eelster> I guess Ruby doesn't need a union because a C union like this: https://hastebin.com/idilekahez.c
<eelster> Could just be a single variable that changes types in Ruby.
<eelster> matthewd: Yes that is true. Unfortunately, Ruby isn't great for my embedded device I'm working on with 128KB of RAM.
<Welkin> lol
<Welkin> then don't use ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Welkin> the obvious choice for embedded is C
<eelster> It is already programmed in C
<eelster> I just wanted to see if there was any way I could reprogram it in ruby, but it is seemingly not possible.
futilegames has joined #ruby
brendan- has joined #ruby
<eelster> I like pushing Ruby to the limits (and beyond the limits) of what it was made for.
KeyJoo has joined #ruby
manjaro-kde5__ has joined #ruby
<Papierkorb> eelster: Maybe Crystal-lang could be of interest to you on the long run
<Papierkorb> I don't think though that anyone has tried to use crystal for embedded programming yet
<matthewd> mruby?
<eelster> Papierkorb: I've tried Crystal a bit, but for me it's not that interesting because I am pretty comfortable in C.
the_drow has quit [Quit: This computer has gone to sleep]
<eelster> I use Ruby for a lot of dynamic things, which unfortunately crystal does not offer.
<eelster> It's pretty cool on the whole though.
doublemalt_ has joined #ruby
xen0fon has joined #ruby
<canton7> you're not going to get those dynamic things without interpreting the language (rather than compiling it), and an interpreted langauge is never going to work on an embedded platform
braincrash has quit [Ping timeout: 240 seconds]
<eelster> canton7: Yes, that does seem to be the reality :/
<Papierkorb> canton7: There are JVMs running on credit cards...
<eelster> Papierkorb: That's an interesting idea. I wonder if I can work with JRuby for this.
<Papierkorb> lawl
nettoweb has joined #ruby
<canton7> true, but the vast majority of embedded devices don't run java
<Papierkorb> Well, if you get it to fit in that few KiBs of ram you have..
<eelster> Maybe I'll just get a better embedded device for my fridge.
<Papierkorb> raspi zero?
<eelster> I have one sitting around.
<Papierkorb> it's small and should be powerful enough to run any language-of-the-week
jhack has quit [Quit: jhack]
dmin7b5 has quit [Quit: Textual IRC Client: www.textualapp.com]
<eelster> I like messing around with IoT stuff.
DoubleMalt has quit [Ping timeout: 240 seconds]
<Papierkorb> I'm still disappointed that IoT = "Internet of Toilets" didn't take off
<eelster> I did completely re-program my Java-ready blueray player with JRuby.
<Papierkorb> wat
<eelster> My BlueRay player had a ton of shit features on it and I took it apart and messed with it and reprogrammed it.
<eelster> It is probably illegal now with some of the modifications I made.
<eelster> (A lot of DRM stuff)
<Papierkorb> You mean, it's actually usable now?
<Welkin> DRM is bullshit
<Papierkorb> What a disgrace
dhollinger has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eelster> JRuby is very useful for anything that is Java ready (which a lot of mid-range IoT devices are)
<Papierkorb> I don't have Windows for one of those overpriced bullshit bluray players, nor do I own a standalone bluray player. I have a Bluray drive though and bought bluray movies, which I then have to rip/crack to actually watch. wtf?
<eelster> Yeah, BlueRay is shitty.
aries_liuxueyang has quit [Ping timeout: 245 seconds]
<eelster> Rasp Pi is great though, because I build a lot of my own IoT stuff instead of modding pre-existing IoT devices.
dhollinger has joined #ruby
bmurt has joined #ruby
<Papierkorb> You don't buy premade IoT devices? So you don't find it funny to offer a VPN for random chinese corporations into your home network, or be part of a "proud" DDoS network?
ksteck has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eelster> I buy some premade IoT devices. I do both. A lot of my IoT things aren't actually "online" either though. What do you mean by random chinese corporations?
Yacker has joined #ruby
<Papierkorb> the real manufacturers, selling them as white label products
rikkipitt has quit [Quit: Leaving...]
<Papierkorb> There was a case here in Germany where people bought tons of IoT surveillance cameras to watch their houses from a supermarket when they were cheap
<Papierkorb> Well, their security was also cheap :)
<eelster> Oh yeah, I don't do that shit. I also like tinkering and messing around.
<eelster> I'm more comfortable with a rasp pi because I know I control what it's doing.
doubleemms has quit [Remote host closed the connection]
<eelster> My IoT devices are connected to the internet, but very indirectly.
enyo_ has joined #ruby
futilegames has quit [Quit: futilegames]
xen0fon has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
enyo_ has quit [Ping timeout: 240 seconds]
f4 has quit [Quit: Ухожу я от вас]
jhack has joined #ruby
ifctj has quit [Ping timeout: 240 seconds]
jhack has quit [Client Quit]
tomphp has joined #ruby
xlegoman has joined #ruby
xen0fon has joined #ruby
andrzejku has joined #ruby
Mr_Pancake has quit [Ping timeout: 256 seconds]
dmin7b5 has joined #ruby
manjaro-kde5__ has quit [Ping timeout: 240 seconds]
dmin7b5 has quit [Client Quit]
xen0fon has quit [Quit: xen0fon]
dmin7b5 has joined #ruby
nettoweb has joined #ruby
_whitelogger has joined #ruby
bronson has quit [Remote host closed the connection]
jcao219 has joined #ruby
dmin7b5 has quit [Quit: Textual IRC Client: www.textualapp.com]
rodfersou has joined #ruby
Guest22004 is now known as ged
rodfersou has quit [Client Quit]
TreyG has joined #ruby
ged is now known as Guest49692
elh9 has quit [Ping timeout: 255 seconds]
solocshaw has joined #ruby
hotpancakes has quit [Remote host closed the connection]
koldbrutality has joined #ruby
teclator has quit [Ping timeout: 248 seconds]
teclator has joined #ruby
bronson has joined #ruby
ksteck has joined #ruby
binaryplease has quit [Ping timeout: 260 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
jshjsh has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mr_Pancake has joined #ruby
tvw has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 258 seconds]
AndBobsYourUncle has joined #ruby
pragmaticus has quit [Ping timeout: 248 seconds]
conta has quit [Quit: conta]
unshadow has joined #ruby
_main_ has joined #ruby
Mr_Pancake has quit [Ping timeout: 240 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
__main__ has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
hotpancakes has joined #ruby
_main_ is now known as __main__
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
myk267 has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
teclator has quit [Ping timeout: 248 seconds]
__main__ has joined #ruby
teclator has joined #ruby
Mr_Pancake has joined #ruby
dionysus69 has joined #ruby
ryan_notabot has quit [Ping timeout: 248 seconds]
ryan_notabot has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
blackwind_123 has joined #ruby
bronson has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
binaryplease has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
hotpanca_ has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
robnester has quit [Ping timeout: 264 seconds]
muelleme has joined #ruby
learning has joined #ruby
the_drow has joined #ruby
SteenJobs has joined #ruby
the_drow has quit [Client Quit]
the_drow has joined #ruby
nankyokusei has joined #ruby
x00r__ has quit [Ping timeout: 240 seconds]
alan_w has quit [Quit: WeeChat 1.4]
Channel6 has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
teclator has quit [Ping timeout: 255 seconds]
teclator has joined #ruby
anuxivm has left #ruby [#ruby]
eelster has quit [Quit: leaving]
the_drow has quit [Quit: This computer has gone to sleep]
aremaref has joined #ruby
Yacker has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shayan_ has joined #ruby
masondesu has joined #ruby
andrzejku has quit [Remote host closed the connection]
alan_w has joined #ruby
Vile` has quit [Quit: ,.]
jcao219 has joined #ruby
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pupeno has quit [Client Quit]
Guest49692 is now known as ged
ged is now known as Guest86441
maddmaxx has joined #ruby
milardov_ has joined #ruby
enyo_ has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
dviola has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
Rich_Morin1 has quit [Read error: No route to host]
learning has quit []
shayan_ has quit [Quit: shayan_]
AndBobsYourUncle has joined #ruby
enyo_ has quit [Ping timeout: 245 seconds]
bronson has quit [Remote host closed the connection]
hotpancakes has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
ryan_notabot has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
ryan_notabot has joined #ruby
ryan_notabot has quit [Remote host closed the connection]
ryan_notabot has joined #ruby
nettoweb has joined #ruby
last_staff has joined #ruby
nettoweb has quit [Client Quit]
nettoweb has joined #ruby
dcunit3d has joined #ruby
fredolinhares has joined #ruby
aremaref has quit [Ping timeout: 240 seconds]
jshjsh has quit [Quit: Leaving]
bronson has quit []
duckpuppy has joined #ruby
ianmethyst has joined #ruby
anisha has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
nettoweb1 has joined #ruby
houhoulis has joined #ruby
aremaref has joined #ruby
tomphp has joined #ruby
nettoweb has quit [Ping timeout: 255 seconds]
milardov_ has quit []
robnester has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower2 has quit [Ping timeout: 240 seconds]
ifctj has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
marcdel has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
Welkin has quit [Quit: leaving]
muelleme has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
aremaref has quit [Ping timeout: 260 seconds]
hightower2 has joined #ruby
eelster has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
seme has quit [Quit: Changing server]
tomphp has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
aremaref has joined #ruby
masondesu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AnxiousGarlic has joined #ruby
eelster has quit [Quit: leaving]
Guest86441 is now known as ged
ged is now known as Guest21156
eelster has joined #ruby
ragesoss has quit [Ping timeout: 258 seconds]
minimalism has joined #ruby
brent__ has joined #ruby
Dobler has joined #ruby
brent__ has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 245 seconds]
AnxiousGarlic has quit [Read error: Connection reset by peer]
blackwind_123 has joined #ruby
AnxiousGarlic has joined #ruby
meadmoon has joined #ruby
eelster has quit [Quit: leaving]
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
houhoulis has quit [Remote host closed the connection]
gloscombe has quit [Quit: gloscombe]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
maloik31 has joined #ruby
maloik has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gasher has quit [Quit: Leaving]
eelster has joined #ruby
ghostlight has left #ruby [#ruby]
gloscombe has joined #ruby
meadmoon has quit [Quit: I am functioning within established parameters.]
Yacker has joined #ruby
masondesu has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
eelster has quit [Client Quit]
eelster has joined #ruby
gheegh has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tomphp has joined #ruby
<eelster> That was a weird quit message from rippa
enyo_ has joined #ruby
enyo_ has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
myk267 has quit [Quit: :q!]
b00jum has joined #ruby
ur5us has joined #ruby
<b00jum> on linux, i want to change location to which gems will be installed to be more xdg friendly,
ur5us has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
ur5us has joined #ruby
<b00jum> from reading various configs this is what i came up with:
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<b00jum> but i thought that i'll ask here before actually implementing it and potentially braking something.
<b00jum> is this is the the correct way to achieve what i want?
roamingdog has quit [Remote host closed the connection]
jcao219 has quit [Remote host closed the connection]
duckpuppy has joined #ruby
roamingdog has joined #ruby
testuser1 has joined #ruby
aviraldg has quit [Changing host]
aviraldg has joined #ruby
aviraldg has joined #ruby
hotpancakes has joined #ruby
ocbtec has quit [Ping timeout: 240 seconds]
LastWhisper____ has joined #ruby
icbm has joined #ruby
bmurt has joined #ruby
b00jum has quit [Quit: That's all Folks!]
porfa has joined #ruby
<porfa> Hello guys
<porfa> is it possible for me to .split a string at the first occurrence of ANYnumber, always followed by the letter “R” ?
<porfa> for ie: “NAMA 145R10 69T MASSE 315” i can .split(‘R’) but how do i regex in there?
muelleme has joined #ruby
<tobiasvl> porfa: foo.split(/\dr/) ?
<tobiasvl> sorry, /\dR/
<tobiasvl> oh, you want to retain the number perhaps
<porfa> yes
<havenwood> porfa: What's the result you're looking for?
rikkipitt has joined #ruby
<porfa> NAMA 145R10 69T MASSE 315 —> NAMA 145, R10 69T MASSE 315
<porfa> KORMORAN 135/80R13 IMPULSER 70T B2 ——> KORMORAN 135/80, R13 IMPULSER 70T B2
Guest21156 is now known as ged
ged is now known as Guest48582
<porfa> i tried several things, but then i though “hmmm all of these lines have and R and two numbers on each side.. so.. why not look for ?R? or something..
<havenwood> porfa: split /(?<=\d)(?=R)/
Channel6 has quit [Quit: Leaving]
<porfa> wow, amazing
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<porfa> thank you :)
tomphp has joined #ruby
binaryplease has quit [Quit: binaryplease]
<havenwood> porfa: you're welcome!
<havenwood> porfa: see "Positive lookbehind" and "Positive lookahead" in the Regexp docs: https://ruby-doc.org/core-2.4.0/Regexp.html#class-Regexp-label-Anchors
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhoulis has joined #ruby
masondesu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hardest_ is now known as hardest
hardest has quit [Changing host]
hardest has joined #ruby
rikkipitt has quit [Remote host closed the connection]
rikkipitt has joined #ruby
Yacker has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gasher has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has quit [Remote host closed the connection]
rikkipitt has quit [Ping timeout: 248 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
aremaref has quit [Ping timeout: 240 seconds]
ocbtec has joined #ruby
Yacker has joined #ruby
matp has quit [Remote host closed the connection]
eelster has quit [Ping timeout: 240 seconds]
matp has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
machinewar has joined #ruby
ifctj has quit [Ping timeout: 258 seconds]
Kug3lis has joined #ruby
tmtwd has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
boombox_ has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
muelleme has quit [Ping timeout: 258 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
blackbom1 has quit [Ping timeout: 256 seconds]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
Gasher has joined #ruby
roamingdog has quit [Remote host closed the connection]
boombox_ has quit [Remote host closed the connection]
nettoweb has joined #ruby
nettoweb1 has quit [Ping timeout: 260 seconds]
duckpuppy has joined #ruby
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #ruby
Lord_of_Life has joined #ruby
Log1x has quit [Ping timeout: 258 seconds]
<porfa> heheh
Yacker has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azor has joined #ruby
xen0fon has joined #ruby
xen0fon has quit [Client Quit]
aremaref has joined #ruby
roamingdog has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Log1x has joined #ruby
Log1x has joined #ruby
Log1x has quit [Changing host]
tomphp has joined #ruby
machinewar has quit [Ping timeout: 255 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
dhollinger has quit [Ping timeout: 245 seconds]
dhollinger has joined #ruby
duckpuppy has joined #ruby
nankyokusei has joined #ruby
dhollinger has quit [Client Quit]
rikkipitt has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
Guest48582 is now known as ged
testuser1 has quit [Quit: Leaving.]
ged is now known as Guest85638
aspiers has quit [Ping timeout: 245 seconds]
nanoz has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 245 seconds]
dhollinger has joined #ruby
dhollinger has quit [Client Quit]
bogile has joined #ruby
Devalo has joined #ruby
dhollinger has joined #ruby
enyo_ has joined #ruby
teclator has quit [Ping timeout: 245 seconds]
Devalo has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
enyo_ has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Quit: WeeChat 1.6]
duckpuppy has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
JeanCarloMachado has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
ocbtec has quit [Quit: leaving]
roamingdog has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
duckpuppy has joined #ruby
Yacker has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
renchan has quit [Ping timeout: 240 seconds]
newbie1 has quit [Read error: Connection reset by peer]
newbie1 has joined #ruby
newbie1 has quit [Max SendQ exceeded]
jackjackdripper has joined #ruby
newbie1 has joined #ruby
evotopid has joined #ruby
minimalism has quit [Quit: minimalism]
minimalism has joined #ruby
ICantCook has quit [Quit: bye]
doublemalt_ has quit [Ping timeout: 245 seconds]
Yacker has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mystacism has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
rikkipitt has quit [Remote host closed the connection]
bmurt has joined #ruby
rikkipitt has joined #ruby
Mystacism has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 240 seconds]
Jackneill_ has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
rikkipitt has quit [Read error: No route to host]
rikkipitt has joined #ruby
Yacker has joined #ruby
ledestin has joined #ruby
Devalo has joined #ruby
Guest85638 is now known as ged
ged is now known as Guest68361
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
bmurt has joined #ruby
Devalo has quit [Ping timeout: 258 seconds]
meocs has quit [Max SendQ exceeded]
djbkd_ has joined #ruby
nevermoregnr has joined #ruby
duckpuppy has joined #ruby
enilsen16 has joined #ruby
gheegh has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ruby
Gasher has quit [Quit: Leaving]
djbkd_ has quit [Ping timeout: 240 seconds]
art-solopov has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rikkipitt has quit [Remote host closed the connection]
Mystacism has joined #ruby
iffyuva has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Quit: Konversation terminated!]
jackjackdripper has quit [Quit: Leaving.]
nowhere_man has joined #ruby
teclator_ has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
xlegoman has joined #ruby
enilsen16 has quit [Quit: enilsen16]
agent_white has quit [Read error: Connection reset by peer]
Mystacism has left #ruby ["Leaving"]
houhoulis has quit [Remote host closed the connection]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wennefer has joined #ruby
LoneHermit has joined #ruby
sepp2k has quit [Quit: Leaving.]
wennefer has quit [Client Quit]
AlexRussia has quit [Ping timeout: 240 seconds]
enilsen16 has joined #ruby
houhoulis has joined #ruby
teclator_ has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
<parsnip> i think rvm is changing my `cd` command, but the code suggests it only does it if ZSH_VERSION is set, but i don't think it is. anyone run into this?
<porfa> hello, im asking something in regex, but there seems no one around to help me it, is it ok it i crosshelp for this?
<elomatreb> sure
<evotopid> parsnip: Are you using zsh anyway? Maybe it is getting set somewhere, but I guess that's a bit weird.
<parsnip> so when i `cd ~/my-jekyll`, it bleeps about stuff in Gemfile
dcunit3d has quit [Ping timeout: 240 seconds]
<porfa> ok, how can i select, the first occurrence of: a space two numbers and a leter? for ie “kx13 INSPIRA DD1 66N” i want to keep” 66N” (its not always in the last part of the string)
<elomatreb> Do the numbers have to be the same?
<porfa> no no, they are random, it’s always random numbers (two) and a random Character
<evotopid> parsnip: I don't know since I haven't used rvm in a while, personally I prefer rbenv which doesn't overwrite shell functionality like that.
<parsnip> evotopid: okay, i like to hear of what's in common use, as i'm new to ruby (my actual use is quite limited so far)
<parsnip> thank you
milardovich has quit [Remote host closed the connection]
<elomatreb> porfa: / \d{2}\[a-zA-Z]/ ?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<porfa> elomatreb: checkint it out
milardovich has joined #ruby
<elomatreb> parsnip: chruby (https://github.com/postmodern/chruby) is nice
<parsnip> hmm, i have in my .bash_profile the following, maybe it's doing it
<parsnip> [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
enyo_ has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
jhack has joined #ruby
<parsnip> yeah, commenting that out changes things