« Back to channel list

#ruby - 23 June 2017

« Back 1 day Forward 1 day »
[00:00:16] roamingdog: has joined #ruby
[00:00:41] chouhoulis: has joined #ruby
[00:01:06] roamingdog: has joined #ruby
[00:01:42] mim1k: has joined #ruby
[00:01:56] roamingdog: has joined #ruby
[00:02:41] roamingdog: has joined #ruby
[00:03:26] gusrub: has joined #ruby
[00:03:31] roamingdog: has joined #ruby
[00:05:11] cschneid_: has joined #ruby
[00:06:40] charliesome: has joined #ruby
[00:07:34] nicesignal: has joined #ruby
[00:08:12] raspado: has joined #ruby
[00:09:59] w0b: has joined #ruby
[00:11:45] birdyondrugs: has joined #ruby
[00:14:42] johnny56: has joined #ruby
[00:16:07] jenrzzz: has joined #ruby
[00:16:07] jenrzzz: has joined #ruby
[00:16:09] gusrub: has joined #ruby
[00:16:54] jaequery: has joined #ruby
[00:20:58] haylon: has joined #ruby
[00:23:07] hahuang65: has joined #ruby
[00:25:43] N0ATN: has joined #ruby
[00:32:00] cam27: has joined #ruby
[00:32:31] blackwind_123: has joined #ruby
[00:33:12] fxa: has joined #ruby
[00:34:46] skweek: has joined #ruby
[00:37:51] mim1k: has joined #ruby
[00:38:59] blackwind_123: has joined #ruby
[00:39:34] GodFather: has joined #ruby
[00:42:23] charliesome: has joined #ruby
[00:44:55] TvL2386: has joined #ruby
[00:45:40] QpQ4: has joined #ruby
[00:49:50] haylon: has joined #ruby
[00:53:33] mim1k: has joined #ruby
[00:53:46] arescorpio: has joined #ruby
[00:56:53] friday: has joined #ruby
[01:05:38] apparition: has joined #ruby
[01:06:50] cschneid_: has joined #ruby
[01:11:01] jenrzzz: has joined #ruby
[01:11:01] jenrzzz: has joined #ruby
[01:11:38] hotpancakes: has joined #ruby
[01:12:07] hutch34: has joined #ruby
[01:27:15] brent__: has joined #ruby
[01:29:23] mim1k: has joined #ruby
[01:33:16] hahuang65: has joined #ruby
[01:38:44] uZiel: has joined #ruby
[01:45:33] brent__: has joined #ruby
[01:47:14] jaequery: has joined #ruby
[01:49:39] hfp_work: has joined #ruby
[01:50:14] herbmillerjr: has joined #ruby
[01:52:13] blackwind_123: has joined #ruby
[01:54:09] ketan: has joined #ruby
[01:54:25] hotpancakes: has joined #ruby
[01:54:29] d^sh: has joined #ruby
[01:59:19] gizmore|2: has joined #ruby
[02:01:12] Jameser: has joined #ruby
[02:01:56] hutch34: has joined #ruby
[02:05:38] mim1k: has joined #ruby
[02:10:06] apparition: has joined #ruby
[02:17:30] Jameser: has joined #ruby
[02:18:35] hoocares: has joined #ruby
[02:20:42] uZiel: has joined #ruby
[02:21:34] mim1k: has joined #ruby
[02:24:02] Dimik: has joined #ruby
[02:28:52] nacsurte: has joined #ruby
[02:33:57] hahuang65: has joined #ruby
[02:38:19] astrobunny: has joined #ruby
[02:43:44] ndrei: has joined #ruby
[02:46:18] roamingdog: has joined #ruby
[02:49:36] blackwind_123: has joined #ruby
[02:53:10] hotpancakes: has joined #ruby
[02:54:05] Pisuke: has joined #ruby
[02:55:33] patarr: has joined #ruby
[02:55:59] astrobunny: has joined #ruby
[02:56:41] mim1k: has joined #ruby
[03:03:42] blackwind_123: has joined #ruby
[03:06:15] dviola: has joined #ruby
[03:07:47] hahuang65: has joined #ruby
[03:19:41] dh64: has joined #ruby
[03:21:42] blackwind_123: has joined #ruby
[03:22:48] hahuang65: has joined #ruby
[03:30:03] nacsurte: has joined #ruby
[03:32:50] mim1k: has joined #ruby
[03:37:43] latemus: has joined #ruby
[03:37:58] Vingador: has joined #ruby
[03:38:34] gix: has joined #ruby
[03:40:22] hotpancakes: has joined #ruby
[03:44:35] blackwind_123: has joined #ruby
[03:46:41] nofxxxx: has joined #ruby
[03:48:35] mim1k: has joined #ruby
[03:55:01] ketan: has joined #ruby
[03:55:20] kies: has joined #ruby
[03:56:05] Silthias: has joined #ruby
[04:00:22] umaaji: has joined #ruby
[04:05:27] DonaldTrump007: has joined #ruby
[04:06:46] KeyJoo: has joined #ruby
[04:07:18] blackwind_123: has joined #ruby
[04:07:42] LightStalker: has joined #ruby
[04:08:19] hotpancakes: has joined #ruby
[04:19:09] jaequery: has joined #ruby
[04:23:40] ascarter: has joined #ruby
[04:24:25] mim1k: has joined #ruby
[04:26:06] uZiel: has joined #ruby
[04:28:55] vipaca: has joined #ruby
[04:29:48] imkatim: has joined #ruby
[04:30:52] nacsurte: has joined #ruby
[04:31:15] dasher00: has joined #ruby
[04:33:25] pwnd_nsfw`: has joined #ruby
[04:36:40] hotpancakes: has joined #ruby
[04:39:26] brent__: has joined #ruby
[04:40:06] hutch34: has joined #ruby
[04:41:40] nanoz: has joined #ruby
[04:43:16] agent_white: has joined #ruby
[04:47:54] eightlimbed: has joined #ruby
[04:48:10] mim1k: has joined #ruby
[04:48:37] cpruitt: has joined #ruby
[04:51:29] astrobunny: has joined #ruby
[04:52:43] nofxxx: has joined #ruby
[04:53:56] ornerymoose: has joined #ruby
[04:56:24] patarr: has joined #ruby
[04:57:34] nadir: has joined #ruby
[05:05:08] blackwind_123: has joined #ruby
[05:13:55] jackjackdripper: has joined #ruby
[05:14:50] hotpanca_: has joined #ruby
[05:17:25] hotpanca_: has joined #ruby
[05:18:23] roamingdog: has joined #ruby
[05:19:13] roamingdog: has joined #ruby
[05:19:58] roamingdog: has joined #ruby
[05:20:57] beilabs__: has joined #ruby
[05:23:37] hahuang65: has joined #ruby
[05:28:20] Cohedrin_: has joined #ruby
[05:29:01] moneylotion: has joined #ruby
[05:31:08] vipaca: has joined #ruby
[05:31:11] howdoi: has joined #ruby
[05:31:24] nacsurte: has joined #ruby
[05:34:05] Guest31714: has joined #ruby
[05:40:20] planigan: has joined #ruby
[05:41:42] anisha: has joined #ruby
[05:42:35] hotpancakes: has joined #ruby
[05:43:46] uZiel: has joined #ruby
[05:46:06] muelleme_: has joined #ruby
[05:46:20] jenrzzz: has joined #ruby
[05:48:37] andikr: has joined #ruby
[05:49:47] aupadhye: has joined #ruby
[05:52:14] charliesome: has joined #ruby
[05:55:53] ketan: has joined #ruby
[05:59:08] llua: has joined #ruby
[05:59:25] dionysus69: has joined #ruby
[05:59:39] enterprisey: has joined #ruby
[06:02:38] ltem: has joined #ruby
[06:02:50] aufi: has joined #ruby
[06:05:48] cschneid_: has joined #ruby
[06:12:02] blackwind_123: has joined #ruby
[06:12:26] uZiel: has joined #ruby
[06:12:47] ledestin: has joined #ruby
[06:14:19] quobo: has joined #ruby
[06:22:22] joonty: has joined #ruby
[06:24:45] nanoz: has joined #ruby
[06:24:45] nanoz: has joined #ruby
[06:26:36] rgr: has joined #ruby
[06:27:48] conta: has joined #ruby
[06:32:20] nacsurte: has joined #ruby
[06:33:56] ascarter: has joined #ruby
[06:41:11] jgpawletko: has joined #ruby
[06:42:30] djbkd: has joined #ruby
[06:44:01] johnny56: has joined #ruby
[06:44:08] im0nde: has joined #ruby
[06:49:47] jenrzzz: has joined #ruby
[06:49:47] jenrzzz: has joined #ruby
[06:52:20] hotpancakes: has joined #ruby
[06:55:32] Bhootrk_: has joined #ruby
[06:56:57] TomyWork: has joined #ruby
[06:57:12] patarr: has joined #ruby
[07:01:29] dionysus69: has joined #ruby
[07:01:57] sekmo: has joined #ruby
[07:04:47] ascarter: has joined #ruby
[07:08:50] SpiffTR: has joined #ruby
[07:16:30] judofyr: has joined #ruby
[07:19:53] vondruch_: has joined #ruby
[07:21:51] uZiel: has joined #ruby
[07:23:21] Coldblackice: has joined #ruby
[07:24:07] rohitpaulk: has joined #ruby
[07:24:28] hahuang65: has joined #ruby
[07:27:57] manveru: hmm, no idea... it's working here :|
[07:31:30] Hien: has joined #ruby
[07:31:53] _moep_: has left #ruby: ()
[07:32:18] conta: has joined #ruby
[07:33:05] nacsurte: has joined #ruby
[07:38:52] dminuoso: ljarvis: The best part of it all, is that often management wants to get data from our database. Now we can just send them the XML database, and they can open it themselves with Microsoft Word.
[07:39:07] dminuoso: This improves our reaction times, since they can obtain information much faster.
[07:43:44] blackwind_123: has joined #ruby
[07:47:03] Hien: has joined #ruby
[07:49:08] TheBrayn: has joined #ruby
[07:51:17] grymmjack: has joined #ruby
[07:56:06] Coldblackice: has joined #ruby
[07:56:10] judofyr: oh hai folks
[07:56:30] judofyr: I'm currently enjoying some ugly C code
[07:56:46] ketan: has joined #ruby
[07:57:13] judofyr: especially when it doesn't work…
[07:58:53] pandaant: has joined #ruby
[08:00:05] Silthias1: has joined #ruby
[08:02:42] Bhootrk_: has joined #ruby
[08:04:11] joonty: has joined #ruby
[08:07:31] rohitpaulk: has joined #ruby
[08:07:42] mathys: has joined #ruby
[08:09:07] uZiel: has joined #ruby
[08:11:55] Coldblackice: has joined #ruby
[08:14:23] fxa90id: has joined #ruby
[08:20:48] hotpancakes: has joined #ruby
[08:22:42] Jameser: has joined #ruby
[08:22:59] Tau: has joined #ruby
[08:29:05] mim1k: has joined #ruby
[08:30:13] Hanmac: has joined #ruby
[08:30:47] Polysics: has joined #ruby
[08:31:46] marr: has joined #ruby
[08:32:03] mikecmpbll: has joined #ruby
[08:33:24] nacsurte: has joined #ruby
[08:34:41] dazlak: has joined #ruby
[08:35:04] dazlak: Ma position : Le Mesnil-Amelot, France
[08:37:19] zenspider: how exciting...
[08:39:55] brent__: has joined #ruby
[08:39:55] lxsameer: has joined #ruby
[08:39:58] jaruga_________: has joined #ruby
[08:41:06] conta: has joined #ruby
[08:43:10] tvw: has joined #ruby
[08:47:39] mim1k: has joined #ruby
[08:49:10] DoubleMalt: has joined #ruby
[08:49:47] Batholith: has left #ruby: ("I must go, my people need me!")
[08:50:13] hotpancakes: has joined #ruby
[08:58:07] patarr: has joined #ruby
[09:00:00] mathys: has joined #ruby
[09:00:33] hahuang65: has joined #ruby
[09:04:32] biberu: has joined #ruby
[09:07:30] cschneid_: has joined #ruby
[09:16:37] sepp2k: has joined #ruby
[09:18:39] nicesignal: has joined #ruby
[09:21:56] vali: has joined #ruby
[09:25:19] roshanavand: has joined #ruby
[09:28:47] bkxd: has joined #ruby
[09:29:39] GodFather: has joined #ruby
[09:30:12] bkxd_: has joined #ruby
[09:32:54] uZiel: has joined #ruby
[09:34:27] nacsurte: has joined #ruby
[09:35:02] hotpancakes: has joined #ruby
[09:41:10] Serpent7776: has joined #ruby
[09:41:24] psychicist__: has joined #ruby
[09:41:48] dasher00: has joined #ruby
[09:44:55] BackEndCoder: has joined #ruby
[09:53:15] hutch34: has joined #ruby
[09:56:07] patarr: has joined #ruby
[09:57:38] ketan: has joined #ruby
[10:08:19] mathys: has joined #ruby
[10:08:58] Fernando-Basso: has joined #ruby
[10:10:17] aswen: has joined #ruby
[10:11:08] Camusensei: Hell. I'm running into this error: "undefined symbol: _ZN6Gecode16ValBranchOptions3defE" at runtime when trying to use the gem "thor" (dep chain: thor > berkshelf > solve > dep_selector > ffi) and it fails with that error inside ffi.
[10:11:53] Camusensei: this SO post https://stackoverflow.com/questions/22930511/symbol-not-found-when-using-ruby-gem-berkshelf tells me I should downgrade gecode from 4 to 3
[10:12:49] Camusensei: but I only see libgecode-dev 4.2.1 on the repository so I'm not quite sure how to downgrade, should I build it from source?
[10:12:52] snowcrshd: has joined #ruby
[10:14:08] zenspider: thor doesn't have anything to do with it, right? it's just something 'solve' is fucking up on
[10:14:44] zenspider: I'm allergic to stackoverflow... is it telling you to downgrade the lib, or the gem?
[10:14:56] roshanavand: has joined #ruby
[10:15:35] Camusensei: it doesn't tell... but I expect it to be the lib, since the gem does not exist (and gem dep-selector-libgecode has version 1.3.1)
[10:15:53] bkxd: has joined #ruby
[10:16:29] mim1k: has joined #ruby
[10:16:42] zenspider: hrm... that's a rather old SO post. 3 years. gem switch, I think, implies that you have both installed
[10:16:55] bkxd_: has joined #ruby
[10:17:00] zenspider: you'll have to figure out how to install from an older recipe
[10:18:51] zenspider: ok... this is crazy...
[10:18:56] zenspider: LOTS of changes
[10:19:11] Camusensei: you mean for the downgrade? yeah :(
[10:19:13] zenspider: but you can go back to 2012 w/ sha 8bf77b0c80d06250ceb711b4d2b1fcd5d253c8db to get 3.7.3
[10:19:34] zenspider: found via: cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/; git log gecode.rb
[10:19:55] zenspider: this sounds bad...
[10:20:02] Camusensei: oh, if it's the source, I have it here: http://http.debian.net/debian/pool/main/g/gecode/gecode_3.7.3-1.debian.tar.gz
[10:22:42] zenspider: sure. whatever works for you. just understand you're going back FIVE YEARS to get this to work. expect other problems
[10:26:02] Camusensei: what could the alternatives be? surely someone else has been trying to use "solve" before me, no?
[10:27:03] zenspider: probably many... but I'm not familiar with this lib so I won't be able to help there
[10:27:15] Camusensei: ok, thank you for trying though :)
[10:28:05] aufi: has joined #ruby
[10:28:29] horst: has joined #ruby
[10:30:37] CrazyEddy: has joined #ruby
[10:34:41] dionysus69: has joined #ruby
[10:35:17] nacsurte: has joined #ruby
[10:35:35] Tau: has left #ruby: ()
[10:47:15] LightStalker: has joined #ruby
[10:49:45] jamesaxl: has joined #ruby
[10:53:35] hotpancakes: has joined #ruby
[10:53:37] Camusensei: zenspider: I finally solved the issue by looking at the versions I was using, and it turned out that berkshelf was two major version late, hence the old gecode dependency :)
[10:54:01] zenspider: so you got to move forwards, not backwards?
[10:59:48] Bhootrk_: has joined #ruby
[11:00:17] rgr: has joined #ruby
[11:01:48] dionysus69: has joined #ruby
[11:02:08] hahuang65: has joined #ruby
[11:04:40] Kristjan55555: has joined #ruby
[11:05:31] cschneid_: has joined #ruby
[11:06:46] mim1k: has joined #ruby
[11:06:57] mathys: has joined #ruby
[11:09:15] harfangk: has joined #ruby
[11:09:27] khaki: has joined #ruby
[11:10:16] khaki: has joined #ruby
[11:10:36] ferr: has joined #ruby
[11:21:22] Emmanuel_Chanel: has joined #ruby
[11:21:52] bkxd_: has joined #ruby
[11:24:21] astrobunny: has joined #ruby
[11:24:45] Jameser: has joined #ruby
[11:25:09] hotpancakes: has joined #ruby
[11:28:40] SpiffTR: has joined #ruby
[11:33:50] AlexRussia: has joined #ruby
[11:36:07] nacsurte: has joined #ruby
[11:36:13] Mia: has joined #ruby
[11:37:07] SpiffTR: has joined #ruby
[11:39:38] brent__: has joined #ruby
[11:44:42] psychicist__: has joined #ruby
[11:48:19] ddffg: has joined #ruby
[11:57:36] uZiel: has joined #ruby
[11:58:33] ketan: has joined #ruby
[12:00:23] ketan_: has joined #ruby
[12:00:39] t-recx: has joined #ruby
[12:05:43] bkxd: has joined #ruby
[12:06:35] nowhere_man: has joined #ruby
[12:07:44] kaneki993: has joined #ruby
[12:07:52] bkxd_: has joined #ruby
[12:10:25] ketan: has joined #ruby
[12:10:36] kaneki993: I am facing error on running tests on arby . Arby::Dsl::SyntaxError
[12:10:38] kaneki993: https://github.com/sdg-mit/arby
[12:16:49] hotpancakes: has joined #ruby
[12:17:11] synthroid: has joined #ruby
[12:20:06] sysvalve: has joined #ruby
[12:21:40] Jameser: has joined #ruby
[12:24:22] judofyr: has joined #ruby
[12:24:35] ldnunes: has joined #ruby
[12:25:32] Jameser: has joined #ruby
[12:29:20] Jameser: has joined #ruby
[12:30:14] SpiffTR: has joined #ruby
[12:31:17] KCmetro: has joined #ruby
[12:34:15] dminuoso: kaneki993: Okay.
[12:34:44] krandi: has joined #ruby
[12:36:28] hotpancakes: has joined #ruby
[12:36:42] nacsurte: has joined #ruby
[12:40:38] im0nde: has joined #ruby
[12:41:10] DoubleMalt: has joined #ruby
[12:41:21] cpruitt: has joined #ruby
[12:41:43] brendan-: has joined #ruby
[12:44:19] oleo: has joined #ruby
[12:46:35] jgpawletko: has joined #ruby
[12:47:27] maikowblue: has joined #ruby
[12:50:20] Camusensei: has left #ruby: ()
[12:51:55] aswen: has joined #ruby
[12:52:59] Tempesta: has joined #ruby
[12:55:01] haylon: has joined #ruby
[12:57:12] Ilie[]: has joined #ruby
[12:57:36] djbjd: has joined #ruby
[12:58:04] Ilie[]: ACTION good day everyone :-)
[13:00:33] dminuoso: havenwood: Would you like to buy some keys? It seems like you are in dire need of some.
[13:00:55] havenwood: dminuoso: just keeping my greeting easily evalable
[13:01:18] havenwood: >> alias g p; g'mornin'
[13:01:20] ruby[bot]: havenwood: # => "mornin" ...check link for more (https://eval.in/821393)
[13:01:58] haylon: a space bar, g, p, >, shift and enter
[13:02:01] judofyr: has joined #ruby
[13:02:02] haylon: smallest keyboard yet
[13:02:31] dropsh0t: has joined #ruby
[13:02:36] mim1k: has joined #ruby
[13:02:55] hahuang65: has joined #ruby
[13:04:23] shinnya: has joined #ruby
[13:04:26] mwlang: has joined #ruby
[13:06:35] mwlang: I have a ruby gem I want to update to start supporting Rails 5.x.. it’s currently locked to 4.2 with: s.add_dependency "rails", "~> 4.2" in the gemspec, which I *thought* meant “at least 4.2 or later” so I think I misunderstood the docs there.
[13:06:58] havenwood: mwlang: It's more pessimistic than that.
[13:07:21] tlaxkit: has joined #ruby
[13:09:14] vuoto: has joined #ruby
[13:09:18] havenwood: mwlang: http://guides.rubygems.org/patterns/#declaring-dependencies
[13:09:19] havenwood: mwlang: https://robots.thoughtbot.com/rubys-pessimistic-operator
[13:09:39] djbjd: has joined #ruby
[13:10:21] herwin: i wouldn't exactly call it ruby's pessimistic operator
[13:10:38] SpiffTR: has joined #ruby
[13:10:58] herwin: it's not an operator of ruby
[13:11:30] havenwood: Ruby's pessimistic version constraint is more apt
[13:11:46] mwlang: havenwood: thanks for that… re-reading a 3rd time, I realized I need >=, not ~>
[13:12:27] Jameser: has joined #ruby
[13:15:34] runescape07rsps: has joined #ruby
[13:16:16] ornerymoose: has joined #ruby
[13:16:17] rfoust: has joined #ruby
[13:17:40] runescape07rsps: has joined #ruby
[13:19:03] judofyr: mwlang: you probably want "=> 4.2", "< 6"
[13:19:24] judofyr: oops: ">= 4.2", "< 6"
[13:19:29] mwlang: judofyr: that’s not a bad idea…
[13:21:19] judofyr: mwlang: the only disadvantage is that version "6.0.0.beta" will match that constraint
[13:21:26] vuoto: has joined #ruby
[13:21:44] judofyr: I recall that there were some strange edge case at least
[13:22:07] tgragnato: has joined #ruby
[13:22:41] mwlang: yeah, but probably wise to be explicit about excluding all 6.x until I explicitly test and verify functionality of the gem with any version of 6 myself.
[13:22:48] Polysics: has joined #ruby
[13:24:02] judofyr: I don't know how deeply you integrate with Rails, but using "<= 5.x" might be even safer
[13:24:02] Jameser: has joined #ruby
[13:24:17] judofyr: but yeah, multiple constraints are nice
[13:24:39] vuoto: has joined #ruby
[13:27:27] DLSteve: has joined #ruby
[13:28:20] djbjd: has joined #ruby
[13:28:20] mistergibson: has joined #ruby
[13:29:37] nanoz: has joined #ruby
[13:31:29] ornerymoose_: has joined #ruby
[13:33:03] bkxd: has joined #ruby
[13:33:55] bkxd_: has joined #ruby
[13:41:21] hotpancakes: has joined #ruby
[13:41:34] s2013: has joined #ruby
[13:41:45] pierrearseufrasi: has joined #ruby
[13:42:40] marlinc_: has joined #ruby
[13:42:53] Jameser: has joined #ruby
[13:46:32] ledestin: has joined #ruby
[13:48:57] gizmore: has joined #ruby
[13:49:52] zacts: has joined #ruby
[13:52:56] jphase: has joined #ruby
[13:53:57] hutch34: has joined #ruby
[13:54:50] apparition: has joined #ruby
[13:59:42] SpiffTR: has joined #ruby
[14:00:02] mostlybadfly: has joined #ruby
[14:01:07] bmurt_: has joined #ruby
[14:02:58] jakew: has joined #ruby
[14:04:29] bkxd: has joined #ruby
[14:04:55] simmaniac: has joined #ruby
[14:07:49] jakew: has joined #ruby
[14:09:00] bkxd: has joined #ruby
[14:09:56] jtperreault: has joined #ruby
[14:10:00] bkxd_: has joined #ruby
[14:10:38] that2: has joined #ruby
[14:10:50] that2: has left #ruby: ()
[14:11:08] Jameser: has joined #ruby
[14:11:18] mim1k: has joined #ruby
[14:11:53] SpiffTR: has joined #ruby
[14:13:04] jakew: has joined #ruby
[14:13:55] Jameser: has joined #ruby
[14:15:49] Didac: has joined #ruby
[14:15:55] ikopico: has joined #ruby
[14:17:12] hotpancakes: has joined #ruby
[14:18:23] chef3000: has joined #ruby
[14:19:46] Jameser: has joined #ruby
[14:19:50] bkxd: has joined #ruby
[14:23:56] hotpancakes: has joined #ruby
[14:24:01] agimenez: has joined #ruby
[14:24:19] patarr: has joined #ruby
[14:25:47] nobodyzxc: has joined #ruby
[14:31:51] mikecmpbll: has joined #ruby
[14:33:00] eightlimbed: has joined #ruby
[14:36:26] rama: has joined #ruby
[14:37:56] nacsurte: has joined #ruby
[14:37:58] rama: has joined #ruby
[14:40:38] hutch34: has joined #ruby
[14:41:07] ResidentBiscuit: has joined #ruby
[14:42:03] pierrearseufrasi: has joined #ruby
[14:45:07] patarr: has joined #ruby
[14:45:56] Jameser: has joined #ruby
[14:47:09] sspreitz: has joined #ruby
[14:48:26] snowcrshd: has joined #ruby
[14:48:27] redondos: has joined #ruby
[14:49:51] xzhao: has joined #ruby
[14:50:19] chouhoul_: has joined #ruby
[14:53:59] cpruitt: has joined #ruby
[14:54:10] theunraveler: has joined #ruby
[14:54:38] Jameser: has joined #ruby
[14:57:38] SpiffTR: has joined #ruby
[15:02:13] cschneid_: has joined #ruby
[15:02:54] pierrearseufrasi: has joined #ruby
[15:02:59] dionysus69: has joined #ruby
[15:03:43] hahuang65: has joined #ruby
[15:04:52] ahrs: has joined #ruby
[15:05:15] cadillac__: has joined #ruby
[15:05:53] patarr: has joined #ruby
[15:08:49] troys: has joined #ruby
[15:09:09] ResidentBiscuit: has joined #ruby
[15:09:43] cdg: has joined #ruby
[15:13:10] patarr: has joined #ruby
[15:13:19] pierrearseufrasi: has joined #ruby
[15:14:30] mim1k: has joined #ruby
[15:16:23] judofyr: has joined #ruby
[15:17:59] n0vacane: has joined #ruby
[15:18:07] hotpancakes: has joined #ruby
[15:19:42] boombox_: has joined #ruby
[15:20:23] uZiel: has joined #ruby
[15:20:55] jackjackdripper: has joined #ruby
[15:22:48] rkazak: has joined #ruby
[15:23:04] TomyLobo: has joined #ruby
[15:26:28] cdg: has joined #ruby
[15:29:38] Didac: has joined #ruby
[15:32:17] ThatsNotJack: has joined #ruby
[15:37:41] mim1k: has joined #ruby
[15:39:10] nacsurte: has joined #ruby
[15:40:08] eputnam: has joined #ruby
[15:42:52] uZiel: has joined #ruby
[15:42:55] brent__: has joined #ruby
[15:48:52] cttttt: Just sort of filling in some gaps in Ruby from a long time ago. I'm trying to use `system()` to run an external command, but want to (1) pass in an array of arguments...bypassing the shell and (2) hide all of the output. Based on the documentation, there are options for redirection, but how do I redirect to the bit-bucket in a platform neutral way?
[15:52:55] Dimik: has joined #ruby
[15:53:28] psychicist__: has joined #ruby
[15:54:00] nacsurte: has joined #ruby
[15:55:15] jphase_: has joined #ruby
[15:58:02] cttttt: Oh.... system(command, args ..., :out => :close) . I'm a dumb.
[15:58:53] enterprisey: has joined #ruby
[16:00:44] nankyokusei: has joined #ruby
[16:01:09] havenwood: cttttt: those docs are more than a bit tough to parse
[16:01:18] charliesome: has joined #ruby
[16:01:36] hotpancakes: has joined #ruby
[16:01:43] roamingdog: has joined #ruby
[16:01:46] hxegon: has joined #ruby
[16:02:33] cdg_: has joined #ruby
[16:03:06] cdg__: has joined #ruby
[16:04:39] cttttt: havenwood: Yeah...I, for some reason, thought that this literally closed the file descriptor. If it did, the process would be hitting some issues trying to write to it. Ruby must be doing some sort of magic.
[16:06:06] cam27: has joined #ruby
[16:06:27] mim1k: has joined #ruby
[16:06:39] amclain: has joined #ruby
[16:17:55] hotpancakes: has joined #ruby
[16:18:09] hotpancakes: has joined #ruby
[16:18:30] roamingdog: has joined #ruby
[16:19:17] gusrub: has joined #ruby
[16:21:39] helpa: has joined #ruby
[16:22:22] judofyr: has joined #ruby
[16:22:35] ResidentBiscuit: has joined #ruby
[16:22:45] djbjd: has joined #ruby
[16:23:43] roamingdog: has joined #ruby
[16:24:00] Fysicus: has joined #ruby
[16:25:25] amclain: has joined #ruby
[16:31:50] meshsmith: has joined #ruby
[16:32:05] hotpancakes: has joined #ruby
[16:35:23] roamingdog: has joined #ruby
[16:36:07] pierrearseufrasi: has joined #ruby
[16:38:21] ramakanta: has joined #ruby
[16:41:52] bkxd: has joined #ruby
[16:41:54] bkxd_: has joined #ruby
[16:42:53] ivanskie: has joined #ruby
[16:44:25] ivanskie: has anyone worked with modbus?
[16:45:40] chouhoulis: has joined #ruby
[16:45:44] ivanskie: i'm reading a 64 byte string, this is what i get: [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761]
[16:47:16] bkxd: has joined #ruby
[16:48:20] ivanskie: apaprently there are two ascii characters in each of those
[16:49:16] crankharder: has joined #ruby
[16:49:32] roamingdog: has joined #ruby
[16:49:35] snowcrshd: has joined #ruby
[16:50:30] s2013: has joined #ruby
[16:51:43] ivanskie: 32 registers containing up to 64 characters
[16:53:50] jenrzzz: has joined #ruby
[16:53:50] jenrzzz: has joined #ruby
[16:54:44] Silthias1: has left #ruby: ()
[16:57:01] ResidentBiscuit: has joined #ruby
[16:58:43] ivanskie: okay so i believe the above should say Eeaton
[16:59:05] clemens35: has joined #ruby
[16:59:59] hotpancakes: has joined #ruby
[17:00:58] hahuang65: has joined #ruby
[17:02:05] cout: sorry wrong window
[17:02:45] ivanskie: im only getting Ea https://repl.it/Izfa/2
[17:03:18] s2013: has joined #ruby
[17:04:06] rkazak: has joined #ruby
[17:04:59] cdg: has joined #ruby
[17:06:38] simmaniac: has joined #ruby
[17:06:57] raspado: has joined #ruby
[17:07:42] ivanskie: oooh.. i got Eaton Corporation!!! woot woot https://repl.it/Izfa/3
[17:07:47] ivanskie: now how do I get rid of the garbage
[17:08:07] AndBobsYourUncle: has joined #ruby
[17:09:42] ivanskie: [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761].map{|s| s.to_s(16)}.join.gsub(/../){|pair| pair.hex.chr}
[17:09:52] ivanskie: how do I clean this up?
[17:10:25] Rutix: has joined #ruby
[17:10:28] Rutix: has joined #ruby
[17:11:06] agimenez: has joined #ruby
[17:11:40] ResidentBiscuit: has joined #ruby
[17:13:57] ivanskie: https://repl.it/Izfa/4 now i get "Eaton Corporation\x00Ea" so still have a 0 there, and array ends with first char pair so need to skip that...
[17:14:25] joes: has joined #ruby
[17:14:57] kies: has joined #ruby
[17:15:04] havenwood: >> [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761][0..-2].reject(&:zero?).flat_map { |n| n.to_s(16).scan(/\h{2}/).map(&:hex) }.map(&:chr).join.chomp(0.chr)
[17:15:05] ruby[bot]: havenwood: # => "Eaton Corporation" (https://eval.in/821554)
[17:16:17] ivanskie: u are my hero
[17:16:57] ivanskie: string = slave.holding_registers[1032..1064]
[17:17:02] ivanskie: puts string[0..-2].reject(&:zero?).flat_map { |n| n.to_s(16).scan(/\h{2}/).map(&:hex) }.map(&:chr).join.chomp(0.chr)
[17:17:22] ivanskie: gives me Eaton Corporation in cli.. amazing
[17:18:31] havenwood: ivanskie: note:
[17:18:32] havenwood: >> [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761].pack 'S>*'
[17:18:34] ruby[bot]: havenwood: # => "Eaton Corporation\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x ...check link for more (https://eval.in/821555)
[17:19:32] havenwood: >> [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761][0..-2].reject(&:zero?).pack('S>*').chomp(0.chr)
[17:19:33] ruby[bot]: havenwood: # => "Eaton Corporation" (https://eval.in/821556)
[17:20:35] ivanskie: thats some advanced ruby magic that i don't understand how it works yet.
[17:20:45] Dimik: has joined #ruby
[17:21:32] havenwood: ivanskie: [0..-2].pack('s>*').strip
[17:21:34] havenwood: ivanskie: that'll ^ do it
[17:21:42] havenwood: >> [17761, 29807, 28192, 17263, 29296, 28530, 24948, 26991, 28160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17761][0..-2].pack('s>*').strip
[17:21:43] ruby[bot]: havenwood: # => "Eaton Corporation" (https://eval.in/821557)
[17:22:18] Ilie[]: has joined #ruby
[17:22:24] ivanskie: i should read into pack
[17:22:39] havenwood: ivanskie: capital S if the integers are unsigned, lowercase if signed
[17:23:09] N0ATN: has joined #ruby
[17:23:12] havenwood: you're welcome
[17:24:09] ivanskie: thats funny. went from 119 characters to 41 characters of code. and still does the same
[17:24:15] havenwood: ivanskie: the > is for big endian
[17:24:20] havenwood: you could use n instead
[17:24:29] havenwood: pack('n*').strip
[17:24:43] havenwood: ivanskie: still getting smaller ;-)
[17:24:56] ivanskie: https://media.giphy.com/media/hH0451hPejRiE/source.gif i believe in thy power
[17:25:04] havenwood: n is 16-bit unsigned, network (big-endian) byte order
[17:25:28] ivanskie: right and i think thats exactly what i have here with a string data type in modbus
[17:26:12] Cohedrin_: has joined #ruby
[17:26:27] ivanskie: wow u sir can perform miracles
[17:26:41] ivanskie: i shall subscribe to the power of Ruby
[17:26:41] sanguisdex: has joined #ruby
[17:27:42] ivanskie: I'm assuming whomever added the .pack to ruby was at some point dealing with a similar problem
[17:28:07] gusrub: has joined #ruby
[17:28:25] sanguisdex: I need to debug a gem thats my lib depends on. is there a way to get bundler or my gemfile to tell ruby to look at a gem in certain location for a gem ever time I run the parrent lib with out running bundle install between every test?
[17:28:33] sanguisdex: where can I read up on this?
[17:28:46] ivanskie: pack? https://apidock.com/ruby/Array/pack
[17:29:18] ivanskie: sanguisdex i believe traveling ruby does something like this
[17:29:41] ivanskie: there's also bundler config
[17:29:45] AlexRussia: has joined #ruby
[17:30:17] _joes_____: has joined #ruby
[17:30:37] havenwood: sanguisdex: gem YOUR_GEM, path: '/path/to/your_gem'
[17:31:01] havenwood: sanguisdex: You can specify a local path in your Gemfile for a certain gem.
[17:31:07] sanguisdex: havenwood: but I have to run install every time or if does not notice the changes
[17:31:14] sanguisdex: di I just live with that?
[17:31:31] havenwood: It'll use the gem itself, so changes are changes.
[17:31:34] havenwood: sanguisdex: If you change your system gem it'll also change without a bundle.
[17:31:43] havenwood: sanguisdex: You can restore it with: gem pristine YOUR_GEM
[17:32:10] havenwood: sanguisdex: Bundler doesn't cache the gem content, it just goes to the gem location and uses that each time.
[17:32:19] KeyJoo: has joined #ruby
[17:32:25] sanguisdex: okay, thats the method I am going with, I checked out the gem in to my rvm's gem dir. just felt hacky
[17:34:23] hotpancakes: has joined #ruby
[17:36:09] mim1k: has joined #ruby
[17:37:21] yeticry: has joined #ruby
[17:42:49] gusrub: has joined #ruby
[17:43:05] hotpancakes: has joined #ruby
[17:44:49] jamesaxl: has joined #ruby
[17:47:08] Fenhl: has joined #ruby
[17:47:30] brent__: has joined #ruby
[17:47:40] cam27: has joined #ruby
[17:47:51] hotpancakes: has joined #ruby
[17:49:19] judofyr: has joined #ruby
[17:51:20] Fenhl: hello, I'm trying to run a script from something installed using bundle (https://github.com/taw/magic-search-engine) and getting this error about libruby not being loaded. I have no idea what that means. Any ideas? https://www.irccloud.com/pastebin/upMXtqsF/
[17:51:22] ruby[bot]: Fenhl: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/a24ae4568cf910bb5cf3dbfb8db24200
[17:51:22] ruby[bot]: Fenhl: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
[17:51:37] mim1k: has joined #ruby
[17:51:52] S1kx: has joined #ruby
[17:52:04] kolgomorov: has joined #ruby
[17:53:06] Fenhl: (I am on macOS 10.12.5)
[17:54:20] hotpancakes: has joined #ruby
[17:54:21] rippa: has joined #ruby
[17:59:54] gusrub: has joined #ruby
[18:06:34] ACER: has joined #ruby
[18:07:00] mim1k: has joined #ruby
[18:08:26] jamesaxl: has joined #ruby
[18:09:40] ascarter: has joined #ruby
[18:11:00] hotpancakes: has joined #ruby
[18:13:35] runescape07rsps: has joined #ruby
[18:15:12] choke: has joined #ruby
[18:15:49] ascarter: has joined #ruby
[18:16:03] kitikonti: has joined #ruby
[18:16:42] gusrub: has joined #ruby
[18:20:22] funny: has joined #ruby
[18:20:30] cdg_: has joined #ruby
[18:21:04] cdg: has joined #ruby
[18:22:27] mim1k: has joined #ruby
[18:24:18] Cohedrin_: has joined #ruby
[18:25:59] hotpancakes: has joined #ruby
[18:28:18] Asher1: has joined #ruby
[18:28:44] ozcanesen: has joined #ruby
[18:29:18] chouhoul_: has joined #ruby
[18:29:30] hutch34: has joined #ruby
[18:30:18] sysvalve: has joined #ruby
[18:31:07] simmaniac: has joined #ruby
[18:32:13] Cohedrin_: has joined #ruby
[18:32:22] ascarter: has joined #ruby
[18:33:18] jenrzzz: has joined #ruby
[18:33:38] agimenez: has joined #ruby
[18:37:54] mim1k: has joined #ruby
[18:39:52] uZiel: has joined #ruby
[18:41:22] Asher: has joined #ruby
[18:44:39] ivanskie: havenwood what would you make of this? [16409, 39322]
[18:44:43] ivanskie: supposedly float.
[18:44:55] ivanskie: i've traied pack('g*')
[18:45:22] Dimik: has joined #ruby
[18:50:00] ivanskie: i believe its
[18:50:02] ivanskie: "32-bit single precision IEEE floating point number"
[18:51:28] ivanskie: IEEE floating point with 4 byte input (2 word)
[18:54:41] bmurt_: has joined #ruby
[18:54:57] weinstein: has joined #ruby
[18:55:35] bmurt_: has joined #ruby
[18:56:27] Cohedrin_: has joined #ruby
[18:58:20] shinnya: has joined #ruby
[19:00:49] snowcrshd: has joined #ruby
[19:02:47] ivanskie: there's this thing.. http://www.simplymodbus.ca/ieeefloats.xls which apparently does what needs to be done to get the final value
[19:03:20] ivanskie: when you enter 16409 and 39322 into that. u get 2.4 which is what i'm after lol. but how do i do that in ruby without that weird calculation
[19:04:10] ledestin: has joined #ruby
[19:07:59] ketan: has joined #ruby
[19:08:44] mim1k: has joined #ruby
[19:09:40] jaruga_________: has joined #ruby
[19:10:12] hotpancakes: has joined #ruby
[19:12:42] that2: has joined #ruby
[19:12:47] that2: has left #ruby: ()
[19:15:42] hotpancakes: has joined #ruby
[19:19:00] ivanskie: i got to convert [16409, 39322] to a binary string. but i think i'm doing it wrong
[19:19:35] judofyr: has joined #ruby
[19:21:27] nadir: has joined #ruby
[19:21:27] hxegon: has joined #ruby
[19:23:15] jackjackdripper: has joined #ruby
[19:24:15] mim1k: has joined #ruby
[19:25:17] havenwood: >> "䀙馚".codepoints
[19:25:18] ruby[bot]: havenwood: # => [16409, 39322] (https://eval.in/821591)
[19:25:39] soLucien: has joined #ruby
[19:26:01] brent__: has joined #ruby
[19:26:59] havenwood: ivanskie: lemme see
[19:27:16] bkxd: has joined #ruby
[19:27:27] ivanskie: this is bizzar
[19:28:52] apeiros: ivanskie: what value should [16409, 39322] convert to?
[19:28:53] Papierkorb: ivanskie: what kind of binary string?
[19:29:04] ivanskie: it should be 2.4
[19:29:15] ivanskie: or excel says 2.4000001E+00
[19:29:58] apeiros: >> [16409, 39322].pack("S>*").unpack("g")
[19:29:59] ruby[bot]: apeiros: # => [2.4000000953674316] (https://eval.in/821605)
[19:30:17] Papierkorb: dang you were faster :|
[19:30:18] ivanskie: and i thought i almost tried all combos
[19:30:32] apeiros: I tried two
[19:30:37] havenwood: or shorthand
[19:30:38] havenwood: >> [16409, 39322].pack('n*').unpack('g')
[19:30:38] apeiros: big and little endian
[19:30:39] ruby[bot]: havenwood: # => [2.4000000953674316] (https://eval.in/821606)
[19:30:41] ResidentBiscuit: has joined #ruby
[19:30:42] ivanskie: i didn't know what i was doing so
[19:31:07] Papierkorb: ivanskie: Your two numbers are below 65k, indicating that they might be 16bit = 2Bytes each, two so 4Bytes. That fits a 32bit float.
[19:31:26] havenwood: >> [16409, 39322].pack('D').each_byte.reverse_each.map { |n| sprintf("%08b", n) }
[19:31:27] ruby[bot]: havenwood: # => ["01000000", "11010000", "00000110", "01000000", "00000000", "00000000", "00000000", "00000000"] (https://eval.in/821618)
[19:31:37] apeiros: one is above 32K, indicating unsigned
[19:31:43] Papierkorb: ivanskie: If they (or one) were above that, next guess would be that they're 2x32bit, so 8Byte, a 64bit float (also called `double`)
[19:31:45] ivanskie: yes its a 32 bit single precision ieee float
[19:31:53] ivanskie: in two word array
[19:32:07] apeiros: it's a rather odd way to represent a 4byte float, though
[19:32:16] marlinc_: has joined #ruby
[19:32:46] bkxd: has joined #ruby
[19:33:00] Derperperd: has joined #ruby
[19:33:17] ivanskie: working with rmodbus gem. it doesn't have any data type normalization (for the lack of a better term) built-in
[19:33:37] apeiros: conversion
[19:33:50] ivanskie: so it just spits out arrays of hex as it receives from the device
[19:34:30] chouhoulis: has joined #ruby
[19:34:44] ivanskie: could probably extend it to do that. i now know how to do STRING and FLOAT values lol thanks to u guys
[19:34:49] apeiros: you know that's not a datatype, yes?
[19:35:13] ivanskie: but what i meant is modbus stores diff data types differently.
[19:35:47] apeiros: [16409, 39322] is what you get directly like that from rmodbus?
[19:36:20] apeiros: modbus sounds like it was something which reads from a serial port or similar?
[19:36:40] andrzejku: has joined #ruby
[19:37:00] ivanskie: so you might be doing .read_input_registers(reg, nregs) and it spits out the array of registers
[19:37:37] ivanskie: usually you know what to expect, cause it could either be STRING, UINT, FLOAT, BUL
[19:37:59] jenrzzz: has joined #ruby
[19:37:59] jenrzzz: has joined #ruby
[19:38:00] ivanskie: thats what i meant by data type
[19:38:50] ivanskie: would be nice .read_input_registers(reg, nregs).string or something like that and just have a human readable output
[19:38:54] duderonomy: has joined #ruby
[19:39:36] ivanskie: instead of .read_input_registers(reg, nregs).pack('n*').strip for string
[19:39:51] ivanskie: and .pack('D').each_byte.reverse_each.map { |n| sprintf("%08b", n) } for float
[19:40:01] havenwood: ivanskie: you got the wrong one for float
[19:40:10] havenwood: ivanskie: pack('n*').unpack('g')
[19:40:37] havenwood: pack('n*').strip
[19:41:08] judofyr: has joined #ruby
[19:41:23] apeiros: ivanskie: just build those then?
[19:41:26] ivanskie: err .pack("S>*").unpack("g").first.round(2)
[19:41:33] apeiros: doesn't seem hard
[19:41:45] ivanskie: figuring this part out is.
[19:41:53] ivanskie: what u guys just did.
[19:42:41] apeiros: class ModBus::Slave; def read_input_register_floats(addr, nregs); query("\x4" + addr.to_word + nregs.to_word).unpack('g*'); end
[19:43:04] apeiros: no need to unpack/pack (read_input_registers unpacks with "n*")
[19:43:35] apeiros: and for string, simply drop the unpack
[19:44:17] mim1k: has joined #ruby
[19:44:53] vincent_: has joined #ruby
[19:45:42] ur5us: has joined #ruby
[19:46:20] nicesignal: has joined #ruby
[19:51:03] ivanskie: what about unsigned integer
[19:51:33] mim1k: has joined #ruby
[19:51:43] apeiros: &ri String#unpack ivanskie
[19:51:43] `derpy: ivanskie: http://ruby-doc.org/core-2.4.1/String.html#method-i-unpack
[19:54:01] kitikonti: has joined #ruby
[19:54:27] skweek: has joined #ruby
[19:55:31] hotpancakes: has joined #ruby
[19:56:07] Cohedrin_: has joined #ruby
[20:01:23] Rory: has joined #ruby
[20:02:26] ivanskie: whats odd is that with uints it just spits out an integer.
[20:02:38] ivanskie: [0, 30] is really just the 30.
[20:03:27] runescape07rsps: dude im literally here just to get a job at shopify
[20:03:38] runescape07rsps: im working out too so ill be hot when im ready
[20:06:02] tvw: has joined #ruby
[20:06:56] Guest38987: has joined #ruby
[20:07:57] apeiros: ivanskie: no, those are two different interpretations
[20:08:09] apeiros: i.e. one of those two interpretations is wrong
[20:08:37] apeiros: either you're reading two "regions", getting [0,30], or you're reading one (twice as long) region, and getting [30]
[20:11:28] ivanskie: im just going by the register map and manual of the device
[20:13:06] apeiros: and what does it say about the size of the unsigned ints?
[20:13:53] ivanskie: it says, for uid 19, Number of Phases is at register 8032. its a UINT, 2 bytes long. and manual says that if its 2 bytes long, devide by 2 and you'll get number of regs.
[20:14:37] apeiros: and what do you use to unpack those 2 bytes?
[20:15:10] ivanskie: i've never used or even known about pack and unpack before today
[20:15:47] apeiros: so… you've literally learnt nothing, zilch, nada the last ~2h?
[20:15:58] ivanskie: 'UINT – An unsigned integer. Consult the Size parameter to find the integer's size for a given entry (it is a multiple of two so that entries are register-aligned)."
[20:16:01] apeiros: that's rather sad honestly.
[20:16:33] ivanskie: apeiros i'm trying to grasp the pack thing and i haven't yet.
[20:16:53] apeiros: it interprets bytes and converts them to ruby's datatypes for it.
[20:16:59] zacts: has joined #ruby
[20:17:01] ivanskie: because i don't quite understand the concept of words in hex
[20:17:28] apeiros: n* says "read 2 bytes each and convert each of those 2 byte packs into an unsigned integer"
[20:17:33] apeiros: there is no hex.
[20:17:47] apeiros: hex is a way to represent *numbers*
[20:18:42] ivanskie: soso n* first converts the hex into binery then reads 2 bytes at a time?
[20:18:52] apeiros: a byte is one of 256 possible values, 2 bytes is one of 65536 values, 4 bytes one of 4.3 billion values. what one of those values *is* depends on how you want to interpret it
[20:19:13] apeiros: seriously, if you say hex one more time I'm going to kick you :-p
[20:19:33] ivanskie: a byte is 4 bits isnt it? (don't kill me, im trying to remember)
[20:19:36] apeiros: no, n does not convert a *hex*. it converts 2 *bytes*
[20:20:05] apeiros: ouch. wikipedia and google failed you hard there…
[20:20:20] ivanskie: 1 byte's 8 bits
[20:20:20] apeiros: in almost all current architectures, a byte is 8 bit
[20:20:36] ivanskie: yes my memory failed.
[20:20:45] apeiros: and "1 byte = 256 values" gives that away too… 2**8 = 256
[20:21:09] ivanskie: what are you talking about
[20:21:18] apeiros: what's a bit?
[20:21:59] apeiros: but granted, log2 without a calculator and without knowing the numbers by heart is hard.
[20:22:05] Axy: has joined #ruby
[20:22:05] Axy: has joined #ruby
[20:22:07] ivanskie: nope i still dont understand what you are saying about 1 byte is 256 values
[20:22:28] ivanskie: there's 8 bits
[20:22:50] ivanskie: don't mind me.
[20:23:22] ivanskie: its not 256 values. its that it could be anything 0 to 256
[20:23:33] havenwood: >> ['00000000', '11111111'].map { |s| s.to_i 2 } # ivanskie 255
[20:23:34] ruby[bot]: havenwood: # => [0, 255] (https://eval.in/821631)
[20:24:01] havenwood: ivanskie: 0 to 255 is 256 values
[20:24:18] havenwood: >> (0..255).size # ivanskie
[20:24:19] ruby[bot]: havenwood: # => 256 (https://eval.in/821632)
[20:24:20] apeiros: ivanskie: wrong, and that's what you've got to understand.
[20:24:24] apeiros: it's one of 256 values
[20:24:30] apeiros: that *can* be a number. it doesn't have to be.
[20:24:34] apeiros: it can also be a character
[20:24:41] apeiros: or part of a character
[20:25:07] apeiros: "b" in ASCII is 01100010
[20:25:24] apeiros: but 01100010 is also 98 if interpreted as unsigned integer
[20:25:40] ivanskie: ok what my brain is stuck on is ur use of word 'value'
[20:25:45] apeiros: it could also be virtually anything else. it could be a color f.ex.
[20:26:22] apeiros: that's the thing where your brain hangs and why you keep using "hex" entirely wrong.
[20:26:41] apeiros: well, technically yes, semantics. just that you get yours wrong :-p
[20:26:46] bkxd: has joined #ruby
[20:26:46] ivanskie: there has to be a conversion of hex to binary
[20:26:59] ivanskie: wait no it doesn't give you hex.
[20:26:59] apeiros: ACTION smacks ivanskie
[20:27:25] mim1k: has joined #ruby
[20:28:09] apeiros: yes of course there's a conversion from hex to binary. and it's easy, that's why hex is often used to represent binary data.
[20:28:09] ivanskie: http://www.simplymodbus.ca/faq.htm#Stored
[20:28:21] apeiros: 4 bits = 1 hex digit
[20:28:31] apeiros: 0000 = "0", 1111 = "F"
[20:28:36] ivanskie: yes not arguing abotu that
[20:29:08] ivanskie: so with this modbus thing, every register returns a 16-bit unsigned integer.
[20:29:38] apeiros: you mean rmodbus' read_register_inputs does?
[20:29:39] ivanskie: so if register map says that the data is an unsigned integer. u don't have to do anything with it. thats it.
[20:29:54] apeiros: if it says it's a 16bit unsigned integer, yes
[20:29:59] ivanskie: rmodbus is a modbus implementation. so
[20:30:16] apeiros: yes, but modbus does not return anything. it specifies stuff.
[20:30:27] ivanskie: right. so if its a float. we have to convert unsigned integer to float
[20:30:45] apeiros: if you use read_register_inputs
[20:31:14] ivanskie: there's not much choice
[20:31:16] apeiros: and the way we showed you is by converting it first back into its binary form
[20:31:25] apeiros: dude, I *literally* showed you your choice
[20:31:27] ivanskie: u can either get holding registers, discrete registers, input registers, and something else there
[20:31:47] apeiros: there's no obligation to use read_register_inputs.
[20:32:05] ivanskie: its a different function
[20:32:07] bkxd: has joined #ruby
[20:32:14] bkxd_: has joined #ruby
[20:32:17] lxsameer: has joined #ruby
[20:32:43] apeiros: and what's that supposed to mean? what's a different method from what and what's being different got to do with anything?
[20:32:48] Guest: has left #ruby: ()
[20:33:00] ivanskie: not talking about ruby
[20:33:03] ivanskie: modbus is a protocol
[20:33:07] ivanskie: it has functions
[20:33:14] apeiros: protocols don't have functions
[20:33:21] ivanskie: https://www.google.ca/search?q=modbus+functions&ie=utf-8&oe=utf-8&gws_rd=cr&ei=CntNWZGVIsr0jwOEq7OYCw
[20:33:41] ivanskie: function code
[20:37:21] ivanskie: so when you request an inpur register. in either case you are going to received an array of these 16bit unsigned integers.
[20:37:55] apeiros: you're mixing topics
[20:38:01] apeiros: in rmodbus, yes
[20:38:03] apeiros: in modbus, no
[20:38:13] apeiros: in modbus, you'll just receive binary data
[20:38:31] apeiros: with multiples of 2 bytes, since you read a number of registers and one register is 2 bytes.
[20:39:47] ivanskie: sorry in my head i was keeping track of the topics. i apologize lol
[20:40:43] ivanskie: so why is read_input_registers do .unpack('n*')
[20:41:07] ivanskie: im assuming that it received it in hex
[20:41:18] apeiros: ACTION smacks ivanskie again
[20:41:25] judofyr: has joined #ruby
[20:41:25] apeiros: it did not receive hex. it received binary data.
[20:41:29] ivanskie: cause if we do .pack('n*') again we get a string of hex stuff /x00 etc
[20:41:42] apeiros: no, you don't get hex, you get binary data.
[20:41:53] ivanskie: why is it represented in hex
[20:41:57] apeiros: seriously, stop with that fucken hex. you're wrong. it's wrong. stop being wrong.
[20:42:19] nacsurte: anyone used prawnPDF before? i'm trying to output unicode characters - i loaded the OpenSans TTF font, wrote it out with render_file, but it's still showing up as blank glyphs
[20:42:20] apeiros: because there's no character in ascii to represent a byte consisting of "00000000"
[20:42:37] apeiros: hence ruby uses a hex escape sequence, as that's rather readable.
[20:42:47] ivanskie: [0, 30].pack('n*') == "\x00\x00\x00\x1E" -- i dont get this
[20:42:50] apeiros: >> "\x00" == 0.chr
[20:42:51] ruby[bot]: apeiros: # => true (https://eval.in/821633)
[20:43:05] ivanskie: ok that makes sense
[20:43:17] apeiros: ivanskie: how many bytes are in "\x00\x00\x00\x1E"?
[20:43:43] apeiros: what are the first 2 bytes?
[20:44:03] apeiros: no, that's their value interpreted as an integer
[20:44:15] apeiros: or, yes, thats …
[20:44:46] apeiros: and the last two bytes is "\x00\x1E", right?
[20:44:59] apeiros: and 1E in decimal is?
[20:45:20] apeiros: so how'd 500 look in 2 bytes?
[20:45:33] apeiros: how'd 255 look in 2 bytes?
[20:45:44] apeiros: in the string representation
[20:45:58] apeiros: that's only 1 byte
[20:46:18] apeiros: now how'd 256 look?
[20:46:35] apeiros: hint: after 99 it's not 199, it's 100
[20:47:00] ivanskie: left to right eh
[20:47:11] ivanskie: that'd fuck me up on an exam so quick
[20:47:16] apeiros: it's still wrong
[20:47:28] apeiros: "\x01\x00"
[20:47:30] elomatreb: That's endianess, sometimes it's MSB first, sometimes LSB first
[20:47:48] ivanskie: apeiros duh
[20:47:54] ivanskie: not what elomatreb said
[20:47:58] ivanskie: that i don't understand
[20:48:02] apeiros: because 0x01 == 1, 0x00 == 0 -> 1*256 + 0*0 = 256
[20:48:08] ivanskie: ACTION hasn't studied computer science
[20:48:33] ivanskie: 0x100 would be 256
[20:48:43] elomatreb: Some machines treat the first bit in a byte as the most significant, some as the least significat. Basically some read the number from left to right, some from right to left
[20:49:21] Papierkorb: Make sure that you understand it's really byte-wise, NOT bit-wise ^
[20:49:21] ivanskie: that explains it really well , thanks
[20:49:30] apeiros: base transformation is sum of: digit * base**position
[20:49:32] elomatreb: Papierkorb: Oh fak
[20:49:42] apeiros: assuming you count the position from right and start with 0 like any good programmer
[20:49:58] ivanskie: or how binary works
[20:50:01] apeiros: Papierkorb: there are nibble endians
[20:50:16] apeiros: haven't met one in the wild yet, though
[20:50:31] Papierkorb: apeiros: Thruth be told I've never encountered one, but there ought to be Middle-Endian too
[20:50:33] apeiros: nibble = 4 bits, half of a byte. for those who'd have to google :-p
[20:50:43] ivanskie: man this was quite a tangent
[20:51:01] elomatreb: To understand binary, you first have to understand the universe
[20:51:08] ivanskie: its always 42
[20:51:20] apeiros: actually, to understand an approximation of the universe, you have to understand binary ;-p
[20:51:22] Papierkorb: "There are 10 types of people, ..."
[20:51:38] apeiros: DEAD people can read hex.
[20:52:19] elomatreb: If you really want weird stuff understand base64
[20:52:25] ivanskie: i wrote some code to download register maps from 24 devices. each of the devices we have here breaks up a register map per unit id. so like 5 register maps per device. so i just combined it into one.
[20:52:46] ivanskie: did that to send register map to our DCIM vendor to create a device definitioin file into the Schneider DataCenter Expert tool.
[20:52:52] apeiros: I have no idea what a "register map" is supposed to be
[20:53:11] apeiros: nope. that did not actually increase my knowledge.
[20:53:26] ivanskie: register map is basically a csv (usually) file that defines each register for consumption
[20:53:50] ivanskie: "Parameter Name Display Name uid Base Address (0-based) Discrete Units Type Size (bytes) Is Timestamp Bit Offset Swap Bytes Swap Words Divider Multiplier Date Spec Alarm On False Writable Possible Values"
[20:54:15] elomatreb: I feel like you're missing the commas in that CSV, which are a fairly important component
[20:54:26] ivanskie: i copied and pasted from excel
[20:54:55] apeiros: so, a machine readable manual?
[20:55:02] ivanskie: This whole adventure into rmodbus gem, and understanding how pack works..
[20:55:05] apeiros: well, except for the "it was in excel originally" part
[20:55:23] ivanskie: was just so i can do a sanity check of the register map my code put together. and make sure the values are readable.
[20:55:31] ivanskie: because the vendor took it, and made something stupid with it
[20:55:37] apeiros: pack/unpack is really just a template for how to interpret bytes in binary data
[20:56:18] apeiros: "doing stupid things with stuff" is the default modus operandi of people.
[20:56:21] apeiros: expect more of it.
[20:56:59] ivanskie: this is what u guys were helping with: https://gist.github.com/i5okie/92bb21c6dc5009d28fccb1cae8655716
[20:58:16] ivanskie: was in the middle of replacing read_holding_maps with read input. cuz apparently in this device holding maps is only implemented for backwards compatibility, and really its stored in input registers.
[20:58:44] ivanskie: "The PDU/RPP/RPM registers are read using Modbus Function Codes (FC). For most PDU/RPP/RPM registers, FC 04 is used. For alarms, FC 02 is used. The PDU/RPP/RPM supports the following hex function codes:"
[20:59:00] ivanskie: enough of hex
[21:00:29] apeiros: ACTION smacks ivanskie again
[21:00:40] ivanskie: do u have some coffe?
[21:00:44] ivanskie: i need coffee
[21:00:47] apeiros: replace "hex" with "binary data" and you'd be almost always correct.
[21:00:48] elomatreb: All this violence
[21:00:55] apeiros: I'm not allowed to drink coffee.
[21:01:03] apeiros: don't like it anyway, so no big loss, though.
[21:01:23] ivanskie: ACTION changes name to hexinskie
[21:01:34] apeiros: ACTION smacks ivanskie again
[21:01:45] lbrewington: has joined #ruby
[21:01:50] apeiros: I'll make it a plugin in znc.
[21:01:59] apeiros: whenever ivanskie says "hex", it'll autosmack them.
[21:02:14] lbrewington: is there a community for rails?
[21:02:22] ivanskie: ruby_on_rails
[21:02:40] elomatreb: It's #RubyOnRails
[21:02:41] apeiros: #rubyonrails
[21:02:47] ivanskie: fuck im done
[21:02:47] lbrewington: thanks, the other one is very empty
[21:02:58] apeiros: that's because it's very wrong :o)
[21:03:08] lbrewington: the other one wont let me join :(
[21:03:17] apeiros: you have to be registered
[21:03:27] apeiros: with freenode, that is
[21:03:32] elomatreb: ./msg nickserv help
[21:03:48] ivanskie: http://i2.kym-cdn.com/photos/images/original/000/538/437/341.gif
[21:04:32] lbrewington: fuck the police
[21:04:40] ivanskie: tell that to radar
[21:05:22] ivanskie: i believe he's the mainteiner of #rubyonrails.. though i could be hex
[21:05:25] ivanskie: i mean wrong.
[21:05:27] apeiros: lbrewington: you can fuck with whomever you want, but that's #ruby-offtopic, so move it there.
[21:05:44] lbrewington: found the cop
[21:06:07] ivanskie: radar is god in here not rubyonrails
[21:06:52] ivanskie: maybe i should just write my own dcim
[21:07:27] weinstei1: has joined #ruby
[21:08:37] DoubleMalt: has joined #ruby
[21:08:51] ketan: has joined #ruby
[21:12:33] Cohedrin_: has joined #ruby
[21:24:46] nankyokusei: has joined #ruby
[21:24:50] mim1k: has joined #ruby
[21:26:30] ivanskie: really tho.. apeiros, havenwood thank u
[21:30:19] kolgomorov: has joined #ruby
[21:32:41] vuoto: has joined #ruby
[21:32:55] mim1k: has joined #ruby
[21:34:24] bkxd: has joined #ruby
[21:34:39] bkxd_: has joined #ruby
[21:35:48] meshsmith: has joined #ruby
[21:38:55] brent__: has joined #ruby
[21:41:34] mjain: has joined #ruby
[21:41:53] mjain: has left #ruby: ()
[21:43:53] Cohedrin_: has joined #ruby
[21:44:32] Pisuke: has joined #ruby
[21:46:23] behappy: has joined #ruby
[21:47:43] behappy: has left #ruby: ()
[21:49:25] skweek: has joined #ruby
[21:55:45] ascarter: has joined #ruby
[21:59:05] jackjackdripper: has joined #ruby
[22:01:12] judofyr: has joined #ruby
[22:01:45] Puffball: has joined #ruby
[22:05:01] kobain: has joined #ruby
[22:07:33] Rodya_: has joined #ruby
[22:08:35] vincent_: has joined #ruby
[22:09:51] MrBusiness: has joined #ruby
[22:15:44] postmodern: has joined #ruby
[22:21:28] ornerymoose: has joined #ruby
[22:24:57] Puffball: has joined #ruby
[22:27:43] jenrzzz_: has joined #ruby
[22:28:44] Cohedrin_: has joined #ruby
[22:31:46] ur5us: has joined #ruby
[22:33:30] brent__: has joined #ruby
[22:34:30] mim1k: has joined #ruby
[22:35:05] chef3000: I am trying to install curb gem on my windows box and I get Failed to build gem native extension
[22:35:10] chef3000: also checking for curl-config... no checking for main() in -lcurl... no
[22:35:32] chef3000: I do not see clear instructions on how to get those requirements installed in Win 8
[22:38:37] havenwood: Chef3000: The curb gem uses libcurl. Have you installed libcurl?
[22:39:45] chef3000: I couldnt find instructions on installing that in windows
[22:39:54] havenwood: Chef3000: https://curl.haxx.se/dlwiz/?type=lib
[22:43:05] havenwood: Chef3000: You're welcome. You'll then need to use --with-curl-lib and point to the libcurl you installed, something like: gem install curb -- --with-curl-lib=C:...
[22:44:13] havenwood: Chef3000: Windows 10 has a nice linux subsystem that makes these issues just go away since you can use bash directly.
[22:44:37] havenwood: Chef3000: Check out the WSL (Windows Subsystem for Linux) if you ever update to Win 10.
[22:44:50] havenwood: Chef3000: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
[22:45:03] chef3000: thank you very much
[22:45:09] havenwood: you're welcome, any time
[22:52:19] ResidentBiscuit: has joined #ruby
[22:53:59] hxegon: has joined #ruby
[23:00:28] jenrzzz: has joined #ruby
[23:02:12] judofyr: has joined #ruby
[23:06:39] hahuang65: has joined #ruby
[23:08:15] herbmillerjr: has joined #ruby
[23:08:29] brent__: has joined #ruby
[23:09:42] ketan: has joined #ruby
[23:12:13] zacts: has joined #ruby
[23:13:46] blackwind_123: has joined #ruby
[23:23:02] ResidentBiscuit: has joined #ruby
[23:32:07] blackwind_123: has joined #ruby
[23:39:06] cschneid_: has joined #ruby
[23:45:01] chouhoulis: has joined #ruby
[23:45:07] Cohedrin_: has joined #ruby
[23:49:37] Cohedrin_: has joined #ruby
[23:50:10] cam27: has joined #ruby
[23:51:46] blackwind_123: has joined #ruby
[23:55:19] raspado: has joined #ruby
[23:59:14] Rodya_: has joined #ruby