Activity Graph

Page 1 of 1


[11:46:46] basic: has joined #ruby
[11:47:28] basic: how does one tell rubocop to parse like it's 2017 (ruby 2.5)
[11:57:04] basic: havenwood: does rubocop try to find this configuration file?
[11:57:15] basic: like inside the filetree strcutre
[11:57:31] basic: wow, compiling ruby is quick
[11:58:08] basic: which would be my next question, do i need ruby 2.5+ installed for rubocop to work? or does it use it's parsers?
[11:59:08] basic: hm, doesn't seem to work
[11:59:41] basic: i have the config file in the root directory of the project
[12:00:06] basic: and rescue blocks (implicit begin...end) that will be shown as errors on my linter
[12:00:10] basic: (i use ALE for vim)
[12:00:22] basic: does that maybe ignore the rubocop config?
[12:01:31] basic: undefined method `[]' for 2.5:Float
[12:01:47] basic: (if i call rubocop manually)
[12:02:02] basic: do i have to specify it as string?
[12:03:36] basic: Warning: unrecognized cop TargetRubyVersion found in .rubocop.yml
[12:04:06] basic: ah, i get it, one sec
[12:04:36] basic: holy shit rubocop hates my code
[12:05:40] basic: well it's still doing 2.3
[12:05:59] basic:
[12:06:39] basic: it's 2.4 right now
[12:06:51] basic: 2.4.6 to be exact
[12:07:01] basic: but my project runs in docker, which is 2.5.3
[12:07:06] basic: i only have that ruby version
[12:08:03] basic: havenwood: poor fools
[12:09:46] basic: yeah i installed 2.6 right now
[12:17:22] basic: hm, looks like ALE uses the installed ruby version not rubocop at all
[12:21:37] basic: ACTION wonders how it uses ruby as integrated linter
[15:48:22] basic: Ping timeout: 258 seconds


[09:17:35] basic: has joined #ruby
[09:18:08] basic: how would you guys generate rsa keys without delay? as in.. http request comes and asks for a rsa key?
[09:18:40] basic: would you have a thread that sleeps all the time and has keys in a queueh
[09:20:35] basic: but then i would have to generate a trillion rsa keys on startup
[09:23:09] basic: i feel like saving them in a database is overkill
[09:23:17] basic: but it would be the correct approach wouldnt it?
[09:25:24] basic: i remember doing this already, and it reduced startup time
[09:25:48] basic: increased*
[09:43:02] basic: Quit: Lost terminal


[20:50:33] basic: has joined #ruby
[20:50:58] basic: is there anything thread-safe in ruby by default (except accidently via GIL)?
[20:51:05] basic: like, sockets, for example?
[20:51:32] basic: xy: i am trying to use Net::SSH in multiple threads, and want to know to what extend i can do that
[20:52:05] basic: apeiros: i never seen that
[20:52:58] basic: Net::SSH doesn't seem to use mutexes and stuff at all, how would i use it, without locking a whole connection?
[20:54:03] basic: there should be :/
[20:54:47] basic: well locking a Net::SSH connection would be really weird, since it's very asynchronous
[20:54:55] basic: guess i won't get around having multiple of them
[21:01:40] basic: apeiros: how so? ssh supports channels, having multiple of them doesn't seem weird, does it?
[21:01:57] basic: using multiple channels without being able to use them with threads is wierd
[21:54:39] basic: apeiros: thanks!
[21:54:48] basic: Quit: weeeeeeeeeeeeeeeeeee


[09:17:11] basic: has joined #ruby
[09:17:26] basic: when i instance_eval, i can't seem to have the normal, method="something" behaviour
[09:17:39] basic: but when i do it in pry, it works, can somebody explain how that happens?
[09:18:14] basic: i have a method "variants(=)" on an object, when will variants= actually generate a local var
[09:18:45] basic: apeiros: but, when will it become a local var? that does not happen via method call, does it
[09:18:53] basic: unfortunately the code snipped alone would not work
[09:19:39] basic: hm.. but then why does sometimes work and sometimes not?
[09:20:04] basic: okay, trying to get a small snipped une second
[09:22:35] basic: well, the code does not do what i wont, so i supposed you're right..
[09:22:46] basic: in pry it works, i guess because pry does something differently
[09:23:29] basic: your utf8 symbols, i couldn't read them
[09:23:43] basic: i see, what font am i missing, h
[09:24:42] basic: i really don't understand how ruby distinguish
[09:25:03] basic: apeiros: apeiros yes
[09:26:07] basic: im creating a project that is very declarative
[09:26:26] basic: it has like.. rake files, which only contain like "config {...}"
[09:26:55] basic: and what i was trying to do is "variants=["a","b","c"];config {}"
[09:27:09] basic: and i figured it would call the self.variants= method
[09:27:20] basic: (the config file would look much more like a config file that way)
[09:29:16] basic: yeah i just came up with that, too :D, kinda
[09:29:20] basic: i just created add_variant
[09:29:38] basic: ACTION cries because he is a javaist
[09:30:01] basic: that is the ugliest thing ruby has bleh.
[09:30:23] basic: that would look pretty, having a hash
[09:30:30] basic: but for now im happy with add_variant
[09:30:36] basic: thanks apeiros
[09:31:57] basic: thats what i am doing now
[09:32:00] basic: and i decided it sucks
[09:32:11] basic: rule of thumb is now, everything is a method without having a =
[09:32:38] basic: well, everything is a method is always true i guess
[09:33:16] basic: Config.instance_eval "variants = []; config {...}"
[09:33:19] basic: that is kinda like it is
[09:33:36] basic: apeiros: well i mean, if you observe on object from the outside.. then everything it has is methods
[09:34:02] basic: i am not good in describing things
[09:34:24] basic: but what else would there b in ruby?
[09:34:59] basic: lvars, instance vars, procs doesnt it some up really nicely?
[09:35:38] basic: yeah i guess
[10:34:05] basic: Ping timeout: 256 seconds
[10:35:42] basic: has joined #ruby
[11:45:14] basic: Quit: Lost terminal


[07:21:21] basic: Ping timeout: 264 seconds


[14:01:39] basic: has joined #ruby
[14:02:03] basic: how can i do: x=3;eval "puts x"
[14:02:21] basic: OH THAT ALREADY WORKS
[14:08:45] basic: but what if i want to have that local inside a block, i give to a class method of a class
[14:09:09] basic: to avoid xy: i try to have something like rakefiles that only contain stuff like "config { |x| x.a = 3 }"
[14:09:28] basic: and my approach to use them is to class_eval the content of the file
[14:09:44] basic: which works fine, until i try to put data from outside into it
[14:10:41] basic: if i was about to: "Object.class_eval { y = 3; eval "config { |x| x.a = y}" }
[14:10:48] basic: it doesn't work anymore, can anyone help with that?
[14:11:56] basic: and is class_eval { eval "" } the same as class_eval("")
[15:17:45] basic: konsolebox_: well, try it exactly how i descirbed it, the class method does not see the local variables outside of it
[15:18:01] basic: guessing.. that's how it ise.. i ended up adding the data into the constructor
[15:18:21] basic: guess my design was just wrong
[15:18:45] basic: can i call a method with predefined locals? because thats kinda what i want(ed)
[18:01:28] basic: Ping timeout: 240 seconds
[18:06:27] basic: has joined #ruby
[18:13:16] basic: Ping timeout: 268 seconds
[20:05:22] basic: has joined #ruby


[18:29:37] basic: has joined #ruby
[18:51:27] basic: Quit: Textual IRC Client:


[17:53:56] basic: Quit: ZNC -


[09:48:27] basic: Ping timeout: 276 seconds
[10:59:26] basic: has joined #ruby


[05:17:04] basic: has joined #ruby


[22:28:12] basic: has joined #ruby
[23:25:08] basic: Read error: Connection reset by peer