apeiros changed the topic of #ruby to: Ruby 2.1.0-p0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org|| Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
araujo has quit [Quit: Leaving]
<bilbo_swaggins> Object.methods.select { |x| x == :to_s } => :to_s
<bnagy> hm wait puts uses to_s not to_str
<psst> Here is my to_s method: def to_s; "X"; end
<txdv> o there are two methods
`petey` has joined #ruby
<psst> (It was a little more interesting before, but I simplified it while trying to eliminate problems)
w4pm has joined #ruby
<psst> My class doesn't explicitly extend anything, so I think there's only my to_s method
<bilbo_swaggins> how did you define p
<bnagy> huh, yeah I can repro on 2
Hanmac1 has quit [Ping timeout: 252 seconds]
<bnagy> wtf
<bilbo_swaggins> class Foo; def to_s; "X"; end
<bilbo_swaggins> ;end
<bilbo_swaggins> p = Foo.new
<bilbo_swaggins> ?
<psst> Yeah, Project.new(str)
Sawbones has joined #ruby
<bilbo_swaggins> initialize returns nil?
<bilbo_swaggins> pardon
<bilbo_swaggins> it returns the object of course
<psst> no, since puts p.to_s works as expected
<bilbo_swaggins> I don't know how puts works in detail
<bnagy> ok, so if I make a new empty class it works as expected, if I add a singleton to an obj it has the same behaviour as you describe
<bilbo_swaggins> maybe it's not recognizing your overload
lmickh has quit [Ping timeout: 272 seconds]
<bilbo_swaggins> singleton method? i.e. overloading #to_s?
siwica has joined #ruby
<psst> What is a singleton in this context?
<bilbo_swaggins> yeah I don't know either
<bilbo_swaggins> please enlighten
<bnagy> like s="foo"; def s.to_s
<bilbo_swaggins> yeah okay
senj has quit [Quit: Textual IRC Client: www.textualapp.com]
<bnagy> same as class << s; def to_s
fgo has joined #ruby
vlad_starkov has joined #ruby
<psst> oh, no - mine is in a class
araujo has joined #ruby
<bilbo_swaggins> Even if #puts did not recognize the overload as valid, it should still render *something* for the object, then, i would think
<psst> hmm, wonder if it went weird when I added to_ary
<psst> that was it
<psst> puts must be trying to_ary first
joaoh82 has joined #ruby
Megtastique has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<bilbo_swaggins> oh my
<bilbo_swaggins> you're playing a dangerous game
<psst> not any more I'm not
jlast has joined #ruby
gilcosson has quit [Remote host closed the connection]
Mars has joined #ruby
gilcosson has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
Mars is now known as Guest88314
<bilbo_swaggins> interesting
<bilbo_swaggins> #to_ary is defined on Object as well
Sawbones has quit [Remote host closed the connection]
kellsn has joined #ruby
<bilbo_swaggins> and must be involved in #to_s down the line
Sawbones has joined #ruby
Sawbones has quit [Remote host closed the connection]
<bilbo_swaggins> but lucky there's only 45 minutes till I can go home, drink mead and play guitar
Sawbones has joined #ruby
<bnagy> still have no idea why adding it as a singleton doesn't work though
snath has quit [Ping timeout: 252 seconds]
Sawbones_ has joined #ruby
Sawbones has quit [Read error: Connection reset by peer]
joaoh82 has quit [Ping timeout: 264 seconds]
<bilbo_swaggins> RB_TYPE_P tests whether x is type y?
alexfreidah has joined #ruby
radic_ has quit [Ping timeout: 272 seconds]
<bnagy> yeah
gilcosson has quit [Remote host closed the connection]
<bilbo_swaggins> I don't understand what the other two lines in that if clause do
colonolGron has quit [Quit: leaving]
<bnagy> if it's a string, dump it, if it's an array-ish thing, recurse into that, otherwise call to_s on it
<psst> So my object has an array of other objects, and each of those in turn has an array and so on
<bilbo_swaggins> this site is neat
<bnagy> well call rb_obj_as_string, but #spoiler that's what it does
shedd has quit [Remote host closed the connection]
<psst> I want to follow the arrays recursively and get a set of all the objects.
<bnagy> psst: if all of the things in your obj have the same overload it might infinitely recurse, which I guess the runtime just aborts at some point
shedd has joined #ruby
<bnagy> other than that, out of ideas
<psst> bnagy: that to_s problem is fixed
<psst> I got rid of the to_ary
<bnagy> yeah you said
<bnagy> that's why I linked that code :)
<psst> so now I'm wondering how to get a list of all the objects recursively
yasushi has quit [Remote host closed the connection]
<bilbo_swaggins> is it a tree?
Sawbones_ has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
ephemerian has left #ruby [#ruby]
robbyoconnor has joined #ruby
<psst> bilbo: it's directed and acyclic, but it might have dupes
Sawbones has joined #ruby
nanoyak has joined #ruby
<bilbo_swaggins> I don't think Ruby has built in tree traversal
kaldrenon has joined #ruby
<bilbo_swaggins> I ran into that in a bad way with Object#copy
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has joined #ruby
Bumptious has joined #ruby
<bnagy> psst: well as long as the recursion terminates at some point you should be ok
<bnagy> but imho I would define a recursive_dump on the head and use that in to_s
<bilbo_swaggins> are you building the tree with standard arrays?
shedd has quit [Ping timeout: 264 seconds]
kebabski has quit []
mansi has joined #ruby
<bilbo_swaggins> array trees render nicely
ylluminate has joined #ruby
laphlaw has joined #ruby
Jake232 has joined #ruby
Sawbones has quit [Ping timeout: 246 seconds]
<psst> an array as a field in the class
havenwood has joined #ruby
codepython777 has joined #ruby
<bilbo_swaggins> alright I've hit my brain usage limit for the day
kellsn is now known as kells
bilbo_swaggins has quit [Quit: aufwiederlesen]
kells has quit [Quit: Textual IRC Client: www.textualapp.com]
kellsn has joined #ruby
allaire has quit []
kellsn is now known as kells
bean has joined #ruby
baschtmobil has quit [Ping timeout: 260 seconds]
radic has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
kells has quit [Client Quit]
lethjakman has quit [Ping timeout: 245 seconds]
kells has joined #ruby
ce_afk is now known as cescalante
danshultz has joined #ruby
siwica has quit [Ping timeout: 272 seconds]
mojjojo has quit [Quit: mojjojo]
charliesome has joined #ruby
snath has joined #ruby
cbetta is now known as cbetta_afk
siwica has joined #ruby
bean has quit [Ping timeout: 272 seconds]
`petey` has quit [Remote host closed the connection]
jhunter has joined #ruby
`petey` has joined #ruby
<jhunter> q: how to escape => in an .erb?
<jhunter> i'm assigning val => <%= variable1 %>
<jhunter> and that => is breaking things
cbetta_afk is now known as cbetta
danshultz has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
<e62> Our resque pool died and there are a bunch of resque jobs in one of our queues that seem to be stuck. Anybody know how to easily re-enqueue jobs with Resque?
centrx has joined #ruby
kells has quit [Quit: Textual IRC Client: www.textualapp.com]
Fire-Dragon-DoL has joined #ruby
`petey` has quit [Ping timeout: 246 seconds]
allaire has joined #ruby
rajasaurus has quit [Ping timeout: 260 seconds]
bennyboobooboo has quit [Remote host closed the connection]
figgleberry has joined #ruby
bennyboobooboo has joined #ruby
ctp has quit [Quit: Leaving...]
klaut has quit [Remote host closed the connection]
Kar- has quit [Ping timeout: 246 seconds]
<bricker> e62: There's just nothing consuming them. Start a worker to process the queue.
rootshift has joined #ruby
geggam has quit [Remote host closed the connection]
bennyboobooboo has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 245 seconds]
figgleberry has quit [Ping timeout: 252 seconds]
shedd has joined #ruby
yoshie902a has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 272 seconds]
<yoshie902a> If I want to convert a value like 5555.12345678919 into a numeric store, like float, but more precise, what should I use?
tkuchiki has joined #ruby
<bnagy> bigdecimal modulo its limitations
predator117 has joined #ruby
<Hanmac> yoshie902a: Float("5555.12345678919") or BigDecimal("5555.12345678919")
<yoshie902a> bnagy: so if I have a string value like " 5555.12345678919", is there a method like to_big
<psst> Can anyone see what is wrong with this method? Is it ok to access the outer variable within the block scope?
<psst> def all_deps(arr = []); @deps.each {|p| p.all_deps(arr)}; arr |= @deps; end
<yoshie902a> Hanmac: thanks, although float does not work because it only give 4 degrees of precision and rounds down for some reason
IceDragon_ has joined #ruby
IceDragon has quit [Disconnected by services]
IceDragon_ is now known as IceDragon
<Hanmac> yoshie902a: require "bigdecimal"; require "bigdecimal/util" ; "5555.12345678919".to_d
<psst> What I'm seeing is that the array builds up during the recursion and then shrinks again
<bnagy> I don't know what a 'degree of precision' is, but float has more than 4 of them
<bnagy> but anyway, the constructor takes anything sane, including strings
<centrx> psst, Is the .each supposed to be a .collect ?
predator217 has quit [Ping timeout: 260 seconds]
benzrf has joined #ruby
<benzrf> welp
<benzrf> legend is pointless
<benzrf> T_T
<benzrf> theeeere goes my motivation
<psst> centrx: I didn't use collect because that is intended to produce an array result with the same size as the iterated-over collection, right?
<centrx> psst, yes
<centrx> psst, Can you describe what you are trying to do, it seems like a roundabout way of doing something
mlpinit has joined #ruby
<centrx> psst, I assume @deps stands for dependencies
<bnagy> but it's a recursion, so your map / collect _should_ have the same number of elems
<bnagy> like if this node has 3 children your map will produde 3 values
<bnagy> but they'll each be nested
pen has quit [Read error: Connection reset by peer]
<psst> centrx: I have a class Project with a field @deps that is an array of Projects
<bnagy> if you want it flat then you you should each, but then you need to append to arr in the each
<psst> bnagy: the end result I want is a flat list of all the nested dependencies without dupes
pen has joined #ruby
<bnagy> personally imho map is more readable, you can flatten it afterwards
Fire-Dragon-DoL has joined #ruby
<benzrf> flat_map
shedd has quit [Ping timeout: 272 seconds]
Megtastique has quit []
<psst> bnagy: arr |= @deps # doesn't this modify the passed in array?
<bnagy> psst: it does, but your each there does nothing
<yoshie902a> bnagy: when I say precision, I guess I mean the number of characters after the decimal. However, it seems dependent on the total number of characters.. Float(123456789123456789.123456789)
<yoshie902a> => 123456789123456780.0
bean has joined #ruby
heidi has quit [Quit: Leaving.]
<psst> bnagy: it passes the array to each dep in turn
<bnagy> psst: is it working?
pen has quit [Client Quit]
FifthWork has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<psst> bnagy: it definitely visits all the children, but the end result doesn't include them
<bnagy> yoshie902a: no runtime should return that, what version are you using?
<bnagy> it should give you an eXX notation
kitak_ has quit [Read error: Connection reset by peer]
kevind has quit [Quit: kevind]
kitak has joined #ruby
<centrx> psst, The arr you are building up as it visits is discarded each time
<yoshie902a> bnagy: how would I check?
<bnagy> but yes, floats have precision limits at some point, that is the nature of floats
<bnagy> RUBY_DESCRIPTION
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heidi has joined #ruby
<centrx> oh well I guess you are passing it in there
<yoshie902a> bnagy: "ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]"
<psst> centrx: oh - so |= does not modify the original array?
<psst> wait, that can't be true
<bnagy> psst: it does, but as I said, your each doesn't do anything
<psst> no, it can
thumpba has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 252 seconds]
<psst> bnagy: I must be missing something, because I don't understand why you say that. The each calls a method that modifies the passed in array
<bnagy> map is a changing things method, each is an iteration method
<centrx> bnagy, but he is passing in the arr for each iteration of the each
thumpba has joined #ruby
<bnagy> yes, but not doing anything with it
<bnagy> forget about the recursion, think about it flat
<centrx> psst, It definitely seems like a more straightforward thing to do would be: @deps.map { |p| p.all_deps }.flatten.uniq
<bnagy> every level, the each just walks @deps
robustus has joined #ruby
<centrx> psst, AKA @deps.flat_map { |p| p.all_deps }.uniq
<benzrf> i think flat_map only flattens once
<benzrf> like concatMap in haskell
<bnagy> imho each and append or map with one final flatten
<bnagy> each and append is probably the most efficient
<psst> bnagy: if I ignore the method call within the each, I agree that arr should not grow
Galgorth has joined #ruby
<psst> bnagy: are you saying that the call to all_deps(arr) has no effect?
<centrx> psst, The arr is not growing because you are running arr |= @deps
<bnagy> psst: ok, I cannot say the same thing in words that are any smaller, you'll have to work it out for yourself from here by experimenting
nanoyak has quit [Ping timeout: 252 seconds]
<centrx> psst, You are unioning with the original @deps every single time
sergicles has joined #ruby
cescalante is now known as ce_afk
Albright has quit [Quit: Albright]
vlad_starkov has joined #ruby
<centrx> psst, You are looking for something like arr |= arr.map { |p| p.all_deps }
<centrx> psst, But it can be done all in one line with flatten and uniq
<psst> centrx: does that work recursively?
<bnagy> I don't see why you would want uniq
nanoyak has joined #ruby
mlpinit has quit [Remote host closed the connection]
charliesome has joined #ruby
<centrx> bnagy, If two dependencies both depend on the same third dependency, he only wants a list that has one entry for it, I assume
<psst> correct
<psst> that's why I was trying union
<centrx> psst, It would be recursive to do it passing the arr and then assigning the arr like arr |= arr.map { |p| p.all_deps }
<centrx> psst, but having a one-line map would also be "recursive"
robbyoconnor has quit [Ping timeout: 265 seconds]
<psst> hmm, I see.
<yoshie902a> bnagy: any info on my version?
<psst> That sounds much better.
<centrx> psst, The "flatten" at the end eliminates the need to dig through the nesting recursively
<centrx> psst, It does that all in a single pass
<bnagy> yoshie902a: no, I'm just surprised, if that's real output
<bnagy> but eval-in is dead so I can't check :/
<bnagy> 19>> 'hey'
sambao21 has quit [Quit: Computer has gone to sleep.]
<yoshie902a> what does you version output?
bricker has quit [Quit: leaving]
joaoh82 has joined #ruby
<yoshie902a> eval-in?
<bnagy> the bot that should be working
cads has quit [Read error: Operation timed out]
vlad_starkov has quit [Read error: Operation timed out]
<psst> ok, I'm giving up on understanding why my version is wrong (much as that goes against the grain)
<centrx> psst, It's because when you do arr |= @deps, the @deps is the exact same array each time, @deps is never changed
ce_afk is now known as cescalante
heidi has quit [Quit: Leaving.]
<bnagy> yoshie902a: huh, you're right. I'm hoping it's just an output bug
megus has joined #ruby
<centrx> psst, @deps.each does not change @deps, @deps.map does
notbrent has joined #ruby
m00nlight has quit [Quit: Konversation terminated!]
<yoshie902a> bnagy: ya, kinda weird, but maybe I maxed the character limit
<bnagy> nope, really is truncating
<psst> centrx: oh, is that what you meant?
Mike98632 has joined #ruby
<psst> I never want @deps to change (at least not in this method
<psst> I only wanted to change arr.
<yoshie902a> bnagy: is there a commond that would prevent truncating?
<centrx> Right, and the only place you are changing arr is when you do arr |= @deps, which is a set union with the same @deps every time
<Mike98632> I'm trying to run a program called screenruler, but I get this error. Can anyone help me figure out what I need to fix this? http://pastebin.com/p5rEpVPJ
<bnagy> yoshie902a: just use bigdecimal
dukz has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<yoshie902a> ok
<psst> centrx: not the same @deps, because I see the arr grow up into the 20s but then back down to the 10s and ends up as just 8
<yoshie902a> bnagy: what does require "bigdecimal/util" add over require "bigdecimal"
havenwood has joined #ruby
heidi has joined #ruby
zxd has joined #ruby
<centrx> psst, weird
<psst> centrx: it |= with the @deps of each dep in turn
<bnagy> yoshie902a: to answer that I would have to read the docs, which I suggest you do instead
joaoh82 has quit [Ping timeout: 272 seconds]
<centrx> oh right okay
<psst> I'm utterly mystified as to at which point the scoping goes wrong
<bnagy> it's not a scoping issue
<bnagy> each. does. not. change. the. collection.
<psst> bnagy: @deps.each {change arr} does not change arr?
nateberkopec has quit [Quit: Leaving...]
<Radar> psst: Please try it in irb.
<bnagy> psst: no
<yoshie902a> bnagy: I looked it up and see until mentioned, but no reference to the methods under it, or anything… http://www.ruby-doc.org/stdlib-1.9.3/libdoc/bigdecimal/rdoc/BigDecimal.html
<bnagy> well not in a useful way
<Radar> irb(main):002:0> arr = [1,2,3,4]; arr.each { |a| a += 1 }; arr
<Radar> => [1, 2, 3, 4]
alexfreidah has quit [Ping timeout: 246 seconds]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yoshie902a> until=util
<Radar> map! will change the array: irb(main):004:0> arr = [1,2,3,4]; arr.map! { |a| a += 1 }; arr
<Radar> => [2, 3, 4, 5]
<bnagy> psst: srsly, just try it with each but explicitly modify arr INSIDE
huttan- has joined #ruby
dukz has quit [Ping timeout: 252 seconds]
mlpinit has joined #ruby
zxd has quit [Ping timeout: 272 seconds]
tt1187 has quit [Read error: Operation timed out]
<psst> ahaa!
<psst> |= does NOT modify the original array
<bnagy> yes, it does
<bnagy> try a=[1,2,3]; a|=[4,5]; a
<centrx> It returns a new array to a
<ddd> i know ||= but what is |= ?
<centrx> It does not modify the reference
<ddd> enforces dup?
<psst> bnagy: what centrx said.
<psst> bnagy: try this: x = y = [1]; y |= [2]; x
<centrx> ddd, For arrays it is Set Union, which is a dedupped concat
havenwood has quit [Ping timeout: 252 seconds]
<bnagy> ok, yes, it modifies the reference
<psst> ok, that is what I misunderstood
<psst> now the problem is clear
<ddd> err? no because x stays the same
rootshift has quit [Quit: rootshift]
<bnagy> but ruby is all pass by ref
<ddd> just tried that in pry and y modified, but not x, if it modified the reference then x should ahve changed too
tvw has quit []
<ddd> s/ahve/have/
<centrx> It modifies the referencing, not what is being referenced
<bnagy> like a |= whatever, a is the return value, which is sufficient for a correct recursion
heidi has quit [Quit: Leaving.]
<ddd> centrx i don't understand that comment. its a finer point i'm not catching
jack_rabbit has quit [Quit: Leaving]
jack_rabbit has joined #ruby
<bnagy> it doesn't change the underlying memory of what x points to
<bnagy> it changes y ( the ref ) to point to a new array
<ddd> ahhh
<ddd> ok, now *that* made sense
<psst> ddd: x and y are variables each storing a reference to the same array initially. y ends up pointing to a new array and x doesn't
<ddd> psst got it now :) thanks. was absolutely missing that point
Sawbones has joined #ruby
Albright has joined #ruby
pehlert has joined #ruby
heidi has joined #ruby
<ddd> so its a way to make multiple vars that point contain the same reference, diverge, while also changing the value at the time of diverging
<psst> ddd: guessing you don't do C++
<ddd> psst I do but superficially
<ddd> very basic programs
<psst> ddd: that use pointers, references, and stack objects?
kitak has quit [Remote host closed the connection]
<psst> not to mention pointers to references or references to pointers.
<ddd> no, nothing that 'indepth'. little shitty beginner apps
<psst> :)
subbyyy has quit [Read error: Operation timed out]
Guest42194 has joined #ruby
<centrx> ddd, It is time for you to make a Linked List program!
<ddd> centrx heh
kitak has joined #ruby
<ddd> i take it i'd run into that most assuredly if i did
Guest42194 has left #ruby [#ruby]
<ddd> TIL
aspires has quit []
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
pehlert has quit [Ping timeout: 272 seconds]
Sawbones has quit [Remote host closed the connection]
bigoldrock has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
figgleberry has joined #ruby
Sawbones has joined #ruby
w4pm has quit [Ping timeout: 264 seconds]
Jake232 has quit [Ping timeout: 272 seconds]
bricker`LA has joined #ruby
marr has quit [Ping timeout: 260 seconds]
Brolen has joined #ruby
<yoshie902a> ruby still seems to truncate with require bigdecimal…. irb(main):031:0> Float(12345678987654321.1234567894444)
<yoshie902a> => 12345678987654322.0
huttan- has quit [Ping timeout: 272 seconds]
endash has quit [Quit: endash]
wildroman2 has joined #ruby
<psst> centrx, bnagy: thanks for your persistence, guys. I have it working *and* elegant now
<psst> def all_deps(); @deps.flat_map(&:all_deps)|@deps; end
<centrx> Bravo
w4pm has joined #ruby
<yoshie902a> never mind, I should have used big decimal over float
CpuID has quit [Quit: This computer has gone to sleep]
mansi has quit [Remote host closed the connection]
fusi0n has quit [Quit: .]
danshultz has quit [Ping timeout: 264 seconds]
Sawbones has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
heidi has quit [Quit: Leaving.]
Guest88655 is now known as mbff
bean has quit [Quit: Textual IRC Client: www.textualapp.com]
cads has joined #ruby
<bnagy> yay
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 264 seconds]
<bnagy> now just hope you don't hit StackError ;)
<psst> there are only 606 projects in total
burlyscudd has joined #ruby
Kar- has joined #ruby
charliesome has joined #ruby
<psst> if we have too deep a dependency graph between them for Ruby's stack to handle we have some really serious problems
mansi has quit [Ping timeout: 265 seconds]
huttan- has joined #ruby
zeade has quit [Quit: Leaving.]
danshultz has joined #ruby
<zastern> Here's a question that likely has no answer: Are there any reasonable config file formats that let you represent structured data, that are not XML, JSON, or YAML?
m00nlight has joined #ruby
<benzrf> dang
<benzrf> zastern: you could use livescript-flavored json
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<zastern> hmmm
<psst> SGML?
jlast has quit [Remote host closed the connection]
Kar- has quit [Ping timeout: 272 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
<yoshie902a> What am I doing wrong with this, BigDecimal just does not seem to be working for me… "%.20f" % BigDecimal("12345678987654321.123456789",20) => "12345678987654322.00000000000000000000"
huttan- has quit [Ping timeout: 260 seconds]
Soda has joined #ruby
<zastern> That's not a terrible idea, benzrf
<benzrf> o:
<psst> What is the 20 arg to BigDecimal for?
<benzrf> you looked up livescript?
<zastern> i did.
<benzrf> what do you have against json and yaml anyway
megus_ has joined #ruby
<zastern> As serialization formats, nothing
<psst> if it's precision, perhaps it is significant digits
<zastern> as config files, everything
<benzrf> yaml is quite nice though
<psst> in which case it is doing what you asked it to
<yoshie902a> psst: just formatting to display the actual number
<zastern> YAML is a huge pain in the ass due to its draconion formatting requirements
<benzrf> if you say so ._
<zastern> It's very readable
<benzrf> .
e62 has quit [Ping timeout: 252 seconds]
<zastern> but hard to write (if you're not a developer and don't deal with it often)
shedd has joined #ruby
<bnagy> yaml is not meant to be written by hand
<zastern> right.
<zastern> but despite that
<benzrf> :\
<zastern> a lot of people use yaml config files for their apps
danshultz has quit [Ping timeout: 265 seconds]
<bnagy> if you want hand written then just parse
wildroman2 has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 246 seconds]
<bnagy> although I use yaml all the time for simple k-v configs
mr_red has quit [Quit: Bye :)]
cbetta is now known as cbetta_afk
<psst> yoshie902a: remove the second arg to BigDecimal()
kcombs has joined #ruby
<psst> yoshie see what happens
Guest88314 has quit [Remote host closed the connection]
<yoshie902a> psst: it errors out
edwardly has quit [Ping timeout: 252 seconds]
<bnagy> yoshie902a: BigDecimal objects have their own formatter, try that
<bnagy> using printf is probably converting to a float which is unlikely what you want
vallieres_ has quit [Quit: Textual IRC Client: www.textualapp.com]
cbetta_afk is now known as cbetta
burlyscudd has quit [Quit: Leaving.]
edwardly has joined #ruby
<yoshie902a> bnagy: that's good to know about the printf formatter. I looked for a big decimal formatter in the docs but did not see it, I'll look again
<bnagy> BigDecimal.new("12345678987654321.123456789").to_s('F')
<bnagy> for example
shedd has quit [Ping timeout: 272 seconds]
<psst> yoshie902a: it's casting it to a float
thedonva1ghn has quit [Ping timeout: 252 seconds]
<psst> doh - always behind bnady
<psst> *bnagy*
<yoshie902a> bnagy: thanks! I get it now. Much better. I was actually looking for a format method, was skipping over t_s, but it's specific to bigdecimal
mr_red has joined #ruby
<yoshie902a> Thank you everyone for all your help, this has helped a lot
danshultz has joined #ruby
heidi has joined #ruby
firewater5 has joined #ruby
<firewater5> benzrf: Hey are you here :).
<firewater5> ?
<benzrf> yeah
<benzrf> hows it goin
<firewater5> Reason I ask is because I think I did something wrong or got confused from something from yesterday.
capicue has quit [Quit: Leaving...]
<firewater5> Good. How is it going though?
<benzrf> i just found out that there is already something that does more or less what my project would do
<benzrf> and better
<benzrf> T_T
<firewater5> What is that?
<psst> reuse FTW
<benzrf> zelda classic
<benzrf> not in ruby probably
<psst> aww
* benzrf is just a little crushed
<firewater5> Too bad, maybe make a new project?
<benzrf> i had fun while it lasted
<benzrf> ;-;
thedonvaughn has joined #ruby
<benzrf> i really thought this was gonna be a thing
<benzrf> >:
<firewater5> Build it anyways and go with it, no?
<benzrf> ehhh
<benzrf> my motivation drained away when i saw it existed
<benzrf> ~_~
<psst> it means that your idea was so good, someone else already did it
<firewater5> :/, well I'm sure you will figure something out.
<benzrf> hneh
<psst> so try more ideas
lukec has quit [Quit: lukec]
shedd has joined #ruby
<benzrf> i dont have many ideas
<benzrf> i am not an idea guy
<benzrf> i work best as an implementor of others' schemes
<firewater5> Btw, I was just trying to test what we talked about yesterday btw benzrf. It seems not to work as it should :/.
<benzrf> yeah?
<firewater5> If you do 4.times {n+=2}, it equals out to four.
<firewater5> How would you make it return 8?
<benzrf> oh
<firewater5> I tested it in irb.
<benzrf> i thought you said you only cared about the effects
threesome has quit [Ping timeout: 272 seconds]
<benzrf> not the result?
<firewater5> It returns 4 not 8.
<benzrf> yes, but n will be set to 8
<benzrf> *have 8 added to it
<firewater5> Oh, wait, let me try irb one more time.
maletor has quit [Quit: Computer has gone to sleep.]
<benzrf> [1] pry(main)> n = 0
<benzrf> => 0
<benzrf> => 4
<benzrf> [3] pry(main)> n
<benzrf> [2] pry(main)> 4.times {n+=2}
<benzrf> => 8
<codepython777> can one serialize a function inside a thread and save it in ruby? Then restart the thread/function later?
<benzrf> codepython777: ...ew
Brolen has quit [Quit: Brolen]
<benzrf> codepython777: try continuations
<psst> yeahm those are called continuations. Didn't know Ruby had them
mavcunha has quit [Ping timeout: 265 seconds]
e62 has joined #ruby
<firewater5> Sorry, I guess the thing does work.
<psst> benzrf: There are techniques you can use
<bnagy> codepython777: the magic ruby word is Fiber
<benzrf> firewater5: its k ;p
<psst> benzrf: Try Matsumura's Lotus Blossom.
<codepython777> how does it know which objects i might touch in the function when i load it?
<codepython777> or is it saving the entire stack/heap?
<firewater5> Problem is the next test is using the same method, but instead it now is adding in 4 numbers to a set time.
<benzrf> psst: huh?
<firewater5> And then expecting the results to be the average of the four numbers added into them.
<benzrf> firewater5: adding in 4 numbers to a set time?
<benzrf> what does that mean @_@
<bnagy> codepython777: they have a binding, but it's better not to use it - you should pass in anything the fiber needs
vlad_starkov has joined #ruby
<benzrf> psst: what is Matsumura's Lotus Blossom
<psst> benzrf: I tried it for 2 hours with 3 other people and we came up with 4 patented inventions
<benzrf> wut
<psst> benzrf: a technique for coming up with ideas
<benzrf> :\
<psst> I mean that we patented them.
<firewater5> benzrf: time = Time.parse("2013-5-2 8:00:00")
<psst> not things that were already patented
<firewater5> run times =[8, 5, 6, 5]
mavcunha has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
gja has joined #ruby
<firewater5> measure(4) do
danshultz has joined #ruby
<firewater5> time+=run_times.pop
<firewater5> end
fgo has joined #ruby
laphlaw has quit [Quit: Computer has gone to sleep.]
<benzrf> firewater5: measure(4) ?
<benzrf> o i c
Wolland has quit [Remote host closed the connection]
<firewater5> THe method I was making for the last thing
<firewater5> Then they set that method equal to average_time holder
<benzrf> ok, so measure runs the block the number of times it asks
Wolland has joined #ruby
<benzrf> *it is passed
Kar- has joined #ruby
<benzrf> and measures how long the whole thing takes?
<firewater5> and do average_time.should== whatever those 4 add up to and divided by four.
<firewater5> benzrf: The aim of it is the see what the average length of time it takes.
vlad_starkov has quit [Read error: Connection reset by peer]
<firewater5> But its doing it by adding time to a preset "fake" time.
<benzrf> wait im confused
<benzrf> @_@
<firewater5> Should I show you code in some editor?
<benzrf> sure
<firewater5> Or pastebin?
<benzrf> firewater5: 1 sec i have a thing
<benzrf> firewater5: are you on a sane OS, or windows?
<firewater5> windows.
<bnagy> firewater5: there is a Benchmark module btw
Sawbones has joined #ruby
joaoh82 has joined #ruby
<benzrf> firewater5: ~_~
<benzrf> firewater5: ok, pastebin
huttan- has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
capicue has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
<firewater5> Pm'd you it.
Vivekananda has quit [Quit: Ex-Chat]
<benzrf> thanks
Virtualize has joined #ruby
<firewater5> I cut out all the tests.
<firewater5> I only put the two test relevant to this I think.
capicue has quit [Client Quit]
Kar- has quit [Ping timeout: 264 seconds]
<benzrf> ok
blarghmatey has joined #ruby
<firewater5> I got the first test to pass already btw, I can show you my solution so far if you want.
<firewater5> ?
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
havenwood has joined #ruby
<benzrf> firewater5: go ahead
<benzrf> paste it in a pm pls
joaoh82 has quit [Ping timeout: 272 seconds]
huttan- has quit [Ping timeout: 246 seconds]
nmabry has quit [Quit: nmabry]
huttan- has joined #ruby
<firewater5> Some of that other code is relevant to other tests.
kaldrenon has quit [Remote host closed the connection]
<benzrf> firewater5: looks fine to me
<firewater5> So, the second test should pass too?
<benzrf> well
<benzrf> not yet
<benzrf> firewater5: i would not worry about how the test tests it
<benzrf> just make it work how it says to and trust the test to be able to tell
<benzrf> :u
<firewater5> The results for the second test come out fo 4.
<firewater5> It is expecting 6.5.
<firewater5> I'm lost why its getting 4 :/.
<firewater5> Do you know why?
<benzrf> well, your method returns 4
havenwood has quit [Ping timeout: 264 seconds]
checkers has joined #ruby
Megtastique has joined #ruby
<firewater5> So, return yield on last line then.
<firewater5> That would solve this.
psst has quit [Ping timeout: 260 seconds]
<checkers> hi, is there an option to irb that will read a ruby file and then leave me at the irb ready to use/debug it? like 'python -i'
<benzrf> firewater5: no...
<firewater5> Guess not.
<firewater5> nevermind, that would run yield one more time.
<benzrf> but beyond that
<benzrf> firewater5: it expects back the average run time for the block after runnning it n times
<benzrf> ignore what the test is actually doing
huttan- has quit [Ping timeout: 260 seconds]
stkowski has joined #ruby
<firewater5> benzrf: I'm lost :/.
<firewater5> I need to figure this out though somehow.
heidi has quit [Quit: Leaving.]
<benzrf> firewater5: you run the method n times
<benzrf> timing it each time
<benzrf> and then average the times
<Mike98632> I'm trying to run a program called screenruler, but I get this error. Can anyone help me figure out what I need to fix this? http://pastebin.com/p5rEpVPJ
<firewater5> Somehow I need to get yield into a variable then.
<firewater5> And divide that variable by the number of times its run then.
<firewater5> Right?
<benzrf> what?
<benzrf> you are not averaging the result
eka has quit [Quit: Computer has gone to sleep.]
<benzrf> you are averaging the length of time it takes to run
<benzrf> right??
<firewater5> Yes, I think?
<benzrf> ok
<firewater5> I am confused though, because it looks like the test is just adding those times.
heidi has joined #ruby
heidi has quit [Client Quit]
<firewater5> Adding those numbers to the time.
<benzrf> ignore what the test is doing ~_~
<benzrf> it is using fancy trickery to change when now is
<benzrf> i think
<firewater5> ok
<firewater5> Then, to average the time. You need to subtract each time from the start time. Then get a number from each.
<firewater5> Add those numbers up.
mk-qi has joined #ruby
<firewater5> And then divide those by the number of times run, right?
mlpinit has quit [Remote host closed the connection]
<benzrf> why not write that?
<benzrf> ;p
<benzrf> but i recommend imagining what the results would be
<firewater5> I will try.
<benzrf> run the program as though you were the computer
<benzrf> see what happens
CpuID has joined #ruby
<firewater5> THe problem though is doing this will break the test for the previous code :/.
ner0x has joined #ruby
joaoh82 has joined #ruby
<benzrf> just write what you think will work o_o
<benzrf> do you want a tip?
<firewater5> I know what to do.
<firewater5> I will show you, but it will break previous code.
<firewater5> Basically, you put a=time.now
<firewater5> Then yield
<firewater5> b=time.now
<firewater5> put that in a loop.
<firewater5> And run it four times.
doodlehaus has joined #ruby
<firewater5> Somehow put each result in a variable
<firewater5> += for that variable
<benzrf> firewater5: you could use a list for that
<firewater5> array
<bnagy> or just map it
alexfreidah has joined #ruby
<firewater5> I like arrays.
<firewater5> Either way, it still breaks my previous test :/.
digital-ghost has quit [Remote host closed the connection]
<bnagy> that's what you get out of map
danshult_ has joined #ruby
kcombs has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby
Hanmac1 has joined #ruby
<bnagy> tests.map {|t| then = Time.now; t.call; Time.now - then}.inject(:+) / tests.size.to_f
<bnagy> or whatever, untested
<firewater5> bnagy: I don't want an answer to this.
<firewater5> bnagy: I want to try to figure it out on my own with hints.
Hanmac has quit [Ping timeout: 272 seconds]
<bnagy> I didn't even see your code, it's just a map example
<firewater5> ok.
<bnagy> well if you don't want hints you should type /part
jlast has joined #ruby
danshultz has quit [Ping timeout: 252 seconds]
cbetta is now known as cbetta_afk
<firewater5> benzrf: I think I may just have to try this later.
<firewater5> benzrf: IDK, I know what to do.
<firewater5> benzrf: But I know it will break my code. I know on a high level what to do though.
<benzrf> alright!
<firewater5> benzrf: Unless you have any other hints of how to do this.
<firewater5> benzrf: The problem is that method has to do both those tests :/.
<bnagy> use Benchmark, it's what it was designed for
Xiti has joined #ruby
<benzrf> bnagy: it's a puzzle
Xiti` has quit [Ping timeout: 260 seconds]
<firewater5> One test is adding things together
<benzrf> and/or learning exercise
<firewater5> bnagy: Its a puzzle I have to solve.
<firewater5> bnagy: I'm using it to learn ruby.
<benzrf> firewater5: just default the number of times to 1
<benzrf> then the average will be the one tim
<benzrf> *time
<firewater5> I think I get it.
<firewater5> So just compare what it starts at to what the "fake" time ends at.
<firewater5> Subtract the difference.
<benzrf> ignore the test!
kcombs has joined #ruby
<firewater5> And come to the same conclusion?
<benzrf> just write the method as it would be in real code
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
mansi has joined #ruby
Galgorth has quit [Quit: Galgorth]
<firewater5> benzrf: There is my idea.
<benzrf> well, try it out
<benzrf> oh
<firewater5> I commented where I am lost though.
<benzrf> you're missing an end ;)
<firewater5> And doubt its completely right..
<benzrf> and you left in line 5
<firewater5> I left 5 there, meant to comment it out.
io_syl has quit [Ping timeout: 272 seconds]
<benzrf> yep
<benzrf> ok, first of all you need to put an end to indicate the end of your block
doodlehaus has quit []
<firewater5> Yes, I edited it in, saw that fail in the test just now ;).
<firewater5> Sorry, it was a rough draft.
P1RATEZ has joined #ruby
<benzrf> ok
<benzrf> you now have the total, right?
mansi has quit [Ping timeout: 272 seconds]
<firewater5> Yes, after making time capital Time.
<firewater5> It gives me a result of 4.
nari has joined #ruby
<benzrf> thats because the times call is returning its result
<benzrf> aka the number of times you loop
Sawbones has quit [Remote host closed the connection]
<benzrf> you need to return the average
havenwood has joined #ruby
<benzrf> how can you get the average from the total?
<benzrf> the total has been set, but the last statement is the times
<benzrf> so thats what returns
varfoo has joined #ruby
Sawbones has joined #ruby
<firewater5> I have to do it outside the loop.
agent_white has joined #ruby
<firewater5> Holy shit
<firewater5> I solved it all, lol.
jlast has quit [Remote host closed the connection]
<firewater5> I have no idea how though :/.
mehlah has quit [Quit: Leaving...]
<benzrf> what do you have?
<firewater5> How my solution solved both those tests.
<firewater5> I will show you.
gja has quit [Quit: This computer has gone to sleep]
alexfreidah has quit [Ping timeout: 272 seconds]
<benzrf> nice!
<benzrf> you know, you can set number to default to 1 instead of 0
<benzrf> and take out the if entierly!
<benzrf> just always do the loop/divide
<benzrf> because if a number is not given, it will just loop 1 time
<benzrf> and the average will be the 1-time run
Andrew_FV has joined #ruby
<firewater5> I'm too scared to mess with it any more.
<benzrf> alright ;)
alexfreidah has joined #ruby
<firewater5> I think I know what your saying though.
<firewater5> benzrf: But, I am really lost how this code both adds those n+=1 problem.
<firewater5> AND
<firewater5> Solves that time average thing at the same time :/.
Andrew_FV has left #ruby [#ruby]
<benzrf> it switches depending on what it gets as input
lukec has joined #ruby
<firewater5> benzrf: How about this, we should probably just look at both the problem and solution another time. I have to go to sleep again for work tomrorrow :/.
Sawbones has quit [Ping timeout: 272 seconds]
<benzrf> ok!
<firewater5> benzrf: Are you on on Sunday usually?
<benzrf> yep :_
<firewater5> Or tomorrow?
<benzrf> yeah
<firewater5> I may just shoot you a pastebin of both the problem and solution and try to figure it out this weekend. If I can't, I will chat you Sunday.
fijimunkii has joined #ruby
bitness64 has joined #ruby
daidoji has joined #ruby
<firewater5> And shoot you the pastebin.
<firewater5> I really appriciate your help with this though.
<firewater5> I'm learning a lot with this.
<firewater5> Thanks a lot for everything so far :).
<firewater5> benzrf: See you later sometime, probably Sunday :).
reset has quit [Ping timeout: 260 seconds]
phinfone_ has quit [Quit: exitiing]
firewater5 has quit [Quit: Page closed]
Kricir has joined #ruby
zxq9 has quit [Quit: Konversation terminated!]
e62 has quit [Ping timeout: 245 seconds]
huttan- has joined #ruby
firewater5 has joined #ruby
simplyaubs has joined #ruby
<firewater5> benzrf: Also, sorry, don't want to seem like I'm "using" you. I really do appriciate your help.
Soda has quit [Remote host closed the connection]
Megtastique has quit []
<benzrf> firewater5: i dont mind at all
<firewater5> benzrf: I'm just super busy so jump on here after I have thought about the problem and get lost is all. Then I have to jump right off afterwords due to having to go to work Monday-Friday is all.
<firewater5> benzrf: Well, again, really do appriciate it.
_maes_ has joined #ruby
<firewater5> benzrf: And good luck with that project, or any new ones you decide to work on :).
<firewater5> benzrf: See ya once again.
bitness64 has quit [Quit: Leaving]
<benzrf> see you
fgo has joined #ruby
Oog has joined #ruby
<Oog> t = Tempfile.new("pluto")
lyanchih has joined #ruby
<Oog> if I write to pluto
<Oog> err
m00nlight has quit [Ping timeout: 260 seconds]
<Oog> t
<Oog> then read from it, am i guaranteed to read the data that i just wrote?
freezey has joined #ruby
alexfreidah has quit [Ping timeout: 265 seconds]
troyready has quit [Read error: Operation timed out]
yacks has joined #ruby
sec^nd has quit [Ping timeout: 240 seconds]
bitness64 has joined #ruby
CaptainJet has quit []
nmabry has joined #ruby
cescalante is now known as ce_afk
codepython777 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
gja has joined #ruby
kcombs has quit [Remote host closed the connection]
benzrf has quit [Quit: leaving]
mansi has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
vlad_starkov has quit [Read error: Connection reset by peer]
Kar- has joined #ruby
nmabry has quit [Ping timeout: 265 seconds]
m00nlight has joined #ruby
ocline has joined #ruby
firewater5 has quit [Quit: Page closed]
yarou has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
po10 has quit [Quit: /]
Hanmac has joined #ruby
codepython777 has joined #ruby
Kar- has quit [Ping timeout: 246 seconds]
Hanmac1 has quit [Ping timeout: 246 seconds]
zeade has joined #ruby
sec^nd has joined #ruby
fgo has quit [Remote host closed the connection]
nfk has quit [Read error: Operation timed out]
nowthatsamatt has quit [Quit: nowthatsamatt]
huttan- has quit [Read error: Operation timed out]
Hanmac has quit [Ping timeout: 272 seconds]
terrellt has quit [Ping timeout: 265 seconds]
gja has quit [Quit: This computer has gone to sleep]
huttan- has joined #ruby
po10 has joined #ruby
Hanmac has joined #ruby
freezey has quit [Remote host closed the connection]
emocakes has joined #ruby
BillyJack has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
phipes has joined #ruby
huttan- has quit [Ping timeout: 246 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
ninegrid has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
blarghmatey has quit [Ping timeout: 260 seconds]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
codepython777 has quit [Quit: Leaving.]
mordocai` has joined #ruby
coder_neo has joined #ruby
codepython777 has joined #ruby
ninegrid has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
icy` has joined #ruby
<pontiki> o/
ce_afk is now known as cescalante
BillyJack has joined #ruby
mordocai` has quit [Read error: Connection reset by peer]
shanlar has quit [Quit: Be back later]
cescalante is now known as ce_afk
IceDragon_ has joined #ruby
mordocai` has joined #ruby
chrisramon has joined #ruby
P1RATEZ has quit [Ping timeout: 252 seconds]
mordocai` has quit [Remote host closed the connection]
shanlar has joined #ruby
figgleberry has quit [Ping timeout: 272 seconds]
IceDragon has quit [Ping timeout: 264 seconds]
Cephalostrum has quit [Ping timeout: 264 seconds]
shanlar has quit [Client Quit]
simplyaubs has quit [Ping timeout: 272 seconds]
shanlar has joined #ruby
Cephalostrum has joined #ruby
mansi has joined #ruby
krz has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
tharindu has joined #ruby
figgleberry has joined #ruby
coder_neo has quit [Quit: This computer has gone to sleep]
Brolen has joined #ruby
codepython777 has quit [Quit: Leaving.]
rajasaurus has joined #ruby
toastynerd has quit [Remote host closed the connection]
`petey` has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<Oog> t = Tempfile.new("pluto") if I write to t then read from it is this ok and am I guaranteed the read will give me what i wrote?
toastynerd has joined #ruby
Wixy has quit [Ping timeout: 246 seconds]
Mattx has quit [Ping timeout: 264 seconds]
figgleberry has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
BillyJack has quit [Ping timeout: 245 seconds]
e62 has joined #ruby
rajasaurus has quit [Read error: Connection reset by peer]
raja has joined #ruby
ando has joined #ruby
yasushi has joined #ruby
cyberarm has quit [Quit: Bye]
braincrash has quit [Quit: bye bye]
mavcunha has quit [Quit: Computer has gone to sleep.]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
vlad_starkov has joined #ruby
nmabry has joined #ruby
e62 has quit [Ping timeout: 260 seconds]
<popl> Oog: Have you read the documentation for Tempfile?
braincrash has joined #ruby
<Oog> yes
vlad_starkov has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
<popl> The reason I ask is that the documentation clearly shows writing to and reading from a Tempfile instance. So I don't understand the question, I guess.
CpuID has quit [Quit: This computer has gone to sleep]
baroquebobcat has quit [Client Quit]
Kar- has joined #ruby
Mattx has joined #ruby
Wixy has joined #ruby
<Oog> i see
<Oog> i had not read that part
lyanchih has quit [Quit: lyanchih]
<Oog> thanks
nmabry has quit [Ping timeout: 272 seconds]
braincra- has joined #ruby
Oog has left #ruby [#ruby]
ewnd9 has joined #ruby
oz` has joined #ruby
TheNumb_ has joined #ruby
Vivekananda has joined #ruby
CpuID has joined #ruby
TheNumb has quit [Ping timeout: 252 seconds]
Catie has quit [Ping timeout: 252 seconds]
phrozen77 has quit [Ping timeout: 252 seconds]
oz has quit [Ping timeout: 252 seconds]
oz` is now known as oz
simoz118 has joined #ruby
Kar- has quit [Ping timeout: 245 seconds]
BillyJack has joined #ruby
braincrash has quit [Ping timeout: 252 seconds]
BillyJack has quit [Read error: Connection reset by peer]
sergicles has quit [Quit: sergicles]
JohnBat26 has joined #ruby
phrozen77 has joined #ruby
Catie has joined #ruby
lioninawhat has joined #ruby
Soda has joined #ruby
sergicles has joined #ruby
maroloccio has quit [Ping timeout: 260 seconds]
mmitchell has joined #ruby
yfeldblum has quit [Remote host closed the connection]
IceDragon_ has quit [Quit: Space~~~]
Brolen has quit [Quit: Brolen]
e62 has joined #ruby
sassamo_ has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
sassamo has joined #ruby
sergicles has quit [Quit: sergicles]
ando has quit [Remote host closed the connection]
ando has joined #ruby
BillyJack has joined #ruby
BillyJack has quit [Read error: Connection reset by peer]
e62 has quit [Ping timeout: 246 seconds]
serp` has joined #ruby
sassamo has quit [Ping timeout: 264 seconds]
reach has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
fgo has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
nmabry has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
ambushsabre has quit [Quit: rip]
codymtx has joined #ruby
raja has quit [Ping timeout: 272 seconds]
megus has quit [Quit: megus]
ner0x has quit [Quit: Leaving]
noop has joined #ruby
charliesome has joined #ruby
ehc has quit [Quit: ehc]
nmabry has quit [Ping timeout: 265 seconds]
Kricir has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 264 seconds]
rankine has joined #ruby
raja has joined #ruby
Kricir has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
ylluminate has quit [Quit: Bye!]
ando has quit [Remote host closed the connection]
ando has joined #ruby
Mars has joined #ruby
BillyJack has joined #ruby
Mars is now known as Guest84540
BillyJack has quit [Read error: Connection reset by peer]
helpa has joined #ruby
ando has quit [Remote host closed the connection]
allaire has quit []
ando has joined #ruby
fgo has joined #ruby
mordocai` has joined #ruby
_whitelogger_ has joined #ruby
dominikh has joined #ruby
`petey` has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
dseitz has joined #ruby
`petey` has joined #ruby
<centrx> whomp, hmm
krz has joined #ruby
alexfreidah has quit [Ping timeout: 260 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
vlad_starkov has joined #ruby
nmabry has joined #ruby
<centrx> whomp, Probably should make a pastie/pastebin with the code and error message
<whomp> centrx, permissions issue? lock issue?
<centrx> What do you mean by printing out? How can you print out a Photoshop file in irb?
yasushi has quit [Remote host closed the connection]
<whomp> it prints out the object representing the file
`petey` has quit [Ping timeout: 272 seconds]
<whomp> the file returned by PSD.new
soba has joined #ruby
BillyJack has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
JPascal has joined #ruby
<icy`> PSD.open('file.psd') {|f| (print out properties of f} like that?
BillyJack has quit [Read error: Connection reset by peer]
nmabry has quit [Client Quit]
chrisramon has quit [Quit: chrisramon]
<icy`> whomp, in that style, f stays within scope of {} and closes after }
<whomp> ohh snap
<whomp> man i had no clue
<icy`> or you can do .open and later .close style
yarou has quit [Quit: This computer has gone to sleep]
<whomp> any ideas why it prints out less output in a program than in irb?
ando has quit [Ping timeout: 272 seconds]
<icy`> as centrx said, pastie is probably best
mrnugget has joined #ruby
Kar- has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
e62 has joined #ruby
<whomp> icy` and centrx, ty
sethen has quit [Remote host closed the connection]
lyanchih has joined #ruby
Kar- has quit [Ping timeout: 272 seconds]
Spitfire has joined #ruby
bluOxigen has joined #ruby
mercwithamouth has joined #ruby
jeremyevans has quit [Quit: leaving]
BillyJack has joined #ruby
Guest84540 has quit [Remote host closed the connection]
BillyJack has quit [Read error: Connection reset by peer]
pehlert has joined #ruby
noop has quit [Ping timeout: 252 seconds]
sindork_ has quit [Remote host closed the connection]
pehlert has quit [Ping timeout: 260 seconds]
thomasxie has joined #ruby
codymtx has left #ruby [#ruby]
lukec has quit [Quit: lukec]
wallerdev has quit [Read error: Connection reset by peer]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
siwica has quit [Ping timeout: 272 seconds]
e62 has quit [Ping timeout: 264 seconds]
BillyJack has joined #ruby
prc has quit [Quit: Leaving.]
BillyJack has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
rankine has quit [Ping timeout: 252 seconds]
Jake232 has joined #ruby
mmitchell has quit [Remote host closed the connection]
reach has quit [Remote host closed the connection]
toydestroyer_ has joined #ruby
toydestroyer_ is now known as toydestroyer
juarlex has quit [Remote host closed the connection]
yfeldblum has joined #ruby
toydestroyer has left #ruby [#ruby]
danshult_ has quit [Remote host closed the connection]
emocakes has quit [Quit: Leaving...]
tyl has joined #ruby
dukz has joined #ruby
simoz118 has quit [Ping timeout: 272 seconds]
Mars has joined #ruby
whomp has quit [Ping timeout: 272 seconds]
Mars is now known as Guest63067
toydestroyer has joined #ruby
toydestroyer has quit [Client Quit]
toydestroyer has joined #ruby
robertrv has joined #ruby
BillyJack has joined #ruby
jailbot has joined #ruby
<jailbot> hiya!
<jailbot> what does =~ mean
<checkers> it's a regex match
<jailbot> specific to regex tho
<checkers> ?
<jailbot> idk man
<popl> What are you asking?
<jailbot> what that means
<checkers> ah
tectonic has joined #ruby
<popl> =~ is the pattern match operator
<jailbot> == would match objects
<checkers> it's a form of text pattern matching
<popl> == matches integers
BrixSat has quit [Read error: Connection reset by peer]
<popl> == in ruby might be overloaded to match objects. I don't know.
<checkers> jailbot: this shows some examples of what =~ can do http://en.wikipedia.org/wiki/Regular_expression#Examples
OdNairy has joined #ruby
<popl> I'm sure you could find out as easily as I could.
BrixSat has joined #ruby
kiri has quit [Read error: Operation timed out]
<jailbot> you cant google that shit
<jailbot> thanks for your help
Virtualize has quit [Ping timeout: 272 seconds]
<popl> jailbot: try duckduckgo
sassamo has joined #ruby
<agent_white> See ya Radar!
kiri has joined #ruby
<popl> search for ruby match operator
<agent_white> mt :P
<jailbot> k thanks
<icy`> !('hello' =~ /h/ ).nil?
shedd has quit [Remote host closed the connection]
agent_white has quit [Quit: brb]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrnugget has quit [Quit: mrnugget]
juarlex has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
spyzer has joined #ruby
danshultz has joined #ruby
mrnugget has joined #ruby
Guest63067 has quit [Remote host closed the connection]
<spyzer> hey everyone, I am receiving a response from server which is UTF-8, when I open my "json" url in browser contents are like this https://gist.github.com/abhishek0/546103f1634507162fe0 They have \u003c shown. I think browser is doing that for me, but when I receive the same thing in my ruby code printing the server response shows control characters and random characters
<spyzer> I tried encoding the server response to UTF-8 but it still shows the same thing
<centrx> What version of Ruby are you using?
juarlex has quit [Ping timeout: 252 seconds]
<spyzer> 2.0.0p247
whomp has joined #ruby
<spyzer> centrx: I think I might be doing something foolish though, I am having a hard time figuring it out
w4pm has joined #ruby
<centrx> What are the random characters that Ruby is showing?
<spyzer> and one more thing I am actually using JSON.parse on server response
toydestroyer has quit [Ping timeout: 272 seconds]
Kar- has joined #ruby
danshultz has quit [Remote host closed the connection]
Jake232 has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
charliesome has joined #ruby
<spyzer> centrx: a square box with 0011 inside it
<spyzer> I think JSON parsing might be removing something
<spyzer> ?
parduse is now known as Guest75107
parduse has joined #ruby
Guest75107 has quit [Ping timeout: 252 seconds]
carraroj has joined #ruby
<centrx> spyzer, Maybe. You could compare before and after
<centrx> spyzer, Does Ruby show the < > symbols? That is what 003c and 003e are
<centrx> Then 0011 appears for some reason, for which it does not have an ordinary symbol
w4pm has quit [Ping timeout: 265 seconds]
<spyzer> centrx: I just saw it is the json parsing, you are right. So how can I fix this
Kar- has quit [Ping timeout: 245 seconds]
yasushi has joined #ruby
<centrx> spyzer, Do the transcoding before JSON.parse?
<centrx> spyzer, You can also try the String#unpack method if String#encode does not work
juarlex has joined #ruby
<dseitz> you could also update your font to something like source code pro hehehe
echevemaster has quit [Quit: Leaving]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has joined #ruby
heftig has quit [Quit: Quitting]
yasushi has quit [Ping timeout: 245 seconds]
Vivekananda has quit [Quit: Ex-Chat]
juarlex has quit [Ping timeout: 264 seconds]
bitness64 has quit [Ping timeout: 272 seconds]
phansch has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
pranny has quit [Ping timeout: 245 seconds]
charliesome has quit [Remote host closed the connection]
charliesome has joined #ruby
carraroj has quit [Read error: Operation timed out]
mengu has joined #ruby
fgo has quit [Remote host closed the connection]
emocakes has joined #ruby
ce_afk is now known as cescalante
<spyzer> centrx: There is one thing that server is sending me a stringified json and one particular key-value pair in that json is itself unicode encoded. Does that affect json parsing? Bcoz this key value pair is already a string in utf-encoded so it aint' converting to what I want
<centrx> I don't know
<centrx> That is where unpack might be helpful
raja has quit [Ping timeout: 252 seconds]
<centrx> The server is converting perfectly ordinary ASCII characters like < > to Unicode, so that seems fixable if you controlled the server
juarlex has joined #ruby
tyl has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<spyzer> centrx: so i use unpack and pack again in what format i will have to unpack and into what should i pack again? please tell
Jake232 has joined #ruby
juarlex has quit [Ping timeout: 260 seconds]
zipper has joined #ruby
yacks has quit [Quit: Leaving]
<dseitz> Out of all the characters to escape and they didn't escape the ' in 'we couldn't find this page' only thing that gives me problem with your gist in Ruby
<spyzer> dseitz: ohh but this is a copy pasted server response
<spyzer> dseitz: Also I simply copy that part of response which has the unicode encoded string and try to convert it to ascii in ruby it works, but entire response itself is a string so is my response like encoded two times?
daidoji has quit [Ping timeout: 272 seconds]
<spyzer> dseitz: I can;t control the server but :(
<dseitz> like json.to_json.to_json hehehe
<centrx> spyzer, I assign the value to a variable in irb and it converts it ASCII :)
<dseitz> jsonlint shows no errors with the response's encoding as well
mark_oz has joined #ruby
<spyzer> centrx, dseitz exactly this is what is happening to me as well
dogonthesun has joined #ruby
<spyzer> the server response is a stringified json and my actualy unicoded content is a part of this stringified json
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<spyzer> I am also able to convert the response to normal if i select it
<spyzer> but JSON.parse I don't know what;s wrong with it
<dseitz> What version of json do you have installed
juarlex has joined #ruby
tagrudev has joined #ruby
e62 has joined #ruby
<spyzer> dseitz: I don't get it json parse is also working on irb IFF I escape the ' character which you mentioned
<spyzer> 1.8
Kricir has joined #ruby
pranny has joined #ruby
carraroj has joined #ruby
pranny1 has joined #ruby
<spyzer> dseitz: okay this new gisr why do you think this might be failing https://gist.github.com/abhishek0/6e1d9c8852992b920d5e
juarlex has quit [Ping timeout: 260 seconds]
AlSquire has joined #ruby
noop has joined #ruby
e62 has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
shedd has joined #ruby
charliesome has quit [Remote host closed the connection]
pranny has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
Kricir has joined #ruby
daidoji has joined #ruby
krz has quit [Ping timeout: 245 seconds]
juarlex has joined #ruby
phipes has quit [Remote host closed the connection]
meatherly has joined #ruby
Macaveli has joined #ruby
centrx has quit [Quit: Leaving]
krz has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
aurimasn has joined #ruby
juarlex has quit [Ping timeout: 252 seconds]
meatherl_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
fgo has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
alexfreidah has joined #ruby
Spami has joined #ruby
mengu has quit [Remote host closed the connection]
<spyzer> okay finally a good gist for asking to people https://gist.github.com/abhishek0/5af8fa2cedb7611d0164 What is going on here?
juarlex has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
meatherl_ has quit [Ping timeout: 245 seconds]
`petey` has joined #ruby
tectonic has quit []
alexfreidah has quit [Ping timeout: 260 seconds]
chinkung has quit [Read error: Connection reset by peer]
chinkung has joined #ruby
juarlex has quit [Ping timeout: 264 seconds]
gja has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
`petey` has quit [Ping timeout: 272 seconds]
ahmedelgabri has joined #ruby
jprovazn has joined #ruby
juarlex has joined #ruby
meatherly has joined #ruby
spyzer has quit [Quit: Page closed]
Kar- has joined #ruby
stryek has quit [Ping timeout: 246 seconds]
juarlex has quit [Ping timeout: 252 seconds]
kacperix has joined #ruby
zxd has joined #ruby
aspires has quit []
bluOxigen has quit [Ping timeout: 265 seconds]
Kar- has quit [Ping timeout: 264 seconds]
Mars has joined #ruby
Mars is now known as Guest776
ahmedelg_ has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
ahmedelgabri has quit [Ping timeout: 260 seconds]
klaut has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
zxd has quit [Ping timeout: 272 seconds]
agjacome has joined #ruby
juarlex has joined #ruby
jailbot has quit []
tylersmith has quit [Remote host closed the connection]
danshultz has joined #ruby
Guest776 has quit [Ping timeout: 264 seconds]
toastynerd has quit [Remote host closed the connection]
cjsarette has joined #ruby
juarlex has quit [Read error: No route to host]
raja has joined #ruby
juarlex has joined #ruby
toydestroyer has joined #ruby
pehlert has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
juarlex has quit [Read error: No route to host]
juarlex has joined #ruby
brennanMKE has quit [Remote host closed the connection]
raja has quit [Ping timeout: 264 seconds]
fixl has joined #ruby
sassamo has joined #ruby
kitak has quit [Read error: Connection reset by peer]
whomp has quit [Ping timeout: 272 seconds]
kitak has joined #ruby
juarlex_ has joined #ruby
pehlert has quit [Ping timeout: 272 seconds]
meatherly has quit [Ping timeout: 264 seconds]
DouweM has quit [Read error: Connection reset by peer]
juarlex__ has joined #ruby
juarlex has quit [Ping timeout: 245 seconds]
jhaals has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
sassamo has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
juarlex_ has quit [Ping timeout: 265 seconds]
dagobah has joined #ruby
gja has joined #ruby
apeiros has joined #ruby
juarlex__ has quit [Ping timeout: 265 seconds]
icy` has quit [Read error: Connection reset by peer]
tharindu has quit [Quit: Leaving...]
rmroulette has joined #ruby
rdark has joined #ruby
claymore has joined #ruby
<rmroulette> ruby noob here, is it a good idea to use active record outside a rails app?
lyanchih has quit [Quit: lyanchih]
Kruppe has quit [Ping timeout: 240 seconds]
TDJACR has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
jimeh_ has quit [Ping timeout: 240 seconds]
jimeh has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
jhaals has joined #ruby
Kruppe has joined #ruby
TDJACR has joined #ruby
senayar has joined #ruby
lyanchih has joined #ruby
Thanatermesis has joined #ruby
camilasan has joined #ruby
<dseitz> It's just a library, you'd employ it the same way rails does
toastynerd has joined #ruby
seich- has joined #ruby
jhaals has quit [Client Quit]
JPascal has quit [Read error: Connection reset by peer]
h_kon has joined #ruby
JPascal has joined #ruby
dik_dak has quit [Quit: Leaving]
shedd has joined #ruby
Thanatermesis has quit [Read error: Connection reset by peer]
fusi0n has joined #ruby
Advocation has quit [Quit: Advocation]
subbyyy has joined #ruby
Styles has quit [Ping timeout: 245 seconds]
Jetchisel has joined #ruby
subbyyy_ has joined #ruby
mrnugget has quit [Quit: mrnugget]
shedd has quit [Ping timeout: 265 seconds]
Kricir has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<Macaveli> Top of the morning to Ya.
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subbyyy__ has joined #ruby
subbyyy_ has quit [Ping timeout: 245 seconds]
zipper has quit [Remote host closed the connection]
ahawkins has joined #ruby
zipper has joined #ruby
relix has joined #ruby
iaj_ has quit [Remote host closed the connection]
tyl has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
simoz118 has joined #ruby
camilasan has quit [Read error: Operation timed out]
mrnugget has joined #ruby
subbyyy__ has quit [Ping timeout: 246 seconds]
kacperix has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tyl has joined #ruby
ando has joined #ruby
tyl has quit [Client Quit]
yasushi has joined #ruby
cads has quit [Ping timeout: 252 seconds]
subbyyy has quit [Ping timeout: 272 seconds]
baschtmobil has joined #ruby
Kar- has joined #ruby
CpuID has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
tesuji has joined #ruby
Kar- has quit [Ping timeout: 245 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
CpuID has joined #ruby
rootshift has joined #ruby
agjacome_ has joined #ruby
threesome has joined #ruby
jhaals has joined #ruby
agjacome has quit [Ping timeout: 265 seconds]
rootshift has quit [Client Quit]
RedNifre has quit [Ping timeout: 272 seconds]
noname001 has joined #ruby
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
raja has joined #ruby
jhaals has quit [Ping timeout: 252 seconds]
aganov has joined #ruby
aurimasn has quit [Read error: Connection reset by peer]
zigomir has quit [Ping timeout: 272 seconds]
aurimasn has joined #ruby
jhaals has joined #ruby
craigp has joined #ruby
Soda has quit [Read error: Connection reset by peer]
blaxter_ has joined #ruby
olivier_bK has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
raja has quit [Ping timeout: 264 seconds]
brennanMKE has joined #ruby
sassamo has joined #ruby
Hanmac has joined #ruby
toastynerd has quit [Remote host closed the connection]
tylersmith has joined #ruby
zigomir has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 272 seconds]
LekeFly has joined #ruby
dogonthesun has quit [Quit: Computer has gone to sleep.]
zipper has joined #ruby
m00nlight has quit [Quit: Konversation terminated!]
sassamo has quit [Ping timeout: 252 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
tylersmith has quit [Ping timeout: 272 seconds]
dfranciosi has joined #ruby
tharindu has joined #ruby
ahmedelg_ has quit [Remote host closed the connection]
toydestroyer has left #ruby [#ruby]
gja has joined #ruby
io_syl has joined #ruby
io_syl has quit [Client Quit]
BaroMeter has quit [Quit: Leaving]
raja has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
Thanatermesis has joined #ruby
Thanatermesis has quit [Changing host]
Thanatermesis has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
e62 has joined #ruby
poulson has joined #ruby
tharindu has quit [Ping timeout: 264 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
raja has quit [Ping timeout: 252 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
Kar- has joined #ruby
ando has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ando has joined #ruby
emocakes has quit [Read error: Connection reset by peer]
e62 has quit [Ping timeout: 252 seconds]
noname001 has quit [Read error: Connection reset by peer]
dogonthesun has joined #ruby
nhhagen has joined #ruby
shedd has joined #ruby
nvrch has joined #ruby
robbyoconnor has joined #ruby
Kar- has quit [Ping timeout: 260 seconds]
MindfulMonk has joined #ruby
noname001__ has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
xjiujiu has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
Kricir has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
mark_oz has quit [Remote host closed the connection]
ando has quit [Remote host closed the connection]
ando has joined #ruby
jlebrech has joined #ruby
alexfreidah has joined #ruby
rootshift has joined #ruby
ando has quit [Remote host closed the connection]
obs_ has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
ando has joined #ruby
roolo has joined #ruby
wallerdev has quit [Quit: wallerdev]
Speed has joined #ruby
`petey` has joined #ruby
obs_ has quit [Client Quit]
ephemerian has joined #ruby
Hanmac1 has joined #ruby
ando has quit [Remote host closed the connection]
alexfreidah has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
ando has joined #ruby
Guedes_ has left #ruby ["Saindo"]
dogonthesun has quit [Quit: Computer has gone to sleep.]
cbetta_afk is now known as cbetta
ando has quit [Remote host closed the connection]
ando has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
`petey` has quit [Ping timeout: 272 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
apeiros has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 264 seconds]
drumusician has joined #ruby
razibog has quit [Ping timeout: 272 seconds]
zipper has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
dEPy has joined #ruby
klaut has quit [Remote host closed the connection]
charliesome has quit [Read error: Connection reset by peer]
CpuID has quit [Read error: Connection reset by peer]
senayar_ has joined #ruby
h_kon has quit [Remote host closed the connection]
senayar_ has quit [Client Quit]
ando has quit [Remote host closed the connection]
ando has joined #ruby
wald0 has joined #ruby
senayar_ has joined #ruby
alexherbo2 has joined #ruby
<wald0> is the same for all these ways?: def initialize=(age) ; def initialize(age) ; def initialize (age) ; def initialize = (age)
senayar has quit [Ping timeout: 264 seconds]
nhhagen has quit [Remote host closed the connection]
senayar_ is now known as senayar
<wald0> and: def initialize age
OdNairy has joined #ruby
BalkM has joined #ruby
apeiros has joined #ruby
BalkM is now known as bMalum
Mars has joined #ruby
ctp has joined #ruby
Targen_ has joined #ruby
ando has quit [Remote host closed the connection]
cbetta is now known as cbetta_afk
Mars is now known as Guest6699
ando has joined #ruby
ctp has quit [Client Quit]
mehlah has joined #ruby
Guest6699 has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 260 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
camilasan has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 246 seconds]
ferr has joined #ruby
tt1187 has joined #ruby
cbetta_afk is now known as cbetta
<Hanmac> wald0 initialize= and initialize are two different methods
OdNairy has quit [Read error: Connection reset by peer]
TMM has joined #ruby
<wald0> really ? mmh :/
fgo has quit [Remote host closed the connection]
krz has joined #ruby
pehlert has joined #ruby
Kar- has joined #ruby
colonolGron has joined #ruby
LekeFly has quit [Quit: Textual IRC Client: www.textualapp.com]
ando has quit [Remote host closed the connection]
Al__ has joined #ruby
sassamo has joined #ruby
ando has joined #ruby
pehlert has quit [Ping timeout: 264 seconds]
e62 has joined #ruby
RedNifre has joined #ruby
juarlex has joined #ruby
obs_ has joined #ruby
obs_ has quit [Client Quit]
hiall has quit [Quit: hiall]
rootshift has quit [Quit: rootshift]
sassamo has quit [Ping timeout: 246 seconds]
e62 has quit [Ping timeout: 272 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
cbetta is now known as cbetta_afk
juarlex has quit [Ping timeout: 252 seconds]
okinomo has joined #ruby
tharindu has joined #ruby
brennanMKE has joined #ruby
obs_ has joined #ruby
chinkung has quit [Read error: Connection reset by peer]
chinkung has joined #ruby
threesome has quit [Remote host closed the connection]
obs_ has quit [Client Quit]
obs_ has joined #ruby
toastynerd has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
tharindu has quit [Ping timeout: 264 seconds]
obs_ has quit [Client Quit]
CpuID has joined #ruby
Macaveli has quit [Ping timeout: 272 seconds]
obs_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
toastynerd has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
cbetta_afk is now known as cbetta
bMalum has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
hiall has joined #ruby
zipper has joined #ruby
timonv has quit [Remote host closed the connection]
okinomo has quit [Ping timeout: 246 seconds]
shedd has joined #ruby
CpuID has quit [Ping timeout: 252 seconds]
okinomo has joined #ruby
okinomo is now known as Casey
<wald0> > In addition, assignment operators(+= etc.) are not user-definable.
<wald0> they are not ?
yfeldblum has quit [Ping timeout: 272 seconds]
kitak has quit [Read error: Connection reset by peer]
kitak_ has joined #ruby
hiall has quit [Ping timeout: 265 seconds]
<apeiros> no, because they are syntax sugar
ando has quit [Remote host closed the connection]
<apeiros> you can define +, -, * etc, by which you more or less also define +=, -=, *= etc
ndrei has joined #ruby
ando has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
klaut has joined #ruby
<wald0> ok
craigp is now known as thunderkeg
thunderkeg is now known as craigp
<wald0> class << obj ; expr ; end
<wald0> what this is for?
ando has quit [Remote host closed the connection]
<apeiros> opens the singleton class
ando has joined #ruby
pranny1 has quit [Quit: Leaving.]
Kricir has joined #ruby
<wald0> singleton ? mmh, i think that i have not read about this
<apeiros> (almost) every object has a singleton class, which defines methods which only apply to that single object
<apeiros> don't confuse singleton class and singleton pattern
<wald0> where i could read about this?
Wolland has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<apeiros> dunno
ando has quit [Remote host closed the connection]
<wald0> whats the difference to use or not "=" in a method definition?
<wald0> like: def age=(new_age)
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby
<tobiasvl> nothing syntactically
<apeiros> the = is just part of the name
ando has quit [Remote host closed the connection]
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ando has joined #ruby
<tobiasvl> but semantically it's a setter method
<apeiros> `x.foo = 12` invokes the foo= method
ando has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
ando has joined #ruby
<apeiros> while `x.foo 12` invokes the foo method
<tobiasvl> google attr_writer, which is sugar for creating methods lile that
buzzybron has joined #ruby
fgo has joined #ruby
drumusician has quit [Ping timeout: 245 seconds]
marr has joined #ruby
<apeiros> google :(
ando has quit [Remote host closed the connection]
<apeiros> use proper api docs
<buzzybron> how do i call a method within my own class during initialize?
<buzzybron> is that possible?
ando has joined #ruby
<apeiros> buzzybron: initialize is a normal instance method
<apeiros> so yes, just like from any other instance method too
lkba has quit [Ping timeout: 272 seconds]
<wald0> ah, i see
ndrei has quit [Quit: Lost terminal]
yasushi has quit [Remote host closed the connection]
kacperix has joined #ruby
<buzzybron> so... if i have another method called another_met(), i can just call it in the initialize method? with another_met()?
ndrei has joined #ruby
<apeiros> yes
OdNairy has joined #ruby
<wald0> apeiros: "proper api docs", which ones you mean? i dont know yet "the best place where to search documentation when i need to" (better if offline)
nari has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
zeeraw has joined #ruby
canton7-mac has joined #ruby
<apeiros> offline: ri, else rdoc.info or ruby-doc.org
kacperix has quit [Client Quit]
fgo has quit [Ping timeout: 246 seconds]
tharindu has joined #ruby
ando has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
<wald0> is yard the replacement of rdoc ? (improved)
claymore has quit [Quit: Leaving]
<apeiros> it's a competitor
<apeiros> I prefer yard
h_kon has joined #ruby
<wald0> can i generate docs from comments of my code similar to doxygen with it ? (i have read about that for rdoc)
hiall has joined #ruby
kitak_ has quit [Remote host closed the connection]
<apeiros> yes, rdoc and yard do that
avril14th has joined #ruby
<apeiros> ri or your browser can then be used to view the generated docs
ferr has quit [Ping timeout: 272 seconds]
* wald0 switches the pointer of a neuron from rdoc to yard
mehlah has quit [Ping timeout: 260 seconds]
mk-qi has quit [Ping timeout: 265 seconds]
<apeiros> yard can also tell you what you forgot to document
dgheath21 has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
<wald0> hum, that's nice
ndrei has quit [Ping timeout: 245 seconds]
kacperix has joined #ruby
<wald0> forced documenting :)
tkuchiki has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 265 seconds]
tkuchiki has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros> for me it's more a help to find missing spots
<apeiros> quite annoying to find them manually
Macaveli has joined #ruby
ahmedelgabri has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
w1xz has joined #ruby
tkuchiki has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
m00nlight has joined #ruby
tobylane has joined #ruby
Albright_ has joined #ruby
Albright has quit [Ping timeout: 272 seconds]
Albright_ is now known as Albright
* Hanmac laughs because rdoc did broke itself ;D
ndrei has joined #ruby
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kacperix has joined #ruby
_JamieD_ has joined #ruby
dukz has quit [Remote host closed the connection]
kacperix has quit [Client Quit]
<wald0> def initialize(name="Unknown", age)
<wald0> im doing tests but im unable to create an object having the Unknown name value
buzzybron has left #ruby [#ruby]
<wald0> a = Foo.new nil, 15 not works too
dukz has joined #ruby
wildroman2 has joined #ruby
<hoelzro> I feel like Foo.new(15) should do it?
<wald0> hu, how is that possible?
<hoelzro> >> class Foo ; def initialize(name='Unknown', age) puts name; puts age; end ; end Foo.new(15)
<hoelzro> iirc
<hoelzro> as of 1.9
<hoelzro> optionals may precede requireds
<hoelzro> and Ruby figures it out based on the # arguments provided
<wald0> so... if 2 args are set and the first is optional, when i call it only with 1 arg the first optional is shifted ?
<wald0> heh, this is smart... not sure if expected but.. :)
<wald0> funny in any case
<hoelzro> I *think* so
<hoelzro> I'm checking now =)
<workmad3> yeah, it does
sassamo has joined #ruby
<workmad3> that really surprised me when I first encountered it (about 4 months ago :) )
<wald0> seems like ruby make things works by default "no matter what" lol
<hoelzro> yeah, works for me
<hoelzro> it inherited that from Perl =P
<workmad3> until then, I'd figured that optional args had to come after other args
dweeb_ has joined #ruby
<wald0> workmad3: me always coded on that way too
<workmad3> ruby tries to ease the strain... but it's certainly not a 'no matter what' mentality... that's more PHP
pranny has joined #ruby
<hoelzro> workmad3: that was true in 1.8
<wald0> whats wrong with php ? :)
mklappstuhl has joined #ruby
rubyracer has joined #ruby
<workmad3> wald0: you mean other than the syntax? or what they call an object model? or non-local behaviour of several core methods based on external config that itself will depend on compiler flags? (with no way to change it)... or that they *never* seem to deprecate any core methods, with the result of a 'standard library' that's so badly cluttered it's becoming increasingly impossible to know what the hell to use from it... other tha
ace_striker has quit [Ping timeout: 272 seconds]
mklappstuhl has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 252 seconds]
<wald0> workmad3: can you repaste since "other tha..." ? irc cut your message
<workmad3> wald0: ... other than that? :P
colonolGron has quit [Quit: leaving]
<wald0> i was enjoying reading the definition lol
mrnugget has quit [Quit: mrnugget]
<workmad3> wald0: there's a nice article - 'PHP: A Fractal of Bad Design'. Some points may be arguable (and many unarguable points have still been argued by ardent PHPers) but it's quite a good read anyway :)
dogonthesun has joined #ruby
mrnugget has joined #ruby
tt1187 has quit [Read error: No route to host]
stkowski has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
<dweeb_> Im using sucker_punch gem to run a job after_create. The problem is that the job can't find the record that was just created. So somehow the job is run before the record is created? It only happens at heroku and not in local env. Any ideas?
tt1187 has joined #ruby
<wald0> oh btw, what is good for "conf files" in ruby ?
moholinati has joined #ruby
<wald0> i mean, a well maintained lib, easy to use, and a syntax of conf files easy to understand by the users
mehlah has joined #ruby
fgo has joined #ruby
<Hanmac> shevy huhu
brennanMKE has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
h_kon has quit [Remote host closed the connection]
maasha has joined #ruby
mklappstuhl has joined #ruby
h_kon has joined #ruby
dEPy has quit [Quit: Computer has gone to sleep.]
fusi0n has quit [Quit: .]
<wald0> workmad3: I have found somewhere another article too, saying why php rocks better than ruby, explaining that the new features of php makes php nicer than ruby :)
yfeldblum has joined #ruby
<wald0> unfortunately this article is not useful anymore for a flamewar, we are at 2014 so the title deprecates itself lol, too late php
shedd has joined #ruby
<wald0> workmad3: bad design in the title swallowed by the fractal too ? :)
aryaching has joined #ruby
dEPy_ has joined #ruby
<maasha> I am trying to figure out the state of performance of threads vs processes in Ruby2.0 compared to Ruby1.9. I am not finding clear answers with Google ... ?
<maasha> Ruby MRI, btw
lyanchih has quit [Ping timeout: 260 seconds]
thumpba_ has joined #ruby
<wald0> maasha: i think that this is a very application-specific topic
obs_ has quit [Quit: Saliendo]
moholinati has quit [Quit: Leaving]
<Hanmac> wald0 php: 0, "0", 0.0 are false but "0.0" is true
<wald0> different ways of work/use-them different results
<workmad3> maasha: ruby 2 still has a GIL
<wald0> Hanmac: WTF!
wildroman2 has quit [Remote host closed the connection]
obs__ has joined #ruby
<maasha> workmad3: ok, and is there any future plan to improve thread performance?
yfeldblum has quit [Ping timeout: 272 seconds]
<workmad3> maasha: ruby 1.9+ uses native threads... you can't exactly improve thread performance much from that without rewriting the OS :P
<ddd> why would there *not* be plans to increase thread performance?
<workmad3> maasha: I guess what you mean is 'are there any future plans to remove the GIL and allow more than 1 thread to be running in ruby code at once?'
<ddd> as much as the tech can be improved, ruby usually does
<RubyPanther> because threads are silly
thumpba has quit [Ping timeout: 272 seconds]
nari has joined #ruby
<maasha> workmad3: I suppose that is it.
<ddd> rubypanther only the ones coming off your pants ;)
w4pm has joined #ruby
shedd has quit [Ping timeout: 265 seconds]
<RubyPanther> You can pass a filehandle over a socket, so there is no reason left to need threads
<maasha> workmad3: so GIL plans?
<workmad3> I don't know about that one... the work on rubinius shows that it at least seems possible, but it would be a major undertaking in MRI most likely
robertrv has quit [Ping timeout: 245 seconds]
shime has joined #ruby
dukz has quit [Remote host closed the connection]
<RubyPanther> Ruby 2 fixes the COW, so we have full fork power now
obs__ has quit [Remote host closed the connection]
Kricir has joined #ruby
rmroulette has quit [Ping timeout: 260 seconds]
dukz has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<maasha> workmad3: I did find this thread before asking here, but it seems like the story doesnt end here: https://www.ruby-forum.com/topic/4411922
<ddd> workmad3 i thought matz *was* working on removing the GIL, wasn't that what was planned for 2.2? I thought (Hiro?) one of his guys was working on that
wald0 has quit [Read error: Operation timed out]
rootshift has joined #ruby
<workmad3> ddd: I'll trust it when I see it happens ;)
<ddd> I want to say Hiro asaki or something similar to the name
<maasha> ddd: this tells me matz is leaving threading work to the community: http://www.jstorimer.com/blogs/workingwithcode/7766069-matz-is-not-a-threading-guy
obs_ has joined #ruby
nari has quit [Ping timeout: 246 seconds]
alexfreidah has joined #ruby
wald0 has joined #ruby
<ddd> maasha quite possible. this is just something i thought i'd read at an irc meeting of the different ruby implementation discussions
<ddd> admittedly that was awhile ago so..
w4pm has quit [Ping timeout: 272 seconds]
<wald0> Hanmac: workmad3: good for php, but what do you think about the design of java?
Thanatermesis has quit [Ping timeout: 272 seconds]
stkowski has joined #ruby
<Hanmac> java has a design? oO
Kricir has quit [Ping timeout: 246 seconds]
`petey` has joined #ruby
browndawg has joined #ruby
<wald0> idk but a lot of ppl uses it and thinks that is the better language of the world
james_woods has joined #ruby
<workmad3> I know lots of people use it
<workmad3> I don't know many of them that think it's a brilliant language
rubyracer has quit [Quit: Konversation terminated!]
alexfreidah has quit [Ping timeout: 260 seconds]
<wald0> i never tried it, but some friends says that is the biggest s*it ever made, it is really so bad ?
<james_woods> I have an array of hashes and I want to find the max value for a given key in all of those hashes. I have a solution which is returning me a high value but not the max one (so it's not really a solution)
mklappstuhl has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
<canton7-mac> you've got a typo in your solution
<canton7-mac> e['value]']
craigp has quit [Remote host closed the connection]
<wald0> james_woods: i readed in my book about .max and .min, maybe this is what you are searching for?
<james_woods> canton7-mac: copy paste error, its not in my code, I updated the gist
<canton7-mac> your solution is right
<workmad3> james_woods: the typo is still in the gist
<canton7-mac> hmm. is e['value'] a string or a number?
`petey` has quit [Ping timeout: 272 seconds]
<james_woods> workmad3: corrected it now
<james_woods> canton7-mac: its a number
<workmad3> james_woods: could you add the hash and the result to a separate file in the gist possibly?
<canton7-mac> what I'm trying to make sure is that it isn't a number represented as a string
<james_woods> canton7-mac: it looks like this ..... =>[{"measure_time"=>1389351660, "value"=>3.0,
<canton7-mac> looks fine. what you've written should work
<canton7-mac> let's see some sample input and output
kacperix has joined #ruby
<wald0> I just discovered what is "DATA", I found it in a code without understand it and the __END__ stuff, how i can know that things like "DATA" is part of ruby and not the code of the application/gem that im reading ?
<wald0> i mean, there's a lof ot hings in ruby to know
<wald0> maybe some ctags feature for vim for ruby ?
fgo has quit [Remote host closed the connection]
<workmad3> wald0: already exists
craigp_ has joined #ruby
<wald0> workmad3: which thing?
mrdtt has joined #ruby
<workmad3> wald0: ctags can give you tags from ruby code
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
<wald0> mmh, but i need to generate myself the ctags or something like this? from where i can get a ctags file for ruby ?
nari has joined #ruby
<james_woods> canton7-mac: It works now. There was another typo in my code. Thanks!
camilasan has quit [Remote host closed the connection]
<workmad3> james_woods: s/value/measurement_time/ ? :)
hackeron_ has quit [Remote host closed the connection]
zipper has joined #ruby
Deele has joined #ruby
mrdtt has quit [Remote host closed the connection]
camilasan has joined #ruby
simoz118 has quit [Ping timeout: 272 seconds]
Thanatermesis has joined #ruby
hackeron has joined #ruby
enape_101 has quit [Ping timeout: 252 seconds]
<workmad3> wald0: you need to generate the ctags for whatever language you're using
drumusician has joined #ruby
mavcunha has joined #ruby
Kar- has quit [Ping timeout: 252 seconds]
mark_oz has joined #ruby
<workmad3> wald0: tools exist to generate and keep them up to date though (guard-ctags, bundler.vim, etc have various things for extending ctag support)
dEPy_ has quit [Quit: Computer has gone to sleep.]
ahmedelgabri has joined #ruby
zipper has quit [Ping timeout: 260 seconds]
Macaveli has quit [Ping timeout: 272 seconds]
Casey has quit [Ping timeout: 264 seconds]
<wald0> mmh, i need to do some ruby+vim research someday
kizzx2 has quit [Quit: Leaving.]
heftig has joined #ruby
lkba has joined #ruby
<wald0> private
<wald0> # things from here only accessible from the object itself (instances)
<wald0> # calls: method of an object can call its private methods (inside's class code)
<wald0> # cannot call: dog.method_private
<wald0> is this correct? i miss something?
drumusician has quit [Read error: Operation timed out]
ace_striker has quit [Ping timeout: 272 seconds]
<wald0> i know that my english is not perfect, i try to explain it simple and clear :/
dukz has quit [Remote host closed the connection]
kacperix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CpuID has joined #ruby
cbetta is now known as cbetta_afk
ozgun has joined #ruby
ferr has joined #ruby
fgo has joined #ruby
m00nlight_ has joined #ruby
m00nlight has quit [Ping timeout: 252 seconds]
tharindu has quit [Quit: Leaving...]
pehlert has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
zegerjan has joined #ruby
brennanMKE has joined #ruby
blaxter_ is now known as blaxter
cbetta_afk is now known as cbetta
nihed has joined #ruby
<mark_oz> wald0: you cannot call dog.method_private
craigp_ has quit [Remote host closed the connection]
<mark_oz> but you can dog.call(:method_private)
<mark_oz> private methods in ruby aren't very private :)
craigp has joined #ruby
<apeiros_> mark_oz: you mean send, I assume
<mark_oz> send
<mark_oz> yep, you're right.
<Hanmac> wald0 private setter methods like meth= are special
pehlert has quit [Ping timeout: 265 seconds]
sassamo has joined #ruby
<wald0> "send label" for call it ? mmh
brennanMKE has quit [Read error: Operation timed out]
<Hanmac> because you need self.meth= for private setter
<Hanmac> private getter like meth does not work with self.meth
Casey has joined #ruby
<apeiros_> wald0: send is a method too
<apeiros_> it allows invoking methods by name
<apeiros_> and it bypasses private/protected
juarlex has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
<workmad3> there's also public_send which respects them
<apeiros_> and which you should use instead of send whenever you want to call methods by name
mudmaster has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
DouweM has joined #ruby
Macaveli has joined #ruby
<wald0> i assume that if i want to restrict me correctly, then i dont need to use send at all but the normal way ?
fgo has quit [Remote host closed the connection]
<apeiros_> wald0: of course you use foo.bar and not foo.send(:bar)
sassamo has quit [Ping timeout: 264 seconds]
camilasan has quit [Read error: Connection reset by peer]
<apeiros_> but when you have e.g. my_method = :bar; foo.send(my_method), then it's better to use foo.public_send(my_method) instead.
drumusician has joined #ruby
toydestroyer has joined #ruby
toydestroyer has left #ruby [#ruby]
camilasan has joined #ruby
fixl has quit [Remote host closed the connection]
juarlex has quit [Ping timeout: 272 seconds]
kacperix has joined #ruby
vlad_starkov has joined #ruby
kacperix has quit [Client Quit]
<Hanmac> you could also use foo.method(my_method).call ;P
RedNifre has quit [Read error: Connection reset by peer]
<apeiros_> since that doesn't respect privacy either…
dogonthesun has quit [Quit: Computer has gone to sleep.]
<wald0> what is "my_method = :bar" ?
<tobiasvl> it just sets the variable my_method to the symbol :bar
<tobiasvl> nothing fancy
<tobiasvl> but the method send takes a symbol and calls the method with the name which is the value of the symbol
charliesome has joined #ruby
<wald0> mmh, similar to an alias to the method ?
<tobiasvl> not really, it's just a symbol that contains the name of the method
<apeiros_> wald0: :bar is a value, just like "bar" or 12 are values
browndawg has quit [Ping timeout: 264 seconds]
<apeiros_> to be precise: it's a Symbol literal. "foo" is a String literal. 12 is a Fixnum (Integer) literal.
dogonthesun has joined #ruby
dogonthesun has quit [Read error: Connection reset by peer]
dogonthesun has joined #ruby
joaoh82 has quit []
shaunbaker has joined #ruby
sepp2k has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
thelamest has quit [Quit: reboot]
drumusician has quit [Ping timeout: 260 seconds]
psst has joined #ruby
<Hanmac> :"bar & foo" is also a Symbol literal
yfeldblum has joined #ruby
<wald0> Support for Ruby version 1.9.3 will end on February 23, 2015.
<wald0> wait! i have not finished to learn it yet! :/
<wald0> oh, 2015
* wald0 hides
shedd has joined #ruby
<wald0> is there much differences between 2.1 and 1.9.3 ? (syntax), iirc there was not much on 2.0
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
phinfonet has joined #ruby
mircoblitz has joined #ruby
Sawbones has joined #ruby
<charliesome> wald0: nothing major
shime has quit [Ping timeout: 272 seconds]
<apeiros_> hi charliesome
<charliesome> ylo
<charliesome> yo
<apeiros_> yolo?
<workmad3> wald0: 1.9 was mainly the testing ground for new syntax to go into 2.0
nowthatsamatt has joined #ruby
<tagrudev> :)
nowthatsamatt has quit [Client Quit]
yfeldblum has quit [Ping timeout: 264 seconds]
phinfonet has quit [Client Quit]
<mircoblitz> Hi. I am pretty new to ruby (used to other languages though). i am now running into a problem I don't get how to debug ist. I try to connect to a jira sever and get some json data. But executing Net::HTTP.get_response(URI.parse(http://user:test@jira.test.local/rest/api/latest/issue/DO-22)) responds with a 401 in ruby. calling the same url via curl in the terminal gives me a 200 and the data i need. I am puzzled how to debug this.
<wald0> workmad3: well, its default in debian wheezy so thats the reason of why I would stick on it until the next 6 months (next debian release)
shedd has quit [Ping timeout: 260 seconds]
<apeiros_> mircoblitz: might be due to your use of non-standard username/password in the url
Schmidt has quit [Ping timeout: 276 seconds]
<workmad3> apeiros_: user info in the URL is fine
<apeiros_> workmad3: nope. not standard.
<mircoblitz> How would I use user and pass in ruby ?
kirun has joined #ruby
<apeiros_> mircoblitz, workmad3: also it's generally a bad idea to have your username + password in the url.
<workmad3> apeiros_: http://tools.ietf.org/html/rfc3986#section-3.2.1 would disagree
<craigp> mircoblitz: aside from that, check your headers
RedNifre has joined #ruby
<mircoblitz> Yeah I know, but thats neither non standart, nor a real problem if you have scripts running only in the internal network
Schmidt has joined #ruby
<apeiros_> don't tell me that got amended…
<craigp> set your accept and content-type headers
vlad_starkov has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Kricir has joined #ruby
<mircoblitz> craigp: do you have some link to a docu for that please ?
<workmad3> apeiros_: sorry :P
<apeiros_> workmad3: that's URI RFC
emocakes has joined #ruby
<apeiros_> what qualifies as proper userinfo is scheme specific
fgo has joined #ruby
<craigp> mircoblitz: not offhand, try using Faraday from ruby and check the github readme for it
<craigp> should put you in the right direction
<mircoblitz> Thank you
<craigp> 401 is auth issue, so something is cooked
kacperix has joined #ruby
<craigp> can you paste your curl command?
<apeiros_> workmad3: i.e., that document says nothing about http accepting user:pass as userinfo
<Hanmac> the cookies are cooked ;P
tyl has joined #ruby
<craigp> :D
browndawg has joined #ruby
<mircoblitz> craigp: can you paste your curl command? (Didn't I ?
rootshift has quit [Quit: rootshift]
m00nlight_ has quit [Ping timeout: 246 seconds]
<craigp> nope, not ruby, you said you used curl to test?
m00nlight__ has joined #ruby
<craigp> and add -v to see the headers you're sending
claymore has joined #ruby
<craigp> I'm not sure what headers ruby sets by default, but that might be your problem
<mircoblitz> Ahh there you are. got you. 1 sec i test that
<apeiros_> (2nd result with google for me)
<craigp> what apeiros_ said :)
yoshie902a has joined #ruby
nhhagen has joined #ruby
<mircoblitz> That got me in the right direction. Thank you very uch guys
nhhagen has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 245 seconds]
zxq9 has joined #ruby
eka has joined #ruby
kacperix has quit [Client Quit]
<workmad3> apeiros_: ah, I get you now
<apeiros_> @ workmad3
freezey has joined #ruby
mudmaster has joined #ruby
<workmad3> apeiros_: but by extension, the HTTP RFC doesn't define HTTP basic auth
dogonthesun has quit [Quit: Lingo - http://www.lingoirc.com]
wildroman2 has joined #ruby
mark_oz has quit [Ping timeout: 265 seconds]
drumusician has joined #ruby
<apeiros_> hm, sad. the german WP entry states that fact explicitly. the english one doesn't.
obs_ has quit [Remote host closed the connection]
<apeiros_> workmad3: yeah, separate RFC
obs_ has joined #ruby
zipper has joined #ruby
<apeiros_> since it's "just a header/value pair", it doesn't need to be in http's own rfc
megus_ has quit [Ping timeout: 272 seconds]
bMalum has joined #ruby
<workmad3> ok, you win... this time ;)
<apeiros_> :-p
<apeiros_> sorry
<workmad3> hehe
<apeiros_> (yeah, that was a big fat lie, I'm not really sorry :D)
<wald0> how i can say to my gems command to use always --user-install mode ?
tskogberg has quit [Ping timeout: 260 seconds]
<workmad3> wald0: using ~/.gemrc
wildroman2 has quit [Ping timeout: 252 seconds]
<wald0> gem: --user-install
<wald0> like this?
<wald0> entry*
<workmad3> looks about right
<workmad3> mine is just 'gem: --no-ri --no-rdoc'
Targen_ has quit [Ping timeout: 252 seconds]
claymore has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
bMalum has quit [Client Quit]
<wald0> mmh, i have multiple ones starting with gem:
nhhagen has joined #ruby
vlad_starkov has joined #ruby
nhhagen has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
codenapper has quit [Ping timeout: 265 seconds]
claymore has joined #ruby
drumusician has quit [Ping timeout: 272 seconds]
freezey has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 260 seconds]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
tskogberg has joined #ruby
pranny has quit [Quit: Leaving.]
ndrei has joined #ruby
kaldrenon has joined #ruby
mircoblitz has quit [Quit: mircoblitz]
Schmidt has quit [Ping timeout: 260 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
mircoblitz has joined #ruby
DouweM has quit [Quit: Leaving...]
psyl0n has joined #ruby
vlad_starkov has joined #ruby
relix has joined #ruby
cbetta is now known as cbetta_afk
Schmidt has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
kaldrenon has quit [Ping timeout: 245 seconds]
cbetta_afk is now known as cbetta
shedd has joined #ruby
keen_ has quit [Remote host closed the connection]
colonolGron has joined #ruby
drumusician has joined #ruby
mlpinit has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
Schmidt has quit [Ping timeout: 245 seconds]
Sawbones has quit []
keen_ has joined #ruby
aurimasn has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 0.4.2]
shaunbaker has quit [Remote host closed the connection]
brennanMKE has joined #ruby
<Fuzai> Is there anyone around that can answer a simple MongoMapper question for me? http://mongomapper.com/documentation/embedded-document.html How does the line "many :line_items" automatically translate to using the embedded document LineItem?
bMalum has joined #ruby
psyl0n has quit []
<workmad3> Fuzai: because it's a method call
<workmad3> Fuzai: and the method does that
sassamo has joined #ruby
psyl0n has joined #ruby
IceyEC has joined #ruby
<tobiasvl> `many :line_items` is just `many(:line_items)`
<Fuzai> Ok but what I don't get is how LineItem = :line_items
sepp2k1 has joined #ruby
<Fuzai> I mean I don't see any line that makes a clean association of that
<apeiros_> string transformation
<Fuzai> it looks like it's assumed here or something
<Fuzai> is that the case?
<workmad3> Fuzai: convention
varfoo has quit [Quit: WeeChat 0.4.0]
brennanMKE has quit [Ping timeout: 246 seconds]
<Fuzai> anything camel case gets an underscore for a space and a s on the end?
<apeiros_> Fuzai: rails: :line_items.to_s.singularize.camelcase
<apeiros_> will return "LineItem"
<Fuzai> ohhhhh
dEPy_ has joined #ruby
<apeiros_> and the last step is .constantize
<Fuzai> Voodoo, i'm glad I asked
<Fuzai> Thank you
Targen has joined #ruby
<apeiros_> I'd assume mongomapper will allow you to explicitly tell the class name too
<workmad3> Fuzai: the convention is that the association is snake_case and pluralized (on a many association) for a class thats CamelCase and singular
<apeiros_> at least AR does that in similar situations
sepp2k has quit [Ping timeout: 264 seconds]
Schmidt has joined #ruby
<workmad3> Fuzai: and yeah, I'd assume along with apeiros_ that mongomapper allows you to specify an explicit class if desired (in the same way it uses the same conventions for associations)
<Fuzai> workmad3: thank you, you phrased that alot better then I did, but it was the resolution I had come to in my head
mark_oz_ has joined #ruby
<Fuzai> oh so i could do "many LineItem" as well as "many :line_items" ?
<workmad3> Fuzai: heh :) can you tell I've explained that many times in #rubyonrails when talking about active record ;)
<workmad3> Fuzai: doubtful
<apeiros_> more like many :line_items, class_name: "LineItem"
<workmad3> ^^
<Fuzai> ah
<Fuzai> see that reads alot better to me
<workmad3> Fuzai: the first argument is also the method used to access the association after all :)
sassamo has quit [Ping timeout: 272 seconds]
<workmad3> Fuzai: of course, that's a pure guess based on MongoMapper seeming to replicate many AR conventions
<Fuzai> I would assume you are right
<Fuzai> as they even make mention to what you just said
<Fuzai> I have no experience with active record
<workmad3> yeah, if I was using MongoMapper, I'd start with that assumption and check the docs if things broke :)
<Fuzai> and this is the first time i've used an api layer over a database to abstract the data
<workmad3> your first ODM? :D
<workmad3> (Object to Document Mapper)
<Fuzai> the problem is the docs are really light and seem to make assumptions on one side, and the others are very buried and the third set seems like a skeleton and nothing else
cbetta is now known as cbetta_afk
<Fuzai> yea
<Fuzai> ODM, that's what they call this layer
<workmad3> it's normally the ORM when dealing with a relational database
<Fuzai> I really like it so far, i'm used to writing stored procedures so it's quite a transition
ndrei has quit [Ping timeout: 272 seconds]
<mircoblitz> workmad3, apeiros, craigp thank you for your help. Got everything fixed and undersood more about ruby. Bit win for today.
darthdeus has joined #ruby
<workmad3> mircoblitz: I'm not sure I helped much with your problem or ruby understanding, but yw anyway (as I recall, I just got things wrong about the HTTP RFC :) )
e62 has joined #ruby
shime has joined #ruby
lyanchih has joined #ruby
<mircoblitz> your discussion helped :-) the valueable ifo was between the lines ;-)
Targen has quit [Ping timeout: 246 seconds]
mark_oz_ has quit [Ping timeout: 260 seconds]
IceyEC has quit [Quit: IceyEC]
Alina-malina has quit [Read error: Connection reset by peer]
m00nlight__ has quit [Quit: Konversation terminated!]
Alina-malina has joined #ruby
lyanchih has quit [Client Quit]
colonolGron has quit [Quit: leaving]
Alina-malina has quit [Read error: Connection reset by peer]
lyanchih has joined #ruby
cbetta_afk is now known as cbetta
sergicles has joined #ruby
nhhagen has joined #ruby
rudisimo has joined #ruby
zegerjan has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
skaflem has joined #ruby
mudmaster has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
drumusician has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
kacperix has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
IceyEC has joined #ruby
Alina-malina has joined #ruby
sarkie_ruby has joined #ruby
w4pm has joined #ruby
mengu has quit [Remote host closed the connection]
<sarkie_ruby> hi, I'm looking for a gem that just talks to SQL Server, just from a ruby script not rails, just something simple, any ideas?
kacperix has quit [Client Quit]
Kricir has joined #ruby
danshultz has joined #ruby
<Fuzai> mysql2
<Fuzai> but if you need stored procedures it's kind of a tricky thing, I found a work around if you are interested
<Fuzai> or sequel
alexfreidah has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<workmad3> Fuzai: mysql2 talks to mysql, not SQL Server
<Fuzai> Excuse me, you are correct, I didn't read his question right
<workmad3> I'm guessing you read it as 'looking for a gem that talks to *an* sql server'? :)
maroloccio has joined #ruby
`petey` has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
<Fuzai> Yea something like that
Kricir has quit [Ping timeout: 260 seconds]
<Fuzai> I try to forget that there is such a thing as Microsoft SQL server
<apeiros_> I really hate M$ for stealing "SQL Server"
<Fuzai> and I default to mysql because I assume anyone talking about postgres would call it by name
soulcake has joined #ruby
<apeiros_> (the term)
<Fuzai> so I assume incorrectly they were mysql & co
ewnd9 has quit [Ping timeout: 260 seconds]
RaCx has joined #ruby
alexfreidah has quit [Ping timeout: 272 seconds]
<workmad3> apeiros_: strictly speaking, the full name is 'Microsoft SQL Server'
<workmad3> but I know what you mean :)
<Fuzai> is there a way to flush a open file buffer, to force it to write to disk without having to close the file handle each time?
DouweM has joined #ruby
vedic has joined #ruby
<workmad3> Fuzai: you mean a handy method like File#flush? :)
kotk1 has joined #ruby
<apeiros_> workmad3: iirc ms itself refers to it as 'sql server' too. but yeah, maybe the users are to blame.
<Fuzai> nice
mircoblitz has left #ruby [#ruby]
lorelei_ has joined #ruby
endash has joined #ruby
<apeiros_> Fuzai: beware, that only tells ruby to flush. various other layers may still buffer
<Fuzai> Ok, fair enought, thank you :)
`petey` has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
tvw has joined #ruby
<vedic> How do you log the usages of REST API? Eg: How many api access or Auth requests?, How many failed, successful requests? etc. Is there any ruby based library or tool for such cases (High performance) ?
kotk has quit [Ping timeout: 265 seconds]
zipper has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
BillyJack has quit [Remote host closed the connection]
<lupine> lorelei_, I so am
zipper has joined #ruby
carraroj has quit [Ping timeout: 246 seconds]
<workmad3> vedic: depends on where you want to report to... there's things like a Ganglia gem, there's Instrumental.app and a corresponding ruby gem, you could just use a logging gem to log out various usages and use log analysis to get your metrics
<lorelei_> lupine, damn it! Unless, of course, you're now stalking me...
dEPy_ has quit [Quit: Lingo - http://www.lingoirc.com]
phipes has joined #ruby
<vedic> workmad3: I would like to keep this log for next 6 months and considering 50 log requests/second
<lupine> I've been here forever too
<vedic> workmad3: I am not sure if any database will be useful for that or writing on filesystem. I would certainly perform analytics on it time to time to figure out the actual use metrics
breakingthings has joined #ruby
<workmad3> vedic: I'd probably look at ganglia metrics or similar then... they use a round-robin database for metric storage
yalue has joined #ruby
<workmad3> vedic: or just a log file with a suitable logrotate rule setup
<vedic> ok
mudmaster has joined #ruby
mansi has joined #ruby
zxd has joined #ruby
<emocakes> lupine why ?
mark_locklear has joined #ruby
<emocakes> the webserver already logs all that
pranny has joined #ruby
<emocakes> erm
<emocakes> vedic
kiri has quit [Ping timeout: 272 seconds]
sergicles has quit [Quit: sergicles]
<emocakes> you could configure the server logs to be more useful
<emocakes> then you can get more of an idea
<vedic> emocakes: I see
<emocakes> plus its fast
<emocakes> alot faster than ruby would be
kiri has joined #ruby
danshultz has quit []
<lupine> just stick it in a syslog server
<workmad3> emocakes: heh :) I was assuming that it was desired to record the metrics based on some application level data
<lupine> job's a good'un
<emocakes> it might be workmad3, i got no idea of why exactly he needs it
<wald0> is Minitest the prefered "test tool" ?
jkamenik has joined #ruby
<workmad3> wald0: depends on who you're talking to ;)
<emocakes> wald0, testing is so 2007
<wald0> emocakes: what you mean ?
<emocakes> i dont do TDD, i do YOLO
<workmad3> emocakes: YDD!
zxd has quit [Ping timeout: 245 seconds]
<wald0> workmad3: well, i dont need actually a powerful one, but a simple to use and fast to write :)
<emocakes> exactly
<emocakes> YDD
<emocakes> rspec?
<tagrudev> :D
bluOxigen has joined #ruby
<workmad3> rspec, minitest, test/unit, minispec, bacon, testrocket... take your pick :)
<emocakes> i like bacon
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
shedd has joined #ruby
mansi has joined #ruby
<workmad3> emocakes: same... especially for breakfast :)
Casey has quit [Ping timeout: 252 seconds]
phipes has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
<emocakes> I might make some right now workmad3
<emocakes> I'm feeling kind of hungry, nothing like midnight bacon
<workmad3> emocakes: make some? you have a pig ready for butchering?
<wald0> seems like rspec is the most used and the one needed to failt at "packaging/compiling" time? (yeah, there's no compiling, well, you got what i mean)
<emocakes> fry some unfortunately :(
juarlex has joined #ruby
mansi has joined #ruby
<workmad3> wald0: huh? 'needed to fail'?
drumusician has joined #ruby
<workmad3> wald0: also, again, 'most used' would depend on who you talk to :)
<wald0> workmad3: hu? i wrote that? lol sorry, i sleeped today only 4 hours :/
<workmad3> wald0: but the biggest contenders are minitest and rspec
<workmad3> wald0: you *just* wrote it :P
gja has joined #ruby
<wald0> workmad3: but i dont even know what i meant there lol
<workmad3> wald0: hehe :) so saying 'you got what I mean' was incorrect? ;)
<workmad3> wald0: because personally I had no idea what you meant... and it seems neither did you ;)
<wald0> workmad3: if im not wrong, when writting some ruby stuff, there's an .rspec file included which does tests to see if everything works correctly everytime "something" (installing it, packaging it, what else?)
<workmad3> wald0: you're wrong
<workmad3> wald0: the .rspec file is just for providing 'standard' flags to rspec when running it on a per-project basis
<vedic> emocakes: Well, server log will surely inform what time a new request came and what url it had accessed, whether it failed or succeeded etc but on per user basis, ie. user x has logged on this time and access this url won't be there in server log. I need the second part
shedd has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 272 seconds]
amedeiros has quit []
<emocakes> mixture of both?
<workmad3> wald0: e.g. you could put into .rspec in one project '-I foobar_extensions' because that project needs that path on the LOAD_PATH
benzrf has joined #ruby
popl has quit [Ping timeout: 272 seconds]
<wald0> workmad3: mmh, that is that redhat packaging standard stuff?
<emocakes> if possible you might add a custom http header per user
<emocakes> like a hashed guid
<emocakes> :p
<emocakes> then log that as well
<emocakes> and then you get user was here and there at this time and got a 200
<workmad3> wald0: it sounds like you're expecting rspec to be daemonised and running continuously...
<emocakes> or a 403
<workmad3> wald0: which it doesn't do... it runs on demand ;)
<workmad3> wald0: you can run it continuously with something like guard (but you can do that with minitest or anything else too)
mansi has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
pehlert has joined #ruby
<emocakes> http://wiki.nginx.org/HttpCoreModule#.24sent_http_HEADER
larissa has joined #ruby
<emocakes> which looks like you can do vedic
<vedic> emocakes: thats great. But I don't think it can be real time monitored and responded accordingly. Something like rate limit.
<emocakes> understood
<emocakes> honestly, depends on how much performance you want
krawchyk has joined #ruby
<vedic> emocakes: currently 50 requests/second is what I am targetting.
<emocakes> if you needed the absolute speed you do it at the proxy server level
gja has quit [Quit: This computer has gone to sleep]
<emocakes> try write some Rack middleware to check it out vedic
<vedic> emocakes: Didn't get. What you mean by proxy server level
brennanM_ has joined #ruby
zipper has quit [Read error: Connection reset by peer]
mengu has joined #ruby
pranny has quit [Ping timeout: 272 seconds]
<vedic> emocakes: You mean RabbitMQ type?
<emocakes> well you usually have nginx proxying to bunch of workers
brennanMKE has quit [Read error: Connection reset by peer]
<emocakes> or apache or IIS...
bMalum has quit [Read error: Connection reset by peer]
<emocakes> lol IIS
<vedic> emocakes: I use Nginx with GUnicorn
bMalum has joined #ruby
<vedic> lol
<emocakes> so nginx is proxying to gunicorn
<vedic> yea
<wald0> minitest is included in stdlib, which other ones are included too, workmad3 ?
joaoh82 has joined #ruby
<workmad3> wald0: test/unit is too
<wald0> well, as i have read test/unit is actually just a binding for minitest for compatibility
zeeraw has joined #ruby
<benzrf> whats new rubyists
<workmad3> it's not quite just a binding, it adds some extra bits on top
<workmad3> but yeah, it's built on top of minitest since 1.9
<wald0> ok so seems like the candidate is minitest for now :)
<shevy> guys
pehlert has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
<shevy> I wanna distribute a .rb file, standalone. a tutorial. webrick can load it up. now I also want to use images embedded into that .rb file. I believe one can use arbitrary data after __END__ but how could I load and "display" the image(s)? like for instance. "embed" one .png file into a .rb file
<DouweM> WHY
sassamo has joined #ruby
<wald0> what is the more easy to write/read/remember? bacon ? (looks very english/simple writed)
<benzrf> shevy: wtf
<DouweM> But if you really wanted to, read the file, encode it as base64, use an <img> tag with a data-uri
<workmad3> ^^ that could work
<workmad3> shevy: or you use some form of separator to allow you to pick out bits of the DATA section
<shevy> workmad3 ah
amedeiros has joined #ruby
<wald0> shevy: tutorial! send me it :)
<ddd> shevy yeah i get the desire to include all tutorial parts in one lump, but *in* the rb file??
pama has quit [Quit: Connection closed for inactivity]
<workmad3> shevy: then do things like --/img/foobar.png <base64 encoded image>
<shevy> wald0 eeeeh I am laying out the structure first
<Hanmac> shevy my latest rwx commit: "Showing 91 changed files with 1,906 additions and 632 deletions. " ;P
sassamo has quit [Read error: Connection reset by peer]
<ddd> shevy you fall out of bed this morning or something?
brennanM_ has quit [Ping timeout: 252 seconds]
<shevy> ddd yep. I will distribute only one .rb file
<wald0> shevy: i think that we are doing actually the same thing lol
<ddd> shevy yeah thats 600MB huge
sassamo has joined #ruby
<shevy> ddd nah, only small images
<DouweM> shevy: why though
tkuchiki has joined #ruby
<shevy> DouweM so that someone else has to download only one file
<wald0> shevy: its about somekindof ruby reference / example of code?
<workmad3> shevy: which you could then load up on program boot, then when webrick gets a request in, see if it's a registered path for serving a file
<shevy> wald0 yeah. a tutorial that should be extensive, including specific examples with GUI toolkits as well
marcgg_ has joined #ruby
<workmad3> shevy: I think sinatra can manage some of that kind of DATA section manipulation
<DouweM> why not use a zip and a bunch of html files :/ I don't see the use of Ruby here
<ddd> shevy Umm, zip or gz. one file
<ddd> that arg doesn't gist
<shevy> no option. someone else would have to extract it
<shevy> and there won't be any .html files
EngierkO has joined #ruby
<ddd> insane arg but ok
<shevy> your claim not mine
<ddd> i can see for a 'can i?' project but for real??
juarlex has quit [Remote host closed the connection]
<shevy> do I have to repeat myself?
<ddd> hehe, no
<workmad3> shevy: option 3 - base64 encode a zlib file in there
<DouweM> why do you think people could get ruby and the script working but not unzip?
<ddd> wait!
<shevy> it's not as if any of YOU have to write it
<DouweM> right, I'm just baffled that someone would want to
<shevy> DouweM it's a question of convenience and ease of distribution
<workmad3> shevy: then you can use the ruby stdlib zlib to decode it into a tmp directory
juarlex has joined #ruby
<ddd> maybe you do! if you repeat yourself enough maybe you'll see why *we're* all baffled
<workmad3> shevy: and serve up files from that
<shevy> that's fine but it's not for you to decide DouweM
rootshift has joined #ruby
<DouweM> sure
<ddd> but hey like you say you can do as you wish
<ddd> its your time and effort
<shevy> yep, good that we have that cleared up
<ddd> hahah
<ddd> i think thats why i like you
<ddd> totally unflappable
<workmad3> ddd, DouweM: aren't you guys familar with shevy wanting crazy things yet? :P
<ddd> workmad3 yes, but this is an elevation move! :)
<DouweM> workmad3: yeah, but I keep thinking there must be a line somewhere that eve nshevy won't cross :P
<workmad3> ddd: if it helps, think of it as an interesting thought exercise ;)
<ddd> douwem++
<ddd> workmad3 lol touche
ghr has quit [Read error: Operation timed out]
marcgg has quit [Ping timeout: 260 seconds]
<ddd> actually think touche is the wrong wird there
RaCx has quit [Ping timeout: 245 seconds]
sarkie_ruby has quit [Quit: Page closed]
<DouweM> I bet shevy's just a workmad3 alt to spout his insane ideas
<workmad3> ddd: not as wrong a word as 'wird' :)
<ddd> err word. whats the word for you have a point there
albertgrala has joined #ruby
<ddd> hahaha
<ddd> true that
<shevy> how often have you seen workmad3 suggest insane ideas?
<ddd> douwem hah
<DouweM> that's where you come in
<workmad3> shevy: I think that's DouweM's point
<ddd> shevy is the control for often you?
<workmad3> shevy: after all, we've never been seen in public together... :P
<ddd> ;)
<wald0> shevy: nice! please send me it when you have it structured :), im trying to write a (small) reference too
<shevy> workmad3 hey... perhaps we might have crossed in reallife and just did not know!
<workmad3> shevy: ever been to the UK?
<shevy> yeah but only once, to London :(
e62 has quit [Ping timeout: 252 seconds]
<workmad3> right... so highly unlikely :)
<ddd> hehe gotta love shevy and workmad3. two of the most insane, and unflappable guys i know on this network. both are insane of course, but totally hilariously funny
mklappst_ has joined #ruby
<workmad3> which is exactly what I'd expect my insane future self to do if he invented a time machine and wanted to come back in time to screw with me on IRC under an alt!!!!
<DouweM> haha
<workmad3> ddd: hey I'm not ins....
<shevy> why is workmad3 insane
<workmad3> ok...
RaCx has joined #ruby
<ddd> workmad3 oh whoa now! who's to say thats not the actual case?
<ddd> workmad3 hahaha
<ddd> yeah see? can't argue truth there pal
<workmad3> shevy: I've been known to join IRC twice in order to have conversations with myself when bored...
juarlex has quit [Ping timeout: 252 seconds]
tkuchiki_ has joined #ruby
albertgrala has quit [Quit: Leaving]
<shevy> Hanmac is rwx usable finally?
<ddd> hehe
<workmad3> shevy: I even have an alt for it - gonemad3
<shevy> really?
<ddd> shevy workmad3 isnt the stablest rock in the pile ;)
<shevy> I think I saw that nick before hmm
albertgrala has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
raja has joined #ruby
<shevy> indeed... the word mad is part of his nick
<workmad3> shevy: I also sometimes have it set up as my alt if I need to ghost workmad3 :)
<ddd> shevy he can't be afterall. he's friends with *me*!
<ddd> that oughta tell you whats up right there
<Hanmac> shevy: hm most of the added part is usable ... (documented functions should be usable too) but its still not finish yet
<workmad3> shevy: and don't forget... I *enjoy* coding :P
ferr has quit [Ping timeout: 272 seconds]
<workmad3> shevy: which is considered crazy by most people I know IRL... dunno why
mklappstuhl has quit [Ping timeout: 260 seconds]
<ddd> workmad3 hey! you're the same guy that told me if I didn't enjoy it i was in the wrong raquet!
<workmad3> ddd: you are
<workmad3> ddd: doesn't stop it being crazy though ;)
<ddd> hehe
<shevy> well, the creative part of coding is nice
<DouweM> I read other people's code for fun
<shevy> bugs however are damn annoying
<ddd> workmad3 hey it beats swapping out cylinder heads!
<workmad3> shevy: then there's my current stack of bedtime reading - Futher Maths for Physical Sciences; Theoretical Physics; Tensors, Differential Forms and Variational Principles...
RaCx has quit [Client Quit]
bluOxigen has quit [Ping timeout: 245 seconds]
<ddd> bedtime.. reading...
<shevy> :\
<shevy> so much physics
<ddd> and my wife thinks i'm nuts for reading ruby books in the can!
<ddd> sheesh
<workmad3> ddd: I'm working @ home at the moment... I don't have my normal bus time to read in
<ddd> but but.. bedtime..
<ddd> hoiw can you sleep with that running around your skull??
<DouweM> Yeah, I live 5 minutes from uni and 10 for work, but I don't get as much reading in as I'd want either :/
shaunbaker has joined #ruby
<DouweM> *so
<ddd> douwem if i didn't have PDFs of my books, i wouldn't have time to read
<ddd> taking ruby books to the can involves a laptop
<workmad3> hehe
<DouweM> haha
<DouweM> that's dedication
Serpent7776 has joined #ruby
<workmad3> I've used my phone for that at times
<ddd> my screen's too small or i would
<shevy> I can't quite learn well before a computer
<DouweM> tablet?
<ddd> doesn;t require as much real estate :)
<ddd> douwem I gave my kid mine
raja has quit [Ping timeout: 252 seconds]
<ddd> he needed it for school
<DouweM> you needed it for the can
<shevy> haha
<Serpent7776> hello, what's the ruby way of validating function input values?
<shevy> ddd does your kid also get your car and you take the bicycle?
<DouweM> praying
<ddd> shevy i learn better by talking with others, thus irc. even if i come upo with REALLY stupid shit, least folks show me where i'm being stupid. books don't
<ddd> shevy two words. HELLS NO
<shevy> hmm
<ddd> you've never seen him drive!
clamstar has joined #ruby
daidoji has quit [Ping timeout: 272 seconds]
<ddd> I HAVE
dEPy has joined #ruby
shaunbak_ has joined #ruby
<workmad3> shevy: no, ddd's kids get his truck and he takes a segway...
<ddd> hahahahaha
<shevy> Serpent7776 what do you mean with validating? "type" checking?
<ddd> I would too damn it!
<ddd> them things are fun!
<DouweM> lol
ewnd9 has joined #ruby
<shevy> I am scared of segways
<shevy> I watched too many accidents with them on ....
zipper has joined #ruby
<shevy> ... youtube
enebo has joined #ruby
<Serpent7776> I mean I have method that should take positive integer, how to check whether it really is?
vlad_starkov has quit [Remote host closed the connection]
<apeiros_> shevy: are you afraid of walking too?
<ddd> shevy besides, for ruby, workmad3 is my goto guy. educational to say the least. but, alas, I can't take him to the can with me
<ddd> that'd be.. nuts
thelamest has joined #ruby
<shevy> apeiros_ a little :)
<apeiros_> there's various accidents with walking on youtube
yfeldblum has joined #ruby
<DouweM> ddd: :)
<workmad3> ddd: also somewhat expensive... flying me out there every time you needed a dump... :P
<ddd> hehehe
<shevy> Serpent7776 in this example, you could x = 5; x.is_a? Integer and perhaps > 0
<ddd> that got an irl chuckle
mercwithamouth has joined #ruby
<ddd> careful, i ever make it like bill gates i just might!
<ddd> PARTY IN THE POOPER ROOM!
<DouweM> Serpent7776: you can check whether it's > 0 and raise an argument error
<shevy> apeiros_ I am mindful when I were to walk on some area close to flood, I saw walking people get run over by huge monster waves!
<ddd> ok think i'm starting to show i've been up all night (again)
<shevy> like one moment they were there, the next moment they were gone
<Serpent7776> shevy, so my_param.to_i>0 is enough to check? what about strings?
<ddd> i'm losing it
<Hanmac> shevy: the next commits will not add new classes or features, i try to increase the comment / blank ratio
<shevy> Serpent7776 well that would convert it into an integer. "5".to_i # => 5
avril14th has quit [Remote host closed the connection]
dblessing has joined #ruby
shaunbaker has quit [Ping timeout: 264 seconds]
<ddd> i comment the shit out of my files. i don't care if it seems unprofessional or not. i wanna *know* what I was doing 6 months from now (or why at the very least)
<shevy> Serpent7776 whether it is a string you could check with .is_a? String. you could also raise a specific error if the input is wrong, or you simply try to make sense of the input and then use that interpretation in your method
<DouweM> Serpent7776: usually, type checking in Ruby is not-done
<shevy> Serpent7776 some strings would not give good results with .to_i
<Serpent7776> shevy, so my_param.is_a? Integer for ints, my_param.is_a? String for strings?
vlad_starkov has joined #ruby
<shevy> Serpent7776, for instance: "abc".to_i # => 0
<ddd> i cut back on my comments in DTF and i'm suffering for it 8 months later trying to remember why the hell i did something
<DouweM> Serpent7776: if no-one would reasonably call your method with anything other than an integer, just skip the type check
<DouweM> Serpent7776: checking for > 0 is reasonable
<DouweM> Serpent7776: but please. No #is_a?
<shevy> Serpent7776 dunno. I don't really have to do that much at all. most of the time when I do any of that, it's because I want an array rather than a string (because I lateron do batch-processing on the array via .each )
<ddd> workmad3 oh btw, you got a couple minutes for a side discussion?
zegerjan has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
<ddd> douwem what's wrong with checking #is_a?(Integer) or something?
<Serpent7776> DouweM, why not #is_a?
<DouweM> type-checks aren't needed usually
<workmad3> ddd: about to have lunch, sorry m8
<ddd> if ! var.is_a?(Integer) puts "Enter what you were told to, damn it!"
<ddd> workmad3 np
<DouweM> your code is going to be used by a dev who hopefully somewhat knows what's he's doing
<ddd> workmad3 was just an idea i had but not sure how it'd play out.
<DouweM> passing in a negative int is a reasonable mistake, especially if it's user input, but a reasonable dev wouldn't pass a string or an array
<ddd> douwem people try to crash programs purposefully
robertrv has joined #ruby
<shevy> :)
<DouweM> right, but it depends on whether it's user or dev input
<shevy> PEOPLE ARE EVIL
<ddd> if all you want is an integer, what's wrong with testing specifically for it and going with that
<DouweM> devs can be trusted
<ddd> hardly
<ddd> no more so than anyone else
<shevy> trust me :)))
<DouweM> ddd: do you do type checking in every method you write?
vedic has quit [Quit: Leaving.]
<apeiros_> DouweM: devs like to have clear failures, though
<DouweM> ddd: the most they can break is their own code
<ddd> douwem when its critical
<DouweM> I'm not saying all type checking is bad
<apeiros_> I do more typechecks nowadays than I did earlier, simply to get easier to understand bugs
<workmad3> ddd: devs can't be trusted, but devs *can* be held responsible if they use your code incorrectly
<DouweM> ^^
fedez77 has joined #ruby
<ddd> not to mention its not that hard to enter 1o instead of 10
<shevy> I never do that!
<workmad3> ddd: namely, if they use it badly, it's their fault, not yours :)
<shevy> I always input 42
<ddd> workmad3 i can agree with that
<DouweM> ddd: in code, the former would be a syntax error
<ddd> shevy hehe
<shevy> "User error: You are too dumb to input only numbers. Get out."
Kricir has joined #ruby
<ddd> shevy hahah
pushpak has joined #ruby
<workmad3> shevy: I use a random number... 4
<DouweM> I'm assuming the dev passes the input, not the user
<shevy> workmad3 hehehe
<workmad3> shevy: my d6 told me it was random
<ddd> doh!
<ddd> just had to get in the D&D ref huh?
mosez has quit [Quit: Switching back to real life]
psyl0n has quit [Read error: Connection reset by peer]
<workmad3> ddd: no, if it was a D&D reference, it would have been a d20 :P
mosez has joined #ruby
<ddd> hah
<workmad3> ddd: or I'd have used my THAC0
<shevy> workmad3 ddd played when they still used a d6 :P
<ddd> shevy hey, no tellin my age!
<shevy> ddd when I was like 10 years or so, I wanted that blue DnD box
<shevy> my english sucked but the pictures were cool. DRAGONS
<workmad3> I have the AD&D planescape box set :)
<ddd> who doesn't love dragons
<workmad3> ddd: halflings
<ddd> workmad3 you lucky duck!
<ddd> workmad3 true!
emocakes has quit [Quit: Leaving...]
<shevy> ddd I think there were pictures like this on it http://www.retroroleplaying.com/pix/cdnd-expert2box.jpg
<workmad3> ddd: picked it up @ gencon... I don't have any other AD&D stuff, just the planescape box :)
tesuji has quit [Read error: Connection reset by peer]
<ddd> oh just a 'i have one' not a keepsake for memory lane?
moncky has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<ddd> shevy ahhhh beautiful!
Neomex has joined #ruby
<workmad3> ddd: well, it's a keepsake from that trip to gencon
ffranz has joined #ruby
<ddd> did you ever actually *play*? ;)
mosez has quit [Client Quit]
Neomex has quit [Client Quit]
<workmad3> right, lunch
<ddd> hahaha
Kricir has quit [Read error: Connection reset by peer]
mak|idle is now known as makkura
<ddd> way to avoid there pally
<shevy> hehe
Kricir has joined #ruby
kaldrenon has joined #ruby
soba has quit [Ping timeout: 272 seconds]
mosez has joined #ruby
<ddd> and with that, time for me to walk over and get a pack of smokes and then figure out a good role gem to use (Thinking 'TheRole' atm)
* lupine snuggles cancan
<ddd> github.com/the-teacher/the_role
<lupine> mind you, I'm now years out of date
<benzrf> ddd: whats that do
<ddd> lupine rails4 replacement for cancan
<ddd> benzrf semantic role mangement
<shevy> benzrf did you write a gem finally?
<lupine> sexy
<ddd> the web ui management for it doesn't really interest me, the way you define roles is though
<ddd> s/is/does/
<lupine> 'All permissions are defined in with 2-level-hash, and store in database with JSON.'
<lupine> ok, less sexy
<ddd> i implemented my own authentication last night, but i don't want to write my own role mangement
<benzrf> fug u shevy
<benzrf> i have no ideas since legend turned out to be already done
<wald0> what is the more easy to write/read/remember? bacon ? (looks very english/simple writed)
<ddd> lupine yeah i don't know json well. in a way it doing that is good. it will force me *to* learn it
<DouweM> benzrf: what were you gonna write?
<ddd> bacon is just another cucumber. just much lighter weight
<lupine> who needs databases, right?
<ddd> lupine hehe
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ddd> lupine i'd be happy ith yaml files for the roles
joaoh82 has quit [Remote host closed the connection]
<ddd> :shrug:
<benzrf> DouweM: a zelda thingy
<ddd> err role definitions
<lupine> why not start every rails application with an sqlite 'database' that has a single table, with a single column - 'database'
<benzrf> DouweM: basically a game framework for 2d zelda-likes
<lupine> it can be a giant json hash
<benzrf> DouweM: with almost all of the game logic handled
<ddd> lupine lol
<DouweM> benzrf: oh that's pretty interesting
<lupine> mutter mutter
<benzrf> DouweM: google 'zelda classic'
<ddd> lupine gimme another option then (besides cancan)
<lupine> I don't have one, like I said, I've been out of date
<lupine> when I wanted roles and permissions for my project, I did it from scratch
<ddd> there's one like direct_authorization or something someone told me aboutbut i can't remember the exact name and the person hasn't been online so i can't check it out
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
<ddd> lupine i did the auth part. i just didn't want to invest a lot of time writing a roles management
<lupine> my roles stuff isn't actually very good ^^
<lupine> but it's better than storing the whole damn thing in a json string
<ddd> i mean i *am* using a field to define the 'type' (role) so i man i could easily do that, but it wouldn't be an easily modifiable
lioninawhat has joined #ruby
<ddd> yeah, i get your point, and agree mostly. i don't see why it had to be in json rather than just a yaml dump or even a roles table but what do i know i'm still mediocre at this
chinkung has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 245 seconds]
lyanchih has quit [Quit: lyanchih]
ndrei has joined #ruby
<shevy> hmm just to confirm it... when I store after __END__ and then load this, like doing: x = DATA.read, DATA seems to be emptied after this. this is expected behaviour I suppose?
chinkung has joined #ruby
<shevy> I can't recall DATA.read emptying but perhaps I wasn't paying attention before
RaCx has joined #ruby
mikecmpbll has joined #ruby
jerius has joined #ruby
<DouweM> shevy: that's expacted, that's the way read works
<benzrf> DouweM: so yeah, somebody pointed me to that when i told them about legend
<benzrf> DouweM: [legend == my project]
<ddd> ahh thats it. declarative_authorization was it
stryek has joined #ruby
<benzrf> DouweM: now my motivation has drained away
<ddd> the other is pundit
<Hanmac> benzrf: what is it, what does it need, why do i need it, and why should i care?
Kricir has quit [Remote host closed the connection]
<DouweM> benzrf: understandable
<benzrf> Hanmac: huh?
tyl has joined #ruby
<Hanmac> benzrf: your legend project
<benzrf> Hanmac: it was going to be an engine/framework for 2d-zelda style games/maps
lyanchih has joined #ruby
cescalante is now known as ce_afk
<benzrf> Hanmac: the idea being that you can just write new tile definitions and sprite definitions, or use somebody else's, and legend loads and plays it
<benzrf> Hanmac: as a standalone application
lorelei_ has quit [Ping timeout: 245 seconds]
<benzrf> *obviously you need to make a map as well
mlpinit has joined #ruby
<benzrf> Hanmac: anyway Zelda Classic is basically similar to that... so i basically shelved legend
<Hanmac> benzrf: maybe useful for something like that: http://www.mapeditor.org/
<shevy> Hanmac contributed to a map editor before!
<benzrf> Hanmac: you are the third person to link me to that
* Hanmac also have a gem somewhere for parsing that map files
tharindu has joined #ruby
ghr has joined #ruby
fire has joined #ruby
kcombs has joined #ruby
shedd has joined #ruby
Kneferilis has joined #ruby
pranny has joined #ruby
Brolen has joined #ruby
allaire has joined #ruby
blaxter has quit [Quit: foo]
vedic has joined #ruby
<wald0> well, this is more or less my reference of ruby (more like code structure than a list of all)
<wald0> shevy: ^
shedd has quit [Ping timeout: 264 seconds]
roolo has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
sailias has joined #ruby
lyanchih has quit [Quit: lyanchih]
ndrei has joined #ruby
noop has quit [Ping timeout: 252 seconds]
roolo has joined #ruby
juarlex has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has joined #ruby
brennanMKE has joined #ruby
megus has joined #ruby
mansi has quit [Remote host closed the connection]
jdguzman has joined #ruby
mansi has joined #ruby
phrozen77 has joined #ruby
phrozen77 has quit [Changing host]
blassing has joined #ruby
blassing has left #ruby [#ruby]
blassing has joined #ruby
<blassing> hello
<blassing> anyone here experienced with ffi-ncurses ?
e62 has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
kacperix has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
klaut has quit [Remote host closed the connection]
Megtastique has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
rhys has quit [Remote host closed the connection]
blassing has quit [Quit: blassing]
iaj has joined #ruby
rhys has joined #ruby
joaoh82 has joined #ruby
vmachine has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
xjiujiu has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
tannerburson has joined #ruby
m00nlight has joined #ruby
agjacome_ has quit [Ping timeout: 264 seconds]
joaoh82 has quit [Ping timeout: 245 seconds]
max96at has joined #ruby
sambao21 has joined #ruby
ehc has joined #ruby
dkannan has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Sid05 has joined #ruby
joaoh82 has joined #ruby
nhhagen has quit [Remote host closed the connection]
mansi has joined #ruby
Brolen has quit [Quit: Brolen]
iaj has quit [Read error: Connection timed out]
ozgun has quit [Quit: Leaving]
iaj has joined #ruby
dEPy has quit [Quit: Lingo - http://www.lingoirc.com]
guardianx has joined #ruby
<shevy> wald0, you misspelled lenght
<shevy> :D
mercwithamouth has quit [Ping timeout: 265 seconds]
<benzrf> shevy: as long as he is consistent
<shevy> wald0 btw I would indent case when menus top-bottom down
<shevy> case foo
<shevy> when 'condition_here'
h_kon has quit [Remote host closed the connection]
<shevy> benzrf we must eliminate typos
burlyscudd has joined #ruby
<benzrf> yes tepo eleinimeation is very important
endless_walrus has joined #ruby
chrisramon has joined #ruby
tanema has joined #ruby
VinceThePrince has joined #ruby
lyanchih has joined #ruby
rootshift has quit [Quit: rootshift]
Macaveli has quit [Ping timeout: 272 seconds]
IceDragon has joined #ruby
snath has quit [Ping timeout: 245 seconds]
alexfreidah has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
bennyboobooboo has joined #ruby
<vmachine> Hi all new to programming and ruby.. hope this channel is more helpful than #python:-D
<DouweM> vmachine: you and your expectations
Soda has joined #ruby
Soda has quit [Read error: Connection reset by peer]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
<workmad3> vmachine: how is #python nowadays?
<vmachine> i do have lots of expectation... I need a "gem" for my programming language.
<joonty> vmachine: sounds like juicy gossip
mansi has quit [Read error: Connection reset by peer]
<vmachine> i hate that channel
<vmachine> all they do there is brag:-D
<workmad3> vmachine: ah, not much has changed then
<vmachine> now thats gossip
jedimind has joined #ruby
mansi has joined #ruby
<DouweM> brag about what?
<joonty> the size of their vm
<vmachine> how python is better than everything else.. and how they can code well
<vmachine> not very helpful at all to newbies
<DouweM> jeez
<joonty> vmachine: what gem are you looking for?
<joonty> let's get productive :)
MrZYX|off is now known as MrZYX
<workmad3> DouweM: yeah... they think they can code better than us?
<workmad3> DouweM: unlikely, eh? :D
<waxjar> but.. ruby is better than everything else?
<workmad3> </sarcastic-brag>
alexfreidah has quit [Ping timeout: 246 seconds]
<shevy> ruby is better than your grandma
<DouweM> :p
<joonty> you don't know my grandma
<waxjar> my grandma's name is ruby
<vmachine> ruby is better than perls! thats for sure
<shevy> python is better than perl
bMalum_ has joined #ruby
<shevy> php is better than perl
sassamo has quit [Remote host closed the connection]
<workmad3> perl isn't that bad
<workmad3> however, most perl code *is* that bad
<shevy> perl is better than workmad3
<joonty> lol
<wmoxam> php is better than Cobol
sassamo has joined #ruby
<shevy> vmachine look what you started man :(
<workmad3> wmoxam: lies!!!!
<wmoxam> that's about it
<joonty> #ruby is broken :<
<DouweM> vmachine: so, what were you wanting help with? :p
<workmad3> COBOL TIL I DIE!!!
<shevy> joonty the bot eval-in too :(
<wmoxam> workmad3: DIE NOW
* workmad3 dies
<shevy> you used to be able to do things like this
<shevy> >> 5+5
<DouweM> yeah, eval-in died again :(
<joonty> :(
<workmad3> wmoxam: how about fortran? :D
<joonty> >> puts "help me please"
<waxjar> help me please
<wmoxam> workmad3: no idea, never written any
<workmad3> vmachine: what d'ya need? :)
<joonty> >> puts "someone replace my batteriezz"
<joonty> waxjar: nice
bMalum has quit [Ping timeout: 252 seconds]
<waxjar> someone replace my batteriezz
<joonty> who needs automation
<wmoxam> workmad3: I have written a minimal amount of Cobol though
* wmoxam shudders
VinceThePrince has quit [Read error: Connection reset by peer]
yoshie902a has joined #ruby
<workmad3> wmoxam: I can honestly say that my mother has written more cobol than me :)
<vmachine> any site you all can recommend for a newbie.. basically im into sysadim/network and webapp security so i want to you ruby to create apps that can automate thing for me.. that will be my main use of the language
blaxter_ has joined #ruby
mary5030 has joined #ruby
<DouweM> workmad3: me too!
clamstar has quit [Quit: Computer has gone to sleep.]
<workmad3> vmachine: hmm... maybe you should take a look at chef and puppet
mary5030 has quit [Remote host closed the connection]
<joonty> vmachine: what are you trying to learn specifically? rails? Or just ruby?
<Hanmac> vmachine: what kind of apps? websites? application GUIs or more console guis ?
joaoh82 has quit []
<vmachine> just ruby
<vmachine> rails later on
mary5030 has joined #ruby
clamstar has joined #ruby
<workmad3> vmachine: chef and puppet are both configuration management tools written in and extensible with ruby
<joonty> vmachine: workmad3 is right, puppet and chef are specifically for automating sys admin tasks
bMalum_ has quit [Remote host closed the connection]
tanema has quit []
<wmoxam> workmad3: heh
cbetta is now known as cbetta_afk
VinceThePrince has joined #ruby
<wmoxam> vmachine: don't listen to workmad3's lies!
<workmad3> wmoxam: from the sounds of things, my mum has written more cobol than you too ;)
<wmoxam> Ruby is a toy language
<wmoxam> only toys write ruby code!
<vmachine> well whats a good website for ruby newbies
<wmoxam> workmad3: most likely!
jlast has joined #ruby
<vmachine> or book/vidoes
<wmoxam> workmad3: I had one assignment in Uni that required Cobol
<wmoxam> I tihnk they were just trolling us
sassamo has quit [Ping timeout: 272 seconds]
<workmad3> vmachine: how much coding experience do you have?
<joonty> vmachine: some people like koans, http://rubykoans.com/
<vmachine> not much... did some c++ in uni but i was forced to.
Kricir has joined #ruby
<workmad3> vmachine: as 'learn to program' is quite a good point for real beginners
Kricir has quit [Remote host closed the connection]
<vmachine> and that was about 15 years ago
tharindu is now known as tharindu|away
<joonty> vmachine: the ruby site has a quick start https://www.ruby-lang.org/en/documentation/quickstart/
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
cbetta_afk is now known as cbetta
tylersmith has joined #ruby
<Hanmac> vmachine: and there are other helpful links https://www.ruby-lang.org/en/documentation
<waxjar> vmachine, do you already know a programming language?
<workmad3> vmachine: that said... you're a sysadmn... how are your bash skills? :)
Kricir has joined #ruby
<vmachine> terrible...
<workmad3> heh
<joonty> vmachine: I think I used http://rubylearning.com
<dachi_> why's poignant guide to ruby ^_^
<workmad3> dachi_: because you enjoy giving newbies mind-blowingly surreal intros to ruby 1.6? :D
burlyscudd has quit [Quit: Leaving.]
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
m00nlight has quit [Ping timeout: 260 seconds]
Bira has joined #ruby
Hanmac1 has joined #ruby
coca_rails has joined #ruby
<dachi_> just because you can feel magic you will be pursuing :)
bennyboobooboo has quit [Remote host closed the connection]
chrisramon has quit [Quit: chrisramon]
lukec has joined #ruby
bennyboobooboo has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
bennyboobooboo has quit [Read error: Connection reset by peer]
bennyboobooboo has joined #ruby
spyderman4g63 has joined #ruby
RaCx has joined #ruby
<shevy> vmachine, there is only one true way to learn programming in ruby
<shevy> and that is by writing ruby scripts!
phipes has joined #ruby
DeanH has joined #ruby
<workmad3> shevy: wrong, the only true way to learn ruby is to learn smalltalk and perl and then to mix them together!
<vmachine> with ducktape
<shevy> I am disappointed that smalltalk never became a scripting language
cads has joined #ruby
freezey has joined #ruby
ferr has joined #ruby
burlyscudd has joined #ruby
<shevy> if it would have had nicer syntax
yoshie902a has quit [Quit: yoshie902a]
Brolen has joined #ruby
<benzrf> workmad3: i know perl
shedd has joined #ruby
<benzrf> workmad3: i know a lil smalltalk
<benzrf> workmad3: i know some lisp
<benzrf> therefore i know ruby
<workmad3> benzrf: yup
mengu has quit []
JADE_ has joined #ruby
marcgg has joined #ruby
<JADE_> hello everyone
coca_rails has quit [Remote host closed the connection]
lectrick has joined #ruby
<shevy> hi JADE_
<shevy> vmachine which tutorials did you look at so far?
cads has quit [Ping timeout: 272 seconds]
shedd has quit [Ping timeout: 265 seconds]
colli5ion has joined #ruby
fedez77 has quit [Read error: Operation timed out]
<JADE_> so im trying to find some insight on a project ive been wanting to start and figured to this might be a good place to start.
rootshift has joined #ruby
sethen has joined #ruby
phipes has quit [Remote host closed the connection]
marcgg_ has quit [Ping timeout: 252 seconds]
ambushsabre has joined #ruby
<shevy> what project
pehlert has joined #ruby
kacperix has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> JADE_: go on...
<JADE_> true A.I. lol like i have a design but sadly nearly not programming skills...
<benzrf> >true A.I.
tagrudev has quit [Remote host closed the connection]
<benzrf> sorry to break it to you but your idea is wrong in some way
MattStratton has joined #ruby
<JADE_> ?
nateberkopec has joined #ruby
cads has joined #ruby
aaronmcadam has joined #ruby
pehlert has quit [Read error: Operation timed out]
obs_ has quit [Quit: Saliendo]
marcgg has quit [Read error: Connection reset by peer]
marcgg_ has joined #ruby
bilbo_swaggins has joined #ruby
mercwithamouth has joined #ruby
<benzrf> JADE_: you have not figured out how to do true ai
<benzrf> JADE_: your approach is flawed
<workmad3> JADE_: benzrf is playing the probabilities... the likelihood of someone having designed a strong AI without knowning a) how to code it up and b) knowing that it's called strong AI and not 'true AI' is highly unlikely
burlyscudd has quit [Quit: Leaving.]
<workmad3> *knowing
shaunbak_ has quit []
<bilbo_swaggins> what did I miss
<benzrf> bilbo_swaggins: JADE_ has figured out 'true ai'
<workmad3> bilbo_swaggins: '15:32 < JADE_> true A.I. lol like i have a design but sadly nearly not programming skills...'
<workmad3> bilbo_swaggins: after asking for help to find some insight on a project they've been wanting to start
<lectrick> Hanmac: Whenever you forbid something, you give it power.
<bilbo_swaggins> hmm I can share that sentiment
srkn has joined #ruby
<bilbo_swaggins> JADE_ might progress to programmer
<lectrick> Hanmac1: ^ that was a reference to some apparently old comment you write here about the nazi party in germany, just realized it was old and not recent, lol my bad
<srkn> hi, how to change directory with patterns ex: Dir.chdir("~/Library")
<workmad3> lectrick: stop leaving your scrollback on old comments? :P
<aaronmcadam> anyone care to offer some ideas on a refactor? multiple if/elsif statements with different conditions/predicates. https://gist.github.com/aaronmcadam/8356486
<lectrick> workmad3: irccloud shows history by default
<MrZYX> srkn: check File.expand_path
Cephalostrum has joined #ruby
<benzrf> aaronmcadam: case?
dkannan has quit [Quit: dkannan]
gja has joined #ruby
<DouweM> I'm still curious about JADE_'s "true AI"
<aaronmcadam> what would you switch on?
<benzrf> aaronmcadam: nothing
<benzrf> case
<benzrf> when this
<benzrf> foo
<benzrf> when that
<benzrf> the other
<benzrf> end
<aaronmcadam> hmm yeh
<aaronmcadam> I was hoping to use objects
<Hanmac1> i want a AI that can be tricked to belive that the AI is human ;P
<lectrick> true AI is probably impossible
<benzrf> aaronmcadam: not everything has to be an object
freezey has quit [Remote host closed the connection]
<benzrf> lectrick: what is that supposed to mean
<MrZYX> aaronmcadam: make and array of the values and do .map(&:presence).first
<dachi_> true ai scares me, just imagine, ai, good ai, True AI aa O_o
<workmad3> aaronmcadam: or you could just do 'current_user.try(:language) || params[:locale] || cookies[:locale] || I18n.default_locale
<MrZYX> *.compact.first
<benzrf> lectrick: at the very least we could maybe duplicate the human brain structure as a program
<benzrf> even if we never figure out why it works
<lectrick> benzrf: we can't even duplicate a fruit fly as a program. nor a single cell for that matter. so, good luck with that.
<workmad3> lectrick: wrong ;)
<aaronmcadam> ah, that would be a bit nicer MrZYX
<lectrick> workmad3: Link.
marcgg_ has quit [Ping timeout: 245 seconds]
<lectrick> Show me a cell simulation that is indistinguishable from a living cell in every way.
<aaronmcadam> I could use .fetch I think to set the default case too
ando has joined #ruby
yasushi has joined #ruby
<JADE_> well my idea for the AI started with me learning aiml
<lectrick> In any event, that's where we should start. Forget AI and just try to simulate life because it might turn out they're more related than we think
bean has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
<lectrick> benzrf: Simulating the human brain would be fiendishly complex anyway as it's constantly self-modifying its own structure
thomasxie has quit [Quit: Leaving.]
ce_afk is now known as cescalante
<rurban> Like Spike Jonze did in Her? Please not. Computers should stay computers with all their advantages
ando has quit [Remote host closed the connection]
Bumptious has quit [Read error: Connection reset by peer]
ando has joined #ruby
mereghost_afk is now known as mereghost
fedez77 has joined #ruby
<lectrick> workmad3: That's not remotely a finished project. It is speculative work, just like all other attempts before it
Bumptious has joined #ruby
sassamo has joined #ruby
<workmad3> lectrick: you said that we can't duplicate even a single cell on a computer
yasushi has quit [Remote host closed the connection]
shedd has joined #ruby
<workmad3> lectrick: that's what they've done
<lectrick> workmad3: I'm watching the video.
interactionjaxsn has joined #ruby
<workmad3> lectrick: with neurons across
ndrei has quit [Ping timeout: 260 seconds]
<workmad3> lectrick: ok ;)
<srkn> thanks MrZYX
sassamo has quit [Read error: Connection reset by peer]
<benzrf> lectrick: so program that in ;)
<benzrf> i meant as a physical object
<DouweM> JADE_: go on :P
sassamo has joined #ruby
rubyracer has joined #ruby
amundj has quit [Read error: Operation timed out]
<workmad3> lectrick: http://bluebrain.epfl.ch/ is the site btw
<bilbo_swaggins> lectrick > In any event, that's where we should start. Forget AI and just try to simulate life because it might turn out they're more related than we think
<bilbo_swaggins> I think so too
<bilbo_swaggins> There's an underlying idea of finding simple patterns which generate more complex ones
<bilbo_swaggins> both by trial and error
freezey has joined #ruby
<lectrick> workmad3: bilbo_swaggins I don't think this effort will be wasted, at all. I wholeheartedly support this kind of work. I just think that the answers that emerge won't be what we expected. :)
<workmad3> lectrick: that could be the case
<bilbo_swaggins> I'd be fascinated either way
acrussell has joined #ruby
marcgg has joined #ruby
<workmad3> lectrick: however, unless you happen to understand intelligence and consciousness (which, afaik, is currently beyond the sum total of human understanding) then you don't really have anything to base that off other than guesswork
<lectrick> workmad3: Intuition. :)
Albright has quit [Quit: Albright]
<workmad3> lectrick: intuition in areas that aren't understood == guesswork
dangerousdave has joined #ruby
_5kg has joined #ruby
<lectrick> workmad3: I've casually studied it, I was a Psych major, I've been a programmer for > 20 years. I got into Cornell by writing a really awesome paper on A.I. In fact I am pretty sure I wrote at least four papers on AI over the course of my education.
<lectrick> I also meditate.
ando has quit [Ping timeout: 272 seconds]
<workmad3> lectrick: do you claim to understand consciousness?
<bilbo_swaggins> I think we do know some things
<lectrick> workmad3: I claim to understand what it's not
yjmsf20 has quit [Quit: leaving]
<lectrick> workmad3: And it's not simulatable in a machine that we can currently conceive of
<bilbo_swaggins> consciousness the feeling or consciousness the phenomenon?
<workmad3> lectrick: now, is that part of your definition of consciousness, or is it merely a feeling of intuition based on the fact that you can't imagine how it can be done and that it hasn't been achieved yet?
<lectrick> workmad3: Do you know about the http://en.wikipedia.org/wiki/Philosophical_zombie argument?
<workmad3> lectrick: I do
<JADE_> my design is if using a infinate - or + 0.0 intager with the same concept as aiml and an auto function that can delete, modify, create aiml based off value ie the the intager value of preveus files in its db and this has been
<workmad3> lectrick: I think it's complete bullshit to claim that consciousness is epiphenomenal
<lectrick> workmad3: you can't prove that either, so we're at an impasse :)
Neomex has joined #ruby
maasha has quit [Ping timeout: 272 seconds]
yjmsf20 has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
<workmad3> lectrick: if consciousness *is* epiphenomenal, then it has no bearing on the real world
<lectrick> workmad3: the only way to prove that is to recreate consciousness in a machine
net_mask has joined #ruby
<lectrick> workmad3: that's not necessarily true, that's a reductionist argument
<workmad3> lectrick: the whole basis of an epiphenomena is that it has no bearing on the real world
<bilbo_swaggins> claiming consciousness doesn't exist is a cop-out, but it's clearly not what was always assumed
<workmad3> lectrick: otherwise it wouldn't be an epiphenomena
figgleberry has joined #ruby
FifthWork has joined #ruby
<workmad3> lectrick: once it has *any* effect on the real world, it becomes a normal phenomena that can be observed
<lectrick> workmad3: if you can't predict the state of my brain 52.3454 hours from now, does that mean I have no effect on the real world?
<workmad3> lectrick: no
mark_locklear has quit [Ping timeout: 252 seconds]
<workmad3> lectrick: but I don't claim your brain is an epiphenomena that can *never* be empirically observed
<lectrick> by "effect on the real world", you mean "will", right? Otherwise we are all merely zombie biochemical processes
<dachi_> nokogiris methods ...
<bilbo_swaggins> "You" and "your" body are different things.
<workmad3> lectrick: no, I don't necessarily mean 'will'
<lectrick> I think that a non epiphenomic consciousness is bullshit because all that means is that the whole point of this entire universe is to go from low to high entropy, and living thinking beings seems like a ridiculously silly/complex way to achieve that
<lectrick> i.e. conclusion: nihilism.
<workmad3> lectrick: that's not arguing from facts though, that's arguing from a personal desire to see the world in one way
lmickh has joined #ruby
klaut has joined #ruby
<bilbo_swaggins> You're both not getting past the original question of whether consciousness is, in some sense, real
<lectrick> since I reject all arguments that end in nihilism, working backward I believe (yes, believe. sigh) that consciousness is somehow nonphysical, where "physical" = "what we UNDERSTAND about the physical NOW". The latter is important.
<lectrick> workmad3: nope.
<workmad3> lectrick: ok, so you accept that consciousness could in the future be understood?
<workmad3> lectrick: and be subject to empirical observations?
<benzrf> consciousness is irrelevant to everything in general
<lectrick> workmad3: yes. more of it. not sure about all of it. but yes, more of it, sure.
<lupine> why would you reject nihilism?
<lectrick> lupine: because it's void.
<lupine> personal preference?
yfeldblum has joined #ruby
<workmad3> lectrick: whatever 'consciousness' is? (which is itself a really badly defined word and concept)
<bilbo_swaggins> benzrf: you lose nothing leaving it out of the equation I think
<bilbo_swaggins> even in a strong AI
<lupine> if you just don't like it, fair enough
`petey` has joined #ruby
Fire-Dragon-DoL has joined #ruby
<benzrf> bilbo_swaggins: exactly
<lupine> existential nihilism seems like a no-brainer to me
<benzrf> bilbo_swaggins: if every person in the rest of the world was a p-zombie
<benzrf> what would that change?!
<lectrick> lupine: I think that if you believe the world is nihilistic you will act in ways that bring you towards nihilism. If you believe the world is not nihilistic you will act in ways that lead you away from nihilism and toward true meaning. Thus your worldview as well as your life is intimately tied to your beliefs whether or not you are religious.
<workmad3> lectrick: so, if someone created a machine that acted like a conscious being in every way, even down to asking questions like 'Am I conscious?' and writing articles and blog posts about it... would you entertain the idea that this machine is conscious?
Wixy has quit [Read error: Connection reset by peer]
Mattx has quit [Read error: Connection reset by peer]
<lupine> lectrick, no, either (existential) nihilism is true, or it is false
Neomex has quit [Quit: Neomex]
<lupine> and nothing of our actions can change that
<benzrf> bilbo_swaggins: ok well i guess im not entitled to say that
<benzrf> since id probably break down if i had proof of that
<benzrf> ~_~
<lectrick> lupine: "existential nihilism seems like a no-brainer to me".... If that was a pun, that was hilarious
gilcosson has joined #ruby
<lupine> ;)
<bilbo_swaggins> benzrf: most any horror-scenario involving AI can be resolved by *not* modeling it after ourselves
* benzrf awards lupine 10 pun points
<benzrf> bilbo_swaggins: what else do we have to model them on, though?
<lupine> in the absence of a concrete source of objective meaning, I must accept that meaning is subjective (and quite possibly intersubjective) as a general rule until proven otherwise
<benzrf> we are the only intelligence we know of
lukec has quit [Quit: lukec]
<lupine> that doesn't have much to say about almost all interpersonal conduct
bennyboobooboo has quit [Remote host closed the connection]
<workmad3> lectrick: also, a lack of any objective, external meaning to existence does not lead inevitably to nihilism
wallerdev has joined #ruby
<lupine> workmad3, it is, exactly, what existential nihilism is
<lectrick> lupine: So I choose to disbelieve in nihilism, and I work backwards logically from the premise that void conclusions are wrong conclusions. I freely admit that, though.
<lupine> no more and no less
gja has quit [Quit: This computer has gone to sleep]
<bilbo_swaggins> benzrf: include reason, exclude the midbrain and everything it does
bennyboobooboo has joined #ruby
freezey has quit [Remote host closed the connection]
ndrei has joined #ruby
<lupine> if you work from there to decide you should act in one way or another because of that datum, that's something on top
<lectrick> workmad3: I don't see that. If there is no true meaning then all meanings are illusory and by definition meaningless
<lupine> no, they're subjective
<lupine> which is differemnt to illusory or meaningless
<lectrick> subjectivity is impenetrable
VinceThePrince has quit [Ping timeout: 260 seconds]
zoscoy has joined #ruby
<lupine> no it isn't
tharindu|away has quit [Quit: Leaving...]
<lectrick> lupine: I won't ever know exactly what it's like to be lupine. It's effectively impenetrable. Maybe for all time, but certainly, for now ;)
<benzrf> bilbo_swaggins: well, that might be fine for operating systems that don't require human interactionjaxsn
<benzrf> *interactoin
w1xz has quit [Quit: ZZZzzz…]
_maes_ has joined #ruby
<lupine> indeed, objective meaningfulness is exactly the same as subjective meaningfulness, but with the proviso that the subject is a singleton
yfeldblum has quit [Ping timeout: 264 seconds]
failshell has joined #ruby
<interactionjaxsn> :)
<benzrf> bilbo_swaggins: but our interactions with other intelligent entities are all modelled off of the assumption that the other is similar to us
<benzrf> in certain basic ways
bennyboobooboo has quit [Read error: Connection reset by peer]
<lectrick> lupine: Hmmm. :)
<lupine> you assume a subject you have no evidence exists, and then declare that that is the subject of meaningfulness. it's not very interesting
<benzrf> if you take away the basic similarities, it would probably make AIs *very* difficult to interact with
<benzrf> from a human positoin
<lupine> meanwhile, subjects like you and me are eminently interesting
<benzrf> *position
clamstar has quit [Quit: Computer has gone to sleep.]
<lupine> and they can be the subjects of meaning
zipper has quit [Ping timeout: 245 seconds]
bennyboobooboo has joined #ruby
<bilbo_swaggins> benzrf: one can appreciate that an octopus is very intelligent, very different in how that manifests, and yet interesting and friendly in many cases
vedic has left #ruby [#ruby]
<bilbo_swaggins> it's a different being. so what?
<lupine> compared to a super-important singleton of meaning, those subjects might seem unimportant, but if that super-important singleton doesn't actually exist, then they're a lot better
<lectrick> Everyone is obsessed with objective measurements of things. Simulating neuron signals ≠ simulating what it's like to be a neuron. Simulating a brain ≠ simulating what it's like to live in a brain.
<dachi_> we have souls
<lectrick> Subjectivity and belief are far more important than we think. Why is the Mona Lisa worth a bajillion dollars? It's just wood, canvas, and some arrangement of ink.
<lupine> simulating a suitable brain will simulate an entity that will be able to tell you what it's like to live in a brain
<bilbo_swaggins> If I accept that my computer now is inhuman in many regards, I'd have no trouble accepting an AI which was inhuman
clamstar has joined #ruby
<lupine> I think you're taking liberties with what subjectivity actually is
vlad_starkov has joined #ruby
<benzrf> bilbo_swaggins: yes, but you are not interacting with your computer as another intelligent being
<bilbo_swaggins> lectrick, lupine: I think subjectivity will one day be viewed as a process
<lectrick> Why is an ounce of gold worth $1,200? Why is a bitcoin worth $800? Why did Apple stock appreciate in value when the stock itself didn't change? Why do I pick one girlfriend over another when they are both quite serviceable future moms?
<bilbo_swaggins> benzrf: Google is intelligent
fgo has quit []
<lectrick> lupine: re: taking liberties- Maybe.
<lupine> lectrick, in the absence of any evidence to the contrary, it's silly to conclude that you did it because of an invisible external giver-of-meaning
<lectrick> Almost all values are subjective and therefore not computable
<benzrf> bilbo_swaggins: =_=
freezey has joined #ruby
<lectrick> Not computable things are not simulatable
<lectrick> Ergo
<lupine> many subjective values are computable
<dachi_> yes
<lupine> for instance, prediction markets make tonnes of money
<txdv> thsi channel
<bilbo_swaggins> lectrick, lupine: subjective values are information
<workmad3> lupine: was just about to make that point :)
<lupine> what they're doing is predicting subjectivity
<lectrick> Why was Nirvana a popular band? Why are girls obsessed with One Direction?
<lupine> yes, all this is computable
<txdv> girls in north america*
RaCx has quit [Quit: Computer has gone to sleep.]
<lectrick> Hell, why is Ruby loved by people? It's just as serviceable a language to get things done as, say, C#.
FifthWork has quit [Quit: Textual IRC Client: www.textualapp.com]
<lupine> you might as well ask "how does flu spread?"
<lectrick> txdv: Good clarification lol
<lupine> oh no, it's uncomputable
vlad_starkov has quit [Read error: Connection reset by peer]
_JamieD_ has quit [Quit: _JamieD_]
<lectrick> lupine: Flu spreading is simulatable and that's not the same thing.
<bilbo_swaggins> If things were not simulable, they would not be realizable, I think
<lupine> the future price of wheat is simulatable
<dachi_> ^_^
Albright has joined #ruby
<txdv> never had an idea that that band existed until i talked to some girl on omegle
<bilbo_swaggins> So anything that exists is a computation
<lupine> the future price of bitcoin is also simulatable
<txdv> its like the north american version of tokyo hotel
senj has joined #ruby
<lectrick> lupine: If you could do that you would be very wealthy very soon
<benzrf> well, all occurances are a product of the laws of physics
<lupine> yes, lots of people do
<benzrf> and the laws of physics are computable
<benzrf> therefore all things are computable
<lupine> the only fun bit is that they get into recursion
<bilbo_swaggins> lectrick: imperfect information looks like randomness, but it's really not
FifthWall has joined #ruby
<lectrick> I got into bitcoin 2 years ago. Off... a gut feeling and no proof.
`petey` has quit [Remote host closed the connection]
burlyscudd has joined #ruby
<workmad3> benzrf: the laws of physics aren't as computable as you'd like to think
<lupine> it's just your average paradox. people are predicting the future and so change the present based on it, which changes the future
<workmad3> benzrf: at least, not in the sense of how computation is defined mathematically
zipper has joined #ruby
<lupine> you can't argue from that, that consciousness is spooky
<lectrick> I had no simulations and no data. I read the source code and the paper and thought, holy crap, this might end up being A Thing™. I had a hard time explaining it to people (read: process) as to why I would throw 30 grand at it.
<bilbo_swaggins> workmad3: elaborate
<lupine> anyway, I'm sure ##philosophy can educate you
<workmad3> bilbo_swaggins: quantum mechanics, as we know it, is a computationally intractable problem, iirc
<lupine> well, there are some undecidable bits in QM
<lupine> but it's eminently computable
<lectrick> workmad3: yes another interesting point. Not all things are computable
<lectrick> Not to mention, computable things are subject to hangs which themselves are impossible to prove :O
<bilbo_swaggins> that shows nothing for your greater point
colli5ion has quit []
vlad_starkov has joined #ruby
<workmad3> lectrick: not computable on a universal turing machine and all equivalent models of computation, yes
JADE_ has quit [Quit: Page closed]
<lupine> lectrick uses stream of consciousness. it misses!
dayepa has quit [Ping timeout: 252 seconds]
<lectrick> workmad3: yes i am assuming "computable" means "on a universal turing machine"
<lectrick> lupine: LOL
<workmad3> lectrick: that's kinda the definition of computable ;)
toastynerd has joined #ruby
<workmad3> lectrick: and sure, some problems our outside that set
<benzrf> well the universe is computable on a black box
<workmad3> *are
<bilbo_swaggins> I'm telling you you guys aren't going to reach a consensus because you're differing on the classic question of mind-body duality and extending from there
terrellt has joined #ruby
<lectrick> workmad3: well maybe there is some FUTURE "computable" that is not based on the turing machine idea, or expands on it, who knows
<lupine> bilbo_swaggins, well, what we're talking about is *why* we differ on it
<lectrick> bilbo_swaggins: you're probably right
<lupine> lectrick's approach is to reject the entirely sensible proposition of nihilism out-of-hand based on nothing
kpshek has joined #ruby
<lupine> which is fair enough, I guess
<lectrick> lupine: I agree. It's based on a feeling that void conclusions are false. :)
<workmad3> lectrick: afaik, it's still an open question as to whether quantum computation is turing computation or a superset of it
<bilbo_swaggins> well can you really even prove the universe is consistently logical?
<lectrick> workmad3: An interesting question
<lupine> lectrick, you're hiding something in "void conclusions"
<bilbo_swaggins> that your memories aren't created as you think?
snath has joined #ruby
<lupine> existential nihilism drops exactly one proposition from your model of the universe
<lupine> and it's one that you have no support for
<workmad3> bilbo_swaggins: maybe you're just a boltzmann brain, floating in the ether, living through a spontaneously generated set of memories in the instant before your dissolve back into the ether?
<lectrick> lupine: i believe that true meaning exists. I don't know if it's measurable, I believe it's subjective, and yes I will even concede that it makes me uncomfortable that I just used "believe" twice. Make that three times. :)
burlyscudd has quit [Ping timeout: 272 seconds]
<lupine> if by "true meaning" you mean "objective meaning", then it can't be subjective, it's objective
<workmad3> lectrick: everything you state is a 'belief'
<dachi_> it's all written what will happen
<lectrick> lupine: So I just work backwards from conclusions that are missing any sense of "meaning", like nihilism, so I call it "void"
<bilbo_swaggins> workmad3: I heard that recently about computation. I didn't know Turing machines hadn't been proven the most powerful model.
toastynerd has quit [Remote host closed the connection]
<lectrick> workmad3: that's my point. you can't get away from some belief, ultimately.
dayepa has joined #ruby
<lectrick> you can't get away from resorting to subjectivity
<lupine> nihilism doesn't exclude meaning, merely ovjective meaning
mklappst_ has quit [Remote host closed the connection]
<lectrick> unless you think the entire universe is mechanical, which I find ridiculous
momomomomo has joined #ruby
<lectrick> sorry, unless you "believe"
<bilbo_swaggins> workmad3: we can't prove that we're being logical at any step in time of our mental workings
<lupine> with your priors, it's not hard to see why you believe that
<workmad3> lectrick: however, when you say 'I believe', I think you're really stating 'I believe that I believe X' or in your case 'I really hope that my believe X is true'
<lectrick> biochemicalmechanical
<bilbo_swaggins> that we have experienced anything
<bilbo_swaggins> but yes I'm a mechanist
<workmad3> *belief
<lupine> but you've derived those from a pretty ridiculous basis, i fyou ask me
Mattx has joined #ruby
Mattx has joined #ruby
Mattx has quit [Changing host]
digital-ghost has joined #ruby
Wixy has joined #ruby
hoelzro has left #ruby [#ruby]
<lectrick> bilbo_swaggins: yeah I can't be a mechanist. Which is kind of ironic considering I love programming.
`petey` has joined #ruby
<lectrick> The more I program, the more I realize my brain doesn't act like a program
<lupine> "this answer can't be right because I don't like it" is no good for discussion, really
<bilbo_swaggins> you can have evidence and an inherent frame of reference guiding your beliefs
sumark has quit [Remote host closed the connection]
<lectrick> Fall in love a few times and you will realize that too
<workmad3> lectrick: I don't think the universe is mechanical in the classical sense
<bilbo_swaggins> lectrick: it's something more powerful than a program
<workmad3> lectrick: because otherwise there wouldn't be quantum physics that worked :P
razibog has joined #ruby
<bilbo_swaggins> I fell in love once. Now I play blues guitar.
sumark has joined #ruby
<bilbo_swaggins> I know a lot of songs about trains.
<lectrick> workmad3: yes you can also work backwards from the fact that quantum mechanics is not computable and yet real to conclude that the universe is not computable, at least by turing machine
<lupine> I've fallen in love a few times. I reject lectrick's assertion that it excludes this viewpoint
<lectrick> lupine: you're entitled to your belief ;)
<lupine> yes, I know
blaxter_ has quit [Quit: foo]
<lupine> the question is which one is more sensible, not which one you should hold
<bilbo_swaggins> isn't the question of whether the universe is mechanistic a matter of definition?
<lectrick> I experience the illusion of pleasure while discussing these things. But we should probably get back to Ruby. :)
<lupine> I hold many insensible beliefs that I shouldn't
<bilbo_swaggins> I'd say anything it does is consistent with its own laws and thus is a computation
<lectrick> lupine: ^ that was for you :)
<lupine> you hold at least one more than I do, though ;)
<bilbo_swaggins> lectrick: if Ruby questions are asked, we'll yield
<workmad3> bilbo_swaggins: in that case, you're working from a non-standard definition of computation
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
subbyyy has joined #ruby
<bilbo_swaggins> I fully believe that computation can be extended into that realm
_maes_ has joined #ruby
<bilbo_swaggins> I'm not saying I have a new model for it
<lectrick> We're still exploring all the implications of our universal turing machines. It's a fascinating mine. Turing really was a genius
IceyEC has quit [Quit: IceyEC]
<bilbo_swaggins> yes
IceyEC has joined #ruby
<bilbo_swaggins> although
shime has quit [Ping timeout: 252 seconds]
<lupine> never mind that we don't have any
<workmad3> bilbo_swaggins: also, claiming something is true/false based off definition means you're playing word games
<lectrick> lupine: Mentioning the love thing was an assertion that many choices I've made felt irrational yet true. A left-brain-dominated life is lesser than a full-brain-dominated one, as it were.
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lethjakman has joined #ruby
<workmad3> bilbo_swaggins: it's like arguing if a tree falling in the woods causes auditory vibrations, even if there is nothing around to interpret those auditory vibrations in the air as a sound
p8952 has quit [Quit: Leaving]
ferr has left #ruby ["Good night everyone!"]
ferr has joined #ruby
<bilbo_swaggins> I do have to say the universe is random to some degree, even if it's purely mechanistic, based even only on the fact that some arbitrary seed must have set out the evolution of it
<workmad3> bilbo_swaggins: sorry, I mean 'does a tree falling in the woods make a sound?'
mikecmpbll has joined #ruby
<lupine> lectrick, nothing about the universe suggests that irrationality can only be generated externally
srkn has left #ruby [#ruby]
mudmaster has quit [Read error: Connection reset by peer]
<lectrick> lupine: quantum fluctuation at the neuron level? :)
mudmaster has joined #ruby
<bilbo_swaggins> workmad3: I'm not claiming it true. Just saying I believe it is.
<lupine> add up to normality
ghr has quit [Quit: Computer has gone to sleep.]
mark_locklear has joined #ruby
<lupine> Quantum(tm) tends to
<lupine> which is why we have quite predicable macro structures
gregoriokusowski has joined #ruby
burlyscudd has joined #ruby
ferr has left #ruby ["Good night everyone!"]
ferr has joined #ruby
<workmad3> bilbo_swaggins: ok, so to cut through that particular gordian knot - when I see the term 'mechanistic', I interpret it as 'classical physics mechanics'
<lectrick> i better toss a different bone in here: Thoughts on composition pattern vs. inheritance pattern with regards to pervasive unit testing?
<workmad3> bilbo_swaggins: and when I see 'computation' I read it as 'computable on a turing machine'
<lupine> composition > inheritance
apeiros_ has quit [Remote host closed the connection]
<lupine> ironically enough
<lectrick> lupine: I'm coming to that conclusion. Slowly and with a lot of baggage. :)
<lupine> sounds like busy-work ;)
sambao21 has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
<workmad3> lectrick: inheritance is the strongest association you can make between two objects in an OO language
<bilbo_swaggins> workmad3: as I interpret, the fact that an apparently consistent (if random) system exists, it's self-evidently computable
<lectrick> lupine: I'm hurting for a green-field project, let's just say that
<bilbo_swaggins> although clearly I'm extending the definition of computable
<workmad3> bilbo_swaggins: but what do you mean by 'computable'?
<workmad3> bilbo_swaggins: yes, and how? :)
<bilbo_swaggins> what is a computation?
<bilbo_swaggins> just a process?
<workmad3> lectrick: so, would you always use your strongest form of glue to join things together? :)
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> bilbo_swaggins: one sec, need to make sure I get this right so need to look a bit up :)
<lectrick> workmad3: yep. another good point.
apeiros has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
ahawkins has quit [Quit: leaving]
<bilbo_swaggins> our model of QM is computable
<workmad3> lectrick: composition is a weaker relationship... so yes, I'll prefer composition over inheritance, in the same way as I'll grab PVA before I glue things together with polycement ;)
<lectrick> workmad3: lupine: OK so if I want to use the compositional pattern more, yet I'm more or less stuck with Rails, should I just nihilistically jump off the nearest roof? lol. (Are there other pieces/gems/tools useful to web development that were written with a compositional pattern?)
<bilbo_swaggins> that doesn't necessarily mean the Universe "is" a computation
lastWhisper_ has joined #ruby
<lupine> nihilism does not imply suicide
<bilbo_swaggins> same word, different meaning
kewubenduben has joined #ruby
<bilbo_swaggins> lupine: agreed
<lastWhisper_> Are any of you guys familiar with GC in Ruby 2.0?
<bilbo_swaggins> how familiar?
<lectrick> lupine: but suicide (or not) doesn't make a difference in nihilism
<lupine> yes it does
<lupine> dear me
<lectrick> i exist, i don't exist, so what either way?
<lastWhisper_> I am trying to understand what happens when I do GC.enable and then GC.start
<lastWhisper_> should I be seeing a memory decrease if I run GC(after the fact) ?
nari has quit [Ping timeout: 246 seconds]
<lupine> rather than being the object of one meaning-giver, you can be the object of many
<bilbo_swaggins> nihilism isn't a matter of existence but purpose, I thought
<workmad3> lectrick: so the world doesn't exist... what exactly is it that doesn't exist?
<lectrick> lupine: let's table it for now, i did enjoy discussing that tho :)
JPascal has quit [Remote host closed the connection]
albertgrala_ has joined #ruby
bluenemo has quit [Remote host closed the connection]
<lupine> this initial rejection of yours is really based on a complete misunderstanding of the implications
<lectrick> lastWhisper_: not if you have a memory leak :O
<workmad3> lectrick: after all, there's something that you're interacting with... claiming that it doesn't exist doesn't stop your (non-existent) self from interacting with the (non-existent) thing... so what is it?
<workmad3> lectrick: so arguing that nothing exists doesn't make the questions go away ;)
<bilbo_swaggins> lastWhisper_: do you have GC off already?
ambushsabre has quit [Quit: rip]
apeiros_ has quit [Ping timeout: 264 seconds]
<lastWhisper_> lectrick: Is there a way to debug whether or not I have a leak? Besides watching my ruby process blow upwards of 2.5GB
<lectrick> workmad3: hmmm.
<workmad3> lectrick: it just adds an extra question - why do I think it doesn't exist? :)
<lastWhisper_> bilbo_swaggins: Is GC enabled/disabled by default when you start a new process?
<bilbo_swaggins> enabled
zigomir has quit [Read error: Connection reset by peer]
<lastWhisper_> Or do you need to specify what it should be
<lastWhisper_> ok
thejoecarroll has quit [Ping timeout: 272 seconds]
<lupine> check what you've got lots of in ObjectSpace? ;)
rootshift has quit [Quit: rootshift]
<lastWhisper_> If GC is enabled, and I do GC.enable
<lastWhisper_> will that turn it to false?
<lupine> there used to be a really cool gem for debugging memory leaks, but I've forgotten what it's called
zigomir has joined #ruby
<bilbo_swaggins> maybe pry would work?
<lectrick> lastWhisper_: you can periodically inspect the memory using ObjectSpace.each_object I guess
<lupine> it'd show you how many of what were around over time, and where they were being created
<bilbo_swaggins> GC is enabled && GC.enable => true
<bilbo_swaggins> returns true and does nothing
<lectrick> lastWhisper_: and count the number of objects per class and see which class is leaking
ndrei has quit [Ping timeout: 272 seconds]
<bilbo_swaggins> I'm just reading the Ruby Docs
albertgrala has quit [Ping timeout: 272 seconds]
<bilbo_swaggins> does pry let you step through execution?
<bilbo_swaggins> or any other gem?
ndrei has joined #ruby
<einarj> bilbo_swaggins: You should be able to do that with pry, or other gems such as 'debugger'
<workmad3> bilbo_swaggins: ok, so a computation, by my viewpoint of it meaning turing-computable, is a process where the outcome is completely and unambiguously decidable when given the current state of a system and deterministic rules for evolving that system
<lastWhisper_> I usually use pry so that would be the most familiar for me
thejoecarroll has joined #ruby
<workmad3> bilbo_swaggins: oh, sorry, a *finite* process
<bilbo_swaggins> thanks einarj
<bilbo_swaggins> I will play with both
<lupine> workmad3, turing machines need infinite time
<workmad3> lupine: only if it's an uncomputable problem
<workmad3> lupine: e.g. the exact value of pi, the halting problem
<bilbo_swaggins> workmad3: you're not accounting for the halting problem
rankine has joined #ruby
rdark has quit [Quit: leaving]
<workmad3> bilbo_swaggins: the halting problem is uncomputable
<bilbo_swaggins> its computation never resolves
<MrZYX> bilbo_swaggins: also check byebug, pry-byebug, pry-debugger and pry-stack_explorer
ewnd9 has quit [Read error: Operation timed out]
<workmad3> bilbo_swaggins: exactly, which is why it's uncomputable
yoshie902a has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<bilbo_swaggins> another case of a word having different aspects
<lastWhisper_> I actually have a quick meeting I'll be back to continue this convo though
kevind_ has joined #ruby
<lastWhisper_> thx for the help so far
<bilbo_swaggins> uncomputable in the sense that it never finishes
coderhs has joined #ruby
vlad_starkov has joined #ruby
<bilbo_swaggins> but it's a definite process
<workmad3> bilbo_swaggins: yes, but it's not a finite process
<bilbo_swaggins> thanks MrZYX
dweeb_ has quit [Quit: Computer has gone to sleep.]
stryek has quit [Remote host closed the connection]
<bilbo_swaggins> workmad3: we don't know whether the Universe is finite or infinite
<workmad3> bilbo_swaggins: indeed we don't ;)
Spami has joined #ruby
<bilbo_swaggins> GoToMeeting time :(
<workmad3> bilbo_swaggins: but part of the standard definition of computable is that you can get the result out in a finite (if length) period of time ;)
<workmad3> *lengthy
<lupine> our best guess is finitely old, infinitely big
cbetta is now known as cbetta_afk
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
<yoshie902a> I'm trying to think of a good name for a module that focuses on imports and exports. Any ideas?
<workmad3> yoshie902a: IO? :P
colli5ion has joined #ruby
<workmad3> yoshie902a: sorry, being trite there... what are you importing and exporting?
guardianx has quit [Remote host closed the connection]
maroloccio has quit [Quit: WeeChat 0.4.2]
<yoshie902a> workmad3: np, to be far it's not complicated question, but I'm trying to improve my naming conventions. I'm importing and exporting CSV and XLSX files that contain stock position and stock trade data
gilcosson has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<bilbo_swaggins> what's new yoshie902a
<yoshie902a> bilbo_swaggins: hi, how you doing?
nettoweb has joined #ruby
gilcosson has joined #ruby
cbetta_afk is now known as cbetta
<nettoweb> guys, I'm trying to upgrade to ruby 2.0 but getting this error message: Could not find test-unit-2.5.5 in any of the sources
axl_ has joined #ruby
<workmad3> yoshie902a: ok, so I'd probably start with deciding if I want to have something like a Stocks::IO module with Stocks::IO::CSV::PositionExport/Import, Stocks::Positions::IO::CSV, etc...
<workmad3> yoshie902a: which I'd probably base on the current design
tylersmi_ has quit [Remote host closed the connection]
zipper has quit [Quit: leaving]
<yoshie902a> workmad3: I did not realize you can you "/" in module names.
nihed has quit [Read error: Connection reset by peer]
<workmad3> yoshie902a: e.g. if I'm already grouping things under something like Stocks::Positions::<Stuff to do with the positions> and Stocks::Trades::<stuff to do with trades>
<workmad3> yoshie902a: then I'd build off that
<workmad3> yoshie902a: sure, you can nest modules :)
<workmad3> yoshie902a: oh sorry, no the / was in the vein of 'PositionExport or PositionImport'
<bilbo_swaggins> nettoweb: with RVM, from source or Rubyinstaller?
Vivekananda has joined #ruby
<yoshie902a> workmad3: got it. that makes sense
IceDragon has quit [Ping timeout: 252 seconds]
<nettoweb> bilbo_swaggins: source
mklappstuhl has joined #ruby
<yoshie902a> I like the IO, clean and to the point. I'm always worries that I'm going to over write an existing class or module in ruby. Is there a way to check in the docs?
<workmad3> yoshie902a: keep your stuff in a namespace
<workmad3> yoshie902a: which is why I was suggest Stocks::IO
<workmad3> yoshie902a: on the idea you have a top-level namespace 'Stocks' ;)
<workmad3> *suggesting
<workmad3> yoshie902a: it also means that yes, you're not overwriting the top-level IO module
<yoshie902a> workmad3: that makes sense, that way it does not get mixed up.
zcreative has joined #ruby
benzrf has quit [Read error: Connection reset by peer]
<workmad3> yoshie902a: and you're also not claiming that you've written a module for general IO, just an IO module for your stocks ;)
tharindu has joined #ruby
<yoshie902a> workmad3: however, doesn't that also lead to longer reference to these modeules?
<yoshie902a> stocks::IO:import vs IO:import
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<workmad3> yoshie902a: well, inside the Stocks module, you can reference your IO module as IO
<workmad3> yoshie902a: and the top-level IO module as ::IO
<workmad3> yoshie902a: and outside the stocks module, you use Stocks::IO
<yoshie902a> workmad3: so it will work inside out, trying the lowest level first and working up
<workmad3> yoshie902a: I tend to use the word 'innermost' rather than 'lowest' which to many people would mean the bottom (and most general) namespace
<workmad3> yoshie902a: but yeah
acrussell has quit [Quit: Leaving.]
dangerousdave has joined #ruby
noname001__ has quit [Ping timeout: 252 seconds]
<yoshie902a> workmad3: that makes sense, to improve my communication, when people use lowest, they mean top level, like the IO module?
<workmad3> yoshie902a: that's what I immediately interpretted it as, yes
wallerdev has quit [Quit: wallerdev]
<ferr> enumerator = [3, 7, 14].each why do they use .each in this assignment?
<yoshie902a> workmad3: and highest is the innermost or most details stocks:IO:imports
`petey` has quit [Remote host closed the connection]
<workmad3> yoshie902a: again, that's what I would have interpretted it as :)
yfeldblum has joined #ruby
<yoshie902a> confusing, lowest is the top and highest most mean the bottom.
<lupine> I would avoid any re-use of stdlib names
<workmad3> yoshie902a: but I do tend to use innermost and outermost rather than highest and lowest
<lupine> even namespaced
`petey` has joined #ruby
<lupine> ::Highline::String causes me so many problems
Bumptious has quit [Remote host closed the connection]
<MrZYX> ferr: to get hold of an Enumerator
zipper has joined #ruby
tharindu has quit [Ping timeout: 265 seconds]
Bumptious has joined #ruby
<yoshie902a> lupine: do you recommend not using standard library name? If it's name spaced, does it just cause reference problems?
tharindu has joined #ruby
benzrf has joined #ruby
<yoshie902a> for example you think your using the outer most IO module, but you are really using the innermost
<benzrf> frig
<workmad3> yoshie902a: yeah, that can happen and cause annoyance... especially for a maintainer
shime has joined #ruby
<lupine> at best, it'll confuse you a few years down the line
<lupine> at worst, it will cause perennial problems
<workmad3> yoshie902a: even more especially, as I now think of it, in a situation like yours where you're quick likely to use the stdlib module(s) in your implementation
bilbo_swaggins has quit [Quit: Leaving]
<workmad3> yoshie902a: as I'm sure you're going to want to use the stdlib CSV module in your own CSV stuff ;)
Solnse has joined #ruby
pranny has quit [Quit: Leaving.]
`petey` has quit [Ping timeout: 252 seconds]
<workmad3> yoshie902a: so yeah, that's something else you'd want to keep in mind when naming... how likely it is you're going to have clashes and annoy the hell out of future maintainers (including you 6 months down the line)
lkba has quit [Read error: Connection reset by peer]
<lupine> I've gone right off of deep namespacing in general, actually
`petey` has joined #ruby
Bumptious has quit [Ping timeout: 245 seconds]
mityaz has joined #ruby
<yoshie902a> lupine: workmad3: I agree with both, I will try to avoid the std lib names, but so many are so good for naming things
Advocation has joined #ruby
<lupine> I had a project called rack organiser on rails 2.1 at one point
<lupine> the upgrade to 2.3 was fun
<yoshie902a> I guess I could add a prefix, like Stock_IO
<workmad3> yoshie902a: or maybe you don't need a general IO module and can go with Stock::Importers and Stock::Exporters as your grouping elements
<benzrf> yoshie902a: smurf
<yoshie902a> benzrf: smurf?
IceDragon has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3> yoshie902a: or maybe your project would be more sensible with Stock::Positions::CSVImporter; Stock::Positions::XMLImporter, etc
<workmad3> (and maybe a module Stock::Positions::Importer that you include into other importers to get some useful shared behaviour)
introom has joined #ruby
<introom> hi.
<workmad3> yoshie902a: there's plenty of ways to structure this sort of thing :)
<introom> I am on homebrew. just did a update to ruby. and now I found when I run gem, the previous gems cannot be executed.
ambushsabre has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
<yoshie902a> workmad3: I was thinking of using the same code for importing, transactions and positions, its pretty general. However, that goes bring up a mother questions.
<mikecmpbll> we just have a general XMLProcessor class and then specific implementation for different clients which inherit from it
<yoshie902a> mother=another
<ferr> does anyone know a source where enumerators are explained simply for newbies?
<introom> I have two folders in side usr/local/lib/ruby/gems. one is 2.0.0 and 2.1.0
<introom> those in 2.0.0 cannot be invoked from command line now.
<workmad3> introom: that's probably because your ruby version is now 2.1.0, right?
<yoshie902a> if I have methods that I want to use in two classes/modules, can I do that using, Class myclass1, myclass2
mrnugget has quit [Quit: mrnugget]
<workmad3> yoshie902a: no
whomp has joined #ruby
<introom> workmad3: yes. exactly!
momomomomo has joined #ruby
endless_walrus has quit [Quit: Textual IRC Client: www.textualapp.com]
Serpent7776 has left #ruby ["Leaving"]
<workmad3> introom: right... so that's completely normal behaviour
larissa has joined #ruby
<yoshie902a> workmad3: is there a way to complish sharing methods?
<introom> workmad3: then what can I do to use the previous gems?
<workmad3> introom: re-install them in the new ruby
<mikecmpbll> lmao
<introom> ok. thanks.
sambao21 has joined #ruby
<workmad3> yoshie902a: yes, put the shared methods in a module and include them into both classes
<introom> can I get the packages list out, like pip freeze, and then do a bunch insall ?
<introom> workmad3: ^
<benzrf> introom: in ruby we use Gemfiles
<benzrf> introom: venvs r superior though
<yoshie902a> workmad3: that's smart
phansch has quit [Quit: Leaving]
<introom> benzrf: would you be specific? how to export a gemfile?
<benzrf> introom: you write the gemfile yourself
<yoshie902a> workmad3: Thanks so much for the great advice!
<benzrf> then you install the packages in it with bundle install
<introom> benzrf: got it. thanks.
bennyboobooboo has quit [Remote host closed the connection]
toastynerd has joined #ruby
nvrch has quit [Quit: nvrch]
* introom wonders how to stop homebrew updating new ruby... quite troublesome.
<benzrf> introom: a Gemfile is like a requirements.txt
<makkura> Is there any way to control the search order when using the Find.find? I'm using it to recursively look through folders and it ends up looking at the older content first [I assume due to alphabetical sorting] while it'd be faster to compare against newer content
<workmad3> yoshie902a: np... also, any advice I ever give comes with the provisio that if you go to your project and realise it's all useless in your context then you are to ignore it and do something sensible instead ;)
nfk has joined #ruby
bennyboobooboo has joined #ruby
w4pm has joined #ruby
intuxicated has joined #ruby
Wolland has joined #ruby
dEPy has joined #ruby
<yoshie902a> workmad3: of course. I like the idea of thinking for yourself, but it also helps to hear from people that are experienced and have a much better understanding.
megus has quit [Ping timeout: 252 seconds]
user258467 has quit [Read error: Connection reset by peer]
KneferilisHome has joined #ruby
rezzack has joined #ruby
<KneferilisHome> hello, in ruby that lacks abstract classes and interfaces, how do they implement abstraction and polymorphism? They pass concrete parent classses instead of abstract classses or interfaces to methods?
Megtastique has quit []
dweeb_ has joined #ruby
<workmad3> KneferilisHome: duck typing
<MrZYX> KneferilisHome: we just assume that a passed object implements the right API, search for duck typing
<workmad3> KneferilisHome: and a tendency to shallow inheritance hierarchies
introom has left #ruby ["WeeChat 0.4.2"]
mikecmpbll has quit [Ping timeout: 246 seconds]
jprovazn has quit [Quit: Odcházím]
yoshie902a has left #ruby [#ruby]
<KneferilisHome> workmad3: oh you mean, like in public function test($IamPolymorhic)?
<workmad3> KneferilisHome: no
lkba has joined #ruby
gilcosson has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
bennyboobooboo has quit [Ping timeout: 252 seconds]
aasirc has joined #ruby
browndawg has quit [Quit: Leaving.]
<workmad3> KneferilisHome: I mean like MrZYX said - if you get passed an object, you assume it has the correct methods and try to call them. If it doesn't you'll get NoMethod errors
mansi has joined #ruby
gilcosson has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<KneferilisHome> workmad3: what do mean by tendency to shallow inheritance hierarchies?
<shevy> KneferilisHome you can do everything in ruby whenever you want to, using method_missing() send() the various *eval() ways and define_method()
<workmad3> KneferilisHome: and for abstract classes, we also have module mixins for sharing that kind of behaviour... e.g. the Comparable module which you can mixin to a class, implement your own <=> operator and get the rest of the comparison implementations from the module
<workmad3> KneferilisHome: I mean that rather than building up deep hierarchies of abstract classes, in ruby there's a tendency to have not much inheritance at all
rankine has quit [Ping timeout: 264 seconds]
dkamioka has quit [Remote host closed the connection]
<KneferilisHome> workmad3: relying only on composition then?
<workmad3> KneferilisHome: composition, mixins and duck-typed interfaces, yes
mansi has quit [Read error: Connection reset by peer]
RaCx has joined #ruby
<workmad3> KneferilisHome: maybe with the odd bit of inheritance as a last resort
mansi has joined #ruby
<KneferilisHome> ok
dagobah has quit [Remote host closed the connection]
rippa has joined #ruby
mudmaste_ has joined #ruby
<workmad3> KneferilisHome: there's also the 'leap before you look' principle whereby you don't check for types or an interface first, you instead just try to use it
dkamioka_ has joined #ruby
<workmad3> KneferilisHome: and potentially catch the NoMethod error from such a call to turn it into an ArgumentError to inform someone that they called your method incorrectly ;)
urbanmonk has joined #ruby
<MrZYX> hm, I think I rather do a respond_to? if I want to throw an ArgumentError in such a case
juarlex has quit [Remote host closed the connection]
bennyboobooboo has joined #ruby
whomp has quit [Quit: leaving]
<terrellt> Duck-typed interfaces ftw.
mudmaster has quit [Ping timeout: 264 seconds]
MrThePlague has joined #ruby
senayar_ has joined #ruby
<workmad3> MrZYX: that's an option too... I've encountered some people who don't like doing that because it imposes a check on everyone rather than just the people that do it incorrectly
vlad_starkov has joined #ruby
<workmad3> MrZYX: but I've also seen people argue that they'd rather do a respond_to? instead of two walks of the method lookup chain ;)
timonv has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
vlad_starkov has quit [Read error: Connection reset by peer]
<workmad3> MrZYX: end of the day - whichever one you (or your team) finds clearest :)
<MrZYX> it's probably just me finding methods preconditions on the end weird
vlad_starkov has joined #ruby
lorelei_ has joined #ruby
<MrZYX> or input validation or what you want to call it
dankest has joined #ruby
hoelzro has joined #ruby
makerop has joined #ruby
w1xz has joined #ruby
<workmad3> yeah. I have to admit, I don't normally both with either... I tend to feel that someone calling a method knows roughly what goes into it
aganov has quit [Remote host closed the connection]
<workmad3> and also that if they're doing exploratory stuff in IRB, they have the know-how to interpret a NoMethod error as 'my object doesn't fit their duck'
_maes_ has quit [Ping timeout: 245 seconds]
<makerop> im messing around with the remote-syslogger gem
zipper has quit [Quit: Lost terminal]
<MrZYX> sure, I only consider it for stuff like public gem APIs anyway
lethjakman has quit [Ping timeout: 246 seconds]
<MrZYX> if at all
<workmad3> although I do now *really* want to crack open my projects and redefine Object#method_missing to throw an IncorrectDuck error istead of a NoMethod error
senayar has quit [Ping timeout: 264 seconds]
<MrZYX> if it costs me more than one check I'd probably already won't do it
<workmad3> with a default message of 'maybe you need to punch it some more?'
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
marcgg_ has joined #ruby
momomomomo has joined #ruby
mehlah has quit [Quit: Leaving...]
troyready has joined #ruby
Voodoofish430 has joined #ruby
<KneferilisHome> thanks for the information
marcgg has quit [Ping timeout: 252 seconds]
KneferilisHome has quit [Quit: Page closed]
megus has joined #ruby
zigomir has quit [Remote host closed the connection]
zigomir has joined #ruby
radic_ has quit [Ping timeout: 265 seconds]
<lectrick> lupine: workmad3: Wow, this link just dropping on my radar is timely lol http://singularityhub.com/2014/01/09/its-alive-artificial-life-worm-wiggles-on-its-own/
Spami has quit [Quit: This computer has gone to sleep]
<shevy> dumdedum
colli5ion has quit [Ping timeout: 260 seconds]
<shevy> 904 folks
<shevy> we'll break the 1000 mark
vlad_starkov has quit [Remote host closed the connection]
zegerjan has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
rezzack has quit [Quit: Leaving.]
`petey` has quit [Remote host closed the connection]
wallerdev has joined #ruby
zigomir has quit [Ping timeout: 248 seconds]
kevind__ has joined #ruby
avril14th has joined #ruby
amundj has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
`petey` has joined #ruby
<avril14th> Hello, is there a way to chain lambdas in ruby?
zigomir has joined #ruby
<avril14th> I mean :)
colli5ion has joined #ruby
<avril14th> I have a method that takes a string in, parse it and returns a lambda
mklappstuhl has quit [Remote host closed the connection]
Jake232 has joined #ruby
clamstar has joined #ruby
kevind_ has quit [Ping timeout: 252 seconds]
<avril14th> I would like to be able to split this string following a character and parse each chunk the same way as the method is already doing
<avril14th> AND that they get chained all together in one big lambda
diegoviola has joined #ruby
<avril14th> so if call is called, the first gets execed and the result is passed to the second one
jlebrech has quit [Quit: Konversation terminated!]
kpshek has quit []
subbyyy has quit [Ping timeout: 265 seconds]
pehlert has joined #ruby
<workmad3> lectrick: awesome :)
zigomir has quit [Ping timeout: 252 seconds]
pel_daniel has joined #ruby
<workmad3> avril14th: sounds like a reduce across the array of lambdas
joaoh82 has joined #ruby
<DouweM> lectrick: that's very interesting, thanks!
<workmad3> avril14th: e.g. ary_of_lambdas.reduce(first_param) {|prev_result, next_lambda| next_lambda.call(prev_result)}
joaoh82 has quit [Client Quit]
<shevy> hmmm
<shevy> ruby was said to be created in 1995
<shevy> but was this not more just the first official release?
<lectrick> yeah, i love interesting stuff (... by definition?)
bigoldrock has joined #ruby
codezomb has joined #ruby
codepython777 has quit [Quit: Leaving.]
<workmad3> lectrick: seems somewhat tautological, yeah
Sid05 has quit [Ping timeout: 272 seconds]
<workmad3> lectrick: although the phrase "I'm interested in interesting stuff" is more so :)
wingdspur has joined #ruby
<shevy> I am bored
<shevy> ddd say something funny
<workmad3> I think he's afk atm
pehlert has quit [Ping timeout: 252 seconds]
Cephalostrum has quit [Quit: Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)]
canton7-mac has quit [Remote host closed the connection]
<workmad3> lectrick: Cephalostrum's quit message is also in-line with our previous discussion ;)
Megtastique has joined #ruby
momomomomo has quit [Quit: momomomomo]
rmroulette has joined #ruby
agent_white has joined #ruby
timonv has joined #ruby
Neomex has joined #ruby
<shevy> I dont see join and quite events, what was his quit message :(
SCommette has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
LostMonk has quit [Read error: Connection reset by peer]
danman has joined #ruby
agent_white has quit [Client Quit]
avril14th has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<DouweM> " Aim higher. Try this: why am I here? Why do I exist, and what is my purpose in this universe? (Answers: 'Cause you are. 'Cause you do. 'Cause I got a shotgun, and you ain't got one.)"
mrnugget has joined #ruby
fijimunkii has quit [Ping timeout: 272 seconds]
_maes_ has joined #ruby
Hanmac has joined #ruby
mikecmpbll has joined #ruby
camilasan has quit []
vlad_sta_ has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
<shevy> hmm
<shevy> too much philosophy
<shevy> I need more beer
dfranciosi has quit [Remote host closed the connection]
bennyboobooboo has quit [Remote host closed the connection]
<shevy> then I will get a shotgun
lethjakman has joined #ruby
<shevy> then I can philosophize :-)
agent_white has joined #ruby
<shevy> what the heck is that Hanmac
subbyyy has joined #ruby
noop has joined #ruby
<Hanmac> shevy did you ever play one of the pokemon games (when you where younger)?
burlyscudd has quit [Quit: Leaving.]
maletor has joined #ruby
sassamo has quit [Remote host closed the connection]
spider-mario has joined #ruby
sassamo has joined #ruby
poulson has quit [Ping timeout: 245 seconds]
<benzrf> Hanmac: welp thats depressing
Targen has joined #ruby
TMM has quit [Quit: Ex-Chat]
Guest63670 has joined #ruby
kpshek has joined #ruby
carraroj has joined #ruby
poulson has joined #ruby
gomix has quit [Ping timeout: 272 seconds]
cmedeiros has joined #ruby
aspires has joined #ruby
kindjal has joined #ruby
sassamo has quit [Ping timeout: 248 seconds]
aaronmcadam has quit [Ping timeout: 248 seconds]
dEPy has quit [Quit: Lingo - http://www.lingoirc.com]
lorelei_ has quit [Ping timeout: 246 seconds]
thumpba_ has quit [Remote host closed the connection]
thumpba has joined #ruby
dgheath21 has quit [Quit: dgheath21]
heidi has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
codepython777 has joined #ruby
codepython777 has quit [Max SendQ exceeded]
mary5030 has quit [Ping timeout: 245 seconds]
Sid05 has joined #ruby
tylersmith has joined #ruby
Hanmac1 has joined #ruby
<benzrf> :I
codepython777 has joined #ruby
DrShoggoth has joined #ruby
fire has joined #ruby
yfeldblum has joined #ruby
codepython777 has quit [Max SendQ exceeded]
net_mask has quit [Remote host closed the connection]
codepython777 has joined #ruby
zigomir has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
Bira has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 272 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
dkamioka_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
dkamioka has joined #ruby
mansi has quit [Remote host closed the connection]
tharindu has quit [Quit: Leaving...]
pel_daniel has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
saarinen has joined #ruby
ace_striker has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
colli5ion has quit []
RaCx has joined #ruby
lyanchih has quit [Quit: lyanchih]
dweeb_ has quit [Quit: Computer has gone to sleep.]
Guest63670 has quit [Quit: Lost terminal]
thumpba has joined #ruby
heftig has quit [Ping timeout: 264 seconds]
bigkevmcd has quit [Quit: have a fun weekend folks]
sassamo has joined #ruby
dkamioka has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 260 seconds]
bigoldrock has left #ruby [#ruby]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Advocation has quit [Quit: Advocation]
echevemaster has joined #ruby
`petey` has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
`petey` has joined #ruby
subbyyy__ has joined #ruby
atmosx has joined #ruby
cbetta is now known as cbetta_afk
juarlex has joined #ruby
zigomir has quit [Quit: Leaving]
juarlex has quit [Remote host closed the connection]
juarlex has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cbetta_afk is now known as cbetta
Bira has joined #ruby
<shevy> Hanmac1, nope never played pokemon games. I dont even know what that is
`petey` has quit [Ping timeout: 260 seconds]
<lastWhisper_> Alright I'm back.... So I'm running cucumber/rails and I want to defer GC to do it every 5-10 scenarios or so. Since it's enabled by default, should I disable it in a before hook, and then in the after one, if the scenario counter is above 9, then enable it and GC.start ? Would that work?
`petey` has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<MrZYX> I think it would
KensoDev has joined #ruby
burlyscudd has joined #ruby
p8952 has joined #ruby
capicue has joined #ruby
notbrent has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
DFieldFL has joined #ruby
tt1187 has quit [Ping timeout: 272 seconds]
cj3kim has joined #ruby
klaut has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
atmosx has quit [Quit: computer went to sleep...]
plotter has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
atmosx has joined #ruby
ahmedelgabri has joined #ruby
wildroman2 has joined #ruby
red_menace has joined #ruby
ehc has quit [Quit: ehc]
Advocation has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
red_menace has left #ruby [#ruby]
figgleberry has quit [Read error: Operation timed out]
senayar_ has quit [Remote host closed the connection]
<lastWhisper_> thx MrZYX
<lastWhisper_> I'll let you know how it goes :D
MindfulMonk has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
`petey` has quit [Remote host closed the connection]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
`petey` has joined #ruby
figgleberry has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
wildroman2 has quit [Remote host closed the connection]
dkamioka has joined #ruby
`petey` has quit [Ping timeout: 252 seconds]
ambushsabre has quit [Quit: rip]
freezey has quit [Remote host closed the connection]
sumark has quit [Remote host closed the connection]
platzhirsch has joined #ruby
Advocation has quit [Quit: Advocation]
<shevy> huh
<shevy> would you guys have thought that http://pastie.org/pastes/8621360/text is valid
mehlah has joined #ruby
wildroman2 has joined #ruby
dkamioka has quit [Ping timeout: 252 seconds]
nanoyak has joined #ruby
freezey has joined #ruby
burlyscudd has quit [Quit: Leaving.]
senayar has quit [Remote host closed the connection]
mrnugget has quit [Quit: mrnugget]
subbyyy__ has quit [Ping timeout: 272 seconds]
<gr33n7007h> How to decode this string "\xD9\x85\xD8\xB1\xD8\xAD\xD8\xA8\xD8\xA7\"
<benzrf> shevy: yes
blaxter_ has joined #ruby
mark_locklear has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
pehlert has joined #ruby
<shevy> benzrf hmm
capicue has quit [Quit: Leaving...]
<gr33n7007h> this is what i'm getting back when i'm translating to arabic
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codepython777 has quit [Quit: Leaving.]
<gr33n7007h> http://paste.debian.net/75478/ <- how to encode or something
jbzt has joined #ruby
<benzrf> gr33n7007h: why is GoogleTranslator a class?
<benzrf> this seems unnecessary
<jbzt> Can someone tell me how to create an instance of a class if I have a string of it's name? like "MyClass" and do "MyClass".new('stuff')?
<gr33n7007h> Well maybe a little
<pontiki> jbzt: do you mean you have a variable that contains the string class name?
dkamioka has joined #ruby
<jbzt> pontiki: exactly that
<pontiki> there's a method in Rails called constantize
<jbzt> Oh, think I found it: clazz = Object.const_get('ExampleClass')
<pontiki> which does that
mrnugget has joined #ruby
<pontiki> cool
zcreative has joined #ruby
<jbzt> thanks though
<gr33n7007h> The problem is when I translate to from english to arabic or chinese it comes back as ����
lorelei_ has joined #ruby
Cephalostrum has joined #ruby
nanoyak has quit [Ping timeout: 248 seconds]
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
Solnse has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
tvw has quit []
capicue has joined #ruby
Hanmac has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
kebabski has joined #ruby
sumark has joined #ruby
kewubenduben has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
Solnse has joined #ruby
Mars has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
Mars is now known as Guest21835
nanoyak has joined #ruby
mengu has quit [Remote host closed the connection]
<shevy> I can't read that
stkowski has quit [Remote host closed the connection]
<pontiki> i bet no one can
cbetta is now known as cbetta_afk
<pontiki> question mark inside a diamond is an unknown code point
stkowski has joined #ruby
dangerousdave has joined #ruby
<shevy> hmm english question
<lastWhisper_> hey so I found a stack overflow that talks about editing some ruby/gc settings
<shevy> better to write "so-called foo" or "so called foo"
<lastWhisper_> and I'm confused as to where people actually change these/set them
<pontiki> hyphenated
<shevy> perhaps in the GC module lastWhisper_
<shevy> ok pontiki
<gr33n7007h> it comes back as "\xD9\x85\xD8\xB1\xD8\xAD\xD8\xA8\xD8\xA7\" in the response
<ferr> I've read Learn to program by Chris Pine, then I switched to pickaxe but it's still too hard for me, any suggestions?
<lastWhisper_> shevy: Is it possible to change them locally just for a test environment?
<agent_white> ferr: rubymonk.com :)
camilasan has joined #ruby
<pontiki> ferr: do Learn to Program again
heftig has joined #ruby
stkowski has quit [Client Quit]
ehc has joined #ruby
stkowski has joined #ruby
<shevy> ferr hmm that's a bit difficult. I think you should try to write some simple ruby code that does something like create a file, fill it, close the file, remove the file, change directory, in ruby. then show the code, and turn it into a class, then add more convenient ways to use that class
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> lastWhisper_ actually I have not seen these constants
<shevy> RUBY_HEAP_MIN_SLOTS=600000
<shevy> RUBY_GC_MALLOC_LIMIT=59000000
jcrocetta has joined #ruby
<pontiki> lastWhisper_: I do not know this for sure, as it might be something that happens before ruby gets started up, but you could set things based off RAILS_ENV in your test helper?
<pontiki> s/you could/could you/
<lastWhisper_> Hmm perhaps.
jbzt has quit [Quit: jbzt]
<pontiki> i wouldn't even begin to know how to see if they would take effect, though
<shevy> lastWhisper_ do you know where these constants get set?
<ferr> I do all of that but I miss some kind of clarification
poulson has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
hiall has quit [Ping timeout: 272 seconds]
<shevy> ferr clarification in what regard?
<pontiki> ferr, you just did all of Learn to Program again?
<ferr> Maybe there is something like Learn to program but just covers more topics?
<pontiki> that is too fast
subbyyy has quit [Quit: none 0.3.9.2]
<ferr> pontiki no
<lastWhisper_> shevy: I do not, that's kind of the root of my initial question
raja has joined #ruby
<shevy> ferr hmm not in that style, I think. it's a bit old by now too, one day we'll make an updated and expanded version of that tutorial
<lastWhisper_> Currently I've got a bunch of debugging things set up in my test environment to "watch" GC run, and see the differences in regards to what's happening with all the GC.stat output
<pontiki> ferr: try learnrubythehardway.com
<pontiki> you are well beyond my experience in that, lastWhisper_
<lastWhisper_> Alright :(
<shevy> ferr the best you can do, in my opinion, is to try and write as much code as possible and improve it. that way you are kinda forced to research how ruby functions, you'll have to know the methods on class String and Array eventually, then you can find out what Enumerable and enumerators are etc...
<shevy> lastWhisper_ well at least I found where they are
<shevy> gc.c: free_min_ptr = getenv("RUBY_FREE_MIN");
<shevy> apparently they must be an environment variable
<pontiki> i am curious, ferr, what is the gap?
cj3kim has joined #ruby
<ferr> I'm not really sure
<shevy> I understand it
<pontiki> shevy: they are environment variables
<ferr> When I just started reading about enumerators and enumarables
<agent_white> terrellt: dependent: :delete_all ? As long as you don't have callbacks you care about.
<shevy> the tutorial covers many aspects of ruby
<agent_white> mt
cj3kim has quit [Remote host closed the connection]
<ferr> I've got all confused and keep searching for sources about this but I still don't get it
nanoyak has quit [Quit: Lates.]
<shevy> but it does not really teach people how to write a project with different classes, or how to make a gem or what to do next
<pontiki> my thought and wonder was whether setting the envars in ruby itself would be setting them too late for the GC
Sid05 has quit [Ping timeout: 252 seconds]
<shevy> ferr the pickaxe in 2004 I liked more than the later pickaxe
nanoyak has joined #ruby
<pontiki> i'm guessing the GC initializes before it starts actually reading ruby code
<shevy> it told you how to make a music box right from the beginning
Sid05 has joined #ruby
<pontiki> the newest one is way more a reference than a how to program
<shevy> that was the first time I saw << right after I read a C++ book before
jlast_ has joined #ruby
<shevy> and I loved << instantly. in my mind it meant "append this"
<agent_white> ferr: That just comes down to cruising Google and tinkering with irb. I'm actually learnin about enum's myself as well :)
<lastWhisper_> this is actually a decent resource
cj3kim has joined #ruby
<shevy> ah good point
<shevy> ferr, do you use IRB already?
<ferr> ofc
<ferr> I test every code I see
<ferr> and make notes
<pontiki> (switch to pry!)
jlast_ has quit [Read error: Connection reset by peer]
pothibo has joined #ruby
timonv has joined #ruby
<shevy> well if you still don't know what to write next, try to answer questions other people have here on #ruby, eventually you'll be able to answer them, just like benzrf does now :)
<shevy> benzrf is an ex-haskell ex-python guy ;) ;P
FnX has joined #ruby
<pontiki> ferr, what is the actual confusing between enumerators and an enumerable?
jlast_ has joined #ruby
megus has quit [Ping timeout: 245 seconds]
<shevy> I wouldn't be able to answer that without looking at notes
<shevy> or googling
Czupa has joined #ruby
<shevy> huh pontiki
<ferr> I just can not define the enumerator
<shevy> this is interesting, look:
<shevy> "The Enumerable mixin provides collection classes with several"
cbetta_afk is now known as cbetta
<agent_white> pontiki: http://blog.arkency.com/2014/01/ruby-to-enum-for-enumerator/ Is this sound advice?
aasirc has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> it specifically writes mixin here, not module :)
Brolen has quit [Quit: Brolen]
ndrei has quit [Read error: Operation timed out]
<shevy> ferr ruby uses some tricks here and there
tharindu has joined #ruby
postmodern has joined #ruby
<shevy> ferr for instance, have you tried to sort with ruby before?
<ferr> yes
<shevy> ok then you know things like %w( abc ghi def ).sort # => ["abc", "def", "ghi"]
<shevy> and sort_by
<pontiki> agent_white: i would say yes, in that it is asking the fundamental question about whether a class is implementing a collection
<shevy> and you can define a method in your class to become sortable too
<shevy> I forgot what it was
jlast has quit [Ping timeout: 252 seconds]
<pontiki> Comparable
<pontiki> <=>
<agent_white> pontiki: Roger that :)
<shevy> hmm
noop has quit [Ping timeout: 248 seconds]
<shevy> oh yes
<shevy> def <=>(per)
<shevy> ferr that is also a valid ruby method
FnX has quit []
wildroman3 has joined #ruby
<shevy> ferr have you written a class before?
<ferr> yes
<shevy> ok good
<shevy> your first puzzle!
larissa has quit [Quit: Leaving]
wingdspur has quit [Quit: Leaving]
<shevy> ferr, how would you enable an object in ruby to respond to something like: your_object["foo"] = 5
<shevy> where your_object is the instance of your class
<shevy> like your_object = Ferr.new
Cephalostrum has quit [Read error: Connection reset by peer]
<ferr> enable to respond
<ferr> it's like false true or nil?
<shevy> that you can use the [] notation there
<shevy> normally you can not use []
wildroman2 has quit [Ping timeout: 245 seconds]
<shevy> you can try it: class Foo; end; foo = Foo.new; foo[3] # this will fail
lukec has joined #ruby
<shevy> NoMethodError: undefined method `[]' for #<Foo:0xb228c00>
<pontiki> agent_white: along the lines of "Do the simplest thing that works" returning an enum makes more sense than coupling your class with Enumerable
tharindu has quit [Ping timeout: 265 seconds]
<shevy> ferr, you can define a method called [] in your class
<shevy> ferr, if it is to accept arguments, the syntax is a bit funky, for instance:
<shevy> class Ferr; def [](i); puts i * 2; end;end;foo = Ferr.new; foo[3] # 6
dfranciosi has joined #ruby
Cephalostrum has joined #ruby
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<ferr> ok I got it
<ferr> so that's called an enumerator?
coderhs has quit [Ping timeout: 252 seconds]
ffranz has quit [Ping timeout: 272 seconds]
Spami has joined #ruby
roolo has quit [Remote host closed the connection]
<agent_white> pontiki: Ahhh I see! Thank you :)
<shevy> ferr nah
<shevy> ferr most of the time you want to make use of an enumerator through #each
poguez_ is now known as poguez
raja has quit [Ping timeout: 252 seconds]
<shevy> ferr do you understand .each already?
<shevy> the chris pine tutorial should have explained that
<ferr> I believe so
<shevy> ok as a refresher
momomomomo has joined #ruby
<shevy> you have an array, like so: array = []; you can append stuff into it... array << 'bla' << 'ble'
<shevy> and then you can iterate through these elements via .each
agjacome has joined #ruby
<shevy> and .each will return an enumerator
<shevy> e = [1,2,3].each; e.class # => Enumerator
<shevy> if you want to, you can call .next on that one after the other
<shevy> it will return the next element always
<shevy> e.next # 1, e.next # again, will return 2 this time, e.next # will return 3
Cephalostrum has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
shadoi has joined #ruby
<shevy> ferr anyway I dont think you will need these much in the beginning
<shevy> ferr if you can write and make use of methods, you have 60% covered already. if you understand blocks, you have 80% covered
jerius has quit []
alekst has joined #ruby
<atmosx> anyone has a pebble?
<shevy> hmmm I just noticed something
<shevy> if you do: ruby foo.rb **
<shevy> ARGV will never see these **
Kricir has quit [Remote host closed the connection]
<shevy> :(
mary5030 has joined #ruby
mml has quit [Quit: leaving]
<shevy> so in this case, I can never find out the real original user input, if it came from a shell, right?
dweeb_ has joined #ruby
blaxter_ has quit [Quit: foo]
<YOURBESTFRIEND> escape them
mikecmpbll has joined #ruby
<YOURBESTFRIEND> or use a string
roolo has joined #ruby
blackmesa has joined #ruby
burlyscudd has joined #ruby
shedd has quit []
dmerrick has joined #ruby
zxd has joined #ruby
brianpWins has joined #ruby
noop has joined #ruby
`petey` has joined #ruby
w4pm has joined #ruby
<ehc> I'm trying to write regex that matches "Match me \\ but not this \\\\" the first escaped backslash but not the second… ?
LostMonk has joined #ruby
jack_rabbit has quit [Ping timeout: 246 seconds]
cjac has joined #ruby
<cjac> hey folks
<cjac> this code works on one system, but on another gives this error:
<cjac> /usr/lib64/zlfwd/lib/zlfwd/daemon.rb:25:in `start_sentinels': undefined method `has_key?' for nil:NilClass (NoMethodError)
<agent_white> shevy: Can you define that [] method and call it on an array within that class? (say in an instance variable)
<cjac> am I missing a library or something?
jlast_ has quit [Remote host closed the connection]
klaut has joined #ruby
<shevy> agent_white well the array would still be an array and already have [] available
<agent_white> shevy: Yep I know, but say in an alternate universe I wanted to :P
<shevy> hmm
bean has joined #ruby
<shevy> what if you subclas from an array... then remove the [] but only in the parent class
<ferr> shevy: thank you
<shevy> cjac apparently @config is nil, so it was not properly initialized
zxd has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
zigomir has joined #ruby
mudmaster has joined #ruby
SCommette has quit [Quit: SCommette]
<pontiki> OT: any recommends for a small portable external HDD?
<pontiki> hopefully powered off connection
<shevy> dunno
<shevy> how large shall it be?
ace_striker has quit [Ping timeout: 272 seconds]
<shevy> I mean, small as in design and size-ratios
dweeb_ has quit [Quit: Computer has gone to sleep.]
tt1187 has joined #ruby
tt1187 has quit [Read error: Connection reset by peer]
Brolen has joined #ruby
mudmaste_ has quit [Ping timeout: 246 seconds]
ffranz has joined #ruby
<shevy> I have some smaller ones from freecom, 80 gigs up to 200 or 400
tt1187 has joined #ruby
<shevy> but I mainly use larger ones from... hmm
<shevy> Buffalo HD-HX2.0TU3 DriveStation 2TB
ferr has quit [Ping timeout: 272 seconds]
<shevy> videos are too damn huge :(
RaCx has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
havenwood has joined #ruby
burlyscudd has quit [Quit: Leaving.]
w_alexus has joined #ruby
`petey` has quit [Remote host closed the connection]
<shevy> did you guys know you can add post-install messages in your gems via .post_install_message
breakingthings has quit []
tannerburson has quit [Quit: tannerburson]
Al__ has quit [Quit: Al__]
<DouweM> yes and don't
breakingthings has joined #ruby
<shevy> hehehehe
Albright has quit [Read error: Connection reset by peer]
<DouweM> it's been the subject of a couple of discussions here already :p
<benzrf> somebody pinged me
<benzrf> probably half an hour ago
<benzrf> whats up
tannerburson has joined #ruby
arietis has joined #ruby
ffranz has quit [Ping timeout: 272 seconds]
simoz118 has joined #ruby
Albright has joined #ruby
<agent_white> benzrf: I think we were just admiring you.
<agent_white> ;D
sambao21 has quit [Quit: Computer has gone to sleep.]
RaCx has joined #ruby
RaCx has quit [Client Quit]
senayar has joined #ruby
h4mz1d has joined #ruby
senayar has quit [Remote host closed the connection]
`petey` has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
senayar has joined #ruby
yekta has joined #ruby
decoponio has quit [Quit: Leaving...]
RaCx has joined #ruby
<shevy> benzrf I cant remember what it was
<shevy> IRC goes by so quickly
<shevy> and ferr is gone now too
monkegjinni has joined #ruby
tharindu has joined #ruby
Kricir has joined #ruby
sambao21 has joined #ruby
<mereghost> IRC goes at light speed. Word.
Speed has left #ruby ["WeeChat 0.4.2"]
phansch has joined #ruby
sambao21 has quit [Client Quit]
vmachine has quit [Ping timeout: 260 seconds]
e62 has quit [Ping timeout: 252 seconds]
vmachine has joined #ruby
<shevy> omg ruby sites are closing down
<shevy> "We decided to suspend raa.ruby-lang.org"
<shevy> Posted by hsbt on 8 Aug 2013
<shevy> AND
<shevy> rubyforge.org - "RubyForge will be shutting down on May 15 2014."
<shevy> the ruby world is coming to an end
<benzrf> theres a running gag in another channel i go on
<benzrf> i linked to c2 wiki once
<shevy> #crossdressers?
<shevy> c2 wiki is like the first wiki with only black white right?
<benzrf> and somebody glommed onto 'wiki is a fun way to communicate asyncronously across the network'
<benzrf> shevy: yeah
<shevy> and blue for hyperlinks
pel_daniel has joined #ruby
<benzrf> and they put that as a description in my bot's factoids for like
<benzrf> letters, email, twitter, irc
<benzrf> :v
tharindu has quit [Ping timeout: 246 seconds]
<benzrf> oh wow raa was started when i was born
<benzrf> *that year
<benzrf> it was as old as me o.o
<shevy> :(
ffranz has joined #ruby
timonv has joined #ruby
momomomomo has quit [Quit: momomomomo]
pehlert has quit [Ping timeout: 248 seconds]
vlad_sta_ has joined #ruby
<shevy> everything is coming to an end
raja has joined #ruby
<atmosx> shevy: like... what?
m8 has joined #ruby
<shevy> atmosx ruby sites!
<shevy> guys, anyone of you thinks this is sexy?
<shevy> @FOO = 'abc'
vlad_starkov has quit [Ping timeout: 246 seconds]
codepython777 has joined #ruby
<atmosx> I don't
<dachi_> so, what's next?
sailias has quit [Ping timeout: 252 seconds]
e62 has joined #ruby
Liquid-- has joined #ruby
<shevy> atmosx hehe
<atmosx> I think Jennifer Lawrence is sexy
<benzrf> shevy: why would that be sexy
<agent_white> and Halle Berry. Just how I like my coffee: with a lil bit of cream and sugar.
rbenv has joined #ruby
toydestroyer has joined #ruby
<waxjar> is there a way to tell nokogiri to stop SAX parsing when you find what you're interested in?
sailias has joined #ruby
<atmosx> agent_white: Halle Berry is an old lady... if you wanna go there, you can go directly to French and Italian (Bellucci and Marceaeu to name just two) and get on with life :-P
<shevy> benzrf easier to read
<atmosx> bellucci is easier to read
ffranz has quit [Ping timeout: 272 seconds]
<shevy> BELLUCCI is easier to read
<agent_white> atmosx: I'll take all three ;)
nhmood has quit [Quit: Connection closed for inactivity]
<shevy> you can't handle three
fijimunkii has joined #ruby
<atmosx> agent_white: me too (if I could) :-P
<atmosx> I would be happy with just one... Alessandra Ambrosio. She's not that ritch and famous (I think so)
<atmosx> err rich
benzrf has quit [Quit: ~_~]
<atmosx> I can downvote on HN, I think I'll downvote them all now!!!!
* atmosx kidding
nanoyak has quit [Quit: Computer has gone to sleep.]
Targen_ has joined #ruby
Targen has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
gregoriokusowski has quit [Read error: Connection reset by peer]
jonnyro has joined #ruby
ahmedelgabri has quit []
<jonnyro> I'm working on a longish script. Apparently I have a mismatched end block. How can I figure out where it begins?
gregoriokusowski has joined #ruby
<jonnyro> inject.rb:1002: syntax error, unexpected $end, expecting keyword_end
<agent_white> jonnyro: Does your text editor/ide have a syntax checker?
<jonnyro> agent_white: no. I am however open to using another editor
mikecmpbll has quit [Quit: Computer has gone to sleep.]
nynex2 has joined #ruby
momomomomo has joined #ruby
jayferd has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<jayferd> hi everyone, i'm trying to write a correct syntax highlighter for ruby
toydestroyer has left #ruby [#ruby]
<jayferd> and i'm getting tripped up by the % strings combined with modulo operators
mlpinit_ has joined #ruby
<jayferd> `%=foo=` is a perfectly valid string
<jayferd> and also `foo %= bar` is assignment
<jayferd> with the modulo operator
<agent_white> jonnyro: Well that would be using a hammer to crack an egg... but definitely a good idea to snag a plugin for that in the future.
mlpinit has quit [Read error: Operation timed out]
e62 has quit [Ping timeout: 265 seconds]
<agent_white> jonnyro: Otherwise, I'm not sure. Personally I have 'indentation markers' along with syntax checking which helps. What ide/text editor do you use?
dfranciosi has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<jonnyro> agent_white: vim
<jonnyro> 7.4
<agent_white> jonnyro: Synctastic :)
jerius has joined #ruby
Targen has joined #ruby
vmachine has quit [Ping timeout: 272 seconds]
<agent_white> jonnyro: That's what I use, well well worth it. It's a Bundle-compliant plugin as well
maletor has quit [Quit: Computer has gone to sleep.]
Targen_ has quit [Ping timeout: 265 seconds]
makerop has quit [Remote host closed the connection]
<jonnyro> agent_white: do you have a link to the setup instructions, there seem to be a few references to synctastic in google
<jonnyro> I dont have a lot of pre-existing behavior to preserve in my vim environment, so i'm fine with wiping everything out if need be
tyl has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
atmosx has quit [Quit: Lost in trance]
baschtmobil has quit [Ping timeout: 260 seconds]
<agent_white> jonnyro: Woops I lied, use Pathogen (plugin manager) https://github.com/tpope/vim-pathogen, then install Synctastic https://github.com/scrooloose/syntastic
<jonnyro> I have pathogen, following instructions on vim.org page linked above
tyl has joined #ruby
ffranz has joined #ruby
<agent_white> jonnyro: Rad, you gotter! :)
noop has quit [Ping timeout: 265 seconds]
glundgren has joined #ruby
glundgren is now known as guilund
ikawnoclast has left #ruby ["PART #freebsd-src :PART #freebsd :PART #ubuntu :PART ##security :PONG :holmes.freenode.net"]
centrx has joined #ruby
asteros has joined #ruby
JohnBat26 has quit [Read error: Operation timed out]
<jonnyro> agent_white: once its installed, how do you use it?
wildroman3 has quit [Remote host closed the connection]
sambao21 has joined #ruby
wildroman2 has joined #ruby
<sweeper> hey so I'm trying to hax a library...there are several classes where I would like to perform an action if a specific method in those classes is called, how would I do that?
phantasm66 has joined #ruby
phantasm66 has joined #ruby
rootshift has joined #ruby
momomomomo has joined #ruby
dkamioka has quit [Remote host closed the connection]
apeiros has joined #ruby
<agent_white> jonnyro: Just reload vim and you should be set! Afterwords try :Helptags to see if it did
w_alexus has quit [Ping timeout: 272 seconds]
dkamioka has joined #ruby
<jonnyro> agent_white: :Helptags appears to do nothing
rootshift has quit [Client Quit]
<centrx> sweeper, Sounds like you want alias_method_chain, or possibly Observers
freezey has quit [Remote host closed the connection]
maletor has joined #ruby
<agent_white> jonnyro: After the reload? And did you https://github.com/scrooloose/syntastic#step-1-install-pathogenvim
<centrx> sweeper, (or alias_method)
<agent_white> Erm, see step 2 below that.
<RubyPanther> sweeper: you alias chain it, put the old one in foo_without_bar and then the new one is foo_with_bar which calls the old one, and then alias the original name to the new method
gregoriokusowski has quit [Quit: gregoriokusowski]
jerius has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<agent_white> jonnyro: Actually... it may be loaded!
ambushsabre has joined #ruby
rezzack has joined #ruby
wildroman2 has quit [Ping timeout: 260 seconds]
ffranz has quit [Ping timeout: 272 seconds]
<sweeper> mkay, thanks
cj3kim has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
<jonnyro> agent_white: I just ran :help syntastic-checker-options and recieved output
Guest21835 has quit [Remote host closed the connection]
gf3 is now known as _1996
_1996 is now known as gf3
Kricir has joined #ruby
tannerburson has quit [Quit: tannerburson]
dkamioka has quit [Ping timeout: 272 seconds]
<agent_white> jonnyro: And :SyntasticInfo ?
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dkamioka has joined #ruby
<jonnyro> agent_white: looking good. I just ran SyntasticCheck
<agent_white> jonnyro: Awesome, let me know if that works out for ya!
SCommette has joined #ruby
tannerburson has joined #ruby
interactionjaxsn has joined #ruby
dankest has quit [Quit: Peace]
rootshift has joined #ruby
einarj has joined #ruby
Advocation has joined #ruby
<jonnyro> agent_white: its really cool. Do you have any additional suggestions for plugins that will let me jump between begin and end blocks
Sawbones has joined #ruby
<jonnyro> such as def f(args) ... end
rootshift has quit [Client Quit]
<Sawbones> Could someone point me toward some ruby beginner tutorials?
<jonnyro> Sawbones: the poignant guide to ruby is awesome
<jonnyro> i also had great luck with the Ruby Koans
gr33n7007h has quit [Quit: Leaving]
<Sawbones> There's interactive shell stuff but I want more file based tutorials
<jonnyro> Sawbones: the ruby koans are right up that ally
dkamioka has quit [Remote host closed the connection]
<Sawbones> koans looks cool
claymore has quit [Quit: Leaving]
<agent_white> jonnyro: Never thought about that before... looks like there's no need! http://vim.wikia.com/wiki/Jumping_to_the_start_and_end_of_a_code_block
einarj has quit [Remote host closed the connection]
<jonnyro> Sawbones: i learned more in one afternoon than in a previous week reading ruby books
<jonnyro> Sawbones: the koans are awesome
robbyoconnor has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
wildroman2 has joined #ruby
superscott[8] has joined #ruby
deception has joined #ruby
<Sawbones> Looking into it
jwest has quit [Quit: WeeChat 0.4.1]
burlyscudd has joined #ruby
momomomomo has quit [Quit: momomomomo]
juarlex has quit [Remote host closed the connection]
tropicalmug has joined #ruby
ffranz has joined #ruby
freezey has joined #ruby
Dan_ has joined #ruby
Dan_ is now known as Guest32439
yoshie902a has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jailbot_ has joined #ruby
<jailbot_> hi
jailbot_ is now known as jailbot
tropicalmug has quit [Client Quit]
<yoshie902a> I made a ruby instance object, … Security.new({field1:"myvalue", field2:"myvalue2"}) but I would like to use something like the Hash's value_at() method. Is there anything I can use?
burlyscudd has quit [Ping timeout: 260 seconds]
teddyp1cker has joined #ruby
<jonnyro> jailbot: hi
<jailbot> im having problems with !select
<jailbot> select!
dankest has quit [Ping timeout: 265 seconds]
<jonnyro> jailbot: whats going on?
<yoshie902a> jailbot: problem more context
<jailbot> wait
<jailbot> working on it
<jonnyro> context free question :) such concise
baschtmobil has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
allaire has quit []
ambushsabre has quit [Quit: rip]
sophomorical has quit [Ping timeout: 240 seconds]
<apeiros> yoshie902a: I don't understand your question
<centrx> yoshie902a, You mean instead of calling the method? I am not sure what you mean
Dwarf has quit [Ping timeout: 260 seconds]
subbyyy__ has joined #ruby
<yoshie902a> sorry, I'll try to be more clear.
<DFieldFL> got a .gemspec / Gemfile question
tvw has joined #ruby
<DFieldFL> for dependencies do they both basically do the same thing?
danman has quit [Quit: danman]
<DFieldFL> the only extra thing a Gemfile does is specify specific locations?
vlad_sta_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<centrx> DFieldFL, .gemspec is for the gem, Gemfile is for a project?
rankine has joined #ruby
rankine has joined #ruby
rankine has quit [Changing host]
<RubyPanther> DFieldFL: gemspec is for building a gem locally, those are the deps for the gem repo, Gemfile is for installing and loading runtime dependencies
Hanmac has joined #ruby
<Sawbones> jonnyro: What do I do with these Koans?
<jonnyro> Sawbones: the koans are set up like a unit test suite
<yoshie902a> I would like to loop through an array like ["field1", "field2", "field3"], to call an objects getter methods, for example, instead of Security.field1, I would like something like Security.get("field1"), so that I can loop through the values.
tharindu has joined #ruby
<jonnyro> Sawbones: you run the suite using "rake", it complains aobut errors. You fix them
<jonnyro> In the process of fixing them, you learn ruby
jwest has joined #ruby
jkamenik has quit [Quit: Leaving.]
<jonnyro> What the koan authors did was create a set of progressively more difficult ruby problems that have a lot of hints on whats broken. In order to fix each problem you must understand the concept that is explained
<centrx> yoshie902a, Security.send(:field1)
<Sawbones> says no rake file is found
<DFieldFL> RubyPanther: once a gem is build all you need to run it is the dependencies from the Gemfile?
<centrx> yoshie902a, Any method can be called dynamically/passed as a parameter, using the #send method
<yoshie902a> more precisely, I would love to use value_at() on my objects to say, Security.value_at([ "field2", "field3"]
nanoyak has joined #ruby
<jonnyro> Sawbones:
radic has joined #ruby
<RubyPanther> DFieldFL: right, unless you are the gem author, you never build the gem you just unpack and install a prebuilt gem. So the user only cares about the Gemfile
<jonnyro> Sawbones: is there a Rakefile in the folder you are in?
<centrx> yoshie902a, Why not store it has a hash then?
<yoshie902a> centrx: ^
<apeiros> yoshie902a: and what stops you?
<Sawbones> no there is no rake file
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jonnyro> Sawbones: when I unpacked the download, i recieved a folder with much *.rb files and one Rakefile
<yoshie902a> apeiros: Value_at is not a method for a custom method.
<DFieldFL> RubyPanther: How do you specify a source in a gemspec?
mkevin has joined #ruby
mlpinit has joined #ruby
<yoshie902a> I guessI could convert it to a hash
<Sawbones> Oh I see it Rakefile
<apeiros> yoshie902a: so go and define it
<Sawbones> still says there is no rake file though
<RubyPanther> DFieldFL: You don't, because you don't install from there. You only calculate dependencies from there.
<apeiros> that's the point of defining your own classes - that you add the methods to it which you want
<jonnyro> type this, rake --version
<jonnyro> give me the number back
<RubyPanther> Those dependencies are assumed to be public, released gems
<jonnyro> You willthen need to do "rake gen"
simoz118 has quit [Ping timeout: 272 seconds]
skaflem has quit [Quit: Leaving]
<Sawbones> 10.1.0
<jonnyro> Sawbones: same as i have
<jonnyro> Sawbones: type: rake gen
<DFieldFL> RubyPanther: interesting. So no way can you use a private gem?
<havenwood> I have 10.1.1, live in the *now*, man.
<apeiros> havenwood, the now-man
<DFieldFL> RubyPanther: via a .gemspec..
<RubyPanther> DFieldFL: You can use one, you just can't list it in the repo metadata as a dep unless it is also going to be in the repo. Nothing is loaded from that, it is just for repo management
<yoshie902a> apeiros: .send was preventing me, but now I'm in better shape. but I also did not want to reinvent the wheel if it already existed
<apeiros> special powers: lives in the now!
baschtmobil has quit [Ping timeout: 252 seconds]
<havenwood> man now: No manual entry for now
tharindu has quit [Ping timeout: 260 seconds]
<Sawbones> Oh I figured it out
<Sawbones> sweet
<apeiros> man live: No manual entry for live
<Sawbones> Thanks :D
<DFieldFL> RubyPanther: Thanks for the clarification
<jonnyro> Sawbones: no worries, and now for a completely unrelated badass picture http://en.wikipedia.org/wiki/File:Aviano_bomb_suit.jpg
<DFieldFL> RubyPanther: jumping into chef and there are a lot of things to learn before I start messing with chef
<RubyPanther> DFieldFL: When people are actually installing it, they should be using the Gemfile so it doesn't matter if those deps are left out of the gemspec
mrnugget has quit [Quit: mrnugget]
<Sawbones> Caption for that should be, "About to write a C++ program"
gtc|ghost has quit [Remote host closed the connection]
timonv has joined #ruby
<RubyPanther> Unless it is a library, then it has to be able to work that way
<yoshie902a> centrx: thanks for the help
<jonnyro> Sawbones: haha, i like to read it as, I have been hired to a new job, and given a bunch of legacy C++ code
<DFieldFL> RubyPanther: so really what is the .gemspec for?
<DFieldFL> RubyPanther: just to define meta data?
<yoshie902a> can someone help me understand what this is doing http://pastie.org/8621720 ?
fijimunkii has quit [Ping timeout: 260 seconds]
asteros has quit [Quit: asteros]
<yoshie902a> it's the value_at? method for hashs
craigp has quit [Remote host closed the connection]
ikawnoclast has joined #ruby
<RubyPanther> DFieldFL: The gemspec is to the support building the actual gem file (a type of zip) before pushing it to rubygems
teddyp1cker has quit []
craigp has joined #ruby
<shevy> DFieldFL a .gemspec file is also valid ruby so you can write into it all you want to
<centrx> yoshie902a, An array is created (rb_ary_new2). For each of the values passed to values_at (numbering argc), the value is retrieved from the hash (rb_hash_aref) and then pushed onto the new array (rb_ary_push). New array is returned.
<rankine> I'm having trouble what's being passed in as an argument in the following line: User.find_for_database_authentication(:login=>params[:user_login][:login])
Astralum has joined #ruby
<rankine> some sort of hash?
m8 has quit [Quit: Sto andando via]
<shevy> rankine yes
mkevin has quit [Quit: mkevin]
<shevy> rankine you need to try and understand how the parser sees it
rootshift has joined #ruby
<workmad3> rankine: exactly a hash
gtc has joined #ruby
<shevy> the {} can be omitted sometimes for a hash
<havenwood> a naked hash
<workmad3> rankine: just the interpreter allows you to drop the {} around a hash when it's the last argument in the parameter list
<rankine> the params is confusing though, is the params receiving the [:user_login]?
<shevy> a sexy hash
<shevy> that is not confusing, that is clearly a hash
<workmad3> rankine: no, arguments are fully evaluated before the method is called
<shevy> one symbol key is :user_login and apparently it returns another hash, so you have a hash inside a hash there
fire has quit [Quit: WeeChat 0.4.1]
ctp has joined #ruby
<shevy> this will probably return a string
<workmad3> rankine: so 'params[:user_login][:login]' is evaluated, which means that params[:user_login] is evaluated and a value retrieved, then the [:login] value is retrieved from that before being passed to the method
Bira has quit [Remote host closed the connection]
capicue has quit [Quit: Leaving...]
nettoweb has quit [Quit: nettoweb]
craigp has quit [Ping timeout: 252 seconds]
<apeiros> yoshie902a: http://pastie.org/8621744
nettoweb has joined #ruby
<apeiros> the upper is the C code translated relatively closely to ruby. the lower is what it does in idiomatic ruby.
<DFieldFL> RubyPanther: So why do people exclusively use Gemfiles and then others use .gemspec and put nothing in the Gemfile except a reference to the .gemspec
<apeiros> ruby doesn't have for(init; cond; update), so I had to replace that
<workmad3> DFieldFL: if you're writing a gem, you need a gemspec
sassamo has quit [Remote host closed the connection]
<workmad3> DFieldFL: if you're writing an application, you don't need a gemspec and the Gemfile becomes the file to provision your application with requirements
<rankine> once the [:login] value is retrieved from params[:user_login] it is used to retreieve a value from :login?
<apeiros> DFieldFL: to be honest, I have no idea why anybody uses a Gemfile for gem development.
sassamo has joined #ruby
<RubyPanther> DFieldFL: One is build time, one is user install time (for apps)
<yoshie902a> centrx: you summary helps a lot.
<RubyPanther> Gemfile is new, because bundler is new
<yoshie902a> apeiros: you code clarify's it even more!
<yoshie902a> thank you both!
<workmad3> apeiros: stable gem environment when developing?
<apeiros> workmad3: development dependencies in .gemspec?
<RubyPanther> In the old days, we didn't have that tool. We just had a gemspec and if your deps were not the published version, it was just documented and you had to install them from the right places in the right order, and hope your deps didn't ask for conflicting versions
unixpro1970 has joined #ruby
<workmad3> apeiros: doesn't stabilise your transitive dependencies
unixpro1970 has quit [Max SendQ exceeded]
<apeiros> k, I guess my gems rarely have real dependencies
<RubyPanther> If they had thought of bundler in the 90s, we'd have a single unified tool
nettoweb has quit [Client Quit]
<apeiros> RubyPanther: coming. ruby 2.2 unifies bundler and gems
<jailbot> how do you share code?
<apeiros> jailbot: github.com
<RubyPanther> apeiros: lol <3 <3 <3
<DFieldFL> workmad3: the example given by rubygems.org talks about jekyll: https://github.com/jekyll/jekyll and it has runtime and dev dependencies in the .gemspec file
sassamo has quit [Read error: Operation timed out]
CpuID has joined #ruby
kung has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<RubyPanther> gemspec doesn't load anything, so it is at best user install time, not runtime. The Gemfile is for both user install time, and runtime loading
alekst has quit [Quit: Leaving...]
mengu__ has joined #ruby
<RubyPanther> but you still have a gemspec to build the gem when you publish versions
jcrocetta has left #ruby [#ruby]
momomomomo has joined #ruby
craigp has joined #ruby
mereghost has quit [Quit: EADDR]
chinkung has quit [Ping timeout: 272 seconds]
asteros has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
craigp has quit [Client Quit]
<nfk> is there any web framework of sorts in ruby that generates static html?
dukz has joined #ruby
craigp has joined #ruby
mengu has quit [Ping timeout: 265 seconds]
<jailbot> ok can you look at my problem now?
<DFieldFL> jumping from python to ruby is stabbing yourself repeatedly
<nfk> I do not fancy using a whole webserver and stuff won't even get updated after i'm done with writing
<jailbot> let git sync
<RubyPanther> DFieldFL: Especially if you start the wrong end ;)
dukz has quit [Client Quit]
<DFieldFL> RubyPather: any suggestions
<DFieldFL> RubyPanther: I feel like i am def going the wrong direction
<jailbot> look at the switch statement in the "search" function
havenwood has quit [Remote host closed the connection]
<RubyPanther> Usually people come from Perl, Java, or PHP, so they stab themselves less
<shevy> nfk hmm dont think so but you could always do so from the commandline, just let lynx output the html, and save it locally. that can be done in ruby as well
cbetta is now known as cbetta_afk
alexfreidah has joined #ruby
<DFieldFL> I have 4 years of Java background before python
havenwood has joined #ruby
<DFieldFL> If that helps any
cbetta_afk is now known as cbetta
<nfk> shevy, incredibly i managed to find something myself, i think
<RubyPanther> DFieldFL: I dunno what you're doing, but normally you don't mess with publishing gems until somewhat later after you've fully jumped
<nfk> assuming if i correctly understand what jekyll does
<nfk> i'm currently having a closer look at it
<DFieldFL> I am not publishing anything...which is that crazy part
<centrx> DFieldFL, Then don't make a gem :)
<DFieldFL> berkshelf is comparing things I am un aware up
timonv has quit [Remote host closed the connection]
<RubyPanther> DFieldFL: Right, so the crazy part is asking about gemspec which is a build file :P
<YOURBESTFRIEND> >> puts self.class
<YOURBESTFRIEND> busy bot
<DFieldFL> RubyPanther: http://berkshelf.com/#the_berksfile
<YOURBESTFRIEND> not answering
<jailbot> anyone want to help me :)
<agent_white> jailbot: NOPE
<RubyPanther> bundler and the Gemspec is all you look at unless you're publishing
<agent_white> ;)
<jailbot> :(
<jailbot> I would appreciate it haha
<agent_white> jailbot: Don't ask to ask, just ask.
<agent_white> ;)
<nfk> shevy, also i think you missed what i asked, i didn't want to save RoR output
<YOURBESTFRIEND> !ask
<jailbot> its hard with all the chatter
<YOURBESTFRIEND> where's the goddamn bot?
<centrx> jailbot, What's up
<jailbot> look at case 3 in the "search" function
<DFieldFL> RubyPanther: the berkshelf is explaining things which I don't understand and comparing them to a Gemfile and a .gemspec
Hanmac1 has joined #ruby
<jailbot> the first loop works
<centrx> jailbot, Okay
<jailbot> the second one doesnt remove any items
mojjojo has joined #ruby
<jailbot> and the 3rd loop removes the keys
<jailbot> anyone know what im doing wrong?
bentonrr has joined #ruby
<yoshie902a> apeiros: I modified it like this, http://pastie.org/8621777 it seems to work, but if you have any comments for improvement, please let me know.
<DFieldFL> something that is wrong with me...confused
sambao21 has quit [Ping timeout: 252 seconds]
<RubyPanther> DFieldFL: I'm entirely mystified as to the purpose
Wolland has quit [Remote host closed the connection]
Mars has joined #ruby
<DFieldFL> RubyPanther: why they made the comparison?
alexfreidah has quit [Ping timeout: 246 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
<RubyPanther> DFieldFL: Right, it creates a whole bundler copy with the names of everything changed, for some WTF-type reason
<shevy> nfk I never wrote RoR output so why do you assume I did?
Mars is now known as Guest81710
<apeiros> yoshie902a: I'd use the idiomatic code, not the direct C translation ;-)
Hanmac has quit [Ping timeout: 248 seconds]
havenwood has quit [Ping timeout: 276 seconds]
<nfk> isn't lynx a very basic http browser?
<apeiros> also you omitted the * (splat)
<RubyPanther> It looks to me like they could have just used a database, and have object relations instead of their "recipe dependencies"
<jailbot> the commends are a bit confusing
<jailbot> comments
<centrx> jailbot, And you want it to do what?
toastynerd has quit []
<jailbot> "input: " is actually input to the loop
gregoriokusowski has joined #ruby
<DFieldFL> RubyPanther: yeah they just added an extra layer that appears to be blah
<jailbot> I want to remove words from the "answer" array
<jailbot> so the first loop tests the first letter
<apeiros> yoshie902a: just `def values_at(*fields); fields.map { |field| public_send(field) }; end`
ctp has quit [Quit: Linkinus - http://linkinus.com]
<jailbot> hense "dict[0]"
<shevy> nfk yeah but you can do what lynx does in ruby as well. Somehow with open-uri
mmcdaris has joined #ruby
<jailbot> the second loop tests the second letter "dict[1]"
<shevy> lynx -dump
<jailbot> only two should match
<shevy> lynx -source
<centrx> jailbot, You want it to delete only if they do NOT match?
<jailbot> the first loop returns ["her", "hfa", "hld"]
<jailbot> yeah
<shevy> lynx -source http://localhost/foo/bar.cgi > test.html
<jailbot> it should be like a filter
<jailbot> filter down through each letter
bentonrr has quit [Remote host closed the connection]
krawchyk has quit []
<Sawbones> Man I wish there was something a little more straight forward if you don't know ruby at all
<jailbot> case 3 means we are testing 3 letter words
<jailbot> me?
`petey` has quit [Remote host closed the connection]
<jailbot> yeah i'm just playing around
<centrx> jailbot, Let's see here. I am going to save the file and run it and see what happens
<jailbot> ok
<centrx> jailbot, I am stealing your code
var1 has joined #ruby
<jailbot> :0
<jailbot> outrageous!
mmcdaris has left #ruby [#ruby]
Sawbones has quit []
<jailbot> thanks :)
fijimunkii has joined #ruby
<centrx> We are going to be the next AT&T
sambao21_ has joined #ruby
<jailbot> lolol
burlyscudd has joined #ruby
<nfk> shevy, the point i want to generate HTML not dump it
<agent_white> Lawdy... note to self: in linux everything is a file, directories included.
<nfk> anywya, it looks like jekyll is what i was looking
<nfk> sorry for bothering you
<nfk> agent_white, except network inferfaces
<nfk> and maybe some other stuff
<jonnyro> The splat operator is so unusual
jonnyro is now known as JonnyRo
<jailbot> ill write better comments
clamstar has joined #ruby
ndrei has joined #ruby
<nfk> also i bet poettering is doing its best to fuck that up too
<nfk> *his
ffranz has quit [Ping timeout: 272 seconds]
andynu has quit [Ping timeout: 272 seconds]
<agent_white> nfk: Ooo... I'll need to look into that. Been planning on doing a dive into file descriptors and such. :P
andynu has joined #ruby
<centrx> jailbot, Okay, so the select! method is expecting its block to return a true/false value
monkegjinni has quit [Remote host closed the connection]
<jailbot> yeah
yalue has quit [Quit: Leaving]
<jailbot> the loop inside that screws it up?
<centrx> jailbot, But instead it is returning whatever the each does
<jailbot> wut
<jailbot> haha
<centrx> jailbot, Yes, each does not return true/false, at least not when you want it to
fijimunkii has quit [Ping timeout: 245 seconds]
<Hanmac1> JonnyRo: did you know about the double-splat operator? ;P
<jailbot> huh
<jailbot> so the inside block is messing it up
<centrx> Yes
<nfk> i forgot, wasn't gem supposed to install stuff to the local not system gem location?
<jailbot> it works in the bottom method
cbetta is now known as cbetta_afk
<jailbot> three_letters
<jailbot> which is weird
burlyscudd has quit [Ping timeout: 276 seconds]
<jailbot> better comments for errors
<jailbot> or for people interested
<jailbot> well do you have a quick answer?
<jailbot> because i've kinda got to go now :(
jdguzman has quit [Quit: Textual IRC Client: www.textualapp.com]
prc has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<centrx> jailbot, The bottom method has each on the outside block and select on the inside block
<MrZYX> use all? or any? instead of each, depending on what you need
<centrx> or bottom loop I think you mean
kcombs has quit [Remote host closed the connection]
<nfk> oh it was bundler that put stuff in local folder
yoshie902a has joined #ruby
rankine has quit [Quit: Leaving]
zipper has joined #ruby
`petey` has joined #ruby
pwh has quit []
ganesh has joined #ruby
Bira has joined #ruby
yekta has quit [Quit: yekta]
lorelei_ has quit [Ping timeout: 272 seconds]
ganesh is now known as Guest19684
<jailbot> thanks for your help centrx
<jailbot> ill be back later
Czupa has quit [Ping timeout: 265 seconds]
jailbot has quit []
RaCx has quit [Quit: Computer has gone to sleep.]
<centrx> I look forward to it
vlad_starkov has quit [Ping timeout: 252 seconds]
rubyracer has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: Quitting]
Dwarf has joined #ruby
<yoshie902a> apeiros: new and improved.. http://pastie.org/8621824 look good?
clamstar has quit [Quit: Computer has gone to sleep.]
Bira has quit [Ping timeout: 265 seconds]
sassamo has joined #ruby
deception has quit [Remote host closed the connection]
S0da has joined #ruby
<yoshie902a> apeiros: oops, sorry, I just noticed your post above with the same code. except you used public, which I assume is a safer way to do it
shadoi has quit [Quit: Leaving.]
<Wixy> how do you set the default module so you don't have to write Foo::Bar::... every time?
yfeldblum has joined #ruby
raja has quit [Ping timeout: 272 seconds]
phantasm66 has quit [Quit: *poof*]
Astralum has quit [Read error: Connection reset by peer]
<MrZYX> there's no such thing
yfeldblum has quit [Read error: Connection reset by peer]
Kricir has quit [Read error: No route to host]
yfeldblum has joined #ruby
Asher has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 246 seconds]
<MrZYX> if you're talking about toplevel code, you can use include to mix the module into the main object
<yoshie902a> Wixy: redefine your namespace
timonv has joined #ruby
Asher has joined #ruby
fijimunkii has joined #ruby
<yoshie902a> apeiros: Thank you for all your help!
larissa has joined #ruby
gccv has joined #ruby
gccv has left #ruby [#ruby]
Wolland has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<Wixy> redefine my namespace?
<Wixy> what do you mean?
<MrZYX> yeah, what do you mean?
Guest32439 has quit [Quit: Peace]
<centrx> what?
bilbo_swaggins has joined #ruby
`petey` has quit [Remote host closed the connection]
burlyscudd has joined #ruby
`petey` has joined #ruby
juarlex has joined #ruby
<yoshie902a> more along the lines of MrZYX , use an include, to quote Stackoverflow… "Look if you have to reference the constant in namespace A::B::C::D may you have wrong design of you system? The goal of OOP usually to keep data & methods as closer as possible."
Advocation has quit [Quit: Advocation]
<MrZYX> that's not "redefining the namespace" at all
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
<MrZYX> include is a type of inheritance, you augment the current self (ruby has one even at the top level)
gomix has joined #ruby
fedez77 has quit [Ping timeout: 252 seconds]
<yoshie902a> MrZYX: well, better organizing than?
ambushsabre has joined #ruby
<yoshie902a> MrZYX: I some not great at expressing my self here, don't always have the best jargon.
<yoshie902a> some=am
tharindu has joined #ruby
andynu has quit [Quit: Lost terminal]
<MrZYX> if you do an include the current namespace stays the same (it's Object btw)
pehlert has joined #ruby
timonv has quit [Remote host closed the connection]
`petey` has quit [Ping timeout: 252 seconds]
RaCx has joined #ruby
megus has joined #ruby
pehlert has quit [Read error: Operation timed out]
<Wixy> it's a lib, I can't change its design
bruno- has joined #ruby
bruno- has quit [Client Quit]
cj3kim has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
DrShoggoth has quit [Remote host closed the connection]
<Wixy> so the idea is to include Foo::Bar
havenwood has joined #ruby
<MrZYX> Another trick can be assigning the module to something
* Hanmac1 changes the design once per week ;P
<MrZYX> it's an object after all
<Wixy> Hanmac1, I meant it's not mine :P
<Wixy> well, I can fork it, but I won't
<MrZYX> so Bar = Foo::Bar; Bar.x == Foo::Bar.x
<shevy> nfk the > will redirect the HTML into a file
Hanmac1 is now known as Hanmac
<wald0> is yard the same formatting of comments (for generate docs from comments) than in rdoc ?
bricker has joined #ruby
unixpro1970 has joined #ruby
lkba has joined #ruby
unixpro1970 has quit [Max SendQ exceeded]
`petey` has joined #ruby
tharindu has quit [Ping timeout: 265 seconds]
ctp has joined #ruby
<nfk> [23:48] <shevy> nfk the > will redirect the HTML into a file // are you doing this on purpose?
raja has joined #ruby
atmosx has joined #ruby
unixpro1970 has joined #ruby
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Ping timeout: 265 seconds]
ubuu has joined #ruby
mark_locklear has quit [Ping timeout: 252 seconds]
razibog has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
momomomomo has quit [Quit: momomomomo]
Astralum has joined #ruby
clamstar has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
rudisimo has quit [Quit: Leaving.]
yfeldblum has joined #ruby
clamstar has quit [Client Quit]
Astralum has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KensoDev has quit [Remote host closed the connection]
<shevy> <nfk> shevy, the point i want to generate HTML not dump it
<shevy> nfk the html is "generated" - you can do whatever you want to with the generated string
<shevy> what else other than a big fat string is html to you anyway nfk?
yfeldblum has quit [Remote host closed the connection]
Xeago_ has joined #ruby
<nfk> stop being stupid
aaronroyer has joined #ruby
<shevy> stop being a noob
starkhalo has joined #ruby
yfeldblu_ has joined #ruby
<nfk> i would explain but since i know you have been IRC'ing for a long time I know you are not a noob and hence you must be a troll so lay off
<apeiros> nfk: stay nice. thanks.
zipper has quit [Ping timeout: 265 seconds]
kpshek has quit []
DeanH has quit [Quit: Textual IRC Client: www.textualapp.com]
zipper has joined #ruby
IceyEC has quit [Quit: IceyEC]
capicue has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
DrShoggoth has joined #ruby
S0da has quit [Read error: Connection reset by peer]
Brolen has quit [Quit: Brolen]
wildroman2 has quit [Read error: Operation timed out]
breakingthings has quit []
S0da has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kpshek has joined #ruby
sassamo has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
thomasvs has quit [Read error: Operation timed out]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
<wald0> what means the syntax: rescue => e ?
<MrZYX> catch all (I think Runtime)Exceptions and assign it to e
cmedeiros has quit [Ping timeout: 272 seconds]
<apeiros> gaaah!
<apeiros> NOT catch
<apeiros> rescue
phansch has quit [Quit: Leaving]
<MrZYX> :P
Liquid-- has joined #ruby
<MrZYX> had to do java all the semester, sorry :(
<apeiros> wald0: when code above the rescue raises an exception, execution jumps to the rescue
fijimunkii has quit [Ping timeout: 272 seconds]
<Hanmac> "everyone saved, no survivors"
ikawnoclast has quit [Quit: Leaving.]
<apeiros> rescue => e is equivalent to rescue StandardError => e, meaning it rescues all exceptions of type StandardError (or descendants thereof)
sethen has quit [Ping timeout: 260 seconds]
DFieldFL has quit [Quit: DFieldFL]
Brolen has joined #ruby
dankest has joined #ruby
<nfk> Hanmac, my favourite is pokemon code "gotta catch them all"
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
<Hanmac> nfk did you see the recent specials of DoctorWho? there are many Quotable Lines inside
wildroman2 has joined #ruby
zigomir has quit [Remote host closed the connection]
codezomb has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<yoshie902a> Since we started talking about includes and namespacing, I thought I'd play around with them. Any idea what I'm doing wrong. (the answer is usually a lot! haha) http://pastie.org/8621957
sassamo has quit [Remote host closed the connection]
<nfk> no, i have never seen a single episode of it
sassamo has joined #ruby
<nfk> wanted to give it a try this x-mas but didn't have time for that
Sid05 has quit [Ping timeout: 272 seconds]
nynex2 has quit [Ping timeout: 260 seconds]
<yoshie902a> updated.. no .rb in the require… http://pastie.org/8621970
failshel_ has joined #ruby
SCommette has quit [Quit: SCommette]
<MrZYX> yoshie902a: you're requiring a file that is not containing the module or you didn't show the whole content of "Security_Export.rb" (we'd name it security_export.rb and require it with require "security_export" btw)
[_aeris_] is now known as _aeris_
Underbyte has quit [Quit: Linkinus - http://linkinus.com]
<wald0> MrZYX: you know both java and ruby? how you compare java besides ruby? today somebody told me how crappy php is, is java so bad too?
mansi has quit [Remote host closed the connection]
mavcunha has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
e62 has joined #ruby
<yoshie902a> MrZYX: updated… http://pastie.org/8621975 I didn't show it all
mehlah has quit [Quit: Leaving...]
<MrZYX> wald0: I mostly hate statically typed languages and I think that java is almost as broken and inconsistent as php, so you might not get a neutral answer here :P
failshell has quit [Ping timeout: 252 seconds]
Liquid-- has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv has joined #ruby
<wald0> apeiros: mmh, the part that i dont understand is more exactly the "=> e" one, what does this mean? it was not for set hashes? i dont see how it works here
failshel_ has quit [Ping timeout: 276 seconds]
<MrZYX> yoshie902a: do you have any output for gem which security_export or do you run ruby with -I. or how do you not get a LoadError on the require?
<wald0> Hanmac: which specials!? there in spain such thing doesn't even exist ://
<bilbo_swaggins> MrZYX: I'm thinking Python for my next language. I considered Haskell and C. I think Python would be practical.
<bilbo_swaggins> How do you find Ruby?
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<MrZYX> bilbo_swaggins: have a functional one in your set yet? I think one should know at least a dynamically typed, a statically typed and a functional language
<bilbo_swaggins> I started with ActionScript
<wald0> is not ruby functional too ?
<MrZYX> so Haskell might be good next choice, python won't give you a too new experience if you already now Ruby IMO
enebo has joined #ruby
<bilbo_swaggins> I considered Haskell, because why not go all the way?
<yoshie902a> MrZYX: I tried to summarize, it's not a gem, it's my own modules I've rewritten and included with an application_help.rb file, that I require in my files.
<bilbo_swaggins> I've heard Python and Ruby are both good to know
<MrZYX> wald0: not strictly, what I mean is one where you have only functions, no objects etc
mansi has quit [Ping timeout: 272 seconds]
_aeris_ is now known as [_aeris_]
<yoshie902a> MrZYX: I'm running it within Textmate, the requires work, its the include that's giving me the problem
mavcunha has joined #ruby
<wald0> mmh, ruby Modules :)
<Hanmac> wald0: last year was the 50th year special from DoctorWho ... and in December was the yearly Christmas special
<MrZYX> yoshie902a: are you then sure that the module is loaded before the class?
Underbyte has joined #ruby
Underbyte has quit [Changing host]
Underbyte has joined #ruby
agjacome has quit [Ping timeout: 272 seconds]
<wald0> Hanmac: iirc there was a movie in the cinemas, it was there something else extra ?
<lastWhisper_> do any of you guys know of any open source testing that needs to be done?
<lastWhisper_> Basically I'd like to contribute my ruby testing skills wherever they're needed
<lastWhisper_> get some github karma and what not
<bilbo_swaggins> could you teach a man to fish?
<yoshie902a> MrZYX: Genius! that was it! I didn't even think of that!
<yoshie902a> MrZYX: Works great now!
timonv has quit [Remote host closed the connection]
<Hanmac> wald0 hm no that was the 50th year one ...
<yoshie902a> MrZYX: Thank you!
<MrZYX> yw
maletor has quit [Quit: Computer has gone to sleep.]
cescalante is now known as ce_afk
guilund has quit []
maletor has joined #ruby
<wald0> Hanmac: mmh, and what is the christmas one exactly?
Brolen has quit [Quit: Brolen]
<wald0> MrZYX: im trying to search info in wikipedia but i dont found it very clear: what is a statically-typed language?
ubuu has quit [Quit: WeeChat 0.4.2]
Valesk has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
kaldrenon has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
workmad3 has joined #ruby
<bilbo_swaggins> wald0: (1/1) would be a different value from (1) in a statically typed language, being typed as, for example, rational and integer, respectively.
<MrZYX> so in ruby a variable doesn't have a type, you can do x = "a string"; x = 5; in a statically typed language you have to declare the type of a variable, String x = "a string"; x = 5 # fails; int x = 5; # fails too
<Hanmac> wald0: the yearly Christmas special ...like each year
Kar- has joined #ruby
<bilbo_swaggins> Ruby lets you add 5 to 4.3, which is not possible in a statically typed language, in the case of C this is because the numbers are represented with a different scheme when the program is compiled
<bilbo_swaggins> 5.0 =/= 5
<bilbo_swaggins> =/= (5/1)
lorelei_ has joined #ruby
<bilbo_swaggins> these are just examples though
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrZYX> well, I wouldn't consider that the main point. For example Java allows "some string"+5; ruby doesn't
<wald0> MrZYX: ah yeah, C :), what you exactly dont like from it? just the extra typing or the generic "much more typing of everything" ?
lorelei_ has quit [Changing host]
lorelei_ has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
clevermatt has joined #ruby
* Hanmac uses C for evil purpose! ;P
Jake232 has quit [Ping timeout: 265 seconds]
<bilbo_swaggins> C programs break harder
<wald0> Hanmac: im living in spain! the biggest third-world country in the world actually, the only thing that I know about dr.who is the 6 season series that i found on internet (and some random movies in torrents)
<Hanmac> your info is outdated ... there are 7 new seasons, and this year in august the 8th is coming
<Hanmac> bilbo_swaggins: but when they do they do it hard ,P
Cephalostrum has joined #ruby
kpshek has quit []
enebo has quit [Quit: enebo]
<bilbo_swaggins> they've been known to explode
<wald0> good to know! :) im actually at the 3º season
CpuID has quit [Quit: This computer has gone to sleep]
freezey has quit [Read error: No route to host]
aaronroyer has quit [Quit: aaronroyer]
<Hanmac> wald0: did you see the episode "Blink" ? ;P
freezey has joined #ruby
contradictioned has quit [Ping timeout: 252 seconds]
Cephalostrum has quit [Read error: Connection reset by peer]
asteros has quit [Quit: asteros]
e62 has quit [Ping timeout: 248 seconds]
bean has joined #ruby
bilbo_swaggins has quit [Quit: bblhaskell]
meatherly has joined #ruby
var1 has left #ruby ["Leaving"]
<wald0> Hanmac: not yet! this one is 10º, i watched today 5º
monkegjinni has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
tylersmith has joined #ruby
phipes has joined #ruby
Bira has joined #ruby
<Hanmac> wald0: the Shakespeare Episode with "Explilamus" ? ;P
atmosx has quit [Quit: Lost in trance]
tharindu has joined #ruby
ambushsabre has quit [Quit: rip]
MindfulMonk has joined #ruby
Bira_ has joined #ruby
tobylane has quit []
contradictioned has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
dmerrick has quit []
<wald0> Hanmac: the one with the witches ? yes :)
claymore has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
tharindu has quit [Read error: Connection reset by peer]
<wald0> i think that if ppl in spain watch dr.who, the society would become a little more smart than what you can see in the streets... there's only things like "honey boo boo" crap
tharindu_ has joined #ruby
<wald0> "mothers: if you love your kids, dont let them to watch television", i should make a tshirt like this :)
mojjojo has quit [Quit: mojjojo]
burlyscudd has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
Bira has quit [Ping timeout: 276 seconds]
e62 has joined #ruby
polaco is now known as polaco_zZz
<wald0> Hanmac: that is good to know, i think that spain is one of the most conformist country's of the world (maybe the biggest one), this is why the country goes so bad here
tharindu_ has quit [Ping timeout: 276 seconds]
<wald0> ppl dont complain, just open bigger their... :-#
<wald0> if ppl would think like me, there were no politicians puting crap, only heads of politicias in the floors
blackmesa has quit [Remote host closed the connection]
asteros has joined #ruby
mojjojo has joined #ruby
e62 has quit [Ping timeout: 252 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monkegjinni has quit [Remote host closed the connection]
cj3kim has joined #ruby
axl_ has quit [Quit: axl_]
<wald0> cut heads :)
relix has joined #ruby
`petey` has quit [Remote host closed the connection]
`petey` has joined #ruby
CpuID has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
`petey` has quit [Read error: Connection reset by peer]
`petey` has joined #ruby
dblessing has quit [Quit: dblessing]
asteros has quit [Ping timeout: 265 seconds]
<shevy> wald0 most politicans are basically just actors these days
makkura is now known as mak|idle
<wald0> un-needed actors like "belen steban", better to cut their heads off :)
<Xeago_> damn
<Xeago_> finally done after a 16 hours shift
<Xeago_> >.<
<shevy> Xeago_ the way to riches is a stony one
zipper has quit [Ping timeout: 260 seconds]
<Hanmac> shevy: i compare them with scarecrows ... most of them has the same inside their head
magoo has joined #ruby
codepython777 has quit [Quit: Leaving.]
<shevy> hey there was once a scary scarecrow movie
albertgrala_ has quit [Quit: Leaving]
zipper has joined #ruby
burlyscudd has quit [Ping timeout: 272 seconds]
<wald0> shevy: protagonist was bush ?
<shevy> nah
<shevy> some guy was murdered in a silo or so, then came back as scarecrow and killed those who killed him
<shevy> something along those lines
<shevy> I was mighty scared at age 8
Cephalostrum has joined #ruby
<wald0> heh :), i miss these scary movies where you -really- feeled scary
<wald0> actually i see all of them just like "plan 9 from outer of space"
<shevy> I know a great way for that
<shevy> be all alone at home, get a large tv screen, sit close to the tv, turn the volume up, make the room very dark
culturelabs_ is now known as culturelabs
tylersmith has quit [Read error: Connection reset by peer]
<wald0> nah, they are simply not the same anymore... when i was kid i was not unable to forget it for 2 weeks, now i can simply go to walk to a dark alone place after to watch the movie like any normal day
<apeiros> wald0: got your question regarding `=> e` answered?
tylersmith has joined #ruby
roolo has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
max96at has quit [Quit: Textual IRC Client: www.textualapp.com]
codepython777 has joined #ruby
r0bby_ has joined #ruby
r0bby_ has quit [Client Quit]
<shevy> wald0 yeah, quality of movies has decreased on average
ambushsabre has joined #ruby
<wald0> apeiros: nah
robbyoconnor has quit [Ping timeout: 252 seconds]
<apeiros> wald0: => e there just means "store the rescued exception in e"
<wald0> shevy: i dont know if was quality or simply us that we dont believe anymore "so easy", i also downloaded "freddy kruegger" movies and they dont look the same lol
<shevy> hehe
<shevy> I liked the first one
<wald0> apeiros: mmh, but is => a hash asignation ?
<shevy> freddy rocked
beneggett has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wald0> shevy: yeah, these ones the best :)
<wald0> was*
Bira_ has quit [Remote host closed the connection]
baschtmobil has joined #ruby
yoshie902a has joined #ruby
cj3kim_ has joined #ruby
<wald0> apeiros: because if it doesn't works as a hash, then i dont understand this syntax (i dont have see this at all in my book)
<apeiros> wald0: in that context, it's unrelated to hashes
mikemar10 has quit [Ping timeout: 245 seconds]
asteros has joined #ruby
benzrf has joined #ruby
<benzrf> sup ruby users
tropicalmug has joined #ruby
<apeiros> yes, hashes use => for key => value, but no, rescue => e has nothing to do with a hash. just "happens" to use the same characters.
lmickh has quit [Remote host closed the connection]
<benzrf> i have been thinking bout a language that I may or may not eventually try fleshing out a little
Jake232 has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
mansi has joined #ruby
klaut has quit [Remote host closed the connection]
tropicalmug has quit [Client Quit]
MrThePlague has quit []
cj3kim has quit [Ping timeout: 248 seconds]
<wald0> benzrf: fleshing?
<benzrf> making more concrete, filling in
<benzrf> idiomatic
<wald0> apeiros: mmh, so im trying to understand "how ruby parses code/syntax", do you know what is exactly this => here ? i think that i have today correctly understood the use of = in a method
<wald0> like for "def addme=(value)"
<apeiros> wald0: it's just a token
* wald0 wonders now what is a token
<apeiros> it's `rescue[ ExceptionClass[, ExceptionClass]*][=> assignee]
<apeiros> `
spider-mario has quit [Remote host closed the connection]
<benzrf> wald0: a token is a predefined word or symbol that the lexer recognizes
<benzrf> i think
Guest19684 has quit [Quit: Konversation terminated!]
<wald0> mmh
<apeiros> wald0: "end" is a token, "class" is a token
<benzrf> & is a token
<apeiros> this token happens to be "=>"
<benzrf> so is =>
<benzrf> wald0: => is given different meaning depending on where it is used
<wald0> i have see the other day something that i dont understood too, it was "->(*_)" or similar
nanoyak has joined #ruby
<apeiros> `->(args) { code }` is another way to write `lambda { |args| code }`
<wald0> apeiros: ah ok so its simply a part of the ruby syntax language "itself", not something defined to be on that way from its classes/methods/whatever (ruby code) ?
<centrx> "Token" comes from the Old English "tacen" for "sign, symbol, evidence"
asteros has quit [Ping timeout: 265 seconds]
<apeiros> wald0: yes, it's predefined
<apeiros> fixed
Wolland has quit [Remote host closed the connection]
<wald0> apeiros: but only for rescue, right?
parduse has quit [Ping timeout: 246 seconds]
<apeiros> yes
<wald0> good...
* wald0 needs to read about lambda too
sambao21_ has quit [Quit: Computer has gone to sleep.]
<wald0> shevy: how it is going your tutorial?
Wolland has joined #ruby
<Hanmac> benzrf: are you sure that & is a "token" and not a method?
<Xeago_> that stabby winking lambda with 1 eye thing you saw
<Xeago_> is gross
<Xeago_> ugly and not recommended :)
Xeago_ is now known as Xeago
pushpak has quit [Quit: Linkinus - http://linkinus.com]
dankest has quit [Quit: dankest]
Kar- has quit [Ping timeout: 265 seconds]
<shevy> wald0 I need to make the first iteration which will take some days
<wald0> Xeago: but i think that i need to understand the meaning of ->(*_) for use FFI
<apeiros> Hanmac: I'd say e.g. in def foo(&bar), the & is a token
* wald0 is a novice of ruby and wants to use FFI with C libraries
<shevy> wald0 I'll eventually turn it into a gem
wildroman2 has quit [Remote host closed the connection]
blackmesa has joined #ruby
<wald0> shevy: iteration? what is exactly the idea with the tutorial? something interactive like "type something; good!, now.."
<wald0> ?
mrsolo has joined #ruby
<Hanmac> wald0: i was interested in FFI too, but then i found its better to write the extensions in C(++) so you can add extra layers between them (for sample when i connect c++ objects with ruby objects i can force the ruby object to stay alive as long as the c++ object lives
mrsolo has quit [Remote host closed the connection]
<shevy> wald0 I have tried to pile up some things and have a massive local knowledge base, way too much to turn it into a single project. so I first need to see what is useful and what is not and only put the useful things into it
sambao21 has joined #ruby
SCommette has joined #ruby
h4mz1d has quit [Ping timeout: 272 seconds]
<wald0> Hanmac: mmh, that depends on the api I assume? what im going to use is a C api which runs in a "event based loop" so if im not wrong, objects are simply alive until you remove them?
<wald0> well, that FFI is already made, (gem: ruby-efl)
codepython777 has quit [Quit: Leaving.]
<wald0> shevy: and what is the tutorial about? to learn ruby? which level?
Beoran__ has joined #ruby
kevind_ has joined #ruby
dankest has joined #ruby
SCommette has quit [Client Quit]
`petey` has quit [Remote host closed the connection]
mr_red has quit [Quit: Bye :)]
w4pm has joined #ruby
SCommette has joined #ruby
mr_red has joined #ruby
claymore has quit [Quit: Leaving]
<Hanmac> wald0: like for sample for libarchive ... there was a FFI gem that uses the API of libarchive but thought it was not cool enough so i write my own api around it in C++ (hm i need to update that lib if i had time)
jedimind has quit [Disconnected by services]
parduse has joined #ruby
yedimind has joined #ruby
apeiros has quit [Remote host closed the connection]
orphanboyk has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
Beoran_ has quit [Ping timeout: 264 seconds]
codepython777 has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
<tt1187> Hi, is ruby-forum a place where a beginner can ask question, or is it mainly for more advanced questions only?
<shevy> wald0 to learn ruby, at a slightly wider topic than chris pine's tutorial
orphanboyk has quit [Client Quit]
<wald0> Hanmac: what you think about this way? (this way FFI is used/coded, see synopsis example) https://github.com/jeremyz/ffi-efl#synopsis
<shevy> tt1187 the forum is without restrictions. if you have a question related to ruby, it fits there
kevind__ has quit [Ping timeout: 265 seconds]
shime has quit [Ping timeout: 252 seconds]
<tt1187> kk thanks
SCommette has quit [Client Quit]
Megtastique has quit []
<wald0> shevy: which way? html doc, plain text, book, interactive ?
terrellt has quit [Ping timeout: 265 seconds]
robonerd has joined #ruby
<robonerd> fastest language to rapid prototype web apps? (i like ruby but i also prefer static typing or at least an 'opt in' static typing support)
<shevy> wald0 nah, standalone running .rb file. the gem download will detail how to start it from the commandline as well. interactive format would be fun though, like an adventure book :D
<shevy> wald0 ask back in 5 months perhaps ;P
<benzrf> robonerd: haskell is the shit
<benzrf> robonerd: but probably not for rapidly prototyping web apps
<wald0> shevy: this is the best way to learn :), like a game!
tvw has quit []
<Hanmac> wald0: the "title_set title" methods are not ruby like enough i would prefer "self.title= title" ... but for ffi code its not bad
Guest81710 has quit [Remote host closed the connection]
v10energy has joined #ruby
asteros has joined #ruby
<v10energy> is there some kinda gem or method to check balance of a certain cryptocoin wallet?
<krainboltgreene> "not ruby like" :P
<benzrf> hmmm, i wonder if you could create a REPL-based text adventure that is operated by typing in ruby code
phipes has quit [Remote host closed the connection]
<benzrf> i.e. self.go :south
<wald0> Hanmac: well, the fact is that the method names comes from a giant framework of C libs api, tehse names are shortcuts (automatically generated) of things like: evas_window_title_set, removing the extra thing (a big work to do for 480 parsed .h header files of api's)
cj3kim_ has quit [Ping timeout: 276 seconds]
<benzrf> puts self.current_room.description
<benzrf> puzzles could be code based :-D
<shevy> benzrf go make a MUD in ruby
e62 has joined #ruby
<wald0> Hanmac: but yeah, this is a good suggestion, maybe they can be improved to work more in that way manually adding them :)
<benzrf> shevy: mehh
<shevy> and then
<shevy> turn it into a gem
<shevy> :D
emocakes has joined #ruby
<wald0> this is a demo video Hanmac ^
<shevy> ladies and gentleman
<shevy> the ultimate GUI battle is taking place
<wald0> :]
juarlex has quit [Remote host closed the connection]
robonerd has left #ruby ["..."]
nateberkopec has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
<shevy> it's Hanmac "old school dinosaur" wxwidgets vs. wald0s ultranew enlightenment bindings
<Hanmac> wald0: you can look at MY evil code there: https://github.com/Hanmac/rwx (beware there might be macros inside ;P )
<wald0> shevy: there's not any other better one! lol
jlast has quit [Remote host closed the connection]
drumusician has joined #ruby
<Hanmac> shevy you only want me to write my own enlightment bindings right? ;P
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac1 has joined #ruby
blarghmatey has joined #ruby
Targen has quit [Read error: Operation timed out]
ferr has joined #ruby
dorei has joined #ruby
Mars has joined #ruby
<wald0> ah, it uses "main_loop" too
Mars is now known as Guest1890
burlyscudd has quit [Ping timeout: 272 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
kevind_ has quit [Quit: kevind_]
ismith has joined #ruby
pehlert has joined #ruby
Jetchisel has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mary5030 has quit [Ping timeout: 248 seconds]
Valesk has quit [Quit: Textual IRC Client: www.textualapp.com]
tharindu has joined #ruby
tannerburson has quit [Quit: tannerburson]
meatherly has quit [Remote host closed the connection]
Brando753 has quit [Read error: Connection reset by peer]
Guest1890 has quit [Remote host closed the connection]
w1xz has quit [Quit: ZZZzzz…]
pehlert has quit [Ping timeout: 246 seconds]
Brando753 has joined #ruby
nide has joined #ruby
freezey_ has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
workmad3 has quit [Ping timeout: 246 seconds]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freezey has quit [Read error: Operation timed out]
mansi has quit [Remote host closed the connection]
tharindu has quit [Ping timeout: 265 seconds]
pel_daniel has left #ruby [#ruby]
<wald0> is there any good documentation (maybe in a book) with examples about "dynamic code execution" ? what im reading in teh book "begining ruby" about it is very hard to understand
dankest has quit [Quit: dankest]
ocline` has joined #ruby
freezey_ has quit [Ping timeout: 272 seconds]
platzhirsch has quit [Ping timeout: 265 seconds]
platzhirsch has joined #ruby
[_aeris_] is now known as _aeris_
ocline has quit [Ping timeout: 246 seconds]
tropicalmug has joined #ruby