<dr_toboggan>
epitron: i got my matching code working, line 140 is something i want to match, and line 153 should successfully match, while line 166 doesn't match
ghr has quit [Read error: Connection reset by peer]
agrinb_ has quit [Remote host closed the connection]
ghr has joined #ruby
Wolland has joined #ruby
<insaneinside>
havenwood: you *really* think that's a good idea?
<insaneinside>
:P
Avahey has joined #ruby
asteros has quit [Quit: asteros]
Wolland__ has joined #ruby
hamakn has quit [Remote host closed the connection]
sanguisdex has joined #ruby
zz_jrhorn424 is now known as jrhorn424
hamakn has joined #ruby
emanu has quit [Quit: emanu]
Wolland_ has quit [Ping timeout: 240 seconds]
<Nilium>
Whenever anyone emails me about using OpenGL in Ruby, they're always asking me questions about stuff that's been deprecated or considered legacy for like.. years. Many years.
ValicekB has quit [Ping timeout: 260 seconds]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Nilium>
Which isn't really their fault, it's more that nobody writes new tutorials for OpenGL, and nobody just reads the docs 'cause they're useless if you don't already know what you're doing.
benzrf is now known as benzrf|offline
kenneth has joined #ruby
dev_ryan has joined #ruby
lampd1 has quit []
<insaneinside>
I tried learning about *modern* OpenGL about a year ago. I wanted to draw wireframes (application-specific thing...), but the docs said I had to write vertex and fragment shaders.
Wolland has quit [Ping timeout: 272 seconds]
<insaneinside>
Nope.
<dr_toboggan>
insaneinside: yeah, that drives me nuts
aspires has joined #ruby
benzrf|offline is now known as benzrf
<insaneinside>
dr_toboggan: what, the shaders?
<dr_toboggan>
insaneinside: modern opengl
hamakn has quit [Ping timeout: 272 seconds]
<dr_toboggan>
well, heh, i also don't have the time to get into it nowadays. i've got other stuff to do
klaut has quit [Remote host closed the connection]
dev_ryan has quit [Client Quit]
<insaneinside>
i'm the sort of person who will upgrade to the latest and greatest because i'd rather learn new things when they really *are* new
TorpedoSkyline has joined #ruby
<dr_toboggan>
eh, there's lots of solid, existing systems out there. there's a tradeoff between getting my professional work done, and being completely bleeding edge on everything
jhass is now known as jhass|off
havenwood has quit [Remote host closed the connection]
pwh has quit []
volty has quit [Quit: Konversation terminated!]
pwh has joined #ruby
dx7 has joined #ruby
TorpedoSkyline has quit [Client Quit]
phao has left #ruby ["Leaving"]
tbrock_ has quit [Remote host closed the connection]
D9 has quit [Quit: Leaving]
jonmorehouse has joined #ruby
ValicekB has joined #ruby
tbrock_ has joined #ruby
tyll_ has joined #ruby
krisquigley has joined #ruby
hamakn has joined #ruby
oleo__ has joined #ruby
oleo is now known as Guest49063
reset has quit [Quit: Leaving...]
reset has joined #ruby
tyll has quit [Ping timeout: 272 seconds]
Scotteh has quit [Ping timeout: 245 seconds]
cpruitt has joined #ruby
slester has joined #ruby
yetanoth1rdave has quit [Ping timeout: 245 seconds]
yetanotherdave has quit [Ping timeout: 260 seconds]
Guest49063 has quit [Ping timeout: 240 seconds]
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
<dr_toboggan>
epitron: er, this is the url: https://paste.ee/p/ppm6z (because i'm taking down the gist paste)
krisquigley has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
fandi has joined #ruby
chouchen has quit [Ping timeout: 260 seconds]
reset has quit [Ping timeout: 258 seconds]
TorpedoSkyline has joined #ruby
slbmeh has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
pwh has quit []
skolman has joined #ruby
pwh has joined #ruby
skammer3 has joined #ruby
slester has quit [Quit: Quitte]
emocakes has quit []
slester has joined #ruby
agrinb has joined #ruby
emocakes has joined #ruby
asteros has joined #ruby
sanguisdex has quit [Ping timeout: 272 seconds]
skammer3 has quit [Ping timeout: 245 seconds]
geggam has quit [Ping timeout: 245 seconds]
jonmorehouse has quit [Ping timeout: 272 seconds]
omosoj has joined #ruby
radic has quit [Disconnected by services]
Spami has quit [Quit: This computer has gone to sleep]
radic_ has joined #ruby
jonmorehouse has joined #ruby
justinmburrous has joined #ruby
lw has joined #ruby
yokel has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
emocakes__ has joined #ruby
pwh has quit []
emocakes has quit [Ping timeout: 245 seconds]
ARCADIVS has quit [Quit: WeeChat 0.4.3]
pwh has joined #ruby
fgo has joined #ruby
tectonic has joined #ruby
otakbeku has joined #ruby
Spami has joined #ruby
bmurt has quit []
jonmorehouse has quit [Ping timeout: 260 seconds]
davasaurous has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
yokel has joined #ruby
jrhorn424 is now known as zz_jrhorn424
insaneinside has left #ruby ["bye bye"]
maestrojed has quit [Quit: Computer has gone to sleep.]
endash has quit [Quit: endash]
cpruitt has quit [Quit: cpruitt]
bricker`LA has quit [Ping timeout: 272 seconds]
bryanculver has joined #ruby
endash has joined #ruby
aspires has quit []
devdazed has joined #ruby
pwh has quit []
pwh has joined #ruby
coderdad has joined #ruby
coderdad has quit [Remote host closed the connection]
otakbeku has quit [Ping timeout: 260 seconds]
tbrock_ has quit [Quit: Computer has gone to sleep.]
fgo has joined #ruby
jonmorehouse has joined #ruby
Wolland__ has quit []
p0sixpscl has joined #ruby
BTRE has joined #ruby
endash has quit [Quit: endash]
iliketurtles has joined #ruby
bmurt has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
coderdad has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
dte has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
freerobby has joined #ruby
Vile` has quit [Remote host closed the connection]
paulfm has joined #ruby
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
jonmorehouse has quit [Ping timeout: 260 seconds]
pwh has quit []
pwh has joined #ruby
bmurt has quit []
Vile` has joined #ruby
Musashi007 has quit [Quit: Musashi007]
lw has quit [Read error: Connection reset by peer]
evvel2_ has joined #ruby
lw has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<evvel2_>
Hi all, have a newbie question, im using trollop to get options from the command line and i have a definition that I want to pass the options to. Since trollop creates a hash, how do I pass a hash into a definition?
arup_r has joined #ruby
agrinb has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
Takle has joined #ruby
braincrash has quit [Quit: bye bye]
mpistone has joined #ruby
benzrf is now known as benzrf|offline
slester has quit [Ping timeout: 240 seconds]
yetanotherdave has joined #ruby
rubyonrailed has joined #ruby
SixshooterLady has joined #ruby
bricker`LA has joined #ruby
<SixshooterLady>
hi bricker
braincrash has joined #ruby
Takle has quit [Ping timeout: 272 seconds]
<SixshooterLady>
hi brain
<tmoore>
evvel2_: what do you mean by "a definition"? Do you have a code example?
deric_skibotn has quit [Ping timeout: 244 seconds]
nsxt has joined #ruby
<SixshooterLady>
hi nsxt
<nsxt>
SixshooterLady: hi
<nsxt>
SixshooterLady: was not expecting a greeting :)
Kricir has joined #ruby
<SixshooterLady>
well, i tend to be friendly :)
justinmburrous has quit [Remote host closed the connection]
<nsxt>
SixshooterLady: thanks... quite nice of you! i was going to wait before asking anything to see if anyone was around. seems quiet now...
skammer3 has joined #ruby
<SixshooterLady>
hi skammer
<nsxt>
maybe you can help though?
justinmburrous has joined #ruby
<SixshooterLady>
yeah, someone asked a question earlier, but i've not seen a response
<SixshooterLady>
hi justin
<nsxt>
i'm looking for a lib (likely a very lightweight parser) which will help me parse a string like this: "test{{ctrl+v}}me" into something like [[:string, "test"], [:interpolation, "ctrl+v"], [:string, "me"]]
<nsxt>
mustache comes _really_ close, but it doesn't allow for "+" characters inside the tags
<SixshooterLady>
whoa...you lost me there, dude...i am not a programmer by any means :)
pwh has quit []
<evvel2_>
tmoore: Ive figured it out, was being a bone head
<dr_toboggan>
nsxt: might end up having to use regular expressions
pwh has joined #ruby
<nsxt>
dr_toboggan: Sure, I was thinking that, but I'm unaware of any method that will sort out matches/non-matches (presuming that the regex is targeting what's inside the "{{ }}")
<SixshooterLady>
hi pwh
<SixshooterLady>
yeah, i was thinking that, too ;)
<nsxt>
also, order is important, as i'll need to reconstruct the string
jontmorehouse has joined #ruby
justinmburrous has quit [Read error: No route to host]
zakiazigazi has joined #ruby
<SixshooterLady>
hi jont
skammer3 has quit [Ping timeout: 244 seconds]
<SixshooterLady>
hi zak
justinmburrous has joined #ruby
<dr_toboggan>
nsxt: you should try to match the first set of {{ , then with the remainder, try to match off the second set of }}
<SixshooterLady>
last time i reconstructed the string was when i was trying to crochet an afghan
<sevenseacat>
that isnt going to get really annoying in a hurry
p0sixpscl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dr_toboggan>
shouldn't be too hard, but it'll depend on what you expect
<dr_toboggan>
like would " {{ " throw an error or would you just pass that string through unscathed?
omosoj has quit [Quit: leaving]
<nsxt>
should pass through unscathed because there's no matching closing delimiters
iliketurtles has quit [Quit: zzzzz…..]
<nsxt>
sevenseacat: yeah, that's my worry, that regex is just going to turn into a nightmare. also.. i'll need to support "literal" double braces as well...
<dr_toboggan>
oh, how would that be represented?
zakiazigazi has quit [Client Quit]
<nsxt>
dr_toboggan: not sure just yet... haven't thought it through entirely. my guess is that it'd be something like "\{{"
<SixshooterLady>
multicolored yarn
<dr_toboggan>
oh
chouchen has joined #ruby
<SixshooterLady>
hi chouchen
paulfm has quit []
Blizzy has quit [Quit: Java loves to Stack Overflow]
<nsxt>
SixshooterLady: how'd you end up on freenode?
<havenwood>
SixshooterLady: give it a try ^
<SixshooterLady>
ok :)
sevenseacat is now known as Karpah
lampd1 has joined #ruby
GinoMan has quit [Ping timeout: 272 seconds]
<SixshooterLady>
i ended up on freenode because I tried the undernet, where i used to go years ago and nobody would talk to me in any channels...i googled IRC wondering what has happened in the years since i've been on here...i read that freenode was the leading server now...so i got on...i saw a lot of people in ruby so i joined....LOL...color me dumb
devdazed has joined #ruby
<nsxt>
SixshooterLady: haha, interesting.
wjimenez5271 has quit [Remote host closed the connection]
<nsxt>
SixshooterLady: maybe it's a happy accident? maybe you'll become a Ruby prodigy
<SixshooterLady>
matusmoto :)
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
koderok has joined #ruby
<SixshooterLady>
hi koder
devdazed has quit [Client Quit]
pwh has quit []
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<SixshooterLady>
not sure about that...i'm retired
pwh has joined #ruby
<nsxt>
SixshooterLady: never too late to learn
justinmburrous has quit [Remote host closed the connection]
<SixshooterLady>
oh, i agree...i'm just not sure programming is really my passion
terrellt has quit [Ping timeout: 260 seconds]
justinmburrous has joined #ruby
rubyonrailed has quit [Remote host closed the connection]
<havenwood>
SixshooterLady: we have foxes and chunky bacon, unicorn and rainbows. give it a try.
neonixcoder has quit [Quit: Leaving.]
<SixshooterLady>
LOL
justinmburrous has quit [Read error: No route to host]
<epitron>
i see example json objects, but i don't see any example specs
pwh_ has joined #ruby
pwh_____ has quit [Ping timeout: 244 seconds]
<epitron>
o_O
<epitron>
so these are regexes?
<dr_toboggan>
yeah
<epitron>
btw, cdr would be faster if it was z[1..-1]
<dr_toboggan>
i find text regexes to be annoying because the syntax is super specific. single characters can mean the difference
<epitron>
instead of dup; pop
<epitron>
err, dup;shift
<dr_toboggan>
epitron: does that make a separate copy? that's why i went with dup, i wasn't sure
<epitron>
yep
<dr_toboggan>
ah, ok
pwh___ has quit [Ping timeout: 250 seconds]
<epitron>
things that don't make a copy are assignment (z[1..5] = [x]) and things that end in !
pwh__ has quit [Ping timeout: 272 seconds]
pwh_____ has joined #ruby
<epitron>
like z.map!
<dr_toboggan>
yeah, that makes sense
<dr_toboggan>
i like languages with more liberal rules about what can be in identifiers
<epitron>
i almost never mutate arrays
<dr_toboggan>
yeah
rshetty has quit [Remote host closed the connection]
Interpolex has quit []
<epitron>
sometimes pop is handy though
GinoMan has joined #ruby
pwh__ has joined #ruby
pwh__ has quit [Client Quit]
<epitron>
cons can work the same too: def cons(ncar, tail); [ncar] + tail; end
jusmyth has joined #ruby
pwh__ has joined #ruby
<dr_toboggan>
ok
justinmburrous has joined #ruby
<epitron>
so :seq is concatenation?
<dr_toboggan>
yeah
<epitron>
i see
<dr_toboggan>
[:seq, 3, 4, 5] matches [3, 4, 5]
clauswitt has joined #ruby
<dr_toboggan>
not [3, 4] nor [3, 4, 5, 6]
pwh has quit [Ping timeout: 272 seconds]
pwh___ has joined #ruby
<epitron>
yep
pwh_ has quit [Ping timeout: 260 seconds]
<epitron>
i'm predicting this will be a bit slow
<epitron>
i hope it doesn't need to serve a lot of requests per second
pwh has joined #ruby
<dr_toboggan>
yeah? what about it specifically would be slow?
<epitron>
implementing lisp in ruby :)
<epitron>
lisp lists are designed to have the head popped off
<epitron>
ruby lists are designed to have the tail popped off
pwh_____ has quit [Ping timeout: 250 seconds]
<dr_toboggan>
oh, really? huh
pwh_ has joined #ruby
<epitron>
that's why popping off the head is called "shift" -- because it copies everything to the left by one element
<epitron>
just slicing the list will save you an extra copying of the whole list
<epitron>
(compared to dup; shift)
<dr_toboggan>
well, if that because too bad a problem, i can flip all the lists before i hand it off to the function, and rewrite car, cdr, and cons to do the reverse
<dr_toboggan>
hell, if it's too much a problem, i can verify the data before it gets to the ruby process
<dr_toboggan>
i've got lots of options
<epitron>
it might not be a big problem
<epitron>
and i'm guessing you're not doing thousands of requests per second
pwh____ has joined #ruby
<dr_toboggan>
i'd tell my boss to let me use lisp or to find someone else, in that case
<dr_toboggan>
heh
<epitron>
sure, just shell out to a lisp interpreter
pwh__ has quit [Ping timeout: 246 seconds]
<epitron>
bam!
<dr_toboggan>
epitron: nah, i use a lisp that compiles to C
davasaur_ has quit [Remote host closed the connection]
<epitron>
or that :)
<epitron>
so what do your specs look like?
<epitron>
i'm still not sure how they work
pwh__ has joined #ruby
pwh__ has quit [Client Quit]
<dr_toboggan>
epitron: oh, did you see the end of the paste i gave you?
<dr_toboggan>
let me find that
<epitron>
those are example json blobs
pwh___ has quit [Ping timeout: 260 seconds]
<epitron>
ohhh
<dr_toboggan>
yep
<epitron>
sorry, the first one is a spec
<epitron>
i see
<dr_toboggan>
yeah
HelperW__ has joined #ruby
pwh__ has joined #ruby
rshetty has joined #ruby
<dr_toboggan>
and i can define elements piecemeal, so i can have a variable of the languages we support
pwh has quit [Ping timeout: 244 seconds]
<dr_toboggan>
languages = [:or, 'en', 'ru']
<dr_toboggan>
and have all the calls incorporate languages
<dr_toboggan>
etc
<dr_toboggan>
(er, all the call specs)
pwh has joined #ruby
pwh_ has quit [Ping timeout: 246 seconds]
pwh_ has joined #ruby
Channel6 has quit [Quit: Leaving]
pwh____ has quit [Ping timeout: 245 seconds]
pwh___ has joined #ruby
pwh___ has quit [Client Quit]
davasaurous has joined #ruby
pwh___ has joined #ruby
pwh___ has quit [Client Quit]
pwh__ has quit [Ping timeout: 260 seconds]
jimmyy has joined #ruby
HelperW__ has quit [Ping timeout: 246 seconds]
Musashi007_ has joined #ruby
pwh__ has joined #ruby
Musashi007 has quit [Read error: Connection reset by peer]
justinmburrous has quit [Remote host closed the connection]
<dr_toboggan>
epitron: hmm, i don't think this fits with my goals. like i'll have more complicated specs later
pwh has quit [Ping timeout: 260 seconds]
<epitron>
you can do that too
<epitron>
just make classes
<epitron>
DSL, baby!
lampd1 has quit [Remote host closed the connection]
pwh_ has quit [Ping timeout: 250 seconds]
pwh has joined #ruby
<epitron>
in the case statement, you can have "when Star"
<epitron>
then just make a "star" method
jasooon has quit [Ping timeout: 260 seconds]
<dr_toboggan>
yeah, i was looking into that solution first
Suchit has quit [Read error: Connection reset by peer]
<epitron>
have it return a class
Suchit_ has joined #ruby
<dr_toboggan>
yeah
<epitron>
spec = { "hello" => star("what") }
<epitron>
i dunno what you'd want to repeat
pwh___ has quit [Ping timeout: 240 seconds]
pwh_ has joined #ruby
<epitron>
did you want to glob on the keys?
<epitron>
you can use regexes for the keys
<dr_toboggan>
epitron: well, star only makes sense in the sense of a sequence
<epitron>
spec = { /^h(i|ello)$/ => String }
<dr_toboggan>
but yeah, that could work
pwh__ has joined #ruby
<dr_toboggan>
nah, i'm only going to be matching literal strings in those situations
<epitron>
what would you want to repeat though
<epitron>
the values?
robustus has quit [Ping timeout: 255 seconds]
pwh____ has quit [Ping timeout: 272 seconds]
<epitron>
spec = { "times" => repeat(time()) } ?
pwh___ has joined #ruby
pwh___ has quit [Client Quit]
<dr_toboggan>
hmm, actually, i don't know how i'd handle repeat with arrays
pwh_____ has quit [Ping timeout: 272 seconds]
<epitron>
methods that return objects that match things would be elegant
<dr_toboggan>
i'll need to figure that out
<dr_toboggan>
that's just a syntactic/stylistic difference, compared to symbols, right?
Karpah is now known as sevenseacat
<epitron>
Repeat(TimeMatcher)
endash has joined #ruby
<epitron>
TimeMatcher could just have a .match method
pwh___ has joined #ruby
<epitron>
you could have a whole slew of objects with .match methods
dx7 has quit [Remote host closed the connection]
<epitron>
then the main spec matcher would just run the match of whatever object it got
<dr_toboggan>
epitron: tried that at first, but i screwed up the theory
<epitron>
nice and simple
<epitron>
ah
<dr_toboggan>
so i had to sit down and relearn it (and wrote that version in scheme, just to make sure i understood it)
dx7 has joined #ruby
baroquebobcat has joined #ruby
pwh has quit [Ping timeout: 245 seconds]
<dr_toboggan>
i don't know, if i had infinite time to make a perfect project on this, in ruby
<dr_toboggan>
sure, i'd do it
pwh has joined #ruby
<epitron>
this doesn't seem as complicated as you're making it
<dr_toboggan>
but unless there are performance implications, i'm probably done with this piece of code
<epitron>
all this regex stuff :)
<epitron>
but don't you want to get better at ruby!
<epitron>
:D
<dr_toboggan>
oh you~~~
<epitron>
do it for YOU!
pwh____ has joined #ruby
pwh____ has quit [Client Quit]
pwh_ has quit [Ping timeout: 272 seconds]
pwh__ has quit [Ping timeout: 240 seconds]
mattmcclure has quit [Quit: Connection closed for inactivity]
<dr_toboggan>
ok, so, i'd have sub structures, and there could be any one of them, repeated
<dr_toboggan>
or something
pwh_ has joined #ruby
<dr_toboggan>
it's hard to explain without examples
<epitron>
you want to repeat down branches of a tree?
<epitron>
recursive repetition?
<dr_toboggan>
something like that
<epitron>
or you just want to repeat the child element?
neonixcoder has quit [Quit: Leaving.]
pwh__ has joined #ruby
<epitron>
oh, i get it
bluOxigen has joined #ruby
<epitron>
yeah, i've seen json with a lot of repeated things like that
zorak8 has quit [Ping timeout: 272 seconds]
<dr_toboggan>
i'd give you examples, but i'm not sure what stuff i can/can't copy and paste from my employers document
<epitron>
so you want to match an array of hashes, all of which have the same structure in them
<epitron>
it's okay :)
<epitron>
it's just parsing json stuff
<epitron>
i think i get the idea
pwh____ has joined #ruby
pwh___ has quit [Ping timeout: 272 seconds]
pwh____ has quit [Client Quit]
sinequanon has joined #ruby
dx7 has quit [Ping timeout: 260 seconds]
pwh has quit [Ping timeout: 245 seconds]
pwh has joined #ruby
<epitron>
you could actually generate the spec with some methods, instead of just making it a hash
pwh___ has joined #ruby
<epitron>
objects that match these things would be sweet tho
teddyp1cker has joined #ruby
<dr_toboggan>
well, i started out with HashMatcher and it had a .match function, stuff like that
pwh_ has quit [Ping timeout: 245 seconds]
<epitron>
spec("a bunch of the same struct repeated" => repeat(name: String, age: Integer))
pwh_ has joined #ruby
neonixcoder has joined #ruby
pwh_ has quit [Client Quit]
<dr_toboggan>
i tried like twice to make the oop approach, and i realized i misunderstood the theory
<epitron>
HashMatcher is just a matcher
<dr_toboggan>
yeah
pwh__ has quit [Ping timeout: 250 seconds]
<dr_toboggan>
there'd be matchers of the different types...
<epitron>
i mean, hash is the default thing :)
<epitron>
ok, ok
slester has quit [Ping timeout: 240 seconds]
<dr_toboggan>
i don't remember now
pwh_ has joined #ruby
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron>
so yeah.. i'm thinking that spec( ... hash params ... ) would return a Spec object, and you could then spec.check(example)
pwh__ has joined #ruby
<dr_toboggan>
well, i actually didn't think about a hash object be the root object while writing the code
<epitron>
and if any of the values had a .match method, it would run that on the example's values
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coderdad has joined #ruby
<epitron>
otherwise it would compare the class type
<epitron>
someone must've written this already :)
<epitron>
this seems like something a lot of people would need
pwh____ has joined #ruby
<dr_toboggan>
well, there's the difference between arrays and sequences. there could be literal arrays and there could be sequences, generated by :* or :or
pwh____ has quit [Client Quit]
pwh has quit [Ping timeout: 258 seconds]
<epitron>
that could just be another object
pwh___ has quit [Ping timeout: 250 seconds]
<epitron>
seq(spec(blah), spec(otherthings))
tlarevo has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
pwh has joined #ruby
<epitron>
returns a SeqMatcher with two specs in it
txdv has joined #ruby
<epitron>
and that gets passed the value from example
starkhalo has quit [Ping timeout: 272 seconds]
pwh___ has joined #ruby
<epitron>
repeat(spec(name: String, age: Integer)) would be better than what i wrote before
clauswitt has joined #ruby
skammer3 has joined #ruby
<dr_toboggan>
yeah
pwh_ has quit [Ping timeout: 240 seconds]
<epitron>
you could use procs instead of objects i think
pwh____ has joined #ruby
clauswitt has quit [Client Quit]
teddyp1cker has joined #ruby
<epitron>
since all the object is really doing is being a wrapper for a single method called match
<epitron>
you could just check if the thing is a proc and call it
pwh_ has joined #ruby
<epitron>
then all your special matcer types would be procs
skolman has quit [Remote host closed the connection]
pwh_____ has joined #ruby
<dr_toboggan>
right
<epitron>
saves a lot of typing :)
jontmorehouse has quit [Ping timeout: 260 seconds]
skolman_ has joined #ruby
pwh__ has joined #ruby
<dr_toboggan>
well, i think i'm done for the night
<epitron>
meee tooo
<dr_toboggan>
gonna get stoned and have some pizza
<dr_toboggan>
goodnight
<epitron>
lol
<epitron>
you're going to forget everything i just said
dx7 has joined #ruby
<dr_toboggan>
it's in the logs...
<dr_toboggan>
:)
pwh has quit [Ping timeout: 246 seconds]
<epitron>
ok!
neonixcoder has quit [Quit: Leaving.]
pwh______ has joined #ruby
t_mmyv has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<epitron>
*enjoy* the *sauce*
pwh___ has quit [Ping timeout: 250 seconds]
GinoMan has quit [Ping timeout: 272 seconds]
skammer3 has quit [Ping timeout: 244 seconds]
pwh____ has quit [Ping timeout: 260 seconds]
pwh has joined #ruby
pwh_ has quit [Ping timeout: 245 seconds]
msx has quit [Quit: WeeChat 1.0.1]
pwh_ has joined #ruby
pwh_____ has quit [Ping timeout: 260 seconds]
pwh___ has joined #ruby
skolman_ has quit [Ping timeout: 272 seconds]
pwh__ has quit [Ping timeout: 244 seconds]
davedev24_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
pwh__ has joined #ruby
pwh______ has quit [Ping timeout: 240 seconds]
davedev24_ has joined #ruby
pwh____ has joined #ruby
dawkirst has joined #ruby
jasooon has joined #ruby
pwh_____ has joined #ruby
pwh_____ has quit [Client Quit]
pwh has quit [Ping timeout: 272 seconds]
JohnBat26 has joined #ruby
pwh_ has quit [Ping timeout: 245 seconds]
pwh has joined #ruby
pwh_ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
pwh___ has quit [Ping timeout: 272 seconds]
pwh___ has joined #ruby
pwh__ has quit [Ping timeout: 246 seconds]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has quit [Ping timeout: 246 seconds]
oleo__ has quit [Quit: Verlassend]
pwh__ has joined #ruby
pwh____ has quit [Ping timeout: 250 seconds]
msmith_ has quit [Remote host closed the connection]
dawkirst_ has joined #ruby
pwh____ has joined #ruby
HelperW__ has joined #ruby
lnormous has quit [Ping timeout: 245 seconds]
dx7 has quit [Remote host closed the connection]
pwh_____ has joined #ruby
sski has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
dx7 has joined #ruby
jasooon has quit [Ping timeout: 250 seconds]
pwh______ has joined #ruby
pwh has quit [Ping timeout: 244 seconds]
pwh_ has quit [Ping timeout: 250 seconds]
pwh has joined #ruby
sski has quit [Client Quit]
pwh_ has joined #ruby
pwh___ has quit [Ping timeout: 260 seconds]
dawkirst has quit [Ping timeout: 272 seconds]
pwh___ has joined #ruby
pwh__ has quit [Ping timeout: 272 seconds]
helpa has quit [Remote host closed the connection]
havenwood has quit []
pwh__ has joined #ruby
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
nonmadden has quit [Quit: Leaving...]
HelperW__ has quit [Ping timeout: 246 seconds]
codecop has joined #ruby
rshetty has quit []
pwh____ has quit [Ping timeout: 258 seconds]
helpa has joined #ruby
pwh_____ has quit [Ping timeout: 245 seconds]
pwh____ has joined #ruby
dx7 has quit [Ping timeout: 260 seconds]
pwh______ has quit [Ping timeout: 260 seconds]
rshetty has joined #ruby
sinkensabe has joined #ruby
pwh______ has joined #ruby
pwh has quit [Ping timeout: 258 seconds]
justinmburrous has joined #ruby
neoxquick has quit [Read error: Connection reset by peer]
pwh has joined #ruby
spicerack has joined #ruby
tagrudev has joined #ruby
pwh_ has quit [Ping timeout: 260 seconds]
pwh_ has joined #ruby
pwh___ has quit [Ping timeout: 272 seconds]
pwh___ has joined #ruby
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
pwh__ has quit [Ping timeout: 244 seconds]
pwh____ has quit [Ping timeout: 240 seconds]
Rhainur has joined #ruby
pwh__ has joined #ruby
ereslibre has joined #ruby
ereslibre has quit [Changing host]
ereslibre has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
pwh____ has joined #ruby
krisquigley has joined #ruby
<Rhainur>
is something like Date.parse(user_input_string) rescue Date.today decent Ruby code?
<Rhainur>
or is there a better way of expressing that
<lemur>
no, but as far as a better way with dates....
pwh_____ has joined #ruby
pwh_____ has quit [Client Quit]
pwh______ has quit [Ping timeout: 272 seconds]
pwh has quit [Ping timeout: 240 seconds]
justinmburrous has quit [Ping timeout: 258 seconds]
pwh has joined #ruby
<lemur>
I'm still of the opinion: Working -> Working Well -> Working Fast -> Working Cleanly / Prettily.
arup_r has joined #ruby
<lemur>
ie, get it done first then worry about the frills on code reviews or from past experience.
pwh_ has quit [Ping timeout: 260 seconds]
wookiehangover has quit [Quit: i'm out]
<Rhainur>
lemur: sure I agree with that. but it's nice to know when you're doing something that's potentially something to keep an eye on for future correction
pwh___ has quit [Ping timeout: 245 seconds]
pwh_ has joined #ruby
<lemur>
granted
<Rhainur>
there's a difference between writing an ugly hack because you don't know any better, vs doing it in full knowledge that it's an ugly hack :)
<lemur>
but yeah, dates are a pain for correctness
{xenomorph} is now known as xenomorph
neonixcoder has joined #ruby
pwh___ has joined #ruby
<lemur>
problem being I don't know of many better ways other than a try catch.
pwh__ has quit [Ping timeout: 272 seconds]
pwh____ has quit [Ping timeout: 245 seconds]
pwh__ has joined #ruby
msx has joined #ruby
<lemur>
most of the other methods I see are nasty regex and a lot longer hacks
wookiehangover has joined #ruby
<lemur>
:/
pwh____ has joined #ruby
<lemur>
rescue is dirty, but it's a spot of mud compared to jumping in a puddle.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 272 seconds]
fgo has quit [Remote host closed the connection]
gilr00y has joined #ruby
pwh_____ has joined #ruby
pwh_____ has quit [Client Quit]
<lemur>
You might use rescue ArgumentError to make it less of a catchall
pwh has quit [Ping timeout: 246 seconds]
pwh has joined #ruby
pwh_ has quit [Ping timeout: 260 seconds]
<pontiki>
i hate dates, times, timezones, etc.; that said, i would never try to write a date/time parser
pwh_ has joined #ruby
pwh___ has quit [Ping timeout: 272 seconds]
pwh_____ has joined #ruby
pwh__ has quit [Ping timeout: 244 seconds]
pwh__ has joined #ruby
pwh____ has quit [Ping timeout: 272 seconds]
Suchit_ has quit [Read error: Connection reset by peer]
Sp4rKy_ is now known as Sp4rKy
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
pwh___ has joined #ruby
Suchit_ has joined #ruby
gilr00y has quit [Ping timeout: 260 seconds]
<Hanmac>
pontiki: specially if you need for correctness that you also read the tzdata stuff ... then it does turn crazy ;P
pwh____ has joined #ruby
<pontiki>
here be dragons
krz has joined #ruby
pwh has quit [Ping timeout: 250 seconds]
pwh has joined #ruby
<Hanmac>
tzdata is ages old ... would not be suprised if there where really dragons ;P
tessi_zz is now known as tessi
sinkensabe has quit [Remote host closed the connection]
pwh______ has joined #ruby
<pontiki>
i remember reading, quite some time ago, now, about how some of the tzdata stuff is based on someone's proprietary information and calculations, and something about how they weren't able to secure a current license to use it because no one knew who owned it anymore
pwh_ has quit [Ping timeout: 272 seconds]
pwh_ has joined #ruby
pwh_____ has quit [Ping timeout: 260 seconds]
<Tricon>
TZs are such a pain.
pwh__ has quit [Ping timeout: 245 seconds]
<Hanmac>
its also interesting that tzdata can never be smaller because it can only add new data, never remove old one ;P
pwh__ has joined #ruby
<Tricon>
Every try unlocking content at the same relative time in each TZ? It's _way_ harder than it sounds.
<pontiki>
that sounds like nightmare material
pwh_____ has joined #ruby
<Tricon>
pontiki: There was weeping and gnashing of teeth.
otakbeku has quit [Quit: leaving]
pwh_____ has quit [Client Quit]
<Hanmac>
specially if some countries does split itself or does merge ... each time it does change everything with the TZ
<pontiki>
we were talking just the other day about DST/Std issues when you have to issue a time in the past but it's no longer DST
<Tricon>
Hanmac: Yep.
pwh___ has quit [Ping timeout: 272 seconds]
<Tricon>
Some countries make it up every year.
pwh____ has quit [Ping timeout: 258 seconds]
jontmorehouse has joined #ruby
neonixcoder has quit [Quit: Leaving.]
<Hanmac>
or some countries does drop the DST system so it means a year before it was DST, but now it isnt ;P
schaerli has quit [Remote host closed the connection]
jusmyth1 has joined #ruby
pwh has joined #ruby
pwh has quit [Client Quit]
jusmyth1 has quit [Read error: Connection reset by peer]
MrBoolean has joined #ruby
jusmyth1 has joined #ruby
<sevenseacat>
well i'd hope thats not the exact code
schaerli has joined #ruby
<arup_r>
That's my intention to make class methods as protected..
<arup_r>
Exactly the same code
pwh has joined #ruby
<arup_r>
I can't make class methods as private
justinmburrous has quit [Remote host closed the connection]
jusmyth1 has quit [Client Quit]
pwh___ has quit [Ping timeout: 258 seconds]
<arup_r>
sevenseacat: You got my intention right
<arup_r>
?
klaut has joined #ruby
<sevenseacat>
private would do the same thing wouldnt it
<Hanmac>
it would
pwh_ has joined #ruby
<sevenseacat>
private means 'cant be called with an explicit receiver'?
<arup_r>
I don't want to make methods as public API which I don't want to be called oouside
<arup_r>
sevenseacat.. Try yourself with private
St_Marx has quit [Ping timeout: 264 seconds]
<arup_r>
and get back to me
<arup_r>
Just try with private
pwh__ has joined #ruby
<Hanmac>
arup_r: i tryed it with private ... Biz.biz works
<arup_r>
something wrong I am doing.. Ooops!!
pwh___ has joined #ruby
<arup_r>
Hanmac,,, I made me confused
pwh____ has joined #ruby
jusmyth has joined #ruby
pwh_____ has joined #ruby
<arup_r>
Hah! I don't need protected.. Now.. private makes sense..
pwh______ has joined #ruby
skammer3 has joined #ruby
pwh______ has quit [Client Quit]
pwh has quit [Ping timeout: 260 seconds]
pwh_ has quit [Ping timeout: 260 seconds]
<arup_r>
sevenseacat: You know well Ruby... Me not
<arup_r>
:-(
Soliah has quit [Quit: Soliah]
pwh has joined #ruby
pwh__ has quit [Ping timeout: 272 seconds]
dx7 has joined #ruby
pwh___ has quit [Ping timeout: 245 seconds]
<Hanmac>
protected only is for something if you want to communicate between instances of the same class, which does not make sense for singleton methods
pwh_ has joined #ruby
pwh____ has quit [Ping timeout: 246 seconds]
pwh__ has joined #ruby
schaerli has quit [Remote host closed the connection]
<arup_r>
Yes,, Exactly.. like that
roolo has quit [Quit: Leaving...]
schaerli has joined #ruby
danijoo_ has quit [Ping timeout: 250 seconds]
pwh___ has joined #ruby
pwh_____ has quit [Ping timeout: 244 seconds]
Juanchito has joined #ruby
rshetty has quit [Remote host closed the connection]
pwh____ has joined #ruby
emmesswhy has joined #ruby
pwh_____ has joined #ruby
skammer3 has quit [Ping timeout: 272 seconds]
justinmburrous has joined #ruby
pwh______ has joined #ruby
pwh has quit [Ping timeout: 258 seconds]
dx7 has quit [Ping timeout: 246 seconds]
Tricon has joined #ruby
pwh has joined #ruby
pwh_ has quit [Ping timeout: 260 seconds]
pwh__ has quit [Ping timeout: 240 seconds]
pwh_ has joined #ruby
alex88 has joined #ruby
pwh__ has joined #ruby
pwh___ has quit [Ping timeout: 260 seconds]
jasooon has joined #ruby
pwh____ has quit [Ping timeout: 240 seconds]
ad_boot has joined #ruby
pwh____ has joined #ruby
St_Marx has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emmesswhy has quit [Quit: This computer has gone to sleep]
pwh_____ has quit [Ping timeout: 258 seconds]
otakbeku has joined #ruby
pwh__ has joined #ruby
Mia has joined #ruby
pwh___ has joined #ruby
pwh___ has quit [Client Quit]
tessi is now known as tessi_zz
boombadaroomba has quit [Ping timeout: 245 seconds]
jacobat has joined #ruby
pwh has quit [Ping timeout: 260 seconds]
pwh has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
<jacobat>
I have a string with some weird UTF-8 chars in it. In IRB (Rails console) when I try to look at the string I get "Encoding::UndefinedConversionError: U+00E0 from UTF-8 to US-ASCII" - any ideas why it's trying to convert to ascii?
skammer3 has quit [Ping timeout: 244 seconds]
pwh___ has joined #ruby
Aaaal has joined #ruby
<apeiros>
jacobat: sounds like your external encoding is us-ascii
wald0 has quit [Write error: Connection reset by peer]
DrForr has quit [Write error: Broken pipe]
rtl has quit [Write error: Broken pipe]
<featheryahn>
ar_model.attributes.map { |a| a unless a.value? }
gilr00y has joined #ruby
<Hanmac>
featheryahn: hm currently there is no map with returns a hash ... hash.map {}.to_h is currently the most readable ...
magicien_ has joined #ruby
chuck has quit [Remote host closed the connection]
napcae has quit [Remote host closed the connection]
magicien has quit [Remote host closed the connection]
<Hanmac>
featheryahn: hm i think you are looking for Hash#select not #map
anarang has joined #ruby
AmBienCeD has joined #ruby
soulcake has joined #ruby
<featheryahn>
Hanmac: OK thanks
thomasxie has joined #ruby
Mekkis has joined #ruby
<featheryahn>
Hanmac: but the .to_h tip is also good
<featheryahn>
Hanmac: thanks
jacobat has quit [Ping timeout: 263 seconds]
bobishh has quit [Ping timeout: 263 seconds]
Guest30624 has quit [Ping timeout: 263 seconds]
Pupeno has quit [Remote host closed the connection]
sk87 has joined #ruby
Advocation has joined #ruby
Takle has joined #ruby
gilr00y has quit [Ping timeout: 272 seconds]
Pupeno has joined #ruby
decoponyo has joined #ruby
Advocation has quit [Client Quit]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
p0sixpscl has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 272 seconds]
yetanotherdave has joined #ruby
decoponio has quit [Ping timeout: 245 seconds]
dte has joined #ruby
Takle has joined #ruby
sepp2k has joined #ruby
p0sixpscl has quit [Read error: Connection reset by peer]
thsig has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
startupality has joined #ruby
dangerousdave has joined #ruby
Pupeno has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 272 seconds]
crdpink has joined #ruby
thsig_ has quit [Ping timeout: 260 seconds]
rkalfane has joined #ruby
rkalfane has quit [Client Quit]
tokik has joined #ruby
Wolland has quit []
msmith has joined #ruby
Advocation has joined #ruby
<shevy>
Hanmac I want free macros in ruby
nfk has joined #ruby
p0sixpscl has joined #ruby
<shevy>
and directly embeddedable invalid syntax
AmBienCeD has quit [Write error: Broken pipe]
startupality has quit [Ping timeout: 272 seconds]
AmBienCeD has joined #ruby
AmBienCeD has quit [Changing host]
AmBienCeD has joined #ruby
msmith has quit [Ping timeout: 244 seconds]
<Hanmac>
free macros i dont think that will ever possible
RyanV has joined #ruby
AndChat| has joined #ruby
<shevy>
:(
<Hanmac>
and for "embeddedable invalid syntax" the only thing i image are Heredoc for that ...
p0sixpscl has quit [Ping timeout: 245 seconds]
<shevy>
well __END__
<shevy>
heredoc puts it into a string or?
<shevy>
hmm... I guess DATA.read also returns a string
lkba has quit [Ping timeout: 244 seconds]
<Hanmac>
yes Heredoc are some kind of string
<shevy>
why is __END__ different from heredoc btw?
<Hanmac>
with __END__ you can only have one per file ... hm
otakbeku has quit [Quit: leaving]
schaerli has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<shevy>
yeah
<shevy>
I wonder if they do the same thing
<shevy>
you can access both, though differently
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimg has joined #ruby
<kamilc__>
back
jsaak has quit [Ping timeout: 250 seconds]
<shevy>
top
PixelCrumbs has quit [Quit: Connection reset by peer...isn't he that short little mexican with the wire cutters heading your way?]
arup_r_ has joined #ruby
cocotton has quit [Remote host closed the connection]
karupa is now known as zz_karupa
startupality has joined #ruby
skammer3 has joined #ruby
jontmorehouse has quit [Ping timeout: 260 seconds]
<Hanmac>
shevy: DATA is a IO object ... so oyu might do more shit with it ;p
<txdv>
dont shit on data plz
alem0lars has quit [Quit: AFK..]
<shevy>
lol
Pupeno has joined #ruby
jasooon has joined #ruby
lkba has joined #ruby
arup_r has quit [Ping timeout: 272 seconds]
lw has quit [Quit: s]
<Hanmac>
hm shevy if you ask i currently add more checks and exceptions for rwx ... like currently with the Image class, if you try to resize it and the new size is negative
w09x has joined #ruby
AndChat| has quit [Ping timeout: 272 seconds]
dawkirst has quit [Remote host closed the connection]
arup_r_ has quit []
arup_r has joined #ruby
dawkirst has joined #ruby
PanPan has quit [Quit: ChatZilla 0.9.91 [Firefox 32.0.3/20140923175406]]
<shevy>
\o/
davedev24_ has joined #ruby
DrCode has quit [Remote host closed the connection]
timgauthier has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
w09x has quit [Client Quit]
kaspertidemann has quit []
teddyp1cker has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 250 seconds]
roolo has quit [Remote host closed the connection]
ndrei has joined #ruby
djstorm has joined #ruby
Advocation has quit [Quit: Advocation]
dangerou_ has joined #ruby
dawkirst has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
pskosinski has joined #ruby
Takle has quit [Remote host closed the connection]
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
dRbiG has quit [Quit: co'o ro do]
soulcake has quit [Ping timeout: 277 seconds]
Advocation has joined #ruby
thomasxie has quit [Ping timeout: 240 seconds]
dc___ has quit [Remote host closed the connection]
AmBienCeD has quit [Write error: Broken pipe]
arcsky has left #ruby [#ruby]
rshetty has joined #ruby
nfk has quit [Quit: yawn]
moritzs has joined #ruby
dangerou_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kith_ has joined #ruby
kaspertidemann has joined #ruby
kith has quit [Disconnected by services]
kith_ is now known as kith
kaspergrubbe has joined #ruby
jacobat_ has quit [Ping timeout: 258 seconds]
jacobat has joined #ruby
Takle has joined #ruby
xenomorph is now known as {xenomorph}
agrinb has joined #ruby
rshetty has quit [Remote host closed the connection]
jbw__ has joined #ruby
dRbiG has joined #ruby
FIGO_ has joined #ruby
mattstratton has joined #ruby
arup_r has quit [*.net *.split]
skammer3 has quit [*.net *.split]
Mekkis has quit [*.net *.split]
AlSquire has quit [*.net *.split]
LiohAu_ has quit [*.net *.split]
grzywacz has quit [*.net *.split]
tlarevo_ has quit [*.net *.split]
msx has quit [*.net *.split]
tkuchiki has quit [*.net *.split]
jadedphone has quit [*.net *.split]
jbw has quit [*.net *.split]
KC9YDN has quit [*.net *.split]
ta has quit [*.net *.split]
Beoran_ has quit [*.net *.split]
icedp has quit [*.net *.split]
i8igmac has quit [*.net *.split]
mieko has quit [*.net *.split]
Caius has quit [*.net *.split]
chridal has quit [*.net *.split]
danshultz has quit [*.net *.split]
hellome has quit [*.net *.split]
cescalante has quit [*.net *.split]
Platini has quit [*.net *.split]
^mg^ has quit [*.net *.split]
mozzarella has quit [*.net *.split]
hakunin has quit [*.net *.split]
peckermanzzz has quit [*.net *.split]
sirecote has quit [*.net *.split]
yetanotherdave has joined #ruby
robbyoconnor has quit [Ping timeout: 258 seconds]
bayed has joined #ruby
FIGO_ is now known as Platini
teddyp1cker has joined #ruby
cescalante has joined #ruby
Advocation has quit [Quit: Advocation]
dx7 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dangerou_ has joined #ruby
Cichol has joined #ruby
dawkirst has joined #ruby
marr has quit []
supergeek has joined #ruby
roolo has joined #ruby
mg^ has joined #ruby
justinmburrous has joined #ruby
KC9YDN has joined #ruby
arup_r has joined #ruby
emocakes__ has quit []
fandi has quit [Remote host closed the connection]
<wasamasa>
I wonder whether there is a way to redirect the pretty-printed output from pry into a file
justinmburrous has joined #ruby
dte has quit [Remote host closed the connection]
dideler has joined #ruby
ndrei has joined #ruby
gilr00y_ has quit [Ping timeout: 258 seconds]
<Xeago>
wasamasa: pry | tee > file ?
<Xeago>
nope :<
<wasamasa>
Xeago: nope, that mistakes my path for a regex :P
Deejay_ has joined #ruby
<Xeago>
try `script`
<Xeago>
it'll spawn a subshell, you can start pry and it'll store a file
<Xeago>
so `script pry_sessions` :)
rpag has quit [Ping timeout: 244 seconds]
<wasamasa>
the unix command?
<Xeago>
yea
<wasamasa>
I doubt that will work considering pry invokes a fricking pager
<Xeago>
hmm, icky yea
p0sixpscl has joined #ruby
p0sixpscl has quit [Max SendQ exceeded]
<Xeago>
pagers should overwrite the screen though
Deejay_ has quit [Client Quit]
rpag has joined #ruby
dawkirst has quit [Remote host closed the connection]
p0sixpscl has joined #ruby
fsapo has joined #ruby
<Xeago>
works'ish……
msmith_ has joined #ruby
yalue has joined #ruby
<Xeago>
my terminal even repeats the beeps lol
thsig_ has joined #ruby
p0sixpscl has quit [Max SendQ exceeded]
p0sixpscl has joined #ruby
<wasamasa>
"Input expressions and output results are automatically stored in array-like data structures accessible from the _in_ and _out_ locals respectively."
W0rmDr1nk has quit [Ping timeout: 245 seconds]
<wasamasa>
except I can't even get index access to them
arup_r has quit [Remote host closed the connection]
Guest69152 has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
mattstratton has joined #ruby
<wasamasa>
it instead saves the definition it can find in existing ruby code
<wasamasa>
which rather sounds like a gimmick
mattstratton has quit [Max SendQ exceeded]
justinmburrous has quit [Remote host closed the connection]
paulfm has joined #ruby
oo_ has quit [Remote host closed the connection]
mattstratton has joined #ruby
tkuchiki has joined #ruby
justinmburrous has joined #ruby
mattstratton has quit [Max SendQ exceeded]
oo_ has joined #ruby
bMalum has joined #ruby
mattstratton has joined #ruby
thsig has joined #ruby
W0rmDr1nk has quit [Ping timeout: 272 seconds]
yetanotherdave has quit [Ping timeout: 258 seconds]
mkaesz has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 244 seconds]
AndChat| has joined #ruby
spyderman4g63 has joined #ruby
justinmburrous has quit [Ping timeout: 245 seconds]
oo_ has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 272 seconds]
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
narcan has joined #ruby
dawkirst has joined #ruby
shredding has joined #ruby
<wasamasa>
I guess I'll run pry in an emacs buffer for now and just save parts of it to a file because that automatically disables the pager
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
MCDev has quit [Ping timeout: 250 seconds]
mastr_bennett[x] has joined #ruby
axilla has joined #ruby
boombadaroomba has joined #ruby
lw has quit [Quit: s]
mkaesz has joined #ruby
Pumukel has joined #ruby
terracor has quit [Quit: leaving]
W0rmDr1nk has joined #ruby
boombadaroomba has quit [Ping timeout: 258 seconds]
larissa has joined #ruby
justinmburrous has joined #ruby
jasooon has joined #ruby
startupality has quit [Quit: startupality]
bMalum has quit [Quit: bMalum]
<Xeago>
wasamasa: cant you PAGER=cat VIEWER=cat pry
threesixes has quit [Remote host closed the connection]
mijicd has quit [Quit: leaving]
dorei has joined #ruby
larissa has quit [Ping timeout: 244 seconds]
jasooon has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
mkaesz has quit [Remote host closed the connection]
gilr00y has joined #ruby
vyorkin has joined #ruby
rimenes has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ad_boot has quit [Remote host closed the connection]
Sht0 has joined #ruby
tkuchiki has joined #ruby
vyorkin has quit [Ping timeout: 260 seconds]
emocakes has joined #ruby
mkaesz has joined #ruby
cajone has joined #ruby
krz has joined #ruby
justinmburrous has quit [Remote host closed the connection]
justinmburrous has joined #ruby
blueOxigen has joined #ruby
dte has joined #ruby
livingstn has joined #ruby
relix has joined #ruby
MasterPiece has quit [Quit: Leaving]
rimenes has joined #ruby
dideler has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
bluOxigen has quit [Ping timeout: 244 seconds]
skammer has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
relix has quit [Client Quit]
dx7 has joined #ruby
justinmburrous has quit [Ping timeout: 260 seconds]
doev has quit [Ping timeout: 245 seconds]
obs has joined #ruby
i8igmac has joined #ruby
coderdad has joined #ruby
slester has joined #ruby
dx7 has quit [Ping timeout: 258 seconds]
HelperW___ has quit [Remote host closed the connection]
davispuh has joined #ruby
mleone has joined #ruby
HelperW___ has joined #ruby
freezey has joined #ruby
thsig has quit [Remote host closed the connection]
ndrei has joined #ruby
dblessing has joined #ruby
Advocation has joined #ruby
krisquigley has joined #ruby
CodeOmegaPrime has quit [Ping timeout: 246 seconds]
Advocation has quit [Client Quit]
ctp has joined #ruby
arup_r_ has joined #ruby
justinmburrous has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
vt102 has joined #ruby
Advocation has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
arup_r has quit [Ping timeout: 258 seconds]
AtumT has joined #ruby
dte has quit [Remote host closed the connection]
slap_stick has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
slester has quit [Ping timeout: 245 seconds]
lampd1 has joined #ruby
yetanotherdave has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
<slap_stick>
hi, i am trying to get rbenv to work for my ruby version i have a shebang in there #!/usr/bin/env ruby and when i run ~/.rbenv/bin/rbenv rehash or even local and the version if i run the script which prints the ruby version, it's always the system version and not the rbenv ruby version
<slap_stick>
am i doing something wrong?
<cajone>
Guys is it possible to copy a time variable say t1 to t2 then reset t1 without effecting t2 ?
rshetty has quit [Remote host closed the connection]
jottr_ has joined #ruby
cpruitt has joined #ruby
skammer has joined #ruby
dideler has joined #ruby
wolves_cs has joined #ruby
<toretore>
cajone: Times are immutable, so no
<toretore>
you could try dup-ing it
<cajone>
toretore: ?
<cajone>
duplicating?
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<toretore>
actually, no, that doesn't make any sense
<toretore>
tell me more about your issues
lampd1 has quit [Ping timeout: 272 seconds]
<cajone>
toretore: guess I could convert t1 into an int then dup and reconvert back?
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qmfnp has joined #ruby
<toretore>
ints are also immutable
<cajone>
toretore: I have 3 time vars old middle current and I'm trying to roll them ie old - middle, middle - current current - Time.new
AmBienCeD has quit [Write error: Broken pipe]
<toretore>
reassign them
tvw has quit []
<cajone>
toretore: noob q how?
ta__ has joined #ruby
<toretore>
old = middle; middle = current; current = Time.now
yetanotherdave has quit [Ping timeout: 246 seconds]
soulcake has quit [Ping timeout: 258 seconds]
ta has quit [Ping timeout: 249 seconds]
<cajone>
toretore: when I do that they all end up the same
bmurt has joined #ruby
<cajone>
ie Time.now
<toretore>
show your code
startupality has joined #ruby
<cajone>
paste.com?
<toretore>
gist.github.com
soulcake has joined #ruby
maasha has joined #ruby
sevenseacat has joined #ruby
justinmburrous has quit [Remote host closed the connection]
<slap_stick>
hi, is there an easy way to iterate over an array but add an item inbetween each element i.e. %w(1 2 3) to become %x(1 ? 2 ? 3) i was using map but that would just append the ? to the string in each array item as oppose have it as an array item of its own
freerobby has joined #ruby
freezey has quit [Remote host closed the connection]
jasooon has joined #ruby
freezey has joined #ruby
<Hanmac>
maasha: autoload is not liked ... and with threads it might bite you in your asss
msmith_ has joined #ruby
strax has joined #ruby
<maasha>
Hanmac: I read about it not being liked, but I thought it was resolved
t_mmyv has joined #ruby
<cajone>
toretore: sorry your right I just thought I could dup/copy the time field, I was trying to explain without writing a book ( its complicated), but thanks for your help I will think about it a bit longer
justinmburrous has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
<cajone>
toretore: btu basically I'm trying to control the thread flow by watching the integer identified threads going through a gate ( the gates are very far apart)
jerius has joined #ruby
jasooon has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
sailias has joined #ruby
<maasha>
Hanmac: So if you have a big app with lots of gem dependencies, where most are only used occasionally, you do what to limit load time?
<_br_>
slap_stick: Maybe this? %w(a b c d).collect! { |i| [ i, "foo" ] }.flatten
<slap_stick>
yep ;-) thast what i ended up doig in the end
<slap_stick>
and if i could type properly too that would be good
<slap_stick>
thanks ;-)
freerobby has quit [Quit: Leaving.]
<Hanmac>
maasha: for one of my things i had require at runtime ... like def parse_data; if @type == 'zlib'; require 'zlib'; end; ... ; end ... likt it does only require if it does need it
User458764 has joined #ruby
Channel6 has joined #ruby
rismoney1 has joined #ruby
<maasha>
Hanmac: hm I foresee it that some gem might be required from multiple places
slester has joined #ruby
tlarevo_ has quit [Remote host closed the connection]
<maasha>
I thought autoload was such a neat idea :o(
Takle has joined #ruby
timonv_ has joined #ruby
cherwin has joined #ruby
yfeldblum has joined #ruby
agrinb has joined #ruby
charliesome has quit [Quit: zzz]
timonv_ has quit [Remote host closed the connection]
<shevy>
Hanmac sure but we don't intercept it with the above loop code
<Hanmac>
shevy might be better: loop { user_input = gets.to_s.chomp; break if user_input == 'q' }
<shevy>
ah Ctrl-D I see
petersaints has quit [Read error: Connection reset by peer]
rkalfane has joined #ruby
<rubie>
shevy: i was just playing around and was surprised that this didn't work. just trying to figure out why
<shevy>
rubie use loop
sk87 has joined #ruby
MrBoolean has quit [Ping timeout: 260 seconds]
<shevy>
indeed gets can pick up nil
<rubie>
can i do this with a while loop?
<shevy>
please don't
zorak8 has quit [Ping timeout: 250 seconds]
<shevy>
your brain could not handle, so try to make it easier for your brain and switch to a simpler construct
<rubie>
hah ok
dte has quit [Read error: Connection reset by peer]
teddyp1c_ has joined #ruby
treehug88 has joined #ruby
dte has joined #ruby
monkeypatch has joined #ruby
<shevy>
also test your script if it can handle ctrl-d
<shevy>
and ctrl-c
<shevy>
:)
twohlix has quit [Ping timeout: 260 seconds]
<_br_>
The use of #chomp to remove carrage return / newline is wrong. Use #strip, since your code will break on $env in my opinion.
tchebb has quit [Ping timeout: 245 seconds]
<shevy>
strip will do more than remove newlines
<_br_>
well #chom will not remove \r\n correctly
endash has joined #ruby
<rubie>
shevy: i was originally interested in the "switch = true" "switch = false" in relation to the while loop
teddyp1cker has quit [Ping timeout: 260 seconds]
<shevy>
yeah that works rubie
<shevy>
while will evaluate until the condition it checks on becomes false
<canton7>
_br_, does for me...? and the docs say "If $/ has not been changed from the default Ruby record separator, then chomp also removes carriage return characters (that is it will remove \n, \r, and \r\n)"
<mrcloud_>
shevy: first time trying ruby so yes, probably xD
lampd1 has joined #ruby
lampd1 has quit [Client Quit]
<shevy>
mrcloud_ why not do:
nrsk has joined #ruby
<canton7>
mrcloud_, commented
<shevy>
p 'Generate scores' if options.scores
<shevy>
and next line
<shevy>
p 'Validate' if options.validate
lxsameer has quit [Quit: Leaving]
<jds>
I'm using nokogiri, and want to run something along the lines of xml.xpath("//foo[@attr='#{user_input}']"). Is there anything in nokogiri to help me escape 'user_input' appropriately ?
justinmburrous has quit [Remote host closed the connection]
nrsk has quit [Remote host closed the connection]
tchebb has joined #ruby
<shevy>
I mean that last if/else is kinda silly because you already have yet another if after that else
yetanotherdave has joined #ruby
p0sixpscl has quit [Quit: bye]
<mrcloud_>
shevy: where I put that p Ill put code, maybe method calls
<shevy>
rubie no idea, my brain works with bananas and apples, not algorithms :)
<shevy>
mrcloud_ so where is the problem - simply replace the p with your_method_here()
<shevy>
this shows that you did not understand #{} yet
Kricir has joined #ruby
mattstratton has joined #ruby
<YamakasY>
shevy: discussed that with Hanmac earlier
<shevy>
if it is a string, then you must add ""
<waxjar>
YamakasY: also, #empty? will return true/false already, so there's no need for the if-else clauses :)
mattstratton has quit [Max SendQ exceeded]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<YamakasY>
waxjar: I need to check for hidden files
<YamakasY>
and not for . and ..
jasooon has quit [Ping timeout: 250 seconds]
<mrcloud_>
shevy: lol, ok, I have no problems with using other parser. Im a newbie. My real problem is that I have 4 days to learn ruby and write an easy app. And I say easy because I wrote it in java in less than an hour but I have no idea about how to do it in ruby xD
mattstratton has joined #ruby
<YamakasY>
shevy: would you say /my/path is a string ?
Takle has quit [Remote host closed the connection]
* YamakasY
is not a programmer at all... puppet will do but I'm more a network admin
mattstratton has quit [Max SendQ exceeded]
wwalker has quit [Ping timeout: 272 seconds]
<shevy>
YamakasY well, I would first build an intermediate variable
<shevy>
usually I use _
yfeldblum has joined #ruby
mattstratton has joined #ruby
<shevy>
once _ is how it is, I can pass it into another method
<waxjar>
YamakasY: what's actually in args?
mattstratton has quit [Max SendQ exceeded]
<mrcloud_>
shevy: in ruby do you put each class in a different file like in java?
phantummm has joined #ruby
lnormous has quit [Ping timeout: 245 seconds]
<shevy>
mrcloud_ yeah, that is the simple way
mattstratton has joined #ruby
<shevy>
you can put more than one class in a .rb file but that is the harder way
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AmBienCeD has joined #ruby
dte has quit [Read error: Connection reset by peer]
<YamakasY>
waxjar: /my/path
mattstratton has quit [Max SendQ exceeded]
<shevy>
you already know OOP so you know how to setup a class in java from zero too, it is the same in ruby, you just need to use less code. also, use "def initialize"
grzywacz has joined #ruby
<waxjar>
YamakasY: so args is a String?
timgauthier has joined #ruby
<mrcloud_>
shevy: yeah, I read about initialize
mattstratton has joined #ruby
<YamakasY>
waxjar: in my opinion yes!
arup_r_ has quit []
<waxjar>
cool, let's rename it to path then :)
<shevy>
initialize gets called whenever you do .new (after .allocate but .allocate is called by ruby itself before .initialize)
dx7 has joined #ruby
mattstratton has quit [Max SendQ exceeded]
<mrcloud_>
shevy: actually the app is quite simple. I just only need to read some jsons from a remote url, deserialize them to objects, validate the info and generate another json
dte has joined #ruby
<shevy>
good, you described 4 steps, so use at least 4 different methods
mattstratton has joined #ruby
<waxjar>
YamakasY: and what you want to do is check if there are any dotfiles in the directory or any files at all?
<shevy>
you can literally call those methods like in the sentence above, just replace the ' ' with '_' and you have the names for the ruby methods
<YamakasY>
waxjar: yes as I use hidden ones too... you know for the NSA ;0
<shevy>
def read_json_from_this_remote_url(i)
startupality has quit [Read error: Connection reset by peer]
<mrcloud_>
shevy: yeah, that is easier in Java. In the java version I use a class to load data, a class to parse jsons, a class to validate...
<eam>
why does ruby have "def initialize" instead of "def new"
<shevy>
and you can give all those (i) the proper defaults; (i = @json_dataset) and so on
<eam>
never understood that weirdness
<shevy>
yes you can do the very same too mrcloud_
mary5030 has quit [Remote host closed the connection]
<shevy>
there is more than one way in ruby
yfeldblum has quit [Ping timeout: 244 seconds]
<mrcloud_>
shevy: Ill try to separete all in different classe. BTW, what is i = @json_datase? I haven't seen nothing similar yet
<waxjar>
YamakasY: Dir.glob("#{path}/*).size > 2 should work then i think
<shevy>
mrcloud_ i is the name of the argument, the assignment means you can omit the argument, and @json_dataset is an instance variable which you will have gotten when you invoke that earlier method
AlexRussia has quit [Remote host closed the connection]
<waxjar>
with an extra " after *, that is :p
<shevy>
see YamakasY?
<shevy>
#{} is hard
<shevy>
even waxjar failed :)
<YamakasY>
waxjar: but 2 says more than 2 ?
startupality has joined #ruby
PeterBoy has joined #ruby
<shevy>
how much simpler is the shevy way
<shevy>
Dir[_]
AlexRussia has joined #ruby
<shevy>
well actually
<shevy>
Dir[_].size > 2
<YamakasY>
is that save enough ?
blackmesa has joined #ruby
mary5030 has joined #ruby
<mrcloud_>
shevy: ok, I'm going to create some classes and see if I make it work ^^
<YamakasY>
I better check it instead of let "someone/system" assuming it to me
mattstra_ has joined #ruby
mattstratton has quit [Read error: Connection reset by peer]
<shevy>
YamakasY you can add checks before sending in _
kobain_ has joined #ruby
mattstra_ has quit [Max SendQ exceeded]
<olivier_bK>
how to continue writing in the file ? i can only write or create a new file
<YamakasY>
shevy: as I do now too ?
mattstratton has joined #ruby
dawkirst has quit [Remote host closed the connection]
AlexRussia has quit [Excess Flood]
AlexRussia has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
disappeared has left #ruby [#ruby]
mattstratton has quit [Client Quit]
GriffinHeart has joined #ruby
oo_ has quit [Remote host closed the connection]
dte has quit [Read error: Connection reset by peer]
sk87 has joined #ruby
oo_ has joined #ruby
dte has joined #ruby
<olivier_bK>
i find the solution i must to use a+
IceDragon has joined #ruby
Takle has joined #ruby
krisquigley has joined #ruby
<YamakasY>
waxjar: I now get Error 400 on SERVER: undefined local variable or method `path' for #<Puppet::Parser::Scope:0x7f2d5a6f41e8>
GriffinHeart has quit [Remote host closed the connection]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
txdv has quit [Ping timeout: 258 seconds]
freezey has quit [Remote host closed the connection]
<mrcloud_>
shevy: if I have a class Assessment in an assessments.rb file how do I import it in my main class? Im trying with require 'assessment' without luck
tskogberg has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
fgo has quit []
gengmao has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
banister has joined #ruby
<Hanmac>
mrcloud_: you might need require_relative
<mrcloud_>
Hanmac: oh, yeah, that works. Thanks
enebo has joined #ruby
timonv_ has joined #ruby
oleo__ has joined #ruby
charliesome has quit [Quit: zzz]
dte has quit [Read error: No route to host]
dte has joined #ruby
magicien_ has quit [Quit: leaving]
dte has quit [Read error: No route to host]
magicien has joined #ruby
oleo is now known as Guest59953
magicien has quit [Client Quit]
dte has joined #ruby
Guest59953 has quit [Ping timeout: 240 seconds]
clauswitt has joined #ruby
snath has joined #ruby
magicien has joined #ruby
icebourg has joined #ruby
rippa has joined #ruby
Ankhers has joined #ruby
bal has quit [Quit: bal]
AFKGeek has quit [Quit: Leaving]
sdwrage has quit [Quit: This computer has gone to sleep]
<YamakasY>
would #{} just work ?
sdwrage has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
shredding has quit [Ping timeout: 244 seconds]
bobishh_ is now known as bobishh
pagioss has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
<bobishh>
can anyone see this ?
Takle has quit [Remote host closed the connection]
<YamakasY>
bobishh: I'm blind
jacobat_ has joined #ruby
txdv has joined #ruby
<YamakasY>
*blinded
lukevinc has joined #ruby
gsd has joined #ruby
<bobishh>
YamakasY: i'm sorry for ur eyes dude) i wanted to use a console irc client and i'm trying irssi, not much success as u can see
dte_ has joined #ruby
<YamakasY>
bobishh: I can see
dte has quit [Read error: Connection reset by peer]
<YamakasY>
wow, it's a miracle
Takle has joined #ruby
<YamakasY>
bobishh: no works, irssi is kinda simple tho ?
nfk has joined #ruby
<bobishh>
maybe. But not intuitive) at least for me
jacobat has quit [Ping timeout: 258 seconds]
threesixes has joined #ruby
<YamakasY>
on linux ?
<YamakasY>
commandline just ?
Pumukel has quit [Ping timeout: 272 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bobishh>
YamakasY: mac os, yeah just terminal. I also use tmux, so i've got all that I need here
dte has joined #ruby
hellangel7 has quit [Remote host closed the connection]
dte_ has quit [Read error: Connection reset by peer]
jacobat_ has quit [Ping timeout: 244 seconds]
<wpp>
> wow, it's a miracle :D
andrewjanssen has joined #ruby
distax has joined #ruby
lnormous has joined #ruby
<YamakasY>
bobishh: try xchat maybe ?
hamakn has quit [Remote host closed the connection]
<andrewjanssen>
Hello!
distax has left #ruby [#ruby]
<YamakasY>
andrewjanssen: hi
<bobishh>
andrewjanssen: are u swedish? )
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
koderok has quit [Quit: koderok]
Pumukel has joined #ruby
<bobishh>
YamakasY: I'll take a look at xchat, thnx)
fsapo has quit [Ping timeout: 245 seconds]
andrewjanssen has quit [Remote host closed the connection]
<YamakasY>
bobishh: I think you need xchat2
rpag has quit [Ping timeout: 258 seconds]
andrewjanssen has joined #ruby
yetanotherdave has joined #ruby
<andrewjanssen>
bobishh: no, but I think I have Dutch (or something like that) in my lineage somewhere
schaerli has quit [Remote host closed the connection]
justinmburrous has joined #ruby
<bobishh>
window 0
bobishh has left #ruby [#ruby]
bobishh has joined #ruby
TorpedoSkyline has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
<YamakasY>
andrewjanssen: jansen is dutch, janssen is wannabe :P
dte has quit [Read error: Connection reset by peer]
dte has joined #ruby
dstynchula has quit []
Sharker_ has joined #ruby
Darryl has joined #ruby
wpp has quit [Ping timeout: 246 seconds]
dte has quit [Read error: No route to host]
<YamakasY>
anyway, my check doesn't work :(
yetanotherdave has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Remote host closed the connection]
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
cocotton has quit [Remote host closed the connection]
<andrewjanssen>
ha ha!
dte_ has quit [Read error: Connection reset by peer]
abuzze has quit [Ping timeout: 260 seconds]
dte has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sharker has joined #ruby
jasooon has joined #ruby
aganov has quit [Remote host closed the connection]
yfeldblum has joined #ruby
sinkensabe has quit [Remote host closed the connection]
julieeharshaw has joined #ruby
MaciejCzyzewski has joined #ruby
dte has quit [Read error: Connection reset by peer]
dte has joined #ruby
<YamakasY>
andrewjanssen: yeah you thought we didn't see that at the border ?
<YamakasY>
:P
<YamakasY>
we did
xcyclist has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<YamakasY>
oh yeah we did
Sharker_ has quit [Ping timeout: 264 seconds]
mrchris has joined #ruby
justinmburrous has quit [Remote host closed the connection]
<YamakasY>
and because you think you got passed and we did that on purpose to have a reason to give you a fake life... we create http://www.downloadmoreram.com
MaciejCzyzewski has quit [Client Quit]
<YamakasY>
to fake you even more!
jottr_ has quit [Quit: WeeChat 1.0]
momomomomo has joined #ruby
dte has quit [Read error: Connection reset by peer]
<andrewjanssen>
lol!
spastorino has joined #ruby
dte has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 272 seconds]
<YamakasY>
oh yeah, you will be on mars1 too :P
troulouliou_dev has quit [Quit: Leaving]
<YamakasY>
we booked you already
PeterBoy has quit [Remote host closed the connection]
jottr has joined #ruby
<YamakasY>
for free ofcourse
HelperW____ has joined #ruby
kaspertidemann has quit []
mpistone has joined #ruby
bobishh has quit [Ping timeout: 272 seconds]
doev has quit [Ping timeout: 258 seconds]
<Hanmac>
YamakasY: would not be suprised if that "downloadmoreram" is a buyable app for Iphone ;P
<YamakasY>
ok, do I need to covert this #{} first to arg = args[0] ? if Dir["#{args[0]}"].size > 2 return true
cocotton has joined #ruby
<YamakasY>
Hanmac: the website came from Steve Jobs his timecapsule
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
<YamakasY>
I'm lost
<YamakasY>
(without you)
rubie has quit [Quit: Page closed]
troulouliou_dev has joined #ruby
HelperW___ has quit [Ping timeout: 245 seconds]
PeterBoy has joined #ruby
sevenseacat has quit [Quit: Leaving.]
<mrchris>
I've just tried using the PHP framework Phalcon. Anyone else tried it? The way you can easily use and stitch together only the bits you need is pretty neat. What's stopping us doing this with Ruby?
dte has quit [Read error: Connection reset by peer]
dte has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
bobishh has joined #ruby
HelperW____ has quit [Ping timeout: 272 seconds]
<centrx>
mrchris, That is what many Ruby libraries/frameworks do, only load things that are actually used
gregf has quit [Quit: WeeChat 1.0.1]
dte has quit [Read error: No route to host]
<centrx>
mrchris, Phalcon appears to sell itself as fast because it is implemented through a C extension
dte has joined #ruby
justinmburrous has joined #ruby
f0ster has quit []
mercwithamouth has quit [Ping timeout: 260 seconds]
timonv_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
lw has joined #ruby
<mrchris>
The way you bootstrap an app is pretty neat: just a single index.php file with the setup required. This means you can easily use multiple apps at the same time together.
timonv_ has joined #ruby
<mrchris>
You can easily link multiple apps together in any way you need. The best you can do with Rails in Engines, but they're a minefield
tlarevo has joined #ruby
last_staff has joined #ruby
<centrx>
I'm not sure what you mean, you can serve multiple apps at the same time with Ruby
<centrx>
The fact that it uses PHP is a game killer
<Hanmac>
mrchris: i also used phalcon before ... funny thing is that my collage always made tickets for it because we found something again that did not work
timgauthier is now known as timgauthier_isaw
Ankhers has quit [Remote host closed the connection]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dte has quit [Read error: Connection reset by peer]
pagioss has joined #ruby
dte has joined #ruby
Aaaal has quit [Quit: Aaaal]
IceDragon has quit [Ping timeout: 272 seconds]
IceDragon has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
timonv_ has quit [Ping timeout: 260 seconds]
dx7 has quit [Remote host closed the connection]
TorpedoSkyline has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
jacobat has joined #ruby
gsd has joined #ruby
baroquebobcat has joined #ruby
kenneth has joined #ruby
sinkensabe has joined #ruby
Aaaal has joined #ruby
wjimenez5271 has joined #ruby
Sharker has quit [Remote host closed the connection]
hamakn has joined #ruby
cocotton has quit [Remote host closed the connection]
dte has quit [Read error: Connection reset by peer]
cocotton has joined #ruby
dte has joined #ruby
startupality has quit [Quit: startupality]
Pumukel has quit [Ping timeout: 272 seconds]
ki0 has quit [Remote host closed the connection]
jimmyhoughjr has joined #ruby
coderdad has quit [Remote host closed the connection]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
<eam>
phat4life: it's a good idea to never let yourself say "fails." instead describe exactly what you observe that you don't like (eg: raises a particular exception)
<phat4life>
ah sorry. what happens is one line 9, the directory doesn’t exist
<phat4life>
er, the File.directory? method returns false
<orionstein>
phat4life, also is there a reason why you are making so many systems calls rather than running a single external shell script?
<eam>
my first thought seeing that code is that you should check $? each time you run system, which will tell you if the command you ran succeeded or not
Takle has joined #ruby
seanosaur has joined #ruby
<phat4life>
orionstein: easier to reason, read imo
<eam>
system "foo && bar && baz" # either of the three commands may fail, and $?.success? will tell you
<snath>
I've just wasted hours because somebody broke Net::SSH. Now I'm going to have to do everything manually. Thanks a lot for fucking up Jamis Buck's work.
skolman has quit [Ping timeout: 272 seconds]
<phat4life>
eam: what is $?
<phat4life>
a ruby object?
<snath>
return bvaule
<eam>
when system() runs and wait()s on the subprocess it puts the returned values from wait() into the magic global $?
arturhoo has joined #ruby
<eam>
this is bash convention
sailias has joined #ruby
<eam>
bourne, rather
<eam>
same as $? in your shell
yfeldblum has quit [Ping timeout: 244 seconds]
<eam>
(except it's a bit of a more complicated class in ruby)
PeterBoy has quit [Remote host closed the connection]
<phat4life>
i see
ki0 has joined #ruby
thsig has quit [Remote host closed the connection]
<phat4life>
well, right now this runs as a delayed_job, and it retries and eventually works
thsig has joined #ruby
<eam>
system "thing"; raise "thing failed: $?" unless $?.success
thagomizer has quit [Quit: Leaving.]
<eam>
that'll tell you where things are failing
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phat4life>
cool I will try that thank you
<orionstein>
alternately write a working bash script and then call it
<eam>
nah, avoid bash at all costs
<eam>
it's super dangerous
<eam>
in fact, the very best thing would be to remove the shell bits from those system() calls
<phat4life>
well, i am not sure how else to consistently pull down a git repo
wjimenez5271 has joined #ruby
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
phat4life: what you're doing is ok, but if you wrap system() into something that does what you want like run_command() which checks $? and raises and works with arrays vs shell strings that's optimal
<phat4life>
i see
<eam>
(not using && and other shell-isms)
patrick99e99 has joined #ruby
justinmburrous has joined #ruby
<eam>
the danger of shell is that it's all based around interpolating variables into strings and eval'ing them
dawkirst has joined #ruby
<eam>
so for example, what if PANDY_CONFIGS["tmp_dir"] has a semicolon in it?
rshetty_ has quit [Remote host closed the connection]
<eam>
or a space
<eam>
quoting properly in shell is prohibitively difficult
thsig has quit [Ping timeout: 260 seconds]
clauswitt has joined #ruby
Alayde has joined #ruby
jasooon has joined #ruby
manzo has quit [Quit: Leaving]
emmesswhy has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<Alayde>
Hey folks. I'm trying to use Ruby's nifty splat operations to convert a 6 element array to a hash, but the hash = Hash[*array] is only returning a hash with one key value pair rather than three. Any idea why?
<phat4life>
yeah I am aware of the danager, however, its all managed in configs mostly
iamjarvo has joined #ruby
<orionstein>
i guess, ""$1"" would quote to a certain point
<phat4life>
all this is being replaced with chef scripts at some point so I don’t really care as long as it works for now
carraroj has joined #ruby
robbyoconnor has joined #ruby
<eam>
phat4life: sure, just trying to encourage best practice
<Hanmac>
Alayde: hm what happen if you try hash = Hash[array] or hash = array.to_h ?
<phat4life>
yeah, i am not always aware of that . Thank you for your help and suggestions
<eam>
once you write a proper wrapper around system() to handle errors and so on it's easy to enforce passing tokenized args
<Alayde>
TypeError: wrong element type String at 0 (expected array)y
<Alayde>
The former command just spews that same error, but like 8 times
gengmao has quit [Ping timeout: 250 seconds]
sk87 has joined #ruby
bricker`work has joined #ruby
compuser has joined #ruby
emocakes__ has quit []
jasooon has quit [Ping timeout: 260 seconds]
sk87 has quit [Client Quit]
skolman has joined #ruby
<eam>
orionstein: the Shellwords module has some quoting functions, but it gets messy when multiple shells are involved (or when you don't know how many levels of interpolation exist)
<Hanmac>
Alayde: i think i can smell the problem, can you show us one of the Arrays ?
<eam>
avoid the shell for the same reason you'd use placeholders instead of interpolating strings into sql queries
dawkirst has quit [Remote host closed the connection]
<Alayde>
Hanmac: absolutely.
dte has quit [Read error: Connection reset by peer]
<Alayde>
here it is: ["0B", "/tmp/test/file1", "0B", "/tmp/test/file2", "0B", "/tmp/test/file3"]=> nil (ecah element is a string)
mattmcclure has joined #ruby
threesixes has quit [Quit: SATAN!!!!!!!!]
bri_ has joined #ruby
<Alayde>
Also it may help by saying my goal is a hash that will have file paths and their corresponding byte values
ryanleesipes has joined #ruby
<eam>
Alayde: Array#to_h takes pairs, ala [[a,b],[c,d]]
<eam>
Hash[] will take a list, though
dawkirst has joined #ruby
<eam>
also, you will lose data because you repeat keys
<Alayde>
ah hah, that explains it
<eam>
you probably want to make your values into arrays
compuser has quit [Ping timeout: 244 seconds]
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Stalkr_ has joined #ruby
greenride has joined #ruby
<orionstein>
eam, yeh, my only thought was for the use case he is trying to fill, it's so system dependant (git, openssl, chmod perms as sudoer setup correctly) and that the variable use is mostly straightforward, it could be quicker to have the system run the scenario
<Hanmac>
Alayde: look at the keys
jimmyhoughjr has joined #ruby
AtumT has quit [Ping timeout: 245 seconds]
alem0lars has quit [Ping timeout: 250 seconds]
<Alayde>
eam, Hanmac: Yeah I forgot about the duplicate keys thing. Chalk it up to a dumb-shit moment on my part lol
<Alayde>
appreciate the help though
agrinb has quit [Remote host closed the connection]
cina has quit [Ping timeout: 240 seconds]
<greenride>
Are there any Ruby gems that provide additional methods for Hashes and Arrays? In particular, I want functionality such as deep search, methods for hash access that handles nils instead of erroring out, etc. Are there any such gems?
justinmburrous has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
<Alayde>
Hanmac: Well kind of, but instead of having the byte value be the key I'd rather the file name be the key and the byte size be the value. But that is an incredibly nifty bit of ruby that I'll keep stashed away
cina has joined #ruby
dawkirst has quit [Remote host closed the connection]
jbueza has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
qmfnp_lunch is now known as qmfnp
cocotton has quit [Remote host closed the connection]
agrinb has joined #ruby
yetanotherdave has joined #ruby
mrcloud_ has joined #ruby
ki0 has quit [Remote host closed the connection]
ki0 has joined #ruby
dc___ has joined #ruby
Fire-Dragon-DoL has joined #ruby
thalweg has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
phat4life has quit [Quit: phat4life]
jottr has quit [Quit: WeeChat 1.0]
<mrcloud_>
hello. Quick question. How do you do polymorphism in ruby? how can I define an abstract class (like java) with attributes common to classes inheriting from the super class?
yetanoth1rdave has joined #ruby
justinmburrous has joined #ruby
wolves_cs has joined #ruby
RyanV has joined #ruby
echevemaster has joined #ruby
jelera has joined #ruby
jottr has joined #ruby
tectonic has joined #ruby
ClarKing has joined #ruby
<wallerdev>
>> class AbstractClass; def wow; 5; end; end; class Cow < AbstractClass; end; Cow.new.wow
coderdad has quit [Remote host closed the connection]
RyanV has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 272 seconds]
coderdad has joined #ruby
dumdedum has quit [Quit: foo]
dte has quit [Remote host closed the connection]
<greenride>
Are there any Ruby gems that provide additional methods for Hashes and Arrays? In particular, I want functionality such as deep search, methods for hash access that handles nils instead of erroring out, etc. Are there any such gems?
kirun has joined #ruby
RyanV has joined #ruby
startupality has quit [Quit: startupality]
dukedave has left #ruby [#ruby]
emmesswhy has quit [Quit: This computer has gone to sleep]
<Hanmac>
greenride: ActiveSupport does add many useless shit but i dont trust it ... mostly because they still dont get the file size standard right after more than TEN YEARS!!!
Hobogrammer has quit [Ping timeout: 245 seconds]
<wallerdev>
lol
<wallerdev>
theres 2 ways to represent file sizes though
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
dANO has quit []
cocotton has joined #ruby
<Hanmac>
1000Byte = 1KiloByte OR 1024Byte = 1KibiByte ... AS does 1024Byte = 1KiloByte
ki0 has quit [Remote host closed the connection]
<wallerdev>
no one uses mibibytes etc
<wallerdev>
its a failed concept lol
<wallerdev>
to try to clarify things
Takle has quit [Remote host closed the connection]
<Hanmac>
hm maybe but just using the old values is just wrong ...
leizzer has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrewjanssen has joined #ruby
freerobby has joined #ruby
beneggett has quit [Ping timeout: 260 seconds]
IceDragon has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
elwin has joined #ruby
elwin is now known as Guest62841
thsig has joined #ruby
<greenride>
jesteracer: There is no recursive search in active_support_core.
<Hanmac>
hm for example gnome-system-monitor does use MiB for the process size but GB for the filesystem sizes
afhammad has quit []
justinmburrous has quit [Remote host closed the connection]
Guest62841 is now known as elwinovd
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<elwinovd>
how can I convert and string to class name? I have a attribute with values in [multichoice, truefalse, etc] and I want to parse this to a class (MultichoiceQuestion, TrueFalseQuestion, etc]. Is is possible?
<greenride>
jesteracer: I checked that one before posting the question here.
niftylettuce has joined #ruby
<wallerdev>
elwinovd: you might want to just do a hash, like {"truefalse" => TrueFalseQuestion} if you're just gonna use randomly named strings haha
timonv_ has joined #ruby
MaciejCzyzewski has joined #ruby
<elwinovd>
wallerdev: maybe... I could have a parent class with the hash and a method getQuestion(type). yeah..
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mynameisbrian has joined #ruby
MaciejCzyzewski has quit [Client Quit]
<wallerdev>
sure
jottr has joined #ruby
Hobogrammer has joined #ruby
<mynameisbrian>
can someone provide a resource for learning ruby, for an advanced programmer? http://learnrubythehardway.org is a little annoying to go through. and Ruby's core docs are weird
yfeldblum has joined #ruby
<mynameisbrian>
well I found programming ruby, I guess I can use this
yetanoth1rdave has joined #ruby
<jnylen>
Could someone help me? https://gist.github.com/jnylen/77c18db68a43b6430869 If the file exists the .matches one return a: #<Names:0x000000042b6e80> while replacing it without the ".matches" it returns the data correctly
ki0 has joined #ruby
claymore has joined #ruby
<wallerdev>
you shouldnt interpolate like that, leads to sql injection
<wallerdev>
right?
<wallerdev>
maybe rails is magic haha, been awhile
cherwin has joined #ruby
mary5030 has joined #ruby
<jnylen>
Everytime I tried using a sanitizer it just keeps adding them and couldnt find a title at tall
jhass|off is now known as jhass
PeterBoy has quit [Remote host closed the connection]
<jnylen>
and the data is from a safe source
hamakn has quit [Remote host closed the connection]
postmodern has joined #ruby
mylar has quit [Ping timeout: 246 seconds]
hamakn has joined #ruby
jay__ is now known as rubyonrailed
<wallerdev>
not sure what you're doing but @names.each is going to return @names, not what you put in there
apeiros_ has quit [Remote host closed the connection]
txdv_ has joined #ruby
mityaz_ has joined #ruby
rkalfane has joined #ruby
apeiros has joined #ruby
<eka>
jhass: mmm... there is this legacy code that uses some keys as string and some as symbols, now I'm automating this and saving that hash to reds hence .to_json... so when parsing all that will be messed up... if not already ;)
<eka>
jhass: so I need that hack
<jhass>
no chance to fix the code instead?
txdv has quit [Ping timeout: 258 seconds]
justinmburrous has quit [Remote host closed the connection]
<eka>
jhass: not now
<eka>
jhass: why?
<jhass>
would be a lot cleaner
<eka>
jhass: big legacy code though... afraid to break it now...
<eka>
jhass: was looking to hashie but it's pretty big
<mnms_>
jhass: and later put it again ont the first place ?
jrhe_ has joined #ruby
<jhass>
mnms_: if you really need it to be in, yeah (.unshift)
IceDragon has joined #ruby
<jhass>
eka: well, it's not too hard to implement, just subclass Hash and override the [] method?
tkuchiki has quit [Ping timeout: 245 seconds]
<eka>
jhass: yes I was just thinking that
<jhass>
eka: if hashie is too big for you you don't want to pull activesupport either I guess
rkalfane has quit [Client Quit]
dte has joined #ruby
<Hanmac>
just overriding [] is not enough for that
<eka>
jhass: not a chance :P
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pothibo has joined #ruby
<mnms_>
jhass: but I would need to remember this data... Would be perfect to have one line recciept
dte has quit [Read error: Connection reset by peer]
apeiros has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
<Hanmac>
depending the input haying symbol and both string keys might make sense ... like in one of my stuff i had symbol keys for the user input and string keys for json and xml parsing
dte has joined #ruby
<jhass>
mnms_: btw. you're describing the solution you think you need, it can also help to describe the actual problem
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eka>
Hanmac: yes this is a .exe resource finder... so the Resource numbers are string keys... the rest are symbols... so maybe I should do a normalize util that will fix it after reading it from redis...
strax has quit [Quit: Connection closed for inactivity]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
luckyruby has quit [Remote host closed the connection]
<mnms_>
jhass: I have duplicating rows which have first element different. I need to remove duplicating rows.
phat4life has left #ruby [#ruby]
<jhass>
mnms_: .uniq {|row| row[1..-1] }
<Hanmac>
eka i did: name = opt[:name] || opt["name"] || "default"
patrick99e99 has quit [Ping timeout: 246 seconds]
<wallerdev>
dont you need to do uniq_by
<mnms_>
jhass: beautiful
<wallerdev>
or am i misremembering haha
luckyruby has joined #ruby
<eka>
Hanmac: yes, the thing is that I working on a feature, and this feature relies on legacy code I don't want to touch. so for saving it to redis will have to do .to_json and after reading it will have to fix it to work with the legacy code
Musashi007 has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
lun_ has joined #ruby
lw has quit [Quit: s]
rkalfane has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tuelz>
what kind of error should I raise if a method is checking for the correct data input? e.g. all arrays should have 3 elements but one array has two
cocotton has quit [Remote host closed the connection]
<tuelz>
allcentury: btw, did you change your irc client to prepend with @ or does your client do that by default?
timonv_ has quit [Ping timeout: 260 seconds]
<tuelz>
I was going to look into doing that for a hipchat irc integration, since hipchat uses @ for highlights, but you've just reminded me :)
silkfox has quit [Ping timeout: 260 seconds]
<allcentury>
honestly tuelz I just got back on IRC today after a... gulp... 15 year gap. I just started using irssi 20 minutes ago
rkalfane has quit [Ping timeout: 245 seconds]
camt has quit [Ping timeout: 244 seconds]
rkalfane has joined #ruby
<tuelz>
heh so I presume you typed @ and it wasn't a client autocomplete? :p if so typing the first few identifying chars of someones name in a room should have tab completion in most clients :)
<allcentury>
tuelz: indeed it does, thanks for that :)
<tuelz>
irssi is good, I've found more interesting dotfiles on weechat, but irssi basically can do everything weechat can do. Just harder to find neat dotfiles from neckbeards who are good at pimping out irc clients :p
<Hanmac>
my client does autocomplete without the @
havenwood has quit []
olivier_bK has joined #ruby
Mattias has quit [Ping timeout: 258 seconds]
justinmburrous has joined #ruby
<eam>
one of the networks I'm on is unfortunately a slack gateway, so everyone uses @name:
claymore has quit [Quit: Leaving]
<tuelz>
Hanmac: the problem is I wan autocomplete to prepend with `@` because a special jabber messaging platform (hipchat) uses that for highlights. I want to use irc to talk with people on hipchat and not have to autocomplete, then go back and enter a @ at the front
Mattias has joined #ruby
apeiros has joined #ruby
<allcentury>
tuelz: weechat looks great! it works fine in tmux too I take it?
iceden has quit [Ping timeout: 258 seconds]
robbyoconnor has joined #ruby
<tuelz>
allcentury: I'm talking to you inside a remote tmux session right now :p
shosti has quit [Ping timeout: 245 seconds]
jimmyhoughjr has joined #ruby
<allcentury>
tuelz: alright then, time to go try this out - back in a few!
luckyruby has joined #ruby
allcentury has quit [Quit: leaving]
iceden has joined #ruby
cocotton has joined #ruby
mrcloud_ has quit [Quit: Page closed]
dangerousdave has joined #ruby
Sharker has quit [Remote host closed the connection]
Techguy305 has quit [Ping timeout: 272 seconds]
PeterBoy has quit [Remote host closed the connection]
daynaskully has quit [Ping timeout: 258 seconds]
allcentury has joined #ruby
schaerli has joined #ruby
cocotton has quit [Remote host closed the connection]
<allcentury>
OooOooo weechat is very n ice
<tuelz>
allcentury: lol thanks for sidetracking me now I'm playing with new weechat configs....
<allcentury>
haha
cocotton has joined #ruby
<tuelz>
allcentury: check out dotshare.it for good configs with pics
digifiv5e has joined #ruby
<tuelz>
brb changing configs :p
tuelz has quit [Quit: WeeChat 1.0]
digifiv5e is now known as Guest48946
tewlz has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has quit [Ping timeout: 272 seconds]
larissa has quit [Quit: Leaving]
ivmx has joined #ruby
patrick99e99 has joined #ruby
ki0 has joined #ruby
skolman_ has joined #ruby
tewlz has quit [Client Quit]
chrishough has joined #ruby
graydot has quit [Quit: graydot]
robbyoconnor has quit [Quit: Konversation terminated!]
<shevy>
so if person A writes: def foo, and you write def foo, what happens?
<skfax>
shevy: I don't know the value to set if I don't already have one, but foo has a default I want to use (however not defined as a default on the parameter) - so if my_value is not defined I would like to not pass a parameter at all for that keyword
<shevy>
is that a keyword?
<shevy>
that looks like a hash to me
alem0lars has quit [Client Quit]
jontmorehouse has joined #ruby
yacks has joined #ruby
gengmao has joined #ruby
<skfax>
yeah true it probably is, but the questios remains
<skfax>
question*
alem0lars has joined #ruby
alem0lars has quit [Client Quit]
shosti has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
<shevy>
well, see. you wrote "parameter bar"
<shevy>
but it is a hash
<shevy>
so it has a key called: :bar
<shevy>
so you must assemble the proper hash before passing it to foo()
<shevy>
and inside method foo, you can act on the information that you gave to that hash
fantazo has quit [Quit: Verlassend]
<skfax>
hmm true i'll try to assemble the hash properly before calling the method
tbrock_ has joined #ruby
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<blassin>
having some problems with importing rake tasks from a gem I'm writing
devdazed has quit [Ping timeout: 258 seconds]
<Phrogz>
blassin: Don't ask to ask, just ask. :) Describe your problems: what are you doing, what did you expect, what is happening instead?
Lewix has quit [Remote host closed the connection]
jasooon has joined #ruby
<blassin>
oh ok, sorry
startupality has joined #ruby
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blassin>
so, I have my gem's tasks in /lib/tasks, and I load them from /lib/tasks.rb, and the files end in .rake
<blassin>
I know Rake is reading them, because the puts statement in them outputs text
<blassin>
but they don't show up on rake -T on a project I use the gem
<blassin>
I'm at a loss as to why Rake reads them, but doesn't add them to the task list
Mattx has joined #ruby
obscured has joined #ruby
startupality has quit [Client Quit]
<benlieb>
blassin: did you provide a description?
<blassin>
hmm... no :D
<Mattx>
How do you check if a class inside a module has a certain method? for instance method "foo" in class "Bar" inside module "MyMod" (MyMod::Bar::foo)
TorpedoSkyline has joined #ruby
<blassin>
benlieb: damn, that was it!
<benlieb>
blassin: I think -T only works for things with a description
<skfax>
shevy: Thanks for the input :) Ended up setting up the hash with the parameters I needed, then calling the method using foo(**params)
<blassin>
I thought without a description they would still be listed
<Phrogz>
Mattx: respond_to? is for if the object you are asking can receive the method. In this case you are getting a reference to the class object (which does not respond to doit()), not an instance of that class.
pasties has left #ruby ["nipping out for a bit"]
<Phrogz>
If you have an instance of that class, then you don't need any const_get, and can just respond_to?()
pasties has joined #ruby
graydot has quit [Client Quit]
<Mattx>
make sense!
alexherbo2 has joined #ruby
orionstein has joined #ruby
<Phrogz>
i.e. class Foo; def bar; end; end; Foo.new.respond_to?( :bar ) && Foo.instance_methods.include?( :bar )
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Phrogz>
Qt Designer and Qt layouts. I'm moderately determined to make this work.
geggam has joined #ruby
msmith_ has quit []
justinmburrous has quit [Remote host closed the connection]
manzo has joined #ruby
ClarKing is now known as Hper
<Phrogz>
But damn, man, with Qt, it's almost like the language you are using is irrelevant. You have to learn QT THE ALL KNOWING
<shevy>
ah yes now I remember
<shevy>
you were the qt guy, I need to remember that
<Phrogz>
Not yet I aint, but I aims to be :)
mleone has joined #ruby
kaspertidemann has quit []
Stalkr_ has quit [Quit: Leaving...]
freerobby has joined #ruby
fabrice31 has joined #ruby
<Phrogz>
Plus, we're doing a lot of work with realtime cubic Béziers here at work, so I'm leveling up my knowledge there.
<shevy>
I could not even get it to compile
roolo has joined #ruby
<shevy>
qtcore/x_6.cpp:1891:29: error: 'PlatformPanel' is not a member of 'QEvent' smoke/qtcore/CMakeFiles/smokeqtcore.dir/build.make:239: recipe for target 'smoke/qtcore/CMakeFiles/smokeqtcore.dir/x_6.o' failed
freezey has quit [Remote host closed the connection]
<shevy>
I remember like 5 years ago when I last tried it
<shevy>
it worked
<Phrogz>
shevy: If you care to try again, it required (for me) non-64-bit Ruby, a specific cmake version, and installing the qtbindings gem.
Pupeno has quit [Remote host closed the connection]
binw has quit [Ping timeout: 272 seconds]
papile has quit [Quit: papile]
JohnBat26 has quit [Ping timeout: 240 seconds]
sevvie has quit [Ping timeout: 272 seconds]
shlant has joined #ruby
michaeldeol has joined #ruby
kaplejon has quit [Ping timeout: 272 seconds]
waxjar has quit [Ping timeout: 272 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skammer has quit [Ping timeout: 272 seconds]
<shlant>
hi all! if I had a variable containing a string like '/home/deploy/app/releases/299546d9b0eb498c3b1515cfe73e713bff173053', what is the best way to reference just the hash?
Tricon_ has joined #ruby
oso|away is now known as oso96_2000
binw has joined #ruby
<crome>
there are several ways, you can split it at slashes, which is pretty good as long as your directories don't have slashes
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
matchaw_ has quit [Ping timeout: 258 seconds]
MCDev has joined #ruby
kaplejon has joined #ruby
<shlant>
crome: they won't, the only thing that would change is the app name