bodgix

Activity Graph

Page 1 of 2 | Next »

2019-08-30

[10:23:58] bodgix: *.net *.split
[10:27:20] bodgix: has joined #elixir-lang

2019-08-22

[00:56:01] bodgix: *.net *.split
[01:13:54] bodgix: has joined #elixir-lang

2019-08-12

[10:31:06] bodgix: has joined #elixir-lang

2019-05-31

[12:25:56] bodgix: Read error: Connection reset by peer

2019-04-13

[17:06:15] bodgix: has joined #elixir-lang

2019-04-03

[01:12:37] bodgix: Quit: ZNC 1.7.2 - https://znc.in

2018-03-22

[17:17:18] bodgix: has joined #ruby

2018-03-21

[15:00:16] bodgix: Quit: ZNC 1.6.5 - http://znc.in

2018-03-03

[01:27:35] bodgix: Ping timeout: 240 seconds
[01:28:48] bodgix: has joined #ruby

2017-12-23

[13:46:45] bodgix: has left #ruby: ()
[13:47:20] bodgix: has joined #ruby

2017-12-19

[14:26:07] bodgix: has joined #ruby

2017-06-28

[17:44:15] bodgix: has joined #ruby
[17:45:25] bodgix: has left #ruby: ()

2017-06-27

[05:39:10] bodgix: Ping timeout: 260 seconds

2017-06-20

[00:17:29] bodgix: *.net *.split

2017-05-23

[17:36:44] bodgix: Ping timeout: 255 seconds
[17:38:10] bodgix: has joined #ruby

2017-05-13

[11:13:58] bodgix: has joined #ruby
[11:20:25] bodgix: Quit: ZNC 1.6.5 - http://znc.in
[11:20:39] bodgix: has joined #ruby
[11:23:25] bodgix: Client Quit
[11:23:52] bodgix: has joined #ruby
[12:03:26] bodgix: Quit: ZNC 1.6.5 - http://znc.in
[12:03:49] bodgix: has joined #ruby
[12:05:24] bodgix: Client Quit
[12:05:51] bodgix: has joined #ruby

2017-04-14

[10:55:48] bodgix: has joined #ruby
[11:27:49] bodgix: Quit: Leaving.
[15:42:16] bodgix: has joined #ruby
[16:14:43] bodgix: Quit: Leaving.
[16:46:06] bodgix: has joined #ruby
[16:46:25] bodgix: Client Quit

2017-04-10

[09:43:38] bodgix: has joined #ruby
[12:44:05] bodgix: Quit: Leaving.
[12:58:33] bodgix: has joined #ruby
[15:09:43] bodgix: Read error: Connection reset by peer
[16:16:39] bodgix: has joined #ruby
[16:53:37] bodgix: Quit: Leaving.
[18:01:25] bodgix: has joined #ruby
[19:17:18] bodgix: Quit: Leaving.
[19:33:10] bodgix: has joined #ruby
[19:33:29] bodgix: Client Quit

2017-04-08

[00:17:44] bodgix: Quit: Leaving.
[09:48:08] bodgix: has joined #ruby
[09:50:01] bodgix: has left #ruby: ()

2017-04-07

[20:57:18] bodgix: has joined #ruby
[21:28:41] bodgix: Quit: Leaving.
[21:39:30] bodgix: has joined #ruby

2016-07-15

[14:30:06] bodgix: has joined #ruby
[14:35:48] bodgix: hello all. I'm struggling with a trivial problem. I want to write a long regexp in multiple lines. but I don't know why it's not matching when I write it in multiple lines with %r{}xm it works if I write it in a single line using //m : https://gist.github.com/anonymous/6ac84c4b016b9060153351ec205894c3
[15:01:46] bodgix: apeiros: ok
[15:04:20] bodgix: https://gist.github.com/anonymous/28df35cb1364d91c12212b290f312b81
[15:51:00] bodgix: ah got you
[15:51:06] bodgix: of course. thanks apeiros
[15:51:28] bodgix: when I remove x it doesn't work because of \n I presume though

2016-06-14

[17:42:37] bodgix: has left #ruby: ()

2016-06-03

[08:39:15] bodgix: Ping timeout: 264 seconds
[08:39:19] bodgix: has joined #ruby
[08:39:32] bodgix: has left #ruby: ()
[11:09:22] bodgix: has joined #ruby

2016-05-31

[00:07:40] bodgix: Ping timeout: 264 seconds
[00:08:56] bodgix: has joined #ruby

2016-05-23

[17:47:41] bodgix: has joined #ruby
[17:49:58] bodgix: Hi. I'm looking for advice on architecture. I have a collection whose objects need reference to the collection itself. If I use composition (assign the collection itself to an instance variable of the object in the collection) I'm getting circular references. I don't know if it's really a problem, but when I print the collection with pp, I'm seeing something like an endless nesting
[17:51:02] bodgix: would accessing having the collection a global or module variable be a better idea? or using the singleton pattern maybe? or are circular references ok?
[17:52:52] bodgix: I have a collection of metrics. some metrics are "complex" metrics whose value is a mathematical expression which is using other metrics
[17:53:12] bodgix: so when I call metric.value it needs access to other metrics in order to calculate the value
[17:53:24] bodgix: or if it's a simple metric, it just returns the value
[17:53:54] bodgix: how about Marshall'ing? do you think there may be a problem?
[17:54:17] bodgix: but the expression may use any arbitrary metric
[17:54:38] bodgix: so I figured, I'll give the metric access to all other merics' values
[17:55:37] bodgix: the only issue I've noticed so far is when using pp. It produces a very long list because it de-references the back reference
[17:56:12] bodgix: maybe I'm using an old version. I'm on Ruby 2.0
[17:57:47] bodgix: ok. looks good. maybe there's another issue there
[18:01:42] bodgix: thanks jhass, apeiros looks like there should be no issues with circular refs then. but I may consider a global / module variable. I thought that passing the collection ref to the object would be cleaner though
[18:02:16] bodgix: until I saw endless screens of pp output. Still don't know why.
[18:03:30] bodgix: fair enough
[18:04:52] bodgix: I actually thought of 3rd solution. I assigned the collection to a class variable of Metric's base class
[18:05:44] bodgix: which is kind of similar to global I think
[18:07:26] bodgix: good point. thanks jhass

2016-05-15

[23:05:35] bodgix: has left #ruby: ()

2016-04-16

[20:46:40] bodgix: Ping timeout: 264 seconds
[20:51:23] bodgix: has joined #ruby

2016-04-14

[07:13:40] bodgix: Ping timeout: 264 seconds
[07:14:49] bodgix: has joined #ruby

2016-04-06

[16:37:37] bodgix: has left #ruby: ()
[16:38:06] bodgix: has joined #ruby

2016-03-30

[23:37:31] bodgix: hey everyone. this question has been bothering me for some time now. are there any reasons for using polymorphism in ruby or more generally dynamically typed languages? I mean unless there's common functionality which can be extracted into the base class, I don't see many reasons to create class hierarchies, duck typing could be used instead? Anyone has any ideas why class hierarchies would be better besides the organization of code?
[23:38:43] bodgix: I've read it iirc. There's an example with bicycles?
[23:39:32] bodgix: I think I'll read this chapter again
[23:40:01] bodgix: the thing is that technically it's not needed in ruby as opposed to java for example

2016-03-01

[19:25:47] bodgix: *.net *.split
[19:31:34] bodgix: has joined #ruby

2016-02-17

[10:03:49] bodgix: *.net *.split
[10:05:10] bodgix: has joined #ruby

2016-02-16

[23:38:40] bodgix: *.net *.split
[23:47:59] bodgix: has joined #ruby

2016-02-15

[14:24:38] bodgix: *.net *.split
[14:27:46] bodgix: has joined #ruby

2016-02-14

[21:26:16] bodgix: Ping timeout: 240 seconds
[21:28:53] bodgix: has joined #ruby

2016-02-12

[00:15:09] bodgix: Ping timeout: 240 seconds
[00:15:20] bodgix: has joined #ruby

2016-01-21

[00:10:12] bodgix: has joined #ruby
[00:10:50] bodgix: *.net *.split
[00:10:58] bodgix: has joined #ruby

2016-01-20

[18:22:04] bodgix: *.net *.split
[18:24:59] bodgix: has joined #ruby
[18:35:42] bodgix: *.net *.split
[18:37:52] bodgix: has joined #ruby
[18:48:18] bodgix: *.net *.split
[18:48:41] bodgix: has joined #ruby
[18:59:06] bodgix: *.net *.split
[20:18:05] bodgix: has joined #ruby
[20:28:39] bodgix: *.net *.split
[20:42:54] bodgix: has joined #ruby
[20:53:24] bodgix: *.net *.split
[22:01:23] bodgix: has joined #ruby
[22:11:30] bodgix: *.net *.split
[22:11:56] bodgix: has joined #ruby
[22:22:10] bodgix: *.net *.split

2015-12-31

[16:44:46] bodgix: Read error: Connection reset by peer
[17:26:47] bodgix: has joined #ruby

2015-12-29

[11:25:37] bodgix: has joined #ruby
[19:40:57] bodgix: I can't figure out the syntax to end the exception handling: begin block without ending the code block nested within it. Is that even possible? https://gist.github.com/bodgix/0dfa6308d9747248b5ef
[19:43:04] bodgix: domgetter: I realized it makes sense to keep it there. But in general would it be possible to leave it out?
[19:44:13] bodgix: I believe open doesn't create the actual connection so it shouldn't throw anything
[19:44:39] bodgix: but in general, putting LDAP example aside, is it possible to do this?
[19:45:00] bodgix: ok. good point. I could move it inside the block
[19:45:21] bodgix: I guess I could createa proc
[19:45:46] bodgix: hm. meh never mind that wouldn't make any difference???
[19:49:26] bodgix: domgetter: afaik it doesn't. It's funny how diffferently an ldap handle behaves when constructed with new or when open is used with a block
[19:50:20] bodgix: if you use ldap = Net::LDAP.new then it creates a new connection for every search/ add etc. If you use Net::LDAP.open { |ldap| ???} it creates a single session for the duration of the whole block
[19:51:21] bodgix: it's in the docs but it's easy to get bitten by it imo anyway
[19:51:41] bodgix: but I don't want the "reconnect and bind" behavior
[19:54:12] bodgix: actually I'm fine with the begin block spanning across the whole lifetime of LDAP. it makes sense here. However, this example made me wonder if it was possible to end the begin block in the middle of another block. I thought it wasn't possible since it would require a label or sth but thought I'd ask
[19:55:58] bodgix: nietzschette: thanks that's very interesting
[19:56:10] bodgix: it doesn't override the outer block I giess?
[19:58:12] bodgix: ok got you. this is definitely a way to achieve this kind of fine-grained exception handling
[20:04:27] bodgix: Since rubocop warns to use raise to re-raise and fail in other situations iirc, it looks like re-raising is a valid technique. exception handlers nesting is what I was looking for. great suggestions, thanks everyone :)

2015-12-21

[17:20:03] bodgix: has left #ruby: ()

2015-12-15

[21:33:34] bodgix: has joined #ruby
[22:22:42] bodgix: I've just tested that TCPSocket.new 'fqdn', port tries the next A record of fqdn if fqdn has multiple A records and the 1st one fails. I didn't find any mentions of that in the docs
[22:23:24] bodgix: anyone knows if that's something portable or platform dependent?

2015-12-03

[18:08:55] bodgix: has left #ruby: ()

2015-12-02

[15:38:32] bodgix: *.net *.split
[15:41:26] bodgix: has joined #ruby
[15:52:17] bodgix: *.net *.split
[16:47:42] bodgix: has joined #ruby

2015-11-27

[08:42:02] bodgix: *.net *.split
[10:34:48] bodgix: *.net *.split
[10:42:49] bodgix: has joined #ruby
[10:45:59] bodgix: *.net *.split
[10:47:03] bodgix: has joined #ruby

2015-11-26

[08:13:04] bodgix: has joined #ruby

2015-11-21

[07:46:29] bodgix: has joined #ruby

2015-11-20

[20:51:39] bodgix: has left #ruby: ()

2015-11-17

[14:15:07] bodgix: has joined #ruby
[14:16:32] bodgix: Hi. Is it a good practice to trap ctrl+c in the main thread and signal all threads to stop and join them before exiting from the main thread? I'm not really interested in any exception if any were thrown. Can I just exit the main thread?
[14:31:32] bodgix: thanks bob_f that's probably the safe rule of thumb??? I was just wandering if I know exactly what they're doing, are there any bad consequences of just exiting the main thread. It's not like I'm going to leave any zombie processes or sth???
[14:33:09] bodgix: yeah fair enough :)
[14:35:19] bodgix: but then that would mean that every well written multi threaded program in ruby would have to trap SIGTERM ??? I'm just wondering if that's the case???
[14:35:39] bodgix: sorry SIGINT
[14:39:42] bodgix: :) cool. Good to know

2015-11-11

[15:03:09] bodgix: has left #ruby: ()

2015-11-07

[20:51:11] bodgix: has joined #ruby

2015-10-31

[14:44:08] bodgix: Read error: Connection reset by peer

2015-10-23

[10:07:47] bodgix: *.net *.split
[10:10:06] bodgix: has joined #ruby

2015-10-10

[21:43:05] bodgix: *.net *.split
[21:43:55] bodgix: has joined #ruby

2015-10-06

[13:20:14] bodgix: has joined #ruby

2015-10-02

[16:45:20] bodgix: has left #ruby: ()

2015-09-23

[18:58:56] bodgix: Ping timeout: 252 seconds
[19:01:38] bodgix: has joined #ruby

2015-09-22

[22:19:37] bodgix: Ping timeout: 252 seconds
[22:21:49] bodgix: has joined #ruby

2015-09-15

[11:47:43] bodgix: I'm playing with PTY::spawn. I've been struggling with this for some time now.
[11:48:31] bodgix: I'm using expect to find something in the output, but I don't know how to know that the command has finished. I'm thinking maybe to set the prompt to something I will be looking for?
[11:49:19] bodgix: In other words how do I know that what I'm seeing on the terminal is no longer an interactive command but I'm back in the shell

2015-09-01

[03:27:44] bodgix: Ping timeout: 256 seconds
[03:30:27] bodgix: has joined #ruby

2015-08-19

[22:35:42] bodgix: has left #ruby: ()
[22:57:26] bodgix: has joined #ruby

2015-08-16

[21:02:06] bodgix: has left #ruby: ()
[22:27:42] bodgix: has joined #ruby

2015-08-15

[13:18:12] bodgix: has joined #ruby
[13:34:04] bodgix: Ping timeout: 256 seconds
[18:54:30] bodgix: has joined #ruby
[21:09:36] bodgix: Quit: Leaving.
[21:19:23] bodgix: Quit: ZNC - http://znc.in
[21:20:02] bodgix: has joined #ruby
[21:20:32] bodgix: has left #ruby: ()
[21:22:40] bodgix: has joined #ruby

2015-08-14

[08:44:41] bodgix: has joined #ruby
[13:53:04] bodgix: Quit: Leaving.
[13:54:01] bodgix: has joined #ruby
[15:15:29] bodgix: has left #ruby: ()

2015-08-13

[00:02:37] bodgix: Quit: ZNC - http://znc.in
[00:03:09] bodgix: has joined #ruby
[00:08:59] bodgix: Quit: ZNC - http://znc.in
[08:20:51] bodgix: has joined #ruby
[10:56:17] bodgix: Quit: Leaving.
[11:00:09] bodgix: Client Quit
[11:01:20] bodgix: has joined #ruby
[11:01:35] bodgix: Client Quit
[11:05:03] bodgix: has joined #ruby
[11:22:25] bodgix: Remote host closed the connection
[11:23:05] bodgix: has joined #ruby
[11:31:12] bodgix: Quit: ZNC - http://znc.in
[11:31:25] bodgix: has joined #ruby
[18:50:09] bodgix: Quit: Leaving.

2015-08-12

[08:07:24] bodgix: has joined #ruby
[08:48:35] bodgix: Does anyone know of something like http://search.cpan.org/~mschilli/YAML-Logic-0.03/Logic.pm for ruby? I'm looking for a library / DSL to express logical conditions in config files
[08:52:45] bodgix: hanmac: that's exactly my concern. I wouldn't want to eval a user-supplied config
[09:05:11] bodgix: TTilus: I haven't tried it but it looks like what I'm looking for
[09:05:51] bodgix: TTilus: many thanks. I'll see if I can use it in my problem but looks promising
[09:10:35] bodgix: TTilus: cucumber/bool seems more difficult to install. I think it a C library with ruby bindings
[16:13:13] bodgix: Quit: Leaving.
[16:14:07] bodgix: has joined #ruby
[17:40:55] bodgix: Quit: Leaving.
[18:13:53] bodgix: has joined #ruby
[18:33:33] bodgix: has left #ruby: ()
[18:36:04] bodgix: Quit: ZNC - http://znc.in
[18:36:39] bodgix: has joined #ruby
[18:38:01] bodgix: Client Quit
[18:41:35] bodgix: has joined #ruby
[18:44:00] bodgix: Client Quit
[18:46:48] bodgix: has joined #ruby
[18:53:40] bodgix: Quit: ZNC - http://znc.in
[18:54:07] bodgix: has joined #ruby
[22:52:18] bodgix: Ping timeout: 252 seconds
[23:08:36] bodgix: has joined #ruby
[23:58:11] bodgix: Quit: Leaving.

2015-08-11

[09:03:40] bodgix: has joined #ruby
[17:33:55] bodgix: Quit: Leaving.

2015-08-10

[07:45:02] bodgix: has joined #ruby
[08:43:58] bodgix: Quit: Leaving.
[10:48:21] bodgix: has joined #ruby
[17:11:11] bodgix: Quit: Leaving.
[18:34:43] bodgix: has joined #ruby
[18:37:31] bodgix: Client Quit

2015-08-09

[19:57:05] bodgix: has joined #ruby
[23:33:38] bodgix: Ping timeout: 256 seconds

2015-08-07

[09:14:32] bodgix: has joined #ruby
[17:00:29] bodgix: has left #ruby: ()