pizzaops

Activity Graph

Page 1 of 3 | Next »

2018-09-03

[19:10:25] pizzaops: *.net *.split

2018-07-20

[00:07:23] pizzaops: *.net *.split
[00:15:46] pizzaops: has joined #ruby

2018-06-20

[03:51:09] pizzaops: Ping timeout: 276 seconds
[06:21:54] pizzaops: has joined #ruby
[06:22:33] pizzaops: Max SendQ exceeded
[06:23:36] pizzaops: has joined #ruby
[06:24:24] pizzaops: Max SendQ exceeded
[06:25:26] pizzaops: has joined #ruby
[06:26:07] pizzaops: Max SendQ exceeded
[06:26:57] pizzaops: has joined #ruby
[06:29:34] pizzaops: Max SendQ exceeded
[06:30:02] pizzaops: has joined #ruby

2018-06-01

[03:44:47] pizzaops: *.net *.split
[07:47:37] pizzaops: has joined #ruby

2018-05-30

[23:15:41] pizzaops: Hi there. I'm experiencing some strange behavior with hash defaults and I'm wondering if somebody can help me understand this: https://gist.github.com/pizzaops/5502cd81c661d698bc15668234e1a7d4
[23:15:55] pizzaops: specifically, I don't understand why `#keys` returns nothing etc
[23:16:08] pizzaops: you can still retrieve the value so clearly it's set
[23:16:26] pizzaops: but you can't loop, etc
[23:18:37] pizzaops: i didn't realize i was updating the default
[23:19:20] pizzaops: i don't think this is uh
[23:19:22] pizzaops: the ideal behavior
[23:19:25] pizzaops: but thanks!
[23:22:44] pizzaops: :hail_satan:?
[23:25:19] pizzaops: you can index into a proc?
[23:25:32] pizzaops: sorry i think of [] as indexing
[23:25:37] pizzaops: e.g. foo['bar']
[23:25:55] pizzaops: (i'm a lowly ops person who codes to automate, i don't write "real software")

2018-05-29

[02:47:15] pizzaops: *.net *.split
[02:48:08] pizzaops: has joined #ruby

2018-05-23

[01:24:03] pizzaops: Is there a straightforward way to do a regex match against a string, and save everything *after* the match to a variable. For example...
[01:24:35] pizzaops: Given a regex of `\/CN=` and a string of `/OU=Domain Control Validated/CN=*.google.com`, save `*.google.com*` to a variable.
[01:25:05] pizzaops: The trailing * in the last backticked-item is a typo.
[01:27:59] pizzaops: Yeah I think I can do this: 'foo'.match(/f(.*)/).captures
[01:28:16] pizzaops: that returns `oo`
[01:28:30] pizzaops: and in this case it will always be everything after the match so that's safe
[01:28:37] pizzaops: elomatreb: thanks for being my rubber duck :)

2018-05-06

[15:38:23] pizzaops: has joined #ruby

2018-05-02

[23:16:47] pizzaops: *.net *.split

2018-04-25

[12:25:47] pizzaops: *.net *.split
[12:27:20] pizzaops: has joined #ruby
[15:01:18] pizzaops: *.net *.split
[15:03:17] pizzaops: has joined #ruby

2018-04-10

[13:47:41] pizzaops: has joined #ruby

2018-03-15

[11:27:21] pizzaops: *.net *.split
[11:29:01] pizzaops: has joined #ruby
[11:29:01] pizzaops: Changing host

2018-02-28

[23:22:13] pizzaops: Ping timeout: 256 seconds
[23:23:57] pizzaops: has joined #ruby
[23:24:16] pizzaops: Max SendQ exceeded
[23:24:48] pizzaops: has joined #ruby
[23:24:49] pizzaops: Max SendQ exceeded
[23:25:19] pizzaops: has joined #ruby
[23:25:25] pizzaops: Max SendQ exceeded
[23:25:57] pizzaops: has joined #ruby

2018-02-09

[12:05:23] pizzaops: has joined #ruby

2018-01-22

[15:40:48] pizzaops: *.net *.split
[15:41:19] pizzaops: has joined #ruby
[23:27:01] pizzaops: Read error: Connection reset by peer
[23:27:35] pizzaops: has joined #ruby

2017-12-27

[19:14:52] pizzaops: Ping timeout: 240 seconds
[19:43:10] pizzaops: has joined #ruby

2017-12-07

[14:48:18] pizzaops: *.net *.split
[14:54:21] pizzaops: has joined #ruby
[21:43:04] pizzaops: *.net *.split
[21:44:25] pizzaops: has joined #ruby

2017-10-11

[20:20:17] pizzaops: So I've read the docs here — https://bundler.io/v1.11/man/bundle-install.1.html — and maybe I'm missing something, but is there no way to run `bundle install` from outside a project's directory?
[20:20:52] pizzaops: E.g. with git I can do things like `git --git-dir=/path/to/project/.git --work-dir=/path/to/project checkout master`
[20:20:58] pizzaops: from any random directory
[20:21:22] pizzaops: havenwood RickHull thank you! <3 <3
[20:21:28] pizzaops: Don't know how I overlooked that.
[20:22:15] pizzaops: RickHull: I don't see that flag in the docs, output_dir
[20:22:28] pizzaops: (or anything like it
[20:23:11] pizzaops: RickHull: agreed, but hopefully it does it in the proper directory. I'll just make a Gemfile and test it real quick.
[20:23:21] pizzaops: Thanks for your help sir!
[20:34:54] pizzaops: RickHull: thanks again, can confirm that it creates the `Gemfile.lock` in the appropriate place automatically.
[22:06:26] pizzaops: Is there something in Ruby comparable to Python's ctypes? Just curious.

2017-09-18

[20:52:16] pizzaops: I don't know how I've never run into this before, but I can't seem to find good info - is there a way to pass arguments in a Gemfile for use by bundler? E.g. if I normally need to do `gem install libv8 -v 'XX.XX.XX' -- --with-system-v8`, is there a way to actually specify the `-- --with-system-v8` in the Gemfile?
[20:54:19] pizzaops: Answered my own question: https://bundler.io/v1.15/man/bundle-config.1.html#BUILD-OPTIONS

2017-09-11

[20:24:09] pizzaops: *.net *.split

2017-08-14

[23:51:23] pizzaops: *.net *.split
[23:54:25] pizzaops: has joined #ruby

2017-07-26

[09:16:16] pizzaops: Ping timeout: 276 seconds

2017-07-06

[05:22:24] pizzaops: Ping timeout: 240 seconds

2017-06-20

[00:17:38] pizzaops: *.net *.split
[00:23:10] pizzaops: has joined #ruby

2017-06-04

[20:46:08] pizzaops: *.net *.split
[20:49:57] pizzaops: has joined #ruby

2017-05-27

[22:54:34] pizzaops: Ping timeout: 245 seconds
[22:56:59] pizzaops: has joined #ruby

2017-05-09

[09:05:45] pizzaops: has joined #ruby

2016-07-18

[17:06:23] pizzaops: Ping timeout: 272 seconds
[17:19:39] pizzaops: has joined #ruby

2016-06-25

[13:51:12] pizzaops: Ping timeout: 258 seconds

2016-06-23

[20:30:55] pizzaops: Ping timeout: 258 seconds
[20:39:40] pizzaops: has joined #ruby

2016-06-06

[02:41:01] pizzaops: Quit: Updating details, brb
[02:41:12] pizzaops: has joined #ruby
[08:06:28] pizzaops: Ping timeout: 264 seconds
[08:09:15] pizzaops: has joined #ruby

2016-05-24

[06:14:40] pizzaops: Ping timeout: 260 seconds
[06:16:42] pizzaops: has joined #ruby

2016-05-08

[01:44:19] pizzaops: Ping timeout: 250 seconds
[01:46:03] pizzaops: has joined #ruby

2016-04-13

[20:06:54] pizzaops: Ping timeout: 248 seconds
[20:10:30] pizzaops: has joined #ruby

2016-04-12

[04:57:06] pizzaops: wolffles: https://eval.in/551862
[04:57:31] pizzaops: There's no #number method in Smaller, in your original version.
[04:57:47] pizzaops: so super(number) is calling something undefined.
[04:58:01] pizzaops: plus the "end" problem
[04:58:50] pizzaops: You can't just refer to instance variables by name without an @. The reason you see that so often is because people have created "reader" methods
[05:02:47] pizzaops: And personally I like to always use self.number not just number, because it's too vague.
[05:02:55] pizzaops: But most people don't do that.
[05:03:11] pizzaops: I also mostly type out parens, so . . . yeah
[05:03:33] pizzaops: I'd prefer to have to explicitly change those, because I want it to be clear what's happening.

2016-04-07

[19:30:47] pizzaops: I often do things like this when I want to set a default value for an instance variable (or just something inside a method in general) but still allow it to be overridable: https://gist.github.com/pizzaops/2f91371ff7a00edee6a09fbdc3035c0d
[19:30:54] pizzaops: Is that actually idiomatic? Is there a "better" way?
[19:33:40] pizzaops: Yeah I really just need a attr_reader here, but that's not really my question
[19:33:55] pizzaops: I'm more asking about my use of param=nil and ||
[19:36:13] pizzaops: Ox0dea: that's...a good point
[19:36:17] pizzaops: I'm not sure why!
[19:37:40] pizzaops: Ox0dea: you're 100% right . . . I don't remember what got me on this path.
[19:38:03] pizzaops: There was some point where normal defaults weren't good enough but I don't remember why anymore, and I think I just kept doing this weird pattern even when not necessary
[19:38:33] pizzaops: Ox0dea: the funny thing about it in this case was I was cargo-culting *myself*
[19:38:48] pizzaops: Thanks, as usual!

2016-04-01

[23:10:31] pizzaops: This really feels like it should be a "map" to me not an "each", but map obviously returns an array not a hash, so yeah...any thoughts? https://gist.github.com/pizzaops/1f44b4e37bc2c57272c227102d83f851
[23:10:55] pizzaops: I mean it's basically fine as is, I'm just curious if there's a better way than yet another `.each`
[23:12:37] pizzaops: Papierkorb: so calling .to_hash on an array of arrays where each item is an array of length 2 converts it to a hash?
[23:12:51] pizzaops: that's perfect, thanks
[23:15:22] pizzaops: Papierkorb: does this seem reasonable? https://gist.github.com/pizzaops/1f44b4e37bc2c57272c227102d83f851 — I need the ||= because calls on these objects can potentially trigger network traffic, so I don't want to create the hash again if I've already created it.
[23:16:45] pizzaops: Papierkorb: right, I meant to, just forgot. Thanks!
[23:17:18] pizzaops: So @networks will always return either way? (with that last line @networks/networks removed
[23:18:04] pizzaops: MINANBYGANSTY
[23:18:14] pizzaops: (Matsz is not actually nice but you guys are nice so thank you)

2016-03-29

[19:03:08] pizzaops: Anybody familiar with net/ssh?
[19:03:20] pizzaops: I'm trying to use the request pty error and it just fails (but I have no problem getting a pty via stadnard ssh)
[19:03:26] pizzaops: Exception `Net::SSH::ChannelRequestFailed' at /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/net-ssh-3.1.0/lib/net/ssh/connection/channel.rb:566 - Net::SSH::ChannelRequestFailed

2016-03-24

[21:34:01] pizzaops: Ping timeout: 240 seconds

2016-03-23

[18:54:36] pizzaops: Ping timeout: 250 seconds
[18:58:39] pizzaops: has joined #ruby

2016-03-14

[03:32:20] pizzaops: Welp, there's the obvious permissions errors.
[03:32:23] pizzaops: I'd start with those.
[03:33:44] pizzaops: clorisu: also if you literally just cmd/ctrl-f for "permission"
[03:33:53] pizzaops: clorisu: not enough, it depends on libraries.
[03:34:11] pizzaops: https://github.com/rbenv/ruby-build/wiki
[03:34:31] pizzaops: Even if you're not using ruby-build (rbenv), that should cover the dependencies for compiling most gems on most platforms.
[03:36:25] pizzaops: But probably listen to Ox0dea since I don't know anything at all about Brightbox.
[03:45:02] pizzaops: I didn't say you needed the libraries from other rubies...
[03:45:07] pizzaops: I said you needed other libraries.
[03:45:24] pizzaops: And then I linked you to what I was talking about.

2016-03-13

[23:42:21] pizzaops: Silly question maybe - RubyMine, when linting my code, is telling me that using Class variables (@@) is bad style. I'm not really clear on why though. I have things I need to store, and use several times throughout the class, that never change in a instance of the class. I just need them in variables so that I don't have to manually write that code over and
[23:42:29] pizzaops: Am I supposed to wrap them in a method instead or something? Why?
[23:45:05] pizzaops: Hmm. Sure, I could use a constant. But I don't entirely get what's *wrong* with class variables, still.
[23:50:52] pizzaops: Ox0dea: the behavior in your example makes perfect sense to me...isn't one of the main points of inheritance that you can also override parts the parent?
[23:51:27] pizzaops: i misrea da bit
[23:56:47] pizzaops: Yeah that's a fair point.

2016-02-24

[04:34:48] pizzaops: Is there a way of doing this: @hardware = hardware.is_a? Wilhelm::Vms::Machine::Hardware ? hardware : raise Exception.new('hardware must be an instance of Wilhelm::Vms::Machine::Hardware')
[04:35:11] pizzaops: Basically I want to raise an exception if the "hardware" value isn't an instnace of that class, but i have like 7 more params to do that for so I dont want like 7 if/elses
[04:35:16] pizzaops: but I can if I have to?
[04:36:59] pizzaops: havenwood: sure but I still need a terse way of expressing this
[04:37:03] pizzaops: i'll take a look at contracts
[23:48:43] pizzaops: http://vignette3.wikia.nocookie.net/simpsons/images/5/5e/Dr._Riviera.png/revision/latest?cb=20120509073411
[23:49:56] pizzaops: I literally was thinking "this person is about to ask 'which is better, php or ruby?' "
[23:49:57] pizzaops: I was so close.
[23:50:19] pizzaops: martin290: are you good at PHP, or are you just learning it?
[23:51:03] pizzaops: Well, my point is, it's more important to learn to program than to learn specifically Ruby (or PHP)
[23:51:26] pizzaops: probably go with Ruby over PHP, but either way, learn something and do something with it
[23:52:17] pizzaops: Just learn ASP.net then?
[23:52:19] pizzaops: ACTION ducks
[23:52:57] pizzaops: I was joking :)
[23:53:35] pizzaops: Learn some Ruby and learn some Sinatra and you should be able to do some fun stuff.

2016-02-21

[00:37:45] pizzaops: shevy: oh yeah I'm definitely learning and getting better
[00:37:47] pizzaops: POODR is helping a lot

2016-02-20

[22:52:43] pizzaops: I'm getting `stack level too deep` here when I call .new on it and I'm not quite sure why. It goes away if I remove the line about @hierarchy from the initialize method. https://gist.github.com/pizzaops/582144773875e4078b25
[22:53:03] pizzaops: This usually happens when I've accidentally done something endlessly looping/recursive but I don't see how I've done that here.
[22:53:40] pizzaops: Ox0dea: I'm definitely certain of that, but I'm not sure how exactly :P
[22:54:59] pizzaops: Ox0dea: ohhhhh. I was trying to call an entirely diffefernt class named hiera haha
[22:55:09] pizzaops: I guess ill just rename this one, so at minimum it wont be confusing
[22:55:28] pizzaops: Ox0dea: yeah, but i'll rename the class anyway
[22:56:14] pizzaops: Ox0dea: man rubymine is awesome. when i rename the file it autosearched all my other files for references to it
[22:56:35] pizzaops: I'm still a vim-user at heart but a lot of the rubymine stuff has been a big help in developing this larger app
[22:56:49] pizzaops: dsadajsd: u trollin' bro?
[22:57:48] pizzaops: Ox0dea: yeah, I consider doing something that will only work if I ::fully scope it to be a last resort
[22:57:51] pizzaops: i'd rather just avoid collisiions
[23:00:11] pizzaops: baweaver: "real time applicatoins" are a thing. it's a legitimate question :P
[23:00:19] pizzaops: but I have no idea what the answer is re: ruby
[23:00:56] pizzaops: Yeah if you're trying to do some sort of super high performance thing that requires real-time ruby is probably not the right tool
[23:01:05] pizzaops: (which is not to say I think ruby performs poorly)
[23:01:27] pizzaops: that's a good point
[23:01:30] pizzaops: it's more about certainty
[23:01:56] pizzaops: but since when is PHP real time...to return to dsadajsd's question
[23:06:17] pizzaops: Hey it works now! Ox0dea, very helpful as always, thank you.
[23:06:44] pizzaops: baweaver: based on earlier questions he might mean "what its capabilities are" not "how I can learn", but maybe dsadajsd you could clarify
[23:06:58] pizzaops: Are you asking for a resource to learn Ruby with?
[23:07:56] pizzaops: If you know how to program already in general, CodeCademy is a good way to learn Ruby syntax. If you don't know how to program in general, I think it leaves out too much context, and I'd encourage you to consider paying the $25 for teamtreehouse
[23:08:00] pizzaops: shadowfirebird: Shoes, obviously!
[23:08:16] pizzaops: http://shoesrb.com/ - although I'm mostly kidding
[23:08:49] pizzaops: I was 90% kidding, as I said.
[23:09:00] pizzaops: I only use shoes if i need to like, throw up a quick gui client for some internal tool or something
[23:09:38] pizzaops: I would argue that Qt has the better cross-platform story (although GTK for Win/Mac is certainly a thing)
[23:23:48] pizzaops: I don't use Rails because I'm distrustful of :magic
[23:23:56] pizzaops: s/:magic/"magic"
[23:24:06] pizzaops: It does so much for me that I barely understand how my application works.
[23:24:28] pizzaops: Ox0dea: haha sure, but I don't have to maintain my computer
[23:24:34] pizzaops: i do have to maintain a rails app i build
[23:24:46] pizzaops: Like I don't have to ship patches for OSX :P
[23:25:09] pizzaops: i guess i dont have to ship patches for rails either, but i do have to maintain an app that relies on it
[23:25:37] pizzaops: And when it comes to the "computer" I use to host an app, I actually do have a fairly deep relative knowledge of Linux internals, compared to say, OSX internals.
[23:25:46] pizzaops: Because i have an ops background
[23:25:56] pizzaops: (which is why I'm such a mediocre programmer :D )

2016-02-19

[00:43:37] pizzaops: shevy: it seems like there are a lot of blog posts/explanations/etc from just googling `ruby fibers`
[00:52:02] pizzaops: ACTION imagines that IRC had emoji and imagines that :trollface: rendered into the appropriate image and directs the imaginary trollface image at Radar
[02:25:51] pizzaops: I mean... you can do != nil

2016-02-18

[09:27:28] pizzaops: dn5: yeah it returns nil but the original variable is untouched so you can still just return day like you're doing now
[09:28:13] pizzaops: E.g. take `puts 'foo'` - it will print out foo, but the *return value* is nil
[09:28:31] pizzaops: e.g. myvar = puts 'foo' results in myvar == nil
[09:28:50] pizzaops: right and if you're using bang you plan to reuse the original variable anyway
[09:29:00] pizzaops: so the return value can be nil, just as a way to know if ti did anything
[09:31:56] pizzaops: raldu: that doesn't explain why they failed to compile though, only while they were being reinstalled.
[09:32:02] pizzaops: s/while/why
[09:32:34] pizzaops: I hope you figure it out!
[09:32:49] pizzaops: Bed time for me. Goodnight, dirty non-functional-programming-language users <3
[19:26:27] pizzaops: Why doesn't this return something wrapped in double-braces? https://gist.github.com/
[19:26:33] pizzaops: Erm, https://gist.github.com/pizzaops/9da9b02d4390e0d55967 haha
[19:26:49] pizzaops: Since I'm wrapping the intiial memo in [], and that happens with each "iteration" shouldn't i end up with wierdness
[19:27:45] pizzaops: I know that.
[19:27:50] pizzaops: I'm just curious, syntactically.
[19:28:04] pizzaops: I actually already have a solution to my "real" problem.
[19:29:40] pizzaops: baweaver: I know I'm doing that, but if I'm wrapping each memo in [] for each iteration shouldnt i end up with arrays inside arrays
[19:31:44] pizzaops: mm fair enough, thanks
[19:36:00] pizzaops: Yeah, but on the second iteration I would expect it to be [[firstmemo]] + [nexthash]
[22:55:03] pizzaops: Wilhelm::Project::List for organization/namespacing purposes. Is there some way to do that?
[22:55:03] pizzaops: So when I require this code from somwhere — https://gist.github.com/pizzaops/f1c5eb2728e5124c2716 — e.g. require 'wilhelm/project/list', prior to trying to create an instance of the class inside, the error "Project is not a module" is returned. And that's true. There's a Wilhelm::Project class. But I still want to refer to this class here as
[22:57:18] pizzaops: postmodern: for some reason I just didn't think I could do that.
[22:57:24] pizzaops: snce i already haev a class project
[23:32:11] pizzaops: postmodern: that did work btw. Thanks! I don't know why that wasn't obvious. Appreciate the help!