« Back to channel list

#ruby - 02 May 2019

« Back 1 day Forward 1 day »
[00:06:40] kyrylo: has joined #ruby
[00:06:56] skryking__: has joined #ruby
[00:16:02] houhoulis: has joined #ruby
[00:34:36] ramfjord: has joined #ruby
[00:39:39] govg: has joined #ruby
[00:40:17] fphilipe: has joined #ruby
[00:45:32] laaron-: has joined #ruby
[00:46:41] spiette: has joined #ruby
[00:48:24] steffes: has joined #ruby
[00:50:32] cnsvc: has joined #ruby
[00:55:42] altigraph: has joined #ruby
[01:00:17] AJA4350: has joined #ruby
[01:01:43] jenrzzz: has joined #ruby
[01:02:13] OneNeptune: has joined #ruby
[01:17:53] zacts: has joined #ruby
[01:22:15] laaron: has joined #ruby
[01:22:39] fishcooker: has joined #ruby
[01:23:34] weteamsteve: has joined #ruby
[01:23:49] orbyt_: has joined #ruby
[01:26:09] speakingcode: has joined #ruby
[01:35:32] uranoss: has joined #ruby
[01:39:28] uranoss: has joined #ruby
[01:41:51] dsmythe: has joined #ruby
[01:42:23] fishcooker: it was working the rvm installation finished, thanks phaul + zenspider
[01:44:17] fphilipe: has joined #ruby
[01:47:35] Lewix: has joined #ruby
[01:48:00] KevinSjoberg: has joined #ruby
[01:48:08] ec: has joined #ruby
[01:49:20] manveru: has joined #ruby
[01:50:34] gajus: has joined #ruby
[01:50:48] JJonah: has joined #ruby
[01:51:37] englishm: has joined #ruby
[01:52:08] jhill: has joined #ruby
[01:52:27] raggi: has joined #ruby
[01:52:38] wallace_mu: has joined #ruby
[02:07:41] AJA4351: has joined #ruby
[02:14:21] laaron: has joined #ruby
[02:20:51] tdy: has joined #ruby
[02:27:52] duderonomy: has joined #ruby
[02:28:53] jenrzzz_: has joined #ruby
[02:40:33] jenrzzz: has joined #ruby
[03:09:21] hightower2: has joined #ruby
[03:12:11] braincrash: has joined #ruby
[03:14:22] Jello_Raptor: has joined #ruby
[03:15:37] al-damiri: has joined #ruby
[03:16:07] gix: has joined #ruby
[03:16:11] AJA4351: has joined #ruby
[03:16:42] eduardo: has joined #ruby
[03:24:10] orbyt_: has joined #ruby
[03:24:49] JJonah_: has joined #ruby
[03:25:10] gajus: has joined #ruby
[03:25:22] jhill: has joined #ruby
[03:27:42] wallace_mu: has joined #ruby
[03:34:56] altigraph: has joined #ruby
[03:39:41] bambanx: has joined #ruby
[04:15:16] fphilipe: has joined #ruby
[04:21:12] APK: has joined #ruby
[04:25:42] rhuang: has joined #ruby
[04:41:20] rhuang: has joined #ruby
[04:45:41] marmotini_: has joined #ruby
[04:52:21] spiette: has joined #ruby
[04:57:53] reber: has joined #ruby
[05:02:00] xco: has joined #ruby
[05:15:00] dsmythe: has joined #ruby
[05:16:51] bambanxx: has joined #ruby
[05:17:14] reber: has joined #ruby
[05:17:51] sauvin: has joined #ruby
[05:19:14] jenrzzz: has joined #ruby
[05:19:15] dsmythe: has joined #ruby
[05:21:02] kapil____: has joined #ruby
[05:22:46] fphilipe: has joined #ruby
[05:23:30] conta: has joined #ruby
[05:28:09] cthulchu: has joined #ruby
[05:59:16] jenrzzz: has joined #ruby
[06:06:13] crankharder: has joined #ruby
[06:08:56] RyanMcCoskrie: has joined #ruby
[06:10:53] laaron: has joined #ruby
[06:25:09] ramfjord: has joined #ruby
[06:30:10] laaron: has joined #ruby
[06:40:22] crankharder: has joined #ruby
[06:41:32] andikr: has joined #ruby
[06:42:29] clemens3: has joined #ruby
[06:45:31] tdy: has joined #ruby
[07:00:00] jhill: has joined #ruby
[07:01:12] ec: has joined #ruby
[07:02:46] englishm: has joined #ruby
[07:03:48] Dbugger: has joined #ruby
[07:06:36] dsmythe: has joined #ruby
[07:08:06] spacesuitdiver: has joined #ruby
[07:08:11] roadt: has joined #ruby
[07:10:33] Emmanuel_Chanel: has joined #ruby
[07:15:03] aupadhye: has joined #ruby
[07:16:52] clemens3: has joined #ruby
[07:17:33] dsmythe: has joined #ruby
[07:18:13] lxsameer: has joined #ruby
[07:21:46] claudiuinberlin: has joined #ruby
[07:22:20] jenrzzz: has joined #ruby
[07:29:12] dionysus69: is anyone interested in a hobby project to create blockchain from scratch? including its decentralized nature of course
[07:29:29] ricekrispie: has joined #ruby
[07:32:43] ozzloy: i'm going to guess the answer is yes
[07:34:38] dionysus69: one more question, since binance has the payment_id thing I have to also implement it... boss's orders I guess, so when I read the payment id can be a 32 or 64 bit string, what does it mean?
[07:35:14] dionysus69: lol wrong channel, ozzloy pm I guess :P
[07:37:40] fishcooker: has joined #ruby
[07:38:08] hightower2: has joined #ruby
[07:46:24] tuor: has joined #ruby
[07:53:43] jefffrails35: has joined #ruby
[07:55:10] sphenxes: has joined #ruby
[07:59:13] _joes_: has joined #ruby
[08:03:40] tdy: has joined #ruby
[08:10:13] tuor: has joined #ruby
[08:10:13] tuor: has joined #ruby
[08:14:20] claudiuinberlin: has joined #ruby
[08:15:47] mikecmpbll: has joined #ruby
[08:21:49] spacesuitdiver: has joined #ruby
[08:25:21] ramfjord: has joined #ruby
[08:35:25] fphilipe: has joined #ruby
[08:36:40] claudiuinberlin: has joined #ruby
[08:37:29] jenrzzz: has joined #ruby
[08:43:12] dsmythe: has joined #ruby
[08:45:47] stooj: has joined #ruby
[08:51:14] fphilipe: has joined #ruby
[09:06:31] laaron: has joined #ruby
[09:15:09] jenrzzz: has joined #ruby
[09:16:46] pwnd_nsfw`: has joined #ruby
[09:21:13] Kestrel-029: has joined #ruby
[09:22:48] kyrylo: has joined #ruby
[09:29:21] Jonopoly: has joined #ruby
[09:30:37] m_antis: has joined #ruby
[09:40:09] conta: has joined #ruby
[09:50:01] Raven737: has joined #ruby
[09:57:02] dsmythe: has joined #ruby
[09:57:58] dar123: has joined #ruby
[10:01:21] dsmythe: has joined #ruby
[10:01:49] sphenxes: has joined #ruby
[10:05:15] marmotini_: has joined #ruby
[10:05:31] tjj: has joined #ruby
[10:06:51] AJA4350: has joined #ruby
[10:09:48] conta: has joined #ruby
[10:13:36] lunarkitty7: has joined #ruby
[10:15:41] tjj: hi folks.. I have been using Ruby plugin within Apache Netbeans 10. I had my Ruby env configured to use FastDebugger. Suddenly out of nowhere I am getting this error msg
[10:15:44] tjj: https://pastebin.com/j5tgk23E
[10:15:44] ruby[bot]: tj_: as I told you already, please use https://gist.github.com
[10:17:21] Junaos_: has joined #ruby
[10:18:05] tjj: any help would be appreciated
[10:19:10] fowlduck_: has joined #ruby
[10:19:19] lele`: has joined #ruby
[10:19:31] tjj: and most important - it says Could not find 'nokogiri' (~> 1.10) - did find: [nokogiri-1.8.0-x64-mingw32]
[10:19:56] tjj: kind of joking I guess.. 1.8 is > 1.10
[10:20:59] nemesit|znc: has joined #ruby
[10:21:00] gremax: has joined #ruby
[10:24:00] nowhere_man: has joined #ruby
[10:25:38] ramfjord: has joined #ruby
[10:27:30] alem0lars: has joined #ruby
[10:40:21] madhatter: has joined #ruby
[10:43:11] FastJack_: has joined #ruby
[10:44:30] tuor: has joined #ruby
[10:44:30] tuor: has joined #ruby
[10:46:48] crankharder: has joined #ruby
[10:51:36] alem0lars: has joined #ruby
[11:10:30] tuor: has joined #ruby
[11:10:30] tuor: has joined #ruby
[11:13:44] BH23: has joined #ruby
[11:17:27] phaul: has joined #ruby
[11:19:41] jefffrails35: has joined #ruby
[11:21:38] GodFather: has joined #ruby
[11:22:45] Cthulu201: has joined #ruby
[11:26:09] jud: has joined #ruby
[11:31:13] AJA4350: has joined #ruby
[11:42:13] E3lit3h4XX0r666: has joined #ruby
[11:44:39] tdy: has joined #ruby
[11:48:34] crankharder: has joined #ruby
[11:49:38] speakingcode: has joined #ruby
[11:49:44] reber: has joined #ruby
[11:55:42] nowhere_man: has joined #ruby
[12:03:39] jenrzzz: has joined #ruby
[12:06:10] Nicmavr: has joined #ruby
[12:11:22] jacksoow: has joined #ruby
[12:16:31] sphenxes: has joined #ruby
[12:23:47] fishcooker: has left #ruby: ()
[12:25:46] ramfjord: has joined #ruby
[12:32:08] DTZUZO: has joined #ruby
[12:32:25] Nicmavr: has joined #ruby
[12:36:11] Kestrel-029: has joined #ruby
[12:37:14] FastJack: has joined #ruby
[12:39:30] Jonopoly: Hello i want to stress-test my api
[12:39:46] Jonopoly: so i was wondering would it just be a case of running multiple-api calls
[12:42:18] alem0lars: has joined #ruby
[12:43:57] kyrylo: has joined #ruby
[12:44:42] Zarthus: Jonopoly: if you don't know what you're doing, use tools that already do it for you, or your test won't be sufficient
[12:44:52] Zarthus: a single distrubtion stress test is weak anyway
[12:45:56] tdy1: has joined #ruby
[12:47:49] marmotini: has joined #ruby
[12:48:08] Jonopoly: Well i wanted to start small, run an api call 50+ times
[12:48:13] Jonopoly: for 50+ different users
[12:48:41] Jonopoly: then just create an algorithm 1..50 users login, do x then y then logout
[12:51:11] Nicmavr: has joined #ruby
[13:02:24] wallace_mu: has joined #ruby
[13:03:14] vondruch_: has joined #ruby
[13:04:48] CBebop: has joined #ruby
[13:19:33] chrisco: has joined #ruby
[13:21:00] chrisco: has left #ruby: ()
[13:22:45] zacts: has joined #ruby
[13:23:04] lucasb: has joined #ruby
[13:34:32] pupsikov: has joined #ruby
[13:36:38] rafadc: has joined #ruby
[13:36:55] xfbs: has joined #ruby
[13:41:55] AJA4350: has joined #ruby
[13:47:06] rafadc: has joined #ruby
[13:56:53] dante: has joined #ruby
[13:56:54] rafadc: has joined #ruby
[14:00:23] wallace_mu: has joined #ruby
[14:00:44] vondruch: has joined #ruby
[14:03:14] Swyper: has joined #ruby
[14:04:35] nowhere_man: has joined #ruby
[14:08:44] Rapture: has joined #ruby
[14:14:06] crankharder: has joined #ruby
[14:14:35] Jonopoly: is it possible to say
[14:14:48] Jonopoly: Run this function n times at same time
[14:14:57] Jonopoly: or do you need to set a thread foreach function
[14:15:44] zacts: has joined #ruby
[14:21:13] Kestrel-029: has joined #ruby
[14:21:53] speakingcode: has joined #ruby
[14:25:29] gnufied: has joined #ruby
[14:26:28] spacesuitdiver: has joined #ruby
[14:26:33] Inline: has joined #ruby
[14:28:13] UncleCid__: has joined #ruby
[14:33:14] crankharder: has joined #ruby
[14:36:15] laaron: has joined #ruby
[14:37:54] Ai9zO5AP: has joined #ruby
[14:51:35] AJA4351: has joined #ruby
[14:58:39] moei: has joined #ruby
[15:04:17] danguita: has joined #ruby
[15:05:45] jenrzzz: has joined #ruby
[15:09:20] spacesuitdiver: has joined #ruby
[15:13:11] Jonopoly: hmm so im creating a..d (4) threads and running them
[15:13:14] Jonopoly: joining at the end
[15:13:38] Jonopoly: is there not a flexible way to run n threads and join n
[15:16:12] fphilipe: has joined #ruby
[15:16:49] kapil____: has joined #ruby
[15:16:59] Rakete1121: has joined #ruby
[15:21:49] dsmythe: has joined #ruby
[15:28:39] sgen: has joined #ruby
[15:35:07] Swyper: has joined #ruby
[15:36:34] jcarl43: has joined #ruby
[15:37:03] al-damiri: has joined #ruby
[15:44:00] ricekrispie2: has joined #ruby
[15:44:10] claudiuinberlin: has joined #ruby
[15:49:33] ua_: has joined #ruby
[16:01:15] mozzarella: has joined #ruby
[16:05:28] AJA4350: has joined #ruby
[16:05:32] Dbugger: has joined #ruby
[16:05:45] Dbugger: has joined #ruby
[16:09:24] shansen: has joined #ruby
[16:11:43] Swyper: has joined #ruby
[16:16:16] conta: has joined #ruby
[16:27:45] OneNeptune: has joined #ruby
[16:29:56] dsmythe_: has joined #ruby
[16:34:11] agent_white: has joined #ruby
[16:37:32] zacts: has joined #ruby
[16:37:50] reber: has joined #ruby
[16:37:56] duderonomy: has joined #ruby
[16:49:13] Swyper: has joined #ruby
[16:54:39] laaron: has joined #ruby
[17:02:44] jcarl43: has joined #ruby
[17:07:28] gix: has joined #ruby
[17:12:43] AJA4351: has joined #ruby
[17:18:12] zacts: has joined #ruby
[17:21:17] Nicmavr: has joined #ruby
[17:22:32] Swyper: has joined #ruby
[17:25:44] ramfjord: has joined #ruby
[17:30:19] jenrzzz: has joined #ruby
[17:32:22] Ai9zO5AP: has joined #ruby
[17:34:29] Swyper: has joined #ruby
[17:35:45] rhuang: has joined #ruby
[17:36:18] Kestrel-029: has joined #ruby
[17:39:37] Swyper: has joined #ruby
[17:45:44] Swyper: has joined #ruby
[17:48:07] Swyper: has joined #ruby
[17:50:52] sameerynho: has joined #ruby
[17:54:26] LtHummus: has joined #ruby
[18:01:26] Swyper: has joined #ruby
[18:04:39] tdy1: has joined #ruby
[18:06:49] fdimitri: has joined #ruby
[18:07:44] fdimitri_: has joined #ruby
[18:11:13] clemens3: has joined #ruby
[18:15:32] jelera: has joined #ruby
[18:19:49] ramfjord_: has joined #ruby
[18:19:57] AJA4351: has joined #ruby
[18:26:38] Swyper: has joined #ruby
[18:31:13] jelera: has joined #ruby
[18:31:57] jelera: has joined #ruby
[18:32:45] jelera: has joined #ruby
[18:32:59] mikecmpbll: has joined #ruby
[18:33:35] jelera: has joined #ruby
[18:34:20] jelera: has joined #ruby
[18:36:15] jottr: has joined #ruby
[18:36:17] Nicmavr: has joined #ruby
[18:37:10] pupsikov: has joined #ruby
[18:38:45] jenrzzz: has joined #ruby
[18:44:21] laaron: has joined #ruby
[18:49:36] AKPWD: has joined #ruby
[19:07:03] fphilipe: has joined #ruby
[19:08:57] i9zO5AP: has joined #ruby
[19:11:01] Swyper: has joined #ruby
[19:14:14] eckhardt: has joined #ruby
[19:14:59] nwradio878887987: has joined #ruby
[19:15:47] jenrzzz: has joined #ruby
[19:17:05] postmodern: has joined #ruby
[19:21:17] Nicmavr: has joined #ruby
[19:25:44] AJA4351: has joined #ruby
[19:29:09] claudiuinberlin: has joined #ruby
[19:32:27] orbyt_: has joined #ruby
[19:44:08] claudiuinberlin: has joined #ruby
[19:46:09] tdy1: has joined #ruby
[19:50:19] cd: has joined #ruby
[19:51:13] Kestrel-029: has joined #ruby
[19:53:21] hightower2: has joined #ruby
[19:57:32] AlHafoudh: has joined #ruby
[20:06:12] Nicmavr: has joined #ruby
[20:14:52] dinfuehr: has joined #ruby
[20:15:45] fphilipe: has joined #ruby
[20:21:18] Kestrel-029: has joined #ruby
[20:28:09] zacts: has joined #ruby
[20:29:58] GodFather: has joined #ruby
[20:32:33] dsmythe: has joined #ruby
[20:36:17] Nicmavr: has joined #ruby
[20:39:13] tdy1: has joined #ruby
[20:44:04] Swyper: has joined #ruby
[20:46:39] weteamsteve: has joined #ruby
[20:48:44] NightMonkey: has joined #ruby
[20:51:18] Kestrel-029: has joined #ruby
[20:53:36] al2o3-cr: i'll see you around like a walnut.
[21:00:59] jottr: has joined #ruby
[21:01:08] speakingcode: has joined #ruby
[21:01:59] nowhere_man: has joined #ruby
[21:05:14] fphilipe: has joined #ruby
[21:05:36] laaron-: has joined #ruby
[21:05:58] Swyper: has joined #ruby
[21:06:12] Nicmavr: has joined #ruby
[21:08:34] zacts: just getting started with Ruby. How is the Programming Ruby book by Dave Thomas?
[21:09:27] phaul: oldie but goddie I guess
[21:10:13] zacts: phaul: what might you recommend for learning?
[21:11:51] phaul: are you a programmer, who tries to lear ruby or are you someone who wants to learn programming using ruby?
[21:12:12] zacts: learn programming using ruby
[21:12:55] bougyman: zacts: https://pine.fm/LearnToProgram/chap_00.html
[21:14:29] bougyman: zacts: The Pickaxe (the ony by Dave Thomas) is an excellent tome.
[21:14:43] bougyman: I just think it's easy and cheap (time-wise) to get through LearnToProgram first.
[21:14:45] zacts: I'll check this out
[21:14:56] zacts: I'll start with LearnToProgram
[21:16:31] bougyman: One caveat, for all the code in the white text boxes, type each line in pry (or irb (no, really use pry)).
[21:16:37] bougyman: Not copy/paste. Type.
[21:17:05] zacts: what is pry. I know of irb?
[21:17:16] bougyman: pry is a better repl.
[21:17:23] zacts: I know irb, but haven't heard of pry. Must it be installed as a gem?
[21:17:24] bougyman: Similar in function to irb, but a lot more function.
[21:17:27] bougyman: gem i pry, yes.
[21:17:38] bougyman: then you have a binary called `pry`
[21:19:54] bougyman: Google is failing me. Once upon a time, someone did an s-exp variation of Ruby. Anyone remember that?
[21:20:24] bougyman: They lit up the ml with (((()))))
[21:25:17] GodFather: has joined #ruby
[21:27:56] AJA4350: has joined #ruby
[21:29:07] sgen: has joined #ruby
[21:30:13] ur5us: has joined #ruby
[21:32:08] pupsikov: has joined #ruby
[21:32:27] Nicmavr: has joined #ruby
[21:34:40] laaron: has joined #ruby
[21:36:48] thunderbirdtr: has joined #ruby
[21:43:04] renlolo: has joined #ruby
[21:43:58] renlolo: I have this string, literally, `\"` ... how do I convert this to the literal string `\\"` , this is very frustrating as I keep getting `\\\"` instead, which is not what I want (I do not want " to be escaped)
[21:45:01] Swyper: has joined #ruby
[21:45:09] OneNeptune: has joined #ruby
[21:47:17] phaul: remember that what's printed is a representation of "the same thing" via to_s, or inspect. not the string that you have in memory
[21:48:07] phaul: msg rubydoc &>> '\"'
[21:48:26] renlolo: in memory I should have `\"`, what's getting printed is `\\\"` ... is there any way to convert this to `\\"` in the memory representation (or `\\\\"`)
[21:51:02] rubydoc: # => "\\\"" (https://carc.in/#/r/6tv4)
[21:51:51] phaul: but that's because in " which it prints \\ is \ and \" is just ". if it was printing ' it would be '\\"' but it choses to print "
[21:53:31] phaul: but it's the same string, different way of printing the same value
[21:53:41] zacts: bougyman: I think I'm going to just go ahead and dive into Programming Ruby
[21:53:55] zacts: I'm skimming both books, and it looks like I can handle it
[21:54:11] renlolo: let me put it this way, I have two bytes `\"` (forget ruby for a moment). i want three bytes, `\\"`. How do I do this in ruby, regardless of how it's printed
[21:55:52] al2o3-cr: renlolo: '\\\"' is 3 bytes.
[21:56:14] renlolo: &> '\"'.bytesize
[21:56:15] rubydoc: parser error at position 0 around `>'
[21:56:26] renlolo: &>> '\"'.bytesize
[21:56:27] rubydoc: # => 2 (https://carc.in/#/r/6tv5)
[21:56:43] renlolo: &>> '\"'.sub('\"', '\\\\"').bytesize
[21:56:43] rubydoc: # => 2 (https://carc.in/#/r/6tv6)
[21:56:50] al2o3-cr: &> '\\\"'.bytesize
[21:56:51] rubydoc: parser error at position 0 around `>'
[21:57:01] al2o3-cr: &>> '\\\"'.bytesize
[21:57:02] rubydoc: # => 3 (https://carc.in/#/r/6tv7)
[21:57:21] al2o3-cr: &>> '\\\"'.bytes
[21:57:21] rubydoc: # => [92, 92, 34] (https://carc.in/#/r/6tv8)
[21:57:29] renlolo: cool, but sub isnt working for some reason with that
[21:57:59] renlolo: &>> '\"'.sub('\"', '\\\"').bytesize
[21:57:59] rubydoc: # => 2 (https://carc.in/#/r/6tv9)
[21:59:21] al2o3-cr: renlolo: why?
[21:59:44] renlolo: sorry, why what?
[22:00:11] al2o3-cr: why do you want to do this?
[22:01:16] renlolo: I'm not a ruby expert (used to python, heh), but we're using fluentd for log aggregation. My fluentd plugin is receiving strings which are exactly `\"`, but when I try to encode them I get some error saying that it's an invalid escape, which is a valid error, because `\"` is an invalid escape. I'd therefore want to forward `\\"` instead ... which is where I am
[22:02:32] u0_a238: has joined #ruby
[22:03:27] phaul: renlolo: in '' world \\ is just a \. \" is \" . Meaning of \ depends on what follows. It's either 2 or 1 byte
[22:04:06] phaul: same in " world but different rules
[22:04:31] ramfjord: has joined #ruby
[22:05:18] phaul: &>> '\\'.bytesize
[22:05:19] rubydoc: # => 1 (https://carc.in/#/r/6tvd)
[22:05:52] renlolo: hmm, thanks for pointing that out
[22:06:04] al2o3-cr: renlolo: your getting representations wrong.
[22:07:08] al2o3-cr: ^ as phaul pointed out
[22:08:07] renlolo: so I probably want to replace '\\"' with '\\\\"'
[22:09:39] al2o3-cr: renlolo: that will give you \\"
[22:10:12] al2o3-cr: &>> puts '\\"'
[22:10:13] rubydoc: # => \" (https://carc.in/#/r/6tve)
[22:10:18] al2o3-cr: &>> puts '\\\\"'
[22:10:18] rubydoc: # => \\" (https://carc.in/#/r/6tvf)
[22:10:34] renlolo: so '\"', is [\, "] in memory, and '\\"' is also [\, "] in memory?
[22:11:10] phaul: as inside the String
[22:11:51] al2o3-cr: renlolo: yes.
[22:12:33] al2o3-cr: renlolo: single quote are literal, double quotes escape backslash
[22:13:00] renlolo: I still cant get it to work for some reason ...
[22:13:21] renlolo: &>> '\"'.sub('\"', '\\\\"').bytesize
[22:13:22] rubydoc: # => 2 (https://carc.in/#/r/6tvg)
[22:13:26] al2o3-cr: honour escapes
[22:13:42] renlolo: '\\\\"' should be [\, \, "] right?
[22:14:12] renlolo: I've tried it with `"` as well, "\\\""
[22:14:36] al2o3-cr: renlolo: correct, yes.
[22:15:42] al2o3-cr: &>> '\\\\"'.bytes.map &:chr
[22:15:43] rubydoc: # => ["\\", "\\", "\""] (https://carc.in/#/r/6tvh)
[22:16:23] al2o3-cr: which is \, \, "
[22:17:27] al2o3-cr: renlolo: show us what your trying to do.
[22:18:43] renlolo: &>> a='\"'.gsub('\\', '\\\\\\').bytesize # looks like it works
[22:18:44] rubydoc: # => 3 (https://carc.in/#/r/6tvi)
[22:19:15] renlolo: why there are 6 backslashes in the substitution I dont know but yeah
[22:19:26] renlolo: #trialanderror
[22:20:22] phaul: most of use that thecnique for this. Keep sticking in \ until it works. It's correct but so confusing to undertsand...
[22:21:19] marmotini_: has joined #ruby
[22:21:20] phaul: I mean ruby is correct, but noone can work out how many \ they need :)
[22:22:30] al2o3-cr: they're subbing one of these \ with three of these \\\
[22:23:33] al2o3-cr: gsub is a little bit special though.
[22:25:32] hightower3: has joined #ruby
[22:26:02] al2o3-cr: &>> puts '\"'.sub '\\', '\\\\\\'
[22:26:03] rubydoc: # => \\" (https://carc.in/#/r/6tvn)
[22:26:48] al2o3-cr: &>> '\"'.sub '\\', '\\\\\\'
[22:26:49] rubydoc: # => "\\\\\"" (https://carc.in/#/r/6tvo)
[22:31:34] al2o3-cr: puts "\"".sub '\\', '\\\\\\'
[22:31:40] al2o3-cr: &>> puts "\"".sub '\\', '\\\\\\'
[22:31:41] rubydoc: # => " (https://carc.in/#/r/6tvp)
[22:32:14] al2o3-cr: "" not literal
[22:33:54] csr_: has joined #ruby
[22:34:42] al2o3-cr: and the reason for the 6 of \ two for one \ another two for the other \ and one for the "
[22:35:20] al2o3-cr: if that makes sense.
[22:36:17] Nicmavr: has joined #ruby
[22:37:37] jelera: has joined #ruby
[22:43:02] al2o3-cr: &>> puts "\\\\\\\\\\\\\\"".dump
[22:43:03] rubydoc: stderr: -e:4: unterminated string meets end of file (https://carc.in/#/r/6tvq)
[22:43:24] al2o3-cr: because i left out one \
[22:43:27] al2o3-cr: &>> puts "\\\\\\\\\\\\\\\"".dump
[22:43:28] rubydoc: # => "\\\\\\\\\\\\\\\"" (https://carc.in/#/r/6tvr)
[22:45:14] al2o3-cr: &>> "\\\\\\\\\\\\\\\"".dump
[22:45:15] rubydoc: # => "\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\"" (https://carc.in/#/r/6tvs)
[22:57:54] jelera: has joined #ruby
[22:59:31] al2o3-cr: &>> SystemCallError.new 0
[22:59:32] rubydoc: # => #<Errno::NOERROR: Success> (https://carc.in/#/r/6tvu)
[22:59:48] al2o3-cr: &>> SystemCallError.new -1
[22:59:49] rubydoc: # => #<SystemCallError: Unknown error -1> (https://carc.in/#/r/6tvv)
[23:01:46] spacesuitdiver: has joined #ruby
[23:03:20] crankharder: has joined #ruby
[23:04:15] dar123: has joined #ruby
[23:05:51] csr_: has left #ruby: ("Leaving")
[23:15:45] renlolo: so gsub('\\', '\\\\\\') doesnt work ...
[23:16:17] renlolo: this is honestly pretty frustrating, I think I'll actively push towards us moving away from ruby. Thanks for your help all, have a good one
[23:16:25] renlolo: has left #ruby: ("WeeChat 2.0.1")
[23:16:26] havenwood: renlolo: just use a block
[23:16:47] havenwood: oops, too late - they quit Ruby
[23:22:57] phaul: not that it's different anywhere else that has similar semantics for ' and "...
[23:35:59] fphilipe: has joined #ruby
[23:44:00] dar123: has joined #ruby
[23:44:23] kyrylo: has joined #ruby
[23:44:54] leftylink: ah. I wanted to see if there was a way to have a clearer correspondence between the number of backslashes in the literal vs in the value. but I see a bit of an unfortunate circumstance
[23:45:03] leftylink: &>> %q(\) # that is a syntax error
[23:45:04] rubydoc: stderr: -e:4: unterminated string meets end of file (https://carc.in/#/r/6tvw)
[23:45:20] leftylink: &>> %q(\ ).strip # but this is fine
[23:45:20] rubydoc: # => "\\" (https://carc.in/#/r/6tvx)
[23:45:44] leftylink: &>> %q(\\) == %q(\ ).strip
[23:45:45] rubydoc: # => true (https://carc.in/#/r/6tvy)
[23:46:07] leftylink: so that is a bit unfortunate if you want the correspondence
[23:47:36] leftylink: maybe if you wanted two, you could do something silly like
[23:47:53] leftylink: &>> %q(\ \ ).delete(' ').bytes
[23:47:54] rubydoc: # => [92, 92] (https://carc.in/#/r/6tvz)
[23:48:05] leftylink: two in the literal and two in the value, that'd be fine
[23:51:21] leftylink: or I guess if you didn't want to faff about with how to represent it in your literal maybe you want something like
[23:51:57] leftylink: &>> single_backslash = ?\\; raise "NOPE" if single_backslash.size != 1; puts single_backslash * 3
[23:51:58] rubydoc: # => \\\ (https://carc.in/#/r/6tw2)
[23:53:20] fdimitri: has joined #ruby
[23:54:34] clemens3_: has joined #ruby
[23:57:19] al2o3-cr: &>> "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".bytes.map &:chr
[23:57:23] rubydoc: # => ["f", "o", "o", "\\", "\\", "\\", "\\", "\\", "\b", "a", "r", "\n", "\t", "\r", "\t", "\\", "\\", "\\", "\\"] (https://carc.in/#/r/6tw4)
[23:58:00] al2o3-cr: &>> puts "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".bytes.map &:chr
[23:58:01] rubydoc: # => f (https://carc.in/#/r/6tw5)
[23:58:12] al2o3-cr: &>> p "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".bytes.map &:chr
[23:58:13] rubydoc: # => ["f", "o", "o", "\\", "\\", "\\", "\\", "\\", "\b", "a", "r", "\n", "\t", "\r", "\t", "\\", "\\", "\\", "\\"] (https://carc.in/#/r/6tw6)
[23:58:55] al2o3-cr: &>> p "foo\\\\\\\\\\\bar\n\t\r\t\\\\\\\\".bytes
[23:58:55] rubydoc: # => [102, 111, 111, 92, 92, 92, 92, 92, 8, 97, 114, 10, 9, 13, 9, 92, 92, 92, 92] (https://carc.in/#/r/6tw7)