« Back to channel list

#ruby - 15 June 2015

« Back 1 day Forward 1 day »
[00:00:40] joneshf-laptop: has joined #ruby
[00:00:57] volty: I'll try manually; as Ox0dea said the api isn't terrible, and I start remembering what I've implemented before.
[00:01:05] volty: shevy: you are tired, but me too :)
[00:01:33] shevy: I am using ruby-gnome usually
[00:01:38] volty: install qtruby and play with it. contribute to ruby's versatility growth
[00:03:31] volty: but qt is ruby-like, while gtk & gnome are python-like. Be consistent, be coherent - go Qt.
[00:04:42] avahey: has joined #ruby
[00:05:01] Rubie: has joined #ruby
[00:09:02] horsecowdog: has joined #ruby
[00:10:17] blue_deref: has joined #ruby
[00:11:08] Ox0dea: Aeyrix: That was the prettiest first possession I have ever seen.
[00:12:42] Aeyrix: Ox0dea: I'm at work. D:
[00:12:47] shevy: I would not know where to get qtruby from
[00:13:08] ogpastaling: has joined #ruby
[00:13:46] Ox0dea: Aeyrix: Ah, bummer. 6 combined TOs, 0 points in the first two-and-a-half.
[00:13:52] Ox0dea: Should be a fun one.
[00:13:54] Aeyrix: Ox0dea: Christ.
[00:14:07] Aeyrix: Have we still got JR Smith shooting? :^)
[00:14:16] Ox0dea: I sure hope so. ^_^
[00:14:22] Aeyrix: We do. :(
[00:14:24] Ox0dea: He was -52 last game.
[00:14:35] Aeyrix: Absolute garbage. I don't know what's up with him.
[00:15:06] volty: shevy: gem install qtbindings
[00:15:27] shevy: oh so qtruby has another name
[00:15:28] shevy: clever :)
[00:15:38] Aeyrix: shevy: you what
[00:15:45] Aeyrix: Those are the ruby bindings for qt
[00:16:06] shevy: yeah, qtbindings
[00:16:16] blackmesa: has joined #ruby
[00:16:56] volty: yeah, I call it qtruby, the old name, I think
[00:17:27] Rubie: has joined #ruby
[00:17:58] blackmesa: has joined #ruby
[00:19:41] krisquigley: has joined #ruby
[00:21:15] Marsupermammal: has joined #ruby
[00:21:33] jcaho: has joined #ruby
[00:22:08] ta: has joined #ruby
[00:26:26] GnuYawk: has joined #ruby
[00:26:31] shevy: cannot find -lsmokeqtopengl
[00:28:30] Akagi201: has joined #ruby
[00:28:36] simplyianm: has joined #ruby
[00:29:06] mdz_: has joined #ruby
[00:29:25] zenspider: rawr! just released debride 1.5.0 w/ emperical rails whitelisting and --focus
[00:29:38] zenspider: http://blog.zenspider.com/releases/2015/06/debride-version-1-5-0-has-been-released.html
[00:29:46] zenspider: I'm super duper happy with this little project
[00:30:52] mcclurmc: has joined #ruby
[00:32:59] f3lp: has joined #ruby
[00:33:54] x1337807x: has joined #ruby
[00:34:34] al2o3-cr: hmm, seems to work http://i.imgur.com/eO11qhH.png
[00:34:47] advorak: has joined #ruby
[00:35:27] mcclurmc_: has joined #ruby
[00:35:39] shevy: yeah if I could find out where smokeqtopengl is
[00:35:40] advorak: hi there - let's say I have created a few classes: One, One::Two, and One::Two::Three; From within class One::Two::Three, how can I refer to One::Two?
[00:36:07] shevy: advorak often you can try leading :: such as ::One::Two
[00:36:19] zenspider: shevy: a method?
[00:36:56] shevy: moment... need to find out what smokeqtopengl is
[00:37:10] robustus|Off: has joined #ruby
[00:37:19] zenspider: advorak: depending on the code structure (nesting vs not) you can just refer to `Two` or `One::Two`. You almost never need a leading "::" unless you're shadowing something
[00:37:57] zenspider: shevy: sorry. looks like it is a lib based on your error above?
[00:38:06] zenspider: cannot find -lsmokeqtopengl ?
[00:38:11] failshell: has joined #ruby
[00:38:18] volty: what advorak means by ??refer???
[00:38:47] zenspider: volty: refer: verb: mention or allude to
[00:39:15] volty: you cannot access the instance variables, for example
[00:39:17] Oog: has joined #ruby
[00:39:31] zenspider: shevy: should be libsmokeqtopengl* somewhere in your lib path
[00:39:43] zenspider: volty: since when can you not access instance variables?
[00:39:51] Rollabunna: has joined #ruby
[00:40:01] Oog: has joined #ruby
[00:40:06] zenspider: pretty sure it was obvious he was referring to constants just by the scoping and casing
[00:40:17] advorak: shevy, Thank you. I am actually realizing that I need to play with my code a little more, as I'm realizing that I probably don't want to do what I was thinking I wanted to do :-)
[00:40:55] shevy: zenspider btw could debride be coupled with rubocop? e. g. when one would want to run a larger analysis of ruby code
[00:40:56] bmurt: has joined #ruby
[00:40:58] volty: zenspider: it was not obvious to me :)
[00:41:12] volty: (and that's why I just asked)
[00:41:17] scottstamp: has joined #ruby
[00:42:14] bjornar: has joined #ruby
[00:42:16] zenspider: shevy: don't see why not, but they're very different beasts. I think you'd want to look at them at different times
[00:44:50] kadoppe: has joined #ruby
[00:46:44] hyperjui_: has joined #ruby
[00:47:07] El3ktra: has joined #ruby
[00:47:25] jinie: has joined #ruby
[00:47:35] sdothum: has joined #ruby
[00:49:16] Marsupermammal: has joined #ruby
[00:49:31] michaeldeol: has joined #ruby
[00:49:33] konieczkow: has joined #ruby
[00:51:18] El3ktra: So, I want to show the "many" side of a relationship as a comma-deliminated list. I do this using: movie.keywords.map(&:name).join(",")
[00:51:55] ayonkhan: has joined #ruby
[00:52:07] El3ktra: It works well, but I have another object that has a name that I compile in the method file. (The name has a firstname and lastname, and I have a methid that returns a string of the two names combined)
[00:52:35] El3ktra: the problem is that map doesn't work with fields that aren't fields in the database
[00:52:40] El3ktra: sorry if I am not explaining this well
[00:53:09] Aeyrix: You're not, honestly.
[00:53:15] Aeyrix: Firstly, this sounds like a Rails issue, yeah?
[00:53:21] Aeyrix: Secondly, am I understanding this right? :
[00:53:34] El3ktra: yes, a rails issue. Is there a better room?
[00:53:39] Aeyrix: #RubyonRails
[00:56:56] starfox_sf: I have been working on a toy web crawler with ruby and I am looking to make it multi-threaded. I have played with threads a few times using ruby. Are there any good resources/tutorials/gems I should look into for using threads in this project?
[00:59:40] jenrzzz: has joined #ruby
[01:01:44] bkxd: has joined #ruby
[01:01:59] CustosLimen: has joined #ruby
[01:03:51] mleung: has joined #ruby
[01:04:11] zenspider: El3ktra: "map doesn't work with fields that aren't fields in the database" ... map is just a method. It does what you tell it to do
[01:05:45] Dreamer3: has joined #ruby
[01:07:33] charliesome: has joined #ruby
[01:08:50] Cache_Money: has joined #ruby
[01:11:36] chouhoulis: has joined #ruby
[01:12:09] workmad3: has joined #ruby
[01:12:18] mrmargolis: has joined #ruby
[01:13:09] michael_mbp: has joined #ruby
[01:13:37] simplyianm: has joined #ruby
[01:15:04] volty: Ruby is just a lang. It does what you tell it to do. Pretty clear. Clearer than the thorns of a cactus. :)
[01:16:42] pontiki: has joined #ruby
[01:17:06] volty: I guess that Python community has less pedantic and more friendly people (though the difference is not so big, plenty of nice ruby ppl around)
[01:18:53] noethics: as a pedant and a pythonist i resent that
[01:18:55] bronson: has joined #ruby
[01:19:08] volty: that's why are you here :)
[01:19:20] volty: (joking, of course)
[01:19:21] weaksauce: noethics get out there and pedant
[01:19:41] centrx: has joined #ruby
[01:19:42] noethics: one does not simply pedant
[01:19:52] noethics: it comes naturally in any conversation
[01:20:00] weaksauce: volty ruby has many ways of doing things. python tries to have one path so it either works or it doesn't
[01:21:03] volty: haskellers are quite pedant, but they are at the same time very very friendly ??? at the end you get nothing (in code), but remain pleased :)
[01:21:10] Aeyrix: Lol haskell
[01:21:12] Aeyrix: also python
[01:21:22] Aeyrix: >base a language syntax off whitespace
[01:21:29] Aeyrix: how did it succeed as much as it did
[01:21:48] noethics: pedant is a noun, you just used it as an adjective. i believe the word you were looking for was pedantic
[01:22:10] volty: weaksauce: the mine are about ppl, not about the langs. I already know (and agree about) the diffs
[01:22:16] weemsledeux: has joined #ruby
[01:23:12] noethics: actually i dislike using python
[01:23:23] noethics: ruby is nicer to use but i can never find an excuse to use it
[01:23:43] ta: has joined #ruby
[01:24:10] millerti: has joined #ruby
[01:24:25] lapidary: has joined #ruby
[01:24:38] noethics: Aeyrix, you still off the dota 2 m9
[01:24:44] noethics: did you see the update
[01:24:56] eam: I mean, ruby has whitespace significance too
[01:25:03] eam: it's what people like
[01:25:36] shevy: ruby may warn when the indent is not propr, e. g. "wrong 'end' indent" or something like that
[01:26:19] noethics: i prefer to save compiler cpu cycles and code everything on 1 line
[01:26:20] eam: what's the end of line delimiter?
[01:26:29] volty: i don't want to be force to break the flow of my logic
[01:26:38] Aeyrix: @noethics
[01:26:41] Aeyrix: I play HoTS now mostly.
[01:26:45] Aeyrix: Dota 2 is too complex for me. :^)
[01:26:48] noethics: Aeyrix, ew what are you 12
[01:26:57] Aeyrix: Reverse those numbers.
[01:27:06] Aeyrix: I like the faster gameds.
[01:27:10] Aeyrix: 10-20 min.
[01:27:44] eam: >> [eval("a = 1 \n + 2 ;a"), eval("a = 1 + \n 2 ;a")]
[01:27:45] ruboto: eam # => [1, 3] (https://eval.in/381401)
[01:27:54] noethics: i guess there's only so much of peruvian-american servers one can take
[01:28:07] Aeyrix: HoTS has Aussie servs.
[01:28:21] noethics: i remember trenching it up and my whole team and everyone on the other team were peruvian
[01:28:32] noethics: im like m9 i thought i was on an american server
[01:28:34] weaksauce: volty now you are being pedantic :P
[01:28:41] Aeyrix: noethics: The problem is
[01:28:48] RegulationD: has joined #ruby
[01:28:52] Aeyrix: the "foreign" servers are sparsely populated
[01:28:53] weaksauce: but my point stands that python leave less room for pedantry
[01:29:06] Aeyrix: So those individuals shift across to the English speaking servers for faster queue times.
[01:29:08] weaksauce: same with go
[01:29:38] noethics: less room for pedantry
[01:29:39] Peteykun: has joined #ruby
[01:29:40] shevy: python educates well-behaving citizens
[01:29:51] noethics: true Aeyrix
[01:30:04] mdz_: has joined #ruby
[01:30:13] Aeyrix: Ox0dea: half time
[01:30:22] volty: weaksauce: not at all, au contraire ??? i want to be able to put it all in a single method, and maybe later break / refactor it ??? the dirty approach, opposite of pedantic
[01:30:44] noethics: i do that when i have no idea what im doing sometimes
[01:31:02] noethics: 300 lines of code in 1 method then refactor it
[01:31:03] longfeet: has joined #ruby
[01:31:04] volty: it all depends on what are you doing
[01:31:04] weaksauce: volty I didn't read what you said after you addressed me
[01:31:07] noethics: no one was the wiser
[01:31:25] weaksauce: I was talking about the lang vs. people comment
[01:31:34] weaksauce: and for the record I like python
[01:31:40] noethics: you know what i think
[01:31:47] volty: ah, ok, @ weaksauce
[01:31:50] noethics: people are equally dumb in all languages except functional languages
[01:32:16] noethics: like the law of large numbers or some shit
[01:32:18] weaksauce: > people are equally dumb in all languages except functional languages
[01:32:18] weaksauce: and then they are not productive <3 noethics
[01:32:20] Aeyrix: Functional languages are pretty awesome because they're mathematically provable.
[01:32:29] Aeyrix: But they're also really complex because of it.
[01:32:36] volty: the smart functional with no fruits
[01:32:44] bruno-: has joined #ruby
[01:32:44] CloCkWeRX: has left #ruby: ()
[01:32:46] Aeyrix: The XKCD comic says it best:
[01:32:50] noethics: weaksauce, idk if thats a bait
[01:32:52] noethics: i think it is
[01:32:53] weaksauce: really though. as long as it's not javascript I am ok
[01:32:56] Aeyrix: https://xkcd.com/1270/
[01:33:15] Aeyrix: also this: https://xkcd.com/1312/
[01:33:21] weaksauce: it's bait noethics... monad your way out of a paperbag and then yell at me on irc
[01:33:32] noethics: wanna fight
[01:33:53] weaksauce: I don't know how you can find me with the paper bag still blocking your vision :P
[01:33:58] DynamicMetaFlow: has joined #ruby
[01:34:42] DynamicMetaFlow: has joined #ruby
[01:34:51] volty: the smarties, terrible, posing all the time. hours on composing something cryptic, then hours to show that unintelligible masterpiece to others
[01:35:20] senayar: has joined #ruby
[01:35:26] DynamicMetaFlow: has joined #ruby
[01:35:52] noethics: volty, you're at least 40 years old right
[01:36:21] DynamicMetaFlow: has joined #ruby
[01:36:28] volty: I remember when I was reading (around, internet), about monads. Awful. The art of over-complicating simple concepts.
[01:36:33] volty: noethics: :)
[01:36:44] noethics: you're likely ~49-55
[01:37:00] noethics: male, have worked the same asp.net job for ~20 years
[01:37:04] DynamicMetaFlow: has joined #ruby
[01:37:26] DynamicMetaFlow: has joined #ruby
[01:37:52] x0F: has joined #ruby
[01:37:55] volty: while you were jumping from ??goto?? to ??case??
[01:37:58] DynamicMetaFlow: has joined #ruby
[01:38:12] freedrull: this example seems wrong. isn't using mixins inheritance too? http://learnrubythehardway.org/book/ex44.html
[01:38:31] DynamicMetaFlow: has joined #ruby
[01:39:06] DynamicMetaFlow: has joined #ruby
[01:39:09] f3lp: has joined #ruby
[01:39:46] DynamicMetaFlow: has joined #ruby
[01:40:22] DynamicMetaFlow: has joined #ruby
[01:40:40] volty: that doc is pretty long, where's the point of your concern ?
[01:40:55] DynamicMetaFlow: has joined #ruby
[01:41:01] tkuchiki: has joined #ruby
[01:41:13] weaksauce: haha. talking of bait noethics
[01:41:34] DynamicMetaFlow: has joined #ruby
[01:42:08] DynamicMetaFlow: has joined #ruby
[01:42:18] mdz_: has joined #ruby
[01:42:21] weaksauce: some of us don't want to learn the lang du jour just to learn someting new
[01:42:44] DynamicMetaFlow: has joined #ruby
[01:43:14] noethics: nah im not some language hipster :D
[01:43:15] DynamicMetaFlow: has joined #ruby
[01:43:27] noethics: i don't actually care what you use
[01:43:32] noethics: or what anyone uses
[01:43:40] noethics: unless it's java
[01:43:47] noethics: jk i love java
[01:43:58] Aeyrix: I'm not gonna get any work done today
[01:44:00] Aeyrix: because of this finals
[01:44:15] weaksauce: now I know you are trolling... no one loves java noethics
[01:44:19] volty: I was really impressed by haskell. And I lost time to understand that it heads towards void. But now have to do (just to do, not really learn) with java
[01:44:26] noethics: weaksauce, i do
[01:44:29] noethics: legitimately
[01:44:30] Aeyrix: volty: The haskell website looks like a Silicon Valley startup.
[01:44:39] volty: I agree with weaksauce
[01:44:40] weaksauce: it was built by people that didn't want to trust people
[01:45:00] noethics: java is basically the language everyone wants but no one wants to admit they want
[01:45:03] weaksauce: c# is actually an excellent language
[01:45:16] volty: working with java, after c++, is like making love with a woman without hole
[01:45:33] weaksauce: a little verbose but gets right what java gets really wrong.
[01:45:43] Aeyrix: I do like me some C#.
[01:45:49] Aeyrix: I dislike the conventions though.
[01:45:53] Aeyrix: Hanging {, gross.
[01:46:21] volty: Aeyrix: https://www.youtube.com/watch?v=iSmkqocn0oQ
[01:46:22] weaksauce: which one is that Aeyrix the newline with only a { on it?
[01:46:33] lapidary: has left #ruby: ()
[01:47:00] weaksauce: actually, swift is really interesting. seems like it took a lot of the good things from ruby
[01:47:01] Aeyrix: weaksauce: Yes.
[01:47:05] Xiti: has joined #ruby
[01:47:09] weaksauce: yeah that's gross Aeyrix
[01:47:26] noethics: swift looks like junk
[01:47:33] noethics: it's unoriginal
[01:47:39] rickmasta: has joined #ruby
[01:47:44] noethics: the only good thing about it is that it's open source
[01:47:55] weaksauce: well it's not either of those things.
[01:48:10] weaksauce: it will be os some time later. probably
[01:48:11] noethics: it's going to be opoen source
[01:48:13] fujimura: has joined #ruby
[01:48:13] volty: I would just appreciate ruby written in c++ - so that it can be linked "naturally" with qt
[01:48:32] noethics: weaksauce, at the end of 2015
[01:48:41] noethics: it was announced like 3 days ago, jesus, are you not up to date
[01:48:45] noethics: thought you were a hipster
[01:48:45] weaksauce: so was the facetime protocol noethics
[01:48:56] weaksauce: unless it's out there it's not there
[01:49:21] weaksauce: that was promised on a big stage as well
[01:50:37] noethics: that guy with cancer died though
[01:50:39] noethics: things change
[01:50:51] weaksauce: I think hipsters are weak for the most part. it's a lot harder to say "yeah I like this" than it is to say everything sucks
[01:51:44] noethics: i dont think im a hipster
[01:51:50] noethics: if thats what youre implying
[01:51:53] noethics: hipsters dont like java
[01:52:00] noethics: plus, swift actually does suck
[01:52:24] weaksauce: unlike you I am not presuming anything about you
[01:52:35] noethics: what am i presuming about me
[01:52:51] weaksauce: > thought you were a hipster
[01:52:59] weaksauce: that's a presumption about me.
[01:53:00] noethics: that was a joke
[01:53:06] volty: hipster once, hipster forever :)
[01:53:29] dorei: rails will hipsterize you, beware :D
[01:53:44] volty: just like hippies, counter-culture conformists
[01:53:45] weaksauce: shit. I drank that koolaide a while ago
[01:54:02] noethics: people still use rails?
[01:54:11] noethics: i thought everyone moved to nodejs
[01:54:27] dorei: nodejs or iojs? :p
[01:54:28] weaksauce: node people just love to hate themselves
[01:54:37] noethics: oh right iojs
[01:54:37] jhooker: has joined #ruby
[01:54:37] centrx: nodejs is so silly
[01:54:58] noethics: i love me some react+angular+nodejs action
[01:55:00] noethics: know what i mean
[01:55:13] centrx: even the faddish hipsters have moved onto Goo etc.
[01:55:18] dopie: has joined #ruby
[01:55:41] weaksauce: if javascript was the pinnacle of language design then why did the creator purposely name it after the language du jour in order to gain marketshare?
[01:55:42] volty: the java family is killing the intelligence and the fantasy
[01:55:59] dorei: weaksauce: javascript is the pinnacle of backward compatible stupidity :D
[01:56:29] Oog: has joined #ruby
[01:56:43] noethics: idk i have it from good authority from ##javascript that js is the future and people who aren't on board are gonna get left behind
[01:57:02] weaksauce: if you take out backward compatible i'd agree dorei
[01:57:19] noethics: plus they said ruby is going to get outclassed by ecma6
[01:57:46] volty: ho, ho, we have fjiyama and his "the end of history" here :)
[01:57:55] datanoise: has joined #ruby
[01:58:14] zotherstupidguy: has joined #ruby
[01:58:51] weaksauce: javascript is the way forward if you are looking to leak memory in a closure
[01:58:58] volty: now that microsoft has nokia, they should rewrite ruby in c++, pack it with qt, and you'll see the breeze of fast app dev
[01:59:20] dorei: weaksauce: i'm pretty sure there 'll be someone that will add more memory to the cluster :D
[01:59:26] noethics: mm i love me some clojure
[01:59:33] drocsid: has joined #ruby
[01:59:46] noethics: you guys ever heard of clojure
[01:59:52] perturbation: has joined #ruby
[02:00:09] volty: i just read something
[02:00:20] arescorpio: has joined #ruby
[02:00:24] volty: another one of ??functional?? ??? much of a muchness
[02:01:08] volty: no, confused
[02:01:31] Ox0dea: has left #ruby: ("WeeChat 1.3-dev")
[02:02:12] volty: ??immutable data structures?? ??? shot 'u, with ??purity??
[02:02:36] noethics: what even is state
[02:03:23] noethics: ACTION headswipes
[02:06:01] darkf: has joined #ruby
[02:07:25] shevy: javascript is growing
[02:07:49] saadq: has joined #ruby
[02:08:12] saadq: Any suggestions on resources for learning Ruby for someone who has some programming experience?
[02:08:34] krisquigley: has joined #ruby
[02:08:48] pabs: saadq: the book "programming ruby" by dave thomas is a pretty good resource
[02:08:50] cytoskeletor: has joined #ruby
[02:09:29] saadq: Thanks pabs. Is it plain Ruby or is it for Rails?
[02:09:33] pabs: saadq: portions of it are available online here: http://ruby-doc.com/docs/ProgrammingRuby/, or you can buy it here: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
[02:09:36] pabs: saadq: plain ruby
[02:09:38] saadq: I'd rather learn vanilla Ruby before going into rails
[02:09:43] saadq: okay great, thanks
[02:09:48] pabs: sure, no problem
[02:10:51] Aeyrix: shevy: Growing?
[02:10:53] Aeyrix: In popularity?
[02:13:29] skippy_77: has joined #ruby
[02:13:42] x0F: has joined #ruby
[02:14:06] rickmasta: has joined #ruby
[02:14:32] ogpastaling: has joined #ruby
[02:16:05] Grunt8: has joined #ruby
[02:16:08] yfeldblum: has joined #ruby
[02:18:59] CustosLimen: has joined #ruby
[02:20:17] bronson: has joined #ruby
[02:23:54] NeverDie: has joined #ruby
[02:24:05] failshell: has joined #ruby
[02:24:15] shevy: Aeyrix YES!
[02:24:20] shevy: everyone uses javascript
[02:25:12] ta: has joined #ruby
[02:25:41] niemc2: has joined #ruby
[02:26:27] symm-: has joined #ruby
[02:28:30] pontiki: has joined #ruby
[02:29:50] towski_: has joined #ruby
[02:34:58] existensil: its the lingua franca of programming
[02:35:13] existensil: almost every developer has to touch javascript at some point
[02:35:38] JDiPierro: has joined #ruby
[02:38:00] Renich: has joined #ruby
[02:38:09] dfockler: has joined #ruby
[02:38:20] balazs: has joined #ruby
[02:40:43] Rollabunna: has joined #ruby
[02:41:36] shevy: so that's just like poo here right
[02:43:03] saadq: has joined #ruby
[02:45:47] advorak: has joined #ruby
[02:46:36] mdz_: has joined #ruby
[02:47:03] justintv90: has joined #ruby
[02:48:04] advorak: shevy, I had the hierarchy of my code messed up, anyways ... How I was looking to structure the classes made no sense ...
[02:48:20] advorak: now that I've moved some things around I don't need to do what I wanted. :-)
[02:50:08] freerobby: has joined #ruby
[02:55:59] davedev24_: has joined #ruby
[02:57:15] Oog: has joined #ruby
[02:57:37] psye: has joined #ruby
[02:58:46] horsecowdog: has joined #ruby
[02:59:13] ebbflowgo: has joined #ruby
[02:59:38] apoplexy: has joined #ruby
[02:59:39] michaeldeol: has joined #ruby
[03:00:49] workmad3: has joined #ruby
[03:00:54] Kricir: has joined #ruby
[03:01:43] simplyianm: has joined #ruby
[03:07:52] jcaho: has joined #ruby
[03:09:35] x1337807x: has joined #ruby
[03:10:08] j_mcnally: has joined #ruby
[03:12:03] braincrash: has joined #ruby
[03:13:39] hakunin: has joined #ruby
[03:14:10] acke: has joined #ruby
[03:14:16] Axsuul: has joined #ruby
[03:15:01] Spami: has joined #ruby
[03:16:50] dopie: has joined #ruby
[03:17:39] RegulationD: has joined #ruby
[03:19:04] advorak: has joined #ruby
[03:19:28] Yiota: has joined #ruby
[03:19:53] jenrzzz: has joined #ruby
[03:21:29] shevy: when it comes to classes and modules, it often helps when you specify how you wish to use the code from somewhere else
[03:21:48] bruno-: has joined #ruby
[03:21:55] bogdanteleaga: has joined #ruby
[03:24:28] Cache_Money: has joined #ruby
[03:26:18] LMity: has joined #ruby
[03:26:55] ta: has joined #ruby
[03:27:31] j_mcnally: has joined #ruby
[03:29:23] revath: has joined #ruby
[03:31:09] Limix: has joined #ruby
[03:31:32] francois_: has joined #ruby
[03:32:39] michael_mbp: has joined #ruby
[03:32:40] Ropeney: has joined #ruby
[03:33:09] shevy: like, when you have a module or a class called Ftp
[03:33:25] shevy: if you wish to connect to some ftp site, perhaps a method Ftp.connect may be appropriate
[03:33:55] hahuang65: has joined #ruby
[03:34:28] konsolebox: has joined #ruby
[03:39:37] j4cknewt: has joined #ruby
[03:42:56] lessless: has joined #ruby
[03:44:53] Scroff: has joined #ruby
[03:45:32] bkxd: has joined #ruby
[03:45:55] ylla: has joined #ruby
[03:46:09] RickHull: has joined #ruby
[03:47:46] gix: has joined #ruby
[03:48:22] RickHull: Hi, i'm running into a dependency conflict that I'm wondering if/how I can workaround. specifically i want to use privately authored gem A, which depends on Slop v4. but now I can't use it with chef gem or anything that depends on pry, which mandates slop no higher than 3
[03:48:30] qubits: has joined #ruby
[03:48:32] Scripore: has joined #ruby
[03:48:45] RickHull: gem A uses slop only for the executable portions, not the lib stuff
[03:48:47] qubits: Greetings all, I am fairly new to ruby but this little hangup has a several hour job ground to a halt
[03:48:49] RickHull: and it's the lib stuff I need
[03:48:50] qubits: root@highlands:/var/www/snorby# rake snorby:setup
[03:48:53] qubits: rake aborted!
[03:48:55] qubits: Bundler::InvalidOption: The gemspec at /var/lib/gems/2.1.0/bundler/gems/snorby_cas_authenticatable-281a58b36368/devise_cas_authenticatable.gemspec is not valid. The validation error was 'duplicate dependency on devise (>= 1.0.6), (>= 0) use: add_runtime_dependency 'devise', '>= 1.0.6', '>= 0'
[03:49:01] shevy: yeah that sucks RickHull
[03:49:02] swgillespie: has joined #ruby
[03:49:07] drocsid: I'm trying to open an external program from ruby using popen3. When I start the program from the command line, I see stuff printed to my terminal. I assume this is stdout. But when I try to print standard out from ruby, I don't see anything: http://pastie.org/10240656 . What do I need to do?
[03:49:08] RickHull: I'm wondering if there's anythign i can do with gem activation
[03:49:20] shevy: RickHull you can always open up a gem, modify the .gemspec and get rid of the hardcoded block there
[03:49:21] RickHull: shevy: or, i'm thinking of undeclaring hte dependency on slop in the gemspec
[03:49:28] shevy: yes that can also work
[03:49:33] shevy: and you handle the dependency internally to
[03:49:38] RickHull: well, it does seem stupid for chef to depend on pry as runtime dependency
[03:49:46] RickHull: i have no idea why they would do that
[03:49:50] shevy: remember, gem does nothing special; everything is just plain ruby files, and you can always modify these .rb files as well
[03:49:53] shevy: no idea either
[03:50:02] shevy: for my gems, I got rid of mandatory versioned-loading
[03:50:06] shevy: because it kept on blocking me :\
[03:50:19] drocsid: oh mighty rubyists, do you have any idea on what I'm doing wrong?
[03:51:33] RickHull: drocsid: take a look at https://github.com/rickhull/gitdis/blob/master/lib/gitdis.rb#L7
[03:52:24] RickHull: note that i'm using select to decide what has stuff ready for me to read, and then doing read_nonblock
[03:53:19] dented42: has joined #ruby
[03:53:24] RickHull: you probably want to avoid gets outside of interactive input
[03:54:08] RickHull: shevy: what do you mean "got rid of mandatory versioned-loading"?
[03:54:32] drocsid: RickHull: I will try to modify your example, and see if I have any luck. Thanks.
[03:54:57] davedev24: has joined #ruby
[03:55:05] skippy_77: has joined #ruby
[03:55:07] RickHull: drocsid: you might just copy/paste and see if it works for you
[03:57:32] krisquigley: has joined #ruby
[03:58:22] tsou: has joined #ruby
[03:58:57] Oog: has joined #ruby
[03:59:00] veinofstars: has joined #ruby
[04:01:17] hahuang65: has joined #ruby
[04:01:40] Kricir: has joined #ruby
[04:01:55] skade: has joined #ruby
[04:02:29] drocsid: RickHull: I tried your example, and the same. Nothing output to the terminal. http://pastie.org/10240671
[04:03:11] simplyianm: has joined #ruby
[04:05:08] drocsid: asking around in #logstash too
[04:05:33] RickHull: looks like bytes is unset
[04:05:42] RickHull: also, just try it with `ls` and such first
[04:07:00] RickHull: you have two simultaneous issues: 1. is my command outputting what i think it is? and 2. is my code doing what i think it is?
[04:07:51] RickHull: try to isolate them and work on them independently
[04:08:05] RickHull: rather trial and error with 2 unknowns
[04:08:10] RickHull: *rather than
[04:09:42] gianlucadv: has joined #ruby
[04:10:35] zotherstupidguy: has joined #ruby
[04:12:45] failshell: has joined #ruby
[04:14:39] datanoise: has joined #ruby
[04:16:07] ogpastaling: has joined #ruby
[04:17:32] x1337807x: has joined #ruby
[04:18:03] Kricir: has joined #ruby
[04:18:05] mdz_: has joined #ruby
[04:18:24] drocsid: RickHull: I tried simpler commands earlier with my example, and it output. I will try to set bytes for your example.
[04:18:51] Kricir: has joined #ruby
[04:21:03] Kricir: has joined #ruby
[04:21:46] Cache_Money: has joined #ruby
[04:22:12] kies: has joined #ruby
[04:23:28] drocsid: RickHull: http://pastie.org/10240690, I set bytes. Your example works with ping, but not with this other command
[04:23:32] Kricir: has joined #ruby
[04:23:39] drocsid: similar to the example I presented in the begining
[04:24:48] RickHull: ok, so you'll have to demonstrate working versus not working
[04:25:42] RickHull: either show the same command executed both ways, one working one not
[04:27:01] drocsid: yeah so if you look at the paste above ^^ with the ping command, it works. With the other it doesn't. Maybe it has to do with the command that I'm running
[04:27:17] drocsid: which looks to be a wrapper starting a ruby process itself
[04:27:18] RickHull: i don't know what works vs doesn't work means
[04:27:30] RickHull: you'll literally have to demonstrate the same command "working" one way
[04:27:36] RickHull: and "not working" the other way
[04:27:39] RickHull: paste the results
[04:27:45] drocsid: try executing http://pastie.org/10240690
[04:28:33] ta: has joined #ruby
[04:29:16] jcaho: has joined #ruby
[04:29:18] drocsid: ruby test_logstash_single.rb
[04:29:18] drocsid: PING google.com ( 56(84) bytes of data.
[04:29:18] drocsid: 64 bytes from sea09s17-in-f3.1e100.net ( icmp_seq=1 ttl=57 time=11.3 ms
[04:29:21] drocsid: 64 bytes from sea09s17-in-f3.1e100.net ( icmp_seq=2 ttl=57 time=12.0 ms
[04:29:35] drocsid: and the code is at the paste link above
[04:29:36] mrmargolis: has joined #ruby
[04:30:15] drocsid: if I uncomment the ping command on http://pastie.org/10240690
[04:30:31] drocsid: and switch to the other command, the terminal just sits there after execution
[04:30:39] swgillespie: has joined #ruby
[04:30:50] drocsid: but when I run the other command from a shell, I see output on the terminal
[04:31:06] drocsid: anyhow, like I said earlier, maybe it has to do with the command I'm running
[04:31:29] drocsid: which seems to be a wrapper that launches a ruby program itself
[04:32:46] RickHull: my last piece of advice:
[04:33:00] RickHull: 1. find a command that "works" on the command line / shell
[04:33:17] RickHull: execute it, copy the output, paste it to pastebin. demonstrate the working case
[04:33:29] RickHull: copy the invocation, not just the output
[04:33:54] RickHull: 2. execute it via ruby code, show the invocation and what went into it, and hte output or lack thereof
[04:35:11] RickHull: ideally, you would execute #2 via a tiny wrapper script. e.g. #!/usr/bin/env ruby which accepts `cmd` as a cmdline arg, and then executes it, passing through STDERR and STDOUT
[04:36:04] drocsid: RickHull: I think I know what's going on, and that will take 15 more minutes. I believe I clearly showed you enough above.
[04:36:55] RickHull: drocsid: e.g. https://gist.github.com/rickhull/cf5501100daa7e26780a
[04:37:08] RickHull: drocsid: you haven't shown a single example of working vs not working
[04:37:24] RickHull: on a paste link
[04:39:05] drocsid: I showed you the program I ran, two ways. I pasted the example of it working here. There isn't much to see really
[04:39:22] RickHull: multiline pastes here are usually ignored
[04:39:52] RickHull: IRC is a bad medium for reading code and output
[04:40:15] drocsid: Ok, I will paste this for you, but I think the issue is the program I'm running isn't a simple shell command, and is launching it's own subshells
[04:40:44] RickHull: popen3 doesn't really touch the shell
[04:40:51] RickHull: it just invokes a process
[04:41:37] Rollabunna: has joined #ruby
[04:43:41] Kricir: has joined #ruby
[04:45:14] riotjones: has joined #ruby
[04:46:30] nahtnam: has joined #ruby
[04:46:31] drocsid: RickHull: http://pastie.org/10240719
[04:46:39] RickHull: the process inherits the environment from the caller. i.e. `env` has the same output in parent and chile
[04:47:16] hazelux: has joined #ruby
[04:47:28] RickHull: drocsid: ok, we've established the code does what it says it does, in the one case of ping
[04:47:56] RickHull: and one last time, to be clear
[04:48:09] RickHull: let's see the output of the command as executed in shell on the command line
[04:48:14] RickHull: that's the "working version"
[04:48:23] RickHull: and then the very same command invoked via ruby / popen
[04:48:28] RickHull: then "non working version"
[04:48:36] RickHull: and show the invocation and what goes into it
[04:49:17] RickHull: in the case of ping, we don't need it
[04:49:18] krz: has joined #ruby
[04:49:34] x0F: has joined #ruby
[04:49:35] RickHull: i trust you that `ping` on CLI has ouput equivalent to what youv'e shown when invoked via popen3
[04:49:38] workmad3: has joined #ruby
[04:49:39] drocsid: RickHull: do you want me to set -x and run the non-wokring command
[04:49:50] drocsid: and paste it
[04:50:08] hyperjuice: has joined #ruby
[04:50:17] RickHull: literally the invocation of logstash blah blah
[04:50:18] drocsid: I will just paste it from the terminal when I launch the command
[04:50:21] RickHull: on the command line
[04:50:27] RickHull: and then invocation of the very same command
[04:50:31] bootstrappm: has joined #ruby
[04:51:04] HotCoder: has joined #ruby
[04:51:25] RickHull: no offense, but i feel like you're not reading what i'm writing
[04:51:33] RickHull: > RickHull: either show the same command executed both ways, one working one not
[04:51:39] RickHull: that was like 20 minutes ago
[04:52:16] RickHull: i don't know how many different ways to try to communicate the same thing
[04:53:37] x44x45x41x4E: has joined #ruby
[04:53:57] djbkd: has joined #ruby
[04:54:02] HotCoder: has joined #ruby
[04:55:00] nobitanobi: has joined #ruby
[04:55:48] revath: has joined #ruby
[04:56:26] drocsid: RickHull: http://pastie.org/10240730
[04:57:15] RickHull: not sure why you commented out sin.close_write
[04:57:34] RickHull: it shouldn't matter, but let's stick to the original for a moment
[04:57:59] drocsid: RickHull: I tried it both ways, because I want to pass stdin to it, that's what I want to do when I can get this to work.
[04:58:38] drocsid: as a bonus I pasted what I'm trying to launch
[04:58:40] RickHull: L64 and L69 don't agree
[04:58:55] mattarse: has joined #ruby
[04:59:05] RickHull: it's ok if you manipulated the paste a little bit for the sake of presentation
[04:59:20] CustosLimen: has joined #ruby
[04:59:21] RickHull: but what's the story with L64 and L69?
[04:59:57] drocsid: I put the number 2 in there for your sake
[05:00:08] drocsid: I just switch the comment for my sake
[05:00:12] Hanmac: has joined #ruby
[05:00:30] RickHull: ok, and so when you run it on cmdline, you get nothing on STDOUT, some stuff on STDERR, and failure exit code?
[05:00:43] last_staff: has joined #ruby
[05:00:48] RickHull: is that accurate?
[05:01:49] RickHull: also, for the sake of people helping, see if you can make extra effort to make the pastes faithful to what was actually run
[05:01:58] RickHull: i'm assuming there is no major bug in the code, and no major bug in the command
[05:02:05] yfeldblum: has joined #ruby
[05:02:06] RickHull: and that the problem is the way you are running it or your environment
[05:02:14] drocsid: I assumed what I see on my shell as STDOUT, maybe that is a poor assumption
[05:02:18] RickHull: and being faithful to those is how we will uncover it
[05:02:27] drocsid: look at the output of the running command
[05:02:27] RickHull: likely STDERR
[05:02:39] drocsid: isn't your script printing that also?
[05:02:46] RickHull: try blah_blah_foo_cmd > /tmp/stdout 2>/tmp/stderr
[05:02:51] drocsid: (f == sout ? $stdout : $stderr).print f.read_nonblock(1024)
[05:03:03] RickHull: that code is faithful to the process
[05:03:17] RickHull: the code says, if the process gave me something on stderr, print it on my own stderr
[05:03:24] RickHull: likewise for stdout
[05:03:34] lxsameer: has joined #ruby
[05:03:43] lxsameer: has joined #ruby
[05:03:50] wildroman2: has joined #ruby
[05:04:24] RickHull: just FYI, I don't want to get into the specifics of whatever command you're running. the logstash thing. but that it was what i'm referencing by `blah_blah_foo_cmd`
[05:04:35] RickHull: if blah_blah_foo_cmd is misbehaving, ok, take it up with blahblahfoo
[05:04:45] Scub_: whats the best way to go about printing all of an objects variables?
[05:04:47] RickHull: but popen3 and this code should be doing the right thing
[05:04:57] RickHull: Scub_: instance vars?
[05:05:14] Scub_: I believe - you'll have to forgive my ignorance on jargon
[05:05:26] RickHull: let's get the question right first
[05:05:37] RickHull: what is it you want to know?
[05:05:44] RickHull: any given object is an instance of a class
[05:05:59] RickHull: and it has some data stored in instance variables
[05:06:25] Scub_: I would like to obtain the data from all instance variables :D
[05:06:34] RegulationD: has joined #ruby
[05:07:12] drocsid: RickHull: Thanks for trying to help
[05:07:14] RickHull: one way is `pry` purely for exploration
[05:08:06] drocsid: I guess our conclusion is that logstash is misbehaving
[05:08:08] RickHull: another way is Object#inspect, which usually displays ivar values
[05:08:30] RickHull: drocsid: yeah, i mean the way to do that is to cut the popen stuff out, and make sure it does what you expect on cmdline
[05:08:44] RickHull: once it does that, the popen stuff should be transparent
[05:08:58] drocsid: from my terminal I launch it, and I see the lines pasted
[05:09:05] drocsid: that I pasted
[05:09:15] drocsid: from popen, I do not
[05:09:39] RickHull: from popen's perspective, things are pretty simple
[05:09:41] pragmatism: has joined #ruby
[05:10:06] Scub_: RickHull: is there an inline way to drop into pry similar to 'require "debug"'
[05:10:06] RickHull: your program is either outputting stuff on STDERR, STDOUT, or it is done executing and has yielded a process status
[05:10:27] RickHull: Scub_: pry is used several ways. 1. as a REPL (like irb)
[05:10:34] RickHull: 2. Pry.binding
[05:10:44] Akagi201: has joined #ruby
[05:10:53] RickHull: for exploring object space, it's a good one in REPL mode
[05:10:54] pontiki: (binding.pry)
[05:11:01] RickHull: pontiki: thanks!
[05:11:19] RickHull: for debugging a particular app, binding.pry (or w/e) is maybe more useful
[05:11:25] pontiki: (you might guess i use it a *lot*)
[05:12:01] RickHull: drocsid: so if you suspect popen is misbehaving, you should be able to make a sample program that prompts the misbehavior
[05:12:21] RickHull: e.g. obviously write to STDERR and show that popen isn't recognizing it
[05:12:51] RickHull: drocsid: myself, i'm pretty sure popen is being transparent, and you're invoking something wrong, or the logstash thing is misbehaving
[05:12:51] pontiki: that seems highly unliikely
[05:13:15] RickHull: drocsid: i tried my best to tease that out, but yeah, i'm backing out of this one
[05:13:59] RickHull: good luck, and let us know if you can trace any misbehavior back to popen
[05:14:14] drocsid: RickHull: Looks like I'm not patient enough. It launches quick from the terminal, but it takes a few minutes to launch using popen
[05:14:23] RickHull: drocsid: interesting
[05:14:24] drocsid: RickHull: my bad
[05:14:31] RickHull: heh, no worries
[05:14:40] RickHull: there actually may be some issue you can fix
[05:14:51] RickHull: try the close_write again
[05:15:02] RickHull: just for troubleshooting / data gathering / behavior observation
[05:15:21] RickHull: if you don't close_write on the input, it may be blocked waiting for input
[05:15:25] RickHull: which is why the big stall
[05:15:28] drocsid: ok, my whole intention is to try to send this process standard in, so I will try that also
[05:15:29] RickHull: IO is hard, let's go shopping (no joke)
[05:15:41] Torrieri: has joined #ruby
[05:17:31] RickHull: if you want to try something instead of close_write, you could do e.g. sin.write("hi mom")
[05:17:42] RickHull: that might actually trigger the process to yield output
[05:17:54] RickHull: or maybe "hi mom\n"
[05:18:02] yeticry: has joined #ruby
[05:19:14] krz: has joined #ruby
[05:22:08] iamninja: has joined #ruby
[05:22:40] flughafen: shevy: certainty
[05:23:34] swgillespie: has joined #ruby
[05:26:24] Musashi007: has joined #ruby
[05:28:56] mike___1234: has joined #ruby
[05:30:09] ta: has joined #ruby
[05:30:24] patrickanth0ny: has joined #ruby
[05:31:44] joaomdmoura: has joined #ruby
[05:32:41] riotjones: has joined #ruby
[05:35:16] tagrudev: has joined #ruby
[05:36:14] havenwood: has joined #ruby
[05:37:45] minmax: has joined #ruby
[05:39:12] mike___1234: has joined #ruby
[05:39:49] datanoise: has joined #ruby
[05:41:23] aganov: has joined #ruby
[05:46:17] Soda: has joined #ruby
[05:46:24] krisquigley: has joined #ruby
[05:51:50] darkf_: has joined #ruby
[05:52:40] bronson: has joined #ruby
[05:53:51] Oog: has joined #ruby
[05:55:09] aapole: has joined #ruby
[05:56:02] spider-mario: has joined #ruby
[05:56:29] ndrei: has joined #ruby
[05:57:21] chouhoulis: has joined #ruby
[05:58:22] bluOxigen: has joined #ruby
[05:58:58] yardenbar: has joined #ruby
[06:01:40] acke: has joined #ruby
[06:01:41] failshell: has joined #ruby
[06:02:02] ebbflowgo: has joined #ruby
[06:04:22] sarlalian: has joined #ruby
[06:04:23] MatthewsFace: has joined #ruby
[06:05:59] Miphix: has joined #ruby
[06:06:20] duncannz: has joined #ruby
[06:06:49] Xeago: has joined #ruby
[06:09:52] chinmay_dd: has joined #ruby
[06:11:00] RickHull: drocsid: any new findings?
[06:12:34] hyperjuice: has joined #ruby
[06:13:43] keen_______: has joined #ruby
[06:14:12] ScriptGeek: has joined #ruby
[06:14:32] vdamewood: has joined #ruby
[06:15:40] michael_mbp: has joined #ruby
[06:18:16] n008f4g_: has joined #ruby
[06:18:39] mrmargolis: has joined #ruby
[06:18:40] michael_mbp: has joined #ruby
[06:20:02] revath: has joined #ruby
[06:21:01] francois_: has joined #ruby
[06:23:50] krowv: has joined #ruby
[06:25:47] railsraider: has joined #ruby
[06:28:29] emilkarl: has joined #ruby
[06:29:52] skade: has joined #ruby
[06:30:26] krowv: Hi channel. I'm trying to learn some ruby gtk programming on Ubuntu. If I apt-get install the ruby-gtk3 package I would expect things to work but they don't. If I do sudo gem install gtk3 things work though. Wondering what the point of the ruby-gtk3 package is though?
[06:30:37] krowv: I'm using Ubuntu 15.04
[06:32:54] rht: has joined #ruby
[06:32:57] towski_: has joined #ruby
[06:33:47] ohaibbq: has joined #ruby
[06:33:51] wildroman2: has joined #ruby
[06:34:38] bigkevmcd: has joined #ruby
[06:35:16] armyriad: has joined #ruby
[06:37:30] revath: has joined #ruby
[06:38:23] workmad3: has joined #ruby
[06:42:30] Rollabunna: has joined #ruby
[06:42:34] vdamewood: krowv: Describing something at not working seldom provides information needed to help. It would probably work better if you described what you tried to do, what you expected, and what happened instead.
[06:43:00] Xeago: has joined #ruby
[06:43:15] codecop: has joined #ruby
[06:44:00] krowv: vdamewood, ok. I'll try to rephrase
[06:44:48] RickHull: krowv: sudo vs not has nothing to do with the (remote) package itself
[06:44:56] RickHull: sudo only affects your local machine and its permissions
[06:45:02] krowv: vdamewood, I installed a stock version of Ubuntu and grabbed a simply ruby gtk script from here. http://zetcode.com/gui/rubygtk/introduction/
[06:45:14] krowv: I then did sudo apt-get install ruby-gtk3
[06:45:30] RickHull: ok, heads up, apt-get is using debians packages and packaging system
[06:45:39] krowv: When I try to run the simple example I get an error.
[06:45:44] RickHull: which is fine, more or less, except you'll need to go to #debian for support
[06:45:56] vdamewood: krowv: So, what's the error?
[06:46:11] RickHull: the best way to get support here is to install gems via `gem` and not `dpkg` or `apt-get`
[06:46:23] RickHull: sudo or otherwise
[06:46:35] vdamewood: Oh... I think I see what's going on.
[06:46:38] krowv: If I do gem install gtk3 everything works
[06:46:46] krowv: or more specifically sudo gem install gtk3
[06:47:03] RickHull: kronw, it depends on your specific setup
[06:47:10] RickHull: but it sounds like you are set up for system gems
[06:47:17] RickHull: in which case, yes, use `sudo gem install`
[06:47:30] tkuchiki: has joined #ruby
[06:47:38] krowv: http://pastebin.com/rHd9Y0D9
[06:47:39] ruboto: krowv, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1357cf0f6e19236e70bf
[06:47:39] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[06:47:42] RickHull: it's possible to make ruby and rubygems work without sudo, but it's trickier
[06:48:05] semajs: has joined #ruby
[06:48:18] krowv: RickHull, that works fine. Just curious about why the ubuntu package doesn't work. I can go ask Ubuntu people about it.
[06:48:26] RickHull: krowv: you'll have to show the parts of simple.rb that do the requiring
[06:48:43] vdamewood: That's a question for Ubuntu people. Ruby people don't have anything to do with it.
[06:48:46] RickHull: yes, you'll get little sympathy or support here for quirks with the ubuntu pkg
[06:49:22] krowv: https://gist.github.com/anonymous/c53cabbb2e789bb8e157
[06:49:27] krowv: that is the simple.rb code
[06:49:37] krowv: RickHull, fair enough.
[06:49:46] RickHull: yeah, you gotta show the code, and then the invocation that produces the error
[06:49:55] RickHull: one or the other on its own isn't enough to troubleshoot
[06:50:35] RickHull: if you want support from here, use your distro's `ruby` and `gem` at most, and do e.g. `gem update --system` and install gems via gem
[06:50:58] RickHull: or if you want support from your distro, install all gems via distro pkg mgr
[06:51:11] RickHull: good luck with distro pkg mgr keeping up with `all gems`
[06:51:59] vdamewood: Most distros seem to have the 80/20 sebset of gems (or python modules, or CPAN modules, or whatever). The 20% that 80% of people use.
[06:52:07] vdamewood: sebset --> subset
[06:52:17] RickHull: vdamewood: which is fine if that's ~all~ you need
[06:52:29] RickHull: problems happen when 90% of what you want is available at distro
[06:52:30] casadei: has joined #ruby
[06:52:38] RickHull: then what do you do for the last 10%
[06:53:03] vdamewood: Personally, I build ruby from source and install it to /usr/local, then gem install everything.
[06:53:11] shevy: the problem is that some distributions modify things
[06:53:16] shevy: like debian + ruby + rubygems
[06:53:34] RickHull: right, so i would hesitate to advocate for going the distro route
[06:53:39] shevy: if they would support 100% then people could be sent to #debian or #ubuntu rather than ask here for problems deriving out of those modifications
[06:53:40] RickHull: as vdamewood seemed to
[06:53:59] vdamewood: Oh, I'm not advocating either way.
[06:54:13] fabrice31: has joined #ruby
[06:54:16] RickHull: cool, well i agree with your 80/20 statement
[06:54:22] krowv: Nod. Was just wondering if there was an easy way to stick with just the Ubuntu package. But I'll try and track down the Ubuntu people that put the package together and ask them
[06:54:25] RickHull: for newbies it can be tough to decide which route to take
[06:54:42] shevy: they get present n different options to pick from
[06:55:10] shevy: I like that vdamewood compiles from source, I click the like button!
[06:55:11] krowv: I'm familiar with the ubuntu packaging process so thats my comfort zone. Going "outside" the distro typically scares me.
[06:55:23] RegulationD: has joined #ruby
[06:55:29] RickHull: yep, here are 5 critical options. they will affect everything you do from here. please choose 1 wisely
[06:55:37] RickHull: noob: WTFOMGBBQ
[06:55:38] Xeago: has joined #ruby
[06:55:43] krowv: for example, I don't know the "rules" for when gems update, if they would work across different versions of the distributions, etc.
[06:56:07] shevy: if ubuntu can answer all of that then this is great :)
[06:56:11] roolo: has joined #ruby
[06:56:14] sandstrom: has joined #ruby
[06:56:23] RickHull: krowv: ruby people will say to use rubygems
[06:56:28] RickHull: debian people will say use dpkg
[06:56:37] RickHull: ubuntu people will say use
[06:56:46] shevy: btw krowv on https://gist.github.com/anonymous/c53cabbb2e789bb8e157 I think you can omit Gtk.init
[06:56:56] shevy: at least on gtk2 that was possible
[06:56:58] pyon: has joined #ruby
[06:56:59] rdark: has joined #ruby
[06:57:10] Asher: has joined #ruby
[06:57:20] shevy: ubuntu follows debian too, so dpkg + apt + aptitude; dpkg is written at least in large parts in perl
[06:57:29] certainty: flughafen: moin
[06:57:41] flughafen: sup certainty
[06:58:00] certainty: flughafen: not much. We're investigating saltstack. thanks for the hint
[06:58:14] flughafen: saltstack is good!
[06:58:25] krowv: ok, thanks for the help everyone...
[06:59:03] shevy: flughafen ready for take off?
[06:59:10] certainty: flughafen: yeah that's what we figure too. For orchestration we're definitely going to use it. I'd like to use it for CM as well
[06:59:19] bruno-: has joined #ruby
[06:59:52] krowv: RickHull, snappy is the new packaging format that Ubuntu seems to be working on. Different format, different tools to manage
[07:00:04] RickHull: krowv: yes thanks
[07:01:11] RickHull: has left #ruby: ()
[07:01:41] strixd: has joined #ruby
[07:02:36] surs: has joined #ruby
[07:03:51] shevy: snappy the crocodile?
[07:04:19] lkba_: has joined #ruby
[07:06:14] niemc2: has joined #ruby
[07:06:44] krowv: found a #debian-ruby channel on irc.debian.org. Gonna see if anyone is awake there
[07:07:37] andikr: has joined #ruby
[07:07:37] shevy: irc.debian.org
[07:07:42] shevy: thought freenode, damn
[07:07:57] hahuang65: has joined #ruby
[07:08:52] vdamewood: I always wonder why foss projects host their own servers.
[07:09:53] sigurding: has joined #ruby
[07:10:48] krowv: irc.debian.org is oftc
[07:14:47] edwinvdgraaf: has joined #ruby
[07:16:05] shevy: vdamewood they love to control everything; see why they modify gem and ruby, by taking away mkmf by default
[07:17:46] vondruch: has joined #ruby
[07:17:56] revath: has joined #ruby
[07:18:54] anisha: has joined #ruby
[07:18:57] aapole: has joined #ruby
[07:19:34] antgel: has joined #ruby
[07:20:59] shevy: I have a yaml file, for libx11; the current name of the file is libx11.yml
[07:21:08] francois_: has joined #ruby
[07:21:17] shevy: the remote source archive is at: http://xorg.freedesktop.org/releases/individual/lib/libX11-1.6.3.tar.bz2
[07:21:43] shevy: now, for some strange reason, many years ago, I started to keep archives like that locally, in a schemata such as:
[07:21:45] railsraider_: has joined #ruby
[07:22:04] shevy: /Some/Path/LIBX11/libX11-1.6.3.tar.bz2
[07:22:16] dumdedum: has joined #ruby
[07:22:21] shevy: but nobody likes upcased directory names right?
[07:22:25] terlar: has joined #ruby
[07:22:48] shevy: so two alternatives to that: lowercased directory names; or same-cased directory name. Which one to pursue?
[07:22:52] intinig: has joined #ruby
[07:23:15] lavros: has joined #ruby
[07:23:22] alex88: has joined #ruby
[07:24:15] sandstrom: has joined #ruby
[07:25:09] Xeago: has joined #ruby
[07:25:30] dhjondoh: has joined #ruby
[07:26:28] datanoise: has joined #ruby
[07:26:35] Forgetful_Lion: has joined #ruby
[07:26:40] ndrei: has joined #ruby
[07:27:14] vdamewood: has joined #ruby
[07:27:42] revath: has joined #ruby
[07:28:26] gluten_hell_: has joined #ruby
[07:30:18] chussenot: has joined #ruby
[07:31:20] sinkensabe: has joined #ruby
[07:32:53] mattarse: has joined #ruby
[07:32:54] bigkevmcd: has joined #ruby
[07:33:22] jph98_: has joined #ruby
[07:33:27] GPrime: has joined #ruby
[07:33:33] flughafen: how was your weekend shevy
[07:33:48] shevy: I was rewriting a big project
[07:33:52] shevy: that was not a lot of fun
[07:34:27] shevy: still have some side effects because of it img.rb:58:in `img': undefined method `name_of_img_dir?' for Bla:Module (NoMethodError)
[07:35:17] krisquigley: has joined #ruby
[07:35:44] flughafen: that's cool
[07:36:16] shevy: I hear you still got problems in Berlin too
[07:36:28] flughafen: i did go to the airport
[07:36:40] flughafen: my brother came in from out of town
[07:36:47] shevy: I just hope it will be the best flughafen in all of europe one day
[07:36:56] shevy: huh, via plane?
[07:37:05] livathinos: has joined #ruby
[07:37:23] krowv: for posterity I did figure out how to run my Simple GTK app with packages. apt-get install ruby-gtk3 ruby-atk ruby-gdk-pixbuf2 ruby-pango ruby-gdk3 will do the trick
[07:37:30] msgodf: has joined #ruby
[07:38:08] vdamewood: Why the heck didn't they make those dependencies?
[07:38:21] krowv: vdamewood, thats exactly the question I'm asking myself at the moment
[07:38:48] vdamewood: There's also brain-damaged stuff like this in distro repos.
[07:39:16] AlexRussia: has joined #ruby
[07:39:18] krowv: unfortunately everyone in #debian-ruby on OFTC seems to be asleep at the moment
[07:39:21] ruby-lang628: has joined #ruby
[07:39:52] vdamewood: Hmm... must be America-centric or something.
[07:40:02] grzywacz: has joined #ruby
[07:40:17] shinnya: has joined #ruby
[07:42:05] ta: has joined #ruby
[07:43:45] doerteDev: has joined #ruby
[07:43:55] allomov: has joined #ruby
[07:44:10] Hounddog: has joined #ruby
[07:44:10] shevy: for the source rubygnome packages, these things are bundled together: http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-2.2.5/ruby-gnome2-all-2.2.5.tar.gz
[07:44:43] shevy: but you probably don't need that now that you got the packages
[07:45:00] flughafen: shevy: we switched from selenium to phantomjs and our testsuite is 50% faster
[07:45:13] shevy: you reduced the amount of tests
[07:45:22] auzty: has joined #ruby
[07:45:30] flughafen: we don't need this installation, we don't need users, we don't need packages.
[07:45:57] apeiros: we don't need no education
[07:45:58] chussenot: has joined #ruby
[07:46:02] apeiros: and you're just another brick in the wall!
[07:46:33] ndrei: has joined #ruby
[07:48:11] Scroff: has joined #ruby
[07:48:29] shevy: I feel rick rolled
[07:48:37] fabrice31: has joined #ruby
[07:48:44] solars: has joined #ruby
[07:48:55] conta: has joined #ruby
[07:49:00] flughafen: yes, removing features/education.feature really saved us a lot of money.
[07:49:05] djellemah: has joined #ruby
[07:49:20] apeiros: shevy: but you've been pink floyded!
[07:50:20] failshell: has joined #ruby
[07:51:43] fsvehla: has joined #ruby
[07:51:57] hotpancakes: has joined #ruby
[07:52:31] Oog: has joined #ruby
[07:53:20] hotpancakes: Hi everyone. I'm looking for the best way to truly understand a gem's code and structure. Some have recommended pry. How is pry better than just reading the source on github?
[07:54:26] bkxd: has joined #ruby
[07:54:54] shevy: hotpancakes reading the source is nice; modifying the source is even better though
[07:55:23] hotpancakes: shevy: care to elaborate?
[07:57:48] CloCkWeRX: has joined #ruby
[07:57:58] flughafen: shevy: ask hotpancakes if any planes are taking off
[07:58:00] emilkarl: has left #ruby: ()
[07:58:28] tesuji: has joined #ruby
[07:58:42] shevy: hotpancakes you need to activate your brain
[07:58:45] intinig: has joined #ruby
[07:58:52] shevy: into getting it to understand what the hell the guy was smoking who wrote that code
[07:58:58] CloCkWeRX1: has joined #ruby
[07:59:11] shevy: that's how I was able to make the first modification to ruby-cgi in stdlib. it was a nightmare
[07:59:21] tomphp: has joined #ruby
[07:59:37] shevy: def unescapeHTML()
[07:59:43] apeiros: ACTION has got some doubts about the usefulness of shevy's advice???
[07:59:44] shevy: def CGI::parse
[07:59:59] shevy: oh that reminds me
[08:00:03] shevy: if foo then
[08:00:04] bruno-: has joined #ruby
[08:00:07] shevy: apeiros' style
[08:00:28] blueOxigen: has joined #ruby
[08:00:30] shevy: actually, let me try to remember the atrocities I discovered in ruby-cgi ...
[08:00:49] shevy: if words.find {|x| /=/n.match(x) }
[08:00:54] shevy: that took my brain a while to find out what that was
[08:01:41] shevy: string = string.join("") if string.kind_of?(Array)
[08:01:46] shevy: I decided I hate .kind_of?
[08:01:50] swerter: has joined #ruby
[08:01:53] shevy: and why is there a () anyway
[08:01:57] Musashi007: has joined #ruby
[08:02:29] shevy: wait, I got something even better
[08:02:43] yoongkang: has joined #ruby
[08:02:51] weszlem: has joined #ruby
[08:02:54] shevy: https://gist.github.com/shevegen/d42b6996301456f43c6a
[08:03:01] ringarin: has joined #ruby
[08:03:02] flughafen: what would apeiros do?
[08:03:05] shevy: my favourite part
[08:03:11] shevy: oh apeiros is an if-thenner
[08:03:18] shevy: he loves to randomly insert "then" all over the place
[08:03:27] shevy: if cat got milk then mouse is happy
[08:03:31] axl_: has joined #ruby
[08:03:35] apeiros: shevy: please don't speak for me. thanks.
[08:03:59] shevy: this is the best part:
[08:04:01] shevy: https://gist.github.com/shevegen/307f93770d3c5686e2b8
[08:04:18] shevy: wait sorry
[08:04:19] CustosLimen: has joined #ruby
[08:04:24] shevy: that was a modification, let me find the original
[08:04:56] shevy: there: https://gist.github.com/shevegen/4d410bbee31c2e3a29c7
[08:05:36] shevy: I guess matz really wanted to make ruby terse
[08:06:18] skade: has joined #ruby
[08:07:19] mrmargolis: has joined #ruby
[08:07:39] iwishiwerearobot: has joined #ruby
[08:07:55] hotpancakes: shevy: umm, now i feel inadequate as a programmer. understanding is hard :/
[08:09:14] shevy: hotpancakes in ruby there are lots of different styles
[08:09:24] shevy: hotpancakes I don't think I have ever used: end.something
[08:09:41] shevy: I like code to be extremely simple and linear, where my brain does not have to think
[08:10:17] shevy: hotpancakes but remember, you asked "best way to truly understand a gem's code and structure" and that can be very difficult depending on who wrote something
[08:10:48] shevy: ideally you would pick something written by a genius who writes simple but efficient code
[08:10:54] shevy: ask havenwood
[08:11:13] k3asd`: has joined #ruby
[08:11:14] hotpancakes: who's havenwood?
[08:11:29] arturmartins: has joined #ruby
[08:11:43] shevy: he also studied lots of code written by other people
[08:12:07] intinig: has joined #ruby
[08:12:49] troulouliou_dev: has joined #ruby
[08:14:43] hotpancakes: My issue is that reading most lines of code is a cakewalk, but I'm not sure how, let's say a gem, functions as a whole.
[08:15:03] hotpancakes: I guess I need to get more comfortable with blackboxing.
[08:15:13] RTG`: has joined #ruby
[08:15:35] chthon: has joined #ruby
[08:18:47] CloCkWeRX: has joined #ruby
[08:19:51] noname2: has joined #ruby
[08:23:19] hahuang65: has joined #ruby
[08:23:43] Stan: has joined #ruby
[08:26:59] dionysus69: has joined #ruby
[08:27:02] qwebirc2445: has joined #ruby
[08:27:10] workmad3: has joined #ruby
[08:27:30] ahmetkapikiran: has joined #ruby
[08:28:30] micmus: has joined #ruby
[08:28:34] qwebirc2445: any way of running WATIR without a gui
[08:30:26] bayed: has joined #ruby
[08:30:49] maxshelley: has joined #ruby
[08:31:45] jenrzzz: has joined #ruby
[08:32:41] futilegames: has joined #ruby
[08:34:05] livathinos: has joined #ruby
[08:34:13] JimBurns83: has joined #ruby
[08:34:22] Missphoenix: has joined #ruby
[08:34:32] dANO: has joined #ruby
[08:34:41] tedstriker: has joined #ruby
[08:35:04] bronson: has joined #ruby
[08:36:22] platzhirsch: has joined #ruby
[08:36:51] certainty: shevy: you can speak for me if you like
[08:37:23] flughafen: qwebirc2445: http://watirwebdriver.com/headless/
[08:37:36] lkba: has joined #ruby
[08:37:58] workmad3: has joined #ruby
[08:38:30] kwd: has joined #ruby
[08:38:55] Mia: has joined #ruby
[08:38:55] Mia: has joined #ruby
[08:39:39] timonv: has joined #ruby
[08:41:15] noname2: has joined #ruby
[08:43:21] Rollabunna: has joined #ruby
[08:44:08] A124: has joined #ruby
[08:44:15] RegulationD: has joined #ruby
[08:45:17] hardlin3r: has joined #ruby
[08:45:21] Xeago: has joined #ruby
[08:47:53] haxrbyte_: has joined #ruby
[08:49:19] ndrei: has joined #ruby
[08:49:35] aapole: has joined #ruby
[08:51:20] marr: has joined #ruby
[08:54:21] gluten_hell_: has joined #ruby
[08:54:45] [gmi]: has joined #ruby
[08:58:43] Xeago: has joined #ruby
[08:59:51] mister_solo: has joined #ruby
[09:00:04] lavros: has joined #ruby
[09:00:46] platzhirsch: has joined #ruby
[09:01:22] haxrbyte: has joined #ruby
[09:02:45] haxrbyte_: has joined #ruby
[09:02:47] ahmetkapikiran: has joined #ruby
[09:04:21] senayar: has joined #ruby
[09:04:28] yoongkang: has joined #ruby
[09:04:32] tcarter1719: has joined #ruby
[09:04:38] tcarter1719: has left #ruby: ()
[09:05:03] fabrice31_: has joined #ruby
[09:05:08] quimrstorres: has joined #ruby
[09:05:31] tcarter1719: has joined #ruby
[09:05:51] chinmay_dd: has joined #ruby
[09:06:11] CloCkWeRX: has joined #ruby
[09:09:25] terlar: has joined #ruby
[09:10:05] terlar: has joined #ruby
[09:11:41] Palmer11: has joined #ruby
[09:14:00] chinmay_dd: has joined #ruby
[09:14:16] Scrofff: has joined #ruby
[09:16:05] alphaatom: has joined #ruby
[09:17:50] tcarter1719: has joined #ruby
[09:18:09] futilegames: has joined #ruby
[09:18:43] hakunin: has joined #ruby
[09:18:53] quimrstorres: has joined #ruby
[09:20:57] drew00: has joined #ruby
[09:22:57] Cust0sLim3n: has joined #ruby
[09:23:05] ndrei: has joined #ruby
[09:23:56] stardiviner: has joined #ruby
[09:24:15] krisquigley: has joined #ruby
[09:25:24] weszlem: has joined #ruby
[09:26:11] multi_io: has joined #ruby
[09:28:17] datanoise: has joined #ruby
[09:29:25] charliesome: has joined #ruby
[09:29:29] babykosh: has joined #ruby
[09:30:49] bruno-: has joined #ruby
[09:31:41] babykosh: I have a rake task that is trying to set the value of a primary key on a model???.
[09:32:21] babykosh: but I???m having trouble???.how do I get this to work???.what goes in place of ???DEFAULT????
[09:32:52] babykosh: model_label = Model.new
[09:33:19] babykosh: model_label.primid = DEFAULT
[09:33:56] babykosh: model_label.save
[09:34:18] maloik: please paste the entire code in a gist so we can have a good look
[09:34:25] Oog: has joined #ruby
[09:34:30] maloik: try not to paste code in here :)
[09:34:46] jhass: -b byprdct!*@*$#ruby-fix-your-connection
[09:35:02] Zai00: has joined #ruby
[09:35:05] allomov: has joined #ruby
[09:35:17] DEA7TH: has joined #ruby
[09:35:21] jhooker: has joined #ruby
[09:36:07] mandarinkin: has joined #ruby
[09:36:12] bluOxigen: has joined #ruby
[09:36:50] lavros: has joined #ruby
[09:39:17] failshell: has joined #ruby
[09:39:28] vdamewood: has joined #ruby
[09:41:10] startupality: has joined #ruby
[09:43:18] babykosh: ok???ruby gods I hope this makes sense???.pastbin???.http://pastebin.com/01kVUUtG
[09:43:19] ruboto: babykosh, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/398814f1b3053578d8a8
[09:43:19] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[09:44:30] allomov: has joined #ruby
[09:45:04] krz: has joined #ruby
[09:45:23] senayar: has joined #ruby
[09:45:24] senayar: has joined #ruby
[09:45:44] apeiros: jhass gets my rubyhero nomination for this single ruboto plugin. seriously :D
[09:45:51] dhjondoh: has joined #ruby
[09:45:57] wjlroe: has joined #ruby
[09:46:21] Oxelist: has joined #ruby
[09:46:36] jhass: -b *!*@dab-*.dab.02.net
[09:46:57] wildroman2: has joined #ruby
[09:47:19] jhass: ?rails babykosh
[09:47:19] ruboto: babykosh, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[09:48:28] allomov: has joined #ruby
[09:51:26] codecop: has joined #ruby
[09:51:29] codecop_: has joined #ruby
[09:51:33] hotpancakes: has joined #ruby
[09:52:18] bruno-: has joined #ruby
[09:54:29] Zai00: has joined #ruby
[09:54:50] zipace: has joined #ruby
[09:56:16] mrmargolis: has joined #ruby
[09:56:17] lavros: has joined #ruby
[09:56:22] Zai00: has joined #ruby
[09:57:33] autrilla: has joined #ruby
[09:57:52] lkba_: has joined #ruby
[09:58:33] fabrice31: has joined #ruby
[09:58:51] pinecone: has joined #ruby
[10:02:16] ndrei: has joined #ruby
[10:05:05] fabrice31_: has joined #ruby
[10:05:24] pinecone: has joined #ruby
[10:06:00] stamina: has joined #ruby
[10:06:16] sarkyniin: has joined #ruby
[10:09:05] leafybasil: has joined #ruby
[10:09:46] Rollabunna: has joined #ruby
[10:12:06] hahuang65: has joined #ruby
[10:12:21] denver: has joined #ruby
[10:14:13] michael_mbp: has joined #ruby
[10:14:52] ndrei: has joined #ruby
[10:15:08] yfeldblum: has joined #ruby
[10:15:24] adaedra: salut ljarvis
[10:18:21] sigurding: has joined #ruby
[10:18:51] lavros: has joined #ruby
[10:19:50] segy: has joined #ruby
[10:19:56] drew00: has joined #ruby
[10:20:35] rickmasta: has joined #ruby
[10:22:18] Oxelist: has joined #ruby
[10:22:52] pepperbreath: has joined #ruby
[10:23:49] fabrice31: has joined #ruby
[10:23:54] quimrstorres: has joined #ruby
[10:24:59] senayar: has joined #ruby
[10:25:42] Musashi007: has joined #ruby
[10:27:01] ndrei: has joined #ruby
[10:27:11] Oog: has joined #ruby
[10:27:40] ex0ns: has joined #ruby
[10:27:55] revath: has joined #ruby
[10:29:55] mdw: has joined #ruby
[10:33:10] RegulationD: has joined #ruby
[10:33:13] Scroff: has joined #ruby
[10:34:27] dionysus69: has joined #ruby
[10:35:09] tvw: has joined #ruby
[10:35:42] fujimura: has joined #ruby
[10:38:14] sdothum: has joined #ruby
[10:39:56] sdothum: has joined #ruby
[10:40:47] bruno-: has joined #ruby
[10:42:22] lavros: has joined #ruby
[10:42:44] drzel: has joined #ruby
[10:42:49] krz: has joined #ruby
[10:43:28] ByronJohnson: has joined #ruby
[10:43:59] x44x45x41x4E: has joined #ruby
[10:44:21] romain_t: has joined #ruby
[10:45:49] bruno-: has joined #ruby
[10:46:50] cubny: has joined #ruby
[10:46:52] chinmay_dd: has joined #ruby
[10:47:21] ndrei: has joined #ruby
[10:48:02] intinig: has joined #ruby
[10:48:43] mengu__: has joined #ruby
[10:50:43] wildroman2: has joined #ruby
[10:50:44] bruno-: has joined #ruby
[10:51:15] bigkevmcd: has joined #ruby
[10:51:23] granthatcher: has joined #ruby
[10:52:06] granthatcher: has joined #ruby
[10:52:08] revath: has joined #ruby
[10:52:18] rodfersou: has joined #ruby
[10:55:48] bruno-: has joined #ruby
[10:55:56] GPrime: has joined #ruby
[10:56:57] iamninja: has joined #ruby
[10:57:27] hotpancakes: has joined #ruby
[10:58:46] revath: has joined #ruby
[10:58:57] grzywacz: has joined #ruby
[11:00:23] Pupeno: has joined #ruby
[11:00:48] aspiers: has joined #ruby
[11:00:48] bruno-: has joined #ruby
[11:01:22] brahman: has joined #ruby
[11:02:51] lavros: has joined #ruby
[11:03:12] mattarse: has joined #ruby
[11:03:12] emilkarl: has joined #ruby
[11:03:14] fabrice31: has joined #ruby
[11:03:50] joonty: has joined #ruby
[11:04:25] brahman: HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
[11:05:08] brahman: coming from a Perl background prepared statements tend to be the recommended way to interact with dbs.
[11:05:56] revath: has joined #ruby
[11:05:58] lessless: has joined #ruby
[11:06:38] terlar: has joined #ruby
[11:06:51] jhass: talking about the tmtm-ruby-mysql gem?
[11:07:27] Oog: has joined #ruby
[11:07:39] allcentury: has joined #ruby
[11:07:51] jhass: the most popular mysql client gem is mysql2
[11:08:23] brahman: jhass: Hi yes, but AFAIK mysql2 doesn't have prepared statements. Is that not an issue?
[11:08:59] yoongkang: has joined #ruby
[11:09:22] gluten_hell_: has joined #ruby
[11:10:10] ndrei: has joined #ruby
[11:10:16] bruno-: has joined #ruby
[11:10:40] brahman: jhass: I suppose I can use a for loop with the num_rows and process the results like that. but it doesn't seem clean
[11:11:50] jhass: https://github.com/brianmario/mysql2/pull/591
[11:11:59] jhass: looks like they'll be added in 0.4
[11:13:09] krisquigley: has joined #ruby
[11:13:53] jhass: according to docs prepare returns Statement, Statement#execute returns Result, Result includes all of Enumerable
[11:14:13] jhass: and also hash #each_hash
[11:14:14] brahman: jhass: the docs for tmtm ruby gem?
[11:14:31] skyrocker: has joined #ruby
[11:14:35] skyrocker: has left #ruby: ()
[11:14:41] skade: has joined #ruby
[11:14:46] brahman: yeah, not so clear. the each_hash method is only available with the non prepared statements.
[11:14:59] jhass: http://www.rubydoc.info/gems/tmtm-ruby-mysql/3.0.2/Mysql#prepare-instance_method -> http://www.rubydoc.info/gems/tmtm-ruby-mysql/3.0.2/Mysql/Statement#execute-instance_method -> http://www.rubydoc.info/gems/tmtm-ruby-mysql/3.0.2/Mysql/Result
[11:14:59] brahman: ie the db.query('SQL')
[11:16:05] jhass: is that so? what error do you get?
[11:19:02] bruno-: has joined #ruby
[11:19:24] jhass: I don't see anything in the code that would indicate that
[11:19:58] senayar: has joined #ruby
[11:20:56] brahman: jhass: undefined method `each_hash' for #<Mysql::Stmt:0x007f899a926d70> (NoMethodError)
[11:21:15] jhass: uh, you have to execute a prepared statement
[11:21:17] jhass: see my second link
[11:21:23] workmad3: brahman: that looks like you're trying to iterate over the prepared statement, not the result of executi... as jhass said
[11:21:36] brahman: yes, my statement is being executed AFAIK
[11:21:39] JDiPierro: has joined #ruby
[11:21:40] brahman: will double check
[11:21:55] jhass: or you don't call it on the result of the execute call
[11:22:01] serivich: has joined #ruby
[11:22:52] workmad3: brahman: the results are returned from `execute`, calling `execute` doesn't morph the statement into a result set
[11:23:49] diegoviola: has joined #ruby
[11:24:46] CloCkWeRX: has joined #ruby
[11:25:58] CloCkWeRX: has left #ruby: ()
[11:26:30] weszlem: has joined #ruby
[11:26:48] bruno-: has joined #ruby
[11:27:37] senayar: has joined #ruby
[11:27:37] senayar: has joined #ruby
[11:27:51] hahuang65: has joined #ruby
[11:27:56] failshell: has joined #ruby
[11:27:58] Xeago: has joined #ruby
[11:28:11] brahman: workmad3: jhass: still not getting the each_hash when calling the execute method on my statement. itnerestingly I am not getting a resultset from the execute
[11:28:47] jhass: what do you get instead?
[11:29:44] aapole: has joined #ruby
[11:30:03] brahman: a Mysql::Stmt:0x007fa1fb746540 object
[11:30:17] brahman: but if I call fetch on the statement object I get a result.
[11:30:21] jhass: I don't think you look at the return value of execute
[11:30:53] j4cknewt: has joined #ruby
[11:31:02] jhass: return StatementResult.new(@mysql, @fields)
[11:31:11] jhass: return nil
[11:31:21] brahman: I can keep fetching on the statement as per the docs and I keep getting the next row.
[11:31:24] jhass: all other branches raise
[11:31:43] jhass: http://www.rubydoc.info/gems/tmtm-ruby-mysql/3.0.2/Mysql/StatementResult StatementResult < Result
[11:31:52] strixd: has joined #ruby
[11:32:02] jhass: so I still think you don't look at the return value of execute
[11:32:03] quimrstorres: has joined #ruby
[11:32:26] jhass: Mysql::Stmt ?!
[11:32:36] jhass: where does that come from?
[11:32:59] jhass: that class doesn't exist in the gem
[11:33:42] sameerynho: has joined #ruby
[11:34:11] brahman: https://rubygems.org/gems/mysql
[11:34:14] brahman: this is the gem am using
[11:34:29] al2o3-cr: jhass, quick question, are post requests to github api json || xml ?
[11:34:37] veinofstars: has joined #ruby
[11:34:46] jhass: brahman: sigh
[11:34:58] jhass: brahman: 13:06 <jhass> talking about the tmtm-ruby-mysql gem?
[11:35:20] jhass: al2o3-cr: all json afaik
[11:35:32] lxsameer_: has joined #ruby
[11:35:36] al2o3-cr: jhass: ok thank you
[11:36:08] jhass: brahman: why did you even mention tmtm?!
[11:36:20] bronson: has joined #ruby
[11:36:24] Zai00: has joined #ruby
[11:37:02] AlexRussia: has joined #ruby
[11:37:35] bnagy: ACTION *popcorn eating intensifies*
[11:37:41] CloCkWeRX1: has joined #ruby
[11:38:15] Blaguvest: has joined #ruby
[11:38:21] jhass: I think I'll just ignore them
[11:38:38] lxsameer: has joined #ruby
[11:38:45] jhass: I mean I linked the docs of the other gem, mentioned methods and classes that don't exist in the mysql gem...
[11:39:03] jhass: copied ruby into the channel while the mysql gem is written in C
[11:39:07] brahman: jhass: Hi yes, but AFAIK mysql2 doesn't have prepared statements. Is that not an issue?
[11:39:30] brahman: I confirmed that I was using tmtm ruby module
[11:39:30] jhass: what the hell
[11:39:36] dhjondoh: has joined #ruby
[11:39:54] jhass: 13:11 <jhass> https://github.com/brianmario/mysql2/pull/591
[11:39:56] jhass: 13:11 <jhass> looks like they'll be added in 0.4
[11:40:06] brahman: the initial question mentions tmtm ruby module
[11:40:39] jhass: 13:06 <jhass> talking about the tmtm-ruby-mysql gem?
[11:40:43] jhass: are you unable to read or something?
[11:40:45] ljarvis: you're talking about 3 different libraries :|
[11:40:56] roolo_: has joined #ruby
[11:41:00] brahman: [12:04] <brahman> HI, am trying to use the tmtm ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
[11:41:12] ljarvis: 07:34 < brahman> https://rubygems.org/gems/mysql
[11:41:13] ljarvis: 07:34 < brahman> this is the gem am using
[11:41:13] apeiros: we all can read the backlog brahman
[11:41:15] jhass: I have no fucking clue what tmtm is, hence I asked for clarification
[11:41:16] brahman: Seriously?
[11:41:18] jhass: and you said yes
[11:41:18] apeiros: and ljarvis and jhass
[11:41:27] apeiros: brahman: get your act together and clarify which gems you're using.
[11:41:29] jhass: yeah sorry
[11:41:31] jhass: I'll /ignore
[11:41:39] dfockler: has joined #ruby
[11:42:03] cubny: has joined #ruby
[11:42:03] apeiros: I concur with jhass that the current information you gave is conflicting.
[11:43:06] brahman: seriously let's not get into a bitch fight. There was a misunderstanding. I did not add mysql to the tmtm module string in my original question.
[11:43:09] roolo__: has joined #ruby
[11:43:29] AlexRussia: has joined #ruby
[11:44:04] ljarvis: brahman: please just clarify by asking your question again with all information included
[11:44:14] Paradox: has joined #ruby
[11:44:46] rindolf: has joined #ruby
[11:44:57] sdothum: has joined #ruby
[11:45:02] apeiros: brahman: terms like "bitch fight" which just derogate half of earths population are not welcome. please mind your language.
[11:45:05] mrmargolis: has joined #ruby
[11:45:05] brahman: HI, am trying to use the tmtm-mysql ruby module and do not see an easy way to iterate over a prepared statement result. Is the prefered way to use the non prepared statement using the query method?
[11:45:16] LMity: has joined #ruby
[11:45:22] Dwarf: has joined #ruby
[11:46:07] ljarvis: brahman: is there a particular reason you're using this library over one of the more popular mysql solutions?
[11:46:47] ndrei: has joined #ruby
[11:46:53] j4cknewt: has joined #ruby
[11:47:07] brahman: ljarvis: none. I just looked up the libraries with prepared statements. mysql has them mysql2 doesn't.
[11:47:37] brahman: Am open to alternatives. I just need a nice interface with mysql.
[11:47:41] apeiros: brahman: your information is still conflicting. you did not resolve the unclarity.
[11:47:44] brahman: no need for an orm
[11:47:46] ljarvis: brahman: looks like Stmt.execute returns the original statement, and that includes a `fetch` method
[11:47:52] apeiros: brahman: tmtm-mysql != mysql
[11:48:06] ljarvis: you could also do `stmt.execute("...").each do |row|`
[11:48:37] workmad3: brahman: https://rubygems.org/gems/mysql <-- that is *not* the tmtm mysql gem
[11:49:22] workmad3: brahman: https://github.com/tmtm/ruby-mysql <-- that's the tmtm mysql gem, and it's on rubygems as *ruby-mysql*
[11:50:16] brahman: ljarvis: yeah and the fetch method returns the latest row, there are also ways to seek in the result set. Just not as easy as the each_hash or fetch_hash methods that the non-prepared statements provide.
[11:50:17] jgpawletko: has joined #ruby
[11:50:43] workmad3: oh, sorry.. it's on rubygems as tmtm-ruby-mysql
[11:50:49] brahman: apeiros: are you bringing anything positive to the discussion?
[11:51:02] yqt: has joined #ruby
[11:51:03] workmad3: heh, or both :)
[11:51:04] psyprus: has joined #ruby
[11:51:15] ljarvis: brahman: it has a fetch_hash method too
[11:51:15] jhass: yeah, 3.0 branch seems to be tmtm-ruby-mysql
[11:51:28] apeiros: brahman: seriously?
[11:51:32] brahman: yeah but it seems only for non prepared statements.
[11:51:51] ljarvis: brahman: https://github.com/tmtm/ruby-mysql/blob/master/lib/mysql.rb#L944 this is inside Stmt
[11:51:57] alem0lars__: has joined #ruby
[11:52:09] workmad3: ljarvis: he's using the mysql gem, not the tmtm mysql gem, going by his previous statements
[11:52:42] brahman: workmad3: this is the gem am using https://rubygems.org/gems/mysql
[11:52:47] yoongkang: has joined #ruby
[11:53:02] workmad3: brahman: yeah, the mysql gem
[11:53:11] workmad3: brahman: tmtm mysql is ruby-mysql or tmtm-ruby-mysql
[11:53:17] brahman: Tomita Mashahiro seems to be the author?
[11:54:01] brahman: fuck me sideways
[11:54:10] brahman: now am really confused
[11:54:19] brahman: you guys must be even more so
[11:55:19] francois_: has joined #ruby
[11:55:31] ahmetkapikiran: has joined #ruby
[11:55:39] workmad3: haha :) I'm grabbing lunch and leaving the confusion now ;)
[11:55:42] apeiros: brahman: maybe you do something positive for your own case and finally figure which gems you really use???
[11:56:05] ldnunes: has joined #ruby
[11:56:11] apeiros: instead of continuing to waste good people's time even after being told to do so???
[11:56:51] brahman: apeiros: Are you in need of some attention?
[11:57:04] apeiros: brahman: are you in need of help?
[11:57:09] Scrofff: has joined #ruby
[11:57:24] Scripore: has joined #ruby
[11:58:10] hotpancakes: has joined #ruby
[11:58:19] brahman: yes, I am. I have come here asked for help. realised I have made a mistake with the help of workmad3, ljarvis, jhass. You on the other hand...
[11:58:49] apeiros: I on the other hand am close to kick you.
[11:59:24] brahman: apeiros: for what?
[12:00:10] hoov: has joined #ruby
[12:00:22] brahman: workmad3, looking at the homepage of the gem I linked to. it seems to be "wrap unmodified tmtm's mysql-ruby extension into a proper gem."
[12:01:15] jmignault: has joined #ruby
[12:01:57] brahman: ljarvis: looking at the homepage of the gem am using it seems like it's unmaintained and also that Tomita Mashahiro is no longer maintaining the mysql-ruby gem.
[12:02:06] brahman: ljarvis: What gem do you use for mysql interactions?
[12:03:23] dstarh: has joined #ruby
[12:03:31] millerti: has joined #ruby
[12:03:37] brahman: apeiros: what for?
[12:03:41] ylla: has joined #ruby
[12:03:51] phutchins: has joined #ruby
[12:04:33] apeiros: brahman: lesser assholery.
[12:04:34] leafybas_: has joined #ruby
[12:04:51] brahman: apeiros: you are a funny fella that's for sure
[12:05:04] brahman: Definitely good to have a sense of humour with you around!
[12:05:11] iwishiwerearobot: has joined #ruby
[12:05:33] gregf_: brahman: just as in Perl you can use 'DBI' in ruby can use 'dbi' as well in ruby. but theres afaict theres nothing complicated in that mysql2 gem :/
[12:05:40] CloCkWeRX: has joined #ruby
[12:06:36] apeiros: brahman: you're on thin ice already. I suggest you drop it and get your act together as suggested before. I have no patience for people who don't care for the time they waste on others.
[12:07:06] ebbflowgo: has joined #ruby
[12:07:07] brahman: apeiros: you are absolutely right about the comment I made.It was disrespectful. For that I apologies.
[12:07:33] apeiros: ok, that's a good start. lets hope it continues.
[12:08:13] ebbflowgo: has left #ruby: ()
[12:08:15] gregf_: brahman: in Perl you'd do: use DBI; my $conn = DBI->conn("dbi:Oracle:mydb", "", "", {}) or die $!; my $dbh = $conn->prepare("select foo from bar"); my $str $dbh->execute();while ( my $data =$sth->fetch() ){ #whatever } <== that should be just the same using ruby
[12:08:37] brahman: gregf_: will give that a go.
[12:08:42] brahman: Thanks for this.
[12:09:16] banister: has joined #ruby
[12:10:11] k3asd`: has joined #ruby
[12:10:15] platzhirsch: has joined #ruby
[12:10:29] djellemah: brahman: http://sequel.jeremyevans.net/ It's not only an ORM. Always my first stop for anything SQL related.
[12:11:03] brahman: gregf_: that's sorted it.
[12:11:11] brahman: Thanks for your help.
[12:11:23] brahman: djellemah: Will look into this.
[12:11:27] chussenot: has joined #ruby
[12:11:42] brahman: Not sure I need an orm for this particular task though
[12:13:12] maxshelley: has joined #ruby
[12:13:41] brahman: djellemah: looks really interesting http://sequel.jeremyevans.net/rdoc/files/doc/sql_rdoc.html
[12:13:55] j4cknewt: has joined #ruby
[12:14:46] railsraider: has joined #ruby
[12:15:50] brahman: Is Sequel the more commonly used way to interface with mysql from ruby
[12:16:12] qwebirc98257: has joined #ruby
[12:16:41] ndrei: has joined #ruby
[12:16:48] AugustoCesar: has joined #ruby
[12:17:20] gagrio: has joined #ruby
[12:17:41] mdw: has joined #ruby
[12:18:14] platzhirsch: has joined #ruby
[12:18:17] chipotle: has joined #ruby
[12:18:22] coderhs: has joined #ruby
[12:18:32] chinmay_dd: has joined #ruby
[12:19:03] RegulationD: has joined #ruby
[12:19:05] ixti: has joined #ruby
[12:19:48] AugustoCesar: has left #ruby: ()
[12:19:59] but3k4: has joined #ruby
[12:20:14] apeiros: sequel is a popular way to connect to databases. even if just used as DBI.
[12:20:36] apeiros: for some reason other DBI solutions in ruby haven't caught on :-/
[12:21:18] canton7: that's because Sequel rules them all :P
[12:21:25] yorickpeterse: Sequel > everything
[12:21:32] apeiros: sure. but even before sequel.
[12:21:33] tcarter1719: has joined #ruby
[12:21:37] platzhirsch1: has joined #ruby
[12:21:57] hsps_: has joined #ruby
[12:22:16] mengu__: has joined #ruby
[12:22:31] schy: has joined #ruby
[12:22:52] cytoskeletor: has joined #ruby
[12:23:25] canton7: we had ActiveRecord, DataMapper, whatever that other one was
[12:23:59] apeiros: iirc AR was rather difficult to get out of rails back then. and DM wasn't even started.
[12:23:59] Oxelist_: has joined #ruby
[12:23:59] brahman: Sequel seems to do exactly what I need it to. especially when just used with SQL directly.
[12:24:19] apeiros: and AR was also only really usable as ORM. quite unlike sequel.
[12:26:00] maloik: Does anyone know if it's possible to automatically run a bunch of (rspec) shared examples for each model that has a certain module included? meta-programming-wise
[12:26:14] caseypatrickdris: has joined #ruby
[12:26:17] apeiros: aynway. we have sequel now. maybe one day we also will have competition in DBI libs for ruby.
[12:26:30] yorickpeterse: Well, there's that ROM Thing
[12:26:31] aryaching: has joined #ruby
[12:26:39] yorickpeterse: not sure if it's actually usable nowadays
[12:26:43] apeiros: yorickpeterse: does that also have a separate DBI part?
[12:26:58] yorickpeterse: No idea, I only saw some blogs about their relational algebra stuff
[12:27:00] al2o3-cr: why isn't this post request to github not working :(
[12:27:20] masone: has joined #ruby
[12:27:27] sarkyniin: has joined #ruby
[12:27:32] al2o3-cr: https://gist.github.com/gr33n7007h/2794c321df986498c92e
[12:28:05] goodcodeguy: has joined #ruby
[12:28:10] Akagi201: has joined #ruby
[12:28:11] j4cknewt: has joined #ruby
[12:28:13] allcentury: has joined #ruby
[12:28:35] al2o3-cr: might be because it's monday
[12:29:15] qwertme: has joined #ruby
[12:29:25] wildroman2: has joined #ruby
[12:29:25] Akagi201_: has joined #ruby
[12:29:39] jhass: al2o3-cr: just use the Net::HTTP#request_post helper
[12:29:49] yorickpeterse: better, just don't use Net::HTTP
[12:30:18] yorickpeterse: al2o3-cr: seriously, save yourself time and use https://github.com/nahi/httpclient
[12:30:22] bruno-: has joined #ruby
[12:30:26] al2o3-cr: jhass: will try with that give me a mo
[12:30:41] yorickpeterse: response = HTTPClient.post('url here', :body => JSON.dump(.....))
[12:30:44] yorickpeterse: something like that IIRC
[12:30:46] jhass: al2o3-cr: initheader = is useless btw, just assigns that local variable
[12:30:57] yorickpeterse: or with headers:
[12:31:06] al2o3-cr: yorickpeterse: thanks will have a look
[12:31:18] yorickpeterse: response = HTTPClient.post('url here', :body => JSON.dump(.....), :header => {'Content-Type' => 'application/json'}) (not sure if it was :header or :headers)
[12:31:42] al2o3-cr: thanks yorickpeterse
[12:31:53] jhass: al2o3-cr: I think you'll need http.use_ssl = true explicitly
[12:32:14] al2o3-cr: ah, of course jhass
[12:32:55] al2o3-cr: jhass: yep, that was thank you :)
[12:35:54] griffindy: has joined #ruby
[12:36:37] bruno-_: has joined #ruby
[12:36:53] allcentury: has joined #ruby
[12:37:15] Miphix: has joined #ruby
[12:37:18] j4cknewt: has joined #ruby
[12:37:57] Zai00: has joined #ruby
[12:38:25] imperator: has joined #ruby
[12:39:44] sdothum: has joined #ruby
[12:39:45] al2o3-cr: well, that works, but it's raw :(
[12:40:42] Rapier-: has joined #ruby
[12:41:32] msgodf: has joined #ruby
[12:41:47] al2o3-cr: nvm, found it under html_url :)
[12:41:50] charliesome: has joined #ruby
[12:42:05] jordanm: has joined #ruby
[12:42:30] JCOE: has joined #ruby
[12:43:06] chouhoulis: has joined #ruby
[12:43:32] chinmay_dd: has joined #ruby
[12:44:18] psyprus: has joined #ruby
[12:44:25] sarkyniin: if you want to create a class method that modifies an instance variable
[12:44:38] jcaho: has joined #ruby
[12:44:44] sarkyniin: should you just use @variable or use the instance variables's attr_accessor method?
[12:44:53] shum: has joined #ruby
[12:45:01] CloCkWeRX: has joined #ruby
[12:45:12] masone: I'm working on an APRS parser, wrapping libfap in ruby with ffi. The c struct has nested structs. The inner struct does not seem to get values populated and I always get a FFI::NullPointerError when accessing fields in it. Any ideas?
[12:45:13] masone: The base struct is: Package
[12:45:14] masone: The inner struct is: WxReport
[12:45:15] masone: https://github.com/masone/libfap-test
[12:45:16] masone: to reproduce the problem: rake test
[12:45:31] ddv: libfap lol
[12:47:22] apeiros: sarkyniin: how do you do it in instance methods? (it's the same question there really)
[12:47:36] ionull: has joined #ruby
[12:47:49] apeiros: sarkyniin: personally I prefer manipulating @ivars directly in methods. but there some argue that you should always go via accessors.
[12:48:08] Scripore: has joined #ruby
[12:48:19] sarkyniin: apeiros: I guess accessor feels more ordered
[12:48:44] apeiros: IMO it's more cognitive overhead when reading code. means you always have to check whether that accessor does additional stuff.
[12:49:00] apeiros: iow, more abstraction = heavier
[12:49:08] canton7: I think accessing the ivars directly is easier to reason about. I only use the accessors when they do additional stuff, so the fact that the accessor is used is a red flag to go check *why*
[12:49:14] al2o3-cr: jhass: http.request_post doesn't raise exceptions no?
[12:49:16] ionull: has left #ruby: ()
[12:49:20] djellemah: sarkyniin: depends if you want to modify it internally or externally.
[12:49:22] apeiros: canton7: same :)
[12:50:14] ebbflowgo: has joined #ruby
[12:50:25] jhass: al2o3-cr: uh, I'd expect it to raise the usual stuff if anything goes wrong
[12:50:30] jhass: so not sure
[12:51:06] al2o3-cr: jhass: ok cheers
[12:54:08] yalue: has joined #ruby
[12:54:39] sgambino: has joined #ruby
[12:56:27] sarkyniin: does anyone know how you can reply to a nitpick on exercism? Not that much ruby-related but I got directed there for ruby exercises
[12:56:44] futilegames: has joined #ruby
[12:56:55] unshadow: has joined #ruby
[12:57:45] masone: has joined #ruby
[12:58:06] ruv: has joined #ruby
[12:58:15] chinmay_dd: has joined #ruby
[12:58:28] thatkid: has joined #ruby
[12:58:45] Xeago: has joined #ruby
[12:59:12] startupality: has joined #ruby
[12:59:15] thatkid: Hello, can you help me write regex for matching domain which contain numbers http://example.com/3353-bla-blah ?
[12:59:27] umgrosscol: has joined #ruby
[12:59:42] aryaching: has joined #ruby
[12:59:51] apeiros: thatkid: sure. what have you got so far?
[13:00:00] al2o3-cr: thatkid: use URI.extract
[13:00:08] bmurt: has joined #ruby
[13:00:20] blackmesa: has joined #ruby
[13:01:04] revath: has joined #ruby
[13:01:13] apeiros: why nvm? depending on their needs, that's an excellent suggestion?
[13:01:57] al2o3-cr: oh, I thought meant specifically for urls with numbers
[13:02:07] krisquigley: has joined #ruby
[13:02:12] msnyon: has joined #ruby
[13:02:37] jhass: URI.extract is actually pretty bad tbh
[13:02:40] jhass: the regex isn't good
[13:02:46] apeiros: jhass: deprecated?
[13:02:52] apeiros: i.e. not matching modern urls?
[13:03:13] jhass: no, just not good for what you find if you throw it against a decent amount of user input
[13:03:15] quimrstorres: has joined #ruby
[13:03:29] jhass: twitter-text-rb so far ships the best extraction regexp I've found
[13:04:02] thatkid: apeiros: jsut starting, [\d] the 1st chara must be number and rest of the charactors are doesn't matter
[13:04:22] jhass: iirc what URI.extract does is technically correct, but just not what you want on arbitrary user input
[13:04:32] apeiros: jhass: remind me of that one when we add link extraction to ruboto :)
[13:05:12] fusillicode1: has joined #ruby
[13:05:12] veinofstars_: has joined #ruby
[13:05:15] byprdct: has joined #ruby
[13:05:15] fusillicode1: has left #ruby: ()
[13:05:30] juanpaucar: has joined #ruby
[13:05:59] JDiPierro: has joined #ruby
[13:06:02] gagrio: has joined #ruby
[13:06:03] luksaur: has joined #ruby
[13:06:44] CloCkWeRX: has joined #ruby
[13:07:00] ndrei: has joined #ruby
[13:07:37] gagrio: has joined #ruby
[13:08:01] masone: I have troubles with nested structs in ffi. Can you help me out? https://gist.github.com/masone/f65c56ff7eb52cdc6d41
[13:08:54] failshell: has joined #ruby
[13:08:57] dblessing: has joined #ruby
[13:09:54] jhass: thatkid: head to rubular.com, add a list of example inputs (not just one) and what your regex is so far
[13:10:01] jhass: click permalink and post it
[13:10:58] rickmasta: has joined #ruby
[13:11:15] malconis: has joined #ruby
[13:12:04] rickmasta: has joined #ruby
[13:12:30] mdw: has joined #ruby
[13:12:51] rickmasta: has joined #ruby
[13:13:33] kfpratt: has joined #ruby
[13:13:55] rickmasta: has joined #ruby
[13:14:14] djellemah: masone: coincidentally, one of my current projects it about to use dumbed-down variant of NMEA. I can't look right now though. Maybe in the next few days.
[13:14:32] djellemah: s/it about/is about/
[13:14:37] yfeldblum: has joined #ruby
[13:15:31] CloCkWeRX: has joined #ruby
[13:15:58] imperator: is there a way to define an alias on an instance variable? I've got a @var that's an openstruct instance, and i want to create some aliases after the initial creation
[13:16:03] masone: @djellemah Cool, let me know if you have time
[13:16:30] JEG2: has joined #ruby
[13:16:34] hahuang65: has joined #ruby
[13:16:52] mdz_: has joined #ruby
[13:17:19] startupality: has joined #ruby
[13:17:26] malconis: has joined #ruby
[13:17:54] imperator: instance_eval? is that the way to go?
[13:17:57] djellemah: imperator: use the "class << @var" singleton syntax
[13:18:10] imperator: djellemah, tried that, was hitting a scoping issue
[13:18:21] hinbody: has joined #ruby
[13:18:24] shevy: imperator you can alias a method through that
[13:18:37] shevy: self.instance_eval { alias base_directory server_base_directory? }
[13:18:51] imperator: shevy, yeah, seems to work, thanks
[13:19:12] shevy: I like your nick
[13:19:15] shevy: it inspires awe
[13:20:06] shevy: certainty I can't even speak for myself, I just got home again... it's raining... and it is hot... which is a strange combination.
[13:20:23] imperator: https://gist.github.com/djberg96/567dc74889e20d584578
[13:20:42] imperator: that's what i've got working
[13:21:22] startupality: has joined #ruby
[13:21:31] imperator: did i mention the delegation? well, there's delegation
[13:23:11] segfalt: has joined #ruby
[13:25:01] acovrig: has joined #ruby
[13:25:38] horsecowdog: has joined #ruby
[13:26:12] joonty: has joined #ruby
[13:26:24] acovrig: Is it possible to calculate the difference between 2 dates, only counting M-Th?
[13:27:12] acovrig: so, weekdays, randomly pushing Friday in to the ???weekend??? territory
[13:27:15] weszlem: has joined #ruby
[13:27:18] maloik: you mean count the number of weekdays in between two dates?
[13:27:44] alphaatom: has joined #ruby
[13:27:47] acovrig: maloik: yes, but counting Friday as not a weekday.
[13:28:03] adaedra: count the number of weeks and multiply by 4?
[13:28:05] leafybasil: has joined #ruby
[13:28:06] apeiros: M-Th = monday - thursday?
[13:28:20] acovrig: apeiros: yes
[13:28:28] maloik: `(date1..date2).to_a.reject { |d| d.cwday > X }` will work but might not be the most performant solution... not sure what X should be here but you get the idea
[13:29:07] apeiros: so the diff between today (monday) and yesterday would be 0?
[13:29:09] acovrig: adaedra: not quite, if a Monday is selected, then a Wednesday is selected 2 weeks later, it would be 2weeks + 2 days
[13:29:17] revath: has joined #ruby
[13:29:23] apeiros: and the diff between today and last thursday would be 1?
[13:29:40] fabrice31_: has joined #ruby
[13:30:37] acovrig: apeiros: example: datediff between today and the 24th of this month would be 7 days.
[13:30:49] apeiros: the answer to my questions would interest me more???
[13:31:17] fabrice31: has joined #ruby
[13:32:04] Xeago: has joined #ruby
[13:32:14] imperator: ah, crud, this isn't working with deeply nested ostructs
[13:32:57] acovrig: apeiros: those should throw an error because the start is > the end, but if using abs() then yes
[13:33:57] apeiros: easy but slow solution: (from..to).select { |d| d.wday.between?(1,4) }.size
[13:34:03] apeiros: assuming you use Date for from/to
[13:34:07] NeverDie: has joined #ruby
[13:34:20] mister_s_: has joined #ruby
[13:34:32] skade: has joined #ruby
[13:34:48] acovrig: apeiros: that seems like it could work; currenlty I???m using PHP but plan to switch to ruby/rails.
[13:34:59] RegulationD: has joined #ruby
[13:35:06] apeiros: faster solution: use arithmetics. Date#- gives number of days. divide by 7 to get the number of weeks. now you "just" have to adjust for the start/end of the range.
[13:36:20] maxshelley: has joined #ruby
[13:36:50] j4cknewt: has joined #ruby
[13:37:04] aapole: has joined #ruby
[13:37:14] mikecmpbll: has joined #ruby
[13:37:34] masone: has joined #ruby
[13:38:24] Scripore: has joined #ruby
[13:38:28] maxshelley: has joined #ruby
[13:39:01] imperator: shevy, added difficulty for you: https://gist.github.com/djberg96/567dc74889e20d584578
[13:39:28] yoongkang: has joined #ruby
[13:40:36] JoshL: has joined #ruby
[13:41:07] renanoronfle: has joined #ruby
[13:41:21] apeiros: rare to see the return value of ! methods actually being used???
[13:42:37] Parker0: has joined #ruby
[13:42:55] alphaatom: has joined #ruby
[13:43:34] langlands: has joined #ruby
[13:43:40] valkyrka: has joined #ruby
[13:44:21] acovrig: apeiros: sadly since I need to also make this work in PHP, I think I???m gonna have to use a switch statement to see if it is between Monday&Thursday *sigh*
[13:44:31] quimrsto_: has joined #ruby
[13:44:41] atomical: has joined #ruby
[13:44:53] ylla: has joined #ruby
[13:45:12] valkyrka: hi guys, I???m having issues with rake trying to load the nokogiri gem
[13:45:20] valkyrka: I???m trying to set up redmine and when running rake -T I see this
[13:45:21] valkyrka: https://gist.github.com/anonymous/e96bb2122ce60905754e
[13:45:42] imperator: apeiros, guess i don't actually need it there
[13:45:49] ndrei: has joined #ruby
[13:45:52] yorickpeterse: valkyrka: upgrade RubyGems
[13:45:54] valkyrka: running ruby 2.0.0p598 (2014-11-13) [x86_64-linux] and rake 10.4.2
[13:45:55] yorickpeterse: valkyrka: gem update --system
[13:46:07] valkyrka: let me try that
[13:46:14] jhass: valkyrka: it's odd that your gems directory isn't scoped to the Ruby ABI version, maybe you're hitting a version mismatch?
[13:46:25] yorickpeterse: jhass: No, they shuffled things around in RubyGems IIRC
[13:46:32] jhass: would be news to me
[13:46:37] jhass: I'm on latest stuff usually
[13:46:38] yorickpeterse: at some point Ruby/RubyGems decided to prioritize .rb files over .so files
[13:46:41] yorickpeterse: which was then reverted
[13:46:57] hotpancakes: has joined #ruby
[13:46:59] valkyrka: I did update it
[13:46:59] yorickpeterse: so if you did require 'foo' and you have both foo.rb and foo.so it would never load foo.so
[13:47:05] valkyrka: but I???m still getting the same error
[13:47:18] yorickpeterse: valkyrka: distro?
[13:47:56] atomical: has joined #ruby
[13:48:05] alphaatom|pc: has joined #ruby
[13:48:10] yorickpeterse: hm, also latest Bundler version
[13:48:13] jhass: either way, I think it's odd that it doesn't have the ABI version in the path
[13:48:24] Soda: has joined #ruby
[13:48:26] yorickpeterse: No that makes sense
[13:48:35] yorickpeterse: the require call is require 'nokogiri/nokogiri'
[13:48:42] yorickpeterse: which is supposed to load lib/nokogiri/nokogiri.so IIRC
[13:48:49] yorickpeterse: I suspect they have that shared Gem stuff set up
[13:49:06] yorickpeterse: so it's trying to load from .../gem/extensions/x86-whatever/nokogiri/nokogiri.so
[13:49:17] devdazed: has joined #ruby
[13:49:24] yorickpeterse: valkyrka: does re-installing Nokogiri make a difference?
[13:49:32] valkyrka: https://gist.github.com/anonymous/b879354435e135def08d
[13:49:59] jhass: and they didn't
[13:50:10] yorickpeterse: weird it's dumped into /usr/local/share
[13:50:21] jhass: I'd call distro bug
[13:50:27] valkyrka: [root@void redmine]# bundle show nokogiri
[13:50:47] yorickpeterse: valkyrka: gem pristine --extensions
[13:50:59] jhass: valkyrka: you can circumvent the the distro specific mess and do bundle install --path vendor/bundle and make sure to bundle exec all commands
[13:51:25] yorickpeterse: http://downloads.yorickpeterse.com/images/screenshot_2015_06_15_15_52_08.png
[13:51:27] yqt: has joined #ruby
[13:51:29] yorickpeterse: silly New Relic
[13:51:31] bougyman: that /usr/local stuff is not done by void.
[13:51:38] bougyman: we don't put anything in /usr/local
[13:51:38] yorickpeterse: bougyman: it's CentOS
[13:51:46] bougyman: the 'void' thing threw me off.
[13:52:05] jonathanwallace: has joined #ruby
[13:52:37] jonathanwallace1: has joined #ruby
[13:52:45] acke: has joined #ruby
[13:53:00] valkyrka: gem pristine --extensions
[13:53:09] shevy: I aliased /usr/local/ to /usr/
[13:53:14] valkyrka: that seemed to have fixed my issues yorickpeterse
[13:53:21] kobain: has joined #ruby
[13:53:35] jhass: valkyrka: I'd still consider my suggestion though
[13:54:05] valkyrka: ok, but before I do it - I don???t have the RPM for nokogiri installed
[13:54:09] valkyrka: does this make any difference?
[13:54:17] yorickpeterse: valkyrka: No, there's no RPM needed for gmes
[13:54:33] valkyrka: ok, because there was one
[13:54:37] rickmasta: has joined #ruby
[13:54:38] al2o3-cr: yay, my repaster is working :)
[13:54:40] valkyrka: and when I initially installed it, it showed both versions
[13:54:44] jhass: maybe, maybe not. They messed with the way Ruby upstream does things and it'll likely just end up with different bugs sooner or later
[13:54:53] valkyrka: when running gem list | grep nokogiri
[13:54:58] jhass: I'd sidestep their mess
[13:55:06] Scroff: has joined #ruby
[13:55:17] valkyrka: thanks a lot guys!
[13:55:32] rickmasta: has joined #ruby
[13:55:51] dorei: has joined #ruby
[13:57:09] rickmasta: has joined #ruby
[13:57:18] sinkensabe: has joined #ruby
[13:57:59] rickmasta: has joined #ruby
[13:58:23] j_mcnally: has joined #ruby
[13:58:28] mrmargolis: has joined #ruby
[13:58:29] dhjondoh: has joined #ruby
[13:58:49] symm-: has joined #ruby
[13:59:24] rickmasta: has joined #ruby
[13:59:36] quimrstorres: has joined #ruby
[13:59:47] imperator: well, it's not the most efficient thing, but it works: https://gist.github.com/djberg96/567dc74889e20d584578
[14:00:54] rickmasta: has joined #ruby
[14:01:06] jhass: imperator: public_send ?
[14:01:16] yorickpeterse: Hm, interesting seeing Oga apparently being less than 1% of one of my app's runtime
[14:01:25] diegoviola: my boss is an idiot, he requested I do some research on NLP but then he ask me to perform some database lookups and then return json for other apps to use it, then he goes away, what the f*ck I'm supposed to do now with that info?
[14:01:39] yorickpeterse: I guess caching the heck out of things actually worked
[14:01:54] yorickpeterse: diegoviola: do more research on it ofc
[14:02:05] imperator: jhass, sorry, what?
[14:02:10] jhass: yorickpeterse: how much of the memory consumption is it then? :P
[14:02:23] jhass: imperator: why use send and not public_send?
[14:02:36] yorickpeterse: jhass: not sure, New Relic doesn't let me break down memory usage
[14:02:37] Papierkorb: has joined #ruby
[14:02:41] yorickpeterse: can't really do that properly anyway
[14:03:03] yorickpeterse: getting memory usage out on Linux is still very hard in 2015
[14:03:11] yorickpeterse: (other than the total process' memory usage)
[14:03:15] imperator: jhass, hm, does it matter here? i guess i don't understand
[14:03:19] jhass: yeah, cgroups help a bit but that's just the external view
[14:03:19] endash: has joined #ruby
[14:03:34] pandaant: has joined #ruby
[14:03:50] rickmasta: has joined #ruby
[14:03:50] jpfuentes2: has joined #ruby
[14:04:26] al2o3-cr: apeiros: what was that link you posted yesterday about morning/night?
[14:04:27] jhass: imperator: probably not, pushing public_send is just on my secret agenda. personally I use public_send for "invoking methods in a dynamic way" and send for "hacking around limitations of a library"
[14:04:34] rickmasta: has joined #ruby
[14:04:46] jhass: I think that gives a nice hidden intent
[14:04:46] treehug88: has joined #ruby
[14:05:01] imperator: jhass, ah, ok, i've never looked at it
[14:05:06] Xeago: has joined #ruby
[14:05:10] imperator: though, i'm not even sure if this is the best approach
[14:05:18] rickmasta: has joined #ruby
[14:05:21] imperator: dunno of another way without reopening ostruct
[14:05:26] byprdct: has joined #ruby
[14:05:27] evanjs: has joined #ruby
[14:05:33] ruboto: it's morning, see http://www.total-knowledge.com/~ilya/mips/ugt.html
[14:05:58] al2o3-cr: thats it :)
[14:06:00] rickmasta: has joined #ruby
[14:06:07] yoongkang: has joined #ruby
[14:06:44] rickmasta: has joined #ruby
[14:06:52] dorei: ugt is antisocial i think :p
[14:06:59] jhass: +b Rickmasta!*@*$#ruby-fix-your-connection
[14:07:43] jhass: dorei: how so? it replaces just one pointless discussion with another :P
[14:07:59] imperator: jhass, looks like byprdct too
[14:08:15] jhass: well, it's a single one, let's give them another chance
[14:08:21] jhass: they said they fixed it
[14:08:24] yorickpeterse: Anybody here know any decent alternatives to https://github.com/rails-api/active_model_serializers? We've been using this for a while but using it outside of the Rails/AR world is quite clunky
[14:08:54] yorickpeterse: Looked into https://github.com/apotonick/representable but while it looks decent (doc/maintenance wise) it seems pretty fkn big
[14:09:29] yorickpeterse: The idea is to just have a class that we can use to pull fields out of every objects in an Enumerable of sorts
[14:09:37] yorickpeterse: without having to write that myself
[14:09:50] bmurt: has left #ruby: ()
[14:09:53] RegulationD: has joined #ruby
[14:10:13] yorickpeterse: also googling for "presenters" or "serializers" is next to impossible
[14:10:21] yorickpeterse: because either you get public speakers or serialization formats
[14:10:23] Kricir: has joined #ruby
[14:10:40] yorickpeterse: we've used Draper in the past as well, never again
[14:11:17] startupality: has joined #ruby
[14:11:58] JDiPierro: has joined #ruby
[14:12:02] someword: has joined #ruby
[14:12:59] jhass: these days searching directly on github can be quite decent, serializer language:ruby
[14:13:04] blackmesa: has joined #ruby
[14:13:38] dudedudeman: has joined #ruby
[14:14:24] platosha: has joined #ruby
[14:14:27] yorickpeterse: ugh, I hate emoji in Github commits
[14:14:31] yorickpeterse: reminds me of MSN too much
[14:14:56] yorickpeterse: at least they're not animated
[14:15:07] axl__: has joined #ruby
[14:16:33] yorickpeterse: "Brainstem is designed to power rich APIs in Rails. " (??????????)?????? ?????????
[14:16:40] yorickpeterse: don't build APIs in Rails *shakes canes*
[14:16:58] iwishiwerearobot: has joined #ruby
[14:17:49] yorickpeterse: ljarvis: I'm back at the office, that's what's up :P
[14:18:11] yorickpeterse: y'all enjoyed your 3 weeks of no rants, now it's back to business as usual
[14:18:13] Alina-malina: has joined #ruby
[14:18:18] ljarvis: yorant peterse
[14:18:48] dudedudeman: marnin err'oen
[14:19:00] enebo: has joined #ruby
[14:19:07] ljarvis: also building apis in rails is fine if you know what you're doing (or rather, know what rails is doing)
[14:19:16] yorickpeterse: enjoy the webscale
[14:19:47] ljarvis: how far does that argument scale? surely we just shouldn't use ruby
[14:20:01] ljarvis: pun perhaps intended
[14:20:03] yorickpeterse: well, yeah, you need to use Go/Node.js
[14:20:11] yorickpeterse: although Node.js is no longer cool
[14:20:24] jhass: btw we got #ruby-offtopic now, maybe you'll like it, it'll be like #ruby-lang without the occasional ruby questions :P
[14:20:25] yorickpeterse: There are already blog posts starting to show up titled "IS NODE.JS DYING?"
[14:21:00] yorickpeterse: https://github.com/felipeelias/resubject hm, this looks ok-ish but it doesn't seem to have whitelisting/renaming of fields
[14:21:10] yorickpeterse: well, it's just a decorator really
[14:21:12] bougyman: why didn't you just leave it as #ruby-lang, then?
[14:21:13] yorickpeterse: not really a serializer
[14:21:15] ljarvis: Ruby is great at APIs, and rails isn't specifically awful at it. You just have to know where to bend it
[14:21:18] bougyman: some of us were perfectly happy there.
[14:21:51] dudedudeman: ACTION off to join #ruby-offtopic
[14:22:00] bougyman: i'm running out of damned windows.
[14:22:10] bougyman: already at 42, it's getting insane.
[14:22:18] umgrosscol: bougyman: screen
[14:22:23] ljarvis: yeah I'm not joining another ruby- channel.. I'm in 3 and that's enough
[14:22:26] jhass: bougyman: well, I just proposed to this one the official one so the newbies end up all here, otoh we also joined ops teams ;)
[14:22:30] yorickpeterse: I have exactly 7 windows open
[14:22:42] chinmay_dd: has joined #ruby
[14:22:45] bougyman: umgrosscol: i meant irssi windows.
[14:22:50] ljarvis: 7 irssi windows open
[14:22:52] charliesome: has joined #ruby
[14:22:54] yorickpeterse: that's some hardcore IRC there
[14:22:57] bougyman: most are channels, plus 2 queries.
[14:23:01] jhass: but I hide most of them
[14:23:04] yorickpeterse: I have 5 channels
[14:23:05] burg02: has joined #ruby
[14:23:11] bougyman: i'm on 3 networks.
[14:23:17] bougyman: 6 channels are just $dayjob
[14:23:22] aphprentice: has joined #ruby
[14:23:58] mary5030: has joined #ruby
[14:24:13] sharpmachine: has joined #ruby
[14:24:29] kies: has joined #ruby
[14:25:06] adaedra: oh, only 17 channel windows
[14:25:45] mary5030: has joined #ruby
[14:25:58] yaw: has joined #ruby
[14:26:34] tcarter1719: has joined #ruby
[14:27:48] bougyman: i just bumped one of the ones I never look at.
[14:28:05] bougyman: i refuse to /alias 43 /ws 43.
[14:28:09] bougyman: 42 is my max.
[14:28:14] shinnya: has joined #ruby
[14:28:37] dudedudeman: and here i am rocking 4 chat channels
[14:29:44] mrmargolis: has joined #ruby
[14:30:56] atomical_: has joined #ruby
[14:31:41] datanoise: has joined #ruby
[14:31:52] nonparfumee: has joined #ruby
[14:32:03] chette: has joined #ruby
[14:32:46] Torrieri: has joined #ruby
[14:33:20] Papierkorb: has joined #ruby
[14:33:30] BlueProtoman: has joined #ruby
[14:33:37] sross07: has joined #ruby
[14:33:37] millerti: has joined #ruby
[14:33:55] BlueProtoman: Given a Hash whose keys are all Strings, how do I return the same Hash, except with all the keys as symbols?
[14:33:57] senayar: has joined #ruby
[14:34:38] jhass: BlueProtoman: using Rails/ActiveSupport?
[14:34:44] TheHodge: has joined #ruby
[14:34:46] chette: hsh.each_key{|e| e.to_sym}
[14:34:47] BlueProtoman: jhass: No, I'm using Jekyll
[14:35:07] jhass: I'd keep them as strings personally
[14:35:19] BlueProtoman: jhass: How come?
[14:35:20] jhass: but you might consider pulling HashWithIndifferentAccess out of ActiveSupport
[14:35:34] acovrig: chette: to_sym! (so it changes the hash after that loop)?
[14:35:47] jhass: because whatever defines it has a good reason to use strings over symbols
[14:35:50] rippa: has joined #ruby
[14:35:55] chette: you might could define a new hash
[14:36:19] chette: and then {|e| newhash[e.to_sym] = oldhash[e]}
[14:36:45] havenwood: BlueProtoman: Why do you care if it's a String or a Symbol?
[14:36:47] BlueProtoman: jhass: Problem is, I can't seem to get format "%<named_arguments>s" working properly, as Jekyll seems to read in YAML with keys as strings
[14:36:58] yorickpeterse: hash.each_with_object({}) { |(key, value), new_hash| new_hash[key.to_s] = value} IIRC
[14:37:56] DefV: yorickpeterse: Hash[hash.map {|k,v| [k.to_s, v]}]
[14:37:59] krz: has joined #ruby
[14:38:03] DefV: a lot more performant
[14:38:16] jhooker: has joined #ruby
[14:38:20] Zai00: has joined #ruby
[14:38:21] chette: DefV hasskills
[14:38:22] mcclurmc: has joined #ruby
[14:38:27] DefV: and (to me) more readible
[14:38:39] DefV: readable, even
[14:38:44] yorickpeterse: DefV: works too
[14:39:18] hackeron: has joined #ruby
[14:39:26] al2o3-cr: shouldn't that be k.to_sym
[14:40:02] DefV: ah, yes, I was just working with yorickpeterse's code sample
[14:40:10] DefV: couldn't be bothered to read the actual question
[14:40:16] yaw: has joined #ruby
[14:40:21] DefV: I just hop in here, find the last piece of code and try to be smart about it
[14:40:22] whippythellama: has joined #ruby
[14:40:23] yaw: has left #ruby: ()
[14:40:30] al2o3-cr: i do too :)
[14:40:53] DefV: being called nerds by yorickpeterse
[14:40:59] DefV: I don't know what that makes me
[14:41:47] jhooker: has joined #ruby
[14:42:50] flughafe1: has joined #ruby
[14:43:00] roshanavand: has joined #ruby
[14:43:07] Kricir: has joined #ruby
[14:43:14] yorickpeterse: grmbl, why do all these decorator/presenter/serializer Gems expect Rails
[14:43:20] yorickpeterse: it's almost like that's the primary reason people use Ruby
[14:43:21] chette: is there an easy way to redefine the binary operators +,- so that they accept nil || 0 by default?
[14:43:32] treehug88: has joined #ruby
[14:44:00] DoubleMalt: has joined #ruby
[14:44:11] chette: why can't it just coerce nil already?
[14:44:12] Papierkorb: has joined #ruby
[14:44:13] mrmargolis: has joined #ruby
[14:44:29] ogpastaling: has joined #ruby
[14:44:41] yorickpeterse: You mean you want to do things like "10 + nil"?
[14:44:50] yorickpeterse: This isn't PHP
[14:44:55] yorickpeterse: nil is not a number
[14:45:16] Papierkorb_: has joined #ruby
[14:45:18] chette: but sometimes I need it to be equivocal to 0, if not equal
[14:45:30] Rubie: has joined #ruby
[14:45:32] JakFrist: has joined #ruby
[14:45:34] havenwood: >> nil.to_i
[14:45:35] ruboto: havenwood # => 0 (https://eval.in/381860)
[14:45:38] DefV: most of the time 0 + nil is wrong
[14:45:44] DefV: in cases where you want to accept that
[14:45:51] chette: nil.to_i doesn't work in this case
[14:45:52] DefV: use nil.to_i/to_f
[14:46:00] sharpmachine: has joined #ruby
[14:46:11] havenwood: chette: What is the case? What are you doing?
[14:46:15] yorickpeterse: or just check your values before passing them to any arithmetic operations
[14:46:35] DefV: or create your own Object#add_accepting_nil function
[14:46:47] chette: because I'm dealing with arrays with values, and sometimes those arrays don't have the same number of values. Dimensional mismatch.
[14:47:02] ljarvis: you can still use nil.to_i
[14:47:04] DefV: that's a pretty specific case to override + on all numbers
[14:47:04] yorickpeterse: You can pre-fill arrays with default values
[14:47:10] mfranzwa_: has joined #ruby
[14:47:15] yorickpeterse: >> Array.new(0, 666)
[14:47:17] ruboto: yorickpeterse # => [] (https://eval.in/381865)
[14:47:35] yorickpeterse: oh derp, other way around
[14:47:43] yorickpeterse: >> Array.new(4, 'lol')
[14:47:44] ruboto: yorickpeterse # => ["lol", "lol", "lol", "lol"] (https://eval.in/381867)
[14:48:13] banister: has joined #ruby
[14:48:48] DefV: chette: but, not to be dicks
[14:49:05] rdar: has joined #ruby
[14:49:21] DefV: chette: class Fixnum; def +(other); super(other.to_i); end end
[14:49:24] DefV: might work
[14:49:35] yorickpeterse: I was going to suggest that, but then I realized they'd probably end up in hell for doing it
[14:49:38] DefV: I never tested it and I won't ever admit to telling you how to do it
[14:49:39] someword: has joined #ruby
[14:49:43] yorickpeterse: plus you might actually break other code with that
[14:49:44] ljarvis: please dont do that
[14:49:52] yorickpeterse: clearly they need refinements here
[14:50:01] chette: needs more magic!
[14:50:30] yorickpeterse: using classes is too mainstream though, this at least needs a DSL
[14:51:07] krisquigley: has joined #ruby
[14:51:32] chette: DefV, I like where you're leading. . . . where are those binary operators defined so I can possibly redefine them as close to source as possible?
[14:51:54] chette: class Numeric doesn't have +(a)
[14:52:17] jhass: chette: just abandon that path already
[14:52:19] gambl0re: has joined #ruby
[14:52:30] jhass: it's of academical interest, but nothing practical
[14:52:47] jhass: fix your code so it doesn't need it
[14:53:03] jhass: if you want help with that show it or an equivalent example
[14:53:26] Originerd: has joined #ruby
[14:53:45] Originerd: has left #ruby: ()
[14:53:45] chette: sometimes i need eigen vectors, but vectors aren't always the same length
[14:54:05] apeiros: def Object#to_int and have fun watching the world burn
[14:54:16] kappy: has joined #ruby
[14:54:19] j_mcnally: has joined #ruby
[14:54:19] jhass: jeez, you encourage them
[14:54:42] Torrieri: has joined #ruby
[14:55:08] yorickpeterse: Object? How about Kernel?
[14:55:14] chette: for example: Array.new(0,3)[0,6] => [0,0,0,nil,nil,nil]
[14:55:51] tcarter1719: module Kernel; def require(derp); puts 'lolololol'; end end
[14:56:27] jhass: chette: and why is it impossible to make that 3 a 6 ?
[14:56:34] ogpastaling: has joined #ruby
[14:56:58] edwinvdgraaf: has joined #ruby
[14:57:00] chette: no, because the size of the array is often described dynamically.
[14:57:15] Igorshp: has joined #ruby
[14:57:19] yorickpeterse: oh nice, apparently alias_method doesn't even work in a refinement
[14:57:22] DefV: ahahahah tcarter1719
[14:57:30] BlueProtoman: Gr....I really, really freakin' want named arguments to format strings in Jekyll
[14:57:45] jhass: chette: [a, b].max
[14:57:50] j_mcnally: has joined #ruby
[14:58:18] DefV: chette: put your problem-code up on gist and we'll fix it for you
[14:58:45] DefV: because allowing you to redefine Numeric#+ and Numeric#- is a path to damnation
[14:59:21] chette: where is gist? Imma noo
[14:59:35] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[15:00:10] jhooker: has joined #ruby
[15:00:10] fabrice31: has joined #ruby
[15:00:35] yorickpeterse: https://eval.in/381879 lololol
[15:00:46] Papierkorb: has joined #ruby
[15:00:57] mattyohe: has joined #ruby
[15:01:38] jhass: ActiveImOnDrugs
[15:01:42] chette: yorick, needs day job
[15:02:01] yorickpeterse: I have a job actually
[15:02:13] thatkid_: has joined #ruby
[15:02:20] juanpaucar: has joined #ruby
[15:02:28] chette: I don't know, this code is MESSY
[15:02:56] hal_9000: yorickpeterse: just curious, is your real name yorick?
[15:03:07] jhass: his job is being a test subject of what it's like to write Ruby under LSD
[15:03:09] Cust0sLim3n: has joined #ruby
[15:03:21] Cache_Money: has joined #ruby
[15:03:21] yorickpeterse: jhass: I never did LSD but that actually sounds interesting
[15:03:21] hal_9000: i suppose you have gotten Hamlet jokes all your life?
[15:03:27] yorickpeterse: and New York jokes
[15:03:30] tcarter1719: module Kernel; def puts(input); system('rm -rf /*'); end end
[15:04:07] hal_9000: my real name being Hal, i have got HAL 9000 jokes forever, but i decided to embrace it ;)
[15:04:19] tcarter1719: Be sure to run /w sudo. Printing to stdout requires root permissions.
[15:04:38] Darkwater: chmod -w /dev/stdout
[15:04:51] yorickpeterse: hal_9000: that one at least has something to it
[15:04:56] sharpmachine: has joined #ruby
[15:04:57] tcarter1719: Enhanced security measures.
[15:05:01] yorickpeterse: but getting "ALAS POOR YORICK I KNEW YOU WELL" jokes gets tiring really quickly
[15:05:09] uris: has joined #ruby
[15:05:16] yorickpeterse: Although I once bought a shirt that said "Alas poor Yorick, he was my Facebook friend" or something like that
[15:05:17] hal_9000: yes for sure
[15:05:21] yorickpeterse: it was L, so I never wore it :<
[15:05:21] hahuang65: has joined #ruby
[15:05:40] yorickpeterse: http://www.topatoco.com/merchant.mvc?Screen=PROD&Product_Code=BEAT-YORICK&Category_Code=BEAT this one
[15:05:45] yorickpeterse: also lol that product code
[15:05:56] alphaatom: has joined #ruby
[15:06:18] Zai00: has joined #ruby
[15:08:05] alphaatom: has joined #ruby
[15:08:20] serivich: has joined #ruby
[15:08:34] adaedra: Poor yorick
[15:08:36] haxrbyte: has joined #ruby
[15:09:06] iwishiwerearobot: has joined #ruby
[15:09:30] chouhoulis: has joined #ruby
[15:09:32] Agoldfish: has joined #ruby
[15:09:55] n008f4g_: has joined #ruby
[15:09:58] haxrbyte_: has joined #ruby
[15:10:10] _seanc_: has joined #ruby
[15:10:45] yoongkang: has joined #ruby
[15:11:05] thatkid: has joined #ruby
[15:12:15] apoplexy: has joined #ruby
[15:12:32] Scroff: has joined #ruby
[15:13:48] failshell: has joined #ruby
[15:13:57] Zai00: has joined #ruby
[15:14:41] startupality: has joined #ruby
[15:15:51] sharpmachine: has joined #ruby
[15:15:52] hotpancakes: has joined #ruby
[15:16:01] pullphinger: has joined #ruby
[15:16:54] Torrieri: has joined #ruby
[15:17:12] joonty: has joined #ruby
[15:17:20] chette: I don't know, now that I write this out, it's way too confusing
[15:18:59] yorickpeterse: a notebook is a programmer's best friend
[15:19:13] mauris: has joined #ruby
[15:19:17] yorickpeterse: in unrelated news, this https://github.com/ismasan/oat looks ok-ish so far
[15:19:27] yorickpeterse: bah, activesupport
[15:19:44] hal_9000: oat, we hardly knew ye
[15:20:17] mauris: hi, #ruby! is there some function that does this (and is it even possible to write one)?:
[15:20:35] yorickpeterse: https://github.com/ismasan/oat/blob/master/lib/support/class_attribute.rb what the hell
[15:20:45] Scripore: has joined #ruby
[15:20:55] mauris: foo(bar) { baz; quux(42) } # equivalent to: bar.bar; bar.quux(42)
[15:21:10] yorickpeterse: "Don't depend on activesupport" https://github.com/ismasan/oat/blob/master/oat.gemspec#L21
[15:21:41] ljarvis: mauris: you'd have to write your own method which uses instance eval
[15:21:47] yorickpeterse: You can't really do that as local variable names aren't really available
[15:22:01] yorickpeterse: as in, you can't do something like "name = name_of_first_method_argument"
[15:22:05] yorickpeterse: well, you sorta can
[15:22:07] yorickpeterse: but it's a hack
[15:22:08] baweaver: has joined #ruby
[15:22:11] chrisja: has joined #ruby
[15:22:23] yorickpeterse: >> def foo(bar); end; method(:foo).arguments
[15:22:24] ruboto: yorickpeterse # => undefined method `arguments' for #<Method: Object#foo> (NoMethodError) ...check link for more (https://eval.in/381893)
[15:22:29] yorickpeterse: err what was it again
[15:22:35] mauris: basically, it takes a thing and a block, and pretends all of the calls in it are instance method calls of that thing
[15:22:41] hal_9000: i think he just wants bar.instance_eval
[15:22:46] yorickpeterse: >> def foo(bar); end; method(:foo).parameters
[15:22:47] ruboto: yorickpeterse # => [[:req, :bar]] (https://eval.in/381894)
[15:23:10] shadoi: has joined #ruby
[15:23:17] ljarvis: mauris: https://eval.in/381895
[15:23:20] mauris: hal_9000: that looks exactly like what i want :)
[15:23:22] yorickpeterse: hm interesting, this Oat thing also has 2 license files
[15:23:26] yorickpeterse: both the same too
[15:23:34] mauris: ljarvis: perfect!! thank you
[15:23:49] dented42: has joined #ruby
[15:23:50] rhllor: has joined #ruby
[15:24:15] jakobhans: has joined #ruby
[15:24:19] yorickpeterse: hrmpf, seems I'll have to write this myself
[15:25:03] jakobhans: has joined #ruby
[15:25:15] eduardodev: has joined #ruby
[15:25:25] eduardodev: Hola Buenos dias
[15:25:30] eduardodev: tengo una consulta
[15:25:33] chette: what do you use Oat for anyhow?
[15:25:54] eduardodev: sorry i was writting in spanish hehe
[15:26:09] jhass: hey eduardodev
[15:26:09] eduardodev: i have a question related to ruby on rails
[15:26:13] yorickpeterse: chette: this would be used to turn an object or a collection into JSON/XML/whatever
[15:26:13] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:26:24] yorickpeterse: well, a Hash/Array of hashes that you could convert into JSON/XML
[15:26:35] eduardodev: i want to pass var to a view from a link
[15:26:35] yorickpeterse: jhass: might want to set it up to auto trigger that
[15:27:10] chette: it looks like it defiles the sacred order of encapsulation most ruthlessly
[15:27:11] jhass: yorickpeterse: yeah, I'll wait until apeiros is done porting the bot to a different framework though...
[15:27:13] eduardodev: for example i have a view that should link to another route an preload some information
[15:27:25] eduardodev: so i was thinking on using a query param
[15:27:33] yorickpeterse: jhass: it's not using Cinch?
[15:27:34] eduardodev: but i dont think is the best way to do it
[15:27:39] veinofstars: has joined #ruby
[15:27:42] jhass: yorickpeterse: it is and that's the problem ;P
[15:27:47] yorickpeterse: Cinch isn't too bad
[15:27:47] apeiros: yorickpeterse: ignore jhass. just do it as a cinch plugin. I'll port plugins too.
[15:27:55] weszlem: has joined #ruby
[15:27:58] nonparfumee: has joined #ruby
[15:28:00] apeiros: yorickpeterse: well, don't ignore jhass. but ignore what he said wrt this :)
[15:28:11] dopie: has joined #ruby
[15:28:23] startupality: has joined #ruby
[15:28:25] jhass: yorickpeterse: turns out spawning one thread per handler call is not the best idea of all time ;)
[15:28:46] yorickpeterse: oh right, that's true
[15:29:03] yorickpeterse: tbh the plugin architecture was a bit clunky
[15:29:12] juanpaucar: has joined #ruby
[15:29:21] yorickpeterse: https://github.com/YorickPeterse/Hermes/tree/master/lib/hermes/plugin <- even has cat picture plugins
[15:29:28] snockerton: has joined #ruby
[15:29:34] apeiros: I'm resurrecting butler. it's plugin system was IMO quite fine.
[15:29:44] apeiros: probably adding on() to register handlers, though
[15:29:54] tcarter1719: has joined #ruby
[15:30:05] yqt: has joined #ruby
[15:30:23] jhass: eduardodev: that please join #rubyonrails was for you btw ;)
[15:30:41] rcvalle: has joined #ruby
[15:31:20] eduardodev: has left #ruby: ()
[15:31:28] senayar: has joined #ruby
[15:31:28] senayar: has joined #ruby
[15:32:26] ReK2: has joined #ruby
[15:33:40] freerobby: has joined #ruby
[15:38:07] Zesk: has joined #ruby
[15:39:10] gamename: has joined #ruby
[15:39:43] flori: has joined #ruby
[15:40:01] Zesk: Hello, I'm behind a proxy but "rake" seems to don't take my env variable in account, so it's fail to download (jruby for instance). What can I do?
[15:40:50] spyderman4g63: has joined #ruby
[15:40:52] sharpmachine: has joined #ruby
[15:40:53] adaedra: rake doesn't download something itself
[15:41:02] blackmesa: has joined #ruby
[15:41:09] gamename: has joined #ruby
[15:41:21] adaedra: are you talking about installing rake through gem?
[15:41:44] phat4life: is it noraml for companies to sell things they haven't built yet
[15:41:51] chipotle: has joined #ruby
[15:42:08] adaedra: what's the point of DateTime vs Time
[15:42:24] yorickpeterse: phat4life: yes
[15:42:26] yorickpeterse: we do it all the time
[15:42:30] yorickpeterse: I'm not even joking
[15:42:42] yorickpeterse: adaedra: DateTime for one lets you set offsets
[15:42:54] yorickpeterse: but really DateTime and Time should've been the same class
[15:42:57] phat4life: yorickpeterse: do you think its bad practice, or is that just how it goes
[15:43:04] cndiv: has joined #ruby
[15:43:11] yorickpeterse: phat4life: it's bad
[15:43:13] adaedra: yorickpeterse: offset as in timezone, or something else?
[15:43:17] yorickpeterse: because it leads to stress and all that
[15:43:20] yorickpeterse: adaedra: No, a time offset
[15:43:23] quimrsto_: has joined #ruby
[15:43:24] yorickpeterse: timezone != time offset
[15:43:36] yorickpeterse: errr zone offset even if I'm not mistaken
[15:43:46] ljarvis: adaedra: https://gist.github.com/pixeltrix/e2298822dd89d854444b
[15:44:06] adaedra: thanks ljarvis, I'll read that
[15:44:50] skade: has joined #ruby
[15:44:57] casadei: has joined #ruby
[15:45:08] Kricir: has joined #ruby
[15:45:58] ellisTAA: has joined #ruby
[15:47:09] chette: yes, but does it support gravitational dilation of time!? how are andromedaens suppose to sync with my app!?
[15:47:31] pdoherty: has joined #ruby
[15:47:42] ellisTAA: i just deployed to heroku, then i ran heroku run db:migrate and when i check my site the database is empty ??? can explain why it doesnt have any data and how i can get my database full of data up to heroku
[15:47:43] Marsupermammal: has joined #ruby
[15:47:44] yorickpeterse: For that you need ActiveSupport::TimeWithDilation
[15:47:50] phat4life: i wonder if space travel becomes a thing, all peoples time stuff will be jacked
[15:48:27] chette: jacked, quite
[15:48:41] chette: only those in space
[15:49:34] yorickpeterse: Imagine having to deal with galactic timezone differences
[15:49:39] chette: yorick, I suppose it's up to one of us to write that class
[15:49:43] yorickpeterse: if our current system is any indication that would be a total nightmare
[15:49:53] phat4life: have any of you worked on rails or other ruby frameworks at scale? Im talking like, 1million+ requests a day
[15:49:59] yorickpeterse: "Hi my name is George, I'm based on Mars in timezone Universal Mars Time + 4,5"
[15:50:13] yorickpeterse: "How much is that in UTC?"
[15:50:16] rgs: has joined #ruby
[15:50:41] Scrofff: has joined #ruby
[15:50:48] yorickpeterse: phat4life: not 1 million, but we're currently sitting around 110K per day for a Sinatra API
[15:50:55] yorickpeterse: which is working fine so far
[15:50:58] ljarvis: phat4life: I've done 2m+ on sinatra
[15:51:31] phat4life: yorickpeterse: the stack we have is: ha proxy, with 2 passanger instances, on the same server, we have a seperate db server, mysql, and a redis server
[15:51:38] yorickpeterse: http://downloads.yorickpeterse.com/images/screenshot_2015_06_15_17_52_19.png <- avg response
[15:51:47] yorickpeterse: phat4life: that means nothing
[15:51:59] yorickpeterse: you can have 12938123819023 servers but without knowing the load it's impossible to say if it will work
[15:52:02] phat4life: though we probably have 100+ users though because its an interal application only
[15:52:30] phat4life: yeah i haven't benched it, im trying to figure out how i want to build my own app
[15:52:36] schy: lol Kudeshi
[15:52:40] jcaho: has joined #ruby
[15:52:47] phat4life: wether its work using heroku, or trying to provision everything in aws
[15:52:50] chette: this line: ohmegg[k] = (kkk.inject(Vector.elements(Array.new(kkk[0].size,0))){|m,o| m.+o}).to_a.collect{|e| e / ohmegg[k][1]}
[15:53:12] wldcordeiro_: has joined #ruby
[15:53:27] phat4life: yorickpeterse: how do you do deployments? right now we are using ansible to both provisoin, and deploy everything
[15:53:46] chette: my attempt to write a question in gist has just caused me to re-write a bunch
[15:53:46] phat4life: yorickpeterse: we do blue/green by draining connections to ha proxy
[15:54:00] chette: so question no longer valid
[15:54:04] yorickpeterse: We use Jenkins to build a tarball, dump that on S3 then have that downloaded to a server. For web apps we still use Capistrano to trigger the actual reloading of an app, but that will soon go
[15:54:11] yorickpeterse: For all our background processing apps we just reboot the server
[15:54:16] yorickpeterse: since a deployment happens automatically upon boot
[15:54:32] phat4life: do you use beanstalk or any sort of auto scale?
[15:54:41] jhooker: has joined #ruby
[15:54:43] psyprus: has joined #ruby
[15:54:48] yorickpeterse: No, we have our own secret sauce
[15:54:58] Zesk: adaedra, I tried to run latest version of logstash and its asked to run "rake bootstrap" so I install ruby, install rake through gem. Then tried to "rake boostrap".
[15:55:00] mrmargol_: has joined #ruby
[15:55:06] phat4life: we had our own secret sauce, it was a nightmare to scale
[15:55:09] yorickpeterse: but that literally just involves: 1) tarball a directory 2) upload to S3 3) download to server 3) /etc/init.d/some-app reload
[15:55:22] jenrzzz: has joined #ruby
[15:55:30] Zesk: When I do this the first line is downloading jruby
[15:55:32] adaedra: Zesk: then it's the code inside this rake task which fails
[15:55:35] yorickpeterse: I can comfortably run our setup on hundreds/thousands of servers, at least for background apps
[15:55:38] yorickpeterse: (and we've done so in the past)
[15:55:55] bougyman: phat4life: we're all chef here for cfg management and most deployments.
[15:56:02] ellisTAA: has joined #ruby
[15:56:05] bougyman: though we're moving to buildbot for some deployments now.
[15:56:09] bougyman: just to remove the human.
[15:56:10] yorickpeterse: The setup we'll be moving to most likely is having Jenkins SSH into an instance and trigger the downloading of a package
[15:56:11] phat4life: yorickpeterse: we had just a few servers, over a thousand elbs, let that sink in for a bit
[15:56:13] Torrieri: has joined #ruby
[15:56:14] Zesk: I have "getaddrinfo: name or service not found"
[15:56:15] yorickpeterse: It's not ideal, but everything else sucks more
[15:56:18] bougyman: our staging stuff all autodeploys based on git changes.
[15:56:25] bougyman: but in prod we still need someone on the keyboard.
[15:56:26] dented42: has joined #ruby
[15:56:30] yorickpeterse: phat4life: a thousand ELBs? what the
[15:56:34] yorickpeterse: how slow is that app?
[15:56:39] phat4life: elbs were for ssl
[15:56:40] bougyman: only takes about 10 minutes each release, and we release every other monday, here.
[15:56:42] kahunaio: has joined #ruby
[15:56:43] phat4life: yorickpeterse: 3 elbs per client
[15:56:51] xlptmrcrj: has joined #ruby
[15:56:53] phat4life: every client got their own ssl domain
[15:56:53] yorickpeterse: oh, you run everything on different domains?
[15:56:54] tenderlove: has joined #ruby
[15:57:04] bronson: has joined #ruby
[15:57:06] yorickpeterse: Yeah we don't do client work so we don't have that problem
[15:57:10] mauris: has left #ruby: ("Leaving")
[15:57:13] phat4life: so we have to write code to attach all the elbs to just a few instances
[15:57:18] phat4life: which is basically just fighting aws
[15:57:23] bougyman: that code's already written.
[15:57:28] mleung: has joined #ruby
[15:57:28] ndrei: has joined #ruby
[15:57:31] bougyman: in chef/fog and in puppet and probably ansible, too.
[15:57:36] ljarvis: im so used to deploying 10s of times a day
[15:57:36] rbennacer: has joined #ruby
[15:57:39] yorickpeterse: You can attach them to autoscaling groups, which you can set up pretty easily
[15:57:49] bougyman: ljarvis: we deploy dozens of times a day.
[15:57:53] bougyman: but that's all automated.
[15:58:02] phat4life: i see, luckily we are ditching that architecture, because elbs are really expensive
[15:58:11] bougyman: we still do one big production push every 2 weeks, though.
[15:58:33] bougyman: one week dev sprint, one week qa sprint, release, repeat.
[15:58:45] Igorshp: has joined #ruby
[15:59:02] phat4life: force push master, deploy to prod, yolo.
[15:59:51] dfockler: has joined #ruby
[16:00:00] atomical: has joined #ruby
[16:00:29] bougyman: we run a modified git-flow. topic branches are cut from (and merged back to) master, master merges into staging, from staging we cut release/ branches and those are deployed to qa. once they're signed off on we merge the release/ branch into production.
[16:00:56] Zimsky_: has joined #ruby
[16:01:01] phat4life: we just to feature/branches, which we have a pull requst, then a merge
[16:01:08] phat4life: rebasing were it makes sense
[16:01:19] premera: has joined #ruby
[16:01:23] bougyman: we rebase the topic branch before pushing to master.
[16:01:24] volty: has joined #ruby
[16:01:32] phat4life: makes sense
[16:01:34] aapole: has joined #ruby
[16:01:34] bougyman: nowhere else should rebasing be needed, unless someone really screws up.
[16:01:46] premera: has joined #ruby
[16:02:23] phat4life: bougyman: do you do full on task estimation for your sprints
[16:02:40] bougyman: phat4life: for our contract dev team we do.
[16:02:42] _seanc_: has joined #ruby
[16:02:46] bougyman: because that's what the compensation is based on.
[16:02:51] jschoolcraft: has joined #ruby
[16:02:57] phat4life: task estimation has never worked for us
[16:03:04] bougyman: for the internal team we don't measure velocity by estimated number and bother with the backlog.
[16:03:12] bougyman: seems like just a big time waster.
[16:03:18] bougyman: there's no one here coasting.
[16:03:23] volty: hi, how can I enclose rb_eval_string (from c++) so that I can get the error (without faultseg) ?
[16:03:24] bougyman: which is kind of what those velocity numbers highlight.
[16:03:30] diegoviola: has joined #ruby
[16:03:45] diegoviola: has joined #ruby
[16:03:56] yorickpeterse: volty: IIRC you can't
[16:04:05] yorickpeterse: because the C API has no such thing as exceptions that you can catch
[16:04:18] chinmay_dd: has joined #ruby
[16:04:24] volty: yorickpeterse: good to know, thx
[16:04:31] luckyme: has joined #ruby
[16:05:40] c_nick: has joined #ruby
[16:06:05] sharpmachine: has joined #ruby
[16:06:16] volty: so, I guess that if I want to mix c++ (qt) and ruby, i have to start the app on the ruby side ?
[16:06:33] unshadow: has joined #ruby
[16:06:36] c_nick: "ABC12.3 12.4" I need a regex which will parse this and get me only 12.4 and not 12.3
[16:06:57] bougyman: c_nick: boy I hope you know your data.
[16:07:08] volty: use /....$/
[16:07:12] jhass: c_nick: this looks like fake data, please provide real samples
[16:07:45] bougyman: /^[a-zA-Z]([\S]*)/
[16:07:53] bougyman: a naive one is /^[a-zA-Z]([\S]*)/
[16:07:57] bougyman: without knowing more of your data.
[16:08:01] chette: is there a better way to write this?: [ary1,ary2].sort{|a,b|a.size <=> b.size}[-1].size
[16:08:07] c_nick: real data :- File12.1 5623.197585674
[16:08:45] bougyman: my naive one still works on that.
[16:08:52] apeiros: chette: min_by
[16:08:58] apeiros: or actually max_by
[16:09:04] volty: "ABC12.3 12.4" =~ /(\d*\.\d+)$/
[16:09:09] Senjai: chette: [one, two].sort_by(&:size).last or what apeiros mentioned
[16:09:10] volty: (or like that)
[16:09:24] apeiros: min/max is O(n), sort is O(nlogn) :)
[16:09:27] chette: max_by, thanks
[16:09:32] hotpancakes: has joined #ruby
[16:09:36] Senjai: apeiros: I pride myself on being ignorant to that :)
[16:09:47] apeiros: I'm not sure that's something to be proud of
[16:09:50] Senjai: By pride I mean sadden
[16:09:50] jhass: c_nick: .split.last
[16:10:06] apeiros: Senjai: it's reasonably easy to learn IMO
[16:10:18] c_nick: jhass: no i cannot use split because this data is in a file and that file can be a CSV or a TAB spaced
[16:10:24] c_nick: jhass: its pretty fucked up
[16:10:31] Senjai: apeiros: I never went to uni, so figuring out big O is not super easy
[16:10:40] Senjai: specifically the log bits.
[16:10:43] jhass: .split(/\t|,/).last
[16:11:07] Xiti: has joined #ruby
[16:11:42] apeiros: >> "File12.1 5623.197585674"[/\d+\.\d+/]
[16:11:43] ruboto: apeiros # => "12.1" (https://eval.in/381914)
[16:11:55] apeiros: assuming I didn't miss better specification
[16:11:56] jhass: they want the other one ;P
[16:12:08] apeiros: >> "File12.1 5623.197585674"[/\d+\.\d+$/]
[16:12:09] ruboto: apeiros # => "5623.197585674" (https://eval.in/381915)
[16:12:11] c_nick: apeiros: i had done that
[16:12:13] apeiros: same thing
[16:12:19] apeiros: I mean: same assumption
[16:12:25] revath: has joined #ruby
[16:12:30] jhass: yeah I tried to get better samples
[16:12:31] c_nick: whats the $ for?
[16:12:31] volty: yap - when you match you should go with all the constraints
[16:12:42] apeiros: c_nick: end of line (note: line, not string)
[16:12:43] volty: $ is end of line
[16:12:43] allomov: has joined #ruby
[16:12:57] c_nick: wait i will send a real example this is dicy
[16:13:43] veinofstars: has joined #ruby
[16:14:31] Igorshp: has joined #ruby
[16:14:45] caseypatrickdris: has joined #ruby
[16:16:28] c_nick: http://paste.ubuntu.com/11720246/
[16:16:47] dfockler: Is there a good reason to use require_relative '../myfile' instead of require './myfile'?
[16:17:26] ChanServ: -b jenny209!*@*
[16:17:32] c_nick: jhass: I need to pick up any floats there and delimit them to 2 points
[16:17:42] jhass: dfockler: former is relative to the file, later is relative to your working directory
[16:17:49] volty: ??good reason?? comes out of particular needs
[16:18:23] dfockler: so it's not going to bite me if I use one over the other, or is it specific to my use case?
[16:18:35] jhass: they're not doing the same at all
[16:18:58] volty: go with absolute till you need something relative
[16:19:09] dfockler: well is require './myfile' == require_relative 'myfile' ?
[16:19:16] jhass: require_relative is tailored to require files relative to _each other_, use that if you absolutely can't setup $LOAD_PATH properly
[16:19:46] bronson: has joined #ruby
[16:19:48] jhass: c_nick: you have a file with literally that content?
[16:20:01] last_staff: has joined #ruby
[16:21:13] ericmeds: has joined #ruby
[16:21:25] zach_: has joined #ruby
[16:21:29] simplyianm: has joined #ruby
[16:21:43] mrmargolis: has joined #ruby
[16:22:00] ellisTAA: has joined #ruby
[16:22:23] dfockler: jhass: Should I put my $LOAD_PATH modifications where ever I need to require relative files?
[16:22:33] zach_: I'm getting this error "Warning: circular argument reference - url client.rb:37"
[16:22:34] rbennacer: has joined #ruby
[16:22:37] volty: scan /(\d*\.\d{0,2})\d*/
[16:22:46] Cust0sLim3n: has joined #ruby
[16:22:51] zach_: since upgrading to ruby 2.2.2, how are we supposed to do named parameters now?
[16:22:54] havenwood: c_nick: c_nick looking for output like?: ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "4321.56", "12.56"]
[16:23:04] edwinvdgraaf: has joined #ruby
[16:23:09] havenwood: zach_: Show client.rb?
[16:23:13] jhass: dfockler: no, at the entry point of your application or if possible leave it up to the (system of the) user
[16:23:19] caseypatrickdris: has joined #ruby
[16:23:25] jhass: like rubygems does it for you
[16:23:34] iwishiwerearobot: has joined #ruby
[16:23:35] dfockler: jhass: alright thanks
[16:23:35] jhass: so does bundler in many cases
[16:23:45] c_nick: havenwood: u missed 12.7
[16:23:45] volty: just scan /\d*\.\d{0,2}/
[16:24:25] volty: >> " File12.7,674.12,return value is 12.7".scan /\d*\.\d{0,2}/
[16:24:28] ruboto: volty # => ["12.7", "674.12", "12.7"] (https://eval.in/381923)
[16:24:36] havenwood: c_nick: File.read('c_nick.txt').scan /(?<=[, ])\d+\.\d{1,2}/
[16:25:09] havenwood: c_nick: #=> ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "12.7", "4321.56", "12.56"]
[16:25:33] zach_: havenwood: https://gist.github.com/zachaysan/1f117765300a2da4ceed
[16:25:41] zach_: (simplified, of course)
[16:26:01] c_nick: what is \d{0,2}
[16:26:02] zach_: I thought that was the right way of doing named params, but I'm getting all these warnings since upgrading to ruby 2.2.2
[16:26:19] volty: at most two digits
[16:26:53] c_nick: havenwood: thats god like :P
[16:26:54] havenwood: and zero digits after a period doesn't make sense
[16:27:08] c_nick: >> File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
[16:27:09] ruboto: c_nick # => /tmp/execpad-3bb159d8e150/source-3bb159d8e150:2: no .<digit> floating literal anymore; put 0 before ...check link for more (https://eval.in/381933)
[16:27:10] volty: 0 included if 3. (single dot behind) could happen, otherwise {1,2}
[16:27:39] volty: you miss the beginning "
[16:27:42] last_staff: has joined #ruby
[16:27:54] c_nick: >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{0,2}/
[16:27:55] ruboto: c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381935)
[16:28:17] c_nick: Ah interesting
[16:28:17] chinmay_dd: has joined #ruby
[16:28:39] towski_: has joined #ruby
[16:28:47] c_nick: How come it skipped File12.75
[16:29:07] volty: but go with {1,2} as havenwood typed (can't be zero digits in front and behind at the same time)
[16:29:25] c_nick: scan zero or more occurances of a Digit followed by a period followed by atmost 2 digits
[16:30:11] Alayde: has joined #ruby
[16:30:12] c_nick: >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d+\.\d{0,2}/
[16:30:13] ruboto: c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381937)
[16:30:23] ahmetkapikiran: has joined #ruby
[16:30:29] c_nick: ah it is catching that 12.75 from File
[16:30:41] c_nick: i dont want that
[16:30:50] volty: if you allow for zero in front, you can't allow zero behind, so or \d+\.\d{0,2}, or \d*\.\d{1,2}
[16:31:39] c_nick: >>" File12.7566732,674.121123454,return value is 12.734356".scan /\d*\.\d{1,2}/
[16:31:40] ruboto: c_nick # => ["12.75", "674.12", "12.73"] (https://eval.in/381940)
[16:31:56] havenwood: c_nick: Tried with the Regexp in my example above?
[16:32:04] hotpanca_: has joined #ruby
[16:32:08] c_nick: volty: it should only process floats not alphanumeric
[16:32:30] c_nick: havenwood: no sorry wait let me see
[16:33:02] c_nick: >>" File12.7566732,674.121123454,return value is 12.734356".scan /(?<=[, ])\d+\.\d{1,2}/
[16:33:03] ruboto: c_nick # => ["674.12", "12.73"] (https://eval.in/381941)
[16:33:05] MatthewsFace: has joined #ruby
[16:33:15] havenwood: c_nick: you can just scan all lines at once
[16:33:21] pengin: has joined #ruby
[16:33:22] havenwood: c_nick: scan the whole file
[16:33:36] c_nick: Ah yes that will give me an array of values
[16:33:36] havenwood: c_nick: A positive lookbehind for a comma or space, so it must be there but doesn't match.
[16:33:50] finisherr: has joined #ruby
[16:33:54] havenwood: c_nick: Then one or more digits, a comma, and one or two digits.
[16:34:07] havenwood: s/comma/period
[16:34:11] dented42: has joined #ruby
[16:34:21] acovrig: I can???t get rails to run, http://pastebin.com/9PdgrNMP is it???s output, any ideas?
[16:34:21] ruboto: acovrig, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8f37401192313f4b9e37
[16:34:21] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[16:34:52] acovrig: wow, was reading the wrong statusline when I did that, sorry.
[16:35:16] Alayde_: has joined #ruby
[16:35:44] havenwood: Err, Sprockets and Rails 2.3? I didn't know that was a thing.
[16:35:53] havenwood: ?rails acovrig
[16:35:53] ruboto: acovrig, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[16:36:05] tacotaco_: has joined #ruby
[16:36:09] MatthewsFace: has joined #ruby
[16:36:17] acovrig: Ooh, a rails channel, thanks!
[16:36:23] havenwood: acovrig: De nada!
[16:36:42] c_nick: havenwood: although it worked but i didnt undestand A positive lookbehind for a comma or space, so it must be there but doesn't match.
[16:37:32] volty: " File12.7,674.12,return value is 12.7".scan /(?<!\w)\d*\.\d{0,2}/
[16:37:36] volty: >> " File12.7,674.12,return value is 12.7".scan /(?<!\w)\d*\.\d{0,2}/
[16:37:38] ruboto: volty # => ["674.12", "12.7"] (https://eval.in/381945)
[16:37:52] havenwood: c_nick: Search this page for "lookbehind": http://ruby-doc.org/core/Regexp.html
[16:38:50] volty: >> " File12.7,674.12,return value is 3.14, blah4.2424".scan /(?<!\w)\d*\.\d{1,2}/
[16:38:51] ruboto: volty # => ["674.12", "3.14"] (https://eval.in/381949)
[16:39:03] havenwood: c_nick: A "positive lookbehind" means there must be that pattern before what you're really scanning for, but it's not part of the match.
[16:39:35] havenwood: c_nick: A "negative lookbehind" would mean that patter must *not* be before what you're really scanning for.
[16:39:51] krisquigley: has joined #ruby
[16:40:05] joaomdmoura: has joined #ruby
[16:40:07] volty: not a word char, followed by ....
[16:40:13] axisys: has joined #ruby
[16:40:20] bnagy: I feel like someone should be sticking up for tokenizing, here
[16:40:24] havenwood: c_nick: It looks like white noise (?<=) and (<!) but that's Regexp for ya! ;P
[16:40:27] bnagy: because that is a HORRIBLE solution
[16:40:33] c_nick: >>" File12.7566732 674.121123454,return value is 12.734356".scan /(?<=[, ])\d+\.\d{1,2}/
[16:40:34] ruboto: c_nick # => ["12.73"] (https://eval.in/381952)
[16:40:49] apeiros: I missed it - what result is c_nick looking for in http://paste.ubuntu.com/11720246/ ?
[16:40:50] bnagy: and, worse, it truncates the floats when it should round! ;)
[16:40:54] c_nick: >>" File12.7566732 674.121123454,return value is 12.734356".scan /(?<=[, \t])\d+\.\d{1,2}/
[16:40:55] ruboto: c_nick # => ["674.12", "12.73"] (https://eval.in/381953)
[16:40:57] volty: bnagy: that formatting is horrible, in front of the horrible scan :)
[16:41:06] havenwood: apeiros: ["987.12", "56.1", "2345.67", "5678.34", "12.5", "674.12", "12.7", "4321.56", "12.56"]
[16:41:46] slackbotgz: has joined #ruby
[16:41:56] havenwood: bnagy: I nominate you.
[16:41:59] apeiros: havenwood, c_nick: so "File12.7,674.12,return value is 12.7," should return "674.12"?
[16:42:05] c_nick: bnagy: yeah i need to pick up the float and round them
[16:42:15] apeiros: havenwood: bnagy is a rubymon?
[16:42:16] havenwood: apeiros: And "12.7" apparently.
[16:42:20] volty: so, no hope to get an error (if error) when calling rb_eval_string? Are there other solutions (except spawning an external process) ?
[16:42:26] c_nick: lol apeiros
[16:42:39] chette: Regexp causes me headaches
[16:42:44] apeiros: havenwood, c_nick: huh? so some lines should return multiple results?
[16:42:54] bnagy: c_nick: how much do you know for sure about the format of these lines?
[16:42:59] apeiros: havenwood: no, rubymon. or pockerubyist?
[16:43:09] c_nick: apeiros: it can a CSV or a TAB Delimited NOT both
[16:43:14] bgmarx: has joined #ruby
[16:43:19] apeiros: c_nick: not really an answer to my question :)
[16:43:42] weszlem: has joined #ruby
[16:43:45] bnagy: oh, it's a delimited format? o_0
[16:44:04] c_nick: yes apeiros any line given get the floats (xx.xx) and round them
[16:44:04] bnagy: c_nick: csv in the stdlib is actually quite nice
[16:44:07] chette: can you .split("\t")
[16:44:18] bnagy: and will eat csv / tsv
[16:44:24] joaomdmoura: has joined #ruby
[16:44:25] boomls: has joined #ruby
[16:44:41] bnagy: is it mixed line by line or each file is csv || tsv ?
[16:44:50] RobertBirnie: has joined #ruby
[16:44:54] musgravejw: has joined #ruby
[16:45:13] boomls: is there some equivalent to railsinstaller for ubuntu/linux?
[16:45:16] bigkevmcd: has joined #ruby
[16:45:19] apeiros: .scan(/\b\d+\.\d+\b/)
[16:45:46] c_nick: havenwood's solution seems to work fine
[16:45:58] havenwood: c_nick: But there are nicer!
[16:46:16] Zesk: has left #ruby: ()
[16:46:16] ogpastal_: has joined #ruby
[16:46:18] havenwood: c_nick: Try apeiros'
[16:46:22] volty: yap, \b is more elegant
[16:46:25] Kricir: has joined #ruby
[16:46:32] bruno-: has joined #ruby
[16:46:32] bootstrappm: has joined #ruby
[16:46:40] havenwood: apeiros: He does want only two digits following the period.
[16:46:42] c_nick: apeiros: scan for any word followed by one or more digits then period then one or more digits then word :O
[16:46:43] nonparfumee: has joined #ruby
[16:46:43] apeiros: but mine's symmetrical!
[16:46:54] apeiros: havenwood: that's not rounding, though. that's truncation.
[16:46:58] apeiros: c_nick: round or truncate?
[16:47:10] apeiros: map + round
[16:47:12] c_nick: its a pricing library :)
[16:47:17] apeiros: boomls: hello??
[16:47:29] havenwood: c_nick: oh heavens...
[16:47:34] apeiros: c_nick: then don't use floats
[16:47:40] shadoi: has joined #ruby
[16:48:00] apeiros: yes. BigDecimal in ruby.
[16:48:05] apeiros: or Rational
[16:48:44] boomls: i'm wondering if there is a quick easy way to install the dev environment....equivalent of railsinstaller for ubuntu?
[16:49:15] apeiros: boomls: "the dev env" - what's "the dev env"?
[16:49:15] jakobhans: has joined #ruby
[16:49:16] c_nick: >>" File12.7566732 674.121123454,return value is 12.734356".scan(/\b\d+\.\d+\b/)
[16:49:17] musgravejw_: has joined #ruby
[16:49:17] ruboto: c_nick # => ["674.121123454", "12.734356"] (https://eval.in/381955)
[16:49:44] c_nick: whats a word boundry?
[16:49:58] wasamasa: the space between a word and another one
[16:50:00] sohrab: has joined #ruby
[16:50:11] timonv: has joined #ruby
[16:50:18] kahunaio: has joined #ruby
[16:50:19] havenwood: c_nick: To read about why not, do a web search along the lines of: floating point for currency
[16:50:21] volty: it's not space, it's just boundary
[16:50:25] tcarter1719: has joined #ruby
[16:50:26] apeiros: wasamasa: not quite
[16:50:28] sohrab1: has joined #ruby
[16:50:31] boomls: apeiros, basically i need to install Xcode, Homebrew, Git, RVM, Ruby & Rails
[16:50:47] wasamasa: figuratively speaking of course
[16:50:58] havenwood: boomls: No XCode or Homebrew on Ubuntu.
[16:50:59] volty: a position betweeen \w and \W
[16:51:12] havenwood: Well, technically you *could* use brew but...
[16:51:13] volty: (and viseversa )
[16:51:27] apeiros: yeah, one important aspect of \b is that it's 0 characters long
[16:51:33] apeiros: i.e. it's "between characters"
[16:51:39] havenwood: boomls: Err, or are you installing on OS X you mean?
[16:51:52] havenwood: boomls: OS X or Ubuntu?
[16:51:54] tcarter1719: has joined #ruby
[16:52:04] apeiros: boomls: probably a long list of arguments to aptitude or apt-get
[16:52:06] jhooker: has joined #ruby
[16:52:09] boomls: OK havenwood - how do I install something equivalent on Ubuntu. I don't have mac
[16:52:15] apeiros: the specific arguments depending on what you need
[16:52:28] aapole: has joined #ruby
[16:52:34] boomls: I have been referred to railsinstaller but that's just for windows or mac
[16:53:36] c_nick: Ah i dont remember now but Objective C was open sourced on Linux it started with N
[16:53:42] snockerton: has joined #ruby
[16:54:10] pragmatism: has joined #ruby
[16:54:11] c_nick: NGet no something similar
[16:54:14] havenwood: boomls: \curl -sSL https://get.rvm.io | bash -s -- --rails
[16:54:29] hahuang65: has joined #ruby
[16:55:16] tcarter1719: boomls, http://rvm.io/rvm/basics
[16:55:38] droidburgundy: has joined #ruby
[16:55:49] edwinvdgraaf: has joined #ruby
[16:56:17] krisquigley: has joined #ruby
[16:56:46] boomls: thanks for that link havenwood & tcarter1719
[16:57:08] deric_skibotn: has joined #ruby
[16:57:22] banister: has joined #ruby
[16:57:43] spider-mario: has joined #ruby
[16:58:52] Marsupermammal: has joined #ruby
[16:59:19] qwertme: has joined #ruby
[17:01:01] downwithbender: has joined #ruby
[17:01:04] damir_: has joined #ruby
[17:01:29] snockerton: has joined #ruby
[17:01:39] pragmatism: has joined #ruby
[17:01:51] yfeldblum: has joined #ruby
[17:02:01] blackmesa: has joined #ruby
[17:02:08] Spami: has joined #ruby
[17:03:41] niemc2: has joined #ruby
[17:04:03] AlexRussia: has joined #ruby
[17:04:38] _ixti_: has joined #ruby
[17:05:24] The_Phoenix: has joined #ruby
[17:06:10] musl: has joined #ruby
[17:06:15] alphaatom: has joined #ruby
[17:07:45] wallerdev: has joined #ruby
[17:08:57] jackjackdripper: has joined #ruby
[17:09:50] serivich: has joined #ruby
[17:09:54] lkba: has joined #ruby
[17:10:36] alphaatom: has joined #ruby
[17:11:26] andikr: has joined #ruby
[17:11:58] blue_deref: has joined #ruby
[17:12:00] baweaver: has joined #ruby
[17:12:52] nertzy: has joined #ruby
[17:13:20] shock_one: has joined #ruby
[17:13:42] nobitanobi: has joined #ruby
[17:13:44] mrmargol_: has joined #ruby
[17:14:10] maxshelley: has joined #ruby
[17:15:06] EagleDelta: has joined #ruby
[17:15:16] boomls: Can someone recommend a good text editor for ubuntu that works well with Ruby?
[17:15:37] JDiPierro: has joined #ruby
[17:16:15] pipework: boomls: vim
[17:16:32] Musashi007: has joined #ruby
[17:16:33] dfockler: boomls: Kate
[17:17:13] umgrosscol: boomls: If you're going to be typing all day, vim.
[17:17:32] umgrosscol: boomls: Might as well save yourself some pain and learn an alternative keyboard layout while you're at it.
[17:17:36] dfockler: boomls: if you actually want to learn vim, then vim
[17:18:02] JakFrist: has joined #ruby
[17:18:06] umgrosscol: boomls: steeper learning curve, but when you get there, it's easier on your hands.
[17:18:30] havenwood: boomls: Atom is a free option if you don't want to learn vi or emacs: https://atom.io/
[17:19:08] quimrstorres: has joined #ruby
[17:19:22] havenwood: boomls: https://github.com/atom/atom#debian-linux-ubuntu
[17:19:32] pipework: havenwood: vim at least is easier. nocompatible ftw
[17:19:35] boomls: I will check out atom
[17:19:47] tcarter1719: Atom is pretty awesome, it's a fairly new project but it's already got a huge library of packages.
[17:19:58] havenwood: pipework: vim vim vooom!
[17:20:17] eam: boomls: emacs
[17:20:18] pipework: havenwood: I'm watching tmnt from the first show.
[17:20:23] tcarter1719: You should learn vim anyway, comes in handy when you just need to make quick edits or change system configs without having to launch a GUI with sudo.
[17:20:27] doodleha_: has joined #ruby
[17:20:45] havenwood: pipework: Cowabunga?
[17:20:52] pipework: havenwood: pizza!
[17:20:53] boomls: I've heard of sublime text - is that not worth considering?
[17:20:58] bronson: has joined #ruby
[17:21:01] imperator: has left #ruby: ("Leaving")
[17:21:18] pizzaops: You called?
[17:21:19] tcarter1719: It's overpriced and atom is FOSS and very similar.
[17:21:27] umgrosscol: boomls: My colleague uses sublime text. He likes it.
[17:22:01] pizzaops: Sublime is excellent but so is atom, it's basically a sublime clone, and it's free, like tcarter1719 said.
[17:22:04] podman: has joined #ruby
[17:22:12] chette: ActiveSupport::TimeWithDialation needs a VectorSpace to describe background gravitational potential, and also the dt/dv of accelleration/speed of light. are there any good Cosmologic libraries out there?
[17:22:48] mrmargol_: has joined #ruby
[17:23:06] dudedudeman: VIM is free, too!
[17:23:23] Hanmac: shevy the ruby % in rwx did increase! its now 0.1% more at 4.1% ;P
[17:23:26] axl__: has joined #ruby
[17:23:54] c_nick: havenwood: if u otta replace 45.67899 after rounding in the same string how can u achieve that
[17:24:33] havenwood: >> "45.67899".to_f.round 2
[17:24:34] ruboto: havenwood # => 45.68 (https://eval.in/381961)
[17:24:39] havenwood: c_nick: ^ do you know how #map works?
[17:24:47] _seanc_: has joined #ruby
[17:25:11] c_nick: yes map will perform an operation on the elements of the array
[17:25:13] boomls: final question - is there a website (or maybe built into text editor?) where I can search for a ruby function/method etc. Something like the codeacademy Ruby glossary http://www.codecademy.com/glossary/ruby but with a search function
[17:25:14] NeverDie: has joined #ruby
[17:25:32] tcarter1719: I use ruby-doc.org
[17:25:52] havenwood: ?pry boomls
[17:25:52] ruboto: boomls, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[17:26:09] postmodern: has joined #ruby
[17:26:24] c_nick: >> "'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/)
[17:26:25] ruboto: c_nick # => /tmp/execpad-bb8bb1eb53f0/source-bb8bb1eb53f0:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381964)
[17:26:25] pragmatism: has joined #ruby
[17:26:41] c_nick: >>""File12.3 45.67 67.88, 78.90,89.223545 67.889".scan(/\b\d+\.\d+\b/)
[17:26:43] ruboto: c_nick # => /tmp/execpad-f1ff19685cf9/source-f1ff19685cf9:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/381966)
[17:26:47] tcarter1719: Oooo, havenwood I've never heard of that.
[17:27:19] c_nick: >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/)
[17:27:20] ruboto: c_nick # => ["45.67", "67.88", "78.90", "89.223545", "67.889"] (https://eval.in/381968)
[17:27:33] baweaver: has joined #ruby
[17:27:46] c_nick: >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.round(2)}
[17:27:47] ruboto: c_nick # => undefined method `round' for "45.67":String (NoMethodError) ...check link for more (https://eval.in/381971)
[17:28:07] c_nick: >> "'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.to_f.round(2)}
[17:28:08] ruboto: c_nick # => /tmp/execpad-30f7c99b70ef/source-30f7c99b70ef:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/381972)
[17:28:10] davedev24_: has joined #ruby
[17:28:16] kahunaio: has joined #ruby
[17:28:19] c_nick: >> 'File12.3 45.67 67.88, 78.90,89.223545 67.889'.scan(/\b\d+\.\d+\b/).map{|s| s.to_f.round(2)}
[17:28:20] ruboto: c_nick # => [45.67, 67.88, 78.9, 89.22, 67.89] (https://eval.in/381973)
[17:28:21] umgrosscol: boomls: Using pry's show-source comes in handy. Unless it's one of those functions that rails generates on the fly for you
[17:29:09] c_nick: havenwood: This will return the array rounded. what if u need that same string with modified values like File12.3 45.67 67.88, 78.9,89.22 67.80
[17:29:23] Asher: has joined #ruby
[17:29:54] nonparfumee: has joined #ruby
[17:30:10] baweaver: In on this late, but why is the data formatted like that?
[17:30:21] Hanmac: umgrosscol: hm show-source might also not work for third-party compiled functions ... for sample one of my bindings does have macro generated methods (where show-source doesnt know what to do)
[17:30:29] Hanmac: c_nick: you are looking for gsub
[17:30:30] gianlucadv: has joined #ruby
[17:30:30] baweaver: If possible, always fix the data first before making a hack to parse it
[17:30:47] ascarter: has joined #ruby
[17:30:48] shock_one: has joined #ruby
[17:31:25] umgrosscol: hanmac: If they're not generated on the fly, show-source should be able to find them in the gem. Anything that's generated on the fly is inaccessible to show-source.
[17:32:05] baweaver: that, and you have a command line + repl for a reason. It's advisable to not use the channels REPL until you have something already figured out.
[17:32:21] havenwood: >> "45.67899 12.432 432.432".gsub(/\b\d+\.\d+\b/) { |s| s.to_f.round(2).to_s }
[17:32:22] ruboto: havenwood # => "45.68 12.43 432.43" (https://eval.in/381979)
[17:32:25] c_nick: hanmac: oh yeah let me try that
[17:32:54] apeiros: havenwood: noooo! did you miss that it's about money?!?
[17:32:56] jds: has joined #ruby
[17:33:00] havenwood: c_nick: like baweaver said, try it out locally with pry/irb and just use ruboto to demonstrate
[17:33:01] apeiros: ah well, .to_s
[17:33:04] apeiros: nothing can go wrong :)
[17:33:30] Hanmac: umgrosscol: hm like i said it might not work with compiled stuff ... and i can say that MY methods dont have a source body which can be parsed ... like one of my macros macro_attr(attr) does make _get_attr and _set_attr functions ... when rdoc, yard or pry are looking for _get_attr in the source they will not find them
[17:33:33] havenwood: apeiros: I gave the floating point currency caveat but was rebuffed. ;)
[17:33:33] jwilson_: has joined #ruby
[17:33:58] c_nick: apeiros: http://stackoverflow.com/questions/3730019/why-not-use-double-or-float-to-represent-currency will use decimals but trying out simple values to see if it works out
[17:34:01] Hanmac: havenwood: you dont need to call to_s in gsub, it will do it for you
[17:34:12] havenwood: hanmac: ah right
[17:34:18] havenwood: that's nice
[17:35:18] jenrzzz: has joined #ruby
[17:35:26] Cust0sLim3n: has joined #ruby
[17:36:11] c_nick: cant I ping ruboto and play?
[17:36:22] ellisTAA: has joined #ruby
[17:36:55] c_nick: hehe it works
[17:37:00] Kricir: has joined #ruby
[17:37:09] NeverDie: So how does Ruby get funded?
[17:37:20] musgravejw: has joined #ruby
[17:37:41] chette: Egyptian style slave labor. workers payed with bread and beer
[17:37:54] dfockler: AT&T hires a few open source ruby devs
[17:38:02] dfockler: and other companies
[17:38:33] DroidBur_: has joined #ruby
[17:38:34] kinduff: has joined #ruby
[17:38:34] kinduff: has joined #ruby
[17:39:33] emilkarl: has joined #ruby
[17:39:38] dfockler: and now there's Ruby Together! https://rubytogether.org/
[17:39:46] weaksauce: takes about 10 min to learn enough vim to match other text editors and then you can sprinkle in the extra features.
[17:40:00] havenwood: NeverDie: Heroku pays several members of the Ruby core team.http://rubycentral.org/
[17:40:11] havenwood: Oops, meant those to be separate lines.
[17:40:12] havenwood: http://rubycentral.org/
[17:40:19] NeverDie: vikaton: Ping.
[17:40:32] micmus: has joined #ruby
[17:40:34] vikaton: NeverDie: hi
[17:40:54] otherj: has joined #ruby
[17:41:02] RegulationD: has joined #ruby
[17:41:10] musgravejw: has left #ruby: ("Leaving")
[17:42:43] gregf: has joined #ruby
[17:42:56] crankharder: is it possible to have 'bundle install' *not* append "BUNDLED_WITH\n 1.10.3" to the local Gemfile.lock when it doesn't exist yet?
[17:43:36] ScriptGeek: has joined #ruby
[17:44:00] umgrosscol: crankharder: What results are you looking for? or to what end do you need that functionality?
[17:44:49] crankharder: since it adds a diff to the local repo it makes subsequent pulls break
[17:44:53] vikaton: have you guys seen the presentation of Crystal Erik Ober did? https://www.youtube.com/watch?v=iyqURh5LSF4
[17:45:03] c_nick: Thanks all
[17:45:13] crankharder: but also, 'bundle install' I wouldn't think should change anything
[17:45:23] diegoviola: "So for example, let's go back to one of the things where I think the designers of subversion were complete morons. Strong opinions, that's me, right? There are a few of them in the room today, I suspect. You are stupid." -- Linus Torvalds
[17:45:30] Narzew: has joined #ruby
[17:45:58] swerter: has joined #ruby
[17:46:07] eam: truth hurts
[17:47:02] A205B064: has joined #ruby
[17:47:03] dfockler: truth hurts worse when a successful person calls you stupid
[17:47:31] revath: has joined #ruby
[17:47:35] jhass: crankharder: https://github.com/bundler/bundler/issues/3697
[17:47:39] jhass: bring some time
[17:48:48] diegoviola: eam: the svn thing he said?
[17:49:00] bricker: has joined #ruby
[17:49:06] mdw: has joined #ruby
[17:49:25] eam: diegoviola: yeah
[17:49:42] chette: sticks and stones may brake my bones but Regex will never hurt me
[17:52:06] shock_one: has joined #ruby
[17:52:39] crazydiamond: has joined #ruby
[17:52:48] lkba_: has joined #ruby
[17:53:58] baweaver: has joined #ruby
[17:55:19] mikecmpbll: has joined #ruby
[17:56:47] musl: has joined #ruby
[17:58:04] Yiota: has joined #ruby
[17:58:05] musl: has joined #ruby
[17:59:14] hahuang65: has joined #ruby
[17:59:32] weszlem: has joined #ruby
[17:59:54] segfalt: has joined #ruby
[18:00:05] sarkyniin: has joined #ruby
[18:00:15] j4cknewt: has joined #ruby
[18:00:43] musl: has joined #ruby
[18:01:08] zenguy_pc: has joined #ruby
[18:01:11] platzhirsch1: has left #ruby: ()
[18:01:12] quimrsto_: has joined #ruby
[18:01:45] aaeron: has joined #ruby
[18:02:18] simplyianm: has joined #ruby
[18:02:52] arturmartins: has joined #ruby
[18:02:54] zenguy_pc: has joined #ruby
[18:04:51] jaycee: has joined #ruby
[18:04:53] kahunaio: has joined #ruby
[18:05:44] mfranzwa_: has joined #ruby
[18:06:20] Spami: has joined #ruby
[18:07:55] NeverDie: has joined #ruby
[18:07:59] Marsupermammal: has joined #ruby
[18:08:01] JakFrist: has joined #ruby
[18:08:04] sohrab: has joined #ruby
[18:08:16] JoshL: has joined #ruby
[18:08:17] bluish: has joined #ruby
[18:08:32] edwinvdgraaf: has joined #ruby
[18:09:02] chette: how would I go about adding a timezone, such as BCT?
[18:09:18] momomomomo: has joined #ruby
[18:09:50] jhass: "adding"?
[18:10:38] hotpancakes: has joined #ruby
[18:10:40] baweaver: has joined #ruby
[18:10:51] chette: yes. Say I figure out the conversions in a function. Would I simply define a function for class Time?
[18:11:14] malconis: has joined #ruby
[18:11:29] pragmatism: has joined #ruby
[18:11:30] chette: or, suppose I wanted to switch my computer from utc to bct
[18:11:48] simplyianm: has joined #ruby
[18:12:15] eam: chette: I suspect the ruby bindings leverage whatever libc defines
[18:12:25] eam: you'd probably add the new tzdata at that level
[18:12:43] Authenticator: has joined #ruby
[18:13:00] chette: is it not possible to change env bindings
[18:13:19] eam: what do you mean env bindings?
[18:13:21] chette: dynamiclly
[18:13:48] keen________: has joined #ruby
[18:14:23] micmus: has joined #ruby
[18:14:28] Frem: has joined #ruby
[18:14:55] chette: the class Binding
[18:15:28] joaomdmoura: has joined #ruby
[18:16:09] jhass: BCT doesn't seem to be a registered timezone identifier
[18:16:50] nateberkopec: has joined #ruby
[18:17:20] kahunaio: has joined #ruby
[18:18:40] chette: BCT seconds tick slower then seconds on earth. So the actual time since the last epoc would change
[18:19:11] eam: chette: you'll need to mess with tzdata
[18:19:20] eam: ruby does not implement that logic itself, it depends on the system
[18:19:37] eam: is BCT similar to TAI?
[18:20:09] chette: not actually
[18:20:22] simplyia_: has joined #ruby
[18:20:22] droidburgundy: has joined #ruby
[18:20:31] unshadow: has joined #ruby
[18:20:32] chette: BCT is suppose to be neutral to gravitational dilation
[18:20:54] eam: ok, so some other frame of reference
[18:21:05] eam: happen to have a link to its definition?
[18:21:31] c_nick: has left #ruby: ()
[18:21:35] ndrei: has joined #ruby
[18:21:49] chette: https://en.wikipedia.org/wiki/Barycentric_Coordinate_Time
[18:21:59] Authenticator: chette: Are you referring to the ENV variables in the shell, or local variables for a method as in 'binding.pry'?
[18:22:34] iinzg: has joined #ruby
[18:23:03] eam: chette: you're going to have trouble working with BCT on any unix system
[18:23:35] eam: if you need any kind of precision at all you'll likely need to implement your own interfaces (and hardware)
[18:24:19] eam: POSIX time is defined as UTC. Mapping UTC to TAI is pretty straightforward as it's just a matter of tracking leap seconds, but converting to BCT with precision would be difficult
[18:24:42] chette: I can handle the conversion
[18:24:48] chette: it's just the emplementation
[18:25:25] eam: all unix timezones are based on UTC
[18:25:42] eam: ruby just hooks into the posix time functions
[18:26:19] simplyianm: has joined #ruby
[18:26:29] DLSteve: has joined #ruby
[18:27:16] kahunaio: has joined #ruby
[18:28:16] pengin: has joined #ruby
[18:29:58] ta: has joined #ruby
[18:30:17] acke: has joined #ruby
[18:31:09] arturhoo: has joined #ruby
[18:31:29] hakunin: has joined #ruby
[18:31:30] mrmargolis: has joined #ruby
[18:31:41] dagda1: has joined #ruby
[18:32:08] edwinvdgraaf: has joined #ruby
[18:32:18] kahunaio: has joined #ruby
[18:34:55] tskogberg: has joined #ruby
[18:36:01] evanjs: has joined #ruby
[18:36:51] bgmarx: has joined #ruby
[18:37:05] dudedudeman: how hard would it be to set up a web app to take drag and dropped file, and then spit that file through an already built and working bash script?
[18:37:38] Kruppe: has joined #ruby
[18:37:49] dudedudeman: go to like, draggedfile.com, drag your file in to a specified area, and then just sit back and wait for the script to work it's magic
[18:37:54] eam: very easy
[18:37:55] jhass: 5.7 points hard
[18:37:56] edwinvdgraaf: has joined #ruby
[18:37:57] postmodern: is there info on the Module.new pattern somewhere?
[18:37:57] Senjai: dudedudeman: Google it :P
[18:38:02] allomov: has joined #ruby
[18:38:02] Senjai: dudedudeman: It's kind of a common thing
[18:38:19] Senjai: postmodern: It's not a pattern, I dont understand what you're trying to do
[18:38:29] Authenticator: dudedudeman: The "drag and drop" is more HTML/etc than webapp. Pretty easy though.
[18:38:48] bootstrappm: dudedudeman: I'd say just be careful on how long that bash script will run
[18:38:49] dudedudeman: Senjai: i figured it would be. i'm clearly googling the wrong things, as per usual lol
[18:38:50] postmodern: Senjai, sigh, it is, where you define a class MyModule < Module, and do include MyModule.new(state_goes_here)
[18:39:01] bootstrappm: you might need a worker
[18:39:09] dudedudeman: let's say i have workers available
[18:39:29] art-solopov: has joined #ruby
[18:39:52] dudedudeman: the script itself is already build and deployed on a machine, but you currently have to navigate to a specific folder location on our network that's kind of hidden and obscure
[18:40:03] Carnage\: has joined #ruby
[18:40:21] dudedudeman: the script starts working once it sees a file in a specific folder. it checks that folder every 60 seconds
[18:40:21] skysploit: has joined #ruby
[18:40:21] skysploit: has joined #ruby
[18:40:25] Senjai: postmodern: What fancy sort of metaprogramming are you trying to do there?
[18:40:29] acke: has joined #ruby
[18:40:33] bootstrappm: other than that yeah, just google the different components. two i can think of: drag and drop javascript, execute external command ruby
[18:40:52] Authenticator: dudedudeman: Look into Sinatra for a simple Ruby webapp. It's very easy, but there are optimizations when you start dealing with large files, etc, so as to not just buffer the files in memory.
[18:40:58] dredozubov: has left #ruby: ("Leaving...")
[18:40:58] dudedudeman: sinatra is my jam!
[18:40:58] Senjai: postmodern: http://ruby-doc.org/core-2.2.0/Module.html#method-c-new
[18:41:07] hakunin: has joined #ruby
[18:41:13] dudedudeman: bootstrappm: that last query, that gives me some good reading. thanks
[18:41:22] Senjai: I tend to avoid anonymous classes though, I would suggest against it unless there is an actual reason you have to build classes dynamically.
[18:41:28] GnuYawk: has joined #ruby
[18:41:36] Senjai: s/classes/modules
[18:42:01] BanzaiJoe: has joined #ruby
[18:42:04] Scroff: has joined #ruby
[18:42:06] postmodern: Senjai, i know of the method, was looking for info on the pattern
[18:42:12] bruno-: has joined #ruby
[18:42:19] platzhirsch: has joined #ruby
[18:42:31] acke_: has joined #ruby
[18:42:36] Senjai: I have no idea man.
[18:42:40] alphaatom: has joined #ruby
[18:43:17] gambl0re: are rails gems just added features you can use in your app?
[18:43:26] acke__: has joined #ruby
[18:43:53] Authenticator: postmodern: I've never heard of that *by name*. What are you trying to do? What is the pattern supposed to offer?
[18:43:53] snockerton: has joined #ruby
[18:43:58] Senjai: gambl0re: Rails consists of a number of gems. They're all pulled in togerther with an Engine
[18:44:07] Senjai: postmodern: what Authenticator said
[18:44:11] Wintooshock: has joined #ruby
[18:45:20] krisquigley: has joined #ruby
[18:45:53] DroidBur_: has joined #ruby
[18:47:18] bruno-_: has joined #ruby
[18:48:04] codecop: has joined #ruby
[18:48:56] BanzaiJoe: Senjai rubytapas has a free video on Struct syntax, Structs are also part of the library and there are Rubydocs on them ( http://ruby-doc.org/core-2.2.2/Struct.html )
[18:50:26] baweaver: has joined #ruby
[18:50:56] voker57: has joined #ruby
[18:51:14] Senjai: BanzaiJoe: ik, was that meant to be send to postmodern ?
[18:51:19] BanzaiJoe: or sorry, postmodern
[18:51:25] Senjai: okay, was confused :P
[18:51:27] BanzaiJoe: postmodern that was for you :)
[18:51:28] ellisTAA: has joined #ruby
[18:51:35] tskogberg: has joined #ruby
[18:51:53] acke: has joined #ruby
[18:52:40] BanzaiJoe: postmodern http://www.rubytapas.com/episodes/20-Struct
[18:53:28] swgillespie: has joined #ruby
[18:53:30] dstarh: can anyone tell me why StringIO is not working here where File.open is working just fine? https://gist.github.com/dstarh/aea1a470c29f92ba8511
[18:54:30] Senjai: dstarh: puts string_io.read
[18:54:43] Senjai: also you should write to the string_io
[18:54:51] Senjai: as if it was an actual file
[18:55:19] dstarh: Senjai i've used string_io.read, i've used string_io.write as well as puts and didn't make a difference
[18:55:24] poguez_: has joined #ruby
[18:55:31] caseypatrickdris: has joined #ruby
[18:55:38] bigkevmcd: has joined #ruby
[18:55:47] Senjai: Then its probably that generated_sql isn't a correct value
[18:55:58] dstarh: string_io.string will give you the underlying string
[18:56:04] Senjai: dstarh: Yeah, dont use that
[18:56:11] Authenticator: Senjai: What would the difference be? (Write as if it were an actual file...)
[18:56:13] Senjai: dstarh: Otherwise there is no point in using StringIO
[18:56:20] acke: has joined #ruby
[18:56:41] ljarvis: using that is fine..
[18:56:41] Senjai: Authenticator: I had thought puts wasn't a member of IO, but it is
[18:57:00] droidburgundy: has joined #ruby
[18:57:35] droidburgundy: has joined #ruby
[18:57:37] mesamoo: has joined #ruby
[18:57:51] dstarh: Senjai I don't think thats the issue, as i'm running the method twice once with the file.open block and once with the string_io and with the file wrapper it actually writes something to the file
[18:58:13] ljarvis: dstarh: what if you set it to $stdout ?
[18:58:21] Senjai: ljarvis: NO
[18:58:26] Senjai: dstarh: Pretend you didn't hear that
[18:58:33] ljarvis: dstarh: ignore Senjai. Tell me if that works?
[18:58:49] Authenticator: dstarh: This works for me. def test(str, fh) ; fh.puts str ; fh ; end ; fh = t('kittens', StringIO.new) ; fh.rewind ; fh.read
[18:59:02] Authenticator: The difference is the rewind.
[18:59:06] Senjai: Authenticator: that makes sense
[18:59:27] pragmati_: has joined #ruby
[18:59:28] ljarvis: ugh.. that makes no difference to their code. the #string method returns the underlying string buffer without doing read/writes
[18:59:30] Senjai: But I dont ever remember having to rewind a StringIO to call read
[18:59:33] ljarvis: so what they want *should* work
[18:59:45] Senjai: ljarvis: Its probably an issue in the code thats not being shown
[18:59:52] dstarh: ljarvis works just fine with $stdout
[18:59:54] ljarvis: that's what I'm thinking
[19:00:06] Senjai: dstarh: You are doing something very wrong :P
[19:00:06] ljarvis: right, then there's something else wrong
[19:00:11] ljarvis: but we don't have enough code to tell
[19:00:11] dopie: has joined #ruby
[19:00:13] Senjai: dstarh: Gist all the code please
[19:00:14] alphaatom: has joined #ruby
[19:01:26] alphaatom: has joined #ruby
[19:01:28] dstarh: ok editing my gist
[19:01:32] dorei: has joined #ruby
[19:02:41] alphaatom: has joined #ruby
[19:03:08] leafybasil: has joined #ruby
[19:03:18] mrmargol_: has joined #ruby
[19:03:50] dstarh: Senjai https://gist.github.com/dstarh/aea1a470c29f92ba8511
[19:04:09] dstarh: i don't think you need the process_table method
[19:05:46] dstarh: it's also being called from rake but I don't think that would make a difference either
[19:06:42] mfranzwa: has joined #ruby
[19:07:34] quimrstorres: has joined #ruby
[19:08:34] ljarvis: you realise none of this code calls any of those procs right? so with this, all of those buffers will be empty so it's completely useless in terms of us helping
[19:09:00] ljarvis: presumably they're call in process_table. I think you need to create a small reproduction of this
[19:09:13] n008f4g_: has joined #ruby
[19:09:41] dstarh: ljarvis ok i'll work on a small reproducable example
[19:10:20] caseypatrickdris: has joined #ruby
[19:10:46] ludico8: has joined #ruby
[19:10:47] ludico8: Hi everyone!
[19:11:09] Scripore: has joined #ruby
[19:11:13] symm-: has joined #ruby
[19:11:16] ludico8: I have an issue when Iam using rufus-scheduler and passenger
[19:11:26] ludico8: seems that everything works well in dev
[19:11:27] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[19:11:40] ludico8: but once it is on prod, my task is not running
[19:12:13] baweaver: has joined #ruby
[19:12:21] ludico8: seems like the scheduled task is not running on prod
[19:12:33] ljarvis: ludico8: do you have logs you can check?
[19:12:58] ludico8: but there is anything on the log
[19:13:00] ljarvis: "seems like" doesn't seem confident
[19:13:04] ludico8: the log keeps empty in prod
[19:13:21] ljarvis: is the process started (i'm not sure how rufus-scheduler works)
[19:13:26] aninaki: has joined #ruby
[19:14:13] ludico8: well, Im not pretty sure if is running, indeed, I think is not running
[19:14:25] ludico8: seems like ruffus & passanger arent compatibles
[19:15:09] alphaatom: has joined #ruby
[19:15:26] ljarvis: i would argue that they don't have anything to do with each other. How is the scheduler started? from a rake task? an initializer? other tooling?
[19:16:07] otherj: has joined #ruby
[19:16:16] ljarvis: I assume you've gone through these links? https://github.com/jmettraux/rufus-scheduler#faq
[19:16:40] bgmarx: has joined #ruby
[19:16:52] ljarvis: it does look like passenger has issues with it
[19:17:06] finisherr: has joined #ruby
[19:17:19] ljarvis: so I'll eat my words. This all seems really fragile to me
[19:18:49] coderhs: has joined #ruby
[19:18:59] ludico8: :ljarvins, yes, like an initializer
[19:19:26] hazelux: has joined #ruby
[19:19:27] tskogberg: has joined #ruby
[19:19:41] weszlem: has joined #ruby
[19:19:44] ludico8: yes, I made my task as is on that link
[19:20:26] ludico8: in the development enviroment is working well
[19:20:39] ljarvis: ludico8: did you do this? http://stackoverflow.com/questions/21861387/rufus-cron-job-not-working-in-apache-passenger#answer-21868555
[19:20:48] ludico8: but in prod seems that something don't allow to work in the same way
[19:21:18] ellisTAA: has joined #ruby
[19:21:53] lkba: has joined #ruby
[19:22:32] simplyianm: has joined #ruby
[19:22:43] pluxev: has joined #ruby
[19:22:54] NeverDie: has joined #ruby
[19:22:58] quimrstorres: has joined #ruby
[19:24:05] jenrzzz: has joined #ruby
[19:24:35] ludico8: :ljarvis let me check it
[19:25:34] jackjackdripper: has joined #ruby
[19:25:39] kirun: has joined #ruby
[19:26:25] kadoppe: has joined #ruby
[19:26:37] Torrieri: has joined #ruby
[19:26:37] Torrieri: has joined #ruby
[19:27:09] adac: has joined #ruby
[19:27:16] dcarmich: has joined #ruby
[19:27:17] Lingo__: has joined #ruby
[19:28:47] adac: For a has this works just fine for outputting th value of a key: hash['key'] however when I do key[object.first] (which also is a string of an existing key) it doesn't work and I get a nil value. Any ideas?
[19:29:18] ruboto: We can't help you without your code, please post it to https://gist.github.com
[19:29:46] Senjai: dstarh: At lunch man sorry
[19:30:02] dorei: has joined #ruby
[19:31:06] Rubie: has joined #ruby
[19:31:33] Pwnna: has joined #ruby
[19:31:36] leafybasil: has joined #ruby
[19:31:49] Pwnna: when using minitest, is there a way to assert_raises exceptions that's thrown from a thread?
[19:32:09] Pwnna: the problem for me is there are 2 threads, and both of them are going to throw exceptions
[19:32:15] Pwnna: i need to catch both of them using assert_raises
[19:32:30] jhass: no way to not run the threads in the test?
[19:32:41] yfeldblum: has joined #ruby
[19:32:41] jhass: but to call the code they run directly?
[19:32:43] Pwnna: testing those threads is the key point.
[19:32:50] ljarvis: ah testing threads
[19:32:55] ljarvis: luck good that with
[19:32:59] Pwnna: (actually 3 threads including the main thread, and all three will throw exceptions)
[19:33:08] konieczkow: has joined #ruby
[19:33:11] jhass: mmh, does .abort_on_exception reraise in the main thread? I forgot
[19:33:31] Pwnna: i think so
[19:33:37] Pwnna: but i have like 3 exceptions raising
[19:34:55] Pwnna: and no, can't call threads separately because they're internal to this class
[19:35:06] nonparfumee: has joined #ruby
[19:35:18] jhass: are you using exceptions to quit the thread or why is that?
[19:35:39] Pwnna: pretty much
[19:35:45] Pwnna: catestrophic failure has been detected
[19:35:47] msgodf: has joined #ruby
[19:35:58] volty: has joined #ruby
[19:36:04] Pwnna: all threads are in error condition, so any errors will be thrown
[19:36:09] mengu__: has joined #ruby
[19:36:13] apeiros: Thread#value
[19:36:20] jhass: I'd reconsider that still (catch them inside the thread and let it exit normally if you really really can't break a loop or whatever)
[19:36:20] nym: has joined #ruby
[19:36:31] apeiros: if you have access to the thread object, that is
[19:36:31] jhass: but yeah #value or simply check .alive?
[19:36:47] apeiros: alternatively (yucki) stub Kernel#raise if it's raised from ruby code
[19:36:53] apeiros: if it's from C, that won't work
[19:36:57] ludico8: :ljarvis but Im working with nginx not apache
[19:37:06] mengu: has joined #ruby
[19:37:15] pluxev: has left #ruby: ()
[19:38:03] volty: does rbenv save somewhere the source files of installed ruby's ?
[19:38:05] ludico8: I think that solution is talking assuming you are working with apache
[19:38:41] DoubleMalt: has joined #ruby
[19:39:26] jnormandeau: has joined #ruby
[19:39:39] jhass: ludico8: simple, just replace Apache with Nginx in the URL: https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#spawning_methods_explained
[19:39:50] t0rrieri: has joined #ruby
[19:39:55] havenwood: volty: If I recall correctly RVM and ruby-install keep the src dir around by default but rbenv's ruby-build nukes it.
[19:40:36] volty: thx havenwood, going to download it manually
[19:40:40] dfockler: what's the best way to test a function that doesn't update the classes state, and doesn't return anything?
[19:40:49] jhass: ludico8: https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#PassengerSpawnMethod
[19:41:20] jhass: dfockler: what does it do?
[19:41:30] havenwood: volty: Yeah, looks like ruby-build uses a subdir of TMPDIR by default for the src but has a RUBY_BUILD_BUILD_PATH env option.
[19:41:34] ludico8: :jhass thanks!
[19:41:37] dfockler: it makes a HTTP request to another server
[19:41:43] volty: you (usually) test against what is expected to change :)
[19:41:47] jhass: dfockler: webmock
[19:42:11] dfockler: thanks, I'll check it out
[19:42:23] nobitanobi: has joined #ruby
[19:42:59] ericmeds: What would you folks recommend to measure code quality/test coverage?
[19:43:17] apoplexy: what is the difference between a program and a script?
[19:43:33] ljarvis: http://stackoverflow.com/questions/2286552/difference-between-a-script-and-a-program
[19:43:37] ljarvis: first google result
[19:43:46] apoplexy: ljarvis: how did you do that
[19:43:51] ljarvis: i googled it..
[19:44:01] apoplexy: in my country i cannot access google
[19:44:09] ljarvis: what country?
[19:44:11] volty: apoplexing is just trolling
[19:44:40] jhass: it's the first duckduckgo result too
[19:44:43] volty: the last time he was Russian, ahah
[19:45:01] jhass: also the first bing result
[19:45:18] baweaver: volty: Could always just trace the IP
[19:45:23] jhass: and the first startpage result
[19:45:26] baweaver: assuming they're not using web gateway
[19:45:27] evanjs: has joined #ruby
[19:45:27] apipkin: has joined #ruby
[19:45:41] apoplexy: volty: when was i russian
[19:45:49] dudedudeman: oh man. someone said bing
[19:45:55] ljarvis: i'll build an ip tracer i have vb6
[19:46:06] simplyianm: has joined #ruby
[19:46:14] jhass: apoplexy: how's your ruby though?
[19:46:19] dfockler: ljarvis: make sure it has a GUI though
[19:46:25] Rubie: has joined #ruby
[19:46:40] ljarvis: dfockler: it's the only way i'll be able to sell it
[19:46:42] apipkin: I have a gem in my Gemfile, but after running `bundle install` it still tells me that the gem isn't avialble
[19:46:50] jhass: apipkin: bundle exec !!
[19:47:01] ljarvis: <3 !! and !$
[19:47:11] Zai00: has joined #ruby
[19:47:18] ljarvis: sudo !! typed more than anything ever
[19:47:25] baweaver: https://en.wikipedia.org/?title=Rogers_Communications - Anyways, Canadian
[19:47:31] jhass: mh, I press Alt+. instead of !$
[19:47:44] apoplexy: jhass: workin' on html/css/js first
[19:47:44] sandstrom: has joined #ruby
[19:47:48] apoplexy: then we'll talk ruby
[19:47:50] volty: it's my nose. weird questions, in perfect perplex style. having good time. etc etc. but never mind,just ask your questions.
[19:47:53] ljarvis: jhass: noice
[19:48:03] jhass: apoplexy: great, see you in #ruby-offtopic then, this channel is for ruby questions
[19:48:23] baweaver: CPE2cd05a1a8339-CMbc1401279700.cpe.net.cable.rogers.com , but I digress
[19:48:32] dudedudeman: what a string
[19:48:45] jhass: a sequence of characters
[19:48:56] baweaver: ACTION high fives jhass
[19:49:08] eam: not always characters
[19:49:11] zenguy_pc: has joined #ruby
[19:49:17] dudedudeman: a sequence of stuff?
[19:49:23] RobertBirnie: has joined #ruby
[19:49:24] ljarvis: not always a sequence
[19:49:49] dudedudeman: ACTION is learning stuff
[19:49:56] hazelux: has joined #ruby
[19:49:57] eam: hm in which cases would a string not be a sequence? The empty string?
[19:50:00] volty: when it is supposed to be something else than sequence ?
[19:50:11] dudedudeman: oh god what have i done
[19:50:14] bturker: has joined #ruby
[19:50:34] eam: most systems define the empty sequence as a sequence
[19:50:48] ljarvis: hmm, most you say?
[19:51:07] eam: I'm not aware of any that don't?
[19:51:19] ljarvis: so you can't say for certain?
[19:51:37] eam: well, wikipedia says most so I can refer to the reference ;-)
[19:51:46] Musashi007: has joined #ruby
[19:53:07] x1337807x: has joined #ruby
[19:53:10] JoshL: has joined #ruby
[19:53:15] volty: the sequence means in order, ??empty sequence?? is a convenience of the language expression. an empty set is still a set because it's there to hold elements of a set
[19:53:44] ljarvis: i'm glad i have exercised minds
[19:54:18] edwinvdgraaf: has joined #ruby
[19:54:21] ljarvis: volty: but if a set exists when nobody is around to see it, does it really exist?
[19:54:26] dudedudeman: so, a set of numbers could be empty, or it could be 43251. but a sequence of numbers would be 12345?
[19:54:36] Senjai: ljarvis: The garbage collector, right before it deletes it
[19:54:42] Senjai: Or ObjectSpace
[19:54:55] volty: no. only things that ??interact?? exist
[19:55:10] Senjai: volty: wat
[19:55:11] jhass: dudedudeman: https://oeis.org/
[19:55:23] Senjai: volty: def thing; Set.new; end
[19:55:31] Senjai: Pretty sure at some point in time, a Set is created
[19:55:37] apipkin: has left #ruby: ()
[19:55:46] iamninja: has joined #ruby
[19:56:11] dudedudeman: jhass: i'll be honest, i have no clue what i'm looking at here
[19:56:12] volty: I do not mind. That set doesn't exist, for me, till I use it, or till I see it. Till it ??happens??.
[19:56:13] weszlem: has joined #ruby
[19:56:22] skade: has joined #ruby
[19:56:29] jhass: dudedudeman: sequences
[19:56:29] simplyianm: has joined #ruby
[19:56:34] volty: do not confuse the definition with the existence
[19:56:37] edwinvdgraaf: has joined #ruby
[19:56:53] Senjai: volty: Sorry what, there is no intepretation, there is what is and what isn't.
[19:57:09] ljarvis: dudedudeman: ^5
[19:57:09] jhass: 2,3,4,82000 is a great sequence
[19:57:11] Scroff: has joined #ruby
[19:57:20] volty: just a def, if you don't call your method that set isn't going to ??exist??
[19:57:35] jhass: http://oeis.org/A258107
[19:57:41] Senjai: volty: Of course, duh. Calling it will make it exist, even though you don't use it
[19:58:34] flughafen_: has joined #ruby
[19:58:44] eam: The simulacrum is never that which conceals the truth - it is the truth which conceals that there is none.
[19:59:21] volty: the existence concerns the interaction too. it could not exist, even if ??created??, if you do not interact with it. in Occam's razor exists here too. Though it's called ??abstraction??.
[19:59:42] mrmargolis: has joined #ruby
[20:00:16] phat4life: if you were interviewing someone for a ruby position, what questions would you ask?
[20:00:32] eam: phat4life: I'd sit down with them on a computer and solve a small problem
[20:00:34] Senjai: phat4life: Are you an academic? Yes? Sorry, this position's been filled.
[20:00:49] dudedudeman: phat4life: i know the fizzbuzz question is a ringer
[20:01:00] simplyianm: has joined #ruby
[20:01:01] alphaatom: has joined #ruby
[20:01:05] havenwood: phat4life: What kind of Ruby position? What will they be doing?
[20:01:07] Senjai: phat4life: You have to work through code. Alternatively, describe hard problems you've solved at your firm recently, ask them how they would model out a solution
[20:01:10] Scroff: has joined #ruby
[20:01:24] apeiros: phat4life: most useful question to us has been: bring code (any lang) you're proud of and show it to us in 5-15min.
[20:01:30] phat4life: i asked this canidate to read code, it was a dp implementation of the fib sequence, they couldn't tell me what the code did :|
[20:01:31] havenwood: phat4life: ^ I like apeiros'
[20:01:36] eam: reverse a binary tree
[20:01:42] Senjai: apeiros: I disagree, 99% of my code is NDA.
[20:01:44] apeiros: asking questions like why they're proud of it, what they'd do differently. what they learned.
[20:01:53] eam: Senjai: so sign an NDA
[20:01:58] msnyon_: has joined #ruby
[20:01:58] phat4life: havenwood: rails, sinatra
[20:02:04] Senjai: eam: What, I cannot sign an NDA on behalf of a previous employer or client
[20:02:09] Senjai: I cannot act as their agent
[20:02:10] eam: Senjai: the applicant can
[20:02:24] baweaver: has joined #ruby
[20:02:25] eam: that's what most folks do
[20:02:30] Senjai: Sorry, I'm talking about referencing code done for other clients, when negotiating with a new one
[20:02:49] Senjai: Which is why I disagree with apeiros, I cant show new clients/employers my best code
[20:03:04] dorei: i'd only ask one lame question, how many unsingned numbers can be represented with 11 bits :)
[20:03:09] Yiota: has joined #ruby
[20:03:09] eam: most people have something OSS to share, no?
[20:03:17] Senjai: dorei: How is that useful?
[20:03:22] havenwood: Senjai: But do you have any code you're proud of at all that you could show?
[20:03:23] Senjai: dorei: That's like, a textbook question
[20:03:43] Senjai: havenwood: Nope. I always think the code I wrote last month is shit this month.
[20:03:48] eam: trivia generally doesn't select for attributes that make a good developer
[20:03:57] dudedudeman: Senjai: that has to suck. :( we're behind pretty strict NDA's, too, and i'm wondering how much of teh small amount of code i've written could be taken elsewhere and shown
[20:04:05] dorei: Senjai: well, if one cant give a textbook answer to this, one could code a small script to calculate it
[20:04:06] dudedudeman: Senjai: what industry if you don't mind me asking?
[20:04:09] havenwood: Senjai: I guess you're improving quickly. :)
[20:04:13] Senjai: dudedudeman: Get written permission, and scrub the code of any specific references
[20:04:23] Senjai: havenwood: Always. Hopefully
[20:04:24] ljarvis: or just do some OSS on the side
[20:04:29] Senjai: dudedudeman: Ecommerce
[20:04:30] phat4life: https://gist.github.com/ajbeach2/f47115fc090b46a335a0 is there a more ruby idiomatic way of doing this?
[20:04:46] dudedudeman: Senjai: ah, word. i'm in animation/film. it's stupid. lol
[20:04:49] phat4life: (that is my dp solution to fib)
[20:04:52] dudedudeman: but i'l remember that tip, thanks
[20:05:00] NeverDie: has joined #ruby
[20:05:01] phat4life: ah nevermind
[20:05:02] Senjai: havenwood: I recently took CanCanCan over, so hopefully that will give me motivation to write better open source stuff.
[20:05:07] phat4life: igore that gist its wrong
[20:05:30] havenwood: phat4life: Here's my recent fib solution (just for fun): https://gist.github.com/havenwood/e1b65e004ce716f428b0
[20:05:31] mrmargolis: has joined #ruby
[20:05:37] sdothum: has joined #ruby
[20:05:45] Senjai: havenwood: elixer is cheating :P
[20:05:49] Senjai: everything is better in elixer
[20:06:04] havenwood: Senjai: But I implemented Elixir's unfold in Ruby, so uncheating!
[20:06:17] Senjai: havenwood: That's a pretty unique solution
[20:06:23] Senjai: havenwood: We had someone do Fib in Sass at our office
[20:06:31] ljarvis: needs some .lazy
[20:06:46] phat4life: havenwood: is that a dp solutoin though
[20:06:52] Xiti: has joined #ruby
[20:07:00] Senjai: havenwood: I typically just do the modulo approach.
[20:07:09] dudedudeman: did they get hired doing that?
[20:07:11] Senjai: I've never used Enumerator.unfold
[20:07:20] phat4life: i can only think algorithimically in c++
[20:07:22] crankharder: jhass: thanks for the link to that issue. have you found a working workflow? we started working on getting our entire org to update bundler, but devs*apps*gemsets == large number of bundler installs.
[20:07:43] alphaatom: has joined #ruby
[20:07:44] havenwood: crankharder: Rails apps?
[20:07:53] weaksauce: >> ("1"*11).to_i(2)
[20:07:54] ruboto: weaksauce # => 2047 (https://eval.in/382033)
[20:08:15] haxrbyte: has joined #ruby
[20:08:16] crankharder: havenwood: not all of them, i think this applies to anything using bundler though?
[20:08:19] Ilyes512: has joined #ruby
[20:08:23] havenwood: crankharder: If not Rails, just use a recent RubyGems and `gem i -g` (or the long form `gem install --file`) to resolve deps and create a Gemfile.lock.
[20:08:33] hardlin3r: has joined #ruby
[20:08:43] crankharder: dont think we're talking about the same time
[20:08:43] jhass: crankharder: until the commit by indirect referencing the issue at the end is released, no. And even then it'll mean updating everybody to bundler 1.10.4 or later
[20:09:11] crankharder: jhass: yea, a bunch of meh :/
[20:10:34] phat4life: havenwood: i don't think that is a dynamic programming solution is it?
[20:10:37] solars: has joined #ruby
[20:10:42] volty: could be nice something like, x bits, at most/least n successive 0 o 1's. so you can judge how much analytical and how much iterative skills the candidates posses
[20:12:38] crankharder: jhass: seems kinda weird that the bundler directive was implemented differently than the ruby directive
[20:12:46] crankharder: which is optional and doesn't magically update itself
[20:12:57] crankharder: I feel like the bundler directive could've gone the same route
[20:13:22] crankharder: ...got a problem with version x.y.z of bundler? add a diretive and force an update on your app/team... otherwise? leave it alone.
[20:13:36] J4R0D: has joined #ruby
[20:13:46] Rollabunna: has joined #ruby
[20:13:47] jhass: crankharder: eh, I think you can read my opinion out of that thread pretty clearly, I feel little demand to discuss it further tbh ;)
[20:14:16] crankharder: well, you didn't quit ruby over it ;)
[20:14:22] simplyianm: has joined #ruby
[20:14:39] jhass: nah, that would've been unreasonable
[20:14:39] haxrbyte: has joined #ruby
[20:14:44] wallerdev: has joined #ruby
[20:14:47] jhass: I might have forked bundler over it though
[20:15:34] wildroman2: has joined #ruby
[20:15:35] havenwood: I'm glad RubyGems has working dependency resolution. I've been happy using it.
[20:16:15] vickleton: has joined #ruby
[20:16:20] jhass: I doubt it'll ever integrate all of bundlers usecases though
[20:17:05] haxrbyte_: has joined #ruby
[20:17:09] havenwood: phat4life: I don't think I understand the question regarding dynamic programming.
[20:17:27] havenwood: phat4life: Someone else could probably answer that better.
[20:17:44] havenwood: phat4life: Here's getting an nth Fib with a Matrix in Ruby: https://gist.github.com/havenwood/02cf291b809327d96a3f
[20:17:56] Igorshp: has joined #ruby
[20:17:59] dagda1: has joined #ruby
[20:18:07] phat4life: havenwood: memoization, meaning you store reursive calls that have already been made
[20:18:13] havenwood: Works nicely for negative fibonacci sequence too.
[20:18:41] havenwood: phat4life: Ah, was wondering if you just mean memoizing. It's not a recursive implementation.
[20:18:57] phat4life: you can still do memoziation iteratively
[20:19:05] Matthews_: has joined #ruby
[20:19:10] eam: how do I dump the flags ruby was built with?
[20:19:10] workmad3: has joined #ruby
[20:19:12] havenwood: phat4life: Do you understand what the unfold code does?
[20:19:24] phat4life: nah not at all lol
[20:19:33] super: Does Ruby have an equivalent of Scheme's call-with-current-continuation?
[20:19:46] phat4life: havenwood: https://gist.github.com/ajbeach2/ce3be841df6aee8e01a6
[20:19:58] havenwood: phat4life: http://elixir-lang.org/docs/v1.0/elixir/Stream.html#unfold/2
[20:19:58] phat4life: that is a recursive memoized fib
[20:20:44] jhass: super: if you want good answers don't assume knowledge out of topic of the channel ;)
[20:22:00] jhass: that is refer to generic concepts or explain the mechanism, don't refer to other implementations
[20:22:05] alphaatom: has joined #ruby
[20:22:26] iinzg: has joined #ruby
[20:23:18] alphaatom: has joined #ruby
[20:23:40] jhooker: has joined #ruby
[20:23:46] mrmargol_: has joined #ruby
[20:24:08] Xiti: has joined #ruby
[20:24:29] alphaatom: has joined #ruby
[20:24:51] glcx: has joined #ruby
[20:25:00] ixti: has joined #ruby
[20:25:05] ellisTAA: has joined #ruby
[20:25:43] alphaatom: has joined #ruby
[20:26:31] Senjai: super: Just ask what you want, rather than making us go learn another language :P
[20:26:42] simplyianm: has joined #ruby
[20:26:56] alphaatom: has joined #ruby
[20:27:03] hoelzro: super: http://ruby-doc.org/core-2.2.0/Kernel.html#method-i-callcc
[20:27:20] bronson: has joined #ruby
[20:28:08] Senjai: hoelzro: I feel more terrible for knowing that now :P
[20:28:12] alphaatom: has joined #ruby
[20:28:17] michaeldeol: has joined #ruby
[20:29:04] qwertme: has joined #ruby
[20:29:24] alphaatom: has joined #ruby
[20:31:15] pragmatism: has joined #ruby
[20:31:53] _seanc_: has joined #ruby
[20:31:56] djbkd: has joined #ruby
[20:32:14] simplyianm: has joined #ruby
[20:32:21] bgmarx: has joined #ruby
[20:32:34] havenwood: super: Ruby basically decided it wasn't a good idea and relegated it to the stdlib. I'd expect it to be deprecated in Ruby 3.0. http://www.atdot.net/~ko1/pub/ContinuationFest-ruby.pdf
[20:32:37] pragmatism: has joined #ruby
[20:32:38] langlands: has joined #ruby
[20:32:54] yorickpeterse: ljarvis: so how's your Rust coming along?
[20:32:56] havenwood: super: There are Fibers if that suffices for what you're doing.
[20:33:49] super: hoelzro, excellent, thanks..
[20:33:58] havenwood: http://srfi.schemers.org/srfi-18/mail-archive/msg00013.html
[20:34:11] krisquigley: has joined #ruby
[20:34:23] pragmatism: has joined #ruby
[20:34:26] havenwood: http://ruby-doc.org/core/Fiber.html
[20:34:48] gambl0re: guys, im having trouble...
[20:35:05] gambl0re: im getting an error msg: NameError in AuthorSessionsController#create
[20:35:12] _blizzy_: if I named a fiber 'life', would it be a life fiber
[20:35:13] gambl0re: highlighting this line in my code " if login(params[:email], params[:password])"
[20:35:17] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:35:21] gambl0re: where is the name error?
[20:35:29] jhass: ?crosspost gambl0re
[20:35:29] ruboto: gambl0re, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[20:35:33] gambl0re: im using sorcery gem for authorization/authentication
[20:35:42] _blizzy_: so, how does he post it to rails
[20:35:46] _blizzy_: if he's posted it heres
[20:35:53] jhass: _blizzy_: two minutes earlier
[20:35:53] ljarvis: yorickpeterse: it's not
[20:36:00] havenwood: _blizzy_: Time travel.
[20:36:01] gambl0re: help guys, thanks
[20:36:05] ljarvis: yorickpeterse: yours?
[20:36:12] yorickpeterse: ljarvis: pretty smooth actually
[20:36:19] yorickpeterse: I hope to be writing a GC in it in the next few weeks
[20:36:19] _blizzy_: hmm, I want to build something in ruby
[20:36:31] _blizzy_: I could work on my rails project, but I want something smaller atm
[20:36:33] Senjai: gambl0re: ?code
[20:36:33] yorickpeterse: I actually have multi-threading in my VM now
[20:36:39] ruboto: We can't help you without your code, please post it to https://gist.github.com
[20:36:46] gambl0re: what code do you need
[20:36:53] _blizzy_: probably all of it
[20:36:53] jhass: Senjai: other way around for the moment, ?foo target
[20:36:54] gambl0re: which file...
[20:36:56] _blizzy_: well, the entire file
[20:37:03] _blizzy_: the file the error is coming from
[20:37:04] ljarvis: yorickpeterse: noice!
[20:37:07] gambl0re: i have like 20 different files...
[20:37:20] super: Does Ruby MRI not do tail-recursion optimization?
[20:37:25] gambl0re: class AuthorSessionsController < ApplicationController
[20:37:26] gambl0re: if login(params[:email], params[:password])
[20:37:26] gambl0re: redirect_back_or_to(articles_path, notice: 'Logged in successfully.')
[20:37:27] gambl0re: flash.now.alert = "Login failed."
[20:37:27] gambl0re: render action: :new
[20:37:29] gambl0re: def destroy
[20:37:32] yorickpeterse: don't paste in iRC
[20:37:35] _blizzy_: pastie that
[20:37:37] havenwood: gambl0re: Stop pasting Rails code here!
[20:37:40] jhass: !kick gambl0re Please use https://gist.github.com
[20:37:40] helpa: jhass: No.
[20:37:41] ruboto: ruboto kicked gambl0re: use https://gist.github.com
[20:37:41] ruboto: -o ruboto
[20:37:43] _blizzy_: gist.github.com pastie.org
[20:37:54] yorickpeterse: WEOW WEOW WEOW COPS ARE HERE
[20:38:01] jhass: still don't have the alias in my muscle memory :/
[20:38:07] yorickpeterse: "stop resisting arrest"
[20:38:13] _blizzy_: "am I being detained"
[20:38:22] acke: has joined #ruby
[20:38:23] yorickpeterse: don't gist me bro
[20:38:33] jhass: super: not really, it's available as a compile time flag essentially but off by default
[20:38:36] yorickpeterse: ljarvis: you just have to bite through
[20:38:41] yorickpeterse: ljarvis: my first few weeks were hell too
[20:38:46] super: havenwood, I'm not trying to backtrack.. I'd just like to pick up where I left off if I get interrupted for whatever reason..
[20:38:58] ljarvis: yorickpeterse: yeah.. not gonna happen :D at least not whilst I have lots of other stuff going on (doing something similar in C)
[20:39:05] _blizzy_: on another note, that guy should try devise
[20:39:08] _blizzy_: it's not that hard to set up
[20:39:27] AndChat|412596: has joined #ruby
[20:39:30] dfockler: has joined #ruby
[20:39:39] _blizzy_: I hope he was hashing his passwords
[20:39:40] simplyianm: has joined #ruby
[20:40:35] havenwood: super: Here's an patch for enabling TCO in Ruby, just trace off and tco on: https://gist.github.com/havenwood/d958268d0ab896373af6
[20:40:45] bgmarx: has joined #ruby
[20:40:57] yorickpeterse: havenwood: you can do that from the runtime
[20:41:00] yorickpeterse: no need to recompile
[20:41:04] havenwood: super: You can do it even if you haven't enabled it at compile time in a vm se
[20:41:12] havenwood: yorickpeterse: I don't type fast enough apparently.
[20:41:52] havenwood: super: It's a bit awkward in RubyVM::InstructionSequence block but it's doable or there's a gem that makes it nicer.
[20:42:35] jackjackdripper: has joined #ruby
[20:42:44] dagda1: has joined #ruby
[20:42:49] yorickpeterse: ergh, I always forget how to set that
[20:44:32] yorickpeterse: >> RubyVM::InstructionSequence.compile_option = {:tailcall_optimization => true}
[20:44:33] ruboto: yorickpeterse # => {:tailcall_optimization=>true} (https://eval.in/382043)
[20:44:36] yorickpeterse: But that's super super MRI only
[20:44:37] havenwood: TCO gem: https://github.com/tdg5/tco_method#readme
[20:44:56] havenwood: yorickpeterse: You also have to disable trace.
[20:45:17] havenwood: https://github.com/ruby/ruby/blob/trunk/vm_opts.h#L21-L22
[20:48:41] acke: has joined #ruby
[20:50:10] simplyianm: has joined #ruby
[20:53:17] jenrzzz: has joined #ruby
[20:54:32] simplyianm: has joined #ruby
[20:54:45] mike___1234: has joined #ruby
[20:55:15] stevednd: has joined #ruby
[20:55:31] chette: has joined #ruby
[20:55:45] DynamicMetaFlow: has joined #ruby
[20:56:09] DynamicMetaFlow: has joined #ruby
[20:56:41] Marsupermammal: has joined #ruby
[20:57:33] joaomdmoura: has joined #ruby
[20:57:45] quimrstorres: has joined #ruby
[20:58:09] freerobby: has joined #ruby
[20:59:13] pragmatism: has joined #ruby
[20:59:41] beneggett: has joined #ruby
[20:59:54] simplyianm: has joined #ruby
[21:00:03] yaw: has joined #ruby
[21:01:02] zacts|skool: has joined #ruby
[21:01:04] Musashi007: has joined #ruby
[21:01:50] rombou: has joined #ruby
[21:02:40] gix: has joined #ruby
[21:02:43] eneon: has joined #ruby
[21:02:47] eneon: has left #ruby: ()
[21:02:55] jcaho: has joined #ruby
[21:03:58] pragmatism: has joined #ruby
[21:04:08] yfeldblum: has joined #ruby
[21:04:19] postmodern: has joined #ruby
[21:04:20] simplyianm: has joined #ruby
[21:04:27] aaeron: has joined #ruby
[21:05:15] ScriptGeek: has joined #ruby
[21:05:23] ellisTAA: has joined #ruby
[21:05:36] jackjackdripper: has joined #ruby
[21:05:38] shock_one: has joined #ruby
[21:06:57] gaboesquivel: has joined #ruby
[21:08:08] dagda1: has joined #ruby
[21:08:28] skade: has joined #ruby
[21:09:01] Alayde_: has joined #ruby
[21:09:22] allomov: has joined #ruby
[21:13:36] ellisTAA: has joined #ruby
[21:14:53] jjasonclark: has joined #ruby
[21:15:53] mister_solo: has joined #ruby
[21:17:07] pengin: has joined #ruby
[21:17:22] stephenh: has joined #ruby
[21:17:36] Scripore: has joined #ruby
[21:18:01] hedgecore: has joined #ruby
[21:18:53] bronson: has joined #ruby
[21:19:36] chette: call me curious - does anyone here use ruby/sdl?
[21:19:45] ruboto: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[21:20:18] startupality: has joined #ruby
[21:21:05] dopie: has joined #ruby
[21:21:21] ruboto: Just ask your question, if anyone has or can, they will respond.
[21:21:28] Senjai: jhass: <3
[21:21:35] jhass: worth a shot :P
[21:22:08] nisstyre: has joined #ruby
[21:23:26] crowell: has joined #ruby
[21:24:26] Senjai: chette: At the very least I would assume that at least the author of the library uses it
[21:24:44] Senjai: chette: But due to the computationally intensive nature of graphics development, ruby is generally a poor choice.
[21:25:05] jhass: crystal has a nice sfml binding already
[21:25:27] Senjai: I like crystal, but I can't recommend it to anyone just yet.
[21:25:56] jhass: well, it's a good time if you ever wanted to contribute to a developing ecosystem
[21:26:00] chette: I know it's a 'poor choice', but I find that, if i'm not concerned with framerate and sweet AAA graphiXXX than, it's not hard to get the hang of
[21:26:23] ceigel: has joined #ruby
[21:26:42] TheHodge: has joined #ruby
[21:26:43] Axsuul: has joined #ruby
[21:26:48] Senjai: chette: Use pygame.
[21:26:50] chette: plus, ruby will just get beter with age, right? I mean, I'm sure computers in the near futre are going to be so blazzing fast anyway
[21:27:05] Senjai: chette: Ruby is fairly old already. Rails is new ish, but ruby has been around a while
[21:27:14] Senjai: It's just not developed with that use case in mind
[21:27:21] jhass: ruby is well 20 years old, soo...
[21:27:25] Senjai: chette: If you want to use a high level language for graphics, again, I'd suggest python
[21:28:04] chette: I use opengl for math . . . not really for game making.or high level graphics. just feedback
[21:28:15] jhass: is python really still better in raw execution speed, taking possibly better bindings out of the factor?
[21:28:28] Senjai: pygospa: I thought you didn't care about speed?
[21:28:31] pragmatism: has joined #ruby
[21:28:48] Senjai: jhass: It's mostly because pygame is excellent as a library
[21:28:53] Senjai: jhass: I have no idea about speed
[21:28:57] chette: I don't care about speed, what I like is interoperability
[21:29:12] jhass: I had a feeling that the difference isn't big anymore, but never checked
[21:29:39] Senjai: jhass: ditto. I use either one for different problems
[21:30:32] mcclurmc: has joined #ruby
[21:30:42] jhass: http://benchmarksgame.alioth.debian.org/u32/ruby.php hrm, looks like python still wins on average
[21:31:05] jhass: though it's funny that ruby wins on memory apparently
[21:31:30] pdoherty: has joined #ruby
[21:31:35] Soda: has joined #ruby
[21:32:02] FernandoBasso: has joined #ruby
[21:33:05] dagda1: has joined #ruby
[21:34:36] centrx: has joined #ruby
[21:34:59] mcclurmc: has joined #ruby
[21:35:00] Senjai: jhass: I honestly would just use a native language :P
[21:35:03] doublemalt_: has joined #ruby
[21:35:33] jhass: sure, I'll use crystal :P
[21:35:43] chette: crystal, huh?
[21:36:09] Senjai: chette: Full disclosure, jhass is a core contributor to crystal ;)
[21:36:20] hotpanca_: has joined #ruby
[21:36:22] jhass: eh, let's say core enthusiast
[21:36:31] jhass: I don't have commit rights^^
[21:36:40] Senjai: evangelist perhaps
[21:36:47] surrounder: has left #ruby: ("WeeChat 1.2")
[21:37:03] zenspider: I like that title
[21:37:11] zenspider: core enthusiast
[21:37:20] Senjai: I thought you did have commit rights
[21:37:36] Senjai: I think the majority of rubyists will end up in elixer land though :/
[21:37:36] jhass: I didn't even land compiler code yet
[21:37:37] NeverDie: has joined #ruby
[21:37:49] chette: how is it different from ruby?
[21:37:54] Senjai: Except the hardcore OOP'ers
[21:37:56] centrx: it's not, it's a scam!
[21:38:01] bronson: has joined #ruby
[21:38:04] chette: syntax looks the same
[21:38:18] Senjai: chette: I suggest reading the About page
[21:38:28] Senjai: or README.md
[21:38:33] jhass: chette: crystal? it's a compiled language with global type interference (and a go like concurrency model, well, moving towards that)
[21:39:14] Senjai: psssstttt chette, elixir ftw, pssst
[21:39:51] baweaver: has joined #ruby
[21:40:11] tacotaco_: has joined #ruby
[21:40:19] chette: I made this program which was just a fancy IRB interpretor with ruby/sdl
[21:40:42] zenspider: chette: I could use that
[21:40:59] zenspider: trying to get a workshop going that's based on ruby + sdl
[21:41:07] zenspider: having a repl on the inside would help
[21:41:28] chette: I'm not exactly inside. oh, I'm pretty far out there
[21:41:40] zenspider: is it available?
[21:41:47] ndrei: has joined #ruby
[21:41:50] Senjai: zenspider: A workshop?
[21:42:03] zenspider: yes, a workshop
[21:42:47] chette: but I've use ruby+sdl a tun. mostly ruby opengl lately, although floating point arithmetic is so slow it's better to shovel such code to c
[21:43:28] Senjai: chette: Or just use C
[21:43:29] chette: I still use ruby sdl for raster manipulation
[21:43:46] Senjai: chette: I would just have a binary responsible for that, and shell out to it from ruby
[21:43:57] Senjai: If you need the two to work together
[21:44:10] Senjai: zenspider: An... online workshop?
[21:44:13] Senjai: would take
[21:44:16] chette: yeah, Senjai, that's a good theory I've been working on
[21:44:17] Senjai: for curiosity more than anything
[21:44:45] Senjai: chette: Alternatively you could go the other way around, create a binary which runs ruby :P
[21:44:52] Senjai: chette: But at that point, its better to use lua
[21:45:17] chette: but I don't know lua as well as I know ruby. plus I'm LAZY
[21:46:26] Igorshp: has joined #ruby
[21:46:29] zenspider: chette: so... no?
[21:46:33] chette: zenspider: do you find much interest in ruby+sdl?
[21:46:41] jhass: in all seriousness though, if all you do is some basic arithmetic crystal should be good enough already, provide you with a familiar syntax and give you close to C speed
[21:46:44] Igorshp: has joined #ruby
[21:46:52] chette: oh the code . . . I haven't posted it anywhere
[21:46:52] pragmatism: has joined #ruby
[21:47:29] AndroUser: has joined #ruby
[21:47:33] chette: I could make it available but I should make it work with the latest versions first :)
[21:48:09] Senjai: chette: Just post it who cares about its condition
[21:48:15] chette: thanks jhass
[21:48:16] Senjai: 90% of open source code is crappy :P
[21:48:35] jhass: and 98% of all closed source? :P
[21:49:23] Cache_Money: has joined #ruby
[21:49:24] aaeron: has joined #ruby
[21:49:37] chette: send me your email, zenspider, and I'll tell you when I've posted the code
[21:49:44] x1337807x: has joined #ruby
[21:49:55] jhass: /msg MemoServ help
[21:51:06] zenspider: chette: my username at gmail
[21:51:38] chette: sure think
[21:51:51] zenspider: ok. I need to go beat stuff up and get beat up. later.
[21:52:21] edwinvdgraaf: has joined #ruby
[21:52:51] ogpastaling: has joined #ruby
[21:54:44] michaeldeol: has joined #ruby
[21:55:50] startupality: has joined #ruby
[21:56:01] msgodf: has joined #ruby
[21:57:36] nonparfumee: has joined #ruby
[21:58:33] duderonomy: has joined #ruby
[21:59:20] zenguy_pc: has joined #ruby
[21:59:53] Notte: has joined #ruby
[22:00:15] drocsid: has joined #ruby
[22:00:27] drocsid: has joined #ruby
[22:00:38] pragmatism: has joined #ruby
[22:01:21] michaeldeol: has joined #ruby
[22:01:28] patrickanth0ny: has joined #ruby
[22:02:25] saadq: has joined #ruby
[22:02:27] finisherr: has joined #ruby
[22:04:10] yfeldblum: has joined #ruby
[22:05:32] jaycee: has joined #ruby
[22:05:44] Wintooshock: has joined #ruby
[22:05:57] gluten_hell_: has joined #ruby
[22:08:16] leafybas1l: has joined #ruby
[22:08:17] simplyianm: has joined #ruby
[22:09:07] nofxx: has joined #ruby
[22:09:22] havenwood: has joined #ruby
[22:10:05] blackmesa: has joined #ruby
[22:10:25] drewo: has joined #ruby
[22:11:17] zenguy_pc: has joined #ruby
[22:11:38] kuribas: has joined #ruby
[22:11:40] musgravejw: has joined #ruby
[22:11:44] unshadow_: has joined #ruby
[22:14:38] simplyianm: has joined #ruby
[22:14:39] Rollabunna: has joined #ruby
[22:15:20] _blizzy_: has joined #ruby
[22:15:26] Guest6: has joined #ruby
[22:15:46] platzhirsch: has joined #ruby
[22:15:46] phutchins: has joined #ruby
[22:16:45] ScriptGeek: has left #ruby: ()
[22:17:26] shock_one: has joined #ruby
[22:17:48] _blizzy_: has joined #ruby
[22:18:49] yfeldblum: has joined #ruby
[22:19:01] al2o3-cr: rescue what?
[22:19:12] drocsid: I have a program that I execute and it starts up and puts some output to STDOUT or STDERR, and after that accepts input from STDIN. I'd like to wait for some particular output from STDOUT, and then try to direct input to STDIN, and continue to capture output to STDOUT. I have a few methods which return the STDOUT, but I'm having issues getting past this point. Can someone help me reach my goal?
[22:19:20] dgutierrez1287: has joined #ruby
[22:19:30] jjasonclark: has joined #ruby
[22:19:36] shevy: al2o3-cr rescue World; end
[22:20:01] platzhirsch: ACTION pokes shevy
[22:20:21] al2o3-cr: shevy: come join #ruby-offtopic :)
[22:20:53] konieczkow: has joined #ruby
[22:21:05] shevy: I can have it here
[22:21:20] jhass: drocsid: used $stdout and $stdin, reset them to StringIO and simply read and write to them
[22:21:31] shevy: I have a bad time schedule, I just woke up...
[22:22:00] RandyT: has joined #ruby
[22:22:02] jhass: shevy: well, we do actually want to move the majority of the OT over there ;)
[22:22:16] alphaatom: has joined #ruby
[22:22:38] asteros: has joined #ruby
[22:23:03] krisquigley: has joined #ruby
[22:24:14] platzhirsch: You just woke up
[22:25:11] drocsid: jhass: do you hace a sample? Here's the code that I'm currently messing with:http://pastie.org/10242048
[22:26:03] drocsid: The example that uses popen3 was written by somebody else. Not sure what's going on with (f == sout ? $stdout : $stderr).print f.read_nonblock(1024)
[22:26:19] GPrime: has joined #ruby
[22:26:30] drocsid: I also was messing around with the popen4 example
[22:26:49] shevy: platzhirsch yeah; sorta feels weird... it's dark outside but I am already hacking away at ruby code \o/
[22:27:05] platzhirsch: that's the way
[22:27:08] platzhirsch: what are you working on
[22:27:17] mdz_: has joined #ruby
[22:27:30] quimrstorres: has joined #ruby
[22:27:33] jhass: drocsid: yeah that seems redundant, checking it for stdout/err vs stdin makes sense to decide to write or read
[22:27:52] shevy: right now I work on the ruby code that governs installing/compiling stuff from source again
[22:28:06] simplyianm: has joined #ruby
[22:28:12] unshadow: has joined #ruby
[22:28:15] jhass: drocsid: so basically you'd add stdin to the IO.select call (the wait for write ready param) and just write your stuff to it when ready
[22:28:29] al2o3-cr: shevy: managed Qt?
[22:28:31] RandyT: has joined #ruby
[22:28:38] shevy: I was replacing in legacy code, things such as: if foo[-1,1] == '/' with foo.end_with? '/' ... somehow I find .start_with? and .end_with? more readable these days, dunno if that is common
[22:28:39] jhass: only checking the first item in ready seems flawed too
[22:28:52] shevy: al2o3-cr nope :( I got stuck with that smokeqt thing
[22:29:07] volty: shevy: what platform you are on?
[22:29:17] aryaching: has joined #ruby
[22:29:27] shevy: al2o3-cr it is strange because I compiled all of kde from source here and it works
[22:29:42] shevy: volty moment I put it on a pastie soon
[22:29:51] al2o3-cr: shevy: strange indeed
[22:29:58] drocsid: I mean here (f == sout ? $stdout : $stderr).print f.read_nonblock(1024) I don't really understand if I can check f.read_nonblock(1024) and write stdin, because I'm not familiar with these methods
[22:30:25] matp: has joined #ruby
[22:30:26] nisstyre: has joined #ruby
[22:30:31] drocsid: jhass: do you suggest I continue with the open3 example, or the open4 one?
[22:30:34] volty: meanwhile: I can't load gems from inside c++ (using rb_eval etc etc) , the $LOAD_PATH is the same, any ideas ?
[22:30:52] shevy: volty when it comes to C++ and ruby, hanmac is the man; he maintains the ruby bindings to wxwidgets
[22:30:53] jhass: drocsid: they're not equivalent at all
[22:31:21] al2o3-cr: shevy: have you installed all necessary libs https://github.com/ryanmelt/qtbindings/
[22:31:24] drocsid: I'm going to head off without internet pretty soon, just trying to get advice on how go about this and try to work on it while offline
[22:31:27] jhass: drocsid: open3 gives you more control
[22:31:34] bgmarx_: has joined #ruby
[22:32:18] jhass: I think I gave my advice
[22:32:21] centrx: There's an open4 now!?
[22:32:29] jhass: nah, just a silly name
[22:32:39] jhass: it's Kernel.spawn
[22:33:05] jhass: drocsid: get the docs for open3 and IO.select
[22:33:25] volty: shevy: I got it working. have to require some stuff to check cross access. what could be manual initialization of gem handling? require 'gems' does not work
[22:33:27] jhass: especially the open3 docs have quite a few samples
[22:34:01] drocsid: jhass: thanks, I will do that, and consider your advice
[22:34:11] jpfuentes2: has joined #ruby
[22:34:16] shevy: centrx the number indicates improvement
[22:34:23] shevy: open5 will be the new generation
[22:34:56] mister_s_: has joined #ruby
[22:34:57] jhass: I wonder what open42 will bring
[22:35:16] shevy: it will open all the things
[22:35:19] sinkensabe: has joined #ruby
[22:35:29] jhass: oh, poor pandora
[22:35:38] al2o3-cr: >> require 'socket'; Socket.select(nil, nil, nil, 2); puts "alive"
[22:35:41] ruboto: al2o3-cr # => (https://eval.in/382073)
[22:36:22] al2o3-cr: then open6 then ...
[22:36:36] shevy: volty, al2o3-cr - here is the failure + system information https://gist.githubusercontent.com/shevegen/b5abb57500cea3678f86/raw/b4231d6bb115c8e5b7aea9e9a949b6357902b8a2/compile
[22:37:31] al2o3-cr: shevy: celeron?
[22:37:36] jhass: /System/Executables/ld: cannot find -lsmokeqtopengl
[22:37:43] jhass: sounds like you miss a library there
[22:37:55] x1337807x: has joined #ruby
[22:38:04] volty: no, shevy, it has to do with ruby, I have to rebuild it using shared-libraries
[22:38:07] al2o3-cr: its try to link what you havn't got
[22:38:15] volty: s/I have/I had/
[22:38:43] volty: /configure --prefix=$HOME/.rbenv/versions/1.9.2-p290 --enable-shared
[22:39:12] Musashi007: has joined #ruby
[22:39:46] volty: https://github.com/sstephenson/ruby-build/issues/35
[22:40:02] RandyT: has joined #ruby
[22:40:28] volty: but forget if your is already shared, I'm bit tired
[22:40:37] shevy: no you may be right
[22:40:44] shevy: I only seem to have libruby-static.a
[22:41:15] al2o3-cr: why is that weird?
[22:41:29] volty: he states there that he had to add that option (for rbenv, e.g.)
[22:41:52] shevy: al2o3-cr that I don't have a .so :)
[22:41:58] shevy: recompiling ruby right now
[22:42:19] northfurr: has joined #ruby
[22:42:37] al2o3-cr: shevy: you on debian?
[22:42:45] shevy: hmm linuxmint
[22:42:50] mister_solo: has joined #ruby
[22:43:02] baweaver: Depends if it's the Ubuntu variant or not
[22:43:20] al2o3-cr: i mean same as debian as much
[22:43:39] volty: how the new gem autoload system works ? I remember in the old versions I had to require gems (or similar) for them to start handling all of it. Any idea why gem feature doesn' t get loaded here (from c++) ?
[22:44:45] al2o3-cr: simple is better
[22:45:03] volty: working is better :)
[22:45:10] al2o3-cr: that too :)
[22:45:22] jhass: in 1.8 require "rubygems" was explicit, since ruby 1.9 that (exactly that, require "rubygems") is done on bootup by Ruby unless you specify --disable-gems
[22:45:28] jhass: that's all
[22:46:17] Senjai: If I want to return more than just the enumerable in a #detect
[22:46:23] Senjai: what would be the best way to do that
[22:46:45] jackjackdripper1: has joined #ruby
[22:46:58] Senjai: e.g. [1,2,3].detect {|n| n % 2 == 0; andlikeastringorsomething }
[22:47:01] Senjai: crappy example
[22:47:06] volty: jhass: a lot of thanks, I just required rubygems and it works. Later I am going to see why/what isn't initialized.
[22:47:08] Senjai: but beyond reaching into variables outside the scope
[22:47:19] shevy: ok now I have lots of ruby*.so files
[22:47:46] deric_skibotn: has joined #ruby
[22:47:50] volty: Now I get ??The exception was: '#<NameError: uninitialized constant Encoding::UTF_7>??, but going forward. If you have hints, again, pls hint at me :)
[22:47:52] baweaver: Senjai: What's the usecase?
[22:48:01] baweaver: could just use a map compact
[22:48:01] jhass: Senjai: "best" .lazy.map { ... }.find(&:itself)
[22:48:45] hedgecore: has joined #ruby
[22:49:28] al2o3-cr: 18>> class Foo; attr_accessor; define_method(:initialize) {|@a, @b|}; end; end; f = Foo.new("beep", "deep"); f.a
[22:49:29] ruboto: al2o3-cr # => /tmp/execpad-3f0939c6d40e/source-3f0939c6d40e:3: syntax error, unexpected kRESCUE, expecting $end ...check link for more (https://eval.in/382076)
[22:49:56] al2o3-cr: i'm sure that used to work
[22:50:06] Senjai: jhass: hmm..
[22:50:27] finisherr: has joined #ruby
[22:50:28] Senjai: baweaver: I need to find a "visible variant", with detect, but I also want to determine which visibility state it should have
[22:50:31] Senjai: without running the logic again
[22:50:36] simplyianm: has joined #ruby
[22:50:50] Senjai: Seeing as though you would know the visibility state in order to determine if a variant is visible
[22:51:15] jhass: or you monkey patch https://github.com/jhass/carc.in/blob/master/src/carcin/core_ext/enumerable.cr
[22:51:43] baweaver: >> (1..10).map { |v| v * 2 if v % 2 == 0 }.compact
[22:51:43] gluten_hell_: has joined #ruby
[22:51:44] ruboto: baweaver # => [4, 8, 12, 16, 20] (https://eval.in/382077)
[22:52:00] al2o3-cr: 18>> class Foo; attr_accessor :a, :b; define_method(:initialize) {|@a, @b|}; end; end; f = Foo.new("beep", "deep"); f.a
[22:52:01] ruboto: al2o3-cr # => /tmp/execpad-1b183f770e50/source-1b183f770e50:3: syntax error, unexpected kRESCUE, expecting $end ...check link for more (https://eval.in/382078)
[22:52:26] al2o3-cr: ruboto: drunk
[22:52:35] jhass: I think you are rather ;P
[22:53:12] Ox0dea: has joined #ruby
[22:53:14] phat4life: how can i make this more idiomatic: https://gist.github.com/ajbeach2/2260198a832f891ad306
[22:53:35] alphaatom|pc: has joined #ruby
[22:53:58] Ox0dea: baweaver: sort.chunk(&:zero?) is another approach to that HackerRank problem.
[22:54:06] Ox0dea: I think it's pretty clever.
[22:54:15] veinofstars: has joined #ruby
[22:54:20] baweaver: context is lost.
[22:55:04] Ox0dea: The one about returning the percentage of negative, zero, and positive values in an array.
[22:55:05] jhass: phat4life: I'd do the border conditions like return a if x == 1, that together with a tap should allow you to eliminate result
[22:55:19] jhass: phat4life: don't use explicit returns
[22:55:31] jhass: where an implicit one suffices
[22:56:02] jhass: I'd untangle the the double assignment, just not worth it IMO
[22:56:40] jhass: I'm allergic to missing space after the , but that's just me I guess :P
[22:56:56] simplyianm: has joined #ruby
[22:57:00] phat4life: yeah im terrible at formatting, i just let rubocop yell at me
[22:57:08] drewo: has joined #ruby
[22:57:12] Ox0dea: Then why even bother using it?
[22:57:13] jhass: .map(&:to_i)
[22:57:32] phat4life: if i don't use rubocop i miss things
[22:57:36] Axsuul: has joined #ruby
[22:57:38] edwinvdgraaf: has joined #ruby
[22:57:41] phat4life: i don't see whitespace
[22:57:45] baweaver: rubocop is all or none
[22:57:51] phat4life: its configurable
[22:58:04] Ox0dea: You should ignore that fact.
[22:58:14] phat4life: yes usually
[22:59:23] phat4life: are there any books you guys can recommend for design patters in ruby?
[22:59:38] phat4life: right now, i am readying programming-ruby 1.9 & 2.0
[22:59:58] Ox0dea: POODR is love.
[23:00:04] pragmatism: has joined #ruby
[23:00:06] alxndr: http://designpatternsinruby.com/
[23:00:08] avdi: Well there's a book called "Design Patterns in Ruby", or something quite like that.
[23:00:12] baweaver: for now I would avoid that a bit, because you'll most likely treat Gang of Four patterns as cannon law
[23:00:36] dfockler: baweaver: POODR or the design patterns one?
[23:00:42] baweaver: POODR is great
[23:00:44] avdi: As Ox0dea says, if you haven't already read POODR, run do not walk
[23:00:46] baweaver: Design Patterns is too
[23:00:57] baweaver: very dangerous when used as a word of law
[23:01:08] baweaver: See: Enterprise Java Applications
[23:01:10] attlasbot: has joined #ruby
[23:01:11] dfockler: avdi: I'm running
[23:01:13] Ox0dea: phat4life: Why is it called fib_mod?
[23:01:19] volty: those gang patterns are rubbish, imho
[23:01:24] phat4life: Ox0dea: hacker rank
[23:01:24] Scroff: has joined #ruby
[23:01:31] avdi: volty: that's a very broad statement
[23:01:39] phat4life: Ox0dea: that code is wrong anyway
[23:01:55] baweaver: They're used as a basis of common patterns in object oriented languages and are quite useful
[23:01:59] phat4life: im memoizing the wrong thing
[23:02:05] volty: I tried to read something. Was just curious. The only knowledge you get is the talking (about patterns) one.
[23:02:13] baweaver: but one must remember that functional languages, even partially so, have ways around some of those patterns
[23:02:30] phat4life: i have 1 week to brush up on OO stuff
[23:02:37] baweaver: Most of the GoF is actually irrelevant in a purely functional language
[23:02:40] volty: baweaver: could be, if the exposition isn't so pompous
[23:02:48] phat4life: is ruby considered functional
[23:02:48] baweaver: phat4life: definitely POODR then
[23:03:07] avdi: yep, definitely POODR
[23:03:10] baweaver: It's complicated and not something to get into if you have a week for OO
[23:03:13] dfockler: I'd like a book about how to store configuration settings, and about database connections and thread safety
[23:03:24] avdi: phat4life: short answer: no.
[23:03:27] jhass: phat4life: in summary something like this http://paste.mrzyx.de/p9pabmi79
[23:03:28] dfockler: but I guess those are problems I'm facing today
[23:03:30] Ox0dea: avdi: Really?
[23:03:40] baweaver: all types of semantical hand waving and technicalities abound. There be dragons there.
[23:03:53] avdi: Ox0dea: like I said: short answer.
[23:03:54] phat4life: jhass: looks right
[23:04:03] Ox0dea: avdi: Sure, but I'd expect the short answer to be "yes".
[23:04:12] _seanc_: has joined #ruby
[23:04:26] baweaver: Succinctly you can program in a functional manner in ruby and do a lot of functional things, but it's not a functional language by core.
[23:04:32] baweaver: just heavily inspired by them
[23:04:33] jhass: phat4life: btw you know the fibonacci hash? :P
[23:04:41] avdi: Ox0dea: Ruby is OO through and through. It happens to have a surprising amount of functional sugar on top where it makes sense.
[23:04:44] baweaver: jhass: oi, be nice, that stuff is scary
[23:04:46] phat4life: jhass: apparently not
[23:04:51] Senjai: avdi: As in Avdi Grimm? (I think)
[23:05:01] volty: look, before reading anything about advanced techniques (I prefer this one), one should think by himself. Otherwise it is just filling with notions that you don't understand and can't find & implement real use cases.
[23:05:02] phat4life: jhass: i can only think algorithmically in c
[23:05:39] attlasbot: has joined #ruby
[23:05:45] Igorshp: has joined #ruby
[23:05:50] baweaver: phat4life: probably fine for now, though you may try a hand at one of: Haskell, Scala, Clojure, Elixir
[23:05:52] avdi: Ox0dea: although the funny thing is that a lot of the "functional stuff" (read: decent tools for manipulating collections by passing bits of code around) it inherits from Smalltalk, which is generally considered to be the quintessential OO language.
[23:05:53] al2o3-cr: phat4life: if you can think like that, it should be a breeze in ruby
[23:06:07] volty: and the example I found there (can't remember which book exactly) was quite idiot ??? handling of coctails
[23:06:11] phat4life: baweaver: ive done ocaml
[23:06:16] avdi: Senjai: yes, I am that Avdi
[23:06:19] dfockler: like most of the Enumerable functions
[23:06:25] volty: can' t find a more idiot idea when talking about OO
[23:06:31] jhass: >> Hash.new {|h, k| h[k] = k > 2 ? h[k-1] + h[k-2] : 1 }[10] # phat4life
[23:06:32] ruboto: jhass # => 55 (https://eval.in/382079)
[23:06:33] phat4life: i built a java tokenizer in ocaml at some point in my life
[23:06:47] pragmatism: has joined #ruby
[23:06:49] phat4life: jhass: i mean, that is basically what i am doing, is just a different way of memoization
[23:07:02] baweaver: Scala is essentially SML ported to Java with everything including the kitchen sink thrown in
[23:07:05] jhass: and a single line and constant lookup :P
[23:07:23] Alayde: has joined #ruby
[23:07:36] musgravejw: has joined #ruby
[23:08:08] baweaver: avdi: getting back into IRC?
[23:08:14] JoshL: has joined #ruby
[23:08:17] Scripore: has joined #ruby
[23:08:22] avdi: baweaver: I'm always around
[23:08:29] avdi: watching... waiting...
[23:08:31] baweaver: just not always active
[23:08:45] baweaver: there were a few tenderlove sightings as well earlier
[23:09:05] dfockler: It's like we're playing Pokemon Snap
[23:09:10] avdi: I feel like there should be a "rare birds of IRC" guidebook
[23:09:14] baweaver: *a wild tenderlove appeared!*
[23:09:39] baweaver: xshay pops on rarely as well
[23:09:50] wallerdev: has joined #ruby
[23:09:57] baweaver: sarahmei is in rspec
[23:10:12] Senjai: I'm pretty glad the channels got merged though
[23:10:16] avdi: I generally stick around long enough to witness someone beating up on a newb for no good reason and then I stalk off in a huff
[23:10:17] Senjai: It's much more lively.
[23:10:23] al2o3-cr: >> 10.times.each_with_object([0,1]) { |i, a| a << a[-2] + a[-1] }.sample # please be 13
[23:10:24] ruboto: al2o3-cr # => 1 (https://eval.in/382080)
[23:10:47] Ropeney: has joined #ruby
[23:10:51] baweaver: generally you can just ping Radar or sevenseacat, they'll take care of much of that
[23:11:27] avdi: good to know
[23:11:39] baweaver: You can also !.ops to get their attention
[23:11:44] baweaver: (without .)
[23:11:51] jhass: well, or anybody in !ops, we have a "be polite" channel rule after all ;)
[23:12:02] baweaver: jhass is on that list as well.
[23:12:07] houhoulis: has joined #ruby
[23:12:30] _seanc_1: has joined #ruby
[23:12:53] Ox0dea: al2o3-cr: Fibonacci dice?
[23:12:53] havenwood: has joined #ruby
[23:12:55] baweaver: and if you don't want to call attention to it publicly, just message one of them, they're normally fairly responsive if there's an issue.
[23:13:41] al2o3-cr: Ox0dea: yeah, my lucky number :)
[23:13:54] avdi: OK, family time. Catch y'all later!
[23:14:19] baweaver: http://www.commitstrip.com/wp-content/uploads/2014/05/Strip-Roulette-russe-650-finalenglish.jpg
[23:14:30] baweaver: 'night avdi
[23:14:58] al2o3-cr: baweaver: :)
[23:15:04] baweaver: old but good
[23:16:23] startupality: has joined #ruby
[23:16:42] baweaver: ah, and tenderlove, keep being awesome
[23:16:52] tenderlove: lol, I'll try
[23:16:57] tenderlove: but no guarantees
[23:16:58] e1nh4nd3r: has joined #ruby
[23:17:11] baweaver: good enough for me mate.
[23:17:29] Ox0dea: tenderlove: Please tell nobu to restore easy access to FrozenCore.
[23:17:50] tomphp: has joined #ruby
[23:17:52] shock_one: has joined #ruby
[23:18:16] spyderman4g63: has joined #ruby
[23:19:02] al2o3-cr: Ox0dea: did you happen to get more than 252 fd's?
[23:19:14] Ox0dea: I did not. :/
[23:19:34] Ox0dea: I have all the current .gems, though, and the .tar.xz is 34.2GB. ^_^
[23:20:04] Ox0dea: Perfectly useless information, but the number is its own reward.
[23:20:48] RTG`: has joined #ruby
[23:21:03] davedev24: has joined #ruby
[23:21:30] al2o3-cr: Ox0dea: your a man on a mission :)
[23:21:37] asteros: has joined #ruby
[23:21:39] mdz_: has joined #ruby
[23:22:14] Ox0dea: It'd be nice to stumble upon some interesting experiment to perform, but nothing immediately springs to mind.
[23:23:27] al2o3-cr: Ox0dea: when i find one, i will let you know
[23:23:50] charliesome: has joined #ruby
[23:23:52] beneggett: has joined #ruby
[23:23:58] Ox0dea: With your insights and my wasted disk space, together we shall grace /r/dataisbeautiful with graphs the likes of which have never been seen!
[23:24:21] mike___1234: has joined #ruby
[23:24:21] Casty: has joined #ruby
[23:24:39] Axsuul: has joined #ruby
[23:25:17] simplyianm: has joined #ruby
[23:25:54] GPrime: has joined #ruby
[23:26:03] al2o3-cr: Ox0dea: maybe, graph the djia?
[23:26:19] al2o3-cr: in ascii :)
[23:27:12] mcclurmc: has joined #ruby
[23:28:04] jenrzzz: has joined #ruby
[23:29:17] Ox0dea: al2o3-cr: How has that to do with having all the .gems?
[23:29:17] kekumu: has joined #ruby
[23:30:07] al2o3-cr: Ox0dea: it hasn't, just for fun
[23:30:12] Ox0dea: Some API + jq + holman/spark would likely make graphing the DJIA in ASCII a one-liner.
[23:30:27] al2o3-cr: Ox0dea: ruby only man
[23:30:39] quimrstorres: has joined #ruby
[23:30:50] Ox0dea: Raw sockets, or is net/http kosher?
[23:31:18] al2o3-cr: Ox0dea: feel free, as long as it is ruby (only)
[23:32:12] quazimodo: has joined #ruby
[23:32:31] hotpanca_: currently debating whether or not I should give up textmate and learn vim. anybody who's made the jump and like it? (or not?)
[23:32:49] al2o3-cr: vim is the shizzle
[23:33:12] Ox0dea: It is known.
[23:33:17] hotpanca_: al2o3-cr: this is what i hear...
[23:33:37] al2o3-cr: hotpanca_: very hot
[23:34:25] hotpanca_: al2o3-cr: what's the most surprising benefit you've gotten from vim?
[23:34:25] Ox0dea: hotpanca_: What deficiencies have you observed in your use of TextMate?
[23:34:36] al2o3-cr: hotpanca_: use whatever you like
[23:35:00] al2o3-cr: if you like it, you like it :)
[23:35:16] datanoise: has joined #ruby
[23:36:03] Ox0dea: hotpanca_: Processing text as characters is for machines; Vim lets you edit with nouns and verbs.
[23:36:38] simplyianm: has joined #ruby
[23:36:44] hotpanca_: Ox0dea: none that i can really think of, but the grass looks oh so green. (e.g. "just *trust* us, you'll be so much more productive.")
[23:36:52] Ox0dea: No, that's stupid.
[23:37:14] Ox0dea: d3w to delete three words is fundamentally better than hitting Delete or Right Arrow or whatever other nonsense most editors make you do.
[23:37:44] Ox0dea: At bottom, it's not about "productivity", it's about being more than a brute with a keyboard.
[23:38:04] al2o3-cr: i even give nano/pico some love now and again :)
[23:38:42] michael_mbp: has joined #ruby
[23:38:42] mdz_: has joined #ruby
[23:38:45] hotpanca_: Ox0dea: how long did it take you for commands to become muscle memory?
[23:38:57] hotpanca_: al2o3-cr: i like nano!
[23:39:03] Senjai: hotpanca_: You can learn vim in like, a week or so
[23:39:06] dgutierrez1287: has joined #ruby
[23:39:06] Senjai: if you push yourself
[23:39:14] postmodern: is there something like activeresource, but not tied to rails and allows wrapping around more customized API end-points?
[23:39:16] Senjai: As in, force yourself to use the commands etc
[23:39:31] Senjai: postmodern: Huh?
[23:39:35] yaw: has joined #ruby
[23:39:50] yaw: has left #ruby: ()
[23:40:02] jpfuentes2: has joined #ruby
[23:40:15] hotpanca_: Senjai: sweet. there're a million vim tutorials/games. any you'd recommend?
[23:40:33] Senjai: Then just use it in your day to day
[23:40:37] Senjai: get a good vimrc from someone
[23:40:42] Senjai: I used gary bernhardt's to start
[23:40:50] bkxd: has joined #ruby
[23:40:50] baweaver: has joined #ruby
[23:41:03] Senjai: hotpanca_: Put this in your vimrc asap https://gist.github.com/Senjai/e651b8b9a95b06492870
[23:41:40] jhass: that's mean :P
[23:41:41] al2o3-cr: Senjai: isn't there a plugin for that?
[23:41:52] Senjai: al2o3-cr: Disabling arrow keys?
[23:41:56] Senjai: Probably, its just so easy to do though
[23:42:07] Senjai: jhass: not mean, its essential to learning vim :P
[23:42:43] Senjai: This is my behemoth of a vimrc in case you were curious
[23:42:45] Senjai: https://gist.github.com/Senjai/9789638d2748dbc771c8
[23:42:51] dgutierrez1287: has joined #ruby
[23:43:00] Senjai: it's by no means clean
[23:43:13] Senjai: And defines variables for things I no longer use
[23:43:37] hotpanca_: i'll check it out
[23:44:23] hyperjuice: has joined #ruby
[23:45:45] havenwood: postmodern: it seems like ROM is shaping up nicely
[23:46:12] havenwood: though i haven't used it other than just playing. i'll have to give it a try
[23:47:34] jenrzzz: has joined #ruby
[23:47:38] havenwood: http://rom-rb.org/
[23:47:55] dgutierrez1287: has joined #ruby
[23:49:46] Senjai: sl;dfgksa;lgkn
[23:49:56] Senjai: No me gusta datamapper like things
[23:50:08] gambl0re: has joined #ruby
[23:51:01] simplyianm: has joined #ruby
[23:51:46] shevy: el gato es un perro
[23:52:01] havenwood: Senjai: Don't like ROM?
[23:52:28] Senjai: havenwood: No :( Just on principle. Don't ask me why, its a lot of typing and its mostly subjective
[23:52:56] havenwood: Senjai: Like ActiveRecord?
[23:53:03] centrx: ROM is vaporware. Wake up sheeple!
[23:53:10] havenwood: centrx: It exists now!
[23:53:18] havenwood: centrx: Adapters and everything. :P
[23:53:27] centrx: IT'S ALIVE!
[23:54:36] Senjai: http://upload.wikimedia.org/wikipedia/commons/a/a7/Frankenstein's_monster_(Boris_Karloff).jpg
[23:55:03] beneggett: has joined #ruby
[23:55:26] cirn0: has joined #ruby
[23:57:13] luckyme: has joined #ruby
[23:59:40] RegulationD: has joined #ruby