« Back to channel list

#ruby - 30 December 2014

« Back 1 day Forward 1 day »
[00:11:31] diegoviola: " Ruby is just not attracting the attention and crowdfare it used to. Engine Yard used to be Ruby only (and supported JRuby and Rubinus ...) and has since added more languages as Ruby is not the beginning nor the end. That isn't saying Ruby is dying; just there is competition and sometimes it's hard to compete."
[00:11:34] diegoviola: what do you say to that?
[00:12:16] shevy: diegoviola that in the end people will use what can deliver value to them
[00:16:27] shevy: ruby isn't sufficiently kick-ass
[00:19:06] apeiros_: diegoviola: are you on a soul search or something?
[00:19:23] diegoviola: soul search? what's that?
[00:20:29] apeiros_: so what's the point of your recent set of questions?
[00:21:04] diegoviola: apeiros_: just confused as to why people say that a language is "dying"
[00:21:08] diegoviola: apeiros_: I'm confused about this
[00:21:36] apeiros_: and you think things will clear up by pointing at articles and asking "what do you say to that?"?
[00:23:38] diegoviola: I was looking for a response that makes sense, so far nobody said anything that makes snse
[00:23:48] waxjar: the amount of people in this channel alone is enough to refute the statement "ruby is dying" imo
[00:24:06] apeiros_: diegoviola: you're saying in all of the questions you asked, nobody said something which made sense?
[00:24:20] apeiros_: because you and me both know this is not your first question???
[00:24:32] diegoviola: apeiros_: ok sorry if it bother you then
[00:24:45] apeiros_: no, I'm interested. I want to know.
[00:25:31] diegoviola: apeiros_: I understand some people would think "ruby is dying" because they think commercial usage/interest has decreased
[00:25:42] diegoviola: apeiros_: but commercial interest isn't everything in my opinion
[00:26:09] diegoviola: apeiros_: I don't understand why people judge a language solely on commercial usage or interest
[00:26:26] diegoviola: is it because of jobs? and people being paid to write Ruby? well, that makes sense
[00:26:38] diegoviola: but why say a language is dying because of this?
[00:27:14] diegoviola: I shouldn't have said "nobody said anything that made sense", sorry
[00:27:44] waxjar: because other languages now make the headlines on hackernews, reddit, etc? dunno, it's silly
[00:28:13] shevy: diegoviola why do you think that my statement did not make any sense?
[00:28:31] apeiros_: diegoviola: it doesn't seem to me like you are confused
[00:28:32] diegoviola: shevy: I didn't said that, sorry if that's what you got from me
[00:28:40] diegoviola: shevy: english isn't my primary language
[00:28:42] shevy: in your reply to apeiros_ ;)
[00:29:17] shevy: I don't think you will find many companies that want to limit themselves to a single language
[00:29:30] shevy: you not only have a given language to consider but also the extra options provided by add-ons
[00:29:40] shevy: like php is crap but phpbb and mediawiki are good
[00:30:24] shevy: dying is a relative term
[00:30:44] diegoviola: yeah well, sorry for saying "nobody said anything that makes sense", I shouldn't have said this
[00:31:07] shevy: you have more and more people use the internet so they provide more value to all programming languages that rely in one way or the other on the internet
[00:31:21] shevy: and some languages are better than others
[00:31:59] shevy: so from the pool of new developers, they'll pick preferrentially a language that can help them achieve what they desire to quickly
[00:32:10] shevy: and other languages not so much, hence they are "dying"
[00:32:21] shevy: but they could still be gaining more new devs than losing old devs!
[00:33:11] shevy: the biggest problem of ruby is that people associate it heavily with rails
[00:34:30] shevy: and javascript
[00:36:08] shevy: if you have:
[00:36:14] shevy: module Foo; def self.bar; end; end
[00:36:21] shevy: and you wish to alias to Foo.bar, what would the shortest way be?
[00:37:00] waxjar: from Foo or from somewhere else?
[00:38:06] shevy: hmm either way is ok, I just look for the maximum shortness
[00:38:18] shevy: for regular methods, we have: alias foo bar
[00:38:41] shevy: for class methods... there is this awful class << self syntax... that's like 2x the amount of characters...
[00:39:13] waxjar: from Foo i think opening the singleton class would work (class << self; alias_method :shevy, :bar; end)
[00:40:15] waxjar: if it's just one method, i'd prefer just defining that method though
[00:40:54] shevy: could a new method work? something like... alias_class_method ?
[00:41:32] shevy: so that you could avoid class << self
[00:42:44] diegoviola: apeiros_: the thing is, the only expectation I have is for people to be honest, I don't like FUD and bs, if they seriously think Ruby is dying I want to know the reasons but all I heard from that group is that Ruby isn't being used as much in commercial environments as it was before, if they are using FUD to market their new VM with whatever features they think are cool, I simply would prefer if they just say
[00:42:45] diegoviola: that instead, no need to trash something just to promote their stuff
[00:43:03] apeiros_: shevy: singleton_class.send :alias_method, :baz, :bar
[00:43:48] apeiros_: shevy: or: class Module; def alias_singleton_method(a, b); singleton_class.send :alias_method, a, b; end; end
[00:43:52] shevy: cool... I don't think I saw singleton_class before ... singleton_class # => #<Class:#<Object:0xb8e2b1f8>>
[00:44:05] apeiros_: and then just: class Foo; ???defs???; alias_singleton_method a, b
[00:44:07] bradland: diegoviola: people judge the ???death??? of a programming language by how much they read about it on websites like Hacker News, or how much they hear about it being used at hot startup X. the problem is that these sources represent a very tiny portion of the market.
[00:44:25] bradland: at the end of the day, it doesn???t matter, because these arguments are pointless.
[00:45:09] waxjar: i don't hear much exciting stuff about java but it's far from dead!
[00:46:00] bradland: enterprise procurement app built using RoR: http://www.coupa.com
[00:46:14] bradland: you???ll never hear about it on places like HN, because it???s not sexy and it???s not consumer
[00:46:33] bradland: our app is also in the procurement space, and is built on RoR, but i won???t post a link here because i don???t want to come across as advertising
[00:46:49] bradland: i have no affiliation with the previous example i provided other than having met them when i was in chicago
[00:47:30] shevy: you work for them!!!
[00:48:00] bradland: heh, they???re kind of a competitor to my company :)
[00:48:02] shevy: see diegoviola? it is all about rails and javascript these days :(
[00:48:26] bradland: i???m headed to dinner. have fun convincing anyone that ruby isn???t dead lol
[00:58:50] shevy: is there a way to fetch conditional user input?
[00:59:15] shevy: for instance: by default, read until the user types a newline. but if the first line contains a "'" character, then only stop when you see another "'" character
[01:09:36] edwardloveall: let me find it
[01:10:10] edwardloveall: you can do it, but it starts to get complicated really quickly
[01:11:17] edwardloveall: you could use getch
[01:11:21] edwardloveall: instead of gets
[01:11:32] edwardloveall: put it in a loop and check each character
[01:13:24] edwardloveall: let me know if you need code sample
[01:13:29] edwardloveall: i can try to make one
[01:14:11] shevy: no that seems simple enough
[01:14:19] shevy: loop {} + STDIN.getch
[02:55:36] Ikri: curious, I have some js/node knowledge. I'm wondering if I should jump straight into rails or if I should learn ruby first. what do you guys think?
[02:56:40] shevy: learn ruby, skip rails
[02:56:59] jhass: ^ #ruby answer. Guess the #RubyOnRails answer
[02:57:14] Ikri: why skip rails? isn't it the most popular framework?
[02:57:17] Zekka: Having read code by people who didn't know Ruby but knew Rails, learn Ruby!
[02:57:26] Zekka: (You can always learn Rails after.)
[02:57:31] apeiros_: actually, I've often seen #rubyonrails advise to learn ruby too, not just rails
[02:57:50] Ikri: Zekka: okay, that helps. thanks :)
[02:57:56] shevy: Ikri don't think it is very popular on #ruby; I'd say only about 20 people here are on #rubyonrails or so
[02:58:02] jhass: apeiros_: are you at congress?
[02:58:16] apeiros_: jhass: nope. haven't been to one in ~2y. should really change that.
[02:58:18] Ikri: apeiros_: is it like people who learn jquery but not js?
[02:58:40] Zekka: I actually found Ruby to be pretty hard to get comfortable with (and I'm not that comfortable with it now), knowing Python to begin with -- I know folks who had less trouble but I think it's easy to underestimate how hard the language is to pick up
[02:58:42] Cat_1: Or people who learn Javascript but not Java
[02:58:43] apeiros_: Ikri: I think with jruby/js it's not that bad
[02:58:48] Cat_1: Am I doing it right?
[02:58:50] apeiros_: unless you develop SPAs
[02:59:15] apeiros_: Zekka: maybe you stuck too hard to python idioms
[02:59:24] apeiros_: sometimes a language is easier to learn without baggage
[02:59:50] apeiros_: single page applications. just one of the things you can do which are js heavy
[02:59:57] Zekka: apeiros_: That's probably part of it, but I think the Ruby object model is also a little bit more complex, which meant that some of the hotshot metaprogramming nonsense I tried to do in Python was more difficult in Ruby
[03:00:34] apeiros_: Zekka: ruby's object model is *very* simple
[03:01:46] Zekka: apeiros_: I see a lot of behavior here! http://ruby-doc.org/core-2.2.0/Object.html
[03:01:55] apeiros_: there are a couple of details which are hard. but those usually don't matter.
[03:02:39] Zekka: Granted, a lot of it you don't have to think about all the time
[03:02:43] apeiros_: Zekka: model != behavior. yes, many core classes have a lot of methods.
[03:03:10] apeiros_: it's still better than making stuff global like python does it
[03:05:46] apeiros_: the object model of ruby has 4 elementary parts: 1) all methods are instance methods and modules are their containers (note that Class subclasses Module), 2) everything you can assign to a variable and/or call a method on is an Object (or subclass), 3) Kernel is the place for "global functions"
[03:05:51] apeiros_: wait, what was 4 again?
[03:05:57] apeiros_: it's late, I guess :)
[03:06:18] Zekka: apeiros_: (Following along, I'll talk if you seem to be looking for a response.)
[03:07:05] apeiros_: well, 4 probably should have been the relation between instance <- singleton-class -> class. but I'm almost falling asleep here.
[03:07:27] jhass: ACTION hands apeiros_ a bottle of mate
[03:07:49] apeiros_: jhass: thanks. mate isn't really my thing, though.
[03:08:04] jhass: that just means you hadn't enough of it yet
[03:08:07] Zekka: apeiros_: There's a few things I think you neglect mentioning just by enumerating those tings, although it's possible you might have done given enough time
[03:08:10] jhass: ACTION hands another bottle
[03:08:28] apeiros_: Zekka: there's tons of details. but 99% those don't matter.
[03:08:50] Zekka: apeiros_: How about inheritance in general? You seem to have mostly ignored the semantics of that
[03:08:52] apeiros_: you can e.g. hang yourself with the circular dependency in the root of the object system. but for almost all practical purposes, it doesn't matter.
[03:09:40] Zekka: More generally than that, Ruby seems to implement a lot of useful functionality in terms of smaller units of primitive functionality (don't get me wrong! I think this is the right way to do that) which I think still leaves you a lot to understand even after you understand the relatively small primitive units
[03:10:00] apeiros_: yeah, part of 4. every object has a singleton class for its very own methods. method lookup is: object's singleton class, object's class, then class' ancestors (which contains modules). after that, lookup chain is repeated with method_missing.
[03:10:39] apeiros_: I think the singleton-class part is the hardest to get for most. but that too is usually something you can glance over for as much as a couple of years.
[03:10:47] jhass: Don't forget Module#prepend :P
[03:10:54] jhass: but ignore me ;)
[03:11:17] Zekka: apeiros_: I think you also talk a lot about how objects relate to other objects, but not so much about what objects are
[03:11:58] Zekka: Ruby objects have, from a learner standpoints, a 'this' referencewhich is bound in an unknown way, a classmethod-analogue, an instancemethod-analogue, a classfield-analogue, and an instancefield-analogue
[03:12:27] Zekka: Even knowing that classthings are a case of instancethings (because classes are a case of instances), much of that still falls into understanding the "useful aliasing"
[03:12:55] apeiros_: Zekka: I think you're overcomplicating it.
[03:13:10] Zekka: apeiros_: You think so? Because these are the things that made it hard for me to learn Ruby, and I'm being honest about that
[03:13:29] Zekka: Granted, I think these are also reasons it would be hard to learn Python
[03:13:50] apeiros_: an object is state + callable code. that callable code is physically stored in classes/modules but executed in the context of the object.
[03:14:33] apeiros_: self identifies that context. the rest is part of the state of the object. e.g. its class is self.class
[03:16:05] apeiros_: state of an object is available either through methods, or through instance variables. instance variables belong to a single object. they're associated with `self`. same self = same ivars.
[03:16:23] apeiros_: and self will always be the object you called the method on
[03:16:51] Zekka: apeiros_: But the binding of 'self' introduces a variety of apparent special cases
[03:17:07] apeiros_: Zekka: any of which matter in more than 0.1% of all use cases?
[03:17:10] Zekka: It doesn't, for instance, follow the rules of lexical scoping
[03:17:14] Zekka: apeiros_: They confused me!
[03:17:44] Zekka: I'm not trying to argue "this might confuse someone at some point" but trying to bring up specific things that caught me off-guard
[03:18:05] Zekka: it might be reasonable to call me a poor learner, but it probably wouldn't be reasonable to say that these are frivolous cases that wouldn't occur to anyone
[03:19:33] apeiros_: got an example?
[03:19:46] apeiros_: I mean, one you'd say you still don't understand
[03:20:11] Zekka: apeiros_: Not one that doesn't fall into "weird things witnessed metaprogramming"
[03:20:51] apeiros_: oh, I didn't say rubys object system couldn't be used to build convoluted systems.
[03:21:05] apeiros_: all I say is that rubys object system at its core is relatively simple.
[03:21:10] Zekka: For what it's worth, since I've been drawing a lot of comparisons to learning Python here, I think Python probably has analogous poblems to some of what I'm complaining about
[03:21:28] Zekka: When I'm complaining about how the behavior of the 'self' reference is nonobvious, there's probably a similarly nonobvious behavior in Python
[03:21:53] Zekka: I think that the major difference in this specific case is that Python is super reluctant to break with standard lexical scoping
[03:21:57] apeiros_: and I fully believe you that if you're confronted with real life code and don't get a good explanation, it will seem very complex and opaque
[03:22:26] Zekka: There's probably other cases where it's more willing to break -- so that's a nonobvious difference in language character that you can't really associate with one specific decision
[03:23:14] Zekka: And if you can, a lot of the Ruby cases, like the self rules, will still seem pretty small and insignificant individually. You can more broadly say "Ruby does not care that much about keeping the appearance of lexical scoping", but then you've got a general situation without specific examples
[03:23:20] apeiros_: lids falling here. are you around tomorrow?
[03:23:25] Zekka: (I think that's a fair statement to make, especially when mixins are a major language feature)
[03:23:33] Zekka: apeiros_: Probably
[03:23:36] Zekka: Sorry for keeping you up!
[03:23:53] apeiros_: I shouldn't have stayed up so late to begin with :D
[03:24:05] Zekka: There's something else I actually should be doing but arguing's fun, so I've been doing this
[03:24:40] apeiros_: I'm intrigued to continue. but I really have to sleep. gn8, maybe we can continue tomorrow :)
[03:26:27] ponyofde1th: anyone know how i can set a node variable from inside cookbook ? .set https://bpaste.net/show/e579277311a4 in here does not seem to work. i know its chef but no one in that channel :)
[03:28:24] jhass: try #chef
[03:28:38] ponyofde1th: jhass: tried no one there
[03:29:18] ponyofde1th: jhass: not sure why the domain array is out in read only mode when i try to
[03:56:13] shevy: a lolcat!
[04:11:39] ajacmac: I'm on codecademy, and it isn't clear to me why... over_4_feet = Proc.new { |height| height >= 4 } ...isn't a proc
[04:12:09] sevenseacat: i just love the 'my question is off topic, but theres no one in the right channel so ill ask here instead' mentality
[04:12:09] ajacmac: I did some hunting around, checked ruby monk and a couple other places and didn't get it
[04:12:15] sevenseacat: (that wasnt directed at you ajacmac)
[04:12:34] ajacmac: sevenseacat: ok, I was kinda confused
[04:12:47] sevenseacat: thats why i clarified :)
[04:13:55] ajacmac: so is anyone available to point out (I imagine it's obvious to someone who's more familiar than I am) what I'm doing wrong?
[04:16:13] sevenseacat: what does that Proc.new call return?
[04:16:48] sevenseacat: >> over_4_feet = Proc.new { |height| height >= 4 }
[04:16:49] eval-in__: sevenseacat => #<Proc:0x42124f70@/tmp/execpad-7cdfecd643e4/source-7cdfecd643e4:2> (https://eval.in/238255)
[04:16:52] sevenseacat: seems like a proc
[04:17:38] ajacmac: ok, codecademy is saying it isn't a proc, so I suppose the error is something else and codecademy is confused
[04:18:03] ajacmac: can_ride_1 = group_1.select {&over_4_feet} ...is what's calling it
[04:18:21] sevenseacat: that syntax doesnt look right
[04:18:23] ajacmac: and group_1 is an array of integers
[04:18:36] sevenseacat: should be select(&:over_4_feet) ?
[04:19:32] ajacmac: how does the array actually makes it's way into the process that way though?
[04:19:49] ajacmac: I'm not familiar, I'm just really confused
[04:21:14] ajacmac: https://gist.github.com/anonymous/ab120f19adb7014da68d
[04:21:31] ajacmac: that's the full program, maybe that'll be more helpful than me just giving individual lines
[06:05:05] TheAtomicGoose: why would i be getting undefined method error o this program? http://sprunge.us/POgf
[06:13:46] shevy: TheAtomicGoose this is not good
[06:13:56] shevy: you must always provide the full error - append it in such a pastie
[06:14:15] TheAtomicGoose: shevy: my bad, just a moment
[06:14:20] shevy: this code is simple enough
[06:14:27] shevy: for more complicated code you should give the full error
[06:14:29] shevy: I figured it out
[06:14:31] shevy: (item_length).times do |item|
[06:14:31] shevy: puts item("//title")
[06:14:41] shevy: here you try to call a method called item
[06:14:47] shevy: but you don't have a method
[06:14:50] shevy: called item()
[06:14:58] shevy: instead you have a block variable called item
[06:15:11] TheAtomicGoose: that's what i thought i was calling
[06:16:27] TheAtomicGoose: ohhhh i understand now
[06:24:28] tomengland_mbp: does class initialize methods have to use the instance variable if you're using attr_accessor
[06:27:24] TheAtomicGoose: is there a way to print named links to the console in ruby? e.g. have a link that goes to www.example.com but looks like "Example Website"
[07:10:15] pentanol: hello, someone familar with redmine here?
[08:07:50] fuking: what is the best programming boot camp that someone can go online?
[08:11:32] Godd2: fuking programming in general or for ruby?
[08:11:52] fuking: well, i would like to learn ruby and programming in general
[08:11:55] fuking: ruby sounds fun and hard
[08:12:14] fuking: it's better than writing c i hear and people tell me c is short for crap
[08:12:43] Godd2: haha well you can form your own opinions with time and experience
[08:12:59] Godd2: fuking here, check out this: http://www.codecademy.com/en/tracks/ruby
[08:13:02] Godd2: it's free and good
[08:13:12] fuking: oi, codecademy :(
[08:13:30] Godd2: and just remember, you won't learn programming overnight
[08:13:35] fuking: i think it's boring and too hard to understand
[08:13:58] Godd2: fuking then perhaps programming may not be something you like in general.
[08:14:09] fuking: i'm talking about codecademy
[08:14:22] Godd2: codecademy makes it about as easy and seamless as possible
[08:14:41] fuking: eh, i would like to learn from an actual boot camp
[08:14:47] Godd2: have you tried the ruby track on codecademy? or is your complaint forged from a different language?
[08:15:32] fuking: my complaint is forged from their way of teaching stuff, it's not easy to understand and the examples have lots of errors
[08:16:03] fuking: but i do appreciate their attempt at trying to teach people to code for free :) i just think their implementation sucks
[08:16:12] Godd2: fuking which example in particular?
[08:16:54] fuking: godd2: enough examples that had errors that made me quit and i forget which, just a lot
[08:17:19] Hanmac: my problem is that most "ruby boot camps" only teach rails and not ruby ...
[08:17:30] Godd2: yea but which one? I haven't seen one yet, and I'm wondering which one I could submit a bug report about
[08:22:19] fuking: godd2: i don't remember, but i guess i could start over from codecademy, but i hate that site :(
[08:24:26] cichol: in fact codecademy may be just wasting time, it's better to begin with a real book
[08:28:54] Godd2: fuking if you're more of a visual/auditory learner, then perhaps video tutorials would suit you best
[08:29:13] fuking: do you know of any good online programming boot camps?
[08:29:52] Godd2: no, I try not to spend money on learning, so I don't know many of the ways to learn which require spending money
[09:44:54] ccurtisj: Hey guys! Does anyone know off the top of their head if the Curb gem (curl bindings) is thread safe or not? https://github.com/taf2/curb
[09:53:52] mglAC: Hi everyone. I need to update an application using bundler. But bundle shows unresolvable dependencies ( see https://gist.github.com/mgla/d6e0a006a330644e53a1 ). I can not find out where the money dependency comes from - it is not even installed.
[09:54:52] mglAC: A reverse dependency check on money shows no matching gems.
[09:57:25] mglAC: How do i resolve this problem?
[10:47:01] atmosx: mglAC: I'm not sure if there's a stadnard way to solve this kind of problem, money needs one i18n while rails needs another version.
[10:47:19] atmosx: mglAC: why don't you try change money to a newer version?
[12:23:03] bookies: Hi. I get a url with request.original_url. Example: "http://localhost:3000/p/test?share=true". Then I want to take out the "?share=true". I am thinking that I can do that by always taking out the last 11 characters of the url. However is this a proper way to go about it?
[12:34:01] Hanmac: bookies: hm what do you mean with "take out"? do you want to return or to remove it?
[12:34:49] Hanmac: >> require "uri"; URI("http://localhost:3000/p/test?share=true").query
[12:34:50] eval-in__: Hanmac => "share=true" (https://eval.in/238353)
[12:35:59] bookies: excellent, thank you :)
[13:11:08] ccurtisj: @mglAC Can you post your full Gemfile and Gemfile.lock?
[13:39:45] visof: is there anybody using HTTParty?
[13:41:16] visof: how can i interpret this curl --user admin:admin to HTTParty?
[13:45:03] ccurtisj: @visof here's an example on https://github.com/jnunemaker/httparty/blob/master/examples/delicious.rb
[13:45:57] ccurtisj: @visof do HTTParty.get('http://google.com', basic_auth: {username: 'admin', password: 'admin'})
[14:32:52] wald0: "the c programming language" is a really good book, but there's a ton of bad ones, can anybody suggest me the ones that found to be the best ones to learn better C ?
[14:33:38] apeiros_: wald0: um, ##C?
[14:33:51] Ninjex: learn better c?
[14:33:57] Ninjex: all c is the same c
[14:34:07] wald0: woops, i thought that i was in ##c :) sorry
[14:34:19] apeiros_: wald0: note, their topic links to books
[14:40:29] nateberkopec: Ugh, anyone else having issues w/rubygems right now?
[14:40:41] nateberkopec: stuck on "Fetching source index from https://rubygems.org/"
[14:41:10] crome: it does it quite often nowadays
[14:41:45] nateberkopec: Weird. Bundle update works.
[14:43:08] nateberkopec: Must be an issue with my Gemfile.
[14:59:40] atmosx: wald0: that book is more like a reference than anything else, I've tried a couple of times got bored to death every time.
[14:59:40] atmosx: never actually finished (must be lying somehwere around here...)
[15:00:36] glcheetham: Hi, does anyone know when ruby going to be updated in the trusty repos from 1.9.3, which is now over a year old? I'm slightly concerned because rails 5 will not support ruby versions below 2.2
[15:01:19] crome: glcheetham: stop using system ruby
[15:02:42] crome: take a look at rvm or rbenv, it makes life a lot easier
[15:04:24] glcheetham: crome: I use rvm on my development machine, just so far I haven't really been bothered to look into fitting it into my package maintenance workflow for my servers. I suppose I'll have to start thinking about it soon anyway...
[15:26:29] jrhe: Hi guys, stylistic question here. When would one raise an error vs returning a boolean value? I???m writing a web scraping gem which logs in first. I have a log in method to do this and I???m not sure what a sensible way of indicating login failure is. Logging in doesn???t really return anything useful immediately so its not like theres a user object to return on success.
[15:26:51] shevy: can there be problems with Thread.new { sleep 5; puts 'hi' } ?
[15:26:58] jrhe: have a feeling Avdi Grimm has probably covered this in one of his books but I can???t seem to find it at the moment.
[15:27:07] shevy: I seem to have some thread that does not sleep for 5 seconds but instead for 5 + x seconds... where x seems to be any random number...
[15:27:37] bradland: jrhe: i like to raise exceptions for things i don???t expect, and return values for things that i do expect.
[15:27:58] bradland: are the credentials provided interactively?
[15:28:08] jrhe: bradland: Thats kinda what I usually do but I???m not really sure what to do in this case. They are provided on the command line.
[15:28:25] bradland: then i would not raise an exception, because I expect users to incorrectly key information.
[15:28:28] jrhe: Ninjex: Hard problem to debug using pry no?
[15:29:42] jrhe: bradland: hmm. ok. Thinking about it its more a case of what level I should throw the exception. If the scraper can???t log in its pretty much done so i will have to throw one futher up the call stack anyway
[15:30:34] shevy: jrhe the simplest approach would be to assume that everything fails by default
[15:30:54] bradland: typically what you???d have is a CLI lib that handles user interaction. this is the layer where you???d handle exeptions from the web scraping gem, and offer the ability to retry.
[15:31:54] bradland: so, your web scraper might raise an exception, but the CLI lib would handle it and offer a retry.
[15:33:07] bradland: from a net library (libraries that connect to other services over a network) perspective, most i???ve used raise an exception when the credentials are bad.
[15:33:36] bradland: any interaction from a UI perspective uses a begin/rescue block to capture and retry.
[15:37:08] jrhe: bradland: Cheers :). All clear now
[15:44:39] shevy: does one of you guys know how long pasties will stand up?
[15:44:58] shevy: e. g. I might need a pastie to be around for, let's say +3 years into the future. afterwards it is ok if it is eliminated
[15:47:28] Mon_Ouie: shevy: forever http://blog.pastie.org/2010/09/pastes-are-forever.html
[15:50:05] shevy: ah ok thanks for the info Mon_Ouie
[15:51:01] shevy: I actually never realized the private-link checkbox down there until that information just now
[15:55:59] Godd2: First Law of the Beginning Programmers: If I don't understand something, it's obviously the explainer's fault.
[16:02:23] shevy: if they explained something
[16:55:22] MrSparkle: I like ruby
[16:56:01] MrSparkle: restarted the programming stuff a few days ago, after taking a semester of java long ago
[16:56:12] MrSparkle: why the hell didn't they use ruby back then
[17:00:24] j2p2: because java is better for people just starting out
[17:00:30] j2p2: ruby can give you bad habits
[17:01:28] j2p2: a lot of important concepts are hidden behind the scenes much of the time
[17:01:43] j2p2: like inheritence, private/public, etc
[17:01:52] crueber: Neither of those are hidden in ruby. ;)
[17:02:30] Hanmac: j2p2: java can you give VERY bad habits too
[17:03:07] Godd2: Clearly no one should ever learn how to program. They'll just do it wrong!
[17:03:24] giz|afh: i think i can code since 1999
[17:03:32] giz|afh: i have never been so wrong+
[17:03:38] Mon_Ouie: I think programming hides many important things, like how a transistor works --- we should all begin with Maxwell's Equations!
[17:03:50] j2p2: man you guys are really running with this
[17:03:52] TheAtomicGoose: is there a way to alias links which are being printed in the console with ruby? e.g. have "Example Website" link to www.example.com ?
[17:03:55] apeiros_: java teaches you the very important concept of boilerplate
[17:03:55] j2p2: i didn't even try to defend my position
[17:04:47] Hanmac: Mon_Ouie: i dont trust electrons they are way to negative for me ...
[17:04:48] Godd2: apeiros_ cause to make a cup of java, you have to boil water on a hotplate
[17:05:52] Mon_Ouie: hanmac: Only trust holes then?
[17:10:00] MrSparkle: public private int float zzz
[17:10:06] MrSparkle: all those brackets
[17:10:35] MrSparkle: anything you program in the first semester it doesn't matter~
[17:14:24] trampi: How can i use the escape character in a regex? Something like: /regularexpression[ESCAPE-CHARACTER-HERE]/
[17:15:42] Godd2: trampi are you talking about the characters you have to escape in a regex, or the characters you have to escape in a normal string?
[17:16:23] trampi: godd2: i want a regex that matches the escape-character in strings (ascii27)
[17:16:52] trampi: godd2: my problem is that i do not know how to escape the escape character in my regular expression
[17:17:05] Godd2: it's the same as far as I know
[17:17:09] Godd2: >> "\n".match /\n/
[17:17:09] eval-in__: godd2 => #<MatchData "\n"> (https://eval.in/238429)
[17:18:25] trampi: apeiros_: will try that, thanks
[17:18:42] trampi: godd2: thats not what i am looking for, but thank you too :-)
[17:18:46] apeiros_: alternatively \x1b
[17:19:03] Godd2: oooh, esc itself. got it
[17:20:42] trampi: apeiros_: /\e/ does the trick. thanks
[17:42:40] shevy: \x1b is escape?
[17:52:01] eval-in__: apeiros_ => "\e" (https://eval.in/238431)
[18:06:24] basichash: Is ruby better than python?
[18:06:45] waxjar: not again :(
[18:09:34] xfz: basichash: there's no real way to answer that objectively. it's a matter of taste in most cases
[18:11:44] Godd2: basichash ruby has blocks and singleton classes. python has list comprehension and first class functions. its a matter of taste I guess
[18:12:05] basichash: godd2: what's a singleton class?
[18:12:20] Godd2: basichash it's the class that an object is a single instance of
[18:13:06] Godd2: >> a = "hello"; def a.say; puts "no"; end; a.say # the say method was defined on a's singleton class
[18:13:07] eval-in__: godd2 => no ... (https://eval.in/238432)
[18:13:14] basichash: godd2: as in you can only have one instance of a class?
[18:13:41] Godd2: basichash no no, you can have more than one instance of a regular old class
[18:13:50] vvivv: ruby is funny
[18:14:05] waxjar: you can add custom behaviour to for example one String instance, without affecting other/future instances
[18:15:18] Godd2: basichash one thing to note is that to find true differences between the languages, you have to dig down deep. for most things, they're very very similar.
[18:16:38] basichash: so it doesn't matter which i use?
[18:17:06] Godd2: basichash not in the grand scheme I suppose. I do recommend that once you've gotten good at one, that you learn some of the other
[18:17:26] basichash: godd2: how does one get good?
[18:17:43] Godd2: same with any craft I would think. lots of practice and hard work
[18:18:00] basichash: godd2: damn
[18:18:10] havenwood: basichash: Ruby is lovely. Read a bunch of Ruby code. Write a bunch of Ruby code.
[18:18:13] Godd2: well if it was easy, everyone could do it :)
[18:18:17] waxjar: it also depends on what you want to do. if you want to crunch numbers for example, go with python. they have much better tools than ruby to do that
[18:18:50] basichash: yeah i used to use python a lot, then started learning ruby because of rails
[18:18:57] Godd2: basichash I like ruby because the readability is very consistent
[18:19:54] basichash: are there any relatively simple libraries/projects i could study?
[18:23:42] tejas-manohar: http://www.sitepoint.com/uno-use-sinatra-implement-rest-api/
[18:23:58] tejas-manohar: overthought something
[18:26:29] MrSparkle: why am I stuck on what unless means, of all things
[18:26:48] waxjar: its the opposite of if
[18:27:29] havenwood: MrSparkle: unless you figure it out you'll never know!
[18:27:48] MrSparkle: if false, do it?
[18:27:58] MrSparkle: vs if, which is do it if false
[18:28:22] Godd2: unless user.logged_in?; show_login_page; end
[18:28:30] havenwood: unless true, do it
[18:28:35] havenwood: MrSparkle: just what 'unless' usually means
[18:28:38] Godd2: because you wouldn't show the login page to someone who's logged in
[18:29:24] MrSparkle: then I'm struggling with the word
[18:30:02] havenwood: MrSparkle: keep asking unless you already understand. <- should you keep asking?
[18:30:21] havenwood: so you understand unless!
[18:30:23] Godd2: MrSparkle think about this sentence "go to work unless it's sunday"
[18:30:47] Godd2: which is equivalent to "if it's not sunday, go to work"
[18:30:49] MrSparkle: if not conditional, do thing ok
[18:31:20] MrSparkle: is this a not true, or is false, in terms of ruby?
[18:31:30] MrSparkle: I think bolleam can nil? >_>
[18:31:57] Godd2: MrSparkle "unless" will pass when the stuff after is false or nil
[18:34:31] MrSparkle: also, why doesn' elseif do the same thing as elsif :(
[18:34:54] Godd2: because elsif is a defined keyword in ruby, and elseif is not.
[18:35:44] Godd2: MrSparkle here is a list of those special keywords: http://ruby-doc.org/docs/keywords/1.9/
[18:36:00] Godd2: you can see elsif just after "do" and "else"
[18:36:22] bricker: else if, elseif, elsif, elif
[18:36:45] bricker: I can't decide if "elsif" or "elif" is worse
[18:37:19] Sweeper: elsif is worse
[18:37:48] Sweeper: because you say it the same as "elseif" in your head
[18:38:00] Godd2: "hey! lets make a high level language and arbitrarily remove letters from words that are in lower-level languages!"
[18:38:28] bricker: sweeper: good point
[18:38:37] Godd2: I think it's inconsistent that elsif is in Ruby, but we have to write "initialize"
[18:38:44] Sweeper: you would think it'd be easier to implement them as two separate operators too
[18:38:58] bricker: I misspell "initiallize" 100% of the time
[18:39:03] bricker: initlaize*
[18:39:05] bricker: initialize*
[18:39:14] icedragon: godd2: certainly better than writing the class name twice (C++)
[18:39:15] Sweeper: like if { block } else { if {block} }
[18:39:27] Godd2: feature request: alias init to initialize hook
[18:39:27] MrSparkle: I wasn't after the exact reason, but thanks!
[18:39:31] Sweeper: although it'd get nasty with more than two
[18:40:11] MrSparkle: eroor on line with .capitalize ? I bet I should have typed capitalise
[18:40:25] Godd2: really, initialize and @@ are my only two complaints...
[18:40:58] Godd2: MrSparkle nah it should be the American English version 'capitalize'
[18:41:06] Godd2: >> "hello".capitalize
[18:41:06] eval-in__: godd2 => "Hello" (https://eval.in/238436)
[18:42:31] MrSparkle: I find spelling mistakes that arn't there, or I outright missspell, but anyways
[18:45:19] basichash: how can i implement a fib sequence in ruby using lambdas?
[18:47:02] Godd2: basichash it depends. do you want to have it return every fib up to a number? or perhaps find some nth fib number?
[18:48:37] basichash: godd2: yeah up to some nth number, where n is the nth element of the sequence
[18:49:13] Godd2: so that fib(7) == [1, 1, 2, 3, 5, 8, 13] ?
[18:50:07] basichash: man this stuff makes my head hurt
[18:53:20] atmosx: anyone using autotest (ZenTest) with minitest?
[18:53:39] atmosx: Shouldn't autotest start looking for .rb files in $PROJECT/test directory by default?!
[18:54:31] Godd2: >> fib = ->(n, a=[1,1]) { if n == 0; a; else; fib.(n-1, a << (a[-2]+a[-1])); end}; fib.(7)
[18:54:32] eval-in__: godd2 => [1, 1, 2, 3, 5, 8, 13, 21, 34] (https://eval.in/238438)
[18:55:08] Godd2: with a little modification you can fix the off-by-2 error there
[18:55:09] atmosx: godd2: took about 40 minutes to write a fibonacci working version in JS :-(
[18:55:23] atmosx: not to mention that it's about 8-10 lines of code..
[18:55:40] atmosx: off-by-2 error?!
[18:55:45] atmosx: you mean include the 0 ?
[18:55:51] Godd2: atmosx hehe, if you learn a bit of Clojure, your function-fu may increase a bit...
[18:56:03] havenwood: >> fibs = ->(n) { a, b = 0, 1; n.times.map { a, b = b, a + b; a }; fibs[7]
[18:56:03] eval-in__: havenwood => /tmp/execpad-618d9d362d40/source-618d9d362d40:3: syntax error, unexpected keyword_rescue, expecting '}' ... (https://eval.in/238439)
[18:56:06] Godd2: nah I asked for 7 elements, and it gave me 9
[18:56:14] atmosx: godd2: ah clojure is nowhere near my landscape in the immediate future :-P
[18:56:24] atmosx: havenwood: you use minitest with autotest?
[18:56:37] havenwood: forgot the closing bracket
[18:56:38] atmosx: godd2: ah right.
[18:56:38] havenwood: >> fibs = ->(n) { a, b = 0, 1; n.times.map { a, b = b, a + b; a } }; fibs[7]
[18:56:39] eval-in__: havenwood => [1, 1, 2, 3, 5, 8, 13] (https://eval.in/238440)
[18:56:43] havenwood: atmosx: yup
[18:57:02] atmosx: havenwood: shouldn't autotest look at $PROJECT_ROOT/test directory for .rb files?
[18:57:59] havenwood: godd2: You'd need to enable tailcall_optimization with your version or you'll get `SystemStackError: stack level too deep` with larger numbers ;)
[18:58:03] havenwood: atmosx: hmm
[18:58:25] atmosx: havenwood: doesn't find the my simple_test.rb file in test/ oh wait
[18:58:27] atmosx: might be tests
[18:58:51] Godd2: havenwood yea I know, but its fun to see irb crash :P
[18:59:30] atmosx: It assumes
[18:59:32] atmosx: the code is in lib, and tests are in test/test_*.rb.
[18:59:39] Godd2: havenwood: also, dont forget to turn off trace_instruction though...
[18:59:50] atmosx: awesome works
[19:00:06] atmosx: hmm can I add colors to minitest like rspec?!
[19:00:21] havenwood: atmosx: very simple colors with: require 'minitest/pride'
[19:00:35] atmosx: pride? haha
[19:00:48] havenwood: well, rainbow colored dots :P
[19:01:01] atmosx: havenwood: that requirement goes to .autotest or something like .minitest ?
[19:01:35] atmosx: hm or to the test maybe
[19:01:39] havenwood: atmosx: i don't think i follow, but ships with minitest
[19:01:52] atmosx: okay, I'm testing the testing framework lol
[19:02:17] havenwood: atmosx: https://github.com/seattlerb/minitest/blob/master/lib/minitest/pride_plugin.rb
[19:02:22] atmosx: okay I have a rainbow color-scheme in the place where I least need it..
[19:02:48] havenwood: i need coffee...!
[19:03:11] atmosx: havenwood: espresso!
[19:03:15] atmosx: ACTION doesn't drink coffee
[19:03:27] ShellFu: ACTION enjoys hot bean drink
[19:19:58] MrSparkle: gah lets reread the unless discussion
[19:20:30] MrSparkle: if not true, just have to remember those 3 words
[19:21:55] MrSparkle: the example I was looking at wasn't helping, doing a weird doble negative thing with problem = false, puts 'good to go unless' problem
[19:28:23] infoget: Hi guys, How can I get float number from string? "09:30" to 9.3, this way? "9:30".tr(':','.').to_f
[19:33:20] apeiros_: >> "9:30".tr(':','.').to_f
[19:33:21] eval-in__: apeiros_ => 9.3 (https://eval.in/238442)
[19:33:27] apeiros_: seems fine infoget. what's your problem?
[19:34:17] infoget: apeiros_: If exists other solution, but thx
[19:35:02] apeiros_: 09:30 doesn't happen to be a time or duration?
[19:35:41] infoget: apeiros_: Bcs I have timezone in this format "+10:00" and I need to convert to float
[19:36:12] apeiros_: infoget: you do realize that 9h 30min does *not* equal 9.3h?
[19:36:21] apeiros_: it'd be 9.5h
[19:36:23] Sweeper: ACTION giggles
[19:36:29] Sweeper: you shouldn't have told him
[19:36:32] Hanmac: infoget: i dont think you can parse that + - format into the correct timezone
[19:36:47] apeiros_: also, time offsets are not timezones
[19:37:21] Sweeper: also, isn't that the afghanistan time zone?
[19:37:44] Sweeper: oh no, afg is 4:40
[19:38:05] Sweeper: some other misbegotten place with a half-hour offset
[19:38:34] infoget: Yeah, I working with DB where is example such as ( 4.3 - Kabul, -10 - Hawaii )
[19:39:27] Sweeper: does is say 4.3 or 4.5 for kabul?
[19:40:13] infoget: Like I wrote, 4.3
[19:40:33] infoget: It's little bit strange, right?
[19:40:36] apeiros_: that sounds fucked up
[19:40:39] Sweeper: just back away slowly, no good can come of this
[19:41:00] Sweeper: or run screaming, w/e, but get out
[19:42:27] infoget: apeiros_: How could I do that when should to be like 4.5 insteed of 4.3 ?
[19:43:00] apeiros_: there's 60min in an hour, so 60 = 1
[19:43:40] Sweeper: infoget: but surely some string manipulation + actual time zone/offset stuff is what you want?
[19:43:44] apeiros_: >> hours, minutes = "09:30".match(/(\d+):(\d+)/).captures.map(&:to_i); hours + minutes.fdiv(60)
[19:43:44] eval-in__: apeiros_ => 9.5 (https://eval.in/238443)
[19:43:50] Sweeper: like you're not manipulating dates as ints or somethin
[19:46:23] infoget: apeiros_: thanks!
[19:51:08] Hanmac: >> /(?<hours>\d+):(?<minutes>\d+)/ =~ "09:30" ? hours.to_i + minutes.to_i.fdiv(60) : 0
[19:51:08] eval-in__: Hanmac => 9.5 (https://eval.in/238444)
[20:28:53] MrSparkle: does while stop partway into a loop should the condition go true?
[20:30:36] Godd2: MrSparkle a while loop will exit when it evaluates the condition after each iteration
[20:30:55] Godd2: the other time it will exit is when it hits a "break" inside the loop
[20:31:00] MrSparkle: ok it doesn't even check if true till iteration end, thanks
[20:31:31] MrSparkle: or I should better word, before iteration start
[20:31:42] MrSparkle: since firt iteration
[20:32:02] Godd2: >> i = 0; while i != 1; i += 1; puts "i is #{i} now"; end
[20:32:02] eval-in__: godd2 => i is 1 now ... (https://eval.in/238458)
[20:32:28] Godd2: you can see there that even though i was 1 going into the puts, the loop still continued
[21:00:16] ziyadb: Gentlemen..
[21:00:30] ziyadb: I have some silly nested ifs that I would like to DRY out and I'd like some tips..
[21:01:34] ziyadb: https://gist.github.com/ziyadbasheer/d9276d9cc8b45791caa0
[21:11:08] synire: finished codeacademy's ruby lessons, anyone have a suggestion on a project or something to try getting my hands dirty on to get more experience with the language?
[21:16:32] shevy: you must decide on something that you desire to code
[21:17:36] shevy: then make it a gem
[21:17:37] pipework: shevy: What if he desires to make money?
[21:17:39] shevy: then publish it
[21:17:53] shevy: then he must write rails apps
[21:18:15] shevy: but he has not written that he is in for the big bucks
[21:18:57] synire: is rails something *easy* to dive right into?
[21:18:59] pipework: shevy: Maybe little bucks?
[21:19:04] pipework: synire: It's easy to use.
[21:19:13] shevy: dunno, I did not go the rails route. I always found that there is a lot to read though
[21:19:36] shevy: ziyadb you need to change to a way that allows you to eliminate redundancy in such code constructs
[21:19:47] basichash: how do I make big $$$ with rails?
[21:19:49] pipework: They have guides to get you started.
[21:19:50] shevy: ziyadb basically what you do is query a hash
[21:19:56] pipework: basichash: rails new, mostly
[21:20:01] ziyadb: shevy: listening..
[21:20:05] synire: I'm stuck where I have tons of pdf's to read and resouce websites to browse through, but I'm better at learning via hands on then anything else.
[21:20:14] basichash: pipework: rails new?
[21:20:33] pipework: basichash: ?
[21:20:39] helpa: synire: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[21:20:39] pipework: synire: !guides
[21:20:44] helpa: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy
[21:20:44] pipework: !gettingstarted
[21:21:20] basichash: pipework: not sure that's an answer to my question
[21:21:36] pipework: basichash: I'm not sure that your question deserves an answer.
[21:22:10] bricker: basichash: 1. Learn Rails. 2. Rob a bank. 3. $$$
[21:22:11] basichash: i thought there's no such thing as a stupid question?
[21:22:42] bricker: basichash: whoever told you that was lying.
[21:22:44] basichash: i'm just a simple man trying to provide for his family, and this is how people respond? with ridicule and scorn?
[21:22:57] pipework: Some questions just don't deserve answers, regardless of stupidity.
[21:23:02] havenwood: basichash: what's your question?
[21:23:08] shevy: ziyadb well first identify the duplications
[21:23:09] shevy: @happens = 'by date and length'
[21:23:10] pipework: <basichash> how do I make big $$$ with rails?
[21:23:15] synire: pipework: rails it is, thanks.
[21:23:22] havenwood: basichash: in #rubyonrails
[21:23:22] pipework: synire: Good luck, and god save your soul.
[21:23:44] basichash: how do I make big $$$ with ruby*?
[21:23:50] shevy: ziyadb line 8 and line 12 is a duplication
[21:23:58] bricker: Okay that made me laugh out loud
[21:24:01] shevy: nope sorry
[21:24:10] havenwood: basichash: Drones. No go forth an prosper.
[21:24:18] shevy: ziyadb I meant 12 and like 28, that code is a true mess
[21:24:53] pipework: Put the words 'ruby' and 'rails' somewhere on your resume. Done.
[21:24:59] synire: if rails ties into android apps, then I see the $$$ in it
[21:25:23] pipework: 'ties into'?
[21:26:20] pipework: Rails is best at HTTP request handling. It doesn't really care if you're making requests from an android app or a browser, or anything really. It's good at making HTML and JSON responses though.
[21:27:01] synire: I'm reading the wikipedia on it now, neven knew what it was till now.
[21:27:50] shevy: ziyadb for instance, as a first step I would move towards something like this http://pastie.org/9805769 - afterwards, try to see which calls are not necessary or could be bundled together, you seem to call complicated APIs where you have several arguments duplicated
[21:28:54] shevy: you could chain if conditions through "and" or "&&" or "! condition"
[21:35:32] ziyadb: shevy: that would make it so much cleaner
[21:35:39] shevy: yeah well
[21:35:49] shevy: the idea is that you try to distill the required logic to the absolute minimum
[21:35:56] shevy: for instance:
[21:35:59] shevy: if condition
[21:36:04] shevy: @foo = 'hello world'
[21:36:15] shevy: @foo = 'bye world'
[21:36:27] shevy: ok two ways to make it shorter - ternary, or this:
[21:36:31] shevy: @foo = 'bye world'
[21:36:36] shevy: @foo = 'hell world' if condition
[21:36:50] shevy: that was supposed to be 'hello world', not hell world...
[21:37:09] shevy: if you use methods though, you can try to build up succint "sentences"
[21:37:25] shevy: if this do that else do something_else
[22:07:13] pipework: @foo = (condition ? 'hello world' : 'bye world' )
[22:10:09] shevy: ziyadb yeah as you can see from pipework, ternary is very terse
[22:19:25] ziyadb: shevy: thank you for the lesson sir! I'll be sure to refactor accordingly.
[22:19:30] ziyadb: I appreciate it
[22:21:36] waxjar: the parentheses aren't even necessary :)
[22:24:55] shevy: see ziyadb? even further optimizations are possible!
[22:25:16] shevy: waxjar eliminated two characters (actually three, pipework also added a space after world'
[22:25:27] pipework: waxjar: Right, but people get confused.
[22:25:33] pipework: You can remove a lot of the spaces.
[22:25:42] shevy: YesWeCan!
[22:28:42] pipework: @foo=@foo=:hi ?'hello world':'bye world'
[22:28:45] pipework: >> @foo=:hi ?'hello world':'bye world'
[22:28:45] eval-in__: pipework => "hello world" (https://eval.in/238476)
[22:28:55] pipework: replace :hi with the condition
[22:42:58] shevy: I've just had an epiphany
[22:43:14] shevy: in my pipe project, I evaluate user input such as 'random image | browser'
[22:43:31] shevy: which sort of says "grab a random image, then open and display it in your browser"
[22:43:57] shevy: and I noticed that 'random image' could already be described by other actions
[22:44:12] shevy: as in 'all images | random' which should mean... get all images... pick a random one
[22:44:26] pipework: Yeah part of the Unix philosophy talks about that.
[22:44:36] pipework: composable streams joined by pipes.
[22:45:28] pipework: http://en.wikipedia.org/wiki/Unix_philosophy
[22:53:16] shevy: it is a good philosophy
[22:53:39] shevy: I'd wish I'd have a trivial way to apply even advanced manipulation of video and audio data on the commandline through pipes
[22:54:07] shevy: best I can do right now is format conversions and rejoining audio parts mostly ... through ffmpeg
[22:54:07] pipework: Probably doable.
[23:17:01] Fire-Dragon-DoL: is anyone aware of a bug where a file named "symbol.rb" won't be required? I have a weird bug where require 'extensions/symbol.rb' returns false (so the file exist) but it's not actually loaded
[23:18:35] pipework: Fire-Dragon-DoL: try gisting your code
[23:21:37] bradland: Fire-Dragon-DoL: verify that the path to extensions/ is on your load path as well.
[23:21:55] shevy: Fire-Dragon-DoL can not be based on the filename alone, a file called symbol.rb must work nicely. but perhaps you have multiple symbol.rb files?
[23:22:05] Fire-Dragon-DoL: pipework: not a lot to gist, anyway: https://gist.github.com/Fire-Dragon-DoL/a44f5cf5976b7803366a notice that manually typing (with pry): require "/home/francesco/projects/web/federtrek/lib/extensions/symbol" works, so maybe a load_path issue, problem is that the second entry is "lib" (which is where it should be) and first is spec, which doesn't have extensions directory at all
[23:22:12] shevy: when require returns false
[23:22:18] shevy: that emans the file was already loaded right?
[23:22:44] shevy: so I don't understand your situation. surely there must have been something else that loaded that file before, otherwise it can not logically return false
[23:22:50] Fire-Dragon-DoL: shevy: no, I have one symbol file in the entire project... argh
[23:23:01] pipework: shevy: Yeah.
[23:23:08] pipework: When require returns false, it's already been loaded.
[23:23:11] Fire-Dragon-DoL: yes I think the same shevy
[23:23:21] pipework: Fire-Dragon-DoL: What's with the undercores?
[23:23:36] Fire-Dragon-DoL: pipework: I can't use '/' in gist file names
[23:23:39] pipework: extensions_symbol.rb, is that just for the gist?
[23:24:04] pipework: Is the location the ext directories are in actually in $: or $LOAD_PATH
[23:24:11] Fire-Dragon-DoL: yes it's the second one
[23:24:40] Fire-Dragon-DoL: are there any way to check which file was loaded with require?
[23:25:15] pipework: Fire-Dragon-DoL: Also, using to_sym on string when calling rolify (which is a crappy name) is probably a bad idea.
[23:25:24] pipework: You can access all required files in ruby.
[23:25:44] pipework: $LOADED_FEATURES
[23:26:00] eka: hi, using thor, when invoking other command the options are being passed command thus giving error... how to avoid that?
[23:28:39] Fire-Dragon-DoL: ["/home/francesco/.rvm/gems/ruby-2.1.3/gems/therubyracer-0.12.1/lib/v8/conversion/symbol.rb", "/home/francesco/.rvm/gems/ruby-2.1.3/gems/faker-1.4.3/lib/extensions/symbol.rb"]
[23:28:42] Fire-Dragon-DoL: this is terrible
[23:30:29] Fire-Dragon-DoL: pipework: any NICE solution aside require Rails.root.join('lib','extensions','symbol') ?
[23:32:01] bradland: Fire-Dragon-DoL: namespacing
[23:32:17] bradland: ???extensions/symbol??? is very broad
[23:32:41] Fire-Dragon-DoL: bradland: mh probably I'll go for that
[23:32:50] bradland: require ???yourlib/extensions/symbol???
[23:33:11] bradland: eka: not sure i understand your question
[23:33:18] bradland: what do you mean by ???other command????
[23:34:07] eka: bradland: solved, but to rephrase ... I have a thor command A that invokes command B, but A takes options but B don't ... so all the A options are passed to the B invocation giving error
[23:34:19] eka: bradland: solved with invoke :B, [], {}
[23:34:26] eka: but dunno if it's the way :D
[23:34:27] bradland: yeah, you???ll want to pass an explicit set of empty options
[23:34:36] bradland: that???s how i???d do it anyway