« Back to channel list

#ruby - 22 March 2017

« Back 1 day Forward 1 day »
[00:00:00] roamingdog: has joined #ruby
[00:00:50] roamingdog: has joined #ruby
[00:09:00] enterprisey: has joined #ruby
[00:10:29] nobitanobi: has joined #ruby
[00:15:03] var_somebody: has joined #ruby
[00:17:04] gloscombe: has joined #ruby
[00:18:37] roamingdog: has joined #ruby
[00:20:07] edliss: has joined #ruby
[00:25:35] aeon: has joined #ruby
[00:26:04] postmodern: has joined #ruby
[00:28:32] JeanCarloMachado: has joined #ruby
[00:33:32] cagomez: has joined #ruby
[00:34:21] livcd: has joined #ruby
[00:34:28] mim1k: has joined #ruby
[00:34:30] GSilva: has joined #ruby
[00:34:45] raspado_: has joined #ruby
[00:34:50] enterprisey: has joined #ruby
[00:35:42] raspado_: has joined #ruby
[00:35:49] GSilva: has joined #ruby
[00:40:25] GSilva: has joined #ruby
[00:42:08] roamingdog: has joined #ruby
[00:42:47] ElDoggo: has joined #ruby
[00:42:56] roamingdog: has joined #ruby
[00:43:30] milardovich: has joined #ruby
[00:43:44] roamingdog: has joined #ruby
[00:44:33] roamingdog: has joined #ruby
[00:47:09] JeanCarloMachado: has joined #ruby
[00:48:27] bkxd: has joined #ruby
[00:49:16] cibs: has joined #ruby
[00:53:24] lacrymology: has joined #ruby
[00:55:28] al2o3-cr: has joined #ruby
[00:56:36] naprimer: has joined #ruby
[00:56:53] chrickso: has joined #ruby
[00:59:17] rgr: has joined #ruby
[01:00:32] rgr: has joined #ruby
[01:01:41] grant: has joined #ruby
[01:03:19] Asher1: has joined #ruby
[01:03:46] __Yiota: has joined #ruby
[01:04:16] Asher: has joined #ruby
[01:05:59] Lord_of_Life: has joined #ruby
[01:09:12] certainty: has joined #ruby
[01:09:48] jenrzzz: has joined #ruby
[01:10:29] __Yiota: has joined #ruby
[01:13:27] Silthias: has joined #ruby
[01:23:39] johnzorn: has joined #ruby
[01:25:07] JoshS: has joined #ruby
[01:27:33] Derperperd: has joined #ruby
[01:33:18] chouhoulis: has joined #ruby
[01:35:27] bastrud: has joined #ruby
[01:36:15] Derperperd: has joined #ruby
[01:38:24] brent__: has joined #ruby
[01:40:40] harfangk: has joined #ruby
[01:41:54] gloscombe: has joined #ruby
[01:44:12] rwb: has joined #ruby
[01:46:09] roamingdog: has joined #ruby
[01:49:15] bkxd: has joined #ruby
[01:49:38] __Yiota: has joined #ruby
[01:51:11] duderonomy: has joined #ruby
[01:54:31] JeanCarloMachado: has joined #ruby
[01:54:33] Asher: has joined #ruby
[02:02:10] cibs: has joined #ruby
[02:02:18] enterprisey: has joined #ruby
[02:08:42] milardovich: has joined #ruby
[02:09:56] Jameser: has joined #ruby
[02:12:56] hutch34: has joined #ruby
[02:14:26] ElDoggo: has joined #ruby
[02:18:17] d^sh: has joined #ruby
[02:19:14] stupidsenpai: has joined #ruby
[02:19:37] stupidsenpai: What's the most popular thing built with ruby?
[02:19:51] Nilium: Product or just thing in general?
[02:20:23] Radar: stupidsenpai: https://github.com/rails/rails
[02:20:33] Radar: Arguably.
[02:20:45] Nilium: Could also say Twitter, but they're not entirely Ruby now
[02:20:57] Nilium: Believe GitHub's still mostly Rails
[02:21:11] Nilium: GitLab's mostly rails with some of the CI and HTTP bits relegated to Go
[02:22:03] Nilium: I wonder if rails being in them makes rails the most popular thing or if the popular things made with rails are most popular
[02:22:22] Nilium: Next time on the philosophy channel
[02:24:12] stupidsenpai: What is the best way to learn rails?
[02:24:32] stupidsenpai: I mean how should one tackle learning a framework if they never learned a framework before
[02:25:27] marsjaninzmarsa: has joined #ruby
[02:26:29] ruby[bot]: Rails 4 in Action - The best Ruby on Rails tutorial that money can buy - https://www.manning.com/books/rails-4-in-action
[02:26:45] Nilium: Couldn't really say, never used it. Radar's suggestion is probably a good one.
[02:27:00] Radar: I wrote that book so I am a little biased.
[02:27:29] nofxx: stupidsenpai, better learn ruby first
[02:27:44] Nilium: Well, the positive implication is that you at least know enough about what you're saying to write about it
[02:27:56] Nilium: Or think you know enough to write about it
[02:28:12] Nilium: Also known as the why-I-don't-blog excuse
[02:28:56] stupidsenpai: Radar that's amazing you wrote a book
[02:29:10] Radar: I've written 4
[02:29:13] stupidsenpai: But it sucks that rails is on version 5 now
[02:29:27] Radar: not much difference between the two
[02:29:29] nofxx: 4 <> 5 same
[02:29:47] stupidsenpai: Can you write a book about how to learn new frameworks or will that completely kill the secrets and make book writing less profitable?
[02:29:48] nofxx: not true for 3 > 4 or 2 > 3 ... tho
[02:30:06] Radar: stupidsenpai: How do you eat an elephant?
[02:32:12] ahrs: has joined #ruby
[02:34:22] skweek: has joined #ruby
[02:35:03] c137: has joined #ruby
[02:35:12] mim1k: has joined #ruby
[02:38:09] sleetdrop: has joined #ruby
[02:39:11] allisio: How does an elephant eat you?
[02:40:54] stupidsenpai: Elephants are herbivores
[02:41:09] stupidsenpai: Unless you're a plant
[02:41:13] stupidsenpai: You won't get eaten
[02:41:27] stupidsenpai: Why are elephants so big when all they do is eat fucking grass
[02:42:22] ElDoggo: has joined #ruby
[02:43:05] stupidsenpai: My iPhone is autocorrecting to expletives because of all the expletives I've used with friends lol
[02:43:06] nofxx: not true, they like fruits...
[02:43:14] stupidsenpai: Fruits are grass
[02:43:15] statelesscode: has joined #ruby
[02:43:22] stupidsenpai: Plants are grass
[02:43:27] stupidsenpai: They live in the ground
[02:44:29] stupidsenpai: I think I might be a bisex
[02:44:35] nofxx: not true, grass is green, you need that ruminate thing feat cows have
[02:44:48] nofxx: do elephants have? heh
[02:44:54] stupidsenpai: I never liked men before but now I find men attractive
[02:45:04] stupidsenpai: I'm in my 20s
[02:45:18] nofxx: wrong chan, try #python
[02:45:27] stupidsenpai: I just became bisexual today
[02:45:29] mwlang: uh…wrong channel, dude.
[02:45:44] stupidsenpai: Omg this is the wrong window
[02:45:49] mwlang: tweet it. There’s a world out there that wants to know, I’m sure.
[02:46:00] ElDoggo: has joined #ruby
[02:46:17] edliss: has joined #ruby
[02:46:22] astrobunny: has joined #ruby
[02:46:53] roamingdog: has joined #ruby
[02:49:08] ElDoggo: has joined #ruby
[02:50:14] allisio: nofxx: Brutal.
[02:50:31] astrobunny: has joined #ruby
[02:55:56] mim1k: has joined #ruby
[02:57:55] racest: has joined #ruby
[02:58:52] choke: has joined #ruby
[03:00:32] Pumukel: has joined #ruby
[03:00:57] sleetdrop: has joined #ruby
[03:01:29] Channel6: has joined #ruby
[03:02:04] mcantor: has joined #ruby
[03:02:56] Pumukel: has joined #ruby
[03:03:50] skweek: has joined #ruby
[03:07:21] libastral: has joined #ruby
[03:20:00] babykosh: has joined #ruby
[03:20:07] bkxd: has joined #ruby
[03:21:53] electrostat: has joined #ruby
[03:28:10] bastrud: has joined #ruby
[03:28:17] cagomez: has joined #ruby
[03:29:34] chagel: has joined #ruby
[03:34:33] Asher: has joined #ruby
[03:36:51] howdoi: has joined #ruby
[03:38:53] certainty: has joined #ruby
[03:43:22] hutch34: has joined #ruby
[03:47:42] roamingdog: has joined #ruby
[03:47:44] ElDoggo: has joined #ruby
[03:51:24] paul374: has joined #ruby
[03:51:40] djbkd: has joined #ruby
[03:52:38] skweek: has joined #ruby
[03:54:38] roamingdog: has joined #ruby
[03:55:59] milardovich: has joined #ruby
[03:56:42] igniting: has joined #ruby
[04:01:03] postmodern: has joined #ruby
[04:05:49] jud: has joined #ruby
[04:09:18] astrobunny: has joined #ruby
[04:10:29] xenops: has joined #ruby
[04:11:17] jdm: has joined #ruby
[04:11:45] roamingdog: has joined #ruby
[04:12:03] nobitanobi: has joined #ruby
[04:12:08] rhyselsmore: has joined #ruby
[04:12:30] roamingdog: has joined #ruby
[04:13:20] roamingdog: has joined #ruby
[04:14:07] roamingdog: has joined #ruby
[04:15:40] jeyraof^mbpr: has joined #ruby
[04:22:49] roflmyeggo: has joined #ruby
[04:22:58] gix: has joined #ruby
[04:23:05] bocaneri: has joined #ruby
[04:27:00] bocaneri: has joined #ruby
[04:33:17] astrobunny: has joined #ruby
[04:38:34] skweek: has joined #ruby
[04:46:13] astrobunny: has joined #ruby
[04:48:34] astrobunny: has joined #ruby
[04:49:32] claw: has joined #ruby
[04:51:25] babykosh: has joined #ruby
[05:05:48] bkxd: has joined #ruby
[05:06:31] anisha: has joined #ruby
[05:07:58] foul_owl: has joined #ruby
[05:08:08] foul_owl: Hi folks. Getting `initialize': not in gzip format trying to do "berks install"
[05:11:14] xenops: has joined #ruby
[05:12:03] mim1k: has joined #ruby
[05:13:56] hutch34: has joined #ruby
[05:15:05] moei: has joined #ruby
[05:15:30] roamingdog: has joined #ruby
[05:16:54] grant: has joined #ruby
[05:23:33] excel-nc17: has joined #ruby
[05:24:08] muelleme: has joined #ruby
[05:24:38] edliss: has joined #ruby
[05:24:52] astrobunny: has joined #ruby
[05:25:20] CloCkWeRX: has joined #ruby
[05:28:03] excel-nc17: Hello. I'm fairly new to ruby so I hope this question is okay. In learning about ruby it seems that there was once support for something called WIN32OLE that allowed ruby to function as a scripting language for MS Office. As far as I can tell currently that functionality is crippled in two ways (no x64 support, no Office360 support) and I am wondering if there are any projects to restore functionality for these issues?
[05:30:21] skweek: has joined #ruby
[05:30:38] xall: has joined #ruby
[05:31:45] baweaver: excel-nc17: not that I know of. Have you checked in their Github repos?
[05:33:06] excel-nc17: baweaver: No. Good idea, I should have thought of that.
[05:34:05] mim1k: has joined #ruby
[05:34:07] cagomez: has joined #ruby
[05:38:07] renchan: has joined #ruby
[05:38:33] sleetdrop: has joined #ruby
[05:41:25] LiquidInsect: has joined #ruby
[05:42:39] brent__: has joined #ruby
[05:47:13] muelleme: has joined #ruby
[05:47:18] MicaFox[m]: has joined #ruby
[05:47:39] rippa: has joined #ruby
[05:53:08] excel-nc17: baweaver: It appears that there is some x64 support (as in the extension will talk to x64 windows) but it is less clear if it will *then* talk to 64bit versions of Office. I will have to do some experimenting.
[05:56:11] excel-nc17: baweaver: As for Office 365 that is much more murky. It seems there are two tools for this. One is called the Office365 API and the other is something called Microsoft Graph but the documentation on these will take some digging to find out if they offer the same granular level of control that WIN32OLE did.
[05:56:17] edliss: has joined #ruby
[05:57:57] excel-nc17: baweaver: Thanks for the suggestion to check the repos, very helpful.
[05:58:08] astrobunny: has joined #ruby
[06:00:15] JoshS: has joined #ruby
[06:03:08] nofxxx: has joined #ruby
[06:05:30] edliss: has joined #ruby
[06:06:31] bkxd: has joined #ruby
[06:09:31] certainty: has joined #ruby
[06:11:27] dionysus69: has joined #ruby
[06:13:58] jenrzzz: has joined #ruby
[06:13:58] jenrzzz: has joined #ruby
[06:19:21] ChickeNES: Anyone know of a library for parsing ruby that's not itself in ruby? I wanted to experiment with writing my own ruby implementation but would love to skip writing the parser portion if possible. I've tried google but all I've found so far has been libraries for writing parsers in ruby, or ruby parsers also written in ruby.
[06:20:57] Hobbyboy: has joined #ruby
[06:24:13] astrobunny: has joined #ruby
[06:25:06] edliss: has joined #ruby
[06:27:58] Gadgetoid: has joined #ruby
[06:30:55] aryaching: has joined #ruby
[06:31:53] ammar: has joined #ruby
[06:32:15] igniting: has joined #ruby
[06:44:24] hutch34: has joined #ruby
[06:44:28] aufi: has joined #ruby
[06:50:28] jenrzzz: has joined #ruby
[06:50:49] aryaching: has joined #ruby
[06:54:04] raspado: has joined #ruby
[06:56:35] lheaded: has joined #ruby
[06:57:22] anisha: has joined #ruby
[07:01:58] tristanp: has joined #ruby
[07:03:02] last_staff: has joined #ruby
[07:08:20] skweek: has joined #ruby
[07:09:16] rhyselsmore: has joined #ruby
[07:10:39] jgnagy: has joined #ruby
[07:15:33] electrostat: has joined #ruby
[07:17:22] agit0: has joined #ruby
[07:21:25] patarr: has joined #ruby
[07:22:15] bkxd: has joined #ruby
[07:23:04] edliss: has joined #ruby
[07:23:54] astrobunny: has joined #ruby
[07:25:22] DaniG2k: has joined #ruby
[07:25:55] jenrzzz: has joined #ruby
[07:25:59] jenrzzz: has joined #ruby
[07:29:16] spicerack: has joined #ruby
[07:29:22] jamesaxl: has joined #ruby
[07:30:26] igniting: has joined #ruby
[07:37:02] edliss_: has joined #ruby
[07:42:02] jenrzzz: has joined #ruby
[07:42:02] jenrzzz: has joined #ruby
[07:44:34] conta: has joined #ruby
[07:47:15] Mortomes|Work: has joined #ruby
[07:48:12] certainty: has joined #ruby
[07:53:02] vali: has joined #ruby
[07:53:08] conta: has joined #ruby
[07:53:51] lightheaded: has joined #ruby
[07:53:53] tAn: has joined #ruby
[07:57:43] cibs: has joined #ruby
[07:58:47] FooMunki: has joined #ruby
[08:03:21] govg: has joined #ruby
[08:06:45] biberu: has joined #ruby
[08:06:55] conta: has joined #ruby
[08:07:44] kreantos: has joined #ruby
[08:08:29] siovene: has joined #ruby
[08:10:04] Asher: has joined #ruby
[08:11:13] dionysus69: has joined #ruby
[08:11:45] andikr: has joined #ruby
[08:12:07] vali: has joined #ruby
[08:12:25] cfec0b8d: has joined #ruby
[08:13:33] nobitanobi: has joined #ruby
[08:14:32] aganov: has joined #ruby
[08:14:52] hutch34: has joined #ruby
[08:16:20] nobitanobi: has joined #ruby
[08:16:31] anisha: has joined #ruby
[08:21:36] Pumukel: has joined #ruby
[08:24:02] mark_66: has joined #ruby
[08:24:29] teclator: has joined #ruby
[08:27:04] jaequery: has joined #ruby
[08:28:21] tvw: has joined #ruby
[08:28:24] antgel: has joined #ruby
[08:28:40] agit0: has joined #ruby
[08:30:04] Arpanet69: has joined #ruby
[08:32:10] lightheaded: has joined #ruby
[08:36:02] araujo: has joined #ruby
[08:36:06] olivier__: has joined #ruby
[08:36:25] foul_owl: has joined #ruby
[08:38:39] roamingdog: has joined #ruby
[08:39:27] nobitano_: has joined #ruby
[08:42:01] Mia: has joined #ruby
[08:42:01] Mia: has joined #ruby
[08:48:30] SleepySensei: has joined #ruby
[08:48:53] astrobunny: has joined #ruby
[08:48:55] Bish: ChickeNES: well i guess MRI parses ruby in c :D
[08:49:28] Bish: maybe look at the other implementations of ruby, truffleruby or whats it's called? maybe they write it in another language
[08:49:33] Bish: maybe it's ruby, too though
[08:50:58] FooMunki: has joined #ruby
[08:51:16] Bish: unfortunately ruby people tend to write their tools in ruby :o
[08:52:38] nowhereman: has joined #ruby
[08:54:58] jaruga: has joined #ruby
[08:55:38] jaruga: has joined #ruby
[08:57:46] newrubycoder: has joined #ruby
[08:58:30] pandaant: has joined #ruby
[09:02:03] Pumukel: has joined #ruby
[09:03:11] herwin: ChickeNES: you could try to reuse parse.y from the ruby source tree
[09:03:23] lightheaded: has joined #ruby
[09:03:40] mikecmpbll: has joined #ruby
[09:06:35] mim1k: has joined #ruby
[09:09:24] FooMunki: has joined #ruby
[09:09:26] jenrzzz: has joined #ruby
[09:09:26] jenrzzz: has joined #ruby
[09:09:31] marr: has joined #ruby
[09:09:58] certainty: has joined #ruby
[09:13:19] zeroDi: has joined #ruby
[09:13:55] Derperperd: has joined #ruby
[09:15:03] mim1k: has joined #ruby
[09:16:45] Asher: has joined #ruby
[09:20:49] dionysus69: has joined #ruby
[09:21:17] jsrn_: has joined #ruby
[09:22:16] patarr: has joined #ruby
[09:22:45] maloik: has joined #ruby
[09:23:07] bkxd: has joined #ruby
[09:24:46] ayonkhan: has joined #ruby
[09:25:39] tomphp: has joined #ruby
[09:28:41] lightheaded: has joined #ruby
[09:31:28] cfec0b8d: has joined #ruby
[09:31:34] maattdd: has joined #ruby
[09:32:04] cuqfye: has joined #ruby
[09:36:08] znz_jp: has joined #ruby
[09:37:46] Silthias1: has joined #ruby
[09:39:52] roamingdog: has joined #ruby
[09:39:57] Beams: has joined #ruby
[09:45:26] hutch34: has joined #ruby
[09:47:58] bpmedley: has joined #ruby
[09:48:47] snickers: has joined #ruby
[09:49:02] Bish: haha mri code is one of the ugliest to read there is
[09:49:23] kent\n: has joined #ruby
[09:50:57] toretore: has joined #ruby
[09:53:16] nobitanobi: has joined #ruby
[09:55:59] shamrock: has joined #ruby
[09:56:34] jaruga: has joined #ruby
[09:57:31] burgestrand: has joined #ruby
[09:57:36] lxsameer: has joined #ruby
[09:59:12] flying: has joined #ruby
[09:59:48] brent__: has joined #ruby
[10:02:53] Silthias: has joined #ruby
[10:09:32] andikr: has joined #ruby
[10:10:39] doublemalt__: has joined #ruby
[10:13:56] bigkevmcd: has joined #ruby
[10:15:11] workmad3: has joined #ruby
[10:15:59] Fernando-Basso: has joined #ruby
[10:21:45] hutch34: has joined #ruby
[10:22:28] rikkipitt: has joined #ruby
[10:22:28] FooMunki: has joined #ruby
[10:23:55] bkxd: has joined #ruby
[10:26:45] certainty: has joined #ruby
[10:29:20] aufi: has joined #ruby
[10:33:54] dlitvak: has joined #ruby
[10:34:29] certainty: has joined #ruby
[10:38:39] duckpuppy: has joined #ruby
[10:50:53] GeorgesLeYeti: has joined #ruby
[10:51:47] GeorgesLeYeti: I need help with nokogiri. I want to return the content and nodes of a specific node. For exemple: html = Nokogiri::HTML("<test>Does. <br/><br/> </test>")
[10:52:07] fergal: has joined #ruby
[10:52:09] GeorgesLeYeti: I want to return Does. <br/><br/>
[10:52:36] GeorgesLeYeti: But if i make html.xpath(".//test").first.content It only return the text Does.
[10:58:03] canton7: GeorgesLeYeti, .inner_htm, I think
[10:58:13] canton7: (although it returns 'Does. <br><br>', i.e. it's normalized those br's)
[10:58:55] GeorgesLeYeti: canton7, TY A LOT ! :D
[10:59:23] canton7: GeorgesLeYeti, (I scanned through http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Element until I found something which looked likely)
[11:03:03] ferr1: has joined #ruby
[11:08:16] vuoto: has joined #ruby
[11:08:38] shamrock: has joined #ruby
[11:10:48] shamrock: has joined #ruby
[11:12:04] fkostovski: has joined #ruby
[11:18:34] herbert_einstein: has joined #ruby
[11:18:45] Fernando-Basso: has joined #ruby
[11:20:30] herbert_einstein: Hi, does anyone have a solution to interact with dropdow lists ( option with value )? I have tried most of the cases provided on the web without any success, I would prefer to do it without gems or with mechanize
[11:22:50] patarr: has joined #ruby
[11:27:17] fkostovski: selenium is a good choice for scraping data from the web
[11:27:45] tdy: has joined #ruby
[11:29:34] herbert_einstein: Selenium is a web-driver but unfortunately it also did not work, even if i cleared the option value first
[11:29:52] herbert_einstein: I am trying to fill out forms automatically
[11:31:44] fkostovski: have you tried to just open irb and go that from there, that is how i am approaching when i want to try something out, clicking, selecting stuff and make sure that it works ?
[11:32:06] fkostovski: it is a sweet experience
[11:32:36] fkostovski: just fire irb and watch the browser open, and do things interactively
[11:32:56] herbert_einstein: Not yet, I have requested page uri, after evety steps. It stucked all the time when it had to set the option value
[11:35:33] cagomez: has joined #ruby
[11:36:12] hutch34: has joined #ruby
[11:36:25] cfec0b8d: has joined #ruby
[11:39:37] JeanCarloMachado: has joined #ruby
[11:40:46] ldnunes: has joined #ruby
[11:49:28] Qchmqs: has joined #ruby
[11:50:42] newrubycoder: A3e57zhphgfjkl
[11:51:43] rikkipitt: has joined #ruby
[11:53:09] fkostovski: has joined #ruby
[11:53:10] canton7: might want to change your password ;)
[11:53:26] __Yiota: has joined #ruby
[11:56:07] fkostovski: has left #ruby: ()
[11:56:16] fkostovski: has joined #ruby
[11:56:31] newrubycoder: well its for my runescape account anyways
[11:56:49] synthroid: has joined #ruby
[11:57:20] centrx: has joined #ruby
[11:59:52] mzo: has joined #ruby
[11:59:58] HoierM: has joined #ruby
[12:02:12] burgestrand: has joined #ruby
[12:03:25] fergal: hi guys. i want to persist some state between runs of my application. yaml::dump/load works somewhat, but loading in the state fails when it encounters IO/Procs. is there a way to tell yaml dump to skip persisting of IO/Procs? or is there another way to persist data that supports IO/Procs? i know that i can implement encode_with to omit named instance vars, but is possible to have a universal encode_with that omits types? i.e. IO/Procs?
[12:03:25] nobitanobi: has joined #ruby
[12:03:56] esObe_: has joined #ruby
[12:05:23] toretore: why are they in the data you're trying to persist in the first place?
[12:08:27] fergal: toretore: because one of my objects uses an ssh connection which is a netssh instance which has a proc
[12:09:35] hutch34: has joined #ruby
[12:09:54] toretore: again, why is it in the data you're trying to persist?
[12:13:40] fkostovski: has joined #ruby
[12:14:15] zapata: has joined #ruby
[12:15:06] mitrek: has joined #ruby
[12:16:15] mitrek: Why I often see in job oportunities, knowledge in 'python OR ruby'. Are they that similar?
[12:16:57] erebel55: has joined #ruby
[12:17:43] erebel55: how can I specify the full path to my curl exe in my ruby file? I tried `C:\cygwin64\bin\curl http://google.com` but that didn't work
[12:17:54] erebel55: I know I can add it to path, but I'm trying to do it without that
[12:18:07] toretore: erebel55: that doesn't make any sense. gist your code?
[12:19:10] erebel55: that is my code
[12:19:11] erebel55: https://hastebin.com/ayecewuqiy.rb
[12:20:27] erebel55: it gives me an invalid argument error
[12:21:20] araujo: has joined #ruby
[12:21:26] erebel55: https://gist.github.com/erebel55/49bbc620ff1245fe332cfc9a28493ffa
[12:23:26] toretore: system('C:\\cygwin64\\bin\\curl', 'http://google.com')
[12:23:27] jeyraof^mbpr: has joined #ruby
[12:24:38] bkxd: has joined #ruby
[12:25:34] erebel55: now the real curl I'm trying to do looks like this
[12:25:37] erebel55: `curl -X POST -d "#{data}" #{POST_URL}`
[12:30:23] Jameser: has joined #ruby
[12:31:34] maloik: has joined #ruby
[12:33:11] erebel55: toretore, how do I specify the -X POST -d stuff with system?
[12:33:25] erebel55: would that all be in the first argument?
[12:34:57] hutch34: has joined #ruby
[12:35:33] synthroid: has joined #ruby
[12:38:24] erebel55: hm this runs but it's not actually putting the data, so I must have messed something up
[12:38:26] erebel55: https://hastebin.com/iqowomahiy.rp
[12:42:59] gaussblurinc1: has joined #ruby
[12:43:30] gaussblurinc1: Hi! I would like to know which fields are included by default in fresh created model in rails? ( ActiveRecord )
[12:48:08] kassav_: has joined #ruby
[12:49:17] erebel55: okay this works
[12:49:18] erebel55: `C:\\cygwin64\\bin\\curl -X POST -d '#{data}' '#{POST_URL}'`
[12:49:30] erebel55: thanks guys
[12:49:50] cdg: has joined #ruby
[12:49:50] herwin: until data contains a '
[12:49:57] herwin: then suddenly everything breaks
[12:49:58] __Yiota: has joined #ruby
[12:50:39] Jameser: has joined #ruby
[12:51:45] gaussblurinc1: erebel55: windows for coding :/
[12:51:59] erebel55: yeah not the best
[12:52:41] certainty: has joined #ruby
[12:52:58] erebel55: how could I protect it from breaking via '
[12:53:01] agent_white: has joined #ruby
[12:53:16] herwin: is there any reason to have a dependency on curl, cygwin and a hardcoded path
[12:53:25] herwin: instead of using Net::HTTP
[12:53:41] herwin: or any other http lib
[12:54:23] gaussblurinc1: or use Heavy Machine Gun "Faraday" if we are talking about ruby
[12:54:56] agent_white: Mornin' folks
[12:55:03] cdg: has joined #ruby
[12:56:07] nobitanobi: has joined #ruby
[12:56:42] rikkipitt: has joined #ruby
[12:57:57] nobitano_: has joined #ruby
[12:59:54] fkostovski: has joined #ruby
[13:00:25] lightheaded: has joined #ruby
[13:01:47] lightheaded: has joined #ruby
[13:02:16] ramortegui: has joined #ruby
[13:03:48] aupadhye: has joined #ruby
[13:03:52] Derperperd: has joined #ruby
[13:06:23] anisha: has joined #ruby
[13:09:09] erebel55: okay converted to Net::HTTP
[13:09:23] erebel55: still have a dependency on cacert.pem and SSL_CERT_FILE
[13:10:00] rikkipitt: has joined #ruby
[13:10:43] Jameser: has joined #ruby
[13:10:58] erebel55: wonder why curl wasn't needing that
[13:11:51] lacrymology: has joined #ruby
[13:12:42] jgnagy: has joined #ruby
[13:13:55] TomyWork: has joined #ruby
[13:14:33] sepp2k: has joined #ruby
[13:15:47] erebel55: is there anyway to do Net:HTTP with https without requiring this cert?
[13:17:23] oz: has joined #ruby
[13:18:14] roamingdog: has joined #ruby
[13:18:30] tvw: has joined #ruby
[13:19:58] GodFather: has joined #ruby
[13:22:18] mnemon: erebel55: you can disable the certificate verification or feed it a proper cert store, iirc you can use the windows one too. curl uses the system (ca)certs.
[13:22:36] Pumukel: has joined #ruby
[13:24:55] charliesome: has joined #ruby
[13:25:27] erebel55: yeah that worked
[13:26:32] matthewd: Turning off certificate validation is basically equivalent to using HTTP
[13:27:52] millerti: has joined #ruby
[13:28:07] ozcanesen: has joined #ruby
[13:28:53] erebel55: yeah posting to the http directly isn't working with the slack web hook stuff
[13:29:01] erebel55: it wants me to go to the https url
[13:29:17] erebel55: but it works when I turn off the cert validation via OpenSSL::SSL::VERIFY_NONE
[13:29:40] bmurt: has joined #ruby
[13:29:47] mnemon: What he meant is that even if you use https url the data can be intercepted and modified quite easily unlike with https with cert validation.
[13:29:58] erebel55: right, that makes sense
[13:30:28] mnemon: with verify_none you're only protected from middle of the session attacks, not from proxies that mitm the handshake.
[13:30:31] nettoweb: has joined #ruby
[13:31:05] DLSteve: has joined #ruby
[13:32:58] ElDoggo: has joined #ruby
[13:34:05] chouhoulis: has joined #ruby
[13:35:10] nowhereman: has joined #ruby
[13:35:13] ddffg: has joined #ruby
[13:35:19] roamingdog: has joined #ruby
[13:38:54] darix: erebel55: maybe instead of trying to turn it off ... you should find out *why* it is failing?
[13:39:04] darix: erebel55: which url do you post to?
[13:39:35] erebel55: I got it working with it on too. I just had to download a cert and add it to my path
[13:40:25] erebel55: https://curl.haxx.se/ca/cacert.pem
[13:42:08] baked__beans: has joined #ruby
[13:43:28] mitrek: is there a more succint way of writing this: if mylist.include(value); do stuff; end
[13:43:33] Jameser: has joined #ruby
[13:44:06] mitrek: (woops, i forgot a '?' after the include)
[13:44:18] matthewd: mitrek: "if" seems pretty succinct to me
[13:44:44] burgestrand: mitrek ruby allows trailing if's
[13:44:55] burgestrand: >> "Hello" if false
[13:44:57] ruby[bot]: Burgestrand: # => nil (https://eval.in/759028)
[13:45:00] ramortegui: has joined #ruby
[13:45:55] haylon: has joined #ruby
[13:48:27] mitrek: let me rephrase my question, are there other good and succint ways to check for a substring in a string or a value inside an array?
[13:48:56] mitrek: besides the .inside method
[13:49:14] mitrek: .include*
[13:49:29] cdg: has joined #ruby
[13:50:32] certainty: has joined #ruby
[13:50:46] Jameser: has joined #ruby
[13:51:06] shinnya: has joined #ruby
[13:51:08] tomphp: has joined #ruby
[13:51:17] matthewd: For a string, you can use =~
[13:51:54] lbernardelli: has joined #ruby
[13:52:14] raul782: has joined #ruby
[13:53:11] mitrek: >> print 'yes' if 'ye' =~ 'yes'
[13:53:12] ruby[bot]: mitrek: # => type mismatch: String given (TypeError) ...check link for more (https://eval.in/759037)
[13:53:46] Derperpe1: has joined #ruby
[13:54:26] gnufied: has joined #ruby
[13:54:56] matthewd: include? exists because it is a clear way of expressing something; given more context, there might be another option, but with nothing but a method name (you're even mixing receivers), you're unlikely to get much IMO
[13:55:15] Silthias: has joined #ruby
[13:56:01] gaussblurinc1: has joined #ruby
[13:56:07] matthewd: Yeah.. that's not how =~ works. If you want something with the exact semantics of include?, no, it doesn't have an alias.
[13:57:02] mitrek: but anyway, how does =~ work?
[13:57:07] matthewd: String#[] comes close, but that's terse, not succinct
[13:57:23] matthewd: It wants a Regexp
[13:57:31] stoffus: has joined #ruby
[13:57:31] Guest16174: has joined #ruby
[13:57:35] matthewd: >> print 'yes' if 'yes' =~ /ye/
[13:57:37] ruby[bot]: matthewd: # => yesnil (https://eval.in/759038)
[13:58:56] matthewd: >> ["yes"["ye"], "no"["ye"]]
[13:58:57] ruby[bot]: matthewd: # => ["ye", nil] (https://eval.in/759044)
[13:59:16] workmad3: has joined #ruby
[14:00:04] lightheaded: has joined #ruby
[14:00:30] mitrek: thank you, that's the kind of examples that I was looking for
[14:00:33] arooni: has joined #ruby
[14:02:50] olivier__: has joined #ruby
[14:03:14] teddysmoker: has joined #ruby
[14:05:39] canton7: has joined #ruby
[14:08:06] chopin: has joined #ruby
[14:08:54] flashbang: has joined #ruby
[14:09:21] dviola: has joined #ruby
[14:09:36] skweek: has joined #ruby
[14:10:36] bkxd: has joined #ruby
[14:11:29] kreantos: has joined #ruby
[14:14:18] matthewd: mitrek: The answers if you're golfing are pretty different from the answers if you're writing something someone has to read
[14:14:33] pulkit4tech: has joined #ruby
[14:17:23] patarr: has joined #ruby
[14:19:37] dminuoso: Curious about your opinion folks. Do you consider something like map to be a higher order function?
[14:20:03] dminuoso: I have heard some hardcore FP people argue that it's not, because map does not qualify as a function because of object identity.
[14:20:48] jdelreal: has joined #ruby
[14:21:05] tomphp: has joined #ruby
[14:21:25] dminuoso: foo.map(&:something).equal? foo.map(&:something) #=> false
[14:21:43] dminuoso: Or map could even be really mean and mutate..
[14:22:14] gaussblurinc1: has joined #ruby
[14:22:26] Jameser: has joined #ruby
[14:24:26] ResidentBiscuit: has joined #ruby
[14:25:44] al2o3-cr: has joined #ruby
[14:25:47] Jameser`: has joined #ruby
[14:26:11] maattdd: has joined #ruby
[14:28:44] tomphp: has joined #ruby
[14:28:44] Jameser`: has joined #ruby
[14:30:53] paul374: has joined #ruby
[14:32:43] burgestrand: has joined #ruby
[14:40:23] cdg_: has joined #ruby
[14:40:25] dangerousdave: has joined #ruby
[14:43:04] etehtsea: has joined #ruby
[14:44:40] scorphus: has joined #ruby
[14:46:19] dangerousdave: Hi, is there any reason why you would ever want class B to both inherit from Class A, and also be composed of Class A?
[14:49:12] AgentVenom: has joined #ruby
[14:50:05] pwnd_nsfw`: dangerousdave, what..
[14:50:21] pwnd_nsfw`: Are you asking if a class should ever inherit itself? lol
[14:51:05] dangerousdave: no, would you ever have a class both inherit and hold another class?
[14:52:00] matthewd: dangerousdave: All classes are class B
[14:52:08] matthewd: (class A is Object)
[14:52:10] yeticry_: has joined #ruby
[14:52:20] tomphp: has joined #ruby
[14:52:39] polishdub: has joined #ruby
[14:53:55] joneshf-laptop: has joined #ruby
[14:55:10] MrBusiness: has joined #ruby
[14:55:31] hxegon: dminuoso: I'd say yeah. I've never read a definition of higher order function that required ref. transparency
[14:58:25] dminuoso: hxegon: I think what the person was trying to point out that map is not a function but a routine.
[14:58:30] dangerousdave: pwnd_nsfw` matthewd, thanks, I found a usecase, the composite pattern.
[14:58:42] dminuoso: Which I admit is a fair distinction in the grand scheme of things.
[14:58:47] ChanServ: +o havenwood
[14:59:04] nowhere_man: has joined #ruby
[14:59:17] Pumukel: has joined #ruby
[14:59:23] ChanServ: -o havenwood
[14:59:31] havenwood: https://www.ruby-lang.org/en/news/2017/03/22/ruby-2-4-1-released/
[14:59:40] dminuoso: adaedra, you're on!
[14:59:52] dminuoso: Let this be the day where we get fresh docs. :-)
[15:00:09] adaedra: No time for that currently
[15:00:22] hxegon: ooooooh 2.4.1!
[15:01:04] dminuoso: havenwood: Sadly no useful changelog yet. :(
[15:04:34] skweek: has joined #ruby
[15:06:06] hutch34: has joined #ruby
[15:07:05] roamingdog: has joined #ruby
[15:07:16] synthroid: has joined #ruby
[15:07:47] al2o3-cr: has joined #ruby
[15:08:02] baweaver: drat, someone beat me to the topic
[15:09:16] jgnagy: has joined #ruby
[15:11:08] Didac: has joined #ruby
[15:13:49] hutch34: has joined #ruby
[15:19:32] patarr: has joined #ruby
[15:26:18] lightheaded: has joined #ruby
[15:29:43] brent__: has joined #ruby
[15:30:04] lightheaded: has joined #ruby
[15:31:02] lightheaded: has joined #ruby
[15:32:54] Bulldoze: has joined #ruby
[15:35:26] cagomez: has joined #ruby
[15:36:55] McSoFake: has joined #ruby
[15:37:56] dionysus69: has joined #ruby
[15:38:05] ableto: has joined #ruby
[15:38:39] hobodave: has joined #ruby
[15:38:52] Bulldoze: Hi everybody, new to Ruby programming and new to #ruby, I need to learn this language fast for a new job. What is best online resource or best book? thanks
[15:39:03] doublemalt__: has joined #ruby
[15:41:10] jrafanie: has joined #ruby
[15:41:52] amclain: has joined #ruby
[15:42:46] ableto: Bulldoze: I don't know much about Rubey at the moment but I've been developing in a lot of languages for a lot of years; quick is not the answer. You can learn the syntax quickly (some say a few hours) but you need to learn to solve problems with Ruby
[15:43:26] fkostovski: has joined #ruby
[15:43:29] darix: opensuse packge updated to 2.4.1
[15:43:43] ableto: Everything comes down to problem solving
[15:43:46] hxegon: Bulldoze: what's your previous experience?
[15:43:50] Pumukel: has joined #ruby
[15:45:21] raspado: has joined #ruby
[15:46:46] Bulldoze: little bit of Python, but mainly Basic and Pascal over 20 years ago
[15:47:02] mnemon: Bulldoze: what will you use ruby for?
[15:47:37] hays_: has joined #ruby
[15:47:37] hays_: has joined #ruby
[15:47:56] mnemon: there's usually pretty big difference between writing rails apps, ruby libs/gems and using it in something like chef (DSL).
[15:47:56] Bulldoze: automation testing frameworks, so Ruby as a base but with cucumber, gherkin and watir-webdriver
[15:49:00] username1: has joined #ruby
[15:51:51] vali: has joined #ruby
[15:52:01] borodin: has joined #ruby
[15:52:47] borodin: trying to get started with testing ruby - thought I would start with Test::Unit and move on to more exptic forms later. Hoping there is some sort of evolutionary process from Test::Unit to rspec or whatever...
[15:53:43] borodin: so, I have some ruby code in a path, and I create a rakefile, and I run rake test, and I see /opt/rbenv/versions/2.2.3/bin/ruby -I"lib:tests" "/opt/rbenv/versions/2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb"
[15:53:52] borodin: no errors, no tests ran, I don't get it
[15:54:31] borodin: can somebody point me to a getting started website or something. I don't know what I am doing
[15:54:35] hxegon: Bulldoze: Even if you know OO I'd still suggest POODR, because it's cheap, short, and great.
[15:55:36] hxegon: Bulldoze: Also, rubytapas is a great resource if you are better with screencast style learning (which I am)
[15:55:52] hxegon: Bulldoze: it isn't free, but IMO worth it
[15:57:54] Jameser: has joined #ruby
[15:58:13] Bulldoze: Thanks just looked at POODR.com that looks interesting - I must admit I dont truly think OO when attempting to find solutions
[15:58:16] hobodave_: has joined #ruby
[15:59:19] skweek: has joined #ruby
[15:59:28] certainty: has joined #ruby
[16:00:10] ableto: Bulldoze: I was the same way for many years; it took a 25 yo interviewing me with his hat backwards in a tshirt a few months ago telling me my solutions were "old and tired" to realize my OO was weak and outdated.
[16:00:42] jrafanie_: has joined #ruby
[16:01:20] ableto: I leaned on a few built in functions and often drafted my own when a builtin existed; I blame it on not paying attention in Algorithms course in college
[16:01:38] hxegon: Bulldoze: That book is what got OO to feel natural for me. Also, any conference talk by the author (Sandi Metz)
[16:02:32] muelleme: has joined #ruby
[16:02:43] Bulldoze: I have seen the name Sandi Metz pop up on a few Ruby websites
[16:02:53] jdm: has joined #ruby
[16:03:01] shinnya: has joined #ruby
[16:05:29] tlaxkit: has joined #ruby
[16:06:43] srl295: has joined #ruby
[16:10:12] pilne: has joined #ruby
[16:10:39] andikr: has joined #ruby
[16:11:23] bkxd: has joined #ruby
[16:11:57] ableto: hxegon: thanks for POODR, I think that's the primer I needed
[16:12:53] hxegon: no problem, ableto
[16:14:51] hxegon: Bulldoze: She's an ex-smalltalk programmer, so she knows her OO
[16:17:54] gaussblurinc1: has joined #ruby
[16:19:52] ableto: I'm looking to make a career change of sorts; I've been using PHP and C# to build out pretty simple MVC stuff for years. I wouldn't call myself a genius in any language...I started down the Javascript Stack rabbit hole and...all I see are limitation
[16:19:59] ableto: *limitations
[16:21:11] borodin: +1 Sandi Metz
[16:21:38] ableto: I have a very wide skill range due to the job I've had for the last 12 years; I'd classify my knowledge as "a mile wide and an inch deep". With that said, I want to move into dev...something. Based on my background a friend suggested Ruby
[16:22:32] ableto: I can't leave this job until July 1 so I'm hoping I can achieve some level of mastery by then, I would appreciate any other guidance you all may be able to offer
[16:22:58] ytti_: probably more money in other languages
[16:23:14] ableto: actually more after schedule flex than money tbh
[16:23:38] ableto: but I appreciate the insight ytti_
[16:25:27] gusrub: has joined #ruby
[16:28:16] chopin_: has joined #ruby
[16:29:44] stoffus: has joined #ruby
[16:29:54] Derperpe1: has joined #ruby
[16:31:29] JeanCarloMachado: has joined #ruby
[16:37:15] ishe: has joined #ruby
[16:38:07] roamingdog: has joined #ruby
[16:38:12] lacrymology: has joined #ruby
[16:43:16] fusta: has joined #ruby
[16:44:00] olivier__: has joined #ruby
[16:44:26] muelleme: has joined #ruby
[16:46:35] canton7: has joined #ruby
[16:48:59] canton7: has joined #ruby
[16:51:44] canton7: has joined #ruby
[16:51:56] pulkit4tech: has joined #ruby
[16:53:56] roamingdog: has joined #ruby
[16:55:05] TomyLobo2: has joined #ruby
[16:55:52] SerialCoder: has joined #ruby
[16:56:06] vali: has joined #ruby
[16:56:25] SerialCoder: I need to make an application that sends or receives files over a serial port. Later I will swap out osme code and it will work with TCP. Should I use ruby? I would be learning hte language as part of this project
[16:57:00] __Yiota: has joined #ruby
[16:57:37] SerialCoder: I also considered python, or even C++
[16:57:44] SerialCoder: right now I cant stop going back and forth
[16:57:50] SerialCoder: and I need to actually begin work on the project
[16:58:12] SerialCoder: I noticed the serial port libs for C++ and python might be better... not sure I can enumerate active ports easily with ruby?
[16:58:22] SerialCoder: But when I move to TCP server... thats a few lines ruby
[16:58:28] SerialCoder: vs twice that python, vs 10x that c++
[16:58:40] SerialCoder: I'ts a command line app, and the language is my choice
[16:58:44] olivier__: has joined #ruby
[16:58:44] SerialCoder: it just has to follow a packet format
[16:59:02] SerialCoder: can I work with byte arrays and custom packet and send byte by byte in ruby
[16:59:06] SerialCoder: via serial + tcp
[16:59:23] SerialCoder: also I'm supposed to create a baseclass and derived classes for tcp and serial
[16:59:32] SerialCoder: I read that ruby doesnt work like that though
[17:00:09] hxegon: SerialCoder: If you're asking if you can do inheritance, then yeah, but I wouldn't do that
[17:00:21] canton7: has joined #ruby
[17:00:59] SerialCoder: is it a mistake trying to learn ruby to do this? Should I just stick with C++/C# which I know, or is it a good way to learn ruby
[17:01:07] SerialCoder: I know a bit of python but id like to compare to ruby now
[17:02:11] hxegon: I wouldn't know myself. The main issue IMO would be if there's a stable Serial gem to use
[17:03:34] hxegon: There's this: but it doesn't look maintained
[17:03:37] hxegon: https://github.com/hparra/ruby-serialport
[17:03:52] dionysus69: has joined #ruby
[17:04:21] SerialCoder: does that not matter because serialport hasnt changed
[17:04:27] SerialCoder: or could I run into problems
[17:04:43] hxegon: SerialCoder: you could also write the parts that handle serial in c++ and call it from ruby with FFI
[17:05:01] hxegon: No idea, I've never had to deal with serial myself.
[17:05:08] SerialCoder: at that point I would probably just use C++... I was hoping to both learn ruby + develop this app rapidly
[17:05:32] marxarelli: has joined #ruby
[17:05:34] SerialCoder: thats why I was considering ruby or python
[17:05:49] SerialCoder: does a gem being out of date mean it might not work with ruby?
[17:06:03] SerialCoder: or just that new changfes to the serial port (its old as hell and doesnt change) wont be added
[17:06:11] montanonic: has joined #ruby
[17:06:13] HoierM: has joined #ruby
[17:06:37] hxegon: SerialCoder: Python might be better suited here: https://github.com/pyserial/pyserial
[17:06:56] hxegon: I prefer ruby, but python admittedly has a wider range of polished libraries
[17:07:24] HoierM: has joined #ruby
[17:07:55] SerialCoder: I'm very new to python still so considering ruby
[17:08:05] SerialCoder: both mean new syntax to learn for me
[17:08:14] SerialCoder: I have about a year experience in C++ and C#
[17:08:44] matthewd: The above gem's readme suggests https://github.com/hybridgroup/rubyserial
[17:08:49] roamingdog: has joined #ruby
[17:09:16] stoffus: has joined #ruby
[17:09:39] hxegon: looks much better, nice catch matthewd
[17:11:04] ResidentBiscuit: has joined #ruby
[17:11:57] antoniobeyah: has joined #ruby
[17:12:58] Vingador: has joined #ruby
[17:13:42] SerialCoder: does that not have method for writing one byte at a time
[17:14:31] lightheaded: has joined #ruby
[17:14:59] hxegon: SerialCoder: #write
[17:15:17] olivier__: has joined #ruby
[17:15:41] olivier__: has joined #ruby
[17:18:06] grrrkit: has joined #ruby
[17:19:30] jaequery: has joined #ruby
[17:21:50] Bulldoze: has joined #ruby
[17:25:10] planigan: has joined #ruby
[17:27:38] olivier__: has joined #ruby
[17:30:30] burgestrand: has joined #ruby
[17:31:36] djbkd: has joined #ruby
[17:31:59] paul374: has joined #ruby
[17:35:09] bmurt: has joined #ruby
[17:35:10] burgestrand: has joined #ruby
[17:38:38] igniting: has joined #ruby
[17:39:38] olivier__: has joined #ruby
[17:44:15] t-recx: has joined #ruby
[17:48:40] mordof: has joined #ruby
[17:48:52] mordof: Having a bit of an issue figuring out how I need to set up my function: https://hastebin.com/hapuzigiya.rb
[17:49:00] mordof: trying to parse a host for the domain, and then potentially return if it works out. if it throws an exception, rescue, try something else, potentially return. the ensure ALWAYS HAPPENS
[17:49:08] mordof: is there a way to do this properly, so that the second ensure return only takes place if either of the other two don't run?
[17:50:09] mordof: this makes sense i guess, since the first return is inside the begin, and the ensure is meant to always run....
[17:50:09] montanonic: has joined #ruby
[17:50:10] synthroid: has joined #ruby
[17:50:13] mordof: but it's not what i want for this situation
[17:50:13] Papierkorb: mordof: No, the point of `ensure` is to run always
[17:50:39] olivier__: has joined #ruby
[17:50:44] mordof: Papierkorb: indeed, that's why i'm asking how i should be setting this up instead
[17:51:03] mordof: -.- i'm an idiot
[17:51:13] mordof: i don't need the ensure, i can just put the last return outside the begin escue
[17:51:42] Papierkorb: you don't need the `return` keyword there
[17:51:57] allisio: And you can do away with the call to #select and just use #any?.
[17:52:06] muelleme: has joined #ruby
[17:52:07] mordof: i like explicit returns
[17:52:13] mordof: allisio: noted, thanks
[17:52:38] __Yiota: has joined #ruby
[17:59:35] __Yiota: has joined #ruby
[17:59:52] Fischmiep: has joined #ruby
[18:01:19] RenatoSilva: has joined #ruby
[18:02:41] olivier__: has joined #ruby
[18:05:49] burgestrand: has joined #ruby
[18:11:57] bkxd: has joined #ruby
[18:15:00] olivier__: has joined #ruby
[18:15:23] patarr: What is the ruby idiomatic way of catching an exception to log it, but immediately propagate it? Is there any shorthand instead of begin ... rescue raise $! ?
[18:15:28] Bulldoze: has joined #ruby
[18:15:29] brent__: has joined #ruby
[18:16:15] cloaked1: has joined #ruby
[18:16:15] cloaked1: has joined #ruby
[18:16:22] dangerousdave: has joined #ruby
[18:18:00] chopin: has joined #ruby
[18:18:25] mordof: patarr: wouldn't it make more sense to put that at an application-level catch? or you want it logged regardless if a higher up level resolves it?
[18:18:55] matthewd: patarr: `raise` with no argument will raise $!. But log & re-raise doesn't seem very idiomatic to begin with.
[18:19:34] duckpuppy: has joined #ruby
[18:21:41] havenwood: patarr: do you mean like?: rescue => e; # log here; raise e
[18:22:35] minimalism: has joined #ruby
[18:22:39] enterprisey: has joined #ruby
[18:24:40] roamingdog: has joined #ruby
[18:26:40] olivier__: has joined #ruby
[18:26:42] muelleme: has joined #ruby
[18:27:07] BADC0FFEEE: has joined #ruby
[18:27:29] BADC0FFEE: How can I represent byte data as a packet?
[18:27:50] BADC0FFEE: in C++, I might use a union holding hte byte array and struct to access each field
[18:27:57] BADC0FFEE: how would do this best in ruby
[18:28:03] BADC0FFEE: I need to implement a packet protocol
[18:28:11] BADC0FFEE: via serial, and later TCP
[18:28:23] ramfjord: has joined #ruby
[18:28:27] BADC0FFEE: not tcp from scratch, my packet iwll be the payload
[18:28:33] BADC0FFEE: for serial, I need to do it all
[18:28:44] BADC0FFEE: my plan is to learn ruby to do this
[18:28:57] BADC0FFEE: I'll have crc gen, serial read and write, packet structure
[18:29:03] BADC0FFEE: state machine
[18:30:42] kirun: has joined #ruby
[18:31:05] BADC0FFEE: I really want to learn ruby
[18:31:16] BADC0FFEE: I know mostly C++, some C# and some Python
[18:31:28] BADC0FFEE: I like how short and clean some of these ruby examples look
[18:31:35] BADC0FFEE: TCP server seems even less code than python
[18:31:48] BADC0FFEE: and of course just setting up some structures for TCP in C++ is longer than the whole ruby app code
[18:32:57] matthewd: BADC0FFEE: pack / unpack is probably your best option
[18:34:15] allisio: BADC0FFEE: https://github.com/dmendel/bindata makes #pack/#unpack a lot less painful.
[18:35:42] matthewd: There's also https://github.com/ManageIQ/binary_struct
[18:35:46] brent__: has joined #ruby
[18:36:03] BADC0FFEE: let me take a look
[18:36:36] duckpupp1: has joined #ruby
[18:36:59] BADC0FFEE: my head hurts but I think bin struct looks lik what I need
[18:42:04] hutch34: has joined #ruby
[18:42:22] BADC0FFEE: what is the a3 and the S and all of that
[18:42:32] BADC0FFEE: I read the (very short) doc but I don't get it, this sucks.
[18:45:33] ascio: has joined #ruby
[18:45:33] BADC0FFEE: could someone help give me some clue to get started?
[18:45:35] hxegon: BADC0FFEE: This might help: https://github.com/ManageIQ/binary_struct/blob/master/lib/binary_struct.rb#L5-L39
[18:45:51] hxegon: a3 is a 3 character string I think
[18:47:05] ascio: is this channel an appropriate place to ask a question about sandi metz's testing advice?
[18:47:23] hxegon: ascio: probably
[18:47:34] matthewd: BADC0FFEE: I believe that's using built-in pack/unpack formatting in the strings
[18:49:45] hxegon: ?ask ascio
[18:49:45] ruby[bot]: ascio: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[18:49:49] bmurt: has joined #ruby
[18:50:24] renchan: has joined #ruby
[18:50:58] Derperpe1: has joined #ruby
[18:51:01] ascio: ok, cool, and sorry... so I have a SynchronousObject which has a @mutex instance variable, passed in via dependency injection. if I test that a method on SynchronousObject is synchronous by testing that it calls #synchronize on @mutex, does that violate the principle of testing only incoming, not outgoing, commands and queries?
[18:51:44] BADC0FFEE: how can I print all methods of a gem
[18:51:50] BADC0FFEE: can this be done w/ irb
[18:52:27] Derperpe1: has joined #ruby
[18:52:44] ascio: is there a particular gem you're doing this for?
[18:52:47] hxegon: BADC0FFEE: you can print all methods of an object at least, use #instance_methods
[18:52:48] ascio: or does it need to be general?
[18:53:12] BADC0FFEE: the serialport gem
[18:53:21] BADC0FFEE: I didnt see a close() method it in 15 line doc
[18:54:01] ramortegui: has joined #ruby
[18:54:05] matthewd: ascio: Yes. Especially when you consider that you wouldn't just need to test "does this call synchronize", but "does this call synchronize *around the operations that need it*"
[18:55:12] havenwood: ?pry BADC0FFEE
[18:55:12] ruby[bot]: BADC0FFEE: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[18:55:19] Derperpe1: has joined #ruby
[18:55:28] havenwood: BADC0FFEE: In Pry try a: ls SerialPort
[18:55:37] ascio: BADC0FFEE: if you are using pry, and you install ri docs along with your gems, you can do "ri SerialPort" in pry
[18:55:40] jdm: has joined #ruby
[18:55:46] ascio: alternatively
[18:55:51] ascio: just "ri SerialPort" in your shell
[18:56:14] havenwood: or in irb: help SerialPort
[18:56:59] ascio: matthewd: do you have any pointers for a better way to reason about this requirement?
[18:57:05] havenwood: BADC0FFEE: Here's a talk that shows off some hand Pry stuff: https://www.youtube.com/watch?v=D9j_Mf91M0I
[18:57:16] boombox_: has joined #ruby
[18:57:18] ascio: i'm not sure where to test this
[18:57:28] Derperpe1: has joined #ruby
[18:57:36] aswen: has joined #ruby
[18:57:42] ascio: it seems tangential to the object owning the mutex
[18:58:10] jottr: has joined #ruby
[18:58:38] millerti: has joined #ruby
[18:58:58] ascio: is the synchronous nature just implementation altogether, that i should ignore when testing?
[18:59:07] matthewd: ascio: Not really, sorry... a shared mutex does seem to complicate things
[18:59:37] ascio: thank you regardless
[19:00:10] jottr: has joined #ruby
[19:00:24] postmodern: has joined #ruby
[19:00:26] Arpanet69: has joined #ruby
[19:00:30] s2013: has joined #ruby
[19:03:13] banisterfiend: has joined #ruby
[19:04:13] raspado: has joined #ruby
[19:05:38] Derperpe1: has joined #ruby
[19:10:04] nadir: has joined #ruby
[19:10:44] Derperpe1: has joined #ruby
[19:11:21] BADC0FFEE: ruby can do things like
[19:11:36] BADC0FFEE: iterate through a byte array and put every 7 into a new byte array then append that to a list of byte arrays?
[19:11:36] harfangk: has joined #ruby
[19:11:53] BADC0FFEE: I don't want to get started and hten find out something hereis impossible
[19:12:03] allisio: Ruby is Turing-complete.
[19:12:13] matthewd: allisio beat me to it
[19:13:15] Bulldoze: has joined #ruby
[19:13:33] allisio: You haven't expressed your intent all that clearly, but yes, Ruby can do it.
[19:13:39] matthewd: BADC0FFEE: Low-level bit shuffling is C's strong suit, and not Ruby's, so that is something to be aware of
[19:13:50] allisio: That's not true.
[19:14:06] matthewd: But yes, "manipulate arrays while applying conditions" is definitely going to be just fine
[19:14:18] BADC0FFEE: allisio: I will need to read from a file, create multiple byte array packets of the data with header and crc on each, then send them out over serial and later tcp
[19:14:18] allisio: Ruby even has Integer#[] for accessing individual bits in one fell swoop.
[19:14:25] BADC0FFEE: I also need to read such packets and process with my state machine
[19:14:39] BADC0FFEE: and write to a file the result
[19:15:08] BADC0FFEE: ruby shouldnt be a problem? my goal is to use this assignment as a way of learning ruby, as we have a choice of any language
[19:15:46] BADC0FFEE: sine the protocol is defined, my ruby app should be able to talk to others C# app
[19:16:01] jottr: has joined #ruby
[19:16:41] montanonic: has joined #ruby
[19:16:51] matthewd: BADC0FFEE: If you're honestly asking "I need to write to a file. Is that something Ruby will be able to do?", then... I'm not sure what to say.
[19:16:58] antgel: has joined #ruby
[19:17:03] paul374: has joined #ruby
[19:17:07] BADC0FFEE: thats only 1% of what I described
[19:17:13] BADC0FFEE: most of it is working with packetizing the bytes
[19:17:20] BADC0FFEE: from/to file
[19:17:43] jottr: has joined #ruby
[19:17:47] BADC0FFEE: it sounds like ruby should work fo rthis, so I;m going to begin
[19:18:09] BADC0FFEE: I've been trying the irb and it was quite nice getting an array of bytes from the file with 2 lines
[19:18:15] vali: has joined #ruby
[19:18:19] BADC0FFEE: I think that type of efficiency should make up for the slowdown of learning a new langiage
[19:18:35] BADC0FFEE: thats a 90% reduction in code size vs c++
[19:19:22] matthewd: Also a 90x reduction in runtime efficiency :P
[19:19:44] BADC0FFEE: thats ok in this case
[19:20:06] BADC0FFEE: I will continue my C and C++ studies when I need speed
[19:20:49] cibs: has joined #ruby
[19:21:39] allisio: He's going the distance.
[19:22:51] al2o3-cr: has joined #ruby
[19:23:21] burgestrand: has joined #ruby
[19:25:14] BADC0FFEE: python seems more uptight than ruby
[19:25:22] BADC0FFEE: the language, not its users)
[19:25:25] allisio: Most languages are like that.
[19:25:43] allisio: Ruby wants you to run with scissors.
[19:26:20] allisio: Hell, it wants you to run with a Swiss Army chainsaw.
[19:27:01] lxsameer: has joined #ruby
[19:27:32] planigan: has joined #ruby
[19:28:28] jamesaxl: has joined #ruby
[19:29:24] BADC0FFEE: writing this is going ot be so strange
[19:29:35] BADC0FFEE: I just learned I likely wont even use a for loop to build each packet
[19:29:40] BADC0FFEE: perhaps .times will be the way
[19:29:43] BADC0FFEE: irb is nice to mess around with
[19:31:00] hutch34: has joined #ruby
[19:31:36] ascio: has joined #ruby
[19:35:01] BADC0FFEE: I've been reading python vs ruby for a couple of days now
[19:35:07] BADC0FFEE: I'm not closer to clarity
[19:37:40] vali: has joined #ruby
[19:37:57] dangerousdave: has joined #ruby
[19:39:10] hxegon: I'd encourage using Enumerable methods instead of times if at all possible BADC0FFEE
[19:39:33] RenatoSilva: one clear difference to me is that ruby gives multiple ways to do the same thing, for the sake of "freedom", but no it's just confusion
[19:40:35] havenwood: renatosilva: yet you can say that many ways and we can still understand you just fine
[19:40:41] havenwood: renatosilva: there is more than one way to do it
[19:40:49] RenatoSilva: "hey you can use if bool, or if bool then, ruby gives freedom, so cool, so amazing" -- no it just sucks
[19:40:58] havenwood: renatosilva: some languages are designed for the fluent
[19:41:06] hxegon: My experience with python vs ruby in a nutshell: Programmers bend ruby, Python bends programmers
[19:41:32] nofxx: has joined #ruby
[19:41:55] havenwood: renatosilva: do you want to learn a simple language for beginners or something you can grow into and continue to use for years to come?
[19:42:48] cibs: has joined #ruby
[19:42:59] spicerack: has joined #ruby
[19:43:56] knight33: has joined #ruby
[19:45:52] ascio: python and ruby are both fine languages with great software written in both
[19:46:07] ascio: they have different strengths and weaknesses
[19:46:43] milardovich: has joined #ruby
[19:46:47] DLSteve: My bigest complaint with Python is the botched Python 2 to 3 migration.
[19:47:02] RenatoSilva: yeah that sucks
[19:47:03] ascio: yes, that is a pretty big deterrent for me as well
[19:47:38] tvw: has joined #ruby
[19:47:56] DLSteve: Most of my code at work is in Python and it can be a challenge to write code that works on both versions. Some things I have moved to Python 3.4+ only.
[19:49:03] RenatoSilva: on the other side there are people obsessed with backward compatibility like java, as if an atomic bomb would explose somewhere if they removed all the ancient features that prevents the platform from evolving
[19:49:08] nofxx: ascio, disagree, or, please eg one ruby weakness over python
[19:49:43] allisio: >weakness over
[19:50:02] nofxx: and that 2 -> 3 clearly states my point... if it's good it doesn't need to change =P
[19:50:26] nofxx: hehe this remembers me the guy that wrote angular...twitter about angular 2: "everything will be different"
[19:51:44] hxegon: nofxx: an example of a weakness, out of control metaprogramming. This is also a strength when used correctly though, but just yesterday I saw code that dynamically defines constants on Object in an initializer :X
[19:51:49] BADC0FFEE: ascio: what if I can't decide?
[19:51:52] BADC0FFEE: its eating me alive
[19:52:04] BADC0FFEE: im wasting more time trying to decide than picking one and learning it
[19:52:14] allisio: That's pretty dumb.
[19:52:17] ascio: what do you want to do?
[19:52:20] BADC0FFEE: I have this problem with everything... it took me 8 months to pick a guitar amp
[19:52:21] allisio: Are you in ##python lamenting similarly?
[19:52:30] BADC0FFEE: I was earlier
[19:52:41] hxegon: I'm kind of in the same boat with FP, but it's better to pick something and stick with it, so just pick ruby BADC0FFEE
[19:52:55] RenatoSilva: it all narrows down to people's problems: selfishness, communication, organization, talent...
[19:53:11] allisio: What's "it" there?
[19:53:16] nofxx: hxegon, well, one could point that it such a great lang that won't stand on your way, even if you're writing java on it heh =D
[19:53:36] RenatoSilva: allisio: the pathetic software we all use and think it's good
[19:53:54] allisio: renatosilva: You're too young to be so full of such hatred.
[19:53:55] BADC0FFEE: I'm coming from C++, C#, Some Python. I've only written a couple of <100 line py progs
[19:53:55] RenatoSilva: no, it's just pathetic in general
[19:53:59] BADC0FFEE: ruby I've never used
[19:54:20] nofxx: BADC0FFEE, just had a great double ristretto brazilian arabic... G00DCOFFEE!
[19:54:34] DLSteve: BADC0FFEE, Flip a coin and go all in, both languages are good.
[19:55:01] hxegon: BADBADN0TG00D coffee
[19:55:09] dionysus70: has joined #ruby
[19:55:12] RenatoSilva: BADC0FFEE: are you a student?
[19:55:23] BADC0FFEE: but they dont teach us ruby or python
[19:55:28] BADC0FFEE: C++ and C# in school
[19:55:34] BADC0FFEE: so now I'm trying to expand my abilities on my own
[19:55:39] BADC0FFEE: and prepare for carreer
[19:55:39] nofxx: could be worst, could be java
[19:56:13] muelleme: has joined #ruby
[19:56:15] RenatoSilva: BADC0FFEE: ok, step out all these passionate discussions... don't believe people one tool is good and another is not... have your OWN opinions
[19:56:18] BADC0FFEE: we were supposed ot learn java but it never happened, i was going to teach myself
[19:56:43] ascio: honestly the programming language is less important than the ecosystem
[19:56:46] BADC0FFEE: well ruby feels higher level than python with my first hour here tryiung it
[19:56:46] RenatoSilva: BADC0FFEE: that said, you don't need to choose python over ruby, learn both
[19:56:57] montanonic: has joined #ruby
[19:57:11] BADC0FFEE: they are very different
[19:57:26] BADC0FFEE: in python you seem to do things like len(str)
[19:57:29] RenatoSilva: BADC0FFEE: because at work, if their software is python, you can hate python but still know it, and use it.... the same for ruby... for any tool...
[19:57:30] BADC0FFEE: in ruby, str.len
[19:57:55] nofxx: BADC0FFEE, heheh.. I always make fun out of python ppl with that len thing... looks like they changed in 3
[19:58:12] RenatoSilva: BADC0FFEE: if you for example do open source, you'll realize you cannot simply avoid tools that you don't like
[19:58:22] havenwood: BADC0FFEE: in Perl 6 `len(str)` or `str.len`, you choose ;-)
[19:58:39] jrochkind_: has joined #ruby
[19:58:53] jrochkind_: can a ruby `ensure` block know if there was an exception or not?
[19:59:07] RenatoSilva: nofxx: you brazillian?
[19:59:18] nofxx: renatosilva, of course you can, in a worst case you can rewrite the whole darn thing... hehe JS being the only exception
[19:59:23] nofxx: renatosilva, yup, you too?
[19:59:39] BADC0FFEE: ruby block = c++ lambda?
[20:00:00] BADC0FFEE: or should I not even worry about this yet
[20:00:20] BADC0FFEE: I'd like to buy a hard copy of a ruby book but the one by the guy from japan has reviews saying its too difficult
[20:00:24] BADC0FFEE: (for a beginner)
[20:00:42] RenatoSilva: ascio: agree, the language is just one part of the ecosystem... I'd say more... the ecosystem is less important than the people behind it
[20:01:40] hutch34: has joined #ruby
[20:01:52] RenatoSilva: havenwood: ah the freedom!
[20:01:53] ascio: um idk, i guess in the sense that they created the ecosystem, but if everyone in the ruby community had a heart attack tomorrow, as long as the infrastructure like rubygems.org etc were still funded, ruby's ecosystem would continue to be pretty great
[20:01:55] havenwood: BADC0FFEE: A block is like an unnamed lambda that no object is allocated for.
[20:02:02] RenatoSilva: havenwood: no it just sucks
[20:02:16] loincloth: has joined #ruby
[20:02:45] havenwood: renatosilva: I disagree. I prefer freedom. Master your tools. Simple made easy.
[20:02:46] RenatoSilva: nofxx: falae rapaz
[20:03:04] RenatoSilva: havenwood: that is NOT freedom! that is CONFUSION
[20:03:33] roamingdog: has joined #ruby
[20:03:46] CrazEd__: has joined #ruby
[20:04:14] havenwood: renatosilva: https://www.infoq.com/presentations/Design-Composition-Performance
[20:04:16] ecuanaso: has joined #ruby
[20:05:01] hxegon: Maybe we should restrict the english language to only the 10,000 most common words so there's no more "confusion" renatosilva
[20:07:20] nofxx: hxegon, the internet is already doing that
[20:08:33] RenatoSilva: hxegon: maybe you should translate the ruby language, so people have the "freedom" to write their code in native language
[20:08:52] Derperpe1: has joined #ruby
[20:10:06] nofxx: I disagree... code in latin based languages looks just awful renatosilva
[20:10:25] BADC0FFEE: " I am newbie for both Python and Ruby. I started from Python and like its style very much, especially its indentation. But the name of "Python" and snake pictures/icons (e.g., on official Python Tutorial page) made me feel sick. From this perspective, ruby has a better name than python."
[20:11:51] hxegon: renatosilva: like https://github.com/cucumber/cucumber-ruby?
[20:12:02] nofxx: BADC0FFEE, I always say that... choosing tech by logo always works. ugly snake or a beautiful gem?
[20:12:18] nofxx: playful dolphin or an elephant that never forgets with your data?
[20:12:21] nofxx: it just works
[20:12:25] ruby[bot]: -b *!*@gateway/tor-sasl/irc2000$#ruby-banned
[20:12:27] jamesaxl: has joined #ruby
[20:12:52] bkxd: has joined #ruby
[20:12:58] RenatoSilva: I want the "freedom" to write string.length, or when I'm tired, string.len, or when I just want, string.size, or when I feel like a poet, string.feelings
[20:13:14] nofxx: the only exception (every rule has anyways) GNU stuff, nothing beats a gnu logo in facepalm per minute
[20:13:39] badeball: has joined #ruby
[20:13:42] BADC0FFEE: what does string.feelings return
[20:13:52] hxegon: nothing unless you define it
[20:13:59] RenatoSilva: nofxx: dolphin and elephant are for what?
[20:14:07] allisio: renatosilva: That's embarrassing.
[20:14:08] BADC0FFEE: elephan is php
[20:14:08] nofxx: renatosilva, mysql vs pg
[20:14:18] allisio: You sure talk like you know your shit.
[20:14:40] hxegon: renatosilva: why is freedom in double quotes? Are you advocating restricting possible method names to only "serious", "businessy" words?
[20:15:06] allisio: He's aimlessly complaining because that's what children do.
[20:15:16] hxegon: string.to_tps_report or die?
[20:16:04] hxegon: renatosilva: you know, you could probably do that in ruby by redefining how methods are defined, making it check a list of accepted possible names.
[20:16:06] BADC0FFEE: can anyone recommend a physical book for ruby that isnt "The Ruby Programmng Language"
[20:16:21] BADC0FFEE: the reviews said it's too difficult for a beginner and I can't learn as well from ebooks
[20:16:25] RenatoSilva: def feelings; puts 'I love the freedom for creating confusion instead of actual freedom'; end
[20:16:28] solocshaw: has joined #ruby
[20:16:39] hxegon: BADC0FFEE: POODR, but that isn't really an introductory text. Let me look around real quick and see if I can find something
[20:16:50] BADC0FFEE: thank you, hxegon
[20:17:05] nofxx: renatosilva, "I came here to confuse you, not to explain!" Chacrinha =D
[20:17:13] BADC0FFEE: I know the C++ community talks about "books that should never be read" not sure if its the same for ruby
[20:17:21] BADC0FFEE: thats why I ask here
[20:17:50] RenatoSilva: nofxx: nao seria Tom Zé? :)
[20:17:51] allisio: TRPL shouldn't be too difficult for someone with prior programming exposure.
[20:18:29] nofxx: renatosilva, impersonating Chacrinha... that quote is from like 1970, 1980....
[20:18:42] dangerousdave: has joined #ruby
[20:18:50] matthewd: I still default to recommending pickaxe
[20:18:59] RenatoSilva: nofxx: ah, you from that time?
[20:19:02] hxegon: BADC0FFEE: Why's poignant guide to ruby is great. Not a thorough text, but one every ruby programmer should read once
[20:19:19] nofxx: BADC0FFEE, small and nice: chris pine's learn to program, and why's poingnant guide
[20:19:37] nofxx: chris pine you can finish in an afternoon with programming background
[20:19:41] nofxx: renatosilva, nope, born in 84
[20:19:51] BADC0FFEE: I will look into those, ty
[20:20:08] nofxx: BADC0FFEE, both online, not physical but worthy
[20:20:31] hxegon: nofxx, BADC0FFEE actually there is at least a physical why's poingnant guide
[20:20:49] Puffball: has joined #ruby
[20:20:55] matthewd: BADC0FFEE: Pickaxe = https://pragprog.com/book/ruby4
[20:21:08] hxegon: oh yeah, hold on...
[20:21:45] hxegon: this isn't a book, but http://rubykoans.com/ BADC0FFEE
[20:22:06] matthewd: It's obviously not going to cover post-2.0 features, but since then, while some things have been added, nothing's really changed or gone away
[20:22:13] hutch34: has joined #ruby
[20:22:33] andikr: has joined #ruby
[20:22:37] agent_white: Tossing in my 2c. I found rubymonks to be extremely helpful, especially their explanations on metaprogramming and callbacks.
[20:22:42] hxegon: Basically series of exercises that get you into the groove of ruby programming
[20:22:52] nofxx: matthewd, in my humble op, pickaxe isn't enjoyable for a starter, more like after you wrote something thing
[20:22:55] pLaTo0n: has joined #ruby
[20:22:59] allisio: Is there something for getting into the rube of Groovy programming?
[20:23:07] hxegon: lol allisio
[20:23:38] RenatoSilva: BADC0FFEE: you could also pick any you can find, then ask here when you have questions
[20:24:07] matthewd: It worked for me.. but that was a different edition, a long time ago, and with a lot fewer alternatives available
[20:25:51] montanonic: has joined #ruby
[20:26:29] borodin: has joined #ruby
[20:27:33] BADC0FFEE: its too soon to make a call... but ruby looks really nice.
[20:27:37] Disavowed: nofxx: re: Python 'string'.len - we definitely don't have that! I just tried in 3.6.0 - I've always been baffled as to why len() is a builtin
[20:27:49] BADC0FFEE: I feel a bit of excitement xD
[20:27:49] Disavowed: 3.6.0 is the latest version for context.
[20:28:01] RenatoSilva: BADC0FFEE: it is nice
[20:28:03] borodin: I am running minitest like this: ruby test.rb and it tells me "Run with --verbose for details." - how do I do that? ruby test.rb --verbose ?
[20:28:17] __Yiota: has joined #ruby
[20:28:32] allisio: borodin: Other way.
[20:28:59] nofxx: Disavowed, not coding python but sure there is... maybe .length ? or something else
[20:29:20] borodin: ruby --verbose test.rb?
[20:29:34] allisio: You call the `len()` function for anything you want the length of, which defers to the object's __len__() method.
[20:29:37] enterprisey: has joined #ruby
[20:29:52] Disavowed: BADC0FFEE: For what it's worth, I've been programming Python for about 8 years and Ruby for about one. For personal projects, I'll generally reach for Ruby. There's less 'WTF?!' moments with it and things like Rails are just orders of magnitude better than their Python counterparts. I'd go Ruby, but whatever you pick, you should be able to transfer to the other one pretty easily
[20:29:56] RenatoSilva: BADC0FFEE: one program in C: https://github.com/renatosilva/pactoys/blob/master/source/repman/native/repman.c
[20:29:57] RenatoSilva: BADC0FFEE: same program in ruby: https://github.com/renatosilva/pactoys/blob/master/source/repman/ruby/lib/repman.rb
[20:30:20] Disavowed: allisio: Correct. Here's Guido's reasoning: http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm
[20:30:42] ascio: has joined #ruby
[20:31:43] BADC0FFEE: wow, Disavowed
[20:32:03] Disavowed: nofxx: Here's a list of string methods, in case you care ;) https://bpaste.net/show/511d18d7f3c0
[20:32:19] BADC0FFEE: is python lower level than ruby?
[20:32:20] havenwood: borodin: Try: TESTOPTS="--verbose" ruby test.rb
[20:32:28] Disavowed: Count sounds like it'll do what you want, but really it counts instances in a substring
[20:32:41] BADC0FFEE: with C++ and ruby, I'm not sure where python would fit in
[20:32:47] Disavowed: BADC0FFEE: I wouldn't say lower level especially. They both share many many similarities
[20:32:48] BADC0FFEE: unless I needed to use it for work, or working with math or data
[20:33:05] BADC0FFEE: scientific data
[20:33:12] Disavowed: If you're going with sciency stuff or natural language, Python is the better pick. Anything else, I'd go Ruby
[20:33:46] BADC0FFEE: Disavowed: is it absurd or completely reasonable to develop a serial port application with byte array packet protocol using ruby
[20:33:49] __Yiota: has joined #ruby
[20:33:51] Disavowed: Actualyl saying that, I'm not sure what Ruby is like for crunching large amounts of data - Python has things like Pandas which are pretty good. Perhaps someone better versed in Ruby than me could make that call for you
[20:33:52] BADC0FFEE: vs C#/C++ --- or python
[20:34:05] workmad3: has joined #ruby
[20:34:34] Disavowed: BADC0FFEE: I wouldn't say absurd at all. Although I'm unfamiliar with Ruby's offerings in that area so I'd naturally reach for Python's Twisted, but I'm sure Ruby has a similar thing
[20:34:34] BADC0FFEE: I will read from a file, packetize it into fixed size byte array packets, send over serial (and later tcp)
[20:34:36] RenatoSilva: the closer to the hardware, the more you want C++/C
[20:35:00] RenatoSilva: the closer to the people, the more you want ruby/python/C#/Java
[20:35:04] Disavowed: Oh, Event Machine is the Ruby equivalent.
[20:35:12] Disavowed: BADC0FFEE: What renatosilva said ^
[20:35:41] Disavowed: TIL logstash is written in EventMachine
[20:37:02] djbkd: has joined #ruby
[20:38:27] t-recx: has joined #ruby
[20:39:51] matcouto: has joined #ruby
[20:42:43] hutch34: has joined #ruby
[20:42:59] BADC0FFEE: ACTION agonizes
[20:42:59] Karunamon|2: has joined #ruby
[20:46:56] banisterfiend: has joined #ruby
[20:47:28] pwnd_nsfw: has joined #ruby
[20:48:43] workmad3: has joined #ruby
[20:48:47] AgentVenom: has joined #ruby
[20:49:04] jenrzzz: has joined #ruby
[20:49:05] jenrzzz: has joined #ruby
[20:49:12] nobitanobi: has joined #ruby
[20:49:57] AndroUser123: has joined #ruby
[20:50:07] AndroUser123: https://www.hackerrank.com/challenges/climbing-the-leaderboard
[20:50:14] fusta: has joined #ruby
[20:50:36] AndroUser123: my code gets terminated due to timeout error it is too slow on bigger examples
[20:50:37] AndroUser123: https://gist.github.com/anonymous/fade73098ff38ed04ef5119d8b242e46
[20:50:59] AndroUser123: any hints to speed it up
[20:55:23] muelleme: has joined #ruby
[20:55:59] BADC0FFEE: great site, ty
[20:56:05] BADC0FFEE: I can compare the same program in different langiages
[20:57:01] nowhere_man: has joined #ruby
[20:58:40] ecuanaso: has joined #ruby
[20:59:08] paulmcquad: has joined #ruby
[21:00:24] nobitanobi: has joined #ruby
[21:01:29] Puffball: has joined #ruby
[21:01:39] Disavowed: AndroUser123: I'm not amazing at Ruby or anything but it looks like you're sorting that array on each pass - I'd bet that's where your time is spent. Is there a better way of tracking state?
[21:01:43] jgnagy: has joined #ruby
[21:03:22] hutch34: has joined #ruby
[21:03:45] brent__: has joined #ruby
[21:06:39] hurricanehrndz: has joined #ruby
[21:06:50] ElderFain: has joined #ruby
[21:08:01] prions: has joined #ruby
[21:08:26] dagelf: has joined #ruby
[21:10:56] rhyselsmore: has joined #ruby
[21:12:49] AndroUser123: https://gist.github.com/anonymous/edab4e2c6138ed327353c1b9c8cf507e
[21:12:52] AndroUser123: this also doesnt work
[21:13:28] bkxd: has joined #ruby
[21:16:23] Disavowed: AndroUser123: You have a nested loop so your algorithm is performing at O(n2). Is there a better solution? O(n)? O(log n) perhaps? What about memoization?
[21:16:36] dasher00: has joined #ruby
[21:17:35] __Yiota: has joined #ruby
[21:18:11] workmad3: has joined #ruby
[21:19:41] SleepySensei: has joined #ruby
[21:20:39] bkxd: has joined #ruby
[21:20:57] AndroUser123: the test case lololol
[21:20:58] AndroUser123: https://hr-testcases-us-east-1.s3.amazonaws.com/29530/input06.txt?AWSAccessKeyId=AKIAJAMR4KJHHUS76CYQ&Expires=1490224837&Signature=8mUigihBQE3zOMwW5wbbujQDqzU%3D&response-content-type=text%2Fplain
[21:22:37] montanonic: has joined #ruby
[21:22:48] aaooki: has joined #ruby
[21:22:55] IRCFrEAK: has joined #ruby
[21:22:58] IRCFrEAK: has left #ruby: ()
[21:23:55] Mia: has joined #ruby
[21:23:55] Mia: has joined #ruby
[21:25:24] ecuanaso: has joined #ruby
[21:25:27] meshsmith: has joined #ruby
[21:26:33] Disavowed: Oh yeah you have no hope of beating a timeout with a O(n2) solution on a dataset like that!
[21:26:41] Disavowed: AndroUser123: Do you know much about algorithms?
[21:27:14] AndroUser123: im young and probably not
[21:27:23] Disavowed: AndroUser123: no that's fine - I'm here to help :)
[21:27:36] AndroUser123: i need to go soon
[21:27:44] matthewd: I suspect the simple O(n*m) solution would be fast enough
[21:27:44] AndroUser123: so how do i speed this up with a function?
[21:27:45] Disavowed: http://ruby-doc.org/core-2.4.0/Array.html#method-i-bsearch
[21:27:59] Disavowed: matthewd: I'm inclined to agree
[21:28:13] matthewd: AndroUser123: Your second try looks pretty close. It's missing something.
[21:28:24] AndroUser123: bsearch is efficient?
[21:28:44] Disavowed: AndroUser123: It is, but it might not be what you want here - I think matthewd has something slightly better in mind
[21:29:15] matthewd: bsearch is very efficient, but I wouldn't bother with it unless you need to (and it would need the same change anyway)
[21:29:42] AndroUser123: ok so what do i do
[21:29:43] jdm: has joined #ruby
[21:29:46] Disavowed: but... but... worst case O(log n)!
[21:30:12] sysanthrope: has joined #ruby
[21:30:23] matthewd: AndroUser123: Walk us through your algorithm
[21:30:49] matthewd: The second one
[21:30:59] AndroUser123: here is the task if you want https://www.hackerrank.com/challenges/climbing-the-leaderboard
[21:31:03] ascio: has joined #ruby
[21:31:43] matthewd: (start from line 11)
[21:31:51] vali: has joined #ruby
[21:31:59] AndroUser123: you read the challenge?
[21:32:25] matthewd: I've inferred the goal from your code
[21:33:12] AndroUser123: i got 2 arrays , in first array there are user scores after each level and in second top scores , i need to type for each score in first array what score is it in 2nd
[21:33:16] balazs: has joined #ruby
[21:33:38] AndroUser123: like 1st[0] is 6th place 1st[n-1] is 1st place
[21:35:03] Guest24: has joined #ruby
[21:36:10] matthewd: Yes, I understand the objective. Walk me through how your code achieves that.
[21:36:21] duckpupp1: has joined #ruby
[21:36:44] antgel: has joined #ruby
[21:38:59] AndroUser123: if element in user score is very lower than lowest in leaderboards its last then
[21:39:20] opt: has left #ruby: ("WeeChat 1.4")
[21:39:28] AndroUser123: i added uniq! on line five
[21:39:41] AndroUser123: since code on line 13 wouldnt work without it
[21:39:42] electrostat: has joined #ruby
[21:42:54] tomphp: has joined #ruby
[21:44:39] millerti: has joined #ruby
[21:45:08] centrx: has joined #ruby
[21:45:08] centrx: has joined #ruby
[21:45:22] JeanCarloMachado: has joined #ruby
[21:45:47] __Yiota: has joined #ruby
[21:47:08] Verity: has joined #ruby
[21:48:04] xenops: has joined #ruby
[21:48:17] hahuang65: has joined #ruby
[21:48:57] Verity: I need to write an application that reads from a file, packetizes the data into byte arrays with header, crc, etc, then sends them out over serial and later I will change to TCP (the packet will be the payload in the tcp, I'm not writing it all scratch) I have about a year experience with C++ 2 small programs of python, a month or so of C# and no ruby. Should I choose C++, Python, or Ruby?
[21:49:33] hxegon: Hmm...........
[21:49:41] hahuang61: has joined #ruby
[21:49:53] Verity: hxegon, its me =D, sorry.
[21:50:16] Verity: just getting one last payload of advice before I commence
[21:50:23] hxegon: There's no right answer
[21:50:53] hxegon: There are reasons someone would choose any of the three and be correct for those reasons, but it depends
[21:51:02] Verity: I need to solve this life-issue of not being able to make decisions, it paralyzes me.
[21:51:06] Disavowed: Verity: You'd get on really well with my mate BADC0FFEE
[21:51:17] hxegon: and his friend SerialCoder
[21:51:23] dangerousdave: has joined #ruby
[21:52:06] loincloth: has joined #ruby
[21:52:27] hxegon: Verity: what do you want to do it in?
[21:52:35] Disavowed: I'm assuming I'll see the exact same sentence if I scroll over to #Python? Honestly, you could have written it by now!
[21:52:45] Verity: Disavowed, its there
[21:52:53] Verity: No sense in asking just one "side" =P
[21:52:55] Disavowed: I'm only playing
[21:52:59] centrx: Ruby can make your decision for you. There's a gem for that
[21:53:20] Verity: decision made then
[21:53:27] allisio: >> %w[Ruby Python C++].sample
[21:53:28] ruby[bot]: allisio: # => "Python" (https://eval.in/759341)
[21:53:37] gaussblurinc1: has joined #ruby
[21:53:43] matthewd: At some point indecision starts to look like opinion-shopping, and then trend towards blame-shopping
[21:53:43] Verity: it picked python
[21:53:50] charliesome: has joined #ruby
[21:53:50] allisio: Your problem has been solved.
[21:53:52] allisio: Go on, get.
[21:54:08] solocshaw: has joined #ruby
[21:54:14] Verity: matthewd, I was unable to parse your last message
[21:54:29] Verity: I took 8 months to pick a guitar amp
[21:54:34] Verity: and it was 4 grand =\
[21:54:36] Verity: this is a problem I have
[21:54:37] centrx: Well, whatever you do, don't choose anything other than Ruby
[21:54:40] Verity: a big problem.
[21:54:48] AndroUser123: matthewd you got any hints
[21:54:58] Verity: I'm going to start with ruby and if it doesnt work out I'll switch
[21:55:06] Verity: back in a bit, or hopefully not!
[21:55:31] havenwood: Verity: Ruby would be nice for that. Or maybe look at Crystal or Elixir for fun.
[21:55:44] Verity: ACTION searches
[21:55:51] havenwood: Verity: Do all the above and report back! ;-)
[21:56:05] AndroUser123: havenwood you are the biggest rubist here
[21:56:29] matthewd: AndroUser123: Okay, reading the full description, this seems even closer than I thought
[21:56:30] Radar: havenwood: good morning
[21:56:39] Radar: havenwood: yesterday you suggested I could remove the version from this URL: http://ruby-doc.org/core-2.4.0/Object.html#method-i-tap
[21:56:40] Verity: ty for the links havenwood
[21:56:48] havenwood: Radar: g'morning!'
[21:56:49] AndroUser123: ok thanks matthewd
[21:56:51] Verity: now I'll really go mad
[21:56:52] Radar: But changing it to http://ruby-doc.org/Object.html#method-i-tap doesn't work. So what's the right URL?
[21:57:02] matthewd: AndroUser123: First, why is line 12 inside the inner loop?
[21:57:05] Radar: Oh maybe it's http://ruby-doc.org/core/Object.html#method-i-tap
[21:57:12] hxegon: and if elixir doesn't work, try Clojure, or haskell, or OCaml, or scala, or brainfuck
[21:57:20] havenwood: Radar: the /core/ part is needed
[21:57:21] havenwood: Radar: and https is a cherry on top
[21:57:29] Radar: gotcha thanks
[21:57:31] baweaver: ACTION debates !next'ing Radar 
[21:57:34] matthewd: AndroUser123: And also, actually, why is it necessary at all?
[21:57:41] Radar: baweaver: <3
[21:58:22] AndroUser123: because i dont know better?
[21:58:29] AndroUser123: i need to compare the score
[21:59:02] AndroUser123: i can insert all elements from 1st in second array and sort it and print the socred without 2 loops
[21:59:09] AndroUser123: if it works :)
[21:59:25] mim1k: has joined #ruby
[21:59:40] tAn: has joined #ruby
[22:00:29] Lord_of_Life: has joined #ruby
[22:01:31] LBRapid: has joined #ruby
[22:01:42] matthewd: AndroUser123: I suggest you manually work through this, step by step, for an input of say scores = [5,4,3,2], alice = [7,5,4,2,1]
[22:02:26] mostlybadfly: has joined #ruby
[22:03:53] allisio: Alice's score always increases.
[22:04:52] alphor: has joined #ruby
[22:05:17] allisio: AndroUser123: Does her position on the leaderboard change every time her score does?
[22:05:34] matthewd: Err, yeah.. the reverse of that, then
[22:05:45] AndroUser123: it doesnt say but probably
[22:05:59] matthewd: But did I misunderstand the problem? Is your current code working or not? :/
[22:06:16] AndroUser123: it is for 5 test cases and gets terminated for others because its too slow
[22:06:33] AndroUser123: https://hr-testcases-us-east-1.s3.amazonaws.com/29530/input06.txt?AWSAccessKeyId=AKIAJAMR4KJHHUS76CYQ&Expires=1490227584&Signature=VqiL%2FZttICsN0rMYTJ7ANVWamGw%3D&response-content-type=text%2Fplain
[22:06:36] AndroUser123: check the input
[22:06:44] AndroUser123: i think ruby is too slow for that
[22:07:17] dangerousdave: has joined #ruby
[22:07:18] matthewd: Your code is wasting effort, which will make it too slow
[22:07:21] esObe_: has joined #ruby
[22:07:29] mikecmpbll: has joined #ruby
[22:07:47] AndroUser123: can you make it faster
[22:08:08] matthewd: scores is known to be sorted, so you know where the minimum value is; you don't need to use .min to find it
[22:08:21] AndroUser123: alice is sorted also
[22:08:33] matthewd: ... and that line isn't using anything from the loop, so there's no reason to put it in there
[22:09:54] matthewd: finally, you're using each_with_index, but then you're not using `i`
[22:10:41] AndroUser123: lol i just saw that
[22:10:58] AndroUser123: how do i skip one each do
[22:13:59] AndroUser123: i can delete elements from alice when i print them
[22:14:24] matthewd: gist what you have now
[22:14:40] matthewd: If you've fixed the issues I noted above, it should be performing much better
[22:14:55] jtperreault: has joined #ruby
[22:16:05] Disavowed: I'm impressed that Ruby has a native binary search. How are Arrays implemented to achieve that? Are they actually a tree behind the scenes, or is there some trickery in the implementation (ie it builds one on the fly or somthing)?
[22:16:49] AndroUser123: still too slow
[22:17:01] matthewd: Disavowed: It just uses an index
[22:17:01] allisio: It's just a convenience method that doesn't have much bearing on the internal structure of Arrays.
[22:18:57] lacrymology: has joined #ruby
[22:19:00] AndroUser123: how would you solve that challenge?
[22:19:04] AndroUser123: your code i mean
[22:19:20] matthewd: AndroUser123: That rather defeats the purpose of the exercise, does it not?
[22:19:42] Disavowed: I don't see how that can be the case if it's getting O(log n) - are there any writeups on the subject that you guys know of?
[22:19:53] Tralin: has joined #ruby
[22:20:16] JeanCarloMachado: has joined #ruby
[22:20:22] AndroUser123: but i got to study another subject this is just my hobby
[22:20:38] AndroUser123: and i am on this problem for 2 hours
[22:20:42] AndroUser123: i deserve an answer?
[22:21:27] allisio: Admit that you're not here to learn and we'll move forward on that premise.
[22:21:47] AndroUser123: i could admit it but that would be false
[22:22:13] Verity: I'm here to learn
[22:22:16] FooMunki: has joined #ruby
[22:22:37] baweaver: that's truth
[22:23:01] planigan: has joined #ruby
[22:23:34] Nightmare: has joined #ruby
[22:24:05] LBRapid: has joined #ruby
[22:24:27] AndroUser123: ok i will come here tomorrow if i dont solve this
[22:24:32] AndroUser123: thanks for everything
[22:24:59] charliesome: has joined #ruby
[22:27:07] planigan: has joined #ruby
[22:30:11] olivier__: has joined #ruby
[22:30:38] ascio: has joined #ruby
[22:31:36] olivier__: has joined #ruby
[22:32:28] jdm: has joined #ruby
[22:37:22] GodFather: has joined #ruby
[22:40:09] muelleme: has joined #ruby
[22:40:43] thulsa_legume[m]: has joined #ruby
[22:42:46] paulmcquad: has left #ruby: ()
[22:43:12] olivier__: has joined #ruby
[22:43:36] olivier__: has joined #ruby
[22:44:23] charliesome: has joined #ruby
[22:44:38] cagomez: I have an array with [{"foo": 1}, {"bar": 2}]. how would I pass this array to an object and use it to init the object with the values as properties, like myobj.foo, to equal their respective values? ie myobj.foo = 1, myobj.bar = 2, etc
[22:44:38] A124: Windows SSL certificates, how do I fix those?
[22:44:45] A124: For HTTPS.
[22:45:11] allisio: cagomez: Sounds like you "want" OpenStruct.
[22:45:57] Radar: allisio: cagomez: agree. [{"foo": 1}, {"bar": 2}].map { |r| OpenStruct.new(r) }
[22:46:30] Radar: Or if you want to be fancy: [{"foo": 1}, {"bar": 2}].map(&OpenStruct.method(:new))
[22:47:05] duckpupp1: has joined #ruby
[22:47:16] cagomez: allisio: I was trying to insantiate an object that i Would use as a viewmodel. how would i incorporate an openstruct into my viewmodel class? I just want to call myviewmodel.foo in my .erb file
[22:47:38] allisio: cagomez: What's wrong with `myviewmodel['foo']`?
[22:48:49] SeepingN: has joined #ruby
[22:49:13] cagomez: myviewmodel can have will be used for a 2 separate objects, which don't have the same attribute. but they will have separate .erb files. I would like to just use 1 viewmodel object
[22:51:14] D9: has joined #ruby
[22:52:02] djbkd: has joined #ruby
[22:52:06] lacrymology: has joined #ruby
[22:53:45] Disavowed: TIL Openstruct. Is this considered a good idiom? Because I feel like I'm going to use it everywhere!
[22:56:04] planigan: has joined #ruby
[22:57:30] allisio: >> require 'ostruct'; os = OpenStruct.new; os.to_s = 42; os.to_s
[22:57:31] ruby[bot]: allisio: # => "#<OpenStruct to_s=42>" (https://eval.in/759364)
[22:57:49] tolerablyjake: has joined #ruby
[22:58:07] allisio: It doesn't prioritize properties like it should.
[22:59:12] Disavowed: allisio: Sorry for being dense - prioritise how?
[22:59:49] allisio: Disavowed: I think that should evaluate to 42.
[23:02:27] AndChat-432276: has joined #ruby
[23:07:05] Disavowed: allisio: I'll take your word for it!
[23:07:46] enterprisey: has joined #ruby
[23:08:09] patarr: How do I get the error thrown from a expect {...}.to raise_error(WantedError)?
[23:10:55] Verity: what does the |n| part of these mean
[23:11:05] jaequery: has joined #ruby
[23:11:41] paradisaeidae: has joined #ruby
[23:11:48] paradisaeidae_: has joined #ruby
[23:12:53] bmurt: has joined #ruby
[23:14:58] Derperperd: has joined #ruby
[23:15:11] havenwood: >> [1, 2, 3].map { |n| n + 42 } # Verity: an example of #map a block argument
[23:15:12] ruby[bot]: havenwood: # => [43, 44, 45] (https://eval.in/759381)
[23:15:14] matthewd: patarr: IIRC you can call a method of some sort here: raise_error(..).something -- I think?
[23:15:43] havenwood: #map with a block arg*
[23:15:44] rakm: has joined #ruby
[23:16:11] Verity: it goes through and adds 42 to all the numbers
[23:16:14] allisio: Disavowed: Well, it's just that it's essentially Hash sugar.
[23:16:17] Verity: I cant just accept that though
[23:16:21] Verity: what is the name of the |n|
[23:16:26] Verity: and what is its purpose
[23:16:27] havenwood: Verity: it's a block argument
[23:16:28] elomatreb: Block argument
[23:16:47] nowhere_man: has joined #ruby
[23:16:48] Disavowed: allisio: I'm with you
[23:17:04] matthewd: Verity: It's the equivalent of (n) in `def foo(n); n + 42; end`
[23:17:07] Disavowed: Verity: Blocks are arguably one of Ruby's coolest features. We don't have them in Python-land
[23:17:36] Disavowed: Verity: Have you done this tutorial? Blocks are covered in part 4 of Ruby in 20 minutes: https://www.ruby-lang.org/en/documentation/quickstart/4/
[23:17:42] havenwood: Verity: while iterating through each element of the Array `n` is set to the current element
[23:18:18] Verity: ok I'll do that now
[23:18:22] Verity: I need to learn ruby tonight
[23:18:26] Verity: and make my project with it and not fail =D
[23:18:39] Verity: I've got 1 month of python and 1 year of C++
[23:18:44] Verity: 2 months c#
[23:18:51] Verity: ACTION watches
[23:19:00] Verity: its not a video
[23:19:01] Verity: ACTION reads
[23:19:13] havenwood: Verity: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/
[23:19:20] havenwood: Verity: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/
[23:19:42] havenwood: Verity: https://ruby-community.com/pages/links
[23:20:08] Uranio: has joined #ruby
[23:20:19] RenatoSilva: I need to learn ruby TONIGHT
[23:20:49] Verity: thank you
[23:20:54] Verity: havenwood,
[23:21:05] Verity: is that not possible, renatosilva ?
[23:21:15] Verity: I have 2 weeks, truth be told
[23:21:18] RenatoSilva: https://www.youtube.com/watch?v=6vMO3XmNXe4
[23:21:31] Verity: I just need to do that with ruby
[23:21:41] Verity: ACTION gasps
[23:21:44] Verity: I know ruby.
[23:24:09] millerti: has joined #ruby
[23:24:57] Verity: these guides are excellent
[23:25:02] Verity: perfect, even.
[23:30:45] ascio: has joined #ruby
[23:30:59] Lord_of_Life: has joined #ruby
[23:31:34] nobitanobi: has joined #ruby
[23:32:29] lacrymology: has joined #ruby
[23:35:36] iandeb: has joined #ruby
[23:36:21] Verity: I shgould probably create an array of strings to represent the packets
[23:36:29] Verity: and then turn them into bytes when I send them
[23:36:55] Verity: myStr.bytes.to_a
[23:37:22] matthewd: The thing that does the sending probably wants a string anyway
[23:38:21] Verity: it will be a a serial port library, then later tcp
[23:38:40] Verity: can I use a .net dll??
[23:38:44] Verity: I have a dll to calculate 8 bit crc
[23:38:52] Verity: I need to either use it or recreate that functionality
[23:39:43] agent_white: has joined #ruby
[23:40:20] ozcanesen: has joined #ruby
[23:40:30] Disavowed: Verity: zlib has a crc32 function - perhaps that will help?
[23:40:52] muelleme: has joined #ruby
[23:41:04] Disavowed: require 'zlib'; Zlib::crc32('Verity')
[23:41:24] Verity: I need 8 bit and matching generator polynomial
[23:41:50] Verity: I'll check that lib
[23:42:04] Disavowed: https://github.com/postmodern/digest-crc maybe
[23:45:15] br0d1n: has joined #ruby
[23:50:04] Derperperd: has joined #ruby
[23:52:14] Azure: has joined #ruby
[23:54:49] brent__: has joined #ruby
[23:55:01] olivier__: has joined #ruby
[23:55:22] dlitvak: has joined #ruby
[23:57:12] nertzy: has joined #ruby