<canton7>
actually ruby -e "puts ARGF.lines.count" is shorter and clearer
<erikh>
except for the fact that if the file is bigger than available memory...
robie1373 has joined #ruby-lang
<drbrain>
erikh: should be fine, lines returns an Enumerator
<erikh>
ah
<drbrain>
canton7: but then you miss out on learning about BEGIN, END and -n
<erikh>
you know
<erikh>
I think drbrain's line is valid perl too
<erikh>
down to the CLI args
<lianj>
yikes
headius has quit [Quit: headius]
<drbrain>
erikh: puts was not happy, but this works: -ne 'BEGIN { $c = 0 }; $c += 1; END { print("$c\n") }'
<erikh>
oh yeah
<erikh>
puts.
toretore has quit [Quit: This computer has gone to sleep]
rippa has quit [Ping timeout: 252 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
<zenspider>
why do I get the feeling these are job interview questions?
<erikh>
heh
mikeric has joined #ruby-lang
<lianj>
i dont get the job with read.split.count? aw :(
neocoin has joined #ruby-lang
<zenspider>
can someone on linux tell me what the -T flag for ld is?
<zenspider>
(I'm assuming this is a linux toolchain-ism)
<lianj>
-T scriptfile "Use scriptfile as the linker script. This script replaces ld's default linker script …"
qpingu has quit [Quit: Leaving.]
<zenspider>
crapity. I don't have that equivalent. kk. thanks.
towski has quit [Ping timeout: 246 seconds]
sailias has joined #ruby-lang
towski has joined #ruby-lang
Rezwan has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
Berglund has quit [Quit: Computer died.]
andrewhl has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
qpingu has joined #ruby-lang
htroyack has quit []
neoesque has joined #ruby-lang
<Rezwan>
what is the best place to start learn Ruby for a fresher?
igotnolegs has joined #ruby-lang
towski has joined #ruby-lang
<zenspider>
do you know how to code in something else?
<countdigi>
could someone give me a pointer as to what im doing wrong w/ null object ala rspec? https://gist.github.com/3173677
bassir has joined #ruby-lang
bassir has quit [Client Quit]
<zenspider>
clone doesn't take args
Rezwan has quit [Read error: Connection reset by peer]
<countdigi>
ah shit
<countdigi>
tx
<countdigi>
dammit reserved keywords bites my ass again
Rezwan has joined #ruby-lang
<countdigi>
tx bro
<drbrain>
countdigi: it's not reserved
<zenspider>
1) not a bro. 2) not a reserved keyword
<zenspider>
(ie, you're hitting Object#clone)
<countdigi>
heh touche
neoesque has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
<countdigi>
may i rephrase and say my kindest respects to you and drbrain for your elucidation
mrsolo has quit [Quit: Leaving]
towski has joined #ruby-lang
outoftime has quit [Quit: Leaving]
<countdigi>
i hear ya ... wasnt reserved ... my old slang for "anything that bubbles up and i dont realize" ... tx agian
dc5ala has joined #ruby-lang
gix has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 246 seconds]
<countdigi>
i know i get beat up asking questions in this forum but i appreciate the hard knocks answers and promise i shall learn from the bruises :-)
towski has quit [Remote host closed the connection]
gix has joined #ruby-lang
mikeric has quit [Read error: Connection reset by peer]
mikeric has joined #ruby-lang
ttilley_off is now known as ttilley
bassir has joined #ruby-lang
<bassir>
hello
kain has quit [Quit: quit]
<bassir>
So, I have 3 variable names I want to assign to 3 consecutive non-nil values from a method… how can I do that?
<bassir>
I want to map %w[a b c] to the three consecutive NON-NIL values of the function get(x)
<bassir>
So a = get(0), b = get(1), and if get(2).nil? then c = get(3). How can I do that?
<bassir>
Because ultimately, I want to do this for a very large array
Z33K|Lux has joined #ruby-lang
stardiviner has joined #ruby-lang
iamlacroix has joined #ruby-lang
sailias has joined #ruby-lang
<Rezwan>
what is the best place to start learn Ruby for a fresher?
iamlacroix has quit [Remote host closed the connection]
<banisterfiend>
Rezwan: either a book or ruby koans i guess
seanstickle has joined #ruby-lang
<Rezwan>
banisterfiend: thanks. what is ruby "koans" ?
dc5ala_ has joined #ruby-lang
<banisterfiend>
Rezwan: google it ;) but basically they're a set of exercises that you complete, i think they hold your hand through them so you lean about a topic before you complete them
<oddmunds>
sort of learn
WillMarshall has quit [Quit: Computer has gone to sleep.]
<countdigi>
Rezwan: the cool part is it is a test-driven learning so u write passing tests which is very satisfying (when they pass :-)
<Rezwan>
it sounds great :)
<banisterfiend>
oddmunds: hey oddity, how's life in the cold scandinavian north?
mikeric has quit [Read error: Connection reset by peer]
<oddmunds>
right
savage- has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 244 seconds]
<Rezwan>
oddmunds: what Scandinavian country are you from?
<oddmunds>
norway
mikeric has joined #ruby-lang
<Rezwan>
great
iamjarvo has joined #ruby-lang
<Rezwan>
oddmunds: it is now Autumn over there, right?
agilob has quit [Ping timeout: 252 seconds]
<oddmunds>
no
<oddmunds>
it's summer
agilob has joined #ruby-lang
<Rezwan>
ahh!
<oddmunds>
the seasons flip over the equator, not spin around the center
jrbing has quit [Ping timeout: 265 seconds]
<Rezwan>
I see
<oddmunds>
:P
<Rezwan>
oddmunds: how long the summer last at your place?
<oddmunds>
idk, i guess it sort of depends on what you mean by summer
<oddmunds>
but proper summer is maybe a couple of months
<Rezwan>
ah!!
<Rezwan>
and a proper winter? ;)
<oddmunds>
that depends a little on where in norway you are
<oddmunds>
i spend my summers in the south and my winters in oslo (pretty much the south too)
<Rezwan>
hmmm!
<Rezwan>
wow!
<oddmunds>
but i guess we've got a proper winter for a little longer than summer
<Rezwan>
yes it should be
<oddmunds>
since we live so far from the equator, the seasons are more extreme than it would be if we were cloer
<Rezwan>
yes very close to Arctic
<banisterfiend>
Rezwan: are you from malaysia?
Axsuul has quit [Ping timeout: 252 seconds]
<Rezwan>
banisterfiend: why do you think I'm from Malaysia? ;)
<banisterfiend>
Rezwan: because i know someone from malaysia with a name similar to yours
<banisterfiend>
but his name is ridzwan
Axsuul has joined #ruby-lang
<Rezwan>
ahh haha
<Rezwan>
not I'm not from Malaysia
<Rezwan>
I'm from Bangladesh
<banisterfiend>
ah, even more exotic
<Rezwan>
LOL!
<Rezwan>
where are you from banisterfiend ?
brownies has left #ruby-lang [#ruby-lang]
<banisterfiend>
Rezwan: nouvelle zelande
* Rezwan
looks for google translator
<Rezwan>
great :D
<Rezwan>
do you speak French? ;)
<banisterfiend>
Rezwan: Nope
<Rezwan>
বুঝতে পারছি!
<Rezwan>
I guess it is full winter over there at New Zealand
Berglund has joined #ruby-lang
WillMarshall has joined #ruby-lang
jrbing has joined #ruby-lang
<banisterfiend>
Rezwan: yes, pretty cold
<banisterfiend>
Rezwan: is it cold for you?
iamjarvo has quit [Ping timeout: 244 seconds]
<Rezwan>
not it is monsoon here right now
<Rezwan>
and winter is never that cold here. temperature doesn't go below zero
iamjarvo has joined #ruby-lang
<banisterfiend>
Rezwan: so you've never seen snow?
<Rezwan>
nope unfortunately
<Rezwan>
coldest temp I've ever felt is like 5 degree celsius
<banisterfiend>
Rezwan: we have large slabs of snow by the side of the road while we drive passed, large meaty and white like the inner thigh of a woman
<banisterfiend>
Rezwan: have oyu travelled to europe?
<Rezwan>
banisterfiend: I've never been outside of my country
<Rezwan>
banisterfiend: do you write poem? "white like the inner thigh of a woman" sounds very poetic ;)
<banisterfiend>
Rezwan: haha no, i just had an urge to say it
S1kx has quit [Read error: Connection reset by peer]
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
<zenspider>
masterkorp: yup. that's a syntax error.
<zenspider>
'Mysql2:Client.new' is not valid
<masterkorp>
oh :: ?
<zenspider>
yup
<masterkorp>
i am sorry
<masterkorp>
20 hours awake
<zenspider>
also: bad name: getValue -> value. don't use CamelCase for methods. use your return and space keys more. don't mix class and instance methods ... the latter two won't work at all.
<masterkorp>
why not camelcase ?
<zenspider>
BecauseThatIsNotHowWeDoThingsHere
<masterkorp>
why the latter two wont work at all ?
<zenspider>
because you don't understand instance vs class methods
<masterkorp>
please bare with me
<zenspider>
very important distinction
Sambalero has quit [Remote host closed the connection]
<drbrain>
masterkorp: you are not doing it correctly
<masterkorp>
can you explan ?
<zenspider>
@var is an instance variable... it is owned by whomever 'self' is at the time it is accessed.
<zenspider>
in def x; @var; end @var belongs to whomever 'self' is... so o = Obj.new; o.x
<zenspider>
@var would be o's
<zenspider>
but when you call X.classmethod, 'self' is X
benjammin891 has joined #ruby-lang
<masterkorp>
so i shold just remove the self keyword ?
<masterkorp>
help my old C brain
<zenspider>
you shouldn't _just_ do anything. you should learn the distinction because these are the bare basics of OO.
benjammin891 has quit [Quit: Leaving]
<zenspider>
I'd hope that if I was terribly confused about pointers in C, you wouldn't let me _just_ switch some syntax to make it work w/o understanding wtf I was doing.
mikeric has quit [Quit: mikeric]
seanstickle has quit [Quit: Nihil sub sole novum]
<masterkorp>
sure when i get some sleep and dont have to fix others people stuff at 4am for a deadline at 11am today
<masterkorp>
i understand you i really do
<masterkorp>
but please
<zenspider>
this code really shouldn't go into production
<zenspider>
line 9: security problems... 15... 20... all security problems
<rue>
Pretty sure the mysql driver supports thingy with the thingy safety
iamjarvo has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
rue: hey rue
<rue>
Also, damn it, I should use a real IRC client so that I could script parting all the channels that require ident so that I can change to an identified nick…
<rue>
Or, you know, identify that other one…
<banisterfiend>
rue: what client do you use
<rue>
Limechat
<banisterfiend>
yeah..
<banisterfiend>
it's still better than colloquy though
<banisterfiend>
that thing is a piece of shit, in fact there's no nice graphical irc clients on osx afaict
<certainty>
irssi ftw
apeiros_ has joined #ruby-lang
<banisterfiend>
apeiros_: hey bb, have u checked out the new prompty thingies yet
<erikh>
banisterfiend: yes I knwo
<banisterfiend>
certainty: yucky terminal client
<erikh>
I have been very busy with work.
<apeiros_>
banisterfiend: nope. but I'm currently setting up the new laptop. and replacing irb completely with pry is part of it :)
<banisterfiend>
erikh: np, u're on reddit, bad luck teh site went down :P
<certainty>
banisterfiend: yupp, but why do i need a shiny gui when i have my irssi running in a screen on my server?
<banisterfiend>
erikh: u see u're on reddit right?
<apeiros_>
also replacing bbedit with sublime
<certainty>
all i do is type :)
<banisterfiend>
certainty: well if i wanted a terminal irc client, i'd just use ERC (emacs client). In fact, maybe i should just do that :)
<banisterfiend>
limechat is a bit lulz, thought it's kinda nice in some ways
<certainty>
erc is fine, but like irssi better
Jay_Levitt has quit [Quit: Leaving...]
<Spaceghostc2c>
weechat is better than both for sure.
<Spaceghostc2c>
certainty: Screen and not tmux?!
<banisterfiend>
certainty: well ERC is arguably better for an emacs user :)
<certainty>
Spaceghostc2c: i'm oldschool. But i'm thinking about a switch
<apeiros_>
banisterfiend: the prompt stuff is already in the gem or do I have to get head?
<certainty>
i'm yet familiar with tmux
<banisterfiend>
apeiros_: it's in the gem
<certainty>
+not
<banisterfiend>
apeiros_: undocumented though, as it's just an easteregg 4 u
<Spaceghostc2c>
apeiros_: When possible, always get head.
<Spaceghostc2c>
:p
<banisterfiend>
apeiros_: but when u get going i can tell u how to use it
<Spaceghostc2c>
certainty: Mine has some screen-like bindings, but also vim-like ones. If you want, you can check out my tmux-config repo on github. Spaceghost/tmux-config
<certainty>
banisterfiend: i am an emacs user but i don't use ERC because i want my screen session.
<Spaceghostc2c>
Nothing super well done yet.
<certainty>
Spaceghostc2c: will do
<banisterfiend>
certainty: oh ok.
<apeiros_>
banisterfiend: ok
<Spaceghostc2c>
No worries if my configs suck for you. Tmux is just in active development, has better features that screen doesn't have and improves on ones it does have.
<banisterfiend>
apeiros_: we even have railscasts and github themes :))
<apeiros_>
^^
<apeiros_>
gonna do that
<Spaceghostc2c>
banisterfiend: I made a railscast stylesheet. :D
<banisterfiend>
Spaceghostc2c: cool, hey check out pry-theme and tell me what u think
<Spaceghostc2c>
banisterfiend: That's really cool though. I want to read about all the cool pry-stuff I can use in one place! Do you have such a treat for me?
<banisterfiend>
Spaceghostc2c: well, we're building a package manager command that'll make installing/using plugins a lot simpler, but currently check it here: https://github.com/pry/pry/wiki/Available-plugins
<Spaceghostc2c>
banisterfiend: I can make the stylesheet more readable, I just wrote it in one of those 4am frenzies.
<Spaceghostc2c>
banisterfiend: Pretty close for sure!
<banisterfiend>
Yeah, feel free to tweak our theme if you dont think it's quite right
<certainty>
nice i can have zenburn in pry
<Spaceghostc2c>
banisterfiend: I'll definitely start incorporating it into my workflow. I know you likely get this question a lot, but how close to a ruby-debug replacement is it?
<banisterfiend>
Spaceghostc2c: so the answer is: It's not so much as a replacement, but more of another front-end to it. As we depute to debugger under the scenes, but the interface is all pry
<certainty>
wow i didn't realize pry was such a beast. There is even pry-remote
<banisterfiend>
imagine 5 people all in the same pry session
<banisterfiend>
chatting to eachother and manipulating the same objects
wallerdev has quit [Quit: wallerdev]
<banisterfiend>
though all the times we've done that, we've just been attacking one another, changing eachother's prompts, breaking into oneanother's pry instances :P
<banisterfiend>
certainty: the main thing is i didnt want to tie pry to emacs, but i'd love if a 3rd party wanted to do an emacs version
<certainty>
banisterfiend: yupp, but i was not serious. One would have to do alot more to get proper slime integration as it's pretty much targeted on lispy languages
<banisterfiend>
certainty: we have something even more powerful than slime (IMO, anyway) in the works ;)
<certainty>
but it can be really nice to have thread running pry-remote that can be used to hotpatch you app (scary in a way, but nice as well)
<certainty>
banisterfiend: what is it?
<banisterfiend>
certainty: secret project :P hopefully finished in a couple of months
<certainty>
alright
<banisterfiend>
certainty: yeah, a guy was telling me about that the other day, he used pry + pry-remote in production
<banisterfiend>
certainty: he had it running on a deployed app, when it crashed, pry caught the error, opene da pry-remote socket, and emailed him waking him up at 3am
<banisterfiend>
he the connected, fixed the bug, and had the app continue on its way
<banisterfiend>
pretty cool, but i think pry-remote-em is a better choice for that with its security features and so on
<Spaceghostc2c>
banisterfiend: How did you get into this whole pry mess? Like, how'd you drop into ruby as well as C and all that?
<certainty>
yes, definitly. You want authentication and tls
krz has quit [Quit: krz]
<banisterfiend>
Spaceghostc2c: well the first year of my ruby usage i just wrote weird hacks in C. Then i started writing a real-time kind of interactive image editor and i wanted a REPL to drive it, so i wrote a simple runtime irb-clone. ANd i just gradually added more features to the repl that it broke off into its own project, and then replaced the original image editor thingy i was working on
<Spaceghostc2c>
banisterfiend: So you knew C fairly well before that?
workmad3 has joined #ruby-lang
<banisterfiend>
Yeah, i leanred C when i was 14 or so
<Spaceghostc2c>
banisterfiend: How recent are you now?
spinagon has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<banisterfiend>
what?
<certainty>
yo workmad3
<banisterfiend>
brb
<banisterfiend>
too hot here
* certainty
abandoned C/C++ as soon as it was possible
<certainty>
well mostly
<banisterfiend>
certainty: C is fun in MRI
franckverrot has quit [Quit: Connection closed for inactivity]
rippa has quit [Ping timeout: 244 seconds]
<banisterfiend>
Spaceghostc2c: i've been doing ruby about 3-4 years i think
<Spaceghostc2c>
banisterfiend: That's pretty awesome for sure, my friend.
<Spaceghostc2c>
Question, why you no hang out in the nifty offtopic channel?
lbrent_ has joined #ruby-lang
<Spaceghostc2c>
"Cause you're a fucktard, Spaceghost" is an acceptable answer.
<banisterfiend>
what channel are you talking about?
<banisterfiend>
#offtopic ?
<certainty>
banisterfiend: i can't imagine that C can be fun :) I do some things in C still. mostly bindings for chicken-scheme, but that's all. I'm happy that i don't have to use C/C++ much nowerdays. Though i did for almost 6 years in the past
<Spaceghostc2c>
banisterfiend: Invited you to the channel.
<banisterfiend>
i'll stop spamming now
<banisterfiend>
hehe
<certainty>
banisterfiend: heh remix allows some weired things. I wonder if there is some hackable MOP extension for ruby that allows to fiddle with its very internals like method dispatch and how methods are invoked across an inheritance hirarchy, maby even method combination
towski has quit [Remote host closed the connection]
<banisterfiend>
certainty: yeah, i was obsessed with MOP aroudn the time i wrote that
<banisterfiend>
i wanted to implement C3 linearization for ruby and proper multiple inheritance
<certainty>
did you succeed?
ryanf has quit [Quit: leaving]
<banisterfiend>
no, i realized it wasn't worth the effort. but i understood the algorithm and how to implement it, etc
workmad3 has quit [Ping timeout: 244 seconds]
<certainty>
nice thing to work on.
bnagy has quit [Remote host closed the connection]
<banisterfiend>
certainty: 'free' was evil enough, anyway :) i dont think any of that stuff works on 1.9.3 since they started hiding all their symbols
toretore has quit [Quit: Leaving]
<certainty>
banisterfiend: heh, i bet you see a lot of double free corruptions
<banisterfiend>
certainty: yeah, u gotta be careful ;)
<banisterfiend>
certainty: but it was use din production by a dude, and made a dramatic improvement to his app's performance
<banisterfiend>
it was just a cute hack though i've never used it myseflf
<certainty>
banisterfiend: i can imagine, that it may be useful. Possibly in tight loops creating lots of objects
<banisterfiend>
certainty: he was receiving huge strings every second, like megs in size
<banisterfiend>
cleaning up the large ones immediately seems to make things snappier
<certainty>
i can imagine
<certainty>
but maybe ruby isn't the best choice in that case, anyway
<banisterfiend>
certainty: it wouldn't be hard to implement an objc reference count system on top of it
<banisterfiend>
retain and release and so on
* certainty
has no clue about objc
<banisterfiend>
certainty: if you know C and you know Ruby, you already know objc ;)
<banisterfiend>
it's a perfect blend of the two
<banisterfiend>
IMO
Criztian has joined #ruby-lang
<banisterfiend>
if it wasn't for header files, i think i'd really like objc
<banisterfiend>
but header files always annoy me
savage- has quit [Remote host closed the connection]
<banisterfiend>
"oh...there's and *now* i have to update this other goddamn file too..."
<certainty>
all those NS in objc code
<banisterfiend>
certainty: you know what NS stands for rightt?
<banisterfiend>
certainty: i really like the hooks over inheritance design for cocoa
<certainty>
banisterfiend: nope, i'll do a quick duckduckgo search
<banisterfiend>
certainty: Next Step :)
<banisterfiend>
certainty: it's the company steve jobs created after he was booted out of apple
<certainty>
aha!
andrewhl has quit [Remote host closed the connection]
<certainty>
he sure loved to leave his marks
Z33K|Lux has quit []
<banisterfiend>
certainty: Yeah, you should look at cocoa sometime it's a pretty interesting design i think
<banisterfiend>
it just has hooks everywhere
<banisterfiend>
certainty: so, say we wanted to modify the behaviour of Hash, rather than subclassing it, we just create a normal Hash object, and then define a bunch of hooks for the object that modify the behavior.
<certainty>
banisterfiend: i don't own a mac, and i don't intend to change this. Is there cocoa for other unixes?
<erikh>
gnustep
<certainty>
banisterfiend: those hooks work on the method level? Such as before,after around methods?
<certainty>
erikh: thanks
yxhuvud has joined #ruby-lang
<banisterfiend>
certainty: i dont think there's fine grained hooks that can be defined for any method, but for accessor methods (like getters/setters) you can define observers that are notified when the setters are called..aside from that, the hooks are at the level of granularity that they think u need
<certainty>
banisterfiend: i see. But it still doesn't appeal me much :) I would rather want to dig deeper into other languages
<banisterfiend>
certainty: yeah, if you already know ruby and message passing style OO objc isn't that interesting maybe
<certainty>
yupp. I'd love to dig deeper into Haskell for example
<certainty>
maybe a bit of clojure, as it's a lispy language
solars has joined #ruby-lang
banisterfiend` has joined #ruby-lang
zmack has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Ping timeout: 246 seconds]
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
cantonic has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
lldong_ has joined #ruby-lang
cantonic has quit [Client Quit]
WillMarshall has joined #ruby-lang
lldong has quit [Ping timeout: 276 seconds]
lldong_ is now known as lldong
<certainty>
let's see how pry-debugger works
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
achiu has joined #ruby-lang
achiu has quit [Client Quit]
achiu has joined #ruby-lang
achiu has quit [Client Quit]
<zenspider>
maybe I'm just being stupid... but if an avi is wrapping up mpeg4 and I want it as an m4v to watch on my appletv... why the hell does handbrake reencode the whole thing? isn't it mostly in the format it wants? if not, shouldn't it be a SIMPLE amount of translation?
achiu has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
achiu has quit [Client Quit]
achiu has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
ruby-lang689 has joined #ruby-lang
tsou has quit [Ping timeout: 248 seconds]
face has left #ruby-lang [#ruby-lang]
lldong_ has joined #ruby-lang
faces has joined #ruby-lang
<faces>
zenspider: the specs (in handbrake) say mp4/m4v will only use mpeg4 from ffmpeg or x264, so it's possible your avi has another type
<banisterfiend`>
certainty: let me know how u get on either here or #pry
<zenspider>
certainly the audio needs encoding... but that usually takes about 2 minutes for a 30 minute stream
lldong has quit [Ping timeout: 246 seconds]
lldong_ is now known as lldong
<zenspider>
I wish these video tools weren't made by morons for morons... 4 billion flags and no doco worth reading :/
tooky has joined #ruby-lang
<apeiros_>
zenspider: aren't you the "read the source" kinda guy? :-p
<apeiros_>
(but yeah, agreed, had similar problems)
<zenspider>
we've tried. it isn't worth it
<faces>
zenspider: i dont think mpeg4-asp is one of the types mp4 can contain, iirc that's mpeg4 part 2 and mp4 wants mpeg4 part 10
concernedcitizen has quit [Remote host closed the connection]
<zenspider>
you are a smarter man than I... idgi... I don't think I really want to as humans have corrupted something that could be clean and simple into something monsterous like our time/date system.
tsou has joined #ruby-lang
<zenspider>
honestly... I just want to sit on the couch, watch a stupid TV show, and be dumb for a while
<faces>
yeah mpeg4 is a bit of a pain to deal with because it's a standard split into a ton of different parts
cantonic has joined #ruby-lang
<faces>
so even within the mpeg4 standard there's ~25 different parts that have different definitions
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
<faces>
it makes sense when you consider that mpeg4 is just a way to define av compression, it doesn't help that on the face of it it looks like 'mpeg4' is the only detail you need :(
gnufied has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
<zenspider>
five minutes until I can be stupid again!
<zenspider>
in the meantime... is there a homebrew formula for gcc cross compiling?
hhatch has joined #ruby-lang
charliesome has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<apeiros_>
oh my, that exchange webservices API is sooo annoying…
<apeiros_>
"oh hey, I'm sure when you told me to get all contacts, you wanted me to include an empty entry for every type of phone number I know!"
<banisterfiend`>
zenspider: how long have u been into cooking
workmad3 has joined #ruby-lang
neoesque has quit [Quit: Bye!]
headius has joined #ruby-lang
headius has quit [Client Quit]
<zenspider>
banisterfiend`: since I started eating more or less
<banisterfiend`>
oh ok, for some reason i thought it was a recent thing
sora_h is now known as s0ra_h
<zenspider>
nope. took my first cooking class around ... 8 or so
<certainty>
vectorshelve: which one? judging from the filenames it might be mediator and strategy
<vectorshelve>
certainty: I too feel its uses strategy but is it singleton as well ?
<certainty>
vectorshelve: i haven't yet looked at the code
<vectorshelve>
certainty: could you have a look and help me with it please.. thanks
<certainty>
vectorshelve: i don't see singleton at a first glance. You will have to have a close look i guess
<vectorshelve>
certainty: and my doubt is if I have multiple classes thorugh out the app and I am using at max only one instance of each of these classes.. it becomes singleton then ryt ?
<certainty>
vectorshelve: singleton enforces this though.
<vectorshelve>
certainty: or is it that throughout the application we should only have ONE instance of a class no matter how many classes we have ?
<certainty>
vectorshelve: singleton means that you only ever have one instance of a given class. It does not apply to all classes. That is you can well have a class with a singleton interface and several others that don't have it
<certainty>
so singletons are in a way just globals
nXqd_ has joined #ruby-lang
nXqd_ has quit [Quit: leaving]
nXqd has joined #ruby-lang
<nXqd>
hi rubyist :)
<vectorshelve>
certainty: ok I think I got it now.. so I think the app also follows singleton model since I dont see any of the classes having multiple instances :)
<certainty>
vectorshelve: that's because it mostly uses class-methods
<vectorshelve>
certainty: not having atleast one instance at all for all the classes doesnt matter as well
<certainty>
vectorshelve: i don't know if it does it exclusivly in which case it would not be singleton strictly speaking, as you have no instance
<vectorshelve>
certainty: so I assume almost 90% of the cases we can solve things in singleton desgin pattern :)
<vectorshelve>
certainty: so I conclude the app is basically singleton + strategic
<certainty>
i'm very unsure about the singleton part, but it certainly implements strategy
<certainty>
is that some homework?
<vectorshelve>
certainty: agree ?:)
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<masterkorp>
oh i dont need to declare default as an array ?
<Mon_Ouie>
No, you need to make it a hash, not an array
justinmcp has joined #ruby-lang
rhalff has quit [Ping timeout: 252 seconds]
JoshWines has joined #ruby-lang
tbuehlmann has joined #ruby-lang
jarib has quit [Excess Flood]
<masterkorp>
sorry, its a hash alright
s0ra_h is now known as sora_h
jarib has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Hakon has quit [Quit: Leaving...]
Fullmoon has joined #ruby-lang
Fullmoon has quit [Client Quit]
rhalff has joined #ruby-lang
srbartlett has joined #ruby-lang
stardiviner has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
kristofferrr has joined #ruby-lang
dfr|mac has joined #ruby-lang
dfr|mac is now known as dfr|moscow
sora_h is now known as s0ra_h
<masterkorp>
[ default['smf']['dirs']['profile_pictures'], default['smf']['dirs']['attachments'], default['smf']['dirs']['smileys'], default['smf']['dirs']['avatars']].each do |dir|
<masterkorp>
is this legal to start a block ?
Leeky is now known as Leeky_afk
<apeiros_>
sure, why should it not be?
<apeiros_>
you can simplify that code quite a bit btw.
<masterkorp>
/var/chef/cache/cookbooks/celtics-forum/recipes/default.rb:152: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('/var/chef/cache/cookbooks/celtics-forum/recipes/default.rb:152: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
<apeiros_>
masterkorp: default['smf']['dirs'].values_at('profile_pictures', 'attachments', 'smileys', 'avatars').each do |dir|
<apeiros_>
that should do the same
<zenspider>
more grave digging I see
<masterkorp>
yes
<zenspider>
I hope you got SOME sleep
<masterkorp>
i am complety
<masterkorp>
nope
<zenspider>
what's that term for situations like these... oh. right. fucked.
<zenspider>
I take it you're cleaning up someone else's mess ON the deadline?
<apeiros_>
masterkorp: that exception does not line up with the code you pasted. I'd assume either it's not the matching line or the problem starts earlier (syntax error messages can be misleading)
<apeiros_>
masterkorp: I'd paste the whole default.rb, so we can see
<masterkorp>
yeah it starts earlier
<masterkorp>
oh man i am so fucker
<masterkorp>
this should not happen to anyone
rhalff has quit [Read error: Operation timed out]
<masterkorp>
jesus take the wheel
Axsuul has quit [Ping timeout: 255 seconds]
<apeiros_>
that guy lived over 2k years ago, I doubt he has a drivers license…
dhruvasagar has quit [Ping timeout: 246 seconds]
s0ra_h is now known as sora_h
woollyams has joined #ruby-lang
pajama has joined #ruby-lang
<zenspider>
I for one am going to bed
<masterkorp>
bye and thanks
achiu has quit [Ping timeout: 252 seconds]
solars has quit [Ping timeout: 276 seconds]
achiu has joined #ruby-lang
dhruvasagar has joined #ruby-lang
dfr|moscow has quit [Ping timeout: 244 seconds]
vectorshelve has quit [Quit: Page closed]
Criztian has quit []
kristofferrr has quit [Quit: ❤]
dfr|moscow has joined #ruby-lang
solars has joined #ruby-lang
mwjcomputing has joined #ruby-lang
kvirani has joined #ruby-lang
solars has quit [Read error: Operation timed out]
dfr|moscow has quit [Ping timeout: 255 seconds]
zmack_ has joined #ruby-lang
rolfb has joined #ruby-lang
zmack has quit [Ping timeout: 246 seconds]
dfr|moscow has joined #ruby-lang
dfr|moscow has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
kiddorails has joined #ruby-lang
solars has joined #ruby-lang
erichmenge has joined #ruby-lang
brunocoelho has joined #ruby-lang
rhalff has joined #ruby-lang
iamjarvo has joined #ruby-lang
gsav has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby-lang
nertzy has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
justinmcp has quit [Remote host closed the connection]
tommyvyo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby-lang
sailias has joined #ruby-lang
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
ruby-lang689 has quit [Ping timeout: 245 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
<andrewhl>
as far as I can tell, the two 'keywords' behave exactly the same
toretore has quit [Quit: This computer has gone to sleep]
urbanmonk has quit [Ping timeout: 244 seconds]
lorinc has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
dfr|moscow has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
floyd2 has quit [Quit: leaving]
<heftig>
andrewhl: you're calling #age from outside Test on lines 18 and 19
<heftig>
that's going to fail
<heftig>
also, "puts @age" will return nil, and as such is unsuitable for comparison
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
<andrewhl>
heftig: can you explain why calling #age from outside Test will fail?
Dreamer3 has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
<heftig>
because it's protected
kain has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Nisstyre has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
dv310p3r has quit [Ping timeout: 276 seconds]
<andrewhl>
heftig: I revised my code slightly, but it still fails: http://pastie.org/4332666. I'm not understanding how I would call a protected method in such a way that it would NOT behave like private. I'm just trying to understand the difference between them.
<heftig>
andrewhl: simply remove lines 22 and 23
wpaulson has joined #ruby-lang
<andrewhl>
ahhhhh.
<andrewhl>
<-- derp
JoshWines has joined #ruby-lang
<andrewhl>
heftig: thanks
imperator has quit [Ping timeout: 244 seconds]
Jake232 has quit [Ping timeout: 276 seconds]
imperator has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
scampbell has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
radio23 has joined #ruby-lang
radio23 has left #ruby-lang [#ruby-lang]
slyphon has quit [Quit: WeeChat 0.3.7]
Sambalero has joined #ruby-lang
tenderlove has joined #ruby-lang
slyphon has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]