« Back to channel list

#ruby - 12 June 2016

« Back 1 day Forward 1 day »
[00:03:11] flashpoint9: has joined #ruby
[00:04:16] binaryplease1: has joined #ruby
[00:06:50] agent_white: has joined #ruby
[00:07:40] edwardly: has joined #ruby
[00:07:40] edwardly: has joined #ruby
[00:09:08] Guest17372: has joined #ruby
[00:09:15] jaguarmagenta: has joined #ruby
[00:11:22] Coldblackice: has joined #ruby
[00:12:03] nankyokusei: has joined #ruby
[00:17:28] JazzyVariable227: has joined #ruby
[00:18:53] agent_white: has joined #ruby
[00:19:35] agent_white: Evenin' folks
[00:20:08] der-landgraf: has joined #ruby
[00:20:46] davedev24: has joined #ruby
[00:22:17] duckpupp1: has joined #ruby
[00:22:45] ergobfmv: has joined #ruby
[00:24:24] yfeldblum: has joined #ruby
[00:26:06] giz|work|2: has joined #ruby
[00:29:08] fedruantine: has joined #ruby
[00:30:58] arescorpio: has joined #ruby
[00:31:29] hightower2: has joined #ruby
[00:35:43] kavanagh: has joined #ruby
[00:37:18] certainty: has joined #ruby
[00:37:42] aryaching: has joined #ruby
[00:38:20] Rodya_: has joined #ruby
[00:43:09] ElFerna: has joined #ruby
[00:43:16] jackjackdripper: has joined #ruby
[00:46:58] flashpoint9: has joined #ruby
[00:47:36] ciampix: has joined #ruby
[00:47:49] Niham: has joined #ruby
[00:48:47] sphex_: has joined #ruby
[00:50:23] ElFerna: has joined #ruby
[00:50:56] snath: has joined #ruby
[00:51:44] yfeldblum: has joined #ruby
[00:51:47] Vingador: has joined #ruby
[00:54:59] TubaraoSardinha: has joined #ruby
[00:55:35] jackjackdripper: has joined #ruby
[00:56:05] Vingador_: has joined #ruby
[00:59:56] Niham: has joined #ruby
[01:01:12] panpainter: has joined #ruby
[01:01:18] agent_white: has joined #ruby
[01:01:43] anurajm: has joined #ruby
[01:02:34] Niham: has joined #ruby
[01:02:59] ekinmur: has joined #ruby
[01:03:53] Vingador: has joined #ruby
[01:06:46] aryaching: has joined #ruby
[01:07:23] Vingador: has joined #ruby
[01:11:47] Vingador: has joined #ruby
[01:12:12] Vingador: has joined #ruby
[01:12:38] Coldblackice: has joined #ruby
[01:13:05] segy: has joined #ruby
[01:15:37] pawnbox: has joined #ruby
[01:18:16] segy: has joined #ruby
[01:19:06] helpa: has joined #ruby
[01:21:41] flashpoint9: has joined #ruby
[01:22:38] segy: has joined #ruby
[01:22:49] flashpoi_: has joined #ruby
[01:23:00] AcidCras_: has joined #ruby
[01:23:06] palms: has joined #ruby
[01:26:35] hutch34: has joined #ruby
[01:27:12] vdamewood: has joined #ruby
[01:27:28] benlieb: has joined #ruby
[01:28:19] panpainter: has joined #ruby
[01:29:46] roamingdog: has joined #ruby
[01:30:51] segy: has joined #ruby
[01:32:42] CloCkWeRX: has joined #ruby
[01:38:00] certainty: has joined #ruby
[01:41:21] segy: has joined #ruby
[01:43:57] yfeldblum: has joined #ruby
[01:45:19] segy: has joined #ruby
[01:46:47] Vingador: has joined #ruby
[01:48:41] lightt: has joined #ruby
[01:50:20] m_antis: has joined #ruby
[01:50:59] pepee: has joined #ruby
[01:54:46] ncthom91: has joined #ruby
[01:54:57] AustinMatherne: has joined #ruby
[01:54:58] Vingador: has joined #ruby
[01:55:23] Vingador: has joined #ruby
[01:57:06] Yiota: has joined #ruby
[01:57:57] segy: has joined #ruby
[02:00:04] palms: has joined #ruby
[02:01:28] AustinMatherne: has joined #ruby
[02:02:18] panpainter: has joined #ruby
[02:07:05] shevy: yo agent_white
[02:14:34] pilne: i know the "... the hard way tutorials" have their flaws, but is what the author says about "for X in Y" type loops being "broken intentionally" true? I'm not uncomfortable with the each syntax, just curious about that statement.
[02:17:48] dobbee: has joined #ruby
[02:18:11] shevy: if it is valid ruby syntax it goes
[02:18:17] shevy: but it is not very idiomatic or common
[02:18:24] shevy: when you can already use .each or variants of it
[02:20:06] ncthom91: has joined #ruby
[02:23:01] duckpupp1: has joined #ruby
[02:24:15] johnDoe111: has joined #ruby
[02:26:00] pilne: i understand that (maybe it was different at the time of writing?), the author just stated directly "They went so far as to break the for-each version of looping so that there are problems with using it, forcing you to conform to their culture." so I was curious.
[02:26:55] haraigoshi: has joined #ruby
[02:27:04] pilne: i know the guy is highly opinionated, so i saw that and raised an eyebrow, because "intentionally breaking" something seems very anti-ruby to me, depreciate, yes, break no.
[02:27:24] rehat: has joined #ruby
[02:28:40] JazzyVariable227: has joined #ruby
[02:33:26] panpainter: has joined #ruby
[02:36:58] kspencer: has joined #ruby
[02:37:00] shevy: he is very opinionated
[02:38:27] shevy: in general it would strike me as better to use a tutorial written by someone who also actually uses the language. admittedly though the amount of people who wriet a tutorial in the first place, is very very small compared to all those who do use a language
[02:38:51] certainty: has joined #ruby
[02:38:53] haraigoshi: has joined #ruby
[02:43:02] karmatr0n: has joined #ruby
[02:43:44] skweek: has joined #ruby
[02:44:32] xxneolithicxx: has joined #ruby
[02:47:07] GaryKing: has joined #ruby
[02:48:35] ur5us: has joined #ruby
[02:49:38] pilne: its not my only tutorial, nor my first, i just needed something kinda productive, but not too mentally taxing to take on tonight :)
[02:49:58] armyriad: has joined #ruby
[02:50:04] pilne: and i was like "what better tutorial author to follow when drunk?" lol.
[02:52:49] bluOxigen: has joined #ruby
[02:57:09] ur5us: has joined #ruby
[03:00:11] sandstrom: has joined #ruby
[03:01:23] snath: has joined #ruby
[03:02:16] Niham: has joined #ruby
[03:02:54] jord-n: has joined #ruby
[03:03:06] PaulCape_: has joined #ruby
[03:03:20] kotk: has joined #ruby
[03:04:21] haraigoshi: has joined #ruby
[03:07:08] pawnbox: has joined #ruby
[03:07:51] shevy: my favourite format was https://pine.fm/LearnToProgram/chap_01.html
[03:07:55] shevy: but it needs to be updated and extended
[03:11:39] dcunit3d: has joined #ruby
[03:11:50] pilne: there is a second edition for sale as a book it would seem
[03:14:19] xlegoman: has joined #ruby
[03:16:17] braincrash: has joined #ruby
[03:20:50] jenrzzz: has joined #ruby
[03:21:10] k3rn31: has joined #ruby
[03:27:43] haraigoshi: has joined #ruby
[03:27:50] PaulCapestany: has joined #ruby
[03:29:41] CircleDot: has joined #ruby
[03:32:11] SuperLag: has joined #ruby
[03:32:38] blackmesa: has joined #ruby
[03:33:53] Canucktux: has joined #ruby
[03:35:37] jenrzzz: has joined #ruby
[03:35:37] jenrzzz: has joined #ruby
[03:37:55] kspencer: has joined #ruby
[03:38:03] mistermocha: has joined #ruby
[03:39:13] freerobby: has joined #ruby
[03:39:24] ruby[bot]: -b *!*@gateway/web/cgi-irc/kiwiirc.com/ip.23.105.140.102$#ruby-banned
[03:39:36] certainty: has joined #ruby
[03:43:56] karmatr0n: has joined #ruby
[03:44:32] gix: has joined #ruby
[03:47:14] pontiki: has joined #ruby
[03:48:20] howdoi: has joined #ruby
[03:48:22] hk238: has joined #ruby
[03:54:02] panpainter: has joined #ruby
[03:54:19] PaulCape_: has joined #ruby
[03:54:54] zacts: has joined #ruby
[03:55:12] terminalrecluse: has joined #ruby
[03:55:53] chopin: has joined #ruby
[03:58:25] spyder55: has joined #ruby
[04:00:53] johnDoe111: has joined #ruby
[04:04:29] ryan_notabot: has joined #ruby
[04:08:34] jackjackdripper: has joined #ruby
[04:09:16] k3rn31: has joined #ruby
[04:09:21] jackjackdripper: has joined #ruby
[04:12:12] JazzyVariable227: has joined #ruby
[04:13:47] nankyokusei: has joined #ruby
[04:14:07] jaguarmagenta: has joined #ruby
[04:14:12] krakenr: has joined #ruby
[04:15:17] jaguarmagenta: has joined #ruby
[04:15:22] solocshaw: has joined #ruby
[04:15:26] Silva_k: So I've used YAML to serialize objects in their current states with their current instance variables, and I've generated json for hashes, but can I used json in a similar way to the way I've used YAML?
[04:15:28] jackjackdripper1: has joined #ruby
[04:18:02] yatish27: has joined #ruby
[04:19:44] chopin: has joined #ruby
[04:21:11] PaulCapestany: has joined #ruby
[04:22:01] benlieb: has joined #ruby
[04:23:30] jenrzzz: has joined #ruby
[04:23:49] duckpupp1: has joined #ruby
[04:34:17] houhoulis: has joined #ruby
[04:34:52] solocshaw1: has joined #ruby
[04:40:30] certainty: has joined #ruby
[04:41:42] noodle: has joined #ruby
[04:43:43] solocshaw: has joined #ruby
[04:43:51] hutch34: has joined #ruby
[04:44:21] jenrzzz: has joined #ruby
[04:44:21] jenrzzz: has joined #ruby
[04:44:24] JazzyVariable227: has joined #ruby
[04:47:15] PaulCape_: has joined #ruby
[04:51:30] ruby[bot]: -bbbb $a:k0n$#ruby-banned k0n!*@*$#ruby-banned mynameisntroy!*@*$#ruby-banned *!*@gateway/web/freenode/ip.99.181.20.181$#ruby-banned
[04:51:46] palms: has joined #ruby
[04:52:31] ruby[bot]: -bbbb $a:k0n k0n!*@* mynameisntroy!*@* *!*@gateway/web/freenode/ip.99.181.20.181
[04:52:31] lightt: has joined #ruby
[04:52:31] djbkd: has joined #ruby
[04:54:02] slackbotgz: has joined #ruby
[04:55:39] soLucien: has joined #ruby
[04:55:54] soLucien: hi guys i am trying to debug some ruby code
[04:56:01] soLucien: so i need to start from somewhere
[04:56:07] soLucien: what is a binstub ?
[04:57:09] dcunit3d: has joined #ruby
[04:57:49] soLucien: and how do i debug it ?
[04:58:09] duckpupp1: has joined #ruby
[04:58:28] pawnbox: has joined #ruby
[04:58:46] braincrash: has joined #ruby
[04:58:51] bkxd: has joined #ruby
[04:59:19] soLucien: http://pasteboard.co/1Cu39i1d.png
[04:59:52] soLucien: also , what's up with that weird error ?
[05:00:02] soLucien: Unresolved specs during Gem::Specification.reset
[05:00:15] soLucien: i am very new to ruby, this is the first time i do this
[05:00:22] soLucien: and i could use a hand
[05:02:39] jaguarmagenta: has joined #ruby
[05:03:14] xxneolithicxx: has joined #ruby
[05:09:07] duncannz: has joined #ruby
[05:09:10] fsosowp: has joined #ruby
[05:13:50] PaulCapestany: has joined #ruby
[05:15:56] lightt: has joined #ruby
[05:15:58] kareeoleez: has joined #ruby
[05:17:22] _Tariq: has joined #ruby
[05:20:25] fsosowp: has joined #ruby
[05:21:38] fsosowp: has joined #ruby
[05:22:56] palms: has joined #ruby
[05:25:24] SilverKey: has joined #ruby
[05:28:32] kmooney: has joined #ruby
[05:28:35] irrationalist: has joined #ruby
[05:30:05] pawnbox: has joined #ruby
[05:31:56] kgrz: has joined #ruby
[05:32:17] tmtwd: has joined #ruby
[05:32:32] naftilos76: has joined #ruby
[05:34:53] blackmesa: has joined #ruby
[05:38:45] soLucien: hello _Tariq
[05:38:49] soLucien: want to help me out ?
[05:39:20] pythoninthegrass: has joined #ruby
[05:39:31] jgrevich: has joined #ruby
[05:39:56] _Tariq: I might be able to help you out
[05:40:00] _Tariq: No guarantees.
[05:40:11] PaulCape_: has joined #ruby
[05:40:18] soLucien: debug something. Did you just join ?
[05:40:37] soLucien: i asked something ~30 min ago
[05:40:46] _Tariq: I just joined
[05:40:58] _Tariq: So I don't know your question
[05:41:06] certainty: has joined #ruby
[05:41:35] soLucien: do you know how i can debug a call to something like Kernel.exec( ) ?
[05:41:57] _Tariq: I didn't really even know Kernel.exec() even existed
[05:42:31] dcunit3d: has joined #ruby
[05:43:23] baweaver: http://stackoverflow.com/questions/17936340/unresolved-specs-during-gemspecification-reset - to the first one
[05:43:27] soLucien: know what it does, but i have to be creative in order to overcome it
[05:43:56] baweaver: you're going to have to be a lot more specific than just saying debug Kernel#exec
[05:44:38] soLucien: this is where i cannot debug anymore, because it makes a call to the OS
[05:44:57] baweaver: Such as: Code used, full error, and what you're trying to do
[05:44:59] soLucien: http://pasteboard.co/1Cx2AlvD.png
[05:45:12] djbkd: has joined #ruby
[05:45:19] baweaver: Images are hard to read
[05:45:25] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[05:45:39] soLucien: sure, i will do that
[05:45:48] soLucien: and make an explanation of how it's working
[05:46:16] soLucien: give me 5 mins, it takes a while to copy all and make a proper problem formulation
[05:46:21] solocshaw: has joined #ruby
[05:46:31] baweaver: Do you even have the gem installed?
[05:48:01] soLucien: rake (11.2.2, 10.4.2)
[05:48:05] soLucien: yes, i have 2 version
[05:48:12] baweaver: Are you following the install guide? https://www.vagrantup.com/docs/installation/
[05:48:14] soLucien: gem cleanup does not remove one of them
[05:48:42] soLucien: no , i have installed it from source
[05:49:02] soLucien: i am developing a plugin for ir
[05:49:17] soLucien: so i want to debug it in order to see some runtime variables
[05:49:36] soLucien: i will make a gist for it , so it will become more clear
[05:49:36] baweaver: https://www.vagrantup.com/docs/plugins/development-basics.html
[05:49:53] soLucien: i have read that
[05:50:03] soLucien: the only documentation that you get
[05:50:10] soLucien: for writing plugins
[05:50:13] baweaver: Ruby lets you jump through things anyways. That's what Pry is for
[05:50:14] soLucien: is its source code
[05:50:31] baweaver: soLucien please, full sentences.
[05:50:43] baweaver: The enter key doesn't like being abused
[05:51:46] baweaver: https://www.youtube.com/watch?v=jDXsEzOHb2M - That covers pry. It lets you jump about code in your debugger.
[05:51:58] baweaver: Ruby, being a dynamic language, means you can edit anything at runtime
[05:53:28] the_drow: has joined #ruby
[05:54:34] baweaver: https://www.noppanit.com/create-simple-vagrant-plugin/ - that also covers basic plugin dev.
[05:54:51] soLucien: i have seen that as well
[05:54:53] baweaver: Note that I have not developed one myself.
[05:55:01] soLucien: my plugin is not basic
[05:55:15] baweaver: what are you trying to do?
[05:55:52] panpainter: has joined #ruby
[05:56:01] soLucien: add a hyper-v networking provider(windows drivers for VM networking in Windows)
[05:56:09] soLucien: that allows custom topologies
[05:56:27] baweaver: and you're sure this has not been done before?
[05:56:44] arooni: has joined #ruby
[05:56:45] phredus: has joined #ruby
[05:56:54] soLucien: it includes apt-cache , nuget cache , host dhcp
[05:56:59] baweaver: You may well have more luck over on #vagrant
[05:57:04] d0nn1e: has joined #ruby
[05:57:04] soLucien: nope. it's dead
[05:57:11] soLucien: crickets all around
[05:57:37] soLucien: it has not been done before, that's why i have created it
[05:57:44] soLucien: in the past 6 months i've written the driver
[05:57:52] soLucien: in powershell
[05:57:52] baweaver: you do realize it's the weekend and most people probably are not online right?
[05:58:06] soLucien: now i just need to wrap it in ruby code, and it's done
[05:58:18] soLucien: i do have access to other plugins, and code of others
[05:58:24] soLucien: but what i want to see is
[05:59:13] soLucien: what are the names of the objects that i have to refer to when writing my rb files. In order to do that, i will need breakpoints
[06:00:03] baweaver: Pry works for that. You can use it to dive around the entirety of the API
[06:00:20] baweaver: As far as the names, I have no idea.
[06:00:36] soLucien: i have seen a demonstration of this, but i was hoping i can use the debugger to do the same thing
[06:00:37] baweaver: https://www.youtube.com/watch?v=jDXsEzOHb2M - that goes over pry
[06:01:39] baweaver: I don't use an IDE so I wouldn't know about their built in debugging facilities. It might allow options like that, but I do know for a fact that Pry allows similar options
[06:02:07] soLucien: alright, i will use pry
[06:02:12] craigp: has joined #ruby
[06:02:22] johnDoe111: has joined #ruby
[06:02:39] baweaver: Seen this one yet? https://www.youtube.com/watch?v=p3g0_FIElwM
[06:03:23] soLucien: not yet, no
[06:04:09] baweaver: https://github.com/MSOpenTech/vagrant-windows-hyperv - also saw this, not sure how relevant it might be
[06:04:40] soLucien: it's 3 years old
[06:04:59] baweaver: Does it do what you need?
[06:05:14] soLucien: it's been merged into the official version
[06:05:25] soLucien: without some of the features removed
[06:06:08] pawnbox: has joined #ruby
[06:06:47] PaulCapestany: has joined #ruby
[06:06:50] baweaver: best bet is to try their IRC channel on a weekday or hit the mailing lists.
[06:06:59] baweaver: or try back here on a weekday, maybe someone works vagrant
[06:07:00] soLucien: i am there all the time
[06:07:19] baweaver: StackOverflow might be worth a shot as well
[06:07:21] soLucien: there is no one that can help . i have been asking for the last few months
[06:07:30] baweaver: I just know that anything I can do here would be blind guessing as well.
[06:07:43] soLucien: they don't watch irc, gitter or any other comm channel
[06:07:43] baweaver: Have you contacted their support?
[06:08:01] soLucien: the mailing list is something i have not tried yet
[06:08:04] soLucien: no, no support
[06:08:16] baweaver: give them both a shot
[06:09:02] baweaver: I'd find it hard to believe that they have no point of communication for asking questions, or that StackOverflow wouldn't be able to help on it.
[06:09:25] baweaver: Considering Hashicorp is fairly active on OS and Vagrant is one of their flagships
[06:09:28] soLucien: i have not tried stackoverflow, mailing lists or their support
[06:09:32] soLucien: not posting , that is
[06:09:45] soLucien: i have read all there is to read
[06:10:14] soLucien: but not asked. I have asked IRC and gitter
[06:11:11] baweaver: There's always something you haven't read
[06:11:33] baweaver: normally in a very dark corner of the internet somewhere that explains your exact issue with no actual solution.
[06:12:19] soLucien: anyways, i am bootstrapping the powershell lib directly in the vagrantfile code at the moment, and it is working fine. I can use it, and it does its job. But creating a full-fledged plugin using their DSL is the next step, so evryone else can use it
[06:13:03] soLucien: plus, i hate having 50 lines at the beginning of the file and copying them around
[06:14:40] nankyokusei: has joined #ruby
[06:20:45] JohnBat26: has joined #ruby
[06:24:45] tAn: has joined #ruby
[06:27:54] soLucien: <baweaver> pry or pry-byebug ?
[06:29:36] rkazak: has joined #ruby
[06:32:51] PaulCape_: has joined #ruby
[06:33:40] blaxter: has joined #ruby
[06:35:02] Madplatypus: has joined #ruby
[06:36:53] jas02: has joined #ruby
[06:39:16] kareeoleez: has joined #ruby
[06:40:04] johnDoe111: has joined #ruby
[06:41:47] certainty: has joined #ruby
[06:46:44] edwardly: has joined #ruby
[06:46:44] edwardly: has joined #ruby
[06:49:38] lightt: has joined #ruby
[06:51:11] hutch34: has joined #ruby
[06:53:20] A124: has joined #ruby
[06:53:32] lxsameer: has joined #ruby
[06:57:34] kareeoleez: has joined #ruby
[07:00:24] PaulCapestany: has joined #ruby
[07:01:39] firstdayonthejob: has joined #ruby
[07:02:31] yatish27: has joined #ruby
[07:06:23] kgrz: has joined #ruby
[07:07:05] solars: has joined #ruby
[07:12:15] dcunit3d: has joined #ruby
[07:14:08] moei: has joined #ruby
[07:15:37] pawnbox: has joined #ruby
[07:15:47] kareeoleez: has joined #ruby
[07:16:38] agent_white: has joined #ruby
[07:17:33] Hyuk: has joined #ruby
[07:21:51] dcunit3d: has joined #ruby
[07:23:39] krakenr: So when I'm using JSON with ruby, and I serialize a hash into json, then I deserialize it back into an object, the symbol keys will be string keys isntead? I guess there's no way around this?
[07:24:34] solocshaw1: has joined #ruby
[07:24:39] palms: has joined #ruby
[07:26:36] PaulCape_: has joined #ruby
[07:26:43] baweaver: &ri JSON#parse
[07:26:43] `derpy: http://ruby-doc.org/stdlib-2.3.1/libdoc/json/rdoc/JSON.html#method-i-parse
[07:27:32] krakenr: symbolize_names
[07:27:52] baweaver: The docs tend to reveal a lot of information
[07:28:03] krakenr: no kidding
[07:33:52] kareeoleez: has joined #ruby
[07:35:38] blackmesa: has joined #ruby
[07:37:13] the_drow: has joined #ruby
[07:40:03] nadir: has joined #ruby
[07:42:17] ur5us: has joined #ruby
[07:42:33] certainty: has joined #ruby
[07:43:05] kareeoleez: has joined #ruby
[07:44:43] Infra-Red: has joined #ruby
[07:45:23] vuoto: has joined #ruby
[07:51:39] yeticry: has joined #ruby
[07:52:45] djbkd: has joined #ruby
[07:53:47] PaulCapestany: has joined #ruby
[07:54:31] vuoto: has joined #ruby
[07:54:41] duoi: has joined #ruby
[07:56:06] haraigoshi: has joined #ruby
[07:57:35] panpainter: has joined #ruby
[08:01:09] kareeoleez: has joined #ruby
[08:01:32] craigp: has joined #ruby
[08:02:45] dionysus69: has joined #ruby
[08:03:29] iCHAIT: has joined #ruby
[08:03:43] nankyokusei: has joined #ruby
[08:05:02] solocshaw1: has joined #ruby
[08:05:46] Noxilex: has joined #ruby
[08:06:35] duckpupp1: has joined #ruby
[08:08:19] rippa: has joined #ruby
[08:09:57] Infra-Red: has joined #ruby
[08:11:19] n1xnz: has joined #ruby
[08:12:13] JazzyVariable227: has joined #ruby
[08:16:40] johnDoe111: has joined #ruby
[08:19:15] kareeoleez: has joined #ruby
[08:19:51] PaulCape_: has joined #ruby
[08:21:48] dcunit3d: has joined #ruby
[08:22:00] tildes: has joined #ruby
[08:23:07] Infra-Red: has joined #ruby
[08:24:00] jaguarmagenta: has joined #ruby
[08:25:17] palms: has joined #ruby
[08:26:50] Niham: has joined #ruby
[08:27:34] moeabdol: has joined #ruby
[08:32:51] edwardly: has joined #ruby
[08:32:51] edwardly: has joined #ruby
[08:34:03] yatish27: has joined #ruby
[08:35:53] hightower2: has joined #ruby
[08:36:38] Vile`: has joined #ruby
[08:37:08] araujo__: has joined #ruby
[08:37:21] kareeoleez: has joined #ruby
[08:43:20] certainty: has joined #ruby
[08:44:41] tAn: has joined #ruby
[08:44:44] blackmesa: has joined #ruby
[08:46:41] PaulCapestany: has joined #ruby
[08:47:04] kareeoleez: has joined #ruby
[08:52:47] zapata: has joined #ruby
[08:53:30] djbkd: has joined #ruby
[08:55:01] Infra-Red: has joined #ruby
[08:55:17] SCHAAP137: has joined #ruby
[09:05:00] kareeoleez: has joined #ruby
[09:05:52] joonty: has joined #ruby
[09:05:58] sandstrom: has joined #ruby
[09:06:25] AnoHito: has joined #ruby
[09:10:22] n1x-nz: has joined #ruby
[09:10:41] aibot: has joined #ruby
[09:10:45] edwinvdg_: has joined #ruby
[09:11:51] mitt3ns: has joined #ruby
[09:12:05] dionysus70: has joined #ruby
[09:12:45] PaulCape_: has joined #ruby
[09:12:58] shinnya: has joined #ruby
[09:16:12] phredus: has joined #ruby
[09:23:07] kareeoleez: has joined #ruby
[09:24:37] spider-mario: has joined #ruby
[09:26:12] palms: has joined #ruby
[09:28:17] c355E3B: has joined #ruby
[09:30:25] digneety: has joined #ruby
[09:30:32] digneety: has joined #ruby
[09:31:29] bkxd: has joined #ruby
[09:32:00] CloCkWeRX: has joined #ruby
[09:32:09] kareeoleez: has joined #ruby
[09:34:56] pawnbox: has joined #ruby
[09:35:39] jenrzzz: has joined #ruby
[09:36:27] vuoto: has joined #ruby
[09:37:17] vuoto_: has joined #ruby
[09:37:50] mdw: has joined #ruby
[09:39:30] PaulCapestany: has joined #ruby
[09:40:15] darkxploit: has joined #ruby
[09:40:37] tAn: has joined #ruby
[09:42:21] craigp: has joined #ruby
[09:42:55] zeroDi: has joined #ruby
[09:44:03] certainty: has joined #ruby
[09:45:05] vuoto: has joined #ruby
[09:46:18] exadeci: has joined #ruby
[09:47:34] vuoto: has joined #ruby
[09:47:53] kgrz: has joined #ruby
[09:48:12] c0mrad3: has joined #ruby
[09:50:27] kareeoleez: has joined #ruby
[09:51:54] armyriad: has joined #ruby
[09:52:38] vuoto: has joined #ruby
[09:53:30] johnDoe111: has joined #ruby
[09:54:05] vuoto: has joined #ruby
[09:55:46] djbkd: has joined #ruby
[09:58:06] vuoto: has joined #ruby
[09:59:05] pawnbox: has joined #ruby
[09:59:27] panpainter: has joined #ruby
[10:01:48] vuoto: has joined #ruby
[10:03:23] vuoto: has joined #ruby
[10:04:30] vuoto: has joined #ruby
[10:05:16] al2o3-cr: has joined #ruby
[10:05:35] PaulCape_: has joined #ruby
[10:07:48] hiennaj: has joined #ruby
[10:08:35] kareeoleez: has joined #ruby
[10:08:38] duckpupp1: has joined #ruby
[10:12:44] digneety: has joined #ruby
[10:13:57] moeabdol: has joined #ruby
[10:14:09] hiennaj: has joined #ruby
[10:18:53] hiennaj: has joined #ruby
[10:24:11] postmodern: has joined #ruby
[10:24:31] jaguarmagenta: has joined #ruby
[10:26:39] kareeoleez: has joined #ruby
[10:27:07] palms: has joined #ruby
[10:29:43] workmad3: has joined #ruby
[10:31:38] PaulCapestany: has joined #ruby
[10:35:50] kareeoleez: has joined #ruby
[10:42:00] nankyokusei: has joined #ruby
[10:42:24] armyriad: has joined #ruby
[10:43:03] nankyokusei: has joined #ruby
[10:43:27] hutch34: has joined #ruby
[10:44:51] certainty: has joined #ruby
[10:49:51] pandaant: has joined #ruby
[10:50:19] Infra-Red: has joined #ruby
[10:54:04] kareeoleez: has joined #ruby
[10:56:24] iCHAIT: can i ask questions related to the usage rest-client gem here?
[10:56:40] djbkd: has joined #ruby
[10:57:18] Ishido: has joined #ruby
[10:57:45] workmad3: iCHAIT: feel free to ask... if someone knows the answer, they'll responnd
[10:58:43] PaulCape_: has joined #ruby
[10:58:43] iCHAIT: i'm currently trying to post data to an API that accepts json
[10:58:48] iCHAIT: like this: RestClient.post(url, json_data, Hash['content_type' => 'json', 'accept' => 'json'])
[10:59:08] iCHAIT: the data goes, but not with the correct content type
[11:02:06] blackmesa: has joined #ruby
[11:03:08] kareeoleez: has joined #ruby
[11:04:04] jhass: which would be "application/json", not "json"
[11:05:11] jhass: side note: Hash[a => b] is the same as Hash[{a => b}] because it's the same as Hash.[](a => b) and thus the same as Hash.[]({a => b}), in other words the Hash[] is redundant
[11:09:35] iCHAIT: jhass: but in the readme, 'json' is used: https://github.com/rest-client/rest-client#usage-raw-url
[11:10:09] jhass: no, :json is ;)
[11:11:20] iCHAIT: yeah, it worked now!
[11:11:46] weckl: has joined #ruby
[11:12:20] jhass: interesting, I can't find the code that handles it
[11:12:36] jhass: iCHAIT: the actual request did actually have application/json then?
[11:13:45] jhass: ah, https://github.com/rest-client/rest-client/blob/ac388df8b904b0ff839ac73496af5b75ab683076/lib/restclient/request.rb#L881 is the magic
[11:13:50] toretore: has joined #ruby
[11:21:27] kareeoleez: has joined #ruby
[11:21:37] nobitanobi: has joined #ruby
[11:21:59] alfiemax: has joined #ruby
[11:24:45] digneety: has joined #ruby
[11:24:47] PaulCapestany: has joined #ruby
[11:25:24] vahid: has joined #ruby
[11:25:48] Yiota: has joined #ruby
[11:26:35] vahid: has left #ruby: ()
[11:27:04] qasaur: has joined #ruby
[11:27:34] palms: has joined #ruby
[11:36:30] sdothum: has joined #ruby
[11:37:07] cwenner: has joined #ruby
[11:37:22] ur5us: has joined #ruby
[11:39:20] madh: has joined #ruby
[11:39:22] yatish27: has joined #ruby
[11:39:38] kareeoleez: has joined #ruby
[11:42:38] digneety_: has joined #ruby
[11:44:17] craigp: has joined #ruby
[11:45:07] karmatr0n: has joined #ruby
[11:45:35] certainty: has joined #ruby
[11:46:53] Infra-Red: has joined #ruby
[11:48:32] digneety: has joined #ruby
[11:49:17] DoubleMalt: has joined #ruby
[11:49:48] aswen: has joined #ruby
[11:50:44] kareeoleez: has joined #ruby
[11:51:49] PaulCape_: has joined #ruby
[11:52:07] sameerynho: has joined #ruby
[11:53:51] sergey_makagon: has joined #ruby
[11:54:03] Hanmac: has joined #ruby
[11:55:26] dcunit3d: has joined #ruby
[11:57:05] djbkd: has joined #ruby
[12:01:08] panpainter: has joined #ruby
[12:04:28] AlexRussia: has joined #ruby
[12:04:58] phrozen77: has joined #ruby
[12:06:01] ctp: has joined #ruby
[12:09:03] symm-: has joined #ruby
[12:09:24] duckpupp1: has joined #ruby
[12:09:30] Jackneill: has joined #ruby
[12:10:37] yude_: has joined #ruby
[12:11:20] hutch34: has joined #ruby
[12:12:36] digneety: has joined #ruby
[12:12:58] codecop: has joined #ruby
[12:13:01] whiteline: has joined #ruby
[12:15:09] tildes: has joined #ruby
[12:17:42] kareeoleez: has joined #ruby
[12:18:24] PaulCapestany: has joined #ruby
[12:22:56] Azure: has joined #ruby
[12:24:20] craigp: has joined #ruby
[12:25:19] jaguarmagenta: has joined #ruby
[12:26:21] shevy: the magic the magic the magic
[12:28:37] palms: has joined #ruby
[12:28:59] Vile`: has joined #ruby
[12:30:53] tildes: has joined #ruby
[12:32:10] sergey_makagon: has joined #ruby
[12:32:42] johnDoe111: has joined #ruby
[12:33:22] sepp2k: has joined #ruby
[12:34:26] nanoz: has joined #ruby
[12:34:26] nanoz: has joined #ruby
[12:35:05] nobitanobi: has joined #ruby
[12:35:53] tAn: has joined #ruby
[12:36:02] kareeoleez: has joined #ruby
[12:37:03] blackgoat: has joined #ruby
[12:39:39] djbkd: has joined #ruby
[12:40:18] jord-n: has joined #ruby
[12:40:52] craigp: has joined #ruby
[12:44:52] lightt: has joined #ruby
[12:45:29] PaulCape_: has joined #ruby
[12:46:21] certainty: has joined #ruby
[12:46:29] k3rn31: has joined #ruby
[12:47:32] alfiemax: has joined #ruby
[12:48:16] river_: has joined #ruby
[12:48:29] tkiel: has joined #ruby
[12:50:26] iCHAIT: do you know how i can mock rest client responses for use in unit testing?
[12:50:42] iCHAIT: say, i'd like to mock RestClient.get to return a dummy response
[12:50:42] yxhuvud: iCHAIT: webmock.
[12:51:33] araujo_: has joined #ruby
[12:51:45] laska: has joined #ruby
[12:52:51] iCHAIT: Yxhuvud: thanks!
[12:53:00] iCHAIT: it's readme looks nice
[12:53:10] iCHAIT: but doesn't really explain how I'd return a response
[12:53:49] araujo_: has joined #ruby
[12:54:09] kareeoleez: has joined #ruby
[12:54:39] banister: has joined #ruby
[12:56:21] araujo_: has joined #ruby
[12:56:46] fgimian: has joined #ruby
[12:56:54] fgimian: hey there guys :)
[12:57:06] fgimian: what HTTP library are most people using and recommending these days in Ruby land?
[12:57:13] shevy: open-uri!
[12:57:36] fgimian: thanks shevy, shall check it out ;)
[12:58:28] fgimian: hmm can't see a way to do POST, PUT .etc with this in the docs
[12:59:09] moeabdol1: has joined #ruby
[13:00:20] sergey_makagon: has joined #ruby
[13:03:16] dEPy: has joined #ruby
[13:03:29] shevy: post etc... you could do via http://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html - I don't know if there are gems that are better, usually the ruby stdlib/core is nice as is
[13:04:23] Infra-Red: has joined #ruby
[13:04:30] AlexRussia: has joined #ruby
[13:05:17] fgimian: thanks shevy , there are dozens of libs
[13:08:35] nrk: has joined #ruby
[13:09:16] toretore: just use net/http. if you start using one of the many wrapper libs you are going to find yourself having to step down to the net/http level at one point anyway
[13:09:30] nankyokusei: has joined #ruby
[13:11:30] PaulCapestany: has joined #ruby
[13:11:38] dcunit3d: has joined #ruby
[13:12:21] kareeoleez: has joined #ruby
[13:12:33] yude: has joined #ruby
[13:13:03] asahi: has joined #ruby
[13:14:30] davedev24: has joined #ruby
[13:15:37] fgimian: toretore thanks
[13:16:10] asahi: Hello, I have a 1 character string that looks like a space but var == ' ' returns false, and #strip doesn't change it. #encoding returns UTF-8. Any ideas?
[13:18:12] digneety: has joined #ruby
[13:20:35] chris2: nbsp i think
[13:20:44] chris2:   00A0 NO-BREAK SPACE
[13:22:30] asahi: okay thanks. I'm not familiar with that, but I'll google it
[13:23:41] ytti: it's normal sapce, which when rendered should not cause line wraps
[13:23:56] ytti: in practice virtually no programming language considers it normal break syntactically
[13:24:03] ytti: causing weird and hard to troubleshoot errors
[13:24:09] aryaching: has joined #ruby
[13:24:15] chris2: category space tho
[13:24:20] ytti: i disable it on my computers, because i tend to accidentally insert if oafter } and ]
[13:24:30] ytti: so bunch of my code has after those NBSP
[13:24:46] norc: has joined #ruby
[13:24:51] ytti: (i need alt-gr for those, an if i keep alt-gr pressed too long and press space, then i make NBSP)
[13:24:52] zacstewart: has joined #ruby
[13:25:12] norc_: has joined #ruby
[13:25:42] asahi: It's used in html it looks like
[13:25:55] chris2: >> "\u00a0" =~ /\s/
[13:25:56] ruby[bot]: chris2: # => nil (https://eval.in/587597)
[13:26:14] chris2: >> "\u00a0" =~ /[[:space:]]/
[13:26:15] ruby[bot]: chris2: # => 0 (https://eval.in/587598)
[13:26:18] chris2: is that a bug?
[13:26:52] jhass: I think it's documented
[13:27:21] ytti: chris2, but if you use NBSP in syntax, it'll barf
[13:27:26] blackmesa: has joined #ruby
[13:27:31] chris2: that's a different issue
[13:27:33] ytti: i don't think it should, but it will
[13:27:45] ytti: i do that accidentally often enough to justify disabling whole NBSP
[13:27:56] jhass: ytti: I think it's a valid identifier actually
[13:28:07] chris2: /\s/ - A whitespace character: /[ \t\r\n\f]/
[13:28:23] jhass: http://www.rubyinside.com/the-split-is-not-enough-whitespace-shenigans-for-rubyists-5980.html
[13:30:18] hutch34: has joined #ruby
[13:30:33] Guest66538: has joined #ruby
[13:30:38] ytti: jhass, imho it should be treat like space
[13:30:51] ytti: jhass, so 1 + 1 with space or with NBSP should be same
[13:31:20] jhass: but then I don't really want mixed whitspace in my code
[13:31:30] isxek: has joined #ruby
[13:32:02] ytti: NBSP seems what we actually want to use always
[13:32:09] ytti: because we don't want them to be wrapped
[13:33:14] mdw7: has joined #ruby
[13:33:15] rapha: has joined #ruby
[13:33:27] jhass: well we want them to be wrapped in string literals
[13:33:52] rapha: Why does this return a Syntax Error? "if (@user.name.blank? ? (_('User #%{id}') % {id: @user.id}) : @user:name) ..."
[13:34:02] ElFerna: has joined #ruby
[13:34:02] rapha: without the "if"
[13:34:25] jhass: rapha: post the exact error message you get too and we can look at it together
[13:34:42] rapha: oh nooooooes
[13:35:02] rapha: jhass: as usual, just posting it here made me see the problem: "@user:name" should be "@user.name"
[13:35:04] rapha: sorry guys
[13:35:24] jhass: ACTION wait's for the question about the '#{}' issue :P
[13:35:26] DanielI: has joined #ruby
[13:35:41] rapha: what %{} issue?
[13:36:02] jhass: you'll see soon enough
[13:36:13] jhass: or, %{}, the # confused me -.-
[13:37:35] PaulCape_: has joined #ruby
[13:37:43] toretore: i'm just wondering what _ does
[13:38:10] jhass: history question, why do we have eql? and ==?
[13:38:12] ryan_notabot: has joined #ruby
[13:38:21] jhass: toretore: smells like gettext
[13:39:08] rapha: jhass: so since it's % and not # there should be no problem, right?
[13:39:13] freerobby: has joined #ruby
[13:39:19] rapha: toretore: _() is for gettext i18n'ing
[13:39:19] jhass: rapha: yes, sorry, ignore me
[13:39:40] rapha: ACTION can't stand Rails' i18n
[13:40:41] banister: has joined #ruby
[13:40:42] norc_: jhass, I'm thinking it has to do with the automatic coercion on some types like numerics.
[13:41:48] jhass: as in == does it and eql? doesn't?
[13:41:53] norc_: jhass, yes.
[13:42:00] rapha: Guys, I'm so happy to have discovered Ruby! All the Haskell and Rust and What-Have-You-Fanboys can talk all they want, I've found my programming-home, and that includes #ruby! :)
[13:42:31] shevy: there are 1405 on #haskell :(
[13:42:34] bkxd: has joined #ruby
[13:42:38] rapha: So what shevy
[13:42:52] shevy: I guess 80% of these are just people who want to find out what monads are
[13:42:57] rapha: Not sure what number's what in my Weechat status line, but it looks like 972 here.
[13:43:39] rapha: In 2016, that's a lot of people in an IRC channel.
[13:45:29] peitur: has joined #ruby
[13:47:04] certainty: has joined #ruby
[13:47:56] sash_: has joined #ruby
[13:47:56] sash_: has joined #ruby
[13:48:29] hutch34: has joined #ruby
[13:49:30] freerobby: has joined #ruby
[13:50:06] norc_: jhass, honestly its still a mess though. === is called rb_equal internally, then you have == which does something differently entirely, and then eql? with a slight difference by convention...
[13:52:34] jhass: norc_: don't forget equal? !
[13:55:03] norc_: jhass, all of that got me confused. Now Ill just compare object IDs directly - at least then I know what I'm doing. ;-)
[14:01:05] digneety: has joined #ruby
[14:01:42] rethi: has left #ruby: ()
[14:02:58] panpainter: has joined #ruby
[14:04:58] PaulCapestany: has joined #ruby
[14:05:26] madh: jhass, look thish ttp://www.zenruby.info/2016/05/ruby-operators-equality-comparison.html
[14:06:02] jhass: how did you get a space at that place :P
[14:06:44] pilne: has joined #ruby
[14:07:05] kareeoleez: has joined #ruby
[14:07:20] jhass: madh: I hate how he compares Object#hash to MD5 and SHA1
[14:07:48] jhass: without mentioning the entirely different properties these try to achieve
[14:07:51] apeiros: non-stable-non-crypto hashes and stable-crypto-hashes are the same!
[14:08:06] blackmesa: has joined #ruby
[14:08:17] norc_: I'm an unstable-person. How do I fit into that apeiros?
[14:08:36] apeiros: norc_: you're cryptic too, so…
[14:08:48] norc_: non-stable-cryptic person.
[14:08:57] norc_: That works for me.
[14:08:59] apeiros: but you should try to not get hashed. it's not healthy for meatbags :)
[14:09:50] johnDoe111: has joined #ruby
[14:10:08] duckpupp1: has joined #ruby
[14:10:56] sergey_makagon: has joined #ruby
[14:12:38] tAn: has joined #ruby
[14:13:29] pawnbox: has joined #ruby
[14:14:29] postmodern: has joined #ruby
[14:15:04] Infra-Red: has joined #ruby
[14:15:56] kareeoleez: has joined #ruby
[14:19:13] pawnbox: has joined #ruby
[14:21:05] peitur: has joined #ruby
[14:21:33] pandaant: has joined #ruby
[14:22:15] pawnbox: has joined #ruby
[14:23:08] digneety: has joined #ruby
[14:26:05] jaguarmagenta: has joined #ruby
[14:27:28] zacstewart: has joined #ruby
[14:27:31] vuoto: has joined #ruby
[14:29:47] palms: has joined #ruby
[14:31:02] PaulCape_: has joined #ruby
[14:34:06] kareeoleez: has joined #ruby
[14:37:58] benlieb: has joined #ruby
[14:42:37] ekinmur: has joined #ruby
[14:44:54] sergey_makagon: has joined #ruby
[14:47:52] certainty: has joined #ruby
[14:52:11] kareeoleez: has joined #ruby
[14:52:21] araujo: has joined #ruby
[14:52:26] infinity__: has joined #ruby
[14:53:04] peitur: has joined #ruby
[14:55:43] bluOxigen: has joined #ruby
[14:55:49] araujo_: has joined #ruby
[14:57:06] araujo_: has joined #ruby
[14:57:07] arlek: has joined #ruby
[14:58:04] PaulCapestany: has joined #ruby
[15:00:48] panpainter: has joined #ruby
[15:00:59] hitty: has joined #ruby
[15:01:16] hitty: hello world
[15:06:50] jhass: hello hitty
[15:07:20] jhass: like the enter key
[15:07:27] hitty: I'm about to become a ruby developer
[15:07:54] hitty: Actually I am now, but not even a junior, only trial
[15:08:05] hitty: what's your experience
[15:08:11] hitty: any advice?
[15:08:24] tubuliferous_: has joined #ruby
[15:09:13] hitty: as for me, there's a mess around all the things except Ruby and Rails itself
[15:10:17] hitty: and we have a very active community here)
[15:10:25] nankyokusei: has joined #ruby
[15:10:30] kareeoleez: has joined #ruby
[15:11:14] qasaur: has joined #ruby
[15:12:30] asahi: has left #ruby: ()
[15:13:06] digneety: has joined #ruby
[15:14:07] whatelse: has left #ruby: ()
[15:15:41] palms: has joined #ruby
[15:16:01] zenlot: has joined #ruby
[15:17:32] jhass: my advice would be to have more than 5 minutes patience :P
[15:24:01] aryaching: has joined #ruby
[15:24:03] moeabdol1: has joined #ruby
[15:24:36] PaulCape_: has joined #ruby
[15:25:19] AlexRussia: has joined #ruby
[15:27:05] peitur: has joined #ruby
[15:28:36] jrafanie: has joined #ruby
[15:28:47] kareeoleez: has joined #ruby
[15:28:54] zacstewart: has joined #ruby
[15:31:19] hutch34: has joined #ruby
[15:35:01] jgt: has joined #ruby
[15:35:09] Tref: has joined #ruby
[15:36:57] ruby[bot]: -bb $a:Yuri4_$#ruby-banned Yuri4_!*@*$#ruby-banned
[15:37:17] nankyokusei: has joined #ruby
[15:37:19] ekinmur: has joined #ruby
[15:38:25] matp: has joined #ruby
[15:39:58] zacts: has joined #ruby
[15:42:00] kavanagh: has joined #ruby
[15:42:06] sergey_makagon: has joined #ruby
[15:42:28] digneety: has joined #ruby
[15:45:14] Rodya_: has joined #ruby
[15:47:06] kareeoleez: has joined #ruby
[15:48:38] certainty: has joined #ruby
[15:50:41] PaulCapestany: has joined #ruby
[15:53:25] benlieb: has joined #ruby
[15:53:48] haraigoshi: has joined #ruby
[15:54:14] gregf: has joined #ruby
[15:54:36] nobitanobi: has joined #ruby
[15:56:18] kareeoleez: has joined #ruby
[15:57:59] Rodya_: has joined #ruby
[16:03:24] k3rn31: has joined #ruby
[16:04:57] kareeoleez: has joined #ruby
[16:05:20] fenre: has joined #ruby
[16:08:02] Vile`: has joined #ruby
[16:08:19] ericli: has joined #ruby
[16:08:41] zacstewart: has joined #ruby
[16:09:08] ericli: Hi, I write a small def and there's a loop in it and once it encounters a condition it should break the loop and return false.
[16:09:46] ericli: so what shall I put in the loop? Like return false then break or break then return false?
[16:10:12] zacts: has joined #ruby
[16:10:16] catphish: has joined #ruby
[16:10:54] duckpupp1: has joined #ruby
[16:10:56] catphish: how does one change the external encoding of Open3.popen3?
[16:11:25] catphish: i'm getting encoding errors when writing to poen3's stdin because it's trying to convert my string to UTF8
[16:11:26] Rodya_: has joined #ruby
[16:12:16] shevy: ericli both ways should work -> http://pastie.org/10873775
[16:13:23] ericli: shevy: so I shall use break false ?
[16:13:23] toretore: catphish: you can force_encoding after reading
[16:13:26] ericli: like this?
[16:13:47] Rodya_: has joined #ruby
[16:13:52] johnDoe111: has joined #ruby
[16:13:53] xfbs: has joined #ruby
[16:13:55] toretore: catphish: (i recently looked into doing the same, and figured this was a lot easier)
[16:13:56] catphish: toretore: unfortunately my issue is writing, not reading
[16:14:08] toretore: that's another issue
[16:14:18] shevy: ericli this would be one way that should work. I am not sure what exactly you have to do though
[16:14:54] shevy: ericli break false should suffice but it reads weird, I never wrote that myself so far :)
[16:15:10] catphish: i've probably got come code somewhere that does it, i'll grep my company's source code :)
[16:15:14] ericli: shevy: oh my code just hole the def ca return false once a loop condition is met then break the loop.
[16:15:15] xfbs: has joined #ruby
[16:15:27] ericli: shevy: so sounds like break then false makes more sense.
[16:15:41] toretore: catphish: popen3 uses Kernel#spawn, which i think has these options, but i don't know how to get them to survive the layers on their way down there
[16:16:12] catphish: toretore: popen3 has an options option, so i'd think it would be passed through
[16:16:16] ctp: has joined #ruby
[16:16:24] catphish: but i couldnt figure out what option it would be
[16:16:33] catphish: i just want it to open the pipes as binaryu
[16:16:55] catphish: alternatively, maybe i can reopen somehow
[16:17:15] PaulCape_: has joined #ruby
[16:18:03] toretore: spawn is less than clearly documented, but i think using something like "cmd:binary" might work
[16:18:35] blackmesa: has joined #ruby
[16:18:42] catphish: i just found this code: pid, stdin, stdout, stderr = Open4::popen4(command); stdin.set_encoding('BINARY')
[16:18:53] catphish: hopefully that'll work :)
[16:19:46] catphish: stdin.set_encoding("BINARY") << this works! i guess thats a method on IO
[16:19:56] toretore: right; popen3 creates pipes using IO.pipe, and those are the objects you get in the block, and it should work if set_encoding works on pipes
[16:20:06] catphish: seems it does :)
[16:20:47] catphish: just wanted to pipe some images through external imagemagick
[16:20:51] ramfjord: has joined #ruby
[16:26:09] David_H__: has joined #ruby
[16:26:37] Rodya_: has joined #ruby
[16:26:51] jaguarmagenta: has joined #ruby
[16:27:01] m8: has joined #ruby
[16:27:49] sepp2k1: has joined #ruby
[16:27:54] van: has joined #ruby
[16:29:22] palms: has joined #ruby
[16:29:47] iajrz: has joined #ruby
[16:34:59] yatish27: has joined #ruby
[16:36:46] yatish27_: has joined #ruby
[16:37:59] alfiemax: has joined #ruby
[16:38:03] mdw: has joined #ruby
[16:38:18] hutch34: has joined #ruby
[16:39:00] digneety: has joined #ruby
[16:42:01] dcunit3d: has joined #ruby
[16:43:09] nobitanobi: has joined #ruby
[16:43:44] yude: has joined #ruby
[16:46:00] vuoto: has joined #ruby
[16:48:00] lusory: has joined #ruby
[16:49:02] johnDoe111: has joined #ruby
[16:50:05] Infra-Red: has joined #ruby
[16:55:47] houhoulis: has joined #ruby
[17:00:53] kareeoleez: has joined #ruby
[17:01:39] mdw: has joined #ruby
[17:02:18] rkazak: has joined #ruby
[17:03:26] lxsameer: has joined #ruby
[17:03:26] lxsameer: has joined #ruby
[17:05:11] panpainter: has joined #ruby
[17:05:58] iCHAIT: has left #ruby: ()
[17:13:28] mistermocha: has joined #ruby
[17:14:28] postmodern: has joined #ruby
[17:17:20] arlek: has joined #ruby
[17:18:57] mdw: has joined #ruby
[17:22:26] fedruantine: has joined #ruby
[17:22:31] iajrz`: has joined #ruby
[17:25:35] diegoviola: has joined #ruby
[17:26:40] nankyokusei: has joined #ruby
[17:26:52] TomyLobo: has joined #ruby
[17:27:16] kgrz: has joined #ruby
[17:28:15] Hobogrammer: has joined #ruby
[17:30:00] palms: has joined #ruby
[17:30:13] freerobby: has joined #ruby
[17:30:52] Mon_Ouie: has joined #ruby
[17:31:07] van: has joined #ruby
[17:35:14] shevy: I am doing a boring rewrite right now :(
[17:35:28] k3rn31: has joined #ruby
[17:36:30] ericli: shevy: oh sorry.
[17:36:38] catphish: has left #ruby: ("Leaving")
[17:36:48] ericli: shevy: snippet: https://paste.fedoraproject.org/378089/52969146/
[17:37:04] ericli: just wondering if if it looks ok
[17:37:16] shevy: that looks incorrect
[17:37:36] shevy: if you use a loop {}, then break like that, I don't think you will reach the statement below break
[17:37:47] shevy: you are not even using a loop in this case though, you just iterate over a finite collection
[17:38:15] shevy: you can use .select and .reject btw to filter away unwanted or wanted entries there
[17:39:40] pepee: has joined #ruby
[17:41:53] ericli: shevy: so how can I return false if one is met the condition ?
[17:42:53] ericli: shevy: okay I will use a countr
[17:44:32] mdw7: has joined #ruby
[17:44:36] toretore: use Enumerable#any?
[17:45:17] Rodya_: has joined #ruby
[17:46:56] toretore: (you can "return" from a loop with `break value`)
[17:47:06] blackmesa: has joined #ruby
[17:48:31] tmtwd: has joined #ruby
[17:48:37] Infra-Red: has joined #ruby
[17:49:13] djbkd: has joined #ruby
[17:49:23] ericli: toretore: oh how to do that
[17:52:39] jaguarmagenta: has joined #ruby
[17:52:47] sergey_makagon: ericli what logic do you want to have? In your example i see that you iterate over ports and if port is not 200 you return false in any other case you return true.
[17:53:00] ericli: sergey_makagon: yes
[17:54:05] sergey_makagon: ericli but each will not return any value for you in current implementation
[17:55:00] ericli: sergey_makagon: huh, why? thsatus_code will test if I can get 200 response code.
[17:55:07] ericli: *the status_code
[17:56:16] lxsameer: has joined #ruby
[17:56:40] Vingador: has joined #ruby
[17:57:02] ericli: sergey_makagon: anything wrong?
[17:58:34] yude: has joined #ruby
[17:58:40] chouhoulis: has joined #ruby
[17:59:11] sergey_makagon: ericli map would return array of results, but each will not return anything even if you explicitly write it. Also you do the break which will be executed earlier than return
[17:59:23] nofxx: has joined #ruby
[17:59:23] nofxx: has joined #ruby
[17:59:24] toretore: ericli: you have to articulate the problem better to understand the solution
[17:59:39] sergey_makagon: ericli could you please describe problem in more details?
[18:00:26] ericli: what I did is ti retrieve each value from the ports array then test if the port accessible or not. If yes it will return true or return false
[18:00:44] ericli: this loop is in a def.
[18:00:49] toretore: ericli: your problem can not be described like that
[18:01:40] toretore: you have a list, and thus you have several items that you want to test against and then apply some logic to this *list* of results
[18:01:53] ericli: toretore: yes, exactly.
[18:02:11] toretore: `return` only works with a single value
[18:02:38] toretore: "take a list, map this into another list of true/false based on a predicate"
[18:02:54] vuoto: has joined #ruby
[18:03:01] toretore: then you have a list of true/false values and can make further decisions based on this
[18:03:20] sergey_makagon: ericli: what you want to get as a result? maybe something like hash: { 3000: true, 3001: false, 8000: true } etc ?
[18:03:57] ericli: sergey_makagon: no
[18:04:09] ericli: sergey_makagon: just return true or false would be fine
[18:04:21] toretore: ericli: you have to describe the problem more precisely
[18:04:33] ericli: https://paste.fedoraproject.org/378109/57546191/
[18:04:34] toretore: return true or false based on what?
[18:04:48] xfbs: has joined #ruby
[18:05:06] ericli: toretore: return 200 means true or it would be false.
[18:05:17] ericli: I pasted a modified version
[18:06:10] toretore: you're still describing your problem in terms of what you think is the solution
[18:07:09] toretore: describe the problem for what it is, "i want to send an http request to a list of ports; if at least one of those doesn't return http 200, do x"
[18:07:12] dcunit3d: has joined #ruby
[18:08:25] Guest_: has joined #ruby
[18:08:31] ericli: toretore: hmm, sorry about that. but I mentioned what I expected, return true or false based on the requests result.
[18:09:02] ericli: toretore: did u see the code I pasted? I guess that explains what I'm saying.
[18:09:44] toretore: i'm trying to make you think about the problem in such a way that you can solve it yourself and then learn to solve similar problems in the future
[18:09:56] toretore: but anyway, i don't have time right now, so here: [80, 443, 4080].all?{|p| status_code(p) == 200 }
[18:10:36] sergey_makagon: i would say that this will solve your problem: ![80, 443, 4080].any? { |port| status_code(port) != 200 }
[18:11:04] idiocrash: has joined #ruby
[18:12:13] jrafanie: has joined #ruby
[18:12:41] idiocrash: has joined #ruby
[18:13:08] mikecmpbll: has joined #ruby
[18:14:15] mesamoo: has joined #ruby
[18:16:12] shevy: that's the beauty with ruby - more than one way to pick!
[18:16:41] sergey_makagon: yeah, but in my implementation it will not have to go through the all array of ports :P
[18:16:50] duckpupp1: has joined #ruby
[18:18:23] sergey_makagon: hmm, but maybe i'm wrong. all? will stop iterating if it's find false value as well.
[18:18:35] edwinvdgraaf: has joined #ruby
[18:22:03] sergey_makagon: so yes, that's the beauty of Ruby)
[18:22:20] duckpuppy: has joined #ruby
[18:23:59] shevy: clever implementation!
[18:25:17] flashpoint9: has joined #ruby
[18:26:10] phrozen77: has joined #ruby
[18:27:41] minimalism: has joined #ruby
[18:29:34] Vingador: has joined #ruby
[18:31:10] xxneolithicxx: has joined #ruby
[18:32:08] snath: has joined #ruby
[18:34:07] fuso: has joined #ruby
[18:36:17] pilne: ruby is very clever and very "nice" to the programmer
[18:36:44] spudowiar: it's just sad it's so slow :(
[18:36:55] spudowiar: I absolutely love Ruby though
[18:37:00] swills: has joined #ruby
[18:38:50] pilne: i've seen a couple of projects that are trying to address that. crystal (a new langauge, ruby inspired), and helix (bindings and boilerplate for using rust from/in ruby)
[18:40:05] marr: has joined #ruby
[18:41:04] solars: has joined #ruby
[18:42:04] spudowiar: Why does gsub! return nil if no replacements were made
[18:42:11] multi_io: has joined #ruby
[18:42:16] spudowiar: I can't do gsub!.tr! then :(
[18:42:22] spudowiar: that can't happen either
[18:44:32] dcunit3d: has joined #ruby
[18:46:42] shevy: don't chain ! methods usually
[18:46:56] mgdepoo: has joined #ruby
[18:47:04] shevy: you may then often end up doing nil.method!
[18:48:38] mgdepoo: Hi! I'm new to Ruby and I'm having a hard time understanding this outcome: http://pastebin.com/FG2Fcex4
[18:48:41] ruby[bot]: mgdepoo: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/895cdbe3dc6bbb96a62bac41687e7159
[18:48:43] ruby[bot]: mgdepoo: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[18:49:09] mgdepoo: How's my array different from the array that map returns?
[18:49:42] vuoto: has joined #ruby
[18:49:47] blackmesa: has joined #ruby
[18:50:11] shevy: do you have an array
[18:51:15] markfletcher: has joined #ruby
[18:51:23] nobitanobi: has joined #ruby
[18:52:29] yqt: has joined #ruby
[18:54:08] toretore: Waiting for pastebin.com...
[18:56:27] chipotle: has joined #ruby
[18:57:42] chipotle: has joined #ruby
[18:58:14] jrafanie: has joined #ruby
[18:59:46] blackmesa: has joined #ruby
[19:02:02] jgt: has joined #ruby
[19:03:44] ramfjord: has joined #ruby
[19:04:09] iajrz``: has joined #ruby
[19:07:08] vuoto_: has joined #ruby
[19:07:24] nerium: has joined #ruby
[19:07:36] haraigoshi: has joined #ruby
[19:07:45] minimalism: has joined #ruby
[19:08:43] iajrz```: has joined #ruby
[19:09:04] nixmaniack: has joined #ruby
[19:09:04] nixmaniack: has joined #ruby
[19:10:50] blackmesa: has joined #ruby
[19:11:52] symm-: has joined #ruby
[19:13:13] Rodya_: has joined #ruby
[19:14:31] mistermocha: has joined #ruby
[19:15:52] ctp: has joined #ruby
[19:17:11] mgdepoo: I repeat, with no pastebin this time: https://gist.github.com/anonymous/895cdbe3dc6bbb96a62bac41687e7159
[19:17:12] mgdepoo: I'm new to Ruby and I'm having a hard time understanding this outcome
[19:17:19] mgdepoo: How's my array different from the array that map returns?
[19:17:49] shevy: what array
[19:18:07] apeiros: mgdepoo: what did you expect?
[19:18:36] mgdepoo: ok, 3.times.map { |n| n == 1 } returns [false, true, false]
[19:18:51] chicken: has joined #ruby
[19:18:53] shevy: 3.times.map { |n| n == 1 } == [false, true, false] # => true
[19:18:58] apeiros: that much I can see. does that fit with your expectation?
[19:19:11] mgdepoo: if i count that array, 3.times.map.count { |n| n == 1 } returns 1
[19:19:22] mgdepoo: [false, true, false].count returns 3
[19:19:30] shevy: 3.times.map.count { |n| n == 1 } # => 1
[19:19:38] apeiros: yes, and again - what did you expect?
[19:19:44] shevy: I am not sure I see your array there
[19:20:12] elifoster: has joined #ruby
[19:20:17] mgdepoo: I expected the same count when the array is returned by map and when I type it into irb
[19:20:23] mgdepoo: It is the same array, isn't it?
[19:20:26] apeiros: you didn't perform the same count
[19:20:38] apeiros: in your first count, you told count you wanted to count the elements which are == 1
[19:20:43] apeiros: in the second count, you did no such thing
[19:20:59] apeiros: Array#count without argument or block will count the number of elements
[19:21:09] apeiros: and [false, true, false] is an array with 3 elements
[19:21:58] AlexRussia: has joined #ruby
[19:22:03] mdw: has joined #ruby
[19:22:37] mgdepoo: oh, ok. I don't quite get the syntax yet
[19:22:52] mgdepoo: I get this now, thanks folks :)
[19:24:20] qasaur: has joined #ruby
[19:24:34] dionysus69: has joined #ruby
[19:27:02] alfiemax: has joined #ruby
[19:27:48] Rodya_: has joined #ruby
[19:28:05] johnDoe111: has joined #ruby
[19:28:28] asahi: has joined #ruby
[19:29:37] asahi: hello, how would I make a variable accessible in multiple functions in a single module?
[19:29:38] DoubleMalt: has joined #ruby
[19:29:51] duckpuppy: has joined #ruby
[19:30:50] apeiros: if they're truly functions - then via arguments passed to them
[19:30:52] kavanagh: has joined #ruby
[19:31:12] apeiros: if they're methods, i.e. the module is included - then via an instance variable. preferably through the indirection of a reader.
[19:31:29] dling: has joined #ruby
[19:31:47] swills: has joined #ruby
[19:32:09] AndyBotwin: has joined #ruby
[19:32:22] jetpackjoe: has joined #ruby
[19:32:24] asahi: the module is included, so I guess with an instance variable then. thank you
[19:32:28] Rodya_: has joined #ruby
[19:36:56] k3rn31: has joined #ruby
[19:40:11] jancel: has joined #ruby
[19:40:19] Tref: has joined #ruby
[19:45:30] ryan_notabot: has joined #ruby
[19:46:17] ryan_notabot: has joined #ruby
[19:46:59] arooni: has joined #ruby
[19:47:24] sergey_makagon: has joined #ruby
[19:50:29] yfeldblum: has joined #ruby
[19:53:05] asahi: has left #ruby: ()
[19:54:18] Pumukel: has joined #ruby
[19:55:45] joonty: has joined #ruby
[19:56:55] ekinmur: has joined #ruby
[19:57:36] nofxx: has joined #ruby
[19:58:33] sergey_makagon: has joined #ruby
[19:58:36] edwinvdg_: has joined #ruby
[19:59:00] swills: has joined #ruby
[20:00:30] tildes: has joined #ruby
[20:00:31] matp: has joined #ruby
[20:01:06] freerobby: has joined #ruby
[20:02:40] jgt: has joined #ruby
[20:03:30] nankyokusei: has joined #ruby
[20:05:12] AlexRussia: has joined #ruby
[20:09:06] lightt: has joined #ruby
[20:10:56] jgt: has joined #ruby
[20:14:54] lightt: has joined #ruby
[20:17:18] Coldblackice: has joined #ruby
[20:17:34] digneety: has joined #ruby
[20:18:09] kavanagh: has joined #ruby
[20:19:10] ramfjord: has joined #ruby
[20:19:23] yude: has joined #ruby
[20:20:45] hutch34: has joined #ruby
[20:21:06] Guest5: has joined #ruby
[20:23:01] k3rn31: has joined #ruby
[20:24:57] ryan_notabot: has joined #ruby
[20:26:09] Rodya_: has joined #ruby
[20:28:01] TubaraoSardinha: has joined #ruby
[20:29:06] johnDoe111: has joined #ruby
[20:31:52] jaguarmagenta: has joined #ruby
[20:33:39] Pumukel: has joined #ruby
[20:34:08] Madplatypus: has joined #ruby
[20:34:47] kavanagh: has joined #ruby
[20:35:58] ur5us: has joined #ruby
[20:37:40] Renich: has joined #ruby
[20:39:18] river__: has joined #ruby
[20:40:15] dcunit3d: has joined #ruby
[20:46:50] tmtwd: has joined #ruby
[20:54:53] banister: has joined #ruby
[20:55:23] nobitanobi: has joined #ruby
[20:57:49] r1v3r: has joined #ruby
[20:58:21] LoneHerm_: has joined #ruby
[21:01:57] AlexRussia: has joined #ruby
[21:03:05] fsosowp: has joined #ruby
[21:03:36] victorzimmer: has joined #ruby
[21:04:19] AndChat-688961: has joined #ruby
[21:07:05] panpainter: has joined #ruby
[21:09:43] duckpuppy: has joined #ruby
[21:10:19] hutch34: has joined #ruby
[21:11:11] workmad3: has joined #ruby
[21:13:03] ICantCook: has joined #ruby
[21:13:16] scepticulous: has joined #ruby
[21:14:05] LoneHerm_: has joined #ruby
[21:18:17] shevy: http://search.cpan.org/~simon/rubyisms-1.0/rubyisms.pm
[21:18:19] shevy: how peculiar
[21:24:36] jaguarmagenta: has joined #ruby
[21:25:30] ramfjord: has joined #ruby
[21:27:44] pawnbox: has joined #ruby
[21:29:26] moeabdol: has joined #ruby
[21:31:33] d0nn1e: has joined #ruby
[21:32:11] nonnatus: has joined #ruby
[21:32:52] hightower2: has joined #ruby
[21:35:37] flashpoint9: has joined #ruby
[21:39:53] Rutix: has joined #ruby
[21:39:53] Rutix: has joined #ruby
[21:43:15] roamingdog: has joined #ruby
[21:43:23] Gasher: has joined #ruby
[21:43:23] ur5us: has joined #ruby
[21:43:56] hutch34: has joined #ruby
[21:44:25] pilne: so i have this block of code. given with that comment. I can *see* what is going on, and I know what I'm suppose to end up doing (line 2 needs to check for all numbers 0-9 inclusive).
[21:44:45] pilne: i just can't think of an elegant way to do it.
[21:46:40] yeticry: has joined #ruby
[21:46:42] pilne: http://paste.debian.net/738437/
[21:46:58] pilne: and i feel a bit slow.... lol, sorry, i thought i put that in the first part.
[21:47:16] ur5us: has joined #ruby
[21:47:23] A124: has joined #ruby
[21:48:50] jhass: pilne: could you post more context code? I'm actually not sure yet that's it/all you have to do ;)
[21:49:32] pilne: http://paste.debian.net/738440/
[21:51:49] pawnbox: has joined #ruby
[21:51:52] jhass: okay I see
[21:52:00] jhass: pilne: heard of regex yet?
[21:53:02] jhass: that would lead to one neat solution
[21:53:44] jhass: others I see involve .chars.all? or (....chars - ...).empty?
[21:56:22] DoubleMalt: has joined #ruby
[21:56:23] SCHAAP137: has joined #ruby
[21:58:01] vdamewood: has joined #ruby
[21:59:18] pilne: not yet from this tutorial, outside of it yet, which is why i'm scratching my head
[21:59:38] ecksit: has joined #ruby
[22:00:11] yude: has joined #ruby
[22:00:49] yude: has joined #ruby
[22:02:06] jhass: perhaps one of my other two hints gets you there then ;)
[22:02:55] pilne: thank you, i think one of those is along what the author expects, now that i think about it a bit more
[22:04:00] pontiki: has joined #ruby
[22:06:03] Fraeon: has joined #ruby
[22:06:24] lightt: has joined #ruby
[22:07:04] Noxilex: has joined #ruby
[22:07:30] lightt: has joined #ruby
[22:13:33] crystal77: has joined #ruby
[22:17:57] certainty: has joined #ruby
[22:21:14] e4xit_: has joined #ruby
[22:21:21] alfiemax: has joined #ruby
[22:22:41] nettoweb: has joined #ruby
[22:25:07] TubaraoSardinha: has joined #ruby
[22:27:10] Rodya_: has joined #ruby
[22:27:12] Fernando-Basso: has joined #ruby
[22:30:27] johnDoe111: has joined #ruby
[22:34:07] palms: has joined #ruby
[22:35:28] banister: has joined #ruby
[22:35:32] pepee: has joined #ruby
[22:35:59] zenlot6: has joined #ruby
[22:37:26] jokke: anyone know of a yaml pull parser for ruby? can psych do this?
[22:37:42] maloik: has joined #ruby
[22:39:11] palms: has joined #ruby
[22:39:28] Gasher: has joined #ruby
[22:39:51] ryan_notabot: has joined #ruby
[22:40:08] pilne: jhass-} judging by the same author's python example, it is supposed to only take strings composed of 0 and/or 1, and i'm not in the mood to try that without a regex LOL
[22:40:23] pilne: i just used a regex for my original idea and i'm moving on
[22:44:35] ryan_notabot: has joined #ruby
[22:46:10] djbkd: has joined #ruby
[22:47:54] pawnbox: has joined #ruby
[22:49:25] antranigv: has left #ruby: ()
[22:50:47] newbie|2: has joined #ruby
[22:52:39] ur5us: has joined #ruby
[22:53:20] jhass: pilne: okay, to expand my hints: choice.chars.all? {|char| ('0'..'9').include? char } and (choice.chars - [*'0'..'9']).empty?
[22:54:19] r1v3r_: has joined #ruby
[22:54:26] pontiki: what is a "yaml pull parser" ?
[22:55:12] jhass: a pull parser for yaml
[22:55:25] pontiki: what is a pull parser?
[22:56:22] Klantastic: has joined #ruby
[22:56:25] jhass: commonly called SAX in XML world
[22:56:31] Klantastic: is changing a variable during runtime metaprogramming?
[22:56:43] jhass: https://en.wikipedia.org/wiki/XML#Pull_parsing
[22:56:58] jhass: Klantastic: nope
[22:57:10] Klantastic: what's an example then?
[22:58:33] pilne: jhass thank you
[22:58:45] jhass: Klantastic: attr_reader/attr_writer/attr_accessor could be argued as such
[22:59:35] Klantastic: aren't you changing variables with attr_accessor and attr_writer?
[22:59:49] jhass: I mean their implementation
[23:00:13] jhass: attributes.each do |attribute| define_method(attribute) { instance_variable_get(:"@#{attribute}") }; define_method("#{attribute}=") {|value| instance_variable_set(:"@#{attribute}", value) }; end
[23:00:21] pontiki: metaprogramming, in general, means modifying the code rather than modifying data
[23:00:33] tildes: has joined #ruby
[23:01:58] jhass: pontiki: https://github.com/crystal-lang/crystal/blob/master/src/yaml/pull_parser.cr example implementation (usage https://github.com/crystal-lang/crystal/blob/master/spec/std/yaml/yaml_pull_parser_spec.cr)
[23:03:02] jancel: has joined #ruby
[23:03:48] jhass: interestingly libyaml basically already is a pull parser, psych has to make some effort in order to make a regular one from it
[23:04:22] pontiki: interesting; i'd never heard pull and push parsing before
[23:05:15] jackjackdripper: has joined #ruby
[23:06:59] nonnatus_: has joined #ruby
[23:07:06] yatish27: has joined #ruby
[23:08:24] johnDoe111: has joined #ruby
[23:10:30] nonnatus: has joined #ruby
[23:11:42] jhass: they can be allocation free for some purposes and are generally low on allocations, which makes them usually a lot faster
[23:11:46] duckpuppy: has joined #ruby
[23:11:54] tAn: has joined #ruby
[23:11:56] jancel: has joined #ruby
[23:12:06] jhass: of course it's harder to parse malformed stuff that way
[23:12:08] nankyokusei: has joined #ruby
[23:12:34] jhass: also now you know why psych's/libyaml's error messages suck :P
[23:13:03] shevy: long live syck!
[23:13:21] jhass: tbf I don't think it had any better error messages
[23:13:41] shevy: long live no errors!
[23:14:48] Klantastic: is there any other way to modify code than using attr_acessor or writer?
[23:15:09] shevy: yes! you write the new code
[23:15:23] shevy: you can also use eval and define_method and such thingies
[23:15:23] Klantastic: i mean automatically
[23:15:53] shevy: in a decade or probably two we will have robots writing code anyway
[23:16:39] jhass: Klantastic: tons
[23:17:15] moeabdol1: has joined #ruby
[23:18:16] Yzguy: has joined #ruby
[23:18:42] freerobby: has joined #ruby
[23:18:54] certainty: has joined #ruby
[23:21:05] Jardayn: has joined #ruby
[23:21:15] roamingdog: has joined #ruby
[23:21:59] yfeldblum: has joined #ruby
[23:23:35] doublemalt_: has joined #ruby
[23:25:09] weemsledeux: has joined #ruby
[23:27:11] pawnbox: has joined #ruby
[23:27:30] ramfjord: has joined #ruby
[23:29:50] neha-: has joined #ruby
[23:30:12] neha-: hey, how can i get the whole text piped into ruby instead of just line by line when doing ruby -e
[23:30:17] neha-: aka instead of doing ruby -pe
[23:32:28] jaguarmagenta: has joined #ruby
[23:33:02] jhass: ARGF.read
[23:33:11] jancel: has joined #ruby
[23:33:29] jhack: has joined #ruby
[23:33:29] jhass: or $stdin.read if you prefer
[23:33:46] neha-: whats $_ an alias for?
[23:34:02] tristanp: has joined #ruby
[23:34:09] jhass: "The last input line of string by gets or readline."
[23:34:14] jhass: http://devdocs.io/ruby~2.3/globals_rdoc#$_
[23:34:14] B1n4r10: has joined #ruby
[23:34:31] neha-: ah okay, thanks
[23:34:54] jhass: $< works too then I guess, if you prefer cryptic
[23:35:12] neha-: for the sake of speed in writing one liners
[23:35:27] neha-: thank you
[23:36:21] neha-: is there a shortcut for read too lol
[23:36:39] neha-: $<.read isn't too bad though
[23:38:40] segy: has joined #ruby
[23:39:54] palms: has joined #ruby
[23:40:19] jhass: function red { ruby -e "$<.read.$1" }
[23:40:33] neha-: what does $1 do?
[23:40:47] jhass: take the first parameter of red
[23:41:09] neha-: oh like bash?
[23:41:09] chappy: has joined #ruby
[23:41:11] baweaver: neha_ http://jimneath.org/2010/01/04/cryptic-ruby-global-variables-and-their-meanings.html
[23:42:32] Dimik: has joined #ruby
[23:43:30] panpainter: has joined #ruby
[23:44:51] crystal77: has joined #ruby
[23:45:49] blackgoat: has joined #ruby
[23:49:02] moeabdol1: has joined #ruby
[23:50:20] koooge: has joined #ruby
[23:57:21] nonnatus: has joined #ruby
[23:58:32] jhack: has joined #ruby
[23:59:28] chappy: has joined #ruby