« Back to channel list

#ruby - 12 May 2015

« Back 1 day Forward 1 day »
[00:00:00] weaksauce: "//name[.='someName']" would probably work
[00:00:18] GaryOak_: but that would only select the name element not the property element
[00:00:51] GaryOak_: drocsid: are you trying to select the property itself that has a child element with a specific name?
[00:00:52] weaksauce: true. add an /.. then?
[00:01:52] drocsid: What I wanted to do was find the value for the property with a specific name. In this case sandboxId
[00:02:38] GaryOak_: yeah so weaksauce's //name[.='someName']/.. should get that for you
[00:03:09] weaksauce: "//name[.='someName']/../value" if your xml is nested like the above example
[00:05:01] drocsid: Looks like that was right. I will read up on the xpath cheatsheet to see if I can make sense of it.
[00:16:53] drocsid: I think the expression is saying //name[..=sandboxId'
[00:17:28] drocsid: I think the expression is saying //name[..'=sandboxId'/ <- match all name elements who have the exact text sandboxId
[00:18:03] drocsid: " /.. < the parent node
[00:18:28] drocsid: " /value < the value node
[00:19:17] drocsid: thanks for the help, still could know it a little better, but can probably get by a little more myself now
[00:46:28] neohunter: I've submited what we discussed this afternoon here as a feature suggestion, https://bugs.ruby-lang.org/issues/11141
[00:48:34] weaksauce: neohunter wouldn't that interfere with the global match variables?
[00:49:05] neohunter: weaksauce well, that is just an example, as I said, i dont like $1 for be global variables, and p1 neither.
[00:49:20] neohunter: i thinkthat syntax is great
[00:49:23] neohunter: but not sure what to use
[00:49:40] neohunter: &:1, &:2, &:3
[00:50:01] neohunter: i like last one,
[00:52:13] sevenseacat: i dont think much of the proposed syntax
[00:52:26] baweaver: Someone's been using Scala eh?
[00:52:52] baweaver: ex: List(1, 2, 3) map (_ + 10)
[00:53:04] baweaver: ex: sSquared.reduce (_+_)
[00:53:34] baweaver: http://learnxinyminutes.com/docs/scala/ - ctrl-F Combinators
[04:19:34] Oog: https://gist.github.com/anonymous/9c0882afe9b48c729cd9 - is there a better way or is this good?
[04:23:11] Radar: what is $confing
[04:23:15] Radar: and why is it a global
[04:23:28] neonrooster: how do I do sockets in Ruby? I want to make an IRC bot
[04:23:46] centrx: Radar, variables that start with $ are global in Ruby
[04:24:00] Oog: Radar: yes my global config
[04:24:15] Oog: $config = Rails.configuration
[04:24:29] centrx: neonrooster, http://ruby-doc.org/stdlib-2.2.1/libdoc/socket/rdoc/TCPSocket.html
[04:24:52] Oog: just a shortcut
[04:28:09] Radar: neonrooster: like this http://github.com/radar/summer
[04:28:48] neonrooster: whoa how do I bookmark all my firefox tabs?
[04:30:32] pipework: neonrooster: All you really need is TCPSocket and perhaps perusing some other IRC bots for knowledge on how to connect and talk to IRC.
[04:30:40] neonrooster: pipework: ok thanks
[04:44:28] BLACKPOWER_: i hate white people
[04:44:31] BLACKPOWER_: bitch ass crackers
[04:45:56] pipework: I hate people. Bitch ass bitches.
[04:46:20] pipework: But I hate me more, so I relatively like people, comparatively.
[04:49:59] ChanServ: +o sevenseacat
[04:50:10] sevenseacat: sevenseacat kicked BLACKPOWER_: behavior is not conducive to the desired environment.
[04:51:09] ChanServ: -o sevenseacat
[04:53:30] Radar: +b *!*@gateway/web/freenode/ip.207.244.77.2
[04:55:05] ccolorado: How can I match the last group of consecutive digits form a srting ? e.g. "showname_(2009).121011.mp4" get 121011
[04:56:40] centrx: do you mean /.*(\d+)[^\d]*$/
[04:57:15] centrx: maybe would have to be [^0-9]
[04:59:18] ccolorado: centrx: well that will match the whole filename string, including the showname_(2009). and .mp4
[04:59:25] pipework: ccolorado: string.reverse.split('.', 3)[1]
[04:59:32] pipework: forgot to split first.
[05:00:10] havenwood: >> "showname_(2009).121011.mp4".scan(/\d{2,}/).last
[05:00:11] ruboto: havenwood # => "121011" (https://eval.in/349545)
[05:00:12] pipework: .split('.')[-2] probably
[05:00:43] pipework: "showname_(2009).121011.mp4".split('.')[-2]
[05:00:44] centrx: ccolorado, yeah it will match the whole string, but the capture will only be the digits
[05:02:18] ccolorado: pipework: '.' is not a split marker, it could be anuthing really, I need just need the last consecutive group of numbers
[05:02:36] ccolorado: I think havenwood got it tho
[05:03:18] centrx: I say everybody's a winner
[05:03:21] pipework: ccolorado: Yeah, his should match a lot better. I just tend to not use regex until I see a pattern that needs it.
[05:03:50] Eiam_: hmm so playing around, is there a way I can put a value inside a hash that will execute when you access its key?
[05:03:53] ccolorado: centrx: oh i see, i just input your suggestion on rubular, to check, I guess I really need to polish my regex foo
[05:03:55] havenwood: >> File.basename("showname_(2009).121011.mp4", ".*").rpartition(".").last
[05:03:56] ruboto: havenwood # => "121011" (https://eval.in/349576)
[05:04:06] Eiam_: with a proc i'd have to call hash[key].call
[05:04:17] pipework: or hash[key][]
[05:04:56] Eiam_: right, and I'd rather the call be transparent
[05:06:15] pipework: Eiam_: If I were you, I'd just make something that duck types like a hash.
[05:07:09] ccolorado: pipework: I triy to avoid parsing all together, but sometimes one has no option :(
[05:07:29] Eiam_: pipework: meh. ill just add the hash key in later after I've created the hash
[05:07:38] Eiam_: too bad, thought that would be neat
[05:07:46] pipework: ccolorado: Whale, there simply wasn't enough sample data to know.
[05:25:18] Eiam_: wish each_with_object was as short to type as "inject" or "reduce"
[05:25:36] Eiam_: all that typing my return value and those extra _, so cumbersome!
[05:25:54] agent_white: Evenin' folks
[05:32:40] pipework: Eiam_: alias is nice, is it not?
[05:32:59] Eiam_: pipework: eh
[06:31:56] Deck`: is it allowed to ask ActiveRecord/Rails questions here?
[06:32:09] Nilium: You should probably ask them in the rails channel.
[06:33:13] Deck`: I supposed so but didn't manage to find it
[06:33:25] flughafen: morning everybody
[06:33:32] flughafen: sevenseacat: certainty shevy ^^
[06:34:19] sevenseacat: Deck`: #rubyonrails
[06:35:52] shevy: hey flughafen how is berlin
[06:37:23] flughafen: shevy: it's fine, how are you
[06:37:32] wasamasa: pleiosaur: that does totally not sound shady and like a 90ies revival
[06:43:00] shevy: flughafen in the middle of rewriting a big project
[06:43:35] flughafen: shevy: rails?
[06:44:14] shevy: I don't know if I can ever learn rails :(
[06:44:59] Gas_the_Jews: you can't learn rails
[06:45:09] wasamasa: you can only inhale rails
[06:45:14] wasamasa: and pray you don't get sick from that
[06:45:30] flughafen: wasamasa: haha
[06:45:36] Gas_the_Jews: http://www.readysetrails.com/index.php/181/this-is-why-learning-rails-is-hard/
[06:45:52] Gas_the_Jews: wasamasa: that's the gayest thing i heard all day
[06:46:13] wasamasa: Gas_the_Jews: you've got a pretty questionable nickname there
[06:46:44] Gas_the_Jews: actually, i don't if you weren't brainwashed by the media and actually did your own research and had the ability to think critically
[06:46:59] Gas_the_Jews: i hope that now you will be less ignorant and do research
[06:47:33] ruboto: I don't know anything about ops
[06:47:41] wasamasa: ACTION throws a bucket at ruboto 
[06:48:17] Gas_the_Jews: seriously, jews are committing mass genocide against palestinians and are getting away with it
[06:48:27] shevy: someone ban the troll pls
[06:48:38] ChanServ: +o sevenseacat
[06:48:43] Gas_the_Jews: are you retarded?
[06:48:45] certainty: there we go
[06:48:48] shevy: go away man
[06:48:50] certainty: thanks sevenseacat
[06:48:51] sevenseacat: +b *!670ac5da@gateway/web/freenode/ip.103.10.197.218
[06:48:52] sevenseacat: sevenseacat kicked Gas_the_Jews: behavior is not conducive to the desired environment.
[06:49:00] shevy: that's one deadly cat there
[06:50:02] certainty: one cat to rule them all?
[06:50:14] sevenseacat: i dont get the recent spate of offensive trolls.
[06:50:27] certainty: maybe it's just one with too much time
[06:51:05] shevy: certainty I think that counts for rings, not cats
[06:51:38] certainty: shevy: rings, cats, the borders are blurry
[06:51:43] shevy: One ring to bring them all and in the darkness bind them.
[06:51:56] shevy: One cat to bring all mice and in the darkness eat them.
[06:52:09] shevy: hmm nah... fits more to rings
[06:52:31] certainty: it all ends in s
[06:52:33] shevy: certainty: look, I am looking at old code like this "if @user_input[-1, 1] == '&'"
[06:52:50] shevy: anyone remembers when .end_with? was added?
[06:53:00] sevenseacat: ruby 1.9, i suspect
[06:53:35] shevy: oh... that early... I thought it was more a 2.x something addition. Anyway, I like it!
[06:54:35] sevenseacat: yeah ruby 1.9.2
[06:55:17] sevenseacat: or ruby 1.8.7 actually
[06:55:36] sevenseacat: http://apidock.com/ruby/v1_8_7_72/String/end_with%3F
[06:56:18] flughafen: which ruby are you using shevy ?
[06:56:23] certainty: see shevy, that's one for you. I hear you like ancient rubies
[06:56:32] shevy: the latest... 2.2.2 ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[06:56:39] SIEG_HEIL: NIGGER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[06:56:44] sevenseacat: +b *!b2a2d08e@gateway/web/freenode/ip.178.162.208.142
[06:56:45] sevenseacat: sevenseacat kicked SIEG_HEIL: behavior is not conducive to the desired environment.
[06:56:59] shevy: now I am confused, I thought .end_with? was really more recent
[06:57:09] shevy: I don't think I have used it in the 1.8.x era
[06:57:15] certainty: you didn't know it
[06:57:23] certainty: the 1.8.x era? you mean like last year
[06:57:36] shevy: I think it's a few years already by now
[06:57:41] shevy: remember, we have the middle of 2015!
[06:58:14] certainty: it feels like the 90s here
[06:58:41] flughafen: certainty still listens to cassette tapes
[06:58:44] certainty: i mean like super awesome
[06:59:29] certainty: get a pen out stick it in and then crank that thing
[06:59:31] shevy: the 1990s were pretty cool
[06:59:42] shevy: kinda like the 1980s but a decade more modern
[06:59:55] shevy: surely you must remember the love parade
[06:59:58] certainty: probably the best time of my life
[07:00:06] certainty: not the love parade
[07:00:24] shevy: in the range from 2005 to 2010, it just wasn't the same as compared to 1995 to 2000
[07:00:57] shevy: the music was very cheesy altogether in the 1990s
[07:01:03] shevy: eurodance oh dear
[07:01:15] certainty: and by cheesy you mean awesome?
[07:01:42] shevy: I like the music from the 1990s but I can not honestly claim that it was good music
[07:01:50] certainty: K's choice, Pearl jam, later nirvana
[07:01:51] wasamasa: how dare you
[07:01:53] certainty: that's legend
[07:02:27] shevy: well I know those names... save for K's choice
[07:04:18] certainty: smashing pumpkins also
[07:04:50] certainty: anyway, time for some SML
[07:04:59] shevy: is this lisp?
[07:06:03] certainty: https://en.wikipedia.org/wiki/Standard_ML
[07:18:42] hacker: why do i keep getting klined?
[07:18:57] sevenseacat: good question, why do you?
[07:19:15] Guest87590: i don't know is it because you're an ugly cunt sevenseacat ?
[07:19:21] sevenseacat: +b *!97ec1a69@gateway/web/freenode/ip.151.236.26.105
[07:19:22] sevenseacat: sevenseacat kicked NIGGRE: behavior is not conducive to the desired environment.
[07:22:07] sevenseacat: +b *!258f0e9d@gateway/web/freenode/ip.37.143.14.157
[07:22:08] sevenseacat: sevenseacat kicked CUN_TLORD: behavior is not conducive to the desired environment.
[07:23:13] sevenseacat: ACTION munches on popcorn
[07:28:43] HIT_LER: hello again sevenseacunt
[07:28:52] HIT_LER: whoops i mean sevenseacat*
[07:28:52] sevenseacat: +b *!92b911a2@gateway/web/freenode/ip.146.185.17.162
[07:28:53] sevenseacat: sevenseacat kicked HIT_LER: behavior is not conducive to the desired environment.
[07:31:34] ebonics: so funny lulz
[07:32:21] shevy: KIKES_SUCK grow up man
[07:33:02] KIKES_SUCK_: why am i funny edwinvdgraaf
[07:33:15] shevy: he even fails at tab completion
[07:33:35] KIKES_SUCK_: shevy: you mean the ops fail at klining me
[07:33:52] KIKES_SUCK_: this is my 32nd kline
[07:33:54] ebonics: KIKES_SUCK_, bcos youre a trashcan with nothing better to do
[07:33:55] shevy: it's not so hard, it's a big key on your keyboard KIKES_SUCK
[07:34:07] sevenseacat: don't feed the troll, guys.
[07:34:15] KIKES_SUCK_: don't listen to sevenseacunt
[07:34:17] sevenseacat: and girls. and everyone.
[07:34:21] sevenseacat: +b *!4524bc19@gateway/web/freenode/ip.69.36.188.25
[07:34:21] sevenseacat: sevenseacat kicked KIKES_SUCK_: behavior is not conducive to the desired environment.
[07:36:08] shevy: seems as if cats have more lives than that troll had
[07:36:44] sevenseacat: he's changing all his hostname stuff every time, so I don't know how to do anything else other than kick/ban him.
[07:37:40] KIKES_SUCK_DICK: hello again i had to be banned from a few channels to get a kline and come back
[07:37:50] sevenseacat: +b *!cdcc5516@gateway/web/freenode/ip.205.204.85.22
[07:37:50] sevenseacat: sevenseacat kicked KIKES_SUCK_DICK: behavior is not conducive to the desired environment.
[07:39:09] canton7: write a little script that autobands people with only caps and underscores in their name
[07:39:28] canton7: looking down the nick list I don't think it would catch anyone else, and he might be too dumb to figure it out...
[07:41:08] shevy: canton7 hehe
[07:41:33] sevenseacun-t: hi sevenseacat
[07:41:36] sevenseacat: +b *!b043ac55@gateway/web/freenode/ip.176.67.172.85
[07:41:37] sevenseacat: sevenseacat kicked sevenseacun-t: behavior is not conducive to the desired environment.
[07:42:12] shevy: how can people have so much time and patience
[07:42:28] shevy: especially via browser-based webchat
[07:43:23] sevenseacat: +b *!b23ef973@gateway/web/freenode/ip.178.62.249.115
[07:43:23] sevenseacat: sevenseacat kicked sevenseabitch: behavior is not conducive to the desired environment.
[07:43:42] Ropeney: some people have alot of spare time
[07:44:30] sevenseacat: my apologies to everyone here. I'm trying to get staff to help me handle them.
[07:44:54] sevenseacat: I'm not an IRC guru unfortunately
[07:46:10] shevy: Ropeney yeah
[07:46:36] certainty: no worries sevenseacat, keep it up
[07:47:39] sinepreggin: is ruby a fun language?
[07:47:53] certainty: it is for some people yes
[07:48:16] sinepreggin: but not for sevenseacat right?
[07:51:05] certainty: women and jewels and all that :p
[07:52:06] sinepreggin: i heard you're having a rough night
[07:52:43] sinepreggin: someone keeps coming in here and calling you names like sevenseacunt and no matter how many times they kline her she keeps coming back... isn't that awful sevenseacat?
[07:52:46] certainty: i should build a language and name it Arkenstone, just because
[08:06:58] al2o3-cr: I'd suggest this for the time being: /ban *!*@gateway/web/freenode/* or /ban *!*@gateway/* sevenseacat
[08:07:58] adaedra: that'd have some undesired side effects
[08:08:05] Radar: al2o3-cr: Ban all web clients? What about those people who are signed in already through the web?
[08:08:42] al2o3-cr: use his ip address to then
[08:09:59] adaedra: how wonderful.
[08:11:32] Darkwater: +r the channel
[08:12:13] Radar: al2o3-cr: And if the IP keeps changing?
[08:13:00] adaedra: Or we do nothing, as it seems it's calm now.
[08:14:39] al2o3-cr: sevenseacat was told +r in freenode
[08:24:07] agent_white: Just tuning in... what's the deal with the prick-parade?
[08:49:54] duderonomy: Uhm, I want to get better at class design and not think and write procedurally. Do any topical blog posts or essays come to mind?
[08:50:10] duderonomy: Clearly, I just need to think about my problem more. :)
[08:51:03] duderonomy: I get the whole Animal -> Mammal -> Dog thing
[08:51:27] duderonomy: And when modeling the physical world is it less challenging.
[08:51:46] duderonomy: But when doing a sysadmin task, I have to think really hard. :)
[08:52:04] certainty: duderonomy: http://www.poodr.com/
[08:52:46] duderonomy: thx man. looks good.
[08:53:10] certainty: you might also enjoy some of sandi metz's talks
[08:57:02] krasnus: rubytapas is also quite good, no?
[09:01:34] duderonomy: cool. I got lots to do now. :) thx!
[09:05:58] avat: Hello guys, I have a problem with bloating my methods. Let's say for example I have a method "get_actions" which now does following things:
[09:06:47] toretore: refactor(refactor(refactor(refactor())))
[09:07:45] avat: Hello guys, I have a problem with bloating my methods. Let's say for example I have a method "get_actions" which now does following things: 1. call GET request and download json with data, 2. Open sqlite database connection, 3. Save each json item to database, 4. After all are saved, log the success message. Should I make them to four methods?
[09:08:38] Hanmac1: avat: i would say yes ;P
[09:09:38] avat: I thought so, the problem came up when I wanted to write proper tests and it's not easy when one method does a lot of things. So in this example 4 is optimal or should it be more/less?
[09:10:05] adaedra: avat: try to split it in the smallest bits possible.
[09:10:06] avat: Should i move logging to different method too?
[09:10:18] adaedra: But how to split it is at your appreciation.
[09:10:23] toretore: avat: in general, if it's easy to test then it's just right
[09:10:35] toretore: if it's a pain to test, something isn't right
[09:11:16] avat: toretore: thanks, your advice helps
[09:11:30] avat: I need to keep it in mind for future :)
[09:12:32] avat: And guys, what about logging feature? At the end of method which does something or should the method call different loggin method or should i call logging indepent after everything finishes?
[09:14:46] duderonomy: avat: is it useful to think that logging could be in any method?
[09:14:55] duderonomy: Or, is this logging a task that this class must perform? Does the caller explicitly know about the logging in the sense that the caller calls the logging method?
[09:15:50] duderonomy: I should say "user" of the object, not "caller". ugh. :)
[09:16:02] shevy: :show_hidden_files => true is the same as: show_hidden_files: true right?
[09:16:33] avat: It's actually script running in the background responding only to REST events, so loggin is only for informational purposes / debuging
[09:18:01] toretore: avat: can you gist the code? it's easier to give advice that way
[09:20:24] avat: toretore: I warn you: I am really beginner :) https://gist.github.com/ZyzioZiom/9820504900e042dad074
[09:23:12] jhass: avat: start by clicking edit and activating syntax highlighting then ;)
[09:23:19] toretore: avat: those logging statements are fine inside the method
[09:23:38] toretore: and this might be personal preference, but i don't generally use verbs in my method names
[09:23:46] toretore: so i'd call it just "actions"
[09:25:01] jhass: it doesn't return any, I'd call it store_actions or since the class is already called GetData, simply run
[09:26:11] avat: enabled highlighting, sorry :)
[09:26:25] shevy: this is the beauty of ruby
[09:26:30] shevy: people can not agree on naming things
[09:27:24] certainty: naming is hard
[09:27:29] certainty: but i'm with jhass here
[09:27:36] certainty: i'd expect actions to return something
[09:27:56] flughafen: certainty: what are the two hardest things in computer science? cache invalidation and naming things
[09:27:58] shevy: ninja actions are silent
[09:28:06] certainty: flughafen: and off-by-one errors
[09:28:23] flughafen: those are the most common, but not the hardest...
[09:28:38] certainty: it's a common variation of that phrase
[09:28:57] certainty: it's supposed to be a joke
[09:29:33] flughafen: yes. it is. quite a funny one. mwahaha
[09:29:47] avat: I named it after GET request which actually downloads json of actions
[09:31:02] avat: somewhere i read to name functions like after word TO, ex. TO get_user_name { ... } which in ruby becomes def get_user_name
[09:31:37] avat: in Clean Code actually :D
[09:32:11] certainty: i don't like get_*, set_*
[09:32:18] avat: so I guess naming is decision of preference instead of an error?
[09:32:23] jokke: i'm having some trouble with bundler
[09:32:29] jokke: i run bundle install
[09:32:38] jokke: and it fails to build some native extensions
[09:32:45] avat: certainty: it's really wrong to use GET, SET in method names?
[09:33:03] jokke: if i run gem install gemname -v 'version' it installs those gems just fine
[09:33:12] jokke: i'm using chruby
[09:33:18] certainty: avat: well in ruby we have attr_readers/attr_writers
[09:33:24] jokke: (in case that makes a difference)
[09:33:45] certainty: avat: which are just your_field/your_field=
[09:34:38] jokke: after the bundle was complete (after manually installing the failing gems) i got errors, that some gems were not found in the sources even though bundle lists them with the correct versions
[09:34:48] toretore: avat: https://gist.github.com/toretore/b6a9e8c25dd1fcdd93e9
[09:34:53] adaedra: avat: set_x => x=, get_x => x
[09:35:02] jokke: any clues?
[09:35:10] adaedra: or, if x is a boolean, x?
[09:35:14] toretore: improvements can still be made, for sure
[09:41:07] jhass: avat: http://paste.mrzyx.de/p1lfwozfe names are still off since I couldn't really decipher what this is about, but should give you some ideas
[09:41:53] avat: Thanks a lot guys, I'll dive into it and try to refactor my code
[09:43:09] avat: And no I start to understand how can I write tests to this code :D
[09:43:14] jhass: avat: in short identify the "atomic" operations of your code and give them nice names by extracting them to methods, then group related methods into a class (if they share state) or module (if they don't share state)
[09:43:18] avat: now* I start
[09:50:16] duderonomy: avat: It's really good instinct that you thought about refactoring for testability :)
[09:51:49] izzol: Anyone knows any good gem for kvm?
[09:51:58] izzol: I found one which is called ruby-libvirt.
[09:52:31] izzol: I want to connect to the kvm to create/delete/list virtual machines.
[09:55:38] adaedra: izzol: libvirt bridge seems a good idea if you know it
[09:55:47] rdark: izzol: fog can also do libvirt
[09:57:50] izzol: ok, thanks. I will look on this fog since it has much more options :-)
[10:10:15] funburn: i just came across a weird thing that I can???t explain. I???m declaring a hash, inside a block. One of the keys is :end. If I declare it with a hash_rocket, it works fine. but if I use the ruby 2 syntax it bombs with an ???unexpected end of input??? (example https://gist.github.com/mtuckerb/b9ea4c3a030a83836ae8)
[10:10:43] rdark: funburn: end is a keyword
[10:10:59] funburn: but doesn???t end: ???string??? make it a symbol?
[10:11:58] rdark: afaik you can't override it as it'll bomb with a syntax error
[10:13:10] funburn: is that what I???m doing when I declare my hashes like {key: value}?
[10:13:41] rdark: funburn: symbol syntax is to prefix with a colon, not postfix
[10:15:02] rdark: { this: that } is just another way of writing { this => that }
[10:15:24] rdark: if you wanted the key to be a symbol, you can write { :this => that }
[10:16:04] funburn: ah, I assumed that :this => that was == this: that
[10:16:16] funburn: it seems to be everywhere else I have used it
[10:16:46] doerteDev: http://pastie.org/pastes/10184038/text << what can cause gem's files failing to include files from the same directory if they exist and there is no typo?
[10:17:52] funburn: it works if the key is a symbol, but if the key is a method /before/ it???s declared a symbol it won???t work
[10:18:00] funburn: it will assume I mean the method
[10:18:24] funburn: or keyword
[10:18:44] funburn: thanks for clarifying
[10:20:47] doerteDev: digital_ocean_domain_record_create.rb:14 << include 'digital_ocean_base' << i see the digital_ocean_base.rb exists and does not have any weird unreadable mode set. Anyone seen something similar yet?
[11:05:03] izzol: rdark: I think there is no more libvirt in fog (https://github.com/fog/fog/tree/master/lib/fog) nothing here.
[11:05:31] izzol: I see there is a separate gem called: fog-libvirt but fog doesn't see it :(
[11:05:47] izzol: and I'm getting: "libvirt is not a recognized compute provider"
[11:06:18] adaedra: you installed it and required it?
[11:06:45] rdark: izzol: looks like libvirt got pulled out to a sub-project
[11:06:51] rdark: fog-libvirt is what you want
[11:29:30] izzol: Hmm, I still have a problem to use this gem. Not sure what is wrong.
[11:32:13] izzol: https://gist.github.com/wolfedale/1a295d97ad09da60d738
[11:34:57] jhass: izzol: require "fog-libvirt" first?
[11:35:54] izzol: jhass: LoadError: cannot load such file -- fog-libvirt
[11:36:29] jhass: "fog/libvirt" then?
[11:37:50] izzol: irb(main):001:0> require 'fog/libvirt'
[11:38:00] izzol: thanks jhass
[11:48:54] surs: I'm using optparse. Do I need to specify long switches?
[11:49:18] centrx: no I don't think so, what do you mean?
[11:49:53] surs: opts.on("-cX","explanation") is fine?
[11:50:03] centrx: yup, pretty sure
[11:50:15] centrx: I use the long without the short myself
[11:50:20] centrx: so vice-versa must work too
[11:50:23] surs: or does it have to be opts.on("-c","--case X","expl)
[11:55:37] Hanmac1: shevy: i am doing commits for rwx again ... and you cant stop me! ;P
[12:09:23] shevy: I need to rewrite a class
[12:09:27] shevy: to become as fast as possible
[12:09:42] Hanmac1: shevy the bad thing is that wxWidgets does have some hidden (undocumented( asserts where the input might crash, so i need to check my input before it might be able to crash inside wx ... (some ruby exception is better than a assert/fatal message)
[12:10:06] centrx: shevy, You could delete everything in it?
[12:10:28] shevy: centrx yeah but then I could not offer features
[12:11:01] Hanmac1: shevy make us a gist or a repo and we might help you
[12:11:08] centrx: I will not help him
[12:11:21] centrx: PHP or bust
[12:11:43] centrx: Okay, my comedy routine is over now
[12:12:19] shevy: hanmac1 basically, I need to clone the bash functionality of "alias"
[12:12:28] shevy: my aliases are stored in yaml files
[12:12:49] shevy: an alias can point towards another alias though
[12:13:06] jhass: shevy: use crystal :P
[12:13:07] shevy: I think I need to split this into two classes...
[12:17:38] DefV: shevy: show your current implementation and we might optimize it for kicks
[12:51:01] ych_: is there a ruby math lib that contain cosine similarity of vectors?
[12:53:38] jhass: https://www.omniref.com/?utf8=%E2%9C%93&q=cosine+similarity&commit=Search
[13:00:43] vikaton: how do I split a string but the nth character?
[13:00:57] vikaton: like '123456789' every 2
[13:02:29] apeiros: >> '123456789'.scan(/.{,2}/m)
[13:02:30] ruboto: apeiros # => ["12", "34", "56", "78", "9", ""] (https://eval.in/350738)
[13:02:35] apeiros: >> '123456789'.scan(/.{1,2}/m)
[13:02:36] ruboto: apeiros # => ["12", "34", "56", "78", "9"] (https://eval.in/350739)
[13:02:40] apeiros: vikaton: ^
[13:04:20] vikaton: thanks apeiros
[13:09:31] jhass: ACTION steals apeiros wizard hat
[13:09:40] apeiros: noooooooo! my hat!
[13:09:50] apeiros: but??? I still have it?
[13:09:54] apeiros: -o apeiros
[13:10:01] jhass: you need a better client :P
[13:10:23] apeiros: but why do you mean?
[13:10:34] jhass: because you don't even notice you're opped? :P
[13:13:35] apeiros: I actually don't know of a client which prominently shows your op status
[13:13:56] jhass: weechat pretty much does
[13:14:26] jhass: meh, same_nick thing, somebody say something I can respond to :P
[13:16:26] apeiros: jhass: plerp?
[13:16:57] jhass: http://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20150512_151646.png
[13:17:14] jhass: three locations
[13:18:46] adaedra: <apeiros> I actually don't know of a client which prominently shows your op status
[13:18:49] adaedra: what do you mean?
[13:19:15] apeiros: adaedra: I mean that I see my op status in the user list. that's not really "jumping" into your eye.
[13:19:32] adaedra: Lot of clients does o_O
[13:19:40] al2o3-cr: jhass: what setting do you set for coloured nicks on right hand side?
[13:19:49] jhass: al2o3-cr: colorize_nicks script
[13:19:58] al2o3-cr: jhass: ah ok :)
[13:20:39] adaedra: apeiros: what do you use?
[13:21:42] adaedra: apeiros: use textual, it's good
[13:27:05] certainty: weechat looks nice. looks like something that could lead me away from irssi
[13:27:40] adaedra: if you look at a console client, it's indeed nice.
[13:27:52] jhass: the default config looks pretty much alike irssi I think
[13:27:59] adaedra: there's a lot of customization to do.
[13:28:07] adaedra: jhass: it's green when irssi is blue iirc :)
[13:28:28] jhass: yeah, the christmas tree I have needs a bit tweaking :P
[13:28:41] jhass: *for the ... it
[13:29:17] al2o3-cr: http://i.imgur.com/5ZToWK9.png heres mine :)
[13:30:17] jhass: I have a buffer list on the right that I didn't include in the screenshot
[13:31:52] certainty: i'll try it at home and see what it's like. Change is good i think
[13:32:02] adaedra: here's an old one https://i.imgur.com/b5S8R1V.png
[13:32:03] al2o3-cr: yeah mines buffer list is at the top which i didn't include ;p
[13:32:25] Hanmac1: hm my irc client is only a pidgin
[13:32:41] jhass: the base config is just from http://dev.weechat.org/post/2011/08/28/Beautify-your-WeeChat
[13:36:59] Hanmac1: hm i need to check if there is a Irc client named "BeeChat" too ;P
[13:39:51] adaedra: hanmac1: there's bitlbee
[13:47:44] lb5tr: Hi guys, I just bumped version of my gem at rubygems.org
[13:47:57] lb5tr: and I still can't download the newest one using bundle
[13:48:05] adaedra: bundle update
[13:48:08] lb5tr: is there some kind of propagation period?
[13:48:15] lb5tr: let me check
[13:48:50] lb5tr: bundle update downgrades my gem version inside Gemfile.lock to newest-1 :/
[13:49:03] Earthnail: hi there. Trying to figure out the length of MP3 files on my AWS S3 storage. All I need to do is read the metadata; as such there is no need to download the entire file. ruby-mp3info seems to be the most prominent gem for doing that; it accepts a filename or a StringIO. Is there a way to convert an S3Object into a StringIO so mp3info only downloads the bits of the file it needs?
[13:49:05] adaedra: does gem install get the latest version?
[13:49:38] lb5tr: if I do manual bump of version in Gemfile.lock
[13:49:54] adaedra: If gem install can't get it, bundle won't
[13:50:08] jhass: lb5tr: what's the gem?
[13:50:13] lb5tr: jhass: cuculungwa
[13:50:17] lb5tr: https://rubygems.org/gems/cuculungwa\
[13:50:20] lb5tr: https://rubygems.org/gems/cuculungw
[13:50:26] lb5tr: https://rubygems.org/gems/cuculungwa
[13:50:56] lb5tr: I'm interested in version 0.0.48
[13:51:04] jhass: and bundler and gem install install 0.0.47?
[13:51:38] lb5tr: let me try gem install one more time
[13:51:47] lb5tr: ERROR: Could not find a valid gem 'cuculungwa-0.0.48' (>= 0) in any repository
[13:53:25] apeiros: lb5tr: you're mingling gem name and version
[13:54:38] tek0011: Hey all. I, to put it bluntly, have no idea wth I am doing in Ruby. Anyone care to take a look at this? I realize I might be asking for alot but any help would be appreciated. I am trying to take some output, remove dupes, and reorganize into a list - https://gist.github.com/tek0011/346152ee616a3485e199
[13:55:02] lb5tr: apeiros: yeah, I just used to portage syntax
[13:56:38] lb5tr: apeiros: :3 gem install worked
[13:56:43] lb5tr: apeiros: but what about bundle?
[13:56:52] adaedra: tek0011: to get the serial number, a regex match is enough. Then you get an array of the serials on which you can #uniq.
[13:56:58] apeiros: lb5tr: what's the line you have in your Gemfile?
[13:57:34] lb5tr: cuculungwa (0.0.48)
[13:57:40] tek0011: adaedra: that might get me somewhere. I can figure out getting each serial number and removing the dupes. I'll look into #unique. thanks
[13:58:16] jhass: lb5tr: Gemfile, not Gemfile.lock
[13:58:28] jhass: well, also that's the correct version in your lock?
[13:58:32] ytti: tek0011, serials << qlogicserialcommand.split.last
[13:58:39] neohunter: I've been thinked all night long in a short hand syntax for blocks, what do you think of this syntax, do you like it?
[13:58:40] neohunter: x.method{ *1 - *2 }
[13:58:40] ytti: tek0011, then on top of block serials = []
[13:58:42] lb5tr: gem 'cuculungwa'
[13:58:49] ytti: tek0011, and bottom of block puts serials.uniq
[13:58:56] jhass: so what makes you say it's using the old version?
[13:58:56] neohunter: to avoid defining parameters for small blocks
[13:59:13] Giorgio: its is possible to pass keyword argument from one method to another(nested) directly or need to be done this way https://gist.github.com/tapalilov/7b55dae7cacc9e7955d6
[14:00:52] Hanmac1: neohunter: i dont think it will be accepted ... your previous try to add a ticket was rejected
[14:01:22] adaedra: ytti: not sure about the .split.last. Looks to me like all the serials are written at once.
[14:01:24] neohunter: yes but matz says is a good idea thought, he just dont like the @1 @2
[14:01:42] neohunter: sorry the $1 $2
[14:01:51] lb5tr: adaedra: hmm bundle install still reports problems
[14:02:19] lb5tr: I have two environments
[14:02:34] Hanmac1: neohunter: *something is already reserved for array-splat, so i dont think it will be added for your use-case
[14:02:35] lb5tr: and if I maunalyy install 0.0.48 using gem install it works just fine
[14:02:37] havenwood: lb5tr: It just errors with?: problems
[14:02:50] lb5tr: gem 'cuculungwa'
[14:02:56] havenwood: Bundler should write better error messages.
[14:02:58] lb5tr: 2Could not find cuculungwa-0.0.48 in any of the sources
[14:03:01] lb5tr: INFO[0053] The command [/bin/sh -c bundle -j4] returned a non-zero code: 7
[14:03:01] neohunter: hanmac1 :( oh
[14:03:08] adaedra: bundler should disappear. :??
[14:03:36] tek0011: ytti: ahhh thank you!
[14:04:57] picasso: ahh, finally figured out how to remove the irssi hilight notification for my last name, which i happen to share with the author of ruby
[14:04:58] ytti: adaedra, you're almost certainly right
[14:05:18] ytti: tek0011, if adaedra is right, instead of serieals << qlogicserialcommand.split.last, you should do
[14:05:35] jhass: no, bundler is <3
[14:05:43] ytti: tek0011, qlogicserialcommand.each_line do { |line|??serials << line.split.last }
[14:06:31] lb5tr: I'm using Dockerfile to create container with gems and ruby in it
[14:06:43] tek0011: ytti: I think that is what I was looking for, because they are all written at once
[14:06:54] Giorgio: someone have idea about my question ?
[14:06:56] lb5tr: http://pastebin.com/15rZKz64
[14:06:57] ruboto: lb5tr, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/219c9f373c8c279559d0
[14:06:57] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:07:16] adaedra: <jhass> no, bundler is <3
[14:07:21] adaedra: it could be soooo much better.
[14:07:37] jhass: yeah, it could use a rewrite, the codebase is a bit nuts
[14:07:44] jhass: but the concept is good
[14:07:53] havenwood: merger into RubyGems seems good
[14:07:54] lb5tr: so why bundle can't download most recent version even though gem install can?
[14:07:56] adaedra: First, I don't understand why it's a separate functionality to gem.
[14:08:07] adaedra: Second, it doesn't let me do --user-install.
[14:08:16] ytti: http://imgur.com/gallery/t9fmJTO
[14:08:18] jhass: Giorgio: there's **foo for kwargs like there's *foo for regular args, maybe that's what you're looking for?
[14:09:01] jhass: adaedra: I guess maintainership issues back then, they're moving features of bundler into rubygems atm
[14:09:15] havenwood: Giorgio: Maybe say more about what you're wanting?
[14:09:58] havenwood: adaedra: `gem i -g` or long form `gem install --file Gemfile` works great outside of Rails, which hardcodes to Bundler.
[14:10:45] adaedra: havenwood: ah, didn't know that. Does it honors --user-install too?
[14:10:59] havenwood: adaedra: yup, afaik
[14:11:13] jhass: lb5tr: that update call there seems silly and error prone, why not a plain bundle install --deployment?
[14:11:14] havenwood: adaedra: it is RubyGems so it is entirely consistent with RubyGems :)
[14:11:16] adaedra: An integrated way to have in-project dependencies ?? la node like the gem gs does would be good to for deployment environments
[14:12:05] toretore: lb5tr: let's see the entire Dockerfile
[14:12:19] adaedra: Ah , it remembers me I have to bug someone about gem
[14:12:25] adaedra: Which overrides system binaries
[14:12:53] Giorgio: its is possible to pass keyword argument from one method to another(nested) directly or need to be done this way https://gist.github.com/tapalilov/7b55dae7cacc9e7955d6
[14:13:01] Giorgio: havenwood, sorry this was question above
[14:13:39] lb5tr: https://gist.github.com/kubov/789fafd1f218ef11b09d
[14:13:44] lb5tr: awww crap
[14:14:40] Giorgio: jhass, will check it
[14:14:49] jhass: http://production.cf.rubygems.org/ why's that used as source instead of the regular one?
[14:16:14] lb5tr: I have no idea...
[14:16:21] lb5tr: I'm a devops not a dev
[14:16:28] lb5tr: I have to talk to these guys...
[14:16:31] lb5tr: thanks anyway :)
[14:16:33] jhass: yeah, do that
[14:16:43] wasamasa: I thought devops meant being both dev and op
[14:16:54] wasamasa: because, uh, the recession is hitting all of us hard!
[14:18:36] lb5tr: wasamasa: yeah, but I'm not working directly with such details
[14:18:42] lb5tr: maybe I should
[14:23:01] consumerism: i'm trying to figure out how to set the POST body using an object i created with Curl::Easy.new. i can set the url when i create the object, and i can set options after that but i can't find the right option to set the actual POST data
[14:26:37] havenwood: Giorgio: alias bar foo
[14:27:36] havenwood: Giorgio: Hard to say from what you're showing. More context might help if an alias isn't what you're looking for.
[14:28:02] Giorgio: i need from method to pass same keyword argument to another
[14:28:08] Giorgio: which is called inside method
[14:29:21] havenwood: Giorgio: I don't see a better way then for that particular circumstance, if I understand you right.
[14:29:31] toretore: consumerism: https://github.com/taf2/curb/blob/master/lib/curl/easy.rb#L379
[14:29:53] toretore: especially https://github.com/taf2/curb/blob/master/lib/curl/easy.rb#L399
[14:29:55] jhass: !fact mk fake Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[14:29:55] ruboto: jhass, I will remember that fake is Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[14:30:10] Giorgio: yep i was thinking same its better how i give it in the gist
[14:35:15] consumerism: toretore: thanks, so i have a hash which represents the data. and all the examples i see which send regular form data use Curl::PostField.content for each individual value. is there not a way to send the hash as-is instead of converting each value into one of those?
[14:35:45] consumerism: by hash as-is, i mean either the hash and a content-type application/json which would convert it to json, or just to_json it and send the string
[14:36:30] consumerism: i just want to set the post body to a string, really
[14:36:55] consumerism: i don't want to have to tear it down and rebuild it into a bunch of Curl::PostField.contents
[14:36:59] tek0011: wasamasa: not necessarily. I am devops and dont dev
[14:37:14] wasamasa: tek0011: what the hell are you doing then
[14:37:25] tek0011: browsing reddit
[14:37:43] havenwood: well, that is something both dev and ops do.
[14:38:06] tek0011: jk. I know enough to edit code, change it, etc. not create it. so i fix things, add things, remove things.
[14:38:44] TuxOtaku: hey guys, anyone here use rbenv?
[14:38:55] TuxOtaku: I'm trying to set it up on centos 6.
[14:39:16] TuxOtaku: I got everything installed, and used rbenv to install ruby 1.9.3
[14:39:22] ddv: TuxOtaku: forget about centos, ancient shit
[14:39:33] TuxOtaku: ddv: would, but that's what we standardize on here
[14:39:36] TuxOtaku: so I have no choice
[14:39:51] TuxOtaku: so bitching about OSes aside
[14:40:06] TuxOtaku: I installed 1.9.3
[14:40:36] TuxOtaku: but then after I did an rbenv global 1.9.3-p551, ruby --version still says ruby 1.8
[14:40:39] havenwood: 1.9.3 is past end of life. Just has to be said. :P
[14:40:54] adaedra: TuxOtaku: what does `type rbenv` says?
[14:41:21] TuxOtaku: adaedra: rbenv is hashed
[14:41:40] adaedra: does not looks normal
[14:42:00] TuxOtaku: oh wait sorry, that was as another user I was trying to test with
[14:42:14] adaedra: should say it's a function
[14:42:21] TuxOtaku: rbenv is /home/dashing/.rbenv/bin/rbenv
[14:42:47] adaedra: You don't initialize rbenv in your shell.
[14:42:59] adaedra: eval "$(rbenv init -)"
[14:43:05] adaedra: should be in your .bashrc/.zshrc
[14:44:15] TuxOtaku: yep, that fixed things
[14:44:16] adaedra: By the way, ruby 1.9.3 is also available in SPL for CentOS 6. But as havenwood said, it's past end-of-life.
[14:44:17] TuxOtaku: thanks adaedra
[14:44:50] TuxOtaku: what's the current stable version of ruby?
[14:44:55] adaedra: See topic ;)
[15:04:46] User458764: I have already asked the question but I forgot how do I know that Math.sqrt(4) is an integer?
[15:05:07] adaedra: >> Math.sqrt(4).inspect
[15:05:08] ruboto: adaedra # => "2.0" (https://eval.in/351042)
[15:05:10] certainty: >> Math.sqrt(4).class.name
[15:05:11] ruboto: certainty # => "Float" (https://eval.in/351043)
[15:05:14] adaedra: It's not :)
[15:05:17] gizless: User458764: .to_i
[15:05:27] havenwood: >> Math.sqrt(4).integer?
[15:05:28] ruboto: havenwood # => false (https://eval.in/351044)
[15:06:01] havenwood: User458764: ^ ask it
[15:06:08] User458764: gizmore thanks and now how do I know that Math.sqrt(5) is not an integer?
[15:06:20] havenwood: >> !Math.sqrt(4).integer?
[15:06:21] ruboto: havenwood # => true (https://eval.in/351045)
[15:06:27] certainty: you can remember it
[15:08:24] certainty: i wonder why you want to do that
[15:08:35] havenwood: User458764: I showed ya.
[15:08:52] User458764: >> Math.sqrt(4).integer?
[15:08:53] ruboto: User458764 # => false (https://eval.in/351046)
[15:09:01] User458764: it should return true in my case
[15:09:13] al2o3-cr: Math.sqrt only return a float
[15:09:15] adaedra: because sqrt return a float in all cases
[15:09:19] adaedra: 2.0 is not 2
[15:09:32] havenwood: User458764: It's never going to be an Integer.
[15:09:34] User458764: I know but sqrt of 4 is 2 and 2 is an integer
[15:09:44] adaedra: Yeah, mathematically
[15:09:47] jhass: you mean natural number
[15:09:48] certainty: no sqrt of 4 is 2.0
[15:09:49] havenwood: User458764: Not when the #sqrt method returns Floats.
[15:10:03] centrx: User458764, #integer? is looking at the data type of the variable, not the value
[15:10:03] User458764: jhass I think you could save me
[15:10:17] jhass: I think you could google or think
[15:10:27] jhass: especially if you had been told the solution before
[15:11:39] User458764: The best I found myself is Math.sqrt(4) == Math.sqrt(4).floor
[15:12:47] havenwood: There are quite a variety of ways.
[15:13:10] centrx: User458764, that's a good way
[15:13:17] havenwood: >> Math.sqrt(4).modulo(1).zero?
[15:13:18] ruboto: havenwood # => true (https://eval.in/351047)
[15:13:20] havenwood: >> Math.sqrt(5).modulo(1).zero?
[15:13:21] ruboto: havenwood # => false (https://eval.in/351048)
[15:13:22] User458764: centrx ok, thanks
[15:22:59] ericwood: "sqrt" always looks like "squirt"
[15:23:53] mwlang: Is there a simple xpath technique for determining if a bit of HTML fragment is a single row, single cell table? I want to convert these into paragraphs. That is: ???<table><tr><td>Foo</td></tr></table>??? => ???<p>Foo</p>???
[15:24:34] mwlang: ericwood: alias :squirt :sqrt :-)
[15:25:08] ericwood: mwlang: do a css selector to find the children and check the length
[15:25:22] ericwood: honestly not an awful use for a SAX parser vs. DOM
[15:27:16] mwlang: ericwood: that???s an idea...
[15:27:41] ericwood: it definitely is
[15:28:17] ericwood: depends on how you want to incorporate this into the greater project
[15:28:36] ericwood: pulling data from only rows that have one child? totes use a SAX parser and run through it real fast
[15:28:41] mwlang: ericwood: yeah???I???m already SAX parsing giant XML documents.
[15:29:11] mwlang: the XML has a <description> for the products which can be HTML formatted fragments.
[15:30:22] mwlang: and it looks like I can just about reliably tell if those descriptions originated from websites using MCE editor, CKEditor, or MS-Word saved as HTML files.
[15:30:52] ericwood: oh fuck I hate dealing with those, they generate the worst markup :o
[15:31:07] ericwood: and if the user pasted in something from Word just give up entirely :|
[15:31:15] mwlang: ericwood: like single celled tables where paragraphs should???ve been?
[15:31:41] ericwood: it adds in serveral hundred lines of markup with formatting info
[15:31:53] mwlang: ericwood: heh???the ms-word ones proved easiest to clean up. It???s mostly just ripping out the attributes and tossing the FONTs
[15:32:07] ericwood: yeah that's true. still hate it tho
[15:32:36] mwlang: oh, and the unwrapping SPANs. (toss the tag, keep the content)
[15:32:45] fschuindt: Guys, my Logger is recieving permission deined to open the file to write, it's because it's running by the system I guess (it's a daemon). Cause when I run by the user "ruby getinfo_pajubot.rb" it goes ok. But when I start the daemon "ruby pajubot start" it gets permission deined. What permisions should I set to my log file?
[15:33:24] ericwood: might want to make the daemon user and file the same group
[15:33:33] ericwood: then make it group-writeable but I am totally not an ops guy
[15:34:18] mwlang: ^^ and yet is totally on the right track???.
[15:34:38] ericwood: even a broken clock is right twice a day
[15:35:07] ericwood: but yeah things like this are basically what unix user groups were invented for
[15:35:09] GaryOak_: ericwood: your answer sounded good to me
[15:35:39] fschuindt: What's the group that runs daemons in unix like systems?
[15:35:56] ericwood: ??\_(???)_/??
[15:36:00] eam: fschuindt: there isn't necessarily one, you'll need to look and see
[15:36:05] ericwood: I fell asleep during that class
[15:36:21] eam: fschuindt: ps -ef|grep pajubot
[15:36:43] zotherstupidguy: is there a way to declare global dependency in a rake file?
[15:37:05] zotherstupidguy: that is to say every task will depend on a certain task?
[15:37:08] GaryOak_: zotherstupidguy: you can just require it
[15:37:26] zotherstupidguy: require it is duplication
[15:37:39] mwlang: zotherstupidguy: you just have to point the various tasks at the other task you want to depend on.
[15:38:06] zotherstupidguy: mwlang is there a way to make this predefined in a rake file
[15:38:10] GaryOak_: ahhh you meant a task dependency
[15:38:14] fschuindt: eam: it sends me a bounch of information about the software, but I cant find the group, I will look deeper, ty
[15:39:46] mwlang: zotherstupidguy: I could be wrong, but I thought by design you have to chain ???em up.
[15:41:04] mwlang: you might be able to do some sort of meta-programming wizardry to tie all the tasks to a specific dependent task, but that???s beyond my expertise.
[15:41:39] mwlang: zotherstupidguy: https://gist.github.com/natritmeyer/5748847 might help
[15:44:29] zotherstupidguy: mwlang thanks, i found somthing interesting here Rake::Task["db:test:special_task_after_prepare"].invoke
[15:44:40] zotherstupidguy: http://www.dan-manges.com/blog/modifying-rake-tasks
[15:44:58] mwlang: zotherstupidguy: yeah, I saw that after posting the above link
[15:47:25] suppp: does anyone know why Webistrano is not being developed anymore ? Are there new alternatives to it ?
[15:49:01] centrx: Web is so 1990s. Everything's on the Moon now
[15:49:25] GaryOak_: suppp: that project hasn't been worked on in 4 years
[15:53:31] GaryOak_: suppp: https://github.com/joelmoss/strano this is only one I could find that is built on capistrano
[15:53:49] GaryOak_: but it's even a couple years old
[15:54:45] suppp: GaryOak_ yea that's why I was asking. I saw the last commit was 4 years ago, I remember it being a good think I don't know why they stoped
[16:02:33] GaryOak_: suppp: Well all the code is there, you could start working on it
[16:15:46] kbarry_: gem list shows me I have 2 versions of a ruby, but when i try to uninstall the older version, it tells me its not installed.
[16:16:01] kbarry_: I tried installing the gem again, and uninstalling, but it still appears in the list.
[16:16:29] kbarry_: I can't seem to get rid of the item from my list.
[16:16:44] Senjai: morning ruby
[16:16:53] havenwood: Senjai: G'mornin
[16:17:14] Senjai: Im in terrible crappy bug ville today
[16:17:59] GaryOak_: awww it'll be ok
[16:18:46] Senjai: Not really
[16:18:59] Senjai: The worst part, is it has nothing to do with my code. I'm just fixing other peoples code :(
[16:20:31] GaryOak_: That's particularly awful in ruby
[16:20:44] Senjai: You can call me chief git revert'r today
[16:23:17] mistnim: hello, can you tell me what is this: ?\e
[16:23:47] ebernhardson: is there any good way to put an idiographic space(\u3000) into a cucumber test in a more explicit way than including the raw character? I'm thinking i could just create my own placeholder and then replace it, but maybe there is a better way?
[16:23:55] havenwood: mistnim: The character literal for Escape.
[16:24:11] havenwood: mistnim: Like: "\e"
[16:24:26] mistnim: havenwood: what you don't need to put in quotes?
[16:24:33] havenwood: >> "\e" == ?\e
[16:24:34] ruboto: havenwood # => true (https://eval.in/351217)
[16:24:42] jhass: >> ?\e.ord
[16:24:43] ruboto: jhass # => 27 (https://eval.in/351218)
[16:24:50] mistnim: this fucks emacs indentation
[16:24:52] ruboto: havenwood # => "\e" (https://eval.in/351219)
[16:25:58] mistnim: thanks havenwood, nobody knows why it mess with emacs indentation?
[16:28:16] mistnim: >> ?\n.ord
[16:28:17] ruboto: mistnim # => 10 (https://eval.in/351220)
[16:33:35] kbarry_: My "gem list" is not accurate. Its listing a gem I have uninstalled..... I checked the system looking for the gem being there, and it is not present. Where can i update the gem list manually?
[16:35:54] GaryOak_: kbarry_: do you mean in a Gemfile, or just on your system?
[16:36:03] adaedra: kbarry_: can be another version
[16:39:29] kbarry_: I mean that when i do "gem list" i see "bundler (1.9.3, 1.1.4) but when i do "gem uninstall bundler -v 1.1.4" i get "gem 'bundler' not present (or soemthing?)
[16:39:42] kbarry_: (The message ones gets when trying to uninstall a non-present gem.)
[16:40:10] kbarry_: as in, "gem uninstall bundler" works (prompts for deletion of the bundler 1.9.3
[16:40:22] kbarry_: i tried reinstalling bundler 1.1.4, and the removing it,
[16:40:28] kbarry_: but its still "in the list"
[16:46:14] havenwood: kbarry_: after `gem uninstall bundler` what shows up for: gem which bundler
[16:47:49] havenwood: kblake: The path to bundler version 1.1.4? Or?: ERROR: Can't find ruby library file or shared library bundler
[16:47:56] havenwood: kblake: sorry, misstell
[16:48:17] jhass: havenwood: still wrong :P
[16:48:29] jhass: kbarry left
[16:48:30] havenwood: I guess this is why seeing part messages can be nice... :P
[16:48:41] jhass: yeah, smart filter ftw^^
[16:48:47] havenwood: I should set it up so I see part if, yeah
[16:50:27] benlieb: how do I test an instance method that should through exceptions of various types (rspec). I'm usign a rescue block in my test and it feels weird.
[16:50:55] benlieb: is there a way to specify how many assertions should run in a test in rspec?
[16:52:40] benlieb: or *expectations*
[16:53:52] havenwood: benlieb: Write tests for your tests. And tests for those too. Which need to be tested. All the way down.
[16:57:50] havenwood: benlieb: Hmm, I've never actually seen the number of asserts be an assertion.
[16:58:37] GaryOak_: benlieb: You can have the test expect for the method to throw an error
[16:59:49] rdark: I have a method that constructs + returns a block (stored as a proc) - however the variables within that block are only evaluated in the scope within which the block is actually called
[17:01:04] rdark: is there a sane way I can populate the variables within that block without evaluating the whole block?
[17:02:32] yxhuvud: rdark: not enough information. Please post your actual code to a pastie with an example of what you want to achieve
[17:02:43] havenwood: benlieb: I'd bet there's a way to get at RSpec's internal count of expectations, but I don't know how. I don't think it's easily exposed. It'd be easier with Minitest. But yeah, I dunno about that route at all. Hrm.
[17:05:37] hackeron: hey, I have a bundler question, I'm running "bundle install" which worked fine on all servers until now, however this time, I am getting: "mv: cannot stat ???/tmp/bundler20150512-25389-m68mobjson-1.8.2/cache/json-1.8.2.gem???: No such file or directory Bundler::GemspecError: Could not read gem at /var/lib/gems/2.2.0/cache/json-1.8.2.gem. It may be corrupted." - I tried rm -R /var/lib/gems/2.2.0/cache and re
[17:05:43] hackeron: -running but I get the same error. Any ...
[17:07:18] GaryOak_: hackeron: could try bundle clean???
[17:08:23] hackeron: here is the full verbose output: https://gist.github.com/hackeron/687adce4862c1a45991b
[17:08:44] hackeron: GaryOak_: says: Cleaning all the gems on your system is dangerous! If you're sure you want to remove every system gem not in this bundle, run `bundle clean --force`.
[17:08:50] rdark: yxhuvud: https://gist.github.com/rdark/7b5eed1ee48c3b08a478
[17:09:33] rdark: it's kind of rough but shows an illustration - basically the instance variables from the class where the proc is constructed are obviously not evaluated within scope of that class, but in the scope where the block gets evaluated
[17:14:20] rdark: I think instance_exec instead of instance_eval might give me what I'm after
[17:14:51] arup_r: why this non-sense error ? https://gist.github.com/aruprakshit/047f5f62f2ef42fedca6
[17:16:08] GaryOak_: hackeron: ohh I've had that issue with the json gem
[17:17:40] hackeron: GaryOak_: oh yeh? - is there a workaround?
[17:17:53] GaryOak_: haha the solution escapes me
[17:19:44] GaryOak_: hackeron: https://github.com/docker-library/official-images/issues/522#issuecomment-76189004
[17:23:29] shevy: Radar, AirStar wants to be unmuted
[17:23:32] shevy: AirStar> shevy: ???> Radar : tell him. release me from mute.
[17:23:32] shevy: <AirStar> 8)
[17:23:32] shevy: <AirStar> shevy: ok?
[17:24:43] maasha: Elegant way to replace initial or all keys in a hash with elements from an array?
[17:25:42] maasha: h = {a: 1, b: 2}; a = [:d, :e] --> h = {d: 1, e: 2}
[17:27:20] mwlang: I???m trying to replace single-column tables with paragraph tags. however, I???m just getting the table contents mashed up in my results (Line #6). What am I doing wrong? https://gist.github.com/mwlang/09ee369e7c8aeb5eecce#file-output-html-L6
[17:28:58] arup_r: >> h = {a: 1, b: 2}; a = [:d, :e] --> h = {d: 1, e: 2} ; h = a.zip(h.values).to_h
[17:28:59] ruboto: arup_r # => /tmp/execpad-fb09bc5c8f9a/source-fb09bc5c8f9a:2: syntax error, unexpected tLAMBEG ...check link for more (https://eval.in/351347)
[17:29:00] mwlang: I figure it???s either that assigning content on line #41 is wrong or how I inject the ???p??? node into the document is worng.
[17:29:13] arup_r: >> h = {a: 1, b: 2}; a = [:d, :e] ; h = {d: 1, e: 2} ; h = a.zip(h.values).to_h
[17:29:14] ruboto: arup_r # => {:d=>1, :e=>2} (https://eval.in/351348)
[17:29:20] arup_r: mwlang: ^^
[17:30:10] maasha: arup_r: thanks, let me test
[17:31:08] arup_r: maasha: it was your question.. I see :D
[17:31:40] mwlang: arup_r: heh???I was like, wtf? for a moment there.
[17:32:04] arup_r: sorry to poke you mwlang : :(
[17:32:07] maasha: arup_r: so if the hash has more keys than there are elements in the array?
[17:32:15] mwlang: no worries!
[17:32:31] maasha: h = {a: 1, b: 2, c: 3}; a = [:d, :e] --> h = {d: 1, e: 2, c: 3}
[17:33:28] arup_r: maasha: wait,,,
[17:34:42] GaryOak_: maasha: you probably just want a for loop
[17:35:13] maasha: GaryOak_: well, the most elegant way actually ;o)
[17:35:19] pipework: Rarely do you actually want a for loop.
[17:35:49] GaryOak_: sometimes you need a for loop
[17:35:54] pipework: Rarely though.
[17:36:00] pipework: Most of the time you need enumerable.
[17:37:00] GaryOak_: If you are needing to loop through multiple enumerables and access them simultaneously, what would you use in ruby?
[17:37:22] pipework: Enumerable.
[17:37:23] crowell: GaryOak_: map?
[17:37:25] GaryOak_: A for loop with an index, or something else?
[17:37:32] pipework: each_with_index if you neec
[17:37:45] GaryOak_: yeah each_with_index would work
[17:37:46] maasha: GaryOak_: trust me, there are clever tricks - that is why I ask here.
[17:38:19] pipework: GaryOak_: The only time you need for is when you want to use the same scope as the caller.
[17:39:15] GaryOak_: pipework: because the enumerable functions are yielding from the block?
[17:39:16] pipework: And by use, I mean that your for loop wouldn't be a closure.
[17:40:26] mwlang: finally figured it out. Needed p.children = cell.children instead of p.content = cell.content
[17:40:28] pipework: GaryOak_: If you introduce any variables within your for loop, they're available to the scope the for loop was called in even after the for loop is finished. That's the only time you want a for loop.
[17:40:43] mwlang: I???m not sure of the finer points on what exactly is different. tho???
[17:42:15] dudedudeman: ACTION wants to kick Postgres in the nuts
[17:42:25] hackeron: GaryOak_: that issue seems different, I don't see a mv: cannot stat ???/tmp/bundler20150512-25426-1gjskp3json-1.8.2/cache/json-1.8.2.gem???: No such file or directory or anything like that?
[17:42:38] GaryOak_: dudedudeman: what's the deal?
[17:43:00] dudedudeman: eh, i'm just a frustrated noob attempting to get it up and running, that's all
[17:43:14] dudedudeman: it's on my machine, i can view the databases in it, but i can't 'createdb blah'
[17:43:29] GaryOak_: ahh yeah, it's got some weird tooling compared to mysql
[17:43:46] dudedudeman: createdb: could not connect to database template1: FATAL: role "ubuntu" does not exist
[17:43:48] dudedudeman: i get that error
[17:45:04] pipework: >> h = {a: 1, b: 2}; a = [:d, :e]; a.each_with_object({}).with_index {|(el, hash), index| hash[el] = h[h.keys[index]] }
[17:45:05] ruboto: pipework # => {:d=>1, :e=>2} (https://eval.in/351399)
[17:45:12] GaryOak_: dudedudeman: you have to specify what user you want to connect as
[17:45:30] GaryOak_: otherwise it just picks the current user
[17:46:38] maasha: pipework: ok. is it elegant? can we golf it?
[17:47:05] pipework: maasha: No. Golf serves no purpose other than mental masturbation.
[17:47:23] pipework: We're playing with primitives here. Feel free to wrap the code into non-primitive objects.
[17:47:27] GaryOak_: Can it dance in a ball gown, is it elegant?
[17:47:48] pipework: GaryOak_: By George, she's got it!
[17:48:11] maasha: pipework: well, I would like to do it efficiently. thanks for the suggestion!
[17:48:48] dudedudeman: GaryOak_: aight, i'm going to dig in to that, then. see what i find
[17:49:12] GaryOak_: dudedudeman: cool, postgres is pretty nice once you get used to it
[17:49:31] dudedudeman: i'm excited. it'll be another thing to add to the toolbelt
[17:49:42] pipework: maasha: Don't worry about efficiency until you've measured the code in a real world application and found where the problem is.
[17:49:52] dudedudeman: i'm mainly just trying to get my little app up to heroku at this point, given that heroku doesn't liek sqlite3
[17:50:00] pipework: dudedudeman: For relational databases, postgres is king.
[17:50:07] pipework: Fuck, it's the whole kingdom.
[17:50:26] dudedudeman: ACTION bows in the presence of greatness
[17:51:08] GaryOak_: dudedudeman: just wait until you get to json operations, makes me warm and fuzzy inside
[17:51:28] dudedudeman: go on... i've been getting to json a little bit, especially looking at api;s?
[17:51:49] maasha: pipework: sure, but I like not to trap myself too easily
[17:52:05] pipework: maasha: Pre-optimization is the root of all evil.
[17:52:19] maasha: pipework: yeah. but nice code saves the day.
[17:52:22] pipework: maasha: http://c2.com/cgi/wiki?PrematureOptimization
[17:52:29] pipework: Nice code isn't optimized code, it's whale-factored code.
[17:53:12] pipework: I'd suggest dropping the primitive obsession and write some classes for the objects and just put the code in there. That way you could have a class that has an instance method called #replace_keys(*new_keys)
[17:54:18] maasha: pipework: That is what I would do if there was no elegant way with primitives.
[17:54:29] pipework: maasha: Look up primitive obsession.
[17:54:38] mwlang: ACTION surprised that nokogiri injects missing tbody???s for tables that don???t have ???em.
[17:55:14] pipework: mwlang: It's not like it matters unless you're iterating though. :D
[17:55:23] pipework: ACTION finds it rather nice.
[17:55:34] maasha: pipework: do I need to go incognito for that?
[17:55:38] mwlang: pipework: which is exactly what I???m doing.
[17:55:52] pipework: mwlang: Aww. That's going to be fun.
[17:55:54] mwlang: pipework: yeah, this reduces complexity of my code.
[17:56:10] mwlang: I don???t have to conditionally select rows on whether it???s present or not.
[17:56:14] pipework: mwlang: If you can just assume the tbody, then it shouldn't be an issue.
[17:56:27] pipework: maasha: Why can't you google it?
[17:56:39] mwlang: pipework: exactly.
[17:57:07] maasha: pipework: I was guessing I would end up with pages of animal porn
[17:57:09] pipework: mwlang: I've had it be a problem because of what I needed to output not matching the input, but other than that, it's been nice.
[17:57:25] maasha: however, that was not the case.
[17:57:28] pipework: maasha: I wouldn't know. You can add qualifying terms.
[17:58:17] mwlang: pipework: what???s caught me off-guard is that when I iterated through the HTML and then spit out the end result, I still had HTML that didn???t have TBODY???s
[17:58:19] GaryOak_: dudedudeman: postgresql has built-in json operators to select and transform data out of json strings or blobs, you put in the db
[17:58:30] pipework: mwlang: huh.
[17:58:41] mwlang: so I couldn???t figure out why my logic wasn???t working until I realized tbody was thrown in the mix.
[17:59:46] dudedudeman: GaryOak_: ooooooooo. that sounds complicated, but would be nice to be able to utilize
[18:00:10] GaryOak_: dudedudeman: it's actually pretty easy and fast
[18:00:12] ebonics: >> Hash[['a','b']]
[18:00:13] ruboto: ebonics # => /tmp/execpad-2bbc3d3beca6/source-2bbc3d3beca6:2: warning: wrong element type String at 0 (expected a ...check link for more (https://eval.in/351438)
[18:00:22] ebonics: >> Hash[*['a','b']]
[18:00:23] ruboto: ebonics # => {"a"=>"b"} (https://eval.in/351439)
[18:00:29] dudedudeman: GaryOak_: what would be a smart way to start looking in to using them?
[18:00:39] dudedudeman: like, what's a good application for something like htat?
[18:01:14] GaryOak_: dudedudeman: If you're storing any kind of JSON data and want to select or filter based on information in the data
[18:01:51] dudedudeman: so i guess if you're like, scraping files, and then pushing that data to a json object, you could just pass that right to the database all in one fell swoop?
[18:02:08] arup_r: I have no idea why args[:db_name] is `nil` after this line https://gist.github.com/aruprakshit/d7f9b5237e63944be881#file-csv-rake-L30
[18:02:26] mwlang: pipework: Nokogiri::HTML("<table><tr><td>Hello").children.children.children.last.to_html
[18:02:26] mwlang: => "<table><tr><td>Hello</td></tr></table>"
[18:02:28] arup_r: what's wrong going on with this `? :` syntac
[18:03:14] weaksauce: p always returns nil arup_r
[18:03:43] weaksauce: ha nevermind I thought it was linewrapping
[18:04:04] arup_r: weaksauce: https://gist.github.com/aruprakshit/d7f9b5237e63944be881#file-csv-rake-L29
[18:04:16] arup_r: I have no clue what's going on there..........
[18:04:50] arup_r: if ternary condition fails.. it must have the value 'event' ... how that's not happening...
[18:05:59] weaksauce: arup_r is the first p statement showing true?
[18:06:08] arup_r: yes......
[18:06:30] arup_r: for debugging I used those lines.. but still no idea where is wrong..
[18:07:10] GaryOak_: dudedudeman: yep It's super nice
[18:07:28] weaksauce: try using a different variable. `db_name = args[:db_name]` and then change the rest of the code to reflect that
[18:07:28] pipework: I'd reject! any blank values in that hash for starters. Then you could just use args[:db_name] ||=
[18:07:31] shevy: is it costly to have lots of @ivars in a class?
[18:07:35] pipework: shevy: Nope.
[18:07:59] pipework: instance variables and locals are cheap. It's what they reference that can get expensive.
[18:08:14] shevy: I think one class that I have here reaches about 30 of them; it's a fairly large code base by now though, rubygems says 214 KB
[18:08:29] shevy: pipework ok
[18:08:31] pipework: That's a fair amount of state for one object.
[18:08:49] arup_r: weaksauce: same i am doing.. lets see
[18:08:59] arup_r: it seems Rake specific stuff
[18:09:52] pipework: arup_r: args.reject! {|(_key, value)| value.blank? }
[18:10:16] pipework: Then just args[:db_name] ||= that_long_ternary
[18:10:57] pipework: You could also use #reject and assign that to a new variable if you don't want to mutate that hash.
[18:11:01] pipework: But it seems you already do anyways.
[18:11:45] arup_r: pipework: and weaksauce : see this line https://gist.github.com/aruprakshit/d7f9b5237e63944be881#file-csv-rake-L31 and output https://gist.github.com/aruprakshit/d7f9b5237e63944be881#file-output-sh-L11
[18:12:01] arup_r: It is Rake not allowing to do.... come on!!!!!!!! :/
[18:12:12] pipework: arup_r: Then you'd know that your ternary seems off.
[18:12:49] pipework: One thing that I'd advise is to stop doing so much work in a rake task. I only call a single object and pass in arguments from rake into that object.
[18:12:52] arup_r: if i print puts db_name before updating args.. it is gving "event" ... correctly
[18:13:00] pipework: That way I can test the object independently
[18:14:30] arup_r: You are true.. but why it is not working.. I am not seeing where I am wrong..
[18:15:28] weaksauce: arup_r you did the opposite of what I asked you to do. use the value of args[:db_name] and mutate the copy of it.
[18:16:18] arup_r: weaksauce: I did.. ` args.merge!(:db_name => db_name) if args[:db_name].blank?`
[18:16:23] arup_r: still same error
[18:17:51] arup_r: weaksauce: got it..
[18:17:51] pipework: arup_r: And you checked the output of the ternary?
[18:18:00] arup_r: http://ruby-doc.org/stdlib-2.2.0.preview1/libdoc/rake/rdoc/Rake/TaskArguments.html don't have `[]=` method
[18:18:06] arup_r: and `merge!` also..
[18:18:28] arup_r: then how to change the value of arg ?
[18:18:47] pipework: arup_r: Don't. Just do what I suggested. Pull all that code out of the task and into a class.
[18:19:33] weaksauce: arup_r if you would have done what I suggested and work on a copy of the args data it would have worked by now
[18:19:42] arup_r: pipework: I am not sure.. what are the parts you want me to pull out ...
[18:19:49] pipework: Everything.
[18:20:11] arup_r: weaksauce: sorry probably I didn't get you then.. could you show me /
[18:20:30] dudedudeman: GaryOak_: if you don't mind me asking, where should i be looking if i'm getting this error on my push to heroku? Invalid DATABASE_URL
[18:21:37] GaryOak_: dudedudeman: http://stackoverflow.com/a/15600720/1305314
[18:21:46] GaryOak_: I don't have any experience using heroku
[18:22:12] dudedudeman: actually, scratch that, it's on my app side. saying i'm getting a fatal error on my user in the actual database?
[18:22:47] GaryOak_: You need to specify the user you want to connect to the database with
[18:23:05] shevy: http://www.monitis.com/blog/2012/02/08/20-ruby-performance-tips/
[18:23:07] GaryOak_: Postgres adds 'postgres' as the default user
[18:23:15] shevy: "5. Use Ruby Enterprise Edition"
[18:23:25] shevy: "Ruby Enterprise edition provides up to 33% lower memory usage. In order to take advantage of these performance gains though you must be sure to program according to their guidelines."
[18:23:44] arup_r: weaksauce: got you..
[18:23:55] shevy: I use wicked black voodoo magic for speed gains
[18:24:04] arup_r: I missed your line.. there
[18:25:02] mwlang: There???s still a REE?
[18:25:17] mwlang: I figured REE enhancements would???ve long ago been merged to MRI
[18:25:23] nvll: afair REE hasn't been maintained since 2012
[18:25:44] mwlang: and last I saw REE was in 1.8.7 land.
[18:26:05] mwlang: (or rather, that was last time I was caring about REE)
[18:26:15] nvll: >Ruby Enterprise Edition has reached End of Life in 2012. The website is still up, and it still works, but it's no longer actively developed and it is no longer supported.
[18:26:18] adaedra: I guess it's not relevent since the interpreter got a big overgaul
[18:26:22] nvll: ??? from theirs website
[18:34:42] weaksauce: arup_r did it work?
[18:35:12] arup_r: weaksauce: yes.. I now got some rails issue with Postgres
[18:35:23] dudedudeman: woo! issues with postgres!
[18:35:31] gizmore: arup_r: try ln -s postgres mysql
[18:36:04] gizmore: never tried this, though... but it might work?
[18:36:17] weaksauce: gizmore you don't want it to be linked to a worse database though
[18:36:23] weaksauce: that's just silly
[18:36:27] gizmore: i just confuse link and target
[18:37:40] weaksauce: mysql is bad and you should feel bad
[18:37:58] arup_r: I got the same issue http://stackoverflow.com/questions/28095568/rangeerror-for-simple-integer-assignment-in-rails-4-2-0-that-should-be-caught-by ... as per their suggested rails vesion it should work......
[18:38:33] arup_r: but in my case the same issue is coming..
[18:38:44] weaksauce: arup_r you should gist the actual error and full stack trace
[18:41:48] arup_r: weaksauce: this column raising the error --- https://gist.github.com/aruprakshit/13065007b706b331a61e#file-shema-rb-L22
[18:43:59] rbennacer: how can i convert a string to a class?
[18:44:14] arup_r: example pls
[18:44:24] rbennacer: "Fixnum".to_class
[18:44:32] dudedudeman: GaryOak_: aight, so my app works locally on postgres....
[18:44:40] rbennacer: or something like that
[18:44:42] dudedudeman: but, when i push it to heroku, nothing
[18:45:19] GaryOak_: the user/pass could be different, hard to tell without an error
[18:45:29] dudedudeman: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico"
[18:45:36] dudedudeman: what sucks, is that's all the heroku logs give me
[18:45:56] weaksauce: arup_r the size of the integer field in postgres is smaller than the value you are trying to put in.
[18:46:05] arup_r: >> Object.const_get "Fixnum"
[18:46:06] ruboto: arup_r # => Fixnum (https://eval.in/351547)
[18:46:15] arup_r: rbennacer: ^^
[18:46:52] arup_r: weaksauce: Yes.. error is saying so.. but latest Rails it got fixed they said.. why then I am getting the error... ?
[18:46:56] dudedudeman: if i was rails, i'd do heroku run rails console
[18:47:04] rbennacer: arup_r: thanks
[18:47:55] weaksauce: arup_r http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-INT
[18:48:02] weaksauce: it's too big for that column type
[18:48:40] weaksauce: 6906673653 > 2147483647
[18:49:26] arup_r: so what is the fix ? any hints with Rails migration...
[18:53:30] arup_r: weaksauce: got it.. I need to use limite: 8 to fix it.. http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html#method-i-column
[18:57:37] mistnim: why is '\e' != "\e"?
[18:57:47] mistnim: >> '\e' != "\e"
[18:57:48] ruboto: mistnim # => true (https://eval.in/351572)
[18:58:01] Eiam: whats "&&=" called?
[18:58:10] Eiam: pain to google
[18:58:54] pipework: Eiam: double ampersand equals
[18:59:00] crowell: Eiam: "symbolhound" is great for searching that kind of stuff
[18:59:23] crowell: http://symbolhound.com/?q=%26%26%3D+operator
[18:59:30] shevy: symbolhound??
[18:59:40] Eiam: (he was right, it worked way better than google)
[19:00:21] shevy: symbolhound to search-for
[19:00:32] shevy: I thought the name was symbolhound for &&=
[19:20:25] shevy: anyone knows why we don't have .blank?
[19:25:37] Hanmac: shevy if we had then there wouldnt be any reason for AS anymore ;P
[19:25:48] mwlang: shevy: blank? comes from Active Support
[19:32:28] hackeron: anyone familiar with bundler? - when I run bundle install, I get mv: cannot stat ???/tmp/bundler20150512-27272-653i37json-1.8.2/cache/json-1.8.2.gem???: No such file or directory -- any ideas why? < here is the full output: https://gist.github.com/hackeron/687adce4862c1a45991b
[19:34:21] adaedra: json is supposed to be in stdlib ._o
[19:34:50] jhass: for everybody's information: this was crossposted to #bundler again
[19:35:08] jhass: er, s/again/a while ago/ was what I wanted to write
[19:36:17] hackeron: jhass: like 2 hours ago
[19:36:45] jhass: it's not forbidden, we just ask to note it
[19:36:50] jhass: see channel rules
[19:37:06] hackeron: I notice if I sudo gem install json, then bundle install gets 1 dependency further, hmm - it's like a permission problem, but isn't bundler supposed to install for the current app?
[19:37:47] jhass: --deployment sets --path vendor/bundle which installs to that directory
[19:37:59] jhass: if neither is set bundler respects GEM_HOME
[19:38:23] jhass: but yeah, stracing it could reveal some permission issues
[19:38:24] hackeron: jhass: $GEM_HOME is blank
[19:38:36] jhass: so where do you expect your gems to go?
[19:39:46] shakar: Hello! Can anyone familiar with Slim templates tell me how to use non-standard html tags? For example, "dom-module"
[19:39:49] atmosx: hello people
[19:40:01] hackeron: jhass: hmm, I don't know, heh - this worked before, so wondering what changed. I thought bundle install would put stuff in the current app's vendor/bundle
[19:40:11] hackeron: (by default)
[19:40:24] jhass: hackeron: it doesn't, I just listed the conditions under which it does
[19:41:50] hackeron: jhass: ah, ok, that's the issue then - adding --deployment made it work. Would be good to have a better error than file not found. Think it's worth filing an issue?
[19:42:19] jhass: I think indirect already told you to file an issue and how
[19:42:29] atmosx: Now if we're talking bodyyyyy
[19:43:03] umgrosscol: hackeron: not really a bundler issue.
[19:43:40] umgrosscol: hackeron: maybe a better or more documentation issue. Perhaps an issue for an faq
[19:44:11] hackeron: jhass: ah, yes, sorry, I saw that, but was still looking for why it works on 1 server, but not on another - I'm still not sure why. I ssh'd to another server, there is no $GEM_HOME set and bundle install works, hmmmm - even though it's the same permissions and ruby is installed from the same brightbox repository
[19:46:02] jhass: cat .bundle/config
[19:46:17] jhass: --deployment is a remembered option
[19:46:19] shevy: hmm what is better...
[19:46:31] jhass: shevy: the third alternative you won't list
[19:46:37] shevy: FileUtils.rm(some_file_here) or File.delete(some_file_here)
[19:46:52] hackeron: jhass: there's no .bundle/config on either server
[19:47:11] jhass: hackeron: I highly doubt that
[19:47:17] jhass: note it's relative to the Gemfile
[19:50:33] hackeron: jhass: ah, I think I figured it out - I had sudo: no under with_items in ansible - so the deployment was running bundle install as root and all the gems are in /var/lib/gems/2.2.0 - so when running as user it already had all the gems available
[19:52:08] hackeron: umgrosscol: yeh, maybe, but saying something like permission failed /var/lib/gems or something would have made it clear, but mv: cannot stat ???/tmp/bundler20150512-27272-653i37json-1.8.2/cache/json-1.8.2.gem???: No such file or directory - seems so random. Where do you think this bug belongs?
[20:00:01] voodookobra: I'm putting together a recommended reading list for application security, and I'd love it if anyone could suggest some resources for Ruby
[20:00:03] voodookobra: https://github.com/paragonie/awesome-appsec
[20:04:47] hackeron: jhass: no wait, that's not it - when I run sudo bundle install, it says bundler should use sudo automatically - is that right?
[20:06:03] hackeron: jhass: hmm, so what is going wrong? - any ideas?
[20:07:04] nateberkopec: Any SSL experts here that can weigh in on https://github.com/getsentry/raven-ruby/issues/331#issuecomment-101399141?
[20:07:30] jhass: hackeron: yeah strace and check for permission errors, find them and open an issue
[20:07:39] nateberkopec: i.e. how can a rubygem that uses SSL deal with users that don't have proper CAs set up
[20:08:19] hackeron: jhass: so would this be an issue with bundler or gem?
[20:08:28] voodookobra: short of shipping your own cacert file and trusting that 100%
[20:08:30] jhass: hackeron: bundler, most likely
[20:08:55] hackeron: jhass: ah, yes, I see that the working server uses Bundler version 1.8.2 and the broken one uses Bundler version 1.9.7
[20:09:40] hackeron: jhass: 1.9.6 works too, hmm
[20:11:45] stephenh: hi, is there an option for ruby to stop accepting options, similar to 'bash -s'? I've looked at the man page but not seeing it
[20:12:04] stephenh: (i would like to pipe a file to ruby and pass options)
[20:14:32] stephenh: tried that sadly
[20:14:37] adaedra: using `ruby -- - [args]` works
[20:14:51] stephenh: it does :) thanks !
[20:15:32] stephenh: ruby - [args] seems to do the trick too, awesome
[20:15:40] stephenh: thanks again !
[20:15:49] umgrosscol: I dunno hackeron, still doesn't seem like a bug to me.
[20:16:28] umgrosscol: Bundler tried to write to a directory that it couldn't write to by the looks of it.
[20:17:52] hackeron: umgrosscol: no, it can write to it because it uses sudo apparently
[20:18:30] umgrosscol: hackeron: It should have prompted you for your sudo pw when it requires sudo
[20:18:55] hackeron: umgrosscol: I have passwordless sudo for that user
[20:20:05] hackeron: umgrosscol: I think maybe it's related to this: https://github.com/bundler/bundler/issues/3641
[20:20:13] umgrosscol: That might be your bug then. In the case of a passwordless sudo, the prompting for sudo fails.
[20:21:07] hackeron: umgrosscol: yep, please downgrading to 1.9.6 fixes the problem
[20:21:53] hackeron: s/please/plus
[20:24:24] umgrosscol: hackeron: does that /tmp... directory exist?
[20:25:25] hackeron: umgrosscol: yes - pretty sure it's the same issue as this: https://github.com/bundler/bundler/issues/3641
[20:25:36] hackeron: umgrosscol: error is the same and it was confirmed
[20:25:56] hackeron: umgrosscol: looks like the bundler team will fix it in the next 1-2 days
[20:26:41] hackeron: umgrosscol: looks like someone beat me to reporting it, heh - was reported an hour ago
[21:05:08] willharrison: anyone know if this cert is in english? http://www.ruby.or.jp/en/certification/examination/
[21:06:10] wallerdev: theres a picture of it if you scroll down
[21:07:00] willharrison: wallerdev do you think it would help to have this if I am just now graduating college with no professional ruby experience?
[21:07:03] willharrison: trying to get a rails job
[21:07:08] wallerdev: where do you live
[21:07:18] wallerdev: do you want to work in florida
[21:07:29] willharrison: orlando specifically
[21:07:33] baweaver: define have to
[21:07:35] wallerdev: you can't move?
[21:07:47] willharrison: personal reasons
[21:07:52] wallerdev: well just look at the job opportunities there and what theyre asking for
[21:08:20] willharrison: but do you think it would help at all to have a certification?
[21:08:20] postmodern: is there a cross-platform way of seeing if a process (by name) is running?
[21:08:23] willharrison: in your opinion
[21:08:25] baweaver: remote positions are not an option until you have at least a good 3-5 years of professional experience
[21:08:29] wallerdev: if you want to work for a big company like insurance or something then they might like certifications
[21:08:34] postmodern: got burned doing `pidof redis-server` since OSX has no pidof
[21:08:40] baweaver: certifications are worthless in most cases
[21:08:46] baweaver: focus instead on learning more programming
[21:08:48] wallerdev: for a startup or smaller company theyll just ask you what you know in interviews and wont care about a certification
[21:09:04] baweaver: ACTION works at a big company and has no certifications
[21:09:23] wallerdev: yeah i worked at an insurance company and they wouldve loved that haha
[21:09:44] wallerdev: but they arent the kind of company to use ruby :p
[21:09:46] bricker: I'm certified in not being a shitty programmer
[21:09:50] bricker: my resume is my certification
[21:10:09] willharrison: yeah, I really just want to get my foot in the door
[21:10:20] baweaver: I'm a certified badass developer
[21:10:35] baweaver: (Build and Deployment Automation Support System :D)
[21:10:38] willharrison: can't find a whole lot of rails jobs in orlando and was hoping this would help me stand out and get interviews a little easier
[21:10:59] wallerdev: i think the problem is more likely being limited to orlando haha
[21:11:30] baweaver: You might want to rethink requiring yourself to stay there
[21:11:35] baweaver: and make sure that's really the case
[21:11:39] wallerdev: i doubt a certification would help, just list some sort of experience, do you have any sites you built in rails? put it on your resume
[21:11:42] willharrison: I have to be there
[21:12:04] baweaver: I'm saying make dead sure, because it'll cripple 98% of your opportunities or more to do so.
[21:12:11] willharrison: I realize that
[21:12:51] willharrison: wallerdev I am new to rails, I have been using laravel and have something with it. I have built a few things with ruby and I am currently working through rails 4 in action
[21:12:55] wallerdev: could contribute to some ruby open source project and put that on your resume
[21:12:58] wallerdev: those are the kinds of things that help you stand out
[21:15:36] wallerdev: if you're new to rails you might want to just apply for other opportunities too just to land something and get experience
[21:15:42] wallerdev: my first job out of college wasnt ruby
[21:15:59] wallerdev: wasnt the most fun thing either but at least i had a job and could be more comfortable in future searches
[21:16:47] wallerdev: if you enjoy ruby you might look for things with python, node.js, or frontend javascript like angularjs
[21:16:59] wallerdev: not quite the same but at least similar enough to learn from
[21:19:22] dudedudeman: willharrison:
[21:19:47] dudedudeman: willharrison: it might be worth checking out and talking to the guys over at codeschool
[21:19:47] willharrison: sorry about that
[21:20:00] dudedudeman: their offices are in orlando, and they seem like nice enough blokes
[21:20:16] willharrison: wallerdev that is a good point, I think I will also look at .net jobs since I had an internship at one
[21:20:27] dudedudeman: also, i grew up in orlando. small world. lol
[21:20:27] adaedra: we're talking ruby jobs?
[21:20:32] willharrison: dudedudeman ah, cool, I didn't realize that. I will check and see if they are hiring
[21:20:55] dudedudeman: i'm looking fory ou now. :)
[21:20:59] wallerdev: c# is a cool language, i used to do that in college a bit
[21:21:13] wallerdev: not quite like ruby but a very well designed language for what it is
[21:21:16] dudedudeman: willharrison: https://www.codeschool.com/jobs
[21:21:18] willharrison: dudedudeman thanks man :) it is a small world lol
[21:21:32] willharrison: wallerdev yeah, I have enjoyed using it when I did
[21:21:52] willharrison: ah .net teacher at codeschool lol
[21:24:40] dudedudeman: also, the codeschool courses are pretty good. i'm signed up for some of them now and enjoy them
[21:25:16] willharrison: I have used them for javascript a little in the past and I enjoyed them
[21:25:19] willharrison: they are good quality
[21:26:10] adaedra: It's paid :/
[21:26:38] dudedudeman: it is. you can sign up for a month and download all of the videos in one shot, but you don't get the challenges associated with t hem :(
[21:27:45] willharrison: tbh I have given up on trying to not pay for things. if it is quality, I don't mind paying vs searching endless hours for something half the equivalent of
[21:28:22] dudedudeman: ah, that's kind of exactly where i ended up. yet, there are still some things i don't pay for, simply because i don't think i've used up all of the resources for the things i'm already paying for
[21:28:49] willharrison: that is true, I do make sure not to pay until I have finished what I have already payed for
[21:29:00] willharrison: eg. not buying a new book until I finish my current one
[21:32:31] willharrison: indeed. books > all
[21:34:03] dudedudeman: i'm on both sides of that coin. if i'm in the middle of a coding session and i need to look something up, keystrokes man, keystrokes. I want to be able to find what i want with keystrokes. BUT, if i have a few hours and i just want to read, i can't read books on a tablet or pc. gimme the real thing
[21:36:44] willharrison: yeah, same. when working its all google. but when I want to relax with a nice cup of tea, have to have the paper books
[21:37:10] dudedudeman: willharrison: it would make me chuckle if we actually knew each other
[21:37:21] willharrison: I don't think we do lol, I am from MS
[21:37:30] willharrison: my better half is from orlando
[21:37:39] mwlang: ACTION reads the screen faster than paper.
[21:38:11] dudedudeman: it's not a bad place to live. don't know how long you've been down there
[21:38:34] willharrison: actually I am still in MS but my lease starts in a week so I am moving there soon
[21:38:47] willharrison: I have to come back here and live with my parents tho while I finish 2 more classes over the summer
[21:39:05] willharrison: I am looking forward to being so near the beach
[21:39:26] dudedudeman: what part of orlando, if you don't mind me asking? depending on where you're at, i'd bet you might be able to visit a few places and talk to some devs
[21:39:32] mwlang: I used to read books all the time???it would take me a while to finish one book (like 3 or 4 weeks)???.then I got a kindle???I finish same sized books on kindles in a week???.no idea what the real difference is other than I???ve been largely a screen reader since the late 80???s.
[21:39:37] willharrison: dudedudeman winter park
[21:39:57] dudedudeman: ayyyy, yeah that's a great area! I grew up in winter springs, which is like right next door
[21:40:04] willharrison: mwlang some people are just built like that I think. I read slow on a screen
[21:40:19] willharrison: dudedudeman ah, awesome. I'm not sure where that is but I am sure I will soon enough
[21:40:48] willharrison: but yeah, it's a really pretty city
[21:40:52] mwlang: willharrison: probably all the 18+ days at the computer coding something from H.S. through college.
[21:41:05] willharrison: mwlang that can do it lol
[21:41:39] dudedudeman: totally, you will. orlando is the home of winters. winter springs, winter garden, winter haven, winter park lol
[21:42:03] willharrison: if you don't mind me asking, where are you located now?
[21:42:23] willharrison: ah awesome, I lived in irving for my internship lol
[21:42:41] willharrison: you and I are on some sort of life path together lol
[21:42:50] dudedudeman: florida is also home to springs altamonte springs, bonita springs, coral springs, defuniak springs, tarpon springs, winter springs, etc...
[21:43:00] dudedudeman: hey! irving isn't far from me at all
[21:43:03] dudedudeman: you had a .net internship?
[21:44:06] willharrison: I feel like you're about to say you work there
[21:44:14] dudedudeman: ha in irving?
[21:44:21] dudedudeman: no, but i've looked in to it. lol
[21:44:34] willharrison: it's a nice area
[21:44:44] dudedudeman: i work one of my jobs downtown, other job on on the weekends is in carrolton, and the third job is in my boxers at home
[21:45:06] dudedudeman: meh. grinding towards my main goal: to be as cool as the dudes in here
[21:45:13] dudedudeman: meaning, a job in development. #oneday
[21:45:18] dudedudeman: yes, i hashtagged. sorry....
[21:45:24] willharrison: oh, you're not a dev? what type of work do you do?
[21:45:44] dudedudeman: dev is the third job. my full time gig is at an animation studio
[21:45:45] adaedra: dudedudeman: be careful what you wish for
[21:45:56] dudedudeman: adaedra: i wish to be you
[21:46:01] adaedra: no you won't
[21:46:14] dudedudeman: psh, i just did. whatchu gonna do 'bout it
[21:46:14] adaedra: you know what I do at work?
[21:46:51] dudedudeman: hey man, you get paid to do it, right?
[21:46:55] mwlang: ACTION falls outta chair
[21:46:55] willharrison: adaedra nothing wrong with some PHP here and there
[21:47:08] willharrison: laravel is a solid framework and I hear the same about symfony
[21:47:13] dudedudeman: ACTION gets mwlang back up and fetches a glass of water
[21:47:17] adaedra: willharrison: ahahah.
[21:47:24] adaedra: I wish I'd do some laravel.
[21:47:27] ericwood: willharrison: are you william harris by chance?
[21:47:36] ericwood: pleaseeeee be him
[21:47:38] willharrison: ericwood afraid not
[21:47:48] ericwood: always wondered what happened to that dude :P
[21:47:57] willharrison: adaedra yeah laravel jobs seem few and far
[21:47:59] baweaver: can we not start a zealatrous blood-rage over this one?
[21:48:11] dudedudeman: sorry, baweaver :(
[21:48:13] adaedra: dudedudeman: you're right, I got paid for it. But it's not the only goal for a job.
[21:48:21] baweaver: Not saying anyone has yet
[21:48:24] baweaver: but it tends to
[21:48:55] baweaver: Realize that a tool is a tool, and very rarely do people have the luxury of rewriting things.
[21:49:33] dudedudeman: adaedra: you're right, you're absolutely right. i can only speak from my perspective, and that is that i desire very much so to be able to snag a dev roll of some sort(ideally, ruby) so i can finally start my career in the software world. currently, i'm working full time in aj ob that has nothing to do with what i want to do long term, so the longer i stay here, the more experience i'm wasting
[21:49:44] dorei: some tools are beautiful, some tools are ugly though
[21:50:08] baweaver: Sometimes, and however unfortunately, you have to make do with said tools
[21:50:25] baweaver: which is why RPG and COBOL are still a thing ;)
[21:50:29] adaedra: but it doesn't mean you can't look at using better tools
[21:50:41] dorei: cobol = job security xD
[21:50:42] willharrison: adaedra what type of php do you do?
[21:50:56] adaedra: willharrison: what do you mean, what type
[21:51:11] willharrison: like do you do drupal stuff or cake or something?
[21:51:11] baweaver: I know both of those languages unfortunatelly
[21:51:31] dudedudeman: hey! i got to look at some COBOL the other day! that was kind of interesting
[21:51:34] willharrison: or just pure php?
[21:51:39] adaedra: willharrison: pure.
[21:51:45] adaedra: some external libs
[21:51:47] willharrison: baweaver never met anyone who knew RPG lol
[21:51:53] dorei: i think there are modern versions of cobol, like oo cobol
[21:52:00] willharrison: dorei yeah there are
[21:52:03] baweaver: I would not suggest it myself
[21:52:15] willharrison: good, I didn't want you to :P
[21:52:22] baweaver: There are a handful of languages which I will absolutely refuse to use anymore
[21:52:23] willharrison: adaedra ah I see
[21:52:53] baweaver: Among those are RPG, COBOL, MUMS, and the one to often times get me in trouble: Java
[21:53:08] dorei: baweaver: did your rpg programms run on machines that used token rings instead of ethernet? :D
[21:53:24] baweaver: Nope, standard AS/400s
[21:53:39] baweaver: ethernet based, though there were still Tokenring adapters around
[21:53:51] adaedra: Those were different times
[21:53:54] willharrison: well this has been a fun conversation but I have to head out
[21:54:04] dudedudeman: willharrison: best of luck!
[21:54:06] dudedudeman: come back and visit!
[21:54:12] adaedra: Now I pass the token to baweaver
[21:54:13] willharrison: thanks and will do
[21:55:11] baweaver: Local college was effectively bought by RPG companies
[21:55:28] adaedra: baweaver: actually, didn't want to start a war over it or anything. Just, this internship in PHP made me realize I don't want to do it for a job.
[21:56:27] baweaver: You didn't start a war over it
[21:56:43] baweaver: I'm just saying it tends to go that way right fast for some reason, so I was preempting it
[21:56:46] adaedra: you were asking not to :)
[21:58:05] baweaver: Some people that read PHP go into foaming mouth mode and start a huge rant over it
[21:58:33] dudedudeman: i have a friend who is a PHP/laravel guy in NYC, and he loves it. he gets really excited about it
[22:00:15] adaedra: Now that's a big town :)
[22:00:26] shevy: as is Paris
[22:00:36] dudedudeman: it's not small, that's for sure
[22:00:37] shevy: but Paris has more baguette
[22:00:55] shevy: what do you eat in NYC typically?
[22:00:58] adaedra: Here he goes again
[22:01:11] dudedudeman: i mean, anything yo uwant, because there is literally EVERYTHING there
[22:02:40] adaedra: dudedudeman: /typically/
[22:02:55] adaedra: isn't Hot Dogs the NYC speciality?
[22:03:13] dudedudeman: well, yes, but chicago might like a word with them about that
[22:03:19] dudedudeman: pizza is the HUGE huge thing in NYC
[22:03:23] adaedra: /nick shevy2
[22:03:32] dudedudeman: those damn bagels man.... (*&%
[22:04:02] dudedudeman: are you going ot NYC any time soon?
[22:04:42] adaedra: I don't really want to go to the US. :x
[22:06:36] dudedudeman: eh, it's not as bad as the media makes it
[22:06:38] dudedudeman: some of us are ok
[22:06:42] toretore: they stick their fingers up your butt before letting you in
[22:06:42] dudedudeman: me, no. the others, yes
[22:06:53] dudedudeman: toretore is wrong
[22:06:58] dudedudeman: they stick TWO fingers up the butt
[22:07:34] adaedra: yeah, let's stay in Europe, it seems a good plan, adaedra
[22:07:57] zenspider: I ate a lot of cubanos, arepas, tortas, tortilla soup in NYC. Plenty of asian and italian too.
[22:09:50] dudedudeman: mmmmm. cubanos
[22:10:12] adaedra: he'd eat that
[22:10:22] jmignault: pizza is everywhere, cheap, and sold by the slice. Good for quick eats.
[22:10:22] dudedudeman: i'd put that in my mouth and chew it
[22:11:15] dudedudeman: so much pizza
[22:11:16] adaedra: now this is something I'd like to have
[22:11:35] adaedra: (well, depending on your definition of 'cheap' :p )
[22:12:50] jmignault: Hot dogs are not the big production they are in Chicago. They're sold from carts and they're usually just topped with mustard and sometimes onion in tomato sauce.
[22:13:01] jmignault: aka "dirty water dogs"
[22:16:34] GaryOak_: everyone is talking about pizza and hotdogs in here!
[22:17:51] adaedra: Hello Gary
[22:18:28] dudedudeman: oh.. uh... #ruby. right. umm, hi i'm dudedudeman and i'm working on a gem regarding pizza and hotdogs?
[22:18:52] GaryOak_: hahaha excellent
[22:18:55] adaedra: dudedudeman.credibility => 0
[22:19:18] GaryOak_: hey everyone check out my gem pizza_n_hotdogs
[22:19:28] dudedudeman: hey! I came up with that idea!
[22:19:57] dudedudeman: >> dudedudeman = %w[pizza hotdogs fullofit]
[22:19:59] ruboto: dudedudeman # => ["pizza", "hotdogs", "fullofit"] (https://eval.in/352034)
[22:20:42] adaedra: require 'pizza'; require 'hotdogs'
[22:24:02] mwlang: heh???NYC is pizza, Chicago is hot dogs. Philly is Cheesesteaks. Memphis is ribs, Texas is brisket bbq or tex mex (depending on who ya talk to), The Carolinas is BBQ pork, one mustard sauce, the other tomato sauce.
[22:26:31] dudedudeman: mwlang: i love you.
[22:26:40] dudedudeman: you know what speaks to me. which, is all of those things
[22:27:02] mwlang: :-S lay off the sauce, dude.
[22:27:31] dudedudeman: ah, did i say that out loud... :/
[22:28:12] mwlang: dudedudeman: all I know is I know where to find the good food in town(s).
[22:28:29] dudedudeman: it's the best thing to kno
[22:28:30] mwlang: and if I???m in a new town and don???t know, I find the local micro brewery.
[22:28:43] dudedudeman: if you're ever in dallas, i got a list of about 300 different places for you to go to
[22:29:11] mwlang: dudedudeman: I drove straight through Dallas, clear across Texas last Feb.
[22:29:39] dudedudeman: it's a cool city. totally different than say, austin, but both very texas
[22:30:50] mwlang: dudedudeman: lemme tell ya. The best new thing I discovered was pool con Salsa Verde. That stuff was da bomb.
[22:31:00] GaryOak_: I flew over Texas, and was like that's enough
[22:31:19] adaedra: Bye, 'MURRICA
[22:31:20] mwlang: dudedudeman: I only know Austin and San Antonio where my Aunt and cousins live.
[22:31:38] dudedudeman: ah, those are both great places
[22:31:51] mwlang: GaryOak_: Did you see the big areal signs that said???.???Don???t mess with Texas??? ?
[22:31:53] dudedudeman: if you like hot sauce, texas is where it's at
[22:32:03] dudedudeman: don't messwith texas is a thing. they're weird here
[22:32:56] mwlang: dudedudeman: oh, yeah???I had my first encounter with ghost pepper on my drive through Tx in Feb???.that???s one hot pepper???.and in a very unique, delayed onset way, too.
[22:33:30] dudedudeman: i just bought some ghost pepper blueberry hot sauce, and it's delicious
[22:33:49] dudedudeman: but for some odd reason, they add a metric (&#$ ton of black pepper to it as well
[22:33:54] dudedudeman: so it actually makes it milder than it coudl be
[22:33:58] dudedudeman: at least to my tongue
[22:34:26] mwlang: dudedudeman: ghost pepper beef jerky.
[22:35:22] mwlang: dudedudeman: got it at a gas stop???ate a piece, went back in and cleared the rack. :-)
[22:35:34] dudedudeman: ha. that's what i'm talking about
[22:35:39] dudedudeman: buc-ee's by any chance?
[22:35:51] mwlang: dudedudeman: no clue.
[22:36:09] mwlang: it???s all gone, so I don???t have a reference.
[22:36:21] mwlang: but show me a website???maybe I???ll recognize the logo
[22:36:24] dudedudeman: they're a big chain of gas stations in texas and have a huge selectio nof in house made beef jerky
[22:36:36] dudedudeman: https://www.buc-ees.com/index.php
[22:36:43] dudedudeman: (ewww, php :P)
[22:37:59] mwlang: there weren???t no chipmunk on the packaging.
[22:38:15] dudedudeman: we take offense to that
[22:38:17] dudedudeman: just kidding.
[22:38:46] mwlang: dudedudeman: well, you???ll have to drive clear across Texas and three more states to take it up with me. :-)
[22:39:04] mwlang: and I know from experience, that ain???t no joy ride.
[22:39:32] dudedudeman: ha. work did that to me once. they flew me out to LA to pick up a piece of gear, and rented me a car to drive immediately back to dallas
[22:39:47] mwlang: why is there a beaver mascot in Tx anyhow? There ain???t enough rivers and lakes there.
[22:40:09] dudedudeman: no effing clue. we're weird, man
[22:40:22] dudedudeman: aight, i'm out. time to go to my local ruby meet up for hte night!
[22:40:25] dudedudeman: you guys are awesome
[22:40:36] ellisTAA: do you think someone should learn about computers before they learn how to program or do you think they should learn how to program before they learn about computers? why?
[22:41:21] GaryOak_: EllisTAA: it depends what they want to learn first
[22:41:31] ellisTAA: garyoak_: how to program
[22:41:48] GaryOak_: Then learn how to program and then about the computer
[22:41:55] mwlang: EllisTAA: both at the same time.
[22:43:44] ellisTAA: i was thinking ppl who learn how to program before they learn about computers develop a syntax POV where they think about ???how to write the syntax??? and a person learning about computers might have more of a computer POV where they write the code thinking about how the computer will interpret it instead of is the syntax right
[22:43:55] ellisTAA: i???m in a bootcamp so i was reflecting on my experience
[22:45:16] mwlang: EllisTAA: Interesting observation. However, one doesn???t really learn to think about how a computer interprets the program until you start thinking about system-level stuff.
[22:45:17] GaryOak_: At the level of ruby, it doesn't really matter how the computer works
[22:45:24] shevy: ruby was written for people
[22:45:44] GaryOak_: Once you start using pointers, or doing memory management, you need to understand what's actually going on
[22:45:50] shevy: the next evolutionary step will be to tell the computer what code is to be produced, without having to type
[22:46:01] ellisTAA: garyoak_: when would u start using pointers etc
[22:46:10] GaryOak_: Do most people understand how scheduling, or CPU pipelining work?
[22:46:17] shevy: I understand nothing
[22:46:20] ellisTAA: shevy: do u know that for a fact? are people developing those languages?
[22:46:38] shevy: EllisTAA don't think it is possible with the current computers
[22:46:40] GaryOak_: EllisTAA: Once you use a language that requires you to do that, like C or something lower level
[22:46:43] mwlang: ???or optimizations or algorithmic proofs
[22:46:50] shevy: they were designed to make use of 0 and 1, nothing more
[22:47:16] GaryOak_: at incomprehensible speeds
[22:47:34] shevy: I'd wish ruby would be faster!
[22:47:49] GaryOak_: Use crystal
[22:47:49] ellisTAA: i just want to level up ^^
[22:47:53] mwlang: A a microprocessor does three things: fetch, interpret and execute. and about the only thing it really does is add.
[22:48:40] GaryOak_: a modern CPU does lots and lots of different things, that the programmer would never know about
[22:49:33] shevy: GaryOak_ I am seriously contemplating that now
[22:49:46] shevy: my pseudo-shell takes about 3 seconds to load up. I have no idea where the bottleneck is yet but it annoys me
[22:50:52] mwlang: I don???t think most programmers ever really start to think about what the computer is actually doing until they take three classes: OS design, Compiler design, and Systems IO. Then they still don???t get dirty until they take circuit design, microprocesser programming, and assembler.
[22:51:26] shevy: sounds like lots of hours investment there
[22:51:32] dorei: mwlang: maybe they should learn C insteard :p
[22:51:35] dorei: instead even
[22:51:37] ellisTAA: MWLANG: COOL ill check those out
[22:52:14] GaryOak_: shevy: Well Ruby is like Hardware -> Binary -> Hex -> ASM -> C -> Ruby VM -> Ruby Code
[22:52:20] GaryOak_: and I probably missed a bunch
[22:52:45] shevy: GaryOak_ yeah
[22:52:53] shevy: Hardware -> Binary -> Hex -> ASM -> C -> Ruby VM -> Poetry -> Ruby Code
[22:53:04] ellisTAA: what are you guys syaing? binary, hex, asm?
[22:53:11] shevy: I am not saying anything
[22:53:16] shevy: I am just copy pasting what GaryOak_ wrote
[22:53:44] GaryOak_: I'm saying that's what happens to your code for it to get executed by the CPU
[22:54:02] xxneolithicxx: stop pls, you guys are bringing back the horror of college and having to write buffer exploit in assembly
[22:54:04] mwlang: shevy: yeah. I started with GW-BASIC, then Pascal, then Assembler, then C, and a few random languages until Delphi for Windows development followed by a switch back to C and on to Python on my way to Ruby???.so, yeah, lotta time and languages in between then and now.
[22:54:14] shevy: whoa that's a lot
[22:54:19] dorei: hex / binary is just different representation of the same thing
[22:54:23] shevy: my list is much much shorter... perl php ruby. end of list
[22:54:38] mwlang: xxneolithicxx: heh???.we wrote a checkers game in assembler???I???d say you got off easy.
[22:54:56] xxneolithicxx: mwlang: id take checkers
[22:54:59] shevy: you guys know MenuetOS?
[22:55:04] dorei: shevy: u're ready for C :)
[22:55:12] shevy: http://www.menuetos.net/
[22:55:17] shevy: dorei I don't know :(
[22:55:25] shevy: I'd love to have something like ruby with the speed of C
[22:55:42] Ropeney: your always ready for c
[22:55:51] dorei: u cant have both beauty and speed :p
[22:55:54] shevy: dorei I decided to maintain bluefish-1.0.7 though - better than switching an editor :P
[22:55:56] eam: shevy: "like ruby" in what way?
[22:56:04] mwlang: shevy: heard of it, but never touched
[22:56:06] shevy: eam syntax primarily; philosophy secondary
[22:56:11] eam: just #include <ruby.h>
[22:56:18] havenwood: shevy: And how does this lang differ from Crystal?
[22:56:28] mwlang: shevy: Rust
[22:56:37] shevy: havenwood I have no real idea about crystal
[22:56:46] shevy: the only examples I saw was that they were close to ruby
[22:57:03] shevy: eam yeah but this is C then
[22:57:09] eam: shevy: well, yeah
[22:57:35] shevy: I guess C was the most successful programming language
[22:57:58] mwlang: shevy: would not have *nix without C
[22:58:34] pipework: All the things that might have been are rather hard to enumerate.
[22:58:43] pipework: You could totally have Unix without C.
[22:58:51] shevy: yeah the C++ guys, what OS did they give rise to? windows?
[22:59:01] pipework: You couldn't have C without C though.
[22:59:09] Ropeney: windows is still mostly c
[22:59:18] mwlang: pipework: I just meant unix was written in C
[22:59:38] pipework: renix or whatever is rust unix implementation.
[23:00:52] shevy: hmm I thought windows was C++
[23:00:57] shevy: now I wonder what C++ achieved
[23:01:16] Ropeney: its still very difficult to write windows drivers in c++
[23:01:25] Ropeney: you get a 'subset' of c++ to do it
[23:02:10] mwlang: C++ achieved notary for nothing. :-) Actually, I think it???s biggest success was the Gnome window manager, but I could be wrong on that.
[23:03:21] Ropeney: gnome is still awesome for large applications that benefit from abstraction
[23:03:27] Ropeney: c++ rather
[23:05:17] havenwood: People seem to like this latest version of C++ called Go.
[23:05:18] mwlang: I think C++ mostly had the reputation that it added complexity to a language that didn???t need it. Seems like there were lots of ???wars??? back in the day that if a C++ developer claimed they could do something C couldn???t, the C guys showed ???em up every time and with a more performant solution to boot.
[23:05:31] shevy: mwlang except that gnome is written in C
[23:06:14] shevy: well, there are some examples of C++ being successful
[23:06:26] shevy: qt/kde, several 3D engines like crystalspace and ogre3d... some games
[23:06:48] havenwood: shevy: Rubinius
[23:06:50] mwlang: http://www.stroustrup.com/applications.html
[23:07:01] Ropeney: nmap is c++ now
[23:07:08] shevy: oh yeah... boost
[23:07:45] Ropeney: thats cheating
[23:08:11] GaryOak_: The Source engine
[23:08:18] GaryOak_: Lots of game engines
[23:08:38] shevy: boost is really huge
[23:08:45] mwlang: I have always preferred C over C++ even though I???m an OO guy at heart. C++ was just, well, cumbersome for no good reason at the end of the day.
[23:08:49] shevy: boost-1.56.0.tar.xz: 86M
[23:09:07] shevy: they really should not have written a new language
[23:09:13] shevy: add the OO-related functionality to C
[23:09:20] mwlang: shevy: and that???s a nuther thing, come to think of it???c++ object files were always huge compared to C's.
[23:10:04] havenwood: shevy: Ruby is a much smaller library for C than Boost is for C++?
[23:10:19] GaryOak_: as much as C++ is talked about, I don't know anything about it, it was my first language from a book when I was 16
[23:10:41] GaryOak_: on the Bloodshed Dev C++ Compiler
[23:10:47] eam: shevy: boost is even bigger after you compile it ...
[23:10:49] havenwood: GaryOak_: Borland C++ \o/
[23:11:05] GaryOak_: havenwood: :)
[23:11:16] GaryOak_: oh the memory errors
[23:11:55] Ropeney: shevy: no dont add 00 to c
[23:11:55] mwlang: Borland C++ Builder, to be precise. :-)
[23:11:56] eam: C++ marries the safety of a low level language with the structural complexity of a high level language
[23:12:37] eam: shevy: not kidding btw
[23:12:52] mwlang: ???safety of a low level language??????.what the heck is that!?
[23:13:10] havenwood: mwlang: Dangling pointers and buffer overflows.
[23:13:20] eam: boost in compiled form is around a gig or two, depending on if you have MT/non-MT
[23:13:26] eam: mwlang: that's the joke
[23:13:47] eam: it's the intersection of all undesirable things
[23:14:02] mwlang: eam: I was like, ???if somebody actually advertised that, they???re really drinkin??? the koolaid"
[23:16:08] mwlang: all I know is I like having curb-side garbage collector I almost never see nor have to put the trash out to the curb myself.
[23:18:34] eam: mwlang: dunno, I kinda don't like it when the garbagemen evict everyone from the city periodically while they do their trash runs
[23:18:52] eam: I'd rather put the trash on the curb, personally, and just have a system that makes sure no one litters
[23:23:00] cosmicfires: how do I cast a string to an integer in rugy?
[23:23:33] drocsid: Is the discussion in this article still relevant? http://tech.natemurray.com/2007/03/ruby-shell-commands.html
[23:24:20] pipework: cosmicfires: Has google failed you?
[23:24:29] cosmicfires: no I was too lazy
[23:24:51] drocsid: I.E. do backticks now return stdout stderr, etc?
[23:24:52] pipework: That's unfortunate. Perhaps someone here is in a mood to service your laziness.
[23:25:12] cosmicfires: if I use .to_i I get this error
[23:25:16] cosmicfires: ./time_example_1.rb:56:in `+': can't convert String into an exact number (TypeError)
[23:25:58] drocsid: do I still need to use popen4 to get exit status and STDERR or whatever it says in the article, or is that included somewhere in the standard library
[23:29:52] shevy: drocsid `` will only return the result from that external command being run
[23:29:53] bricker: drocsid: the article explains how you can get exit status, stderr can be captured by routing it to stdout
[23:30:14] shevy: result = `ls` will for instance yield you a String with \n newlines
[23:31:06] shevy: you can try to capture more of course via `` too
[23:31:09] shevy: result = `ls 2>&1`
[23:31:37] shevy: I think I use the above for programs that may not exist on some other machine
[23:32:37] havenwood: drocsid: Does stdlib Open3 suffice for what you're doing?
[23:33:32] havenwood: drocsid: it has stdout and stderr streams merged or separate and a wait thread for exit status
[23:36:24] havenwood: drocsid: But to answer your question, no it's no longer relevant. All supported Rubies have an Open3 that supports exit status.
[23:36:38] havenwood: 1.8 is dead!
[23:36:46] mwlang: long live 1.8
[23:40:58] drocsid: can I import a ruby program into irb? if so, how?
[23:41:03] shevy: the last non-encoding ruby!
[23:41:15] shevy: drocsid you can use load() and require()
[23:41:16] drocsid: just import '/path/to/rubyfile.rb' ?
[23:41:21] shevy: we have no import
[23:41:25] shevy: are you from python :)
[23:41:36] drocsid: i used python before this way
[23:41:45] shevy: shshs Shshs hsshshs
[23:41:50] drocsid: load '/path/to/rubyfile.rb' ?
[23:42:14] shevy: the above, try: require_relative rather than load
[23:42:19] shevy: if it is a gem, then this will work:
[23:42:22] shevy: require 'name_of_gem'
[23:42:34] pipework: drocsid: require and load are your options. They should have ample information in google if you should be so inclined.
[23:42:40] shevy: you load from the PATH
[23:42:58] shevy: I think it is ... $! or so
[23:43:04] shevy: >> $LOAD_PATH
[23:43:06] ruboto: shevy # => ["/execpad/interpreters/ruby-2.2.0/lib/ruby/site_ruby/2.2.0", "/execpad/interpreters/ruby-2.2.0/lib/ ...check link for more (https://eval.in/352190)
[23:43:15] pipework: $: actually
[23:43:15] shevy: drocsid yeah I think it is $LOAD_PATH
[23:43:25] shevy: I can never remember those weird short $ cuts
[23:45:08] GaryOak_: gosh the sequel gem is just so excellent
[23:47:43] mwlang: mistergibson: +1
[23:47:57] Radar: shevy: hi
[23:48:03] Radar: shevy: Did you see my memoserv message?
[23:49:30] mwlang: I use sequel when I have to push large volumes of data around. It???ll do the job just about as fast as Ruby is gonna do it.
[23:49:52] pipework: Mmm, I'm a fan of the sequel, but just haven't done enough with it to engage in a debate about its merits.
[23:50:41] GaryOak_: the docs are awesome, and you can read the code when you need to, and there is DBMS specific support
[23:51:05] mwlang: the number one merit, IMHO, is large, complex SQL written entirely in Ruby.
[23:51:25] mistergibson: mwlang: I agree - it makes sql truly easy
[23:51:47] mistergibson: and you can always DB.run("") straight raw sql if you have to
[23:53:02] mwlang: mistergibson: yeah, that actually made it easy to start using Sequel until I learned it well enough to write the whole thing in Ruby
[23:53:29] pipework: I can generally accomplish the same in activerecord world.
[23:53:36] pipework: But I fundamentally disagree with it so much.
[23:54:27] mwlang: pipework: what about a query like this? https://gist.github.com/mwlang/a4b77f557dd0bb216e75
[23:55:28] pipework: mwlang: Some of it would likely be strings, but a lot of the methods, the ones on the first level of indentation, are all supported.
[23:55:33] pipework: I don't know about case or as.
[23:55:55] pipework: Those would likely be strings, but you have some strings of partially valid SQL statements in your code.
[23:56:32] mwlang: pipework: yeah, I had to drop to strings as I did on lines 15 and 16???or rather, I just had to get it done so I did it the fastest way I could to finish it.
[23:56:49] mwlang: but that???s what makes Sequel shine in my book.
[23:57:48] data-cat: Noob here, what is the difference between the variables `foo` and `@foo`? I haven't been able to google this properly.
[23:58:15] pipework: data-cat: one might be a local and the other is an instance variable, most likely.
[23:58:26] mwlang: data-cat: google ruby variable scopes
[23:58:30] pipework: data-cat: Assuming the simplest case, the first is a local variable, the other is an instance variable.
[23:58:55] pipework: That should be enough to go search for more info. I would suggest any of the ruby primer-style resources.
[23:59:30] shevy: Radar not sure what memoserv is, but I think you may refer to a message in regards to the guy that was banned for trolling?
[23:59:44] pipework: shevy: /msg memoserv help
[23:59:50] Radar: shevy: yes
[23:59:59] Radar: shevy: I am not unbanning AirStar.