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
<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
<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
<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]
<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]
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
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
<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
<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]
<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>
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
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]
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