« Back to channel list

#ruby - 13 May 2015

« Back 1 day Forward 1 day »
[00:00:01] pipework: It's a service like nickserv and chanserv.
[00:00:11] data-cat: Thanks, is helpful.
[00:00:21] pipework: Doesn't freenode clear banlists every april 1st?
[00:00:22] Radar: People who waste their time of people in this channel are not welcome.
[00:00:27] mwlang: heh. what did he do?
[00:00:43] Radar: http://logs.ryanbigg.com/p/AirStar
[00:01:12] Radar: I mastered Ruby, I leave here now" and then continued to pester the channel.
[00:01:21] pipework: Certainly a seemingly annoying personality.
[00:01:35] pipework: Masterful ejection, I must say.
[00:02:34] mwlang: Radar: nice logger
[00:02:39] Radar: mwlang: thanks :)
[00:03:33] mwlang: I see by your logs I???m talking entirely too much this week and working not entirely enough.
[00:04:10] shevy: you are a big chatter
[00:04:42] mwlang: shevy: yeah???avoiding some grunt work.
[00:05:18] mwlang: ok, now that that???s out in the open, I???m gonna get it done.
[00:07:04] mwlang: speaking of which???is it possible to fork ruby processes (not just thread ???em) so that each process can hit any of the cpu-cores? MRI Ruby 2.2
[00:07:22] Radar: infinitone: hello
[00:07:39] drocsid: if I have a block
[00:08:07] pipework: drocsid: You may want to put your whole question on one line, and failing that, try a gist.
[00:08:38] mwlang: pipework: his block is writer???s block...
[00:08:41] drocsid: I want to use backticks with the block variable
[00:08:47] drocsid: how do I do it?
[00:09:10] pipework: drocsid: You might want to explain what you're doing more fully. But try system
[00:09:12] mistergibson: mwlang: might look into celluloid
[00:09:39] drocsid: {|variable| `/path/to/some/command --arg1 variable`}
[00:09:54] Radar: drocsid: Did you try variable interpolation?
[00:10:34] drocsid: Radar: is that the same as string interpolation?
[00:11:13] drocsid: wasn't sure if there was a special symbol to use for the block variable
[00:11:40] Senjai: drocsid: {|variable| `/path/to/some/command --arg1 #{variable}`}
[00:11:48] Senjai: I think interpolation can be used in backticks
[00:11:55] Encapsulation: can you do anything with ruby
[00:12:02] Senjai: Encapsulation: yes
[00:12:26] Radar: drocsid: try it and find out :)
[00:12:40] Encapsulation: https://github.com/jwhitehorn/pi_piper wtf?
[00:12:43] mwlang: mistergibson: I???m digging through them thar docs now???It might be the trick I need???I was actually just thinking to fork and run rake task passing commandline argument???but if I can just spin up cells and that???ll span CPU cores, then that???s good, too.
[00:12:50] Encapsulation: is it really that easy to have concurrency
[00:12:56] Encapsulation: how does threading work
[00:13:21] zenspider: no. you can't do anything with ruby. you should use python.
[00:13:30] Encapsulation: thats what I was wondering
[00:13:33] Encapsulation: I'm deciding between the two
[00:13:35] mwlang: Encapsulation: the answer to that question is different, depending on what version of Ruby you???re using.
[00:13:36] Encapsulation: coming from c++
[00:13:47] Encapsulation: I'd like to develop software for the pi
[00:14:57] Encapsulation: zenspider, what are some reasons I might choose python over ruby?
[00:15:13] Encapsulation: is ruby a "web language?
[00:15:33] mozzarella: have you never heard of ruby on rails?
[00:15:34] Encapsulation: I read about ruby and see rails, but there is more to it
[00:15:42] Encapsulation: I have but what about normal ruby
[00:15:46] havenwood: Encapsulation: Do you prefer blackberry cobbler or strawberry rhubarb pie?
[00:15:53] zenspider: Encapsulation: so we can avoid more questions like "can you do anything with ruby"
[00:16:03] Encapsulation: havenwood, blackberry cobbler by far
[00:16:05] zenspider: blackberry. no question
[00:16:14] havenwood: Encapsulation: The eat that!
[00:16:55] awwaiid: Encapsulation: one really fun thing on the pi done in ruby is Sonic Pi
[00:18:15] Encapsulation: awwaiid, thank you. this is excellent
[00:19:04] awwaiid: ya, it's pretty fun. It is both written in ruby and you implement the sound generation in ruby -- it is basically a sound-generation IDE
[01:11:57] TheNet: was ruby-lang.org redesigned?
[01:14:25] pontiki: looks like
[01:15:33] sevenseacat: that was done a while ago
[01:15:46] pontiki: shows how often i go there :)
[01:18:55] pontiki: man, ruby.com goes to kay jewelers :P
[02:54:18] akurilin: question: can i both pipe something into a ruby script's stdin and pass an argument into it?
[02:54:34] akurilin: looks like ARGF isn't too fond of that
[02:55:41] ebonics: akurilin, why not?
[02:57:25] akurilin: ebonics: looks like argf also contains the arguments instead of just stdin
[02:57:36] akurilin: e.g. cat foo.txt > ./myscript 1 2 3
[02:57:47] akurilin: supposed to be a pipe :)
[02:58:19] ebonics: oh you mean from command line
[02:59:14] ebonics: cat blah.txt | ruby app.rb arg1 arg2
[03:00:06] akurilin: I already have /usr/bin/env ruby inside the script so it's the same
[03:00:09] akurilin: at least I hope :|
[03:01:03] ebonics: i dont understand why there would be an issue
[03:01:04] akurilin: Oh looks like I need to shift ARGV or ARGF will still contain the first argument
[03:02:45] akurilin: Got it, thank you
[03:43:22] st1gma: anybody with some sinatra experience? What would be the best way of terminating a session when a user logs in and provide them with a new authenticated session?
[03:49:23] Encapsulation: is ruby better than emerald
[03:50:01] Radar: Encapsulation: Certainly.
[03:50:25] Encapsulation: are there any major limitations or could I use ruby to develop a full application
[03:50:36] Radar: "Full application" is very vague.
[03:50:46] mwlang: Encapsulation: still asking language questions? I suggest googling ???comparison of programming languages??? and start reading if you want in-depth treatment on the topic.
[03:50:53] Encapsulation: embedded control software for a hwardware device
[03:51:07] Encapsulation: mwlang, I'm doing a bit of that as well
[03:51:12] Encapsulation: trying to pull info from all sources
[03:51:22] Radar: Encapsulation: And what is Emerald anyway?
[03:51:31] Encapsulation: another language
[03:51:47] Encapsulation: http://en.wikipedia.org/wiki/Emerald_%28programming_language%29
[03:51:58] Radar: You can't seriously be looking at that as an alterantive.
[03:52:05] Radar: Can you please not troll in here?
[03:52:12] Radar: It doesn't go well for those who troll.
[03:52:45] Encapsulation: it doesnt say much about it
[03:52:52] Encapsulation: I wasn't sure if they were somehow related
[03:53:13] Radar: Their only relation is that they're named after precious gemstones.
[03:53:17] sevenseacat: we've had worse trolls.
[03:53:19] Encapsulation: I see that now
[03:53:24] Radar: sevenseacat: indeed
[04:11:52] shevy: there is a language called emerald?
[04:12:00] shevy: so we have... ruby ... perl ... crystal ...
[04:12:23] shevy: animal languages... python... falcon ... hmm
[04:12:48] mwlang: Encapsulation: at the end of the day, the choice of language to use for any application must be made based on task at hand and whether its the right tool for the job. If you???re looking for *the* language that???s going to get you hired somewhere making the big bucks and you don???t care what you???re building with that language, then hit tieboe???s language rankings and pick on in the top 10 and start mastering it.
[04:14:06] mwlang: Encapsulation: on the other hand, if you???re looking to do something rather specific, like say, build a website that can talk to a database backend and hads scads of how-to???s on doing that, then pick Ruby. If you???re wanting to do the same but think speed is paramount importance, then pick node.js, python, or php.
[04:14:37] shevy: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[04:14:46] mwlang: shevy: then you have the one letter languages???. a, b, c, k, j, r, ???
[04:16:48] mwlang: two beers and I can???t type straight no more. (yeah, I???m a lightweight). I???m done troll slayin???. Off to bed I go.
[04:17:24] ebonics: mwlang, did you actually miss d?
[04:17:38] ebonics: m8 u trying to pick a fight
[04:18:56] mwlang: ebonics, I typed d, thought about it, couldn???t remember with absolute certainity and removed it???I blame the beers. ;-)
[04:19:23] ebonics: thot so m8
[04:29:07] kbarry: I am wondering if its possible to install gems for "the system" alltogether?
[04:29:10] kbarry: instead of per user?
[04:30:24] Radar: kbarry: Why do you want to do that?
[04:32:40] kbarry: I am trying to install "redmine" and am getting an error telling me that i need a higher version of bundler, that 1.1.4 is bieng used.
[04:32:52] kbarry: and apparently bundler 1.1.4 is being installed when i apt-get bundler
[04:33:07] kbarry: but when i apt-get remove bundler its uninstalling rails3 aswell.....
[04:33:48] kbarry: I have bundler 1.9.* installed on the account thats running the app, but apparently itsusing the version that comes with the package.
[04:34:05] kbarry: I'm a ruby newb, and this is a bit of a trick to troubleshoot for me.
[04:40:42] shevy: kbarry isn't that the default when you do gem install bla.gem?
[04:41:27] shevy: like on my system gems would be installed into /usr/lib/ruby/gems/
[04:41:29] kbarry: Not sure. I know that each account seems to have a different set of gems installed.
[04:41:46] kbarry: ie, as root, gem list bundler shows one set
[04:41:48] shevy: yeah, that's bundler screwing things up. you can use "gem" just fine and ahve it installed system wide
[04:41:53] Radar: kbarry: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
[04:41:59] Radar: kbarry: Don't install Ruby things with apt-get.
[04:42:13] kbarry: I didn't (inherited it)
[04:42:30] kbarry: And i am a newb
[04:43:09] shevy: debian-ruby
[04:43:12] shevy: these are annoying
[04:43:19] kbarry: when i uninstalled bundler with apt-get remove bundler, i lose rails aswell. yet, rails is installed with the use running the website.
[04:43:30] kbarry: wait, are you saying that this is tricky because its debian?
[04:43:42] shevy: they use another gem path by default for instance
[04:43:48] shevy: mkmf is usually also not available by default
[04:43:50] kbarry: (all my experience is w/ centos, this is my first time working with debian, so....... not sure what is normal....
[04:43:59] Radar: I'm saying it's tricky because the Debian package maintainers fail to understand how to setup Ruby correctly.
[04:44:04] shevy: normal is what the plain sources are doing
[04:44:08] Radar: Use ruby-install + chruby and you'll be fine
[04:44:18] Radar: And why are you even wanting to use Redmine anyway? There are better tools out there that do the same thing.
[04:44:22] Radar: What does Redmine provide that you care about?
[04:44:28] kbarry: ticket system,
[04:44:36] Radar: BitBucket
[04:44:46] Radar: BitBucket can be private + free
[04:44:56] Radar: Bonus: you don't have to host it yourself.
[04:45:24] kbarry: I hear you.
[04:45:37] kbarry: I have only recently started using redmine (Can you tell I am new here?)
[04:45:51] kbarry: but i understand we are using it mostly for ticket system.,
[04:47:33] Radar: I strongly advise switching away from that to something else.
[04:52:35] kbarry: from redmine to something else?
[04:53:36] kbarry: Have any of you used the stnad-along appliace
[04:53:39] kbarry: ir bitnami?
[04:55:35] Radar: Yes, go from Redmine to Bitbucket or Trello.
[04:57:50] sevenseacat: there are so, so many online services that offer ticket tracking and basic project management
[04:58:06] sevenseacat: i can see the appeal of redmine but honestly, not worth the hassle
[04:58:22] Nilium: We just use GitLab at work.
[04:58:26] areologist: peace and long life, rubyists
[04:58:31] Nilium: Self-hosted, since we didn't want to pay for stuff.
[04:59:07] sevenseacat: see: not worth the hassle
[04:59:42] Nilium: It has basic issues, that's all I need. If I wanted something more, I'd use Jira.
[04:59:55] kbarry: but jira isnt free is it?
[04:59:56] Nilium: Well, I'd use YouTrack if I didn't have to convince people to use it over Jira.
[05:00:05] Nilium: Jira isn't free, but it costs like $10 for 10 people.
[05:00:23] Nilium: And as long as I limit it to our dev team, the next license after that is all we should need.
[05:00:40] areologist: What are the best sites, free or sub, for learning and keeping current with Ruby? I'd like to upgrade Ruby from its current position in my skill set. For .NET I use Pluralsight.com, for JS-related things I use egghead.io and frontendmasters.com... So that kind of thing. Thanks!
[05:01:07] shevy: never heard of any of that
[05:01:08] sevenseacat: we use pivotal tracker at work for project management... it does the job, kinda
[05:01:24] Nilium: We also use Asana at work. By we I mean people who are not me.
[05:01:31] Nilium: areologist: https://www.ruby-lang.org/
[05:01:47] Nilium: I don't know what else you mean by keeping current.
[05:02:06] sevenseacat: Nilium: spoonfeeding distilled information, i presume.
[05:03:10] sevenseacat: pluralsight also has a lot of ruby content.
[05:04:11] shevy: areologist you could scavenge the ruby-forum regularly :D https://www.ruby-forum.com/
[05:04:19] shevy: sometimes there are blogs elsehwere but they are dispersed
[05:04:41] shevy: I liked the peter cooper ones but he seems to have given up
[05:05:26] zenspider: areologist: pluralsight bought peepcode, so it has a lot of ruby content
[05:05:45] sevenseacat: pluralsight also bought codeschool
[05:05:47] zenspider: some of it is older... but usually that doesn't matter
[05:06:42] areologist: yes, "spoonfeed distilled content is kind of correct". for my focus platforms I try to read at least one book a month, listen to podcasts during exercise, subscribe to the mailing lists, read release notes for tooling and frameworks that I use, follow the best blogs, and continually experiment and explore.. The video sites like egghead.io held particularly with the latter.
[05:06:54] sevenseacat: i have a five-hour plane ride tomorrow that has to use up one of my professional development days from work. recommend me stuff to read/do
[05:07:21] Nilium: Learn Go?
[05:07:26] areologist: I've yet to get *that* into Ruby but I'd like to, so seeing what people have to say with respect to resources. And thank you, those who have replied so far.
[05:08:23] diegoviola: I tend to read source code when traveling
[05:08:36] Nilium: Could study the Quake 1 engine source code.
[05:08:36] diegoviola: source code I wouldn't usually read otherwise
[05:08:47] Nilium: That said, that's code I'd read for fun.
[05:08:55] sevenseacat: eh i'll probably go on a book-buying spree and then not read any of them
[05:09:12] pipework: Just don't go on a book buying spree.
[05:09:20] pipework: I don't know if books about spree would be worth it.
[05:09:26] areologist: Looking now and indeed, pluralsight has a decent amount of Ruby content.
[05:10:10] Nilium: I still have a pile of books on walled communities that I need to get through.
[05:10:20] shevy: I can't recommend any books because the books I read are fat, non-computer science-related books
[05:10:30] areologist: I buy more books than I can read too. Plenty of obsolete Java and Flex and DirectX 9 books on my shelf. ha
[05:10:40] shevy: omg java books
[05:10:59] Nilium: I stopped buying most programming books.
[05:10:59] sevenseacat: ACTION looks at Programming Elixir
[05:11:12] Nilium: Programming Pearls was the last one I got.
[05:11:18] diegoviola: gosh, never in my 15 years of using linux a DE frustrated me as much as GNOME
[05:11:39] shevy: diegoviola did you use unity
[05:11:56] pipework: I buy lots of ebooks.
[05:12:06] Nilium: Insert insistence that Fluxbox is the correct WM/desktop thing combo.
[05:12:07] shevy: and you read them as well?
[05:12:16] areologist: Elixir? Friend of mine who hits a lot of conferences (and a Rubyist, incidentally) was at an Elixir conference recently and said it was the best conference he'd been to in a while.
[05:12:23] diegoviola: shevy: yes, frustrating too, but GNOME frustrated me more because I actually tried to use it, I didn't use unity as much
[05:12:33] areologist: By "recently" I suppose I mean late last year. time flies..
[05:12:45] shevy: diegoviola yeah GNOME is for eye candy, use xfce or fluxbox :>
[05:12:58] diegoviola: with GNOME it feels like they took all the possible bad decisions and smashed it into a DE to annoy users on purpose
[05:13:03] Nilium: Alternatively: tiling WMs.
[05:13:15] pipework: My favorite DE is just a full screen terminal emulator.
[05:13:16] diegoviola: shevy: GNOME looks nice, sure
[05:13:33] Nilium: My favorite DE is Mac OS.
[05:13:34] pipework: TTY's just don't have the eye candy I need.
[05:13:45] diegoviola: pipework: unless you are using kmscon
[05:13:52] diegoviola: that will give you some eyecandy
[05:13:58] pipework: Nilium: The correct way to refer to that is _windowserver
[05:14:04] Nilium: And then I just spend all day with three monitors running iTerm2 fullscreen.
[05:14:16] diegoviola: like 256 colors and antialiased fonts on the tty
[05:14:26] diegoviola: plus other niceties
[05:14:47] diegoviola: I think it can do more than 256 colors actually
[05:14:48] Nilium: pipework: That would be correct if I said window manager.
[05:15:13] pipework: Nilium: _windowserver does more than that, or appears to.
[05:15:14] pipework: It's fun to kill.
[05:15:27] Nilium: Been there, done that, not trying it twice.
[05:15:30] pipework: diegoviola: Huh, Owl be able to get this to run on a TTY?
[05:15:36] pipework: That'd be pretty great.
[05:15:37] diegoviola: shevy: I would use fluxbox/openbox/i3 but I can't find a terminal emulator that gets the copy/paste right
[05:15:59] Nilium: You just need more modifier keys.
[05:16:47] Nilium: And a Linux DE that uses meta as a Mac OS command-like key.
[05:17:03] Nilium: Instead of the weird obsession with imitating Windows keys
[05:17:11] diegoviola: pipework: https://wiki.archlinux.org/index.php/KMSCON
[05:17:35] pipework: diegoviola: Oh I see, the note makes sense.
[05:17:43] pipework: Neat, thanks!
[05:17:45] diegoviola: pipework: you just disable agetty and enable kmscon, you don't have to disable all agettys, you can enable kmscon just for one or two ttys and so on
[05:18:18] diegoviola: but it requires KMS (kernel mode setting), that is, free drivers like intel/nouveau/radeon
[05:18:43] pipework: diegoviola: I virtualize my lunixen these days, so perhaps it'll work fine.
[05:18:43] diegoviola: you can have comic sans in your tty with this
[05:18:54] pipework: If not, I can find another way to get it.
[05:18:58] diegoviola: pipework: it should
[05:19:16] diegoviola: it links to freetype iirc
[05:19:20] diegoviola: so any fonts should work
[05:20:02] diegoviola: waiting for my new ThinkPad T450
[05:20:15] diegoviola: I'll remove that windows crap and install arch
[05:20:32] Nilium: Also known as best distro.
[05:21:09] Nilium: It only took six hours and about ten reboots for my Windows 8 VM to successfully install updates.
[05:21:20] Nilium: Good job, Windows.
[05:21:36] Nilium: Oh wait, it might've failed the updates.
[05:22:02] pipework: Nilium: Certain things cannot change in the universe. Change and windows installs taking no less than 4 reboots.
[05:22:13] diegoviola: kmscon is actually a good solution if you are using vim/emacs and want to have 256 colors (or more) so you can switch between X/Wayland and the TTY and still have those nice colors. agetty tends to degrade those colors because it doesn't support anything more than 8 colors (afaik)
[05:22:15] Nilium: This wasn't even an install.
[05:22:20] Nilium: It was just running Windows update.
[05:22:31] Nilium: And then it failed and got in a reboot cycle where it kept telling me it was reverting changes.
[05:22:49] pipework: diegoviola: Yeah, that checks out here. I've always just dealt with it because I never tried to replace agetty.
[05:22:56] pipework: I'm super stoked to try.
[05:23:14] diegoviola: it's a pain when you are on vim and then you Ctrl + Alt + F4 and then your vim breaks there (colors)
[05:23:19] diegoviola: kmscon fixes this
[05:23:39] Nilium: Going to have to keep kmscon in mind for my work machine.
[05:24:07] diegoviola: I wish I could move to a modern editor sometimes but there's nothing that beats vim yet
[05:24:19] diegoviola: f*ck sublime
[05:24:22] Nilium: I went from Sublime to vim, but that was for semi-petty reasons
[05:24:41] Nilium: i.e., Sublime was crashing a lot, I got impatient, and finally just went back to vim.
[05:25:02] Nilium: The crashes were proooobably my fault but I really don't care to diagnose that stuff.
[05:25:09] areologist: I've been using Atom lately in cases where I'd have used Sublime
[05:25:21] Nilium: I object to Atom on moral grounds.
[05:25:27] pipework: I'm pretty into vim.
[05:25:38] areologist: Can't vouch for its Ruby experience
[05:25:42] Nilium: Using an editor that's just stuffed into a browser window isn't my idea of fun.
[05:25:42] diegoviola: Vim is nice but sometimes I have to admit I want a modern editor with real colors, gvim doens't cut it
[05:25:50] Nilium: That way lies madness.
[05:25:51] pipework: I even know a good amount of vim compatibility mode.
[05:26:15] diegoviola: neovim is not there yet
[05:26:16] pipework: It's frustrating, but nice that I can use an editor without configuration.
[05:26:23] Nilium: I only use terminal vim, but I'm not really hurting for colors
[05:26:45] pipework: I use vim within tmux mostly.
[05:27:02] pipework: ACTION rides the netsplit
[05:27:22] areologist: Doesn't JetBrains make a Ruby IDE? Is that popular at all?
[05:27:34] pipework: rubymine? Fairly.
[05:27:45] pipework: People who seem to like IDEs also seem to like Rubymine.
[05:27:46] Nilium: Stopped using tmux with it 'cause I couldn't find an acceptable prefix key that didn't swallow a key I wanted in vim.
[05:28:04] pipework: Nilium: I just use ^a
[05:28:21] pipework: Then I just press ^a^a to send ^a to vim.
[05:28:31] areologist: Having a handy debugger and tools for refactoring and things like that is nice, I suppose
[05:28:36] Nilium: I have C-a bound to jump to the start of the line since I borrowed that from emacs.
[05:28:42] Nilium: C-a and C-e, basically.
[05:28:43] pipework: Or really, (^a*nested_tmuxen) + ^a
[05:28:58] pipework: Nilium: Pressing ^a twice isn't a big deal though.
[05:29:11] Nilium: It's sufficiently annoying.
[05:29:29] pipework: Nilium: It's something I got used to. Seemed silly to let bother me and then it stopped bothering me.
[05:32:46] shevy: I can't be friends with you vimsters out there
[05:33:00] areologist: A couple more noob questions... It's been a while since I've gone down the Ruby path... 1. Is RSpec still the way to go for testing? 2. What are people using for web sockets and/or REST with Ruby?
[05:33:25] pipework: areologist: RSpec is a way to go. I'm fond of minitest.
[05:33:34] sevenseacat: rspec is awesome. i like it a lot.
[05:33:38] pipework: As for wobsockets, thin-based stuff seems to be what people are into.
[05:34:10] zenspider: for screen (I don't use tmux) I remapped from ^a to ^], since that's the escape for telnet and nobody telnets anymore
[05:34:38] shevy: I used to telnet +20 years ago to play a MUD!
[05:34:48] areologist: interesting. thanks!
[05:34:54] pipework: zenspider: Except when I'm on windows and have no time for that nonsense when trying to connect to a socket with a plaintext protocol.
[05:35:14] pipework: But then again, I don't tmux on windows either, so your point stands.
[05:35:21] shevy: lots of mention of windows here
[05:35:38] pipework: shevy: Just try not to get defenestrated.
[05:37:11] areologist: I think the Thin website was designed for the original Gameboy
[05:39:19] shevy: yo beaver
[05:42:20] areologist: anyone into reactive extensions for Ruby, or some other attempt at the reactive paradigm in Ruby?
[05:45:33] Hanmac1: areologist: what are "reactive extensions" ?
[05:46:32] pipework: hanmac1: Functional reactive programming.
[05:46:46] pipework: Basically, when data comes in, shit happens.
[05:46:48] sevenseacat: i'm glad i'm not the only one who has no idea what that means.
[05:46:55] areologist: libraries for composable async and events via observables, and concurrency with schedulers, adn some other goodies
[05:47:14] pipework: areologist: Look at celluloid
[05:47:39] areologist: ooh, actor-based. thanks, pipework
[05:48:42] Hanmac1: areologist: apropos about "observable" stuff, did you also creckout http://ruby-doc.org/stdlib-2.2.2/libdoc/observer/rdoc/Observable.html ? maybe it already does what you want
[05:49:02] pipework: ACTION crecks out with his dreck out.
[05:49:04] sinepreggin: why can't self be renamed to current_object?
[05:49:14] pipework: sinepreggin: Why would you ever want that?
[05:49:24] sinepreggin: because it makes a lot more sense in english
[05:49:30] pipework: sinepreggin: Not really, no.
[05:49:37] ChanServ: +o sevenseacat
[05:49:39] pipework: self is the basis of metaprogramming.
[05:49:58] pipework: The notion of self is central to it.
[05:49:59] areologist: thanks, hanmac1, I'll take a look at that.
[05:50:11] sinepreggin: central to the current object
[05:50:21] sinepreggin: it would be nice if self was renamed to current_object
[05:50:35] pipework: sinepreggin: Do you refer to you as 'your_current_person'?
[05:50:44] pipework: my_current_person
[05:51:02] pipework: sinepreggin: It would be a worthless change for the sake of change.
[05:51:23] pipework: Feel free to try to suggest it at bugs.ruby-lang.org but you'll probably be summarily shot down.
[05:51:29] sinepreggin: where is self located? and what kind of repercussions would i face if i change the name?
[05:51:44] sinepreggin: pipework: i will be shot down because of people being used to it
[05:51:49] pipework: sinepreggin: You can define a method called #current_object if you want.
[05:52:04] sinepreggin: and set #current_object to self?
[05:52:17] sinepreggin: wouldn't that make the code slower though?
[05:52:21] areologist: there was a talk at a Ruby conference years back in which the speaker was warning that Ruby may be the next Scheme if the Ruby community doesn't make nice with the enterprise domain etc...
[05:52:29] pipework: sinepreggin: not enough to really care.
[05:52:56] pipework: areologist: Scheme is pretty great, but I bet they meant with regard to the commercial market?
[05:54:27] areologist: .. yeah, how at one point there was a lot of hype about Scheme and was the next big thing, conferences, etc. but the strongly typed OOP langauges killed it bad
[05:55:23] areologist: and allegedly part of the reason was not playing nice with enterprise needs.
[05:55:36] Radar: sinepreggin: I think the bike shed should be blue.
[05:56:08] funburn: I have a question about turning an array of hashes into a hash of arrays. https://gist.github.com/mtuckerb/a0f862d65b0b3333a338
[05:57:01] sinepreggin: Radar: blue is a nice color :)
[05:57:48] areologist: nm.. I was leading up to a complicated question but I'll just research it elsewhere
[05:58:15] zenspider: `it would be nice if self was renamed to current_object` ???
[05:58:27] Radar: funburn: See comment on Gist.
[05:58:32] sevenseacat: ACTION munches on more popcorn
[05:58:40] Radar: zenspider: It really should be called the_current_object.
[05:58:55] zenspider: the_current_object_at_this_point_in_execution
[05:58:59] Radar: oh yes true
[05:59:10] funburn: Radar: oh nice i was trying to figure out how to see the new hash. perfect. thank you
[06:02:50] Eiam_: zenspider: lol
[06:03:12] Eiam_: I rather like "self" and "this" as concepts
[06:03:25] Eiam_: ( in programming)
[06:06:18] mozzarella: python missed an opportunity to call it __current_class_instance__
[06:10:35] pipework: zenspider: don't forget in_this_current_context
[06:16:34] baweaver: Every time I see 'this' in Javascript I have a mini heart attack
[06:16:50] baweaver: Mainly because people don't bind things right
[06:17:26] baweaver: and then 'this' is bound to window and you inadvertently make a nasty psuedo-global state on the parent object.
[06:17:53] baweaver: As far as redefining self, it's pointless.
[06:17:59] baweaver: Ruby has sane scoping
[06:18:25] baweaver: Arguing about names of things isn't going to do you a shred of good
[06:18:32] areologist: 'strict mode'; or gtfo
[06:18:37] baweaver: Instead, go out and build something
[06:18:59] sevenseacat: baweaver: but it's so much more fun to troll.
[06:19:30] baweaver: sevenseacat: The scary part is that sometimes I'm not sure if it's trolling or just plain ignorance
[06:20:20] baweaver: Some of these people are entirely serious when they mention something, and will hold to their guns on it fully believing in what they just said.
[06:20:38] baweaver: see anti vaccine movement
[06:20:50] areologist: 'this' in JS is a great concept, but misnamed and thus conflated with 'this' or 'self' in other languages where it's a very different thing
[06:21:22] baweaver: I didn't say it was bad, just that most people misuse it liberally
[06:21:58] areologist: when the nature of 'this' in JS is properly understood it's fine, so I agree with you
[06:22:06] sinepreggin: so this and self are not the same exact thing?
[06:22:24] baweaver: Nope, bot doesn't like me
[06:22:29] Nilium: Rightly so.
[06:22:32] sevenseacat: helpa isnt here anymore.
[06:22:42] helpa: Why don't you try it and find out for yourself?
[06:22:46] baweaver: use this in a nested function and console.log(this) in Ruby
[06:22:58] Nilium: Well, neither of those would work in Ruby
[06:22:59] areologist: in JS 'self' is a property on the global scope from the Netscape days that's still there, which is why the common var self = this; trope irks me slightly
[06:23:22] baweaver: Monday......
[06:23:33] areologist: in JS 'this' is available in functions but doesn't refer to the function itself but to the context from which it was invoked
[06:23:51] Nilium: The only thing that really irks me about most scripting languages is that control structures don't create scopes.
[06:24:16] Nilium: But that's what I get for coming from C and C-like languages.
[06:24:30] areologist: so in a properly JavaScript style you might have something that interacts with 'this' and you could pass in different things with .apply or .call and have different thises
[06:24:41] areologist: but yes, from a C-ish background it's confusing as hell
[06:25:02] Nilium: It's not too confusing, just.. annoying.
[06:25:22] areologist: I mean for JS noobs coming from a C-ish background
[06:26:14] Nilium: I'd basically just like to limit the lifespan of local variables, isn't really doable in JS.
[06:26:36] areologist: block scope in ES6
[06:26:50] Nilium: Can't rely on new standards when it comes to JS.
[06:27:05] areologist: transpile to ES5 with Babel or Traceur, if you don't mind the hacks that mimic the ES6 stuff
[06:27:11] Nilium: C++11 and C++14 have better adoption than anything new in JS.
[06:27:55] wasamasa: first I'd need C++11 support in my text editor
[06:27:58] areologist: since ES3 catch creates a block scope, so your lovely ES6 code might be transpiled to some god-awful try { var s; throw s; } catch (s) { s = "hi"; }
[06:28:35] Nilium: Hacks produced by compilers are less preferable to just working with what's actually supported.
[06:28:40] areologist: the generators to ES5 is worse
[06:29:14] Nilium: Just a matter of being clear when writing code, for now.
[06:29:16] areologist: ES6 standard is being published next month, browsers are supported it quickly, and it's an evergreen world, for th emost part
[06:29:23] zenspider: baweaver: hah! did you just equate language mentarbation with anti-vaxxers?
[06:29:44] baweaver: I aim to please
[06:29:46] sevenseacat: ACTION smiles and nods at JS talk
[06:29:48] Nilium: As long as any portion of the world continues to use a browser that doesn't support something, it won't work
[06:29:56] Nilium: It's a pain in the arse
[06:30:01] zenspider: stop talking about JS.... take it to #masochism or something
[06:30:16] baweaver: Right next to enterprise Java
[06:30:18] Nilium: Hey, I haven't gone off on a rant about how node.js is garbage yet.
[06:30:21] pipework: Better yet, take it to a support group.
[06:30:29] baweaver: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition - relevent
[06:30:53] baweaver: Try a JSON.parse when Node.JS does a GC for great fun
[06:30:55] Nilium: baweaver: Not enterprise enough. Needs XML.
[06:31:04] baweaver: (hint: segfault)
[06:31:12] Nilium: https://github.com/tenderlove/enterprise ??? This is the superior Enteprise Option.
[06:31:31] areologist: that's hilarious, baweaver
[06:32:27] areologist: I'm seriously laughing out loud looking at this code
[06:32:43] zenspider: years later... and I still feel like apologizing for enterprise
[06:33:12] baweaver: zenspider: would it make you feel worse if I told you some companies herald it as a style guide? (they do)
[06:33:50] zenspider: full-fuckin'-shit
[06:34:17] zenspider: wait... are you talking about the java fizzbuzz thing or aaron's abomination?
[06:34:20] pipework: zenspider: I see your Tuesday is still in full effect.
[06:34:31] baweaver: baweaver's commentary on Murphy's Law: If it exists, someone's using it in Production
[06:34:49] zenspider: I was saddened when I heard that andand was being used in rails apps
[06:35:25] baweaver: https://gist.github.com/andkerosine/3356675 - Saw this in prod once
[06:36:24] pipework: sevenseacat: why the +o?
[06:36:25] baweaver: sevenseacat: https://github.com/raganwald/andand
[06:36:38] sevenseacat: pipework: keeping an eye on certain people.
[06:36:38] zenspider: "Please do not actually use this"
[06:36:41] baweaver: The banhammer thirsts for blood
[06:36:49] baweaver: zenspider: Like that works
[06:36:56] zenspider: pipework: +@ unary plus
[06:37:04] sevenseacat: dafuq at andand
[06:37:14] baweaver: try before try
[06:37:18] pipework: zenspider: I was talking about the ops stuff.
[06:37:25] sinepreggin: hi sevenseacat
[06:37:35] pipework: sinepreggin: I'd suggest not poking the bear.
[06:37:37] sevenseacat: sinepreggin: good afternoon.
[06:38:22] baweaver: zenspider: I made this once as a joke https://github.com/baweaver/izzy
[06:38:29] baweaver: apparently people are using it in prod as well
[06:38:56] Nilium: I think I may need to write a Javascript source processor at work
[06:39:04] zotherstupidguy: ACTION likes how sevenseacat acts as good samaritan, almost like an irc-superhero! 
[06:39:16] Nilium: Which means having to parse Javascript. :|
[06:39:33] ebonics: youd write it froms cratch?
[06:39:40] Nilium: Oh hell no.
[06:40:06] Nilium: I'm sure someone's already got something that's at least sufficient.
[06:41:33] zenspider: baweaver: :(
[06:41:54] baweaver: Hence the commentary above
[06:42:03] zenspider: hence the :(
[06:42:19] baweaver: I have something worse
[06:42:21] baweaver: far far worse
[06:42:26] baweaver: http://azac.pl/cobol-on-wheelchair/
[06:42:30] baweaver: that's in production too
[06:42:47] baweaver: Rails in COBOL :D
[06:42:53] zenspider: hah! that's fantastic
[06:43:03] sevenseacat: love the name
[06:43:08] baweaver: See their mascot halfway down the page
[06:43:11] Nilium: I mean, that is cool from a technical POV.. but holy crap that's in production?
[06:43:17] zenspider: my InlineFortran is in use in NASA
[06:43:37] sinepreggin: sevenseacat: i want to tell you a secret in pm
[06:43:37] baweaver: COBOL engineers don't want to learn a new language
[06:43:38] Nilium: I'm trying to figure out the scenario that someone had where that seemed like a good idea
[06:43:49] baweaver: sinepreggin: I wouldn't
[06:44:05] sinepreggin: baweaver: why would you learn a new language after learning cobol? cobol is the best programming language ever invented
[06:44:15] sinepreggin: baweaver: what do you mean?
[06:44:19] zenspider: baweaver: nah. I taught several cobol coders at a railsbridge
[06:44:35] baweaver: zenspider: There are some
[06:44:43] baweaver: but back home in Missouri? Good luck
[06:44:44] pipework: I got to learn RPG from a pretty cool guy.
[06:44:55] baweaver: I know RPG and COBOL
[06:44:58] baweaver: won't ever use them
[06:45:15] Nilium: Friend of mine had to use RPG IV at an insurance company. He quit not long after.
[06:45:38] baweaver: At least he got IV, so Free can be used
[06:45:40] zenspider: I intentionally never learned fortran or cobol so I'd never get stuck
[06:45:56] baweaver: I had to use III with straight C for calc lines.....
[06:46:02] sinepreggin: imo it should be ruby on cobol
[06:46:14] baweaver: zenspider: Didn't have a choice
[06:46:14] sevenseacat: sinepreggin: please stop trolling.
[06:46:16] Nilium: I've never learned Cobol and my general assumption is that I'd have to be desperately trying to get a Cobol job if I learned it
[06:46:18] baweaver: required classes
[06:46:24] zenspider: everone has a choice
[06:46:27] zenspider: everyone. ugh.
[06:46:28] sinepreggin: sevenseacat: i'm not trolling
[06:46:37] zenspider: yes, you are. just stop.
[06:46:50] sinepreggin: just because you don't agree with me, it doesn't mean that i'm trolling... cobol is a superior language
[06:46:52] sevenseacat: sinepreggin: this is an actual warning, or we can go back to the kicking stuff.
[06:47:42] baweaver: zenspider: Already most of the way through my (admittedly kinda worthless) degree, so technically had a choice but just bit the bullet on it.
[06:47:48] Nilium: I'm just glad at my current job I at least get some range of choice for what I implement stuff in.
[06:47:53] pipework: sinepreggin: You may want to evaluate the possible scenarios in which you find yourself still welcome here and possibly execute any one of them.
[06:47:56] Nilium: Or at least nobody has ever stopped me.
[06:48:10] sinepreggin: you hate cobol that much pipework ?
[06:48:17] pipework: sinepreggin: Just a thought.
[06:48:35] zenspider: strike two?
[06:48:37] sinepreggin: cobol is the best language because it makes the most sense
[06:48:46] baweaver: batters up?
[06:48:47] zenspider: can we just pull the trigger?
[06:48:53] Nilium: The Cobol schtick really isn't funny, so you can drop it.
[06:48:57] zenspider: wait... I mixed metaphores
[06:49:13] sinepreggin: i know 17 languages and cobol is my favorite for its ease and near-english syntax
[06:49:15] pipework: zenspider: I made a pretty tasteless but apropos Kurt Cobain joke earlier.
[06:49:28] zenspider: only 17? meh.
[06:49:30] baweaver: Shotgun baseball is a thing
[06:49:33] baweaver: https://www.youtube.com/watch?v=bur4hRPTbaM
[06:49:55] baweaver: zenspider: so no mixed metaphors :D
[06:49:56] zenspider: baweaver: do you just have the world's biggest bookmarks file?
[06:50:18] pipework: zenspider: It's so big this huge company indexes it for him.
[06:50:25] baweaver: Fastest CMD + Tab, CMD + T, Google in the west
[06:50:51] baweaver: ACTION crashed chrome once with too many tabs open
[06:51:15] baweaver: ironically whilst looking for a tab manager
[06:51:56] baweaver: pipework: I self index it, they always mess it up
[06:53:08] baweaver: https://github.com/baweaver/special-sauce/blob/master/.pryrc#L8 - Hehe
[06:53:26] Nilium: I should go to sleep and anticipate ripping off a particularly ugly band-aid at work tomorrow
[06:53:29] baweaver: Still like the blame, but older file
[06:53:46] Nilium: Replacing more legacy systems with their new equivalents without introducing any hiccups.
[06:53:57] Nilium: Everything is terrifying.
[06:55:52] baweaver: zenspider: Also, it's the internet. If it sounds remotely amusing someone's probably done it and put it on youtube.
[06:59:59] zotherstupidguy: according to this vid https://www.youtube.com/watch?v=8sH31sg6VMQ ryan davis died in 2013?
[07:03:15] zenspider: zotherstupidguy: yup
[07:03:35] zenspider: that'd be the giantbomb.com / gamer ryan davis... but yes.
[07:03:47] zenspider: there are a lot of us. we die ALL the time
[07:04:00] sevenseacat: there can be only one!
[07:04:13] baweaver: Killing off yourself in other multiverses there zenspider?
[07:04:40] flughafen: sevenseacat: it's the quickening!
[07:04:57] zotherstupidguy: ACTION found the ruby version of spider journalism 
[07:05:03] zenspider: man... I'm still only #7 on google. jerkface with a wikipedia entry
[07:06:20] sevenseacat: hey i actually have a few hits on the first page when i google my name. woo.
[07:06:29] ChanServ: -o sevenseacat
[07:06:34] baweaver: zenspider: Speaking of multiverse http://smbc-comics.com/index.php?id=3660
[07:06:38] pipework: My name is far too unique to not be the whole page.
[07:06:48] pipework: Even the weird chinese site that uses my name is referencing me.
[07:06:56] sevenseacat: you do have a unique name.
[07:06:57] pipework: I don't even need to use my full name, just the first name works. :(
[07:13:36] zotherstupidguy: why sevenseacat and not sevenseafish? cats don't like to swim!
[07:13:57] zenspider: depends on the cat
[07:14:36] pipework: zotherstupidguy: Never heard of a catfish?
[07:14:43] pipework: Or a fishcat?
[07:14:46] pipework: Or a sevenseacat?
[07:16:24] zenspider: or: http://i.imgur.com/qRx5T.jpg
[07:16:48] pipework: zenspider: Quick, get that sevenseacat some coffee or we might all be doomed.
[07:16:48] zenspider: baweaver: see?? I'm getting better at it!
[07:17:06] zenspider: fuck off... can't have MY coffee
[07:17:33] baweaver: If you're in SF I can get you coffee
[07:17:38] baweaver: but that's about it
[07:18:13] pipework: there's no amount of zen an arachnid can have that will stop the feline of no less than seven seas, but no more than seven seas. Yea, the count of seas will be seven.
[07:18:46] zotherstupidguy: ACTION used to have a cat, she was amazing, i trained her like bitbull, dogs were actually afraid from her. she was crazy and i love her
[07:18:48] pipework: And here I am just a stupid fucking unit of work related to pipes. Creativity isn't my strongsuit.
[07:19:24] zotherstupidguy: anyone build a chatting app in ruby before?
[07:19:33] baweaver: baweaver -> B.A. Weaver -> Brandon A Weaver. *shrugs* I'm not being creative either
[07:19:51] baweaver: though @baweaver is some sorority girl that's pretty pissed at me on twitter
[07:19:59] baweaver: recruiters thought she was me for a while
[07:20:02] baweaver: hilarity ensued
[07:20:06] baweaver: blocks all around
[07:20:14] pipework: I read it as Bad Ass Weaver.
[07:20:18] zotherstupidguy: recruiters love me
[07:20:30] baweaver: Funny that that's mildly on purpose ;)
[07:20:39] baweaver: Also, I am a badass developer
[07:20:44] zenspider: I pity the foo' that wrote that code
[07:21:01] baweaver: Build and Deployment Automation Support System that is
[07:21:13] Hanmac1: baweaver: hm reminds me at "i r baboon" from the Ren and Stimpy Show ;P
[07:21:29] baweaver: shevy is convinced I'm a beaver
[07:22:42] zenspider: baw-eaver ?
[07:22:56] zenspider: I could see that
[07:23:23] zenspider: I like the MrT ref better
[07:24:22] baweaver: http://cmster.com/media/oyUvp3fmJPE42U3FUetEibp6pipgqEnk5X4pUotCJeIs48jN7Zpgl7nMIXFGM96F.jpg
[07:24:53] baweaver: I pity the foo who doesn't take his Earl Grey hot.
[07:25:17] baweaver: Woot tshirt
[07:25:26] baweaver: bought it, still waiting for it to come in
[07:25:43] baweaver: http://www.teefury.com/media/catalog/product/cache/1/product_artwork_image/900x/17f82f742ffe127f42dca9de82fb58b1/b/-/b-mco-stray-dog-strut_blk.jpg
[07:25:50] baweaver: Still tempted to get that one from Teefury today.
[07:26:04] baweaver: http://www.dayoftheshirt.com - Your wallet will hate me.
[07:26:57] baweaver: Ha, zenspider, I could come visit. Microsoft's trying to recruit me to their cloud ops teams
[07:27:15] baweaver: Something about us stealing a lot of their Xbox staff lately.
[07:27:56] baweaver: ACTION isn't particularly interested in Microsoft
[07:29:12] pontiki: lol @ Mr Tea shirt
[07:29:26] pontiki: it's like 3 puns in one
[07:29:37] baweaver: It's perfect for me then :D
[07:29:51] pontiki: another paronomasiac, then?
[07:30:41] baweaver: Enough so that when I mentioned contributing to Rails Docs I was told to keep the pun to content count below 20%
[07:31:25] baweaver: 'night, time for sleep
[07:43:52] cheeti: hi my ruby mails showing bcc mail id sending mail how to hide bcc mail?
[07:51:32] sinepreggin: i hate niggers white power!!!!
[07:51:33] cheeti: hi my ruby mail showing bcc mail id sending mail how to hide bcc mail?
[07:52:10] adaedra: What do you mean, "showing bcc mail"
[07:52:44] pipework: Radar: Mind unwelcoming sinepreggin?
[07:59:16] sinepreggin: pipework: mind going to fuck yourself?
[07:59:27] kloeri_: kloeri_ kicked sinepreggin:
[07:59:31] kloeri_: -o kloeri_
[07:59:37] adaedra: thanks kloeri_
[08:00:22] adaedra: I don't know if jhass finally added !ops
[08:10:30] zotherstupidguy: sinepreggin you are no good samaritan!
[08:10:56] zotherstupidguy: sevenseacat kill kill kill
[08:11:34] pipework: zotherstupidguy: They're gone, for now.
[08:11:49] pipework: Not sure why kloeri_ didn't seem to +b though
[08:12:10] cheeti: hi my ruby mails showing bcc mail id sending mail how to hide bcc mail?
[08:13:43] adaedra: cheeti: what do you mean by "showing bcc mail id sending mail"
[08:18:03] cheeti: adaedra bcc mail not shows in our mails but it showing in my mail which i received
[08:19:08] pipework: cheeti: BCC only shows for the sender.
[08:23:58] cheeti: pipework yes but in this it's showing for receiver mail also
[08:24:09] pipework: cheeti: Then use CC
[08:25:45] cheeti: pipework i am using bcc mail because to hide the mail id from client
[08:25:57] adaedra: cheeti: how do you send your mails?
[08:26:42] MichaelT: HI NIGGERS =D
[08:27:24] ruboto: sepp2k, fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, Karpah, miah, workmad3, Coraline
[08:28:08] ruboto: sepp2k, fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, Karpah, miah, workmad3, Coraline
[08:28:19] pipework: No need to repeat.
[08:28:35] zotherstupidguy: i like to play XD
[08:28:40] pipework: No need to repeat.
[08:29:18] MichaelT: why can't we get rid of all the niggers?
[08:29:29] MichaelT: also why is it whenever a racist nigger joins here nobody calls ops
[08:29:32] MichaelT: you are racist assholes
[08:29:33] adaedra: yeah, playing with mass highlight, with op people, is far from being a good idea, zotherstupidguy
[08:29:41] cheeti: adaedra https://gist.github.com/mamatharao/17cfca8574266d916bd0
[08:30:35] zotherstupidguy: adaedra you talking to me?
[08:31:29] zotherstupidguy: then put my name in the begining to si can recongize it! please :)
[08:32:16] zotherstupidguy: anybody used multicast to chat locally on the same network before?
[08:32:20] pipework: zotherstupidguy: Does your client suck that much?
[08:32:22] MichaelT: ?????????????????????????????????????????????????????????????????????
[08:32:24] MichaelT: white power
[08:32:26] MichaelT: WHITE POWER
[08:32:28] MichaelT: ????????????????????????????????????????????????
[08:32:30] adaedra: zotherstupidguy: er, it was at the end...
[08:32:30] MichaelT: ???????????????????????????????????????????????????
[08:32:31] pipework: zotherstupidguy: Ever consider using bonjour?
[08:32:57] MichaelT: I HATE NIGGERS AND KIKES GAS THE FUCKING JEWS WHITE POWER SIEG HEIL ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[08:33:00] MichaelT: ??????????????????????????????????????????????????????????????????????????????
[08:33:02] adaedra: cheeti: try to remove not TO: addresses from #send_message call
[08:33:22] dorei: MichaelT: plz, go back into your dustbin
[08:33:46] pipework: dorei: Please ignore the troll and don't encourage him.
[08:34:06] zotherstupidguy: pipework will give it a try
[08:34:15] zotherstupidguy: pipework thanks
[08:34:31] MichaelT: dorei: PLEASE GO FUCK YOURSELF NIGGER
[08:34:34] MichaelT: ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[08:34:56] zotherstupidguy: pipework its a mac protocol?
[08:35:04] cheeti: adaedra i am not getting
[08:35:07] pipework: zotherstupidguy: nope.
[08:35:34] pipework: zotherstupidguy: There's other bonjour implementations on other platforms.
[08:35:49] pipework: It's just zeroconf networking.
[08:36:02] MichaelT: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[08:36:12] MichaelT: RESPECT THE SWASTIKA
[08:36:14] MichaelT: RESPECT THE SWASTIKA
[08:36:15] zotherstupidguy: MichaelT marry me?
[08:36:17] MichaelT: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[08:36:24] pipework: zotherstupidguy: http://en.wikipedia.org/wiki/Zero-configuration_networking
[08:36:29] adaedra: seriously.
[08:36:47] zotherstupidguy: pipework thanks
[08:36:48] pipework: The less you acknowledge the troll, the better.
[08:36:56] MichaelT: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[08:36:58] zotherstupidguy: ACTION breakfast time, cheers
[08:37:12] DTSCode: Breakfast sounds good right now :/
[08:37:16] MichaelT: zotherstupidguy: yes i will marry you if you're not a guy because i'm not a faggot
[08:37:40] adaedra: cheeti: on line 24, remove bccAddress
[08:41:51] pipework: zotherstupidguy: https://github.com/tenderlove/dnssd
[08:44:03] cheeti: adaedra if i removed that bcc mal not sending
[08:45:35] zotherstupidguy: pipework yeah i found dnssd
[08:48:22] adaedra: cheeti: I don't have a lot to say to you, I don't use Net::SMTP. If you can, check the email as processed by the mail server.
[08:49:15] adaedra: Check that the To:, Cc: and Bcc: fields are set correctly in outgoing mail.
[08:49:35] zotherstupidguy: pipework the question is can i use multicast over the internet?
[08:50:18] pipework: zotherstupidguy: I bet you google has better answers to that question than I do.
[08:50:45] adaedra: also cheeti, when you do a gist, give the right extension to the file so syntax color works, thanks :)
[08:50:59] rdark: zotherstupidguy: you need a routable multicast address to communicate with
[08:51:14] pipework: see mbone as well.
[08:51:25] rdark: in general, it's ISP specific, and most ISPs don't implement multicast
[08:51:44] zotherstupidguy: so the short answer is impossible?
[08:52:16] pipework: The short answer is "no", with a slightly less short answer being "No."
[08:52:20] rdark: possible if all nodes are connected to the same ISP, and that ISP will do multicasting for you. but in general, no
[08:52:38] zotherstupidguy: pipework mbone looks intersting
[08:52:41] pipework: Whale, not really dependent on the ISP. Just that people route things for multicast properly, which most don't.
[08:53:15] pipework: zotherstupidguy: If you want a rich and robust messaging system to build upon, try xmpp.
[08:55:48] zotherstupidguy: pipework xmpp doesn't support VoIP?
[08:56:10] pipework: zotherstupidguy: Oh when you said chat, I assumed text.
[08:56:10] adaedra: It's a difficult topic I think
[08:56:29] zotherstupidguy: yeah, i am just checking
[08:57:52] zotherstupidguy: from my java days, i remmber a lot of weird stuff in this area, none of them was simple.
[08:58:33] zotherstupidguy: personally what got me into this i was reading the other day about the skype protocol and it caught my intrest! i wanted to do a simple ruby thing to apprecaite the complexity
[08:59:33] rdark: zotherstupidguy: jingle is an xmpp extension that supports p2p stuff (including rtp/voip)
[09:00:50] zotherstupidguy: rdark stackoverflow say it doesnt exit in ruby http://stackoverflow.com/questions/3414557/ruby-jabber-jingle-library
[09:00:54] zotherstupidguy: rdark any ideas?
[09:01:20] rdark: no clue on ruby implmentations of
[09:01:48] rdark: people seemed to have been gradually moving away from xmpp related things in recent years
[09:01:48] zotherstupidguy: what about maintained ruby xmpp?
[09:02:25] Macaveli: I'm doing birthdate.month and it returns 9 is it possible to let it return 09?
[09:02:26] zotherstupidguy: things like whatsapp, viber and skype
[09:02:32] Macaveli: or do I have to write it custom
[09:03:54] adaedra: Macaveli: I suppose it returns an Integer. You can force format with format strings.
[09:04:32] adaedra: Macaveli: see http://www.rubydoc.info/stdlib/core/String#%25-instance_method
[09:05:08] pontiki: Macaveli: that's typically a display concern. you can easily manage to display data how you wish
[09:05:51] Macaveli: adaedra pontiki could you tell me how cause I'm not really getting the ruby doc
[09:06:08] adaedra: Macaveli: ever used C printf?
[09:07:08] zotherstupidguy: Macaveli d.strftime('%d')
[09:07:49] Macaveli: adaedra never used c print
[09:08:21] zotherstupidguy: whats the eval bot?
[09:08:30] ruboto: adaedra # => "hi" (https://eval.in/353571)
[09:08:41] adaedra: don't use it as your personal irb tho
[09:08:57] Macaveli: eval: d = 9
[09:09:08] Macaveli: eval: d.strftime('%d')
[09:09:20] adaedra: Macaveli: % operator will operate replacements in source string with arguments given after
[09:09:35] adaedra: the placeholders are under the %[flags][type] format
[09:09:48] adaedra: (All decribed here http://www.rubydoc.info/stdlib/core/Kernel#sprintf-instance_method)
[09:09:49] zotherstupidguy: >> require 'date'; d = Date.parse("3rd Feb 2001"); d.strftime('%d')
[09:09:50] ruboto: zotherstupidguy # => "03" (https://eval.in/353572)
[09:10:48] Macaveli: adaedra sprintf '%02d', birthdate.month
[09:10:59] zotherstupidguy: rdark is there an on the rise opensource protocol i should use for my lil hack project?
[09:11:09] adaedra: >> sprintf '%02d', 6
[09:11:10] ruboto: adaedra # => "06" (https://eval.in/353573)
[09:11:17] Macaveli: that's it :)
[09:11:21] adaedra: which can also be written
[09:11:24] pipework: zotherstupidguy: What are you doing in this project?
[09:11:31] adaedra: >> '%02d' % 6
[09:11:32] ruboto: adaedra # => "06" (https://eval.in/353574)
[09:11:40] Macaveli: like a boss
[09:11:43] adaedra: also, if you have a Date object, zotherstupidguy is also valid
[09:11:44] zotherstupidguy: pipework well i want to make a messaging app, p2p
[09:11:48] adaedra: See Date#strfitme
[09:12:00] adaedra: String#% solution is more generic
[09:13:11] adaedra: zotherstupidguy: you may have to implement jingle yourself :/
[09:13:13] pipework: zotherstupidguy: Whale, xmpp is pretty good.
[09:13:27] adaedra: pipework: Too bad it's not widely used.
[09:13:35] pipework: adaedra: LOLOLOL
[09:14:00] pipework: It's the most widely used IM protocol in history.
[09:14:26] pipework: facebook, google, yahoo, anything jabber-based.
[09:14:27] zotherstupidguy: pipework, i doubt it beats irc!
[09:14:29] adaedra: ok, if you remove implementations which forbid inter-server communication?
[09:14:34] pipework: zotherstupidguy: It does.
[09:14:45] pipework: It might not be oldest, but it is the most proliferated.
[09:15:04] pipework: So many things have been built on it. It's been deployed in so many environments.
[09:15:04] zotherstupidguy: anybody remmbers google wave?
[09:15:12] zotherstupidguy: from google australia
[09:15:47] pipework: I tried it, didn't like the amount of flexibility. It didn't embrace new users and halp them go from beginner to power user very well.
[09:15:49] pontiki: i wish they'd kept that
[09:16:07] pontiki: but i can understand why they quashed it
[09:16:20] pipework: Ahead of its time.
[09:16:29] pipework: At least they shared it.
[09:16:50] zotherstupidguy: true, but it was meant to kill email
[09:16:57] adaedra: pipework: I think I was talking about Jabber itself
[09:17:04] pipework: adaedra: Jabber is XMPP.
[09:17:20] adaedra: the widely usable, s2s solution
[09:17:29] adaedra: not the closed thing google and facebook offers.
[09:17:33] pontiki: zotherstupidguy: i don't really think so. it extended email
[09:17:40] pipework: adaedra: The 'closed thing' you refer speaks XMPP.
[09:17:47] adaedra: yes, I know
[09:17:59] pipework: It's closed in the same way that it has protocols and routing rules.
[09:18:29] adaedra: But I wished it would be possible to use it as planned, decentralized, open
[09:18:31] zotherstupidguy: any idea what viber and whatsapp uses?
[09:18:36] pipework: adaedra: It is.
[09:18:41] pipework: The protocol is all you need.
[09:18:59] adaedra: there's noone on this
[09:19:07] adaedra: everyone is on closed implementations
[09:19:14] pipework: That's some serious bullshit.
[09:19:25] adaedra: no it isn't
[09:19:34] pipework: A minute ago you were saying no one uses XMPP, I don't think you're an expert on this topic.
[09:19:35] zotherstupidguy: pipework please elobrate
[09:19:49] adaedra: ok, misunderstanding
[09:19:53] pipework: But I'm sure your 2 minute google spree makes you one.
[09:20:02] pipework: zotherstupidguy: On what?
[09:20:06] adaedra: this is becoming insulting
[09:20:12] rdark: facebook chat is based on XMPP, as is hipchat
[09:20:23] rdark: I think slack is as well
[09:20:26] zotherstupidguy: hipchat is a mobile app?
[09:20:34] pipework: And many other things, even non-IM messaging systems.
[09:20:35] rdark: they have a mobile app
[09:20:37] pipework: zotherstupidguy: It's a service.
[09:20:58] zotherstupidguy: cool, its hard to keep track of all the things!
[09:21:05] rdark: if you're just doing text-based chat, XMPP is probably the default choice
[09:21:20] zotherstupidguy: i appreciate adaeadra input to the discussion nevertheless :)
[09:21:55] zotherstupidguy: rdark is xmpp p2p?
[09:22:08] pipework: XMPP is a protocol, and that's the only thing that needs to be open and describe a system for decentralization. The rest is up to routing/networking and the freedom of others to choose to allow federation to extend to networks outside of their control.
[09:22:09] rdark: nope - s2s or c2s
[09:22:14] rdark: jingle is p2p
[09:22:21] pipework: There is... ^
[09:23:09] zotherstupidguy: https://xmpp4r.github.io/ is outdated?
[09:23:15] adaedra: pipework: I know what XMPP is, I know it's widely used under the hood by many services, I used many things based on it. What I was noticing, is that most of the time, those are closed platforms which are preferred - you named a lot of them - and a lot less of people seems to be using the jabber thing - s2s, with open communication outside, that's all
[09:23:40] pipework: adaedra: Each one of those services work with XMPP clients.
[09:23:46] pipework: That's really all that matters.
[09:23:46] adaedra: yes, they do
[09:24:02] adaedra: but they can't inter-communicate with other servers, or personnal ones
[09:24:09] pipework: In what way?
[09:24:39] adaedra: I can't with a @facebook.com xmpp address communicate with a person in the @google.com server
[09:24:47] zotherstupidguy: a google account can talk to yahoo account, right?
[09:24:57] zotherstupidguy: linux pidgin thingy
[09:24:59] rdark: zotherstupidguy: google killed s2s a while back
[09:25:05] pipework: Choosing not to interoperate between other networks is a choice of the network operator, and not a limitation of the protocol.
[09:25:07] adaedra: Last time I tried getting out of @google zone, it didn't work
[09:25:12] adaedra: No, I know
[09:25:24] adaedra: I used XMPP with s2s and chat rooms, it was nice
[09:25:29] pipework: There is implementations that you can run on your own server that handle forwarding.
[09:25:41] atmosx: ACTION has a jabber account
[09:25:45] zotherstupidguy: xmpp extenstion?
[09:26:01] adaedra: I have some of them somewhere, but don't use them, without anyone to talk to :x
[09:26:12] adaedra: everyone is on Google Talk or Facebook Chat :x
[09:26:22] rdark: I was running ejabberd at $dayjob for a while
[09:26:30] zotherstupidguy: if google is using xmpp, how they do the VoIP, jingle?
[09:26:31] pipework: I'm glad that my jabber client allows multiple accounts.
[09:26:51] pipework: zotherstupidguy: I'm not personally sure. I bet it's a proprietary solution on top though.
[09:27:14] adaedra: pipework: that also means that if someone has a Google Talk account and gives it to you, you *have* to have a Google account to communicate with him.
[09:27:18] pipework: Though I heard something about XMPP not being the real base of google talk's platform anymore, though they support that interface.
[09:27:23] pipework: adaedra: So?
[09:27:31] pipework: It's not like they're not free.
[09:27:38] adaedra: So if I don't want to have a google account, I can't discuss.
[09:27:47] pipework: Sounds like a funny problem to have.
[09:27:59] pipework: My XMPP client supports OTR.
[09:28:04] pontiki: imagine if your phone worked like that
[09:28:04] zotherstupidguy: they key here is to be free
[09:28:12] adaedra: +1 pontiki
[09:28:18] pipework: pontiki: That I had to sign up for services to use them?
[09:28:31] pontiki: now imagine if phone communication were completely unregulated
[09:28:35] pipework: Don't we already have that with everyone and their dog having apps on the store?
[09:28:38] adaedra: I don't have a Facebook account, so I can't chat with people on this platform
[09:28:46] pipework: adaedra: Sounds entirely reasonable.
[09:28:54] pontiki: that you have to sign up for whatever service one of your mates is on to call them on the phone
[09:29:01] pipework: There's not much of a benefit for facebook to allow communication outside of their realm of control.
[09:29:05] adaedra: pipework: with open platform and s2s available, this would not be a problem.
[09:29:10] zotherstupidguy: we are discussing the protocol not the services...
[09:29:17] pontiki: and to talk on the phone to all your mates, you need to sign up for a dozen different services
[09:29:25] adaedra: If having accounts everywere is not a problem for you, good for you then.
[09:30:00] pipework: adaedra: 1password or keepass
[09:30:04] pontiki: the reason you only need to have one phone service to talk to nearly everyone in the world is because phone service, and especially service interconnects, are *highly* regulated
[09:30:11] adaedra: pipework: not the issue
[09:30:20] pontiki: it's not the protocols
[09:30:24] pontiki: it's the social question
[09:30:26] pipework: adaedra: Some silly personal issue with signing up for a service is?
[09:30:42] adaedra: That's a choice
[09:31:03] pipework: It's a choice to not allow communication outside your realm of control.
[09:31:11] pontiki: IM client authors came up with the best solution
[09:31:13] pipework: pontiki: Who are you to try to force someone to provide a service to users they can't benefit from?
[09:31:21] zotherstupidguy: personally all i care about is the rise and fall of a communication protocol,
[09:31:22] pontiki: clients that can connect on multiple services *simultaneously*
[09:31:38] pontiki: pipework: i'm the government and i'm here to help
[09:31:43] pipework: pontiki: :D
[09:31:45] pipework: I could use a drink then.
[09:32:03] adaedra: pipework: and with inter-communication of services, this would not be a problem, that's my point.
[09:32:18] adaedra: "realm of control" tssk.
[09:32:19] pipework: adaedra: There is zero benefit for google or facebook to allow it.
[09:33:02] adaedra: But there's an open playspace outside of google and facebook.
[09:33:03] pipework: I mean, you can say 'no' all you like, I don't think it matters one iota worth of difference to them.
[09:33:40] adaedra: It's not to make a difference to them.
[09:34:15] pipework: Then I think we're at a point where there's no point in further discussing the issue.
[09:34:23] pipework: zotherstupidguy: XMPP is great.
[09:37:03] pipework: http://xmpp.org/extensions/xep-0297.html is the forwarding mechanism, iirc.
[09:39:33] pontiki: i want more tv shows to use Massive Attack music
[09:39:47] pontiki: they really need to
[09:41:21] zotherstupidguy: pipework thankx
[09:41:33] zotherstupidguy: pontiki i like dubstep now :)
[09:41:49] wasamasa: ACTION roasts zotherstupidguy 
[09:42:04] zotherstupidguy: pontiki i bought a samsung muse mp3player filled it with dubstep and its cool
[09:42:05] atmosx: like a soul without a mind, in a body without a heart...
[10:58:13] negev: hi, i'm using erubis as a very basic CGI handler. how can i access the POST data?
[11:17:52] mistnim: hello, can you explain me this behaviour? http://paste.debian.net/176246/
[11:19:10] adaedra: >> defined? t
[11:19:11] ruboto_: adaedra # => nil (https://eval.in/353923)
[11:20:02] adaedra: do you not just want t ||= 3 ?
[11:20:22] mistnim: adaedra: what does ||= mean?
[11:20:34] adaedra: same as t = t || 3
[11:21:02] mistnim: I want t to be = 3
[11:21:04] adaedra: not exactly same, but that's the idea
[11:21:22] adaedra: If I read your code, you want it to be 3 if not defined, no?
[11:21:55] adaedra: ||= will set the variable if it's not defined or falsy
[11:22:21] mistnim: adaedra: got it, why that code doesn't work though?
[11:22:36] toretore: mistnim: your question has been answered in #ruby-lang
[11:22:53] toretore: it is a peculiarity of the way it gets interpreted
[11:24:04] Hanmac1: defined? also shows the tiny difference between "-1" and "- 1" ;P
[11:28:17] mistnim: adaedra: btw there is a problem with t ||= 3, t will get assigned every time to 3, not just when it's not defined
[11:28:53] adaedra: >> t ||= 3; t ||= 4; t
[11:28:54] ruboto_: adaedra # => 3 (https://eval.in/353930)
[11:28:59] adaedra: works for me?
[11:29:03] toretore: mistnim: why are you using defined? anyway?
[11:29:27] toretore: t ||= 3 works, but not for the reason you think it does
[11:29:40] mistnim: toretore: how does it work?
[11:29:59] toretore: it's already been explained
[11:30:16] mistnim: I missed it
[11:30:19] toretore: here's a better example:
[11:30:37] toretore: >> if false; n = 3; end; n
[11:30:38] ruboto_: toretore # => nil (https://eval.in/353931)
[11:31:05] ruboto_: toretore # => undefined local variable or method `n' for main:Object (NameError) ...check link for more (https://eval.in/353932)
[11:31:54] toretore: anyway, tell us why it is that you want to do this instead, it sounds like there should be a better way
[11:32:49] mistnim: toretore: define a global variable in a function and the next time it is called it should still exist but the value shouldn't be changed
[11:33:46] mistnim: but yeah, it's probably not a good practice, and it's better to define the variable outside of the method
[11:33:51] toretore: gist your code
[11:33:58] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[11:34:02] ruboto_: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[11:34:47] toretore: global variables behave differently from local variables
[11:34:55] toretore: specifics matter
[11:35:30] mistnim: toretore: there is no code, it's just an idea
[11:36:31] toretore: why do you want to do this?
[11:37:20] mistnim: toretore: keeping the definition of the global variable close to where it is used (in the method)
[11:38:09] toretore: no, i mean *why*.. what is the purpose of the whole thing?
[11:38:32] mistnim: toretore: let's say I want to keep track of how many time the methods was called
[11:38:39] Hanmac1: mistnim: hm are you sure you want a global variable and not a instance variable?
[11:39:25] mistnim: hanmac1 what if I'm not in a class
[11:39:55] Hanmac1: mistnim: nearly everything is an object and can have instance variables
[11:40:46] mistnim: hanmac even a method in the topmost level?
[11:42:14] toretore: mistnim: is this just for excercise or curiosity?
[11:42:38] toretore: because if so that's ok, but for real code there's most likely a better way
[11:43:00] toretore: and to find that way you have to explain its real purpose
[11:43:54] mistnim: toretore: how would you track how many times a method is called? (a method defined outside a class)
[11:44:16] toretore: why would i?
[11:45:20] Hanmac1: mistnim: toplevel is still main object
[11:45:24] toretore: i feel like you're trying to achieve something specific, but you won't share that with us
[11:45:47] toretore: and without knowing that we can only give shitty advice to shitty problems
[11:48:02] mistnim: toretore: I understand what you mean, it depends on the context, I'll try to come up with a real situation you might want it
[11:49:49] mistnim: now I have to go, thanks though
[11:58:02] arup_r: Hi All... Hope you are doing well!
[12:39:08] arup_r: Need help...
[12:40:29] arup_r: This is a working method.... https://github.com/aruprakshit/music_track/blob/master/lib/tasks/csv.rake#L22-L54 ... But my pain point is my system is crashing after processing 1 lakhs recorrds.. and my csv has 3-4 lakhs or more
[12:40:38] arup_r: How can I speed up this ?
[12:43:14] pipework: What's a lakh?
[12:43:25] toretore: it's 100k or 10k
[12:43:29] arup_r: https://gist.github.com/aruprakshit/4fc6586cea2402754456
[12:43:56] pipework: I love `parallel`
[12:44:02] arup_r: pipework: sorry.. that's Indian term.. it means 1,00,000
[12:44:33] arup_r: toretore: 100k :)
[12:44:50] arup_r: pipework: means threading ?
[12:45:27] pipework: arup_r: man parallel would tell you more than I can.
[12:45:34] toretore: well, first of all, define what "crashing" means
[12:46:15] arup_r: system is getting shut down toretore: :( 3 times I ran this.. and after 25 mins.. it is shutting down abruptly..
[12:46:45] arup_r: after that if I count my model.. it is showing 70K to 80K records are there
[12:46:48] toretore: did you yank out the power cable, or did the power go out?
[12:46:56] arup_r: nothing.. I did..
[12:47:04] arup_r: I was doing otherwork..
[12:47:11] arup_r: and it went down
[12:47:21] toretore: *what* "went down"?
[12:47:28] arup_r: shut down...
[12:48:33] arup_r: you didn't get me ?
[12:49:32] arup_r: my laptop "shut down" .... no power cut.. and nothing...
[12:50:10] arup_r: anyway.. 3 times I ran this script and it happened.... so I thought might be the script is causing havey CPU load or something else...
[12:50:44] arup_r: I need to make this script "parallel" for faster processing.. pipework: said..
[12:50:57] pipework: arup_r: No, I said to use the tool called parallel
[12:51:08] arup_r: Thread is very heard concept :)
[12:51:24] pipework: arup_r: `man parallel`
[12:51:24] arup_r: pipework: I got you..
[12:51:29] toretore: it'll solve your problems
[12:51:32] pipework: No thread needed on your end.
[12:51:47] pipework: toretore: I don't know, you still are reading in all that data and hoping GC releases properly.
[12:51:56] pipework: I've had issues with this very problem
[12:52:07] arup_r: toretore: `actor` is a Gem ?
[12:52:09] pipework: GC just isn't aggressive enough.
[13:01:15] arup_r: toretore: I am sorry.. I didn't get what you have suggested
[13:05:42] arup_r: pipework: Are you saying to write code shell scripting like this -- http://www.gnu.org/software/parallel/man.html#EXAMPLE:-Working-as-mutex-and-counting-semaphore ?
[13:07:07] pipework: arup_r: Something like that, yeah. The idea is that you'd use awesome unix tools to feed the data into your ruby process in small chunks, which you'd handle and then exit the process correctly.
[13:11:50] arup_r: pipework: humm.. I just gave it a quick look -- http://www.gnu.org/software/parallel/parallel_tutorial.html#Chunk-size ... But thing is if I try it in windows it will be broken,, as I don't know what OS my client do use ....
[13:21:48] arup_r: pipework: I will use `http://www.postgresql.org/docs/9.3/static/sql-copy.html` this.. I hope it will be fastest,,,
[13:23:52] arup_r: workmad3: o/
[13:29:25] arup_r: pipework: and using this Rake command.. http://ruby-doc.org/stdlib-2.2.1/libdoc/rake/rdoc/FileUtils.html#method-i-sh let's see how it behaves
[13:31:45] pipework: arup_r: Yeah, what I bet you're seeing is that you're eating gobs of memory while parsing out this CSV
[13:32:03] arup_r: humm.. I feel so
[13:32:26] mwlang: arup_r: one approach I???ve used successfully is to build up a SQL file that can be batch loaded by the database tools? This almost always an order of magnitude faster than ActiveRecord in a loop.
[13:33:00] arup_r: pipework: one advice.. Would you agree if I use postgres native command ?http://postgresguide.com/utilities/copy.html
[13:34:20] pipework: I've tried many approaches to handle huge CSVs in a single process, and while I haven't exhausted every option, I found that by essentially breaking up the work and passing it into ruby, that I was able to keep the transformations in ruby, but I had to create and throw away processes to sidestep whatever is preventing strings from not being garbage collected properly.
[13:34:28] pipework: It was causing a leak of sorts.
[13:34:41] pipework: arup_r: I'm not familiar with it personally. I don't see a problem with it though.
[13:35:25] arup_r: ok.. thanks for the input..
[13:35:58] arup_r: I think Rake's `sh` will handle OS related stuff too.. Let me give it a try and I'll let you know.. how it works
[13:36:41] arup_r: Bye all..
[13:57:57] sarkyniin: I'm having trouble installing nokogiri
[13:58:04] sarkyniin: and I can't seem to figure out what's the issue
[13:58:37] sarkyniin: https://waa.ai/v3PW
[13:59:22] adaedra: Paste /tmp/bundler20150513-5026-17q8k40/nokogiri-1.5.0/extensions/x86_64-linux/2.2.0/nokogiri-1.5.0/gem_make.out too please.
[14:00:22] Hanmac1: sarkyniin: try to install newer one like nokogiri "1.6.*"
[14:00:39] sarkyniin: hanmac1: one of my gems seem to need the older version
[14:00:54] sarkyniin: also adaedra
[14:01:09] sarkyniin: the /tmp/bundler-xxxx folder is empty
[14:01:38] adaedra: try to install it by hand through gem, bundler may clean its directories.
[14:02:07] Hanmac1: sarkyniin: you can try first to install the newer version of nokogiri, if that works then you know where the problem is ... if you cant install the newer version then the problem is somewhere else
[14:02:29] sarkyniin: looks like installing through gem
[14:03:12] sarkyniin: doing "gem install nokogiri -v '1.5.0'" fails btw
[14:05:42] sarkyniin: here's the content of the generated gem_make.out when using gem install: https://waa.ai/v3PP
[14:05:56] Hanmac1: hm yeah ok then it seems that this nokogiri seems to old for your ruby ... maybe you should see what gem does need that version and get it updated
[14:10:52] sarkyniin: it's strange
[14:10:59] sarkyniin: installing all the gems in the gemfile manually
[14:11:03] sarkyniin: with gem install produces no error
[14:11:15] sarkyniin: but doing so with bundle gives me an error
[14:12:32] Hanmac1: hm one of the reasons i never does trust bundler ;P
[14:13:03] mozzarella: are you sure you have installed the right version of every gem, and not just teh latest?
[14:16:45] sarkyniin: mozzarella: my gemfile just contains the latest versions
[14:16:46] sarkyniin: of every gem
[14:23:39] Hanmac1: i hate rubocop more and more ... the next joke it gots is: "Do not use parallel assignment." ... very funny when it also says: "Dont use methods longer than 10 lines" ... and now i want to ask you guys: HOW THE FUCK should i do that WITHOUT "parallel assignment"? ... PS: ther is also a "Dont use classes with more than 10 methods" or something -.-
[14:24:55] adaedra: hanmac1: tweak it
[14:25:34] Hanmac1: adaedra: hm yeah i could change rubocop so that my stuff does pass the tests ;P
[14:25:50] adaedra: it's made to be tweaked
[14:26:14] adaedra: if you find that some of the limits are too low, and think it's fine, make them higher, or remove the cops
[14:26:27] ddv: hanmac1: nothing wrong with that
[14:26:56] ddv: hanmac1: don't blame rubocop when your code sucks
[14:27:52] pipework: ddv: rubocop's rules aren't reflectant of what I consider beautiful code.
[14:27:58] Hanmac1: ddv there is everything wrong with that ... i cant write that script if i should put nearly every line into an extra function and each 10 functions into an extra class ...
[14:28:08] pipework: If matz included a ruby version of gofmt, I'd consider that canonical.
[14:28:27] Hanmac1: also hands up when you did wrote a class with more than 10 methods
[14:28:43] adaedra: >> String.instance_methods.count
[14:28:44] ruboto_: adaedra # => 168 (https://eval.in/354484)
[14:28:45] pipework: ACTION keeps his hands down
[14:44:18] w0jtas: hello, i am trying to upload file using fog-google gem, but i don't know where to pass project-id, anybody could help me ?
[14:44:36] pontiki: i don't so much mind rubocop as an advisory, but putting it in between a commit or push is heinous project management
[14:53:38] Encapsulation: can ruby do everything c++ can do?
[14:53:55] toretore: everything c++ can do ruby can do better
[14:54:07] adaedra: (I wouldn't go as far as this)
[14:54:33] Encapsulation: can you use python or c code inline
[14:54:38] apeiros: Encapsulation: no. but you can always write in C/C++ if you need.
[14:54:46] Encapsulation: how can I access sensors etc I use c and python libraries for
[14:54:58] Encapsulation: but built my larger app in ruby perhaps
[14:54:58] apeiros: that depends on the sensors.
[14:55:18] Encapsulation: well I'm interffacing with boards over i2c, as well as gpio pins
[14:56:24] adaedra: How do you access them in C/C++?
[14:56:29] apeiros: I have no personal experience. but afaik many sensors can be read like a regular file/socket.
[14:56:50] Encapsulation: the i2c stuff and one of the sensors I'm using c and C++ libraries
[14:56:59] Encapsulation: the other sensor is bitbang reads over gpio
[14:57:31] Encapsulation: I'm using a c library for that as well
[14:57:42] Encapsulation: I know I can do gpio stuff on my pi with pi-piper ruby library
[14:57:48] Encapsulation: but these sensors I'm concerned about
[14:57:59] Encapsulation: I was also shocked to see how easy it looked to start watches and enable concurrency?
[14:58:02] Darkwater: generally, ruby can do everything c++ can do because you can compile and ron c++ with ruby :v
[14:58:10] ponga: ruby shoes irc channel ? anyone know where it is?
[14:58:22] Encapsulation: so I can use these libraries in my ruby program?
[14:58:26] apeiros: ponga: use the alis service?
[14:58:28] Encapsulation: call some c++ function
[14:58:33] Encapsulation: have it return back a value into my rubvy code
[14:58:37] Darkwater: not like that, at least not easily
[14:58:44] apeiros: Encapsulation: yes, you can write native extensions
[14:58:47] ponga: apeiros: sorry but what is alis?
[14:58:54] adaedra: There's ffi too
[14:58:59] apeiros: ponga: like chanserv and nickserv, a service
[14:59:02] Encapsulation: is this diffficult to do?
[14:59:03] apeiros: ponga: /msg alis help
[14:59:16] Encapsulation: I would be switching to ruby because iot looks like I could rebuild my software in half the time and it would be better
[14:59:31] Encapsulation: I also want a web interface and I think ruby would mesh well with that?
[14:59:36] adaedra: Encapsulation: calling C is easy, C++ less because of mangling.
[15:00:04] Encapsulation: they might both be c libraries
[15:00:27] toretore: Encapsulation: are you not happy with python/c/c++? why do you think it'll be easier/better with ruby?
[15:00:34] adaedra: Encapsulation: https://github.com/ffi/ffi
[15:01:12] Encapsulation: well I'm just starting out and c++ is so convoluted. It's a love hate relationship
[15:01:17] Encapsulation: so I'm browsing the market
[15:01:26] Encapsulation: I'm looking at python as well
[15:01:33] Encapsulation: concurrency is confusing me for sure
[15:01:37] toretore: so you don't have much experience with those?
[15:01:41] adaedra: python is known to be great at low level
[15:01:48] Encapsulation: I need to poll from sensors and have objects change state and call methods at intervals and in reaction to sensors etc
[15:02:02] Encapsulation: right now I'm spawning threads and detatching them and they watch global bools
[15:02:06] Encapsulation: and its probably a big fing mess
[15:02:16] Encapsulation: so I'd like to do it right, and pick the best language for the application as well this time
[15:02:49] Encapsulation: I'm only about one semester in to coding
[15:02:52] ponga: ok im throwing away shoes and use gud ol' java swing
[15:03:12] adaedra: Encapsulation: you may also mix and make all interract
[15:03:29] adaedra: The low level stuff in C++, the high level in Ruby
[15:04:47] toretore: Encapsulation: if you're doing mostly i/o, look into using select
[15:04:50] Ulrar: Hi, I did a gem install compass, and it did create a /usr/local/bin/compass which seems to work fine as root, but throws error about not finding compass when ran as a user
[15:05:03] Encapsulation: toretore what it boils down to is that I need to read from sensors
[15:05:05] Ulrar: Is there some procedure to apply when trying to install gems ?.
[15:05:06] Encapsulation: and run timers and call funcs
[15:05:09] Encapsulation: indepedent from the users ios
[15:05:14] Encapsulation: I don't want to break io
[15:05:23] Encapsulation: I got myself stuck in an infinite menu loop in my c++ code
[15:05:26] Encapsulation: and I use threads to solve it
[15:05:28] Encapsulation: but It hink thats bad
[15:05:34] Encapsulation: I could use a web interface witrh ruby
[15:05:41] Encapsulation: and do this properly? is there a tutorial somewhere
[15:05:45] Encapsulation: on how to have concurrency like this
[15:05:52] Encapsulation: provide user io but also run the system
[15:06:07] Encapsulation: I can't have a timer stop while getting input from a user, iof that makes sense
[15:06:18] toretore: Encapsulation: there is no simple answer or solution to concurrency problems
[15:06:27] toretore: it always depends on the situation
[15:06:33] Ulrar: adaedra: Fancy seeing you there
[15:06:46] toretore: and ou always have to understand what's going on in order to make it work properly
[15:06:59] adaedra: Ulrar: what system?
[15:07:14] Ulrar: adaedra: debian 7
[15:09:08] adaedra: Ulrar: nothing like rbenv/rvm on the user side that may interfere?
[15:09:48] Ulrar: adaedra: Not that I know of, created that user half an hour ago, the client only uploaded his code
[15:10:39] adaedra: Ulrar: `gem env` says what?
[15:11:30] Ulrar: adaedra: http://dpaste.com/0ZM0VR1
[15:12:00] adaedra: ruby 1.9.3
[15:13:37] Ulrar: when I gem install compass the binary is root:staff with 700 permissions
[15:13:45] adaedra: Ulrar: and as root, along with `gem which compass` ?
[15:14:08] Ulrar: the env seems to be the same, and the which : /var/lib/gems/1.9.1/gems/compass-1.0.3/lib/compass.rb
[15:14:38] Ulrar: /var/lib/gems/1.9.1/gems/compass-1.0.3/lib/compass.rb seems to have ridiculous permissions too
[15:14:43] Ulrar: Guess that's the problem
[15:15:21] adaedra: If you're in deployment process and have a Gemfile, using bundle with local path may be a solution (bundle install --path ...)
[15:15:22] Ulrar: /var/lib/gems is 700
[15:15:28] Ulrar: That's a problem.
[15:15:51] Ulrar: adaedra: Yeah I have no idea about what the client is trying to do, he just wants the command "compass" to work
[15:16:18] Ulrar: chmod 755 -R /var/lib/gems solves it
[15:16:30] Ulrar: We'll go with that then, thanks
[15:31:08] adaedra: Encapsulation: looked at https://github.com/eventmachine/eventmachine ?
[15:31:52] adaedra: There's https://celluloid.io too
[15:41:49] arup_r: from where the error is coming ? https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67
[15:43:04] that1guy: https://github.com/Willardgmoore/Learn-to-program/blob/master/6.4 Why is line 1's result different than line 2?
[15:43:29] ruboto_: havenwood # => 0 (https://eval.in/354729)
[15:43:49] ruboto_: havenwood # => (1/2) (https://eval.in/354730)
[15:44:14] K-LINE: I HATE NIGGERS!!!!!!!!!!!!!!!!! ?????????????????????????????????????????????????????????????????????????????????????????????????????????
[15:44:15] ziggles: Any opinions on The Ruby Way by Hal Fulton (3rd edition) ?
[15:44:20] ruboto_: sepp2k, fflush, apeiros, seanstickle, Mon_Ouie, zzak, banisterfiend, Radar, Havenn, Karpah, jhass, workmad3, miah, Coraline
[15:44:25] havenwood: !mute K-LINE
[15:44:25] ruboto_: -o ruboto_
[15:44:38] adaedra: too slow :o
[15:44:55] havenwood: adaedra: ;)
[15:45:01] adaedra: havenwood: you're not in the !ops list?
[15:45:12] havenwood: adaedra: I'm Havenn
[15:45:35] adaedra: this defeats the purpose of the hightlight :x
[15:45:50] KLINE_: hello again =D
[15:45:56] jhass: !mute KLINE_
[15:45:57] ruboto_: -o ruboto_
[15:45:58] KLINE_: ??????????????????????????????????????????
[15:46:24] KLINE_: DIE JUDEN WIR MUSSEN AUSROTTEN ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[15:46:30] jhass: !kick KLINE_
[15:46:30] helpa: jhass: No.
[15:46:30] ruboto_: ruboto_ kicked KLINE_:
[15:46:30] ruboto_: -o ruboto_
[15:46:46] jhass: apeiros: with op bug ^
[15:46:58] jhass: !ban KLINE_ !T 1d bye
[15:46:58] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:46:58] ChanServ: +b KLINE_!*@*
[15:46:58] ChanServ: ChanServ kicked KLINE_: bye
[15:47:39] KLinedd: YOU CAN'T BAN ME =D
[15:47:40] jhass: !ban KLINE_ !T 1d bye
[15:47:40] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:47:40] ruboto_: jhass, could not find a matching user for "KLINE_"
[15:47:46] jhass: !ban KLINE__ !T 1d bye
[15:47:46] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:47:47] ChanServ: +b KLINE__!*@*
[15:47:47] ChanServ: ChanServ kicked KLINE__: bye
[15:48:03] dudedudeman: ha, watching a ban happen is quit fun
[15:48:20] jhass: !ban KLINE___ !T 1d bye
[15:48:20] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:48:20] ruboto_: jhass, could not find a matching user for "KLINE___"
[15:48:23] jhass: !ban KLINE_____ !T 1d bye
[15:48:23] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:48:25] arup_r: ^^ hehehehe
[15:48:38] ChanServ: +b *!*@gateway/web/freenode/ip.
[15:48:38] ChanServ: ChanServ kicked KLINE_____: bye
[15:48:41] arup_r: he is powerful...
[15:48:43] pontiki: need a better hostmask for that ban
[15:48:49] pontiki: there we go
[15:48:55] that1guy: what does the r stand for in 1/2r?
[15:49:00] adaedra: That1Guy: rationnal
[15:49:06] havenwood: That1Guy: Rational literal
[15:49:10] adaedra: >> (1/2r).class.name
[15:49:11] ruboto_: adaedra # => "Rational" (https://eval.in/354761)
[15:49:30] arup_r: jhass: you own......... :D
[15:49:48] arup_r: Now.. teach me some Ruby...
[15:49:49] adaedra: he may come back
[15:49:59] adaedra: those people are always really resourcefull
[15:50:08] _KLINE__: HI NIGGERS =D
[15:50:09] arup_r: why i am getting that error ....
[15:50:11] jhass: !ban _KLINE__ !T 1d bye
[15:50:11] helpa: Radar, you should ban the person highlighted, signed jhass.
[15:50:12] ChanServ: +b _KLINE__!*@*
[15:50:12] ChanServ: ChanServ kicked _KLINE__: bye
[15:50:15] adaedra: what did I say
[15:50:16] arup_r: OMG.........
[15:50:23] that1guy: Cool website, I haven't seen eval.in before.
[15:50:25] arup_r: adaedra: humm.... :/
[15:50:28] adaedra: jhass: maybe just bam *KLINE*
[15:50:45] jhass: then he'll pick nicks that I need longer to tab complete :P
[15:50:45] that1guy: Any other cool tips for a student like me?
[15:50:59] havenwood: adaedra: But all those non-troll HAPPY_KLINE and KLINE_FLAVORED_ICE_CREAM, etc.
[15:51:17] jhass: That1Guy: know pry?
[15:51:19] adaedra: havenwood: for the time being. Reducing the noise for a while.
[15:51:30] havenwood: adaedra: :)
[15:51:31] adaedra: arup_r: what, hum.
[15:51:47] that1guy: :jhass what's that?
[15:51:54] ruboto_: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[15:51:55] havenwood: That1Guy: Here's another nifty REPL, but this one is mruby and runs in your browser: https://joshnuss.github.io/mruby-web-irb/
[15:51:56] arup_r: Why the error is coming ? https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67
[15:52:02] dyce_: Q-Line the name k-line
[15:52:20] adaedra: That1Guy: short answer: your best friend.
[15:52:44] havenwood: Especially nice ones.
[15:54:17] arup_r: resolved..anyway
[15:55:33] havenwood: arup_r: With `<<END` you can't have any spaces or indentation before the `END` but with `<<-END` you can.
[15:56:13] arup_r: EOF was the problem.. I removed it and it is working....
[15:56:33] that1guy: It looks like pry is mostly for those that are working straight in irb
[15:56:48] adaedra: That1Guy: it replaces irb
[15:57:00] adaedra: But it's really helpful for experimenting and debugging
[15:57:13] adaedra: couple it with pry-byebug and you got a really great tool
[15:57:24] nobitanobi: when doing hsh.key?(arg) - Is it idiomatic to call it without () ? In the style guide: https://github.com/bbatsov/ruby-style-guide it says: "Omit parentheses in methods that have "keyword" status in Ruby (e.g. attr_reader, puts)" What does keyword status mean?
[15:58:03] adaedra: nobitanobi: methods you usually call like that without giving an explicit object (e.g. attr_reader, puts)
[15:58:21] nobitanobi: adaedra: ok. So key? should have parentheses
[15:58:21] adaedra: I hope g has disabled highlights.
[15:58:28] nobitanobi: thanks adaedra
[15:58:42] havenwood: nobitanobi: There isn't a single right way to do parens in Ruby, but most everyone agrees not to use them in certain circumstances (but there are exceptions where you need to). I often follow Seattle style where you omit parens unless it breaks the interpreter.
[15:58:42] adaedra: nobitanobi: I'd say it depends
[15:58:53] adaedra: people like to leave parenthesis out
[15:59:21] adaedra: nobitanobi: so you do def a b, c, d ?
[16:02:51] jhass: -b lnr!*@*$##ruby-fix-your-connection
[16:02:54] jhass: -b BlackGear!*@*$##ruby-fix-your-connection
[16:02:56] jhass: -b *!*@*
[16:02:58] jhass: -b *!d8b93a82@gateway/web/cgi-irc/kiwiirc.com/ip.
[16:03:00] jhass: -b *!*@gateway/web/cgi-irc/kiwiirc.com/ip.
[16:03:02] jhass: -b *!41310e96@gateway/web/cgi-irc/kiwiirc.com/ip.
[16:03:04] jhass: -b *!41310e90@gateway/web/cgi-irc/kiwiirc.com/ip.
[16:03:06] jhass: -b *!*@*
[16:03:08] jhass: -b *!*@nat136.dc-uoit.net
[16:03:10] jhass: -b *!*@
[16:03:12] jhass: -b *!*@149-210-139-141.colo.transip.net
[16:03:14] jhass: -b *!*@c-174-63-172-191.hsd1.fl.comcast.net
[16:03:16] jhass: -b *!*@
[16:03:18] jhass: -b reinaldob!*@*$##ruby-fix-your-connection
[16:03:20] jhass: -b *!*@
[16:03:22] jhass: -b *!*@gateway/web/freenode/ip.
[16:03:22] dudedudeman: jhass is angry
[16:03:24] jhass: -b *!*@
[16:03:26] jhass: -b rocknrollmarc!*@*$##ruby-fix-your-connection
[16:03:28] jhass: -b *!*@gateway/web/freenode/ip.
[16:03:30] jhass: -b *!670ac5da@gateway/web/freenode/ip.
[16:03:32] jhass: -b *!b2a2d08e@gateway/web/freenode/ip.
[16:03:34] jhass: -b *!97ec1a69@gateway/web/freenode/ip.
[16:03:36] jhass: -b *!258f0e9d@gateway/web/freenode/ip.
[16:03:38] jhass: -b *!92b911a2@gateway/web/freenode/ip.
[16:03:40] jhass: -b *!4524bc19@gateway/web/freenode/ip.
[16:03:40] dudedudeman: ACTION bows to the great and mighty jhass
[16:03:42] jhass: -b *!cdcc5516@gateway/web/freenode/ip.
[16:03:44] jhass: -b *!b043ac55@gateway/web/freenode/ip.
[16:03:46] jhass: -b *!b23ef973@gateway/web/freenode/ip.
[16:04:01] jhass: gotta make some room in the banlist...
[16:04:30] adaedra: that's some cleaning
[16:04:32] mozzarella: we need a bigger banlist
[16:04:45] jhass: +q *KLINE*!*@gateway/web/freenode/*
[16:04:50] dudedudeman: can it only be of a certain size?
[16:05:22] adaedra: you could use the banlist to store data
[16:05:27] adaedra: encoded as base64
[16:06:28] mwlang: havenwood: ???seattle style??? ?
[16:06:36] gambl0re: i'm doing puts ?A but irb is not return the ASCII value, its just print A
[16:06:38] wasamasa: adaedra: lol
[16:07:07] jhass: gambl0re: yes, whatever you're reading that told you otherwise is ancient, pick a better resource
[16:07:25] adaedra: It's .ord iirc
[16:07:30] adaedra: >> 'A'.ord
[16:07:31] ruboto_: adaedra # => 65 (https://eval.in/354796)
[16:07:56] Diranged: Can I make my Gemfile (and even Gemfile.lock) support both Ruby 1.8 and 1.9?
[16:08:09] havenwood: mwlang: It's the style Seattle.rb uses and they have some prominent projects, including some that ship with Ruby. :)
[16:08:15] adaedra: Diranged: why would you?
[16:08:19] Diranged: (Don't start in on the obvious .. 1.8 is deprectated. This is a transitional thing)
[16:08:30] jhass: Diranged: it should by default, but note that both of those versions are out of official security maintenance
[16:08:35] adaedra: I'd say it's technically possible
[16:08:36] havenwood: Diranged: Both 1.8 and 1.9 are past end-of-life, but yeah as long as the gems work on both.
[16:08:44] Diranged: So the problem is the versins of packages are different
[16:08:54] Diranged: So right now our Gemfile is very specific to 1.8??? listing a ton of old packages that are 1.8 specific.
[16:09:08] adaedra: It's a Ruby file, you could do if RUBY_VERSION :??
[16:09:16] Diranged: adaedra: ahhh
[16:09:21] jhass: that's not good for the .lock though
[16:09:23] havenwood: Diranged: And the Gemfile is Ruby.
[16:09:28] jhass: bundler 1.10 will support conditional gems
[16:09:37] adaedra: Yeah, the .lock is a problem
[16:09:49] jhass: pre release is available, so you could give it a try
[16:10:00] adaedra: jhass: tbf, this problem also exist when you have a Gemfile with differences between ruby and jruby
[16:10:05] gambl0re: who would i inverse A.ord to get the ascii value and find it's character?
[16:10:13] havenwood: gambl0re: chr
[16:10:20] jhass: adaedra: that can be handled with platform already, no?
[16:10:35] adaedra: jhass: Gemfile.lock is different if I remember correctly
[16:10:50] jhass: I doubt it
[16:11:10] gambl0re: i tried that.,.. puts 65.char
[16:11:11] willharrison: trying to make sure I am writing ok tests. do these specs look ok? https://github.com/willharrison/ruby-gabbro/blob/master/spec/gabbro/adapter/mysql_spec.rb
[16:11:19] adaedra: I'll try latter if I remember to do it
[16:11:26] ruboto_: adaedra # => "A" (https://eval.in/354798)
[16:11:35] Senjai: willharrison: Are you writing your own adapter?
[16:11:41] gambl0re: chr..not char
[16:11:50] willharrison: Senjai I think adapter was the wrong word to use
[16:11:59] adaedra: be careful when you read gambl0re ;)
[16:12:03] Senjai: willharrison: Why not just use Sequel to migrate databases?
[16:12:16] willharrison: Senjai this is just a project for fun
[16:12:38] dudedudeman: hey gambl0re!
[16:13:20] nobitanobi: adaedra: I like putting parentheses
[16:13:25] nobitanobi: just wondering what did you guys think
[16:13:48] adaedra: then do so
[16:13:50] willharrison: Senjai but I wanted to make sure I am testing correctly and as least brittle as I can before I continue to keep doing this
[16:13:59] adaedra: Guidelines are... well, guidelines.
[16:14:09] adaedra: It's a file, not a cop.
[16:15:24] arup_r: why from Ruby `COPY` command is not inserting records ? https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67 any idea ?
[16:18:36] Senjai: willharrison: Theres quite a few problems IMO. Given that this is rspec
[16:18:47] Senjai: willharrison: First, you shouldnt be using allow, or doing setup in it blocks
[16:18:52] Senjai: it blocks should only have one expectation
[16:18:57] Senjai: Use lets, and contexts
[16:19:11] Senjai: context "when given an argument" .... context "when an argument was not given"
[16:19:26] Senjai: And nest them from there on
[16:19:35] Senjai: context "when given an integer field" etc.
[16:19:37] willharrison: I will read up on them then
[16:19:51] Senjai: willharrison: They usually (but not always) come in pairs or more
[16:19:58] Senjai: when something happens, when something doesnt happen
[16:20:09] Senjai: Ideally it should read well if you run your specs with --format documentation
[16:20:12] Senjai: it should read like english
[16:20:27] Senjai: (i use --format documentation by default)
[16:20:47] willharrison: can I use format documentation when I run rake?
[16:20:59] mwlang: havenwood: do they have a style guide?
[16:21:07] Senjai: E.g. if your thing requires an argument, you should test what happens when it has one, and when it doesnt. If it does something based on different types of arguments, you should have a context for each one AND one that it doesnt understand
[16:21:14] Senjai: a lot of that is more work than most people do
[16:21:21] Senjai: But if your starting out, I recommend it
[16:21:28] Senjai: willharrison: bundle exec rake rspec --format documentation
[16:22:02] Senjai: willharrison: bundle exec rake rspec --format documentation --color
[16:22:05] willharrison: I think format doc might be default on mine? I get the same output as `rspec`
[16:22:09] Senjai: willharrison: Might as well throw --color on there too
[16:22:28] Senjai: probably is
[16:22:34] Senjai: a project can have a .rspec or whatever
[16:22:37] Senjai: that can set defaults
[16:22:39] havenwood: mwlang: Not that I know of but there's some writing on the reasoning for no parens. I think the style guide is the code but I don't know: https://github.com/seattlerb
[16:22:41] willharrison: it reads out all my `it`s
[16:22:41] Senjai: or in your home directory
[16:22:56] arup_r: any idea why it is not working ?
[16:23:23] Senjai: willharrison: also before :each is not required, just use before. Each is the default
[16:23:46] willharrison: are my mocks ok or are they too invasive?
[16:25:37] havenwood: mwlang: https://gist.github.com/drbrain/5ea7c9389a55c81fd3c1
[16:26:26] mwlang: havenwood: ok, I???m just curious???I???ve been experimenting with omitting parentheses more aggressively of late. I???ve *always* included parantheses in the method definitions, but have started dropping them almost subconciously in the last couple of months and I think it???s because I have been reading a lot of other people???s code of late.
[16:26:57] gambl0re: i dont understand this code... "This is a test".scan(/\w\w/) { |x| puts x }
[16:27:04] gambl0re: what is it doing??
[16:27:25] havenwood: gambl0re: Do you know what `/\w\w/` is?
[16:28:09] gambl0re: \w = any alphanumeric character or underscore
[16:28:30] GaryOak_: Without parens that code is ambiguous as to what it is actually passing to the load_file function
[16:29:52] mwlang: havenwood: I guess I???m a Weirich-style parentheses user currently transistioning into a Seattle-style parentheses user.
[16:29:52] gambl0re: i dont get how that is the output.
[16:30:06] pontiki: what are you expecing, gambl0re ?
[16:30:44] pontiki: you're asking scan to return all the spans of two alphanumeric characters
[16:31:12] gambl0re: talk to me in english man....i'm new to this stuff.
[16:31:23] adaedra: this is english -_-
[16:31:29] pontiki: which word did you not understand?
[16:31:35] adaedra: what word you not understand?
[16:31:57] gambl0re: "scan to return all the spans of two alphanumeric characters"
[16:32:06] pontiki: scan is the method you called
[16:32:13] pontiki: return : give back
[16:32:17] pontiki: all: all of them
[16:32:22] gambl0re: scan goes through each letter in the string?
[16:32:38] adaedra: scan returns all substring which matches the regex
[16:32:54] gambl0re: why does /w/w mean?
[16:33:08] pontiki: 11:28 < gambl0re> \w = any alphanumeric character or underscore
[16:33:19] pontiki: \w\w means two of them together
[16:33:31] willharrison: Senjai would you recommend this site? http://betterspecs.org/
[16:34:16] gambl0re: it replaces it with x?
[16:34:35] gambl0re: whats the put x variable?
[16:34:59] gambl0re: what do youo mean by each span?
[16:35:08] gambl0re: each two joining characters?
[16:35:10] pontiki: the two alphanumeric characters
[16:35:32] havenwood: gambl0re: Consider the following?: chars = 'gambl0re'.scan /./; chars.each { |x| puts x }
[16:35:35] pontiki: whatever is matching the expression you used in the scan method
[16:35:37] havenwood: gambl0re: Understand that? ^
[16:36:02] gambl0re: scanning through each letter in gambl0re
[16:36:20] havenwood: gambl0re: Then a slightly shorter version: 'gambl0re'.scan(/./) { |x| puts x }
[16:36:27] gambl0re: single character represented by the single dot
[16:36:42] gambl0re: i dont understnad the block..
[16:36:43] havenwood: gambl0re: So now change the Regexp and it's doing the same thing but with a different Regexp.
[16:36:57] havenwood: gambl0re: It's an #each block if you will.
[16:37:29] pontiki: gambl0re: blocks in general or that one in particular?
[16:38:03] havenwood: gambl0re: It's part of the #scan method, see the docs: http://ruby-doc.org/core/String.html#method-i-scan
[16:38:13] gambl0re: i know what a block is
[16:38:23] gambl0re: it printed each letter of my name on a single line
[16:39:26] gambl0re: but why did it put a space. couldnt i just do {|x| puts " ")
[16:39:50] havenwood: gambl0re: That would print a space on a newline for each match.
[16:40:18] adaedra: and girls!
[16:40:24] mozzarella: I want to use (a|b|c) in a regex but I don't want to capture the group, wat do?
[16:40:40] gambl0re: ok....i got confused. puts method automatically created a new line
[16:40:58] gambl0re: so for each character it finds on a string it will print each letter on a new line.
[16:41:32] adaedra: By the way, is there something shorter than $stdout.write to print without line return?
[16:41:33] havenwood: >> 'haha!'.scan /(?:a|b|c)/
[16:41:34] ruboto_: havenwood # => ["a", "a"] (https://eval.in/354868)
[16:41:45] havenwood: mozzarella: ^ non capture groups
[16:41:56] gambl0re: but the previous example... "This is a test".scan(/\w\w/) { |x| puts x } isnt this the same thing? "This is a test".scan(/../) { |x| puts x }
[16:42:12] adaedra: \w and . are different
[16:42:39] havenwood: mozzarella: ?:
[16:42:41] adaedra: Try to put some symbols in that string and test with boths
[16:42:51] gambl0re: i'll skip this chapter!..
[16:43:35] mwlang: *grumble* Why do companies still send emails using a ???noreply??? email address? Surely in this day and age, they can take a reply and route it automatically to support or wherever instead of auto-responding to tell you to do so.
[16:44:15] GaryOak_: You've just realized a million dollar business idea...
[16:44:34] adaedra: send a mail at noreply@adaedra.eu to have an answer.
[16:44:58] adaedra: See ya'll!
[16:45:11] havenwood: adaedra: later!
[16:45:30] gambl0re: Matches any word character.
[16:46:20] gambl0re: "This is a test".scan(/\w\w/) { |x| puts x } ok so this code matched "this,is,test,"
[16:46:22] mwlang: GaryOak_: yeah, it???s called mailgun. :-)
[16:46:47] gambl0re: it didnt print out "a" becaues it isd a single character and not a word??
[16:47:49] havenwood: gambl0re: "a" is indeed a word character, but you didn't say one word character...
[16:48:01] havenwood: gambl0re: try with one: \w
[16:50:27] gambl0re: i get it now...
[16:50:42] havenwood: gambl0re: \o/
[16:51:08] gambl0re: "This is a test".scan(/\w\w/) { |x| puts x } th|is|(space)a|te|st
[16:51:26] gambl0re: the a was ommitted because it was grouped with a space
[16:52:27] gambl0re: the space didnt match the regular expression but if i did a (/../) it would give me |th|is| a|te|st
[16:52:37] havenwood: gambl0re: yup, you got it
[16:52:44] gambl0re: the (..) matches any character including spaces.
[16:52:57] gambl0re: you guys could have just said something along those lines....
[16:53:07] havenwood: gambl0re: :O
[16:53:23] apeiros: gambl0re: you could also have read any regex doc
[16:55:00] mwlang: gambl0re: or play with regexpr real-time: http://www.regexr.com/
[16:55:18] havenwood: gambl0re: The first thing I asked was whether you understood \w, and from your answer it seemed you did. That's not a very nice way to say thanks! :P
[16:56:28] gambl0re: couldnt you tell that i copied my answer from somewhere?...
[16:57:22] apeiros: gambl0re: so you make people waste their time trying to help you - and then have the audacity to be annoyed about how they help you?
[16:57:41] gambl0re: who said i was annoyed..
[16:57:53] apeiros: "gambl0re: you guys could have"
[16:57:56] gambl0re: you shouldnt make assumptions..
[16:58:15] apeiros: and you should show more gratitude..
[16:59:07] gambl0re: thanks..i appreciate the help
[16:59:11] havenwood: gambl0re: I actually couldn't tell if you just said the answer or copy/pasted, but if the latter I'd have thought you'd read it in the process of pasting.
[17:00:02] havenwood: gambl0re: I assumed comprehension from the correct answer. If there's a small part of code you don't understand, show just that in the snippet. We can't tell which part you don't understand, hence the questions.
[17:00:37] gambl0re: let me give you an example why i dont read the doc files...
[17:00:40] mozzarella: havenwood: thank you
[17:00:50] havenwood: mozzarella: You're welcome!
[17:00:51] gambl0re: lets say i want to learn strings..i go to the ruby doc files
[17:01:00] gambl0re: http://ruby-doc.org/core-2.2.0/String.html
[17:01:12] gambl0re: this is the first paragraph they write.
[17:01:13] gambl0re: A String object holds and manipulates an arbitrary sequence of bytes, typically representing characters. String objects may be created using String::new or as literals.
[17:01:22] gambl0re: how the hell is a beginner gonna understand that?
[17:01:43] gambl0re: was the doc files written by a robot?
[17:01:44] apeiros: gambl0re: probably by reading it first?
[17:02:01] apeiros: and not just freaking out at the first word they don't understand
[17:02:09] havenwood: gambl0re: It's not written for programming novices. But there are good books like Chris Pine's Learn to Program for that.
[17:02:13] eam: gambl0re: the docs aren't great, but they're also not aimed at complete newbies
[17:02:19] mozzarella: adaedra: is that not what 'print' does?
[17:02:20] ccooke: gambl0re: That's a pretty nice succinct definition. It's written so that someone new to Ruby (but not new to programming) will understand it easily
[17:02:27] mwlang: gambl0re: what part of the definition of a String was unclear there? It was definitely written by a human.
[17:02:29] havenwood: gambl0re: If you wrote all docs for novices the docs would be so expansive they wouldn't be as useful for programmers.
[17:02:29] mozzarella: >> print 'test'
[17:02:30] ruboto_: mozzarella # => testnil (https://eval.in/354936)
[17:02:31] apeiros: they're also API docs, not prose docs. not tutorials.
[17:02:53] ccooke: gambl0re: if you want to learn programming from scratch, you need a different type of document.
[17:02:55] havenwood: gambl0re: There could be multiple versions of the docs for different levels. That seems neat to me. But we'd have to write them!
[17:03:02] eam: there are lots of legit beefs with the api docs -- loads of stuff aren't documented or are vaguely specified
[17:03:24] apeiros: eam: IMO that's improved a lot in the newer versions.
[17:03:24] havenwood: eam: Lots of stuff better documented in Japanese... :O
[17:03:33] eam: but if they were written for someone who didn't know anything about general programming concepts they'd be totally useless to me!
[17:03:35] mwlang: eam: its the vaguely spec???d stuff that kills me every time.
[17:03:43] apeiros: and they're happily accepting patches to improve :)
[17:03:55] havenwood: apeiros: I need to do more of that.
[17:03:55] ccooke: Learning to program is a special case, and better handled by dedicated ddocuments
[17:03:57] mwlang: apeiros: where???s the repo?
[17:04:07] apeiros: mwlang: github.com/ruby/ruby
[17:04:52] havenwood: mwlang: http://documenting-ruby.org/
[17:06:03] mwlang: havenwood: ah, even better!
[17:47:03] that1guy: Can someone explain why https://eval.in/355009 doesn't return a stack error but https://eval.in/354999 does?
[17:48:32] yxhuvud: that1guy: because you have a condition that stop the recursion.
[17:48:48] havenwood: That1Guy: That1Guy Try the former with a larger number, something above 10,000 or so.
[17:49:10] that1guy: What is the condition that stops the recursion?
[17:49:25] havenwood: That1Guy: if num <= 1
[17:50:14] that1guy: I don't see how that stops the recursion. I see that would only keep * 1 every time it moves to -1, -2 and so on
[17:50:55] havenwood: That1Guy: So in the case where it returns `1` you have: num * 1
[17:51:00] havenwood: That1Guy: And you're done. No more recursing.
[17:51:03] that1guy: Is that not what the other one is doing? *1 for each new loop for lack of a better way of saying it
[17:51:17] havenwood: That1Guy: The other is going forever.
[17:51:28] havenwood: That1Guy: There's no case in which it doesn't recurse further.
[17:51:44] that1guy: Idk why I missed it before.
[17:51:49] that1guy: yeah, I get it now
[17:52:39] havenwood: That1Guy: Even with the former, you'll hit SystemStackError with larger numbers because Ruby's default is to support trace instruction rather than tailcall optimization. You can enable tailcall optimization when you compile Ruby.
[17:52:48] that1guy: I should probably stop and take a break. Been reading the book for 3 hours straight now.
[17:52:59] havenwood: That1Guy: :)
[17:54:17] adaedra: thanks, mozzarella
[18:08:06] mwlang: has celluloid???s basic usage changed since the documentation was written? A very basic example that they provide does not work. It seems that appending bang (!) to method calls is not the way to call asyncronously. https://gist.github.com/mwlang/5aab67c937d647a86add
[18:08:28] Senjai: mwlang: Short answer: Yes
[18:08:39] Senjai: mwlang: There has been major refactorings on celluloid done
[18:08:47] Senjai: mwlang: They have an IRC channel, Id check there
[18:08:53] mwlang: also, with celluloid, is the only wait to wait for all actors to finish is to ???sleep??? ?
[18:09:17] Senjai: mwlang: You can join on the supervision pool. But I think that was pulled from core. I havent used the 'new' version
[18:09:21] mwlang: Senjai: thanks. I???ll hop over to there.
[18:12:03] mwlang: quiet channel over a #celluloid Senjai do you know offhand if celluloid pushes work onto every CPU core available when using the pool?
[18:12:26] Senjai: mwlang: Ruby uses native threads, yes.
[18:12:28] mwlang: using MRI Ruby 2.2
[18:12:34] Senjai: mwlang: However if you're using MRI, you have the GIL
[18:12:41] Senjai: mwlang: Which is still the same thing as always
[18:12:46] Senjai: will only ever run one thread at a time
[18:13:01] Senjai: This isn't that bad... as the actor system accomodates this pretty well
[18:13:11] Senjai: unless you need high performance threading
[18:13:26] Senjai: mwlang: Also, just ask, and people will eventually respond. It is a slower channel
[18:13:28] Senjai: but it is active
[18:13:40] mwlang: Senjai: I???m just wanting to tax all CPU cores since I???m loading data from file and inserting into DB
[18:13:52] Senjai: mwlang: Won't happen on MRI.
[18:14:03] Senjai: mwlang: Use a DRB/process based approach
[18:14:07] Senjai: or used Rbx, or jruby
[18:14:32] mwlang: Senjai: ah, drb???I???d totally forgotten that option.
[18:16:10] mwlang: Senjai: really all I need to do, I think is set up the rake task to fire off a whole new process for each *.xml file and that???ll tax the cores plenty good.
[18:16:53] mwlang: I just haven???t done fork or spawn within ruby before???but I think those are sub processes of the main process (and hence same core) anyway???
[18:27:30] alam: wanna hear something funny?
[18:28:21] alam: yesterday there was a black guy claiming he's good at programming at chipotle and bragging
[18:29:54] GaryOak_: ACTION can feel the admin ban in the air
[18:30:26] alam: he's like i'm becoming really good at programming i know what this string of code does and but i don't have any friends who are programmers because i all they are good at is code and have no social skills
[18:30:39] dudedudeman: i don't like joke
[18:30:43] alam: all the while he's trying to sound whiter than george bush
[18:30:47] alam: this is not a joke dudedudeman
[18:30:51] alam: this just happened
[18:31:11] alam: string of code lmao
[18:31:31] alam: he's still got a long way to go if he can only understand strings
[18:31:45] dudedudeman: two things. where's the funny part? and what does him being black have to do with it?
[18:31:53] dudedudeman: also... why am i even bothering
[18:32:05] dudedudeman: ACTION sniffs the air with GaryOak_
[18:32:07] alam: because he doesn't belong in the programming circle
[18:32:39] alam: his ignorance is so thick
[18:32:48] alam: it's disgusting
[18:34:59] arup_r: any hints to this problem ? https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67
[18:36:15] arup_r: No records got inserted to the table
[18:41:05] arup_r: I got this idea from this link --- http://www.thegeekstuff.com/2010/03/how-to-execute-postgresql-commands-inside-unix-shell-scripts/ but not getting executted the psql command it seeems
[18:42:34] shevy: someone permaban alam, he is back again trolling
[18:42:45] alam: i'm not trolling
[18:42:51] shevy: you know you are lying man
[18:42:57] alam: lying about what?
[18:43:05] shevy: did you do the same thing the last 5 days here
[18:43:40] shevy: are you telling the truth right now
[18:44:16] apeiros: apeiros kicked alam: racism is not welcome here.
[18:44:34] shevy: excellent timing :D
[18:44:40] apeiros: -o apeiros
[18:44:48] dudedudeman: Thank you, apeiros. that was almost magically seeing that
[18:45:09] shevy: dudedudeman don't get your hopes up
[18:45:11] shevy: he'l be back
[18:45:22] shevy: it took sevenseacat about 11 bans yesterday
[18:45:26] dudedudeman: i hope i'm here for it
[18:45:47] apeiros: you're welcome. I know I wasn't responsive the last few days. been sick :( (and sometimes just not my timezone). but please keep using !ops
[18:45:47] arup_r: ACTION feels helpless
[18:45:58] shevy: jhass was also fighting the troll
[18:46:02] dudedudeman: what does !ops do?
[18:46:06] dudedudeman: yeah, saw that one earlier
[18:46:28] dudedudeman: i know i can ignore anyone, but that's no fun
[18:47:03] GaryOak_: arup_r: is it giving you an errors?
[18:48:46] StevenXL: Hi - does anyone know any source code that I can use to learn how to use the CSV Standard Library?
[18:48:56] arup_r: GaryOak_: no..
[18:49:17] StevenXL: I am having a hard time utilizing it even after reading the documentation on the library, so I was hoping real code might help solidify the ideas.
[18:49:22] arup_r: only records are not getting inserted,,
[18:49:55] arup_r: https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67#file-output-sh-L18
[18:50:26] arup_r: StevenXL: search SO
[18:50:54] mwlang: StevenXL: lots of examples in the docs: http://ruby-doc.org/stdlib-2.2.0.preview1/libdoc/csv/rdoc/CSV.html
[18:50:57] arup_r: http://stackoverflow.com/questions/tagged/ruby+csv
[18:51:42] arup_r: lots of code you will get there.....
[18:51:43] GaryOak_: arup_r: on line 14 of output.sh your \t changed
[18:51:56] StevenXL: arup_r: thanks I'll do that.
[18:52:03] arup_r: humm.. that's strange..
[18:52:16] arup_r: i hv no idea why so... GaryOak_
[18:52:46] mwlang: hot speedalio???jruby has really cleaned up nicely since I last touched it. I can actually type ???gem install??? and ???ruby ???.??? etc. on command line.
[18:53:06] GaryOak_: mwlang: you mean running ruby lolz
[18:53:47] jhass: !kick alam
[18:53:47] helpa: jhass: No.
[18:53:48] ruboto_: ruboto_ kicked alam:
[18:53:48] ruboto_: -o ruboto_
[18:54:15] apeiros: +b alam!*@*
[18:54:15] mwlang: GaryOak_: yeah???I mean it actually feels familiar to MRI vs. having to call ???jruby??? or build my war/jars myself.
[18:54:33] apeiros: +b *!*@*ip.
[18:54:37] apeiros: -o apeiros
[18:55:10] GaryOak_: mwlang: the last time I used jruby was for RubyProcessing, and it worked ok
[18:56:49] mwlang: and rvm installed it just fine, too???so barrier to entry is nice and low.
[19:00:44] mwlang: ah, too good to be true???failing on nokogumbo gem.
[19:01:25] arup_r: GaryOak_: any suggestion ?
[19:01:58] GaryOak_: arup_r: you probably need to figure out why that \t is getting changed
[19:03:55] GaryOak_: otherwise pg is looking for ' ' as a delimiter
[19:10:21] arup_r: GaryOak_: fixed https://gist.github.com/aruprakshit/eedb8c01671c81ce2f67 \o/
[19:10:44] GaryOak_: arup_r: whoa what did you do?
[19:10:46] arup_r: thanks for ur helping mind... :D
[19:11:01] arup_r: SEE the EOF heredoc
[19:11:13] GaryOak_: Ahhh, cool dude
[19:11:19] arup_r: that's the trick.. I was missing..
[19:11:37] arup_r: havenwood: addressed... I didn't get that time...
[19:13:09] cosmicfires: I'm looking for a ruby method to take seconds and return hours, minutes and seconds
[19:14:09] yxhuvud: cosmicfires, Time.at
[19:14:29] cosmicfires: thanks yxhuvud
[19:14:31] yxhuvud: and then strformat
[19:18:25] that1guy: https://eval.in/355257
[19:18:39] that1guy: I'm missing something. I want it to return 0 if it runs off the map
[19:19:15] that1guy: I thought the condition on 21 would have taken care of it. I don't see what I'm missing. Just a student working on a problem from the book.
[19:20:01] pjackson: can anyone explain this apparent bug in keyword arguments? https://gist.github.com/faoiseamh/08fab11a2dfb7ace4192
[19:20:09] that1guy: if it's nil it's != 'land'
[19:21:45] apeiros: pjackson: I can't even reproduce your first example
[19:22:02] apeiros: line 8: Demo1.new a: 'one', b: 'two' # => @a = nil and @b = "two"
[19:22:15] apeiros: for me, that's the expected #<Demo1:0x007f8e264750e8 @a="one", @b="two">
[19:22:43] weaksauce: That1Guy when world[y] is out of bounds it will be nil. then nil[x] gives you that error
[19:23:44] pjackson: apeiros: weird - this is with ruby 2.1.2p95
[19:23:53] pjackson: i'll try updating and see if that's just a bug in my ruby version
[19:24:22] apeiros: pjackson: your problem is only the first example?
[19:24:46] apeiros: hi adaedra
[19:25:29] that1guy: weaksauce: Can I not just add something like || world[y] == nil to the end of 21
[19:26:09] adaedra: apeiros: weather was full of bans on the channel today :o
[19:27:39] weaksauce: yeah. typically That1Guy, you'd drop the == nil
[19:27:56] weaksauce: but you need to reverse the order
[19:28:35] weaksauce: actually That1Guy with an or you'd still have the error. rewrite it using an && and have the earlier check be for nil
[19:28:54] adaedra: or use .nil?
[19:28:58] pjackson: apeiros: yes, although the second fixes it by assigning a random instance variable first
[19:29:00] _mak: I have an optimization problem. The code in the lines 60-67 is reeeaaaalllyyyy slow. Is there anything I can do to run it faster? http://privatepaste.com/0a65041ba3
[19:29:03] pjackson: which makes no sense
[19:29:24] apeiros: pjackson: and you're sure you ran the right file? as in, cat it first, then run it with ruby?
[19:29:35] apeiros: (you'd not be the first to edit the wrong file???)
[19:29:48] pjackson: yes i'm sure, i made this just to demonstrate it after observing it in my actual app
[19:29:50] havenwood: pjackson: Works in 2.1 and 2.2, so dunno...
[19:30:12] havenwood: pjackson: Just tried it on 2.1.6 and 2.2.2 but both are as expected.
[19:30:28] that1guy: weaksauce: https://eval.in/355272
[19:30:28] apeiros: actually, I can reproduce in 2.1.2
[19:30:45] apeiros: seems to indeed be a bug in 2.1.2
[19:31:02] havenwood: pjackson: Always use latest TINY version!
[19:31:29] pjackson: yeah figured it was an actual ruby bug, updating should fix
[19:32:19] weaksauce: That1Guy https://eval.in/355306
[19:35:03] havenwood: _mak: `!File.zero? json_file_location` instead of `File.exists?(json_file_location) && File.size(json_file_location) != 0`
[19:36:55] havenwood: _mak: #any? instead of #find
[19:37:52] _mak: havenwood: cool
[19:39:47] havenwood: _mak: It'd be interesting to see which part is taking the most time with a profiler.
[19:39:56] _mak: havenwood: is there any way to avoid having the file zeroed before adding content again?
[19:40:09] _mak: sometimes when I interrupt the script, the file will be empty
[19:40:17] _mak: because of json_file = File.open(json_file_location, "w")
[19:40:36] _mak: I could not find a way to use append
[19:40:55] _mak: if I comment the lines 60-67 the thing runs really fast
[19:41:09] _mak: I guess is the parsing and find that takes time
[19:42:31] havenwood: _mak: Profile it: https://github.com/ruby-prof/ruby-prof
[19:43:00] pipework: ACTION wishes the debugging options for ruby 2.0.0 weren't abominable
[19:43:41] that1guy: weaksauce: I don't understand why yours worked and this one didn't https://eval.in/355310
[19:44:31] that1guy: I just spent the last ten minute looking it over. Github shows the only changes are /Users/TheMoores/Desktop/Screen Shot 2015-05-13 at 12.44.13 PM.png
[19:45:07] _mak: havenwood: will do. thanks mate!
[19:45:16] that1guy: if world[y][x] != 'land' || world[y].nil?
[19:45:17] that1guy: if world[y].nil? || world[y][x] != 'land'
[19:46:08] weaksauce: That1Guy order matters
[19:46:35] weaksauce: execution is from left to right until it satisfies the logic.
[19:47:27] adaedra: >> a = 1; b = 2; if a = 3 || b = 4 ; end ; [a, b]
[19:47:28] ruboto_: adaedra # => [3, 2] (https://eval.in/355341)
[19:47:31] weaksauce: since it's an or(||) type statement it will stop at the first truthy value. with an and(&&) it will stop at the first falsy value
[19:47:43] adaedra: >> a = 1; b = 2; if b = 3 || a = 4 ; end ; [a, b]
[19:47:44] ruboto_: adaedra # => [1, 3] (https://eval.in/355342)
[19:48:14] _mak: jhass: you always have some great tips to give :) Do you see any obvious improment on the lines 60-67? http://privatepaste.com/0a65041ba3
[19:48:23] adaedra: See, evaluation only take the first truthy expression.
[19:48:23] that1guy: the && isn't working when I try it though
[19:49:35] weaksauce: That1Guy it's different logic. it means if this is true AND that is true then do the following block
[19:49:57] jhass: _mak: my tip is please see channel rule 2.7 http://ruby-community.com/pages/user_rules
[19:49:59] weaksauce: That1Guy whereas with or it means if this is true do the block OR that is true do the block
[19:50:06] that1guy: So if I use and, it breaks again because it won't stop when it finds 'land'
[19:51:01] _mak: jhass: ok, sorry about that
[19:51:39] havenwood: _mak: It's usually idiomatic to use a block with File.open for automatic closing etc. You can write to a file with File.write without manually opening and closing.
[19:52:02] _mak: havenwood: http://privatepaste.com/baa9b14f30
[19:52:32] havenwood: _mak: More folk would view your code if you pasted to gist.github.com. Your choice has an outdated certificate, etc.
[19:52:42] shevy: I won't look at his code!
[19:53:11] that1guy: Thanks weaksauce:
[19:53:24] _mak: havenwood: is just that the code is so ugly that I want it to vanish from the web after some time :) on gist it will stay from what I understood
[19:53:43] havenwood: _mak: You can gist anonymously. Then delete the gist.
[19:54:01] _mak: havenwood: oh, let me check it again then..
[19:54:29] weaksauce: always use && for logic That1Guy
[19:54:40] weaksauce: well && or || is what I mean
[19:54:57] weaksauce: don't use the `and` or `or` keyword
[19:55:55] _mak: havenwood: https://gist.github.com/anonymous/f7d5b20c88e7cf93ef89
[19:56:08] pipework: Mmm, `and` & `or`.
[19:56:24] havenwood: _mak: Now just name the gist filename with a .rb extension. You can edit gists or add files to them.
[19:56:33] shevy: _mak you can also remove your gists from gisthub again btw
[19:56:35] havenwood: _mak: If you update the same gist folk can just refresh.
[19:57:02] havenwood: _mak: Naming files correctly lets people clone your gist and try locally.
[19:57:20] zzxc: Hey, I don't know if this is the place to ask this. But I'm having an issue with Bundle install not listing Rmagick. Do I need to change some config or what not?
[19:57:26] havenwood: adaedra: ha, it actually does redirect :)
[19:57:30] havenwood: gisthub.com
[19:57:32] adaedra: havenwood: awesome
[19:57:39] adaedra: zzxc: well, is it in your Gemfile?
[19:58:03] _mak: file.rb: https://gist.github.com/anonymous/3752f4357930fc41fa11 ruby-prof: https://gist.github.com/anonymous/da5aa79c04669ec20e39h
[19:58:33] havenwood: _mak: You deleted the latter too fast. But instead of a second gist, add a second file to your first gist.
[19:58:46] havenwood: _mak: Edit the gist, and in the lower left "Add file"
[19:58:58] zzxc: adaedra: Let me look. the gemfile references gem.local
[19:59:32] _mak: havenwood: I don't have an edit button and anonymous I think
[19:59:50] _mak: havenwood: oh you mean when I'm creating it
[20:00:09] havenwood: _mak: I actually meant to edit it, but maybe I don't create sekret gists enough. :P
[20:00:34] _mak: havenwood: yes, I have only the delete button
[20:00:55] zzxc: adaedra: I don't actaully see anything in the gemfile to reference any gem.
[20:00:59] adaedra: zzxc: if you're unsure, gist it
[20:01:14] shevy: I can edit and delete my gists on github just fine. I am logged in though
[20:01:24] havenwood: _mak: Okay, looks like you have to be slightly less super-sekret to edit... You can edit a secret gist but not an anonymous sekret gist apparently.
[20:01:38] adaedra: shevy: not everyone has a github account :/
[20:01:42] canton7: not anonymous, no
[20:01:50] shevy: adaedra do you have one
[20:02:02] shevy: if the french can use an english interface, then everyone else can!
[20:02:03] zzxc: adaedra: https://gist.github.com/anonymous/d4ff2a110c8c42a2463f
[20:02:12] adaedra: shevy: ...
[20:02:16] adaedra: this is getting old
[20:02:26] zzxc: adaedra: This is for redmine for what its worth.
[20:02:39] adaedra: aah, it's redmine?
[20:02:46] adaedra: Let me check a thing then
[20:03:29] adaedra: zzxc: are you following https://www.redmine.org/projects/redmine/wiki/RedmineInstall ?
[20:04:24] zzxc: adaedra: More or less. I already have Redmine Installed. I just installed it without install rmagick first.
[20:04:39] _mak: havenwood: I guess that this seems to be taking some resource: .encode!('UTF-8', 'UTF-8', :invalid => :replace)
[20:04:50] havenwood: _mak: aye, a lot
[20:05:01] apeiros: use String#scrub
[20:05:01] adaedra: zzxc: and now you want to have rmagick
[20:05:10] zzxc: adaedra: Yep
[20:05:19] havenwood: _mak: profiling is handy to find the culprit
[20:05:22] adaedra: what command do you use zzxc ?
[20:05:31] _mak: apeiros: I'll check it, thanks
[20:05:32] zzxc: For the bundle install?
[20:05:34] zzxc: bundle install --without development test
[20:05:40] adaedra: ok, seems correct
[20:05:47] adaedra: and it doesn't list rmagick?
[20:06:28] zzxc: adaedra: Nope. Bundle show list bundler and httpclient. No rmagick
[20:06:45] adaedra: So I suppose it's not in Gemfile.lock either?
[20:06:48] unlimitednigga: bruh why is crackers tryna take ova dat programmin and not let black ppl in n shit what cud we do to stop dem bitch ass racists from oppressing n shi
[20:06:59] unlimitednigga: i lurned ruby in 12 dayz nigga
[20:07:14] zzxc: adaedra: That would be correct. just httplient.
[20:07:25] adaedra: just httpclient? o_O
[20:07:44] adaedra: redmine should be much more than just httpclient
[20:07:45] unlimitednigga: we need to make a thing where we is tryna get black ppl on dat programmin asap nigga
[20:07:51] zzxc: adaedra: https://gist.github.com/jamesepatrick/e3a2a8c23de04f998663
[20:08:20] apeiros: oh dear. today is mentally underprepared day???
[20:08:21] adaedra: zzxc: to be sure, you call bundle install from redmine's root, not a subfolder?
[20:08:36] apeiros: apeiros kicked unlimitednigga: racism is still not welcome. piss off.
[20:08:46] zzxc: Pretty postive let me double check.
[20:08:48] adaedra: "piss off."
[20:08:54] apeiros: +b *!*@*ip.
[20:09:02] adaedra: it sounds like you're getting angry
[20:09:04] apeiros: -o apeiros
[20:09:21] adaedra: I'm going slightly mad ???
[20:09:27] apeiros: I want to watch my netflix in peace.
[20:09:35] apeiros: always have to rewind due to that asshole.
[20:09:40] zzxc: adaedra: Nope its in /usr/share/redmine
[20:09:52] apeiros: huh? nono, not angry because of you adaedra. because of that racist asshole.
[20:10:06] havenwood: every time i step away for a second the trolls emerge
[20:10:12] adaedra: Next time, I'll try another op :x
[20:10:19] zzxc: Yeah I had a roommate like that at one point. Sorry to hear it.
[20:10:32] apeiros: adaedra: just !ops as you've done before. that's the best :)
[20:10:35] adaedra: zzxc: and you run bundle install from this folder, right?
[20:10:43] adaedra: apeiros: yeah, sure, but your netflix!
[20:10:52] apeiros: can be rewinded
[20:11:00] adaedra: good guy netflix
[20:11:33] jhass: apeiros: mh, do you know offhand how to turn authname into cinch user object? might hotfix it for (available) nicks
[20:11:33] adaedra: zzxc: (soory if I seem repetitive, I'm not sure to see what happends, so shoots in the dark)
[20:11:42] zzxc: adaedra: Yep. Its only uses httpclient and bundler when you do a bundle install.
[20:11:48] apeiros: jhass: nope, sorry
[20:11:51] adaedra: that's insane
[20:11:57] _mak: line = CSV.parse(row.scrub!("_").gsub(/"/,"'"),{:col_sep => "|"}) if row is a string why do I get 'undefined method `scrub!' for #<String:0x00000000d9ae40> (NoMethodError)' ?
[20:12:08] zzxc: adaedra: No worries. I'm really hoping its something simple. I don't know much about ruby unforantly.
[20:12:09] apeiros: jhass: in the upcoming api, it'll be bot.user_by_auth_name
[20:12:22] apeiros: too bad I've been sick for a couple of days :-/
[20:12:56] havenwood: Any Textual user know how to silence join/part without also silencing the rest of the general messages? Been trying it out but can't figure out how to fine tune general messages.
[20:13:32] adaedra: havenwood: if you find, tell me
[20:14:27] adaedra: zzxc: i'll look with a redmine install
[20:15:50] zzxc: havenwood, adaedra Found it.
[20:16:13] zzxc: Textual ??? Preferences ??? Style ??? Show general event messages (you want it unchecked)
[20:16:33] havenwood: zzxc: But I do want general event message other than joins and parts.
[20:16:42] adaedra: I worked it by putting an ignore on *!*@* for this kind of messages
[20:16:46] adaedra: zzxc: what kind?
[20:16:55] adaedra: havenwood: what kind?
[20:17:11] adaedra: zzxc: I thought you found why your bundle was acting weird :/
[20:17:13] havenwood: adaedra: mode changes and such
[20:17:24] zzxc: adaedra: ?
[20:17:25] adaedra: Ah, this I can't test here
[20:18:13] adaedra: havenwood: if you can't find, bug the textual github
[20:18:21] adaedra: zzxc: you said 'Found it' :)
[20:19:04] zzxc: adaedra: Ahahaha I thought you said you found it just now. Sadly no.
[20:19:24] zzxc: Would it work to add it to the gemfile somehow?
[20:19:53] _mak: apeiros: sorry mate, I can't understand what is wrong with the way I'm trying to use scrub. line = CSV.parse(row.scrub!.gsub(/"/,"'"),{:col_sep => "|"}) is this wrong?
[20:19:53] adaedra: So, who will be the slowest tonight, hg or bundler?
[20:20:46] adaedra: zzxc: I'm not even sure your redmine install would work reliably here with how your bundle react...
[20:21:46] adaedra: zzxc: for reference, this is what I get https://gist.github.com/adaedra/2d3c47d191e1b2658883
[20:22:48] zzxc: adaedra: Wow. Thats an impressive list.
[20:23:13] adaedra: zzxc: yeah, but it also means you have a problem with your redmine :x
[20:23:26] zzxc: Well the thing is it works fine.
[20:23:46] adaedra: so it don't rely on bundler
[20:23:47] zzxc: Database, Svn & git integration, front end all work fine.
[20:24:04] zzxc: adaedra: Where did you install yours from?
[20:24:07] adaedra: you can try to install rmagick manually and see if redmine picks it up?
[20:24:21] adaedra: zzxc: hg clone, like in the documentation
[20:24:50] zzxc: adaedra: And that might be source of that issue. I ended up being lazy and just using apt-get install
[20:25:13] adaedra: for redmine?
[20:25:40] adaedra: then you can try to install rmagick the same way if it exists as a package
[20:25:49] zzxc: It installs 2.5.X
[20:26:12] adaedra: I installed redmine though apt-get in 2013 iirc
[20:26:13] zzxc: adaedra: Its a ruby gem file.
[20:26:32] adaedra: zzxc: debian package manager has many gems available.
[20:26:46] zzxc: Funky. I didn't think gem would like that.
[20:27:11] zzxc: Uhm anyways I didn't see it. I did install the gem for however.
[20:27:37] adaedra: Restart your redmine instance and check if rmagick is picked up.
[20:27:39] zzxc: I just can't get it redmine to use it.
[20:27:48] zzxc: adaedra: Did that a few times.
[20:29:00] adaedra: You can try putting it in the Gemfile
[20:29:05] adaedra: I just don't know anymore
[20:29:24] zzxc: adaedra: Alright I'll try that. Thak you.
[20:29:40] adaedra: Debian, debian, debian.
[20:30:09] zzxc: What are you running off of?
[20:30:16] zzxc: (Just wondering)
[20:30:30] adaedra: Desktop OS X, Personal server FreeBSD
[20:30:56] adaedra: here we go
[20:31:23] adaedra: let me guess, you don't like FreeBSD?
[20:31:45] certainty: well not as a server OS
[20:31:51] certainty: at least not when i have more than one server
[20:31:59] adaedra: did you read what I wrote?
[20:32:10] zzxc: adaedra: Ahh nice. My brother was always loved freeBSD for server. Has hardware support gotten better?
[20:32:23] adaedra: should stop doing so many things at the same time -_-
[20:32:51] adaedra: certainty: well, it's a personal one. But I like FreeBSD a lot.
[20:33:27] certainty: I'm biased. I work for a company that ran most of their servers with FreeBSD. We've replaced most of them to linux now. Maintenance was a real pain in the ass.
[20:33:41] adaedra: zzxc: dunno
[20:33:45] adaedra: it works for mine
[20:33:56] adaedra: certainty: how so? (curious)
[20:34:12] certainty: there are however still some left. 4.3 no way to get it uptodate :/
[20:34:31] certainty: adaedra: the upgrade procedure is so lengthy.
[20:34:45] adaedra: ok, I understand better
[20:34:52] adaedra: we're at like, 10.1 now
[20:35:13] certainty: we actually run a few recent FreeBSDs
[20:35:21] adaedra: zzxc: strange, your Gemfile looks nothing like the one I have here. Will look with your version of redmine.
[20:35:23] certainty: my boss loves that OS :)
[20:35:45] adaedra: I use it mainly for the jail system and the ports, tbh
[20:35:54] certainty: i actually dislike the ports
[20:36:29] adaedra: Haven't used hg in a while it seems
[20:36:37] zzxc: adaedra: Jail system?
[20:36:37] adaedra: Let's be lazy and use GUI tools :x
[20:36:41] certainty: i'm cool with source distros. We use gentoo as the main os. But ports is just so painful.
[20:36:55] adaedra: certainty: how so?
[20:37:02] zzxc: chroot users?
[20:37:25] adaedra: zzxc: a chroot, but pushed further
[20:37:54] certainty: adaedra: dependency management just doesn't work well. Also cleaning up or upgrading a port with many dependencies like apache + php + modules can be frustrating.
[20:38:24] certainty: go to 10 different places and make uninstall, then go back to the original port and make install, just to see that you forgot something
[20:38:32] adaedra: certainty: until recently, I used poudriere for ports building and pkg for installing. Work'd well for me.
[20:39:04] certainty: doesn't pkg just install binary packages?
[20:39:12] certainty: ah, wait i think i got you wrong
[20:39:20] adaedra: yes, it does
[20:39:25] adaedra: poudriere builds the binary packages
[20:39:32] certainty: from the ports?
[20:39:47] adaedra: you give the list of packages you want, and it does everything automatically
[20:39:50] certainty: i might suggest that to our admins.
[20:40:13] adaedra: had some trouble with some package building, but it was a minority
[20:40:34] adaedra: uses zfs (if you have) and jails and build packages in parallel.
[20:41:15] zzxc: adaedra:I had to set up a jailed sftp use with in the first couple of weeks of my first CS job (I was physics major).
[20:41:32] adaedra: zzxc: so I have the same thing as you have in my redmine Gemfile. Only difference, I have 94 lines before...
[20:41:57] adaedra: my irc bouncer is in a jail
[20:42:08] certainty: poor bouncer
[20:42:18] adaedra: he doesn't seems to mind
[20:42:42] adaedra: actually, everything is jailed, "host" is a base FreeBSD with nothing extra installed.
[20:42:45] zzxc: adaedra: My boss was comepletely content just giving them unrescricted sftp & ssh connection to our integration partners.
[20:44:09] certainty: what could possibly go wrong? (TM)
[20:44:42] adaedra: Ah, where is it again?
[20:45:17] zzxc: Small start up. Rather not say beyond that.
[20:45:43] adaedra: zzxc: you don't have to :)
[20:47:16] adaedra: He didn't even stay one second :o
[20:49:36] certainty: DeBot: !hangman ruby
[20:49:36] DeBot: ????????????????????????????????? [] 0/12
[20:49:40] DeBot: ????????????????????????????????? [_] 1/12
[20:49:44] DeBot: ????????????????????????????????? [_:] 2/12
[20:49:50] DeBot: ????????????????????????????????? [_:.] 3/12
[20:49:55] DeBot: ?????????#????????????????????? [_:.] 3/12
[20:50:08] adaedra: DeBot: net
[20:50:08] DeBot: ?????????#???n??????e???t [_:.] 3/12
[20:50:16] DeBot: ?????????#???n??????e???t [_:.r] 4/12
[20:50:24] DeBot: ?????????#in??????e???t [_:.r] 4/12
[20:50:33] DeBot: ?????????#in??????e???t [_:.ru] 5/12
[20:50:38] DeBot: ???S???#ins???e???t [_:.ru] 5/12
[20:50:48] DeBot: ???S???#ins???e???t [_:.ru] 5/12
[20:50:49] DeBot: ???S???#inspe???t [_:.ru] 5/12
[20:50:52] DeBot: CS???#inspect [_:.ru] 5/12
[20:50:55] DeBot: CSV#inspect [_:.ru] 5/12 You won!
[20:51:15] adaedra: http://_:.ru
[20:51:21] adaedra: aw, not valid.
[20:51:45] certainty: DeBot: !hangman ruby
[20:51:46] DeBot: ???????????????????????????????????????????????? [] 0/12
[20:51:50] DeBot: ???????????????????????????????????????????????? [#] 1/12
[20:51:59] DeBot: ?????????::????????????::??????????????? [#] 1/12
[20:51:59] DeBot: ?????????::????????????::??????????????? [#.] 2/12
[20:52:10] adaedra: DeBot: net
[20:52:10] DeBot: Net::???TT???::???t??????t [#.] 2/12
[20:52:15] DeBot: Net::HTTP::???t??????t [#.] 2/12
[20:52:51] DeBot: Net::HTTP::???ta???t [#.] 2/12
[20:52:59] DeBot: Net::HTTP::start [#.] 2/12 You won!
[20:54:09] zzxc: Hey adaedra does your redmine install. Is your yml files in config or in /etc/?
[20:54:31] adaedra: actually, I just cloned and ran bundle install
[20:54:59] adaedra: what's your debian version?
[20:55:27] zzxc: Its ubuntu 14.04.
[20:56:12] zzxc: Haha, yeah I know. But It was the best option AWS at the time.
[20:56:35] adaedra: I was :?? for my error about debian/ubuntu.
[20:56:48] adaedra: I try not to juge OS in here when helping.
[20:56:50] zzxc: Also I mangae 4 machines that run the same thing, so it makes it signicifally easier
[20:56:53] zzxc: actually 5
[20:57:37] adaedra: mmh, website says redmine is 2.4.2
[20:58:27] adaedra: OMFG DEBIAN
[20:58:31] zzxc: Ah no I'm running for an svn repo
[20:58:55] adaedra: ah, you run it from svn?
[20:59:13] zzxc: Well I am now.
[20:59:38] zzxc: Its the 2.6 version. Figured I might as well. Might explain some of the funky behavior I've had with ssl as well.
[21:00:36] adaedra: There's this wonderful thing in "debian" package source for your ubuntu version
[21:00:37] adaedra: https://gist.github.com/adaedra/e387b14e6a31aab0589d
[21:00:56] adaedra: Which explains why bundler installs nothing
[21:02:08] zzxc: Hahaha yep.
[21:02:11] adaedra: They actually completly remove bundler from redmine
[21:02:21] adaedra: Oh my god ubuntu what are you doing
[21:02:34] adaedra: (Sorry for the exclamation above, it may not be debian this time)
[21:03:30] zzxc: adaedra: Yeah. I've talked to some people who have stopped using the ubuntu version of this because they keep running into so many issues. I think this is the source.
[21:03:32] adaedra: zzxc: so you're trying with a clean install from svn?
[21:03:39] vikaton: How do I append to a file instead of overwriting it?
[21:03:48] adaedra: vikaton: see File#open flags
[21:04:24] adaedra: oh my god, all this lost time for something so simple.
[21:04:47] zzxc: adaedra: Haha. I'm sorry about that.
[21:04:57] adaedra: don't be, not your fault
[21:11:52] StevenXL: Hi everyone. I have created a new object, called dinosaur. I then put a handful of those objects in an array.
[21:12:43] adaedra: An array of dinosaurs?
[21:12:50] adaedra: Let no one escape
[21:13:23] Obfuscate: dinosaurs.shuffle
[21:13:33] StevenXL: I don't want Jurassic Park on my hands.
[21:13:58] StevenXL: Actually, I think my problem is that I didn't tell the object how to use to_s
[21:14:15] adaedra: how to use, or how to respond to?
[21:14:21] StevenXL: how to respond to.
[21:17:51] zzxc: Ack alright I'm taking a break I need to head home anyways.
[21:18:11] zzxc: adaedra: Thank you for your help. I'll see you around.
[21:18:26] adaedra: Good luck!
[21:18:39] zzxc: Thanks =]
[21:23:00] StevenXL: adaedra: I'm not getting the right results when I call puts on my new class.
[21:23:05] StevenXL: https://gist.github.com/anonymous/9dbe176922c30d465f9b%
[21:24:00] StevenXL: I've pasted the code there. Basically, I created a new class called Dinosaurs. I also created a new class called Dinodex. Dinodex is simply an array of Dinosaurs. When I call puts on a Dinodex object, I'd like it to have the same behavior as if I called puts on an array.
[21:24:49] adaedra: Qui me parle ?
[21:25:10] adaedra: Your gist 404.
[21:25:41] weaksauce: delete the %25 adaedra
[21:25:58] weaksauce: from the url
[21:26:08] StevenXL: https://gist.github.com/anonymous/9dbe176922c30d465f9b
[21:26:24] toretore: ?gist-usage
[21:26:24] ruboto__: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[21:26:28] adaedra: It's 23:26, you have to excuse me :x
[21:26:28] toretore: StevenXL: ^
[21:26:46] StevenXL: adaedra: it was my fault, I messed up the link.
[21:27:24] adaedra: let's put some colors on that.
[21:28:31] adaedra: Well, I think it calls #inspect, not #to_s
[21:28:57] StevenXL: adaedra: I chose Ruby as the language, not sure why there's no syntax highlighting
[21:29:05] StevenXL: adaedra: ok, let's see if I can over-ride inspect
[21:30:31] GaryOak_: #ruby is the best place to hang out in the afternoon!
[21:31:01] adaedra: StevenXL: If i read correctly, your dinosaurs should be printed twice
[21:31:39] adaedra: well, without the csv I won't be able to try it >_>
[21:31:57] adaedra: GaryOak_: "afternoon"
[21:32:11] weaksauce: puts calls to_s and p calls inspect
[21:32:11] adaedra: well, it's technically after noon.
[21:32:34] adaedra: weaksauce: yeah, I saw that, hence my "wait"
[21:32:56] adaedra: StevenXL: is it the case?
[21:33:17] GaryOak_: adaedra: Yeah it's my afternoon
[21:33:53] StevenXL: adaedra: You'd like me to post the csv as well? It's already in a repo
[21:33:57] StevenXL: I'll link you to it
[21:34:03] adaedra: To be able to test, yes
[21:34:27] StevenXL: adaedra: https://raw.githubusercontent.com/jmmastey/level_up_exercises/master/dino_catalog/dinodex.csv
[21:34:31] StevenXL: that's the raw CSV
[21:35:26] adaedra: well, that's what happens
[21:35:45] adaedra: StevenXL: what is #to_s supposed to do?
[21:36:22] weaksauce: StevenXL override to_s in the Dinosaur class
[21:36:49] adaedra: weaksauce: the problem is in Dinodex#to_s
[21:37:46] StevenXL: weaksauce: I did over ride it so that I could print the two-dimensional array like a you'd expect
[21:37:50] StevenXL: dang thinkg won't do it
[21:38:04] adaedra: StevenXL: because you don't override #to_s correctly
[21:39:07] StevenXL: adaedra: I don't? Sorry, can you explain?
[21:39:11] adaedra: StevenXL: what is #to_s supposed to do?
[21:41:09] adaedra: (In general)
[21:41:13] StevenXL: adaedra: I'd like it to behave as a "normal" two-dimensional array would behavo when you call puts and pass that in as an argument.
[21:41:27] adaedra: Yeah, in this case
[21:41:31] adaedra: But in a general case
[21:42:28] adaedra: StevenXL: no guess?
[21:43:34] StevenXL: adaedra: yea sorry, computer froze up
[21:44:11] StevenXL: adaedra: to_s returns the string representation of the object.
[21:44:27] adaedra: so now, what does Dinodex#to_s do?
[21:44:36] StevenXL: The default behavior is exactly what I am getting - i.e., the object's class and the object_id
[21:45:00] adaedra: Just read the code you gave me, and tell me what does your #to_s method do
[21:45:30] StevenXL: My to_s calls puts, with @dinosaurs (an array) as the argument to puts.
[21:45:43] adaedra: so what does it returns?
[21:46:01] StevenXL: it returns the object's class (Dinodex) and the object_id
[21:46:55] adaedra: Let's take it the other way
[21:47:09] adaedra: You say your function calls puts, so output to the console, right?
[21:47:31] adaedra: How does that fits "to_s returns the string representation of the object."
[21:48:39] StevenXL: ah - I see. I should be using the method to_s on the @dinosaurs instance variable?
[21:48:54] adaedra: that's a start
[21:49:23] adaedra: what will your method looks like then?
[21:49:45] StevenXL: @dinosaurs.to_s
[21:49:56] adaedra: well try it
[21:50:08] StevenXL: I did; the output is "a start", like you said.
[21:50:29] StevenXL: but not what I expected.
[21:50:43] adaedra: what does it looks like?
[21:50:51] adaedra: and what do you expect?
[21:51:02] adaedra: (gist, please)
[21:51:19] StevenXL: adaedra: gist of the output or of the code? I'll include both.
[21:51:32] adaedra: expectation/reality
[21:51:42] adaedra: And a haiky
[21:54:20] StevenXL: code: https://gist.github.com/StevenXL/1cde7bb1e1829c439d3a
[21:54:52] adaedra: same as mine
[21:55:26] StevenXL: output: https://gist.github.com/StevenXL/5633222d4284dcda882f
[21:55:33] StevenXL: No the output is different than last time
[21:55:43] adaedra: got the same
[21:55:49] adaedra: what did you got, last time?
[21:56:42] StevenXL: Last time I got only the class and the object_id, but it didn't include all teh information it does now.
[21:56:51] StevenXL: Now it includes the instance variable for each dinosaur
[21:56:59] StevenXL: before I was getting only the dinosaur object_id and class
[21:57:40] adaedra: well, best would be to override #to_s for Dinosaur to obtain exactly what you want
[21:57:53] StevenXL: hmmm, let's try that
[21:58:11] mwlang: so I spawn a bunch of processes with spawn and have a list of pids. How do I query running processes to see if a specific pid is still running?
[21:58:39] adaedra: mwlang: wait
[21:59:52] adaedra: (the wait group of method, if this was not understood)
[21:59:54] mwlang: adaedra: I don???t want to wait on it. I actually Process.detach intentionally. I???m putting together a rake task I can run every now and then to report on the pids still running.
[22:00:08] adaedra: Ah, so it actually terminates?
[22:00:16] mwlang: I know I can do this with backticks and call the ps command.
[22:00:16] adaedra: It doesn't go zombie?
[22:00:41] mwlang: adaedra: yeah, the processes are completely detached, so when they finish, they really do finish up.
[22:00:57] mwlang: Process#detach for more info.
[22:00:57] adaedra: (now it's a request to wait)
[22:01:04] adaedra: yeah, I see
[22:01:18] adaedra: I finish something with StevenXL problem first
[22:01:43] StevenXL: adaedra: I tried to over-ride to_s the same way in Dinosaurs class, but I got the same result.
[22:01:51] mwlang: adaedra: ah???I thought you were mentioning Process#wait. :-p
[22:02:04] adaedra: StevenXL: what did you put in Dinosaur#class?
[22:02:16] adaedra: (If it's a one line, paste it here, without def/end)
[22:03:15] StevenXL: [@name, @period, @continent, @diet, @weight, @locomotion, @description].to_s
[22:03:24] StevenXL: that's what I did to override to_s
[22:03:31] adaedra: StevenXL: I'm saying shit anyway.
[22:03:41] adaedra: Array#to_s seems to call #inspect on sub-elements.
[22:03:52] adaedra: However, I would not recommend overriding #inspect
[22:04:34] StevenXL: adaedra: hm... ok.
[22:04:35] adaedra: What you can do, is restoring Dinosaur#to_s, and modify Dinodex#to_s by using Array#map to have an array of stringified elements
[22:05:08] adaedra: mwlang: I only know a "dirty" method for this, I'll be looking if there's nothing better
[22:05:50] StevenXL: adaedra: I will try that.
[22:06:38] mwlang: If there???s not a ruby way to inspect all running processes of the system, then I???ll just backtick my way to what I need.
[22:06:54] adaedra: Ok, stack overflow says to use my trick -_-
[22:06:56] StevenXL: adaedra: my battery is running out; going to save this stuff and try out your suggestion when I get home.
[22:07:02] StevenXL: thanks for the help!
[22:07:06] adaedra: StevenXL: ok, good luck!
[22:07:10] StevenXL: I'll let you know how it goes once I get back to an outlet.
[22:07:31] bricker: mwlang: "Backticks of Success" we call them
[22:07:35] StevenXL: (my nick will be around since I'm sshing with irssi)
[22:07:47] adaedra: mwlang: send a signal 0 to the process. The signal is not really sent, but the process checking is done anyway. So if the process is gone, it will fail.
[22:07:47] mwlang: bricker: lol
[22:07:50] weaksauce: mwlang do you control the other processes?
[22:08:31] adaedra: weaksauce: "I???m putting together a rake task I can run every now and then to report on the pids still running."
[22:08:38] mwlang: weaksauce: I spawned and detached in a rake task. The intent is to at any point, log into the system and call ???rake process:status??? and see everything still running.
[22:09:16] adaedra: mwlang: seems the best solution
[22:09:26] weaksauce: yeah Process.kill(0,pid) and catch exceptions if there aren't any processes with that pid
[22:09:49] adaedra: That's what I may have done in C
[22:09:51] weaksauce: Errno::ESRCH mwlang
[22:10:57] adaedra: C knowledge is not wasted after all :p
[22:11:14] mwlang: weaksauce: thanks!
[22:11:29] weaksauce: C knowledge is never wasted adaedra
[22:12:38] adaedra: weaksauce: good to know.
[22:13:12] adaedra: a = 5; a = ++a + a++; /* What will be the value of a? */
[22:14:35] weaksauce: undefined probably but 13 likely?
[22:14:53] apeiros: would be my guess too
[22:14:53] adaedra: undefined.
[22:15:10] weaksauce: depends on the compiler and if it compiles.
[22:15:22] adaedra: as soon as you have multiple ++/--.
[22:15:55] adaedra: But since I have only clangs, I won't check
[22:16:20] adaedra: But it's funny, I'd have said 11.
[22:16:28] apeiros: I'm always baffled by how much C keeps as undefined behavior.
[22:17:34] ebonics: have you used rust code for anything production related
[22:17:41] mwlang: weaksauce: thanks for the search fodder as kill with signal 0 didn???t seem to be cutting it. but your Errno::ESRCH led me to SO answer: http://stackoverflow.com/questions/325082/how-can-i-check-from-ruby-whether-a-process-with-a-certain-pid-is-running and the last answer using getpgid
[22:18:11] adaedra: clang say 12 :-
[22:18:21] adaedra: ebonics: I only started, actually :x
[22:18:32] ebonics: youll learn fast how unstable it is i think
[22:18:42] ebonics: i assume youre using the nightlies?
[22:19:12] adaedra: mwlang: it was the answer I had open, and kill 0 seemed like the accepted solution. What doesn't works?
[22:19:36] mwlang: adaedra: I didn???t own the processes.
[22:19:50] adaedra: Ah, not the same user?
[22:19:58] weaksauce: mwlang that should have thrown a different error though
[22:20:37] adaedra: So what's the issue?
[22:21:20] adaedra: don't want to rescue two different exceptions?
[22:21:25] weaksauce: you can catch both those errors instead. but the other solution works well
[22:22:15] adaedra: Well, signal 0 is really made to check process existence, according to the documentation
[22:32:20] Radar: That mode set should stop anonymous users spamming the channel.
[22:33:11] adaedra: so it's like #RubyOnRails now, no talk if not authenticated?
[22:33:43] Radar: adaedra: correct
[22:34:36] Radar: The users who have been spamming this channel have all been unauthenticated with nickserv.
[22:34:48] Radar: I'm hoping that that will be a barrier to them spamming the channel.
[22:34:57] Radar: The spam has been a daily occurrence.
[22:35:49] Radar: !mute Radar
[22:35:50] ChanServ: +o ruboto__
[22:35:50] ruboto__: +q Radar!*@*
[22:35:50] ruboto__: -o ruboto__
[22:36:14] Radar: !unmute Radar
[22:36:14] ChanServ: +o ruboto__
[22:36:14] ruboto__: -q Radar!*@*
[22:36:14] ruboto__: -o ruboto__
[22:36:26] adaedra: apeiros: ruboto__ is multiplying the underscores
[22:37:00] pontiki: gd'evenin'
[22:37:28] apeiros: interesting. when did that happen?
[22:40:01] apeiros: derp, how do you change the nick in cinch?
[22:40:17] wasamasa: ruboto is betraying us for the python side
[22:40:32] wasamasa: and stealing underscores from their private methods
[22:40:45] adaedra: __ruboto__
[22:40:58] adaedra: YOU WERE THE CHOSEN ONE
[22:51:03] Radar: apeiros: where's a list of ruboto commands?
[22:53:22] jhass: Radar: there's none yet, !mute nick, !kick nick <reason>, !ban (!P|!T duration) <reason>, !fact (mk|ed|mv|rm) key <content>, ?fact_key <nick>
[22:53:38] jhass: I'm not sure I agree with the +q btw
[22:53:44] Radar: !kick Radar lulz
[22:53:44] helpa: Radar: No.
[22:53:45] ruboto: ruboto kicked Radar:
[22:53:45] ruboto: -o ruboto
[22:54:10] Radar: jhass: Ok. I nominate you to deal with the n-word spammers when they come on.
[22:54:11] jhass: eh, !ban has nick as first arg of course
[22:54:11] helpa: eh: Radar, you should ban the person highlighted, signed jhass.
[22:54:20] Radar: jhass: Because you can watch the channel 24/7 unlike the rest of us, right? :O)
[22:55:23] jhass: we have a bit of a hole around 5-11 UTC from what I've observed
[22:55:51] jhass: well, more like 6-7 actually
[22:55:57] jhass: instead of 5
[22:57:39] Radar: Do we need an american op?
[23:00:44] jhass: not sure, I think asian would almost fit the hole better
[23:02:03] apeiros: Radar: https://gist.github.com/apeiros/8d3bed136d188f35712d probably not complete
[23:02:15] Radar: @apeiros: great :)
[23:02:28] apeiros: and more ops is always good.
[23:05:15] bricker: I'm American :O
[23:05:21] bricker: And, in America
[23:05:34] jhass: http://www.timeanddate.com/worldclock/meetingtime.html?iso=20150519&p1=224&p2=70&p3=179&p4=37&p5=166&p6=44&p7=248
[23:06:19] jhass: 5-7 UTC is getting late in the states and is being early in EU
[23:07:08] adaedra: This remembers me that Europe is 3 time zones.
[23:46:17] Senjai: I'm Canadian. And not in America.
[23:46:24] Senjai: Just saying.
[23:58:26] bricker: Senjai: close enough