mkroman

Activity Graph

Page 1 of 1

2019-08-30

[10:23:58] mkroman: *.net *.split
[10:29:29] mkroman: has joined #ruby

2019-08-22

[00:56:02] mkroman: *.net *.split
[01:13:40] mkroman: has joined #ruby

2019-07-08

[21:36:20] mkroman: has joined #ruby

2019-07-03

[01:32:17] mkroman: Remote host closed the connection

2019-05-17

[10:58:06] mkroman: Ping timeout: 246 seconds
[14:24:02] mkroman: has joined #ruby-offtopic
[14:24:02] mkroman: has joined #ruby

2019-05-03

[21:43:54] mkroman: *.net *.split
[22:07:55] mkroman: has joined #ruby-offtopic
[22:07:55] mkroman: has joined #ruby

2019-04-13

[16:49:46] mkroman: *.net *.split

2019-04-11

[18:31:22] mkroman: Quit: Reconnecting
[18:31:30] mkroman: has joined #ruby-offtopic
[18:31:30] mkroman: has joined #ruby

2019-04-05

[22:01:20] mkroman: Ping timeout: 246 seconds
[22:02:08] mkroman: has joined #ruby-offtopic
[22:02:08] mkroman: has joined #ruby

2019-03-12

[14:09:43] mkroman: *.net *.split

2019-03-08

[22:00:40] mkroman: what's an efficient way to generate a sha256 digest for a file in Ruby?
[22:01:03] mkroman: for files?
[22:01:53] mkroman: unless the API lets me do it directly from IO it's gonna be slow as balls in Ruby
[22:07:06] mkroman: damnit, so I can…
[22:07:20] mkroman: thanks! and sorry for bothering you, kinda should've looked it up myself :p
[22:10:03] mkroman: memoserv should just be a reserved user on the network that you talk to, any commands you want to send to it you can do through privmsg's
[22:16:17] mkroman: havenwood: https://gist.github.com/mkroman/f9b1673721bcdeb8e6daf25129d87190 in case you were curious
[22:16:59] mkroman: (and yes, I know it depends heavily on the system cache and the fact that it's on a tmpfs, but there's still a significant difference)
[22:17:41] mkroman: and the overhead might be entirely in the process spawning
[22:19:27] mkroman: sagax: are you asking as a beginner or are you looking to optimize code?
[22:21:57] mkroman: honestly, I've never seen catch/throw used in real life
[22:24:21] mkroman: sagax: from what I gather the difference is that catch/throw won't have *any* stack information, backtrace log, error type or message
[22:25:50] mkroman: whereas rescue/raise will create a whole object, reverse the stack and store the backtrace in it just to give you more information
[22:27:04] mkroman: if you need exceptions to be performant, you're doing something wrong.
[22:54:19] mkroman: sagax: if your code is proliferated with if else if else, you might want to use if guards
[22:59:47] mkroman: has joined #ruby-offtopic

2019-03-02

[00:25:55] mkroman: Remote host closed the connection
[00:28:48] mkroman: has joined #ruby

2019-02-22

[04:02:12] mkroman: Quit: Reconnecting
[04:05:08] mkroman: has joined #ruby

2019-02-13

[14:37:39] mkroman: Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
[14:38:49] mkroman: has joined #ruby

2019-02-07

[06:15:28] mkroman: jeez, applying a consistent style in Ruby is actually quite difficult
[06:17:04] mkroman: I mean because different parts have different syles
[06:17:55] mkroman: like, `puts` I wouldn't use parentheses with, because it's in Kernel, so it's almost like a keyword
[06:18:22] mkroman: but what if it's an instance method? like Logger#puts?
[06:18:37] mkroman: I guess I'd use parantheses then
[06:19:49] mkroman: then there's gemspecs - in the official rubygems docs, in the Gem::Specification.new block, they don't use parentheses, does that only apply to the gemspec? or does that apply to anything that resembles a DSL?
[06:20:09] mkroman: havenwood: yeah, I avoided it as much as possible aswell
[06:20:30] mkroman: also, rubocop doesn't suggest a reasonable style
[06:20:44] mkroman: executables/blur:6:1: C: Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.
[06:20:47] mkroman: require 'optparse'
[06:20:49] mkroman: No. just No.
[06:21:21] mkroman: oh, wait a minute
[06:21:55] mkroman: yeah, you're right, I was using `rubocop --only Style/MethodCallWithArgsParentheses` intentionally, and apparently that doesn't derive from defaults
[06:22:09] mkroman: that's unexpected
[06:25:42] mkroman: sadly, as I have been growing older, I have come to the decision that the occasional ambiguity of my no-parentheses-style is not worth the awesomeness that is reading a line of code literally
[06:26:37] mkroman: havenwood: what about when you're passing blocks?
[06:26:47] mkroman: do you parentheses then?
[06:31:58] mkroman: havenwood: no, I mean passing a proc/lambda/w/e as an argument, like instance.method(&callback)
[06:32:29] mkroman: err, guess I should've said an instance of a block
[06:34:36] mkroman: I think I've been on the side of being my own little snowflake for too long and now I just want to be like everyone else heh
[06:35:27] mkroman: I don't want someone who's used to reading “standard” Ruby code to read my code and get even slightly confused by the lack of parentheses
[06:35:55] mkroman: but then there's developers like you, who might read it slower just because you're used to the “Seattle style”
[06:46:19] mkroman: are there any “success” stories with the 2.6 JIT-compiler?
[10:28:44] mkroman: kill -16 ruby
[10:38:28] mkroman: so… in my IRC bot library I abuse Module#class_exec to create an anonymous class (not instance) based on reloadable user code https://github.com/mkroman/blur/blob/master/library/blur.rb#L34-L43 that is essentially just loaded through Kernel#load(file, wrap=true) and is instantiated at https://github.com/mkroman/blur/blob/master/library/blur/client.rb#L143-L167
[10:40:11] mkroman: but since it's essentially a block that is evaluated, and the only code that happens to be before the Blur::Script(name, &block) is usually `require` - how much should I care about dataraces?
[10:41:13] mkroman: when a script does a require, the code loaded is not expected to be reloaded until the process is restarted
[10:41:52] mkroman: phaul: what's the alternative?
[10:42:29] mkroman: doesn't that just move the problem?
[10:43:20] mkroman: what about an instance variable declared in a class?
[10:44:06] mkroman: wouldn't that essentially be a class variable? is that also broken?
[10:45:28] mkroman: so module Blur; @scripts = {}; def self.script(…); … @scripts[name] = …; end end shouldn't necessarily pose a problem?
[10:46:37] mkroman: liya: is that related to my question or is it unrelated? :p
[10:48:53] mkroman: liya: Object > BasicObject
[10:49:19] mkroman: I don't think that's syntactically correct.
[11:39:46] mkroman: where can I ask my question about “relatively” reloadable user code other than here? or should I just ask at another time?
[11:45:53] mkroman: havenwood: I dunno how to explain it, but it feels like I'm trying to trap kiddies into my van when I write code that's like if respond_to? name; __send__ name, network, message; end vs. if respond_to?(name); __send__(name, network, message) end
[12:30:44] mkroman: RougeR: agreed
[12:31:23] mkroman: even for Python, the rbenv clone - pyenv - is so much better than virtualenv/whateverthefuck
[12:31:49] mkroman: hah, funny
[12:32:10] mkroman: I'm pretty confident rbenv is the predecessor of pyenv
[12:33:27] mkroman: that said, scheduling jobs via cronjob or w/e for a specific version can be quite painful
[12:35:50] mkroman: I use zsh as my shell and making any cronjob script that uses `ruby` is kind of out of the question - not sure how it works, but I think it defaults to bash and .bash_profile
[12:37:23] mkroman: I'd eval "$(rbenv init -)" but rbenv might not be in the PATH at that point, and it'd add to the cronjob line, which is precious.
[12:39:28] mkroman: you can theoretically do the “export PATH=\"${HOME}/.rbenv/bin:${PATH}\"; eval \"$(rbenv init -)\"" in a cronjob
[12:40:18] mkroman: provided it's a bash shell or whatever rbenv requires
[12:41:51] mkroman: I *have* run several scripts using a cronjob script path a la ~/.rbenv/versions/2.4.1/bin/ruby script.rb
[12:42:26] mkroman: and it does work as long as that version is installed for the cronjob user
[13:03:39] mkroman: don't be overzealous
[14:31:10] mkroman: RougeR: sure, but if you have to rely on rbenv, it's kind of a half-assed assertion of the ruby standards (imo - i.e. executables in your PATH aren't guaranteed) and you might be better off testing against a docker image than rbenv scripts
[14:33:00] mkroman: did you have a testing environment prior to you joining?

2019-02-04

[17:19:58] mkroman: am I correct in understanding that both String.new and Hash.new are ~twice as slow as the literal versions - '' and {}?
[17:32:32] mkroman: havenwood: just curious, since rubocop told me to use it
[17:34:04] mkroman: works for me.

2019-01-31

[00:48:28] mkroman: is puma still the ducks guts when it comes to web servers?
[00:52:34] mkroman: I see… thanks.

2019-01-09

[17:09:05] mkroman: Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
[17:09:37] mkroman: has joined #ruby

2018-10-23

[15:20:57] mkroman: Ping timeout: 252 seconds
[15:21:38] mkroman: has joined #ruby

2018-09-09

[09:00:58] mkroman: has joined #ruby

2018-08-21

[18:42:14] mkroman: *.net *.split
[19:13:50] mkroman: has joined #ruby

2018-07-20

[00:07:13] mkroman: *.net *.split
[00:15:44] mkroman: has joined #ruby

2018-06-29

[14:31:30] mkroman: Ping timeout: 245 seconds
[17:15:24] mkroman: has joined #ruby

2018-06-22

[22:06:55] mkroman: is there a backend-agnostic http client library for ruby?
[22:07:07] mkroman: faradays API does not seem very good
[22:10:09] mkroman: I'd consider making one, but I don't like maintaining stuff I'm not at all interested in :p
[22:21:47] mkroman: >>Dir['/**']
[22:23:24] mkroman: >>`ls /proc`

2018-05-29

[02:46:54] mkroman: *.net *.split
[02:47:58] mkroman: has joined #ruby
[02:50:04] mkroman: *.net *.split
[02:50:32] mkroman: has joined #ruby

2018-05-25

[19:23:45] mkroman: Quit: Reconnecting
[19:23:56] mkroman: has joined #ruby

2018-04-25

[12:26:02] mkroman: *.net *.split
[12:27:28] mkroman: has joined #ruby
[15:01:33] mkroman: *.net *.split
[15:03:12] mkroman: has joined #ruby

2018-03-22

[01:43:38] mkroman: Quit: pa bangu noroi banzu
[01:44:08] mkroman: has joined #ruby
[07:26:21] mkroman: *.net *.split
[07:26:50] mkroman: has joined #ruby
[11:48:35] mkroman: Quit: Reconnecting
[11:48:45] mkroman: has joined #ruby
[14:22:32] mkroman: Quit: pa bangu noroi banzu
[14:22:44] mkroman: has joined #ruby

2018-03-20

[22:14:30] mkroman: cracked ur passwrod m8

2018-03-10

[04:18:29] mkroman: Ping timeout: 240 seconds
[08:54:18] mkroman: Quit: Reconnecting
[08:54:30] mkroman: has joined #ruby
[22:10:12] mkroman: Quit: Reconnecting
[22:10:22] mkroman: has joined #ruby

2018-02-26

[18:00:12] mkroman: Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
[18:02:58] mkroman: has joined #ruby

2018-02-19

[18:29:30] mkroman: Quit: Reconnecting
[18:29:41] mkroman: has joined #ruby

2018-01-17

[08:46:23] mkroman: Ping timeout: 276 seconds
[08:58:08] mkroman: has joined #ruby
[09:05:23] mkroman: Ping timeout: 255 seconds
[10:11:22] mkroman: has joined #ruby

2018-01-16

[13:28:00] mkroman: Ping timeout: 248 seconds
[14:10:09] mkroman: has joined #ruby

2018-01-11

[07:34:35] mkroman: Ping timeout: 240 seconds
[07:35:11] mkroman: has joined #ruby

2017-12-01

[02:28:42] mkroman: has joined #ruby

2017-11-28

[11:12:32] mkroman: Ping timeout: 248 seconds
[17:46:45] mkroman: has joined #ruby

2017-11-17

[05:30:26] mkroman: Ping timeout: 268 seconds
[05:32:32] mkroman: has joined #ruby

2017-11-15

[20:27:27] mkroman: Quit: Reconnecting
[20:27:44] mkroman: has joined #ruby

2017-11-09

[22:48:28] mkroman: Ping timeout: 240 seconds
[22:49:33] mkroman: has joined #ruby
[22:49:44] mkroman: has joined #ruby
[22:49:44] mkroman: Changing host

2017-11-07

[00:05:55] mkroman: has joined #ruby

2017-11-06

[20:07:42] mkroman: has joined #ruby
[23:12:41] mkroman: Ping timeout: 240 seconds

2017-11-04

[05:38:57] mkroman: Ping timeout: 240 seconds

2017-10-31

[01:22:32] mkroman: Ping timeout: 260 seconds
[01:22:52] mkroman: has joined #ruby
[01:48:15] mkroman: Ping timeout: 248 seconds
[02:01:40] mkroman: has joined #ruby
[19:30:43] mkroman: Quit: Reconnecting
[19:31:00] mkroman: has joined #ruby

2017-10-30

[05:43:57] mkroman: Ping timeout: 240 seconds
[05:58:05] mkroman: has joined #ruby
[23:26:57] mkroman: Ping timeout: 248 seconds
[23:34:31] mkroman: has joined #ruby
[23:34:42] mkroman: has joined #ruby
[23:34:42] mkroman: Changing host
[23:46:09] mkroman: Ping timeout: 248 seconds
[23:46:35] mkroman: has joined #ruby

2017-10-27

[22:15:01] mkroman: Quit: pa bangu noroi banzu
[22:15:20] mkroman: has joined #ruby

2017-10-08

[00:16:33] mkroman: Ping timeout: 248 seconds
[00:28:27] mkroman: has joined #ruby

2017-10-07

[17:55:34] mkroman: Ping timeout: 264 seconds
[18:19:21] mkroman: has joined #ruby

2017-09-27

[04:29:49] mkroman: *.net *.split
[04:31:51] mkroman: has joined #ruby

2017-09-26

[14:42:07] mkroman: Read error: Connection reset by peer
[14:43:25] mkroman: has joined #ruby
[21:17:21] mkroman: Ping timeout: 248 seconds
[21:24:44] mkroman: has joined #ruby
[21:43:05] mkroman: Ping timeout: 240 seconds
[22:41:52] mkroman: has joined #ruby

2017-09-18

[11:07:41] mkroman: Ping timeout: 240 seconds
[11:21:11] mkroman: has joined #ruby

2017-09-15

[00:30:09] mkroman: has joined #ruby
[00:33:32] mkroman: can anyone recommend a still maintained RPC library for Ruby?
[00:45:31] mkroman: havenwood: that's the format google uses to describe its APIs, right?
[00:46:48] mkroman: it's not exactly lightweight, but I'll check it out. Thanks.
[00:50:50] mkroman: I'm running a server that manages data across JBODs from an application, right now I'm using redis to do most of the work, but it's not easy to verify that it's doing what it's supposed to
[00:51:29] mkroman: another solution would be a HTTP API, but I think I'll try with RPC instead
[00:55:17] mkroman: Roda looks easy, might try that for another project
[00:55:51] mkroman: on the HTTP2 note, does the Rack model work well for HTTP2?
[00:59:36] mkroman: yeah, that's what I figured
[00:59:55] mkroman: was wondering what Sinatra and Rails might do to fix that