apeiros changed the topic of #ruby-lang to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste code on https://gist.github.com
Asher has quit [Ping timeout: 265 seconds]
tockitj has quit [Ping timeout: 244 seconds]
voxxit has quit [Quit: Lingo: www.lingoirc.com]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nedp has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 244 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sp4rrow has quit [Quit: Textual IRC Client: www.textualapp.com]
tockitj has joined #ruby-lang
CatMartyn has joined #ruby-lang
dorei has quit []
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
bantic has quit [Quit: bantic]
lewix has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
haraoka has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
AlexAltea has joined #ruby-lang
bb010g has joined #ruby-lang
centrx has quit [Remote host closed the connection]
quintinadam has joined #ruby-lang
lewix has joined #ruby-lang
quintinadam has quit [Read error: Connection reset by peer]
amclain has joined #ruby-lang
lewix has quit [Read error: Connection reset by peer]
rgb-one has quit [Remote host closed the connection]
lewix has joined #ruby-lang
roamingdog has joined #ruby-lang
djellemah_ has joined #ruby-lang
djellemah has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby-lang
hahuang65 has quit [Ping timeout: 276 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
b_hoffman has joined #ruby-lang
AlexAltea has quit [Ping timeout: 272 seconds]
aghalarp has joined #ruby-lang
hendranata_ has joined #ruby-lang
hendranata_ has quit [Read error: Connection reset by peer]
ur5us has joined #ruby-lang
hendranata_ has joined #ruby-lang
hendranata_ has quit [Read error: Connection reset by peer]
|jemc| has quit [Ping timeout: 265 seconds]
hendranata_ has joined #ruby-lang
hendranata_ has quit [Read error: Connection reset by peer]
itstooloud has joined #ruby-lang
<itstooloud> what in the hell is the point of a binary search tree
hendranata_ has joined #ruby-lang
hendranata_ has quit [Read error: Connection reset by peer]
<itstooloud> there is a video with this yoyo who explains the whole concept but without any context or why it should be any use to me. I'm trying to decide whether this is important to my Ruby knowledge.
tockitj has quit [Ping timeout: 256 seconds]
_djbkd has quit [Remote host closed the connection]
<weaksauce> itstooloud it's a basic datastructure that takes a linear search and makes it log n
_djbkd has joined #ruby-lang
<weaksauce> instead of searching through n records you have to search through log n records to find what you want
havenwood has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
<itstooloud> yes i understand the concept. what i can't figure out is why i need to write a bunch of code to link some numbers together. the exercise gives me an array and says to turn it into a binary tree "appropriately placed." the video i just watched made a point of saying the layout is arbitrary beyond the basic Left/right top/down rules. what is this teaching me? I have a feeling this is more of a computer-science issue and less of
<itstooloud> something i would need to know as a programmer
<itstooloud> Or am I wrong about that
tockitj has joined #ruby-lang
<itstooloud> the exercise goes on to use the binary search tree to illustrate the difference between breadth-first and depth-first searches
<weaksauce> well you probably wouldn't write a bst by hand no
<weaksauce> bfs and dfs are both things that you might write though
<weaksauce> in an arbitrary graph
<weaksauce> personally I'd say you should know how to do a bst, yes.
<itstooloud> how might one encounter a binary search tree in the wild? i don't even understand how this information would be stored
<itstooloud> and why it wouldn't be the job of indexes to the given data sets
<weaksauce> it's so easy and so fundamental to compsci / programming that the only reason not to learn it apathy
<weaksauce> what do you mean indexes to the given data sets?
<itstooloud> like in SQL
<weaksauce> databases will not use binary trees they will use b-trees
lytol has quit [Remote host closed the connection]
<weaksauce> and perhaps some other datastructures
<itstooloud> is a b-tree a binary search tree? what does it look like and how would i access it?
<weaksauce> no. b-tree is different otherwise they'd have the same name ;)
<itstooloud> sorry, i thought you were abbreviating
RobertBirnie has joined #ruby-lang
<weaksauce> similar to a binary tree
<weaksauce> but with more children
<weaksauce> itstooloud what are you using this information for?
<weaksauce> are you writing some basic crud app in rails? no you probably don't need to know any of it
<itstooloud> i honestly don't know. it's in my lesson and it's poorly explained and i'm just having trouble understanding the point
<itstooloud> it literally says nothing about how the concept is used in programming. i still don't understand where the BST is stored. is it in another table?
<weaksauce> itstooloud it's because you don't understand the material. you can make a sorted array a bst
<weaksauce> you can make an arbitrary graph a bst
<weaksauce> there is no concept of table when talking about a bst
<itstooloud> then what exactly are you doing when you define the relationships between all the nodes?
<weaksauce> do you have a link to the explanation?
<weaksauce> I'd wager that you are making a bst graph out of arbitrary nodes
<weaksauce> ok
<weaksauce> why are you doing this lesson?
<itstooloud> lol that's what i came here to find out
<weaksauce> just for fun or for a course or...?
<itstooloud> it's in the middle of a much larger path through html, js, ruby, and then rails
<itstooloud> i'm learning rails
<weaksauce> ok. well it's useful knowledge imo.
<weaksauce> but it's compsci material
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<itstooloud> just so i understand, compsci meaning more to do with the machine than with programming
<weaksauce> no, compsci is more akin to math than the machine.
<weaksauce> it's a branch of mathematics that deals with things like algorithms and datastructures and set theory and other things like that.
robbyoconnor has joined #ruby-lang
<itstooloud> that is good to know, thanks
LMity has joined #ruby-lang
lytol has joined #ruby-lang
aghalarp has quit [Max SendQ exceeded]
LMity has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby-lang
bruno- has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
yatish27 has quit [Remote host closed the connection]
shinnya_ has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 252 seconds]
havenwood has quit [Ping timeout: 246 seconds]
roamingdog has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
hahuang65 has quit [Ping timeout: 276 seconds]
caseydriscoll has joined #ruby-lang
makepkgnotwar has joined #ruby-lang
amystephen has quit [Quit: amystephen]
roamingdog has quit [Ping timeout: 276 seconds]
caseydriscoll has quit [Ping timeout: 264 seconds]
yatish27 has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby-lang
alessandro has quit [Ping timeout: 240 seconds]
lytol has quit [Remote host closed the connection]
b_hoffman has joined #ruby-lang
<bnagy> STUPID KNOWLEDGE
<bnagy> WHEN DO I MAKE THE MONKEY DANCE?
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 276 seconds]
riotjones has joined #ruby-lang
alessandro has joined #ruby-lang
gix has joined #ruby-lang
sankaber has joined #ruby-lang
riotjones has quit [Ping timeout: 246 seconds]
x44x45x41x4E has joined #ruby-lang
RobertBirnie has joined #ruby-lang
hendranata_ has joined #ruby-lang
hahuang65 has joined #ruby-lang
lektrik has joined #ruby-lang
lektrik has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 250 seconds]
itstooloud has quit [Quit: itstooloud]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lewix has quit []
_djbkd has joined #ruby-lang
hahuang65 has joined #ruby-lang
fujimura has joined #ruby-lang
lytol has joined #ruby-lang
Asher has joined #ruby-lang
lytol has quit [Ping timeout: 256 seconds]
fujimura has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 246 seconds]
lytol has joined #ruby-lang
roamingdog has joined #ruby-lang
Iskarlar has joined #ruby-lang
michaeldeol has joined #ruby-lang
roamingdog has quit [Ping timeout: 240 seconds]
yatish27 has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
b_hoffman has quit [Quit: b_hoffman]
hendranata_ has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
makepkgnotwar has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 255 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
AlexAltea has joined #ruby-lang
vondruch has joined #ruby-lang
makepkgnotwar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
makepkgnotwar has joined #ruby-lang
makepkgnotwar has quit [Client Quit]
cornerma1 has joined #ruby-lang
fujimura has joined #ruby-lang
chadwtaylor has joined #ruby-lang
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
fujimura has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
lytol has joined #ruby-lang
Miphix has quit [Read error: Connection reset by peer]
sandelius has joined #ruby-lang
Miphix has joined #ruby-lang
hendranata_ has joined #ruby-lang
riotjones has joined #ruby-lang
SylarRuby has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
rippa has joined #ruby-lang
tsujp has joined #ruby-lang
AlexAltea has quit [Ping timeout: 255 seconds]
dogsitr has quit [Ping timeout: 248 seconds]
bruno- has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x44x45x41x4E has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cocoabean has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lektrik has joined #ruby-lang
dellavg_ has joined #ruby-lang
sandelius has joined #ruby-lang
hendranata_ has joined #ruby-lang
alessandro has quit [Ping timeout: 246 seconds]
roamingdog has joined #ruby-lang
crdpink has joined #ruby-lang
crdpink2 has quit [Ping timeout: 265 seconds]
cpach_ is now known as cpach
cpach has quit [Changing host]
cpach has joined #ruby-lang
roamingdog has quit [Ping timeout: 252 seconds]
lektrik has quit [Quit: Leaving]
lytol has quit [Remote host closed the connection]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby-lang
piotrj has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
Mon_Ouie has joined #ruby-lang
charliesome has quit [Quit: zzz]
_djbkd has quit [Remote host closed the connection]
sandelius has joined #ruby-lang
solars has joined #ruby-lang
hendranata_ has quit [Ping timeout: 248 seconds]
jas02 has joined #ruby-lang
charliesome has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
djbkd_ has joined #ruby-lang
hendranata_ has joined #ruby-lang
x44x45x41x4E has joined #ruby-lang
x44x45x41x4E is now known as [Away]x44x45x41x
[Away]x44x45x41x is now known as x44x45x41x4E
ledestin has joined #ruby-lang
solars has quit [Quit: WeeChat 0.4.2]
stan has joined #ruby-lang
solars has joined #ruby-lang
jas02 has quit [Quit: jas02]
Miphix has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
semperfried76 has quit [Quit: Be back later ...]
Iskarlar has joined #ruby-lang
semperfried76 has joined #ruby-lang
semperfried76 has quit [Read error: Connection reset by peer]
semperfried76 has joined #ruby-lang
djbkd_ has quit [Remote host closed the connection]
Miphix has joined #ruby-lang
dhjondoh has joined #ruby-lang
dhjondoh has quit [Client Quit]
Forgetful_Lion has joined #ruby-lang
duderonomy has joined #ruby-lang
sandelius has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby-lang
sandelius has joined #ruby-lang
djellemah_ has quit [Quit: Leaving]
djellemah has joined #ruby-lang
dagda1 has quit [Read error: Connection reset by peer]
dagda1 has joined #ruby-lang
chadwtaylor has quit [Remote host closed the connection]
wprice has quit [Quit: wprice]
haraoka_ has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
haraoka has quit [Ping timeout: 250 seconds]
lytol has joined #ruby-lang
ruby-lang628 has joined #ruby-lang
lytol has quit [Ping timeout: 252 seconds]
brushbox has quit [Ping timeout: 250 seconds]
SylarRuby has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
<ruby-lang628> hi, i am using ldap gem and filters: 'x= filter1 | filter2'. How can i add to this 'or' object in a while/loop? like 'x=filter1 | filter2 | filter3', but 'filter3' needs to be added in a loop block.
anurag has joined #ruby-lang
<anurag> a='hello' prints =>"hello" ; can we override it to =>'hello'
dhjondoh has quit [Quit: dhjondoh]
<anurag> a='hello' prints =>"hello" ; can we override it to =>'hello'
yfeldblum has joined #ruby-lang
<rob_> anurag: can you give an example?
<rob_> anurag: you're assigning a string to 'a', perhaps you want: a='"hello"' if you want the double quotes to be displayed when you 'puts' the string?
wicope has joined #ruby-lang
intinig has quit [Remote host closed the connection]
AlexAltea has joined #ruby-lang
postmodern has quit [Quit: Leaving]
intinig has joined #ruby-lang
<anurag> In interpretor , i just want to change the deault behavoiur of wrappiing strings with doubles quotes; can we change this beahviour to single quotes
<heftig> not trivially
<rob_> they don't get wrapped with double quotes, the interpreter is just showing quotes to show it's a string
<rob_> the string is still the same bytes
intinig has quit [Ping timeout: 265 seconds]
<anurag> actually, i am using mirage and it always stores key, value pairs in the form of strings; and in the value i have an array of strings which looks like this "[\"abc\",\"def\"]"; i belive this could be avoided if it would have used single quotes for warpping
tommylommykins has quit [Remote host closed the connection]
<rob_> i think single quotes can only be used during assignment
<anurag> So, Is there some way ,we can override this behaviour of double quotes
ruby-lang628 has quit [Ping timeout: 246 seconds]
<rob_> yeah, you can override to_s
<heftig> anurag: you won't save any space by using single quotes
<rob_> heftig: i think he's just upset about the escaping he sees?
<heftig> that wouldn't get any better, it would just be '[\'abc\',\'def\']' instead
<anurag> Yes, i am worried abt those escape characters, beacuse of them i am not able to match strings later on
<anurag> a=["a","b"] gives "[\"a\", \"b\"]" when a.to_s
wicope has quit [Remote host closed the connection]
<heftig> you do realize the actual string content is still ["a","b"]?
<heftig> besides, you shouldn't match serialized objects against strings
<ljarvis> ^
<anurag> i wanted it to be like '["a", "b"]'
<canton7> it gives "[\"a\", \"b\"]" *when printed to the console using 'p'*
roamingdog has joined #ruby-lang
<ljarvis> that's what it is
<canton7> that's not the intrinsic value of the strings. it's how it's printed by the 'p' method
<ljarvis> the escape characters are there because you inspected it
<canton7> 'puts' it, and you'll get something different
<anurag> puts displays it correctly, but returns nil
<anurag> i want to assign that string value to other variable
<ljarvis> a = ["foo", "bar"]; b = a.inspect; puts a
<ljarvis> puts b*
<canton7> anurag, you're confused. why do you care what 'puts' returns?
roamingdog has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
yfeldblu_ has joined #ruby-lang
<anurag> Ok...may be i am going wrong way...Let see
anurag has quit [Quit: Page closed]
LMity has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
Zen-Zen has joined #ruby-lang
<Zen-Zen> Ok... I am jammed up again learning classes... (newbie here) https://gist.github.com/e6bf94837224a15a68d5.git
b_hoffman has joined #ruby-lang
<Zen-Zen> How come my "@health" variable is not read by my print on the bottom of the code.
<canton7> (remove the 'git' from that link to see anything btw)
<Zen-Zen> oleg.health does not work when I assign the @health from @@health
<canton7> Zen-Zen, you've commented out the 'health' method - you should be getting an excpetion
<Zen-Zen> Ohh sorry, I am new to Github as well...
djbkd_ has joined #ruby-lang
<Zen-Zen> the comented sections were tests before I added attr_accessors at the top.
jas02 has joined #ruby-lang
<canton7> but you don't have an attr_accessor for :health
<Zen-Zen> ohhh I see thanks!
<Zen-Zen> One more question... when using self. in this program how do I know if it is referrring to oleg or lars.
b_hoffman has quit [Ping timeout: 264 seconds]
<Zen-Zen> Worked thanks a bunch...
<canton7> 'self' inside the lars Viking will refers to lars. 'self' inside the oleg Viking will refer to oleg
djbkd_ has quit [Ping timeout: 245 seconds]
<Zen-Zen> Makes sense, but when I used .self inside the takes damage method it came out backwards.
<canton7> no idea what you're trying to say there
LMity has quit [Ping timeout: 244 seconds]
marr has joined #ruby-lang
<Zen-Zen> Sorry, let me change the code and rephrase. thanks again! brb
<Zen-Zen> In my takes_damage method how do I know which Viking .self is referring to?
<canton7> olaf.take_damage(...) <-- 'self' is olaf
<canton7> lars.take_damage(..) <-- 'self' is lars
<Zen-Zen> Thanks Canton, I get what you are saying. I am just confused lars.attack(oleg) ends up damaging lars when I use self.
<tbuehlmann> Zen-Zen, maybe deflecting damage?
<canton7> Zen-Zen, follow the code through
<canton7> lars.attack(oleg)... calls lars.take_damage(oleg)... which subtracts 1 from oleg's health (who.health -= damage) and subtracts 1 from lars' leath too (self.health -= damage)
<Zen-Zen> Canton thx a bunch! I think that makes sense I just need to absord it. tbuelmann, deflecting damage is a good guess too... Viking were not surgeons on the battlefield.
<tbuehlmann> :)
hahuang65 has quit [Ping timeout: 246 seconds]
iamninja has quit [Read error: Connection reset by peer]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby-lang
lytol has joined #ruby-lang
brushbox has joined #ruby-lang
lytol has quit [Ping timeout: 252 seconds]
intinig has joined #ruby-lang
tockitj has quit [Ping timeout: 244 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamninja has joined #ruby-lang
chadwtaylor has joined #ruby-lang
chadwtaylor has quit [Ping timeout: 250 seconds]
iooner has joined #ruby-lang
intinig has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
tockitj has joined #ruby-lang
intinig has joined #ruby-lang
tockitj has quit [Changing host]
tockitj has joined #ruby-lang
nedp has quit [Remote host closed the connection]
<womble> Zen-Zen: Do you know how vikings communicated between their ships? They used norse code.
<rob_> womble: :( *claps*
* womble gets his coat
pacharanero has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 245 seconds]
sferik has joined #ruby-lang
<yorickpeterse> morning
<yorickpeterse> what a nice way to start the week by fucking up your login manager
<yorickpeterse> <3 having multiple TTYs
<Eising> :D
sandelius has joined #ruby-lang
hahuang65 has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby-lang
<yorickpeterse> apparently lightdm can't get a list of users...guess I finally have to resort just using a console as the login manager
<yorickpeterse> Only have a single user and never use user switching anyway
<yorickpeterse> and with systemd I no longer have the troubles of consolekit being a dickhead
<yorickpeterse> (yes I actually quite enjoy systemd from a user perspective)
SylarRuby has joined #ruby-lang
<yorickpeterse> anybody saying sysvinit is better should eat a pile of sand
hahuang65 has quit [Ping timeout: 244 seconds]
nofxx_ has quit [Remote host closed the connection]
CatMartyn has quit [Quit: Textual IRC Client: www.textualapp.com]
<surrounder> bsd init is
<yorickpeterse> Never used it, but if it relies on shell scripts it's equally painful
<surrounder> it does
<yorickpeterse> because _every_ darn distro has a different standard on writing those things
<yorickpeterse> Which means none of them are portable
<surrounder> the main problem with systemd is not the initpart imho, just everything else it devours
<yorickpeterse> Though that applies to any init that uses a programming language for config files
<yorickpeterse> surrounder: oh yeah, I only like it from a user perspective
<yorickpeterse> as a user it liberated me from the pain of consolekit, udev not working, etc
<yorickpeterse> e.g. mounting USB drives was a PITA
<surrounder> hm, yeah that might make sense
<yorickpeterse> also getting the status of a process is much nicer
<yorickpeterse> so basically the UX/UI is much better
<yorickpeterse> But from the tech side it's kinda batshit insane
<yorickpeterse> Why does systemd come with a webserver? Why can it scan/produce QR codes?
<surrounder> I don't do desktop shit that much, just servers and I'm not looking forward to using it
<yorickpeterse> Why does it fuck up logging so much with its binary crap?
<ohsix> hurrr
<yorickpeterse> Why does journalctl take 10 minutes to boot up?
<surrounder> exactly
<surrounder> time to get lunch
<yorickpeterse> Why is Lennart literally Satan?
* yorickpeterse runs
<surrounder> haha
<surrounder> yorickpeterse++
<ohsix> it doesn't 'come with' a webserver, there's a thing so you can get json from the journal, it's in the same tarball, typically installed / configured separately; and the QR codes is for forward secure sealing, you keep the code and you can verify if the journals have been tampered with later
roamingdog has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
<yorickpeterse> but why the fuck a QR code
<yorickpeterse> They have literally the worst UX on a desktop
tsujp has quit [Quit: tsujp is snoozing]
<yorickpeterse> "Here let me just scan my screen with my phone"
<ohsix> cuz you can scan it with your phone, i dunno
<yorickpeterse> "Then enter whatever that produces back on my desktop"
symm- has joined #ruby-lang
<ohsix> you have to store it elsewhere for the concept to be reliable, that's just one of the ways, you can write the number down too
<ohsix> it's just a cheeky thing, i think; it's not from concern of the information being intercepted realistically or something
hendranata_ has quit [Remote host closed the connection]
roamingdog has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby-lang
<yorickpeterse> I'd rather have SHA fingerprints or something like that
<yorickpeterse> Either way, the QR code is a minor thing but it just strikes me as odd
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ohsix> yea forward secure sealing is done the way it is done with that key material so it can be periodically sealed without having to have key material on the machine
stamina has joined #ruby-lang
jas02 has joined #ruby-lang
roamingdog has joined #ruby-lang
haraoka_ has quit [Ping timeout: 256 seconds]
brushbox has quit [Quit: Leaving.]
skade has joined #ruby-lang
piotrj has joined #ruby-lang
SylarRuby has quit [Read error: Connection reset by peer]
lytol has joined #ruby-lang
SylarRuby has joined #ruby-lang
brushbox has joined #ruby-lang
sandelius has joined #ruby-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lytol has quit [Ping timeout: 265 seconds]
<yorickpeterse> ljarvis: did you ever dump that chronic replacement of yours on the interwebs?
arBmind has quit [Quit: Leaving.]
dhjondoh has joined #ruby-lang
dhjondoh has quit [Client Quit]
rikkipitt has joined #ruby-lang
<yorickpeterse> welp, I'm writing a relative date parser
* yorickpeterse prepares the knot
dhjondoh has joined #ruby-lang
lele|w has quit [Ping timeout: 272 seconds]
dhjondoh has quit [Client Quit]
pshend has joined #ruby-lang
stonith has quit [Ping timeout: 244 seconds]
brushbox has quit [Quit: Leaving.]
<pshend> hi all. Does anyone have any ideas how to group an array of items by type, but maintain their order? (ie, not group_by). given [1,2,4,5,7,8,10,12], i’d like to group by odd/even, and end up with: [[1],[2,4],[5,7],[8,10,12]]
<Mon_Ouie> Look at Enumerable#chunk
<Mon_Ouie> Heh, actually that's the exact example used in the documentation (well, not the same array though)
<tbuehlmann> #partition would work as well, right?
AlexAltea has quit [Ping timeout: 255 seconds]
<canton7> no
<Mon_Ouie> "maintain their order"
<canton7> partition returns 2 arrays, so doesn't preserve the order
<tbuehlmann> ah, I see
<pshend> Mon_Ouie: yes, looks like Enumerable#chunk is what i’m after. Excellent, thanks!
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
lele|w has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
stonith has joined #ruby-lang
stonith has joined #ruby-lang
intinig has quit [Ping timeout: 245 seconds]
leat has quit [Ping timeout: 264 seconds]
jefus_ has joined #ruby-lang
chadwtaylor has joined #ruby-lang
jefus__ has quit [Ping timeout: 265 seconds]
tomaz_b has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby-lang
chadwtaylor has quit [Ping timeout: 245 seconds]
dhjondoh has joined #ruby-lang
tkuchiki has quit [Ping timeout: 264 seconds]
lytol has joined #ruby-lang
pshend has quit [Quit: pshend]
<yorickpeterse> man, I totally nailed this relative date regex
<yorickpeterse> rock solid: /(\d+)\s+(day|week|month|year)s?\s+(\w+)/
<yorickpeterse> pretty sure ljarvis is now laughing somewhere in a train about this
lytol has quit [Ping timeout: 244 seconds]
tsujp has joined #ruby-lang
jas02 has quit [Remote host closed the connection]
jas02 has joined #ruby-lang
bruno- has joined #ruby-lang
jas02_ has joined #ruby-lang
hachiya has quit [Remote host closed the connection]
jas02 has quit [Ping timeout: 252 seconds]
hachiya has joined #ruby-lang
jas02 has joined #ruby-lang
intinig has joined #ruby-lang
mikecmpbll has joined #ruby-lang
jas02_ has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
Contigi has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby-lang
Contigi has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
workmad3 is now known as wm3|away
begal-sop_ has quit [Remote host closed the connection]
begal-sop__ has joined #ruby-lang
araujo has quit [Ping timeout: 255 seconds]
araujo has joined #ruby-lang
leat has joined #ruby-lang
cpt_yossarian has quit [Ping timeout: 245 seconds]
pshend has joined #ruby-lang
cawil1 has quit [Ping timeout: 265 seconds]
x44x45x41x4E has quit [Quit: Textual IRC Client: www.textualapp.com]
cawil1 has joined #ruby-lang
b_hoffman has joined #ruby-lang
roamingdog has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
roamingdog has quit [Ping timeout: 246 seconds]
froots has joined #ruby-lang
caseydriscoll has joined #ruby-lang
semperfried76 has quit [Quit: Be back later ...]
semperfried76 has joined #ruby-lang
semperfried76 has quit [Read error: Connection reset by peer]
semperfried76 has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 245 seconds]
cengizIO has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
lytol has joined #ruby-lang
adude has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
roamingdog has joined #ruby-lang
lytol has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
SylarRuby has quit [Read error: Connection reset by peer]
sgambino has joined #ruby-lang
mikecmpbll has joined #ruby-lang
SylarRuby has joined #ruby-lang
dhjondoh has joined #ruby-lang
dhjondoh has quit [Client Quit]
b_hoffman has quit [Quit: b_hoffman]
<ljarvis> yorickpeterse: I didn't, it's still lingering around on one of my boxes :( haven't found the time
flgr has quit [Ping timeout: 255 seconds]
<ljarvis> nice regex, also im not currently on a train
flgr has joined #ruby-lang
<yorickpeterse> :O
<yorickpeterse> also I have the benefit of only having to parse dates
<yorickpeterse> and not times
<yorickpeterse> I wonder how well you could solve the time parsing problem using Ragel
<yorickpeterse> basically treat it as an AST, convert that to a time
<yorickpeterse> instead of this massive regex
<ljarvis> I have several branches that use different parsing mechanisms. Ragel is one of them
<ljarvis> it's not very simple
<ljarvis> regexp is generally the worst way, though (for something larger). I use regex to normalise the input
amystephen has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
caseydriscoll has joined #ruby-lang
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
sandelius has quit [Read error: Connection reset by peer]
<yorickpeterse> There's this one customer
<yorickpeterse> well, "partner" actually
Voker57 has joined #ruby-lang
<yorickpeterse> They use our API
<yorickpeterse> Literally dozens of times I've told them exactly what they need to send and where
<yorickpeterse> and now they're still like "lol we're sending this but it doesn't work"
<yorickpeterse> I _literally_ said "set field X to value Y, use URL Z"
<yorickpeterse> I even offered to stop by their office and fix it for them
<yorickpeterse> but noooo that required blabla
<yorickpeterse> (╯°□°)╯︵ ┻━┻
b_hoffman has joined #ruby-lang
<yorickpeterse> This is so frustrating
piotrj has joined #ruby-lang
arBmind has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
<tockitj> yorickpeterse, so.. basically.. you broke it
arBmind has quit [Ping timeout: 246 seconds]
<yorickpeterse> No, it has been working fine for over a year
<tockitj> yeah - but why does it not work for them then?
<yorickpeterse> We migrated this particular thing to a proper API, sent them a PDF and other info on what they exactly needed to do to move over, gave them 3 months
<yorickpeterse> of course 1 day _after_ the old stuff was shut down they're like "wut"
wm3|away is now known as workmad3
<yorickpeterse> we sent them numerous warnings before hand (e.g. a few weeks before, then another a week before)
<yorickpeterse> and ever since they're struggling to update 1) a URL 2) the structure of their JSON payload
<yorickpeterse> I actually have around 40 Emails discussing this with them
arBmind has joined #ruby-lang
<yorickpeterse> I guess this is why people start doing drugs at the office
<tockitj> and they were like - this guy is not only pestering us on email every few days - he actually BROKE the API
<yorickpeterse> Yeah, because the old API was worse than a dog dragging its ass across a floor
<tockitj> and it worked just fine for over the year
<tockitj> and now it is broken
<yorickpeterse> Depends on the definition of "worked just fine"
caseydriscoll has quit [Remote host closed the connection]
<tockitj> well.. it means they didn't have to receive emails or make any CHANGES in the meanwhile
jas02 has quit [Quit: jas02]
<yorickpeterse> btw if you're trying to troll, I'm too grumpy so I'd suggest not to unless you'd like the learn the whole Dutch swearing dictionary in 2 minutes
chadwtaylor has joined #ruby-lang
yatish27 has joined #ruby-lang
<tockitj> i just know how it feels (:
<yorickpeterse> Deprecations suck, but they happen, we specifically gave them 3 months to fix their stuff
<yorickpeterse> They're even the only users of this API as well
<yorickpeterse> That was...6 months ago?
<tockitj> and now they are like - why are you fixing this if it is not broken (:
rikkipitt has joined #ruby-lang
<yorickpeterse> No, they knew the old thing wasn't ideal
sankaber has joined #ruby-lang
<tbuehlmann> yorickpeterse, if they are the only user.. shouldn't they provide the API and you consume it? :D
<yorickpeterse> They push data to us
<yorickpeterse> It's on the list of things to never do again
<yorickpeterse> We don't really sell this particular API anymore either because of reasons like this
<tockitj> yorickpeterse, as soon as it gets to finding someone to blame whole communication is going to get worthless
chadwtaylor has quit [Ping timeout: 245 seconds]
<tockitj> if it does not work they should fix it and move on.. life goes on
<yorickpeterse> oh, I'm keeping the communication professional
<yorickpeterse> although they're really pushing my boundaries here
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
<yorickpeterse> The only other entity that gets this close is Booking.com
<chris2> just make the old api more expensive :P
<yorickpeterse> old API doesn't exist anymore
<yorickpeterse> as in, it was sent to /dev/null
<tockitj> you know what sometimes helps - writing long explanations in email
<chris2> sell them a legacy adapter
<tockitj> if they did not bother reading the docs, then it is not likely they will ping you again if you respond with long email :)
<yorickpeterse> chris2: I'm not Oracle
<chris2> software development is converting pain into money
<surrounder> lol
<yorickpeterse> If that were the case we'd be loaded by now
<yorickpeterse> or, well, I would be
<yorickpeterse> guess I really am in the wrong business
charliesome has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
<tockitj> if everything worked well - there would be nothing to do for engineers
<ljarvis> does anyone know if you can capture shell output in a git alias? i.e git commit -m "Something $(git show ...)"
<chris2> making new perfect stuff
charliesome has quit [Client Quit]
<chris2> ljarvis: why not?
<ljarvis> chris2: tried that but it didn't work
<chris2> ljarvis: you are defining an alias?
sgharms has joined #ruby-lang
<chris2> you need to quote the "" i guess
<tockitj> chris2, nah, there would be too much to learn about new stuff, people would just stick by some standard solutions
<sgharms> Hey what's up ruby people!
<ljarvis> chris2: I am; `foo = !git commit -am 'Something $(git -C /.. rev-parse HEAD | cut -c -7)' && git commit
<yorickpeterse> ljarvis: don't think so
sgharms has quit [Client Quit]
SylarRuby has quit [Read error: Connection reset by peer]
caseydriscoll has joined #ruby-lang
SylarRuby has joined #ruby-lang
<chris2> ljarvis: ' doesnt expand $()
<ljarvis> yeah using " doesn't work either
<chris2> you need " around the shell command as a whole i think
<chris2> and then quote the inner ones
<ljarvis> tried that first, didn't work either :(
<ljarvis> ah wait
<darix> ljarvis: maybe make it a shell function?
<ljarvis> right im stupid
<chris2> foo = "!echo \"hello ljarvis\""
<chris2> % git foo
<chris2> hello ljarvis
<ljarvis> chris2: yeah yeah :P
<ljarvis> thanks
<chris2> the shell drops the inner " again
<ljarvis> I didn't escape the inner "
<ljarvis> my bad
<ljarvis> works good, cheers
<chris2> and yeah, use the function idiom
<chris2> well, at least if you want to use the arguments
<chris2> not sure what that alias should do?
<ljarvis> yeah I don't here, but I use the function stuff elsewhere
<chris2> wouldnt the second commit be empty
<ljarvis> we have an internal private dependency and we often just bump the version of it in our Gemfile. We use a commit message like 'Bump foo@commit'; this adds an alias to grab the top level commit so it links on github
tomaz_b has quit [Ping timeout: 276 seconds]
<chris2> ah, the -C makes it commit a different repo. clever
<ljarvis> the -C /..
<ljarvis> yep..
<chris2> better subproject support for git would really be something
pshend has quit [Quit: pshend]
pshend has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
dorei has joined #ruby-lang
<bougyman> ljarvis: use !sh
lapide_viridi has joined #ruby-lang
<bougyman> http://dev.bougyman.com/gitconfig.txt see poh, pom, etc.
<bougyman> they all use !sh
dhjondoh has joined #ruby-lang
davispuh has joined #ruby-lang
<bougyman> ccl uses bash and captures vars
matp has quit [Remote host closed the connection]
lytol has joined #ruby-lang
enebo has joined #ruby-lang
<chris2> not sure what the benefit is?
* chris2 steals of few of bougyman's aliases
<yorickpeterse> oh hey, an API using JSON POSTs to get data out
<yorickpeterse> and it's mapped on top of an XML SOAP API
hahuang65 has joined #ruby-lang
<yorickpeterse> so it's basically JOAP
gregf_ has quit [Ping timeout: 256 seconds]
<yorickpeterse> or maybe SJOAP
<darix> yorickpeterse: people will always find more sadistic combinations
<yorickpeterse> at least it's not an asp.net form complete with a __VIEWSTATE__
lytol has quit [Ping timeout: 252 seconds]
adude has quit [Ping timeout: 265 seconds]
dhjondoh has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
yatish27 has joined #ruby-lang
kfpratt has joined #ruby-lang
tkuchiki has joined #ruby-lang
matp has joined #ruby-lang
gregf_ has joined #ruby-lang
LesZedCB has joined #ruby-lang
ruby-noob has joined #ruby-lang
iooner has quit [Ping timeout: 265 seconds]
adude has joined #ruby-lang
<bougyman> we started using barrister at the dayjob, it's not horrible.
<bougyman> JSON-RPC
kfpratt has quit [Remote host closed the connection]
lapide_viridi has quit [Quit: Leaving]
<bougyman> oh, plus IDL: http://barrister.bitmechanic.com/
<bougyman> can't leave out a buzzcronym.
<ruby-noob> When I do this `Time.new(2013, 10, 27, 1, 30).localtime.dst?` in Ruby 2.2.0 it returns false, but in Ruby 2.2.1 it returns true. I believe 2.2.0's behaviour is correct, or am I doing something wrong?
relix has joined #ruby-lang
<yorickpeterse> for 2.2.0 it returns true for me
<workmad3> returns false for me in 2.2.1 and 2.1.5
<chris2> depends on your time zone? :P
<ruby-noob> yorickpeterse: sorry, my apologies, i got them mixed up
<workmad3> which would be correct for my TZ
<ruby-noob> 2.2.1 returns false and 2.2.0 returns true
<chris2> 2.2.1 returns true here, and false for oct 29, so i guess it works
<yorickpeterse> I recall some Time stuff was changed around 2.2, so you might want to look at the release notes
<ruby-noob> in the UK, the time changed in October 2013 at 2am, so 2.2.0's behaviour (i believe) is true
<chris2> oh, you are right in the middle of the night
<ruby-noob> yorickpeterse: ok, thank you, i will investigate
<chris2> >> Time.new(2013, 10, 27, 1, 59).localtime.dst?
<eval-in> chris2 => false (https://eval.in/309343)
<chris2> => true
<chris2> >> Time.new(2013, 10, 27, 2, 00).localtime.dst?
<eval-in> chris2 => false (https://eval.in/309344)
<chris2> => false
<chris2> sounds good no?
setanta_ has joined #ruby-lang
setanta_ has quit [Client Quit]
<workmad3> ruby-noob: ah, it's actually an ambiguous time
roamingdog has quit [Remote host closed the connection]
setanta_ has joined #ruby-lang
<workmad3> ruby-noob: as in dst? could validly be true or false for it, due to 1:30a.m. being 'repeated' due to the hour shifting back by 1 for the TZ change
agarie has joined #ruby-lang
<ruby-noob> workmad3: ah yes, good point.
roamingdog has joined #ruby-lang
<ruby-noob> workmad3: so it could be that in the 2.2.0->2.2.1 update the behaviour has slightly changed as to which time (either the first or last occurrence) is selected
<workmad3> ruby-noob: well, it returns as non-dst for me in 2.1.5, 2.2.0 and 2.2.1, so I'd be hesitant to say it's a ruby behaviour change
charliesome has joined #ruby-lang
<workmad3> could be a slight difference in how ruby is working with a local tzdata install that causes a change in preferred TZ in that circumstance though
whippythellama has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
<ruby-noob> workmad3: sorry, `Time.new(2013, 10, 27, 1, 30).localtime.dst?` returned false for you in Ruby 2.2.0?
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
<workmad3> ruby-noob: hmm... one time I ran it in 2.2.0, it did, but now it's not... v. weird
<workmad3> I'm now suspicious that my ruby version switched back to 2.2.1 when I changed directory after switching...
<ruby-noob> workmad3: incidentally i have tzinfo 1.2.2 in both versions
<workmad3> but still... returns false in 2.0.0, 2.1.5 and 2.2.1
iooner has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
SylarRuby has quit [Remote host closed the connection]
LesZedCB has quit [Read error: Connection reset by peer]
SylarRuby has joined #ruby-lang
kfpratt has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby-lang
b_hoffman has joined #ruby-lang
tkuchiki has joined #ruby-lang
ledestin has joined #ruby-lang
ledestin has quit [Client Quit]
roamingdog has quit [Remote host closed the connection]
adude has quit [Ping timeout: 276 seconds]
LMity has joined #ruby-lang
Mark-6ma has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
chadwtaylor has joined #ruby-lang
malconis has quit [Ping timeout: 250 seconds]
malconis has joined #ruby-lang
bantic has joined #ruby-lang
charliesome has quit [Quit: zzz]
yatish27 has quit [Remote host closed the connection]
LMity has quit [Ping timeout: 250 seconds]
cengizIO has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby-lang
cpt_yossarian has quit [Ping timeout: 250 seconds]
zekriad has joined #ruby-lang
lytol has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
Mark-6ma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lytol has quit [Ping timeout: 256 seconds]
riotjones has quit [Remote host closed the connection]
Bertg has joined #ruby-lang
|jemc| has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
cengizIO has joined #ruby-lang
cengizIO has quit [Client Quit]
caseydriscoll has joined #ruby-lang
hahuang65 has joined #ruby-lang
slawrence00 has joined #ruby-lang
momomomomo has joined #ruby-lang
hahuang65 has quit [Ping timeout: 276 seconds]
cytoskeletor has quit [Ping timeout: 252 seconds]
Torrieri has joined #ruby-lang
jwaldrip has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
aeze has joined #ruby-lang
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bertg has joined #ruby-lang
pullphinger has joined #ruby-lang
pshend has quit [Quit: pshend]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pshend has joined #ruby-lang
lapide_viridi has joined #ruby-lang
rcvalle has joined #ruby-lang
pshend has quit [Client Quit]
pshend has joined #ruby-lang
agarie has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 240 seconds]
banister has joined #ruby-lang
symm- has joined #ruby-lang
slawrenc_ has joined #ruby-lang
hotpancakes has joined #ruby-lang
Mark-6ma has joined #ruby-lang
<hotpancakes> Hi, noob here. I was reading through some source and was wondering why the specified attr_reader is necessary. Here's the link: https://github.com/fastly/fastly-rails/blob/master/lib/fastly-rails.rb#L8
<hotpancakes> Any help?
riotjones has joined #ruby-lang
<ericwood> hotpancakes: so you can read those attributes
<ericwood> something includes that module --> you want to ensure whatever included it allows you to get those ivars out of it
<hotpancakes> ericwood: but isn't attr_reader just syntactic sugar in defining self.attribute?
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-noob has quit [Ping timeout: 246 seconds]
<workmad3> hotpancakes: no, it's syntactic sugar for 'def attribute' not 'def self.attribute'
riotjones has quit [Ping timeout: 244 seconds]
stan has quit [Ping timeout: 250 seconds]
<workmad3> which is actually a bit weird... that module doesn't look like it's intended as a mixin, so not sure why it's providing attr_reader for those two ivars
<workmad3> especially as it's not providing access to the ivars it creates...
<ericwood> they probably have something very specific in mind for its usage
<workmad3> ericwood: or it's completely unnecessary :P
<ericwood> also 100% possible, that module may have used to been a class
<workmad3> ah, the client and configuration methods used to be instance-level for a mixin: https://github.com/fastly/fastly-rails/blob/0ed794d0a7c588c72b49f333650e7ca9d6253c43/lib/fastly-rails.rb
<workmad3> still seems screwy to have them there though... I'd guess they were just holdovers that never got removed :)
<hotpancakes> Thanks for the help. Just seemed a bit confusing given the module bit.
quintinadam has joined #ruby-lang
<hotpancakes> I've never contributed to open source before. Is this worth submitting a pull request for?
b_hoffman has joined #ruby-lang
<workmad3> hotpancakes: go for it... either it'll be accepted and the codebase will be a bit cleaner, or you'll get the author's response on why that line is necessary ;)
intinig has quit [Remote host closed the connection]
<hotpancakes> workmad3: sweet. i'll give it a go.
_djbkd has joined #ruby-lang
intinig has joined #ruby-lang
<hotpancakes> workmad3: i'm just never sure whether or not something is too nitpicky. don't wanna be that guy...
wprice has joined #ruby-lang
<workmad3> hotpancakes: heh :) removing lines of code that are unclear and superfluous == fine, re-indenting the entire project because you disagree with it == too nitpicky ;)
hahuang65 has joined #ruby-lang
lytol has joined #ruby-lang
<hotpancakes> workmad3: gotcha :)
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
bantic has quit [Quit: bantic]
<workmad3> hotpancakes: btw, my statement comes with the following pre-amble: "The views expressed by this workmad3 are purely his own views. He cannot be held accountable if you submit a PR and get ignored or flamed. He cannot be held fiscally liable for any therapy charges you may then occur due to PTSD or related ailments" ;)
RobertBirnie has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
<hotpancakes> workmad3: noted ;)
<hotpancakes> workmad3: so again, total noob here. should I create a new branch on my forked copy, or just work on master?
shinnya has joined #ruby-lang
<workmad3> hotpancakes: if in doubt, I'd suggest using github-flow... so work on a branch in your fork and submit a PR from your fork to upstream master
michaeldeol has joined #ruby-lang
_djbkd has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby-lang
momomomomo has quit [Ping timeout: 256 seconds]
Torrieri has quit [Quit: Be back later ...]
<hotpancakes> workmad3: submitted! thanks for the help.
SylarRuby has quit [Remote host closed the connection]
agarie has joined #ruby-lang
Asher has quit [Ping timeout: 246 seconds]
kfpratt has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 250 seconds]
Asher has joined #ruby-lang
Asher has quit [Client Quit]
rikkipitt has quit [Remote host closed the connection]
pshend has quit [Quit: pshend]
lytol has quit [Remote host closed the connection]
Asher has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 256 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shazaum has joined #ruby-lang
skade has quit [Client Quit]
hotpancakes has joined #ruby-lang
Iskarlar has joined #ruby-lang
kfpratt has joined #ruby-lang
malconis has quit [Ping timeout: 276 seconds]
malconis has joined #ruby-lang
intinig has quit []
wallerdev has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
SylarRuby has joined #ruby-lang
lytol has joined #ruby-lang
workmad3 has quit [Ping timeout: 276 seconds]
shazaum has quit [Changing host]
shazaum has joined #ruby-lang
hahuang65 has joined #ruby-lang
sarkyniin has joined #ruby-lang
zekriad has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 250 seconds]
_djbkd has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby-lang
tsujp has quit [Read error: Connection reset by peer]
tsujp has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
b_hoffman has quit [Quit: b_hoffman]
dogsitr has joined #ruby-lang
hotpancakes has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
cornerma1 has joined #ruby-lang
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
cornerman has quit [Ping timeout: 248 seconds]
cornerma1 is now known as cornerman
cpt_yossarian has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 256 seconds]
stamina has quit [Quit: WeeChat 1.1.1]
ecnalyr has joined #ruby-lang
bantic has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
centrx has joined #ruby-lang
baweaver has joined #ruby-lang
rcvalle has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
bantic has quit [Client Quit]
<ecnalyr> I have an array of arrays (think key - > value pairs) and a an array of strings. I want to look through the array of arrays and return the 'values' where the 'key' matches any value from the array of strings. . . I keep trying things like long_list.select{|k,v| k.any? == short_list.any?} but can't seem to get it just right -- what am I doing wrong? (example: https://gist.github.com/ecnalyr/090827b3fb1e7a5b56
<ecnalyr> f6)
dogsitr has quit [Ping timeout: 250 seconds]
sandelius has joined #ruby-lang
bantic has joined #ruby-lang
postmodern has joined #ruby-lang
hahuang65 has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
<jhass> ecnalyr: short_list.map {|key| long_list.assoc(key) }
<ecnalyr> jhass assoc, neat. Thanks!
<jhass> one of the underused methods I guess ;)
aeze has quit [Quit: aeze]
_djbkd has joined #ruby-lang
<jhass> though the overhead of turning your nested array into a hash might be worth if it it's really huge
cytoskeletor has joined #ruby-lang
<jhass> ideally you would build it as a hash in the first place
__butch__ has joined #ruby-lang
b_hoffman has joined #ruby-lang
Zen-Zen has quit []
<ecnalyr> It's part of something used by an html form, it's very short (<10 elements) and it would be a big mess to hash it up.
<ecnalyr> :-/
<jhass> probably not ;)
piotrj has joined #ruby-lang
<jhass> one way would be calling .to_h on your array
<jhass> but not worth the extra allocation vs assoc in this case
<jhass> >> [[1, 2], [3, 4]].to_h
<eval-in> jhass => {1=>2, 3=>4} (https://eval.in/309411)
Mon_Ouie has joined #ruby-lang
caseydriscoll has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
caseydriscoll has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
yatish27 has joined #ruby-lang
hahuang65 has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
duderonomy has joined #ruby-lang
hahuang65 has joined #ruby-lang
rikkipitt has joined #ruby-lang
hotpancakes has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
arBmind has quit [Quit: Leaving.]
aeze has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
mcclurmc_ has joined #ruby-lang
begal-sop__ has quit [Ping timeout: 250 seconds]
mcclurmc has quit [Ping timeout: 250 seconds]
sankaber has quit [Ping timeout: 250 seconds]
xybre has quit [Ping timeout: 250 seconds]
bnagy has quit [Ping timeout: 250 seconds]
begal-sop__ has joined #ruby-lang
Iskarlar has joined #ruby-lang
Iskarlar has quit [Client Quit]
bnagy has joined #ruby-lang
baweaver has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
xybre has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chadwtaylor has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
chadwtaylor has joined #ruby-lang
dagda1_ has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
hotpancakes has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 264 seconds]
headius has quit [Quit: ZNC - http://znc.in]
ta_ has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agarie has joined #ruby-lang
mikecmpbll has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
piotrj has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
solars has joined #ruby-lang
ruby-lang380 has joined #ruby-lang
piotrj has joined #ruby-lang
ur5us has joined #ruby-lang
piotrj has quit [Client Quit]
ruby-lang380 has quit [Ping timeout: 246 seconds]
Mark-6ma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agarie has quit [Remote host closed the connection]
agarie has joined #ruby-lang
ruby-lang242 has joined #ruby-lang
yfeldblum has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 276 seconds]
ruby-lang242 has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby-lang
ironcamel has quit [Quit: leaving]
ta_ has quit [Remote host closed the connection]
ironcamel has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
yatish27 has quit []
kfpratt has joined #ruby-lang
sarkyniin has quit [Quit: Quit]
tkuchiki has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby-lang
ecnalyr has joined #ruby-lang
adude has joined #ruby-lang
_djbkd has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
pacharanero has quit [Remote host closed the connection]
_djbkd has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
headius has joined #ruby-lang
tsujp has quit [Quit: tsujp is snoozing]
baweaver has quit [Remote host closed the connection]
mustmodify_ has joined #ruby-lang
Iskarlar has joined #ruby-lang
<mustmodify_> Slightly OT but how do I match is|are without parenthesis, which would count as a match? I want to ignore but accommodate "is" or "are" as in "there is (\d*)" or "there are (\d*)"
<centrx> (?:is|are)
<centrx> (?:x)
<centrx> captureless group
<mustmodify_> perfect. Thanks.
b_hoffman has quit [Quit: b_hoffman]
ta_ has joined #ruby-lang
lytol has joined #ruby-lang
b_hoffman has joined #ruby-lang
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby-lang
baweaver has joined #ruby-lang
relix has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
malconis has quit [Read error: Connection reset by peer]
malconis has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
rcvalle has joined #ruby-lang
byprdct has joined #ruby-lang
cytoskeletor has joined #ruby-lang
ta_ has quit [Quit: Leaving...]
ta_ has joined #ruby-lang
ta_ has quit [Client Quit]
<hotpancakes> ecnalyr: not sure if anyone answered, but here's something quick and dirty: https://gist.github.com/sobbybutter/4f51d20b83bbe9a73b99
roamingdog has quit [Remote host closed the connection]
<ecnalyr> Ty, but I did get an answer :)
<ecnalyr> hotpancakes ^^
<hotpancakes> ecnalyr: gotcha
jwaldrip has quit [Quit: Be back later ...]
roamingdog has joined #ruby-lang
arBmind has joined #ruby-lang
lapide_viridi has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
lewix has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
dagda1_ has quit [Ping timeout: 265 seconds]
LMity has joined #ruby-lang
wallerdev has joined #ruby-lang
riotjones has joined #ruby-lang
dagda1 has joined #ruby-lang
SylarRuby has joined #ruby-lang
dagda1 has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 256 seconds]
dagda1 has joined #ruby-lang
baweaver has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
_djbkd has joined #ruby-lang
skade has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecnalyr has quit [Remote host closed the connection]
agarie has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
Iskarlar has joined #ruby-lang
LMity has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 250 seconds]
agarie has quit []
shazaum has quit [Quit: Leaving]
dellavg_ has quit [Ping timeout: 264 seconds]
ldnunes has quit [Quit: Leaving]
jwaldrip has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ta has quit [Quit: Leaving...]
malconis has quit [Ping timeout: 264 seconds]
lytol has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
malconis has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
ta has joined #ruby-lang
baweaver has joined #ruby-lang
ta has quit [Client Quit]
ta has joined #ruby-lang
pullphinger has quit []
hotpancakes has quit []
ruby-lang329 has joined #ruby-lang
<ruby-lang329> Hi, i'm starting with ruby, I know other oo languages (java, c++ and python) so most of it is familiar, but there is something I don't get
<ruby-lang329> In rails, I get the gem kamini, and of all of a sudden the Model has access to its methods, without referencing or importing anything
<ruby-lang329> how does that works?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
caseydriscoll has quit [Remote host closed the connection]
CamonZ has joined #ruby-lang
symm- has quit [Ping timeout: 244 seconds]
<CamonZ> hi, how can I do symbol -> to_proc with a class method
<jhass> got some pseudocode?
joaomdmoura has quit [Remote host closed the connection]
leat has quit [Ping timeout: 240 seconds]
b_hoffman has joined #ruby-lang
<centrx> ruby-lang329, If you're using bundler, it imports the libraries in your bundle for you
<mustmodify_> ruby-lang329: that happens alot. If you give us the method names and the gems you're using, we can probably explain more.
<CamonZ> nah, was also trying to send a message to the wrong object
<CamonZ> :(
musl has quit [Quit: WeeChat 1.1.1]
ruby-lang860 has joined #ruby-lang
<ruby-lang860> hello
<centrx> hi
momomomomo has joined #ruby-lang
<ruby-lang329> Yes i'm using bundler, but still cant' see the relation. So there is a class call Article, and then I use bundle to install the gem Kaminari
<ruby-lang329> and then the class Article can call all the methos in kaminari such as Article.page
<ruby-lang860> I don`t know if here is a good place, but i don`t know how to do something, so i come here maybe i will find somebody that can help me
<ruby-lang329> but Article does not reference Kaminiari anywhere
<centrx> I assume Kaminari attaches methods to ActiveRecord::Base
<zenspider> bundler autorequires the a file with the same name as the gem. it's annoyingly stupid and errorprone
<centrx> then they become accessible to all ActiveRecord model
<ruby-lang860> I want to download all the court files from the ministry of justice in Romania, and they only have them via SOAP , a friend of mine did a code for me, but i want it to extent it, to get more info, like the name of the plaintiff
<centrx> No one expects the Romanian Ministry of Justice!
<ruby-lang860> To so data visualization and statistics
<ruby-lang329> so, a gem can attach dynamically attach methods to an existing class?
symm- has joined #ruby-lang
<ruby-lang860> i am not from the ministry, i just like to do statistics and play with big datasets
<mustmodify_> ruby-lang860: yes.
sgambino has quit [Remote host closed the connection]
sankaber has joined #ruby-lang
<centrx> Maybe the first thing ruby-lang860 and ruby-lang329 can do is change their nicknames to be more unique
<mustmodify_> lol
<ruby-lang860> i don`t know how
lewix has quit [Remote host closed the connection]
<centrx> ruby-lang329, A gem can do anything a regular library can do, and one of the features of Ruby is being able to "open up" a class/module and add or override methods on it
* ruby-lang860
<zenspider> having two ruby-lang### talking at the same time isn't confusing AT ALL
ruby-lang860 is now known as BaditaFlorin
<BaditaFlorin> yey, i remembered
<centrx> BaditaFlorin, Find the API documentation for the MOJ API, or look at the responses you're already getting to see if the plaintiff is in there
musl has joined #ruby-lang
<BaditaFlorin> in the original request there is, but the script that my friend did, using savon, does not get that data
<mustmodify_> BaditaFlorin: is this code on github or somewhere we can see it?
mustmodify_ is now known as mustmodify
michaeldeol has quit [Read error: Connection reset by peer]
<mustmodify> hooray, no underscore.
michaeldeol has joined #ruby-lang
<centrx> Amazing, how did you do that
<mustmodify> IRC magic. It's like ruby magic but with less meta.
bennyklotz has quit [Ping timeout: 250 seconds]
b_hoffman has quit [Quit: b_hoffman]
<BaditaFlorin> and the institutii.txt is like this http://pastebin.com/J9maLgaY
chouhoulis has quit [Ping timeout: 272 seconds]
joaomdmoura has joined #ruby-lang
bennyklotz has joined #ruby-lang
<BaditaFlorin> And now i try to add to the csv more info from the server, like the [:dosarparte] and dosarsedinta
<mustmodify> centrx: IRC magic. It's like ruby magic but with less meta.
<centrx> WHOA THAT IS INCREDIBLE
<centrx> >> def modify(s); s.chomp; end; modify('mustmodify_')
<eval-in> centrx => "mustmodify_" (https://eval.in/309649)
<centrx> thus ends my Ruby career
<ruby-lang329> ok, i get it now, thanks for the help
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang329> bye!
ruby-lang329 has quit [Quit: Page closed]
<mustmodify> centrx: because you failed to remove the underscore?
<centrx> I'm a Ruby/IRC failure, must modify but cannot
davispuh has quit [Ping timeout: 250 seconds]
shinnya has joined #ruby-lang
duderonomy has joined #ruby-lang
<centrx> >> def modify(s); s.chop; end; modify('mustmodify_')
<eval-in> centrx => "mustmodify" (https://eval.in/309657)
<mustmodify> centrx: #true
byprdct has quit [Read error: Connection reset by peer]
rikkipitt has quit [Remote host closed the connection]
whippythellama has quit [Quit: whippythellama]
cytoskeletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
setanta_ has quit [Quit: Leaving]
joaomdmoura has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
aeze has quit [Ping timeout: 265 seconds]
_djbkd has joined #ruby-lang
marr has quit []
riotjones has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
duderonomy has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby-lang
bantic has quit [Quit: bantic]
enebo has quit [Quit: enebo]
BaditaFlorin has quit [Ping timeout: 246 seconds]
caseydriscoll has joined #ruby-lang
Zen-Zen has joined #ruby-lang
charliesome has joined #ruby-lang
<Zen-Zen> I am trying to access a class from another class (newbie here) and not having any luck. https://gist.github.com/CafeFerguson/e6bf94837224a15a68d5
<Zen-Zen> I want to use def createWeapon() to access class Weapon....
<centrx> Zen-Zen, That should work what you have there
<centrx> weapon = Weapon.random_weapon()
<centrx> def Weapon.random_weapon()
<centrx> typically the class method is defined with def self.random_weapon, but it should work with the class name Weapon
<Zen-Zen> getting an undefined method error
<xybre> Weapon.create_weapon is unneeded, also its not a method
baweaver has joined #ruby-lang
<xybre> Is like 29 erroring?
<Zen-Zen> yeah 30
<Zen-Zen> might be copy to github extra line
brushbox has joined #ruby-lang
<xybre> When I run it line 85 is the one that gives me an error
<xybre> Oh sorry I see :D
<xybre> Line 23 createWeapon
<xybre> Because createWeapon is an instance method
<xybre> While create_warrioer is a class methods
<xybre> Different scope
<Zen-Zen> yes there are 2 errors... one up top and one below. Byt when I edit out the creatWeapon() everything runs ok...
<xybre> You cannot directly access instance methods from class methods, until you instantiate the class
workmad3 has quit [Ping timeout: 244 seconds]
<Zen-Zen> I seee... I changed it to self. and I got a new error to work on.... thanks for the assists!
<xybre> The instance methods of a class are just a template for what would be created when you instantiate it (with its "new" method).
<Zen-Zen> thx xybre that makes sense.
CamonZ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mustmodify has left #ruby-lang [#ruby-lang]
<xybre> Zen-Zen: You could also remove the "self" from create_warrior and instead on line 85 call Viking.new.create_warrior
jds has quit [Quit: Connection closed for inactivity]
_djbkd has quit [Remote host closed the connection]
<xybre> You can remove your initialize method, since it is not needed, and change "age" to "@age", "health" to "@health" etc in create_warrior.
_djbkd has joined #ruby-lang
chadwtaylor has quit [Remote host closed the connection]
hal_9000_ has quit [Quit: hal_9000_]
<xybre> I'd recommend sticking with instance methods when starting out.
chadwtaylor has joined #ruby-lang
<Zen-Zen> I definitely want to keep it siple at first, thnks for the advice.
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
davispuh has joined #ruby-lang
<zenspider> please use 2 spaces per indent, PROPERLY (and consistently) indent your code, and don't use CamelCase for methods or ivars
AlexAltea has joined #ruby-lang
SylarRuby has quit []
chadwtaylor has quit [Ping timeout: 265 seconds]
<xybre> If you name your gist files with .rb they will also be properly syntax highlighted which will be easier to read. :)
jefus__ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
jefus__ is now known as jefus
quintinadam has quit [Ping timeout: 245 seconds]
jefus_ has quit [Ping timeout: 252 seconds]
makepkgnotwar has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 240 seconds]
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo has joined #ruby-lang
chouhoulis has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
havenwood has joined #ruby-lang
michael_mbp has joined #ruby-lang
enebo has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
enebo has quit [Client Quit]
cpt_yossarian has quit [Quit: And then he took off.]
arBmind1 has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
CamonZ has joined #ruby-lang
arBmind has quit [Ping timeout: 244 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
postmodern has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 252 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
charliesome has quit [Quit: zzz]
michaeldeol has joined #ruby-lang
charliesome has joined #ruby-lang
lewix has joined #ruby-lang