« Back to channel list

#ruby - 12 November 2017

« Back 1 day Forward 1 day »
[00:15:30] kryptoz: has joined #ruby
[00:20:27] ruby[bot]: -b *!*@ool-457329d1.dyn.optonline.net$#ruby-banned
[00:22:03] ski7777: has joined #ruby
[00:24:50] jenrzzz: has joined #ruby
[00:32:36] gnoss: has joined #ruby
[00:34:29] bmurt: has joined #ruby
[00:35:43] ski7777: has joined #ruby
[00:36:24] milardovich: has joined #ruby
[00:39:12] muelleme: has joined #ruby
[00:45:34] charliesome: has joined #ruby
[00:47:37] houhoulis: has joined #ruby
[00:48:07] millz: has joined #ruby
[00:49:08] milardovich: has joined #ruby
[00:49:09] lunarkitty7: has joined #ruby
[00:50:08] shinnya: has joined #ruby
[00:51:37] edwardly: has joined #ruby
[00:51:37] edwardly: has joined #ruby
[00:53:00] cdg: has joined #ruby
[00:59:07] Technodrome: has joined #ruby
[00:59:56] ski7777: has joined #ruby
[01:05:17] Sparky2: has joined #ruby
[01:06:00] Sparky2: WHy is... not true or false = false?
[01:07:48] tamouse__2: how could it not be?
[01:14:53] Sparky2: tamouse__2: Ask this logic table
[01:17:40] NeverTired: has joined #ruby
[01:19:24] elomatreb: sparky2: We'll need a bit more. What's your question/problem?
[01:20:34] Sparky2: I'm supposed to be memorizing logic
[01:20:37] Sparky2: I got it though
[01:21:36] Sparky2: !(true || false) = false - because.. true || false = true so if not true or false, its false.. it can't be neither true or false
[01:21:54] Sparky2: I'm pretty sure that's how it works
[01:22:36] elomatreb: Is it !(true || false) or !true || false ?
[01:22:56] milardovich: has joined #ruby
[01:23:04] elomatreb: Because from the way you wrote it earlier it sounded like the latter, which still works due to the higher specificity of the NOT
[01:23:31] Hanmac: has joined #ruby
[01:23:41] cschneid_: has joined #ruby
[01:24:12] Sparky2: elomatreb: The first way
[01:25:09] elomatreb: >> !(true || false) # :)
[01:25:10] ruby[bot]: elomatreb: # => false (https://eval.in/898049)
[01:25:12] tamouse__2: it's false either way
[01:25:23] elomatreb: Yes, but by very different mechanisms
[01:26:17] waveprop: i know back at 1.9.3 open3 was a great way to execute system commands, is it still a good choice or do we have a better replacement now?
[01:26:36] ruby[bot]: https://i.stack.imgur.com/1Vuvp.png
[01:26:42] elomatreb: ^ There's a lot of ways
[01:27:49] waveprop: elomatreb: awesome flowchart. thanks
[01:28:22] enko: has joined #ruby
[01:28:23] elomatreb: Another factor you may want to consider is that some of these ways use a subshell to spawn the process, which means you might run into problems if you have user input or weird filenames
[01:28:56] elomatreb: Some of them (e.g. system and the popen variants) allow you to bypass the shell and execute the process directly if you pass in multiple arguments or an array, check the docs for that
[01:30:44] waveprop: wow, okay cool
[01:33:27] eightlimbed: has joined #ruby
[01:39:27] Devalo: has joined #ruby
[01:43:43] milardovich: has joined #ruby
[01:48:45] millz_: has joined #ruby
[01:54:20] cdg: has joined #ruby
[02:05:56] Technodrome: has joined #ruby
[02:09:57] s3nd1v0g1us: has joined #ruby
[02:10:22] ski7777: has joined #ruby
[02:25:33] milardovich: has joined #ruby
[02:30:29] nowhere_man: has joined #ruby
[02:34:58] jrafanie: has joined #ruby
[02:35:35] ski7777: has joined #ruby
[02:37:48] orbyt_: has joined #ruby
[02:38:21] Technodrome: has joined #ruby
[02:40:19] brucebag: has joined #ruby
[02:40:20] brucebag: has joined #ruby
[02:40:35] guacamole: has joined #ruby
[02:46:17] milardovich: has joined #ruby
[02:52:13] memo1: has joined #ruby
[02:58:13] d^sh: has joined #ruby
[03:08:02] [[thufir]]: has joined #ruby
[03:10:09] shoogz: has joined #ruby
[03:11:36] shoogz: has joined #ruby
[03:12:30] PaulCapestany: has joined #ruby
[03:17:09] Technodrome: has joined #ruby
[03:21:15] ahrs: has joined #ruby
[03:22:28] ski7777: has joined #ruby
[03:24:18] alfiemax_: has joined #ruby
[03:27:02] jrafanie: has joined #ruby
[03:27:37] milardovich: has joined #ruby
[03:35:02] kryptoz: has joined #ruby
[03:39:13] cschneid_: has joined #ruby
[03:41:16] jottr: has joined #ruby
[03:47:32] cdg_: has joined #ruby
[03:48:55] milardovich: has joined #ruby
[03:52:47] Jameser: has joined #ruby
[04:02:00] mson: has joined #ruby
[04:03:44] AxelAlex: has joined #ruby
[04:07:38] shinnya: has joined #ruby
[04:08:31] guacamole: has joined #ruby
[04:10:43] [[thufir]]1: has joined #ruby
[04:19:11] guacamole: has joined #ruby
[04:24:29] alex``: has joined #ruby
[04:29:02] Technodrome: has joined #ruby
[04:29:39] gix-: has joined #ruby
[04:37:25] ski7777: has joined #ruby
[04:40:40] uZiel: has joined #ruby
[04:49:55] waveprop: are non-rails ruby programming jobs common?
[04:50:48] ski7777: has joined #ruby
[04:52:24] matthewd: waveprop: I'd say non-web are unusual, but not incredibly rare
[04:53:12] waveprop: i guess devops jobs are like sysadmin with ruby
[04:53:28] waveprop: on a different note
[04:59:16] Yzguy: has joined #ruby
[04:59:22] mjolnird: has joined #ruby
[05:02:29] Xiti: has joined #ruby
[05:04:48] milardovich: has joined #ruby
[05:07:27] baweaver: waveprop: not really
[05:07:28] baweaver: DevOps is just the new word for SysAdmin
[05:07:37] baweaver: and Site Reliability Engineer is the same deal
[05:08:01] baweaver: Now people will swear up and down it's an empowering new philosophy and culture but really it's the same job at the end of the day.
[05:08:17] baweaver: Ruby and Python are both common in this arena
[05:08:38] waveprop: hahah it's true
[05:08:43] baweaver: Chef is one of the big names for Ruby ops work
[05:09:27] baweaver: My last job was writing the deployment pipeline for Playstation, though to be fair we did use Rails a lot for internal tools.
[05:10:31] baweaver: Now the running joke is that SysAdmin means Perl, DevOps means Ruby, and SRE means Python
[05:10:36] baweaver: it's not entirely wrong either :P
[05:11:27] baweaver: That said you probably want to learn a lot about cloud systems like AWS, container systems like Docker and Kubernetes, and a whole lot of other tools
[05:11:44] baweaver: the warning I would give is that in the wrong org Ops is incredibly unforgiving with little to no recognition unless something goes horribly wrong
[05:11:57] baweaver: so be careful hunting jobs because a lot of companies are not kind to their Ops.
[05:13:39] guacamole: has joined #ruby
[05:20:16] waveprop: baweaver: That's pretty cool you wrote that deployment pipeline
[05:20:43] baweaver: It was Rails hooked to the AWS SDK and later to the Google Cloud and other services
[05:20:58] baweaver: be warned that skipping on Rails won't make jobs any easier out there ;)
[05:21:26] waveprop: Yeah, that's the joke I was referencing. But the version i heard 'DevOps: sysadmins with Ruby. Site Reliability Engineers: sysadmins with go. Sysadmins: sysadmins with perl.'
[05:21:26] baweaver: DevOps type jobs just mean you need to know a whole lot about Unix systems as well
[05:21:41] baweaver: Ah, they're saying Go now?
[05:21:48] baweaver: Makes sense
[05:22:30] baweaver: Not a big fan of Go myself, but that's rather immaterial.
[05:22:32] waveprop: Very cool. I have wondered if orgs would move from aws to google
[05:22:44] baweaver: The main reason we looked into it was cost
[05:22:49] baweaver: AWS is the entire package
[05:22:59] eightlimbed: has joined #ruby
[05:23:27] baweaver: Google was a lot lighter weight which meant all the magic we got from AWS didn't transfer over and we'd have to write it
[05:23:28] baweaver: Cost isn't always about the $$$
[05:23:45] baweaver: Often times it's about opportunity cost as well, namely how long does it take our devs to write this themselves?
[05:23:56] baweaver: and for most shops the answer is painfully long or impossible
[05:24:21] waveprop: Nice. I worked as a linux sysadmin supporting Apache Cloudstack several years ago and I also have some AWS experience
[05:24:53] baweaver: Looking for a new gig?
[05:25:07] waveprop: Very good point. Replicating what AWS does would not be trivial
[05:25:38] baweaver: depending on where you're at I may know a few people about
[05:25:48] milardovich: has joined #ruby
[05:26:38] baweaver: Ironically though the sysadmin type spot I know of at $WORK involves Rails fairly heavily for inventory and they want someone who knows it :P
[05:26:52] waveprop: baweaver: Yeah. Background is linux admin and then i took a year to grok security, got my OSCP from offsec. Now i'm spending some time trying to get better at Ruby, but my savings are almost gone, so I have to find a gig.
[05:27:26] baweaver: Mind if I PM?
[05:27:33] waveprop: Ha. Nice. Yes unfortunately I am not super familiar with rails yet.
[05:27:38] waveprop: For sure, pm
[05:28:45] Freshnuts: has joined #ruby
[05:29:46] baweaver: Fun side note, writing an entire illustrated guide to Ruby: https://www.gitbook.com/book/baweaver/an-illustrated-guide-to-ruby/details
[05:29:52] baweaver: Think Learn You a Haskell with Ruby
[05:29:58] baweaver: Still super Alpha and WIP though
[05:30:17] baweaver: It's my NaNoWriMo project :D
[05:30:23] baweaver: havenwood is helping out too :D
[05:31:52] ski7777: has joined #ruby
[05:33:17] jackjackdripper: has joined #ruby
[05:38:30] Yzguy: has joined #ruby
[05:42:06] jottr: has joined #ruby
[05:46:30] milardovich: has joined #ruby
[05:52:52] cdg: has joined #ruby
[05:54:37] [[thufir]]: has joined #ruby
[05:56:15] cloaked1: has joined #ruby
[06:01:09] tamouse__: has joined #ruby
[06:12:41] NightMonkey: has joined #ruby
[06:15:45] Yzguy: Gooood Evening
[06:27:14] ski7777: has joined #ruby
[06:28:14] tamouse__: has joined #ruby
[06:28:21] milardovich: has joined #ruby
[06:32:07] tamouse__: has left #ruby: ()
[06:41:34] ski7777: has joined #ruby
[06:51:01] zipace: has joined #ruby
[06:51:44] guacamole: has joined #ruby
[07:04:24] [[thufir]]: has joined #ruby
[07:05:44] mjolnird: has joined #ruby
[07:09:23] govg: has joined #ruby
[07:09:38] milardovich: has joined #ruby
[07:11:20] Technodrome: has joined #ruby
[07:13:08] enterprisey: has joined #ruby
[07:18:13] kryptoz: has joined #ruby
[07:18:43] ziprar: has joined #ruby
[07:26:38] Technodrome: has joined #ruby
[07:30:58] milardovich: has joined #ruby
[07:34:17] ski7777: has joined #ruby
[07:37:05] Technodrome: has joined #ruby
[07:37:54] dinfuehr: has joined #ruby
[07:39:25] ledestin: has joined #ruby
[07:39:52] tamouse__2: has joined #ruby
[07:41:16] RickHull: sysadmins were not expected to be programmers 10 years ago, aside from maybe hacking together bash scripts
[07:41:40] RickHull: they might run the svn/cvs server but rarely made commits
[07:42:00] rippa: has joined #ruby
[07:42:52] iamarun: has joined #ruby
[07:42:55] jottr: has joined #ruby
[07:43:29] RickHull: most programmers made reasonable-enough sysadmins for the infra they cared about. you could have programmers running their own svn server
[07:44:26] RickHull: but not the active directory / LDAP for other parts of the org
[07:46:36] RickHull: i look at devops / SRE as the natural fusion that is implied, by people who care about services, operations, uptime
[07:46:53] RickHull: and people who care about developer productivity, and maybe even some line of business dev on the side
[07:47:19] RickHull: some more sysadmin, some more architecture, and some more automation and infrastructure-as-code
[07:47:22] uZiel: has joined #ruby
[07:48:10] Technodrome: has joined #ruby
[07:52:29] uZiel: has joined #ruby
[07:57:36] uZiel: has joined #ruby
[07:57:47] JsilverT: has joined #ruby
[07:58:51] Technodrome: has joined #ruby
[08:03:48] iamarun: has joined #ruby
[08:04:26] dinfuehr: has joined #ruby
[08:09:47] Technodrome: has joined #ruby
[08:10:47] imode: has joined #ruby
[08:12:15] milardovich: has joined #ruby
[08:13:12] marr: has joined #ruby
[08:20:36] Jameser: has joined #ruby
[08:21:52] muelleme: has joined #ruby
[08:23:36] ski7777: has joined #ruby
[08:33:33] milardovich: has joined #ruby
[08:35:00] uZiel: has joined #ruby
[08:36:47] Exhiled: has joined #ruby
[08:44:35] cdg: has joined #ruby
[08:45:59] ski7777: has joined #ruby
[08:50:39] Yzguy: has joined #ruby
[08:52:50] [[thufir]]: has joined #ruby
[08:53:12] duderonomy: has joined #ruby
[09:01:35] mtkd: has joined #ruby
[09:08:57] apparition: has joined #ruby
[09:08:58] tAn: has joined #ruby
[09:11:14] uZiel: has joined #ruby
[09:11:25] [[thufir]]: has joined #ruby
[09:12:57] [[thufir]]: has joined #ruby
[09:14:14] alfiemax: has joined #ruby
[09:15:04] sunrunner20: has joined #ruby
[09:15:28] alveric: has joined #ruby
[09:16:24] uZiel: has joined #ruby
[09:17:04] Antiarc: has joined #ruby
[09:18:18] JsilverT: has joined #ruby
[09:18:26] ur5us: has joined #ruby
[09:19:28] heftig: has joined #ruby
[09:27:35] yqt: has joined #ruby
[09:30:00] alfiemax_: has joined #ruby
[09:34:47] biberu: has joined #ruby
[09:41:32] tamouse__2: has joined #ruby
[09:42:05] claudiuinberlin: has joined #ruby
[09:42:27] petto: has joined #ruby
[09:44:01] jottr: has joined #ruby
[09:57:00] milardovich: has joined #ruby
[09:59:02] raatiniemi: has joined #ruby
[10:01:14] dhollin3: has joined #ruby
[10:05:53] quobo: has joined #ruby
[10:19:32] Defenestrate: has joined #ruby
[10:19:45] Defenestrate: has joined #ruby
[10:22:17] Aces1up: has joined #ruby
[10:22:49] Aces1up: anyone know of a cool math gem that can parse language math statements? ex. two plus 5 times six
[10:23:44] ShalokShalom_: has joined #ruby
[10:26:02] dviola: has joined #ruby
[10:26:03] conta: has joined #ruby
[10:26:31] jottr: has joined #ruby
[10:27:09] xco: has joined #ruby
[10:29:36] tomphp: has joined #ruby
[10:31:09] michael3: has joined #ruby
[10:31:37] r3kz: has joined #ruby
[10:36:49] mikecmpbll: has joined #ruby
[10:38:45] milardovich: has joined #ruby
[10:41:32] ski7777: has joined #ruby
[10:42:26] kapil___: has joined #ruby
[10:43:14] InfinityFye: has joined #ruby
[10:43:15] [[thufir]]: has joined #ruby
[10:58:14] zautomata: has joined #ruby
[10:59:31] milardovich: has joined #ruby
[11:00:13] ltem: has joined #ruby
[11:00:25] cdg: has joined #ruby
[11:09:40] ski7777: has joined #ruby
[11:16:52] milardovich: has joined #ruby
[11:21:18] cdg: has joined #ruby
[11:24:03] ski7777: has joined #ruby
[11:28:43] zautomata1: has joined #ruby
[11:29:11] karapetyan: has joined #ruby
[11:29:41] zautomata1: has left #ruby: ()
[11:32:00] Jameser: has joined #ruby
[11:37:40] michael3: has joined #ruby
[11:39:20] charliesome: has joined #ruby
[11:42:23] Psybur: has joined #ruby
[11:42:48] tamouse__2: has joined #ruby
[11:43:06] lele: has joined #ruby
[11:49:50] banisterfiend: has joined #ruby
[11:58:52] Jameser: has joined #ruby
[12:09:47] ski7777: has joined #ruby
[12:11:16] r3kz: has left #ruby: ()
[12:12:20] rajno: has joined #ruby
[12:24:32] GodFather_: has joined #ruby
[12:28:42] JsilverT: has joined #ruby
[12:33:13] tamouse__2: has joined #ruby
[12:39:52] alfiemax: has joined #ruby
[12:40:28] milardovich: has joined #ruby
[12:40:54] ski7777: has joined #ruby
[12:41:03] kitsunenokenja: has joined #ruby
[12:42:02] cdg: has joined #ruby
[12:51:32] ^mtkd: has joined #ruby
[12:55:30] Jameser: has joined #ruby
[12:57:38] cdg: has joined #ruby
[13:01:07] milardovich: has joined #ruby
[13:09:52] ski7777: has joined #ruby
[13:18:14] Jameser: has joined #ruby
[13:27:57] alfiemax: has joined #ruby
[13:28:43] Defenestrate: has joined #ruby
[13:33:12] nhhc: has joined #ruby
[13:33:18] nhhc__: has joined #ruby
[13:33:18] nhhc_: has joined #ruby
[13:35:47] Devalo: has joined #ruby
[13:36:29] banisterfiend: has joined #ruby
[13:41:46] Devalo: has joined #ruby
[13:43:21] Jameser: has joined #ruby
[13:45:46] ski7777: has joined #ruby
[13:48:43] cdg: has joined #ruby
[13:53:21] alfiemax: has joined #ruby
[13:53:39] tomphp: has joined #ruby
[14:01:16] veeti: has joined #ruby
[14:08:34] petto: has joined #ruby
[14:10:07] tomphp: has joined #ruby
[14:14:19] memo1: has joined #ruby
[14:17:40] milardovich: has joined #ruby
[14:18:36] michael3: has joined #ruby
[14:21:54] banisterfiend: has joined #ruby
[14:23:07] Prutheus: has joined #ruby
[14:24:01] Prutheus: Hey. I have a very simple ruby program which want's to reads an image dimensions (works) and then using rmagick to scale it. worked before i have installed nvidia drivers on my archlinux system. now I get a core dump. https://bpaste.net/show/8465cf1f0350
[14:24:18] Prutheus: can somebody help me please. need to fix that fast or the script can't run what would be a big pain for my company
[14:27:58] fnord_: has joined #ruby
[14:28:59] Prutheus: fixed by setting env variable to MAGICK_OCL_DEVICE=OFF
[14:34:53] conta: has joined #ruby
[14:45:13] cadillac_: has joined #ruby
[14:46:39] CrazyEddy: has joined #ruby
[14:48:08] tomphp: has joined #ruby
[14:50:08] d^sh: has joined #ruby
[14:54:11] goyox86: has joined #ruby
[14:58:00] tomphp: has joined #ruby
[14:58:39] millz: has joined #ruby
[15:00:02] DLSteve: has joined #ruby
[15:04:29] mtkd: has joined #ruby
[15:09:38] tAn: has joined #ruby
[15:11:21] teej: has joined #ruby
[15:13:41] johno84: has joined #ruby
[15:13:59] tomphp: has joined #ruby
[15:14:28] kobain: has joined #ruby
[15:19:11] bluefrog20: has joined #ruby
[15:20:08] tomphp: has joined #ruby
[15:21:30] Technodrome: has joined #ruby
[15:21:51] tomphp: has joined #ruby
[15:22:05] bluefrog20: has left #ruby: ("Leaving")
[15:25:41] ledestin: has joined #ruby
[15:35:24] cdg: has joined #ruby
[15:35:30] zautomata: has joined #ruby
[15:37:51] goyox86_: has joined #ruby
[15:42:17] goyox86__: has joined #ruby
[15:42:21] Psybur: has joined #ruby
[15:43:25] Devalo: has joined #ruby
[15:46:01] tristanp: has joined #ruby
[15:51:19] m27frogy: has joined #ruby
[15:55:07] tristanp: has joined #ruby
[15:58:05] cadillac_: has joined #ruby
[15:58:43] kitsunenokenja: has joined #ruby
[15:58:56] elphe: has joined #ruby
[16:01:32] tristanp: has joined #ruby
[16:04:43] muelleme: has joined #ruby
[16:05:17] dinfuehr: has joined #ruby
[16:25:02] PaulCape_: has joined #ruby
[16:30:23] bronson: has joined #ruby
[16:31:55] jottr_: has joined #ruby
[16:33:47] mson: has joined #ruby
[16:35:44] cdg: has joined #ruby
[16:36:28] alfiemax: has joined #ruby
[16:39:17] milardovich: has joined #ruby
[16:42:42] Devalo: has joined #ruby
[16:42:43] xco: has joined #ruby
[16:43:35] orbyt_: has joined #ruby
[16:45:42] uZiel: has joined #ruby
[16:54:17] nadir: has joined #ruby
[17:05:05] Technodrome: has joined #ruby
[17:07:57] ski7777: has joined #ruby
[17:08:58] s3nd1v0g1us: has joined #ruby
[17:16:03] kryptoz: has joined #ruby
[17:28:43] dviola: has joined #ruby
[17:39:20] imode: has joined #ruby
[17:42:31] qqmash: has joined #ruby
[17:49:53] houhoulis: has joined #ruby
[17:51:22] nmingotti: has joined #ruby
[17:53:54] nmingotti: Hi there, I has a simple question, when type a variable in irb pointing to an object whose class I defined I see (1) name of the Class (2) address of the object (3) attributes of the object. I would like not to see by default the attributes. How can I do that ?
[17:54:07] michael3: has joined #ruby
[17:56:26] mavriq: has joined #ruby
[17:57:21] mavriq: I can't seem to start my jekyll serve function, it says 'block in materialize could not find rake 10.4.2' .. can I just simply install that to rid this pain and get coding? / roobynoob
[17:58:03] nmingotti: I tried "to_s" but it is not working, It gives what i expect with "print" but not in "irb"
[18:25:14] jottr_: has joined #ruby
[18:25:33] raynold: has joined #ruby
[18:25:57] apeiros: nmingotti: you can change pry's configuration to use something else than #inspect on the return value
[18:26:06] apeiros: err, *irb*'s config
[18:26:31] apeiros: I don't know the config by heart, but I'd google for something like "irb prompt"
[18:28:45] apeiros: it's probably IRB.conf[:INSPECT_MODE]
[18:29:51] apeiros: hrm, seems you can't provide a custom inspect routine :-(
[18:29:57] apeiros: switch to pry then :D
[18:36:34] Lytol: has joined #ruby
[18:38:20] houhoulis: has joined #ruby
[18:41:23] larcara: has joined #ruby
[18:44:06] Devalo: has joined #ruby
[18:44:18] milardovich: has joined #ruby
[18:45:36] ltem: has joined #ruby
[18:46:07] millz: has joined #ruby
[18:49:06] quobo: has joined #ruby
[18:49:21] Technodrome: has joined #ruby
[18:50:47] ledestin: has joined #ruby
[18:50:55] orbyt_: has joined #ruby
[18:54:17] Dimik: has joined #ruby
[18:56:54] cadillac_: has joined #ruby
[18:58:46] conta: has joined #ruby
[19:00:23] Hanmac: has left #ruby: ()
[19:00:45] Asher: has joined #ruby
[19:02:47] guacamole: has joined #ruby
[19:04:02] JBbanks: has joined #ruby
[19:08:24] dreinull: has joined #ruby
[19:09:54] dreinull: I know, it's out of curiosity, how would I go about and create a class name that has a dot in it? like class MyClass.org; end?
[19:10:44] c-c_: How to get shell to pry running on a daemon?
[19:10:54] tobiasvl: dreinull: uh, I don't think you can?
[19:11:05] jhass: dreinull: class MyClass; def name; "MyClass.org"; end; end; :P
[19:11:16] jhass: * def self.name
[19:11:22] nmingotti: Somebody answered my question in StackOverflow, I put here the link for reference to other who may be interested. https://goo.gl/xxs9vj
[19:11:28] tobiasvl: jhass: clever
[19:12:31] nmingotti: The key is the "inspect" method. bye
[19:12:32] dreinull: jhass can't create objects with that tho
[19:14:03] dminuoso: dreinull: Let's analyze what class does.
[19:14:15] dminuoso: dreinull: class Foo; end; is about the same as Foo = Class.new
[19:14:27] dminuoso: So it just creates a const named "Foo", and assigns it the value of a constructed class.
[19:15:21] dminuoso: dreinull: So now the question becomes, can constants have "dots" in their name
[19:15:28] dminuoso: >> Kernel.const_set("F.o", 1)
[19:15:29] ruby[bot]: dminuoso: # => wrong constant name F.o (NameError) ...check link for more (https://eval.in/898309)
[19:16:03] jhass: dreinull: MyClass.new sure works
[19:17:04] dminuoso: jhass: You just gave me an idea.
[19:18:00] dminuoso: new = -> (klass, arg) { klass.new(arg) }.curry
[19:18:02] dminuoso: this should be a thing!
[19:18:17] dminuoso: In my library
[19:18:20] jhass: def self.org; self; end ?
[19:18:55] dminuoso: new = -> (klass, args) { unapply(klass.new).*(arg) }.curry
[19:19:17] dminuoso: *apply rather
[19:19:29] jhass: so actually class MyClass; def self.org; self; end; def self.name; "MyClass.org"; end; end; should fake it pretty good
[19:20:19] c-c_: hehe I guess thats actually a shell question
[19:20:41] dreinull: jhass dminuoso ha :) that'll do. Great guys!
[19:20:56] konsolebox: has joined #ruby
[19:21:23] selim: has joined #ruby
[19:22:11] weaksauce: has joined #ruby
[19:23:04] dminuoso: jhass: https://gist.github.com/dminuoso/f682233f12e85548e970059ba18b3967
[19:23:06] dminuoso: this is amazing.
[19:24:11] sagax: has joined #ruby
[19:24:24] jhass: I don't get it and not even ashamed of that :P
[19:24:57] dreinull: never heard of defc
[19:25:07] milardovich: has joined #ruby
[19:25:30] dminuoso: jhass: Never wanted to do something like make = Range.new; [[1,2],[3,4]].map(&:make) ?
[19:25:49] dminuoso: dreinull: Or well rather:
[19:26:05] jhass: mh. reminds me of java style function references
[19:26:13] dminuoso: [[1,2],[3,4]].map(&Range.new)
[19:26:33] dreinull: what's that & do?
[19:26:34] jhass: but not sure I ever wanted :D
[19:26:42] dminuoso: dreinull: It's the proc<>block conversion operator
[19:27:08] dreinull: ok, this is where I'm usually getting lost.
[19:27:21] dminuoso: dreinull: in parameter position it binds a block to a named proc object, and in argument position it converts a proc to a block
[19:27:39] dreinull: I have no problem getting my head around weird metaprogramming but procs and blocks ...
[19:27:54] dminuoso: dreinull: def f(&bar); end just binds incoming blocks to a Proc object, and stuffs it into bar.
[19:28:06] dminuoso: dreinull: (a proc is just a reified block)
[19:28:18] dminuoso: This you probably frequently do.
[19:28:45] dreinull: yes, but still. Doing and understanding is two different things
[19:28:51] dminuoso: And when you have another method like Array#map which expects a block (but not a proc argument!), you can convert a proc back into a block by doing: arr.map(&some_proc)
[19:29:49] HTTP_____GK1wmSU: has joined #ruby
[19:30:25] NightMonkey: has joined #ruby
[19:30:27] dreinull: I need a glas of wine
[19:30:29] cadillac_: has joined #ruby
[19:31:14] dminuoso: dreinull: And & is actually capable of converting anything into a block, as long as it supports to_proc
[19:31:22] fuzzyhorns: has joined #ruby
[19:31:24] dminuoso: [1,2,3].map(&:to_s)
[19:31:39] dminuoso: This works because Symbol has an instance method to_proc (which builds a proc from itself)
[19:32:18] dminuoso: class Integer; def to_proc; -> (e) { e[self] }; end; [[1,2], [3,4]].map(&0)
[19:32:19] dminuoso: >> class Integer; def to_proc; -> (e) { e[self] }; end; [[1,2], [3,4]].map(&0)
[19:32:20] ruby[bot]: dminuoso: # => /tmp/execpad-500af017e8d0/source-500af017e8d0:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/898326)
[19:32:24] dminuoso: >> class Integer; def to_proc; -> (e) { e[self] }; end; end; [[1,2], [3,4]].map(&0)
[19:32:26] ruby[bot]: dminuoso: # => [1, 3] (https://eval.in/898329)
[19:34:21] dreinull: neato. I need to read up on that again.
[19:35:25] dminuoso: And the symbol implementation is essentially just: class Symbol; def to_proc; -> (o) { o.public_send(self) }; end; end
[19:35:38] jottr: has joined #ruby
[19:38:23] milardovich: has joined #ruby
[19:46:56] hashrocket: has joined #ruby
[19:47:47] zanoni: has joined #ruby
[19:49:53] larcara: has joined #ruby
[19:53:43] tomphp: has joined #ruby
[19:56:04] nicesignal: has joined #ruby
[19:56:47] yabbes_: has joined #ruby
[19:58:09] sleepee: has joined #ruby
[19:58:19] c0dec: has joined #ruby
[19:58:47] kitsunenokenja: has joined #ruby
[19:59:39] jrafanie: has joined #ruby
[20:02:18] john__: has joined #ruby
[20:05:10] enterprisey: has joined #ruby
[20:07:42] Puffball: has joined #ruby
[20:08:35] yokel: has joined #ruby
[20:10:20] petto: has joined #ruby
[20:10:43] hfp_work: has joined #ruby
[20:12:27] ur5us: has joined #ruby
[20:13:04] jamesaxl: has joined #ruby
[20:16:38] larcara: has joined #ruby
[20:18:44] swills: has joined #ruby
[20:18:45] swills: has joined #ruby
[20:22:14] alex``: has joined #ruby
[20:22:50] jamesaxl: has joined #ruby
[20:25:18] cadillac_: has joined #ruby
[20:29:25] tomphp: has joined #ruby
[20:34:24] marr: has joined #ruby
[20:34:44] cadillac_: has joined #ruby
[20:36:43] john__: has joined #ruby
[20:39:00] [[thufir]]: has joined #ruby
[20:52:40] kitsunenokenja: has joined #ruby
[20:54:04] enterprisey: has joined #ruby
[20:54:24] kobain: has joined #ruby
[20:59:34] cadillac_: has joined #ruby
[20:59:52] Exhiled: has joined #ruby
[21:18:42] Exhiled: has joined #ruby
[21:22:24] weaksauce: has joined #ruby
[21:24:48] Exhiled: has joined #ruby
[21:26:13] jottr: has joined #ruby
[21:31:34] SCHAPiE: has joined #ruby
[21:36:23] sleepee: has joined #ruby
[21:36:57] ap4y: has joined #ruby
[21:43:23] ap4y: has joined #ruby
[21:47:54] elphe: has joined #ruby
[21:54:20] memo1: has joined #ruby
[22:00:15] ap4y1: has joined #ruby
[22:02:16] jottr: has joined #ruby
[22:03:18] PaulCapestany: has joined #ruby
[22:03:58] goyox86__: has joined #ruby
[22:04:02] dviola: has joined #ruby
[22:05:12] goyox86: has joined #ruby
[22:05:43] Asher1: has joined #ruby
[22:09:41] jottr_: has joined #ruby
[22:16:18] wald0: has joined #ruby
[22:19:12] dviola: has joined #ruby
[22:19:44] dviola: has joined #ruby
[22:21:22] Psybur: has joined #ruby
[22:23:14] Psybur: has joined #ruby
[22:23:53] AX31_A13X: has joined #ruby
[22:28:40] ^mtkd: has joined #ruby
[22:30:22] Psybur: has joined #ruby
[22:37:11] nicesignal: has joined #ruby
[22:42:28] apeiros: has joined #ruby
[22:45:10] tristanp: has joined #ruby
[22:46:23] Psybur: has joined #ruby
[22:48:08] Psybur: has joined #ruby
[22:49:52] Psybur: has joined #ruby
[22:51:10] bronson: has joined #ruby
[22:52:53] sleepee: has joined #ruby
[22:56:13] goyox86_: has joined #ruby
[22:58:09] nowhere_man: has joined #ruby
[23:00:04] cschneid_: has joined #ruby
[23:01:39] bronson: has joined #ruby
[23:01:47] cdg: has joined #ruby
[23:01:56] plexigras: has joined #ruby
[23:03:33] plexigras: is there a begginer guide made out of ruby files i can execute and read the comments?
[23:04:43] Zarthus: there's a ruby tutorial on the site
[23:05:20] plexigras: yes i did that but i want files i can manipulate and play with
[23:05:44] dminuoso: plexigras: There is also
[23:05:46] ruby[bot]: You can find a list of recommended books at http://ruby-community.com/pages/links
[23:05:55] dminuoso: Mmm, the topic has a bit more up-to-date link
[23:07:48] orbyt_: has joined #ruby
[23:09:28] jrafanie: has joined #ruby
[23:09:31] apeiros: has joined #ruby
[23:09:32] thinkpad: has joined #ruby
[23:09:37] plexigras: im gonna take a look at ruby koans
[23:11:04] charliesome: has joined #ruby
[23:12:09] milardovich: has joined #ruby
[23:13:58] milardovich: has joined #ruby
[23:15:15] apeiros: has joined #ruby
[23:16:05] Defenestrate: has joined #ruby
[23:27:51] jackjackdripper: has joined #ruby
[23:33:38] naprimer3: has joined #ruby
[23:36:06] lupine: has joined #ruby
[23:36:29] minimalism: has joined #ruby
[23:41:21] apeiros: has joined #ruby
[23:44:58] PaulCapestany: has joined #ruby
[23:45:05] brian_penguin: has joined #ruby
[23:51:27] houhoulis: has joined #ruby
[23:52:29] cschneid_: has joined #ruby
[23:58:48] Technodrome: has joined #ruby